From a5b807a6c181090b65b06ddc714f74cc1605c5bd Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 19 Dec 2008 02:28:51 +0000 Subject: [PATCH] Replace /2 by >>1 in decode_cabac_mb_dqp() 3 cpu cycles speed up on pentium dual. Originally committed as revision 16233 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/h264.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 54c66a177a..4879e67b1d 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -4966,9 +4966,9 @@ static int decode_cabac_mb_dqp( H264Context *h) { } if( val&0x01 ) - return (val + 1)/2; + return (val + 1)>>1 ; else - return -(val + 1)/2; + return -((val + 1)>>1); } static int decode_cabac_p_mb_sub_type( H264Context *h ) { if( get_cabac( &h->cabac, &h->cabac_state[21] ) ) -- GitLab