# HG changeset patch # User michael # Date 1264860606 0 # Node ID e10c891b023cb5fa788ae024987523f83647df09 # Parent 03cda6ebdc0543d16620ccd7a0a86d8dbc9e0b25 slightly faster bit trickery. diff -r 03cda6ebdc05 -r e10c891b023c h264_loopfilter.c --- a/h264_loopfilter.c Sat Jan 30 13:40:20 2010 +0000 +++ b/h264_loopfilter.c Sat Jan 30 14:10:06 2010 +0000 @@ -374,8 +374,8 @@ edges = 4; bSv[0][0] = bSv[0][2] = bSv[1][0] = bSv[1][2] = 0x0002000200020002ULL; } else { - int mask_edge1 = (3*!!(mb_type & (MB_TYPE_16x16 | MB_TYPE_8x16))) | (mb_type>>4); //(mb_type & (MB_TYPE_16x16 | MB_TYPE_8x16)) ? 3 : (mb_type & MB_TYPE_16x8) ? 1 : 0; - int mask_edge0 = 3*((mask_edge1>>1) & !!(h->left_type[0] & (MB_TYPE_16x16 | MB_TYPE_8x16))); // (mb_type & (MB_TYPE_16x16 | MB_TYPE_8x16)) && (h->left_type[0] & (MB_TYPE_16x16 | MB_TYPE_8x16)) ? 3 : 0; + int mask_edge1 = (3*(((5*mb_type)>>5)&1)) | (mb_type>>4); //(mb_type & (MB_TYPE_16x16 | MB_TYPE_8x16)) ? 3 : (mb_type & MB_TYPE_16x8) ? 1 : 0; + int mask_edge0 = 3*((mask_edge1>>1) & ((5*h->left_type[0])>>5)&1); // (mb_type & (MB_TYPE_16x16 | MB_TYPE_8x16)) && (h->left_type[0] & (MB_TYPE_16x16 | MB_TYPE_8x16)) ? 3 : 0; int step = 1+(mb_type>>24); //IS_8x8DCT(mb_type) ? 2 : 1; edges = 4 - 3*((mb_type>>3) & !(h->cbp & 15)); //(mb_type & MB_TYPE_16x16) && !(h->cbp & 15) ? 1 : 4; s->dsp.h264_loop_filter_strength( bS, h->non_zero_count_cache, h->ref_cache, h->mv_cache,