From ad5d193e3a8c65f623abeda4f88449e8ff7d27f2 Mon Sep 17 00:00:00 2001
From: Wei-Ta Chen <weita@google.com>
Date: Tue, 20 Sep 2011 18:40:53 -0700
Subject: Correct the YUV444 to NV21 conversion.

For the downsampling, we should use the same pixel's UV channel, instead
of even pixel's V and odd pixel's U.

Change-Id: If94ac380b77dc776d61fdab3a31697f9fadfbad1
---
 jni/feature_mos_jni.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'jni')

diff --git a/jni/feature_mos_jni.cpp b/jni/feature_mos_jni.cpp
index fdece27..c87b825 100644
--- a/jni/feature_mos_jni.cpp
+++ b/jni/feature_mos_jni.cpp
@@ -628,7 +628,7 @@ JNIEXPORT jbyteArray JNICALL Java_com_android_camera_panorama_Mosaic_getFinalMos
         for(int i=0; i<mosaicWidth; i+=2)
         {
             V[j*mosaicWidth+i] = V[(2*j)*mosaicWidth+i];        // V
-            V[j*mosaicWidth+i+1] = U[(2*j)*mosaicWidth+i+1];        // U
+            V[j*mosaicWidth+i+1] = U[(2*j)*mosaicWidth+i];        // U
         }
     }
 
-- 
cgit v1.1