summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--multimedia/libxine/files/patch-dav1d-1.047
1 files changed, 47 insertions, 0 deletions
diff --git a/multimedia/libxine/files/patch-dav1d-1.0 b/multimedia/libxine/files/patch-dav1d-1.0
new file mode 100644
index 000000000000..e18689712281
--- /dev/null
+++ b/multimedia/libxine/files/patch-dav1d-1.0
@@ -0,0 +1,47 @@
+https://sourceforge.net/p/xine/tickets/11/
+
+dav1d.c:547:12: error: no member named 'n_frame_threads' in 'struct Dav1dSettings'
+ settings.n_frame_threads = (ncpu > 8) ? 4 : (ncpu < 2) ? 1 : ncpu/2;
+ ~~~~~~~~ ^
+dav1d.c:548:12: error: no member named 'n_tile_threads' in 'struct Dav1dSettings'
+ settings.n_tile_threads = MAX(1, ncpu - settings.n_frame_threads + 1);
+ ~~~~~~~~ ^
+dav1d.c:548:52: error: no member named 'n_frame_threads' in 'struct Dav1dSettings'
+ settings.n_tile_threads = MAX(1, ncpu - settings.n_frame_threads + 1);
+ ~~~~~~~~ ^
+dav1d.c:548:52: error: no member named 'n_frame_threads' in 'struct Dav1dSettings'
+ settings.n_tile_threads = MAX(1, ncpu - settings.n_frame_threads + 1);
+ ~~~~~~~~ ^
+/usr/include/sys/param.h:306:34: note: expanded from macro 'MAX'
+#define MAX(a,b) (((a)>(b))?(a):(b))
+ ^
+dav1d.c:551:22: error: no member named 'n_frame_threads' in 'struct Dav1dSettings'
+ settings.n_frame_threads, settings.n_tile_threads);
+ ~~~~~~~~ ^
+dav1d.c:551:48: error: no member named 'n_tile_threads' in 'struct Dav1dSettings'
+ settings.n_frame_threads, settings.n_tile_threads);
+ ~~~~~~~~ ^
+../../include/xine/xineutils.h:687:40: note: expanded from macro 'xprintf'
+ xine_log(xine, XINE_LOG_TRACE, __VA_ARGS__); \
+ ^~~~~~~~~~~
+
+--- src/video_dec/dav1d.c.orig 2022-03-06 16:31:24 UTC
++++ src/video_dec/dav1d.c
+@@ -544,11 +544,17 @@ static video_decoder_t *_open_plugin(video_decoder_cla
+
+ /* 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;