shithub: libvpx

Download patch

ref: e54a5782b947c9840d5a6bedbd357f2886d299c0
parent: 2d4929e340901cece322208f25bea3bc4ddaa440
author: Ronald S. Bultje <[email protected]>
date: Wed Jul 17 13:24:33 EDT 2013

Change break statement in a 2d loop to a return statement.

The break statement only breaks out of the nested loop, not the
top-level loop, so it doesn't always work as intended. Changing it
to a return statement does what's intended.

Change-Id: I585419823b39a04ec8826b1c8a216099b1728ba7

--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -1368,12 +1368,9 @@
         mic->bmi[i + j].as_mode = best_mode;
 
       if (total_rd >= best_rd)
-        break;
+        return INT64_MAX;
     }
   }
-
-  if (total_rd >= best_rd)
-    return INT64_MAX;
 
   *Rate = cost;
   *rate_y = tot_rate_y;