From 286a358967726a554520f6291443ae89c2400a10 Mon Sep 17 00:00:00 2001 From: Deva Ramasubramanian Date: Mon, 25 Aug 2014 18:09:38 -0700 Subject: 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 --- mm-video-v4l2/vidc/vdec/inc/omx_vdec.h | 1 + mm-video-v4l2/vidc/vdec/src/omx_vdec_msm8974.cpp | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'mm-video-v4l2/vidc/vdec') 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; -- cgit v1.2.3