diff mbox series

[FFmpeg-devel,3/3] avcodec/fdctdsp: Mark functions as hidden

Message ID AS8P250MB0744ABFBF3747B23D3E05A4E8F02A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Headers show
Series [FFmpeg-devel] avcodec/(fft|mdct)_fixed_32: Remove fixed-point FFT/MDCT | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt July 24, 2023, 1:17 p.m. UTC
Pointers to these functions are used in comparisons.
Currently the compiler has to presume the worst for these,
namely that the functions are from another DSO and therefore
loads their addresses from the GOT (which also entails a
relocation entry that is processed at runtime, regardless
of whether the code using them is run or not). This changes
if these functions are declared as hidden.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/fdctdsp.h | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/libavcodec/fdctdsp.h b/libavcodec/fdctdsp.h
index 82edf8b3bb..9dc375322f 100644
--- a/libavcodec/fdctdsp.h
+++ b/libavcodec/fdctdsp.h
@@ -21,6 +21,7 @@ 
 
 #include <stdint.h>
 
+#include "libavutil/attributes_internal.h"
 #include "avcodec.h"
 
 typedef struct FDCTDSPContext {
@@ -28,6 +29,7 @@  typedef struct FDCTDSPContext {
     void (*fdct248)(int16_t *block /* align 16 */);
 } FDCTDSPContext;
 
+FF_VISIBILITY_PUSH_HIDDEN
 void ff_fdctdsp_init(FDCTDSPContext *c, AVCodecContext *avctx);
 void ff_fdctdsp_init_ppc(FDCTDSPContext *c, AVCodecContext *avctx,
                          unsigned high_bit_depth);
@@ -40,5 +42,6 @@  void ff_jpeg_fdct_islow_8(int16_t *data);
 void ff_jpeg_fdct_islow_10(int16_t *data);
 void ff_fdct248_islow_8(int16_t *data);
 void ff_fdct248_islow_10(int16_t *data);
+FF_VISIBILITY_POP_HIDDEN
 
 #endif /* AVCODEC_FDCTDSP_H */