Add casts to avoid warnings about comparison between signed and unsigned
This fixes warnings with gcc and msvc.
This commit is contained in:
@@ -418,7 +418,7 @@ int32_t ParseIntra4x4Mode (PWelsDecoderContext pCtx, PWelsNeighAvail pNeighAvail
|
||||
iBestMode = kiPredMode;
|
||||
} else {
|
||||
WELS_READ_VERIFY (BsGetBits (pBs, 3, &uiCode));
|
||||
iBestMode = uiCode + (uiCode >= kiPredMode);
|
||||
iBestMode = uiCode + ((int32_t) uiCode >= kiPredMode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -236,7 +236,7 @@ bool GomValidCheckSliceNum (const int32_t kiMbWidth, const int32_t kiMbHeight, u
|
||||
iGomSize = kiMbWidth * GOM_ROW_MODE0_720P;
|
||||
|
||||
while (true) {
|
||||
if (kiCountNumMb < iGomSize * iSliceNum) {
|
||||
if (kiCountNumMb < iGomSize * (int32_t) iSliceNum) {
|
||||
-- iSliceNum;
|
||||
iSliceNum = iSliceNum - (iSliceNum & 0x01); // verfiy even num for multiple slices case
|
||||
if (iSliceNum < 2) // for safe
|
||||
|
||||
Reference in New Issue
Block a user