avcodec/libdav1d: pass auto threads value to libdav1d
libdav1d 1.0.0 will be the first version supporting Dav1dSettings.n_threads == 0. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
59719a905c
commit
d873b5fffc
@ -207,7 +207,11 @@ static av_cold int libdav1d_init(AVCodecContext *c)
|
||||
{
|
||||
Libdav1dContext *dav1d = c->priv_data;
|
||||
Dav1dSettings s;
|
||||
#if FF_DAV1D_VERSION_AT_LEAST(6,0)
|
||||
int threads = c->thread_count;
|
||||
#else
|
||||
int threads = (c->thread_count ? c->thread_count : av_cpu_count()) * 3 / 2;
|
||||
#endif
|
||||
int res;
|
||||
|
||||
av_log(c, AV_LOG_INFO, "libdav1d %s\n", dav1d_version());
|
||||
|
Loading…
x
Reference in New Issue
Block a user