Skip to content

Commit

Permalink
move per-pic psnr
Browse files Browse the repository at this point in the history
  • Loading branch information
fippo committed Dec 13, 2024
1 parent 573d9ce commit 443df7f
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions codec/encoder/core/src/encoder_ext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2186,7 +2186,7 @@ void StatOverallEncodingExt (sWelsEncCtx* pCtx) {

}
}
#endif
#endif //#if defined(STAT_OUTPUT)


int32_t GetMultipleThreadIdc (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingParam, int16_t& iSliceNum,
Expand Down Expand Up @@ -3956,6 +3956,19 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour
(iLayerSize << 3));
#endif//LAYER_INFO_OUTPUT

pLayerBsInfo->rPsnr[0] = NAN;
pLayerBsInfo->rPsnr[1] = NAN;
pLayerBsInfo->rPsnr[2] = NAN;
if (pSrcPic->bPsnrY) {
pLayerBsInfo->rPsnr[0] = fSnrY;
}
if (pSrcPic->bPsnrU) {
pLayerBsInfo->rPsnr[1] = fSnrU;
}
if (pSrcPic->bPsnrV) {
pLayerBsInfo->rPsnr[2] = fSnrV;
}

#if defined(STAT_OUTPUT)

{
Expand All @@ -3969,18 +3982,6 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour
pCtx->sStatData[iCurDid][0].sQualityStat.rVPsnr[pCtx->eSliceType] += fSnrV;
}
}
pLayerBsInfo->rPsnr[0] = NAN;
pLayerBsInfo->rPsnr[1] = NAN;
pLayerBsInfo->rPsnr[2] = NAN;
if (pSrcPic->bPsnrY) {
pLayerBsInfo->rPsnr[0] = fSnrY;
}
if (pSrcPic->bPsnrU) {
pLayerBsInfo->rPsnr[1] = fSnrU;
}
if (pSrcPic->bPsnrV) {
pLayerBsInfo->rPsnr[2] = fSnrV;
}

#if defined(MB_TYPES_CHECK) //091025, frame output
if (pCtx->eSliceType == P_SLICE) {
Expand Down

0 comments on commit 443df7f

Please sign in to comment.