Correct Cb plane bug in conversion from RGB->YCbCr; the upper-right pixel was ignored...
authorMonty <xiphmont@xiph.org>
Tue, 10 Jun 2014 00:31:36 +0000 (00:31 +0000)
committerMonty <xiphmont@xiph.org>
Tue, 10 Jun 2014 00:31:36 +0000 (00:31 +0000)
git-svn-id: http://svn.xiph.org/trunk/theora@19154 0101bb08-14d6-0310-b084-bc0e0c8e3800

examples/png2theora.c

index 281c8ac..c740ad8 100644 (file)
@@ -331,7 +331,7 @@ rgb_to_yuv(png_bytep *png,
 
         yuv_u[(x >> 1) + (y >> 1) * ycbcr[1].stride] =
           clamp( ((-33488*r0-65744*g0+99232*b0+29032005)/4 +
-                  (-33488*r0-65744*g0+99232*b0+29032005)/4 +
+                  (-33488*r1-65744*g1+99232*b1+29032005)/4 +
                   (-33488*r2-65744*g2+99232*b2+29032005)/4 +
                   (-33488*r3-65744*g3+99232*b3+29032005)/4)/225930);
         yuv_v[(x >> 1) + (y >> 1) * ycbcr[2].stride] =