misc-fix: use subexp prob updates for MV probs This commit merges the fix that changes to use subexp probability updates for update MV probabilities. Related tracking issue: https://bugs.chromium.org/p/webm/issues/detail?id=1040 Original libvpx commit: 177e7b53e7e88a94b20cf04207803231c7116f9e Change-Id: Id1c79a507f3ae698c3560a559b7b630974bcf656
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c index 546e3df..6bc4eac 100644 --- a/av1/decoder/decodeframe.c +++ b/av1/decoder/decodeframe.c
@@ -208,12 +208,7 @@ static void update_mv_probs(aom_prob *p, int n, aom_reader *r) { int i; for (i = 0; i < n; ++i) -#if CONFIG_MISC_FIXES av1_diff_update_prob(r, &p[i], ACCT_STR); -#else - if (aom_read(r, MV_UPDATE_PROB, ACCT_STR)) - p[i] = (aom_read_literal(r, 7, ACCT_STR) << 1) | 1; -#endif } static void read_mv_probs(nmv_context *ctx, int allow_hp, aom_reader *r) {
diff --git a/av1/encoder/encodemv.c b/av1/encoder/encodemv.c index ce946f4..5667ee0 100644 --- a/av1/encoder/encodemv.c +++ b/av1/encoder/encodemv.c
@@ -140,7 +140,6 @@ static void update_mv(aom_writer *w, const unsigned int ct[2], aom_prob *cur_p, aom_prob upd_p) { -#if CONFIG_MISC_FIXES (void)upd_p; #if CONFIG_TILE_GROUPS // Just use the maximum number of tile groups to avoid passing in the actual @@ -149,16 +148,6 @@ #else av1_cond_prob_diff_update(w, cur_p, ct, 1); #endif -#else - const aom_prob new_p = get_binary_prob(ct[0], ct[1]) | 1; - const int update = cost_branch256(ct, *cur_p) + av1_cost_zero(upd_p) > - cost_branch256(ct, new_p) + av1_cost_one(upd_p) + 7 * 256; - aom_write(w, update, upd_p); - if (update) { - *cur_p = new_p; - aom_write_literal(w, new_p >> 1, 7); - } -#endif } static void write_mv_update(const aom_tree_index *tree,