Mercurial > libavcodec.hg
comparison h264_cabac.c @ 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 | c12d6c6c027e |
children | c4c8c8c426eb |
comparison
equal
deleted
inserted
replaced
11304:3ef04d1190f0 | 11305:1a349d669184 |
---|---|
910 } | 910 } |
911 | 911 |
912 static int decode_cabac_mb_mvd( H264Context *h, int ctxbase, int amvd, int *mvda) { | 912 static int decode_cabac_mb_mvd( H264Context *h, int ctxbase, int amvd, int *mvda) { |
913 int mvd; | 913 int mvd; |
914 | 914 |
915 if(!get_cabac(&h->cabac, &h->cabac_state[ctxbase+(amvd>2)+(amvd>32)])){ | 915 if(!get_cabac(&h->cabac, &h->cabac_state[ctxbase+((amvd-3)>>(INT_BIT-1))+((amvd-33)>>(INT_BIT-1))+2])){ |
916 // if(!get_cabac(&h->cabac, &h->cabac_state[ctxbase+(amvd>2)+(amvd>32)])){ | |
916 *mvda= 0; | 917 *mvda= 0; |
917 return 0; | 918 return 0; |
918 } | 919 } |
919 | 920 |
920 mvd= 1; | 921 mvd= 1; |