From b5ed35008d11a74dcba282bc4d1c56c81c8bcadd Mon Sep 17 00:00:00 2001 From: Urvang Joshi Date: Mon, 17 Oct 2016 16:38:05 -0700 Subject: [PATCH] Move STAT_TYPE enum to source file. In the header, all we need is number of stat types, not the names for actual types. Removing it avoids names like 'Y', 'U', 'V' and 'ALL' being visible in all files that include the encoder.h header. Change-Id: I874a73a3cfe6bcb29aedea102077a52addc49af6 --- av1/encoder/encoder.c | 4 ++++ av1/encoder/encoder.h | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c index 82b75dc59..be7587138 100644 --- a/av1/encoder/encoder.c +++ b/av1/encoder/encoder.c @@ -100,6 +100,10 @@ FILE *kf_list; FILE *keyfile; #endif +#if CONFIG_INTERNAL_STATS +typedef enum { Y, U, V, ALL } STAT_TYPE; +#endif // CONFIG_INTERNAL_STATS + static INLINE void Scale2Ratio(AOM_SCALING mode, int *hr, int *hs) { switch (mode) { case NORMAL: diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h index 8d67c6737..20eefe36d 100644 --- a/av1/encoder/encoder.h +++ b/av1/encoder/encoder.h @@ -307,13 +307,15 @@ typedef struct ActiveMap { unsigned char *map; } ActiveMap; -typedef enum { Y, U, V, ALL } STAT_TYPE; +#define NUM_STAT_TYPES 4 // types of stats: Y, U, V and ALL typedef struct IMAGE_STAT { - double stat[ALL + 1]; + double stat[NUM_STAT_TYPES]; double worst; } ImageStat; +#undef NUM_STAT_TYPES + typedef struct { int ref_count; YV12_BUFFER_CONFIG buf; -- 2.50.0