Refactor: Add macro LOG_SWITCHABLE_FILTERS

Change-Id: I7593ff2f8949d8bc26ca1c8577faaefb09640b59
This commit is contained in:
Angie Chiang 2016-10-24 12:24:44 -07:00
Родитель 4579c5e458
Коммит 6305abe114
3 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -33,8 +33,12 @@ extern "C" {
#define SUPPORT_NONINTERPOLATING_FILTERS 0 /* turn on for experimentation */ #define SUPPORT_NONINTERPOLATING_FILTERS 0 /* turn on for experimentation */
#define SWITCHABLE_FILTERS 5 /* Number of switchable filters */ #define SWITCHABLE_FILTERS 5 /* Number of switchable filters */
#define LOG_SWITCHABLE_FILTERS \
3 /* (1 << LOG_SWITCHABLE_FILTERS) > SWITCHABLE_FILTERS */
#else #else
#define SWITCHABLE_FILTERS 3 /* Number of switchable filters */ #define SWITCHABLE_FILTERS 3 /* Number of switchable filters */
#define LOG_SWITCHABLE_FILTERS \
2 /* (1 << LOG_SWITCHABLE_FILTERS) > SWITCHABLE_FILTERS */
#endif // CONFIG_EXT_INTERP #endif // CONFIG_EXT_INTERP
#define USE_TEMPORALFILTER_12TAP 1 #define USE_TEMPORALFILTER_12TAP 1

Просмотреть файл

@ -2239,7 +2239,7 @@ static void setup_segmentation_dequant(AV1_COMMON *const cm) {
static InterpFilter read_interp_filter(struct aom_read_bit_buffer *rb) { static InterpFilter read_interp_filter(struct aom_read_bit_buffer *rb) {
return aom_rb_read_bit(rb) ? SWITCHABLE return aom_rb_read_bit(rb) ? SWITCHABLE
: aom_rb_read_literal(rb, 2 + CONFIG_EXT_INTERP); : aom_rb_read_literal(rb, LOG_SWITCHABLE_FILTERS);
} }
static void setup_render_size(AV1_COMMON *cm, struct aom_read_bit_buffer *rb) { static void setup_render_size(AV1_COMMON *cm, struct aom_read_bit_buffer *rb) {

Просмотреть файл

@ -2915,7 +2915,7 @@ static void write_interp_filter(InterpFilter filter,
struct aom_write_bit_buffer *wb) { struct aom_write_bit_buffer *wb) {
aom_wb_write_bit(wb, filter == SWITCHABLE); aom_wb_write_bit(wb, filter == SWITCHABLE);
if (filter != SWITCHABLE) if (filter != SWITCHABLE)
aom_wb_write_literal(wb, filter, 2 + CONFIG_EXT_INTERP); aom_wb_write_literal(wb, filter, LOG_SWITCHABLE_FILTERS);
} }
static void fix_interp_filter(AV1_COMMON *cm, FRAME_COUNTS *counts) { static void fix_interp_filter(AV1_COMMON *cm, FRAME_COUNTS *counts) {