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
This commit is contained in:
@@ -179,17 +179,13 @@ class AV1QuantizeTest : public ::testing::TestWithParam<QuantizeFuncParams> {
|
||||
|
||||
private:
|
||||
TX_SIZE getTxSize(int count) {
|
||||
TX_SIZE txSize = 0;
|
||||
if (16 == count) {
|
||||
txSize = 0;
|
||||
} else if (64 == count) {
|
||||
txSize = 1;
|
||||
} else if (256 == count) {
|
||||
txSize = 2;
|
||||
} else if (1024 == count) {
|
||||
txSize = 3;
|
||||
switch (count) {
|
||||
case 16: return TX_4X4;
|
||||
case 64: return TX_8X8;
|
||||
case 256: return TX_16X16;
|
||||
case 1024: return TX_32X32;
|
||||
default: return TX_4X4;
|
||||
}
|
||||
return txSize;
|
||||
}
|
||||
|
||||
QuantizeFuncParams params_;
|
||||
|
Reference in New Issue
Block a user