Commit 11132ce3 authored by David Barker's avatar David Barker Committed by Debargha Mukherjee
Browse files

Fix bug with chroma-sub8x8 + resizing

The special path in build_inter_predictors for chroma blocks
corresponding to sub8x8 luma blocks would always fetch the
scale factors from 'xd', which correspond (at least in the
decoder) to the references of the block for which is_chroma_reference
returns true.

The correct behaviour is to fetch the scale factors from 'ref_buf',
which corresponds to the references of the block currently being

This patch fixes some encode/decode mismatches which were caused
by the above behaviour when the various reference frames had
different sizes.

Change-Id: I48a0a167ea25d47d08018016cf8b77885b3b5d6b
parent afe7c5fd
......@@ -998,10 +998,10 @@ void build_inter_predictors(const AV1_COMMON *cm, MACROBLOCKD *xd, int plane,
const struct scale_factors *const sf =
is_intrabc ? &xd->sf_identity : &xd->block_refs[ref]->sf;
is_intrabc ? &xd->sf_identity : &ref_buf->sf;
struct buf_2d *const pre_buf = is_intrabc ? dst_buf : &pd->pre[ref];
const struct scale_factors *const sf = &xd->block_refs[ref]->sf;
const struct scale_factors *const sf = &ref_buf->sf;
struct buf_2d *const pre_buf = &pd->pre[ref];
uint8_t *dst = dst_buf->buf;
Supports Markdown
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