| commit | cb586f3ba922e647e7ed9814f6c0f4d133f381fe | [log] [tgz] |
|---|---|---|
| author | Urvang Joshi <urvang@google.com> | Tue Sep 20 11:36:33 2016 -0700 |
| committer | Urvang Joshi <urvang@google.com> | Thu Sep 22 09:44:51 2016 -0700 |
| tree | 1fdff19a1d268487ee293989690a72dad5a7f00f | |
| parent | 7a9ad9c83f7a1f562bc464e88b640901631c4aa1 [diff] [blame] |
enums.h: Combine related #defines into packed enums. enums for BLOCK_SIZE, TX_SIZE and PREDICTION_MODE. Note: These were converted to #defines earlier to save on memory: https://chromium-review.googlesource.com/#/c/269854/ But we, instead, use attribute 'packed' (see here: https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#Common-Type-Attributes) to ensure that these enums use the smallest possible integer type, and so use smallest memory when used in structs/arrays etc. Change-Id: If1fc136686b28847109c9f3a06f8728165e7e475
diff --git a/av1/encoder/rd.c b/av1/encoder/rd.c index b56e3c1..0c80174 100644 --- a/av1/encoder/rd.c +++ b/av1/encoder/rd.c
@@ -1069,7 +1069,7 @@ int mode; for (mode = 0; mode < top_mode; ++mode) { const BLOCK_SIZE min_size = AOMMAX(bsize - 1, BLOCK_4X4); - const BLOCK_SIZE max_size = AOMMIN(bsize + 2, cm->sb_size); + const BLOCK_SIZE max_size = AOMMIN(bsize + 2, (int)cm->sb_size); BLOCK_SIZE bs; for (bs = min_size; bs <= max_size; ++bs) { int *const fact = &factor_buf[bs][mode];