From bc112a10f2a99fa76e95e93747d67fa0b103f313 Mon Sep 17 00:00:00 2001 From: Sultanxda Date: Thu, 5 Nov 2015 22:03:57 -0800 Subject: 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 --- src/com/android/camera/VideoModule.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java index 584076c2c..34a83a351 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) { -- cgit v1.2.3