Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 54 files). Show all
Unified · Split
| @@ -329,7 +329,7 @@ int32_t ParseRefPicListReordering (PBitStringAux pBs, PSliceHeader pSh) { · 328 unmodified lines | ||
| 329 | 329 | // Common syntaxs for P or B slices: list0, list1 followed if B slices used. |
| 330 | 330 | do { |
| 331 | 331 | WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //ref_pic_list_modification_flag_l0 |
| 332 | − pRefPicListReordering->bRefPicListReorderingFlag[iList] = !!uiCode; | |
| 332 | + pRefPicListReordering->bRefPicListReorderingFlag[iList] = !!uiCode; | |
| 333 | 333 | |
| 334 | 334 | if (pRefPicListReordering->bRefPicListReorderingFlag[iList]) { |
| 335 | 335 | int32_t iIdx = 0; |
| @@ -341,7 +341,7 @@ int32_t ParseRefPicListReordering (PBitStringAux pBs, PSliceHeader pSh) { · 5 unmodified lines | ||
| 341 | 341 | if ((iIdx >= MAX_REF_PIC_COUNT) || (kuiIdc > 3)) { |
| 342 | 342 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_REF_REORDERING); |
| 343 | 343 | } |
| 344 | − pRefPicListReordering->sReorderingSyn[iList][iIdx].uiReorderingOfPicNumsIdc = kuiIdc; | |
| 344 | + pRefPicListReordering->sReorderingSyn[iList][iIdx].uiReorderingOfPicNumsIdc = kuiIdc; | |
| 345 | 345 | if (kuiIdc == 3) |
| 346 | 346 | break; |
| 347 | 347 | |
| @@ -377,12 +377,12 @@ int32_t ParseDecRefPicMarking (PWelsDecoderContext pCtx, PBitStringAux pBs, PSli · 29 unmodified lines | ||
| 377 | 377 | uint32_t uiCode; |
| 378 | 378 | if (kbIdrFlag) { |
| 379 | 379 | WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //no_output_of_prior_pics_flag |
| 380 | − kpRefMarking->bNoOutputOfPriorPicsFlag = !!uiCode; | |
| 380 | + kpRefMarking->bNoOutputOfPriorPicsFlag = !!uiCode; | |
| 381 | 381 | WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //long_term_reference_flag |
| 382 | − kpRefMarking->bLongTermRefFlag = !!uiCode; | |
| 382 | + kpRefMarking->bLongTermRefFlag = !!uiCode; | |
| 383 | 383 | } else { |
| 384 | 384 | WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //adaptive_ref_pic_marking_mode_flag |
| 385 | − kpRefMarking->bAdaptiveRefPicMarkingModeFlag = !!uiCode; | |
| 385 | + kpRefMarking->bAdaptiveRefPicMarkingModeFlag = !!uiCode; | |
| 386 | 386 | if (kpRefMarking->bAdaptiveRefPicMarkingModeFlag) { |
| 387 | 387 | int32_t iIdx = 0; |
| 388 | 388 | do { |
| @@ -423,9 +423,9 @@ bool FillDefaultSliceHeaderExt (PSliceHeaderExt pShExt, PNalUnitHeaderExt pNalEx · 34 unmodified lines | ||
| 423 | 423 | return false; |
| 424 | 424 | |
| 425 | 425 | if (pNalExt->iNoInterLayerPredFlag || pNalExt->uiQualityId > 0) |
| 426 | − pShExt->bBasePredWeightTableFlag = false; | |
| 426 | + pShExt->bBasePredWeightTableFlag = false; | |
| 427 | 427 | else |
| 428 | − pShExt->bBasePredWeightTableFlag = true; | |
| 428 | + pShExt->bBasePredWeightTableFlag = true; | |
| 429 | 429 | pShExt->uiRefLayerDqId = (uint8_t) - 1; |
| 430 | 430 | pShExt->uiDisableInterLayerDeblockingFilterIdc = 0; |
| 431 | 431 | pShExt->iInterLayerSliceAlphaC0Offset = 0; |
| @@ -674,15 +674,15 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 242 unmodified lines | ||
| 674 | 674 | const bool kbStoreRefBaseFlag = pSliceHeadExt->bStoreRefBasePicFlag; |
| 675 | 675 | memcpy (&sBaseMarking, &pSliceHeadExt->sRefBasePicMarking, sizeof (SRefBasePicMarking)); //confirmed_safe_unsafe_usage |
| 676 | 676 | memset (pSliceHeadExt, 0, sizeof (SSliceHeaderExt)); |
| 677 | − pSliceHeadExt->bStoreRefBasePicFlag = kbStoreRefBaseFlag; | |
| 677 | + pSliceHeadExt->bStoreRefBasePicFlag = kbStoreRefBaseFlag; | |
| 678 | 678 | memcpy (&pSliceHeadExt->sRefBasePicMarking, &sBaseMarking, sizeof (SRefBasePicMarking)); //confirmed_safe_unsafe_usage |
| 679 | 679 | } |
| 680 | 680 | |
| 681 | − kpCurNal->sNalData.sVclNal.bSliceHeaderExtFlag = kbExtensionFlag; | |
| 681 | + kpCurNal->sNalData.sVclNal.bSliceHeaderExtFlag = kbExtensionFlag; | |
| 682 | 682 | |
| 683 | 683 | // first_mb_in_slice |
| 684 | 684 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //first_mb_in_slice |
| 685 | − pSliceHead->iFirstMbInSlice = uiCode; | |
| 685 | + pSliceHead->iFirstMbInSlice = uiCode; | |
| 686 | 686 | |
| 687 | 687 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //slice_type |
| 688 | 688 | uiSliceType = uiCode; |
| @@ -710,7 +710,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 21 unmodified lines | ||
| 710 | 710 | } |
| 711 | 711 | } |
| 712 | 712 | |
| 713 | − pSliceHead->eSliceType = static_cast <EWelsSliceType> (uiSliceType); | |
| 713 | + pSliceHead->eSliceType = static_cast <EWelsSliceType> (uiSliceType); | |
| 714 | 714 | |
| 715 | 715 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //pic_parameter_set_id |
| 716 | 716 | iPpsId = uiCode; |
| @@ -776,7 +776,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 59 unmodified lines | ||
| 776 | 776 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SPS_ID); |
| 777 | 777 | } |
| 778 | 778 | pCtx->iSPSLastInvalidId = -1; |
| 779 | − pSps = &pCtx->sSpsBuffer[pPps->iSpsId]; | |
| 779 | + pSps = &pCtx->sSpsBuffer[pPps->iSpsId]; | |
| 780 | 780 | } |
| 781 | 781 | pSliceHead->iPpsId = iPpsId; |
| 782 | 782 | pSliceHead->iSpsId = pPps->iSpsId; |
| @@ -819,9 +819,9 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 36 unmodified lines | ||
| 819 | 819 | // standard 7.4.3 idr_pic_id should be in range 0 to 65535, inclusive. |
| 820 | 820 | WELS_CHECK_SE_UPPER_ERROR (uiCode, SLICE_HEADER_IDR_PIC_ID_MAX, "idr_pic_id", GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, |
| 821 | 821 | ERR_INFO_INVALID_IDR_PIC_ID)); |
| 822 | − pSliceHead->uiIdrPicId = uiCode; /* uiIdrPicId */ | |
| 822 | + pSliceHead->uiIdrPicId = uiCode; /* uiIdrPicId */ | |
| 823 | 823 | #ifdef LONG_TERM_REF |
| 824 | − pCtx->uiCurIdrPicId = pSliceHead->uiIdrPicId; | |
| 824 | + pCtx->uiCurIdrPicId = pSliceHead->uiIdrPicId; | |
| 825 | 825 | #endif |
| 826 | 826 | } |
| 827 | 827 | |
| @@ -830,21 +830,21 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 2 unmodified lines | ||
| 830 | 830 | pSliceHead->iDeltaPicOrderCnt[1] = 0; |
| 831 | 831 | if (pSps->uiPocType == 0) { |
| 832 | 832 | WELS_READ_VERIFY (BsGetBits (pBs, pSps->iLog2MaxPocLsb, &uiCode)); //pic_order_cnt_lsb |
| 833 | − pSliceHead->iPicOrderCntLsb = uiCode; | |
| 833 | + pSliceHead->iPicOrderCntLsb = uiCode; | |
| 834 | 834 | if (pPps->bPicOrderPresentFlag && !pSliceHead->bFieldPicFlag) { |
| 835 | 835 | WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //delta_pic_order_cnt_bottom |
| 836 | − pSliceHead->iDeltaPicOrderCntBottom = iCode; | |
| 836 | + pSliceHead->iDeltaPicOrderCntBottom = iCode; | |
| 837 | 837 | } |
| 838 | 838 | } else if (pSps->uiPocType == 1 && !pSps->bDeltaPicOrderAlwaysZeroFlag) { |
| 839 | 839 | WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //delta_pic_order_cnt[ 0 ] |
| 840 | − pSliceHead->iDeltaPicOrderCnt[0] = iCode; | |
| 840 | + pSliceHead->iDeltaPicOrderCnt[0] = iCode; | |
| 841 | 841 | if (pPps->bPicOrderPresentFlag && !pSliceHead->bFieldPicFlag) { |
| 842 | 842 | WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //delta_pic_order_cnt[ 1 ] |
| 843 | 843 | pSliceHead->iDeltaPicOrderCnt[1] = iCode; |
| 844 | 844 | } |
| 845 | 845 | } |
| 846 | 846 | |
| 847 | − pSliceHead->iRedundantPicCnt = 0; | |
| 847 | + pSliceHead->iRedundantPicCnt = 0; | |
| 848 | 848 | if (pPps->bRedundantPicCntPresentFlag) { |
| 849 | 849 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //redundant_pic_cnt |
| 850 | 850 | // standard section 7.4.3, redundant_pic_cnt should be in range 0 to 127, inclusive. |
| @@ -863,12 +863,12 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 12 unmodified lines | ||
| 863 | 863 | } |
| 864 | 864 | if (bReadNumRefFlag) { |
| 865 | 865 | WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //num_ref_idx_active_override_flag |
| 866 | − pSliceHead->bNumRefIdxActiveOverrideFlag = !!uiCode; | |
| 866 | + pSliceHead->bNumRefIdxActiveOverrideFlag = !!uiCode; | |
| 867 | 867 | if (pSliceHead->bNumRefIdxActiveOverrideFlag) { |
| 868 | 868 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //num_ref_idx_l0_active_minus1 |
| 869 | 869 | WELS_CHECK_SE_UPPER_ERROR (uiCode, MAX_NUM_REF_IDX_L0_ACTIVE_MINUS1, "num_ref_idx_l0_active_minus1", |
| 870 | 870 | GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_NUM_REF_IDX_L0_ACTIVE_MINUS1)); |
| 871 | − pSliceHead->uiRefCount[0] = 1 + uiCode; | |
| 871 | + pSliceHead->uiRefCount[0] = 1 + uiCode; | |
| 872 | 872 | } |
| 873 | 873 | } |
| 874 | 874 | |
| @@ -894,9 +894,9 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 19 unmodified lines | ||
| 894 | 894 | |
| 895 | 895 | if (kbExtensionFlag) { |
| 896 | 896 | if (pNalHeaderExt->iNoInterLayerPredFlag || pNalHeaderExt->uiQualityId > 0) |
| 897 | − pSliceHeadExt->bBasePredWeightTableFlag = false; | |
| 897 | + pSliceHeadExt->bBasePredWeightTableFlag = false; | |
| 898 | 898 | else |
| 899 | − pSliceHeadExt->bBasePredWeightTableFlag = true; | |
| 899 | + pSliceHeadExt->bBasePredWeightTableFlag = true; | |
| 900 | 900 | } |
| 901 | 901 | |
| 902 | 902 | if (kpCurNal->sNalHeaderExt.sNalUnitHeader.uiNalRefIdc != 0) { |
| @@ -907,7 +907,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 4 unmodified lines | ||
| 907 | 907 | |
| 908 | 908 | if (kbExtensionFlag && !pSubsetSps->sSpsSvcExt.bSliceHeaderRestrictionFlag) { |
| 909 | 909 | WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //store_ref_base_pic_flag |
| 910 | − pSliceHeadExt->bStoreRefBasePicFlag = !!uiCode; | |
| 910 | + pSliceHeadExt->bStoreRefBasePicFlag = !!uiCode; | |
| 911 | 911 | if ((pNalHeaderExt->bUseRefBasePicFlag || pSliceHeadExt->bStoreRefBasePicFlag) && !bIdrFlag) { |
| 912 | 912 | WelsLog (pLogCtx, WELS_LOG_WARNING, |
| 913 | 913 | "ParseSliceHeaderSyntaxs(): bUseRefBasePicFlag or bStoreRefBasePicFlag = 1 not supported."); |
| @@ -948,7 +948,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 34 unmodified lines | ||
| 948 | 948 | pSliceHead->iSliceBetaOffset = 0; |
| 949 | 949 | if (pPps->bDeblockingFilterControlPresentFlag) { |
| 950 | 950 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //disable_deblocking_filter_idc |
| 951 | − pSliceHead->uiDisableDeblockingFilterIdc = uiCode; | |
| 951 | + pSliceHead->uiDisableDeblockingFilterIdc = uiCode; | |
| 952 | 952 | //refer to JVT-X201wcm1.doc G.7.4.3.4--2010.4.20 |
| 953 | 953 | if (pSliceHead->uiDisableDeblockingFilterIdc > 6) { |
| 954 | 954 | WelsLog (pLogCtx, WELS_LOG_WARNING, "disable_deblock_filter_idc (%d) out of range [0, 6]", |
| @@ -957,19 +957,19 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 2 unmodified lines | ||
| 957 | 957 | } |
| 958 | 958 | if (pSliceHead->uiDisableDeblockingFilterIdc != 1) { |
| 959 | 959 | WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //slice_alpha_c0_offset_div2 |
| 960 | − pSliceHead->iSliceAlphaC0Offset = iCode * 2; | |
| 960 | + pSliceHead->iSliceAlphaC0Offset = iCode * 2; | |
| 961 | 961 | WELS_CHECK_SE_BOTH_ERROR (pSliceHead->iSliceAlphaC0Offset, SLICE_HEADER_ALPHAC0_BETA_OFFSET_MIN, |
| 962 | 962 | SLICE_HEADER_ALPHAC0_BETA_OFFSET_MAX, "slice_alpha_c0_offset_div2 * 2", GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, |
| 963 | 963 | ERR_INFO_INVALID_SLICE_ALPHA_C0_OFFSET_DIV2)); |
| 964 | 964 | WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //slice_beta_offset_div2 |
| 965 | − pSliceHead->iSliceBetaOffset = iCode * 2; | |
| 965 | + pSliceHead->iSliceBetaOffset = iCode * 2; | |
| 966 | 966 | WELS_CHECK_SE_BOTH_ERROR (pSliceHead->iSliceBetaOffset, SLICE_HEADER_ALPHAC0_BETA_OFFSET_MIN, |
| 967 | 967 | SLICE_HEADER_ALPHAC0_BETA_OFFSET_MAX, "slice_beta_offset_div2 * 2", GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, |
| 968 | 968 | ERR_INFO_INVALID_SLICE_BETA_OFFSET_DIV2)); |
| 969 | 969 | } |
| 970 | 970 | } |
| 971 | 971 | |
| 972 | − bSgChangeCycleInvolved = (pPps->uiNumSliceGroups > 1 && pPps->uiSliceGroupMapType >= 3 | |
| 972 | + bSgChangeCycleInvolved = (pPps->uiNumSliceGroups > 1 && pPps->uiSliceGroupMapType >= 3 | |
| 973 | 973 | && pPps->uiSliceGroupMapType <= 5); |
| 974 | 974 | if (kbExtensionFlag && bSgChangeCycleInvolved) |
| 975 | 975 | bSgChangeCycleInvolved = (bSgChangeCycleInvolved && (uiQualityId == BASE_QUALITY_ID)); |
| @@ -978,24 +978,24 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 2 unmodified lines | ||
| 978 | 978 | const int32_t kiNumBits = (int32_t)WELS_CEIL (log (static_cast<double> (1 + pPps->uiPicSizeInMapUnits / |
| 979 | 979 | pPps->uiSliceGroupChangeRate))); |
| 980 | 980 | WELS_READ_VERIFY (BsGetBits (pBs, kiNumBits, &uiCode)); //lice_group_change_cycle |
| 981 | − pSliceHead->iSliceGroupChangeCycle = uiCode; | |
| 981 | + pSliceHead->iSliceGroupChangeCycle = uiCode; | |
| 982 | 982 | } else |
| 983 | − pSliceHead->iSliceGroupChangeCycle = 0; | |
| 983 | + pSliceHead->iSliceGroupChangeCycle = 0; | |
| 984 | 984 | } |
| 985 | 985 | |
| 986 | 986 | if (!kbExtensionFlag) { |
| 987 | 987 | FillDefaultSliceHeaderExt (pSliceHeadExt, pNalHeaderExt); |
| 988 | 988 | } else { |
| 989 | 989 | /* Extra syntax elements newly introduced */ |
| 990 | − pSliceHeadExt->pSubsetSps = pSubsetSps; | |
| 990 | + pSliceHeadExt->pSubsetSps = pSubsetSps; | |
| 991 | 991 | |
| 992 | 992 | if (!pNalHeaderExt->iNoInterLayerPredFlag && BASE_QUALITY_ID == uiQualityId) { |
| 993 | 993 | //the following should be deleted for CODE_CLEAN |
| 994 | 994 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //ref_layer_dq_id |
| 995 | − pSliceHeadExt->uiRefLayerDqId = uiCode; | |
| 995 | + pSliceHeadExt->uiRefLayerDqId = uiCode; | |
| 996 | 996 | if (pSubsetSps->sSpsSvcExt.bInterLayerDeblockingFilterCtrlPresentFlag) { |
| 997 | 997 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //disable_inter_layer_deblocking_filter_idc |
| 998 | − pSliceHeadExt->uiDisableInterLayerDeblockingFilterIdc = uiCode; | |
| 998 | + pSliceHeadExt->uiDisableInterLayerDeblockingFilterIdc = uiCode; | |
| 999 | 999 | //refer to JVT-X201wcm1.doc G.7.4.3.4--2010.4.20 |
| 1000 | 1000 | if (pSliceHeadExt->uiDisableInterLayerDeblockingFilterIdc > 6) { |
| 1001 | 1001 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "disable_inter_layer_deblock_filter_idc (%d) out of range [0, 6]", |
| @@ -1004,13 +1004,13 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 2 unmodified lines | ||
| 1004 | 1004 | } |
| 1005 | 1005 | if (pSliceHeadExt->uiDisableInterLayerDeblockingFilterIdc != 1) { |
| 1006 | 1006 | WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //inter_layer_slice_alpha_c0_offset_div2 |
| 1007 | − pSliceHeadExt->iInterLayerSliceAlphaC0Offset = iCode * 2; | |
| 1007 | + pSliceHeadExt->iInterLayerSliceAlphaC0Offset = iCode * 2; | |
| 1008 | 1008 | WELS_CHECK_SE_BOTH_ERROR (pSliceHeadExt->iInterLayerSliceAlphaC0Offset, |
| 1009 | 1009 | SLICE_HEADER_INTER_LAYER_ALPHAC0_BETA_OFFSET_MIN, SLICE_HEADER_INTER_LAYER_ALPHAC0_BETA_OFFSET_MAX, |
| 1010 | 1010 | "inter_layer_alpha_c0_offset_div2 * 2", GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, |
| 1011 | 1011 | ERR_INFO_INVALID_SLICE_ALPHA_C0_OFFSET_DIV2)); |
| 1012 | 1012 | WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //inter_layer_slice_beta_offset_div2 |
| 1013 | − pSliceHeadExt->iInterLayerSliceBetaOffset = iCode * 2; | |
| 1013 | + pSliceHeadExt->iInterLayerSliceBetaOffset = iCode * 2; | |
| 1014 | 1014 | WELS_CHECK_SE_BOTH_ERROR (pSliceHeadExt->iInterLayerSliceBetaOffset, SLICE_HEADER_INTER_LAYER_ALPHAC0_BETA_OFFSET_MIN, |
| 1015 | 1015 | SLICE_HEADER_INTER_LAYER_ALPHAC0_BETA_OFFSET_MAX, "inter_layer_slice_beta_offset_div2 * 2", |
| 1016 | 1016 | GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SLICE_BETA_OFFSET_DIV2)); |
| @@ -1021,7 +1021,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 4 unmodified lines | ||
| 1021 | 1021 | pSliceHeadExt->uiRefLayerChromaPhaseYPlus1 = pSubsetSps->sSpsSvcExt.uiSeqRefLayerChromaPhaseYPlus1; |
| 1022 | 1022 | |
| 1023 | 1023 | WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //constrained_intra_resampling_flag |
| 1024 | − pSliceHeadExt->bConstrainedIntraResamplingFlag = !!uiCode; | |
| 1024 | + pSliceHeadExt->bConstrainedIntraResamplingFlag = !!uiCode; | |
| 1025 | 1025 | |
| 1026 | 1026 | { |
| 1027 | 1027 | SPosOffset pos; |
| @@ -1038,7 +1038,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 10 unmodified lines | ||
| 1038 | 1038 | WelsLog (pLogCtx, WELS_LOG_WARNING, "MGS not supported."); |
| 1039 | 1039 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_MGS); |
| 1040 | 1040 | } else { |
| 1041 | − pSliceHeadExt->uiRefLayerDqId = (uint8_t) - 1; | |
| 1041 | + pSliceHeadExt->uiRefLayerDqId = (uint8_t) - 1; | |
| 1042 | 1042 | } |
| 1043 | 1043 | |
| 1044 | 1044 | pSliceHeadExt->bSliceSkipFlag = false; |
| @@ -1055,28 +1055,28 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 10 unmodified lines | ||
| 1055 | 1055 | |
| 1056 | 1056 | if (!pNalHeaderExt->iNoInterLayerPredFlag) { |
| 1057 | 1057 | WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //slice_skip_flag |
| 1058 | − pSliceHeadExt->bSliceSkipFlag = !!uiCode; | |
| 1058 | + pSliceHeadExt->bSliceSkipFlag = !!uiCode; | |
| 1059 | 1059 | if (pSliceHeadExt->bSliceSkipFlag) { |
| 1060 | 1060 | WelsLog (pLogCtx, WELS_LOG_WARNING, "bSliceSkipFlag == 1 not supported."); |
| 1061 | 1061 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_SLICESKIP); |
| 1062 | 1062 | } else { |
| 1063 | 1063 | WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //adaptive_base_mode_flag |
| 1064 | − pSliceHeadExt->bAdaptiveBaseModeFlag = !!uiCode; | |
| 1064 | + pSliceHeadExt->bAdaptiveBaseModeFlag = !!uiCode; | |
| 1065 | 1065 | if (!pSliceHeadExt->bAdaptiveBaseModeFlag) { |
| 1066 | 1066 | WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //default_base_mode_flag |
| 1067 | − pSliceHeadExt->bDefaultBaseModeFlag = !!uiCode; | |
| 1067 | + pSliceHeadExt->bDefaultBaseModeFlag = !!uiCode; | |
| 1068 | 1068 | } |
| 1069 | 1069 | if (!pSliceHeadExt->bDefaultBaseModeFlag) { |
| 1070 | 1070 | WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //adaptive_motion_prediction_flag |
| 1071 | − pSliceHeadExt->bAdaptiveMotionPredFlag = !!uiCode; | |
| 1071 | + pSliceHeadExt->bAdaptiveMotionPredFlag = !!uiCode; | |
| 1072 | 1072 | if (!pSliceHeadExt->bAdaptiveMotionPredFlag) { |
| 1073 | 1073 | WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //default_motion_prediction_flag |
| 1074 | − pSliceHeadExt->bDefaultMotionPredFlag = !!uiCode; | |
| 1074 | + pSliceHeadExt->bDefaultMotionPredFlag = !!uiCode; | |
| 1075 | 1075 | } |
| 1076 | 1076 | } |
| 1077 | 1077 | |
| 1078 | 1078 | WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //adaptive_residual_prediction_flag |
| 1079 | − pSliceHeadExt->bAdaptiveResidualPredFlag = !!uiCode; | |
| 1079 | + pSliceHeadExt->bAdaptiveResidualPredFlag = !!uiCode; | |
| 1080 | 1080 | if (!pSliceHeadExt->bAdaptiveResidualPredFlag) { |
| 1081 | 1081 | WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //default_residual_prediction_flag |
| 1082 | 1082 | pSliceHeadExt->bDefaultResidualPredFlag = !!uiCode; |
| @@ -1084,15 +1084,15 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 1 unmodified line | ||
| 1084 | 1084 | } |
| 1085 | 1085 | if (pSubsetSps->sSpsSvcExt.bAdaptiveTCoeffLevelPredFlag) { |
| 1086 | 1086 | WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //tcoeff_level_prediction_flag |
| 1087 | − pSliceHeadExt->bTCoeffLevelPredFlag = !!uiCode; | |
| 1087 | + pSliceHeadExt->bTCoeffLevelPredFlag = !!uiCode; | |
| 1088 | 1088 | } |
| 1089 | 1089 | } |
| 1090 | 1090 | |
| 1091 | 1091 | if (!pSubsetSps->sSpsSvcExt.bSliceHeaderRestrictionFlag) { |
| 1092 | 1092 | WELS_READ_VERIFY (BsGetBits (pBs, 4, &uiCode)); //scan_idx_start |
| 1093 | − pSliceHeadExt->uiScanIdxStart = uiCode; | |
| 1093 | + pSliceHeadExt->uiScanIdxStart = uiCode; | |
| 1094 | 1094 | WELS_READ_VERIFY (BsGetBits (pBs, 4, &uiCode)); //scan_idx_end |
| 1095 | − pSliceHeadExt->uiScanIdxEnd = uiCode; | |
| 1095 | + pSliceHeadExt->uiScanIdxEnd = uiCode; | |
| 1096 | 1096 | if (pSliceHeadExt->uiScanIdxStart != 0 || pSliceHeadExt->uiScanIdxEnd != 15) { |
| 1097 | 1097 | WelsLog (pLogCtx, WELS_LOG_WARNING, "uiScanIdxStart (%d) != 0 and uiScanIdxEnd (%d) !=15 not supported here", |
| 1098 | 1098 | pSliceHeadExt->uiScanIdxStart, pSliceHeadExt->uiScanIdxEnd); |
| @@ -1113,7 +1113,7 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 14 unmodified lines | ||
| 1113 | 1113 | * ppDst: succeeded VCL NAL based AVC (I/P Slice) |
| 1114 | 1114 | */ |
| 1115 | 1115 | bool PrefetchNalHeaderExtSyntax (PWelsDecoderContext pCtx, PNalUnit const kppDst, PNalUnit const kpSrc) { |
| 1116 | − PNalUnitHeaderExt pNalHdrExtD = NULL, pNalHdrExtS = NULL; | |
| 1116 | + PNalUnitHeaderExt pNalHdrExtD = NULL, pNalHdrExtS = NULL; | |
| 1117 | 1117 | PSliceHeaderExt pShExtD = NULL; |
| 1118 | 1118 | PPrefixNalUnit pPrefixS = NULL; |
| 1119 | 1119 | PSps pSps = NULL; |
| @@ -1502,7 +1502,7 @@ void ResetCurrentAccessUnit (PWelsDecoderContext pCtx) { · 382 unmodified lines | ||
| 1502 | 1502 | pCurAu->pNalUnitsList[iIdx] = t; |
| 1503 | 1503 | ++ iIdx; |
| 1504 | 1504 | } |
| 1505 | − pCurAu->uiActualUnitsNum = pCurAu->uiAvailUnitsNum = kuiLeftNum; | |
| 1505 | + pCurAu->uiActualUnitsNum = pCurAu->uiAvailUnitsNum = kuiLeftNum; | |
| 1506 | 1506 | } |
| 1507 | 1507 | } |
| 1508 | 1508 | |
| @@ -2098,22 +2098,22 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 589 unmodified lines | ||
| 2098 | 2098 | int16_t iLastIdD = -1, iLastIdQ = -1; |
| 2099 | 2099 | int16_t iCurrIdD = 0, iCurrIdQ = 0; |
| 2100 | 2100 | uint8_t uiNalRefIdc = 0; |
| 2101 | − bool bFreshSliceAvailable = | |
| 2102 | − true; // Another fresh slice comingup for given dq layer, for multiple slices in case of header parts of slices sometimes loss over error-prone channels, 8/14/2008 | |
| 2101 | + bool bFreshSliceAvailable = | |
| 2102 | + true; // Another fresh slice comingup for given dq layer, for multiple slices in case of header parts of slices sometimes loss over error-prone channels, 8/14/2008 | |
| 2103 | 2103 | |
| 2104 | 2104 | //update pCurDqLayer at the starting of AU decoding |
| 2105 | 2105 | if (pCtx->bInitialDqLayersMem) { |
| 2106 | − pCtx->pCurDqLayer = pCtx->pDqLayersList[0]; | |
| 2106 | + pCtx->pCurDqLayer = pCtx->pDqLayersList[0]; | |
| 2107 | 2107 | } |
| 2108 | 2108 | |
| 2109 | 2109 | InitCurDqLayerData (pCtx, pCtx->pCurDqLayer); |
| 2110 | 2110 | |
| 2111 | 2111 | pNalCur = pCurAu->pNalUnitsList[iIdx]; |
| 2112 | 2112 | while (iIdx <= iEndIdx) { |
| 2113 | − PDqLayer dq_cur = pCtx->pCurDqLayer; | |
| 2113 | + PDqLayer dq_cur = pCtx->pCurDqLayer; | |
| 2114 | 2114 | SLayerInfo pLayerInfo; |
| 2115 | − PSliceHeaderExt pShExt = NULL; | |
| 2116 | − PSliceHeader pSh = NULL; | |
| 2115 | + PSliceHeaderExt pShExt = NULL; | |
| 2116 | + PSliceHeader pSh = NULL; | |
| 2117 | 2117 | |
| 2118 | 2118 | if (pCtx->pDec == NULL) { |
| 2119 | 2119 | pCtx->pDec = PrefetchPic (pCtx->pPicBuff[0]); |
| @@ -2191,8 +2191,8 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 71 unmodified lines | ||
| 2191 | 2191 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_FMO_INIT_FAIL); |
| 2192 | 2192 | } |
| 2193 | 2193 | |
| 2194 | − bFreshSliceAvailable = (iCurrIdD != iLastIdD | |
| 2195 | − || iCurrIdQ != iLastIdQ); // do not need condition of (first_mb == 0) due multiple slices might be disorder | |
| 2194 | + bFreshSliceAvailable = (iCurrIdD != iLastIdD | |
| 2195 | + || iCurrIdQ != iLastIdQ); // do not need condition of (first_mb == 0) due multiple slices might be disorder | |
| 2196 | 2196 | |
| 2197 | 2197 | WelsDqLayerDecodeStart (pCtx, pNalCur, pLayerInfo.pSps, pLayerInfo.pPps); |
| 2198 | 2198 | |
| @@ -2279,15 +2279,15 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 80 unmodified lines | ||
| 2279 | 2279 | fprintf (stderr, "cur_frame : %d\tiCurrIdD : %d\n ", |
| 2280 | 2280 | dq_cur->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader.iFrameNum, iCurrIdD); |
| 2281 | 2281 | #endif//#if !CODEC_FOR_TESTBED |
| 2282 | − iLastIdD = iCurrIdD; | |
| 2283 | − iLastIdQ = iCurrIdQ; | |
| 2282 | + iLastIdD = iCurrIdD; | |
| 2283 | + iLastIdQ = iCurrIdQ; | |
| 2284 | 2284 | |
| 2285 | 2285 | //pNalUnitsList overflow. |
| 2286 | 2286 | ++ iIdx; |
| 2287 | 2287 | if (iIdx <= iEndIdx) { |
| 2288 | − pNalCur = pCurAu->pNalUnitsList[iIdx]; | |
| 2288 | + pNalCur = pCurAu->pNalUnitsList[iIdx]; | |
| 2289 | 2289 | } else { |
| 2290 | − pNalCur = NULL; | |
| 2290 | + pNalCur = NULL; | |
| 2291 | 2291 | } |
| 2292 | 2292 | |
| 2293 | 2293 | if (pNalCur == NULL || |
| @@ -2346,7 +2346,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 52 unmodified lines | ||
| 2346 | 2346 | |
| 2347 | 2347 | // need update frame_num due current frame is well decoded |
| 2348 | 2348 | if (pCurAu->pNalUnitsList[pCurAu->uiStartPos]->sNalHeaderExt.sNalUnitHeader.uiNalRefIdc > 0) |
| 2349 | − pCtx->iPrevFrameNum = pSh->iFrameNum; | |
| 2349 | + pCtx->iPrevFrameNum = pSh->iFrameNum; | |
| 2350 | 2350 | if (pCtx->bLastHasMmco5) |
| 2351 | 2351 | pCtx->iPrevFrameNum = 0; |
| 2352 | 2352 | } |