Only build aom_read/write_symbol if CONFIG_EC_MULTISYMBOL Change-Id: If86c7220ac9199a59e605dc43d42cc3db26cf8bd
diff --git a/aom_dsp/bitreader.h b/aom_dsp/bitreader.h index 3907849..00ea158 100644 --- a/aom_dsp/bitreader.h +++ b/aom_dsp/bitreader.h
@@ -203,6 +203,7 @@ return ret; } +#if CONFIG_EC_MULTISYMBOL static INLINE int aom_read_symbol_(aom_reader *r, aom_cdf_prob *cdf, int nsymbs ACCT_STR_PARAM) { int ret; @@ -212,12 +213,11 @@ #elif CONFIG_DAALA_EC ret = daala_read_symbol(r, cdf, nsymbs); #else - (void)r; - (void)cdf; - (void)nsymbs; - assert(0 && "Unsupported bitreader operation"); - ret = -1; +#error \ + "CONFIG_EC_MULTISYMBOL is selected without a valid backing entropy " \ + "coder. Enable daala_ec or ans for a valid configuration." #endif + #if CONFIG_EC_ADAPT update_cdf(cdf, ret, nsymbs); #endif @@ -227,6 +227,7 @@ #endif return ret; } +#endif // CONFIG_EC_MULTISYMBOL #ifdef __cplusplus } // extern "C"
diff --git a/aom_dsp/bitwriter.h b/aom_dsp/bitwriter.h index 4ece930..7fcd9e9 100644 --- a/aom_dsp/bitwriter.h +++ b/aom_dsp/bitwriter.h
@@ -98,6 +98,7 @@ #endif } +#if CONFIG_EC_MULTISYMBOL static INLINE void aom_write_symbol(aom_writer *w, int symb, aom_cdf_prob *cdf, int nsymbs) { #if CONFIG_RANS @@ -110,17 +111,16 @@ #elif CONFIG_DAALA_EC daala_write_symbol(w, symb, cdf, nsymbs); #else - (void)w; - (void)symb; - (void)cdf; - (void)nsymbs; - assert(0 && "Unsupported bitwriter operation"); +#error \ + "CONFIG_EC_MULTISYMBOL is selected without a valid backing entropy " \ + "coder. Enable daala_ec or ans for a valid configuration." #endif #if CONFIG_EC_ADAPT update_cdf(cdf, symb, nsymbs); #endif } +#endif // CONFIG_EC_MULTISYMBOL #ifdef __cplusplus } // extern "C"