[FFmpeg-devel] [PATCH 1/2] Move float windowing code in mp3 decoder to dsputils
Vitor Sessak
vitor1001
Fri Jun 18 15:54:15 CEST 2010
On 06/18/2010 02:45 PM, Michael Niedermayer wrote:
> On Thu, Jun 17, 2010 at 05:34:48PM +0200, Vitor Sessak wrote:
>> On 06/17/2010 04:50 PM, M?ns Rullg?rd wrote:
>>> Vitor Sessak<vitor1001 at gmail.com> writes:
>>>
>>>> $subj. It introduces some code duplication that I have no good idea
>>>> how to avoid.
>>>
>>> Can we please not clutter dsputil with even more codec-specific stuff?
>>
>> As attached?
> [...]
>> /* layer 3 huffman tables */
>> @@ -178,7 +180,7 @@
>> void ff_mpa_synth_filter_float(MPA_INT *synth_buf_ptr, int *synth_buf_offset,
>> MPA_INT *window, int *dither_state,
>> OUT_INT *samples, int incr,
>> - INTFLOAT sb_samples[SBLIMIT]);
>> + INTFLOAT sb_samples[SBLIMIT], MPADecodeContext *s);
>
> whats the context needd for ?
To get a pointer to the apply_window_mp3() function:
> +/* 32 sub band synthesis filter. Input: 32 sub band samples, Output:
> + 32 samples. */
> +/* XXX: optimize by avoiding ring buffer usage */
> +#if CONFIG_FLOAT
> +void ff_mpa_synth_filter_float(float *synth_buf_ptr,
> + int *synth_buf_offset,
> + float *window, int *dither_state,
> + float *samples, int incr,
> + float sb_samples[SBLIMIT],
> + MPADecodeContext *s)
> +{
> + float *synth_buf;
> + int offset;
> +
> + offset = *synth_buf_offset;
> + synth_buf = synth_buf_ptr + offset;
> +
> + dct32(synth_buf, sb_samples);
> + s->apply_window_mp3(synth_buf, window, dither_state, samples, incr);
^^^
It will be also useful later to get a DCTContext for the asm-optimized
dct32()...
-Vitor
More information about the ffmpeg-devel
mailing list