summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-01-23 15:28:34 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-01-23 15:28:34 +0000
commit1cc2d211756b4b741e32acf1e0b9ed5499fa2402 (patch)
treeba86be43d2849746e11e2b68a7cfd2d0ff25c412 /libavcodec
parent87ac0c0a39268654c8a6ae4b3acb7a01f9d942bb (diff)
Set edges based on cbp and mv partitioning, not just skiped MBs.
This is faster for videos that have lots of MBs that fall in this category. Originally committed as revision 21400 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264_loopfilter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/h264_loopfilter.c b/libavcodec/h264_loopfilter.c
index ca89bf0412..b89da9f3d9 100644
--- a/libavcodec/h264_loopfilter.c
+++ b/libavcodec/h264_loopfilter.c
@@ -425,12 +425,12 @@ static av_always_inline void filter_mb_dir(H264Context *h, int mb_x, int mb_y, u
const int mbm_xy = dir == 0 ? mb_xy -1 : h->top_mb_xy;
const int mbm_type = s->current_picture.mb_type[mbm_xy];
- const int edges = (mb_type & (MB_TYPE_16x16|MB_TYPE_SKIP))
- == (MB_TYPE_16x16|MB_TYPE_SKIP) ? 1 : 4;
// how often to recheck mv-based bS when iterating between edges
static const uint8_t mask_edge_tab[2][8]={{0,3,3,3,1,1,1,1},
{0,3,1,1,3,3,3,3}};
const int mask_edge = mask_edge_tab[dir][(mb_type>>3)&7];
+ const int edges = mask_edge== 3 && !(h->cbp&15) ? 1 : 4;
+
// how often to recheck mv-based bS when iterating along each edge
const int mask_par0 = mb_type & (MB_TYPE_16x16 | (MB_TYPE_8x16 >> dir));
int start = h->slice_table[mbm_xy] == 0xFFFF