[FFmpeg-cvslog] r21823 - trunk/libavformat/raw.c
reimar
subversion
Sun Feb 14 19:59:56 CET 2010
Author: reimar
Date: Sun Feb 14 19:59:56 2010
New Revision: 21823
Log:
Optimize h261_probe function, since it is far slower than all others.
About 5 times faster.
Modified:
trunk/libavformat/raw.c
Modified: trunk/libavformat/raw.c
==============================================================================
--- trunk/libavformat/raw.c Sun Feb 14 17:51:31 2010 (r21822)
+++ trunk/libavformat/raw.c Sun Feb 14 19:59:56 2010 (r21823)
@@ -497,6 +497,10 @@ static int h261_probe(AVProbeData *p)
init_get_bits(&gb, p->buf, p->buf_size*8);
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);
if ((code & 0xffff0000) == 0x10000) {
int gn= (code>>12)&0xf;
More information about the ffmpeg-cvslog
mailing list