Port renaming changes from AOMedia
Cherry-Picked the following commits:
0defd8f Changed "WebM" to "AOMedia" & "webm" to "aomedia"
54e6676 Replace "VPx" by "AVx"
5082a36 Change "Vpx" to "Avx"
7df44f1 Replace "Vp9" w/ "Av1"
967f722 Remove kVp9CodecId
828f30c Change "Vp8" to "AOM"
030b5ff AUTHORS regenerated
2524cae Add ref-mv experimental flag
016762b Change copyright notice to AOMedia form
81e5526 Replace vp9 w/ av1
9b94565 Add missing files
fa8ca9f Change "vp9" to "av1"
ec838b7 Convert "vp8" to "aom"
80edfa0 Change "VP9" to "AV1"
d1a11fb Change "vp8" to "aom"
7b58251 Point to WebM test data
dd1a5c8 Replace "VP8" with "AOM"
ff00fc0 Change "VPX" to "AOM"
01dee0b Change "vp10" to "av1" in source code
cebe6f0 Convert "vpx" to "aom"
17b0567 rename vp10*.mk to av1_*.mk
fe5f8a8 rename files vp10_* to av1_*
Change-Id: I6fc3d18eb11fc171e46140c836ad5339cf6c9419
diff --git a/av1/encoder/tokenize.c b/av1/encoder/tokenize.c
index c841fa6..6a5dc21 100644
--- a/av1/encoder/tokenize.c
+++ b/av1/encoder/tokenize.c
@@ -13,7 +13,7 @@
#include <stdio.h>
#include <string.h>
-#include "aom_mem/vpx_mem.h"
+#include "aom_mem/aom_mem.h"
#include "av1/common/entropy.h"
#include "av1/common/pred_common.h"
@@ -45,14 +45,14 @@
{ 9, 36 }, { 9, 38 }, { 9, 40 }, { 9, 42 }, { 9, 44 }, { 9, 46 }, { 9, 48 },
{ 9, 50 }, { 9, 52 }, { 9, 54 }, { 9, 56 }, { 9, 58 }, { 9, 60 }, { 9, 62 }
};
-const TOKENVALUE *vp10_dct_cat_lt_10_value_tokens =
+const TOKENVALUE *av1_dct_cat_lt_10_value_tokens =
dct_cat_lt_10_value_tokens +
(sizeof(dct_cat_lt_10_value_tokens) / sizeof(*dct_cat_lt_10_value_tokens)) /
2;
// The corresponding costs of the extrabits for the tokens in the above table
// are stored in the table below. The values are obtained from looking up the
// entry for the specified extrabits in the table corresponding to the token
-// (as defined in cost element vp10_extra_bits)
+// (as defined in cost element av1_extra_bits)
// e.g. {9, 63} maps to cat5_cost[63 >> 1], {1, 1} maps to sign_cost[1 >> 1]
static const int dct_cat_lt_10_value_cost[] = {
3773, 3750, 3704, 3681, 3623, 3600, 3554, 3531, 3432, 3409, 3363, 3340, 3282,
@@ -67,13 +67,13 @@
3190, 3213, 3259, 3282, 3340, 3363, 3409, 3432, 3531, 3554, 3600, 3623, 3681,
3704, 3750, 3773,
};
-const int *vp10_dct_cat_lt_10_value_cost =
+const int *av1_dct_cat_lt_10_value_cost =
dct_cat_lt_10_value_cost +
(sizeof(dct_cat_lt_10_value_cost) / sizeof(*dct_cat_lt_10_value_cost)) / 2;
// Array indices are identical to previously-existing CONTEXT_NODE indices
/* clang-format off */
-const vpx_tree_index vp10_coef_tree[TREE_SIZE(ENTROPY_TOKENS)] = {
+const aom_tree_index av1_coef_tree[TREE_SIZE(ENTROPY_TOKENS)] = {
-EOB_TOKEN, 2, // 0 = EOB
-ZERO_TOKEN, 4, // 1 = ZERO
-ONE_TOKEN, 6, // 2 = ONE
@@ -88,12 +88,12 @@
};
/* clang-format on */
-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,
+static const aom_tree_index cat1[2] = { 0, 0 };
+static const aom_tree_index cat2[4] = { 2, 2, 0, 0 };
+static const aom_tree_index cat3[6] = { 2, 2, 4, 4, 0, 0 };
+static const aom_tree_index cat4[8] = { 2, 2, 4, 4, 6, 6, 0, 0 };
+static const aom_tree_index cat5[10] = { 2, 2, 4, 4, 6, 6, 8, 8, 0, 0 };
+static const aom_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 };
@@ -111,7 +111,7 @@
2986, 3044, 3067, 3113, 3136, 3190, 3213, 3259, 3282, 3340, 3363,
3409, 3432, 3531, 3554, 3600, 3623, 3681, 3704, 3750, 3773
};
-const int16_t vp10_cat6_low_cost[256] = {
+const int16_t av1_cat6_low_cost[256] = {
3378, 3390, 3401, 3413, 3435, 3447, 3458, 3470, 3517, 3529, 3540, 3552, 3574,
3586, 3597, 3609, 3671, 3683, 3694, 3706, 3728, 3740, 3751, 3763, 3810, 3822,
3833, 3845, 3867, 3879, 3890, 3902, 3973, 3985, 3996, 4008, 4030, 4042, 4053,
@@ -133,7 +133,7 @@
6620, 6632, 6654, 6666, 6677, 6689, 6751, 6763, 6774, 6786, 6808, 6820, 6831,
6843, 6890, 6902, 6913, 6925, 6947, 6959, 6970, 6982
};
-const int vp10_cat6_high_cost[64] = {
+const int av1_cat6_high_cost[64] = {
88, 2251, 2727, 4890, 3148, 5311, 5787, 7950, 3666, 5829, 6305,
8468, 6726, 8889, 9365, 11528, 3666, 5829, 6305, 8468, 6726, 8889,
9365, 11528, 7244, 9407, 9883, 12046, 10304, 12467, 12943, 15106, 3666,
@@ -142,8 +142,8 @@
15106, 10822, 12985, 13461, 15624, 13882, 16045, 16521, 18684
};
-#if CONFIG_VP9_HIGHBITDEPTH
-const int vp10_cat6_high10_high_cost[256] = {
+#if CONFIG_AOM_HIGHBITDEPTH
+const int av1_cat6_high10_high_cost[256] = {
94, 2257, 2733, 4896, 3154, 5317, 5793, 7956, 3672, 5835, 6311,
8474, 6732, 8895, 9371, 11534, 3672, 5835, 6311, 8474, 6732, 8895,
9371, 11534, 7250, 9413, 9889, 12052, 10310, 12473, 12949, 15112, 3672,
@@ -169,7 +169,7 @@
18075, 20238, 18496, 20659, 21135, 23298, 19014, 21177, 21653, 23816, 22074,
24237, 24713, 26876
};
-const int vp10_cat6_high12_high_cost[1024] = {
+const int av1_cat6_high12_high_cost[1024] = {
100, 2263, 2739, 4902, 3160, 5323, 5799, 7962, 3678, 5841, 6317,
8480, 6738, 8901, 9377, 11540, 3678, 5841, 6317, 8480, 6738, 8901,
9377, 11540, 7256, 9419, 9895, 12058, 10316, 12479, 12955, 15118, 3678,
@@ -267,82 +267,82 @@
};
#endif
-#if CONFIG_VP9_HIGHBITDEPTH
-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,
+#if CONFIG_AOM_HIGHBITDEPTH
+static const aom_tree_index cat1_high10[2] = { 0, 0 };
+static const aom_tree_index cat2_high10[4] = { 2, 2, 0, 0 };
+static const aom_tree_index cat3_high10[6] = { 2, 2, 4, 4, 0, 0 };
+static const aom_tree_index cat4_high10[8] = { 2, 2, 4, 4, 6, 6, 0, 0 };
+static const aom_tree_index cat5_high10[10] = { 2, 2, 4, 4, 6, 6, 8, 8, 0, 0 };
+static const aom_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 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] = {
+static const aom_tree_index cat1_high12[2] = { 0, 0 };
+static const aom_tree_index cat2_high12[4] = { 2, 2, 0, 0 };
+static const aom_tree_index cat3_high12[6] = { 2, 2, 4, 4, 0, 0 };
+static const aom_tree_index cat4_high12[8] = { 2, 2, 4, 4, 6, 6, 0, 0 };
+static const aom_tree_index cat5_high12[10] = { 2, 2, 4, 4, 6, 6, 8, 8, 0, 0 };
+static const aom_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
-const vp10_extra_bit vp10_extra_bits[ENTROPY_TOKENS] = {
- { 0, 0, 0, 0, zero_cost }, // ZERO_TOKEN
- { 0, 0, 0, 1, sign_cost }, // ONE_TOKEN
- { 0, 0, 0, 2, sign_cost }, // TWO_TOKEN
- { 0, 0, 0, 3, sign_cost }, // THREE_TOKEN
- { 0, 0, 0, 4, sign_cost }, // FOUR_TOKEN
- { cat1, vp10_cat1_prob, 1, CAT1_MIN_VAL, cat1_cost }, // CATEGORY1_TOKEN
- { cat2, vp10_cat2_prob, 2, CAT2_MIN_VAL, cat2_cost }, // CATEGORY2_TOKEN
- { cat3, vp10_cat3_prob, 3, CAT3_MIN_VAL, cat3_cost }, // CATEGORY3_TOKEN
- { cat4, vp10_cat4_prob, 4, CAT4_MIN_VAL, cat4_cost }, // CATEGORY4_TOKEN
- { cat5, vp10_cat5_prob, 5, CAT5_MIN_VAL, cat5_cost }, // CATEGORY5_TOKEN
- { cat6, vp10_cat6_prob, 14, CAT6_MIN_VAL, 0 }, // CATEGORY6_TOKEN
- { 0, 0, 0, 0, zero_cost } // EOB_TOKEN
+const av1_extra_bit av1_extra_bits[ENTROPY_TOKENS] = {
+ { 0, 0, 0, 0, zero_cost }, // ZERO_TOKEN
+ { 0, 0, 0, 1, sign_cost }, // ONE_TOKEN
+ { 0, 0, 0, 2, sign_cost }, // TWO_TOKEN
+ { 0, 0, 0, 3, sign_cost }, // THREE_TOKEN
+ { 0, 0, 0, 4, sign_cost }, // FOUR_TOKEN
+ { cat1, av1_cat1_prob, 1, CAT1_MIN_VAL, cat1_cost }, // CATEGORY1_TOKEN
+ { cat2, av1_cat2_prob, 2, CAT2_MIN_VAL, cat2_cost }, // CATEGORY2_TOKEN
+ { cat3, av1_cat3_prob, 3, CAT3_MIN_VAL, cat3_cost }, // CATEGORY3_TOKEN
+ { cat4, av1_cat4_prob, 4, CAT4_MIN_VAL, cat4_cost }, // CATEGORY4_TOKEN
+ { cat5, av1_cat5_prob, 5, CAT5_MIN_VAL, cat5_cost }, // CATEGORY5_TOKEN
+ { cat6, av1_cat6_prob, 14, CAT6_MIN_VAL, 0 }, // CATEGORY6_TOKEN
+ { 0, 0, 0, 0, zero_cost } // EOB_TOKEN
};
-#if CONFIG_VP9_HIGHBITDEPTH
-const vp10_extra_bit vp10_extra_bits_high10[ENTROPY_TOKENS] = {
- { 0, 0, 0, 0, zero_cost }, // ZERO
- { 0, 0, 0, 1, sign_cost }, // ONE
- { 0, 0, 0, 2, sign_cost }, // TWO
- { 0, 0, 0, 3, sign_cost }, // THREE
- { 0, 0, 0, 4, sign_cost }, // FOUR
- { cat1_high10, vp10_cat1_prob_high10, 1, CAT1_MIN_VAL, cat1_cost }, // CAT1
- { cat2_high10, vp10_cat2_prob_high10, 2, CAT2_MIN_VAL, cat2_cost }, // CAT2
- { cat3_high10, vp10_cat3_prob_high10, 3, CAT3_MIN_VAL, cat3_cost }, // CAT3
- { cat4_high10, vp10_cat4_prob_high10, 4, CAT4_MIN_VAL, cat4_cost }, // CAT4
- { cat5_high10, vp10_cat5_prob_high10, 5, CAT5_MIN_VAL, cat5_cost }, // CAT5
- { cat6_high10, vp10_cat6_prob_high10, 16, CAT6_MIN_VAL, 0 }, // CAT6
- { 0, 0, 0, 0, zero_cost } // EOB
+#if CONFIG_AOM_HIGHBITDEPTH
+const av1_extra_bit av1_extra_bits_high10[ENTROPY_TOKENS] = {
+ { 0, 0, 0, 0, zero_cost }, // ZERO
+ { 0, 0, 0, 1, sign_cost }, // ONE
+ { 0, 0, 0, 2, sign_cost }, // TWO
+ { 0, 0, 0, 3, sign_cost }, // THREE
+ { 0, 0, 0, 4, sign_cost }, // FOUR
+ { cat1_high10, av1_cat1_prob_high10, 1, CAT1_MIN_VAL, cat1_cost }, // CAT1
+ { cat2_high10, av1_cat2_prob_high10, 2, CAT2_MIN_VAL, cat2_cost }, // CAT2
+ { cat3_high10, av1_cat3_prob_high10, 3, CAT3_MIN_VAL, cat3_cost }, // CAT3
+ { cat4_high10, av1_cat4_prob_high10, 4, CAT4_MIN_VAL, cat4_cost }, // CAT4
+ { cat5_high10, av1_cat5_prob_high10, 5, CAT5_MIN_VAL, cat5_cost }, // CAT5
+ { cat6_high10, av1_cat6_prob_high10, 16, CAT6_MIN_VAL, 0 }, // CAT6
+ { 0, 0, 0, 0, zero_cost } // EOB
};
-const vp10_extra_bit vp10_extra_bits_high12[ENTROPY_TOKENS] = {
- { 0, 0, 0, 0, zero_cost }, // ZERO
- { 0, 0, 0, 1, sign_cost }, // ONE
- { 0, 0, 0, 2, sign_cost }, // TWO
- { 0, 0, 0, 3, sign_cost }, // THREE
- { 0, 0, 0, 4, sign_cost }, // FOUR
- { cat1_high12, vp10_cat1_prob_high12, 1, CAT1_MIN_VAL, cat1_cost }, // CAT1
- { cat2_high12, vp10_cat2_prob_high12, 2, CAT2_MIN_VAL, cat2_cost }, // CAT2
- { cat3_high12, vp10_cat3_prob_high12, 3, CAT3_MIN_VAL, cat3_cost }, // CAT3
- { cat4_high12, vp10_cat4_prob_high12, 4, CAT4_MIN_VAL, cat4_cost }, // CAT4
- { cat5_high12, vp10_cat5_prob_high12, 5, CAT5_MIN_VAL, cat5_cost }, // CAT5
- { cat6_high12, vp10_cat6_prob_high12, 18, CAT6_MIN_VAL, 0 }, // CAT6
- { 0, 0, 0, 0, zero_cost } // EOB
+const av1_extra_bit av1_extra_bits_high12[ENTROPY_TOKENS] = {
+ { 0, 0, 0, 0, zero_cost }, // ZERO
+ { 0, 0, 0, 1, sign_cost }, // ONE
+ { 0, 0, 0, 2, sign_cost }, // TWO
+ { 0, 0, 0, 3, sign_cost }, // THREE
+ { 0, 0, 0, 4, sign_cost }, // FOUR
+ { cat1_high12, av1_cat1_prob_high12, 1, CAT1_MIN_VAL, cat1_cost }, // CAT1
+ { cat2_high12, av1_cat2_prob_high12, 2, CAT2_MIN_VAL, cat2_cost }, // CAT2
+ { cat3_high12, av1_cat3_prob_high12, 3, CAT3_MIN_VAL, cat3_cost }, // CAT3
+ { cat4_high12, av1_cat4_prob_high12, 4, CAT4_MIN_VAL, cat4_cost }, // CAT4
+ { cat5_high12, av1_cat5_prob_high12, 5, CAT5_MIN_VAL, cat5_cost }, // CAT5
+ { cat6_high12, av1_cat6_prob_high12, 18, CAT6_MIN_VAL, 0 }, // CAT6
+ { 0, 0, 0, 0, zero_cost } // EOB
};
#endif
#if !CONFIG_ANS
-const struct vp10_token vp10_coef_encodings[ENTROPY_TOKENS] = {
+const struct av1_token av1_coef_encodings[ENTROPY_TOKENS] = {
{ 2, 2 }, { 6, 3 }, { 28, 5 }, { 58, 6 }, { 59, 6 }, { 60, 6 },
{ 61, 6 }, { 124, 7 }, { 125, 7 }, { 126, 7 }, { 127, 7 }, { 0, 1 }
};
#endif // !CONFIG_ANS
struct tokenize_b_args {
- VP10_COMP *cpi;
+ AV1_COMP *cpi;
ThreadData *td;
TOKENEXTRA **tp;
};
@@ -356,11 +356,11 @@
MACROBLOCKD *const xd = &x->e_mbd;
struct macroblock_plane *p = &x->plane[plane];
struct macroblockd_plane *pd = &xd->plane[plane];
- vp10_set_contexts(xd, pd, plane_bsize, tx_size, p->eobs[block] > 0, blk_col,
- blk_row);
+ av1_set_contexts(xd, pd, plane_bsize, tx_size, p->eobs[block] > 0, blk_col,
+ blk_row);
}
-static INLINE void add_token(TOKENEXTRA **t, const vpx_prob *context_tree,
+static INLINE void add_token(TOKENEXTRA **t, const aom_prob *context_tree,
#if CONFIG_ANS
const rans_dec_lut *token_cdf,
#endif // CONFIG_ANS
@@ -378,7 +378,7 @@
}
static INLINE void add_token_no_extra(TOKENEXTRA **t,
- const vpx_prob *context_tree,
+ const aom_prob *context_tree,
uint8_t token, uint8_t skip_eob_node,
unsigned int *counts) {
(*t)->token = token;
@@ -394,8 +394,8 @@
return segfeature_active(seg, segment_id, SEG_LVL_SKIP) ? 0 : eob_max;
}
-void vp10_tokenize_palette_sb(struct ThreadData *const td, BLOCK_SIZE bsize,
- int plane, TOKENEXTRA **t) {
+void av1_tokenize_palette_sb(struct ThreadData *const td, BLOCK_SIZE bsize,
+ int plane, TOKENEXTRA **t) {
MACROBLOCK *const x = &td->mb;
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO *mbmi = &xd->mi[0]->mbmi;
@@ -408,14 +408,14 @@
(xd->plane[plane != 0].subsampling_y);
const int cols = (4 * num_4x4_blocks_wide_lookup[bsize]) >>
(xd->plane[plane != 0].subsampling_x);
- const vpx_prob (*const probs)[PALETTE_COLOR_CONTEXTS][PALETTE_COLORS - 1] =
- plane == 0 ? vp10_default_palette_y_color_prob
- : vp10_default_palette_uv_color_prob;
+ const aom_prob (*const probs)[PALETTE_COLOR_CONTEXTS][PALETTE_COLORS - 1] =
+ plane == 0 ? av1_default_palette_y_color_prob
+ : av1_default_palette_uv_color_prob;
for (i = 0; i < rows; ++i) {
for (j = (i == 0 ? 1 : 0); j < cols; ++j) {
color_ctx =
- vp10_get_palette_color_context(color_map, cols, i, j, n, color_order);
+ av1_get_palette_color_context(color_map, cols, i, j, n, color_order);
for (k = 0; k < n; ++k)
if (color_map[i * cols + j] == color_order[k]) {
color_new_idx = k;
@@ -433,7 +433,7 @@
static void tokenize_b(int plane, int block, int blk_row, int blk_col,
BLOCK_SIZE plane_bsize, TX_SIZE tx_size, void *arg) {
struct tokenize_b_args *const args = arg;
- VP10_COMP *cpi = args->cpi;
+ AV1_COMP *cpi = args->cpi;
ThreadData *const td = args->td;
MACROBLOCK *const x = &td->mb;
MACROBLOCKD *const xd = &x->e_mbd;
@@ -449,7 +449,7 @@
const PLANE_TYPE type = pd->plane_type;
const tran_low_t *qcoeff = BLOCK_OFFSET(p->qcoeff, block);
#if CONFIG_SUPERTX
- const int segment_id = VPXMIN(mbmi->segment_id, mbmi->segment_id_supertx);
+ const int segment_id = AOMMIN(mbmi->segment_id, mbmi->segment_id_supertx);
#else
const int segment_id = mbmi->segment_id;
#endif // CONFIG_SUEPRTX
@@ -460,11 +460,11 @@
unsigned int (*const counts)[COEFF_CONTEXTS][ENTROPY_TOKENS] =
td->rd_counts.coef_counts[txsize_sqr_map[tx_size]][type][ref];
#if CONFIG_ENTROPY
- vpx_prob(*coef_probs)[COEFF_CONTEXTS][UNCONSTRAINED_NODES] =
+ aom_prob(*coef_probs)[COEFF_CONTEXTS][UNCONSTRAINED_NODES] =
cpi->subframe_stats.coef_probs_buf[cpi->common.coef_probs_update_idx]
[txsize_sqr_map[tx_size]][type][ref];
#else
- vpx_prob (*const coef_probs)[COEFF_CONTEXTS][UNCONSTRAINED_NODES] =
+ aom_prob (*const coef_probs)[COEFF_CONTEXTS][UNCONSTRAINED_NODES] =
cpi->common.fc->coef_probs[txsize_sqr_map[tx_size]][type][ref];
#endif // CONFIG_ENTROPY
#if CONFIG_ANS
@@ -488,7 +488,7 @@
const int v = qcoeff[scan[c]];
eob_branch[band[c]][pt] += !skip_eob;
- vp10_get_token_extra(v, &token, &extra);
+ av1_get_token_extra(v, &token, &extra);
add_token(&t, coef_probs[band[c]][pt],
#if CONFIG_ANS
@@ -496,7 +496,7 @@
#endif // CONFIG_ANS
extra, (uint8_t)token, (uint8_t)skip_eob, counts[band[c]][pt]);
- token_cache[scan[c]] = vp10_pt_energy_class[token];
+ token_cache[scan[c]] = av1_pt_energy_class[token];
++c;
pt = get_coef_context(nb, token_cache, c);
skip_eob = (token == ZERO_TOKEN);
@@ -509,7 +509,7 @@
*tp = t;
- vp10_set_contexts(xd, pd, plane_bsize, tx_size, c > 0, blk_col, blk_row);
+ av1_set_contexts(xd, pd, plane_bsize, tx_size, c > 0, blk_col, blk_row);
}
struct is_skippable_args {
@@ -528,12 +528,12 @@
}
// TODO(yaowu): rewrite and optimize this function to remove the usage of
-// vp10_foreach_transform_block() and simplify is_skippable().
-int vp10_is_skippable_in_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) {
+// av1_foreach_transform_block() and simplify is_skippable().
+int av1_is_skippable_in_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) {
int result = 1;
struct is_skippable_args args = { x->plane[plane].eobs, &result };
- vp10_foreach_transformed_block_in_plane(&x->e_mbd, bsize, plane, is_skippable,
- &args);
+ av1_foreach_transformed_block_in_plane(&x->e_mbd, bsize, plane, is_skippable,
+ &args);
return result;
}
@@ -550,11 +550,11 @@
*(args->skippable) |= (args->eobs[block] > eobs);
}
-int vp10_has_high_freq_in_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) {
+int av1_has_high_freq_in_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) {
int result = 0;
struct is_skippable_args args = { x->plane[plane].eobs, &result };
- vp10_foreach_transformed_block_in_plane(&x->e_mbd, bsize, plane,
- has_high_freq_coeff, &args);
+ av1_foreach_transformed_block_in_plane(&x->e_mbd, bsize, plane,
+ has_high_freq_coeff, &args);
return result;
}
@@ -615,15 +615,15 @@
}
}
-void vp10_tokenize_sb_inter(VP10_COMP *cpi, ThreadData *td, TOKENEXTRA **t,
- int dry_run, int mi_row, int mi_col,
- BLOCK_SIZE bsize) {
- VP10_COMMON *const cm = &cpi->common;
+void av1_tokenize_sb_inter(AV1_COMP *cpi, ThreadData *td, TOKENEXTRA **t,
+ int dry_run, int mi_row, int mi_col,
+ BLOCK_SIZE bsize) {
+ AV1_COMMON *const cm = &cpi->common;
MACROBLOCK *const x = &td->mb;
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
TOKENEXTRA *t_backup = *t;
- const int ctx = vp10_get_skip_context(xd);
+ const int ctx = av1_get_skip_context(xd);
const int skip_inc =
!segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_SKIP);
struct tokenize_b_args arg = { cpi, td, t };
@@ -669,13 +669,13 @@
}
#endif // CONFIG_VAR_TX
-void vp10_tokenize_sb(VP10_COMP *cpi, ThreadData *td, TOKENEXTRA **t,
- int dry_run, BLOCK_SIZE bsize) {
- VP10_COMMON *const cm = &cpi->common;
+void av1_tokenize_sb(AV1_COMP *cpi, ThreadData *td, TOKENEXTRA **t, int dry_run,
+ BLOCK_SIZE bsize) {
+ AV1_COMMON *const cm = &cpi->common;
MACROBLOCK *const x = &td->mb;
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
- const int ctx = vp10_get_skip_context(xd);
+ const int ctx = av1_get_skip_context(xd);
const int skip_inc =
!segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_SKIP);
struct tokenize_b_args arg = { cpi, td, t };
@@ -691,24 +691,24 @@
td->counts->skip[ctx][0] += skip_inc;
for (plane = 0; plane < MAX_MB_PLANE; ++plane) {
- vp10_foreach_transformed_block_in_plane(xd, bsize, plane, tokenize_b,
- &arg);
+ av1_foreach_transformed_block_in_plane(xd, bsize, plane, tokenize_b,
+ &arg);
(*t)->token = EOSB_TOKEN;
(*t)++;
}
} else {
- vp10_foreach_transformed_block(xd, bsize, set_entropy_context_b, &arg);
+ av1_foreach_transformed_block(xd, bsize, set_entropy_context_b, &arg);
}
}
#if CONFIG_SUPERTX
-void vp10_tokenize_sb_supertx(VP10_COMP *cpi, ThreadData *td, TOKENEXTRA **t,
- int dry_run, BLOCK_SIZE bsize) {
- VP10_COMMON *const cm = &cpi->common;
+void av1_tokenize_sb_supertx(AV1_COMP *cpi, ThreadData *td, TOKENEXTRA **t,
+ int dry_run, BLOCK_SIZE bsize) {
+ AV1_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &td->mb.e_mbd;
MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
TOKENEXTRA *t_backup = *t;
- const int ctx = vp10_get_skip_context(xd);
+ const int ctx = av1_get_skip_context(xd);
const int skip_inc =
!segfeature_active(&cm->seg, mbmi->segment_id_supertx, SEG_LVL_SKIP);
struct tokenize_b_args arg = { cpi, td, t };
@@ -724,13 +724,13 @@
td->counts->skip[ctx][0] += skip_inc;
for (plane = 0; plane < MAX_MB_PLANE; ++plane) {
- vp10_foreach_transformed_block_in_plane(xd, bsize, plane, tokenize_b,
- &arg);
+ av1_foreach_transformed_block_in_plane(xd, bsize, plane, tokenize_b,
+ &arg);
(*t)->token = EOSB_TOKEN;
(*t)++;
}
} else {
- vp10_foreach_transformed_block(xd, bsize, set_entropy_context_b, &arg);
+ av1_foreach_transformed_block(xd, bsize, set_entropy_context_b, &arg);
*t = t_backup;
}
}