From 1be877faf932e83f7fb8425f310fbc7f42c1beb2 Mon Sep 17 00:00:00 2001 From: Ari Koivula Date: Mon, 29 Feb 2016 14:29:01 +0200 Subject: [PATCH] Fix chroma reconstruction with tiles An incorrect frame boundary check caused a checksum error, because the chroma reconstruction of the encoder was wrong. The encoder treated horizontal tile boundaries as frame boundaries when the vertical component of the movement vector was a multiple of 8. --- src/inter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inter.c b/src/inter.c index b913a7ad..58a0e9fc 100644 --- a/src/inter.c +++ b/src/inter.c @@ -347,7 +347,7 @@ void kvz_inter_recon_lcu(const encoder_state_t * const state, coord_y = (y + state->tile->lcu_offset_y * (LCU_WIDTH >> 1)) + (mv[1]>>1); overflow_neg_x = (coord_x < 0)?1:0; - overflow_neg_y = (y + (mv[1]>>1) < 0)?1:0; + overflow_neg_y = (coord_y < 0)?1:0; overflow_pos_x = (coord_x >= ref->width>>1 )?1:0; overflow_pos_y = (coord_y >= ref->height>>1)?1:0;