Mercurial > libavcodec.hg
comparison h264_loopfilter.c @ 10973:214adf5e303b libavcodec
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.
author | michael |
---|---|
date | Sat, 23 Jan 2010 15:28:34 +0000 |
parents | eb5f0ccb6a98 |
children | 776dba50775c |
comparison
equal
deleted
inserted
replaced
10972:3dd1cb77cc60 | 10973:214adf5e303b |
---|---|
423 MpegEncContext * const s = &h->s; | 423 MpegEncContext * const s = &h->s; |
424 int edge; | 424 int edge; |
425 const int mbm_xy = dir == 0 ? mb_xy -1 : h->top_mb_xy; | 425 const int mbm_xy = dir == 0 ? mb_xy -1 : h->top_mb_xy; |
426 const int mbm_type = s->current_picture.mb_type[mbm_xy]; | 426 const int mbm_type = s->current_picture.mb_type[mbm_xy]; |
427 | 427 |
428 const int edges = (mb_type & (MB_TYPE_16x16|MB_TYPE_SKIP)) | |
429 == (MB_TYPE_16x16|MB_TYPE_SKIP) ? 1 : 4; | |
430 // how often to recheck mv-based bS when iterating between edges | 428 // how often to recheck mv-based bS when iterating between edges |
431 static const uint8_t mask_edge_tab[2][8]={{0,3,3,3,1,1,1,1}, | 429 static const uint8_t mask_edge_tab[2][8]={{0,3,3,3,1,1,1,1}, |
432 {0,3,1,1,3,3,3,3}}; | 430 {0,3,1,1,3,3,3,3}}; |
433 const int mask_edge = mask_edge_tab[dir][(mb_type>>3)&7]; | 431 const int mask_edge = mask_edge_tab[dir][(mb_type>>3)&7]; |
432 const int edges = mask_edge== 3 && !(h->cbp&15) ? 1 : 4; | |
433 | |
434 // how often to recheck mv-based bS when iterating along each edge | 434 // how often to recheck mv-based bS when iterating along each edge |
435 const int mask_par0 = mb_type & (MB_TYPE_16x16 | (MB_TYPE_8x16 >> dir)); | 435 const int mask_par0 = mb_type & (MB_TYPE_16x16 | (MB_TYPE_8x16 >> dir)); |
436 int start = h->slice_table[mbm_xy] == 0xFFFF | 436 int start = h->slice_table[mbm_xy] == 0xFFFF |
437 || first_vertical_edge_done | 437 || first_vertical_edge_done |
438 || (h->deblocking_filter==2 && h->slice_table[mbm_xy] != h->slice_num); | 438 || (h->deblocking_filter==2 && h->slice_table[mbm_xy] != h->slice_num); |