Commit 8efc8278 authored by Zoe Liu's avatar Zoe Liu

Enforce the block size requirement on comp ref

Change-Id: I852e75e8f41f057c2cf3693cb3441e6640ac7e0d
parent ebecbd3d
...@@ -234,19 +234,19 @@ extern const wedge_params_type wedge_params_lookup[BLOCK_SIZES_ALL]; ...@@ -234,19 +234,19 @@ extern const wedge_params_type wedge_params_lookup[BLOCK_SIZES_ALL];
static INLINE int is_interinter_compound_used(COMPOUND_TYPE type, static INLINE int is_interinter_compound_used(COMPOUND_TYPE type,
BLOCK_SIZE sb_type) { BLOCK_SIZE sb_type) {
(void)sb_type; const int comp_allowed = is_comp_ref_allowed(sb_type);
switch (type) { switch (type) {
case COMPOUND_AVERAGE: return sb_type >= BLOCK_4X4; case COMPOUND_AVERAGE:
case COMPOUND_WEDGE: return wedge_params_lookup[sb_type].bits > 0; case COMPOUND_SEG: return comp_allowed;
case COMPOUND_SEG: case COMPOUND_WEDGE:
return AOMMIN(block_size_wide[sb_type], block_size_high[sb_type]) >= 8; return comp_allowed && wedge_params_lookup[sb_type].bits > 0;
default: assert(0); return 0; default: assert(0); return 0;
} }
} }
static INLINE int is_any_masked_compound_used(BLOCK_SIZE sb_type) { static INLINE int is_any_masked_compound_used(BLOCK_SIZE sb_type) {
COMPOUND_TYPE comp_type; COMPOUND_TYPE comp_type;
if (sb_type < BLOCK_4X4) return 0; if (!is_comp_ref_allowed(sb_type)) return 0;
for (comp_type = 0; comp_type < COMPOUND_TYPES; comp_type++) { for (comp_type = 0; comp_type < COMPOUND_TYPES; comp_type++) {
if (is_masked_compound_type(comp_type) && if (is_masked_compound_type(comp_type) &&
is_interinter_compound_used(comp_type, sb_type)) is_interinter_compound_used(comp_type, sb_type))
......
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