Commit 03bd210f authored by David Barker's avatar David Barker Committed by Debargha Mukherjee

Fix global motion + supertx

Previously, any uses of global motion inside supertx blocks were not
counted correctly. This caused encode/decode mismatches when every use
of global motion in a frame occurred inside supertx blocks.
This happened in, for example, AV1/ActiveMapTest.Test/0

This patch makes update_state_supertx count global motion usages in
the same way update_state does, and fixes the above problem.

Change-Id: Id500d5a24c565774fa3aa3b52cd3fdbeab75b486
parent e3e00797
......@@ -1320,6 +1320,27 @@ static void update_state_supertx(const AV1_COMP *const cpi, ThreadData *td,
if (!frame_is_intra_only(cm)) {
av1_update_mv_count(td);
#if CONFIG_GLOBAL_MOTION
if (is_inter_block(mbmi)) {
if (bsize >= BLOCK_8X8) {
// TODO(sarahparker): global motion stats need to be handled per-tile
// to be compatible with tile-based threading.
update_global_motion_used(mbmi->mode, mbmi, (AV1_COMP *)cpi);
} else {
const int num_4x4_w = num_4x4_blocks_wide_lookup[bsize];
const int num_4x4_h = num_4x4_blocks_high_lookup[bsize];
int idx, idy;
for (idy = 0; idy < 2; idy += num_4x4_h) {
for (idx = 0; idx < 2; idx += num_4x4_w) {
const int j = idy * 2 + idx;
update_global_motion_used(mi->bmi[j].as_mode, mbmi,
(AV1_COMP *)cpi);
}
}
}
}
#endif // CONFIG_GLOBAL_MOTION
if (cm->interp_filter == SWITCHABLE
#if CONFIG_EXT_INTERP
&& av1_is_interp_needed(xd)
......
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