MCPcopy Create free account
hub / github.com/cisco/openh264 / UninitFmoList

Function UninitFmoList

codec/decoder/core/src/fmo.cpp:202–228  ·  view source on GitHub ↗

! * \brief Uninitialize Wels Flexible Macroblock Ordering (FMO) list * * \param pFmo Wels base fmo ptr to be uninitialized * \param kiCnt count number of PPS per list * \param kiAvail count available number of PPS in list * * \return NONE */

Source from the content-addressed store, hash-verified

200 * \return NONE
201 */
202void UninitFmoList (PFmo pFmo, const int32_t kiCnt, const int32_t kiAvail, CMemoryAlign* pMa) {
203 PFmo pIter = pFmo;
204 int32_t i = 0;
205 int32_t iFreeNodes = 0;
206
207 if (NULL == pIter || kiAvail <= 0 || kiCnt < kiAvail)
208 return;
209
210 while (i < kiCnt) {
211 if (pIter != NULL && pIter->bActiveFlag) {
212 if (NULL != pIter->pMbAllocMap) {
213 pMa->WelsFree (pIter->pMbAllocMap, "pIter->pMbAllocMap");
214
215 pIter->pMbAllocMap = NULL;
216 }
217 pIter->iSliceGroupCount = 0;
218 pIter->iSliceGroupType = -1;
219 pIter->iCountMbNum = 0;
220 pIter->bActiveFlag = false;
221 ++ iFreeNodes;
222 if (iFreeNodes >= kiAvail)
223 break;
224 }
225 ++ pIter;
226 ++ i;
227 }
228}
229
230/*!
231 * \brief detect parameter sets are changed or not

Callers 1

ResetFmoListFunction · 0.85

Calls 1

WelsFreeMethod · 0.80

Tested by

no test coverage detected