]> granicus.if.org Git - libvpx/commitdiff
Removing NMS_STATS defines.
authorDmitry Kovalev <dkovalev@google.com>
Sat, 3 Aug 2013 00:10:15 +0000 (17:10 -0700)
committerDmitry Kovalev <dkovalev@google.com>
Sat, 3 Aug 2013 00:10:15 +0000 (17:10 -0700)
Change-Id: Iabab0e59042a33456df1d449c0d0f01debc00c7c

vp9/encoder/vp9_encodemv.c
vp9/encoder/vp9_onyx_if.c

index 2f5e16ccff52f5c9dc442aae4d55b06164dede47..70fea0c7a7148979efc870aa68bbc4f84a2b2e66 100644 (file)
 extern unsigned int active_section;
 #endif
 
-#ifdef NMV_STATS
-nmv_context_counts tnmvcounts;
-#endif
-
 static void encode_mv_component(vp9_writer* w, int comp,
                                 const nmv_component* mvcomp, int usehp) {
   int offset;
@@ -218,152 +214,6 @@ static void counts_to_nmv_context(
   }
 }
 
-#ifdef NMV_STATS
-void init_nmvstats() {
-  vp9_zero(tnmvcounts);
-}
-
-void print_nmvstats() {
-  nmv_context prob;
-  unsigned int branch_ct_joint[MV_JOINTS - 1][2];
-  unsigned int branch_ct_sign[2][2];
-  unsigned int branch_ct_classes[2][MV_CLASSES - 1][2];
-  unsigned int branch_ct_class0[2][CLASS0_SIZE - 1][2];
-  unsigned int branch_ct_bits[2][MV_OFFSET_BITS][2];
-  unsigned int branch_ct_class0_fp[2][CLASS0_SIZE][4 - 1][2];
-  unsigned int branch_ct_fp[2][4 - 1][2];
-  unsigned int branch_ct_class0_hp[2][2];
-  unsigned int branch_ct_hp[2][2];
-  int i, j, k;
-  counts_to_nmv_context(&tnmvcounts, &prob, 1,
-                        branch_ct_joint, branch_ct_sign, branch_ct_classes,
-                        branch_ct_class0, branch_ct_bits,
-                        branch_ct_class0_fp, branch_ct_fp,
-                        branch_ct_class0_hp, branch_ct_hp);
-
-  printf("\nCounts =\n  { ");
-  for (j = 0; j < MV_JOINTS; ++j)
-    printf("%d, ", tnmvcounts.joints[j]);
-  printf("},\n");
-  for (i = 0; i < 2; ++i) {
-    printf("  {\n");
-    printf("    %d/%d,\n", tnmvcounts.comps[i].sign[0],
-                           tnmvcounts.comps[i].sign[1]);
-    printf("    { ");
-    for (j = 0; j < MV_CLASSES; ++j)
-      printf("%d, ", tnmvcounts.comps[i].classes[j]);
-    printf("},\n");
-    printf("    { ");
-    for (j = 0; j < CLASS0_SIZE; ++j)
-      printf("%d, ", tnmvcounts.comps[i].class0[j]);
-    printf("},\n");
-    printf("    { ");
-    for (j = 0; j < MV_OFFSET_BITS; ++j)
-      printf("%d/%d, ", tnmvcounts.comps[i].bits[j][0],
-                        tnmvcounts.comps[i].bits[j][1]);
-    printf("},\n");
-
-    printf("    {");
-    for (j = 0; j < CLASS0_SIZE; ++j) {
-      printf("{");
-      for (k = 0; k < 4; ++k)
-        printf("%d, ", tnmvcounts.comps[i].class0_fp[j][k]);
-      printf("}, ");
-    }
-    printf("},\n");
-
-    printf("    { ");
-    for (j = 0; j < 4; ++j)
-      printf("%d, ", tnmvcounts.comps[i].fp[j]);
-    printf("},\n");
-
-    printf("    %d/%d,\n",
-           tnmvcounts.comps[i].class0_hp[0],
-           tnmvcounts.comps[i].class0_hp[1]);
-    printf("    %d/%d,\n",
-           tnmvcounts.comps[i].hp[0],
-           tnmvcounts.comps[i].hp[1]);
-    printf("  },\n");
-  }
-
-  printf("\nProbs =\n  { ");
-  for (j = 0; j < MV_JOINTS - 1; ++j)
-    printf("%d, ", prob.joints[j]);
-  printf("},\n");
-  for (i=0; i< 2; ++i) {
-    printf("  {\n");
-    printf("    %d,\n", prob.comps[i].sign);
-    printf("    { ");
-    for (j = 0; j < MV_CLASSES - 1; ++j)
-      printf("%d, ", prob.comps[i].classes[j]);
-    printf("},\n");
-    printf("    { ");
-    for (j = 0; j < CLASS0_SIZE - 1; ++j)
-      printf("%d, ", prob.comps[i].class0[j]);
-    printf("},\n");
-    printf("    { ");
-    for (j = 0; j < MV_OFFSET_BITS; ++j)
-      printf("%d, ", prob.comps[i].bits[j]);
-    printf("},\n");
-    printf("    { ");
-    for (j = 0; j < CLASS0_SIZE; ++j) {
-      printf("{");
-      for (k = 0; k < 3; ++k)
-        printf("%d, ", prob.comps[i].class0_fp[j][k]);
-      printf("}, ");
-    }
-    printf("},\n");
-    printf("    { ");
-    for (j = 0; j < 3; ++j)
-      printf("%d, ", prob.comps[i].fp[j]);
-    printf("},\n");
-
-    printf("    %d,\n", prob.comps[i].class0_hp);
-    printf("    %d,\n", prob.comps[i].hp);
-    printf("  },\n");
-  }
-}
-
-static void add_nmvcount(nmv_context_counts* const dst,
-                         const nmv_context_counts* const src) {
-  int i, j, k;
-  for (j = 0; j < MV_JOINTS; ++j) {
-    dst->joints[j] += src->joints[j];
-  }
-  for (i = 0; i < 2; ++i) {
-    for (j = 0; j < MV_VALS; ++j) {
-      dst->comps[i].mvcount[j] += src->comps[i].mvcount[j];
-    }
-    dst->comps[i].sign[0] += src->comps[i].sign[0];
-    dst->comps[i].sign[1] += src->comps[i].sign[1];
-    for (j = 0; j < MV_CLASSES; ++j) {
-      dst->comps[i].classes[j] += src->comps[i].classes[j];
-    }
-    for (j = 0; j < CLASS0_SIZE; ++j) {
-      dst->comps[i].class0[j] += src->comps[i].class0[j];
-    }
-    for (j = 0; j < MV_OFFSET_BITS; ++j) {
-      dst->comps[i].bits[j][0] += src->comps[i].bits[j][0];
-      dst->comps[i].bits[j][1] += src->comps[i].bits[j][1];
-    }
-  }
-  for (i = 0; i < 2; ++i) {
-    for (j = 0; j < CLASS0_SIZE; ++j) {
-      for (k = 0; k < 4; ++k) {
-        dst->comps[i].class0_fp[j][k] += src->comps[i].class0_fp[j][k];
-      }
-    }
-    for (j = 0; j < 4; ++j) {
-      dst->comps[i].fp[j] += src->comps[i].fp[j];
-    }
-    dst->comps[i].class0_hp[0] += src->comps[i].class0_hp[0];
-    dst->comps[i].class0_hp[1] += src->comps[i].class0_hp[1];
-    dst->comps[i].hp[0] += src->comps[i].hp[0];
-    dst->comps[i].hp[1] += src->comps[i].hp[1];
-  }
-}
-#endif
-
 void vp9_write_nmv_probs(VP9_COMP* const cpi, int usehp, vp9_writer* const bc) {
   int i, j;
   nmv_context prob;
@@ -378,10 +228,6 @@ void vp9_write_nmv_probs(VP9_COMP* const cpi, int usehp, vp9_writer* const bc) {
   unsigned int branch_ct_hp[2][2];
   nmv_context *mvc = &cpi->common.fc.nmvc;
 
-#ifdef NMV_STATS
-  if (!cpi->dummy_packing)
-    add_nmvcount(&tnmvcounts, &cpi->NMVcount);
-#endif
   counts_to_nmv_context(&cpi->NMVcount, &prob, usehp,
                         branch_ct_joint, branch_ct_sign, branch_ct_classes,
                         branch_ct_class0, branch_ct_bits,
index 57584526e8977d18d97f77eb70ed67879bed970d..930faae24fbeda8a7ecd19953fa88cf09f845e8e 100644 (file)
@@ -103,10 +103,6 @@ extern int intra_mode_stats[VP9_INTRA_MODES]
                            [VP9_INTRA_MODES];
 #endif
 
-#ifdef NMV_STATS
-extern void init_nmvstats();
-extern void print_nmvstats();
-#endif
 #ifdef MODE_STATS
 extern void init_tx_count_stats();
 extern void write_tx_count_stats();
@@ -1455,9 +1451,6 @@ VP9_PTR vp9_create_compressor(VP9_CONFIG *oxcf) {
     init_context_counters();
 #endif
 
-#ifdef NMV_STATS
-  init_nmvstats();
-#endif
 #ifdef MODE_STATS
   init_tx_count_stats();
   init_switchable_interp_stats();
@@ -1721,10 +1714,7 @@ void vp9_remove_compressor(VP9_PTR *ptr) {
       print_mode_context(cpi);
     }
 #endif
-#ifdef NMV_STATS
-    if (cpi->pass != 1)
-      print_nmvstats();
-#endif
+
 #ifdef MODE_STATS
     if (cpi->pass != 1) {
       write_tx_count_stats();