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

Function ParseRefBasePicMarking

codec/decoder/core/src/au_parser.cpp:658–686  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

656}
657
658int32_t ParseRefBasePicMarking (PBitStringAux pBs, PRefBasePicMarking pRefBasePicMarking) {
659 uint32_t uiCode;
660 WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //adaptive_ref_base_pic_marking_mode_flag
661 const bool kbAdaptiveMarkingModeFlag = !!uiCode;
662 pRefBasePicMarking->bAdaptiveRefBasePicMarkingModeFlag = kbAdaptiveMarkingModeFlag;
663 if (kbAdaptiveMarkingModeFlag) {
664 int32_t iIdx = 0;
665 do {
666 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //MMCO_base
667 const uint32_t kuiMmco = uiCode;
668
669 pRefBasePicMarking->mmco_base[iIdx].uiMmcoType = kuiMmco;
670
671 if (kuiMmco == MMCO_END)
672 break;
673
674 if (kuiMmco == MMCO_SHORT2UNUSED) {
675 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //difference_of_base_pic_nums_minus1
676 pRefBasePicMarking->mmco_base[iIdx].uiDiffOfPicNums = 1 + uiCode;
677 pRefBasePicMarking->mmco_base[iIdx].iShortFrameNum = 0;
678 } else if (kuiMmco == MMCO_LONG2UNUSED) {
679 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //long_term_base_pic_num
680 pRefBasePicMarking->mmco_base[iIdx].uiLongTermPicNum = uiCode;
681 }
682 ++ iIdx;
683 } while (iIdx < MAX_MMCO_COUNT);
684 }
685 return ERR_NONE;
686}
687
688int32_t ParsePrefixNalUnit (PWelsDecoderContext pCtx, PBitStringAux pBs) {
689 PNalUnit pCurNal = &pCtx->sSpsPpsCtx.sPrefixNal;

Callers 1

ParsePrefixNalUnitFunction · 0.85

Calls 2

BsGetOneBitFunction · 0.85
BsGetUeFunction · 0.85

Tested by

no test coverage detected