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

Function WriteRefPicMarking

codec/encoder/core/src/svc_encode_slice.cpp:241–273  ·  view source on GitHub ↗

! * \brief write reference picture marking syntax in pSlice header */

Source from the content-addressed store, hash-verified

239* \brief write reference picture marking syntax in pSlice header
240*/
241void WriteRefPicMarking (SBitStringAux* pBs, SSliceHeader* pSliceHeader, SNalUnitHeaderExt* pNalHdrExt) {
242 SRefPicMarking* sRefMarking = &pSliceHeader->sRefMarking;
243 int16_t n = 0;
244
245 if (pNalHdrExt->bIdrFlag) {
246 BsWriteOneBit (pBs, sRefMarking->bNoOutputOfPriorPicsFlag);
247 BsWriteOneBit (pBs, sRefMarking->bLongTermRefFlag);
248 } else {
249 BsWriteOneBit (pBs, sRefMarking->bAdaptiveRefPicMarkingModeFlag);
250
251 if (sRefMarking->bAdaptiveRefPicMarkingModeFlag) {
252 int32_t iMmcoType;
253 do {
254 iMmcoType = sRefMarking->SMmcoRef[n].iMmcoType;
255 BsWriteUE (pBs, iMmcoType);
256 if (1 == iMmcoType || 3 == iMmcoType)
257 BsWriteUE (pBs, sRefMarking->SMmcoRef[n].iDiffOfPicNum - 1);
258
259 if (2 == iMmcoType)
260 BsWriteUE (pBs, sRefMarking->SMmcoRef[n].iLongTermPicNum);
261
262 if (3 == iMmcoType || 6 == iMmcoType)
263 BsWriteUE (pBs, sRefMarking->SMmcoRef[n].iLongTermFrameIdx);
264
265 if (4 == iMmcoType)
266 BsWriteUE (pBs, sRefMarking->SMmcoRef[n].iMaxLongTermFrameIdx + 1);
267
268 n ++;
269 } while (0 != iMmcoType);
270 }
271
272 }
273}
274
275void WelsSliceHeaderWrite (sWelsEncCtx* pCtx, SBitStringAux* pBs, SDqLayer* pCurLayer, SSlice* pSlice,
276 IWelsParametersetStrategy* pParametersetStrategy) {

Callers 2

WelsSliceHeaderWriteFunction · 0.85
WelsSliceHeaderExtWriteFunction · 0.85

Calls 2

BsWriteOneBitFunction · 0.85
BsWriteUEFunction · 0.85

Tested by

no test coverage detected