Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
3bf2b376
Commit
3bf2b376
authored
Jan 05, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/dvbsub: check for 0xf0 earlier in probe, 30% faster
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
0e1c827e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
dvbsub.c
libavformat/dvbsub.c
+2
-0
No files found.
libavformat/dvbsub.c
View file @
3bf2b376
...
@@ -33,6 +33,7 @@ static int dvbsub_probe(AVProbeData *p)
...
@@ -33,6 +33,7 @@ static int dvbsub_probe(AVProbeData *p)
int
max_score
=
0
;
int
max_score
=
0
;
for
(
i
=
0
;
i
<
p
->
buf_size
;
i
++
){
for
(
i
=
0
;
i
<
p
->
buf_size
;
i
++
){
if
(
p
->
buf
[
i
]
==
0x0f
)
{
const
uint8_t
*
ptr
=
p
->
buf
+
i
;
const
uint8_t
*
ptr
=
p
->
buf
+
i
;
uint8_t
histogram
[
6
]
=
{
0
};
uint8_t
histogram
[
6
]
=
{
0
};
int
min
=
255
;
int
min
=
255
;
...
@@ -56,6 +57,7 @@ static int dvbsub_probe(AVProbeData *p)
...
@@ -56,6 +57,7 @@ static int dvbsub_probe(AVProbeData *p)
if
(
min
&&
j
>
max_score
)
if
(
min
&&
j
>
max_score
)
max_score
=
j
;
max_score
=
j
;
}
}
}
if
(
max_score
>
5
)
if
(
max_score
>
5
)
return
AVPROBE_SCORE_EXTENSION
/
2
;
return
AVPROBE_SCORE_EXTENSION
/
2
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment