mix-vbp: A fix to parse zig-zag-scanned scaling table
from H.264 bitstream

BZ: 80567

The root cause is that scaling tables written into H264
bitstream follow zigzag scanning while mix-vbp doesn't
correct scaling table index while parsing it.

Change-Id: I7b78b4244f110bc8e588f70d3af4b07098f76f89
Signed-off-by: Tianmi Chen <tianmi.chen@intel.com>
Reviewed-on: http://android.intel.com:8080/87694
Reviewed-by: cactus <cactus@intel.com>
Reviewed-by: Liang, Dan <dan.liang@intel.com>
Reviewed-by: Feng, Wei <wei.feng@intel.com>
Reviewed-by: Cheng, Yao <yao.cheng@intel.com>
Reviewed-by: Shi, PingX <pingx.shi@intel.com>
Tested-by: Shi, PingX <pingx.shi@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
diff --git a/mix_vbp/viddec_fw/fw/codecs/h264/parser/h264parse.c b/mix_vbp/viddec_fw/fw/codecs/h264/parser/h264parse.c
index 2efa5c3..9e36b7c 100644
--- a/mix_vbp/viddec_fw/fw/codecs/h264/parser/h264parse.c
+++ b/mix_vbp/viddec_fw/fw/codecs/h264/parser/h264parse.c
@@ -27,7 +27,6 @@
     int32_t j, scanj;
     int32_t delta_scale, lastScale, nextScale;
 
-#if 0
     const uint8_t ZZ_SCAN[16]  =
         {  0,  1,  4,  8,  5,  2,  3,  6,  9, 12, 13, 10,  7, 11, 14, 15
         };
@@ -38,7 +37,6 @@
            35, 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51,
            58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63
         };
-#endif
 
     lastScale      = 8;
     nextScale      = 8;
@@ -46,7 +44,7 @@
 
     for (j=0; j<sizeOfScalingList; j++)
     {
-        //scanj = (sizeOfScalingList==16)?ZZ_SCAN[j]:ZZ_SCAN8[j];
+        scanj = (sizeOfScalingList==16)?ZZ_SCAN[j]:ZZ_SCAN8[j];
 
         if (nextScale!=0)
         {
@@ -57,7 +55,6 @@
 
         scalingList[scanj] = (nextScale==0) ? lastScale:nextScale;
         lastScale = scalingList[scanj];
-        scanj ++;
     }
 
     return H264_STATUS_OK;