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
76a47d66
Commit
76a47d66
authored
Nov 09, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/dv: about 3 times faster probe
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
dbb41f93
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
13 deletions
+15
-13
dv.c
libavformat/dv.c
+15
-13
No files found.
libavformat/dv.c
View file @
76a47d66
...
@@ -590,19 +590,21 @@ static int dv_probe(AVProbeData *p)
...
@@ -590,19 +590,21 @@ static int dv_probe(AVProbeData *p)
if
(
p
->
buf_size
<
5
)
if
(
p
->
buf_size
<
5
)
return
0
;
return
0
;
state
=
AV_RB32
(
p
->
buf
);
for
(
i
=
0
;
i
<
p
->
buf_size
-
4
;
i
++
)
{
for
(
i
=
4
;
i
<
p
->
buf_size
;
i
++
)
{
unsigned
state
=
AV_RB32
(
p
->
buf
+
i
);
if
((
state
&
0xffffff7f
)
==
0x1f07003f
)
if
((
state
&
0x0007f840
)
==
0x00070000
)
{
matches
++
;
// any section header, also with seq/chan num != 0,
// any section header, also with seq/chan num != 0,
// should appear around every 12000 bytes, at least 10 per frame
// should appear around every 12000 bytes, at least 10 per frame
if
((
state
&
0xff07ff7f
)
==
0x1f07003f
)
if
((
state
&
0xff07ff7f
)
==
0x1f07003f
)
{
secondary_matches
++
;
secondary_matches
++
;
if
((
state
&
0xffffff7f
)
==
0x1f07003f
)
matches
++
;
}
if
(
state
==
0x003f0700
||
state
==
0xff3f0700
)
if
(
state
==
0x003f0700
||
state
==
0xff3f0700
)
marker_pos
=
i
;
marker_pos
=
i
;
if
(
state
==
0xff3f0701
&&
i
-
marker_pos
==
80
)
if
(
state
==
0xff3f0701
&&
i
-
marker_pos
==
80
)
matches
++
;
matches
++
;
state
=
(
state
<<
8
)
|
p
->
buf
[
i
];
}
}
}
if
(
matches
&&
p
->
buf_size
/
matches
<
1024
*
1024
)
{
if
(
matches
&&
p
->
buf_size
/
matches
<
1024
*
1024
)
{
...
...
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