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 F37494B845 for ; Tue, 22 Jul 2025 02:49:15 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 3D60468CD29; Tue, 22 Jul 2025 05:49:12 +0300 (EEST) Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id EC90168CA5E for ; Tue, 22 Jul 2025 05:49:05 +0300 (EEST) Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-60c4521ae2cso8769303a12.0 for ; Mon, 21 Jul 2025 19:49:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1753152545; x=1753757345; 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=3pUSaDvcUH/P2kVLYixHK8TWmxk9XUBG3w59I1zRQQs=; b=Ui1XlU6RZfEkBU2Q269+aHo6WwxRjk2gDAhkju6Cc0eOjh5oH+xUpjCEywTHVD8vV5 MdfiSEL4WJTGiOGtHJ0UN4jOGxTFuzyR/6OcWTDmDTblmxg2BqwqGboie+wTB9F9hx/Q PmBvCEarIRW6CwOpHqi8gE6xI4IXQhIePRwGbjFOM4jNp6QMowB3M5TgzLvAU6JRat3r oNBhesfSHPODZ49axIgV8+LrpqhxGXneJa1EFDehZPhXex1xoCouwfILFTU0E0bgAaGp DhDsnazsJ5DU8EkKJCNgj+s64+Ms/FNNDN+h/aEyXdm5fSTry5/B0GATX0qUTCPvUgRJ l6TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753152545; x=1753757345; 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=3pUSaDvcUH/P2kVLYixHK8TWmxk9XUBG3w59I1zRQQs=; b=EWNG8pJnXPROtfpo7+f+h9/Qi0bBgfpXA52tgrGStv3aF6qeXuBEi9PJLUrIAOztga HF7dgMZ3Yz83mt3GH+oNMcYD6Jn6q/M/vkTuUzKzPffFvBqE3nLFE9JCI47m8oHKJ+3t tOyoN1MpKVJOEmhKURJyRBtmBhfV6POzlEEyCZIPsjrVzWiaGgOOIzuSg2O+rnSDoKfd 0/Z7I06Z+5AWioXJ4xINMgp1av+0FsZeSalm3O9Wtx3i1dVzLs3FQzB4gwleB8YlOXTu YZMQJXTFShgMLqjbiPqw5qxIPXSWVTaXerCLE9UbbHwjO525AGIGN+n6p/KoLAwokmwb mQng== X-Gm-Message-State: AOJu0YzhOwQ9bdi3iEeOur8cPfsCuve03NqokQaVPsja/a1iPzCbOtFg d1FL5tW1bdMmf+adFIYk3MwWIMglZHzMCzOMgTkXvvDIwIJF2C8d8jiAu9ibSsy9NeKXB3xH4So leMAGrZCyxtHgH/ERIwwDIjlR7LHQo8XtFQ== X-Gm-Gg: ASbGncv+86sRviWsk1bnIlbkvLaNLlRBVYk8VdHOi/DDUjsF+1kcUjw5hkAJdnTD5P6 TlYp9vL7KeaQYUdCfz+LXIGLoI9RqtfE0nwctcU/jAfuF4fyEAMGtnBHoyBoaggGEi8aiTJ61Q/ EXGDzF7Sh6++A72pkZmN22o4lOgnpL+LC1YsXGjQorZG4Ds7WZQ+VSJvOB6ZlUruHOEhovtH7E2 aKlp/hONKTtvhk= X-Google-Smtp-Source: AGHT+IHR4kSo9Cz3BdD/VT4iesfVSfF6a5BmCAeKH7UG/2qJn4ri8Po0O8GnElzYGOHhhCMtuiJf/gU3G+PQ8jed7Rg= X-Received: by 2002:a05:6402:524f:b0:602:1d01:286a with SMTP id 4fb4d7f45d1cf-612c731f238mr12045647a12.6.1753152544498; Mon, 21 Jul 2025 19:49:04 -0700 (PDT) MIME-Version: 1.0 References: <20250722004647.15233-1-jamrial@gmail.com> In-Reply-To: From: Kacper Michajlow Date: Tue, 22 Jul 2025 04:48:31 +0200 X-Gm-Features: Ac12FXxw1_EZo_GletqMBArYUwzjkVKKyKWtmz58SccbenordpQvhuriSpMtXqQ 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 04:45, Kacper Michajlow wrote: > > 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? meh, I guess it was stupid question, because ffmpeg's libraries may be in different versions and still should work and not break ABI. - 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".