! * \brief update/insert FMO parameter unit * * \param _fmo FMO context * \param _sps PSps * \param _pps PPps * \param pActiveFmoNum int32_t* [in/out] * * \return true - update/insert successfully; false - failed; */
| 258 | * \return true - update/insert successfully; false - failed; |
| 259 | */ |
| 260 | int32_t FmoParamUpdate (PFmo pFmo, PSps pSps, PPps pPps, int32_t* pActiveFmoNum, CMemoryAlign* pMa) { |
| 261 | const uint32_t kuiMbWidth = pSps->iMbWidth; |
| 262 | const uint32_t kuiMbHeight = pSps->iMbHeight; |
| 263 | int32_t iRet = ERR_NONE; |
| 264 | if (FmoParamSetsChanged (pFmo, kuiMbWidth * kuiMbHeight, pPps->uiSliceGroupMapType, pPps->uiNumSliceGroups)) { |
| 265 | iRet = InitFmo (pFmo, pPps, kuiMbWidth, kuiMbHeight, pMa); |
| 266 | WELS_VERIFY_RETURN_IF (iRet, iRet); |
| 267 | |
| 268 | if (!pFmo->bActiveFlag && *pActiveFmoNum < MAX_PPS_COUNT) { |
| 269 | ++ (*pActiveFmoNum); |
| 270 | pFmo->bActiveFlag = true; |
| 271 | } |
| 272 | } |
| 273 | return iRet; |
| 274 | } |
| 275 | |
| 276 | /*! |
| 277 | * \brief Convert kMbXy to slice group idc correspondingly |
no test coverage detected