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
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 96f91a6..7dbb67d 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 @@
     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 @@
         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 @@
         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 @@
         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 @@
         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 @@
                                     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 @@
             }
             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 @@
     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 @@
         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);