diff options
author | satyavaraprasad yerramsetti <satyav@codeaurora.org> | 2014-10-31 15:01:39 +0530 |
---|---|---|
committer | satyavaraprasad yerramsetti <satyav@codeaurora.org> | 2014-10-31 17:38:34 +0530 |
commit | c2248d747619ddc2f2c6521e5c755961ed031767 (patch) | |
tree | dfb2dd35a0fb9a72e20e0fa593107690d1e3e0d2 /src/com/android/camera/VideoModule.java | |
parent | 6c20d314ec43be447e9a2bfb17e96452d996a18b (diff) | |
download | android_packages_apps_Snap-c2248d747619ddc2f2c6521e5c755961ed031767.tar.gz android_packages_apps_Snap-c2248d747619ddc2f2c6521e5c755961ed031767.tar.bz2 android_packages_apps_Snap-c2248d747619ddc2f2c6521e5c755961ed031767.zip |
SnapdragonCamera: Add OptimalJpegThumbnailSize selction logic in APP.
- Set a jpegthumbnail size that is closest to the Picture height and has
the right aspect ratio.
- Earlier this logic was implemented in HAL but due to CTS2 testJpegExif
failure, moving this to APP
CRs-Fixed: 748114
Change-Id: Ia2c97bf8cec7198ee291e63c3be9bbe5fb18b3b7
Diffstat (limited to 'src/com/android/camera/VideoModule.java')
-rwxr-xr-x | src/com/android/camera/VideoModule.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java index 651a3e3a6..eace13fa4 100755 --- a/src/com/android/camera/VideoModule.java +++ b/src/com/android/camera/VideoModule.java @@ -2303,6 +2303,19 @@ public class VideoModule implements CameraModule, Log.v(TAG, "Video snapshot size is " + optimalSize.width + "x" + optimalSize.height); + // Set jpegthumbnail size + // Set a jpegthumbnail size that is closest to the Picture height and has + // the right aspect ratio. + Size size = mParameters.getPictureSize(); + List<Size> sizes = mParameters.getSupportedJpegThumbnailSizes(); + optimalSize = CameraUtil.getOptimalJpegThumbnailSize(sizes, + (double) size.width / size.height); + original = mParameters.getJpegThumbnailSize(); + if (!original.equals(optimalSize)) { + mParameters.setJpegThumbnailSize(optimalSize.width, optimalSize.height); + } + Log.v(TAG, "Thumbnail size is " + optimalSize.width + "x" + optimalSize.height); + // Set JPEG quality. int jpegQuality = CameraProfile.getJpegEncodingQualityParameter(mCameraId, CameraProfile.QUALITY_HIGH); |