Commit 532c924e authored by michael's avatar michael

Replace mvd>2 + mvd>32 by MIN((mvd+28)*17>>9, 2)

same speed as far as i can meassure but it might have fewer branches on some
archs.
Idea from x264 / jason


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@22027 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 07d9a745
......@@ -915,7 +915,7 @@ static int decode_cabac_mb_mvd( H264Context *h, int list, int n, int l ) {
int ctxbase = (l == 0) ? 40 : 47;
int mvd;
if(!get_cabac(&h->cabac, &h->cabac_state[ctxbase+(amvd>2) + (amvd>32)]))
if(!get_cabac(&h->cabac, &h->cabac_state[ctxbase+FFMIN(((amvd+28)*17)>>9,2)]))
return 0;
mvd= 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment