changeset 8399:3019af3f98fa libavcodec

Replace /2 by >>1 in decode_cabac_mb_dqp() 3 cpu cycles speed up on pentium dual.
author michael
date Fri, 19 Dec 2008 02:28:51 +0000
parents 5ffdec2cd80c
children 4877d4c6d8ae
files h264.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Fri Dec 19 02:00:33 2008 +0000
+++ b/h264.c	Fri Dec 19 02:28:51 2008 +0000
@@ -4966,9 +4966,9 @@
     }
 
     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] ) )