]> granicus.if.org Git - libvpx/commitdiff
Rename rans_dec_lut to rans_lut
authorAlex Converse <aconverse@google.com>
Wed, 28 Sep 2016 22:29:17 +0000 (15:29 -0700)
committerAlex Converse <aconverse@google.com>
Wed, 28 Sep 2016 22:35:04 +0000 (15:35 -0700)
It's used in both encoding and decoding. Matches (historical)
implementation in aom/master.

Change-Id: Ib009b6b6023cfe69e99a0a92f3c70f4416fcdb47

aom_dsp/ans.h
av1/common/entropy.c
av1/common/entropy.h
av1/decoder/detokenize.c
av1/encoder/bitstream.c
av1/encoder/cost.c
av1/encoder/cost.h
av1/encoder/tokenize.c
av1/encoder/tokenize.h

index 15fe729eed7be7a4256523f189bbce51f1f546f1..ea99f8bbab22a9cf736f3d8e6d8ae53f11545c63 100644 (file)
@@ -39,8 +39,6 @@ typedef uint16_t AnsP10;
 // This is now just a boring cdf. It starts with an explicit zero.
 // TODO(aconverse): Remove starting zero.
 typedef uint16_t rans_lut[16];
-// TODO(aconverse): Update callers and remove this shim
-#define rans_dec_lut rans_lut
 
 void aom_rans_build_cdf_from_pdf(const AnsP10 token_probs[], rans_lut cdf_tab);
 
index c20a70159b1ee8831320fd5266efad6c29b10a61..c9166dbc3280569d933a6f014e973daf02799a30 100644 (file)
@@ -2801,7 +2801,7 @@ void av1_model_to_full_probs(const aom_prob *model, aom_prob *full) {
 }
 
 #if CONFIG_ANS
