]> granicus.if.org Git - libvpx/commitdiff
Fix vp9_tree_probs_from_distribution with CONFIG_CODE_NONZEROCOUNT
authorJohn Koleszar <jkoleszar@google.com>
Mon, 11 Mar 2013 18:03:36 +0000 (11:03 -0700)
committerJohn Koleszar <jkoleszar@google.com>
Mon, 11 Mar 2013 18:03:36 +0000 (11:03 -0700)
The automatic merge result was incomplete.

Change-Id: I8976318bfc346d867660a013a302c80edb25fc29

vp9/common/vp9_entropy.c
vp9/encoder/vp9_bitstream.c

index b5ae70a6661cb65d441b3fcd7c3f7f388378d30d..7c902d8c44c4c7c31bf7bf225341f617e286e30f 100644 (file)
@@ -324,27 +324,27 @@ void vp9_default_coef_probs(VP9_COMMON *pc) {
       unsigned int branch_ct32x32[NZC32X32_NODES][2];
       for (i = 0; i < BLOCK_TYPES; ++i) {
         vp9_tree_probs_from_distribution(
-          NZC4X4_TOKENS, vp9_nzc4x4_encodings, vp9_nzc4x4_tree,
+          vp9_nzc4x4_tree,
           pc->fc.nzc_probs_4x4[h][g][i], branch_ct4x4,
-          default_nzc_counts_4x4[h][g][i]);
+          default_nzc_counts_4x4[h][g][i], 0);
       }
       for (i = 0; i < BLOCK_TYPES; ++i) {
         vp9_tree_probs_from_distribution(
-          NZC8X8_TOKENS, vp9_nzc8x8_encodings, vp9_nzc8x8_tree,
+          vp9_nzc8x8_tree,
           pc->fc.nzc_probs_8x8[h][g][i], branch_ct8x8,
-          default_nzc_counts_8x8[h][g][i]);
+          default_nzc_counts_8x8[h][g][i], 0);
       }
       for (i = 0; i < BLOCK_TYPES; ++i) {
         vp9_tree_probs_from_distribution(
-          NZC16X16_TOKENS, vp9_nzc16x16_encodings, vp9_nzc16x16_tree,
+          vp9_nzc16x16_tree,
           pc->fc.nzc_probs_16x16[h][g][i], branch_ct16x16,
-          default_nzc_counts_16x16[h][g][i]);
+          default_nzc_counts_16x16[h][g][i], 0);
       }
       for (i = 0; i < BLOCK_TYPES; ++i) {
         vp9_tree_probs_from_distribution(
-          NZC32X32_TOKENS, vp9_nzc32x32_encodings, vp9_nzc32x32_tree,
+          vp9_nzc32x32_tree,
           pc->fc.nzc_probs_32x32[h][g][i], branch_ct32x32,
-          default_nzc_counts_32x32[h][g][i]);
+          default_nzc_counts_32x32[h][g][i], 0);
       }
     }
   }
