@@ -2186,7 +2186,7 @@ void StatOverallEncodingExt (sWelsEncCtx* pCtx) {
2186
2186
2187
2187
}
2188
2188
}
2189
- #endif
2189
+ #endif // #if defined(STAT_OUTPUT)
2190
2190
2191
2191
2192
2192
int32_t GetMultipleThreadIdc (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingParam, int16_t & iSliceNum,
@@ -3956,6 +3956,19 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour
3956
3956
(iLayerSize << 3 ));
3957
3957
#endif // LAYER_INFO_OUTPUT
3958
3958
3959
+ pLayerBsInfo->rPsnr [0 ] = NAN;
3960
+ pLayerBsInfo->rPsnr [1 ] = NAN;
3961
+ pLayerBsInfo->rPsnr [2 ] = NAN;
3962
+ if (pSrcPic->bPsnrY ) {
3963
+ pLayerBsInfo->rPsnr [0 ] = fSnrY ;
3964
+ }
3965
+ if (pSrcPic->bPsnrU ) {
3966
+ pLayerBsInfo->rPsnr [1 ] = fSnrU ;
3967
+ }
3968
+ if (pSrcPic->bPsnrV ) {
3969
+ pLayerBsInfo->rPsnr [2 ] = fSnrV ;
3970
+ }
3971
+
3959
3972
#if defined(STAT_OUTPUT)
3960
3973
3961
3974
{
@@ -3969,18 +3982,6 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour
3969
3982
pCtx->sStatData [iCurDid][0 ].sQualityStat .rVPsnr [pCtx->eSliceType ] += fSnrV ;
3970
3983
}
3971
3984
}
3972
- pLayerBsInfo->rPsnr [0 ] = NAN;
3973
- pLayerBsInfo->rPsnr [1 ] = NAN;
3974
- pLayerBsInfo->rPsnr [2 ] = NAN;
3975
- if (pSrcPic->bPsnrY ) {
3976
- pLayerBsInfo->rPsnr [0 ] = fSnrY ;
3977
- }
3978
- if (pSrcPic->bPsnrU ) {
3979
- pLayerBsInfo->rPsnr [1 ] = fSnrU ;
3980
- }
3981
- if (pSrcPic->bPsnrV ) {
3982
- pLayerBsInfo->rPsnr [2 ] = fSnrV ;
3983
- }
3984
3985
3985
3986
#if defined(MB_TYPES_CHECK) // 091025, frame output
3986
3987
if (pCtx->eSliceType == P_SLICE) {
0 commit comments