History

1. add encoder-engine-decoder API UT for: IDR request, LTR request 2. add decoder api UT for EC: Disable/Enable EC 3. Fix a decoder bug when EC is disabled itoltalMbDec should be set to zero when encouter a new sequence/picture, even when EC is disabled.

dongzha committed 12 years ago

Commit 311f7001 parent 679cc4a4 files · +527 −26Browse files

Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 4 files). Show all

Unified · Split

codec/decoder/core/src/decoder_core.cpp+11−8
@@ -2001,7 +2001,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 2000 unmodified lines
20012001 return ERR_NONE;
20022002 }
20032003
2004−bool CheckAndDoEC (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferInfo* pDstInfo) {
2004+bool CheckAndFinishLastPic (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferInfo* pDstInfo) {
20052005 PAccessUnit pAu = pCtx->pAccessUnitList;
20062006 PNalUnit pCurNal = pAu->pNalUnitsList[pAu->uiEndPos];
20072007 if ((pCtx->iTotalNumMbRec != 0)
@@ -2009,12 +2009,16 @@ bool CheckAndDoEC (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferInfo* pDstI · 1 unmodified line
20092009 &pCurNal->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader))) {
20102010 //Do Error Concealment here
20112011 if (NeedErrorCon (pCtx)) { //should always be true!
2012− ImplementErrorCon (pCtx);
2013− pCtx->iTotalNumMbRec = pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight;
2014− DecodeFrameConstruction (pCtx, ppDst, pDstInfo);
2015− if (pCtx->sLastNalHdrExt.sNalUnitHeader.uiNalRefIdc > 0) {
2016− pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //save ECed pic for future use
2017− MarkECFrameAsRef (pCtx);
2012+ if (pCtx->eErrorConMethod != ERROR_CON_DISABLE) {
2013+ ImplementErrorCon (pCtx);
2014+ pCtx->iTotalNumMbRec = pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight;
2015+ DecodeFrameConstruction (pCtx, ppDst, pDstInfo);
2016+ if (pCtx->sLastNalHdrExt.sNalUnitHeader.uiNalRefIdc > 0) {
2017+ pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //save ECed pic for future use
2018+ MarkECFrameAsRef (pCtx);
2019+ }
2020+ } else {
2021+ DecodeFrameConstruction (pCtx, ppDst, pDstInfo);
20182022 }
20192023 pCtx->iPrevFrameNum = pCtx->sLastSliceHeader.iFrameNum; //save frame_num
20202024 if (pCtx->bLastHasMmco5)
@@ -2023,5 +2027,4 @@ bool CheckAndDoEC (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferInfo* pDstI · 2 unmodified lines
20232027 }
20242028 return ERR_NONE;
20252029 }
2026−
20272030 } // namespace WelsDec

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t