[FFmpeg-devel] [PATCH] WMA: Use ff_sine_window_init and share sine window tables
Thu Aug 14 23:51:06 CEST 2008
On Thu, Aug 14, 2008 at 10:26:25PM +0100, Robert Swain wrote:
> 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:
> >>> Hello,
> >>> Attached are two patches:
> >>> 0001-Use-ff_sine_window_init-from-mdct.c.patch
> >>> Change wma.c to use the ff_sine_window_init() from mdct.c
> >>> 0002-Add-shared-sine-tables-to-mdct.c-and-use-them-in-wma.patch
> >>> 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.
> > Applying...
> 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, ...)?
yes (and no, no patch please just commit it!)
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel