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

Function PrefetchReferencePicture

codec/encoder/core/src/encoder_ext.cpp:2801–2822  ·  view source on GitHub ↗

! * \brief prefetch reference picture after WelsBuildRefList */

Source from the content-addressed store, hash-verified

2799 * \brief prefetch reference picture after WelsBuildRefList
2800 */
2801static 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
2824int32_t WelsWriteOneSPS (sWelsEncCtx* pCtx, const int32_t kiSpsIdx, int32_t& iNalSize) {
2825 int iNal = pCtx->pOut->iNalIndex;

Callers 1

WelsEncoderEncodeExtFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected