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
e695b0be
Commit
e695b0be
authored
Nov 29, 2018
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/libdav1d: add an option to toggle Film Grain
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
0fca2f60
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
libdav1d.c
libavcodec/libdav1d.c
+3
-0
No files found.
libavcodec/libdav1d.c
View file @
e695b0be
...
...
@@ -34,6 +34,7 @@ typedef struct Libdav1dContext {
Dav1dData
data
;
int
tile_threads
;
int
apply_grain
;
}
Libdav1dContext
;
static
av_cold
int
libdav1d_init
(
AVCodecContext
*
c
)
...
...
@@ -46,6 +47,7 @@ static av_cold int libdav1d_init(AVCodecContext *c)
dav1d_default_settings
(
&
s
);
s
.
n_tile_threads
=
dav1d
->
tile_threads
;
s
.
apply_grain
=
dav1d
->
apply_grain
;
s
.
n_frame_threads
=
FFMIN
(
c
->
thread_count
?
c
->
thread_count
:
av_cpu_count
(),
DAV1D_MAX_FRAME_THREADS
);
res
=
dav1d_open
(
&
dav1d
->
c
,
&
s
);
...
...
@@ -216,6 +218,7 @@ static av_cold int libdav1d_close(AVCodecContext *c)
#define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
static
const
AVOption
libdav1d_options
[]
=
{
{
"tilethreads"
,
"Tile threads"
,
OFFSET
(
tile_threads
),
AV_OPT_TYPE_INT
,
{
.
i64
=
1
},
1
,
DAV1D_MAX_TILE_THREADS
,
VD
},
{
"filmgrain"
,
"Apply Film Grain"
,
OFFSET
(
apply_grain
),
AV_OPT_TYPE_BOOL
,
{
.
i64
=
1
},
0
,
1
,
VD
},
{
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