# HG changeset patch # User michael # Date 1267196580 0 # Node ID 5843fc07bda012fae9291e126511ebfe90d9cd59 # Parent 1f512abdf680c1124dc270296b9b3bb1478801b7 Remove some useless operations from the code setting left_cbp. maybe 0.5 cpu cycles faster diff -r 1f512abdf680 -r 5843fc07bda0 h264.h --- a/h264.h Fri Feb 26 09:13:40 2010 +0000 +++ b/h264.h Fri Feb 26 15:03:00 2010 +0000 @@ -952,9 +952,9 @@ } // left_cbp if (left_type[0]) { - h->left_cbp = h->cbp_table[left_xy[0]] & 0x1f0; - h->left_cbp |= ((h->cbp_table[left_xy[0]]>>((left_block[0]&(~1))+1))&0x1) << 1; - h->left_cbp |= ((h->cbp_table[left_xy[1]]>>((left_block[2]&(~1))+1))&0x1) << 3; + h->left_cbp = (h->cbp_table[left_xy[0]] & 0x1f0) + | ((h->cbp_table[left_xy[0]]>>(left_block[0]&(~1)))&2) + | (((h->cbp_table[left_xy[1]]>>(left_block[2]&(~1)))&2) << 2); } else { h->left_cbp = IS_INTRA(mb_type) ? 0x1CF : 0x00F; }