]> granicus.if.org Git - libvpx/commitdiff
Fix mismatch check output
authorJohn Koleszar <jkoleszar@google.com>
Tue, 11 Jun 2013 18:28:08 +0000 (11:28 -0700)
committerJohn Koleszar <jkoleszar@google.com>
Tue, 11 Jun 2013 18:28:38 +0000 (11:28 -0700)
Fixes a condition where the address of the mismatching pixels was not
being found/printed.

Change-Id: Ifac5cd3471bc2437448128591eea7c7b87e2d8fe

vpxenc.c

index 8d0bf29299cbd649c03a6f5864872fd92122e48e..a60b84d6eb41d73607710de2b36651bb29738fca 100644 (file)
--- a/vpxenc.c
+++ b/vpxenc.c
@@ -1517,7 +1517,7 @@ static void find_mismatch(vpx_image_t *img1, vpx_image_t *img2,
 
   uloc[0] = uloc[1] = uloc[2] = uloc[3] = -1;
   for (i = 0, match = 1; match && i < c_h; i += bsizey) {
-    for (j = 0; j < match && c_w; j += bsizex) {
+    for (j = 0; match && j < c_w; j += bsizex) {
       int k, l;
       int si = mmin(i + bsizey, c_h - i);
       int sj = mmin(j + bsizex, c_w - j);
@@ -1541,7 +1541,7 @@ static void find_mismatch(vpx_image_t *img1, vpx_image_t *img2,
   }
   vloc[0] = vloc[1] = vloc[2] = vloc[3] = -1;
   for (i = 0, match = 1; match && i < c_h; i += bsizey) {
-    for (j = 0; j < match && c_w; j += bsizex) {
+    for (j = 0; match && j < c_w; j += bsizex) {
       int k, l;
       int si = mmin(i + bsizey, c_h - i);
       int sj = mmin(j + bsizex, c_w - j);