[FFmpeg-devel] [PATCH] mdct: remove unnecessary multiplication

Måns Rullgård mans
Thu Feb 17 13:02:01 CET 2011


Young Han Lee <cpumaker at gmail.com> writes:

> 3*n4 was already calculated in n3.
>
> ---
>  libavcodec/mdct.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/libavcodec/mdct.c b/libavcodec/mdct.c
> index 819f618..31e2216 100644
> --- a/libavcodec/mdct.c
> +++ b/libavcodec/mdct.c
> @@ -202,7 +202,7 @@ void ff_mdct_calc_c(FFTContext *s, FFTSample *out, const
> FFTSample *input)
>
>      /* pre rotation */
>      for(i=0;i<n8;i++) {
> -        re = -input[2*i+3*n4] - input[n3-1-2*i];
> +        re = -input[2*i+n3] - input[n3-1-2*i];
>          im = -input[n4+2*i] + input[n4-1-2*i];
>          j = revtab[i];
>          CMUL(x[j].re, x[j].im, re, im, -tcos[i], tsin[i]);
> -- 
> 1.7.1

OK, queued.

Note, gmail mangled the patch slightly so I had to fix it manually.  If
you send patches with gmail, you should attach them and not paste into
the message field.  You might also consider using git send-email.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list