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

Function WelsOpenDecoder

codec/decoder/core/src/decoder.cpp:599–626  ·  view source on GitHub ↗

! * \brief Open decoder */

Source from the content-addressed store, hash-verified

597 * \brief Open decoder
598 */
599int32_t WelsOpenDecoder (PWelsDecoderContext pCtx, SLogContext* pLogCtx) {
600 int iRet = ERR_NONE;
601 // function pointers
602 InitDecFuncs (pCtx, pCtx->uiCpuFlag);
603
604 // vlc tables
605 InitVlcTable (pCtx->pVlcTable);
606
607 // static memory
608 iRet = WelsInitStaticMemory (pCtx);
609 if (ERR_NONE != iRet) {
610 pCtx->iErrorCode |= dsOutOfMemory;
611 WelsLog (pLogCtx, WELS_LOG_ERROR, "WelsInitStaticMemory() failed in WelsOpenDecoder().");
612 return iRet;
613 }
614
615#ifdef LONG_TERM_REF
616 pCtx->bParamSetsLostFlag = true;
617#else
618 pCtx->bReferenceLostAtT0Flag = true; // should be true to waiting IDR at incoming AU bits following, 6/4/2010
619#endif //LONG_TERM_REF
620 pCtx->bNewSeqBegin = true;
621 pCtx->bPrintFrameErrorTraceFlag = true;
622 pCtx->iIgnoredErrorInfoPacketCount = 0;
623 pCtx->bFrameFinish = true;
624 pCtx->iSeqNum = 0;
625 return iRet;
626}
627
628/*!
629 * \brief Close decoder

Callers 1

WelsInitDecoderFunction · 0.85

Calls 4

InitDecFuncsFunction · 0.85
InitVlcTableFunction · 0.85
WelsInitStaticMemoryFunction · 0.85
WelsLogFunction · 0.85

Tested by

no test coverage detected