reversing my own stupidity ... (raw packed yuv422 files dont use YUY2 but UYVY)
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 23 Jan 2003 01:20:47 +0000 (01:20 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 23 Jan 2003 01:20:47 +0000 (01:20 +0000)
Originally committed as revision 1494 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/imgconvert.c

index 82e520ef9d2ea58a88d09a9a505b68aa2a809f86..218c844b390c09a876e4030bd98de02fc6431c4b 100644 (file)
@@ -242,18 +242,18 @@ static void yuv422_to_yuv420p(AVPicture *dst, AVPicture *src,
    
     for(y=0;y<height;y+=2) {
         for(x=0;x<width;x+=2) {
-            cb[0] = p[0];
-            lum[0] = p[1];
-            cr[0] = p[2];
-            lum[1] = p[3];
+            lum[0] = p[0];
+            cb[0] = p[1];
+            lum[1] = p[2];
+            cr[0] = p[3];
             p += 4;
             lum += 2;
             cb++;
             cr++;
         }
         for(x=0;x<width;x+=2) {
-            lum[0] = p[1];
-            lum[1] = p[3];
+            lum[0] = p[0];
+            lum[1] = p[2];
             p += 4;
             lum += 2;
         }