From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH 04/11] avcodec/ac3tab: Unavpriv ac3_channel_layout_tab Date: Fri, 31 Dec 2021 14:28:23 +0100 Message-ID: <AM7PR03MB6660394328AE910E51F5187B8F469@AM7PR03MB6660.eurprd03.prod.outlook.com> (raw) In-Reply-To: <164085916638.2375.6835847434776821902@lain.red.khirnov.net> Anton Khirnov: > Quoting Andreas Rheinhardt (2021-12-15 13:35:34) >> It is small (16 B) and therefore the overhead of exporting it more >> than outweighs the size savings from not having duplicated symbols: >> When the symbol is no longer avpriv, one saves twice the size of >> the string containing the symbols name (2x30 byte), two entries >> in .dynsym (24 bytes each on x64), one entry in the importing libraries >> .got and .rela.dyn (8 + 24 bytes on x64) and two entries for the >> symbol version (2 bytes each) and one hash value in the exporting >> library (4 bytes). >> (The exact numbers are of course different for other platforms >> (e.g. when using dlls), but given that the strings saved alone >> more than outweigh the array size it can be presumed that this >> is beneficial for all platforms.) >> >> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> >> --- >> libavcodec/Makefile | 12 +++++--- >> libavcodec/ac3_channel_layout_tab.c | 22 +++++++++++++++ >> libavcodec/ac3_channel_layout_tab.h | 41 ++++++++++++++++++++++++++++ >> libavcodec/ac3_parser.c | 2 +- >> libavcodec/ac3dec.c | 4 +-- >> libavcodec/ac3enc.h | 1 + >> libavcodec/ac3tab.c | 14 ---------- >> libavcodec/ac3tab.h | 4 +-- >> libavcodec/eac3_data.c | 2 ++ >> libavformat/Makefile | 2 ++ >> libavformat/ac3_channel_layout_tab.c | 22 +++++++++++++++ >> libavformat/hls_sample_encryption.c | 4 ++- >> libavformat/mov.c | 4 +-- >> 13 files changed, 107 insertions(+), 27 deletions(-) >> create mode 100644 libavcodec/ac3_channel_layout_tab.c >> create mode 100644 libavcodec/ac3_channel_layout_tab.h >> create mode 100644 libavformat/ac3_channel_layout_tab.c >> >> diff --git a/libavcodec/ac3enc.h b/libavcodec/ac3enc.h >> index ec9ead8a4e..39a41fe0b0 100644 >> --- a/libavcodec/ac3enc.h >> +++ b/libavcodec/ac3enc.h >> @@ -35,6 +35,7 @@ >> #include "ac3dsp.h" >> #include "avcodec.h" >> #include "fft.h" >> +#include "internal.h" > > ? Before this commit, ac3tab.h included internal.h for av_export_avcodec and ac3enc.h indirectly includes ac3tab.h via ac3.h. Yet ac3enc.h provides ff_ac3_enc_defaults of type AVCodecDefaults. This type is defined in internal.h, so ac3enc.h should properly include internal.h. > >> diff --git a/libavcodec/eac3_data.c b/libavcodec/eac3_data.c >> index b159e1682f..2ef0e2053c 100644 >> --- a/libavcodec/eac3_data.c >> +++ b/libavcodec/eac3_data.c >> @@ -24,6 +24,8 @@ >> * Tables taken directly from the E-AC-3 spec. >> */ >> >> +#include <stddef.h> > > ?? This file has a NULL which it got implicitly via internal.h included by ac3tab.h (yes, really). This has been changed, so this header needs to be added. > >> diff --git a/libavformat/hls_sample_encryption.c b/libavformat/hls_sample_encryption.c >> index 38795c7fb0..3dbaff717e 100644 >> --- a/libavformat/hls_sample_encryption.c >> +++ b/libavformat/hls_sample_encryption.c >> @@ -26,6 +26,8 @@ >> * https://developer.apple.com/library/ios/documentation/AudioVideo/Conceptual/HLS_Sample_Encryption >> */ >> >> +#include "libavutil/channel_layout.h" This header (which uses e.g. AV_CH_LOW_FREQUENCY and av_get_channel_layout_nb_channels()) is currently implicitly included via libavcodec/internal.h included by ac3tab.h. > > ??? > _______________________________________________ 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".
next prev parent reply other threads:[~2021-12-31 13:28 UTC|newest] Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-15 12:29 [FFmpeg-devel] [PATCH 01/11] avcodec/Makefile: Remove superfluous avformat->DNXHD dependencies Andreas Rheinhardt 2021-12-15 12:35 ` [FFmpeg-devel] [PATCH 02/11] avcodec/raw: Reduce number of avpriv symbols Andreas Rheinhardt 2021-12-20 15:03 ` Andreas Rheinhardt 2021-12-30 9:55 ` Anton Khirnov 2022-01-03 5:33 ` Andreas Rheinhardt 2022-01-03 10:38 ` Andreas Rheinhardt 2021-12-15 12:35 ` [FFmpeg-devel] [PATCH 03/11] Makefile: Redo duplicating object files in shared builds Andreas Rheinhardt 2021-12-15 12:35 ` [FFmpeg-devel] [PATCH 04/11] avcodec/ac3tab: Unavpriv ac3_channel_layout_tab Andreas Rheinhardt 2021-12-30 10:12 ` Anton Khirnov 2021-12-31 13:28 ` Andreas Rheinhardt [this message] 2021-12-15 12:35 ` [FFmpeg-devel] [PATCH 05/11] avcodec/dca: Unavpriv dca_sample_rates Andreas Rheinhardt 2021-12-15 12:35 ` [FFmpeg-devel] [PATCH 06/11] avcodec/jpegtables: Unavpriv MJPEG-tables Andreas Rheinhardt 2021-12-15 12:35 ` [FFmpeg-devel] [PATCH 07/11] configure, avcodec/Makefile: Add new mpeg4audio CONFIG_EXTRA group Andreas Rheinhardt 2021-12-15 12:35 ` [FFmpeg-devel] [PATCH 08/11] avcodec/mpeg4audio: Unavpriv and deduplicate mpeg4audio_sample_rates Andreas Rheinhardt 2021-12-15 12:35 ` [FFmpeg-devel] [PATCH 09/11] avcodec/mpegaudiodata: Unavpriv mpa_bitrate and mpa_frequency tabs Andreas Rheinhardt 2021-12-15 12:35 ` [FFmpeg-devel] [PATCH 10/11] avcodec/internal: Remove unused av_export_avcodec Andreas Rheinhardt 2021-12-15 12:35 ` [FFmpeg-devel] [PATCH 11/11] avcodec/utils: Unavpriv avpriv_toupper4() Andreas Rheinhardt 2021-12-16 1:29 ` [FFmpeg-devel] [PATCH 12/15] avformat/(aiff|flac|mov|mp3|tta)enc: Don't create unnecessary references Andreas Rheinhardt 2021-12-16 1:29 ` [FFmpeg-devel] [PATCH 13/15] avformat/mux, mxfenc: Don't use sizeof(AVPacket) Andreas Rheinhardt 2021-12-21 13:52 ` Tomas Härdin 2021-12-16 1:29 ` [FFmpeg-devel] [PATCH 14/15] avcodec/packet_internal: Add proper PacketList struct Andreas Rheinhardt 2021-12-16 1:29 ` [FFmpeg-devel] [PATCH 15/15] avformat/movenc: Use dedicated pointer for access to MOVTrack Andreas Rheinhardt 2021-12-17 22:52 ` [FFmpeg-devel] [PATCH 01/11] avcodec/Makefile: Remove superfluous avformat->DNXHD dependencies Andreas Rheinhardt
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=AM7PR03MB6660394328AE910E51F5187B8F469@AM7PR03MB6660.eurprd03.prod.outlook.com \ --to=andreas.rheinhardt@outlook.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
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