ref: 24d8b8a82c55c736cde326a8b2684883637684f0
parent: b6ddfabf2b8d3c5605fe0583f18e8e1949789657
parent: 663bd940384ffdc735d59911ae319ca37cf811fc
author: huili2 <huili2@cisco.com>
date: Thu Jul 16 09:32:29 EDT 2015
Merge pull request #2033 from HaiboZhu/Bugfix_FMO_judgement_error Fix max slice group number judgement error in FMO
--- a/codec/decoder/core/src/fmo.cpp
+++ b/codec/decoder/core/src/fmo.cpp
@@ -59,7 +59,7 @@
WELS_VERIFY_RETURN_IF (1, (NULL == pFmo || NULL == pPps))
uiNumSliceGroups = pPps->uiNumSliceGroups;
iMbNum = pFmo->iCountMbNum;
- WELS_VERIFY_RETURN_IF (1, (NULL == pFmo->pMbAllocMap || iMbNum <= 0 || uiNumSliceGroups >= MAX_SLICEGROUP_IDS))
+ WELS_VERIFY_RETURN_IF (1, (NULL == pFmo->pMbAllocMap || iMbNum <= 0 || uiNumSliceGroups > MAX_SLICEGROUP_IDS))
do {
uint8_t uiGroup = 0;
@@ -95,7 +95,7 @@
uiNumSliceGroups = pPps->uiNumSliceGroups;
iMbNum = pFmo->iCountMbNum;
WELS_VERIFY_RETURN_IF (1, (NULL == pFmo->pMbAllocMap || iMbNum <= 0 || kiMbWidth == 0
- || uiNumSliceGroups >= MAX_SLICEGROUP_IDS))
+ || uiNumSliceGroups > MAX_SLICEGROUP_IDS))
do {
pFmo->pMbAllocMap[i] = (uint8_t) (((i % kiMbWidth) + (((i / kiMbWidth) * uiNumSliceGroups) >> 1)) % uiNumSliceGroups);