diff options
author | Deva Ramasubramanian <dramasub@codeaurora.org> | 2014-08-25 18:09:38 -0700 |
---|---|---|
committer | c_sridur <sridur@codeaurora.org> | 2014-11-21 12:59:38 +0530 |
commit | 286a358967726a554520f6291443ae89c2400a10 (patch) | |
tree | d7ef8c29211f8f939f440724ddfb8815e310b4f1 | |
parent | 2aea85b6eddc0599cbf8d791c745d9115f1fe550 (diff) | |
download | android_hardware_qcom_media-286a358967726a554520f6291443ae89c2400a10.tar.gz android_hardware_qcom_media-286a358967726a554520f6291443ae89c2400a10.tar.bz2 android_hardware_qcom_media-286a358967726a554520f6291443ae89c2400a10.zip |
mm-video: vidc: Possibly send not-coded-VOPs to the driver
Previously we were dropping the not coded VOPs in the component because
the legacy hardware didn't support decoding it. Since the hardware now
supports decoding N-C-VOPs, send it to the hardware if the client
insists on it being decoded. A side effect of this is FBDs which have
duplicate YUVs and timestamps. The client is expected deal with this
side effect.
CRs-Fixed: 714038
Change-Id: I44aa4f1f26568cf59cc76751802b8aa2373fcb69
-rw-r--r-- | mm-core/inc/OMX_QCOMExtns.h | 2 | ||||
-rw-r--r-- | mm-video-v4l2/vidc/vdec/inc/omx_vdec.h | 1 | ||||
-rw-r--r-- | mm-video-v4l2/vidc/vdec/src/omx_vdec_msm8974.cpp | 17 |
3 files changed, 19 insertions, 1 deletions
diff --git a/mm-core/inc/OMX_QCOMExtns.h b/mm-core/inc/OMX_QCOMExtns.h index 913066f5..ffeb9daa 100644 --- a/mm-core/inc/OMX_QCOMExtns.h +++ b/mm-core/inc/OMX_QCOMExtns.h @@ -465,6 +465,8 @@ enum OMX_QCOM_EXTN_INDEXTYPE /*"OMX.QCOM.index.param.video.CustomBufferSize"*/ OMX_QcomIndexParamVideoCustomBufferSize = 0x7F00003E, + + OMX_QcomIndexParamVideoProcessNotCodedVOP = 0x7F00003F, }; /** diff --git a/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h b/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h index ac579b99..31b4f589 100644 --- a/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h +++ b/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h @@ -957,6 +957,7 @@ class omx_vdec: public qc_omx_component unsigned int m_fill_output_msg; bool client_set_fps; + bool ignore_not_coded_vops; class allocate_color_convert_buf { public: diff --git a/mm-video-v4l2/vidc/vdec/src/omx_vdec_msm8974.cpp b/mm-video-v4l2/vidc/vdec/src/omx_vdec_msm8974.cpp index 6e3ac44a..c6132cb4 100644 --- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_msm8974.cpp +++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_msm8974.cpp @@ -571,6 +571,7 @@ omx_vdec::omx_vdec(): m_error_propogated(false), secure_mode(false), m_profile(0), client_set_fps(false), + ignore_not_coded_vops(true), m_last_rendered_TS(-1) { /* Assumption is that , to begin with , we have all the frames with decoder */ @@ -2967,6 +2968,12 @@ OMX_ERRORTYPE omx_vdec::get_parameter(OMX_IN OMX_HANDLETYPE hComp, break; #endif + case OMX_QcomIndexParamVideoProcessNotCodedVOP: + { + DEBUG_PRINT_LOW("get_parameter: OMX_QcomIndexParamVideoProcessNotCodedVOP"); + ((QOMX_ENABLETYPE *)paramData)->bEnable = (OMX_BOOL)!ignore_not_coded_vops; + break; + } default: { DEBUG_PRINT_ERROR("get_parameter: unknown param %08x", paramIndex); eRet =OMX_ErrorUnsupportedIndex; @@ -3770,6 +3777,12 @@ OMX_ERRORTYPE omx_vdec::set_parameter(OMX_IN OMX_HANDLETYPE hComp, } break; } + case OMX_QcomIndexParamVideoProcessNotCodedVOP: + { + DEBUG_PRINT_LOW("set_parameter: OMX_QcomIndexParamVideoProcessNotCodedVOP"); + ignore_not_coded_vops = !((QOMX_ENABLETYPE *)paramData)->bEnable; + break; + } default: { DEBUG_PRINT_ERROR("Setparameter: unknown param %d", paramIndex); eRet = OMX_ErrorUnsupportedIndex; @@ -5738,7 +5751,9 @@ OMX_ERRORTYPE omx_vdec::empty_this_buffer_proxy(OMX_IN OMX_HANDLETYPE h } - if (codec_type_parse == CODEC_TYPE_MPEG4 || codec_type_parse == CODEC_TYPE_DIVX) { + if (ignore_not_coded_vops && + (codec_type_parse == CODEC_TYPE_MPEG4 || + codec_type_parse == CODEC_TYPE_DIVX)) { mp4StreamType psBits; psBits.data = (unsigned char *)(buffer->pBuffer + buffer->nOffset); psBits.numBytes = buffer->nFilledLen; |