-void av1_build_token_cdfs(const aom_prob *pdf_model, rans_dec_lut cdf) {
+void av1_build_token_cdfs(const aom_prob *pdf_model, rans_lut cdf) {
   AnsP10 pdf_tab[ENTROPY_TOKENS - 1];
   assert(pdf_model[2] != 0);
   // TODO(aconverse): Investigate making the precision of the zero and EOB tree
index 4ce502be66ef247b14496f104f14f08f95055215..5418d1246eba51b9eb9a5a81f5fbddc59292cf50 100644 (file)
@@ -192,7 +192,7 @@ extern const aom_prob av1_pareto8_full[COEFF_PROB_MODELS][MODEL_NODES];
 extern const AnsP10 av1_pareto8_token_probs[COEFF_PROB_MODELS]
                                            [ENTROPY_TOKENS - 2];
 
-typedef rans_dec_lut coeff_cdf_model[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS];
+typedef rans_lut coeff_cdf_model[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS];
 #endif  // CONFIG_ANS
 
 typedef aom_prob av1_coeff_probs_model[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS]
index fbcf8fe05b517006bd14380710c3a5c376b7f633..9e076cf4226cd6968308d3651a2970a33a91c8ae 100644 (file)
@@ -265,10 +265,10 @@ static int decode_coefs_ans(const MACROBLOCKD *const xd, PLANE_TYPE type,
   const int tx_size_ctx = txsize_sqr_map[tx_size];
   const aom_prob(*coef_probs)[COEFF_CONTEXTS][UNCONSTRAINED_NODES] =
       fc->coef_probs[tx_size_ctx][type][ref];
-  const rans_dec_lut(*coef_cdfs)[COEFF_CONTEXTS] =
+  const rans_lut(*coef_cdfs)[COEFF_CONTEXTS] =
       fc->coef_cdfs[tx_size_ctx][type][ref];
   const aom_prob *prob;
-  const rans_dec_lut *cdf;
+  const rans_lut *cdf;
   unsigned int(*coef_counts)[COEFF_CONTEXTS][UNCONSTRAINED_NODES + 1];
   unsigned int(*eob_branch_count)[COEFF_CONTEXTS];
   uint8_t token_cache[MAX_TX_SQUARE];
index 763615184067ab710f6ac811795a6dd8b32ee0ae..0936ed1533a3af44cd5a2a4e4a7d0b532b023e49 100644 (file)
@@ -738,7 +738,7 @@ static void pack_mb_tokens(struct BufAnsCoder *ans, const TOKENEXTRA **tp,
 
     if (t != EOB_TOKEN) {
       struct rans_sym s;
-      const rans_dec_lut *token_cdf = p->token_cdf;
+      const rans_lut *token_cdf = p->token_cdf;
       assert(token_cdf);
       s.cum_prob = (*token_cdf)[t - ZERO_TOKEN];
       s.prob = (*token_cdf)[t - ZERO_TOKEN + 1] - s.cum_prob;
index 8acb341e306ba8851731131f5146a2fc63428ffe..9a2ac8e67690ea3fed9737eb2ff1ef96c47fac35 100644 (file)
@@ -145,7 +145,7 @@ static void cost(int *costs, aom_tree tree, const aom_prob *probs, int i,
 
 #if CONFIG_ANS
 void av1_cost_tokens_ans(int *costs, const aom_prob *tree_probs,
-                         const rans_dec_lut token_cdf, int skip_eob) {
+                         const rans_lut token_cdf, int skip_eob) {
   int c_tree = 0;  // Cost of the "tree" nodes EOB and ZERO.
   int i;
   costs[EOB_TOKEN] = av1_cost_bit(tree_probs[0], 0);
index 87652cd1513724f366fe4ee0e3a78cd5bd8ba3ab..448b905522880d14fdf31951267a9a075ab4bfb3 100644 (file)
@@ -60,7 +60,7 @@ void av1_cost_tokens_skip(int *costs, const aom_prob *probs, aom_tree tree);
 
 #if CONFIG_ANS
 void av1_cost_tokens_ans(int *costs, const aom_prob *tree_probs,
-                         const rans_dec_lut token_cdf, int skip_eob);
+                         const rans_lut token_cdf, int skip_eob);
 #endif
 
 #ifdef __cplusplus
index bc462ee47130e105330ab843ac987c6071a147c4..86c659bf4ecc59914ef1e8f2e7a3ac342207d535 100644 (file)
@@ -363,7 +363,7 @@ static void set_entropy_context_b(int plane, int block, int blk_row,
 
 static INLINE void add_token(TOKENEXTRA **t, const aom_prob *context_tree,
 #if CONFIG_ANS
-                             const rans_dec_lut *token_cdf,
+                             const rans_lut *token_cdf,
 #endif  // CONFIG_ANS
                              int32_t extra, uint8_t token,
                              uint8_t skip_eob_node, unsigned int *counts) {
@@ -469,7 +469,7 @@ static void tokenize_b(int plane, int block, int blk_row, int blk_col,
       cpi->common.fc->coef_probs[txsize_sqr_map[tx_size]][type][ref];
 #endif  // CONFIG_ENTROPY
 #if CONFIG_ANS
-  rans_dec_lut(*const coef_cdfs)[COEFF_CONTEXTS] =
+  rans_lut(*const coef_cdfs)[COEFF_CONTEXTS] =
       cpi->common.fc->coef_cdfs[txsize_sqr_map[tx_size]][type][ref];
 #endif  // CONFIG_ANS
   unsigned int(*const eob_branch)[COEFF_CONTEXTS] =
@@ -493,7 +493,7 @@ static void tokenize_b(int plane, int block, int blk_row, int blk_col,
 
     add_token(&t, coef_probs[band[c]][pt],
 #if CONFIG_ANS
-              (const rans_dec_lut *)&coef_cdfs[band[c]][pt],
+              (const rans_lut *)&coef_cdfs[band[c]][pt],
 #endif  // CONFIG_ANS
               extra, (uint8_t)token, (uint8_t)skip_eob, counts[band[c]][pt]);
 
index e608b6d6b6c2ad64606ec54561bf5f2c4d6ccc7b..37f2309a972d35c0a129f4e71e0fd9831258c368 100644 (file)
@@ -37,7 +37,7 @@ typedef struct {
 typedef struct {
   const aom_prob *context_tree;
 #if CONFIG_ANS
-  const rans_dec_lut *token_cdf;
+  const rans_lut *token_cdf;
 #endif  // CONFIG_ANS
   EXTRABIT extra;
   uint8_t token;