Commit 7a1d5f56 authored by reimar's avatar reimar

Optimize h261_probe function, since it is far slower than all others.

About 5 times faster.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@21823 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 5731882d
...@@ -497,6 +497,10 @@ static int h261_probe(AVProbeData *p) ...@@ -497,6 +497,10 @@ static int h261_probe(AVProbeData *p)
init_get_bits(&gb, p->buf, p->buf_size*8); init_get_bits(&gb, p->buf, p->buf_size*8);
for(i=0; i<p->buf_size*8; i++){ for(i=0; i<p->buf_size*8; i++){
if ((code & 0x01ff0000) || !(code & 0xff00)) {
code = (code<<8) + get_bits(&gb, 8);
i += 7;
} else
code = (code<<1) + get_bits1(&gb); code = (code<<1) + get_bits1(&gb);
if ((code & 0xffff0000) == 0x10000) { if ((code & 0xffff0000) == 0x10000) {
int gn= (code>>12)&0xf; int gn= (code>>12)&0xf;
......
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