]> granicus.if.org Git - libvpx/commitdiff
Cosmetic renaming VP9_MVREFS to VP9_INTER_MODES
authorDeb Mukherjee <debargha@google.com>
Wed, 5 Jun 2013 18:21:44 +0000 (11:21 -0700)
committerDeb Mukherjee <debargha@google.com>
Wed, 5 Jun 2013 18:24:01 +0000 (11:24 -0700)
NO bitstream change

Change-Id: I79f6146dac5fdd157051b6f8dc611c0b7b5e5f7f

12 files changed:
vp9/common/vp9_blockd.h
vp9/common/vp9_entropymode.c
vp9/common/vp9_entropymode.h
vp9/common/vp9_findnearmv.h
vp9/common/vp9_modecont.c
vp9/common/vp9_modecont.h
vp9/common/vp9_onyxc_int.h
vp9/decoder/vp9_decodemv.c
vp9/encoder/vp9_bitstream.c
vp9/encoder/vp9_onyx_if.c
vp9/encoder/vp9_onyx_int.h
vp9/encoder/vp9_rdopt.c

index bc3416ec2dc8d2e5d950f121fcd01fb862f4612d..82b7125e97e79710ef74acf7757ee1e9061fd0a0 100644 (file)
@@ -115,7 +115,7 @@ typedef enum {
 
 #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
 
index 516e82a6877ec848febb4ccfabc0e99b6ce6a544..5f4d20789873cd21f5c1516e1afdbb707ce91412 100644 (file)
@@ -96,7 +96,7 @@ const vp9_tree_index vp9_partition_tree[6] = {
 
 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_init_mode_contexts(VP9_COMMON *pc) {
 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 @@ void vp9_accum_mv_refs(VP9_COMMON *pc,
 #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;
index b7315603e4e1e6b54728e3f7a7a4f5b32f858316..14dfae95b12abe0db0b877dd63998ce1c53807e3 100644 (file)
@@ -30,7 +30,7 @@ extern struct vp9_token vp9_intra_mode_encodings[VP9_INTRA_MODES];
 
 /* 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[];
index 456d6c852f3a17ddb79592381bf1c0db5a62225c..a75d6a07df81ec3cac7924c5efbebae43a056281 100644 (file)
@@ -71,7 +71,7 @@ static int check_mv_bounds(int_mv *mv,
 }
 
 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,
index 2aaeaffd9d2ed1c82ce69493077207ff75460250..bdb0049b4537f06ba6a29227761f3c8a2cccc747 100644 (file)
@@ -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
index 7a6b35903d25ec7d56f8ca4500c6225b140a7d8b..1a3e993a5f0fc0b6ab9ad48705c0b4149ae6012a 100644 (file)
@@ -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_
index 91b6bf0dcd45a6358292192300b2571b6a6261b6..665f00e91cf0f7f00de77f5e907544279b64e26a 100644 (file)
@@ -76,9 +76,9 @@ typedef struct frame_contexts {
   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 {
index d91a319c0d6039d14b8e1240eccbc73db0cbbd1d..011019d38a051009166984a09543eb51d92c0c5c 100644 (file)
@@ -360,7 +360,7 @@ static void read_switchable_interp_probs(VP9_COMMON* const cm, vp9_reader *r) {
 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 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
   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;
 
     {
index 2f6d4ad2df4d617511d265a92632196fc595b2ec..ff709508f9a6ee497383addc4a020e1c09ccf037 100644 (file)
@@ -427,7 +427,7 @@ static void update_inter_mode_probs(VP9_COMMON *pc, vp9_writer* const bc) {
   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 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m,
     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]);
 
index 1932e2d57c8319c1b0af504a7cd12f732492c1fe..f5e40ef7b3f81186bd3a2deee6f30b9dbe39cc0d 100644 (file)
@@ -466,9 +466,9 @@ static void configure_static_seg_features(VP9_COMP *cpi) {
 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 @@ void vp9_update_mode_context_stats(VP9_COMP *cpi) {
 
   // 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 @@ void print_mode_context(VP9_COMP *cpi) {
   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)
index d1f52c2af9d3da1cc180358642aabb68c62e73e9..c63de69f6d666c58d1ca3dd1c4444a47a0fc3cd4 100644 (file)
@@ -85,8 +85,8 @@ typedef struct {
   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 @@ typedef struct VP9_COMP {
 #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;
 
index 4050a303505bd9c141d45692ee0ac18a6b706ef2..0681943cb304d89c35278e8d4d3d8f1c634d2814 100644 (file)
@@ -946,7 +946,7 @@ int vp9_cost_mv_ref(VP9_COMP *cpi,
   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,