Commit a05ce3c3 authored by michael's avatar michael

Make calculation of mask_edge free of branches, faster of course but probably

little effect overall as this is not that often executed.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@21366 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent cdb0bb11
......@@ -434,8 +434,9 @@ static av_always_inline void filter_mb_dir(H264Context *h, int mb_x, int mb_y, u
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
const int mask_edge = (mb_type & (MB_TYPE_16x16 | (MB_TYPE_16x8 << dir))) ? 3 :
(mb_type & (MB_TYPE_8x16 >> dir)) ? 1 : 0;
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];
// 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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment