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
b1abd2aa
Commit
b1abd2aa
authored
Aug 25, 2015
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vf_scale: Add an option to pass the scaler params
Reported-By: zehan@magicpony.technology
parent
c23999be
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
vf_scale.c
libavfilter/vf_scale.c
+4
-1
No files found.
libavfilter/vf_scale.c
View file @
b1abd2aa
...
@@ -79,6 +79,7 @@ typedef struct ScaleContext {
...
@@ -79,6 +79,7 @@ typedef struct ScaleContext {
*/
*/
int
w
,
h
;
int
w
,
h
;
unsigned
int
flags
;
///sws flags
unsigned
int
flags
;
///sws flags
double
param
[
2
];
// sws params
int
hsub
,
vsub
;
///< chroma subsampling
int
hsub
,
vsub
;
///< chroma subsampling
int
slice_y
;
///< top of current output slice
int
slice_y
;
///< top of current output slice
...
@@ -238,7 +239,7 @@ static int config_props(AVFilterLink *outlink)
...
@@ -238,7 +239,7 @@ static int config_props(AVFilterLink *outlink)
else
{
else
{
scale
->
sws
=
sws_getContext
(
inlink
->
w
,
inlink
->
h
,
inlink
->
format
,
scale
->
sws
=
sws_getContext
(
inlink
->
w
,
inlink
->
h
,
inlink
->
format
,
outlink
->
w
,
outlink
->
h
,
outlink
->
format
,
outlink
->
w
,
outlink
->
h
,
outlink
->
format
,
scale
->
flags
,
NULL
,
NULL
,
NULL
);
scale
->
flags
,
NULL
,
NULL
,
scale
->
param
);
if
(
!
scale
->
sws
)
if
(
!
scale
->
sws
)
return
AVERROR
(
EINVAL
);
return
AVERROR
(
EINVAL
);
}
}
...
@@ -300,6 +301,8 @@ static const AVOption options[] = {
...
@@ -300,6 +301,8 @@ static const AVOption options[] = {
{
"w"
,
"Output video width"
,
OFFSET
(
w_expr
),
AV_OPT_TYPE_STRING
,
{
.
str
=
"iw"
},
.
flags
=
FLAGS
},
{
"w"
,
"Output video width"
,
OFFSET
(
w_expr
),
AV_OPT_TYPE_STRING
,
{
.
str
=
"iw"
},
.
flags
=
FLAGS
},
{
"h"
,
"Output video height"
,
OFFSET
(
h_expr
),
AV_OPT_TYPE_STRING
,
{
.
str
=
"ih"
},
.
flags
=
FLAGS
},
{
"h"
,
"Output video height"
,
OFFSET
(
h_expr
),
AV_OPT_TYPE_STRING
,
{
.
str
=
"ih"
},
.
flags
=
FLAGS
},
{
"flags"
,
"Flags to pass to libswscale"
,
OFFSET
(
flags_str
),
AV_OPT_TYPE_STRING
,
{
.
str
=
"bilinear"
},
.
flags
=
FLAGS
},
{
"flags"
,
"Flags to pass to libswscale"
,
OFFSET
(
flags_str
),
AV_OPT_TYPE_STRING
,
{
.
str
=
"bilinear"
},
.
flags
=
FLAGS
},
{
"param0"
,
"Scaler param 0"
,
OFFSET
(
param
[
0
]),
AV_OPT_TYPE_DOUBLE
,
{
.
dbl
=
SWS_PARAM_DEFAULT
},
INT_MIN
,
INT_MAX
,
FLAGS
},
{
"param1"
,
"Scaler param 1"
,
OFFSET
(
param
[
1
]),
AV_OPT_TYPE_DOUBLE
,
{
.
dbl
=
SWS_PARAM_DEFAULT
},
INT_MIN
,
INT_MAX
,
FLAGS
},
{
NULL
},
{
NULL
},
};
};
...
...
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