[xiph-commits] r16321 - branches/theora-thusnelda/lib/enc

tterribe at svn.xiph.org tterribe at svn.xiph.org
Wed Jul 22 18:21:08 PDT 2009


Author: tterribe
Date: 2009-07-22 18:21:08 -0700 (Wed, 22 Jul 2009)
New Revision: 16321

Modified:
   branches/theora-thusnelda/lib/enc/encode.c
Log:
Fix a copy-paste error that could lead to encoder memory corruption for 4:2:2
 input.


Modified: branches/theora-thusnelda/lib/enc/encode.c
===================================================================
--- branches/theora-thusnelda/lib/enc/encode.c	2009-07-23 00:51:02 UTC (rev 16320)
+++ branches/theora-thusnelda/lib/enc/encode.c	2009-07-23 01:21:08 UTC (rev 16321)
@@ -1058,7 +1058,7 @@
   _enc->coded_mbis=
    (unsigned *)_ogg_malloc(_enc->state.nmbs*sizeof(*_enc->coded_mbis));
   hdec=!(_enc->state.info.pixel_fmt&1);
-  vdec=!(_enc->state.info.pixel_fmt&1);
+  vdec=!(_enc->state.info.pixel_fmt&2);
   /*If chroma is sub-sampled in the vertical direction, we have to encode two
      super block rows of Y' for each super block row of Cb and Cr.*/
   _enc->mcu_nvsbs=1<<vdec;



More information about the commits mailing list