changeset 1207:162be12df86a libavcodec

fixed PIX_FMT_YUV422 conversions
author bellard
date Mon, 21 Apr 2003 15:15:59 +0000
parents fd676abc754c
children 0f37976aa436
files imgconvert.c
diffstat 1 files changed, 12 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/imgconvert.c	Mon Apr 21 15:01:37 2003 +0000
+++ b/imgconvert.c	Mon Apr 21 15:15:59 2003 +0000
@@ -538,8 +538,8 @@
  
     p1 = src->data[0];
     lum1 = dst->data[0];
-    cb1 = dst->data[0];
-    cr1 = dst->data[0];
+    cb1 = dst->data[1];
+    cr1 = dst->data[2];
 
     for(;height >= 2; height -= 2) {
         p = p1;
@@ -582,9 +582,9 @@
 
     p1 = src->data[0];
     lum1 = dst->data[0];
-    cb1 = dst->data[0];
-    cr1 = dst->data[0];
-    for(;height >= 2; height -= 2) {
+    cb1 = dst->data[1];
+    cr1 = dst->data[2];
+    for(;height > 0; height--) {
         p = p1;
         lum = lum1;
         cb = cb1;
@@ -615,9 +615,9 @@
 
     p1 = dst->data[0];
     lum1 = src->data[0];
-    cb1 = src->data[0];
-    cr1 = src->data[0];
-    for(;height >= 2; height -= 2) {
+    cb1 = src->data[1];
+    cr1 = src->data[2];
+    for(;height > 0; height--) {
         p = p1;
         lum = lum1;
         cb = cb1;
@@ -632,10 +632,10 @@
             cb++;
             cr++;
         }
-        p1 += src->linesize[0];
-        lum1 += dst->linesize[0];
-        cb1 += dst->linesize[1];
-        cr1 += dst->linesize[2];
+        p1 += dst->linesize[0];
+        lum1 += src->linesize[0];
+        cb1 += src->linesize[1];
+        cr1 += src->linesize[2];
     }
 }