Commit bf82514b authored by Yaowu Xu's avatar Yaowu Xu

vpx_dsp/bitreader.h: vp9_->vpx_

Replace vp9_ in names to vpx_ as they are not codec specific.

Change-Id: I2e583aa63dee769353ada4b42417aa15c4074ebb
parent 149822e3
...@@ -69,8 +69,8 @@ TEST(VP9, TestBitIO) { ...@@ -69,8 +69,8 @@ TEST(VP9, TestBitIO) {
// First bit should be zero // First bit should be zero
GTEST_ASSERT_EQ(bw_buffer[0] & 0x80, 0); GTEST_ASSERT_EQ(bw_buffer[0] & 0x80, 0);
vp9_reader br; vpx_reader br;
vp9_reader_init(&br, bw_buffer, kBufferSize, NULL, NULL); vpx_reader_init(&br, bw_buffer, kBufferSize, NULL, NULL);
bit_rnd.Reset(random_seed); bit_rnd.Reset(random_seed);
for (int i = 0; i < kBitsToTest; ++i) { for (int i = 0; i < kBitsToTest; ++i) {
if (bit_method == 2) { if (bit_method == 2) {
...@@ -78,7 +78,7 @@ TEST(VP9, TestBitIO) { ...@@ -78,7 +78,7 @@ TEST(VP9, TestBitIO) {
} else if (bit_method == 3) { } else if (bit_method == 3) {
bit = bit_rnd(2); bit = bit_rnd(2);
} }
GTEST_ASSERT_EQ(vp9_read(&br, probas[i]), bit) GTEST_ASSERT_EQ(vpx_read(&br, probas[i]), bit)
<< "pos: " << i << " / " << kBitsToTest << "pos: " << i << " / " << kBitsToTest
<< " bit_method: " << bit_method << " bit_method: " << bit_method
<< " method: " << method; << " method: " << method;
......
...@@ -166,7 +166,7 @@ typedef struct macroblockd { ...@@ -166,7 +166,7 @@ typedef struct macroblockd {
int up_available; int up_available;
int left_available; int left_available;
const vp9_prob (*partition_probs)[PARTITION_TYPES - 1]; const vpx_prob (*partition_probs)[PARTITION_TYPES - 1];
/* Distance of MB away from frame edges */ /* Distance of MB away from frame edges */
int mb_to_left_edge; int mb_to_left_edge;
...@@ -262,7 +262,7 @@ static INLINE void reset_skip_context(MACROBLOCKD *xd, BLOCK_SIZE bsize) { ...@@ -262,7 +262,7 @@ static INLINE void reset_skip_context(MACROBLOCKD *xd, BLOCK_SIZE bsize) {
} }
} }
static INLINE const vp9_prob *get_y_mode_probs(const MODE_INFO *mi, static INLINE const vpx_prob *get_y_mode_probs(const MODE_INFO *mi,
const MODE_INFO *above_mi, const MODE_INFO *above_mi,
const MODE_INFO *left_mi, const MODE_INFO *left_mi,
int block) { int block) {
......
...@@ -27,30 +27,30 @@ const vp9_tree_index vp9_coef_con_tree[TREE_SIZE(ENTROPY_TOKENS)] = { ...@@ -27,30 +27,30 @@ const vp9_tree_index vp9_coef_con_tree[TREE_SIZE(ENTROPY_TOKENS)] = {
-CATEGORY5_TOKEN, -CATEGORY6_TOKEN // 7 = CAT_FIVE -CATEGORY5_TOKEN, -CATEGORY6_TOKEN // 7 = CAT_FIVE
}; };
const vp9_prob vp9_cat1_prob[] = { 159 }; const vpx_prob vp9_cat1_prob[] = { 159 };
const vp9_prob vp9_cat2_prob[] = { 165, 145 }; const vpx_prob vp9_cat2_prob[] = { 165, 145 };
const vp9_prob vp9_cat3_prob[] = { 173, 148, 140 }; const vpx_prob vp9_cat3_prob[] = { 173, 148, 140 };
const vp9_prob vp9_cat4_prob[] = { 176, 155, 140, 135 }; const vpx_prob vp9_cat4_prob[] = { 176, 155, 140, 135 };
const vp9_prob vp9_cat5_prob[] = { 180, 157, 141, 134, 130 }; const vpx_prob vp9_cat5_prob[] = { 180, 157, 141, 134, 130 };
const vp9_prob vp9_cat6_prob[] = { const vpx_prob vp9_cat6_prob[] = {
254, 254, 254, 252, 249, 243, 230, 196, 177, 153, 140, 133, 130, 129 254, 254, 254, 252, 249, 243, 230, 196, 177, 153, 140, 133, 130, 129
}; };
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VP9_HIGHBITDEPTH
const vp9_prob vp9_cat1_prob_high10[] = { 159 }; const vpx_prob vp9_cat1_prob_high10[] = { 159 };
const vp9_prob vp9_cat2_prob_high10[] = { 165, 145 }; const vpx_prob vp9_cat2_prob_high10[] = { 165, 145 };
const vp9_prob vp9_cat3_prob_high10[] = { 173, 148, 140 }; const vpx_prob vp9_cat3_prob_high10[] = { 173, 148, 140 };
const vp9_prob vp9_cat4_prob_high10[] = { 176, 155, 140, 135 }; const vpx_prob vp9_cat4_prob_high10[] = { 176, 155, 140, 135 };
const vp9_prob vp9_cat5_prob_high10[] = { 180, 157, 141, 134, 130 }; const vpx_prob vp9_cat5_prob_high10[] = { 180, 157, 141, 134, 130 };
const vp9_prob vp9_cat6_prob_high10[] = { const vpx_prob vp9_cat6_prob_high10[] = {
255, 255, 254, 254, 254, 252, 249, 243, 255, 255, 254, 254, 254, 252, 249, 243,
230, 196, 177, 153, 140, 133, 130, 129 230, 196, 177, 153, 140, 133, 130, 129
}; };
const vp9_prob vp9_cat1_prob_high12[] = { 159 }; const vpx_prob vp9_cat1_prob_high12[] = { 159 };
const vp9_prob vp9_cat2_prob_high12[] = { 165, 145 }; const vpx_prob vp9_cat2_prob_high12[] = { 165, 145 };
const vp9_prob vp9_cat3_prob_high12[] = { 173, 148, 140 }; const vpx_prob vp9_cat3_prob_high12[] = { 173, 148, 140 };
const vp9_prob vp9_cat4_prob_high12[] = { 176, 155, 140, 135 }; const vpx_prob vp9_cat4_prob_high12[] = { 176, 155, 140, 135 };
const vp9_prob vp9_cat5_prob_high12[] = { 180, 157, 141, 134, 130 }; const vpx_prob vp9_cat5_prob_high12[] = { 180, 157, 141, 134, 130 };
const vp9_prob vp9_cat6_prob_high12[] = { const vpx_prob vp9_cat6_prob_high12[] = {
255, 255, 255, 255, 254, 254, 254, 252, 249, 255, 255, 255, 255, 254, 254, 254, 252, 249,
243, 230, 196, 177, 153, 140, 133, 130, 129 243, 230, 196, 177, 153, 140, 133, 130, 129
}; };
...@@ -147,7 +147,7 @@ const uint8_t vp9_pt_energy_class[ENTROPY_TOKENS] = { ...@@ -147,7 +147,7 @@ const uint8_t vp9_pt_energy_class[ENTROPY_TOKENS] = {
// by averaging : // by averaging :
// vp9_pareto8_full[l][node] = (vp9_pareto8_full[l-1][node] + // vp9_pareto8_full[l][node] = (vp9_pareto8_full[l-1][node] +
// vp9_pareto8_full[l+1][node] ) >> 1; // vp9_pareto8_full[l+1][node] ) >> 1;
const vp9_prob vp9_pareto8_full[COEFF_PROB_MODELS][MODEL_NODES] = { const vpx_prob vp9_pareto8_full[COEFF_PROB_MODELS][MODEL_NODES] = {
{ 3, 86, 128, 6, 86, 23, 88, 29}, { 3, 86, 128, 6, 86, 23, 88, 29},
{ 6, 86, 128, 11, 87, 42, 91, 52}, { 6, 86, 128, 11, 87, 42, 91, 52},
{ 9, 86, 129, 17, 88, 61, 94, 76}, { 9, 86, 129, 17, 88, 61, 94, 76},
...@@ -742,14 +742,14 @@ static const vp9_coeff_probs_model default_coef_probs_32x32[PLANE_TYPES] = { ...@@ -742,14 +742,14 @@ static const vp9_coeff_probs_model default_coef_probs_32x32[PLANE_TYPES] = {
} }
}; };
static void extend_to_full_distribution(vp9_prob *probs, vp9_prob p) { static void extend_to_full_distribution(vpx_prob *probs, vpx_prob p) {
memcpy(probs, vp9_pareto8_full[p = 0 ? 0 : p - 1], memcpy(probs, vp9_pareto8_full[p = 0 ? 0 : p - 1],
MODEL_NODES * sizeof(vp9_prob)); MODEL_NODES * sizeof(vpx_prob));
} }
void vp9_model_to_full_probs(const vp9_prob *model, vp9_prob *full) { void vp9_model_to_full_probs(const vpx_prob *model, vpx_prob *full) {
if (full != model) if (full != model)
memcpy(full, model, sizeof(vp9_prob) * UNCONSTRAINED_NODES); memcpy(full, model, sizeof(vpx_prob) * UNCONSTRAINED_NODES);
extend_to_full_distribution(&full[UNCONSTRAINED_NODES], model[PIVOT_NODE]); extend_to_full_distribution(&full[UNCONSTRAINED_NODES], model[PIVOT_NODE]);
} }
......
...@@ -77,7 +77,7 @@ DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat6_prob_high12[18]); ...@@ -77,7 +77,7 @@ DECLARE_ALIGNED(16, extern const uint8_t, vp9_cat6_prob_high12[18]);
typedef struct { typedef struct {
const vp9_tree_index *tree; const vp9_tree_index *tree;
const vp9_prob *prob; const vpx_prob *prob;
int len; int len;
int base_val; int base_val;
const int16_t *cost; const int16_t *cost;
...@@ -161,16 +161,16 @@ static INLINE const uint8_t *get_band_translate(TX_SIZE tx_size) { ...@@ -161,16 +161,16 @@ static INLINE const uint8_t *get_band_translate(TX_SIZE tx_size) {
#define MODEL_NODES (ENTROPY_NODES - UNCONSTRAINED_NODES) #define MODEL_NODES (ENTROPY_NODES - UNCONSTRAINED_NODES)
extern const vp9_tree_index vp9_coef_con_tree[TREE_SIZE(ENTROPY_TOKENS)]; extern const vp9_tree_index vp9_coef_con_tree[TREE_SIZE(ENTROPY_TOKENS)];
extern const vp9_prob vp9_pareto8_full[COEFF_PROB_MODELS][MODEL_NODES]; extern const vpx_prob vp9_pareto8_full[COEFF_PROB_MODELS][MODEL_NODES];
typedef vp9_prob vp9_coeff_probs_model[REF_TYPES][COEF_BANDS] typedef vpx_prob vp9_coeff_probs_model[REF_TYPES][COEF_BANDS]
[COEFF_CONTEXTS][UNCONSTRAINED_NODES]; [COEFF_CONTEXTS][UNCONSTRAINED_NODES];
typedef unsigned int vp9_coeff_count_model[REF_TYPES][COEF_BANDS] typedef unsigned int vp9_coeff_count_model[REF_TYPES][COEF_BANDS]
[COEFF_CONTEXTS] [COEFF_CONTEXTS]
[UNCONSTRAINED_NODES + 1]; [UNCONSTRAINED_NODES + 1];
void vp9_model_to_full_probs(const vp9_prob *model, vp9_prob *full); void vp9_model_to_full_probs(const vpx_prob *model, vpx_prob *full);
typedef char ENTROPY_CONTEXT; typedef char ENTROPY_CONTEXT;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "vp9/common/vp9_onyxc_int.h" #include "vp9/common/vp9_onyxc_int.h"
#include "vp9/common/vp9_seg_common.h" #include "vp9/common/vp9_seg_common.h"
const vp9_prob vp9_kf_y_mode_prob[INTRA_MODES][INTRA_MODES][INTRA_MODES - 1] = { const vpx_prob vp9_kf_y_mode_prob[INTRA_MODES][INTRA_MODES][INTRA_MODES - 1] = {
{ // above = dc { // above = dc
{ 137, 30, 42, 148, 151, 207, 70, 52, 91 }, // left = dc { 137, 30, 42, 148, 151, 207, 70, 52, 91 }, // left = dc
{ 92, 45, 102, 136, 116, 180, 74, 90, 100 }, // left = v { 92, 45, 102, 136, 116, 180, 74, 90, 100 }, // left = v
...@@ -127,7 +127,7 @@ const vp9_prob vp9_kf_y_mode_prob[INTRA_MODES][INTRA_MODES][INTRA_MODES - 1] = { ...@@ -127,7 +127,7 @@ const vp9_prob vp9_kf_y_mode_prob[INTRA_MODES][INTRA_MODES][INTRA_MODES - 1] = {
} }
}; };
const vp9_prob vp9_kf_uv_mode_prob[INTRA_MODES][INTRA_MODES - 1] = { const vpx_prob vp9_kf_uv_mode_prob[INTRA_MODES][INTRA_MODES - 1] = {
{ 144, 11, 54, 157, 195, 130, 46, 58, 108 }, // y = dc { 144, 11, 54, 157, 195, 130, 46, 58, 108 }, // y = dc
{ 118, 15, 123, 148, 131, 101, 44, 93, 131 }, // y = v { 118, 15, 123, 148, 131, 101, 44, 93, 131 }, // y = v
{ 113, 12, 23, 188, 226, 142, 26, 32, 125 }, // y = h { 113, 12, 23, 188, 226, 142, 26, 32, 125 }, // y = h
...@@ -140,14 +140,14 @@ const vp9_prob vp9_kf_uv_mode_prob[INTRA_MODES][INTRA_MODES - 1] = { ...@@ -140,14 +140,14 @@ const vp9_prob vp9_kf_uv_mode_prob[INTRA_MODES][INTRA_MODES - 1] = {
{ 102, 19, 66, 162, 182, 122, 35, 59, 128 } // y = tm { 102, 19, 66, 162, 182, 122, 35, 59, 128 } // y = tm
}; };
static const vp9_prob default_if_y_probs[BLOCK_SIZE_GROUPS][INTRA_MODES - 1] = { static const vpx_prob default_if_y_probs[BLOCK_SIZE_GROUPS][INTRA_MODES - 1] = {
{ 65, 32, 18, 144, 162, 194, 41, 51, 98 }, // block_size < 8x8 { 65, 32, 18, 144, 162, 194, 41, 51, 98 }, // block_size < 8x8
{ 132, 68, 18, 165, 217, 196, 45, 40, 78 }, // block_size < 16x16 { 132, 68, 18, 165, 217, 196, 45, 40, 78 }, // block_size < 16x16
{ 173, 80, 19, 176, 240, 193, 64, 35, 46 }, // block_size < 32x32 { 173, 80, 19, 176, 240, 193, 64, 35, 46 }, // block_size < 32x32
{ 221, 135, 38, 194, 248, 121, 96, 85, 29 } // block_size >= 32x32 { 221, 135, 38, 194, 248, 121, 96, 85, 29 } // block_size >= 32x32
}; };
static const vp9_prob default_if_uv_probs[INTRA_MODES][INTRA_MODES - 1] = { static const vpx_prob default_if_uv_probs[INTRA_MODES][INTRA_MODES - 1] = {
{ 120, 7, 76, 176, 208, 126, 28, 54, 103 }, // y = dc { 120, 7, 76, 176, 208, 126, 28, 54, 103 }, // y = dc
{ 48, 12, 154, 155, 139, 90, 34, 117, 119 }, // y = v { 48, 12, 154, 155, 139, 90, 34, 117, 119 }, // y = v
{ 67, 6, 25, 204, 243, 158, 13, 21, 96 }, // y = h { 67, 6, 25, 204, 243, 158, 13, 21, 96 }, // y = h
...@@ -160,7 +160,7 @@ static const vp9_prob default_if_uv_probs[INTRA_MODES][INTRA_MODES - 1] = { ...@@ -160,7 +160,7 @@ static const vp9_prob default_if_uv_probs[INTRA_MODES][INTRA_MODES - 1] = {
{ 101, 21, 107, 181, 192, 103, 19, 67, 125 } // y = tm { 101, 21, 107, 181, 192, 103, 19, 67, 125 } // y = tm
}; };
const vp9_prob vp9_kf_partition_probs[PARTITION_CONTEXTS] const vpx_prob vp9_kf_partition_probs[PARTITION_CONTEXTS]
[PARTITION_TYPES - 1] = { [PARTITION_TYPES - 1] = {
// 8x8 -> 4x4 // 8x8 -> 4x4
{ 158, 97, 94 }, // a/l both not split { 158, 97, 94 }, // a/l both not split
...@@ -184,7 +184,7 @@ const vp9_prob vp9_kf_partition_probs[PARTITION_CONTEXTS] ...@@ -184,7 +184,7 @@ const vp9_prob vp9_kf_partition_probs[PARTITION_CONTEXTS]
{ 12, 3, 3 }, // a/l both split { 12, 3, 3 }, // a/l both split
}; };
static const vp9_prob default_partition_probs[PARTITION_CONTEXTS] static const vpx_prob default_partition_probs[PARTITION_CONTEXTS]
[PARTITION_TYPES - 1] = { [PARTITION_TYPES - 1] = {
// 8x8 -> 4x4 // 8x8 -> 4x4
{ 199, 122, 141 }, // a/l both not split { 199, 122, 141 }, // a/l both not split
...@@ -208,7 +208,7 @@ static const vp9_prob default_partition_probs[PARTITION_CONTEXTS] ...@@ -208,7 +208,7 @@ static const vp9_prob default_partition_probs[PARTITION_CONTEXTS]
{ 10, 7, 6 }, // a/l both split { 10, 7, 6 }, // a/l both split
}; };
static const vp9_prob default_inter_mode_probs[INTER_MODE_CONTEXTS] static const vpx_prob default_inter_mode_probs[INTER_MODE_CONTEXTS]
[INTER_MODES - 1] = { [INTER_MODES - 1] = {
{2, 173, 34}, // 0 = both zero mv {2, 173, 34}, // 0 = both zero mv
{7, 145, 85}, // 1 = one zero mv + one a predicted mv {7, 145, 85}, // 1 = one zero mv + one a predicted mv
...@@ -244,19 +244,19 @@ const vp9_tree_index vp9_partition_tree[TREE_SIZE(PARTITION_TYPES)] = { ...@@ -244,19 +244,19 @@ const vp9_tree_index vp9_partition_tree[TREE_SIZE(PARTITION_TYPES)] = {
-PARTITION_VERT, -PARTITION_SPLIT -PARTITION_VERT, -PARTITION_SPLIT
}; };
static const vp9_prob default_intra_inter_p[INTRA_INTER_CONTEXTS] = { static const vpx_prob default_intra_inter_p[INTRA_INTER_CONTEXTS] = {
9, 102, 187, 225 9, 102, 187, 225
}; };
static const vp9_prob default_comp_inter_p[COMP_INTER_CONTEXTS] = { static const vpx_prob default_comp_inter_p[COMP_INTER_CONTEXTS] = {
239, 183, 119, 96, 41 239, 183, 119, 96, 41
}; };
static const vp9_prob default_comp_ref_p[REF_CONTEXTS] = { static const vpx_prob default_comp_ref_p[REF_CONTEXTS] = {
50, 126, 123, 221, 226 50, 126, 123, 221, 226
}; };
static const vp9_prob default_single_ref_p[REF_CONTEXTS][2] = { static const vpx_prob default_single_ref_p[REF_CONTEXTS][2] = {
{ 33, 16 }, { 33, 16 },
{ 77, 74 }, { 77, 74 },
{ 142, 142 }, { 142, 142 },
...@@ -302,11 +302,11 @@ void tx_counts_to_branch_counts_8x8(const unsigned int *tx_count_8x8p, ...@@ -302,11 +302,11 @@ void tx_counts_to_branch_counts_8x8(const unsigned int *tx_count_8x8p,
ct_8x8p[0][1] = tx_count_8x8p[TX_8X8]; ct_8x8p[0][1] = tx_count_8x8p[TX_8X8];
} }
static const vp9_prob default_skip_probs[SKIP_CONTEXTS] = { static const vpx_prob default_skip_probs[SKIP_CONTEXTS] = {
192, 128, 64 192, 128, 64
}; };
static const vp9_prob default_switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS] static const vpx_prob default_switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS]
[SWITCHABLE_FILTERS - 1] = { [SWITCHABLE_FILTERS - 1] = {
{ 235, 162, }, { 235, 162, },
{ 36, 255, }, { 36, 255, },
......
...@@ -28,9 +28,9 @@ extern "C" { ...@@ -28,9 +28,9 @@ extern "C" {
struct VP9Common; struct VP9Common;
struct tx_probs { struct tx_probs {
vp9_prob p32x32[TX_SIZE_CONTEXTS][TX_SIZES - 1]; vpx_prob p32x32[TX_SIZE_CONTEXTS][TX_SIZES - 1];
vp9_prob p16x16[TX_SIZE_CONTEXTS][TX_SIZES - 2]; vpx_prob p16x16[TX_SIZE_CONTEXTS][TX_SIZES - 2];
vp9_prob p8x8[TX_SIZE_CONTEXTS][TX_SIZES - 3]; vpx_prob p8x8[TX_SIZE_CONTEXTS][TX_SIZES - 3];
}; };
struct tx_counts { struct tx_counts {
...@@ -41,19 +41,19 @@ struct tx_counts { ...@@ -41,19 +41,19 @@ struct tx_counts {
}; };
typedef struct frame_contexts { typedef struct frame_contexts {
vp9_prob y_mode_prob[BLOCK_SIZE_GROUPS][INTRA_MODES - 1]; vpx_prob y_mode_prob[BLOCK_SIZE_GROUPS][INTRA_MODES - 1];
vp9_prob uv_mode_prob[INTRA_MODES][INTRA_MODES - 1]; vpx_prob uv_mode_prob[INTRA_MODES][INTRA_MODES - 1];
vp9_prob partition_prob[PARTITION_CONTEXTS][PARTITION_TYPES - 1]; vpx_prob partition_prob[PARTITION_CONTEXTS][PARTITION_TYPES - 1];
vp9_coeff_probs_model coef_probs[TX_SIZES][PLANE_TYPES]; vp9_coeff_probs_model coef_probs[TX_SIZES][PLANE_TYPES];
vp9_prob switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS] vpx_prob switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS]
[SWITCHABLE_FILTERS - 1]; [SWITCHABLE_FILTERS - 1];
vp9_prob inter_mode_probs[INTER_MODE_CONTEXTS][INTER_MODES - 1]; vpx_prob inter_mode_probs[INTER_MODE_CONTEXTS][INTER_MODES - 1];
vp9_prob intra_inter_prob[INTRA_INTER_CONTEXTS]; vpx_prob intra_inter_prob[INTRA_INTER_CONTEXTS];
vp9_prob comp_inter_prob[COMP_INTER_CONTEXTS]; vpx_prob comp_inter_prob[COMP_INTER_CONTEXTS];
vp9_prob single_ref_prob[REF_CONTEXTS][2]; vpx_prob single_ref_prob[REF_CONTEXTS][2];
vp9_prob comp_ref_prob[REF_CONTEXTS]; vpx_prob comp_ref_prob[REF_CONTEXTS];
struct tx_probs tx_probs; struct tx_probs tx_probs;
vp9_prob skip_probs[SKIP_CONTEXTS]; vpx_prob skip_probs[SKIP_CONTEXTS];
nmv_context nmvc; nmv_context nmvc;
int initialized; int initialized;
} FRAME_CONTEXT; } FRAME_CONTEXT;
...@@ -77,10 +77,10 @@ typedef struct FRAME_COUNTS { ...@@ -77,10 +77,10 @@ typedef struct FRAME_COUNTS {
nmv_context_counts mv; nmv_context_counts mv;
} FRAME_COUNTS; } FRAME_COUNTS;
extern const vp9_prob vp9_kf_uv_mode_prob[INTRA_MODES][INTRA_MODES - 1]; extern const vpx_prob vp9_kf_uv_mode_prob[INTRA_MODES][INTRA_MODES - 1];
extern const vp9_prob vp9_kf_y_mode_prob[INTRA_MODES][INTRA_MODES] extern const vpx_prob vp9_kf_y_mode_prob[INTRA_MODES][INTRA_MODES]
[INTRA_MODES - 1]; [INTRA_MODES - 1];
extern const vp9_prob vp9_kf_partition_probs[PARTITION_CONTEXTS] extern const vpx_prob vp9_kf_partition_probs[PARTITION_CONTEXTS]
[PARTITION_TYPES - 1]; [PARTITION_TYPES - 1];
extern const vp9_tree_index vp9_intra_mode_tree[TREE_SIZE(INTRA_MODES)]; extern const vp9_tree_index vp9_intra_mode_tree[TREE_SIZE(INTRA_MODES)];
extern const vp9_tree_index vp9_inter_mode_tree[TREE_SIZE(INTER_MODES)]; extern const vp9_tree_index vp9_inter_mode_tree[TREE_SIZE(INTER_MODES)];
......
...@@ -83,18 +83,18 @@ extern const vp9_tree_index vp9_mv_class0_tree[]; ...@@ -83,18 +83,18 @@ extern const vp9_tree_index vp9_mv_class0_tree[];
extern const vp9_tree_index vp9_mv_fp_tree[]; extern const vp9_tree_index vp9_mv_fp_tree[];
typedef struct { typedef struct {
vp9_prob sign; vpx_prob sign;
vp9_prob classes[MV_CLASSES - 1]; vpx_prob classes[MV_CLASSES - 1];
vp9_prob class0[CLASS0_SIZE - 1]; vpx_prob class0[CLASS0_SIZE - 1];
vp9_prob bits[MV_OFFSET_BITS]; vpx_prob bits[MV_OFFSET_BITS];
vp9_prob class0_fp[CLASS0_SIZE][MV_FP_SIZE - 1]; vpx_prob class0_fp[CLASS0_SIZE][MV_FP_SIZE - 1];
vp9_prob fp[MV_FP_SIZE - 1]; vpx_prob fp[MV_FP_SIZE - 1];
vp9_prob class0_hp; vpx_prob class0_hp;
vp9_prob hp; vpx_prob hp;
} nmv_component; } nmv_component;
typedef struct { typedef struct {
vp9_prob joints[MV_JOINTS - 1]; vpx_prob joints[MV_JOINTS - 1];
nmv_component comps[2]; nmv_component comps[2];
} nmv_context; } nmv_context;
......
...@@ -345,7 +345,7 @@ static INLINE void set_partition_probs(const VP9_COMMON *const cm, ...@@ -345,7 +345,7 @@ static INLINE void set_partition_probs(const VP9_COMMON *const cm,
xd->partition_probs = xd->partition_probs =
frame_is_intra_only(cm) ? frame_is_intra_only(cm) ?
&vp9_kf_partition_probs[0] : &vp9_kf_partition_probs[0] :
(const vp9_prob (*)[PARTITION_TYPES - 1])cm->fc->partition_prob; (const vpx_prob (*)[PARTITION_TYPES - 1])cm->fc->partition_prob;
} }
static INLINE void vp9_init_macroblockd(VP9_COMMON *cm, MACROBLOCKD *xd, static INLINE void vp9_init_macroblockd(VP9_COMMON *cm, MACROBLOCKD *xd,
...@@ -373,7 +373,7 @@ static INLINE void vp9_init_macroblockd(VP9_COMMON *cm, MACROBLOCKD *xd, ...@@ -373,7 +373,7 @@ static INLINE void vp9_init_macroblockd(VP9_COMMON *cm, MACROBLOCKD *xd,
set_partition_probs(cm, xd); set_partition_probs(cm, xd);
} }
static INLINE const vp9_prob* get_partition_probs(const MACROBLOCKD *xd, static INLINE const vpx_prob* get_partition_probs(const MACROBLOCKD *xd,
int ctx) { int ctx) {
return xd->partition_probs[ctx]; return xd->partition_probs[ctx];
} }
......
...@@ -47,7 +47,7 @@ static INLINE int vp9_get_pred_context_seg_id(const MACROBLOCKD *xd) { ...@@ -47,7 +47,7 @@ static INLINE int vp9_get_pred_context_seg_id(const MACROBLOCKD *xd) {
return above_sip + left_sip; return above_sip + left_sip;
} }
static INLINE vp9_prob vp9_get_pred_prob_seg_id(const struct segmentation *seg, static INLINE vpx_prob vp9_get_pred_prob_seg_id(const struct segmentation *seg,
const MACROBLOCKD *xd) { const MACROBLOCKD *xd) {
return seg->pred_probs[vp9_get_pred_context_seg_id(xd)]; return seg->pred_probs[vp9_get_pred_context_seg_id(xd)];
} }
...@@ -60,7 +60,7 @@ static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) { ...@@ -60,7 +60,7 @@ static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
return above_skip + left_skip; return above_skip + left_skip;
} }
static INLINE vp9_prob vp9_get_skip_prob(const VP9_COMMON *cm, static INLINE vpx_prob vp9_get_skip_prob(const VP9_COMMON *cm,
const MACROBLOCKD *xd) { const MACROBLOCKD *xd) {
return cm->fc->skip_probs[vp9_get_skip_context(xd)]; return cm->fc->skip_probs[vp9_get_skip_context(xd)];
} }
...@@ -69,14 +69,14 @@ int vp9_get_pred_context_switchable_interp(const MACROBLOCKD *xd); ...@@ -69,14 +69,14 @@ int vp9_get_pred_context_switchable_interp(const MACROBLOCKD *xd);
int vp9_get_intra_inter_context(const MACROBLOCKD *xd); int vp9_get_intra_inter_context(const MACROBLOCKD *xd);
static INLINE vp9_prob vp9_get_intra_inter_prob(const VP9_COMMON *cm, static INLINE vpx_prob vp9_get_intra_inter_prob(const VP9_COMMON *cm,
const MACROBLOCKD *xd) { const MACROBLOCKD *xd) {
return cm->fc->intra_inter_prob[vp9_get_intra_inter_context(xd)]; return cm->fc->intra_inter_prob[vp9_get_intra_inter_context(xd)];
} }
int vp9_get_reference_mode_context(const VP9_COMMON *cm, const MACROBLOCKD *xd); int vp9_get_reference_mode_context(const VP9_COMMON *cm, const MACROBLOCKD *xd);
static INLINE vp9_prob vp9_get_reference_mode_prob(const VP9_COMMON *cm, static INLINE vpx_prob vp9_get_reference_mode_prob(const VP9_COMMON *cm,
const MACROBLOCKD *xd) { const MACROBLOCKD *xd) {
return cm->fc->comp_inter_prob[vp9_get_reference_mode_context(cm, xd)]; return cm->fc->comp_inter_prob[vp9_get_reference_mode_context(cm, xd)];
} }
...@@ -84,7 +84,7 @@ static INLINE vp9_prob vp9_get_reference_mode_prob(const VP9_COMMON *cm, ...@@ -84,7 +84,7 @@ static INLINE vp9_prob vp9_get_reference_mode_prob(const VP9_COMMON *cm,
int vp9_get_pred_context_comp_ref_p(const VP9_COMMON *cm, int vp9_get_pred_context_comp_ref_p(const VP9_COMMON *cm,
const MACROBLOCKD *xd); const MACROBLOCKD *xd);
static INLINE vp9_prob vp9_get_pred_prob_comp_ref_p(const VP9_COMMON *cm, static INLINE vpx_prob vp9_get_pred_prob_comp_ref_p(const VP9_COMMON *cm,
const MACROBLOCKD *xd) { const MACROBLOCKD *xd) {
const int pred_context = vp9_get_pred_context_comp_ref_p(cm, xd); const int pred_context = vp9_get_pred_context_comp_ref_p(cm, xd);
return cm->fc->comp_ref_prob[pred_context]; return cm->fc->comp_ref_prob[pred_context];
...@@ -92,14 +92,14 @@ static INLINE vp9_prob vp9_get_pred_prob_comp_ref_p(const VP9_COMMON *cm, ...@@ -92,14 +92,14 @@ static INLINE vp9_prob vp9_get_pred_prob_comp_ref_p(const VP9_COMMON *cm,
int vp9_get_pred_context_single_ref_p1(const MACROBLOCKD *xd); int vp9_get_pred_context_single_ref_p1(const MACROBLOCKD *xd);
static INLINE vp9_prob vp9_get_pred_prob_single_ref_p1(const VP9_COMMON *cm, static INLINE vpx_prob vp9_get_pred_prob_single_ref_p1(const VP9_COMMON *cm,
const MACROBLOCKD *xd) { const MACROBLOCKD *xd) {
return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p1(xd)][0]; return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p1(xd)][0];
} }
int vp9_get_pred_context_single_ref_p2(const MACROBLOCKD *xd); int vp9_get_pred_context_single_ref_p2(const MACROBLOCKD *xd);
static INLINE vp9_prob vp9_get_pred_prob_single_ref_p2(const VP9_COMMON *cm, static INLINE vpx_prob vp9_get_pred_prob_single_ref_p2(const VP9_COMMON *cm,
const MACROBLOCKD *xd) { const MACROBLOCKD *xd) {
return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p2(xd)][1]; return cm->fc->single_ref_prob[vp9_get_pred_context_single_ref_p2(xd)][1];
} }
...@@ -127,7 +127,7 @@ static INLINE int get_tx_size_context(const MACROBLOCKD *xd) { ...@@ -127,7 +127,7 @@ static INLINE int get_tx_size_context(const MACROBLOCKD *xd) {
return (above_ctx + left_ctx) > max_tx_size; return (above_ctx + left_ctx) > max_tx_size;
} }
static INLINE const vp9_prob *get_tx_probs(TX_SIZE max_tx_size, int ctx, static INLINE const vpx_prob *get_tx_probs(TX_SIZE max_tx_size, int ctx,
const struct tx_probs *tx_probs) { const struct tx_probs *tx_probs) {