[Ffmpeg-devel] [PATCH] lowres chroma bug

Reimar Döffinger Reimar.Doeffinger
Thu Jul 6 21:57:46 CEST 2006

On Wed, Jul 05, 2006 at 09:38:30PM +0200, Michael Niedermayer wrote:
> On Wed, Jul 05, 2006 at 06:26:54PM +0200, Reimar D?ffinger wrote:
> > the attached patch fixes an extreme chroma bug in lowres mode for at
> > least one MSMPEG4V2 video (probably it's the same as available at
> > http://www.elephantsdream.org/download/ , not sure though).
> > Okay to commit?
> no, the change looks wrong, chroma blocks are supposed to be half w/h

True, actually looks like it's a bug in the MMX code (since the attached
patch has mostly the same effect), but I'm unable to find the bug...
Actually uncommenting the put_... function seems to be enough, the
avg_... one doesn't make any difference I can see.
In both cases, the big green areas are gone, though there is still a
greenish tint that increases until the next I-frame (might of course be
a "normal" sideeffect of lowres decoding, though it doesn't really look
like it).

Reimar D?ffinger
-------------- next part --------------
Index: libavcodec/i386/dsputil_mmx.c
--- libavcodec/i386/dsputil_mmx.c	(revision 5625)
+++ libavcodec/i386/dsputil_mmx.c	(working copy)
@@ -2983,8 +2983,8 @@
             c->avg_h264_chroma_pixels_tab[0]= avg_h264_chroma_mc8_mmx2;
             c->avg_h264_chroma_pixels_tab[1]= avg_h264_chroma_mc4_mmx2;
-            c->avg_h264_chroma_pixels_tab[2]= avg_h264_chroma_mc2_mmx2;
-            c->put_h264_chroma_pixels_tab[2]= put_h264_chroma_mc2_mmx2;
+//            c->avg_h264_chroma_pixels_tab[2]= avg_h264_chroma_mc2_mmx2;
+//            c->put_h264_chroma_pixels_tab[2]= put_h264_chroma_mc2_mmx2;
             c->h264_v_loop_filter_luma= h264_v_loop_filter_luma_mmx2;
             c->h264_h_loop_filter_luma= h264_h_loop_filter_luma_mmx2;
             c->h264_v_loop_filter_chroma= h264_v_loop_filter_chroma_mmx2;

More information about the ffmpeg-devel mailing list