* [FFmpeg-devel] [PATCH 2/2] libavcodec: Set hidden visibility on global symbols accessed from x86_64 assembly
@ 2022-07-27 12:00 Thomas Guillem
2022-08-04 11:20 ` Martin Storsjö
2022-08-04 12:51 ` Andreas Rheinhardt
0 siblings, 2 replies; 3+ messages in thread
From: Thomas Guillem @ 2022-07-27 12:00 UTC (permalink / raw)
To: ffmpeg-devel
DECLARE_ALIGNED, DECLARE_ASM_ALIGNED, and DECLARE_ASM_CONST will include
attribute_visibility_hidden.
ld: error: relocation R_X86_64_PC32 cannot be used against symbol 'ff_h264_cabac_tables'; recompile with -fPIC
>>> defined in /home/tom/work/git/vlc-android/vlc/contrib/x86_64-linux-android/lib/libavcodec.a(cabac.o)
>>> referenced by cabac.h:187 (libavcodec/x86/cabac.h:187)
>>> h264_cabac.o:(ff_h264_decode_mb_cabac) in archive /home/tom/work/git/vlc-android/vlc/contrib/x86_64-linux-android/lib/libavcodec.a
---
libavcodec/ac3dsp.h | 3 +-
libavcodec/cabac.h | 3 +-
libavcodec/h263dsp.h | 3 +-
libavcodec/x86/constants.h | 81 +++++++++++++++++++-------------------
libavutil/mem.h | 6 +--
libswscale/x86/rgb2rgb.c | 2 +-
6 files changed, 51 insertions(+), 47 deletions(-)
diff --git a/libavcodec/ac3dsp.h b/libavcodec/ac3dsp.h
index a23b11526e..f8c03a7c23 100644
--- a/libavcodec/ac3dsp.h
+++ b/libavcodec/ac3dsp.h
@@ -23,12 +23,13 @@
#define AVCODEC_AC3DSP_H
#include <stdint.h>
+#include "libavutil/internal.h"
/**
* Number of mantissa bits written for each bap value.
* bap values with fractional bits are set to 0 and are calculated separately.
*/
-extern const uint16_t ff_ac3_bap_bits[16];
+extern const uint16_t attribute_visibility_hidden ff_ac3_bap_bits[16];
typedef struct AC3DSPContext {
/**
diff --git a/libavcodec/cabac.h b/libavcodec/cabac.h
index 38d06b2842..356aa368d0 100644
--- a/libavcodec/cabac.h
+++ b/libavcodec/cabac.h
@@ -28,8 +28,9 @@
#define AVCODEC_CABAC_H
#include <stdint.h>
+#include "libavutil/internal.h"
-extern const uint8_t ff_h264_cabac_tables[512 + 4*2*64 + 4*64 + 63];
+extern const uint8_t attribute_visibility_hidden ff_h264_cabac_tables[512 + 4*2*64 + 4*64 + 63];
#define H264_NORM_SHIFT_OFFSET 0
#define H264_LPS_RANGE_OFFSET 512
#define H264_MLPS_STATE_OFFSET 1024
diff --git a/libavcodec/h263dsp.h b/libavcodec/h263dsp.h
index 1abea3ca8c..514a148fb1 100644
--- a/libavcodec/h263dsp.h
+++ b/libavcodec/h263dsp.h
@@ -20,8 +20,9 @@
#define AVCODEC_H263DSP_H
#include <stdint.h>
+#include "libavutil/internal.h"
-extern const uint8_t ff_h263_loop_filter_strength[32];
+extern const uint8_t attribute_visibility_hidden ff_h263_loop_filter_strength[32];
typedef struct H263DSPContext {
void (*h263_h_loop_filter)(uint8_t *src, int stride, int qscale);
diff --git a/libavcodec/x86/constants.h b/libavcodec/x86/constants.h
index 85da38b7b9..c84b0d4324 100644
--- a/libavcodec/x86/constants.h
+++ b/libavcodec/x86/constants.h
@@ -22,51 +22,52 @@
#define AVCODEC_X86_CONSTANTS_H
#include <stdint.h>
+#include "libavutil/internal.h"
#include "libavutil/x86/asm.h"
-extern const ymm_reg ff_pw_1;
-extern const ymm_reg ff_pw_2;
-extern const xmm_reg ff_pw_3;
-extern const ymm_reg ff_pw_4;
-extern const xmm_reg ff_pw_5;
-extern const xmm_reg ff_pw_8;
-extern const xmm_reg ff_pw_9;
-extern const uint64_t ff_pw_15;
-extern const xmm_reg ff_pw_16;
-extern const xmm_reg ff_pw_18;
-extern const xmm_reg ff_pw_20;
-extern const xmm_reg ff_pw_32;
-extern const uint64_t ff_pw_42;
-extern const uint64_t ff_pw_53;
-extern const xmm_reg ff_pw_64;
-extern const uint64_t ff_pw_96;
-extern const uint64_t ff_pw_128;
-extern const ymm_reg ff_pw_255;
-extern const ymm_reg ff_pw_256;
-extern const ymm_reg ff_pw_512;
-extern const ymm_reg ff_pw_1023;
-extern const ymm_reg ff_pw_1024;
-extern const ymm_reg ff_pw_2048;
-extern const ymm_reg ff_pw_4095;
-extern const ymm_reg ff_pw_4096;
-extern const ymm_reg ff_pw_8192;
-extern const ymm_reg ff_pw_m1;
+extern const ymm_reg attribute_visibility_hidden ff_pw_1;
+extern const ymm_reg attribute_visibility_hidden ff_pw_2;
+extern const xmm_reg attribute_visibility_hidden ff_pw_3;
+extern const ymm_reg attribute_visibility_hidden ff_pw_4;
+extern const xmm_reg attribute_visibility_hidden ff_pw_5;
+extern const xmm_reg attribute_visibility_hidden ff_pw_8;
+extern const xmm_reg attribute_visibility_hidden ff_pw_9;
+extern const uint64_t attribute_visibility_hidden ff_pw_15;
+extern const xmm_reg attribute_visibility_hidden ff_pw_16;
+extern const xmm_reg attribute_visibility_hidden ff_pw_18;
+extern const xmm_reg attribute_visibility_hidden ff_pw_20;
+extern const xmm_reg attribute_visibility_hidden ff_pw_32;
+extern const uint64_t attribute_visibility_hidden ff_pw_42;
+extern const uint64_t attribute_visibility_hidden ff_pw_53;
+extern const xmm_reg attribute_visibility_hidden ff_pw_64;
+extern const uint64_t attribute_visibility_hidden ff_pw_96;
+extern const uint64_t attribute_visibility_hidden ff_pw_128;
+extern const ymm_reg attribute_visibility_hidden ff_pw_255;
+extern const ymm_reg attribute_visibility_hidden ff_pw_256;
+extern const ymm_reg attribute_visibility_hidden ff_pw_512;
+extern const ymm_reg attribute_visibility_hidden ff_pw_1023;
+extern const ymm_reg attribute_visibility_hidden ff_pw_1024;
+extern const ymm_reg attribute_visibility_hidden ff_pw_2048;
+extern const ymm_reg attribute_visibility_hidden ff_pw_4095;
+extern const ymm_reg attribute_visibility_hidden ff_pw_4096;
+extern const ymm_reg attribute_visibility_hidden ff_pw_8192;
+extern const ymm_reg attribute_visibility_hidden ff_pw_m1;
-extern const ymm_reg ff_pb_0;
-extern const ymm_reg ff_pb_1;
-extern const ymm_reg ff_pb_2;
-extern const ymm_reg ff_pb_3;
-extern const ymm_reg ff_pb_80;
-extern const ymm_reg ff_pb_FE;
-extern const uint64_t ff_pb_FC;
+extern const ymm_reg attribute_visibility_hidden ff_pb_0;
+extern const ymm_reg attribute_visibility_hidden ff_pb_1;
+extern const ymm_reg attribute_visibility_hidden ff_pb_2;
+extern const ymm_reg attribute_visibility_hidden ff_pb_3;
+extern const ymm_reg attribute_visibility_hidden ff_pb_80;
+extern const ymm_reg attribute_visibility_hidden ff_pb_FE;
+extern const uint64_t attribute_visibility_hidden ff_pb_FC;
-extern const xmm_reg ff_ps_neg;
+extern const xmm_reg attribute_visibility_hidden ff_ps_neg;
-extern const ymm_reg ff_pd_1;
-extern const ymm_reg ff_pd_16;
-extern const ymm_reg ff_pd_32;
-extern const ymm_reg ff_pd_8192;
-extern const ymm_reg ff_pd_65535;
+extern const ymm_reg attribute_visibility_hidden ff_pd_1;
+extern const ymm_reg attribute_visibility_hidden ff_pd_16;
+extern const ymm_reg attribute_visibility_hidden ff_pd_32;
+extern const ymm_reg attribute_visibility_hidden ff_pd_8192;
+extern const ymm_reg attribute_visibility_hidden ff_pd_65535;
#endif /* AVCODEC_X86_CONSTANTS_H */
diff --git a/libavutil/mem.h b/libavutil/mem.h
index d91174196c..88fea4bfe7 100644
--- a/libavutil/mem.h
+++ b/libavutil/mem.h
@@ -113,9 +113,9 @@
#define DECLARE_ASM_ALIGNED(n,t,v) t av_used __attribute__ ((aligned (FFMIN(n, 16)))) v
#define DECLARE_ASM_CONST(n,t,v) static const t av_used __attribute__ ((aligned (FFMIN(n, 16)))) v
#elif defined(__GNUC__) || defined(__clang__)
- #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v
- #define DECLARE_ASM_ALIGNED(n,t,v) t av_used __attribute__ ((aligned (n))) v
- #define DECLARE_ASM_CONST(n,t,v) static const t av_used __attribute__ ((aligned (n))) v
+ #define DECLARE_ALIGNED(n,t,v) attribute_visibility_hidden t __attribute__ ((aligned (n))) v
+ #define DECLARE_ASM_ALIGNED(n,t,v) attribute_visibility_hidden t av_used __attribute__ ((aligned (n))) v
+ #define DECLARE_ASM_CONST(n,t,v) attribute_visibility_hidden static const t av_used __attribute__ ((aligned (n))) v
#elif defined(_MSC_VER)
#define DECLARE_ALIGNED(n,t,v) __declspec(align(n)) t v
#define DECLARE_ASM_ALIGNED(n,t,v) __declspec(align(n)) t v
diff --git a/libswscale/x86/rgb2rgb.c b/libswscale/x86/rgb2rgb.c
index b325e5dbd5..100f608d04 100644
--- a/libswscale/x86/rgb2rgb.c
+++ b/libswscale/x86/rgb2rgb.c
@@ -70,7 +70,7 @@ DECLARE_ASM_CONST(8, uint64_t, mul15_hi) = 0x0210021002100210ULL;
DECLARE_ASM_CONST(8, uint64_t, mul16_mid) = 0x2080208020802080ULL;
DECLARE_ALIGNED(8, extern const uint64_t, ff_bgr2YOffset);
-DECLARE_ALIGNED(8, extern const uint64_t, ff_w1111);
+attribute_visibility_hidden DECLARE_ALIGNED(8, extern const uint64_t, ff_w1111);
DECLARE_ALIGNED(8, extern const uint64_t, ff_bgr2UVOffset);
#define BY ((int)( 0.098*(1<<RGB2YUV_SHIFT)+0.5))
--
2.35.1
_______________________________________________
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".
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [FFmpeg-devel] [PATCH 2/2] libavcodec: Set hidden visibility on global symbols accessed from x86_64 assembly
2022-07-27 12:00 [FFmpeg-devel] [PATCH 2/2] libavcodec: Set hidden visibility on global symbols accessed from x86_64 assembly Thomas Guillem
@ 2022-08-04 11:20 ` Martin Storsjö
2022-08-04 12:51 ` Andreas Rheinhardt
1 sibling, 0 replies; 3+ messages in thread
From: Martin Storsjö @ 2022-08-04 11:20 UTC (permalink / raw)
To: FFmpeg development discussions and patches
On Wed, 27 Jul 2022, Thomas Guillem wrote:
> DECLARE_ALIGNED, DECLARE_ASM_ALIGNED, and DECLARE_ASM_CONST will include
> attribute_visibility_hidden.
Hmm, I'm not entirely sure that we should do that - if we should add such
extra meaning to those macros.
How many symbols would it need to be applied on, if we don't apply it via
these macros?
I was a bit concerned that DECLARE_ALIGNED could be used for e.g. stack
local variables (where visibility doesn't make sense) - but we do have
LOCAL_ALIGNED_* macros for that instead, so maybe it could work this way
after all?
Do note, that these are currently defined in libavutil/mem.h, but after
the next major bump they'll be in libavutil/mem_internal.h. Currently
their contents are duplicated in the both, so any changes would need to
apply to both.
I see that libavutil/mem.h (which is a public installed header) doesn't
explicitly include libavutil/internal.h, so if someone uses those macros
without including libavutil/internal.h, attribute_visibility_hidden would
be undefined.
After the next bump, when these macros are entirely internal, this issue
is much clearer (and at that point, I think it could be a bit more
tolerable to extend their meaning to include visibility).
// Martin
_______________________________________________
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".
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [FFmpeg-devel] [PATCH 2/2] libavcodec: Set hidden visibility on global symbols accessed from x86_64 assembly
2022-07-27 12:00 [FFmpeg-devel] [PATCH 2/2] libavcodec: Set hidden visibility on global symbols accessed from x86_64 assembly Thomas Guillem
2022-08-04 11:20 ` Martin Storsjö
@ 2022-08-04 12:51 ` Andreas Rheinhardt
1 sibling, 0 replies; 3+ messages in thread
From: Andreas Rheinhardt @ 2022-08-04 12:51 UTC (permalink / raw)
To: ffmpeg-devel
Thomas Guillem:
> DECLARE_ALIGNED, DECLARE_ASM_ALIGNED, and DECLARE_ASM_CONST will include
> attribute_visibility_hidden.
>
> ld: error: relocation R_X86_64_PC32 cannot be used against symbol 'ff_h264_cabac_tables'; recompile with -fPIC
>>>> defined in /home/tom/work/git/vlc-android/vlc/contrib/x86_64-linux-android/lib/libavcodec.a(cabac.o)
>>>> referenced by cabac.h:187 (libavcodec/x86/cabac.h:187)
>>>> h264_cabac.o:(ff_h264_decode_mb_cabac) in archive /home/tom/work/git/vlc-android/vlc/contrib/x86_64-linux-android/lib/libavcodec.a
> ---
> libavcodec/ac3dsp.h | 3 +-
> libavcodec/cabac.h | 3 +-
> libavcodec/h263dsp.h | 3 +-
> libavcodec/x86/constants.h | 81 +++++++++++++++++++-------------------
> libavutil/mem.h | 6 +--
> libswscale/x86/rgb2rgb.c | 2 +-
> 6 files changed, 51 insertions(+), 47 deletions(-)
>
> diff --git a/libavcodec/ac3dsp.h b/libavcodec/ac3dsp.h
> index a23b11526e..f8c03a7c23 100644
> --- a/libavcodec/ac3dsp.h
> +++ b/libavcodec/ac3dsp.h
> @@ -23,12 +23,13 @@
> #define AVCODEC_AC3DSP_H
>
> #include <stdint.h>
> +#include "libavutil/internal.h"
>
> /**
> * Number of mantissa bits written for each bap value.
> * bap values with fractional bits are set to 0 and are calculated separately.
> */
> -extern const uint16_t ff_ac3_bap_bits[16];
> +extern const uint16_t attribute_visibility_hidden ff_ac3_bap_bits[16];
>
> typedef struct AC3DSPContext {
> /**
> diff --git a/libavcodec/cabac.h b/libavcodec/cabac.h
> index 38d06b2842..356aa368d0 100644
> --- a/libavcodec/cabac.h
> +++ b/libavcodec/cabac.h
> @@ -28,8 +28,9 @@
> #define AVCODEC_CABAC_H
>
> #include <stdint.h>
> +#include "libavutil/internal.h"
>
> -extern const uint8_t ff_h264_cabac_tables[512 + 4*2*64 + 4*64 + 63];
> +extern const uint8_t attribute_visibility_hidden ff_h264_cabac_tables[512 + 4*2*64 + 4*64 + 63];
> #define H264_NORM_SHIFT_OFFSET 0
> #define H264_LPS_RANGE_OFFSET 512
> #define H264_MLPS_STATE_OFFSET 1024
> diff --git a/libavcodec/h263dsp.h b/libavcodec/h263dsp.h
> index 1abea3ca8c..514a148fb1 100644
> --- a/libavcodec/h263dsp.h
> +++ b/libavcodec/h263dsp.h
> @@ -20,8 +20,9 @@
> #define AVCODEC_H263DSP_H
>
> #include <stdint.h>
> +#include "libavutil/internal.h"
>
> -extern const uint8_t ff_h263_loop_filter_strength[32];
> +extern const uint8_t attribute_visibility_hidden ff_h263_loop_filter_strength[32];
>
> typedef struct H263DSPContext {
> void (*h263_h_loop_filter)(uint8_t *src, int stride, int qscale);
> diff --git a/libavcodec/x86/constants.h b/libavcodec/x86/constants.h
> index 85da38b7b9..c84b0d4324 100644
> --- a/libavcodec/x86/constants.h
> +++ b/libavcodec/x86/constants.h
> @@ -22,51 +22,52 @@
> #define AVCODEC_X86_CONSTANTS_H
>
> #include <stdint.h>
> +#include "libavutil/internal.h"
>
> #include "libavutil/x86/asm.h"
>
> -extern const ymm_reg ff_pw_1;
> -extern const ymm_reg ff_pw_2;
> -extern const xmm_reg ff_pw_3;
> -extern const ymm_reg ff_pw_4;
> -extern const xmm_reg ff_pw_5;
> -extern const xmm_reg ff_pw_8;
> -extern const xmm_reg ff_pw_9;
> -extern const uint64_t ff_pw_15;
> -extern const xmm_reg ff_pw_16;
> -extern const xmm_reg ff_pw_18;
> -extern const xmm_reg ff_pw_20;
> -extern const xmm_reg ff_pw_32;
> -extern const uint64_t ff_pw_42;
> -extern const uint64_t ff_pw_53;
> -extern const xmm_reg ff_pw_64;
> -extern const uint64_t ff_pw_96;
> -extern const uint64_t ff_pw_128;
> -extern const ymm_reg ff_pw_255;
> -extern const ymm_reg ff_pw_256;
> -extern const ymm_reg ff_pw_512;
> -extern const ymm_reg ff_pw_1023;
> -extern const ymm_reg ff_pw_1024;
> -extern const ymm_reg ff_pw_2048;
> -extern const ymm_reg ff_pw_4095;
> -extern const ymm_reg ff_pw_4096;
> -extern const ymm_reg ff_pw_8192;
> -extern const ymm_reg ff_pw_m1;
> +extern const ymm_reg attribute_visibility_hidden ff_pw_1;
> +extern const ymm_reg attribute_visibility_hidden ff_pw_2;
> +extern const xmm_reg attribute_visibility_hidden ff_pw_3;
> +extern const ymm_reg attribute_visibility_hidden ff_pw_4;
> +extern const xmm_reg attribute_visibility_hidden ff_pw_5;
> +extern const xmm_reg attribute_visibility_hidden ff_pw_8;
> +extern const xmm_reg attribute_visibility_hidden ff_pw_9;
> +extern const uint64_t attribute_visibility_hidden ff_pw_15;
> +extern const xmm_reg attribute_visibility_hidden ff_pw_16;
> +extern const xmm_reg attribute_visibility_hidden ff_pw_18;
> +extern const xmm_reg attribute_visibility_hidden ff_pw_20;
> +extern const xmm_reg attribute_visibility_hidden ff_pw_32;
> +extern const uint64_t attribute_visibility_hidden ff_pw_42;
> +extern const uint64_t attribute_visibility_hidden ff_pw_53;
> +extern const xmm_reg attribute_visibility_hidden ff_pw_64;
> +extern const uint64_t attribute_visibility_hidden ff_pw_96;
> +extern const uint64_t attribute_visibility_hidden ff_pw_128;
> +extern const ymm_reg attribute_visibility_hidden ff_pw_255;
> +extern const ymm_reg attribute_visibility_hidden ff_pw_256;
> +extern const ymm_reg attribute_visibility_hidden ff_pw_512;
> +extern const ymm_reg attribute_visibility_hidden ff_pw_1023;
> +extern const ymm_reg attribute_visibility_hidden ff_pw_1024;
> +extern const ymm_reg attribute_visibility_hidden ff_pw_2048;
> +extern const ymm_reg attribute_visibility_hidden ff_pw_4095;
> +extern const ymm_reg attribute_visibility_hidden ff_pw_4096;
> +extern const ymm_reg attribute_visibility_hidden ff_pw_8192;
> +extern const ymm_reg attribute_visibility_hidden ff_pw_m1;
>
> -extern const ymm_reg ff_pb_0;
> -extern const ymm_reg ff_pb_1;
> -extern const ymm_reg ff_pb_2;
> -extern const ymm_reg ff_pb_3;
> -extern const ymm_reg ff_pb_80;
> -extern const ymm_reg ff_pb_FE;
> -extern const uint64_t ff_pb_FC;
> +extern const ymm_reg attribute_visibility_hidden ff_pb_0;
> +extern const ymm_reg attribute_visibility_hidden ff_pb_1;
> +extern const ymm_reg attribute_visibility_hidden ff_pb_2;
> +extern const ymm_reg attribute_visibility_hidden ff_pb_3;
> +extern const ymm_reg attribute_visibility_hidden ff_pb_80;
> +extern const ymm_reg attribute_visibility_hidden ff_pb_FE;
> +extern const uint64_t attribute_visibility_hidden ff_pb_FC;
>
> -extern const xmm_reg ff_ps_neg;
> +extern const xmm_reg attribute_visibility_hidden ff_ps_neg;
>
> -extern const ymm_reg ff_pd_1;
> -extern const ymm_reg ff_pd_16;
> -extern const ymm_reg ff_pd_32;
> -extern const ymm_reg ff_pd_8192;
> -extern const ymm_reg ff_pd_65535;
> +extern const ymm_reg attribute_visibility_hidden ff_pd_1;
> +extern const ymm_reg attribute_visibility_hidden ff_pd_16;
> +extern const ymm_reg attribute_visibility_hidden ff_pd_32;
> +extern const ymm_reg attribute_visibility_hidden ff_pd_8192;
> +extern const ymm_reg attribute_visibility_hidden ff_pd_65535;
>
This is total overkill; the visibility pragma exists for a reason.
> #endif /* AVCODEC_X86_CONSTANTS_H */
> diff --git a/libavutil/mem.h b/libavutil/mem.h
> index d91174196c..88fea4bfe7 100644
> --- a/libavutil/mem.h
> +++ b/libavutil/mem.h
> @@ -113,9 +113,9 @@
> #define DECLARE_ASM_ALIGNED(n,t,v) t av_used __attribute__ ((aligned (FFMIN(n, 16)))) v
> #define DECLARE_ASM_CONST(n,t,v) static const t av_used __attribute__ ((aligned (FFMIN(n, 16)))) v
> #elif defined(__GNUC__) || defined(__clang__)
> - #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v
> - #define DECLARE_ASM_ALIGNED(n,t,v) t av_used __attribute__ ((aligned (n))) v
> - #define DECLARE_ASM_CONST(n,t,v) static const t av_used __attribute__ ((aligned (n))) v
> + #define DECLARE_ALIGNED(n,t,v) attribute_visibility_hidden t __attribute__ ((aligned (n))) v
> + #define DECLARE_ASM_ALIGNED(n,t,v) attribute_visibility_hidden t av_used __attribute__ ((aligned (n))) v
> + #define DECLARE_ASM_CONST(n,t,v) attribute_visibility_hidden static const t av_used __attribute__ ((aligned (n))) v
You can't simply change the semantics of public defines; furthermore,
attribute_visibility_hidden should not be public. If these macros are to
be changed, then you need to modify mem.h to only define them in case
HAVE_AV_CONFIG_H is not defined (HAVE_AV_CONFIG_H is defined when
building our libraries). Then the macros from mem_internal.h will be
used and these can be modified.
(Furthermore, adding the attribute to DECLARE_ASM_CONST is pointless, as
it is already static.)
> #elif defined(_MSC_VER)
> #define DECLARE_ALIGNED(n,t,v) __declspec(align(n)) t v
> #define DECLARE_ASM_ALIGNED(n,t,v) __declspec(align(n)) t v
> diff --git a/libswscale/x86/rgb2rgb.c b/libswscale/x86/rgb2rgb.c
> index b325e5dbd5..100f608d04 100644
> --- a/libswscale/x86/rgb2rgb.c
> +++ b/libswscale/x86/rgb2rgb.c
> @@ -70,7 +70,7 @@ DECLARE_ASM_CONST(8, uint64_t, mul15_hi) = 0x0210021002100210ULL;
> DECLARE_ASM_CONST(8, uint64_t, mul16_mid) = 0x2080208020802080ULL;
>
> DECLARE_ALIGNED(8, extern const uint64_t, ff_bgr2YOffset);
> -DECLARE_ALIGNED(8, extern const uint64_t, ff_w1111);
> +attribute_visibility_hidden DECLARE_ALIGNED(8, extern const uint64_t, ff_w1111);
> DECLARE_ALIGNED(8, extern const uint64_t, ff_bgr2UVOffset);
>
> #define BY ((int)( 0.098*(1<<RGB2YUV_SHIFT)+0.5))
_______________________________________________
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".
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-04 12:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-27 12:00 [FFmpeg-devel] [PATCH 2/2] libavcodec: Set hidden visibility on global symbols accessed from x86_64 assembly Thomas Guillem
2022-08-04 11:20 ` Martin Storsjö
2022-08-04 12:51 ` Andreas Rheinhardt
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git