diff options
author | Zhou Zongyi <zhouzy@os.pku.edu.cn> | 2010-02-26 22:45:35 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-02-26 22:45:35 +0000 |
commit | 821fe7f3e60a23fc472b529c31e60ed4e30b2b96 (patch) | |
tree | ece098ee44ba1dc991da41543afff08167e57543 /libavcodec/h264_cabac.c | |
parent | 4e06acbde4a75cf9aa6a3e46dd3a7c6ed1ecfb8f (diff) | |
download | ffmpeg-821fe7f3e60a23fc472b529c31e60ed4e30b2b96.tar.gz |
Optimize (amvd>2)+(amvd>32), about 1 cpu cycles faster.
patch by Zhou Zongyi @ zhouzy () os punkt pku dot edu speck cn
Originally committed as revision 22084 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264_cabac.c')
-rw-r--r-- | libavcodec/h264_cabac.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c index 91df714d62..9ae695ca08 100644 --- a/libavcodec/h264_cabac.c +++ b/libavcodec/h264_cabac.c @@ -912,7 +912,8 @@ static int decode_cabac_mb_ref( H264Context *h, int list, int n ) { static int decode_cabac_mb_mvd( H264Context *h, int ctxbase, int amvd, int *mvda) { int mvd; - if(!get_cabac(&h->cabac, &h->cabac_state[ctxbase+(amvd>2)+(amvd>32)])){ + if(!get_cabac(&h->cabac, &h->cabac_state[ctxbase+((amvd-3)>>(INT_BIT-1))+((amvd-33)>>(INT_BIT-1))+2])){ +// if(!get_cabac(&h->cabac, &h->cabac_state[ctxbase+(amvd>2)+(amvd>32)])){ *mvda= 0; return 0; } |