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
2001 return ERR_NONE;2001 return ERR_NONE;
2002}2002}
2003 2003
2004bool CheckAndDoEC (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferInfo* pDstInfo) {2004bool CheckAndFinishLastPic (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferInfo* pDstInfo) {
2005 PAccessUnit pAu = pCtx->pAccessUnitList;2005 PAccessUnit pAu = pCtx->pAccessUnitList;
2006 PNalUnit pCurNal = pAu->pNalUnitsList[pAu->uiEndPos];2006 PNalUnit pCurNal = pAu->pNalUnitsList[pAu->uiEndPos];
2007 if ((pCtx->iTotalNumMbRec != 0)2007 if ((pCtx->iTotalNumMbRec != 0)
@@ -2009,12 +2009,16 @@ bool CheckAndDoEC (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferInfo* pDstI · 1 unmodified line
2009 &pCurNal->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader))) {2009 &pCurNal->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader))) {
2010 //Do Error Concealment here2010 //Do Error Concealment here
2011 if (NeedErrorCon (pCtx)) { //should always be true!2011 if (NeedErrorCon (pCtx)) { //should always be true!
2012 ImplementErrorCon (pCtx);2012 if (pCtx->eErrorConMethod != ERROR_CON_DISABLE) {
2013 pCtx->iTotalNumMbRec = pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight;2013 ImplementErrorCon (pCtx);
2014 DecodeFrameConstruction (pCtx, ppDst, pDstInfo);2014 pCtx->iTotalNumMbRec = pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight;
2015 if (pCtx->sLastNalHdrExt.sNalUnitHeader.uiNalRefIdc > 0) {2015 DecodeFrameConstruction (pCtx, ppDst, pDstInfo);
2016 pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //save ECed pic for future use2016 if (pCtx->sLastNalHdrExt.sNalUnitHeader.uiNalRefIdc > 0) {
2017 MarkECFrameAsRef (pCtx);2017 pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //save ECed pic for future use
2018 MarkECFrameAsRef (pCtx);
2019 }
2020 } else {
2021 DecodeFrameConstruction (pCtx, ppDst, pDstInfo);
2018 }2022 }
2019 pCtx->iPrevFrameNum = pCtx->sLastSliceHeader.iFrameNum; //save frame_num2023 pCtx->iPrevFrameNum = pCtx->sLastSliceHeader.iFrameNum; //save frame_num
2020 if (pCtx->bLastHasMmco5)2024 if (pCtx->bLastHasMmco5)
@@ -2023,5 +2027,4 @@ bool CheckAndDoEC (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferInfo* pDstI · 2 unmodified lines
2023 }2027 }
2024 return ERR_NONE;2028 return ERR_NONE;
2025}2029}
2026
2027} // namespace WelsDec2030} // 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