shithub: libvpx

Download patch

ref: 9e81112df2be0a9544f6d9f76106f5deacd9c170
parent: 3a7bc161560d9aaeaadf3a6efeb19e1f0768e4e2
author: James Zern <jzern@google.com>
date: Tue Apr 21 18:48:24 EDT 2015

vp9_decodeframe: simplify compare_tile_buffers

return the difference between the 2 buffer sizes rather than exactly
-1/0/1.

Change-Id: Idf1ccff7088b31845470bcc71bea5927b0598cc7

--- a/vp9/decoder/vp9_decodeframe.c
+++ b/vp9/decoder/vp9_decodeframe.c
@@ -1086,13 +1086,7 @@
 static int compare_tile_buffers(const void *a, const void *b) {
   const TileBuffer *const buf1 = (const TileBuffer*)a;
   const TileBuffer *const buf2 = (const TileBuffer*)b;
-  if (buf1->size < buf2->size) {
-    return 1;
-  } else if (buf1->size == buf2->size) {
-    return 0;
-  } else {
-    return -1;
-  }
+  return (int)(buf2->size - buf1->size);
 }
 
 static const uint8_t *decode_tiles_mt(VP9Decoder *pbi,