* [FFmpeg-devel] [PATCH 2/7] avcodec/ac3tab: Remove enum CustomChannelMapLocation
2024-03-13 23:07 [FFmpeg-devel] [PATCH 1/7] avformat/iamf: Mark symbols as hidden Andreas Rheinhardt
@ 2024-03-13 23:09 ` Andreas Rheinhardt
2024-03-13 23:09 ` [FFmpeg-devel] [PATCH 3/7] avdevice/alldevices: Mark devices as hidden Andreas Rheinhardt
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Andreas Rheinhardt @ 2024-03-13 23:09 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
Forgotten in 4c8d9b1d0901b0fba0887e53463574913e8862c5.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavcodec/ac3tab.h | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/libavcodec/ac3tab.h b/libavcodec/ac3tab.h
index 2531d80677..dcef643acb 100644
--- a/libavcodec/ac3tab.h
+++ b/libavcodec/ac3tab.h
@@ -45,22 +45,6 @@ extern const uint8_t ff_ac3_band_start_tab[AC3_CRITICAL_BANDS+1];
extern const uint8_t ff_ac3_bin_to_band_tab[253];
extern const uint64_t ff_eac3_custom_channel_map_locations[16][2];
-
-/** Custom channel map locations bitmask
- * Other channels described in documentation:
- * Lc/Rc pair, Lrs/Rrs pair, Ts, Lsd/Rsd pair,
- * Lw/Rw pair, Lvh/Rvh pair, Cvh, Reserved, LFE2
- */
-enum CustomChannelMapLocation{
- AC3_CHMAP_L= 1<<(15-0),
- AC3_CHMAP_C= 1<<(15-1),
- AC3_CHMAP_R= 1<<(15-2),
- AC3_CHMAP_L_SUR= 1<<(15-3),
- AC3_CHMAP_R_SUR = 1<<(15-4),
- AC3_CHMAP_C_SUR= 1<<(15-7),
- AC3_CHMAP_LFE = 1<<(15-15)
-};
-
#define COMMON_CHANNEL_MAP \
{ { 0, 1, }, { 0, 1, 2, } },\
{ { 0, }, { 0, 1, } },\
--
2.40.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] 8+ messages in thread
* [FFmpeg-devel] [PATCH 3/7] avdevice/alldevices: Mark devices as hidden
2024-03-13 23:07 [FFmpeg-devel] [PATCH 1/7] avformat/iamf: Mark symbols as hidden Andreas Rheinhardt
2024-03-13 23:09 ` [FFmpeg-devel] [PATCH 2/7] avcodec/ac3tab: Remove enum CustomChannelMapLocation Andreas Rheinhardt
@ 2024-03-13 23:09 ` Andreas Rheinhardt
2024-03-13 23:09 ` [FFmpeg-devel] [PATCH 4/7] avdevice/alldevices: Mark iterators as av_cold Andreas Rheinhardt
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Andreas Rheinhardt @ 2024-03-13 23:09 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
Both GCC and Clang create code that inlines the loops in
next_input() and next_output() at high optimization
levels (presumably when there are not too many devices)
and this code leads to the creation of .got entries:
e7: 48 3b 3d 00 00 00 00 cmp 0x0(%rip),%rdi # ee <av_input_video_device_next+0xe>
ea: R_X86_64_REX_GOTPCRELX ff_alsa_demuxer-0x4
ee: 74 43 je 133 <av_input_video_device_next+0x53>
f0: 48 3b 3d 00 00 00 00 cmp 0x0(%rip),%rdi # f7 <av_input_video_device_next+0x17>
f3: R_X86_64_REX_GOTPCRELX ff_fbdev_demuxer-0x4
f7: 74 41 je 13a <av_input_video_device_next+0x5a>
These relocations can't be fixed up lateron when it is known
that the symbols exist in the same DSO.
This commit therefore marks these symbols as hidden, leading
to code like this:
f7: 48 8d 05 00 00 00 00 lea 0x0(%rip),%rax # fe <av_input_video_device_next+0xe>
fa: R_X86_64_PC32 ff_alsa_demuxer-0x4
fe: 48 39 c7 cmp %rax,%rdi
101: 74 55 je 158 <av_input_video_device_next+0x68>
103: 48 8d 05 00 00 00 00 lea 0x0(%rip),%rax # 10a <av_input_video_device_next+0x1a>
106: R_X86_64_PC32 ff_fbdev_demuxer-0x4
10a: 48 39 c7 cmp %rax,%rdi
10d: 74 50 je 15f <av_input_video_device_next+0x6f>
(Note: It is actually strange that the compiler creates code
that tries to read the addresses from the .got given that the
addresses can be read directly from indev_list/outdev_list.)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavdevice/alldevices.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c
index 5ee97c56b6..6396076ecf 100644
--- a/libavdevice/alldevices.c
+++ b/libavdevice/alldevices.c
@@ -18,11 +18,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes_internal.h"
#include "libavformat/demux.h"
#include "libavformat/internal.h"
#include "libavformat/mux.h"
#include "avdevice.h"
+FF_VISIBILITY_PUSH_HIDDEN
/* devices */
extern const FFInputFormat ff_alsa_demuxer;
extern const FFOutputFormat ff_alsa_muxer;
@@ -59,6 +61,7 @@ extern const FFOutputFormat ff_xv_muxer;
/* external libraries */
extern const FFInputFormat ff_libcdio_demuxer;
extern const FFInputFormat ff_libdc1394_demuxer;
+FF_VISIBILITY_POP_HIDDEN
#include "libavdevice/outdev_list.c"
#include "libavdevice/indev_list.c"
--
2.40.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] 8+ messages in thread
* [FFmpeg-devel] [PATCH 4/7] avdevice/alldevices: Mark iterators as av_cold
2024-03-13 23:07 [FFmpeg-devel] [PATCH 1/7] avformat/iamf: Mark symbols as hidden Andreas Rheinhardt
2024-03-13 23:09 ` [FFmpeg-devel] [PATCH 2/7] avcodec/ac3tab: Remove enum CustomChannelMapLocation Andreas Rheinhardt
2024-03-13 23:09 ` [FFmpeg-devel] [PATCH 3/7] avdevice/alldevices: Mark devices as hidden Andreas Rheinhardt
@ 2024-03-13 23:09 ` Andreas Rheinhardt
2024-03-13 23:09 ` [FFmpeg-devel] [PATCH 5/7] avcodec/dirac_arith: Only include x86/asm.h for ARCH_X86 Andreas Rheinhardt
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Andreas Rheinhardt @ 2024-03-13 23:09 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
Because they are.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavdevice/alldevices.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c
index 6396076ecf..9b9a9146c7 100644
--- a/libavdevice/alldevices.c
+++ b/libavdevice/alldevices.c
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/attributes_internal.h"
#include "libavformat/demux.h"
#include "libavformat/internal.h"
@@ -66,12 +67,12 @@ FF_VISIBILITY_POP_HIDDEN
#include "libavdevice/outdev_list.c"
#include "libavdevice/indev_list.c"
-void avdevice_register_all(void)
+av_cold void avdevice_register_all(void)
{
avpriv_register_devices(outdev_list, indev_list);
}
-static const void *next_input(const AVInputFormat *prev, AVClassCategory c2)
+static av_cold const void *next_input(const AVInputFormat *prev, AVClassCategory c2)
{
const AVClass *pc;
const AVClassCategory c1 = AV_CLASS_CATEGORY_DEVICE_INPUT;
@@ -97,7 +98,7 @@ static const void *next_input(const AVInputFormat *prev, AVClassCategory c2)
return fmt;
}
-static const void *next_output(const AVOutputFormat *prev, AVClassCategory c2)
+static av_cold const void *next_output(const AVOutputFormat *prev, AVClassCategory c2)
{
const AVClass *pc;
const AVClassCategory c1 = AV_CLASS_CATEGORY_DEVICE_OUTPUT;
@@ -123,22 +124,22 @@ static const void *next_output(const AVOutputFormat *prev, AVClassCategory c2)
return fmt;
}
-const AVInputFormat *av_input_audio_device_next(const AVInputFormat *d)
+av_cold const AVInputFormat *av_input_audio_device_next(const AVInputFormat *d)
{
return next_input(d, AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT);
}
-const AVInputFormat *av_input_video_device_next(const AVInputFormat *d)
+av_cold const AVInputFormat *av_input_video_device_next(const AVInputFormat *d)
{
return next_input(d, AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT);
}
-const AVOutputFormat *av_output_audio_device_next(const AVOutputFormat *d)
+av_cold const AVOutputFormat *av_output_audio_device_next(const AVOutputFormat *d)
{
return next_output(d, AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT);
}
-const AVOutputFormat *av_output_video_device_next(const AVOutputFormat *d)
+av_cold const AVOutputFormat *av_output_video_device_next(const AVOutputFormat *d)
{
return next_output(d, AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT);
}
--
2.40.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] 8+ messages in thread
* [FFmpeg-devel] [PATCH 5/7] avcodec/dirac_arith: Only include x86/asm.h for ARCH_X86
2024-03-13 23:07 [FFmpeg-devel] [PATCH 1/7] avformat/iamf: Mark symbols as hidden Andreas Rheinhardt
` (2 preceding siblings ...)
2024-03-13 23:09 ` [FFmpeg-devel] [PATCH 4/7] avdevice/alldevices: Mark iterators as av_cold Andreas Rheinhardt
@ 2024-03-13 23:09 ` Andreas Rheinhardt
2024-03-13 23:09 ` [FFmpeg-devel] [PATCH 6/7] avcodec/vorbis_data: Mark symbols as hidden Andreas Rheinhardt
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Andreas Rheinhardt @ 2024-03-13 23:09 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavcodec/dirac_arith.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/dirac_arith.h b/libavcodec/dirac_arith.h
index 350a58fca6..203d481603 100644
--- a/libavcodec/dirac_arith.h
+++ b/libavcodec/dirac_arith.h
@@ -28,7 +28,11 @@
#ifndef AVCODEC_DIRAC_ARITH_H
#define AVCODEC_DIRAC_ARITH_H
+#include "config.h"
+
+#if ARCH_X86
#include "libavutil/x86/asm.h"
+#endif
#include "bytestream.h"
#include "get_bits.h"
--
2.40.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] 8+ messages in thread
* [FFmpeg-devel] [PATCH 6/7] avcodec/vorbis_data: Mark symbols as hidden
2024-03-13 23:07 [FFmpeg-devel] [PATCH 1/7] avformat/iamf: Mark symbols as hidden Andreas Rheinhardt
` (3 preceding siblings ...)
2024-03-13 23:09 ` [FFmpeg-devel] [PATCH 5/7] avcodec/dirac_arith: Only include x86/asm.h for ARCH_X86 Andreas Rheinhardt
@ 2024-03-13 23:09 ` Andreas Rheinhardt
2024-03-13 23:09 ` [FFmpeg-devel] [PATCH 7/7] avcodec/mpegaudio(data|dsp): " Andreas Rheinhardt
2024-03-16 19:33 ` [FFmpeg-devel] [PATCH 1/7] avformat/iamf: " Andreas Rheinhardt
6 siblings, 0 replies; 8+ messages in thread
From: Andreas Rheinhardt @ 2024-03-13 23:09 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
Avoids .got entries for ff_vorbis_ch_layouts.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavcodec/vorbis_data.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/vorbis_data.h b/libavcodec/vorbis_data.h
index 51c91c9e04..327e5ab2ef 100644
--- a/libavcodec/vorbis_data.h
+++ b/libavcodec/vorbis_data.h
@@ -21,11 +21,14 @@
#include <stdint.h>
+#include "libavutil/attributes_internal.h"
#include "libavutil/channel_layout.h"
+FF_VISIBILITY_PUSH_HIDDEN
extern const float ff_vorbis_floor1_inverse_db_table[256];
extern const float * const ff_vorbis_vwin[8];
extern const uint8_t ff_vorbis_channel_layout_offsets[8][8];
extern const AVChannelLayout ff_vorbis_ch_layouts[9];
+FF_VISIBILITY_POP_HIDDEN
#endif /* AVCODEC_VORBIS_DATA_H */
--
2.40.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] 8+ messages in thread
* [FFmpeg-devel] [PATCH 7/7] avcodec/mpegaudio(data|dsp): Mark symbols as hidden
2024-03-13 23:07 [FFmpeg-devel] [PATCH 1/7] avformat/iamf: Mark symbols as hidden Andreas Rheinhardt
` (4 preceding siblings ...)
2024-03-13 23:09 ` [FFmpeg-devel] [PATCH 6/7] avcodec/vorbis_data: Mark symbols as hidden Andreas Rheinhardt
@ 2024-03-13 23:09 ` Andreas Rheinhardt
2024-03-16 19:33 ` [FFmpeg-devel] [PATCH 1/7] avformat/iamf: " Andreas Rheinhardt
6 siblings, 0 replies; 8+ messages in thread
From: Andreas Rheinhardt @ 2024-03-13 23:09 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
Avoids .got entries for ff_mpa_bitrate_tab, ff_mpa_synth_window_fixed,
ff_band_size_long, ff_mpa_pretab, ff_band_size_short,
ff_mpa_synth_window_float and ff_band_index_long here.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavcodec/mpegaudiodata.h | 3 +++
libavcodec/mpegaudiodsp.h | 3 +++
2 files changed, 6 insertions(+)
diff --git a/libavcodec/mpegaudiodata.h b/libavcodec/mpegaudiodata.h
index fbad67a0b3..720c4bee64 100644
--- a/libavcodec/mpegaudiodata.h
+++ b/libavcodec/mpegaudiodata.h
@@ -31,11 +31,13 @@
#include "config.h"
+#include "libavutil/attributes_internal.h"
#include "vlc.h"
#define MODE_EXT_MS_STEREO 2
#define MODE_EXT_I_STEREO 1
+FF_VISIBILITY_PUSH_HIDDEN
extern const uint16_t ff_mpa_bitrate_tab[2][3][15];
extern const uint16_t ff_mpa_freq_tab[3];
extern const int ff_mpa_sblimit_table[5];
@@ -78,5 +80,6 @@ extern const uint8_t ff_mpa_pretab[2][22];
/* Initialize tables shared between the fixed and
* floating point MPEG audio decoders. */
void ff_mpegaudiodec_common_init_static(void);
+FF_VISIBILITY_POP_HIDDEN
#endif /* AVCODEC_MPEGAUDIODATA_H */
diff --git a/libavcodec/mpegaudiodsp.h b/libavcodec/mpegaudiodsp.h
index 7bc635191a..5e47a263bb 100644
--- a/libavcodec/mpegaudiodsp.h
+++ b/libavcodec/mpegaudiodsp.h
@@ -22,6 +22,7 @@
#include <stddef.h>
#include <stdint.h>
+#include "libavutil/attributes_internal.h"
#include "libavutil/macros.h"
typedef struct MPADSPContext {
@@ -40,6 +41,7 @@ typedef struct MPADSPContext {
int count, int switch_point, int block_type);
} MPADSPContext;
+FF_VISIBILITY_PUSH_HIDDEN
void ff_mpadsp_init(MPADSPContext *s);
extern int32_t ff_mpa_synth_window_fixed[];
@@ -88,5 +90,6 @@ void ff_imdct36_blocks_fixed(int *out, int *buf, int *in,
extern int ff_mdct_win_fixed[8][MDCT_BUF_SIZE];
extern float ff_mdct_win_float[8][MDCT_BUF_SIZE];
+FF_VISIBILITY_POP_HIDDEN
#endif /* AVCODEC_MPEGAUDIODSP_H */
--
2.40.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] 8+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/7] avformat/iamf: Mark symbols as hidden
2024-03-13 23:07 [FFmpeg-devel] [PATCH 1/7] avformat/iamf: Mark symbols as hidden Andreas Rheinhardt
` (5 preceding siblings ...)
2024-03-13 23:09 ` [FFmpeg-devel] [PATCH 7/7] avcodec/mpegaudio(data|dsp): " Andreas Rheinhardt
@ 2024-03-16 19:33 ` Andreas Rheinhardt
6 siblings, 0 replies; 8+ messages in thread
From: Andreas Rheinhardt @ 2024-03-16 19:33 UTC (permalink / raw)
To: ffmpeg-devel
Andreas Rheinhardt:
> Avoids .got entries for ff_iamf_scalable_ch_layouts and
> ff_iamf_sound_system_map (whether they would have been
> created otherwise depends upon the compiler and compiler
> options).
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
> libavformat/iamf.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/libavformat/iamf.h b/libavformat/iamf.h
> index d662f6e76b..68f05c635b 100644
> --- a/libavformat/iamf.h
> +++ b/libavformat/iamf.h
> @@ -25,6 +25,7 @@
> #include <stddef.h>
> #include <stdint.h>
>
> +#include "libavutil/attributes_internal.h"
> #include "libavutil/channel_layout.h"
> #include "libavutil/iamf.h"
> #include "libavcodec/codec_id.h"
> @@ -162,6 +163,7 @@ struct IAMFSoundSystemMap {
> AVChannelLayout layout;
> };
>
> +FF_VISIBILITY_PUSH_HIDDEN
> extern const AVChannelLayout ff_iamf_scalable_ch_layouts[10];
> extern const struct IAMFSoundSystemMap ff_iamf_sound_system_map[13];
>
> @@ -195,5 +197,6 @@ static inline IAMFParamDefinition *ff_iamf_get_param_definition(const IAMFContex
> void ff_iamf_free_audio_element(IAMFAudioElement **paudio_element);
> void ff_iamf_free_mix_presentation(IAMFMixPresentation **pmix_presentation);
> void ff_iamf_uninit_context(IAMFContext *c);
> +FF_VISIBILITY_POP_HIDDEN
>
> #endif /* AVFORMAT_IAMF_H */
Will apply this patchset tomorrow unless there are objections.
- Andreas
_______________________________________________
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] 8+ messages in thread