summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSultanxda <sultanxda@gmail.com>2015-11-05 22:03:57 -0800
committerMichael Bestas <mikeioannina@gmail.com>2017-01-04 21:57:47 +0200
commitdde4c053296dc44f46478e03c4c787000615a241 (patch)
tree73189fdf6f34f920b7fc8beb577074d0a2e43c7f
parent21988e9bc1e1ccfc44d83f18f5fdce818495f347 (diff)
downloadandroid_packages_apps_Snap-dde4c053296dc44f46478e03c4c787000615a241.tar.gz
android_packages_apps_Snap-dde4c053296dc44f46478e03c4c787000615a241.tar.bz2
android_packages_apps_Snap-dde4c053296dc44f46478e03c4c787000615a241.zip
SnapdragonCamera: Scale up bitrate for HSR recordings
Currently, bitrate is only scaled up for HFR (slow-mo) recordings, not HSR (full high-speed) recordings. Scale up the bitrate for HSR to prevent video-quality degradation. Change-Id: Icc009ad4b22d990cc6df6773d965579a7d9cb091 Signed-off-by: Sultanxda <sultanxda@gmail.com>
-rw-r--r--src/com/android/camera/VideoModule.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index c693d3afc..2fd41cc46 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -1726,7 +1726,8 @@ public class VideoModule implements CameraModule,
}
mMediaRecorder.setOutputFormat(mProfile.fileFormat);
mMediaRecorder.setVideoFrameRate(mProfile.videoFrameRate);
- mMediaRecorder.setVideoEncodingBitRate(mProfile.videoBitRate);
+ mMediaRecorder.setVideoEncodingBitRate(mProfile.videoBitRate *
+ ((isHSR ? captureRate : 30) / 30));
mMediaRecorder.setVideoEncoder(mProfile.videoCodec);
if (isHSR) {
Log.i(TAG, "Configuring audio for HSR");