summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorSultanxda <sultanxda@gmail.com>2015-11-05 22:03:57 -0800
committerSteve Kondik <steve@cyngn.com>2016-11-02 12:24:50 -0700
commit79be3991b04eff6a4f0b5080ce00f66edb59e0b6 (patch)
tree04cbe3af858da072fa07c1cdf9587e246d3196ac /src/com
parentd25559c811f48ce514db78dc87d89c5b5b5760e0 (diff)
downloadandroid_packages_apps_Snap-79be3991b04eff6a4f0b5080ce00f66edb59e0b6.tar.gz
android_packages_apps_Snap-79be3991b04eff6a4f0b5080ce00f66edb59e0b6.tar.bz2
android_packages_apps_Snap-79be3991b04eff6a4f0b5080ce00f66edb59e0b6.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>
Diffstat (limited to 'src/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");