History

add EC MV copy

dong zhang committed 11 years ago

Commit 9425c2a1 parent 48e79d515 files · +321 −28Browse files

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

Unified · Split

codec/decoder/core/src/decoder_core.cpp+11−1
@@ -113,7 +113,9 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 112 unmodified lines
113 if (pCtx->eErrorConMethod == ERROR_CON_DISABLE) //no buffer output if EC is disabled and frame incomplete113 if (pCtx->eErrorConMethod == ERROR_CON_DISABLE) //no buffer output if EC is disabled and frame incomplete
114 pDstInfo->iBufferStatus = (int32_t) (bFrameCompleteFlag114 pDstInfo->iBufferStatus = (int32_t) (bFrameCompleteFlag
115 && pPic->bIsComplete); // When EC disable, ECed picture not output115 && pPic->bIsComplete); // When EC disable, ECed picture not output
116 else if (pCtx->eErrorConMethod == ERROR_CON_SLICE_COPY_CROSS_IDR_FREEZE_RES_CHANGE && pCtx->iErrorCode && bOutResChange)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->bFreezeOutput = true;119 pCtx->bFreezeOutput = true;
118 120
119 if ((pDstInfo->iBufferStatus == 1) && (pCurDq->sLayerInfo.sNalHeaderExt.bIdrFlag)) {121 if ((pDstInfo->iBufferStatus == 1) && (pCurDq->sLayerInfo.sNalHeaderExt.bIdrFlag)) {
@@ -620,6 +622,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 500 unmodified lines
620 pSliceHeadExt->pSubsetSps = pSubsetSps;622 pSliceHeadExt->pSubsetSps = pSubsetSps;
621 623
622 bIdrFlag = (!kbExtensionFlag && eNalType == NAL_UNIT_CODED_SLICE_IDR) || (kbExtensionFlag && pNalHeaderExt->bIdrFlag);624 bIdrFlag = (!kbExtensionFlag && eNalType == NAL_UNIT_CODED_SLICE_IDR) || (kbExtensionFlag && pNalHeaderExt->bIdrFlag);
625 pSliceHead->bIdrFlag = bIdrFlag;
623 626
624 if (pSps->uiLog2MaxFrameNum == 0) {627 if (pSps->uiLog2MaxFrameNum == 0) {
625 WelsLog (pLogCtx, WELS_LOG_WARNING, "non existing SPS referenced");628 WelsLog (pLogCtx, WELS_LOG_WARNING, "non existing SPS referenced");
@@ -1961,6 +1964,8 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 1335 unmodified lines
1961 memcpy (&pLayerInfo.sNalHeaderExt, &pNalCur->sNalHeaderExt, sizeof (SNalUnitHeaderExt)); //confirmed_safe_unsafe_usage1964 memcpy (&pLayerInfo.sNalHeaderExt, &pNalCur->sNalHeaderExt, sizeof (SNalUnitHeaderExt)); //confirmed_safe_unsafe_usage
1962 1965
1963 pCtx->pDec->iFrameNum = pSh->iFrameNum;1966 pCtx->pDec->iFrameNum = pSh->iFrameNum;
1967 pCtx->pDec->iFramePoc = pSh->iPicOrderCntLsb; // still can not obtain correct, because current do not support POCtype 2
1968 pCtx->pDec->bIdrFlag = pNalCur->sNalHeaderExt.bIdrFlag;
1964 1969
1965 memcpy (&pLayerInfo.sSliceInLayer.sSliceHeaderExt, pShExt, sizeof (SSliceHeaderExt)); //confirmed_safe_unsafe_usage1970 memcpy (&pLayerInfo.sSliceInLayer.sSliceHeaderExt, pShExt, sizeof (SSliceHeaderExt)); //confirmed_safe_unsafe_usage
1966 pLayerInfo.sSliceInLayer.bSliceHeaderExtFlag = pNalCur->sNalData.sVclNal.bSliceHeaderExtFlag;1971 pLayerInfo.sSliceInLayer.bSliceHeaderExtFlag = pNalCur->sNalData.sVclNal.bSliceHeaderExtFlag;
@@ -2126,6 +2131,9 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 159 unmodified lines
2126 pCtx->pDec->iLinesize,2131 pCtx->pDec->iLinesize,
2127 pCtx->sExpandPicFunc.pfExpandLumaPicture, pCtx->sExpandPicFunc.pfExpandChromaPicture);2132 pCtx->sExpandPicFunc.pfExpandLumaPicture, pCtx->sExpandPicFunc.pfExpandChromaPicture);
2128 pCtx->pDec = NULL;2133 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) {
2135 pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //store latest decoded picture for MV Copy EC
2136 pCtx->pDec = NULL;
2129 }2137 }
2130 }2138 }
2131 2139
@@ -2156,6 +2164,8 @@ bool CheckAndFinishLastPic (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferIn · 24 unmodified lines
2156 if (pCtx->sLastNalHdrExt.sNalUnitHeader.uiNalRefIdc > 0) {2164 if (pCtx->sLastNalHdrExt.sNalUnitHeader.uiNalRefIdc > 0) {
2157 pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //save ECed pic for future use2165 pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //save ECed pic for future use
2158 MarkECFrameAsRef (pCtx);2166 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) {
2168 pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //save ECed pic for future MV Copy use
2159 }2169 }
2160 } else {2170 } else {
2161 if (DecodeFrameConstruction (pCtx, ppDst, pDstInfo))2171 if (DecodeFrameConstruction (pCtx, ppDst, pDstInfo))

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