History

Remove the SPS/PPS exist ahead reset logic and change the CheckSpsActive logic

Haibo Zhu committed 11 years ago

Commit aa5e7f71 parent f48b2e55 files · +14 −40Browse files

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

Unified · Split

codec/decoder/core/src/decoder_core.cpp+6−27
@@ -114,8 +114,8 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 113 unmodified lines
114114 pDstInfo->iBufferStatus = (int32_t) (bFrameCompleteFlag
115115 && pPic->bIsComplete); // When EC disable, ECed picture not output
116116 else if ((pCtx->eErrorConMethod == ERROR_CON_SLICE_COPY_CROSS_IDR_FREEZE_RES_CHANGE
117− || pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE)
118− && pCtx->iErrorCode && bOutResChange)
117+ || pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE)
118+ && pCtx->iErrorCode && bOutResChange)
119119 pCtx->bFreezeOutput = true;
120120
121121 if ((pDstInfo->iBufferStatus == 1) && (pCurDq->sLayerInfo.sNalHeaderExt.bIdrFlag)) {
@@ -151,13 +151,6 @@ inline void HandleReferenceLostL0 (PWelsDecoderContext pCtx, PNalUnit pCurNal · 29 unmodified lines
151151 if (0 == pCurNal->sNalHeaderExt.uiTemporalId) {
152152 pCtx->bReferenceLostAtT0Flag = true;
153153 }
154− if (pCtx->eErrorConMethod == ERROR_CON_DISABLE) {
155−#ifndef LONG_TERM_REF
156− if (pCtx->bReferenceLostAtT0Flag) {
157− ResetParameterSetsState (pCtx);
158− }
159−#endif
160− }
161154 pCtx->iErrorCode |= dsBitstreamError;
162155 }
163156
@@ -165,13 +158,6 @@ inline void HandleReferenceLost (PWelsDecoderContext pCtx, PNalUnit pCurNal) · 1 unmodified line
165158 if ((0 == pCurNal->sNalHeaderExt.uiTemporalId) || (1 == pCurNal->sNalHeaderExt.uiTemporalId)) {
166159 pCtx->bReferenceLostAtT0Flag = true;
167160 }
168− if (pCtx->eErrorConMethod == ERROR_CON_DISABLE) {
169−#ifndef LONG_TERM_REF
170− if (pCtx->bReferenceLostAtT0Flag) {
171− ResetParameterSetsState (pCtx);
172− }
173−#endif
174− }
175161 pCtx->iErrorCode |= dsRefLost;
176162 }
177163
@@ -1877,14 +1863,6 @@ void InitCurDqLayerData (PWelsDecoderContext pCtx, PDqLayer pCurDq) { · 1699 unmodified lines
18771863 }
18781864 }
18791865
1880−// added to reset state of parameter sets to waiting successive incoming IDR, 6/4/2010
1881−// It will be called in case packets lost/ broken and decoded failed at temporal level 0
1882−void ResetParameterSetsState (PWelsDecoderContext pCtx) {
1883− pCtx->bSpsExistAheadFlag = false;
1884− pCtx->bSubspsExistAheadFlag = false;
1885− pCtx->bPpsExistAheadFlag = false;
1886−}
1887−
18881866 /*
18891867 * DecodeCurrentAccessUnit
18901868 * Decode current access unit when current AU is completed.
@@ -2021,7 +1999,6 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 130 unmodified lines
20211999 #else
20222000 pCtx->bReferenceLostAtT0Flag = true;
20232001 #endif
2024− ResetParameterSetsState (pCtx);
20252002 return ERR_INFO_REFERENCE_PIC_LOST;
20262003 }
20272004 }
@@ -2131,7 +2108,8 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 103 unmodified lines
21312108 pCtx->pDec->iLinesize,
21322109 pCtx->sExpandPicFunc.pfExpandLumaPicture, pCtx->sExpandPicFunc.pfExpandChromaPicture);
21332110 pCtx->pDec = NULL;
2134− } else if (pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR || pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE) {
2111+ } else if (pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR
2112+ || pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE) {
21352113 pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //store latest decoded picture for MV Copy EC
21362114 pCtx->pDec = NULL;
21372115 }
@@ -2164,7 +2142,8 @@ bool CheckAndFinishLastPic (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferIn · 26 unmodified lines
21642142 if (pCtx->sLastNalHdrExt.sNalUnitHeader.uiNalRefIdc > 0) {
21652143 pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //save ECed pic for future use
21662144 MarkECFrameAsRef (pCtx);
2167− } else if (pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR || pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE) {
2145+ } else if (pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR
2146+ || pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE) {
21682147 pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //save ECed pic for future MV Copy use
21692148 }
21702149 } else {

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