libmix: fix a VC1 parser issue

BZ: 129080

Two issues have been fixed in VC1 parser.
1. User data should be identified.
2. slice_vertical_position should be parsed from bitstream
   instead of being assigned slice number.

Change-Id: I2164550d84720c2619cc2df963d59fc2999faf3a
Signed-off-by: Tianmi Chen <tianmi.chen@intel.com>
diff --git a/mixvbp/vbp_manager/vbp_vc1_parser.c b/mixvbp/vbp_manager/vbp_vc1_parser.c
index 3026ec9..87dadd8 100755
--- a/mixvbp/vbp_manager/vbp_vc1_parser.c
+++ b/mixvbp/vbp_manager/vbp_vc1_parser.c
@@ -329,7 +329,7 @@
                          cxt->list.data[cxt->list.num_items].stpos -
                          PREFIX_SIZE;
 
-            if (start_code >= 0x0A && start_code <= 0x0F)
+            if ((start_code >= 0x0A && start_code <= 0x0F) || (start_code >= 0x1B && start_code <= 0x1F))
             {
                 /* only put known start code to the list
                  * 0x0A: end of sequence
@@ -338,6 +338,7 @@
                  * 0x0D: field header
                  * 0x0E: entry point header
                  * 0x0F: sequence header
+                 * 0x1B ~ 0x1F: user data
                  */
                 cxt->list.num_items++;
             }
@@ -1018,6 +1019,9 @@
     uint8 is_emul;
     viddec_pm_get_au_pos(cxt, &bit, &byte, &is_emul);
 
+    vc1_viddec_parser_t *parser = (vc1_viddec_parser_t *)cxt->codec_data;
+    vc1_PictureLayerHeader *picLayerHeader = &(parser->info.picLayerHeader);
+
     vbp_slice_data_vc1 *slc_data = &(pic_data->slc_data[pic_data->num_slices]);
     VASliceParameterBufferVC1 *slc_parms = &(slc_data->slc_parms);
 
@@ -1035,8 +1039,7 @@
 
     slc_parms->macroblock_offset = bit + byte * 8;
 
-    /* fix this.  we need o get the slice_vertical_position from the code */
-    slc_parms->slice_vertical_position = pic_data->num_slices;
+    slc_parms->slice_vertical_position = (picLayerHeader->SLICE_ADDR % (pic_data->pic_parms->coded_height / 16));;
 
     pic_data->num_slices++;
 }