[FFmpeg-devel] [PATCH] Fix mlib DCT routine in dsputil
    Måns Rullgård 
    mans
       
    Thu Mar 27 09:41:18 CET 2008
    
    
  
Albert Lee <trisk+xine at acm.jhu.edu> writes:
> Hi,
>
> The ff_fdct_mlib() in dsputil has been broken for a long time; it
> assumes the mediaLib DCT scales its output by 8 (as libjpeg's does).
> This results in a well-known "green tint" problem. The attached patch
> adds the scaling.
>
> I'm also attaching the email from the mediaLib engineer who proposed the
> fix.
>
> --- ffmpeg-export-2007-07-31.orig/libavcodec/mlib/dsputil_mlib.c	Tue Jul 31 02:16:05 2007
> +++ ffmpeg-export-2007-07-31/libavcodec/mlib/dsputil_mlib.c	Tue Mar 18 23:55:41 2008
> @@ -416,7 +416,10 @@
>  
>  static void ff_fdct_mlib(DCTELEM *data)
>  {
> +    const mlib_s16 c[1] = {8};
Useless array.  Should be static.
>      mlib_VideoDCT8x8_S16_S16 (data, data);
> +    mlib_VectorMulS_S16_Sat(data, (mlib_s16 *)&c, 64); /* scaling data by 8 */
Useless cast, useless comment.
-- 
M?ns Rullg?rd
mans at mansr.com
    
    
More information about the ffmpeg-devel
mailing list