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
7820197d
Commit
7820197d
authored
Sep 02, 2015
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_vectorscope: constify more variables
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
1c88ef0c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
vf_vectorscope.c
libavfilter/vf_vectorscope.c
+8
-7
No files found.
libavfilter/vf_vectorscope.c
View file @
7820197d
...
...
@@ -186,7 +186,7 @@ static int config_input(AVFilterLink *inlink)
static
int
config_output
(
AVFilterLink
*
outlink
)
{
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
outlink
->
format
);
int
depth
=
desc
->
comp
[
0
].
depth_minus1
+
1
;
const
int
depth
=
desc
->
comp
[
0
].
depth_minus1
+
1
;
outlink
->
h
=
outlink
->
w
=
1
<<
depth
;
outlink
->
sample_aspect_ratio
=
(
AVRational
){
1
,
1
};
...
...
@@ -201,9 +201,9 @@ static void envelope_instant(VectorscopeContext *s, AVFrame *out)
for
(
i
=
0
;
i
<
out
->
height
;
i
++
)
{
for
(
j
=
0
;
j
<
out
->
width
;
j
++
)
{
int
pos
=
i
*
dlinesize
+
j
;
int
poa
=
(
i
-
1
)
*
dlinesize
+
j
;
int
pob
=
(
i
+
1
)
*
dlinesize
+
j
;
const
int
pos
=
i
*
dlinesize
+
j
;
const
int
poa
=
(
i
-
1
)
*
dlinesize
+
j
;
const
int
pob
=
(
i
+
1
)
*
dlinesize
+
j
;
if
(
dpd
[
pos
]
&&
(((
!
j
||
!
dpd
[
pos
-
1
])
||
((
j
==
(
out
->
width
-
1
))
||
!
dpd
[
pos
+
1
]))
||
((
!
i
||
!
dpd
[
poa
])
||
((
i
==
(
out
->
height
-
1
))
||
!
dpd
[
pob
]))))
{
...
...
@@ -221,7 +221,7 @@ static void envelope_peak(VectorscopeContext *s, AVFrame *out)
for
(
i
=
0
;
i
<
out
->
height
;
i
++
)
{
for
(
j
=
0
;
j
<
out
->
width
;
j
++
)
{
int
pos
=
i
*
dlinesize
+
j
;
const
int
pos
=
i
*
dlinesize
+
j
;
if
(
dpd
[
pos
])
s
->
peak
[
i
][
j
]
=
255
;
...
...
@@ -233,7 +233,7 @@ static void envelope_peak(VectorscopeContext *s, AVFrame *out)
for
(
i
=
0
;
i
<
out
->
height
;
i
++
)
{
for
(
j
=
0
;
j
<
out
->
width
;
j
++
)
{
int
pos
=
i
*
dlinesize
+
j
;
const
int
pos
=
i
*
dlinesize
+
j
;
if
(
s
->
peak
[
i
][
j
]
&&
(((
!
j
||
!
s
->
peak
[
i
][
j
-
1
])
||
((
j
==
(
out
->
width
-
1
))
||
!
s
->
peak
[
i
][
j
+
1
]))
||
((
!
i
||
!
s
->
peak
[
i
-
1
][
j
])
||
((
i
==
(
out
->
height
-
1
))
||
!
s
->
peak
[
i
+
1
][
j
]))))
{
...
...
@@ -262,7 +262,7 @@ static void vectorscope(VectorscopeContext *s, AVFrame *in, AVFrame *out, int pd
const
int
slinesized
=
in
->
linesize
[
pd
];
const
int
dlinesize
=
out
->
linesize
[
0
];
const
int
intensity
=
s
->
intensity
;
int
i
,
j
,
px
=
s
->
x
,
py
=
s
->
y
;
const
int
px
=
s
->
x
,
py
=
s
->
y
;
const
int
h
=
s
->
planeheight
[
py
];
const
int
w
=
s
->
planewidth
[
px
];
const
uint8_t
*
spx
=
src
[
px
];
...
...
@@ -274,6 +274,7 @@ static void vectorscope(VectorscopeContext *s, AVFrame *in, AVFrame *out, int pd
uint8_t
*
dpx
=
dst
[
px
];
uint8_t
*
dpy
=
dst
[
py
];
uint8_t
*
dpd
=
dst
[
pd
];
int
i
,
j
;
switch
(
s
->
mode
)
{
case
COLOR
:
...
...
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