xine-lib/xine-lib-1.2.12-dav1d_100_support.patch

41 lines
1.4 KiB
Diff

# HG changeset patch
# User Petri Hintukainen <phintuka@users.sourceforge.net>
# Date 1648142359 -7200
# Thu Mar 24 19:19:19 2022 +0200
# Node ID 97248a71021428baa49e2b2af34f566a3257452a
# Parent b044102cc61810eec217d3911028ec18f87408cc
dav1d 1.0.0 support
https://sourceforge.net/p/xine/tickets/11/
diff -r b044102cc618 -r 97248a710214 ChangeLog
--- a/ChangeLog Thu Mar 17 14:05:08 2022 +0200
+++ b/ChangeLog Thu Mar 24 19:19:19 2022 +0200
@@ -1,3 +1,5 @@
+ * Add dav1d 1.0.0 support.
+
xine-lib (1.2.12) 2022-03-09
* Add string tree library (generic info parser).
* Add OpenSL ES audio output plugin.
diff -r b044102cc618 -r 97248a710214 src/video_dec/dav1d.c
--- a/src/video_dec/dav1d.c Thu Mar 17 14:05:08 2022 +0200
+++ b/src/video_dec/dav1d.c Thu Mar 24 19:19:19 2022 +0200
@@ -544,11 +544,17 @@
/* multithreading */
ncpu = xine_cpu_count();
+#if DAV1D_API_VERSION_MAJOR > 5
+ settings.n_threads = ncpu + 1;
+ xprintf(stream->xine, XINE_VERBOSITY_DEBUG, LOG_MODULE ": "
+ "Using %d threads\n", settings.n_threads);
+#else
settings.n_frame_threads = (ncpu > 8) ? 4 : (ncpu < 2) ? 1 : ncpu/2;
settings.n_tile_threads = MAX(1, ncpu - settings.n_frame_threads + 1);
xprintf(stream->xine, XINE_VERBOSITY_DEBUG, LOG_MODULE ": "
"Using %d frame threads, %d tile threads\n",
settings.n_frame_threads, settings.n_tile_threads);
+#endif
/* dri frame allocator */
settings.allocator.cookie = this;