! * \brief Open decoder */
| 597 | * \brief Open decoder |
| 598 | */ |
| 599 | int32_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 |
no test coverage detected