summaryrefslogtreecommitdiff
path: root/vp9/common
diff options
context:
space:
mode:
authorJohn Koleszar <jkoleszar@google.com>2013-06-24 15:58:18 -0700
committerJohn Koleszar <jkoleszar@google.com>2013-06-24 15:58:18 -0700
commit4ecd6dbead68b0efc25259de02f8bbf72c21bff4 (patch)
tree9eb510fb1f688f78ffbc90a8ffa90a0d18fcef70 /vp9/common
parent08b1798ae74c89bce585c6c8bbf7ca81b74b2b93 (diff)
downloadlibvpx-4ecd6dbead68b0efc25259de02f8bbf72c21bff4.tar
libvpx-4ecd6dbead68b0efc25259de02f8bbf72c21bff4.tar.gz
libvpx-4ecd6dbead68b0efc25259de02f8bbf72c21bff4.tar.bz2
libvpx-4ecd6dbead68b0efc25259de02f8bbf72c21bff4.zip
Move vp9_counts_to_nmv_context to encoder
This function only used from within vp9_encodemv.c. Change-Id: Ib3fc7c30b1e2d27321397ac474cbc8976bc1f4b1
Diffstat (limited to 'vp9/common')
-rw-r--r--vp9/common/vp9_entropymv.c73
-rw-r--r--vp9/common/vp9_entropymv.h14
2 files changed, 1 insertions, 86 deletions
diff --git a/vp9/common/vp9_entropymv.c b/vp9/common/vp9_entropymv.c
index 000e284ee..061ff525d 100644
--- a/vp9/common/vp9_entropymv.c
+++ b/vp9/common/vp9_entropymv.c
@@ -226,79 +226,6 @@ void vp9_counts_process(nmv_context_counts *nmv_count, int usehp) {
counts_to_context(&nmv_count->comps[1], usehp);
}
-void vp9_counts_to_nmv_context(
- nmv_context_counts *nmv_count,
- nmv_context *prob,
- int usehp,
- unsigned int (*branch_ct_joint)[2],
- unsigned int (*branch_ct_sign)[2],
- unsigned int (*branch_ct_classes)[MV_CLASSES - 1][2],
- unsigned int (*branch_ct_class0)[CLASS0_SIZE - 1][2],
- unsigned int (*branch_ct_bits)[MV_OFFSET_BITS][2],
- unsigned int (*branch_ct_class0_fp)[CLASS0_SIZE][4 - 1][2],
- unsigned int (*branch_ct_fp)[4 - 1][2],
- unsigned int (*branch_ct_class0_hp)[2],
- unsigned int (*branch_ct_hp)[2]) {
- int i, j, k;
- vp9_counts_process(nmv_count, usehp);
- vp9_tree_probs_from_distribution(vp9_mv_joint_tree,
- prob->joints,
- branch_ct_joint,
- nmv_count->joints, 0);
- for (i = 0; i < 2; ++i) {
- const uint32_t s0 = nmv_count->comps[i].sign[0];
- const uint32_t s1 = nmv_count->comps[i].sign[1];
-
- prob->comps[i].sign = get_binary_prob(s0, s1);
- branch_ct_sign[i][0] = s0;
- branch_ct_sign[i][1] = s1;
- vp9_tree_probs_from_distribution(vp9_mv_class_tree,
- prob->comps[i].classes,
- branch_ct_classes[i],
- nmv_count->comps[i].classes, 0);
- vp9_tree_probs_from_distribution(vp9_mv_class0_tree,
- prob->comps[i].class0,
- branch_ct_class0[i],
- nmv_count->comps[i].class0, 0);
- for (j = 0; j < MV_OFFSET_BITS; ++j) {
- const uint32_t b0 = nmv_count->comps[i].bits[j][0];
- const uint32_t b1 = nmv_count->comps[i].bits[j][1];
-
- prob->comps[i].bits[j] = get_binary_prob(b0, b1);
- branch_ct_bits[i][j][0] = b0;
- branch_ct_bits[i][j][1] = b1;
- }
- }
- for (i = 0; i < 2; ++i) {
- for (k = 0; k < CLASS0_SIZE; ++k) {
- vp9_tree_probs_from_distribution(vp9_mv_fp_tree,
- prob->comps[i].class0_fp[k],
- branch_ct_class0_fp[i][k],
- nmv_count->comps[i].class0_fp[k], 0);
- }
- vp9_tree_probs_from_distribution(vp9_mv_fp_tree,
- prob->comps[i].fp,
- branch_ct_fp[i],
- nmv_count->comps[i].fp, 0);
- }
- if (usehp) {
- for (i = 0; i < 2; ++i) {
- const uint32_t c0_hp0 = nmv_count->comps[i].class0_hp[0];
- const uint32_t c0_hp1 = nmv_count->comps[i].class0_hp[1];
- const uint32_t hp0 = nmv_count->comps[i].hp[0];
- const uint32_t hp1 = nmv_count->comps[i].hp[1];
-
- prob->comps[i].class0_hp = get_binary_prob(c0_hp0, c0_hp1);
- branch_ct_class0_hp[i][0] = c0_hp0;
- branch_ct_class0_hp[i][1] = c0_hp1;
-
- prob->comps[i].hp = get_binary_prob(hp0, hp1);
- branch_ct_hp[i][0] = hp0;
- branch_ct_hp[i][1] = hp1;
- }
- }
-}
-
static unsigned int adapt_probs(unsigned int i,
vp9_tree tree,
vp9_prob this_probs[],
diff --git a/vp9/common/vp9_entropymv.h b/vp9/common/vp9_entropymv.h
index 0fc20dbfc..c2fd74bc6 100644
--- a/vp9/common/vp9_entropymv.h
+++ b/vp9/common/vp9_entropymv.h
@@ -124,19 +124,7 @@ typedef struct {
void vp9_increment_nmv(const MV *mv, const MV *ref, nmv_context_counts *mvctx,
int usehp);
extern const nmv_context vp9_default_nmv_context;
-void vp9_counts_to_nmv_context(
- nmv_context_counts *NMVcount,
- nmv_context *prob,
- int usehp,
- unsigned int (*branch_ct_joint)[2],
- unsigned int (*branch_ct_sign)[2],
- unsigned int (*branch_ct_classes)[MV_CLASSES - 1][2],
- unsigned int (*branch_ct_class0)[CLASS0_SIZE - 1][2],
- unsigned int (*branch_ct_bits)[MV_OFFSET_BITS][2],
- unsigned int (*branch_ct_class0_fp)[CLASS0_SIZE][4 - 1][2],
- unsigned int (*branch_ct_fp)[4 - 1][2],
- unsigned int (*branch_ct_class0_hp)[2],
- unsigned int (*branch_ct_hp)[2]);
+
void vp9_counts_process(nmv_context_counts *NMVcount, int usehp);
#endif // VP9_COMMON_VP9_ENTROPYMV_H_