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
f011e98c
Commit
f011e98c
authored
Sep 04, 2015
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_vectorscope: change intensity to float
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
db592f3b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
vf_vectorscope.c
libavfilter/vf_vectorscope.c
+5
-2
No files found.
libavfilter/vf_vectorscope.c
View file @
f011e98c
...
@@ -40,6 +40,7 @@ typedef struct VectorscopeContext {
...
@@ -40,6 +40,7 @@ typedef struct VectorscopeContext {
const
AVClass
*
class
;
const
AVClass
*
class
;
int
mode
;
int
mode
;
int
intensity
;
int
intensity
;
float
fintensity
;
const
uint8_t
*
bg_color
;
const
uint8_t
*
bg_color
;
int
planewidth
[
4
];
int
planewidth
[
4
];
int
planeheight
[
4
];
int
planeheight
[
4
];
...
@@ -63,8 +64,8 @@ static const AVOption vectorscope_options[] = {
...
@@ -63,8 +64,8 @@ static const AVOption vectorscope_options[] = {
{
"color4"
,
0
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
COLOR4
},
0
,
0
,
FLAGS
,
"mode"
},
{
"color4"
,
0
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
COLOR4
},
0
,
0
,
FLAGS
,
"mode"
},
{
"x"
,
"set color component on X axis"
,
OFFSET
(
x
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
0
,
2
,
FLAGS
},
{
"x"
,
"set color component on X axis"
,
OFFSET
(
x
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
0
,
2
,
FLAGS
},
{
"y"
,
"set color component on Y axis"
,
OFFSET
(
y
),
AV_OPT_TYPE_INT
,
{.
i64
=
2
},
0
,
2
,
FLAGS
},
{
"y"
,
"set color component on Y axis"
,
OFFSET
(
y
),
AV_OPT_TYPE_INT
,
{.
i64
=
2
},
0
,
2
,
FLAGS
},
{
"intensity"
,
"set intensity"
,
OFFSET
(
intensity
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
1
,
255
,
FLAGS
},
{
"intensity"
,
"set intensity"
,
OFFSET
(
fintensity
),
AV_OPT_TYPE_FLOAT
,
{.
dbl
=
0
.
004
},
0
,
1
,
FLAGS
},
{
"i"
,
"set intensity"
,
OFFSET
(
intensity
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
1
,
255
,
FLAGS
},
{
"i"
,
"set intensity"
,
OFFSET
(
fintensity
),
AV_OPT_TYPE_FLOAT
,
{.
dbl
=
0
.
004
},
0
,
1
,
FLAGS
},
{
"envelope"
,
"set envelope"
,
OFFSET
(
envelope
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
3
,
FLAGS
,
"envelope"
},
{
"envelope"
,
"set envelope"
,
OFFSET
(
envelope
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
3
,
FLAGS
,
"envelope"
},
{
"e"
,
"set envelope"
,
OFFSET
(
envelope
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
3
,
FLAGS
,
"envelope"
},
{
"e"
,
"set envelope"
,
OFFSET
(
envelope
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
3
,
FLAGS
,
"envelope"
},
{
"none"
,
0
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
0
},
0
,
0
,
FLAGS
,
"envelope"
},
{
"none"
,
0
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
0
},
0
,
0
,
FLAGS
,
"envelope"
},
...
@@ -187,7 +188,9 @@ static int config_output(AVFilterLink *outlink)
...
@@ -187,7 +188,9 @@ static int config_output(AVFilterLink *outlink)
{
{
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
outlink
->
format
);
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
outlink
->
format
);
const
int
depth
=
desc
->
comp
[
0
].
depth_minus1
+
1
;
const
int
depth
=
desc
->
comp
[
0
].
depth_minus1
+
1
;
VectorscopeContext
*
s
=
outlink
->
src
->
priv
;
s
->
intensity
=
s
->
fintensity
*
((
1
<<
depth
)
-
1
);
outlink
->
h
=
outlink
->
w
=
1
<<
depth
;
outlink
->
h
=
outlink
->
w
=
1
<<
depth
;
outlink
->
sample_aspect_ratio
=
(
AVRational
){
1
,
1
};
outlink
->
sample_aspect_ratio
=
(
AVRational
){
1
,
1
};
return
0
;
return
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