diff options
Diffstat (limited to 'vp9/encoder')
-rw-r--r-- | vp9/encoder/vp9_bitstream.c | 2 | ||||
-rw-r--r-- | vp9/encoder/vp9_cost.c | 8 | ||||
-rw-r--r-- | vp9/encoder/vp9_cost.h | 12 | ||||
-rw-r--r-- | vp9/encoder/vp9_encodemv.c | 2 | ||||
-rw-r--r-- | vp9/encoder/vp9_tokenize.c | 38 | ||||
-rw-r--r-- | vp9/encoder/vp9_tokenize.h | 4 | ||||
-rw-r--r-- | vp9/encoder/vp9_treewriter.c | 10 | ||||
-rw-r--r-- | vp9/encoder/vp9_treewriter.h | 10 |
8 files changed, 43 insertions, 43 deletions
diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c index 06454a95a..b974eaefa 100644 --- a/vp9/encoder/vp9_bitstream.c +++ b/vp9/encoder/vp9_bitstream.c @@ -61,7 +61,7 @@ static void encode_unsigned_max(struct vp9_write_bit_buffer *wb, vp9_wb_write_literal(wb, data, get_unsigned_bits(max)); } -static void prob_diff_update(const vp9_tree_index *tree, +static void prob_diff_update(const vpx_tree_index *tree, vpx_prob probs[/*n - 1*/], const unsigned int counts[/*n - 1*/], int n, vp9_writer *w) { diff --git a/vp9/encoder/vp9_cost.c b/vp9/encoder/vp9_cost.c index 245df9a91..e2fbb34aa 100644 --- a/vp9/encoder/vp9_cost.c +++ b/vp9/encoder/vp9_cost.c @@ -35,14 +35,14 @@ const unsigned int vp9_prob_cost[256] = { 22, 21, 19, 18, 16, 15, 13, 12, 10, 9, 7, 6, 4, 3, 1, 1}; -static void cost(int *costs, vp9_tree tree, const vpx_prob *probs, +static void cost(int *costs, vpx_tree tree, const vpx_prob *probs, int i, int c) { const vpx_prob prob = probs[i / 2]; int b; for (b = 0; b <= 1; ++b) { const int cc = c + vp9_cost_bit(prob, b); - const vp9_tree_index ii = tree[i + b]; + const vpx_tree_index ii = tree[i + b]; if (ii <= 0) costs[-ii] = cc; @@ -51,11 +51,11 @@ static void cost(int *costs, vp9_tree tree, const vpx_prob *probs, } } -void vp9_cost_tokens(int *costs, const vpx_prob *probs, vp9_tree tree) { +void vp9_cost_tokens(int *costs, const vpx_prob *probs, vpx_tree tree) { cost(costs, tree, probs, 0, 0); } -void vp9_cost_tokens_skip(int *costs, const vpx_prob *probs, vp9_tree tree) { +void vp9_cost_tokens_skip(int *costs, const vpx_prob *probs, vpx_tree tree) { assert(tree[0] <= 0 && tree[1] > 0); costs[-tree[0]] = vp9_cost_bit(probs[0], 0); diff --git a/vp9/encoder/vp9_cost.h b/vp9/encoder/vp9_cost.h index 657f65f30..eac74c40b 100644 --- a/vp9/encoder/vp9_cost.h +++ b/vp9/encoder/vp9_cost.h @@ -21,9 +21,9 @@ extern const unsigned int vp9_prob_cost[256]; #define vp9_cost_zero(prob) (vp9_prob_cost[prob]) -#define vp9_cost_one(prob) vp9_cost_zero(vp9_complement(prob)) +#define vp9_cost_one(prob) vp9_cost_zero(vpx_complement(prob)) -#define vp9_cost_bit(prob, bit) vp9_cost_zero((bit) ? vp9_complement(prob) \ +#define vp9_cost_bit(prob, bit) vp9_cost_zero((bit) ? vpx_complement(prob) \ : (prob)) static INLINE unsigned int cost_branch256(const unsigned int ct[2], @@ -31,10 +31,10 @@ static INLINE unsigned int cost_branch256(const unsigned int ct[2], return ct[0] * vp9_cost_zero(p) + ct[1] * vp9_cost_one(p); } -static INLINE int treed_cost(vp9_tree tree, const vpx_prob *probs, +static INLINE int treed_cost(vpx_tree tree, const vpx_prob *probs, int bits, int len) { int cost = 0; - vp9_tree_index i = 0; + vpx_tree_index i = 0; do { const int bit = (bits >> --len) & 1; @@ -45,8 +45,8 @@ static INLINE int treed_cost(vp9_tree tree, const vpx_prob *probs, return cost; } -void vp9_cost_tokens(int *costs, const vpx_prob *probs, vp9_tree tree); -void vp9_cost_tokens_skip(int *costs, const vpx_prob *probs, vp9_tree tree); +void vp9_cost_tokens(int *costs, const vpx_prob *probs, vpx_tree tree); +void vp9_cost_tokens_skip(int *costs, const vpx_prob *probs, vpx_tree tree); #ifdef __cplusplus } // extern "C" diff --git a/vp9/encoder/vp9_encodemv.c b/vp9/encoder/vp9_encodemv.c index 2e106d22a..39129735f 100644 --- a/vp9/encoder/vp9_encodemv.c +++ b/vp9/encoder/vp9_encodemv.c @@ -146,7 +146,7 @@ static int update_mv(vp9_writer *w, const unsigned int ct[2], vpx_prob *cur_p, return update; } -static void write_mv_update(const vp9_tree_index *tree, +static void write_mv_update(const vpx_tree_index *tree, vpx_prob probs[/*n - 1*/], const unsigned int counts[/*n - 1*/], int n, vp9_writer *w) { diff --git a/vp9/encoder/vp9_tokenize.c b/vp9/encoder/vp9_tokenize.c index 978311939..a1c076af5 100644 --- a/vp9/encoder/vp9_tokenize.c +++ b/vp9/encoder/vp9_tokenize.c @@ -52,7 +52,7 @@ const TOKENVALUE *vp9_dct_cat_lt_10_value_tokens = dct_cat_lt_10_value_tokens + / 2; // Array indices are identical to previously-existing CONTEXT_NODE indices -const vp9_tree_index vp9_coef_tree[TREE_SIZE(ENTROPY_TOKENS)] = { +const vpx_tree_index vp9_coef_tree[TREE_SIZE(ENTROPY_TOKENS)] = { -EOB_TOKEN, 2, // 0 = EOB -ZERO_TOKEN, 4, // 1 = ZERO -ONE_TOKEN, 6, // 2 = ONE @@ -66,12 +66,12 @@ const vp9_tree_index vp9_coef_tree[TREE_SIZE(ENTROPY_TOKENS)] = { -CATEGORY5_TOKEN, -CATEGORY6_TOKEN // 10 = CAT_FIVE }; -static const vp9_tree_index cat1[2] = {0, 0}; -static const vp9_tree_index cat2[4] = {2, 2, 0, 0}; -static const vp9_tree_index cat3[6] = {2, 2, 4, 4, 0, 0}; -static const vp9_tree_index cat4[8] = {2, 2, 4, 4, 6, 6, 0, 0}; -static const vp9_tree_index cat5[10] = {2, 2, 4, 4, 6, 6, 8, 8, 0, 0}; -static const vp9_tree_index cat6[28] = {2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, +static const vpx_tree_index cat1[2] = {0, 0}; +static const vpx_tree_index cat2[4] = {2, 2, 0, 0}; +static const vpx_tree_index cat3[6] = {2, 2, 4, 4, 0, 0}; +static const vpx_tree_index cat4[8] = {2, 2, 4, 4, 6, 6, 0, 0}; +static const vpx_tree_index cat5[10] = {2, 2, 4, 4, 6, 6, 8, 8, 0, 0}; +static const vpx_tree_index cat6[28] = {2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20, 20, 22, 22, 24, 24, 26, 26, 0, 0}; static const int16_t zero_cost[] = {0}; @@ -367,20 +367,20 @@ const int16_t vp9_cat6_high12_high_cost[2048] = { #endif #if CONFIG_VP9_HIGHBITDEPTH -static const vp9_tree_index cat1_high10[2] = {0, 0}; -static const vp9_tree_index cat2_high10[4] = {2, 2, 0, 0}; -static const vp9_tree_index cat3_high10[6] = {2, 2, 4, 4, 0, 0}; -static const vp9_tree_index cat4_high10[8] = {2, 2, 4, 4, 6, 6, 0, 0}; -static const vp9_tree_index cat5_high10[10] = {2, 2, 4, 4, 6, 6, 8, 8, 0, 0}; -static const vp9_tree_index cat6_high10[32] = {2, 2, 4, 4, 6, 6, 8, 8, 10, 10, +static const vpx_tree_index cat1_high10[2] = {0, 0}; +static const vpx_tree_index cat2_high10[4] = {2, 2, 0, 0}; +static const vpx_tree_index cat3_high10[6] = {2, 2, 4, 4, 0, 0}; +static const vpx_tree_index cat4_high10[8] = {2, 2, 4, 4, 6, 6, 0, 0}; +static const vpx_tree_index cat5_high10[10] = {2, 2, 4, 4, 6, 6, 8, 8, 0, 0}; +static const vpx_tree_index cat6_high10[32] = {2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20, 20, 22, 22, 24, 24, 26, 26, 28, 28, 30, 30, 0, 0}; -static const vp9_tree_index cat1_high12[2] = {0, 0}; -static const vp9_tree_index cat2_high12[4] = {2, 2, 0, 0}; -static const vp9_tree_index cat3_high12[6] = {2, 2, 4, 4, 0, 0}; -static const vp9_tree_index cat4_high12[8] = {2, 2, 4, 4, 6, 6, 0, 0}; -static const vp9_tree_index cat5_high12[10] = {2, 2, 4, 4, 6, 6, 8, 8, 0, 0}; -static const vp9_tree_index cat6_high12[36] = {2, 2, 4, 4, 6, 6, 8, 8, 10, 10, +static const vpx_tree_index cat1_high12[2] = {0, 0}; +static const vpx_tree_index cat2_high12[4] = {2, 2, 0, 0}; +static const vpx_tree_index cat3_high12[6] = {2, 2, 4, 4, 0, 0}; +static const vpx_tree_index cat4_high12[8] = {2, 2, 4, 4, 6, 6, 0, 0}; +static const vpx_tree_index cat5_high12[10] = {2, 2, 4, 4, 6, 6, 8, 8, 0, 0}; +static const vpx_tree_index cat6_high12[36] = {2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20, 20, 22, 22, 24, 24, 26, 26, 28, 28, 30, 30, 32, 32, 34, 34, 0, 0}; #endif diff --git a/vp9/encoder/vp9_tokenize.h b/vp9/encoder/vp9_tokenize.h index 417ab2710..11b78ba33 100644 --- a/vp9/encoder/vp9_tokenize.h +++ b/vp9/encoder/vp9_tokenize.h @@ -41,8 +41,8 @@ typedef struct { uint8_t skip_eob_node; } TOKENEXTRA; -extern const vp9_tree_index vp9_coef_tree[]; -extern const vp9_tree_index vp9_coef_con_tree[]; +extern const vpx_tree_index vp9_coef_tree[]; +extern const vpx_tree_index vp9_coef_con_tree[]; extern const struct vp9_token vp9_coef_encodings[]; int vp9_is_skippable_in_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane); diff --git a/vp9/encoder/vp9_treewriter.c b/vp9/encoder/vp9_treewriter.c index bb04b4025..0fc078e0a 100644 --- a/vp9/encoder/vp9_treewriter.c +++ b/vp9/encoder/vp9_treewriter.c @@ -10,13 +10,13 @@ #include "vp9/encoder/vp9_treewriter.h" -static void tree2tok(struct vp9_token *tokens, const vp9_tree_index *tree, +static void tree2tok(struct vp9_token *tokens, const vpx_tree_index *tree, int i, int v, int l) { v += v; ++l; do { - const vp9_tree_index j = tree[i++]; + const vpx_tree_index j = tree[i++]; if (j <= 0) { tokens[-j].value = v; tokens[-j].len = l; @@ -27,11 +27,11 @@ static void tree2tok(struct vp9_token *tokens, const vp9_tree_index *tree, } void vp9_tokens_from_tree(struct vp9_token *tokens, - const vp9_tree_index *tree) { + const vpx_tree_index *tree) { tree2tok(tokens, tree, 0, 0, 0); } -static unsigned int convert_distribution(unsigned int i, vp9_tree tree, +static unsigned int convert_distribution(unsigned int i, vpx_tree tree, unsigned int branch_ct[][2], const unsigned int num_events[]) { unsigned int left, right; @@ -51,7 +51,7 @@ static unsigned int convert_distribution(unsigned int i, vp9_tree tree, return left + right; } -void vp9_tree_probs_from_distribution(vp9_tree tree, +void vp9_tree_probs_from_distribution(vpx_tree tree, unsigned int branch_ct[/* n-1 */][2], const unsigned int num_events[/* n */]) { convert_distribution(0, tree, branch_ct, num_events); diff --git a/vp9/encoder/vp9_treewriter.h b/vp9/encoder/vp9_treewriter.h index 5e7e087e2..883077c65 100644 --- a/vp9/encoder/vp9_treewriter.h +++ b/vp9/encoder/vp9_treewriter.h @@ -17,7 +17,7 @@ extern "C" { #endif -void vp9_tree_probs_from_distribution(vp9_tree tree, +void vp9_tree_probs_from_distribution(vpx_tree tree, unsigned int branch_ct[ /* n - 1 */ ][2], const unsigned int num_events[ /* n */ ]); @@ -26,11 +26,11 @@ struct vp9_token { int len; }; -void vp9_tokens_from_tree(struct vp9_token*, const vp9_tree_index *); +void vp9_tokens_from_tree(struct vp9_token*, const vpx_tree_index *); -static INLINE void vp9_write_tree(vp9_writer *w, const vp9_tree_index *tree, +static INLINE void vp9_write_tree(vp9_writer *w, const vpx_tree_index *tree, const vpx_prob *probs, int bits, int len, - vp9_tree_index i) { + vpx_tree_index i) { do { const int bit = (bits >> --len) & 1; vp9_write(w, bit, probs[i >> 1]); @@ -38,7 +38,7 @@ static INLINE void vp9_write_tree(vp9_writer *w, const vp9_tree_index *tree, } while (len); } -static INLINE void vp9_write_token(vp9_writer *w, const vp9_tree_index *tree, +static INLINE void vp9_write_token(vp9_writer *w, const vpx_tree_index *tree, const vpx_prob *probs, const struct vp9_token *token) { vp9_write_tree(w, tree, probs, token->value, token->len, 0); |