Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 57 files). Show all
Unified · Split
| @@ -60,7 +60,7 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 59 unmodified lines | |||
| 60 | #ifdef LONG_TERM_REF | 60 | #ifdef LONG_TERM_REF |
| 61 | pCtx->bParamSetsLostFlag = false; | 61 | pCtx->bParamSetsLostFlag = false; |
| 62 | #else | 62 | #else |
| 63 | pCtx->bReferenceLostAtT0Flag = false; // need initialize it due new seq, 6/4/2010 | 63 | pCtx->bReferenceLostAtT0Flag = false; // need initialize it due new seq, 6/4/2010 |
| 64 | #endif //LONG_TERM_REF | 64 | #endif //LONG_TERM_REF |
| 65 | if (pCtx->iTotalNumMbRec == kiTotalNumMbInCurLayer) { | 65 | if (pCtx->iTotalNumMbRec == kiTotalNumMbInCurLayer) { |
| 66 | pCtx->bPrintFrameErrorTraceFlag = true; | 66 | pCtx->bPrintFrameErrorTraceFlag = true; |
| @@ -354,7 +354,7 @@ int32_t ParseRefPicListReordering (PBitStringAux pBs, PSliceHeader pSh) { · 287 unmodified lines | |||
| 354 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //abs_diff_pic_num_minus1 | 354 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //abs_diff_pic_num_minus1 |
| 355 | WELS_CHECK_SE_UPPER_ERROR_NOLOG (uiCode, (uint32_t) (1 << pSps->uiLog2MaxFrameNum), "abs_diff_pic_num_minus1", | 355 | WELS_CHECK_SE_UPPER_ERROR_NOLOG (uiCode, (uint32_t) (1 << pSps->uiLog2MaxFrameNum), "abs_diff_pic_num_minus1", |
| 356 | GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_REF_REORDERING)); | 356 | GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_REF_REORDERING)); |
| 357 | pRefPicListReordering->sReorderingSyn[iList][iIdx].uiAbsDiffPicNumMinus1 = uiCode; // uiAbsDiffPicNumMinus1 | 357 | pRefPicListReordering->sReorderingSyn[iList][iIdx].uiAbsDiffPicNumMinus1 = uiCode; // uiAbsDiffPicNumMinus1 |
| 358 | } else if (kuiIdc == 2) { | 358 | } else if (kuiIdc == 2) { |
| 359 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //long_term_pic_num | 359 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //long_term_pic_num |
| 360 | pRefPicListReordering->sReorderingSyn[iList][iIdx].uiLongTermPicNum = uiCode; | 360 | pRefPicListReordering->sReorderingSyn[iList][iIdx].uiLongTermPicNum = uiCode; |
| @@ -1186,7 +1186,7 @@ int32_t UpdateAccessUnit (PWelsDecoderContext pCtx) { · 825 unmodified lines | |||
| 1186 | ++ uiActualIdx; | 1186 | ++ uiActualIdx; |
| 1187 | } | 1187 | } |
| 1188 | if (uiActualIdx == | 1188 | if (uiActualIdx == |
| 1189 | pCurAu->uiActualUnitsNum) { // no found IDR nal within incoming AU, need exit to avoid mosaic issue, 11/19/2009 | 1189 | pCurAu->uiActualUnitsNum) { // no found IDR nal within incoming AU, need exit to avoid mosaic issue, 11/19/2009 |
| 1190 | 1190 | ||
| 1191 | pCtx->sDecoderStatistics.uiIDRLostNum++; | 1191 | pCtx->sDecoderStatistics.uiIDRLostNum++; |
| 1192 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, | 1192 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, |
| @@ -1215,7 +1215,7 @@ int32_t InitialDqLayersContext (PWelsDecoderContext pCtx, const int32_t kiMaxWid · 22 unmodified lines | |||
| 1215 | pCtx->sMb.iMbHeight = (kiMaxHeight + 15) >> 4; | 1215 | pCtx->sMb.iMbHeight = (kiMaxHeight + 15) >> 4; |
| 1216 | 1216 | ||
| 1217 | if (pCtx->bInitialDqLayersMem && kiMaxWidth <= pCtx->iPicWidthReq | 1217 | if (pCtx->bInitialDqLayersMem && kiMaxWidth <= pCtx->iPicWidthReq |
| 1218 | && kiMaxHeight <= pCtx->iPicHeightReq) // have same dimension memory, skipped | 1218 | && kiMaxHeight <= pCtx->iPicHeightReq) // have same dimension memory, skipped |
| 1219 | return ERR_NONE; | 1219 | return ERR_NONE; |
| 1220 | 1220 | ||
| 1221 | 1221 | ||
| @@ -1270,7 +1270,7 @@ int32_t InitialDqLayersContext (PWelsDecoderContext pCtx, const int32_t kiMaxWid · 48 unmodified lines | |||
| 1270 | sizeof ( | 1270 | sizeof ( |
| 1271 | int8_t) * MB_PARTITION_SIZE, "pCtx->sMb.pSubMbType[]"); | 1271 | int8_t) * MB_PARTITION_SIZE, "pCtx->sMb.pSubMbType[]"); |
| 1272 | pCtx->sMb.pSliceIdc[i] = (int32_t*) WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int32_t), | 1272 | pCtx->sMb.pSliceIdc[i] = (int32_t*) WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int32_t), |
| 1273 | "pCtx->sMb.pSliceIdc[]"); // using int32_t for slice_idc, 4/21/2010 | 1273 | "pCtx->sMb.pSliceIdc[]"); // using int32_t for slice_idc, 4/21/2010 |
| 1274 | pCtx->sMb.pResidualPredFlag[i] = (int8_t*) WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t), | 1274 | pCtx->sMb.pResidualPredFlag[i] = (int8_t*) WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t), |
| 1275 | "pCtx->sMb.pResidualPredFlag[]"); | 1275 | "pCtx->sMb.pResidualPredFlag[]"); |
| 1276 | //pCtx->sMb.pMotionPredFlag[i] = (uint8_t *) WelsMallocz(pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof(uint8_t), "pCtx->sMb.pMotionPredFlag[]"); | 1276 | //pCtx->sMb.pMotionPredFlag[i] = (uint8_t *) WelsMallocz(pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof(uint8_t), "pCtx->sMb.pMotionPredFlag[]"); |
| @@ -2146,7 +2146,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 869 unmodified lines | |||
| 2146 | GetI4LumaIChromaAddrTable (pCtx->iDecBlockOffsetArray, pCtx->pDec->iLinesize[0], pCtx->pDec->iLinesize[1]); | 2146 | GetI4LumaIChromaAddrTable (pCtx->iDecBlockOffsetArray, pCtx->pDec->iLinesize[0], pCtx->pDec->iLinesize[1]); |
| 2147 | 2147 | ||
| 2148 | if (pNalCur->sNalHeaderExt.uiLayerDqId > kuiTargetLayerDqId) { // confirmed pNalCur will never be NULL | 2148 | if (pNalCur->sNalHeaderExt.uiLayerDqId > kuiTargetLayerDqId) { // confirmed pNalCur will never be NULL |
| 2149 | break; // Per formance it need not to decode the remaining bits any more due to given uiLayerDqId required, 9/2/2009 | 2149 | break; // Per formance it need not to decode the remaining bits any more due to given uiLayerDqId required, 9/2/2009 |
| 2150 | } | 2150 | } |
| 2151 | 2151 | ||
| 2152 | memset (&pLayerInfo, 0, sizeof (SLayerInfo)); | 2152 | memset (&pLayerInfo, 0, sizeof (SLayerInfo)); |