From c1981bdda0aa96c48d7eb574085f91cc983838f8 Mon Sep 17 00:00:00 2001 From: Dmitry Kovalev Date: Mon, 14 Apr 2014 15:11:13 -0700 Subject: [PATCH] Using anonymous enum instead of macros. Change-Id: I5ed360585dae2c9fea6c32058dbfb8ec07700677 --- vp9/encoder/vp9_speed_features.c | 51 ++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/vp9/encoder/vp9_speed_features.c b/vp9/encoder/vp9_speed_features.c index adad800b6..0dbb0814b 100644 --- a/vp9/encoder/vp9_speed_features.c +++ b/vp9/encoder/vp9_speed_features.c @@ -13,32 +13,39 @@ #include "vp9/encoder/vp9_onyx_int.h" #include "vp9/encoder/vp9_speed_features.h" -#define ALL_INTRA_MODES ((1 << DC_PRED) | \ - (1 << V_PRED) | (1 << H_PRED) | \ - (1 << D45_PRED) | (1 << D135_PRED) | \ - (1 << D117_PRED) | (1 << D153_PRED) | \ - (1 << D207_PRED) | (1 << D63_PRED) | \ - (1 << TM_PRED)) -#define INTRA_DC_ONLY (1 << DC_PRED) -#define INTRA_DC_TM ((1 << TM_PRED) | (1 << DC_PRED)) -#define INTRA_DC_H_V ((1 << DC_PRED) | (1 << V_PRED) | (1 << H_PRED)) -#define INTRA_DC_TM_H_V (INTRA_DC_TM | (1 << V_PRED) | (1 << H_PRED)) +enum { + ALL_INTRA_MODES = (1 << DC_PRED) | + (1 << V_PRED) | (1 << H_PRED) | + (1 << D45_PRED) | (1 << D135_PRED) | + (1 << D117_PRED) | (1 << D153_PRED) | + (1 << D207_PRED) | (1 << D63_PRED) | + (1 << TM_PRED), -// Masks for partially or completely disabling split mode -#define DISABLE_ALL_INTER_SPLIT ((1 << THR_COMP_GA) | \ - (1 << THR_COMP_LA) | \ - (1 << THR_ALTR) | \ - (1 << THR_GOLD) | \ - (1 << THR_LAST)) + INTRA_DC_ONLY = (1 << DC_PRED), -#define DISABLE_ALL_SPLIT ((1 << THR_INTRA) | DISABLE_ALL_INTER_SPLIT) + INTRA_DC_TM = (1 << TM_PRED) | (1 << DC_PRED), -#define DISABLE_COMPOUND_SPLIT ((1 << THR_COMP_GA) | (1 << THR_COMP_LA)) + INTRA_DC_H_V = (1 << DC_PRED) | (1 << V_PRED) | (1 << H_PRED), -#define LAST_AND_INTRA_SPLIT_ONLY ((1 << THR_COMP_GA) | \ - (1 << THR_COMP_LA) | \ - (1 << THR_ALTR) | \ - (1 << THR_GOLD)) + INTRA_DC_TM_H_V = INTRA_DC_TM | (1 << V_PRED) | (1 << H_PRED) +}; + +enum { + DISABLE_ALL_INTER_SPLIT = (1 << THR_COMP_GA) | + (1 << THR_COMP_LA) | + (1 << THR_ALTR) | + (1 << THR_GOLD) | + (1 << THR_LAST), + + DISABLE_ALL_SPLIT = (1 << THR_INTRA) | DISABLE_ALL_INTER_SPLIT, + + DISABLE_COMPOUND_SPLIT = (1 << THR_COMP_GA) | (1 << THR_COMP_LA), + + LAST_AND_INTRA_SPLIT_ONLY = (1 << THR_COMP_GA) | + (1 << THR_COMP_LA) | + (1 << THR_ALTR) | + (1 << THR_GOLD) +}; static void set_good_speed_feature(VP9_COMP *cpi, VP9_COMMON *cm, SPEED_FEATURES *sf, int speed) {