[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:34:25 CET 2011


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?

Also, could you (just to make sure) please run make fate with
--disable-mmx to make sure it works? Once that's done and confirmed,
I'm OK with this.

Ronald



More information about the ffmpeg-devel mailing list