add mbtype judge logic
Showing the changes to codec/decoder/core/src/au_parser.cpp (1 of 5 files). Show all
Unified · Split
| @@ -936,11 +936,17 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 935 unmodified lines | ||
| 936 | 936 | |
| 937 | 937 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //chroma_format_idc |
| 938 | 938 | pSps->uiChromaFormatIdc = uiCode; |
| 939 | − if (pSps->uiChromaFormatIdc != 1) { | |
| 940 | − WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): chroma_format_idc (%d) = 1 supported.", | |
| 939 | +// if (pSps->uiChromaFormatIdc != 1) { | |
| 940 | +// WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): chroma_format_idc (%d) = 1 supported.", | |
| 941 | +// pSps->uiChromaFormatIdc); | |
| 942 | +// return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_NON_BASELINE); | |
| 943 | +// } | |
| 944 | + if (pSps->uiChromaFormatIdc > 1) { | |
| 945 | + WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): chroma_format_idc (%d) <=1 supported.", | |
| 941 | 946 | pSps->uiChromaFormatIdc); |
| 942 | 947 | return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_NON_BASELINE); |
| 943 | − } | |
| 948 | + | |
| 949 | + }// To support 4:0:0; 4:2:0 | |
| 944 | 950 | pSps->uiChromaArrayType = pSps->uiChromaFormatIdc; |
| 945 | 951 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //bit_depth_luma_minus8 |
| 946 | 952 | if (uiCode != 0) { |