Fix inter search being used for 4x4 blocks
When 4x4 intra blocks are enabled and inter search is limited to 16x16
and larger blocks, it is possible that inter search is accidentally done
for 4x4 blocks. Fixed by checking that block size is at least 8x8 before
doing inter search.
@@ -419,7 +419,10 @@ static double search_cu(encoder_state_t * const state, int x, int y, int depth,
y + cu_width <= frame->height)
{
int cu_width_inter_min = LCU_WIDTH >> ctrl->cfg.pu_depth_inter.max;
- bool can_use_inter = state->frame->slicetype != KVZ_SLICE_I && (
+ bool can_use_inter =
+ state->frame->slicetype != KVZ_SLICE_I &&
+ depth <= MAX_DEPTH &&
+ (
WITHIN(depth, ctrl->cfg.pu_depth_inter.min, ctrl->cfg.pu_depth_inter.max) ||
// When the split was forced because the CTU is partially outside the
// frame, we permit inter coding even if pu_depth_inter would
