Commit 6d2a0da7 authored by Dmitry Kovalev's avatar Dmitry Kovalev
Browse files

Removing NUM_ prefix from constant names.

Renames for consistency with other constants:
  NUM_FRAME_TYPES -> FRAME_TYPES
  NUM_PARTITION_CONTEXTS -> PARTITION_CONTEXTS

Change-Id: I3db30acb2868eb0a424237c831087b2e264ec47f
parent 4e6c799e
......@@ -53,7 +53,7 @@ static INLINE int combine_entropy_contexts(ENTROPY_CONTEXT a,
typedef enum {
KEY_FRAME = 0,
INTER_FRAME = 1,
NUM_FRAME_TYPES,
FRAME_TYPES,
} FRAME_TYPE;
typedef enum {
......
......@@ -50,8 +50,7 @@ static const vp9_prob default_if_uv_probs[INTRA_MODES]
{ 101, 21, 107, 181, 192, 103, 19, 67, 125 } /* y = tm */
};
static const vp9_prob default_partition_probs[NUM_FRAME_TYPES]
[NUM_PARTITION_CONTEXTS]
static const vp9_prob default_partition_probs[FRAME_TYPES][PARTITION_CONTEXTS]
[PARTITION_TYPES - 1] = {
{ /* frame_type = keyframe */
/* 8x8 -> 4x4 */
......@@ -415,7 +414,7 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) {
counts->uv_mode[i], pre_fc->uv_mode_prob[i],
fc->uv_mode_prob[i], 0);
for (i = 0; i < NUM_PARTITION_CONTEXTS; i++)
for (i = 0; i < PARTITION_CONTEXTS; i++)
update_mode_probs(PARTITION_TYPES, vp9_partition_tree,
counts->partition[i],
pre_fc->partition_prob[INTER_FRAME][i],
......
......@@ -50,7 +50,7 @@ typedef enum PARTITION_TYPE {
} PARTITION_TYPE;
#define PARTITION_PLOFFSET 4 // number of probability models per block size
#define NUM_PARTITION_CONTEXTS (4 * PARTITION_PLOFFSET)
#define PARTITION_CONTEXTS (4 * PARTITION_PLOFFSET)
typedef enum {
TX_4X4 = 0, // 4x4 dct transform
......
......@@ -40,8 +40,7 @@
typedef struct frame_contexts {
vp9_prob y_mode_prob[BLOCK_SIZE_GROUPS][INTRA_MODES - 1];
vp9_prob uv_mode_prob[INTRA_MODES][INTRA_MODES - 1];
vp9_prob partition_prob[NUM_FRAME_TYPES][NUM_PARTITION_CONTEXTS]
[PARTITION_TYPES - 1];
vp9_prob partition_prob[FRAME_TYPES][PARTITION_CONTEXTS][PARTITION_TYPES - 1];
vp9_coeff_probs_model coef_probs[TX_SIZES][BLOCK_TYPES];
vp9_prob switchable_interp_prob[SWITCHABLE_FILTERS + 1]
[SWITCHABLE_FILTERS - 1];
......@@ -58,7 +57,7 @@ typedef struct frame_contexts {
typedef struct {
unsigned int y_mode[BLOCK_SIZE_GROUPS][INTRA_MODES];
unsigned int uv_mode[INTRA_MODES][INTRA_MODES];
unsigned int partition[NUM_PARTITION_CONTEXTS][PARTITION_TYPES];
unsigned int partition[PARTITION_CONTEXTS][PARTITION_TYPES];
vp9_coeff_count_model coef[TX_SIZES][BLOCK_TYPES];
unsigned int eob_branch[TX_SIZES][BLOCK_TYPES][REF_TYPES]
[COEF_BANDS][PREV_COEF_CONTEXTS];
......
......@@ -668,7 +668,7 @@ void vp9_prepare_read_mode_info(VP9D_COMP* pbi, vp9_reader *r) {
for (i = 0; i < INTRA_MODES - 1; ++i)
vp9_diff_update_prob(r, &cm->fc.y_mode_prob[j][i]);
for (j = 0; j < NUM_PARTITION_CONTEXTS; ++j)
for (j = 0; j < PARTITION_CONTEXTS; ++j)
for (i = 0; i < PARTITION_TYPES - 1; ++i)
vp9_diff_update_prob(r, &cm->fc.partition_prob[INTER_FRAME][j][i]);
......
......@@ -1463,7 +1463,7 @@ static size_t write_compressed_header(VP9_COMP *cpi, uint8_t *data) {
update_mbintra_mode_probs(cpi, &header_bc);
for (i = 0; i < NUM_PARTITION_CONTEXTS; ++i) {
for (i = 0; i < PARTITION_CONTEXTS; ++i) {
vp9_prob pnew[PARTITION_TYPES - 1];
unsigned int bct[PARTITION_TYPES - 1][2];
update_mode(&header_bc, PARTITION_TYPES,
......
......@@ -165,7 +165,7 @@ struct macroblock {
PICK_MODE_CONTEXT sb32x64_context[2];
PICK_MODE_CONTEXT sb64x32_context[2];
PICK_MODE_CONTEXT sb64_context;
int partition_cost[NUM_PARTITION_CONTEXTS][PARTITION_TYPES];
int partition_cost[PARTITION_CONTEXTS][PARTITION_TYPES];
BLOCK_SIZE b_partitioning[4][4][4];
BLOCK_SIZE mb_partitioning[4][4];
......
......@@ -475,7 +475,7 @@ typedef struct VP9_COMP {
int y_mode_count[4][INTRA_MODES];
int y_uv_mode_count[INTRA_MODES][INTRA_MODES];
unsigned int partition_count[NUM_PARTITION_CONTEXTS][PARTITION_TYPES];
unsigned int partition_count[PARTITION_CONTEXTS][PARTITION_TYPES];
nmv_context_counts NMVcount;
......
......@@ -250,7 +250,7 @@ void vp9_initialize_rd_consts(VP9_COMP *cpi) {
fill_token_costs(cpi->mb.token_costs, cpi->common.fc.coef_probs);
for (i = 0; i < NUM_PARTITION_CONTEXTS; i++)
for (i = 0; i < PARTITION_CONTEXTS; i++)
vp9_cost_tokens(cpi->mb.partition_cost[i],
cpi->common.fc.partition_prob[cpi->common.frame_type][i],
vp9_partition_tree);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment