comparison h264_cabac.c @ 11274:f4b0ebc8c9ad libavcodec

switch back to (amvd>2)+(amvd>32), its 5 cpu cycles faster now.
author michael
date Wed, 24 Feb 2010 18:16:48 +0000
parents a2cb557201bb
children 63d329cd8d80
comparison
equal deleted inserted replaced
11273:a2cb557201bb 11274:f4b0ebc8c9ad
910 } 910 }
911 911
912 static int decode_cabac_mb_mvd( H264Context *h, int ctxbase, int amvd ) { 912 static int decode_cabac_mb_mvd( H264Context *h, int ctxbase, int amvd ) {
913 int mvd; 913 int mvd;
914 914
915 if(!get_cabac(&h->cabac, &h->cabac_state[ctxbase+FFMIN(((amvd+28)*17)>>9,2)])) 915 if(!get_cabac(&h->cabac, &h->cabac_state[ctxbase+(amvd>2)+(amvd>32)]))
916 return 0; 916 return 0;
917 917
918 mvd= 1; 918 mvd= 1;
919 ctxbase+= 3; 919 ctxbase+= 3;
920 while( mvd < 9 && get_cabac( &h->cabac, &h->cabac_state[ctxbase] ) ) { 920 while( mvd < 9 && get_cabac( &h->cabac, &h->cabac_state[ctxbase] ) ) {