summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSultanxda <sultanxda@gmail.com>2015-11-05 22:03:57 -0800
committerMichael Bestas <mikeioannina@cyanogenmod.org>2016-02-17 22:57:19 +0200
commitbc112a10f2a99fa76e95e93747d67fa0b103f313 (patch)
treefe8d685b0e336485f30341b75d661b6c0495bfc5
parente7098d8412d6a8c59449b231240f36c6d8047af1 (diff)
downloadandroid_packages_apps_Snap-bc112a10f2a99fa76e95e93747d67fa0b103f313.zip
android_packages_apps_Snap-bc112a10f2a99fa76e95e93747d67fa0b103f313.tar.gz
android_packages_apps_Snap-bc112a10f2a99fa76e95e93747d67fa0b103f313.tar.bz2
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 584076c..34a83a3 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -1584,7 +1584,8 @@ public class VideoModule implements CameraModule,
if ((isHFR || isHSR) && captureRate > 0) {
mMediaRecorder.setOutputFormat(mProfile.fileFormat);
mMediaRecorder.setVideoFrameRate(mProfile.videoFrameRate);
- mMediaRecorder.setVideoEncodingBitRate(mProfile.videoBitRate);
+ mMediaRecorder.setVideoEncodingBitRate(mProfile.videoBitRate *
+ ((isHSR ? captureRate : 30) / 30));
mMediaRecorder.setVideoEncoder(mProfile.videoCodec);
} else {
if (!mCaptureTimeLapse) {