Skip to content

Commit 756dc08

Browse files
committed
psnr: do not use NAN, initialize to 0
which is not supported in some older compilers as pointed out in cisco#3824 Applications should always check whether they requested calculating PSNR before evaluating that field in the result.
1 parent e49c095 commit 756dc08

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

codec/encoder/core/src/encoder_ext.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3956,9 +3956,9 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour
39563956
(iLayerSize << 3));
39573957
#endif//LAYER_INFO_OUTPUT
39583958

3959-
pLayerBsInfo->rPsnr[0] = NAN;
3960-
pLayerBsInfo->rPsnr[1] = NAN;
3961-
pLayerBsInfo->rPsnr[2] = NAN;
3959+
pLayerBsInfo->rPsnr[0] = 0;
3960+
pLayerBsInfo->rPsnr[1] = 0;
3961+
pLayerBsInfo->rPsnr[2] = 0;
39623962
if (pSrcPic->bPsnrY) {
39633963
pLayerBsInfo->rPsnr[0] = fSnrY;
39643964
}

0 commit comments

Comments
 (0)