[non-normative, cfl] Fix build with cfl disabled As of commit 2d276b39, reconintra.c cannot compile with CfL disabled, since the UV_* versions of the intra modes are not defined. Fix this by moving the UV_PREDICTION_MODE enum outside of its enclosing #if CONFIG_CFL block. This requires a couple of minor adjustments elsewhere in the code. Change-Id: Id8d10ebfa627d8528719b557933929719d863a87
diff --git a/av1/common/blockd.h b/av1/common/blockd.h index 5011a9c..1044f3a 100644 --- a/av1/common/blockd.h +++ b/av1/common/blockd.h
@@ -338,7 +338,6 @@ } #endif -#if CONFIG_CFL static INLINE PREDICTION_MODE get_uv_mode(UV_PREDICTION_MODE mode) { assert(mode < UV_INTRA_MODES); static const PREDICTION_MODE uv2y[] = { @@ -355,15 +354,14 @@ SMOOTH_V_PRED, // UV_SMOOTH_V_PRED SMOOTH_H_PRED, // UV_SMOOTH_H_PRED PAETH_PRED, // UV_PAETH_PRED +#if CONFIG_CFL DC_PRED, // UV_CFL_PRED +#endif // CONFIG_CFL INTRA_INVALID, // UV_INTRA_MODES INTRA_INVALID, // UV_MODE_INVALID }; return uv2y[mode]; } -#else -static INLINE PREDICTION_MODE get_uv_mode(PREDICTION_MODE mode) { return mode; } -#endif // CONFIG_CFL static INLINE int is_inter_block(const MB_MODE_INFO *mbmi) { #if CONFIG_INTRABC
diff --git a/av1/common/enums.h b/av1/common/enums.h index c962f79..ac64664 100644 --- a/av1/common/enums.h +++ b/av1/common/enums.h
@@ -472,7 +472,6 @@ INTRA_INVALID = MB_MODE_COUNT // For uv_mode in inter blocks } PREDICTION_MODE; -#if CONFIG_CFL // TODO(ltrudeau) Do we really want to pack this? // TODO(ltrudeau) Do we match with PREDICTION_MODE? typedef enum ATTRIBUTE_PACKED { @@ -489,16 +488,12 @@ UV_SMOOTH_V_PRED, // Vertical interpolation UV_SMOOTH_H_PRED, // Horizontal interpolation UV_PAETH_PRED, // Predict from the direction of smallest gradient - UV_CFL_PRED, // Chroma-from-Luma +#if CONFIG_CFL + UV_CFL_PRED, // Chroma-from-Luma +#endif // CONFIG_CFL UV_INTRA_MODES, UV_MODE_INVALID, // For uv_mode in inter blocks } UV_PREDICTION_MODE; -#else -#define UV_INTRA_MODES (INTRA_MODES) -#define UV_PREDICTION_MODE PREDICTION_MODE -#define UV_DC_PRED (DC_PRED) -#define UV_MODE_INVALID (INTRA_INVALID) -#endif // CONFIG_CFL typedef enum ATTRIBUTE_PACKED { SIMPLE_TRANSLATION,
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c index db320e6..2c62bc3 100644 --- a/av1/decoder/decodemv.c +++ b/av1/decoder/decodemv.c
@@ -164,7 +164,7 @@ aom_read_symbol(r, ec_ctx->uv_mode_cdf[cfl_allowed][y_mode], UV_INTRA_MODES - !cfl_allowed, ACCT_STR); #else - read_intra_mode(r, ec_ctx->uv_mode_cdf[y_mode]); + (UV_PREDICTION_MODE)read_intra_mode(r, ec_ctx->uv_mode_cdf[y_mode]); #endif // CONFIG_CFL return uv_mode; }