Mercurial > libavcodec.hg
changeset 11305:1a349d669184 libavcodec
Optimize (amvd>2)+(amvd>32), about 1 cpu cycles faster.
patch by Zhou Zongyi @ zhouzy () os punkt pku dot edu speck cn
author | michael |
---|---|
date | Fri, 26 Feb 2010 22:45:35 +0000 |
parents | 3ef04d1190f0 |
children | c3d8a8eb1a45 |
files | h264_cabac.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/h264_cabac.c Fri Feb 26 18:50:01 2010 +0000 +++ b/h264_cabac.c Fri Feb 26 22:45:35 2010 +0000 @@ -912,7 +912,8 @@ 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; }