ref: 0e9541247a88fea6605a5a3530390fd12a2e3dc2
parent: 2951a7f3a3e0d6a27213d5b67c2953d8c6fe38f9
author: Martin Storsjö <[email protected]>
date: Mon Nov 3 05:54:27 EST 2014
Use the right data type for some local variables pDecEngine->uiOffset is an uint64_t as well, and *pSliceNum is uint32_t. This fixes warnings about comparison between signed and unsigned in gcc and msvc.
--- a/codec/decoder/core/src/cabac_decoder.cpp
+++ b/codec/decoder/core/src/cabac_decoder.cpp
@@ -214,7 +214,7 @@
int32_t DecodeTerminateCabac (PWelsCabacDecEngine pDecEngine, uint32_t& uiBinVal) {
int32_t iErrorInfo = ERR_NONE;
uint64_t uiRange = pDecEngine->uiRange - 2;
- int64_t uiOffset = pDecEngine->uiOffset;
+ uint64_t uiOffset = pDecEngine->uiOffset;
if (uiOffset >= (uiRange << pDecEngine->iBitsLeft)) {
uiBinVal = 1;
--- a/codec/encoder/core/src/svc_enc_slice_segment.cpp
+++ b/codec/encoder/core/src/svc_enc_slice_segment.cpp
@@ -220,7 +220,7 @@
// GOM based RC related for uiSliceNum decision, only used at SM_FIXEDSLCNUM_SLICE
bool GomValidCheckSliceNum (const int32_t kiMbWidth, const int32_t kiMbHeight, uint32_t* pSliceNum) {
const int32_t kiCountNumMb = kiMbWidth * kiMbHeight;
- int32_t iSliceNum = *pSliceNum;
+ uint32_t iSliceNum = *pSliceNum;
int32_t iGomSize;
//The default RC is Bit-rate mode[Yi], but need consider as below: