From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Subject: [FFmpeg-devel] [PATCH 2/2] avcodec/vlc: Remove unused macros Date: Wed, 31 Jan 2024 10:31:18 +0100 Message-ID: <AS8P250MB0744030C5030D45F8A90C7FC8F7C2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw) In-Reply-To: <AS8P250MB074402F59F2937CF2086D57F8F7C2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- 1. This has already been sent months ago, but I didn't apply it because Peter Ross has sent patches that make use of them and I did not want to force him to adapt. 2. I do not rule out that there might be scenarios in the future where creating a static VLC (and not only VLCElem[]) would be useful, but this zoo of macros is nevertheless too much. There should be only two macros: One with symbols (i.e. "sparse") and one without, both having options for flags. libavcodec/vlc.h | 41 ----------------------------------------- 1 file changed, 41 deletions(-) diff --git a/libavcodec/vlc.h b/libavcodec/vlc.h index 679666801a..0cc106c499 100644 --- a/libavcodec/vlc.h +++ b/libavcodec/vlc.h @@ -185,47 +185,6 @@ void ff_vlc_free(VLC *vlc); #define VLC_INIT_OUTPUT_LE 8 #define VLC_INIT_LE (VLC_INIT_INPUT_LE | VLC_INIT_OUTPUT_LE) -#define VLC_INIT_CUSTOM_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, \ - h, i, j, flags, static_size) \ - do { \ - static VLCElem table[static_size]; \ - (vlc)->table = table; \ - (vlc)->table_allocated = static_size; \ - ff_vlc_init_sparse(vlc, bits, a, b, c, d, e, f, g, h, i, j, \ - flags | VLC_INIT_USE_STATIC); \ - } while (0) - -#define VLC_INIT_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, h, i, j, static_size) \ - VLC_INIT_CUSTOM_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, \ - h, i, j, 0, static_size) - -#define VLC_INIT_LE_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, h, i, j, static_size) \ - VLC_INIT_CUSTOM_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, \ - h, i, j, VLC_INIT_LE, static_size) - -#define VLC_INIT_CUSTOM_STATIC(vlc, bits, a, b, c, d, e, f, g, flags, static_size) \ - VLC_INIT_CUSTOM_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, \ - NULL, 0, 0, flags, static_size) - -#define VLC_INIT_STATIC(vlc, bits, a, b, c, d, e, f, g, static_size) \ - VLC_INIT_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, NULL, 0, 0, static_size) - -#define VLC_INIT_LE_STATIC(vlc, bits, a, b, c, d, e, f, g, static_size) \ - VLC_INIT_LE_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, NULL, 0, 0, static_size) - -#define VLC_INIT_STATIC_FROM_LENGTHS(vlc, bits, nb_codes, lens, len_wrap, \ - symbols, symbols_wrap, symbols_size, \ - offset, flags, static_size) \ - do { \ - static VLCElem table[static_size]; \ - (vlc)->table = table; \ - (vlc)->table_allocated = static_size; \ - ff_vlc_init_from_lengths(vlc, bits, nb_codes, lens, len_wrap, \ - symbols, symbols_wrap, symbols_size, \ - offset, flags | VLC_INIT_USE_STATIC, \ - NULL); \ - } while (0) - /** * For static VLCs, the number of bits can often be hardcoded * at each get_vlc2() callsite. Then using a full VLC would be uneconomical, -- 2.34.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".
next prev parent reply other threads:[~2024-01-31 9:29 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-01-31 9:27 [FFmpeg-devel] [PATCH 1/2] avcodec/leaddec: Remove unnecessary VLC structures Andreas Rheinhardt 2024-01-31 9:31 ` Andreas Rheinhardt [this message] 2024-02-02 11:30 ` 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=AS8P250MB0744030C5030D45F8A90C7FC8F7C2@AS8P250MB0744.EURP250.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