@@ -1545,7 +1545,6 @@ static void adapt_nzc_probs(VP9_COMMON *cm,
   vp9_prob nzc_probs[NZC32X32_NODES];
   int tokens, nodes;
   const vp9_tree_index *nzc_tree;
-  const struct vp9_token_struct *nzc_encodings;
   vp9_prob *dst_nzc_probs;
   vp9_prob *pre_nzc_probs;
   unsigned int *nzc_counts;
@@ -1553,27 +1552,23 @@ static void adapt_nzc_probs(VP9_COMMON *cm,
   if (block_size == 32) {
     tokens = NZC32X32_TOKENS;
     nzc_tree = vp9_nzc32x32_tree;
-    nzc_encodings = vp9_nzc32x32_encodings;
     dst_nzc_probs = cm->fc.nzc_probs_32x32[0][0][0];
     pre_nzc_probs = cm->fc.pre_nzc_probs_32x32[0][0][0];
     nzc_counts = cm->fc.nzc_counts_32x32[0][0][0];
   } else if (block_size == 16) {
     tokens = NZC16X16_TOKENS;
     nzc_tree = vp9_nzc16x16_tree;
-    nzc_encodings = vp9_nzc16x16_encodings;
     dst_nzc_probs = cm->fc.nzc_probs_16x16[0][0][0];
     pre_nzc_probs = cm->fc.pre_nzc_probs_16x16[0][0][0];
     nzc_counts = cm->fc.nzc_counts_16x16[0][0][0];
   } else if (block_size == 8) {
     tokens = NZC8X8_TOKENS;
     nzc_tree = vp9_nzc8x8_tree;
-    nzc_encodings = vp9_nzc8x8_encodings;
     dst_nzc_probs = cm->fc.nzc_probs_8x8[0][0][0];
     pre_nzc_probs = cm->fc.pre_nzc_probs_8x8[0][0][0];
     nzc_counts = cm->fc.nzc_counts_8x8[0][0][0];
   } else {
     nzc_tree = vp9_nzc4x4_tree;
-    nzc_encodings = vp9_nzc4x4_encodings;
     tokens = NZC4X4_TOKENS;
     dst_nzc_probs = cm->fc.nzc_probs_4x4[0][0][0];
     pre_nzc_probs = cm->fc.pre_nzc_probs_4x4[0][0][0];
@@ -1586,10 +1581,9 @@ static void adapt_nzc_probs(VP9_COMMON *cm,
         int offset = c * REF_TYPES * BLOCK_TYPES + r * BLOCK_TYPES + b;
         int offset_nodes = offset * nodes;
         int offset_tokens = offset * tokens;
-        vp9_tree_probs_from_distribution(tokens,
-                                         nzc_encodings, nzc_tree,
+        vp9_tree_probs_from_distribution(nzc_tree,
                                          nzc_probs, nzc_branch_ct,
-                                         nzc_counts + offset_tokens);
+                                         nzc_counts + offset_tokens, 0);
         for (n = 0; n < nodes; ++n) {
           count = nzc_branch_ct[n][0] + nzc_branch_ct[n][1];
           count = count > count_sat ? count_sat : count;
index 558971d663091721b0332ea0c5d93bc044894f4d..84d4123972ae01d3d66d7804b08818f98010a3da 100644 (file)
@@ -1790,7 +1790,6 @@ static void update_nzc_probs_common(VP9_COMP* cpi,
   int savings = 0;
   int tokens, nodes;
   const vp9_tree_index *nzc_tree;
-  const struct vp9_token_struct *nzc_encodings;
   vp9_prob *new_nzc_probs;
   vp9_prob *old_nzc_probs;
   unsigned int *nzc_counts;
@@ -1800,7 +1799,6 @@ static void update_nzc_probs_common(VP9_COMP* cpi,
   if (block_size == 32) {
     tokens = NZC32X32_TOKENS;
     nzc_tree = vp9_nzc32x32_tree;
-    nzc_encodings = vp9_nzc32x32_encodings;
     old_nzc_probs = cm->fc.nzc_probs_32x32[0][0][0];
     new_nzc_probs = cpi->frame_nzc_probs_32x32[0][0][0];
     nzc_counts = cm->fc.nzc_counts_32x32[0][0][0];
@@ -1809,7 +1807,6 @@ static void update_nzc_probs_common(VP9_COMP* cpi,
   } else if (block_size == 16) {
     tokens = NZC16X16_TOKENS;
     nzc_tree = vp9_nzc16x16_tree;
-    nzc_encodings = vp9_nzc16x16_encodings;
     old_nzc_probs = cm->fc.nzc_probs_16x16[0][0][0];
     new_nzc_probs = cpi->frame_nzc_probs_16x16[0][0][0];
     nzc_counts = cm->fc.nzc_counts_16x16[0][0][0];
@@ -1818,7 +1815,6 @@ static void update_nzc_probs_common(VP9_COMP* cpi,
   } else if (block_size == 8) {
     tokens = NZC8X8_TOKENS;
     nzc_tree = vp9_nzc8x8_tree;
-    nzc_encodings = vp9_nzc8x8_encodings;
     old_nzc_probs = cm->fc.nzc_probs_8x8[0][0][0];
     new_nzc_probs = cpi->frame_nzc_probs_8x8[0][0][0];
     nzc_counts = cm->fc.nzc_counts_8x8[0][0][0];
@@ -1826,7 +1822,6 @@ static void update_nzc_probs_common(VP9_COMP* cpi,
     upd = NZC_UPDATE_PROB_8X8;
   } else {
     nzc_tree = vp9_nzc4x4_tree;
-    nzc_encodings = vp9_nzc4x4_encodings;
     tokens = NZC4X4_TOKENS;
     old_nzc_probs = cm->fc.nzc_probs_4x4[0][0][0];
     new_nzc_probs = cpi->frame_nzc_probs_4x4[0][0][0];
@@ -1842,11 +1837,10 @@ static void update_nzc_probs_common(VP9_COMP* cpi,
         int offset = c * REF_TYPES * BLOCK_TYPES + r * BLOCK_TYPES + b;
         int offset_nodes = offset * nodes;
         int offset_tokens = offset * tokens;
-        vp9_tree_probs_from_distribution(tokens,
-                                         nzc_encodings, nzc_tree,
+        vp9_tree_probs_from_distribution(nzc_tree,
                                          new_nzc_probs + offset_nodes,
                                          nzc_branch_ct + offset_nodes,
-                                         nzc_counts + offset_tokens);
+                                         nzc_counts + offset_tokens, 0);
       }
     }
   }