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

Function CopySpsPps

codec/decoder/core/src/decoder.cpp:404–427  ·  view source on GitHub ↗

! * \brief copy SpsPps from one Ctx to another ctx for threaded code */

Source from the content-addressed store, hash-verified

402* \brief copy SpsPps from one Ctx to another ctx for threaded code
403*/
404void CopySpsPps (PWelsDecoderContext pFromCtx, PWelsDecoderContext pToCtx) {
405 pToCtx->sSpsPpsCtx = pFromCtx->sSpsPpsCtx;
406 PAccessUnit pFromCurAu = pFromCtx->pAccessUnitList;
407 PSps pTmpLayerSps[MAX_LAYER_NUM];
408 for (int i = 0; i < MAX_LAYER_NUM; i++) {
409 pTmpLayerSps[i] = NULL;
410 }
411 // track the layer sps for the current au
412 for (unsigned int i = pFromCurAu->uiStartPos; i <= pFromCurAu->uiEndPos; i++) {
413 uint32_t uiDid = pFromCurAu->pNalUnitsList[i]->sNalHeaderExt.uiDependencyId;
414 pTmpLayerSps[uiDid] = pFromCurAu->pNalUnitsList[i]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.pSps;
415 for (unsigned int j = 0; j < MAX_SPS_COUNT + 1; ++j) {
416 if (&pFromCtx->sSpsPpsCtx.sSpsBuffer[j] == pTmpLayerSps[uiDid]) {
417 pTmpLayerSps[uiDid] = &pToCtx->sSpsPpsCtx.sSpsBuffer[j];
418 break;
419 }
420 }
421 }
422 for (int i = 0; i < MAX_LAYER_NUM; i++) {
423 if (pTmpLayerSps[i] != NULL) {
424 pToCtx->sSpsPpsCtx.pActiveLayerSps[i] = pTmpLayerSps[i];
425 }
426 }
427}
428
429/*
430 * destory_mb_blocks

Callers 2

ParseAccessUnitMethod · 0.85
DecodeCurrentAccessUnitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected