[FFmpeg-devel] [PATCH 1/2] Remove the add bias hack for the C version of DSPContext.float_to_int16_*().

Ronald S. Bultje rsbultje
Wed Jan 26 20:40:36 CET 2011


Hi,

2011/1/26 M?ns Rullg?rd <mans at mansr.com>:
> "Ronald S. Bultje" <rsbultje at gmail.com> writes:
>
>> Hi,
>>
>> On Wed, Jan 26, 2011 at 1:46 PM, Justin Ruggles
>> <justin.ruggles at gmail.com> wrote:
>>> ?libavcodec/aac.h ? ? ? ? ? | ? ?1 -
>>> ?libavcodec/aacdec.c ? ? ? ?| ? 42 +++++++++++++++------------------------
>>> ?libavcodec/aacsbr.c ? ? ? ?| ? 13 ++---------
>>> ?libavcodec/ac3dec.c ? ? ? ?| ? 13 +----------
>>> ?libavcodec/ac3dec.h ? ? ? ?| ? ?1 -
>>> ?libavcodec/binkaudio.c ? ? | ? ?5 ----
>>> ?libavcodec/dca.c ? ? ? ? ? | ? 47 +++++++++++++++++--------------------------
>>> ?libavcodec/dsputil.c ? ? ? | ? ?9 +-------
>>> ?libavcodec/dsputil.h ? ? ? | ? ?3 +-
>>> ?libavcodec/nellymoserdec.c | ? ?9 +-------
>>> ?libavcodec/wmadec.c ? ? ? ?| ? 17 +---------------
>>> ?11 files changed, 44 insertions(+), 116 deletions(-)
>> [..]
>>> @@ -637,13 +628,13 @@ static inline void do_imdct(AC3DecodeContext *s, int channels)
>>> ? ? ? ? ? ? ?for(i=0; i<128; i++)
>>> ? ? ? ? ? ? ? ? ?x[i] = s->transform_coeffs[ch][2*i];
>>> ? ? ? ? ? ? ?ff_imdct_half(&s->imdct_256, s->tmp_output, x);
>>> - ? ? ? ? ? ?s->dsp.vector_fmul_window(s->output[ch-1], s->delay[ch-1], s->tmp_output, s->window, add_bias, 128);
>>> + ? ? ? ? ? ?s->dsp.vector_fmul_window(s->output[ch-1], s->delay[ch-1], s->tmp_output, s->window, 0, 128);
>>> ? ? ? ? ? ? ?for(i=0; i<128; i++)
>>> ? ? ? ? ? ? ? ? ?x[i] = s->transform_coeffs[ch][2*i+1];
>>> ? ? ? ? ? ? ?ff_imdct_half(&s->imdct_256, s->delay[ch-1], x);
>>> ? ? ? ? ?} else {
>>> ? ? ? ? ? ? ?ff_imdct_half(&s->imdct_512, s->tmp_output, s->transform_coeffs[ch]);
>>> - ? ? ? ? ? ?s->dsp.vector_fmul_window(s->output[ch-1], s->delay[ch-1], s->tmp_output, s->window, add_bias, 128);
>>> + ? ? ? ? ? ?s->dsp.vector_fmul_window(s->output[ch-1], s->delay[ch-1], s->tmp_output, s->window, 0, 128);
>>> ? ? ? ? ? ? ?memcpy(s->delay[ch-1], s->tmp_output+128, 128*sizeof(float));
>>> ? ? ? ? ?}
>>> ? ? ?}
>>
>> I see you removed this add_bias in various other places, so where you
>> didn't: we can probably simplify such functions now also and remove
>> the add_bias argument completely? Or is this used for proper purposes
>> elsewhere?
>
> The argument has to stay as a placeholder until we've updated all the asm.
> It's easier to do this in two steps.

OK, stepwise is fine as long as it's on the list to eventually be done.

And thanks Justin!

Ronald



More information about the ffmpeg-devel mailing list