Showing the changes to codec/decoder/core/src/au_parser.cpp (1 of 64 files). Show all
Unified · Split
| @@ -138,8 +138,8 @@ uint8_t* ParseNalHeader (PWelsDecoderContext pCtx, SNalUnitHeader* pNalUnitHeade · 137 unmodified lines | ||
| 138 | 138 | return NULL; //uiForbiddenZeroBit should always equal to 0 |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | − pNalUnitHeader->uiNalRefIdc = (uint8_t) (pNal[0] >> 5); // uiNalRefIdc | |
| 142 | − pNalUnitHeader->eNalUnitType = (EWelsNalUnitType) (pNal[0] & 0x1f); // eNalUnitType | |
| 141 | + pNalUnitHeader->uiNalRefIdc = (uint8_t) (pNal[0] >> 5); // uiNalRefIdc | |
| 142 | + pNalUnitHeader->eNalUnitType = (EWelsNalUnitType) (pNal[0] & 0x1f); // eNalUnitType | |
| 143 | 143 | |
| 144 | 144 | ++pNal; |
| 145 | 145 | --iNalSize; |
| @@ -241,8 +241,8 @@ uint8_t* ParseNalHeader (PWelsDecoderContext pCtx, SNalUnitHeader* pNalUnitHeade · 95 unmodified lines | ||
| 241 | 241 | *pConsumedBytes += NAL_UNIT_HEADER_EXT_SIZE; |
| 242 | 242 | |
| 243 | 243 | pCurNal->sNalHeaderExt.sNalUnitHeader.uiForbiddenZeroBit = pNalUnitHeader->uiForbiddenZeroBit; |
| 244 | − pCurNal->sNalHeaderExt.sNalUnitHeader.uiNalRefIdc = pNalUnitHeader->uiNalRefIdc; | |
| 245 | − pCurNal->sNalHeaderExt.sNalUnitHeader.eNalUnitType = pNalUnitHeader->eNalUnitType; | |
| 244 | + pCurNal->sNalHeaderExt.sNalUnitHeader.uiNalRefIdc = pNalUnitHeader->uiNalRefIdc; | |
| 245 | + pCurNal->sNalHeaderExt.sNalUnitHeader.eNalUnitType = pNalUnitHeader->eNalUnitType; | |
| 246 | 246 | if (pNalUnitHeader->uiNalRefIdc != 0) { |
| 247 | 247 | pBs = &pCtx->sBs; |
| 248 | 248 | iBitSize = (iNalSize << 3) - BsGetTrailingBits (pNal + iNalSize - 1); // convert into bit |
| @@ -272,9 +272,9 @@ uint8_t* ParseNalHeader (PWelsDecoderContext pCtx, SNalUnitHeader* pNalUnitHeade · 23 unmodified lines | ||
| 272 | 272 | } |
| 273 | 273 | pCurNal->uiTimeStamp = pCtx->uiTimeStamp; |
| 274 | 274 | pCurNal->sNalHeaderExt.sNalUnitHeader.uiForbiddenZeroBit = pNalUnitHeader->uiForbiddenZeroBit; |
| 275 | − pCurNal->sNalHeaderExt.sNalUnitHeader.uiNalRefIdc = pNalUnitHeader->uiNalRefIdc; | |
| 276 | − pCurNal->sNalHeaderExt.sNalUnitHeader.eNalUnitType = pNalUnitHeader->eNalUnitType; | |
| 277 | − pCurAu = pCtx->pAccessUnitList; | |
| 275 | + pCurNal->sNalHeaderExt.sNalUnitHeader.uiNalRefIdc = pNalUnitHeader->uiNalRefIdc; | |
| 276 | + pCurNal->sNalHeaderExt.sNalUnitHeader.eNalUnitType = pNalUnitHeader->eNalUnitType; | |
| 277 | + pCurAu = pCtx->pAccessUnitList; | |
| 278 | 278 | uiAvailNalNum = pCurAu->uiAvailUnitsNum; |
| 279 | 279 | |
| 280 | 280 | |
| @@ -576,12 +576,12 @@ bool CheckNextAuNewSeq (PWelsDecoderContext pCtx, const PNalUnit kpCurNal, const · 295 unmodified lines | ||
| 576 | 576 | */ |
| 577 | 577 | int32_t ParseNonVclNal (PWelsDecoderContext pCtx, uint8_t* pRbsp, const int32_t kiSrcLen, uint8_t* pSrcNal, |
| 578 | 578 | const int32_t kSrcNalLen) { |
| 579 | − PBitStringAux pBs = NULL; | |
| 580 | − EWelsNalUnitType eNalType = NAL_UNIT_UNSPEC_0; // make initial value as unspecified | |
| 581 | − int32_t iPicWidth = 0; | |
| 582 | − int32_t iPicHeight = 0; | |
| 583 | − int32_t iBitSize = 0; | |
| 584 | − int32_t iErr = ERR_NONE; | |
| 579 | + PBitStringAux pBs = NULL; | |
| 580 | + EWelsNalUnitType eNalType = NAL_UNIT_UNSPEC_0; // make initial value as unspecified | |
| 581 | + int32_t iPicWidth = 0; | |
| 582 | + int32_t iPicHeight = 0; | |
| 583 | + int32_t iBitSize = 0; | |
| 584 | + int32_t iErr = ERR_NONE; | |
| 585 | 585 | if (kiSrcLen <= 0) |
| 586 | 586 | return iErr; |
| 587 | 587 | |
| @@ -674,8 +674,8 @@ int32_t ParseRefBasePicMarking (PBitStringAux pBs, PRefBasePicMarking pRefBasePi · 86 unmodified lines | ||
| 674 | 674 | |
| 675 | 675 | if (kuiMmco == MMCO_SHORT2UNUSED) { |
| 676 | 676 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //difference_of_base_pic_nums_minus1 |
| 677 | − pRefBasePicMarking->mmco_base[iIdx].uiDiffOfPicNums = 1 + uiCode; | |
| 678 | − pRefBasePicMarking->mmco_base[iIdx].iShortFrameNum = 0; | |
| 677 | + pRefBasePicMarking->mmco_base[iIdx].uiDiffOfPicNums = 1 + uiCode; | |
| 678 | + pRefBasePicMarking->mmco_base[iIdx].iShortFrameNum = 0; | |
| 679 | 679 | } else if (kuiMmco == MMCO_LONG2UNUSED) { |
| 680 | 680 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //long_term_base_pic_num |
| 681 | 681 | pRefBasePicMarking->mmco_base[iIdx].uiLongTermPicNum = uiCode; |
| @@ -747,8 +747,8 @@ int32_t DecodeSpsSvcExt (PWelsDecoderContext pCtx, PSubsetSps pSpsExt, PBitStrin · 65 unmodified lines | ||
| 747 | 747 | WELS_READ_VERIFY (BsGetBits (pBs, 2, &uiCode)); //chroma_phase_y_plus1 |
| 748 | 748 | pExt->uiChromaPhaseYPlus1 = uiCode; |
| 749 | 749 | |
| 750 | − pExt->uiSeqRefLayerChromaPhaseXPlus1Flag = pExt->uiChromaPhaseXPlus1Flag; | |
| 751 | − pExt->uiSeqRefLayerChromaPhaseYPlus1 = pExt->uiChromaPhaseYPlus1; | |
| 750 | + pExt->uiSeqRefLayerChromaPhaseXPlus1Flag = pExt->uiChromaPhaseXPlus1Flag; | |
| 751 | + pExt->uiSeqRefLayerChromaPhaseYPlus1 = pExt->uiChromaPhaseYPlus1; | |
| 752 | 752 | memset (&pExt->sSeqScaledRefLayer, 0, sizeof (SPosOffset)); |
| 753 | 753 | |
| 754 | 754 | if (pExt->uiExtendedSpatialScalability == 1) { |
| @@ -948,11 +948,11 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 193 unmodified lines | ||
| 948 | 948 | return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_NON_BASELINE); |
| 949 | 949 | } else pSps->pSLevelLimits = pSLevelLimits; |
| 950 | 950 | // syntax elements in default |
| 951 | − pSps->uiChromaFormatIdc = 1; | |
| 951 | + pSps->uiChromaFormatIdc = 1; | |
| 952 | 952 | |
| 953 | − pSps->uiProfileIdc = uiProfileIdc; | |
| 954 | − pSps->uiLevelIdc = uiLevelIdc; | |
| 955 | − pSps->iSpsId = iSpsId; | |
| 953 | + pSps->uiProfileIdc = uiProfileIdc; | |
| 954 | + pSps->uiLevelIdc = uiLevelIdc; | |
| 955 | + pSps->iSpsId = iSpsId; | |
| 956 | 956 | |
| 957 | 957 | if (PRO_SCALABLE_BASELINE == uiProfileIdc || PRO_SCALABLE_HIGH == uiProfileIdc || |
| 958 | 958 | PRO_HIGH == uiProfileIdc || PRO_HIGH10 == uiProfileIdc || |
| @@ -1100,10 +1100,10 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 141 unmodified lines | ||
| 1100 | 1100 | return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_CROPPING_DATA); |
| 1101 | 1101 | } |
| 1102 | 1102 | } else { |
| 1103 | − pSps->sFrameCrop.iLeftOffset = 0; // frame_crop_left_offset | |
| 1104 | − pSps->sFrameCrop.iRightOffset = 0; // frame_crop_right_offset | |
| 1105 | − pSps->sFrameCrop.iTopOffset = 0; // frame_crop_top_offset | |
| 1106 | − pSps->sFrameCrop.iBottomOffset = 0; // frame_crop_bottom_offset | |
| 1103 | + pSps->sFrameCrop.iLeftOffset = 0; // frame_crop_left_offset | |
| 1104 | + pSps->sFrameCrop.iRightOffset = 0; // frame_crop_right_offset | |
| 1105 | + pSps->sFrameCrop.iTopOffset = 0; // frame_crop_top_offset | |
| 1106 | + pSps->sFrameCrop.iBottomOffset = 0; // frame_crop_bottom_offset | |
| 1107 | 1107 | } |
| 1108 | 1108 | WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //vui_parameters_present_flag |
| 1109 | 1109 | pSps->bVuiParamPresentFlag = !!uiCode; |
| @@ -1208,8 +1208,8 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 98 unmodified lines | ||
| 1208 | 1208 | if (PRO_SCALABLE_BASELINE == uiProfileIdc || PRO_SCALABLE_HIGH == uiProfileIdc) |
| 1209 | 1209 | pCtx->bAvcBasedFlag = false; |
| 1210 | 1210 | |
| 1211 | − *pPicWidth = pSps->iMbWidth << 4; | |
| 1212 | − *pPicHeight = pSps->iMbHeight << 4; | |
| 1211 | + *pPicWidth = pSps->iMbWidth << 4; | |
| 1212 | + *pPicHeight = pSps->iMbHeight << 4; | |
| 1213 | 1213 | PSps pTmpSps = NULL; |
| 1214 | 1214 | if (kbUseSubsetFlag) { |
| 1215 | 1215 | pTmpSps = &pCtx->sSubsetSpsBuffer[iSpsId].sSps; |