[SCM] libav/experimental: Replace /2 by >>1 in decode_cabac_mb_dqp() 3 cpu cycles speed up on pentium dual.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:33:50 UTC 2013


The following commit has been merged in the experimental branch:
commit a5b807a6c181090b65b06ddc714f74cc1605c5bd
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Fri Dec 19 02:28:51 2008 +0000

    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

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 54c66a1..4879e67 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] ) )

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list