shithub: libvpx

Download patch

ref: 1e58bdb41d886be6246f85913b2cd5ec6aae57bd
parent: cb240c1c41d30a386ead01ffa473c2561908e78b
author: Yaowu Xu <yaowu@google.com>
date: Mon Nov 19 11:57:02 EST 2018

Minor simplifications

Change-Id: I231e863f838f449335236c174b74bd33dfdd8b19

--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -6140,16 +6140,12 @@
   ++*size;
   c = *size - 1;
   p = c >> 1;
-  while (c > 0) {
-    if (heap[c]->feature_score > heap[p]->feature_score) {
-      tmp = heap[p];
-      heap[p] = heap[c];
-      heap[c] = tmp;
-      c = p;
-      p = c >> 1;
-    } else {
-      break;
-    }
+  while (c > 0 && heap[c]->feature_score > heap[p]->feature_score) {
+    tmp = heap[p];
+    heap[p] = heap[c];
+    heap[c] = tmp;
+    c = p;
+    p >>= 1;
   }
 }