Merge "SoftVPXEncoder: Disable lagged vp9 encoding" into oc-dev
am: 5783ee1c3d
Change-Id: I3e9b3e14b19c645d3b92af7e53f8f9ee338a6ca7
diff --git a/media/libstagefright/codecs/on2/enc/SoftVPXEncoder.cpp b/media/libstagefright/codecs/on2/enc/SoftVPXEncoder.cpp
index 8d69bd5..a5666da 100644
--- a/media/libstagefright/codecs/on2/enc/SoftVPXEncoder.cpp
+++ b/media/libstagefright/codecs/on2/enc/SoftVPXEncoder.cpp
@@ -137,6 +137,8 @@
mCodecConfiguration->rc_end_usage = mBitrateControlMode;
// Disable frame drop - not allowed in MediaCodec now.
mCodecConfiguration->rc_dropframe_thresh = 0;
+ // Disable lagged encoding.
+ mCodecConfiguration->g_lag_in_frames = 0;
if (mBitrateControlMode == VPX_CBR) {
// Disable spatial resizing.
mCodecConfiguration->rc_resize_allowed = 0;
@@ -157,8 +159,6 @@
mCodecConfiguration->rc_buf_sz = 1000;
// Enable error resilience - needed for packet loss.
mCodecConfiguration->g_error_resilient = 1;
- // Disable lagged encoding.
- mCodecConfiguration->g_lag_in_frames = 0;
// Maximum key frame interval - for CBR boost to 3000
mCodecConfiguration->kf_max_dist = 3000;
// Encoder determines optimal key frame placement automatically.