ref: 30226a658f7e9c36aa8bb259af167b07ab4e2f25
parent: 83885235a7398045302a62f9afccd0c4b27324ab
author: Deb Mukherjee <[email protected]>
date: Wed Jun 5 07:21:44 EDT 2013
Cosmetic renaming VP9_MVREFS to VP9_INTER_MODES NO bitstream change Change-Id: I79f6146dac5fdd157051b6f8dc611c0b7b5e5f7f
--- a/vp9/common/vp9_blockd.h
+++ b/vp9/common/vp9_blockd.h
@@ -115,7 +115,7 @@
#define VP9_INTRA_MODES (TM_PRED + 1)
-#define VP9_MVREFS (1 + NEWMV - NEARESTMV)
+#define VP9_INTER_MODES (1 + NEWMV - NEARESTMV)
#define WHT_UPSCALE_FACTOR 2
--- a/vp9/common/vp9_entropymode.c
+++ b/vp9/common/vp9_entropymode.c
@@ -96,7 +96,7 @@
struct vp9_token vp9_intra_mode_encodings[VP9_INTRA_MODES];
-struct vp9_token vp9_sb_mv_ref_encoding_array[VP9_MVREFS];
+struct vp9_token vp9_sb_mv_ref_encoding_array[VP9_INTER_MODES];
struct vp9_token vp9_partition_encodings[PARTITION_TYPES];
@@ -178,7 +178,7 @@
void vp9_accum_mv_refs(VP9_COMMON *pc,
MB_PREDICTION_MODE m,
const int context) {
- unsigned int (*inter_mode_counts)[VP9_MVREFS - 1][2] =
+ unsigned int (*inter_mode_counts)[VP9_INTER_MODES - 1][2] =
pc->fc.inter_mode_counts;
if (m == ZEROMV) {
@@ -202,12 +202,12 @@
#define MVREF_MAX_UPDATE_FACTOR 128
void vp9_adapt_mode_context(VP9_COMMON *pc) {
int i, j;
- unsigned int (*inter_mode_counts)[VP9_MVREFS - 1][2] =
+ unsigned int (*inter_mode_counts)[VP9_INTER_MODES - 1][2] =
pc->fc.inter_mode_counts;
- vp9_prob (*mode_context)[VP9_MVREFS - 1] = pc->fc.inter_mode_probs;
+ vp9_prob (*mode_context)[VP9_INTER_MODES - 1] = pc->fc.inter_mode_probs;
for (j = 0; j < INTER_MODE_CONTEXTS; j++) {
- for (i = 0; i < VP9_MVREFS - 1; i++) {
+ for (i = 0; i < VP9_INTER_MODES - 1; i++) {
int count = inter_mode_counts[j][i][0] + inter_mode_counts[j][i][1];
int factor;
count = count > MVREF_COUNT_SAT ? MVREF_COUNT_SAT : count;
--- a/vp9/common/vp9_entropymode.h
+++ b/vp9/common/vp9_entropymode.h
@@ -30,7 +30,7 @@
/* Inter mode values do not start at zero */
-extern struct vp9_token vp9_sb_mv_ref_encoding_array[VP9_MVREFS];
+extern struct vp9_token vp9_sb_mv_ref_encoding_array[VP9_INTER_MODES];
// probability models for partition information
extern const vp9_tree_index vp9_partition_tree[];
--- a/vp9/common/vp9_findnearmv.h
+++ b/vp9/common/vp9_findnearmv.h
@@ -71,7 +71,7 @@
}
vp9_prob *vp9_mv_ref_probs(VP9_COMMON *pc,
- vp9_prob p[VP9_MVREFS - 1],
+ vp9_prob p[VP9_INTER_MODES - 1],
const int context);
void vp9_append_sub8x8_mvs_for_idx(VP9_COMMON *pc,
--- a/vp9/common/vp9_modecont.c
+++ b/vp9/common/vp9_modecont.c
@@ -12,7 +12,7 @@
#include "vp9/common/vp9_entropy.h"
const vp9_prob vp9_default_inter_mode_probs[INTER_MODE_CONTEXTS]
- [VP9_MVREFS - 1] = {
+ [VP9_INTER_MODES - 1] = {
{2, 173, 34}, // 0 = both zero mv
{7, 145, 85}, // 1 = one zero mv + one a predicted mv
{7, 166, 63}, // 2 = two predicted mvs
--- a/vp9/common/vp9_modecont.h
+++ b/vp9/common/vp9_modecont.h
@@ -14,6 +14,6 @@
#include "vp9/common/vp9_entropy.h"
extern const int vp9_default_inter_mode_probs[INTER_MODE_CONTEXTS]
- [VP9_MVREFS - 1];
+ [VP9_INTER_MODES - 1];
#endif // VP9_COMMON_VP9_MODECONT_H_
--- a/vp9/common/vp9_onyxc_int.h
+++ b/vp9/common/vp9_onyxc_int.h
@@ -76,9 +76,9 @@
unsigned int switchable_interp_count[VP9_SWITCHABLE_FILTERS + 1]
[VP9_SWITCHABLE_FILTERS];
- vp9_prob inter_mode_probs[INTER_MODE_CONTEXTS][VP9_MVREFS - 1];
- vp9_prob pre_inter_mode_probs[INTER_MODE_CONTEXTS][VP9_MVREFS - 1];
- unsigned int inter_mode_counts[INTER_MODE_CONTEXTS][VP9_MVREFS - 1][2];
+ vp9_prob inter_mode_probs[INTER_MODE_CONTEXTS][VP9_INTER_MODES - 1];
+ vp9_prob pre_inter_mode_probs[INTER_MODE_CONTEXTS][VP9_INTER_MODES - 1];
+ unsigned int inter_mode_counts[INTER_MODE_CONTEXTS][VP9_INTER_MODES - 1][2];
} FRAME_CONTEXT;
typedef enum {
--- a/vp9/decoder/vp9_decodemv.c
+++ b/vp9/decoder/vp9_decodemv.c
@@ -360,7 +360,7 @@
static void read_inter_mode_probs(VP9_COMMON *const cm, vp9_reader *r) {
int i, j;
for (i = 0; i < INTER_MODE_CONTEXTS; ++i)
- for (j = 0; j < VP9_MVREFS - 1; ++j) {
+ for (j = 0; j < VP9_INTER_MODES - 1; ++j) {
if (vp9_read(r, VP9_DEF_UPDATE_PROB)) {
// cm->fc.inter_mode_probs[i][j] = vp9_read_prob(r);
cm->fc.inter_mode_probs[i][j] =
@@ -567,7 +567,7 @@
if (mbmi->ref_frame) {
int_mv nearest, nearby, best_mv;
int_mv nearest_second, nearby_second, best_mv_second;
- vp9_prob mv_ref_p[VP9_MVREFS - 1];
+ vp9_prob mv_ref_p[VP9_INTER_MODES - 1];
const MV_REFERENCE_FRAME ref_frame = mbmi->ref_frame;
{
--- a/vp9/encoder/vp9_bitstream.c
+++ b/vp9/encoder/vp9_bitstream.c
@@ -427,7 +427,7 @@
int i, j;
for (i = 0; i < INTER_MODE_CONTEXTS; i++) {
- for (j = 0; j < VP9_MVREFS - 1; j++) {
+ for (j = 0; j < VP9_INTER_MODES - 1; j++) {
vp9_cond_prob_diff_update(bc, &pc->fc.inter_mode_probs[i][j],
VP9_DEF_UPDATE_PROB,
pc->fc.inter_mode_counts[i][j]);
@@ -708,7 +708,7 @@
write_intra_mode(bc, mi->uv_mode,
pc->fc.uv_mode_prob[mode]);
} else {
- vp9_prob mv_ref_p[VP9_MVREFS - 1];
+ vp9_prob mv_ref_p[VP9_INTER_MODES - 1];
vp9_mv_ref_probs(&cpi->common, mv_ref_p, mi->mb_mode_context[rf]);
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -466,9 +466,9 @@
void vp9_update_mode_context_stats(VP9_COMP *cpi) {
VP9_COMMON *cm = &cpi->common;
int i, j;
- unsigned int (*inter_mode_counts)[VP9_MVREFS - 1][2] =
+ unsigned int (*inter_mode_counts)[VP9_INTER_MODES - 1][2] =
cm->fc.inter_mode_counts;
- int64_t (*mv_ref_stats)[VP9_MVREFS - 1][2] = cpi->mv_ref_stats;
+ int64_t (*mv_ref_stats)[VP9_INTER_MODES - 1][2] = cpi->mv_ref_stats;
FILE *f;
// Read the past stats counters
@@ -482,7 +482,7 @@
// Add in the values for this frame
for (i = 0; i < INTER_MODE_CONTEXTS; i++) {
- for (j = 0; j < VP9_MVREFS - 1; j++) {
+ for (j = 0; j < VP9_INTER_MODES - 1; j++) {
mv_ref_stats[i][j][0] += (int64_t)inter_mode_counts[i][j][0];
mv_ref_stats[i][j][1] += (int64_t)inter_mode_counts[i][j][1];
}
@@ -499,13 +499,14 @@
int i, j;
fprintf(f, "#include \"vp9_entropy.h\"\n");
- fprintf(f,
- "const int inter_mode_probs[INTER_MODE_CONTEXTS][VP9_MVREFS - 1] =");
+ fprintf(
+ f,
+ "const int inter_mode_probs[INTER_MODE_CONTEXTS][VP9_INTER_MODES - 1] =");
fprintf(f, "{\n");
for (j = 0; j < INTER_MODE_CONTEXTS; j++) {
fprintf(f, " {/* %d */ ", j);
fprintf(f, " ");
- for (i = 0; i < VP9_MVREFS - 1; i++) {
+ for (i = 0; i < VP9_INTER_MODES - 1; i++) {
int this_prob;
int64_t count = cpi->mv_ref_stats[j][i][0] + cpi->mv_ref_stats[j][i][1];
if (count)
--- a/vp9/encoder/vp9_onyx_int.h
+++ b/vp9/encoder/vp9_onyx_int.h
@@ -85,8 +85,8 @@
vp9_prob switchable_interp_prob[VP9_SWITCHABLE_FILTERS + 1]
[VP9_SWITCHABLE_FILTERS - 1];
- int inter_mode_counts[INTER_MODE_CONTEXTS][VP9_MVREFS - 1][2];
- vp9_prob inter_mode_probs[INTER_MODE_CONTEXTS][VP9_MVREFS - 1];
+ int inter_mode_counts[INTER_MODE_CONTEXTS][VP9_INTER_MODES - 1][2];
+ vp9_prob inter_mode_probs[INTER_MODE_CONTEXTS][VP9_INTER_MODES - 1];
} CODING_CONTEXT;
@@ -597,7 +597,7 @@
#endif
#ifdef ENTROPY_STATS
- int64_t mv_ref_stats[INTER_MODE_CONTEXTS][VP9_MVREFS - 1][2];
+ int64_t mv_ref_stats[INTER_MODE_CONTEXTS][VP9_INTER_MODES - 1][2];
#endif
} VP9_COMP;
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -946,7 +946,7 @@
if (!vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP)) {
VP9_COMMON *pc = &cpi->common;
- vp9_prob p [VP9_MVREFS - 1];
+ vp9_prob p[VP9_INTER_MODES - 1];
assert(NEARESTMV <= m && m <= NEWMV);
vp9_mv_ref_probs(pc, p, mode_context);
return cost_token(vp9_sb_mv_ref_tree, p,