From 687f9eff1b7c2f9b4cfbea7de44f52f8c8155312 Mon Sep 17 00:00:00 2001 From: Haibo Zhu Date: Mon, 11 Jul 2016 19:30:11 +0800 Subject: [PATCH] (1) remove the weighted prediction sytax limit (2) fix the 4:0:0 support bug --- codec/decoder/core/src/au_parser.cpp | 7 +------ codec/decoder/core/src/decode_slice.cpp | 4 ++++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/codec/decoder/core/src/au_parser.cpp b/codec/decoder/core/src/au_parser.cpp index a278cc8f..e7760ff9 100644 --- a/codec/decoder/core/src/au_parser.cpp +++ b/codec/decoder/core/src/au_parser.cpp @@ -1377,12 +1377,7 @@ int32_t ParsePps (PWelsDecoderContext pCtx, PPps pPpsList, PBitStringAux pBsAux, pPps->bWeightedPredFlag = !!uiCode; WELS_READ_VERIFY (BsGetBits (pBsAux, 2, &uiCode)); //weighted_bipred_idc pPps->uiWeightedBipredIdc = uiCode; - if (pPps->uiWeightedBipredIdc != 0) { - WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, - "ParsePps(): weighted_bipred_idc (%d) not supported.\n", - pPps->uiWeightedBipredIdc); - return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_WP); - } + // weighted_bipred_idc > 0 NOT supported now, but no impact when we ignore it WELS_READ_VERIFY (BsGetSe (pBsAux, &iCode)); //pic_init_qp_minus26 pPps->iPicInitQp = PIC_INIT_QP_OFFSET + iCode; diff --git a/codec/decoder/core/src/decode_slice.cpp b/codec/decoder/core/src/decode_slice.cpp index 6f9634ee..e8ae2bc9 100644 --- a/codec/decoder/core/src/decode_slice.cpp +++ b/codec/decoder/core/src/decode_slice.cpp @@ -535,6 +535,10 @@ int32_t ParseIntra8x8Mode (PWelsDecoderContext pCtx, PWelsNeighAvail pNeighAvail pCurDqLayer->pIntraPredMode[iMbXy][4] = pIntraPredMode[4 + 8 * 1]; pCurDqLayer->pIntraPredMode[iMbXy][5] = pIntraPredMode[4 + 8 * 2]; pCurDqLayer->pIntraPredMode[iMbXy][6] = pIntraPredMode[4 + 8 * 3]; + + if (pCtx->pSps->uiChromaFormatIdc == 0) + return ERR_NONE; + if (pCurDqLayer->sLayerInfo.pPps->bEntropyCodingModeFlag) { WELS_READ_VERIFY (ParseIntraPredModeChromaCabac (pCtx, uiNeighAvail, iCode)); if (iCode > MAX_PRED_MODE_ID_CHROMA) {