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

Function GetTargetRefListSize

codec/decoder/core/src/decoder.cpp:436–458  ·  view source on GitHub ↗

* get size of reference picture list in target layer incoming, = (iNumRefFrames */

Source from the content-addressed store, hash-verified

434 * get size of reference picture list in target layer incoming, = (iNumRefFrames
435 */
436static inline int32_t GetTargetRefListSize (PWelsDecoderContext pCtx) {
437 int32_t iNumRefFrames = 0;
438 // +2 for EC MV Copy buffer exchange
439 if ((pCtx == NULL) || (pCtx->pSps == NULL)) {
440 iNumRefFrames = MAX_REF_PIC_COUNT + 2;
441 } else {
442 iNumRefFrames = pCtx->pSps->iNumRefFrames + 2;
443 int32_t iThreadCount = GetThreadCount (pCtx);
444 if (iThreadCount > 1) {
445 //due to thread and reordering buffering, it needs more dpb space
446 iNumRefFrames = MAX_DPB_COUNT + iThreadCount;
447 }
448 }
449
450#ifdef LONG_TERM_REF
451 //pic_queue size minimum set 2
452 if (iNumRefFrames < 2) {
453 iNumRefFrames = 2;
454 }
455#endif
456
457 return iNumRefFrames;
458}
459
460/*
461 * request memory blocks for decoder avc part

Callers 1

WelsRequestMemFunction · 0.85

Calls 1

GetThreadCountFunction · 0.85

Tested by

no test coverage detected