! * \brief prefetch reference picture after WelsBuildRefList */
| 2799 | * \brief prefetch reference picture after WelsBuildRefList |
| 2800 | */ |
| 2801 | static inline void PrefetchReferencePicture (sWelsEncCtx* pCtx, const EVideoFrameType keFrameType) { |
| 2802 | const int32_t kiSliceCount = pCtx->pCurDqLayer->iMaxSliceNum; |
| 2803 | int32_t iIdx = 0; |
| 2804 | uint8_t uiRefIdx = -1; |
| 2805 | |
| 2806 | assert (kiSliceCount > 0); |
| 2807 | if (keFrameType != videoFrameTypeIDR) { |
| 2808 | assert (pCtx->iNumRef0 > 0); |
| 2809 | pCtx->pRefPic = pCtx->pRefList0[0]; // always get item 0 due to reordering done |
| 2810 | pCtx->pCurDqLayer->pRefPic = pCtx->pRefPic; |
| 2811 | uiRefIdx = 0; // reordered reference iIndex |
| 2812 | } else { // safe for IDR coding |
| 2813 | pCtx->pRefPic = NULL; |
| 2814 | pCtx->pCurDqLayer->pRefPic = NULL; |
| 2815 | } |
| 2816 | |
| 2817 | iIdx = 0; |
| 2818 | while (iIdx < kiSliceCount) { |
| 2819 | pCtx->pCurDqLayer->ppSliceInLayer[iIdx]->sSliceHeaderExt.sSliceHeader.uiRefIndex = uiRefIdx; |
| 2820 | ++ iIdx; |
| 2821 | } |
| 2822 | } |
| 2823 | |
| 2824 | int32_t WelsWriteOneSPS (sWelsEncCtx* pCtx, const int32_t kiSpsIdx, int32_t& iNalSize) { |
| 2825 | int iNal = pCtx->pOut->iNalIndex; |
no outgoing calls
no test coverage detected