History

to support different chroma qp

fix travis ci error

zhuiling committed 11 years ago

Commit a45c6611 parent 01fd22011 files · +346 −101Browse files

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

Unified · Split

codec/decoder/core/src/au_parser.cpp+24−15
@@ -1336,30 +1336,39 @@ int32_t ParsePps (PWelsDecoderContext pCtx, PPps pPpsList, PBitStringAux pBsAux, · 1335 unmodified lines
13361336 pPps->iPicInitQs = PIC_INIT_QS_OFFSET + iCode;
13371337 WELS_CHECK_SE_BOTH_ERROR (pPps->iPicInitQs, PPS_PIC_INIT_QP_QS_MIN, PPS_PIC_INIT_QP_QS_MAX, "pic_init_qs_minus26 + 26",
13381338 GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_PIC_INIT_QS));
1339− WELS_READ_VERIFY (BsGetSe (pBsAux, &iCode)); //chroma_qp_index_offset
1340− pPps->iChromaQpIndexOffset = iCode;
1341− WELS_CHECK_SE_BOTH_ERROR (pPps->iChromaQpIndexOffset, PPS_CHROMA_QP_INDEX_OFFSET_MIN, PPS_CHROMA_QP_INDEX_OFFSET_MAX,
1339+ WELS_READ_VERIFY (BsGetSe (pBsAux, &iCode)); //chroma_qp_index_offset,cb
1340+ pPps->iChromaQpIndexOffset[0] = iCode;
1341+ WELS_CHECK_SE_BOTH_ERROR (pPps->iChromaQpIndexOffset[0], PPS_CHROMA_QP_INDEX_OFFSET_MIN, PPS_CHROMA_QP_INDEX_OFFSET_MAX,
13421342 "chroma_qp_index_offset", GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_CHROMA_QP_INDEX_OFFSET));
1343+ pPps->iChromaQpIndexOffset[1] = pPps->iChromaQpIndexOffset[0];//init cr qp offset
13431344 WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //deblocking_filter_control_present_flag
13441345 pPps->bDeblockingFilterControlPresentFlag = !!uiCode;
13451346 WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //constrained_intra_pred_flag
13461347 pPps->bConstainedIntraPredFlag = !!uiCode;
13471348 WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //redundant_pic_cnt_present_flag
13481349 pPps->bRedundantPicCntPresentFlag = !!uiCode;
1350+ /*TODO: to judge whether going on to parse*/
13491351 //going on to parse high profile syntax, need fix me
1350− WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode));
1351− pPps->bTransform_8x8_mode_flag = !!uiCode;
1352− WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode));
1353− pPps->bPicScalingMatrixPresentFlag = !!uiCode;
1354− if (pPps->bPicScalingMatrixPresentFlag) {
1355− if (pCtx->bSpsAvailFlags[pPps->iSpsId])
1356− WELS_READ_VERIFY (ParseScalingList (&pCtx->sSpsBuffer[pPps->iSpsId], pBsAux, 1, pPps->bPicScalingListPresentFlag,
1357− pPps->iScalingList4x4, pPps->iScalingList8x8));
1358− else {
1359− pCtx->bSpsLatePps = true;
1360− WELS_READ_VERIFY (ParseScalingList (NULL, pBsAux, 1, pPps->bPicScalingListPresentFlag, pPps->iScalingList4x4,
1361− pPps->iScalingList8x8));
1352+ if (0) {
1353+ WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode));
1354+ pPps->bTransform_8x8_mode_flag = !!uiCode;
1355+ WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode));
1356+ pPps->bPicScalingMatrixPresentFlag = !!uiCode;
1357+ if (pPps->bPicScalingMatrixPresentFlag) {
1358+ if (pCtx->bSpsAvailFlags[pPps->iSpsId])
1359+ WELS_READ_VERIFY (ParseScalingList (&pCtx->sSpsBuffer[pPps->iSpsId], pBsAux, 1, pPps->bPicScalingListPresentFlag,
1360+ pPps->iScalingList4x4, pPps->iScalingList8x8));
1361+ else {
1362+ pCtx->bSpsLatePps = true;
1363+ WELS_READ_VERIFY (ParseScalingList (NULL, pBsAux, 1, pPps->bPicScalingListPresentFlag, pPps->iScalingList4x4,
1364+ pPps->iScalingList8x8));
1365+ }
13621366 }
1367+ //add second chroma qp parsing process
1368+ WELS_READ_VERIFY (BsGetSe (pBsAux, &iCode)); //chroma_qp_index_offset,cr
1369+ pPps->iChromaQpIndexOffset[1] = iCode;
1370+ WELS_CHECK_SE_BOTH_ERROR (pPps->iChromaQpIndexOffset[1], PPS_CHROMA_QP_INDEX_OFFSET_MIN, PPS_CHROMA_QP_INDEX_OFFSET_MAX,
1371+ "second_chroma_qp_index_offset", GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_CHROMA_QP_INDEX_OFFSET));
13631372 }
13641373
13651374 if (pCtx->pAccessUnitList->uiAvailUnitsNum > 0) {

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