[FFmpeg-devel] [PATCH 01/12] Add vector_fmul_step_scalar for WMA
Mans Rullgard
mans
Sun Sep 27 12:49:17 CEST 2009
---
libavcodec/dsputil.c | 10 ++++++++++
libavcodec/dsputil.h | 3 +++
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index 894e592..16f2d25 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -4074,6 +4074,15 @@ static void vector_fmul_add_c(float *dst, const float *src0, const float *src1,
dst[i] = src0[i] * src1[i] + src2[i];
}
+static void vector_fmul_step_scalar_c(float *dst, const float *src0,
+ const float *src1, float src2,
+ int step, int len)
+{
+ int i;
+ for (i = 0; i < len; i++)
+ dst[i] = src0[i] * src1[i*step] * src2;
+}
+
void ff_vector_fmul_window_c(float *dst, const float *src0, const float *src1, const float *win, float add_bias, int len){
int i,j;
dst += len;
@@ -4799,6 +4808,7 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
c->scalarproduct_float = scalarproduct_float_c;
c->butterflies_float = butterflies_float_c;
c->vector_fmul_scalar = vector_fmul_scalar_c;
+ c->vector_fmul_step_scalar = vector_fmul_step_scalar_c;
c->vector_fmul_sv_scalar[0] = vector_fmul_sv_scalar_2_c;
c->vector_fmul_sv_scalar[1] = vector_fmul_sv_scalar_4_c;
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index dd7b22d..7d27d25 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -393,6 +393,9 @@ typedef struct DSPContext {
/* assume len is a multiple of 4, and arrays are 16-byte aligned */
void (*vector_fmul_window)(float *dst, const float *src0, const float *src1, const float *win, float add_bias, int len);
/* assume len is a multiple of 8, and arrays are 16-byte aligned */
+ void (*vector_fmul_step_scalar)(float *dst, const float *src0,
+ const float *src1, float src2,
+ int step, int len);
void (*int32_to_float_fmul_scalar)(float *dst, const int *src, float mul, int len);
void (*vector_clipf)(float *dst /* align 16 */, const float *src /* align 16 */, float min, float max, int len /* align 16 */);
/**
--
1.6.4.4
More information about the ffmpeg-devel
mailing list