diff options
author | Wei-Ta Chen <weita@google.com> | 2011-10-07 15:23:22 -0700 |
---|---|---|
committer | Wei-Ta Chen <weita@google.com> | 2011-10-12 11:44:09 -0700 |
commit | 89b9c07b5bbcc2de25dd5f61c28de4575b4df996 (patch) | |
tree | caaf5af8f63543acad764358347c6eddcafea3ce /jni/feature_mos_jni.cpp | |
parent | 895573a418f0304e312ae9645a37f85d443bfa3a (diff) | |
download | LegacyCamera-89b9c07b5bbcc2de25dd5f61c28de4575b4df996.zip LegacyCamera-89b9c07b5bbcc2de25dd5f61c28de4575b4df996.tar.gz LegacyCamera-89b9c07b5bbcc2de25dd5f61c28de4575b4df996.tar.bz2 |
Avoid a possible overflow on setting the mosaic size.
Log the size of the mosaic image before cropping, so as to help debug.
Also, fix another issue that NV21 should be vertically subsmapled.
Bug: 5412447
Change-Id: I20b0ef7fc1968517c63b7f599f04c8126adc0471
Diffstat (limited to 'jni/feature_mos_jni.cpp')
-rw-r--r-- | jni/feature_mos_jni.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/jni/feature_mos_jni.cpp b/jni/feature_mos_jni.cpp index e3fdea5..e40b75a 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 // Convert YVU to NV21 format in-place ImageType V = resultYVU+mosaicWidth*mosaicHeight; ImageType U = V+mosaicWidth*mosaicHeight; - for(int j=0; j<mosaicHeight; j++) + for(int j=0; j<mosaicHeight/2; j++) { for(int i=0; i<mosaicWidth; i+=2) { |