[Ffmpeg-devel] [PATCH] another vorbis optimization
Michael Niedermayer
michaelni
Thu Aug 10 12:46:52 CEST 2006
Hi
On Wed, Aug 09, 2006 at 10:21:16PM -0700, Loren Merritt wrote:
[...]
> + if(vc->exp_bias){
> + int i;
> + float *win;
> + win = av_malloc(vc->blocksize_0/2 * sizeof(float));
> + for(i=0; i<vc->blocksize_0/2; i++)
> + win[i] = vc->swin[i] * (1<<15);
> + vc->swin = win;
> + win = av_malloc(vc->blocksize_1/2 * sizeof(float));
> + for(i=0; i<vc->blocksize_1/2; i++)
> + win[i] = vc->lwin[i] * (1<<15);
> + vc->lwin = win;
> + }
offtopic, but maybe we should change vc->lwin / vc->swin to vc->win[2]?
[...]
> + /* assume len is a multiple of 4, and arrays are 16-byte aligned */
> void (*vorbis_inverse_coupling)(float *mag, float *ang, int blocksize);
> + void (*vector_fmul)(float *dst, const float *src, int len);
> + /* assume len is a multiple of 8, and arrays are 16-byte aligned */
> + void (*vector_fmul_reverse)(float *dst, const float *src0, const float *src1, int len);
> + /* assume len is a multiple of 8, and src arrays are 16-byte aligned */
> + void (*vector_fmul_add_add)(float *dst, const float *src0, const float *src1, const float *src2, int src3, int len, int step);
>
> + /* C version: convert floats from the range [384.0,386.0] to ints in [-32768,32767]
> + * asm versions: convert floats from [-32768.0,32767.0] without rescaling */
> + void (*float_to_int16)(int16_t *dst, const float *src, int len);
> + int float_to_int16_expbias;
> + int float_to_int16_addbias;
hmm, what do these do in dsputil.h? typo?
exept that iam fine with the patch (maybe some of the sse functions
contained sse2 instructions, iam not sure but its no problem ill fix
it if it breaks unless someone else is quicker)
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is
More information about the ffmpeg-devel
mailing list