shithub: openh264

Download patch

ref: 4e041d625fd4bbd7f26545d7844f0288996cd9bb
parent: 427da1c990923fa68632f4a7b99294da78cbfeb2
author: Licai Guo <guolicai@gmail.com>
date: Sat Apr 19 20:33:48 EDT 2014

Minor optimzation on iRun for cavlc

--- a/codec/decoder/core/src/parse_mb_syn_cavlc.cpp
+++ b/codec/decoder/core/src/parse_mb_syn_cavlc.cpp
@@ -649,6 +649,9 @@
         }
       }
     } else {
+      for (int j = i; j < uiTotalCoeff; j++) {
+	iRun[j] = 0;
+      }
       return iUsedBits;
     }
 
@@ -665,7 +668,7 @@
                                 const uint8_t* kpZigzagTable, int32_t iResidualProperty, int16_t* pTCoeff, uint8_t uiQp,
                                 PWelsDecoderContext pCtx) {
   int32_t iLevel[16], iZerosLeft, iCoeffNum;
-  int32_t  iRun[16] = {0};
+  int32_t  iRun[16];
   int32_t iCurNonZeroCacheIdx, i;
   const uint16_t* kpDequantCoeff = g_kuiDequantCoeff[uiQp];
   int8_t nA, nB, nC;