Fix a decoder mismatch due to where mv_prec is set
STATS_CHANGED
Change-Id: I3fb6f908e82bafc1ce805c4aa80fb076c4356089
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index a2f64ee..a5373eb 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -4009,6 +4009,12 @@
*q = av1_rc_pick_q_and_bounds(cpi, &cpi->rc, cm->width, cm->height,
cpi->gf_group.index, bottom_index, top_index);
+ // Set the motion vector precision based on mv stats from the last coded
+ // frame.
+ if (!frame_is_intra_only(cm)) {
+ av1_pick_and_set_high_precision_mv(cpi, *q);
+ }
+
// Configure experimental use of segmentation for enhanced coding of
// static regions if indicated.
// Only allowed in the second pass of a two pass encode, as it requires
@@ -5123,11 +5129,6 @@
#if CONFIG_COLLECT_COMPONENT_TIMING
start_timing(cpi, av1_encode_frame_time);
#endif
- // Set the motion vector precision based on mv stats from the last coded
- // frame.
- if (!frame_is_intra_only(cm)) {
- av1_pick_and_set_high_precision_mv(cpi, q);
- }
// transform / motion compensation build reconstruction frame
av1_encode_frame(cpi);