Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 5 files). Show all
Unified · Split
| @@ -114,8 +114,8 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 113 unmodified lines | ||
| 114 | 114 | pDstInfo->iBufferStatus = (int32_t) (bFrameCompleteFlag |
| 115 | 115 | && pPic->bIsComplete); // When EC disable, ECed picture not output |
| 116 | 116 | 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) | |
| 119 | 119 | pCtx->bFreezeOutput = true; |
| 120 | 120 | |
| 121 | 121 | if ((pDstInfo->iBufferStatus == 1) && (pCurDq->sLayerInfo.sNalHeaderExt.bIdrFlag)) { |
| @@ -151,13 +151,6 @@ inline void HandleReferenceLostL0 (PWelsDecoderContext pCtx, PNalUnit pCurNal · 29 unmodified lines | ||
| 151 | 151 | if (0 == pCurNal->sNalHeaderExt.uiTemporalId) { |
| 152 | 152 | pCtx->bReferenceLostAtT0Flag = true; |
| 153 | 153 | } |
| 154 | − if (pCtx->eErrorConMethod == ERROR_CON_DISABLE) { | |
| 155 | −#ifndef LONG_TERM_REF | |
| 156 | − if (pCtx->bReferenceLostAtT0Flag) { | |
| 157 | − ResetParameterSetsState (pCtx); | |
| 158 | − } | |
| 159 | −#endif | |
| 160 | − } | |
| 161 | 154 | pCtx->iErrorCode |= dsBitstreamError; |
| 162 | 155 | } |
| 163 | 156 | |
| @@ -165,13 +158,6 @@ inline void HandleReferenceLost (PWelsDecoderContext pCtx, PNalUnit pCurNal) · 1 unmodified line | ||
| 165 | 158 | if ((0 == pCurNal->sNalHeaderExt.uiTemporalId) || (1 == pCurNal->sNalHeaderExt.uiTemporalId)) { |
| 166 | 159 | pCtx->bReferenceLostAtT0Flag = true; |
| 167 | 160 | } |
| 168 | − if (pCtx->eErrorConMethod == ERROR_CON_DISABLE) { | |
| 169 | −#ifndef LONG_TERM_REF | |
| 170 | − if (pCtx->bReferenceLostAtT0Flag) { | |
| 171 | − ResetParameterSetsState (pCtx); | |
| 172 | − } | |
| 173 | −#endif | |
| 174 | − } | |
| 175 | 161 | pCtx->iErrorCode |= dsRefLost; |
| 176 | 162 | } |
| 177 | 163 | |
| @@ -1877,14 +1863,6 @@ void InitCurDqLayerData (PWelsDecoderContext pCtx, PDqLayer pCurDq) { · 1699 unmodified lines | ||
| 1877 | 1863 | } |
| 1878 | 1864 | } |
| 1879 | 1865 | |
| 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 | − | |
| 1888 | 1866 | /* |
| 1889 | 1867 | * DecodeCurrentAccessUnit |
| 1890 | 1868 | * 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 | ||
| 2021 | 1999 | #else |
| 2022 | 2000 | pCtx->bReferenceLostAtT0Flag = true; |
| 2023 | 2001 | #endif |
| 2024 | − ResetParameterSetsState (pCtx); | |
| 2025 | 2002 | return ERR_INFO_REFERENCE_PIC_LOST; |
| 2026 | 2003 | } |
| 2027 | 2004 | } |
| @@ -2131,7 +2108,8 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 103 unmodified lines | ||
| 2131 | 2108 | pCtx->pDec->iLinesize, |
| 2132 | 2109 | pCtx->sExpandPicFunc.pfExpandLumaPicture, pCtx->sExpandPicFunc.pfExpandChromaPicture); |
| 2133 | 2110 | 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) { | |
| 2135 | 2113 | pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //store latest decoded picture for MV Copy EC |
| 2136 | 2114 | pCtx->pDec = NULL; |
| 2137 | 2115 | } |
| @@ -2164,7 +2142,8 @@ bool CheckAndFinishLastPic (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferIn · 26 unmodified lines | ||
| 2164 | 2142 | if (pCtx->sLastNalHdrExt.sNalUnitHeader.uiNalRefIdc > 0) { |
| 2165 | 2143 | pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //save ECed pic for future use |
| 2166 | 2144 | 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) { | |
| 2168 | 2147 | pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //save ECed pic for future MV Copy use |
| 2169 | 2148 | } |
| 2170 | 2149 | } else { |