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

Function WelsFillDirectCacheCabac

codec/decoder/core/src/parse_mb_syn_cavlc.cpp:388–427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

386}
387
388void WelsFillDirectCacheCabac (PWelsNeighAvail pNeighAvail, int8_t iDirect[30], PDqLayer pCurDqLayer) {
389
390 int32_t iCurXy = pCurDqLayer->iMbXyIndex;
391 int32_t iTopXy = 0;
392 int32_t iLeftXy = 0;
393 int32_t iLeftTopXy = 0;
394 int32_t iRightTopXy = 0;
395
396 if (pNeighAvail->iTopAvail) {
397 iTopXy = iCurXy - pCurDqLayer->iMbWidth;
398 }
399 if (pNeighAvail->iLeftAvail) {
400 iLeftXy = iCurXy - 1;
401 }
402 if (pNeighAvail->iLeftTopAvail) {
403 iLeftTopXy = iCurXy - 1 - pCurDqLayer->iMbWidth;
404 }
405 if (pNeighAvail->iRightTopAvail) {
406 iRightTopXy = iCurXy + 1 - pCurDqLayer->iMbWidth;
407 }
408 memset (iDirect, 0, 30);
409 if (pNeighAvail->iLeftAvail && IS_INTER (pNeighAvail->iLeftType)) {
410 iDirect[6] = pCurDqLayer->pDirect[iLeftXy][3];
411 iDirect[12] = pCurDqLayer->pDirect[iLeftXy][7];
412 iDirect[18] = pCurDqLayer->pDirect[iLeftXy][11];
413 iDirect[24] = pCurDqLayer->pDirect[iLeftXy][15];
414 }
415 if (pNeighAvail->iLeftTopAvail && IS_INTER (pNeighAvail->iLeftTopType)) {
416 iDirect[0] = pCurDqLayer->pDirect[iLeftTopXy][15];
417 }
418
419 if (pNeighAvail->iTopAvail && IS_INTER (pNeighAvail->iTopType)) {
420 ST32 (&iDirect[1], LD32 (&pCurDqLayer->pDirect[iTopXy][12]));
421 }
422
423 if (pNeighAvail->iRightTopAvail && IS_INTER (pNeighAvail->iRightTopType)) {
424 iDirect[5] = pCurDqLayer->pDirect[iRightTopXy][12];
425 }
426 //right-top 4*4 block unavailable
427}
428
429void WelsFillCacheInter (PWelsNeighAvail pNeighAvail, uint8_t* pNonZeroCount,
430 int16_t iMvArray[LIST_A][30][MV_A], int8_t iRefIdxArray[LIST_A][30], PDqLayer pCurDqLayer) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected