[FFmpeg-devel] [PATCH] [libdav1d.c]: Add option to output all the spatial layers.
Thierry Foucu
tfoucu at gmail.com
Thu Nov 14 19:15:34 EET 2019
Set the option to false by default, to match libaomdec wrapper.
---
libavcodec/libdav1d.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c
index cf4b178f1d..5efa8eeb48 100644
--- a/libavcodec/libdav1d.c
+++ b/libavcodec/libdav1d.c
@@ -40,6 +40,7 @@ typedef struct Libdav1dContext {
int tile_threads;
int frame_threads;
int apply_grain;
+ int all_layers;
} Libdav1dContext;
static const enum AVPixelFormat pix_fmt[][3] = {
@@ -134,6 +135,8 @@ static av_cold int libdav1d_init(AVCodecContext *c)
if (dav1d->apply_grain >= 0)
s.apply_grain = dav1d->apply_grain;
+ s.all_layers = dav1d->all_layers;
+
s.n_tile_threads = dav1d->tile_threads
? dav1d->tile_threads
: FFMIN(floor(sqrt(threads)), DAV1D_MAX_TILE_THREADS);
@@ -378,6 +381,7 @@ 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 }, -1, 1, VD },
+ { "alllayers", "Output all spatial layers", OFFSET(all_layers), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VD },
{ NULL }
};
--
2.24.0.432.g9d3f5f5b63-goog
More information about the ffmpeg-devel
mailing list