From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 2EBCF462E7 for ; Thu, 11 May 2023 18:32:40 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 85F2D68C103; Thu, 11 May 2023 21:32:37 +0300 (EEST) Received: from mail-ot1-f46.google.com (mail-ot1-f46.google.com [209.85.210.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2754768C036 for ; Thu, 11 May 2023 21:32:31 +0300 (EEST) Received: by mail-ot1-f46.google.com with SMTP id 46e09a7af769-6aafdeab6b0so3920278a34.0 for ; Thu, 11 May 2023 11:32:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683829949; x=1686421949; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=kXopgh/8pTtNMtrBivxP0uAo9RY0uwB5de3zdXbX57w=; b=FUe4SIINxqm8pDQxrcovd1SvJzwak77bQs5PFLYDPN2ukGJG9uxx3ue+nf37iiXz7D O0NC8n2xbifGCcd5Sbda8A/0Z6VUZr8TJFcryRaUX65paFKnLkt2EUEAOYt57XdJQATj zNyISB0FmnO9jXuhXkFkehctHgz6nJaK094Y5ojWnpvmAMD3HdkT3JagdypZ+1c4QrRa HDmdr6Cml54mg1Ew0qASb2ECh047+GfrOI2TOy+CFni65mVGPjEW3x7PpwTkTc25q7Ns u0mC6NsqtLHW8q+ovgax0tOlM02R8FH33cbVfpGTJJAMpF0duqn1w86GsbY/a/zysi29 KPWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683829949; x=1686421949; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kXopgh/8pTtNMtrBivxP0uAo9RY0uwB5de3zdXbX57w=; b=NY4MG9EF4nkPb384DCYeQDQSt/8f3gBEoDMcCuwtZMNij+EbCstEWu4izATDrJnM0n cMA9QNBcpvYQMeKZT+/gJa/e2aWyCwxrItbtnC7iiyXT2rhLOtPQrQiiZPsDf5CEhm63 AOnX9xUfLhJ4C3Y1Nfjsx1e33q+DIS8Cbb7/MmLl4CBg4E/E/N2N2z04x89cUSkhkMh5 5n1hE5yD70qsFfTI5DIKRv8zb8f0jHVb84n+ZpmJKz/mO4SsHgFuVWtd/ty4G6XCeJvN g6lQEZ4zYaoWb00Ny6ytOn+Vur2EvSFWLGtQTNlaxdYHQpCc4J7ibtYIZdBf2mJIrp2v 7jpQ== X-Gm-Message-State: AC+VfDxVr4Ue3dd9mq1NtBKs7xrcFlc0QFI1VYjbFTk7RHERmdVgAywg wo9I3hEVQ7EdpIA0m0I9Zqee+fTPL/M= X-Google-Smtp-Source: ACHHUZ4QzmUlf5oFju8Gd1sRAp9FzYHBeUPkO0eN8zGfRdjA7Fz7sRSHVRDTpmP/m33H9miqBpBCgg== X-Received: by 2002:a05:6870:4404:b0:196:5d33:9533 with SMTP id u4-20020a056870440400b001965d339533mr3096973oah.17.1683829949003; Thu, 11 May 2023 11:32:29 -0700 (PDT) Received: from [192.168.0.12] (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id j2-20020a056870530200b0017f647294f5sm8321747oan.16.2023.05.11.11.32.28 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 May 2023 11:32:28 -0700 (PDT) Message-ID: Date: Thu, 11 May 2023 15:32:26 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20230511180215.14940-1-jamrial@gmail.com> From: James Almer In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH] avcodec/eac3dec: remove function duplicates X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 5/11/2023 3:16 PM, Andreas Rheinhardt wrote: > James Almer: >> Thee are not part of the float/fixed ac3 template distinction. >> >> Signed-off-by: James Almer >> --- >> 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; > > Won't this uninline functions needlessly in the float case? Yes. It's all also included and inlined in ac3dec_fixed.o, afaict, even if there's only a float eac3 decoder (header parsing needs to happen anyway). Wouldn't uninlining it be preferable to binary bloating? _______________________________________________ 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".