shithub: openh264

Download patch

ref: 96991e2c72f8017893d30124d8c9823fcae3744d
parent: fe5a2ac39e3dff2c9c3bd89bc0980aad51b473fe
author: Jan Schmidt <jan@centricular.com>
date: Tue Feb 26 21:17:54 EST 2019

parse_mb_syn_cavlc: Commenting updates

Update some commenting around B-slice motion vector difference
parsing to help make it clearer

--- a/codec/decoder/core/src/parse_mb_syn_cavlc.cpp
+++ b/codec/decoder/core/src/parse_mb_syn_cavlc.cpp
@@ -1448,7 +1448,9 @@
         }
       }
     }
+    // Read mvd_L0 then mvd_L1
     for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
+      // Partitions
       for (int32_t i = 0; i < 2; i++) {
         int iPartIdx = i << 3;
         int32_t iRefIdx = ref_idx_list[listIdx][i];
@@ -1455,9 +1457,9 @@
         if (IS_DIR (mbType, i, listIdx)) {
           PredInter16x8Mv (iMvArray, iRefIdxArray, listIdx, iPartIdx, iRefIdx, iMv);
 
-          WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //mvd_l0[ mbPartIdx ][ 0 ][ compIdx ]
+          WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //mvd_l{0,1}[ mbPartIdx ][ listIdx ][x]
           iMv[0] += iCode;
-          WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //mvd_l1[ mbPartIdx ][ 0 ][ compIdx ]
+          WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //mvd_l{0,1}[ mbPartIdx ][ listIdx ][y]
           iMv[1] += iCode;
 
           WELS_CHECK_SE_BOTH_WARNING (iMv[1], iMinVmv, iMaxVmv, "vertical mv");