Showing the changes to codec/decoder/core/src/au_parser.cpp (1 of 16 files). Show all
Unified · Split
| @@ -146,7 +146,7 @@ uint8_t* ParseNalHeader (PWelsDecoderContext pCtx, SNalUnitHeader* pNalUnitHeade · 145 unmodified lines | ||
| 146 | 146 | || pCtx->bSpsExistAheadFlag)) { |
| 147 | 147 | if (pCtx->bPrintFrameErrorTraceFlag) { |
| 148 | 148 | WelsLog (pLogCtx, WELS_LOG_WARNING, |
| 149 | − "parse_nal(), no exist Sequence Parameter Sets ahead of sequence when try to decode NAL(type:%d).\n", | |
| 149 | + "parse_nal(), no exist Sequence Parameter Sets ahead of sequence when try to decode NAL(type:%d).", | |
| 150 | 150 | pNalUnitHeader->eNalUnitType); |
| 151 | 151 | } |
| 152 | 152 | pCtx->iErrorCode = dsNoParamSets; |
| @@ -156,7 +156,7 @@ uint8_t* ParseNalHeader (PWelsDecoderContext pCtx, SNalUnitHeader* pNalUnitHeade · 3 unmodified lines | ||
| 156 | 156 | || pCtx->bPpsExistAheadFlag)) { |
| 157 | 157 | if (pCtx->bPrintFrameErrorTraceFlag) { |
| 158 | 158 | WelsLog (pLogCtx, WELS_LOG_WARNING, |
| 159 | − "parse_nal(), no exist Picture Parameter Sets ahead of sequence when try to decode NAL(type:%d).\n", | |
| 159 | + "parse_nal(), no exist Picture Parameter Sets ahead of sequence when try to decode NAL(type:%d).", | |
| 160 | 160 | pNalUnitHeader->eNalUnitType); |
| 161 | 161 | } |
| 162 | 162 | pCtx->iErrorCode = dsNoParamSets; |
| @@ -167,7 +167,7 @@ uint8_t* ParseNalHeader (PWelsDecoderContext pCtx, SNalUnitHeader* pNalUnitHeade · 4 unmodified lines | ||
| 167 | 167 | || pCtx->bPpsExistAheadFlag))) { |
| 168 | 168 | if (pCtx->bPrintFrameErrorTraceFlag) { |
| 169 | 169 | WelsLog (pLogCtx, WELS_LOG_WARNING, |
| 170 | − "ParseNalHeader(), no exist Parameter Sets ahead of sequence when try to decode slice(type:%d).\n", | |
| 170 | + "ParseNalHeader(), no exist Parameter Sets ahead of sequence when try to decode slice(type:%d).", | |
| 171 | 171 | pNalUnitHeader->eNalUnitType); |
| 172 | 172 | } |
| 173 | 173 | pCtx->iErrorCode |= dsNoParamSets; |
| @@ -204,7 +204,7 @@ uint8_t* ParseNalHeader (PWelsDecoderContext pCtx, SNalUnitHeader* pNalUnitHeade · 30 unmodified lines | ||
| 204 | 204 | DecodeNalHeaderExt (pCurNal, pNal); |
| 205 | 205 | if ((pCurNal->sNalHeaderExt.uiQualityId != 0) || (pCurNal->sNalHeaderExt.bUseRefBasePicFlag != 0)) { |
| 206 | 206 | WelsLog (pLogCtx, WELS_LOG_WARNING, |
| 207 | − "ParseNalHeader() in Prefix Nal Unit:uiQualityId (%d) != 0, bUseRefBasePicFlag (%d) != 0, not supported!\n", | |
| 207 | + "ParseNalHeader() in Prefix Nal Unit:uiQualityId (%d) != 0, bUseRefBasePicFlag (%d) != 0, not supported!", | |
| 208 | 208 | pCurNal->sNalHeaderExt.uiQualityId, pCurNal->sNalHeaderExt.bUseRefBasePicFlag); |
| 209 | 209 | PAccessUnit pCurAu = pCtx->pAccessUnitList; |
| 210 | 210 | uint32_t uiAvailNalNum = pCurAu->uiAvailUnitsNum; |
| @@ -246,7 +246,7 @@ uint8_t* ParseNalHeader (PWelsDecoderContext pCtx, SNalUnitHeader* pNalUnitHeade · 35 unmodified lines | ||
| 246 | 246 | uint32_t uiAvailNalNum; |
| 247 | 247 | pCurNal = MemGetNextNal (&pCtx->pAccessUnitList); |
| 248 | 248 | if (NULL == pCurNal) { |
| 249 | − WelsLog (pLogCtx, WELS_LOG_ERROR, "MemGetNextNal() fail due out of memory.\n"); | |
| 249 | + WelsLog (pLogCtx, WELS_LOG_ERROR, "MemGetNextNal() fail due out of memory."); | |
| 250 | 250 | pCtx->iErrorCode |= dsOutOfMemory; |
| 251 | 251 | return NULL; |
| 252 | 252 | } |
| @@ -274,10 +274,10 @@ uint8_t* ParseNalHeader (PWelsDecoderContext pCtx, SNalUnitHeader* pNalUnitHeade · 21 unmodified lines | ||
| 274 | 274 | if (pCurNal->sNalHeaderExt.uiQualityId != 0 || |
| 275 | 275 | pCurNal->sNalHeaderExt.bUseRefBasePicFlag) { |
| 276 | 276 | if (pCurNal->sNalHeaderExt.uiQualityId != 0) |
| 277 | − WelsLog (pLogCtx, WELS_LOG_WARNING, "ParseNalHeader():uiQualityId (%d) != 0, MGS not supported!\n", | |
| 277 | + WelsLog (pLogCtx, WELS_LOG_WARNING, "ParseNalHeader():uiQualityId (%d) != 0, MGS not supported!", | |
| 278 | 278 | pCurNal->sNalHeaderExt.uiQualityId); |
| 279 | 279 | if (pCurNal->sNalHeaderExt.bUseRefBasePicFlag != 0) |
| 280 | − WelsLog (pLogCtx, WELS_LOG_WARNING, "ParseNalHeader():bUseRefBasePicFlag (%d) != 0, MGS not supported!\n", | |
| 280 | + WelsLog (pLogCtx, WELS_LOG_WARNING, "ParseNalHeader():bUseRefBasePicFlag (%d) != 0, MGS not supported!", | |
| 281 | 281 | pCurNal->sNalHeaderExt.bUseRefBasePicFlag); |
| 282 | 282 | |
| 283 | 283 | ForceClearCurrentNal (pCurAu); |
| @@ -630,7 +630,7 @@ int32_t DecodeSpsSvcExt (PWelsDecoderContext pCtx, PSubsetSps pSpsExt, PBitStrin · 346 unmodified lines | ||
| 630 | 630 | pExt->uiExtendedSpatialScalability = uiCode; |
| 631 | 631 | if (pExt->uiExtendedSpatialScalability > 2) { |
| 632 | 632 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, |
| 633 | − "DecodeSpsSvcExt():extended_spatial_scalability (%d) != 0, ESS not supported!\n", | |
| 633 | + "DecodeSpsSvcExt():extended_spatial_scalability (%d) != 0, ESS not supported!", | |
| 634 | 634 | pExt->uiExtendedSpatialScalability); |
| 635 | 635 | return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_ESS); |
| 636 | 636 | } |
| @@ -824,21 +824,21 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 187 unmodified lines | ||
| 824 | 824 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //chroma_format_idc |
| 825 | 825 | pSps->uiChromaFormatIdc = uiCode; |
| 826 | 826 | if (pSps->uiChromaFormatIdc != 1) { |
| 827 | − WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): chroma_format_idc (%d) = 1 supported.\n", | |
| 827 | + WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): chroma_format_idc (%d) = 1 supported.", | |
| 828 | 828 | pSps->uiChromaFormatIdc); |
| 829 | 829 | return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_NON_BASELINE); |
| 830 | 830 | } |
| 831 | 831 | pSps->uiChromaArrayType = pSps->uiChromaFormatIdc; |
| 832 | 832 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //bit_depth_luma_minus8 |
| 833 | 833 | if (uiCode != 0) { |
| 834 | − WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): bit_depth_luma (%d) Only 8 bit supported.\n", 8 + uiCode); | |
| 834 | + WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): bit_depth_luma (%d) Only 8 bit supported.", 8 + uiCode); | |
| 835 | 835 | return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_NON_BASELINE); |
| 836 | 836 | } |
| 837 | 837 | pSps->uiBitDepthLuma = 8; |
| 838 | 838 | |
| 839 | 839 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //bit_depth_chroma_minus8 |
| 840 | 840 | if (uiCode != 0) { |
| 841 | − WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): bit_depth_chroma (%d). Only 8 bit supported.\n", 8 + uiCode); | |
| 841 | + WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): bit_depth_chroma (%d). Only 8 bit supported.", 8 + uiCode); | |
| 842 | 842 | return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_NON_BASELINE); |
| 843 | 843 | } |
| 844 | 844 | pSps->uiBitDepthChroma = 8; |
| @@ -850,7 +850,7 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 5 unmodified lines | ||
| 850 | 850 | |
| 851 | 851 | if (pSps->bSeqScalingMatrixPresentFlag) { // For high profile, it is not used in current application. FIXME |
| 852 | 852 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, |
| 853 | − "ParseSps(): seq_scaling_matrix_present_flag (%d). Feature not supported.\n", | |
| 853 | + "ParseSps(): seq_scaling_matrix_present_flag (%d). Feature not supported.", | |
| 854 | 854 | pSps->bSeqScalingMatrixPresentFlag); |
| 855 | 855 | return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_NON_BASELINE); |
| 856 | 856 | } |
| @@ -888,7 +888,7 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 31 unmodified lines | ||
| 888 | 888 | } |
| 889 | 889 | } |
| 890 | 890 | if (pSps->uiPocType > 2) { |
| 891 | − WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, " illegal pic_order_cnt_type: %d ! \n", pSps->uiPocType); | |
| 891 | + WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, " illegal pic_order_cnt_type: %d ! ", pSps->uiPocType); | |
| 892 | 892 | return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_POC_TYPE); |
| 893 | 893 | } |
| 894 | 894 | |
| @@ -899,24 +899,24 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 4 unmodified lines | ||
| 899 | 899 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //pic_width_in_mbs_minus1 |
| 900 | 900 | pSps->iMbWidth = PIC_WIDTH_IN_MBS_OFFSET + uiCode; |
| 901 | 901 | if (pSps->iMbWidth > MAX_MB_SIZE) { |
| 902 | − WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "pic_width_in_mbs(%d) exceeds the maximum allowed!\n", pSps->iMbWidth); | |
| 902 | + WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "pic_width_in_mbs(%d) exceeds the maximum allowed!", pSps->iMbWidth); | |
| 903 | 903 | return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_MAX_MB_SIZE); |
| 904 | 904 | } |
| 905 | 905 | if (((uint64_t)pSps->iMbWidth * (uint64_t)pSps->iMbWidth) > (uint64_t) (8 * pSLevelLimits->uiMaxFS)) { |
| 906 | − WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, " the pic_width_in_mbs exceeds the level limits!\n"); | |
| 906 | + WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, " the pic_width_in_mbs exceeds the level limits!"); | |
| 907 | 907 | } |
| 908 | 908 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //pic_height_in_map_units_minus1 |
| 909 | 909 | pSps->iMbHeight = PIC_HEIGHT_IN_MAP_UNITS_OFFSET + uiCode; |
| 910 | 910 | if (pSps->iMbHeight > MAX_MB_SIZE) { |
| 911 | − WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "pic_height_in_mbs(%d) exceeds the maximum allowed!\n", pSps->iMbHeight); | |
| 911 | + WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "pic_height_in_mbs(%d) exceeds the maximum allowed!", pSps->iMbHeight); | |
| 912 | 912 | return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_MAX_MB_SIZE); |
| 913 | 913 | } |
| 914 | 914 | if (((uint64_t)pSps->iMbHeight * (uint64_t)pSps->iMbHeight) > (uint64_t) (8 * pSLevelLimits->uiMaxFS)) { |
| 915 | − WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, " the pic_height_in_mbs exceeds the level limits!\n"); | |
| 915 | + WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, " the pic_height_in_mbs exceeds the level limits!"); | |
| 916 | 916 | } |
| 917 | 917 | uint32_t uiTmp32 = pSps->iMbWidth * pSps->iMbHeight; |
| 918 | 918 | if (uiTmp32 > (uint32_t)pSLevelLimits->uiMaxFS) { |
| 919 | − WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, " the total count of mb exceeds the level limits!\n"); | |
| 919 | + WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, " the total count of mb exceeds the level limits!"); | |
| 920 | 920 | } |
| 921 | 921 | pSps->uiTotalMbCount = uiTmp32; |
| 922 | 922 | WELS_CHECK_SE_UPPER_ERROR (pSps->iNumRefFrames, SPS_MAX_NUM_REF_FRAMES_MAX, "max_num_ref_frames", |
| @@ -927,12 +927,12 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 4 unmodified lines | ||
| 927 | 927 | if (uiMaxDpbFrames > SPS_MAX_NUM_REF_FRAMES_MAX) |
| 928 | 928 | uiMaxDpbFrames = SPS_MAX_NUM_REF_FRAMES_MAX; |
| 929 | 929 | if ((uint32_t)pSps->iNumRefFrames > uiMaxDpbFrames) { |
| 930 | − WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, " max_num_ref_frames exceeds level limits!\n"); | |
| 930 | + WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, " max_num_ref_frames exceeds level limits!"); | |
| 931 | 931 | } |
| 932 | 932 | WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //frame_mbs_only_flag |
| 933 | 933 | pSps->bFrameMbsOnlyFlag = !!uiCode; |
| 934 | 934 | if (!pSps->bFrameMbsOnlyFlag) { |
| 935 | − WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): frame_mbs_only_flag (%d) not supported.\n", | |
| 935 | + WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): frame_mbs_only_flag (%d) not supported.", | |
| 936 | 936 | pSps->bFrameMbsOnlyFlag); |
| 937 | 937 | return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_MBAFF); |
| 938 | 938 | } |
| @@ -946,14 +946,14 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 7 unmodified lines | ||
| 946 | 946 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //frame_crop_right_offset |
| 947 | 947 | pSps->sFrameCrop.iRightOffset = uiCode; |
| 948 | 948 | if ((pSps->sFrameCrop.iLeftOffset + pSps->sFrameCrop.iRightOffset) > ((int32_t)pSps->iMbWidth * 16 / 2)) { |
| 949 | − WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "frame_crop_left_offset + frame_crop_right_offset exceeds limits!\n"); | |
| 949 | + WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "frame_crop_left_offset + frame_crop_right_offset exceeds limits!"); | |
| 950 | 950 | } |
| 951 | 951 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //frame_crop_top_offset |
| 952 | 952 | pSps->sFrameCrop.iTopOffset = uiCode; |
| 953 | 953 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //frame_crop_bottom_offset |
| 954 | 954 | pSps->sFrameCrop.iBottomOffset = uiCode; |
| 955 | 955 | if ((pSps->sFrameCrop.iTopOffset + pSps->sFrameCrop.iBottomOffset) > ((int32_t)pSps->iMbHeight * 16 / 2)) { |
| 956 | − WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "frame_crop_top_offset + frame_crop_right_offset exceeds limits!\n"); | |
| 956 | + WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "frame_crop_top_offset + frame_crop_right_offset exceeds limits!"); | |
| 957 | 957 | } |
| 958 | 958 | } else { |
| 959 | 959 | pSps->sFrameCrop.iLeftOffset = 0; // frame_crop_left_offset |
| @@ -1090,7 +1090,7 @@ int32_t ParsePps (PWelsDecoderContext pCtx, PPps pPpsList, PBitStringAux pBsAux) · 130 unmodified lines | ||
| 1090 | 1090 | WELS_READ_VERIFY (BsGetUe (pBsAux, &uiCode)); //slice_group_map_type |
| 1091 | 1091 | pPps->uiSliceGroupMapType = uiCode; |
| 1092 | 1092 | if (pPps->uiSliceGroupMapType > 1) { |
| 1093 | − WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParsePps(): slice_group_map_type (%d): support only 0,1.\n", | |
| 1093 | + WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParsePps(): slice_group_map_type (%d): support only 0,1.", | |
| 1094 | 1094 | pPps->uiSliceGroupMapType); |
| 1095 | 1095 | return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_FMOTYPE); |
| 1096 | 1096 | } |