[FFmpeg-cvslog] avformat/dvbsub: check for 0xf0 earlier in probe, 30% faster

Michael Niedermayer git at videolan.org
Mon Jan 5 17:41:11 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jan  5 16:21:42 2015 +0100| [3bf2b376e64bef231c3f9e52aca60e3aded43e5d] | committer: Michael Niedermayer

avformat/dvbsub: check for 0xf0 earlier in probe, 30% faster

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3bf2b376e64bef231c3f9e52aca60e3aded43e5d
---

 libavformat/dvbsub.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/dvbsub.c b/libavformat/dvbsub.c
index 73d9c3e..fc17ccf 100644
--- a/libavformat/dvbsub.c
+++ b/libavformat/dvbsub.c
@@ -33,6 +33,7 @@ static int dvbsub_probe(AVProbeData *p)
     int max_score = 0;
 
     for(i=0; i<p->buf_size; i++){
+        if (p->buf[i] == 0x0f) {
         const uint8_t *ptr = p->buf + i;
         uint8_t histogram[6] = {0};
         int min = 255;
@@ -55,6 +56,7 @@ static int dvbsub_probe(AVProbeData *p)
         }
         if (min && j > max_score)
             max_score = j;
+        }
     }
 
     if (max_score > 5)



More information about the ffmpeg-cvslog mailing list