[x265-commits] [x265] entropy: removed gcc warning in encodeCoeffNxN

Ashok Kumar Mishra ashok at multicorewareinc.com
Thu Jan 8 10:58:41 CET 2015


details:   http://hg.videolan.org/x265/rev/4659aa3e33bf
branches:  
changeset: 9051:4659aa3e33bf
user:      Ashok Kumar Mishra<ashok at multicorewareinc.com>
date:      Thu Jan 08 14:58:35 2015 +0530
description:
entropy: removed gcc warning in encodeCoeffNxN

diffstat:

 source/common/quant.cpp    |  2 +-
 source/encoder/entropy.cpp |  4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r 6dce2b87f0fe -r 4659aa3e33bf source/common/quant.cpp
--- a/source/common/quant.cpp	Thu Jan 08 10:29:09 2015 +0530
+++ b/source/common/quant.cpp	Thu Jan 08 14:58:35 2015 +0530
@@ -840,7 +840,7 @@ uint32_t Quant::rdoQuant(const CUData& c
             if (dstCoeff[blkPos])
             {                
                 // Calculates the cost of signaling the last significant coefficient in the block 
-                int pos[2] = { (blkPos & (trSize - 1)), (blkPos >> log2TrSize) };
+                uint32_t pos[2] = { (blkPos & (trSize - 1)), (blkPos >> log2TrSize) };
                 if (codeParams.scanType == SCAN_VER)
                     std::swap(pos[0], pos[1]);
                 uint32_t bitsLastNZ = 0;
diff -r 6dce2b87f0fe -r 4659aa3e33bf source/encoder/entropy.cpp
--- a/source/encoder/entropy.cpp	Thu Jan 08 10:29:09 2015 +0530
+++ b/source/encoder/entropy.cpp	Thu Jan 08 14:58:35 2015 +0530
@@ -1458,8 +1458,8 @@ void Entropy::codeCoeffNxN(const CUData&
         // The last position is composed of a prefix and suffix.
         // The prefix is context coded truncated unary bins. The suffix is bypass coded fixed length bins.
         // The bypass coded bins for both the x and y components are grouped together.
-        int packedSuffixBits = 0, packedSuffixLen = 0;
-        int pos[2] = { (posLast & (trSize - 1)), (posLast >> log2TrSize) };
+        uint32_t packedSuffixBits = 0, packedSuffixLen = 0;
+        uint32_t pos[2] = { (posLast & (trSize - 1)), (posLast >> log2TrSize) };
         // swap
         if (codingParameters.scanType == SCAN_VER)
             std::swap(pos[0], pos[1]);


More information about the x265-commits mailing list