summaryrefslogtreecommitdiffstats
path: root/jni
diff options
context:
space:
mode:
authorWei-Ta Chen <weita@google.com>2011-09-20 18:40:53 -0700
committerWei-Ta Chen <weita@google.com>2011-09-20 18:40:53 -0700
commitad5d193e3a8c65f623abeda4f88449e8ff7d27f2 (patch)
treef4bc1c68a66880c51d4da609d96b9cd631b727b9 /jni
parent494c4065b52bd58faa29307ccdb60dd425a843eb (diff)
downloadLegacyCamera-ad5d193e3a8c65f623abeda4f88449e8ff7d27f2.zip
LegacyCamera-ad5d193e3a8c65f623abeda4f88449e8ff7d27f2.tar.gz
LegacyCamera-ad5d193e3a8c65f623abeda4f88449e8ff7d27f2.tar.bz2
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
Diffstat (limited to 'jni')
-rw-r--r--jni/feature_mos_jni.cpp2
1 files changed, 1 insertions, 1 deletions
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
}
}