git: 3b3b0fa35840 - main - multimedia/libxine: unbreak DAV1D=on after 3468f1957cf2
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 18 Mar 2022 20:47:27 UTC
The branch main has been updated by jbeich: URL: https://cgit.FreeBSD.org/ports/commit/?id=3b3b0fa358409a78150119c36d8cd236de7f91fc commit 3b3b0fa358409a78150119c36d8cd236de7f91fc Author: VVD <vvd@unislabs.com> AuthorDate: 2022-03-18 17:36:44 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2022-03-18 20:44:49 +0000 multimedia/libxine: unbreak DAV1D=on after 3468f1957cf2 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__); \ ^~~~~~~~~~~ PR: 262651 --- multimedia/libxine/files/patch-dav1d-1.0 | 47 ++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) 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;