aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2019-09-15 11:09:39 -0300
committerJames Almer <jamrial@gmail.com>2019-09-15 11:09:39 -0300
commit6c0167f6f67b160b098957b96e0b5b0001c407a5 (patch)
tree9b6c65bdb55deff617c35a6602245bc4dfe83eb1 /libavcodec
parent4c34ed65f68542ab5d1b0be0e26716ae74df0d23 (diff)
downloadffmpeg-6c0167f6f67b160b098957b96e0b5b0001c407a5.tar.gz
avcodec/libdav1d: use the library default for the filmgrain option
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/libdav1d.c5
-rw-r--r--libavcodec/version.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c
index 8335751b7b..9ad735c771 100644
--- a/libavcodec/libdav1d.c
+++ b/libavcodec/libdav1d.c
@@ -131,7 +131,8 @@ static av_cold int libdav1d_init(AVCodecContext *c)
s.allocator.alloc_picture_callback = libdav1d_picture_allocator;
s.allocator.release_picture_callback = libdav1d_picture_release;
s.frame_size_limit = c->max_pixels;
- s.apply_grain = dav1d->apply_grain;
+ if (dav1d->apply_grain >= 0)
+ s.apply_grain = dav1d->apply_grain;
s.n_tile_threads = dav1d->tile_threads
? dav1d->tile_threads
@@ -342,7 +343,7 @@ static av_cold int libdav1d_close(AVCodecContext *c)
static const AVOption libdav1d_options[] = {
{ "tilethreads", "Tile threads", OFFSET(tile_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_TILE_THREADS, VD },
{ "framethreads", "Frame threads", OFFSET(frame_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_FRAME_THREADS, VD },
- { "filmgrain", "Apply Film Grain", OFFSET(apply_grain), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, VD },
+ { "filmgrain", "Apply Film Grain", OFFSET(apply_grain), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, VD },
{ NULL }
};
diff --git a/libavcodec/version.h b/libavcodec/version.h
index b4b79ef63a..5748d31051 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,7 +29,7 @@
#define LIBAVCODEC_VERSION_MAJOR 58
#define LIBAVCODEC_VERSION_MINOR 56
-#define LIBAVCODEC_VERSION_MICRO 101
+#define LIBAVCODEC_VERSION_MICRO 102
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \