--- Begin Message ---
- To: submit@bugs.debian.org
- Subject: vlc: FTBFS with dav1d 1.0.0
- From: Dylan Aïssi <daissi@debian.org>
- Date: Tue, 29 Mar 2022 16:11:16 +0200
- Message-id: <CA+6XHwRwHkTH2jh3NAByyvwOi5wk_44w8ERR-Dy95LJZ6LdwOw@mail.gmail.com>
Source: vlc
Version: 3.0.17.3-1
Severity: important
Tags: sid bookworm ftbfs patch
Forwarded: https://code.videolan.org/videolan/vlc/-/merge_requests/1611
vlc FTBFS with dav1d 1.0.0 in experimental:
In file included from codec/dav1d.c:33:
codec/dav1d.c: In function 'vlc_entry__3_0_0f':
codec/dav1d.c:66:57: error: 'DAV1D_MAX_FRAME_THREADS' undeclared
(first use in this function); did you mean 'DAV1D_MAX_THREADS'?
66 | add_integer_with_range("dav1d-thread-frames", 0, 0,
DAV1D_MAX_FRAME_THREADS,
|
^~~~~~~~~~~~~~~~~~~~~~~
../include/vlc_plugin.h:246:54: note: in definition of macro 'vlc_config_set'
246 | #define vlc_config_set(...) vlc_set (opaque, config, __VA_ARGS__)
| ^~~~~~~~~~~
../include/vlc_plugin.h:434:5: note: in expansion of macro
'change_integer_range'
434 | change_integer_range( i_min, i_max )
| ^~~~~~~~~~~~~~~~~~~~
codec/dav1d.c:66:5: note: in expansion of macro 'add_integer_with_range'
66 | add_integer_with_range("dav1d-thread-frames", 0, 0,
DAV1D_MAX_FRAME_THREADS,
| ^~~~~~~~~~~~~~~~~~~~~~
codec/dav1d.c:66:57: note: each undeclared identifier is reported only
once for each function it appears in
66 | add_integer_with_range("dav1d-thread-frames", 0, 0,
DAV1D_MAX_FRAME_THREADS,
|
^~~~~~~~~~~~~~~~~~~~~~~
../include/vlc_plugin.h:246:54: note: in definition of macro 'vlc_config_set'
246 | #define vlc_config_set(...) vlc_set (opaque, config, __VA_ARGS__)
| ^~~~~~~~~~~
../include/vlc_plugin.h:434:5: note: in expansion of macro
'change_integer_range'
434 | change_integer_range( i_min, i_max )
| ^~~~~~~~~~~~~~~~~~~~
codec/dav1d.c:66:5: note: in expansion of macro 'add_integer_with_range'
66 | add_integer_with_range("dav1d-thread-frames", 0, 0,
DAV1D_MAX_FRAME_THREADS,
| ^~~~~~~~~~~~~~~~~~~~~~
codec/dav1d.c:68:56: error: 'DAV1D_MAX_TILE_THREADS' undeclared (first
use in this function); did you mean 'DAV1D_MAX_THREADS'?
68 | add_integer_with_range("dav1d-thread-tiles", 0, 0,
DAV1D_MAX_TILE_THREADS,
|
^~~~~~~~~~~~~~~~~~~~~~
../include/vlc_plugin.h:246:54: note: in definition of macro 'vlc_config_set'
246 | #define vlc_config_set(...) vlc_set (opaque, config, __VA_ARGS__)
| ^~~~~~~~~~~
../include/vlc_plugin.h:434:5: note: in expansion of macro
'change_integer_range'
434 | change_integer_range( i_min, i_max )
| ^~~~~~~~~~~~~~~~~~~~
codec/dav1d.c:68:5: note: in expansion of macro 'add_integer_with_range'
68 | add_integer_with_range("dav1d-thread-tiles", 0, 0,
DAV1D_MAX_TILE_THREADS,
| ^~~~~~~~~~~~~~~~~~~~~~
demux/flac.c: In function 'GetPacketizedBlock':
demux/flac.c:230:17: warning: unused variable 'i_ret' [-Wunused-variable]
230 | int i_ret = FLAC_ParseSyncInfo( p_block->p_buffer,
streaminfo, NULL, &headerinfo );
| ^~~~~
codec/dav1d.c: In function 'OpenDecoder':
codec/dav1d.c:297:14: error: 'Dav1dSettings' has no member named
'n_tile_threads'; did you mean 'n_threads'?
297 | p_sys->s.n_tile_threads = var_InheritInteger(p_this,
"dav1d-thread-tiles");
| ^~~~~~~~~~~~~~
| n_threads
codec/dav1d.c:298:18: error: 'Dav1dSettings' has no member named
'n_tile_threads'; did you mean 'n_threads'?
298 | if (p_sys->s.n_tile_threads == 0)
| ^~~~~~~~~~~~~~
| n_threads
codec/dav1d.c:299:18: error: 'Dav1dSettings' has no member named
'n_tile_threads'; did you mean 'n_threads'?
299 | p_sys->s.n_tile_threads =
| ^~~~~~~~~~~~~~
| n_threads
codec/dav1d.c:303:13: error: 'Dav1dSettings' has no member named
'n_frame_threads'
303 | p_sys->s.n_frame_threads = var_InheritInteger(p_this,
"dav1d-thread-frames");
| ^
codec/dav1d.c:304:17: error: 'Dav1dSettings' has no member named
'n_frame_threads'
304 | if (p_sys->s.n_frame_threads == 0)
| ^
codec/dav1d.c:305:17: error: 'Dav1dSettings' has no member named
'n_frame_threads'
305 | p_sys->s.n_frame_threads = (i_core_count < 16) ?
i_core_count : 16;
| ^
In file included from ../include/vlc_common.h:1025,
from codec/dav1d.c:32:
codec/dav1d.c:317:38: error: 'Dav1dSettings' has no member named
'n_frame_threads'
317 | dav1d_version(), p_sys->s.n_frame_threads,
p_sys->s.n_tile_threads);
| ^
../include/vlc_messages.h:79:23: note: in definition of macro 'msg_Generic'
79 | __func__, __VA_ARGS__)
| ^~~~~~~~~~~
codec/dav1d.c:316:5: note: in expansion of macro 'msg_Dbg'
316 | msg_Dbg(p_this, "Using dav1d version %s with %d/%d
frame/tile threads",
| ^~~~~~~
codec/dav1d.c:317:65: error: 'Dav1dSettings' has no member named
'n_tile_threads'; did you mean 'n_threads'?
317 | dav1d_version(), p_sys->s.n_frame_threads,
p_sys->s.n_tile_threads);
|
^~~~~~~~~~~~~~
../include/vlc_messages.h:79:23: note: in definition of macro 'msg_Generic'
79 | __func__, __VA_ARGS__)
| ^~~~~~~~~~~
codec/dav1d.c:316:5: note: in expansion of macro 'msg_Dbg'
316 | msg_Dbg(p_this, "Using dav1d version %s with %d/%d
frame/tile threads",
| ^~~~~~~
codec/dav1d.c:321:45: error: 'Dav1dSettings' has no member named
'n_frame_threads'
321 | dec->i_extra_picture_buffers = (p_sys->s.n_frame_threads - 1);
| ^
make[6]: *** [Makefile:21954: codec/libdav1d_plugin_la-dav1d.lo] Error 1
Please find attached a patch adapted from the upstream one.
Best,
Dylan
From dbf45cea2a8abdfbef897b8a71f3eb782bb1b712 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@ycbcr.xyz>
Date: Fri, 18 Mar 2022 11:42:49 +0100
Subject: [PATCH] dav1d: fix compilation with (upcoming) dav1d 1.0
---
modules/codec/dav1d.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
--- a/modules/codec/dav1d.c
+++ b/modules/codec/dav1d.c
@@ -63,10 +63,16 @@
set_category(CAT_INPUT)
set_subcategory(SUBCAT_INPUT_VCODEC)
+#if DAV1D_API_VERSION_MAJOR >= 6
+ add_integer_with_range("dav1d-thread-frames", 0, 0, DAV1D_MAX_THREADS,
+ THREAD_FRAMES_TEXT, THREAD_FRAMES_LONGTEXT, false)
+ add_obsolete_string("dav1d-thread-tiles") // unused with dav1d 1.0
+#else
add_integer_with_range("dav1d-thread-frames", 0, 0, DAV1D_MAX_FRAME_THREADS,
THREAD_FRAMES_TEXT, THREAD_FRAMES_LONGTEXT, false)
add_integer_with_range("dav1d-thread-tiles", 0, 0, DAV1D_MAX_TILE_THREADS,
THREAD_TILES_TEXT, THREAD_TILES_LONGTEXT, false)
+#endif
vlc_module_end ()
/*****************************************************************************
@@ -294,6 +300,11 @@
return VLC_ENOMEM;
dav1d_default_settings(&p_sys->s);
+#if DAV1D_API_VERSION_MAJOR >= 6
+ p_sys->s.n_threads = var_InheritInteger(p_this, "dav1d-thread-frames");
+ if (p_sys->s.n_threads == 0)
+ p_sys->s.n_threads = (i_core_count < 16) ? i_core_count : 16;
+#else
p_sys->s.n_tile_threads = var_InheritInteger(p_this, "dav1d-thread-tiles");
if (p_sys->s.n_tile_threads == 0)
p_sys->s.n_tile_threads =
@@ -303,6 +314,7 @@
p_sys->s.n_frame_threads = var_InheritInteger(p_this, "dav1d-thread-frames");
if (p_sys->s.n_frame_threads == 0)
p_sys->s.n_frame_threads = (i_core_count < 16) ? i_core_count : 16;
+#endif
p_sys->s.allocator.cookie = dec;
p_sys->s.allocator.alloc_picture_callback = NewPicture;
p_sys->s.allocator.release_picture_callback = FreePicture;
@@ -313,13 +325,21 @@
return VLC_EGENERIC;
}
+#if DAV1D_API_VERSION_MAJOR >= 6
+ msg_Dbg(p_this, "Using dav1d version %s with %d threads",
+ dav1d_version(), p_sys->s.n_threads);
+
+ dec->pf_decode = Decode;
+ dec->pf_flush = FlushDecoder;
+ dec->i_extra_picture_buffers = (p_sys->s.n_threads - 1);
+#else
msg_Dbg(p_this, "Using dav1d version %s with %d/%d frame/tile threads",
dav1d_version(), p_sys->s.n_frame_threads, p_sys->s.n_tile_threads);
dec->pf_decode = Decode;
dec->pf_flush = FlushDecoder;
dec->i_extra_picture_buffers = (p_sys->s.n_frame_threads - 1);
-
+#endif
dec->fmt_out.video.i_width = dec->fmt_in.video.i_width;
dec->fmt_out.video.i_height = dec->fmt_in.video.i_height;
dec->fmt_out.i_codec = VLC_CODEC_I420;
--- End Message ---