to support monochroma
Showing the changes to codec/decoder/core/src/au_parser.cpp (1 of 5 files). Show all
Unified · Split
| @@ -948,11 +948,17 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 947 unmodified lines | |||
| 948 | 948 | ||
| 949 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //chroma_format_idc | 949 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //chroma_format_idc |
| 950 | pSps->uiChromaFormatIdc = uiCode; | 950 | pSps->uiChromaFormatIdc = uiCode; |
| 951 | if (pSps->uiChromaFormatIdc != 1) { | 951 | // if (pSps->uiChromaFormatIdc != 1) { |
| 952 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): chroma_format_idc (%d) = 1 supported.", | 952 | // WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): chroma_format_idc (%d) = 1 supported.", |
| 953 | // pSps->uiChromaFormatIdc); | ||
| 954 | // return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_NON_BASELINE); | ||
| 955 | // } | ||
| 956 | if (pSps->uiChromaFormatIdc > 1) { | ||
| 957 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): chroma_format_idc (%d) <=1 supported.", | ||
| 953 | pSps->uiChromaFormatIdc); | 958 | pSps->uiChromaFormatIdc); |
| 954 | return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_NON_BASELINE); | 959 | return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_NON_BASELINE); |
| 955 | } | 960 | |
| 961 | }// To support 4:0:0; 4:2:0 | ||
| 956 | pSps->uiChromaArrayType = pSps->uiChromaFormatIdc; | 962 | pSps->uiChromaArrayType = pSps->uiChromaFormatIdc; |
| 957 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //bit_depth_luma_minus8 | 963 | WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //bit_depth_luma_minus8 |
| 958 | if (uiCode != 0) { | 964 | if (uiCode != 0) { |