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
835eee88
Commit
835eee88
authored
Jul 20, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_scale: add in/out color range option
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
bbf6cb75
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
version.h
libavfilter/version.h
+1
-1
vf_scale.c
libavfilter/vf_scale.c
+16
-0
No files found.
libavfilter/version.h
View file @
835eee88
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
#define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MINOR 81
#define LIBAVFILTER_VERSION_MINOR 81
#define LIBAVFILTER_VERSION_MICRO 10
1
#define LIBAVFILTER_VERSION_MICRO 10
2
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
LIBAVFILTER_VERSION_MINOR, \
...
...
libavfilter/vf_scale.c
View file @
835eee88
...
@@ -93,6 +93,9 @@ typedef struct {
...
@@ -93,6 +93,9 @@ typedef struct {
char
*
in_color_matrix
;
char
*
in_color_matrix
;
char
*
out_color_matrix
;
char
*
out_color_matrix
;
int
in_range
;
int
out_range
;
}
ScaleContext
;
}
ScaleContext
;
static
av_cold
int
init
(
AVFilterContext
*
ctx
)
static
av_cold
int
init
(
AVFilterContext
*
ctx
)
...
@@ -432,6 +435,11 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
...
@@ -432,6 +435,11 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
if
(
scale
->
out_color_matrix
)
if
(
scale
->
out_color_matrix
)
table
=
parse_yuv_type
(
scale
->
out_color_matrix
,
AVCOL_SPC_UNSPECIFIED
);
table
=
parse_yuv_type
(
scale
->
out_color_matrix
,
AVCOL_SPC_UNSPECIFIED
);
if
(
scale
->
in_range
!=
AVCOL_RANGE_UNSPECIFIED
)
in_full
=
(
scale
->
in_range
==
AVCOL_RANGE_JPEG
);
if
(
scale
->
out_range
!=
AVCOL_RANGE_UNSPECIFIED
)
out_full
=
(
scale
->
out_range
==
AVCOL_RANGE_JPEG
);
sws_setColorspaceDetails
(
scale
->
sws
,
inv_table
,
in_full
,
sws_setColorspaceDetails
(
scale
->
sws
,
inv_table
,
in_full
,
table
,
out_full
,
table
,
out_full
,
brightness
,
contrast
,
saturation
);
brightness
,
contrast
,
saturation
);
...
@@ -475,6 +483,14 @@ static const AVOption scale_options[] = {
...
@@ -475,6 +483,14 @@ static const AVOption scale_options[] = {
{
"s"
,
"set video size"
,
OFFSET
(
size_str
),
AV_OPT_TYPE_STRING
,
{.
str
=
NULL
},
0
,
FLAGS
},
{
"s"
,
"set video size"
,
OFFSET
(
size_str
),
AV_OPT_TYPE_STRING
,
{.
str
=
NULL
},
0
,
FLAGS
},
{
"in_color_matrix"
,
"set input YCbCr type"
,
OFFSET
(
in_color_matrix
),
AV_OPT_TYPE_STRING
,
{
.
str
=
NULL
},
.
flags
=
FLAGS
},
{
"in_color_matrix"
,
"set input YCbCr type"
,
OFFSET
(
in_color_matrix
),
AV_OPT_TYPE_STRING
,
{
.
str
=
NULL
},
.
flags
=
FLAGS
},
{
"out_color_matrix"
,
"set output YCbCr type"
,
OFFSET
(
out_color_matrix
),
AV_OPT_TYPE_STRING
,
{
.
str
=
NULL
},
.
flags
=
FLAGS
},
{
"out_color_matrix"
,
"set output YCbCr type"
,
OFFSET
(
out_color_matrix
),
AV_OPT_TYPE_STRING
,
{
.
str
=
NULL
},
.
flags
=
FLAGS
},
{
"in_range"
,
"set input color range"
,
OFFSET
(
in_range
),
AV_OPT_TYPE_INT
,
{.
i64
=
AVCOL_RANGE_UNSPECIFIED
},
0
,
2
,
FLAGS
,
"range"
},
{
"out_range"
,
"set output color range"
,
OFFSET
(
out_range
),
AV_OPT_TYPE_INT
,
{.
i64
=
AVCOL_RANGE_UNSPECIFIED
},
0
,
2
,
FLAGS
,
"range"
},
{
"auto"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
AVCOL_RANGE_UNSPECIFIED
},
0
,
0
,
FLAGS
,
"range"
},
{
"full"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
AVCOL_RANGE_JPEG
},
0
,
0
,
FLAGS
,
"range"
},
{
"jpeg"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
AVCOL_RANGE_JPEG
},
0
,
0
,
FLAGS
,
"range"
},
{
"mpeg"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
AVCOL_RANGE_MPEG
},
0
,
0
,
FLAGS
,
"range"
},
{
"tv"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
AVCOL_RANGE_JPEG
},
0
,
0
,
FLAGS
,
"range"
},
{
"pc"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
AVCOL_RANGE_MPEG
},
0
,
0
,
FLAGS
,
"range"
},
{
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