From: James Almer <jamrial@gmail.com> To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH] avcodec/eac3dec: remove function duplicates Date: Thu, 11 May 2023 15:02:15 -0300 Message-ID: <20230511180215.14940-1-jamrial@gmail.com> (raw) Thee are not part of the float/fixed ac3 template distinction. Signed-off-by: James Almer <jamrial@gmail.com> --- libavcodec/Makefile | 2 +- libavcodec/ac3dec.h | 6 +++--- libavcodec/ac3dec_fixed.c | 1 - libavcodec/ac3dec_float.c | 1 - libavcodec/eac3dec.c | 6 +++--- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 3cf4444b7e..deaf233021 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -336,7 +336,7 @@ OBJS-$(CONFIG_DVVIDEO_ENCODER) += dvenc.o dv.o dvdata.o OBJS-$(CONFIG_DXA_DECODER) += dxa.o OBJS-$(CONFIG_DXTORY_DECODER) += dxtory.o OBJS-$(CONFIG_DXV_DECODER) += dxv.o -OBJS-$(CONFIG_EAC3_DECODER) += eac3_data.o +OBJS-$(CONFIG_EAC3_DECODER) += eac3dec.o eac3_data.o OBJS-$(CONFIG_EAC3_ENCODER) += eac3enc.o eac3_data.o OBJS-$(CONFIG_EACMV_DECODER) += eacmv.o OBJS-$(CONFIG_EAMAD_DECODER) += eamad.o eaidct.o mpeg12.o \ diff --git a/libavcodec/ac3dec.h b/libavcodec/ac3dec.h index 98de7b5abf..99729adf0d 100644 --- a/libavcodec/ac3dec.h +++ b/libavcodec/ac3dec.h @@ -259,20 +259,20 @@ typedef struct AC3DecodeContext { * Parse the E-AC-3 frame header. * This parses both the bit stream info and audio frame header. */ -static int ff_eac3_parse_header(AC3DecodeContext *s); +int ff_eac3_parse_header(AC3DecodeContext *s); /** * Decode mantissas in a single channel for the entire frame. * This is used when AHT mode is enabled. */ -static void ff_eac3_decode_transform_coeffs_aht_ch(AC3DecodeContext *s, int ch); +void ff_eac3_decode_transform_coeffs_aht_ch(AC3DecodeContext *s, int ch); /** * Apply spectral extension to each channel by copying lower frequency * coefficients to higher frequency bins and applying side information to * approximate the original high frequency signal. */ -static void ff_eac3_apply_spectral_extension(AC3DecodeContext *s); +void ff_eac3_apply_spectral_extension(AC3DecodeContext *s); #if (!USE_FIXED) extern float ff_ac3_heavy_dynamic_range_tab[256]; diff --git a/libavcodec/ac3dec_fixed.c b/libavcodec/ac3dec_fixed.c index c9e5cda69c..0909c363f2 100644 --- a/libavcodec/ac3dec_fixed.c +++ b/libavcodec/ac3dec_fixed.c @@ -152,7 +152,6 @@ static void ac3_downmix_c_fixed16(int16_t **samples, int16_t **matrix, } } -#include "eac3dec.c" #include "ac3dec.c" static const AVOption options[] = { diff --git a/libavcodec/ac3dec_float.c b/libavcodec/ac3dec_float.c index 39d3cbd282..9756829643 100644 --- a/libavcodec/ac3dec_float.c +++ b/libavcodec/ac3dec_float.c @@ -34,7 +34,6 @@ #include "ac3dec.h" #include "codec_internal.h" #include "profiles.h" -#include "eac3dec.c" #include "ac3dec.c" static const AVOption options[] = { diff --git a/libavcodec/eac3dec.c b/libavcodec/eac3dec.c index 5c71751a0c..491f663d3e 100644 --- a/libavcodec/eac3dec.c +++ b/libavcodec/eac3dec.c @@ -55,7 +55,7 @@ typedef enum { #define EAC3_SR_CODE_REDUCED 3 -static void ff_eac3_apply_spectral_extension(AC3DecodeContext *s) +void ff_eac3_apply_spectral_extension(AC3DecodeContext *s) { int bin, bnd, ch, i; uint8_t wrapflag[SPX_MAX_BANDS]={1,0,}, num_copy_sections, copy_sizes[SPX_MAX_BANDS]; @@ -194,7 +194,7 @@ static void idct6(int pre_mant[6]) pre_mant[5] = even0 - odd0; } -static void ff_eac3_decode_transform_coeffs_aht_ch(AC3DecodeContext *s, int ch) +void ff_eac3_decode_transform_coeffs_aht_ch(AC3DecodeContext *s, int ch) { int bin, blk, gs; int end_bap, gaq_mode; @@ -287,7 +287,7 @@ static void ff_eac3_decode_transform_coeffs_aht_ch(AC3DecodeContext *s, int ch) } } -static int ff_eac3_parse_header(AC3DecodeContext *s) +int ff_eac3_parse_header(AC3DecodeContext *s) { int i, blk, ch; int ac3_exponent_strategy, parse_aht_info, parse_spx_atten_data; -- 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".
next reply other threads:[~2023-05-11 18:02 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-05-11 18:02 James Almer [this message] 2023-05-11 18:16 ` Andreas Rheinhardt 2023-05-11 18:32 ` James Almer
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=20230511180215.14940-1-jamrial@gmail.com \ --to=jamrial@gmail.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