]> granicus.if.org Git - libvpx/commitdiff
Rename aom_write_tree_cdf() to aom_write_symbol().
authorNathan E. Egge <negge@mozilla.com>
Mon, 25 Jul 2016 14:23:33 +0000 (10:23 -0400)
committerYaowu Xu <yaowu@google.com>
Mon, 17 Oct 2016 18:54:51 +0000 (11:54 -0700)
Change-Id: I7c088c55f1c461063976d5bd84ff2026c4f3bc69

aom_dsp/bitwriter.h
aom_dsp/daalaboolwriter.h
av1/encoder/bitstream.c

index d2569329a309bc05f4dff619073cda68da62a2bd..4b083fa0af7b2c85e7036c90dea0db606298f5c6 100644 (file)
@@ -107,19 +107,8 @@ static INLINE void aom_write_symbol(aom_writer *w, int symb,
   s.cum_prob = symb > 0 ? cdf[symb - 1] : 0;
   s.prob = cdf[symb] - s.cum_prob;
   buf_rans_write(w, &s);
-#else
-  (void)w;
-  (void)symb;
-  (void)cdf;
-  (void)nsymbs;
-  assert(0 && "Unsupported bitwriter operation");
-#endif
-}
-
-static INLINE void aom_write_tree_cdf(aom_writer *w, int symb,
-                                      const uint16_t *cdf, int nsymbs) {
-#if CONFIG_DAALA_EC
-  daala_write_tree_cdf(w, symb, cdf, nsymbs);
+#elif CONFIG_DAALA_EC
+  daala_write_symbol(w, symb, cdf, nsymbs);
 #else
   (void)w;
   (void)symb;
index c71b12e74952bdc0a27bf2ec058cd60589bd209b..c80cd4f42112cfda01e781872c58cd7a8c468f17 100644 (file)
@@ -78,8 +78,8 @@ static INLINE void daala_write_tree_bits(daala_writer *w,
   } while (len);
 }
 
-static INLINE void daala_write_tree_cdf(daala_writer *w, int symb,
-                                        const uint16_t *cdf, int nsymbs) {
+static INLINE void daala_write_symbol(daala_writer *w, int symb,
+                                      const uint16_t *cdf, int nsymbs) {
   od_ec_encode_cdf_q15(&w->ec, symb, cdf, nsymbs);
 }
 
index 6b8004c4dbcde5bfd397bcb23fb0dd1972fd7e4b..cca104bc6b4e7c483398a1c67b5552c2e08d3b61 100644 (file)
@@ -992,9 +992,8 @@ static void write_switchable_interp_filter(AV1_COMP *cpi, const MACROBLOCKD *xd,
     {
       const int ctx = av1_get_pred_context_switchable_interp(xd);
 #if CONFIG_DAALA_EC
-      aom_write_tree_cdf(w, av1_switchable_interp_ind[mbmi->interp_filter],
-                         cm->fc->switchable_interp_cdf[ctx],
-                         SWITCHABLE_FILTERS);
+      aom_write_symbol(w, av1_switchable_interp_ind[mbmi->interp_filter],
+                       cm->fc->switchable_interp_cdf[ctx], SWITCHABLE_FILTERS);
 #else
       av1_write_token(w, av1_switchable_interp_tree,
                       cm->fc->switchable_interp_prob[ctx],
@@ -1463,8 +1462,8 @@ static void pack_inter_mode_mvs(AV1_COMP *cpi, const MODE_INFO *mi,
         !segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_SKIP)) {
       if (is_inter) {
 #if CONFIG_DAALA_EC
-        aom_write_tree_cdf(w, av1_ext_tx_ind[mbmi->tx_type],
-                           cm->fc->inter_ext_tx_cdf[mbmi->tx_size], TX_TYPES);
+        aom_write_symbol(w, av1_ext_tx_ind[mbmi->tx_type],
+                         cm->fc->inter_ext_tx_cdf[mbmi->tx_size], TX_TYPES);
 #else
         av1_write_token(w, av1_ext_tx_tree,
                         cm->fc->inter_ext_tx_prob[mbmi->tx_size],
@@ -1472,7 +1471,7 @@ static void pack_inter_mode_mvs(AV1_COMP *cpi, const MODE_INFO *mi,
 #endif
       } else {
 #if CONFIG_DAALA_EC
-        aom_write_tree_cdf(
+        aom_write_symbol(
             w, av1_ext_tx_ind[mbmi->tx_type],
             cm->fc->intra_ext_tx_cdf[mbmi->tx_size]
                                     [intra_mode_to_tx_type_context[mbmi->mode]],
@@ -1747,7 +1746,7 @@ static void write_partition(const AV1_COMMON *const cm,
                       &ext_partition_encodings[p]);
 #else
 #if CONFIG_DAALA_EC
-    aom_write_tree_cdf(w, p, cm->fc->partition_cdf[ctx], PARTITION_TYPES);
+    aom_write_symbol(w, p, cm->fc->partition_cdf[ctx], PARTITION_TYPES);
 #else
     av1_write_token(w, av1_partition_tree, probs, &partition_encodings[p]);
 #endif