Commit 23e83574 authored by Yaowu Xu's avatar Yaowu Xu

misc-fixes: always use high precision MVs

This commit merges the fix to enable high precision motion vector
always.

Related tracking issues:
https://bugs.chromium.org/p/webm/issues/detail?id=1036
Original libvpx commit:
1799f2f8

Change-Id: I39299a5cb6e18b83d9e88279c11e8cfc8a66cbc6
parent b07a2a8e
......@@ -140,13 +140,8 @@ MV_CLASS_TYPE av1_get_mv_class(int z, int *offset) {
}
int av1_use_mv_hp(const MV *ref) {
#if CONFIG_MISC_FIXES
(void)ref;
return 1;
#else
return (abs(ref->row) >> 3) < COMPANDED_MVREF_THRESH &&
(abs(ref->col) >> 3) < COMPANDED_MVREF_THRESH;
#endif
}
static void inc_mv_component(int v, nmv_component_counts *comp_counts, int incr,
......@@ -182,15 +177,11 @@ void av1_inc_mv(const MV *mv, nmv_context_counts *counts, const int usehp) {
const MV_JOINT_TYPE j = av1_get_mv_joint(mv);
++counts->joints[j];
if (mv_joint_vertical(j)) {
inc_mv_component(mv->row, &counts->comps[0], 1,
!CONFIG_MISC_FIXES || usehp);
}
if (mv_joint_vertical(j))
inc_mv_component(mv->row, &counts->comps[0], 1, usehp);
if (mv_joint_horizontal(j)) {
inc_mv_component(mv->col, &counts->comps[1], 1,
!CONFIG_MISC_FIXES || usehp);
}
if (mv_joint_horizontal(j))
inc_mv_component(mv->col, &counts->comps[1], 1, usehp);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment