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
5623a105
Commit
5623a105
authored
May 08, 2014
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/phase: make the main loop readable.
parent
5df10150
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
vf_phase.c
libavfilter/vf_phase.c
+9
-4
No files found.
libavfilter/vf_phase.c
View file @
5623a105
...
@@ -122,8 +122,6 @@ static enum PhaseMode analyze_plane(void *ctx, enum PhaseMode mode, AVFrame *old
...
@@ -122,8 +122,6 @@ static enum PhaseMode analyze_plane(void *ctx, enum PhaseMode mode, AVFrame *old
const
int
h
=
new
->
height
;
const
int
h
=
new
->
height
;
const
int
w
=
new
->
width
;
const
int
w
=
new
->
width
;
int
bdif
,
tdif
,
pdif
;
int
bdif
,
tdif
,
pdif
;
const
uint8_t
*
end
,
*
rend
;
int
top
,
t
;
if
(
mode
==
AUTO
)
{
if
(
mode
==
AUTO
)
{
mode
=
new
->
interlaced_frame
?
new
->
top_field_first
?
mode
=
new
->
interlaced_frame
?
new
->
top_field_first
?
...
@@ -136,10 +134,14 @@ static enum PhaseMode analyze_plane(void *ctx, enum PhaseMode mode, AVFrame *old
...
@@ -136,10 +134,14 @@ static enum PhaseMode analyze_plane(void *ctx, enum PhaseMode mode, AVFrame *old
if
(
mode
<=
BOTTOM_FIRST
)
{
if
(
mode
<=
BOTTOM_FIRST
)
{
bdiff
=
pdiff
=
tdiff
=
65536
.
0
;
bdiff
=
pdiff
=
tdiff
=
65536
.
0
;
}
else
{
}
else
{
int
top
=
0
,
t
;
const
uint8_t
*
rend
,
*
end
=
nptr
+
(
h
-
2
)
*
ns
;
bdiff
=
pdiff
=
tdiff
=
0
.
0
;
bdiff
=
pdiff
=
tdiff
=
0
.
0
;
for
(
end
=
nptr
+
(
h
-
2
)
*
ns
,
nptr
+=
ns
,
optr
+=
os
,
top
=
0
;
nptr
+=
ns
;
nptr
<
end
;
nptr
+=
ns
-
w
,
optr
+=
os
-
w
,
top
^=
1
)
{
optr
+=
os
;
while
(
nptr
<
end
)
{
pdif
=
tdif
=
bdif
=
0
;
pdif
=
tdif
=
bdif
=
0
;
switch
(
mode
)
{
switch
(
mode
)
{
...
@@ -204,6 +206,9 @@ static enum PhaseMode analyze_plane(void *ctx, enum PhaseMode mode, AVFrame *old
...
@@ -204,6 +206,9 @@ static enum PhaseMode analyze_plane(void *ctx, enum PhaseMode mode, AVFrame *old
pdiff
+=
(
double
)
pdif
;
pdiff
+=
(
double
)
pdif
;
tdiff
+=
(
double
)
tdif
;
tdiff
+=
(
double
)
tdif
;
bdiff
+=
(
double
)
bdif
;
bdiff
+=
(
double
)
bdif
;
nptr
+=
ns
-
w
;
optr
+=
os
-
w
;
top
^=
1
;
}
}
scale
=
1
.
0
/
(
w
*
(
h
-
3
))
/
25
.
0
;
scale
=
1
.
0
/
(
w
*
(
h
-
3
))
/
25
.
0
;
...
...
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