shithub: libvpx

Download patch

ref: 325bdddc38ad15cf7dd2bc618461a13cfb006812
parent: 4b073bc39a39283577c485ed1e56c92cf0eaaa89
author: James Zern <jzern@google.com>
date: Fri Jul 22 09:11:07 EDT 2016

resize_test: fix implicit float->int conversion

Change-Id: I1efc16fa158740a06da719a1ea90c6dd6a182bb4

--- a/test/resize_test.cc
+++ b/test/resize_test.cc
@@ -369,7 +369,7 @@
   }
 
   virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) {
-    if (!frame0_psnr_)
+    if (frame0_psnr_ == 0.)
       frame0_psnr_ = pkt->data.psnr.psnr[0];
     EXPECT_NEAR(pkt->data.psnr.psnr[0], frame0_psnr_, 2.0);
   }
@@ -671,7 +671,7 @@
   }
 
   virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) {
-    if (!frame0_psnr_)
+    if (frame0_psnr_ == 0.)
       frame0_psnr_ = pkt->data.psnr.psnr[0];
     EXPECT_NEAR(pkt->data.psnr.psnr[0], frame0_psnr_, 2.0);
   }