bool VaapiDPBManager::execRefPicMarking(const PicturePtr& pic, bool * hasMMCO5) { *hasMMCO5 = false; if (!VAAPI_PICTURE_IS_REFERENCE(pic)) { return true; } if (!VAAPI_H264_PICTURE_IS_IDR(pic)) { H264SliceHdr* header = pic->getLastSliceHeader(); H264DecRefPicMarking *const decRefPicMarking = &header->dec_ref_pic_marking; if (decRefPicMarking->adaptive_ref_pic_marking_mode_flag) { if (!execRefPicMarkingAdaptive(pic, decRefPicMarking, hasMMCO5)) return false; } else { if (!execRefPicMarkingSlidingWindow(pic)) return false; } } return true; }
bool VaapiDPBManager::execDummyPictureMarking(const PicturePtr& dummyPic, const SliceHeaderPtr& sliceHdr, int32_t frameNum) { initPictureRefLists(dummyPic); initPictureRefsPicNum(dummyPic, sliceHdr, frameNum); if (!execRefPicMarkingSlidingWindow(dummyPic)) return false; removeShortReference(dummyPic); /* add to short reference */ DPBLayer->shortRef[DPBLayer->shortRefCount++] = dummyPic.get(); return true; }