* get size of reference picture list in target layer incoming, = (iNumRefFrames */
| 434 | * get size of reference picture list in target layer incoming, = (iNumRefFrames |
| 435 | */ |
| 436 | static 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 |
no test coverage detected