Split aom_write_cdf() from aom_write_symbol().

Separate the aom_write_cdf() functionality from aom_write_symbol() which
 can optionally adapt the cdf when run with --enable-ec_adapt.

Change-Id: Ibc58690eddb647d69f08d72f0f0712779aab11d1
diff --git a/aom_dsp/bitwriter.h b/aom_dsp/bitwriter.h
index 752453d..945ac20 100644
--- a/aom_dsp/bitwriter.h
+++ b/aom_dsp/bitwriter.h
@@ -183,8 +183,8 @@
 }
 
 #if CONFIG_EC_MULTISYMBOL
-static INLINE void aom_write_symbol(aom_writer *w, int symb, aom_cdf_prob *cdf,
-                                    int nsymbs) {
+static INLINE void aom_write_cdf(aom_writer *w, int symb, aom_cdf_prob *cdf,
+                                 int nsymbs) {
 #if CONFIG_ANS
   struct rans_sym s;
   (void)nsymbs;
@@ -199,16 +199,19 @@
     "CONFIG_EC_MULTISYMBOL is selected without a valid backing entropy " \
   "coder. Enable daala_ec or ans for a valid configuration."
 #endif
+}
 
+static INLINE void aom_write_symbol(aom_writer *w, int symb, aom_cdf_prob *cdf,
+                                    int nsymbs) {
+  aom_write_cdf(w, symb, cdf, nsymbs);
 #if CONFIG_EC_ADAPT
   update_cdf(cdf, symb, nsymbs);
 #endif
 }
 
 #if CONFIG_PVQ
-static INLINE void aom_write_symbol_unscaled(aom_writer *w, int symb,
-                                             const aom_cdf_prob *cdf,
-                                             int nsymbs) {
+static INLINE void aom_write_cdf_unscaled(aom_writer *w, int symb,
+                                          const aom_cdf_prob *cdf, int nsymbs) {
 #if CONFIG_DAALA_EC
   od_ec_encode_cdf_unscaled(&w->ec, symb, cdf, nsymbs);
 #else
diff --git a/av1/encoder/generic_encoder.c b/av1/encoder/generic_encoder.c
index 25b6f50..42a713a 100644
--- a/av1/encoder/generic_encoder.c
+++ b/av1/encoder/generic_encoder.c
@@ -47,7 +47,7 @@
       cdf[i] = cdf[i]*32768/ft;
     }
   }
-  aom_write_symbol(w, val, cdf, n);
+  aom_write_cdf(w, val, cdf, n);
   aom_cdf_adapt_q15(val, cdf, n, count, rate);
 }
 
@@ -107,9 +107,9 @@
   xs = (x + (1 << shift >> 1)) >> shift;
   ms = (max + (1 << shift >> 1)) >> shift;
   OD_ASSERT(max == -1 || xs <= ms);
-  if (max == -1) aom_write_symbol_unscaled(w, OD_MINI(15, xs), cdf, 16);
+  if (max == -1) aom_write_cdf_unscaled(w, OD_MINI(15, xs), cdf, 16);
   else {
-    aom_write_symbol_unscaled(w, OD_MINI(15, xs), cdf, OD_MINI(ms + 1, 16));
+    aom_write_cdf_unscaled(w, OD_MINI(15, xs), cdf, OD_MINI(ms + 1, 16));
   }
   if (xs >= 15) {
     int e;