Commit 9edb72c9 authored by Timothy B. Terriberry's avatar Timothy B. Terriberry

cb4x4: Elide special cases cb4x4 doesn't need

These conditions in has_top_right() are never true when cb4x4 is
enabled.

The corresponding check in has_bottom_left() is already behind a
similar #if.

This is needed by a subsequent patch to move sub-4x4 block sizes
behind their own configuration flag, since that changes the value
of bw_unit, which might cause the condition to become true when it
should not be.

Encoder and decoder output should remain unchanged.

Change-Id: I648654dfc265f911d83668d94dc927ebc0c70771
parent 47de4660
......@@ -447,8 +447,10 @@ static int has_top_right(BLOCK_SIZE bsize, int mi_row, int mi_col,
const int plane_bw_unit = AOMMAX(bw_unit >> ss_x, 1);
const int top_right_count_unit = tx_size_wide_unit[txsz];
#if !CONFIG_CB4X4
// Special handling for block sizes 4x8 and 4x4.
if (ss_x == 0 && bw_unit < 2 && col_off == 0) return 1;
#endif
if (row_off > 0) { // Just need to check if enough pixels on the right.
return col_off + top_right_count_unit < plane_bw_unit;
......
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