diff options
| author | liubolun <bolun.liu@intel.com> | 2013-11-22 14:03:23 +0800 |
|---|---|---|
| committer | Patrick Tjin <pattjin@google.com> | 2014-07-21 22:02:56 -0700 |
| commit | a0f95d79fa654a816532eea0ee8868e56049847c (patch) | |
| tree | d0f40d1c83bace7d570a41753b9708eb3fc2bd8f /videocodec/OMXVideoEncoderVP8.cpp | |
| parent | 2bab681173a098b357b98ce4e7f0837b9a430c07 (diff) | |
| download | android_hardware_intel_common_omx-components-a0f95d79fa654a816532eea0ee8868e56049847c.tar.gz android_hardware_intel_common_omx-components-a0f95d79fa654a816532eea0ee8868e56049847c.tar.bz2 android_hardware_intel_common_omx-components-a0f95d79fa654a816532eea0ee8868e56049847c.zip | |
[PORT FROM MAIN JB-MR2] Eble dynamic setting bitrate/framerate/K frame for VP8 encode.
BZ: 153768
Add a pair of get/set config function for seting k frame;
Add codecs judgement for bitrate/frame rate setting in VCM mode.
Change-Id: Ic86ceee7aadb7b296917ee340a732c79141b551c
Orig-Change-Id: I6ffdad79cbe19ec8cdb753837ac48f87069b6f5d
Signed-off-by: liubolun <bolun.liu@intel.com>
Diffstat (limited to 'videocodec/OMXVideoEncoderVP8.cpp')
| -rw-r--r-- | videocodec/OMXVideoEncoderVP8.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/videocodec/OMXVideoEncoderVP8.cpp b/videocodec/OMXVideoEncoderVP8.cpp index 8df2b3d..c5630f9 100644 --- a/videocodec/OMXVideoEncoderVP8.cpp +++ b/videocodec/OMXVideoEncoderVP8.cpp @@ -194,6 +194,7 @@ OMX_ERRORTYPE OMXVideoEncoderVP8::BuildHandlerList(void) { OMXVideoEncoderBase::BuildHandlerList(); AddHandler((OMX_INDEXTYPE)OMX_IndexParamVideoVp8, GetParamVideoVp8, SetParamVideoVp8); AddHandler((OMX_INDEXTYPE)OMX_IndexConfigVideoVp8ReferenceFrame, GetConfigVideoVp8ReferenceFrame, SetConfigVideoVp8ReferenceFrame); + AddHandler((OMX_INDEXTYPE)OMX_IndexExtVP8ForceKFrame, GetConfigVp8ForceKFrame, SetConfigVp8ForceKFrame); return OMX_ErrorNone; } @@ -253,4 +254,33 @@ OMX_ERRORTYPE OMXVideoEncoderVP8::SetConfigVideoVp8ReferenceFrame(OMX_PTR pStruc return OMX_ErrorNone; } +OMX_ERRORTYPE OMXVideoEncoderVP8::GetConfigVp8ForceKFrame(OMX_PTR pStructure) { + + return OMX_ErrorNone; +} + +OMX_ERRORTYPE OMXVideoEncoderVP8::SetConfigVp8ForceKFrame(OMX_PTR pStructure) { + OMX_ERRORTYPE ret; + Encode_Status retStatus = ENCODE_SUCCESS; + OMX_VIDEO_CONFIG_INTEL_VP8_FORCE_KFRAME *p = (OMX_VIDEO_CONFIG_INTEL_VP8_FORCE_KFRAME*) pStructure; + CHECK_TYPE_HEADER(p); + CHECK_PORT_INDEX(p, OUTPORT_INDEX); + + CHECK_SET_CONFIG_STATE(); + + VideoConfigVP8 configVP8; + configVP8.force_kf = p->bForceKFrame; + configVP8.refresh_entropy_probs = 0; + configVP8.value = 0; + configVP8.sharpness_level = 2; + + retStatus = mVideoEncoder->setConfig(&configVP8); + if(retStatus != ENCODE_SUCCESS) { + LOGW("Failed to set refresh config"); + } + return OMX_ErrorNone; +} + + + DECLARE_OMX_COMPONENT("OMX.Intel.VideoEncoder.VP8", "video_encoder.vpx", OMXVideoEncoderVP8); |
