[PORT FROM MAIN] VideoDecoderAVC:adjust stpos to not cover next item's SC

BZ: 67980

adjust stpos to not cover next item's start code,using phase is not proper
for phase is alway 4 if parse_sc return find SC.if start code is "0x00,0x00,0x01"
error will happen. adjust stpos due to the least SC lengh 3.

Change-Id: Ia10b7eecd670fa975245df5edc4fcbc251d62c8f
Signed-off-by: ywan171 <yi.a.wang@intel.com>
Reviewed-on: http://android.intel.com:8080/76398
Tested-by: Tong, BoX <box.tong@intel.com>
Reviewed-by: Tong, BoX <box.tong@intel.com>
Reviewed-by: cactus <cactus@intel.com>
Tested-by: cactus <cactus@intel.com>
diff --git a/mix_vbp/viddec_fw/fw/parser/vbp_h264_parser.c b/mix_vbp/viddec_fw/fw/parser/vbp_h264_parser.c
index c1ccef7..3f6400d 100644
--- a/mix_vbp/viddec_fw/fw/parser/vbp_h264_parser.c
+++ b/mix_vbp/viddec_fw/fw/parser/vbp_h264_parser.c
@@ -1472,6 +1472,9 @@
 * instead, it is comprised of size of NAL unit and payload
 * of NAL unit. See spec 15 (Sample format)
 */
+
+/* Start code prefix is 001 which is 3 bytes. */
+#define H264_SC_SIZE 3
 uint32 vbp_parse_start_code_h264(vbp_context *pcontext)
 {
     viddec_pm_cxt_t *cxt = pcontext->parser_cxt;
@@ -1586,7 +1589,7 @@
                 {
                     cxt->list.data[cxt->list.num_items].stpos =
                         cubby.sc_end_pos + cxt->list.data[cxt->list.num_items - 1].stpos;
-                    cxt->list.data[cxt->list.num_items - 1].edpos = cxt->list.data[cxt->list.num_items].stpos - cubby.phase; /* offset before start code */
+                    cxt->list.data[cxt->list.num_items - 1].edpos = cxt->list.data[cxt->list.num_items].stpos - H264_SC_SIZE;
                 }
 
                 cubby.phase = 0;