From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id B755F4B828 for ; Tue, 22 Jul 2025 02:46:02 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id F422A68CD14; Tue, 22 Jul 2025 05:45:57 +0300 (EEST) Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 46D0368BA45 for ; Tue, 22 Jul 2025 05:45:52 +0300 (EEST) Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-60768f080d8so9551928a12.1 for ; Mon, 21 Jul 2025 19:45:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1753152351; x=1753757151; darn=ffmpeg.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=tBUbsNYhhDQGyAF97DNCrA1apk/A2JCRkVQvbA4WwI4=; b=LmWSg+SvYAabZd3iA8ScC0p1rEu6i5zPy5pIfpTN4Cjp89g4/LQQV0UVjY51X/8vQM 4uodIgAXR9e8pFCH5lrPYAolUpdhANGf/saBQ70R/PevJRLlb9bU1phWVU0su7rC1Kks ifjqqTjHFS53tX6/UGySkFmmOwJQuJvWxytHMpijcPU7LWQvcN/uxWe4X6x97cN0ihLu 8m30ntJSP/fqQ/0KB5IhryMVqwqdoAX9hna/2Bt85n/OFnvBwuS/NWbYT7RsSuex0Pvd QgDmH6pAWcT53naqn3j0adwdDyylUlekiTpx4KyQlri1orM1f84TFFyNhUBoFOung612 V6lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753152351; x=1753757151; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tBUbsNYhhDQGyAF97DNCrA1apk/A2JCRkVQvbA4WwI4=; b=Ui6xTZriNRbzG9IYhDAey0u9u+u0sN7R+dUY9I8oToTSoVDWEsNDbEYVICSn8iHt6Y 9tktY+T/0tTQia6Pox06VMAKEd9cqXkaNRkpClte7Bj1O2BZgcz1PCEErntFrK+6clFI jCvl0aqblSL2ZMgabF0DbOSwPd7CaZzZmwj+b/QSCxLAhG3Cu3e+YjErUuLWpDRnCuwV MuVejPYAu113qMQBYSJcBFJSkd4T9FSLV1MCscM/aSxh9vdosxO/J74FNyIJQmedtTlA 06EHP3nQpNbUyDOHmaTPHMYADWMHLWIWPmRpgSszSqH97FS6B62PBcc6kdjcmz0SJk09 gRGQ== X-Gm-Message-State: AOJu0YwM5zOv8pbWD2XkLfuayOqVO6lqIMC8+Hhj7qCXxxRYrWCpdhi3 hwtoz0jGtegEo52cxdcR7bDFTwYKUi1POI0VvVwjNwg+o4RH1EnwUY2N2IMCcSOY0V18lmeHgMG mBUqlKZCZWYOTKXVB6Ohuw3a6skfRa6LGLecs X-Gm-Gg: ASbGncsDj6Owrn7oBanGvYxHBrRr7GfhBe5MTuCe4OmzrWMftFLdwCyA0wpRcRDPOtU dRhK/w8u4IdjqSUiYQGQkZQMZoXMmQ0Y5FDWyI281JOS19GEjk73K5HnuhuYhUv4c4sWj+NGAwB yx5Xr2EZl9uUqYJgWWqIhaLB33nlKYIkoFuSV+9lA0BYCTRpThpqELKNKy1k9OdB/94u9UNyWBD 2+U X-Google-Smtp-Source: AGHT+IFKhxp0olvcLvsbAh5lvrhjJhv6zAj/yn9I3UocC/gpnrlWpnkJsj7tqboNbeNcowKCE9Wz2oHyVBrSL7cNvJo= X-Received: by 2002:a05:6402:4416:b0:608:f54b:5c81 with SMTP id 4fb4d7f45d1cf-612859097f7mr19030619a12.1.1753152350610; Mon, 21 Jul 2025 19:45:50 -0700 (PDT) MIME-Version: 1.0 References: <20250722004647.15233-1-jamrial@gmail.com> In-Reply-To: <20250722004647.15233-1-jamrial@gmail.com> From: Kacper Michajlow Date: Tue, 22 Jul 2025 04:45:17 +0200 X-Gm-Features: Ac12FXx2I-J_nwyA1e5Ge64lNKf8J-ZJR3G4ZZjuduxN5eGb3WsUHGmgxP1L7GQ Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH 1/3] avutil/xga_font_data: add getters to access the shared arrays X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Tue, 22 Jul 2025 at 02:47, James Almer wrote: > > And stop exposing the arrays on the next major bump. > > Signed-off-by: James Almer > --- > libavutil/xga_font_data.c | 16 ++++++++++++++++ > libavutil/xga_font_data.h | 6 ++++++ > 2 files changed, 22 insertions(+) > > diff --git a/libavutil/xga_font_data.c b/libavutil/xga_font_data.c > index 3aed3142cf..e4b21760f8 100644 > --- a/libavutil/xga_font_data.c > +++ b/libavutil/xga_font_data.c > @@ -26,6 +26,9 @@ > #include > #include "xga_font_data.h" > > +#if LIBAVUTIL_VERSION_MAJOR > 60 > +static > +#endif > const uint8_t avpriv_cga_font[2048] = { > 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0xbd, 0x99, 0x81, 0x7e, > 0x7e, 0xff, 0xdb, 0xff, 0xc3, 0xe7, 0xff, 0x7e, 0x6c, 0xfe, 0xfe, 0xfe, 0x7c, 0x38, 0x10, 0x00, > @@ -157,6 +160,14 @@ const uint8_t avpriv_cga_font[2048] = { > 0x00, 0x00, 0x3c, 0x3c, 0x3c, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > }; > > +const uint8_t *avpriv_cga_font_get(void) > +{ > + return avpriv_cga_font; > +} > + > +#if LIBAVUTIL_VERSION_MAJOR > 60 > +static > +#endif > const uint8_t avpriv_vga16_font[4096] = { > 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, > @@ -415,3 +426,8 @@ const uint8_t avpriv_vga16_font[4096] = { > 0x00, 0x00, 0x00, 0x00, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, > 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 > }; > + > +const uint8_t *avpriv_vga16_font_get(void) > +{ > + return avpriv_vga16_font; > +} > diff --git a/libavutil/xga_font_data.h b/libavutil/xga_font_data.h > index 69dc337120..90d3cec4ce 100644 > --- a/libavutil/xga_font_data.h > +++ b/libavutil/xga_font_data.h > @@ -28,8 +28,14 @@ > > #include > #include "internal.h" > +#include "version.h" > > +#if LIBAVUTIL_VERSION_MAJOR < 61 > extern av_export_avutil const uint8_t avpriv_cga_font[2048]; > extern av_export_avutil const uint8_t avpriv_vga16_font[4096]; > +#endif > + > +const uint8_t *avpriv_cga_font_get(void); > +const uint8_t *avpriv_vga16_font_get(void); Looks good. Accessing data from DLLs without dllimport requires manually resolving the indirection. While using a function works even without dllimport, while it may be used to better code generation and removing one function patching when dynamic linker loads it. All other FFmpeg code is not using dllimport, so it should be fine to remove these two remaining ones. This will allow all objects to be the same between shared/static build and fix checkasm static linking. For my information, isn't avpriv_ prefix used for internal symbols shared between libs? Does it need a deprecation period? Are users supposed to be accessing them? - Kacper _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".