diff options
author | qctecmdr <qctecmdr@localhost> | 2019-11-06 14:08:16 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-11-06 14:08:16 -0800 |
commit | 2d5af0dcf5880b9d424c92b646847870395a3d52 (patch) | |
tree | 23955151a29e916fbff4c243b9d89732298d2064 | |
parent | 61c48365565eb1f772e8429a5c18d0517add6149 (diff) | |
parent | cebe94bd09ee48ff143ff3ccc69f47c8a29facda (diff) |
Merge "mm-video-v4l2: venc: fix the initial value for P/B frames"
-rw-r--r-- | mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp b/mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp index 0967944f..83cf11e3 100644 --- a/mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp +++ b/mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp @@ -343,14 +343,8 @@ OMX_ERRORTYPE omx_venc::component_init(OMX_STRING role) OMX_INIT_STRUCT(&m_sIntraperiod, QOMX_VIDEO_INTRAPERIODTYPE); m_sIntraperiod.nPortIndex = (OMX_U32) PORT_INDEX_OUT; - m_sIntraperiod.nPFrames = (m_sConfigFramerate.xEncodeFramerate * 2) - 1; - /* Consider a scenario where client does get of this and does not modify this - and does a set. Then if by default if this is 0 we assume that client is explicitly - requesting disabling of B-Frames and our logic to automatically enable bFrames will - fail(We do not enable bframes if there is a set of this param with 0 value). We do - not want this to happen(also all our default values support auto enabling of B-Frames). - We always take care of scenarios where bframes need to be disabled */ - m_sIntraperiod.nBFrames = 1; + m_sIntraperiod.nPFrames = ((m_sConfigFramerate.xEncodeFramerate >> 16) * 2) - 1; + m_sIntraperiod.nBFrames = 0; OMX_INIT_STRUCT(&m_sErrorCorrection, OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE); |