History

bugfix for HW decoding green issue

huili2 committed 11 years ago

Commit cf384571 parent 78ab4001 file · +4 −2Browse files

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

Unified · Split

codec/decoder/core/src/decoder_core.cpp+4−2
@@ -112,8 +112,6 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 111 unmodified lines
112112 pDstBuf += pPpsBs->uiPpsBsLen;
113113 pCtx->bFrameFinish = false;
114114 }
115− } else { //IDR required SPS, PPS
116− pCtx->bFrameFinish = true;
117115 }
118116 //then VCL data re-write
119117 while (iIdx <= iEndIdx) {
@@ -127,9 +125,11 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 7 unmodified lines
127125 if (pCtx->iTotalNumMbRec == kiTotalNumMbInCurLayer) { //frame complete
128126 pCtx->iTotalNumMbRec = 0;
129127 pCtx->bFramePending = false;
128+ pCtx->bFrameFinish = true; //finish current frame and mark it
130129 } else if (pCtx->iTotalNumMbRec != 0) { //frame incomplete
131130 pCtx->bFramePending = true;
132131 pCtx->pDec->bIsComplete = false;
132+ pCtx->bFrameFinish = false; //current frame not finished
133133 pCtx->iErrorCode |= dsFramePending;
134134 return -1;
135135 //pCtx->pParserBsInfo->iNalNum = 0;
@@ -2100,6 +2100,8 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 1964 unmodified lines
21002100 return ERR_INFO_REF_COUNT_OVERFLOW;
21012101 }
21022102 pCtx->pDec->bNewSeqBegin = pCtx->bNewSeqBegin; //set flag for start decoding
2103+ } else if (pCtx->iTotalNumMbRec == 0) { //pDec != NULL, already start
2104+ pCtx->pDec->bNewSeqBegin = pCtx->bNewSeqBegin; //set flag for start decoding
21032105 }
21042106 pCtx->pDec->uiTimeStamp = pNalCur->uiTimeStamp;
21052107

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