Commit 32b8d46f authored by Timothy B. Terriberry's avatar Timothy B. Terriberry Committed by Tim Terriberry

chroma_sub8x8: Fix av1_get_entropy_contexts()

This was not clamping the chroma block size to at least 4x4, even
though it is getting contexts for coding the transform residual
(which is at least 4x4). Thus it would copy too few contexts.

This is an encoder-only change. It should not change the current
encoder output, because we currently store twice as many entropy
contexts as actually required, so we'll copy 1 and then check 2 to
see if either are non-zero. However, this will break when we
eliminate the context doubling, as instead we'll copy 0 and check
1.

Change-Id: I4087529d6b3e7cd5a226746625b90494790983e6
parent 551d0fed
......@@ -780,7 +780,12 @@ void av1_get_entropy_contexts(BLOCK_SIZE bsize, TX_SIZE tx_size,
const struct macroblockd_plane *pd,
ENTROPY_CONTEXT t_above[2 * MAX_MIB_SIZE],
ENTROPY_CONTEXT t_left[2 * MAX_MIB_SIZE]) {
#if CONFIG_CB4X4 && !CONFIG_CHROMA_2X2
const BLOCK_SIZE plane_bsize =
AOMMAX(BLOCK_4X4, get_plane_block_size(bsize, pd));
#else
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
#endif
get_entropy_contexts_plane(plane_bsize, tx_size, pd, t_above, t_left);
}
......
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