History

make error consistence for memory fail

huili2 committed 9 years ago

Commit 4c74cc81 parent 3c2caa46 files · +56 −35Browse files

Showing the changes to codec/decoder/core/src/fmo.cpp (1 of 6 files). Show all

Unified · Split

codec/decoder/core/src/fmo.cpp+10−16
@@ -259,26 +259,20 @@ bool FmoParamSetsChanged (PFmo pFmo, const int32_t kiCountNumMb, const int32_t k · 258 unmodified lines
259259 *
260260 * \return true - update/insert successfully; false - failed;
261261 */
262−bool FmoParamUpdate (PFmo pFmo, PSps pSps, PPps pPps, int32_t* pActiveFmoNum, CMemoryAlign* pMa) {
262+int32_t FmoParamUpdate (PFmo pFmo, PSps pSps, PPps pPps, int32_t* pActiveFmoNum, CMemoryAlign* pMa) {
263263 const uint32_t kuiMbWidth = pSps->iMbWidth;
264264 const uint32_t kuiMbHeight = pSps->iMbHeight;
265−
266− if (FmoParamSetsChanged (pFmo,
267− kuiMbWidth * kuiMbHeight,
268− pPps->uiSliceGroupMapType,
269− pPps->uiNumSliceGroups)) {
270−
271− if (InitFmo (pFmo, pPps, kuiMbWidth, kuiMbHeight, pMa)) {
272− return false;
273− } else {
274− if (!pFmo->bActiveFlag && *pActiveFmoNum < MAX_PPS_COUNT) {
275− ++ (*pActiveFmoNum);
276− pFmo->bActiveFlag = true;
277− }
265+ int32_t iRet = ERR_NONE;
266+ if (FmoParamSetsChanged (pFmo, kuiMbWidth * kuiMbHeight, pPps->uiSliceGroupMapType, pPps->uiNumSliceGroups)) {
267+ iRet = InitFmo (pFmo, pPps, kuiMbWidth, kuiMbHeight, pMa);
268+ WELS_VERIFY_RETURN_IF (iRet, iRet);
269+
270+ if (!pFmo->bActiveFlag && *pActiveFmoNum < MAX_PPS_COUNT) {
271+ ++ (*pActiveFmoNum);
272+ pFmo->bActiveFlag = true;
278273 }
279274 }
280−
281− return true;
275+ return iRet;
282276 }
283277
284278 /*!

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t