From 0f492c7680eaf27598cadff9c95cf745e26a83c5 Mon Sep 17 00:00:00 2001 From: Ari Koivula Date: Fri, 21 Mar 2014 10:42:41 +0200 Subject: [PATCH] Fix deblocking of transform boundaries. This fixes issues with inter. Deblocking works now. --- src/filter.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/filter.c b/src/filter.c index 9334ee2c..635715a0 100644 --- a/src/filter.c +++ b/src/filter.c @@ -180,11 +180,12 @@ void filter_deblock_edge_luma(encoder_control *encoder, int8_t strength = 0; { - // Don't do anything if there is no PU or TU edge here. - int cu_width = LCU_WIDTH >> cu_q->depth; - if (dir == EDGE_HOR && ypos % cu_width != 0) { - return; - } + // Return if called with a coordinate which is not at CU or TU boundary. + // TODO: Add handling for asymmetric inter CU boundaries which do not coincide + // with transform boundaries. + const int tu_width = LCU_WIDTH >> cu_q->tr_depth; + if (dir == EDGE_HOR && (ypos & (tu_width - 1))) return; + if (dir == EDGE_VER && (xpos & (tu_width - 1))) return; }