MediaCodecVideoEncoder: limit MediaCodec bitrate to 95% of requested to avoid overshoot.

BUG=3194
R=noahric@google.com

Review URL: https://webrtc-codereview.appspot.com/17379004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6021 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
fischman@webrtc.org 2014-04-29 17:53:30 +00:00
parent 82d3cb68cd
commit f04a6ea733

View File

@ -98,7 +98,9 @@ class MediaCodecVideoEncoder {
// webrtc "kilo" means 1000, not 1024. Apparently.
// (and the price for overshooting is frame-dropping as webrtc enforces its
// bandwidth estimation, which is unpleasant).
return kbps * 1000;
// Since the HW encoder in the N5 overshoots, we clamp to a bit less than
// the requested rate. Sad but true. Bug 3194.
return kbps * 950;
}
private void checkOnMediaCodecThread() {