]> granicus.if.org Git - libvpx/commitdiff
Modified loop filter edge skipping
authorJanne Salonen <jsalonen@google.com>
Fri, 7 Jun 2013 11:01:23 +0000 (14:01 +0300)
committerJohn Koleszar <jkoleszar@google.com>
Fri, 7 Jun 2013 13:36:22 +0000 (06:36 -0700)
Added condition to not to skip filtering of transform block edges when
the edge is also a decoding block edge.

Change-Id: Iaccb6206c4202b78e5dca3b89379556e0f4aba0c

vp9/common/vp9_loopfilter.c

index 59df0b7c36755cc53f9e6d51479b2f1e8b44f99e..643233cea5eb7f80cf04acbce43c75939d766554 100644 (file)
@@ -683,8 +683,14 @@ static void filter_block_plane(VP9_COMMON *cm, MACROBLOCKD *xd,
       const int skip_left =
           (c + mi_col > 0) ? mi[c - 1].mbmi.mb_skip_coeff : 0;
       const int skip_this = mi[c].mbmi.mb_skip_coeff;
-      const int skip_this_c = skip_this && skip_left;
-      const int skip_this_r = skip_this && skip_above;
+      // left edge of current unit is block/partition edge -> no skip
+      const int block_edge_left = b_width_log2(mi->mbmi.sb_type) ?
+          !(c & ((1 << (b_width_log2(mi->mbmi.sb_type)-1)) - 1)) : 1;
+      const int skip_this_c = skip_this && skip_left && !block_edge_left;
+      // top edge of current unit is block/partition edge -> no skip
+      const int block_edge_above = b_height_log2(mi->mbmi.sb_type) ?
+          !(r & ((1 << (b_height_log2(mi->mbmi.sb_type)-1)) - 1)) : 1;
+      const int skip_this_r = skip_this && skip_above && !block_edge_above;
       const TX_SIZE tx_size = plane ? get_uv_tx_size(xd) : mi[c].mbmi.txfm_size;
 
       // Filter level can vary per MI