summaryrefslogtreecommitdiffstats
path: root/third_party/aom/av1/common/entropymv.c
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-10-18 21:53:44 -0500
committertrav90 <travawine@palemoon.org>2018-10-18 21:53:44 -0500
commitec910d81405c736a4490383a250299a7837c2e64 (patch)
tree4f27cc226f93a863121aef6c56313e4153a69b3e /third_party/aom/av1/common/entropymv.c
parent01eb57073ba97b2d6cbf20f745dfcc508197adc3 (diff)
downloadUXP-ec910d81405c736a4490383a250299a7837c2e64.tar
UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.gz
UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.lz
UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.xz
UXP-ec910d81405c736a4490383a250299a7837c2e64.zip
Update aom to commit id e87fb2378f01103d5d6e477a4ef6892dc714e614
Diffstat (limited to 'third_party/aom/av1/common/entropymv.c')
-rw-r--r--third_party/aom/av1/common/entropymv.c39
1 files changed, 28 insertions, 11 deletions
diff --git a/third_party/aom/av1/common/entropymv.c b/third_party/aom/av1/common/entropymv.c
index 4737915a4..2d0191366 100644
--- a/third_party/aom/av1/common/entropymv.c
+++ b/third_party/aom/av1/common/entropymv.c
@@ -68,6 +68,12 @@ static const nmv_context default_nmv_context = {
{ AOM_ICDF(160 * 128), AOM_ICDF(32768), 0 },
{ AOM_ICDF(128 * 128), AOM_ICDF(32768), 0 },
{ AOM_ICDF(216 * 128), AOM_ICDF(32768), 0 },
+ { { AOM_ICDF(128 * 196), AOM_ICDF(32768), 0 },
+ { AOM_ICDF(128 * 198), AOM_ICDF(32768), 0 },
+ { AOM_ICDF(128 * 208), AOM_ICDF(32768), 0 },
+ { AOM_ICDF(128 * 224), AOM_ICDF(32768), 0 },
+ { AOM_ICDF(128 * 245), AOM_ICDF(32768), 0 },
+ { AOM_ICDF(128 * 240), AOM_ICDF(32768), 0 } }, // bits_cdf
#endif
},
{
@@ -93,6 +99,12 @@ static const nmv_context default_nmv_context = {
{ AOM_ICDF(160 * 128), AOM_ICDF(32768), 0 },
{ AOM_ICDF(128 * 128), AOM_ICDF(32768), 0 },
{ AOM_ICDF(216 * 128), AOM_ICDF(32768), 0 },
+ { { AOM_ICDF(128 * 196), AOM_ICDF(32768), 0 },
+ { AOM_ICDF(128 * 198), AOM_ICDF(32768), 0 },
+ { AOM_ICDF(128 * 208), AOM_ICDF(32768), 0 },
+ { AOM_ICDF(128 * 224), AOM_ICDF(32768), 0 },
+ { AOM_ICDF(128 * 245), AOM_ICDF(32768), 0 },
+ { AOM_ICDF(128 * 240), AOM_ICDF(32768), 0 } }, // bits_cdf
#endif
} },
};
@@ -169,7 +181,7 @@ static void inc_mv_component(int v, nmv_component_counts *comp_counts, int incr,
if (c == MV_CLASS_0) {
comp_counts->class0[d] += incr;
-#if CONFIG_INTRABC
+#if CONFIG_INTRABC || CONFIG_AMVR
if (precision > MV_SUBPEL_NONE)
#endif
comp_counts->class0_fp[d][f] += incr;
@@ -178,7 +190,7 @@ static void inc_mv_component(int v, nmv_component_counts *comp_counts, int incr,
int i;
int b = c + CLASS0_BITS - 1; // number of bits
for (i = 0; i < b; ++i) comp_counts->bits[i][((d >> i) & 1)] += incr;
-#if CONFIG_INTRABC
+#if CONFIG_INTRABC || CONFIG_AMVR
if (precision > MV_SUBPEL_NONE)
#endif
comp_counts->fp[f] += incr;
@@ -222,18 +234,23 @@ void av1_adapt_mv_probs(AV1_COMMON *cm, int allow_hp) {
for (j = 0; j < MV_OFFSET_BITS; ++j)
comp->bits[j] = av1_mode_mv_merge_probs(pre_comp->bits[j], c->bits[j]);
+#if CONFIG_AMVR
+ if (cm->cur_frame_mv_precision_level == 0) {
+#endif
+ for (j = 0; j < CLASS0_SIZE; ++j)
+ aom_tree_merge_probs(av1_mv_fp_tree, pre_comp->class0_fp[j],
+ c->class0_fp[j], comp->class0_fp[j]);
- for (j = 0; j < CLASS0_SIZE; ++j)
- aom_tree_merge_probs(av1_mv_fp_tree, pre_comp->class0_fp[j],
- c->class0_fp[j], comp->class0_fp[j]);
-
- aom_tree_merge_probs(av1_mv_fp_tree, pre_comp->fp, c->fp, comp->fp);
+ aom_tree_merge_probs(av1_mv_fp_tree, pre_comp->fp, c->fp, comp->fp);
- if (allow_hp) {
- comp->class0_hp =
- av1_mode_mv_merge_probs(pre_comp->class0_hp, c->class0_hp);
- comp->hp = av1_mode_mv_merge_probs(pre_comp->hp, c->hp);
+ if (allow_hp) {
+ comp->class0_hp =
+ av1_mode_mv_merge_probs(pre_comp->class0_hp, c->class0_hp);
+ comp->hp = av1_mode_mv_merge_probs(pre_comp->hp, c->hp);
+ }
+#if CONFIG_AMVR
}
+#endif
}
}
}