History

Remove tabs where a simple space is just enough

Martin Storsjö committed 11 years ago

Commit ca51ee01 parent 51efa5754 files · +769 −772Browse files

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

Unified · Split

codec/decoder/core/src/au_parser.cpp+78−78
@@ -110,7 +110,7 @@ uint8_t* ParseNalHeader (PWelsDecoderContext pCtx, SNalUnitHeader* pNalUnitHeade · 109 unmodified lines
110110 int32_t iNalSize = iSrcRbspLen;
111111 PBitStringAux pBs = NULL;
112112 bool bExtensionFlag = false;
113− int32_t iErr = ERR_NONE;
113+ int32_t iErr = ERR_NONE;
114114 int32_t iBitSize = 0;
115115 SDataBuffer* pSavedData = &pCtx->sSavedData;
116116 SLogContext* pLogCtx = & (pCtx->sLogCtx);
@@ -132,7 +132,7 @@ uint8_t* ParseNalHeader (PWelsDecoderContext pCtx, SNalUnitHeader* pNalUnitHeade · 15 unmodified lines
132132 }
133133 }
134134
135− pNalUnitHeader->uiForbiddenZeroBit = (uint8_t) (pNal[0] >> 7); // uiForbiddenZeroBit
135+ pNalUnitHeader->uiForbiddenZeroBit = (uint8_t) (pNal[0] >> 7); // uiForbiddenZeroBit
136136 if (pNalUnitHeader->uiForbiddenZeroBit) { //2010.4.14
137137 pCtx->iErrorCode |= dsBitstreamError;
138138 return NULL; //uiForbiddenZeroBit should always equal to 0
@@ -155,7 +155,7 @@ uint8_t* ParseNalHeader (PWelsDecoderContext pCtx, SNalUnitHeader* pNalUnitHeade · 16 unmodified lines
155155 pCtx->iSpsErrorIgnored++;
156156 }
157157 pCtx->sDecoderStatistics.iSpsNoExistNalNum++;
158− pCtx->iErrorCode = dsNoParamSets;
158+ pCtx->iErrorCode = dsNoParamSets;
159159 return NULL;
160160 }
161161 pCtx->iSpsErrorIgnored = 0;
@@ -169,7 +169,7 @@ uint8_t* ParseNalHeader (PWelsDecoderContext pCtx, SNalUnitHeader* pNalUnitHeade · 7 unmodified lines
169169 pCtx->iPpsErrorIgnored++;
170170 }
171171 pCtx->sDecoderStatistics.iPpsNoExistNalNum++;
172− pCtx->iErrorCode = dsNoParamSets;
172+ pCtx->iErrorCode = dsNoParamSets;
173173 return NULL;
174174 }
175175 pCtx->iPpsErrorIgnored = 0;
@@ -184,7 +184,7 @@ uint8_t* ParseNalHeader (PWelsDecoderContext pCtx, SNalUnitHeader* pNalUnitHeade · 8 unmodified lines
184184 pCtx->iSubSpsErrorIgnored++;
185185 }
186186 pCtx->sDecoderStatistics.iSubSpsNoExistNalNum++;
187− pCtx->iErrorCode |= dsNoParamSets;
187+ pCtx->iErrorCode |= dsNoParamSets;
188188 return NULL;
189189 }
190190 pCtx->iSubSpsErrorIgnored = 0;
@@ -203,7 +203,7 @@ uint8_t* ParseNalHeader (PWelsDecoderContext pCtx, SNalUnitHeader* pNalUnitHeade · 12 unmodified lines
203203 pCurNal->uiTimeStamp = pCtx->uiTimeStamp;
204204
205205 if (iNalSize < NAL_UNIT_HEADER_EXT_SIZE) {
206− PAccessUnit pCurAu = pCtx->pAccessUnitList;
206+ PAccessUnit pCurAu = pCtx->pAccessUnitList;
207207 uint32_t uiAvailNalNum = pCurAu->uiAvailUnitsNum;
208208
209209 if (uiAvailNalNum > 0) {
@@ -222,7 +222,7 @@ uint8_t* ParseNalHeader (PWelsDecoderContext pCtx, SNalUnitHeader* pNalUnitHeade · 12 unmodified lines
222222 WelsLog (pLogCtx, WELS_LOG_WARNING,
223223 "ParseNalHeader() in Prefix Nal Unit:uiQualityId (%d) != 0, bUseRefBasePicFlag (%d) != 0, not supported!",
224224 pCurNal->sNalHeaderExt.uiQualityId, pCurNal->sNalHeaderExt.bUseRefBasePicFlag);
225− PAccessUnit pCurAu = pCtx->pAccessUnitList;
225+ PAccessUnit pCurAu = pCtx->pAccessUnitList;
226226 uint32_t uiAvailNalNum = pCurAu->uiAvailUnitsNum;
227227
228228 if (uiAvailNalNum > 0) {
@@ -250,7 +250,7 @@ uint8_t* ParseNalHeader (PWelsDecoderContext pCtx, SNalUnitHeader* pNalUnitHeade · 21 unmodified lines
250250 iErr = DecInitBits (pBs, pNal, iBitSize);
251251 if (iErr) {
252252 WelsLog (pLogCtx, WELS_LOG_ERROR, "NAL_UNIT_PREFIX: DecInitBits() fail due invalid access.");
253− pCtx->iErrorCode |= dsBitstreamError;
253+ pCtx->iErrorCode |= dsBitstreamError;
254254 return NULL;
255255 }
256256 ParsePrefixNalUnit (pCtx, pBs);
@@ -262,12 +262,12 @@ uint8_t* ParseNalHeader (PWelsDecoderContext pCtx, SNalUnitHeader* pNalUnitHeade · 5 unmodified lines
262262 bExtensionFlag = true;
263263 case NAL_UNIT_CODED_SLICE:
264264 case NAL_UNIT_CODED_SLICE_IDR: {
265− PAccessUnit pCurAu = NULL;
265+ PAccessUnit pCurAu = NULL;
266266 uint32_t uiAvailNalNum;
267267 pCurNal = MemGetNextNal (&pCtx->pAccessUnitList);
268268 if (NULL == pCurNal) {
269269 WelsLog (pLogCtx, WELS_LOG_ERROR, "MemGetNextNal() fail due out of memory.");
270− pCtx->iErrorCode |= dsOutOfMemory;
270+ pCtx->iErrorCode |= dsOutOfMemory;
271271 return NULL;
272272 }
273273 pCurNal->uiTimeStamp = pCtx->uiTimeStamp;
@@ -386,7 +386,7 @@ uint8_t* ParseNalHeader (PWelsDecoderContext pCtx, SNalUnitHeader* pNalUnitHeade · 112 unmodified lines
386386 }
387387 }
388388 WelsLog (pLogCtx, WELS_LOG_ERROR, "NAL_UNIT_CODED_SLICE: DecInitBits() fail due invalid access.");
389− pCtx->iErrorCode |= dsBitstreamError;
389+ pCtx->iErrorCode |= dsBitstreamError;
390390 return NULL;
391391 }
392392 iErr = ParseSliceHeaderSyntaxs (pCtx, pBs, bExtensionFlag);
@@ -585,7 +585,7 @@ int32_t ParseNonVclNal (PWelsDecoderContext pCtx, uint8_t* pRbsp, const int32_t · 192 unmodified lines
585585 if (kiSrcLen <= 0)
586586 return iErr;
587587
588− pBs = &pCtx->sBs; // SBitStringAux instance for non VCL NALs decoding
588+ pBs = &pCtx->sBs; // SBitStringAux instance for non VCL NALs decoding
589589 iBitSize = (kiSrcLen << 3) - BsGetTrailingBits (pRbsp + kiSrcLen - 1); // convert into bit
590590 eNalType = pCtx->sCurNalHead.eNalUnitType;
591591
@@ -633,7 +633,7 @@ int32_t ParseNonVclNal (PWelsDecoderContext pCtx, uint8_t* pRbsp, const int32_t · 41 unmodified lines
633633 return iErr;
634634 }
635635
636− pCtx->bPpsExistAheadFlag = true;
636+ pCtx->bPpsExistAheadFlag = true;
637637
638638 break;
639639
@@ -667,7 +667,7 @@ int32_t ParseRefBasePicMarking (PBitStringAux pBs, PRefBasePicMarking pRefBasePi · 27 unmodified lines
667667 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //MMCO_base
668668 const uint32_t kuiMmco = uiCode;
669669
670− pRefBasePicMarking->mmco_base[iIdx].uiMmcoType = kuiMmco;
670+ pRefBasePicMarking->mmco_base[iIdx].uiMmcoType = kuiMmco;
671671
672672 if (kuiMmco == MMCO_END)
673673 break;
@@ -678,7 +678,7 @@ int32_t ParseRefBasePicMarking (PBitStringAux pBs, PRefBasePicMarking pRefBasePi · 4 unmodified lines
678678 pRefBasePicMarking->mmco_base[iIdx].iShortFrameNum = 0;
679679 } else if (kuiMmco == MMCO_LONG2UNUSED) {
680680 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //long_term_base_pic_num
681− pRefBasePicMarking->mmco_base[iIdx].uiLongTermPicNum = uiCode;
681+ pRefBasePicMarking->mmco_base[iIdx].uiLongTermPicNum = uiCode;
682682 }
683683 ++ iIdx;
684684 } while (iIdx < MAX_MMCO_COUNT);
@@ -694,7 +694,7 @@ int32_t ParsePrefixNalUnit (PWelsDecoderContext pCtx, PBitStringAux pBs) { · 9 unmodified lines
694694 PNalUnitHeaderExt head_ext = &pCurNal->sNalHeaderExt;
695695 PPrefixNalUnit sPrefixNal = &pCurNal->sNalData.sPrefixNal;
696696 WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //store_ref_base_pic_flag
697− sPrefixNal->bStoreRefBasePicFlag = !!uiCode;
697+ sPrefixNal->bStoreRefBasePicFlag = !!uiCode;
698698 if ((head_ext->bUseRefBasePicFlag || sPrefixNal->bStoreRefBasePicFlag) && !head_ext->bIdrFlag) {
699699 WELS_READ_VERIFY (ParseRefBasePicMarking (pBs, &sPrefixNal->sRefPicBaseMarking));
700700 }
@@ -702,7 +702,7 @@ int32_t ParsePrefixNalUnit (PWelsDecoderContext pCtx, PBitStringAux pBs) { · 1 unmodified line
702702 sPrefixNal->bPrefixNalUnitAdditionalExtFlag = !!uiCode;
703703 if (sPrefixNal->bPrefixNalUnitAdditionalExtFlag) {
704704 WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //additional_prefix_nal_unit_extension_data_flag
705− sPrefixNal->bPrefixNalUnitExtFlag = !!uiCode;
705+ sPrefixNal->bPrefixNalUnitExtFlag = !!uiCode;
706706 }
707707 }
708708 return ERR_NONE;
@@ -721,16 +721,16 @@ int32_t ParsePrefixNalUnit (PWelsDecoderContext pCtx, PBitStringAux pBs) { · 12 unmodified lines
721721
722722
723723 int32_t DecodeSpsSvcExt (PWelsDecoderContext pCtx, PSubsetSps pSpsExt, PBitStringAux pBs) {
724− PSpsSvcExt pExt = NULL;
724+ PSpsSvcExt pExt = NULL;
725725 uint32_t uiCode;
726726 int32_t iCode;
727727
728− pExt = &pSpsExt->sSpsSvcExt;
728+ pExt = &pSpsExt->sSpsSvcExt;
729729
730730 WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //inter_layer_deblocking_filter_control_present_flag
731− pExt->bInterLayerDeblockingFilterCtrlPresentFlag = !!uiCode;
731+ pExt->bInterLayerDeblockingFilterCtrlPresentFlag = !!uiCode;
732732 WELS_READ_VERIFY (BsGetBits (pBs, 2, &uiCode)); //extended_spatial_scalability_idc
733− pExt->uiExtendedSpatialScalability = uiCode;
733+ pExt->uiExtendedSpatialScalability = uiCode;
734734 if (pExt->uiExtendedSpatialScalability > 2) {
735735 WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
736736 "DecodeSpsSvcExt():extended_spatial_scalability (%d) != 0, ESS not supported!",
@@ -738,14 +738,14 @@ int32_t DecodeSpsSvcExt (PWelsDecoderContext pCtx, PSubsetSps pSpsExt, PBitStrin · 1 unmodified line
738738 return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_ESS);
739739 }
740740
741− pExt->uiChromaPhaseXPlus1Flag =
742− 0; // FIXME: Incoherent with JVT X201 standard (= 1), but conformance to JSVM (= 0) implementation.
743− pExt->uiChromaPhaseYPlus1 = 1;
741+ pExt->uiChromaPhaseXPlus1Flag =
742+ 0; // FIXME: Incoherent with JVT X201 standard (= 1), but conformance to JSVM (= 0) implementation.
743+ pExt->uiChromaPhaseYPlus1 = 1;
744744
745745 WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //chroma_phase_x_plus1_flag
746− pExt->uiChromaPhaseXPlus1Flag = uiCode;
746+ pExt->uiChromaPhaseXPlus1Flag = uiCode;
747747 WELS_READ_VERIFY (BsGetBits (pBs, 2, &uiCode)); //chroma_phase_y_plus1
748− pExt->uiChromaPhaseYPlus1 = uiCode;
748+ pExt->uiChromaPhaseYPlus1 = uiCode;
749749
750750 pExt->uiSeqRefLayerChromaPhaseXPlus1Flag = pExt->uiChromaPhaseXPlus1Flag;
751751 pExt->uiSeqRefLayerChromaPhaseYPlus1 = pExt->uiChromaPhaseYPlus1;
@@ -754,20 +754,20 @@ int32_t DecodeSpsSvcExt (PWelsDecoderContext pCtx, PSubsetSps pSpsExt, PBitStrin · 2 unmodified lines
754754 if (pExt->uiExtendedSpatialScalability == 1) {
755755 SPosOffset* const kpPos = &pExt->sSeqScaledRefLayer;
756756 WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //seq_ref_layer_chroma_phase_x_plus1_flag
757− pExt->uiSeqRefLayerChromaPhaseXPlus1Flag = uiCode;
757+ pExt->uiSeqRefLayerChromaPhaseXPlus1Flag = uiCode;
758758 WELS_READ_VERIFY (BsGetBits (pBs, 2, &uiCode)); //seq_ref_layer_chroma_phase_y_plus1
759− pExt->uiSeqRefLayerChromaPhaseYPlus1 = uiCode;
759+ pExt->uiSeqRefLayerChromaPhaseYPlus1 = uiCode;
760760
761761 WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //seq_scaled_ref_layer_left_offset
762− kpPos->iLeftOffset = iCode;
762+ kpPos->iLeftOffset = iCode;
763763 WELS_CHECK_SE_BOTH_WARNING (kpPos->iLeftOffset, SUBSET_SPS_SEQ_SCALED_REF_LAYER_LEFT_OFFSET_MIN,
764764 SUBSET_SPS_SEQ_SCALED_REF_LAYER_LEFT_OFFSET_MAX, "seq_scaled_ref_layer_left_offset");
765765 WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //seq_scaled_ref_layer_top_offset
766− kpPos->iTopOffset = iCode;
766+ kpPos->iTopOffset = iCode;
767767 WELS_CHECK_SE_BOTH_WARNING (kpPos->iTopOffset, SUBSET_SPS_SEQ_SCALED_REF_LAYER_TOP_OFFSET_MIN,
768768 SUBSET_SPS_SEQ_SCALED_REF_LAYER_TOP_OFFSET_MAX, "seq_scaled_ref_layer_top_offset");
769769 WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //seq_scaled_ref_layer_right_offset
770− kpPos->iRightOffset = iCode;
770+ kpPos->iRightOffset = iCode;
771771 WELS_CHECK_SE_BOTH_WARNING (kpPos->iRightOffset, SUBSET_SPS_SEQ_SCALED_REF_LAYER_RIGHT_OFFSET_MIN,
772772 SUBSET_SPS_SEQ_SCALED_REF_LAYER_RIGHT_OFFSET_MAX, "seq_scaled_ref_layer_right_offset");
773773 WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //seq_scaled_ref_layer_bottom_offset
@@ -777,14 +777,14 @@ int32_t DecodeSpsSvcExt (PWelsDecoderContext pCtx, PSubsetSps pSpsExt, PBitStrin · 3 unmodified lines
777777 }
778778
779779 WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //seq_tcoeff_level_prediction_flag
780− pExt->bSeqTCoeffLevelPredFlag = !!uiCode;
781− pExt->bAdaptiveTCoeffLevelPredFlag = false;
780+ pExt->bSeqTCoeffLevelPredFlag = !!uiCode;
781+ pExt->bAdaptiveTCoeffLevelPredFlag = false;
782782 if (pExt->bSeqTCoeffLevelPredFlag) {
783783 WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //adaptive_tcoeff_level_prediction_flag
784− pExt->bAdaptiveTCoeffLevelPredFlag = !!uiCode;
784+ pExt->bAdaptiveTCoeffLevelPredFlag = !!uiCode;
785785 }
786786 WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //slice_header_restriction_flag
787− pExt->bSliceHeaderRestrictionFlag = !!uiCode;
787+ pExt->bSliceHeaderRestrictionFlag = !!uiCode;
788788
789789
790790
@@ -903,10 +903,10 @@ bool CheckSpsActive (PWelsDecoderContext pCtx, PSps pSps, bool bUseSubsetFlag) { · 112 unmodified lines
903903
904904 int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicWidth, int32_t* pPicHeight,
905905 uint8_t* pSrcNal, const int32_t kSrcNalLen) {
906− PBitStringAux pBs = pBsAux;
906+ PBitStringAux pBs = pBsAux;
907907 SSubsetSps sTempSubsetSps;
908− PSps pSps = NULL;
909− PSubsetSps pSubsetSps = NULL;
908+ PSps pSps = NULL;
909+ PSubsetSps pSubsetSps = NULL;
910910 SNalUnitHeader* pNalHead = &pCtx->sCurNalHead;
911911 ProfileIdc uiProfileIdc;
912912 uint8_t uiLevelIdc;
@@ -917,28 +917,28 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 4 unmodified lines
917917 const bool kbUseSubsetFlag = IS_SUBSET_SPS_NAL (pNalHead->eNalUnitType);
918918
919919 WELS_READ_VERIFY (BsGetBits (pBs, 8, &uiCode)); //profile_idc
920− uiProfileIdc = uiCode;
920+ uiProfileIdc = uiCode;
921921 WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //constraint_set0_flag
922− bConstraintSetFlags[0] = !!uiCode;
922+ bConstraintSetFlags[0] = !!uiCode;
923923 WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //constraint_set1_flag
924− bConstraintSetFlags[1] = !!uiCode;
924+ bConstraintSetFlags[1] = !!uiCode;
925925 WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //constraint_set2_flag
926− bConstraintSetFlags[2] = !!uiCode;
926+ bConstraintSetFlags[2] = !!uiCode;
927927 WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //constraint_set3_flag
928− bConstraintSetFlags[3] = !!uiCode;
928+ bConstraintSetFlags[3] = !!uiCode;
929929 WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //constraint_set4_flag
930− bConstraintSetFlags[4] = !!uiCode;
930+ bConstraintSetFlags[4] = !!uiCode;
931931 WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //constraint_set5_flag
932− bConstraintSetFlags[5] = !!uiCode;
932+ bConstraintSetFlags[5] = !!uiCode;
933933 WELS_READ_VERIFY (BsGetBits (pBs, 2, &uiCode)); // reserved_zero_2bits, equal to 0
934934 WELS_READ_VERIFY (BsGetBits (pBs, 8, &uiCode)); // level_idc
935− uiLevelIdc = uiCode;
935+ uiLevelIdc = uiCode;
936936 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //seq_parameter_set_id
937937 if (uiCode >= MAX_SPS_COUNT) { // Modified to check invalid negative iSpsId, 12/1/2009
938938 WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, " iSpsId is out of range! \n");
939939 return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_SPS_ID_OVERFLOW);
940940 }
941− iSpsId = uiCode;
941+ iSpsId = uiCode;
942942 pSubsetSps = &sTempSubsetSps;
943943 pSps = &sTempSubsetSps.sSps;
944944 memset (pSubsetSps, 0, sizeof (SSubsetSps));
@@ -978,19 +978,19 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 33 unmodified lines
978978 WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): bit_depth_luma (%d) Only 8 bit supported.", 8 + uiCode);
979979 return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_NON_BASELINE);
980980 }
981− pSps->uiBitDepthLuma = 8;
981+ pSps->uiBitDepthLuma = 8;
982982
983983 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //bit_depth_chroma_minus8
984984 if (uiCode != 0) {
985985 WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): bit_depth_chroma (%d). Only 8 bit supported.", 8 + uiCode);
986986 return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_NON_BASELINE);
987987 }
988− pSps->uiBitDepthChroma = 8;
988+ pSps->uiBitDepthChroma = 8;
989989
990990 WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //qpprime_y_zero_transform_bypass_flag
991− pSps->bQpPrimeYZeroTransfBypassFlag = !!uiCode;
991+ pSps->bQpPrimeYZeroTransfBypassFlag = !!uiCode;
992992 WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //seq_scaling_matrix_present_flag
993− pSps->bSeqScalingMatrixPresentFlag = !!uiCode;
993+ pSps->bSeqScalingMatrixPresentFlag = !!uiCode;
994994
995995 if (pSps->bSeqScalingMatrixPresentFlag) {
996996 WELS_READ_VERIFY (ParseScalingList (pSps, pBs, 0, pSps->bSeqScalingListPresentFlag, pSps->iScalingList4x4,
@@ -1000,33 +1000,33 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 3 unmodified lines
10001000 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //log2_max_frame_num_minus4
10011001 WELS_CHECK_SE_UPPER_ERROR (uiCode, SPS_LOG2_MAX_FRAME_NUM_MINUS4_MAX, "log2_max_frame_num_minus4",
10021002 GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_LOG2_MAX_FRAME_NUM_MINUS4));
1003− pSps->uiLog2MaxFrameNum = LOG2_MAX_FRAME_NUM_OFFSET + uiCode;
1003+ pSps->uiLog2MaxFrameNum = LOG2_MAX_FRAME_NUM_OFFSET + uiCode;
10041004 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //pic_order_cnt_type
1005− pSps->uiPocType = uiCode;
1005+ pSps->uiPocType = uiCode;
10061006
10071007 if (0 == pSps->uiPocType) {
10081008 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //log2_max_pic_order_cnt_lsb_minus4
10091009 // log2_max_pic_order_cnt_lsb_minus4 should be in range 0 to 12, inclusive. (sec. 7.4.3)
10101010 WELS_CHECK_SE_UPPER_ERROR (uiCode, SPS_LOG2_MAX_PIC_ORDER_CNT_LSB_MINUS4_MAX, "log2_max_pic_order_cnt_lsb_minus4",
10111011 GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_LOG2_MAX_PIC_ORDER_CNT_LSB_MINUS4));
1012− pSps->iLog2MaxPocLsb = LOG2_MAX_PIC_ORDER_CNT_LSB_OFFSET + uiCode; // log2_max_pic_order_cnt_lsb_minus4
1012+ pSps->iLog2MaxPocLsb = LOG2_MAX_PIC_ORDER_CNT_LSB_OFFSET + uiCode; // log2_max_pic_order_cnt_lsb_minus4
10131013
10141014 } else if (1 == pSps->uiPocType) {
10151015 int32_t i;
10161016 WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //delta_pic_order_always_zero_flag
1017− pSps->bDeltaPicOrderAlwaysZeroFlag = !!uiCode;
1017+ pSps->bDeltaPicOrderAlwaysZeroFlag = !!uiCode;
10181018 WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //offset_for_non_ref_pic
1019− pSps->iOffsetForNonRefPic = iCode;
1019+ pSps->iOffsetForNonRefPic = iCode;
10201020 WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //offset_for_top_to_bottom_field
1021− pSps->iOffsetForTopToBottomField = iCode;
1021+ pSps->iOffsetForTopToBottomField = iCode;
10221022 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //num_ref_frames_in_pic_order_cnt_cycle
10231023 WELS_CHECK_SE_UPPER_ERROR (uiCode, SPS_NUM_REF_FRAMES_IN_PIC_ORDER_CNT_CYCLE_MAX,
10241024 "num_ref_frames_in_pic_order_cnt_cycle", GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS,
10251025 ERR_INFO_INVALID_NUM_REF_FRAME_IN_PIC_ORDER_CNT_CYCLE));
1026− pSps->iNumRefFramesInPocCycle = uiCode;
1026+ pSps->iNumRefFramesInPocCycle = uiCode;
10271027 for (i = 0; i < pSps->iNumRefFramesInPocCycle; i++) {
10281028 WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //offset_for_ref_frame[ i ]
1029− pSps->iOffsetForRefFrame[ i ] = iCode;
1029+ pSps->iOffsetForRefFrame[ i ] = iCode;
10301030 }
10311031 }
10321032 if (pSps->uiPocType > 2) {
@@ -1035,11 +1035,11 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 2 unmodified lines
10351035 }
10361036
10371037 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //max_num_ref_frames
1038− pSps->iNumRefFrames = uiCode;
1038+ pSps->iNumRefFrames = uiCode;
10391039 WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //gaps_in_frame_num_value_allowed_flag
1040− pSps->bGapsInFrameNumValueAllowedFlag = !!uiCode;
1040+ pSps->bGapsInFrameNumValueAllowedFlag = !!uiCode;
10411041 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //pic_width_in_mbs_minus1
1042− pSps->iMbWidth = PIC_WIDTH_IN_MBS_OFFSET + uiCode;
1042+ pSps->iMbWidth = PIC_WIDTH_IN_MBS_OFFSET + uiCode;
10431043 if (pSps->iMbWidth > MAX_MB_SIZE) {
10441044 WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "pic_width_in_mbs(%d) exceeds the maximum allowed!", pSps->iMbWidth);
10451045 return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_MAX_MB_SIZE);
@@ -1048,7 +1048,7 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 2 unmodified lines
10481048 WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, " the pic_width_in_mbs exceeds the level limits!");
10491049 }
10501050 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //pic_height_in_map_units_minus1
1051− pSps->iMbHeight = PIC_HEIGHT_IN_MAP_UNITS_OFFSET + uiCode;
1051+ pSps->iMbHeight = PIC_HEIGHT_IN_MAP_UNITS_OFFSET + uiCode;
10521052 if (pSps->iMbHeight > MAX_MB_SIZE) {
10531053 WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "pic_height_in_mbs(%d) exceeds the maximum allowed!", pSps->iMbHeight);
10541054 return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_MAX_MB_SIZE);
@@ -1060,7 +1060,7 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 5 unmodified lines
10601060 if (uiTmp32 > (uint32_t)pSLevelLimits->uiMaxFS) {
10611061 WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, " the total count of mb exceeds the level limits!");
10621062 }
1063− pSps->uiTotalMbCount = uiTmp32;
1063+ pSps->uiTotalMbCount = uiTmp32;
10641064 WELS_CHECK_SE_UPPER_ERROR (pSps->iNumRefFrames, SPS_MAX_NUM_REF_FRAMES_MAX, "max_num_ref_frames",
10651065 GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_MAX_NUM_REF_FRAMES));
10661066 // here we check max_num_ref_frames
@@ -1072,29 +1072,29 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 5 unmodified lines
10721072 WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, " max_num_ref_frames exceeds level limits!");
10731073 }
10741074 WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //frame_mbs_only_flag
1075− pSps->bFrameMbsOnlyFlag = !!uiCode;
1075+ pSps->bFrameMbsOnlyFlag = !!uiCode;
10761076 if (!pSps->bFrameMbsOnlyFlag) {
10771077 WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): frame_mbs_only_flag (%d) not supported.",
10781078 pSps->bFrameMbsOnlyFlag);
10791079 return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_MBAFF);
10801080 }
10811081 WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //direct_8x8_inference_flag
1082− pSps->bDirect8x8InferenceFlag = !!uiCode;
1082+ pSps->bDirect8x8InferenceFlag = !!uiCode;
10831083 WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //frame_cropping_flag
1084− pSps->bFrameCroppingFlag = !!uiCode;
1084+ pSps->bFrameCroppingFlag = !!uiCode;
10851085 if (pSps->bFrameCroppingFlag) {
10861086 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //frame_crop_left_offset
1087− pSps->sFrameCrop.iLeftOffset = uiCode;
1087+ pSps->sFrameCrop.iLeftOffset = uiCode;
10881088 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //frame_crop_right_offset
1089− pSps->sFrameCrop.iRightOffset = uiCode;
1089+ pSps->sFrameCrop.iRightOffset = uiCode;
10901090 if ((pSps->sFrameCrop.iLeftOffset + pSps->sFrameCrop.iRightOffset) > ((int32_t)pSps->iMbWidth * 16 / 2)) {
10911091 WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "frame_crop_left_offset + frame_crop_right_offset exceeds limits!");
10921092 return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_CROPPING_DATA);
10931093 }
10941094 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //frame_crop_top_offset
1095− pSps->sFrameCrop.iTopOffset = uiCode;
1095+ pSps->sFrameCrop.iTopOffset = uiCode;
10961096 WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //frame_crop_bottom_offset
1097− pSps->sFrameCrop.iBottomOffset = uiCode;
1097+ pSps->sFrameCrop.iBottomOffset = uiCode;
10981098 if ((pSps->sFrameCrop.iTopOffset + pSps->sFrameCrop.iBottomOffset) > ((int32_t)pSps->iMbHeight * 16 / 2)) {
10991099 WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "frame_crop_top_offset + frame_crop_right_offset exceeds limits!");
11001100 return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_CROPPING_DATA);
@@ -1106,7 +1106,7 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 5 unmodified lines
11061106 pSps->sFrameCrop.iBottomOffset = 0; // frame_crop_bottom_offset
11071107 }
11081108 WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //vui_parameters_present_flag
1109− pSps->bVuiParamPresentFlag = !!uiCode;
1109+ pSps->bVuiParamPresentFlag = !!uiCode;
11101110
11111111 if (pCtx->bParseOnly) {
11121112 if (kSrcNalLen >= SPS_PPS_BS_SIZE - 4) { //sps bs exceeds!
@@ -1206,7 +1206,7 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 93 unmodified lines
12061206
12071207
12081208 if (PRO_SCALABLE_BASELINE == uiProfileIdc || PRO_SCALABLE_HIGH == uiProfileIdc)
1209− pCtx->bAvcBasedFlag = false;
1209+ pCtx->bAvcBasedFlag = false;
12101210
12111211 *pPicWidth = pSps->iMbWidth << 4;
12121212 *pPicHeight = pSps->iMbHeight << 4;
@@ -1251,12 +1251,12 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 38 unmodified lines
12511251 // Not overwrite active sps, just copy to final place
12521252 else if (kbUseSubsetFlag) {
12531253 memcpy (&pCtx->sSubsetSpsBuffer[iSpsId], pSubsetSps, sizeof (SSubsetSps));
1254− pCtx->bSubspsAvailFlags[iSpsId] = true;
1255− pCtx->bSubspsExistAheadFlag = true;
1254+ pCtx->bSubspsAvailFlags[iSpsId] = true;
1255+ pCtx->bSubspsExistAheadFlag = true;
12561256 } else {
12571257 memcpy (&pCtx->sSpsBuffer[iSpsId], pSps, sizeof (SSps));
12581258 pCtx->bSpsAvailFlags[iSpsId] = true;
1259− pCtx->bSpsExistAheadFlag = true;
1259+ pCtx->bSpsExistAheadFlag = true;
12601260 }
12611261 return 0;
12621262 }
@@ -1573,8 +1573,8 @@ int32_t ResetFmoList (PWelsDecoderContext pCtx) { · 310 unmodified lines
15731573 if (NULL != pCtx) {
15741574 // Fixed memory leak due to PPS_ID might not be continuous sometimes, 1/5/2010
15751575 UninitFmoList (&pCtx->sFmoList[0], MAX_PPS_COUNT, pCtx->iActiveFmoNum);
1576− iCountNum = pCtx->iActiveFmoNum;
1577− pCtx->iActiveFmoNum = 0;
1576+ iCountNum = pCtx->iActiveFmoNum;
1577+ pCtx->iActiveFmoNum = 0;
15781578 }
15791579 return iCountNum;
15801580 }

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