diff options
author | c_sridur <sridur@codeaurora.org> | 2015-02-05 12:07:17 +0530 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-02-25 01:01:42 -0800 |
commit | 5680cb8c54ca39169dd78d27b80ee69ea3d629e9 (patch) | |
tree | ebaca0382824cbf08f49db9a300b9d98825ff0f3 | |
parent | d8b294d780b4e78354a92f946a2d20c8f094f6d2 (diff) | |
download | android_hardware_qcom_media-5680cb8c54ca39169dd78d27b80ee69ea3d629e9.tar.gz android_hardware_qcom_media-5680cb8c54ca39169dd78d27b80ee69ea3d629e9.tar.bz2 android_hardware_qcom_media-5680cb8c54ca39169dd78d27b80ee69ea3d629e9.zip |
mm-video-v4l2: vdec: Always send NC VOPS to the driver
and let the firmware handle skipping or repeating such
frames based on the codec and information in the stream.
(Eg. For DivX, Drop NC followed by packed PB and repeat
previous frame otherwise)
Revert "mm-video: vidc: Possibly send not-coded-VOPs to the driver"
This reverts commit 63f1ef65ce794ee45a753f888515885500beee03.
CRs-Fixed: 776899
Change-Id: I34afccc85b7bac06ad9a51354518013593e7d161
-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 | 45 |
3 files changed, 1 insertions, 47 deletions
diff --git a/mm-core/inc/OMX_QCOMExtns.h b/mm-core/inc/OMX_QCOMExtns.h index ffeb9daa..913066f5 100644 --- a/mm-core/inc/OMX_QCOMExtns.h +++ b/mm-core/inc/OMX_QCOMExtns.h @@ -465,8 +465,6 @@ 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 710bca8e..f27b9977 100644 --- a/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h +++ b/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h @@ -959,7 +959,6 @@ 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 9702fee0..e277a062 100644 --- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_msm8974.cpp +++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_msm8974.cpp @@ -574,7 +574,6 @@ 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), m_queued_codec_config_count(0) { @@ -1623,7 +1622,6 @@ OMX_ERRORTYPE omx_vdec::component_init(OMX_STRING role) drv_ctx.decoder_format = VDEC_CODECTYPE_MPEG4; eCompressionFormat = OMX_VIDEO_CodingMPEG4; output_capability=V4L2_PIX_FMT_MPEG4; - ignore_not_coded_vops = false; /*Initialize Start Code for MPEG4*/ codec_type_parse = CODEC_TYPE_MPEG4; m_frame_parser.init_start_codes (codec_type_parse); @@ -1654,7 +1652,6 @@ OMX_ERRORTYPE omx_vdec::component_init(OMX_STRING role) output_capability = V4L2_PIX_FMT_DIVX_311; eCompressionFormat = (OMX_VIDEO_CODINGTYPE)QOMX_VIDEO_CodingDivx; codec_type_parse = CODEC_TYPE_DIVX; - ignore_not_coded_vops = true; m_frame_parser.init_start_codes (codec_type_parse); eRet = createDivxDrmContext(); @@ -1671,7 +1668,6 @@ OMX_ERRORTYPE omx_vdec::component_init(OMX_STRING role) eCompressionFormat = (OMX_VIDEO_CODINGTYPE)QOMX_VIDEO_CodingDivx; codec_type_parse = CODEC_TYPE_DIVX; codec_ambiguous = true; - ignore_not_coded_vops = true; m_frame_parser.init_start_codes (codec_type_parse); eRet = createDivxDrmContext(); @@ -1688,7 +1684,6 @@ OMX_ERRORTYPE omx_vdec::component_init(OMX_STRING role) eCompressionFormat = (OMX_VIDEO_CODINGTYPE)QOMX_VIDEO_CodingDivx; codec_type_parse = CODEC_TYPE_DIVX; codec_ambiguous = true; - ignore_not_coded_vops = true; m_frame_parser.init_start_codes (codec_type_parse); eRet = createDivxDrmContext(); @@ -2994,12 +2989,6 @@ 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; @@ -3804,12 +3793,6 @@ 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; @@ -5758,7 +5741,6 @@ OMX_ERRORTYPE omx_vdec::empty_this_buffer_proxy(OMX_IN OMX_HANDLETYPE h struct vdec_bufferpayload *temp_buffer; struct vdec_seqheader seq_header; bool port_setting_changed = true; - bool not_coded_vop = false; /*Should we generate a Aync error event*/ if (buffer == NULL || buffer->pInputPortPrivate == NULL) { @@ -5785,32 +5767,7 @@ OMX_ERRORTYPE omx_vdec::empty_this_buffer_proxy(OMX_IN OMX_HANDLETYPE h return OMX_ErrorNone; } - - 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; - mp4_headerparser.parseHeader(&psBits); - not_coded_vop = mp4_headerparser.is_notcodec_vop( - (buffer->pBuffer + buffer->nOffset),buffer->nFilledLen); - if (not_coded_vop) { - DEBUG_PRINT_HIGH("Found Not coded vop len %lu frame number %u", - buffer->nFilledLen,frame_count); - if (buffer->nFlags & OMX_BUFFERFLAG_EOS) { - DEBUG_PRINT_HIGH("Eos and Not coded Vop set len to zero"); - not_coded_vop = false; - buffer->nFilledLen = 0; - } - } - } - - if (input_flush_progress == true - - || not_coded_vop - - ) { + if (input_flush_progress == true) { DEBUG_PRINT_LOW("Flush in progress return buffer "); post_event ((unsigned int)buffer,VDEC_S_SUCCESS, OMX_COMPONENT_GENERATE_EBD); |