[FFmpeg-cvslog] avcodec/libdav1d: use constants defined in the public API to limit thread count
James Almer
git at videolan.org
Thu Nov 29 04:10:13 EET 2018
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Wed Nov 28 22:48:13 2018 -0300| [3cd275bcde5c0de509c239fff275e8277cece514] | committer: James Almer
avcodec/libdav1d: use constants defined in the public API to limit thread count
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3cd275bcde5c0de509c239fff275e8277cece514
---
libavcodec/libdav1d.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c
index cfa014455e..ed2262df7c 100644
--- a/libavcodec/libdav1d.c
+++ b/libavcodec/libdav1d.c
@@ -46,7 +46,7 @@ static av_cold int libdav1d_init(AVCodecContext *c)
dav1d_default_settings(&s);
s.n_tile_threads = dav1d->tile_threads;
- s.n_frame_threads = FFMIN(c->thread_count ? c->thread_count : av_cpu_count(), 256);
+ s.n_frame_threads = FFMIN(c->thread_count ? c->thread_count : av_cpu_count(), DAV1D_MAX_FRAME_THREADS);
res = dav1d_open(&dav1d->c, &s);
if (res < 0)
@@ -223,7 +223,7 @@ static av_cold int libdav1d_close(AVCodecContext *c)
#define OFFSET(x) offsetof(Libdav1dContext, x)
#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, 64, VD, NULL },
+ { "tilethreads", "Tile threads", OFFSET(tile_threads), AV_OPT_TYPE_INT, { .i64 = 1 }, 1, DAV1D_MAX_TILE_THREADS, VD },
{ NULL }
};
More information about the ffmpeg-cvslog
mailing list