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
55c87214
Commit
55c87214
authored
Mar 13, 2016
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_vectorscope: process alpha at end
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
80974559
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
24 deletions
+22
-24
vf_vectorscope.c
libavfilter/vf_vectorscope.c
+22
-24
No files found.
libavfilter/vf_vectorscope.c
View file @
55c87214
...
...
@@ -435,8 +435,6 @@ static void vectorscope16(VectorscopeContext *s, AVFrame *in, AVFrame *out, int
continue
;
dpd
[
pos
]
=
FFMIN
(
dpd
[
pos
]
+
intensity
,
max
);
if
(
dst
[
3
])
dst
[
3
][
pos
]
=
max
;
}
}
}
else
{
...
...
@@ -456,8 +454,6 @@ static void vectorscope16(VectorscopeContext *s, AVFrame *in, AVFrame *out, int
dst
[
0
][
pos
]
=
FFMIN
(
dst
[
0
][
pos
]
+
intensity
,
max
);
dst
[
1
][
pos
]
=
FFMIN
(
dst
[
1
][
pos
]
+
intensity
,
max
);
dst
[
2
][
pos
]
=
FFMIN
(
dst
[
2
][
pos
]
+
intensity
,
max
);
if
(
dst
[
3
])
dst
[
3
][
pos
]
=
max
;
}
}
}
...
...
@@ -481,8 +477,6 @@ static void vectorscope16(VectorscopeContext *s, AVFrame *in, AVFrame *out, int
dpd
[
pos
]
=
FFABS
(
mid
-
x
)
+
FFABS
(
mid
-
y
);
dpx
[
pos
]
=
x
;
dpy
[
pos
]
=
y
;
if
(
dst
[
3
])
dst
[
3
][
pos
]
=
max
;
}
}
}
else
{
...
...
@@ -503,8 +497,6 @@ static void vectorscope16(VectorscopeContext *s, AVFrame *in, AVFrame *out, int
dpd
[
pos
]
=
FFMIN
(
x
+
y
,
max
);
dpx
[
pos
]
=
x
;
dpy
[
pos
]
=
y
;
if
(
dst
[
3
])
dst
[
3
][
pos
]
=
max
;
}
}
}
...
...
@@ -526,8 +518,6 @@ static void vectorscope16(VectorscopeContext *s, AVFrame *in, AVFrame *out, int
dpd
[
pos
]
=
FFMIN
(
max
,
dpd
[
pos
]
+
intensity
);
dpx
[
pos
]
=
x
;
dpy
[
pos
]
=
y
;
if
(
dst
[
3
])
dst
[
3
][
pos
]
=
max
;
}
}
break
;
...
...
@@ -548,8 +538,6 @@ static void vectorscope16(VectorscopeContext *s, AVFrame *in, AVFrame *out, int
dpd
[
pos
]
=
FFMAX
(
z
,
dpd
[
pos
]);
dpx
[
pos
]
=
x
;
dpy
[
pos
]
=
y
;
if
(
dst
[
3
])
dst
[
3
][
pos
]
=
max
;
}
}
break
;
...
...
@@ -559,6 +547,17 @@ static void vectorscope16(VectorscopeContext *s, AVFrame *in, AVFrame *out, int
envelope16
(
s
,
out
);
if
(
dst
[
3
])
{
for
(
i
=
0
;
i
<
out
->
height
;
i
++
)
{
for
(
j
=
0
;
j
<
out
->
width
;
j
++
)
{
int
pos
=
i
*
dlinesize
+
j
;
if
(
dpd
[
pos
])
dst
[
3
][
pos
]
=
max
;
}
}
}
if
(
s
->
mode
==
COLOR
)
{
for
(
i
=
0
;
i
<
out
->
height
;
i
++
)
{
for
(
j
=
0
;
j
<
out
->
width
;
j
++
)
{
...
...
@@ -630,8 +629,6 @@ static void vectorscope8(VectorscopeContext *s, AVFrame *in, AVFrame *out, int p
continue
;
dpd
[
pos
]
=
FFMIN
(
dpd
[
pos
]
+
intensity
,
255
);
if
(
dst
[
3
])
dst
[
3
][
pos
]
=
255
;
}
}
}
else
{
...
...
@@ -651,8 +648,6 @@ static void vectorscope8(VectorscopeContext *s, AVFrame *in, AVFrame *out, int p
dst
[
0
][
pos
]
=
FFMIN
(
dst
[
0
][
pos
]
+
intensity
,
255
);
dst
[
1
][
pos
]
=
FFMIN
(
dst
[
1
][
pos
]
+
intensity
,
255
);
dst
[
2
][
pos
]
=
FFMIN
(
dst
[
2
][
pos
]
+
intensity
,
255
);
if
(
dst
[
3
])
dst
[
3
][
pos
]
=
255
;
}
}
}
...
...
@@ -676,8 +671,6 @@ static void vectorscope8(VectorscopeContext *s, AVFrame *in, AVFrame *out, int p
dpd
[
pos
]
=
FFABS
(
128
-
x
)
+
FFABS
(
128
-
y
);
dpx
[
pos
]
=
x
;
dpy
[
pos
]
=
y
;
if
(
dst
[
3
])
dst
[
3
][
pos
]
=
255
;
}
}
}
else
{
...
...
@@ -698,8 +691,6 @@ static void vectorscope8(VectorscopeContext *s, AVFrame *in, AVFrame *out, int p
dpd
[
pos
]
=
FFMIN
(
x
+
y
,
255
);
dpx
[
pos
]
=
x
;
dpy
[
pos
]
=
y
;
if
(
dst
[
3
])
dst
[
3
][
pos
]
=
255
;
}
}
}
...
...
@@ -721,8 +712,6 @@ static void vectorscope8(VectorscopeContext *s, AVFrame *in, AVFrame *out, int p
dpd
[
pos
]
=
FFMIN
(
255
,
dpd
[
pos
]
+
intensity
);
dpx
[
pos
]
=
x
;
dpy
[
pos
]
=
y
;
if
(
dst
[
3
])
dst
[
3
][
pos
]
=
255
;
}
}
break
;
...
...
@@ -743,8 +732,6 @@ static void vectorscope8(VectorscopeContext *s, AVFrame *in, AVFrame *out, int p
dpd
[
pos
]
=
FFMAX
(
z
,
dpd
[
pos
]);
dpx
[
pos
]
=
x
;
dpy
[
pos
]
=
y
;
if
(
dst
[
3
])
dst
[
3
][
pos
]
=
255
;
}
}
break
;
...
...
@@ -754,6 +741,17 @@ static void vectorscope8(VectorscopeContext *s, AVFrame *in, AVFrame *out, int p
envelope
(
s
,
out
);
if
(
dst
[
3
])
{
for
(
i
=
0
;
i
<
out
->
height
;
i
++
)
{
for
(
j
=
0
;
j
<
out
->
width
;
j
++
)
{
int
pos
=
i
*
dlinesize
+
j
;
if
(
dpd
[
pos
])
dst
[
3
][
pos
]
=
255
;
}
}
}
if
(
s
->
mode
==
COLOR
)
{
for
(
i
=
0
;
i
<
out
->
height
;
i
++
)
{
for
(
j
=
0
;
j
<
out
->
width
;
j
++
)
{
...
...
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