[FFmpeg-devel] [PATCH] WMA: Use ff_sine_window_init and share sine window tables
Thu Aug 14 23:26:25 CEST 2008
2008/8/14 Robert Swain <robert.swain at gmail.com>:
> 2008/8/14 Michael Niedermayer <michaelni at gmx.at>:
>> On Thu, Aug 14, 2008 at 02:16:48PM +0100, Robert Swain wrote:
>>> Attached are two patches:
>>> Change wma.c to use the ff_sine_window_init() from mdct.c
>>> Add declarations for the sine tables used in wma.c (half window sizes:
>>> 128, 256, 512, 1024 and 2048) to mdct.c. Make them accessible via
>>> ff_sine_windows in dsputil.h. Make wma.c use these shared tables.
>>> When this is done, I'll use the appropriate shared tables in the AAC decoder.
>>> @@ -48,6 +48,15 @@ void ff_kbd_window_init(float *window, float alpha, int n)
>>> window[i] = sqrt(local_window[i] / sum);
>>> +static float ff_sine_128 [ 128];
>>> +static float ff_sine_256 [ 256];
>>> +static float ff_sine_512 [ 512];
>>> +static float ff_sine_1024;
>>> +static float ff_sine_2048;
>> it may be faster if some of these where non static and accessed
>> directly by codecs needing just one
> I was going to do it that way but I figured either way would work.
> I'll make them non-static as it shouldn't hurt.
Applied. But I've just had a thought. These will commonly be used in
dsputil functions such as fmul_add_add or fmul_window or whatever so
should they be DECLARE_ALIGNED(16, ...)?
More information about the ffmpeg-devel