astyle all cpp files
This commit is contained in:
@@ -622,7 +622,8 @@ int32_t DecodeSpsSvcExt (PWelsDecoderContext pCtx, PSubsetSps pSpsExt, PBitStrin
|
|||||||
WELS_READ_VERIFY (BsGetBits (pBs, 2, &uiCode)); //extended_spatial_scalability_idc
|
WELS_READ_VERIFY (BsGetBits (pBs, 2, &uiCode)); //extended_spatial_scalability_idc
|
||||||
pExt->uiExtendedSpatialScalability = uiCode;
|
pExt->uiExtendedSpatialScalability = uiCode;
|
||||||
if (pExt->uiExtendedSpatialScalability > 2) {
|
if (pExt->uiExtendedSpatialScalability > 2) {
|
||||||
WelsLog (&(pCtx->sLogCtx), WELS_LOG_WARNING, "DecodeSpsSvcExt():extended_spatial_scalability (%d) != 0, ESS not supported!\n",
|
WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
|
||||||
|
"DecodeSpsSvcExt():extended_spatial_scalability (%d) != 0, ESS not supported!\n",
|
||||||
pExt->uiExtendedSpatialScalability);
|
pExt->uiExtendedSpatialScalability);
|
||||||
return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_ESS);
|
return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_ESS);
|
||||||
}
|
}
|
||||||
@@ -837,7 +838,8 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW
|
|||||||
WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //chroma_format_idc
|
WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //chroma_format_idc
|
||||||
pSps->uiChromaFormatIdc = uiCode;
|
pSps->uiChromaFormatIdc = uiCode;
|
||||||
if (pSps->uiChromaFormatIdc != 1) {
|
if (pSps->uiChromaFormatIdc != 1) {
|
||||||
WelsLog (&(pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): chroma_format_idc (%d) = 1 supported.\n", pSps->uiChromaFormatIdc);
|
WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): chroma_format_idc (%d) = 1 supported.\n",
|
||||||
|
pSps->uiChromaFormatIdc);
|
||||||
return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_NON_BASELINE);
|
return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_NON_BASELINE);
|
||||||
}
|
}
|
||||||
pSps->uiChromaArrayType = pSps->uiChromaFormatIdc;
|
pSps->uiChromaArrayType = pSps->uiChromaFormatIdc;
|
||||||
@@ -861,7 +863,8 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW
|
|||||||
pSps->bSeqScalingMatrixPresentFlag = !!uiCode;
|
pSps->bSeqScalingMatrixPresentFlag = !!uiCode;
|
||||||
|
|
||||||
if (pSps->bSeqScalingMatrixPresentFlag) { // For high profile, it is not used in current application. FIXME
|
if (pSps->bSeqScalingMatrixPresentFlag) { // For high profile, it is not used in current application. FIXME
|
||||||
WelsLog (&(pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): seq_scaling_matrix_present_flag (%d). Feature not supported.\n",
|
WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
|
||||||
|
"ParseSps(): seq_scaling_matrix_present_flag (%d). Feature not supported.\n",
|
||||||
pSps->bSeqScalingMatrixPresentFlag);
|
pSps->bSeqScalingMatrixPresentFlag);
|
||||||
return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_NON_BASELINE);
|
return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_NON_BASELINE);
|
||||||
}
|
}
|
||||||
@@ -943,7 +946,8 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW
|
|||||||
WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //frame_mbs_only_flag
|
WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //frame_mbs_only_flag
|
||||||
pSps->bFrameMbsOnlyFlag = !!uiCode;
|
pSps->bFrameMbsOnlyFlag = !!uiCode;
|
||||||
if (!pSps->bFrameMbsOnlyFlag) {
|
if (!pSps->bFrameMbsOnlyFlag) {
|
||||||
WelsLog (&(pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): frame_mbs_only_flag (%d) not supported.\n", pSps->bFrameMbsOnlyFlag);
|
WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): frame_mbs_only_flag (%d) not supported.\n",
|
||||||
|
pSps->bFrameMbsOnlyFlag);
|
||||||
return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_MBAFF);
|
return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_MBAFF);
|
||||||
}
|
}
|
||||||
WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //direct_8x8_inference_flag
|
WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //direct_8x8_inference_flag
|
||||||
@@ -1132,7 +1136,8 @@ int32_t ParsePps (PWelsDecoderContext pCtx, PPps pPpsList, PBitStringAux pBsAux)
|
|||||||
WELS_READ_VERIFY (BsGetBits (pBsAux, 2, &uiCode)); //weighted_bipred_idc
|
WELS_READ_VERIFY (BsGetBits (pBsAux, 2, &uiCode)); //weighted_bipred_idc
|
||||||
pPps->uiWeightedBipredIdc = uiCode;
|
pPps->uiWeightedBipredIdc = uiCode;
|
||||||
if (pPps->bWeightedPredFlag || pPps->uiWeightedBipredIdc != 0) {
|
if (pPps->bWeightedPredFlag || pPps->uiWeightedBipredIdc != 0) {
|
||||||
WelsLog (&(pCtx->sLogCtx), WELS_LOG_WARNING, "ParsePps(): weighted_pred_flag (%d) weighted_bipred_idc (%d) neither supported.\n",
|
WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
|
||||||
|
"ParsePps(): weighted_pred_flag (%d) weighted_bipred_idc (%d) neither supported.\n",
|
||||||
pPps->bWeightedPredFlag, pPps->uiWeightedBipredIdc);
|
pPps->bWeightedPredFlag, pPps->uiWeightedBipredIdc);
|
||||||
return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_WP);
|
return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_WP);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,7 +90,8 @@ int32_t WelsTargetSliceConstruction (PWelsDecoderContext pCtx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (WelsTargetMbConstruction (pCtx)) {
|
if (WelsTargetMbConstruction (pCtx)) {
|
||||||
WelsLog (&(pCtx->sLogCtx), WELS_LOG_WARNING, "WelsTargetSliceConstruction():::MB(%d, %d) construction error. pCurSlice_type:%d\n",
|
WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
|
||||||
|
"WelsTargetSliceConstruction():::MB(%d, %d) construction error. pCurSlice_type:%d\n",
|
||||||
pCurLayer->iMbX, pCurLayer->iMbY, pCurSlice->eSliceType);
|
pCurLayer->iMbX, pCurLayer->iMbY, pCurSlice->eSliceType);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
@@ -103,7 +104,8 @@ int32_t WelsTargetSliceConstruction (PWelsDecoderContext pCtx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (pCtx->iTotalNumMbRec > iTotalMbTargetLayer) {
|
if (pCtx->iTotalNumMbRec > iTotalMbTargetLayer) {
|
||||||
WelsLog (&(pCtx->sLogCtx), WELS_LOG_WARNING, "WelsTargetSliceConstruction():::pCtx->iTotalNumMbRec:%d, iTotalMbTargetLayer:%d\n",
|
WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
|
||||||
|
"WelsTargetSliceConstruction():::pCtx->iTotalNumMbRec:%d, iTotalMbTargetLayer:%d\n",
|
||||||
pCtx->iTotalNumMbRec, iTotalMbTargetLayer);
|
pCtx->iTotalNumMbRec, iTotalMbTargetLayer);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
@@ -584,7 +586,8 @@ int32_t WelsActualDecodeMbCavlcISlice (PWelsDecoderContext pCtx) {
|
|||||||
return ERR_INFO_INVALID_QP;
|
return ERR_INFO_INVALID_QP;
|
||||||
}
|
}
|
||||||
pSlice->iLastMbQp = pCurLayer->pLumaQp[iMbXy];
|
pSlice->iLastMbQp = pCurLayer->pLumaQp[iMbXy];
|
||||||
pCurLayer->pChromaQp[iMbXy] = g_kuiChromaQpTable[WELS_CLIP3 (pSlice->iLastMbQp + pSliceHeader->pPps->iChromaQpIndexOffset, 0,
|
pCurLayer->pChromaQp[iMbXy] = g_kuiChromaQpTable[WELS_CLIP3 (pSlice->iLastMbQp +
|
||||||
|
pSliceHeader->pPps->iChromaQpIndexOffset, 0,
|
||||||
51)];
|
51)];
|
||||||
|
|
||||||
|
|
||||||
@@ -687,7 +690,8 @@ int32_t WelsDecodeMbCavlcISlice (PWelsDecoderContext pCtx, PNalUnit pNalCur) {
|
|||||||
if (!iBaseModeFlag) {
|
if (!iBaseModeFlag) {
|
||||||
iRet = WelsActualDecodeMbCavlcISlice (pCtx);
|
iRet = WelsActualDecodeMbCavlcISlice (pCtx);
|
||||||
} else {
|
} else {
|
||||||
WelsLog (&(pCtx->sLogCtx), WELS_LOG_WARNING, "iBaseModeFlag (%d) != 0, inter-layer prediction not supported.\n", iBaseModeFlag);
|
WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "iBaseModeFlag (%d) != 0, inter-layer prediction not supported.\n",
|
||||||
|
iBaseModeFlag);
|
||||||
return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_ILP);
|
return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_ILP);
|
||||||
}
|
}
|
||||||
if (iRet) { //occur error when parsing, MUST STOP decoding
|
if (iRet) { //occur error when parsing, MUST STOP decoding
|
||||||
@@ -887,7 +891,8 @@ int32_t WelsActualDecodeMbCavlcPSlice (PWelsDecoderContext pCtx) {
|
|||||||
return ERR_INFO_INVALID_QP;
|
return ERR_INFO_INVALID_QP;
|
||||||
}
|
}
|
||||||
pSlice->iLastMbQp = pCurLayer->pLumaQp[iMbXy];
|
pSlice->iLastMbQp = pCurLayer->pLumaQp[iMbXy];
|
||||||
pCurLayer->pChromaQp[iMbXy] = g_kuiChromaQpTable[WELS_CLIP3 (pSlice->iLastMbQp + pSliceHeader->pPps->iChromaQpIndexOffset, 0,
|
pCurLayer->pChromaQp[iMbXy] = g_kuiChromaQpTable[WELS_CLIP3 (pSlice->iLastMbQp +
|
||||||
|
pSliceHeader->pPps->iChromaQpIndexOffset, 0,
|
||||||
51)];
|
51)];
|
||||||
|
|
||||||
BsStartCavlc (pBs);
|
BsStartCavlc (pBs);
|
||||||
@@ -1039,7 +1044,8 @@ int32_t WelsDecodeMbCavlcPSlice (PWelsDecoderContext pCtx, PNalUnit pNalCur) {
|
|||||||
if (!iBaseModeFlag) {
|
if (!iBaseModeFlag) {
|
||||||
iRet = WelsActualDecodeMbCavlcPSlice (pCtx);
|
iRet = WelsActualDecodeMbCavlcPSlice (pCtx);
|
||||||
} else {
|
} else {
|
||||||
WelsLog (&(pCtx->sLogCtx), WELS_LOG_WARNING, "iBaseModeFlag (%d) != 0, inter-layer prediction not supported.\n", iBaseModeFlag);
|
WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "iBaseModeFlag (%d) != 0, inter-layer prediction not supported.\n",
|
||||||
|
iBaseModeFlag);
|
||||||
return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_ILP);
|
return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_ILP);
|
||||||
}
|
}
|
||||||
if (iRet) { //occur error when parsing, MUST STOP decoding
|
if (iRet) { //occur error when parsing, MUST STOP decoding
|
||||||
|
|||||||
@@ -605,14 +605,16 @@ int32_t SyncPictureResolutionExt (PWelsDecoderContext pCtx, const int32_t kiMbWi
|
|||||||
|
|
||||||
iErr = WelsRequestMem (pCtx, kiMbWidth, kiMbHeight); // common memory used
|
iErr = WelsRequestMem (pCtx, kiMbWidth, kiMbHeight); // common memory used
|
||||||
if (ERR_NONE != iErr) {
|
if (ERR_NONE != iErr) {
|
||||||
WelsLog (&(pCtx->sLogCtx), WELS_LOG_WARNING, "SyncPictureResolutionExt()::WelsRequestMem--buffer allocated failure.\n");
|
WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
|
||||||
|
"SyncPictureResolutionExt()::WelsRequestMem--buffer allocated failure.\n");
|
||||||
pCtx->iErrorCode = dsOutOfMemory;
|
pCtx->iErrorCode = dsOutOfMemory;
|
||||||
return iErr;
|
return iErr;
|
||||||
}
|
}
|
||||||
|
|
||||||
iErr = InitialDqLayersContext (pCtx, kiPicWidth, kiPicHeight);
|
iErr = InitialDqLayersContext (pCtx, kiPicWidth, kiPicHeight);
|
||||||
if (ERR_NONE != iErr) {
|
if (ERR_NONE != iErr) {
|
||||||
WelsLog (&(pCtx->sLogCtx), WELS_LOG_WARNING, "SyncPictureResolutionExt()::InitialDqLayersContext--buffer allocated failure.\n");
|
WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
|
||||||
|
"SyncPictureResolutionExt()::InitialDqLayersContext--buffer allocated failure.\n");
|
||||||
pCtx->iErrorCode = dsOutOfMemory;
|
pCtx->iErrorCode = dsOutOfMemory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,8 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t
|
|||||||
bFrameCompleteFlag = false; //return later after output buffer is done
|
bFrameCompleteFlag = false; //return later after output buffer is done
|
||||||
if (pCtx->bInstantDecFlag) //no-delay decoding, wait for new slice
|
if (pCtx->bInstantDecFlag) //no-delay decoding, wait for new slice
|
||||||
return -1;
|
return -1;
|
||||||
} else if (pCurDq->sLayerInfo.sNalHeaderExt.bIdrFlag && (pCtx->iErrorCode == dsErrorFree)) { //complete non-ECed IDR frame done
|
} else if (pCurDq->sLayerInfo.sNalHeaderExt.bIdrFlag
|
||||||
|
&& (pCtx->iErrorCode == dsErrorFree)) { //complete non-ECed IDR frame done
|
||||||
pCtx->bDecErrorConedFlag = false;
|
pCtx->bDecErrorConedFlag = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -379,7 +379,8 @@ static int32_t MMCOProcess (PWelsDecoderContext pCtx, uint32_t uiMmcoType,
|
|||||||
#ifdef LONG_TERM_REF
|
#ifdef LONG_TERM_REF
|
||||||
pCtx->bCurAuContainLtrMarkSeFlag = true;
|
pCtx->bCurAuContainLtrMarkSeFlag = true;
|
||||||
pCtx->iFrameNumOfAuMarkedLtr = pCtx->iFrameNum;
|
pCtx->iFrameNumOfAuMarkedLtr = pCtx->iFrameNum;
|
||||||
WelsLog (&(pCtx->sLogCtx), WELS_LOG_INFO, "ex_mark_avc():::MMCO_LONG:::LTR marking....iFrameNum: %d\n", pCtx->iFrameNum);
|
WelsLog (& (pCtx->sLogCtx), WELS_LOG_INFO, "ex_mark_avc():::MMCO_LONG:::LTR marking....iFrameNum: %d\n",
|
||||||
|
pCtx->iFrameNum);
|
||||||
#endif
|
#endif
|
||||||
iRet = AddLongTermToList (pRefPic, pCtx->pDec, iLongTermFrameIdx);
|
iRet = AddLongTermToList (pRefPic, pCtx->pDec, iLongTermFrameIdx);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -243,13 +243,15 @@ void GeneralBilinearAccurateDownsamplerWrap_neon (uint8_t* pDst, const int32_t k
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_NEON_AARCH64
|
#ifdef HAVE_NEON_AARCH64
|
||||||
void GeneralBilinearAccurateDownsamplerWrap_AArch64_neon (uint8_t* pDst, const int32_t kiDstStride, const int32_t kiDstWidth, const int32_t kiDstHeight,
|
void GeneralBilinearAccurateDownsamplerWrap_AArch64_neon (uint8_t* pDst, const int32_t kiDstStride,
|
||||||
|
const int32_t kiDstWidth, const int32_t kiDstHeight,
|
||||||
uint8_t* pSrc, const int32_t kiSrcStride, const int32_t kiSrcWidth, const int32_t kiSrcHeight) {
|
uint8_t* pSrc, const int32_t kiSrcStride, const int32_t kiSrcWidth, const int32_t kiSrcHeight) {
|
||||||
const int32_t kiScaleBit = 15;
|
const int32_t kiScaleBit = 15;
|
||||||
const uint32_t kuiScale = (1 << kiScaleBit);
|
const uint32_t kuiScale = (1 << kiScaleBit);
|
||||||
uint32_t uiScalex = WELS_ROUND ((float)kiSrcWidth / (float)kiDstWidth * kuiScale);
|
uint32_t uiScalex = WELS_ROUND ((float)kiSrcWidth / (float)kiDstWidth * kuiScale);
|
||||||
uint32_t uiScaley = WELS_ROUND ((float)kiSrcHeight / (float)kiDstHeight * kuiScale);
|
uint32_t uiScaley = WELS_ROUND ((float)kiSrcHeight / (float)kiDstHeight * kuiScale);
|
||||||
GeneralBilinearAccurateDownsampler_AArch64_neon (pDst, kiDstStride, kiDstWidth, kiDstHeight, pSrc, kiSrcStride, uiScalex, uiScaley);
|
GeneralBilinearAccurateDownsampler_AArch64_neon (pDst, kiDstStride, kiDstWidth, kiDstHeight, pSrc, kiSrcStride,
|
||||||
|
uiScalex, uiScaley);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
WELSVP_NAMESPACE_END
|
WELSVP_NAMESPACE_END
|
||||||
|
|||||||
Reference in New Issue
Block a user