History

Merge pull request #751 from huili2/NewSeq_replace_I

use new seq instead of I slice

huili2 committed 12 years ago

Commit 9d1af8c2 parents c5f04cf 0c544961 file · +4 −17Browse 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−17
@@ -57,14 +57,6 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 56 unmodified lines
5757 bool bFrameCompleteFlag = true;
5858
5959 if (pCtx->iTotalNumMbRec != kiTotalNumMbInCurLayer) {
60− if ((pCtx->iTotalNumMbRec != 0) && (I_SLICE == pCurDq->sLayerInfo.sSliceInLayer.eSliceType)) { //TODO should be IDR instead of I_SLICE!
61− memcpy (& (pCtx->sFrameCrop), & (pCurDq->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader.pSps->sFrameCrop), sizeof (SPosOffset));
62−#ifdef LONG_TERM_REF
63− pCtx->bParamSetsLostFlag = false;
64−#else
65− pCtx->bReferenceLostAtT0Flag = false;
66−#endif //LONG_TERM_REF
67− }
6860 WelsLog (pCtx, WELS_LOG_WARNING,
6961 "DecodeFrameConstruction():::iTotalNumMbRec:%d, total_num_mb_sps:%d, cur_layer_mb_width:%d, cur_layer_mb_height:%d \n",
7062 pCtx->iTotalNumMbRec, kiTotalNumMbInCurLayer, pCurDq->iMbWidth, pCurDq->iMbHeight);
@@ -74,16 +66,16 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 3 unmodified lines
7466 pCtx->iTotalNumMbRec = 0;
7567 #endif
7668
77− if (I_SLICE == pCurDq->sLayerInfo.sSliceInLayer.eSliceType) {
69+ if (pCtx->bNewSeqBegin) {
7870 memcpy (& (pCtx->sFrameCrop), & (pCurDq->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader.pSps->sFrameCrop),
7971 sizeof (SPosOffset)); //confirmed_safe_unsafe_usage
8072 #ifdef LONG_TERM_REF
8173 pCtx->bParamSetsLostFlag = false;
8274 #else
83− pCtx->bReferenceLostAtT0Flag = false; // need initialize it due I_SLICE, 6/4/2010
75+ pCtx->bReferenceLostAtT0Flag = false; // need initialize it due new seq, 6/4/2010
8476 #endif //LONG_TERM_REF
8577 WelsLog (pCtx, WELS_LOG_INFO,
86− "DecodeFrameConstruction()::::output good I frame, %d x %d, crop_left:%d, crop_right:%d, crop_top:%d, crop_bottom:%d.\n",
78+ "DecodeFrameConstruction()::::output first frame of new sequence, %d x %d, crop_left:%d, crop_right:%d, crop_top:%d, crop_bottom:%d.\n",
8779 kiWidth, kiHeight, pCtx->sFrameCrop.iLeftOffset, pCtx->sFrameCrop.iRightOffset, pCtx->sFrameCrop.iTopOffset,
8880 pCtx->sFrameCrop.iBottomOffset);
8981 }
@@ -1313,16 +1305,11 @@ bool CheckIntegrityNalUnitsList (PWelsDecoderContext pCtx) { · 1223 unmodified lines
13131305 PAccessUnit pCurAu = pCtx->pAccessUnitList;
13141306 const int32_t kiEndPos = pCurAu->uiEndPos;
13151307 int32_t iIdxNoInterLayerPred = 0;
1316− int32_t iCurNalUnitIdx = kiEndPos;
1317−
1318− ESliceType eSliceType = static_cast<ESliceType> (0);//EC 2009.11.12
13191308
13201309 if (!pCurAu->bCompletedAuFlag)
13211310 return false;
13221311
1323− eSliceType = pCurAu->pNalUnitsList[iCurNalUnitIdx]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.eSliceType;
1324−
1325− if (I_SLICE == eSliceType) {
1312+ if (pCtx->bNewSeqBegin) {
13261313 pCurAu->uiStartPos = 0;
13271314 //step1: search the pNalUnit whose iNoInterLayerPredFlag equal to 1 backwards (from uiEndPos to 0)
13281315 iIdxNoInterLayerPred = kiEndPos;

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