From 9e81112df2be0a9544f6d9f76106f5deacd9c170 Mon Sep 17 00:00:00 2001 From: James Zern Date: Tue, 21 Apr 2015 22:48:24 -0700 Subject: [PATCH] vp9_decodeframe: simplify compare_tile_buffers return the difference between the 2 buffer sizes rather than exactly -1/0/1. Change-Id: Idf1ccff7088b31845470bcc71bea5927b0598cc7 --- vp9/decoder/vp9_decodeframe.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/vp9/decoder/vp9_decodeframe.c b/vp9/decoder/vp9_decodeframe.c index 264ad4422..81f87cdf7 100644 --- a/vp9/decoder/vp9_decodeframe.c +++ b/vp9/decoder/vp9_decodeframe.c @@ -1086,13 +1086,7 @@ static int tile_worker_hook(TileWorkerData *const tile_data, 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, -- 2.40.0