Mercurial > libavcodec.hg
comparison dsputil.c @ 7263:fc843d00867c libavcodec
exploit mdct symmetry
2% faster vorbis on conroe, k8. 7% on celeron.
author | lorenm |
---|---|
date | Sun, 13 Jul 2008 15:03:58 +0000 |
parents | 032a49f033e8 |
children | e267f2519248 |
comparison
equal
deleted
inserted
replaced
7262:e3822c61f2e4 | 7263:fc843d00867c |
---|---|
3929 for(i=0; i<len; i++) | 3929 for(i=0; i<len; i++) |
3930 dst[i*step] = src0[i] * src1[i] + src2[i] + src3; | 3930 dst[i*step] = src0[i] * src1[i] + src2[i] + src3; |
3931 } | 3931 } |
3932 | 3932 |
3933 void ff_vector_fmul_window_c(float *dst, const float *src0, const float *src1, const float *win, float add_bias, int len){ | 3933 void ff_vector_fmul_window_c(float *dst, const float *src0, const float *src1, const float *win, float add_bias, int len){ |
3934 int i; | 3934 int i,j; |
3935 for(i=0; i<len; i++) | 3935 dst += len; |
3936 dst[i] = src0[i]*win[len-i-1] + src1[i]*win[i] + add_bias; | 3936 win += len; |
3937 src0+= len; | |
3938 for(i=-len, j=len-1; i<0; i++, j--) { | |
3939 float s0 = src0[i]; | |
3940 float s1 = src1[j]; | |
3941 float wi = win[i]; | |
3942 float wj = win[j]; | |
3943 dst[i] = s0*wj - s1*wi + add_bias; | |
3944 dst[j] = s0*wi + s1*wj + add_bias; | |
3945 } | |
3937 } | 3946 } |
3938 | 3947 |
3939 static av_always_inline int float_to_int16_one(const float *src){ | 3948 static av_always_inline int float_to_int16_one(const float *src){ |
3940 int_fast32_t tmp = *(const int32_t*)src; | 3949 int_fast32_t tmp = *(const int32_t*)src; |
3941 if(tmp & 0xf0000){ | 3950 if(tmp & 0xf0000){ |