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
54fc8d37
Commit
54fc8d37
authored
Jul 14, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_remap: add option to control output format
parent
be822eb6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
vf_remap.c
libavfilter/vf_remap.c
+11
-1
No files found.
libavfilter/vf_remap.c
View file @
54fc8d37
...
...
@@ -47,9 +47,12 @@
typedef
struct
RemapContext
{
const
AVClass
*
class
;
int
format
;
int
nb_planes
;
int
nb_components
;
int
step
;
FFFrameSync
fs
;
int
(
*
remap_slice
)(
AVFilterContext
*
ctx
,
void
*
arg
,
int
jobnr
,
int
nb_jobs
);
...
...
@@ -59,6 +62,9 @@ typedef struct RemapContext {
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
static
const
AVOption
remap_options
[]
=
{
{
"format"
,
"set output format"
,
OFFSET
(
format
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
1
,
FLAGS
,
"format"
},
{
"color"
,
""
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
0
},
.
flags
=
FLAGS
,
.
unit
=
"format"
},
{
"gray"
,
""
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
1
},
.
flags
=
FLAGS
,
.
unit
=
"format"
},
{
NULL
}
};
...
...
@@ -73,6 +79,7 @@ typedef struct ThreadData {
static
int
query_formats
(
AVFilterContext
*
ctx
)
{
RemapContext
*
s
=
ctx
->
priv
;
static
const
enum
AVPixelFormat
pix_fmts
[]
=
{
AV_PIX_FMT_YUVA444P
,
AV_PIX_FMT_YUV444P
,
...
...
@@ -88,6 +95,9 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_GBRAP10
,
AV_PIX_FMT_GBRAP12
,
AV_PIX_FMT_GBRAP16
,
AV_PIX_FMT_RGB48
,
AV_PIX_FMT_BGR48
,
AV_PIX_FMT_RGBA64
,
AV_PIX_FMT_BGRA64
,
AV_PIX_FMT_NONE
};
static
const
enum
AVPixelFormat
gray_pix_fmts
[]
=
{
AV_PIX_FMT_GRAY8
,
AV_PIX_FMT_GRAY9
,
AV_PIX_FMT_GRAY10
,
AV_PIX_FMT_GRAY12
,
AV_PIX_FMT_GRAY14
,
AV_PIX_FMT_GRAY16
,
...
...
@@ -100,7 +110,7 @@ static int query_formats(AVFilterContext *ctx)
AVFilterFormats
*
pix_formats
=
NULL
,
*
map_formats
=
NULL
;
int
ret
;
if
(
!
(
pix_formats
=
ff_make_format_list
(
pix_fmts
))
||
if
(
!
(
pix_formats
=
ff_make_format_list
(
s
->
format
?
gray_pix_fmts
:
pix_fmts
))
||
!
(
map_formats
=
ff_make_format_list
(
map_fmts
)))
{
ret
=
AVERROR
(
ENOMEM
);
goto
fail
;
...
...
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