shithub: openh264

Download patch

ref: 663bd940384ffdc735d59911ae319ca37cf811fc
parent: f743f04ed7a4fc7104e938060b1766a05f0ad3ca
author: Haibo Zhu <haibozhu@cisco.com>
date: Tue Jul 14 11:45:40 EDT 2015

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);