From patchwork Thu May 11 18:02:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 41584 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:dca6:b0:f3:34fa:f187 with SMTP id ky38csp4821743pzb; Thu, 11 May 2023 11:03:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5HRznHHUk4nufU7q3n8XFBsQgXPbDFwgWr4sAwQyhv7fv0BQorezLLSWoyTrehKL+YPUVC X-Received: by 2002:a17:907:7b8b:b0:962:ec98:cd75 with SMTP id ne11-20020a1709077b8b00b00962ec98cd75mr23024806ejc.67.1683828184486; Thu, 11 May 2023 11:03:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683828184; cv=none; d=google.com; s=arc-20160816; b=h1zKu6Aj7ndN/wXy3S8rF4FHYuRB9HWGxSLcpsDr95UZ4sIq3GpDkiIL5m6XTpHmBC Q1bVIzJk0bTRjx7y9FnLUJpm9kWNElerXqBoiPu5JEIgVCQlmKVCwZEOKADRtIftYpN1 Ga2KJhNXTiT8QzIWDq1Pi4hrKO26fbBgYojylF6zsGVf/VQhQxN6CfayDKGSkEcJ7pwS OUqt8eGdbM8bIpZKA5YW8ENWvZcyeecyTNStEVc2lzLbhIZ27uGSS+D0cfVyQCc6a2BI rFnSJHRGvhLRihpbNLg2KoRokO8M7o/+P1+y42NzIfTMO4aF0OeR7y7u22FsiQ3E46UD 4K+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=hjtD9jPLVd5zhm40Qky7+tZzMhF+3zyY7HGyQaFVofY=; b=aPKZLO3zH48nUOZ8H+UtiLy00uCFQc76RXbepIbc1uIfOK3M8omcobHBL1T5mIdUMg bezFFaw+GkUY/DX1TtoWtbBaxkgprY6U3hcVpM0tv9p5xGpzwz1b8YSFDS21O2M7sr1r 2dVUOi6aR3V9iutNWOQGCMtIKOPp85qtXIq+GIQ+RZmpxoriE4HVQ29HwfdYbpBXQEvc H4UWirlC2jqawPxIWvlDTpchoTSshfMiHSV5o94mx3QxB173tVSRkcwp3Sd3EAYi+Rws /YqixnR+4fFVKYhBQHsPRfxXdHR1tAVEjI0Rse2K+b8gZJji7+FG/kww5C6MdEqcP57Q Bo3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20221208 header.b=nAvNejjD; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id j26-20020a1709062a1a00b0094a365e00a6si5788537eje.883.2023.05.11.11.03.00; Thu, 11 May 2023 11:03:04 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20221208 header.b=nAvNejjD; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 62BA268C0C8; Thu, 11 May 2023 21:02:57 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ot1-f45.google.com (mail-ot1-f45.google.com [209.85.210.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 40D0268C091 for ; Thu, 11 May 2023 21:02:50 +0300 (EEST) Received: by mail-ot1-f45.google.com with SMTP id 46e09a7af769-6ab113d8589so3484538a34.3 for ; Thu, 11 May 2023 11:02:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683828168; x=1686420168; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=xTSE3cmMEGv7LdEi3eJD60fU08JJ0RxRb42PtUJipqg=; b=nAvNejjDr9olhYAemSl6IrdhoaiR+ec/AlDa+wmTLwUv2G8Vxpp1aF8BrasIcJZFmi +0/YqexNaiZKRLsX3snHlCcYI7h5Nkp2DxtWKNzG2vG74406c910uZx2sF0HMfy8JgQV LN40eTy6cvjnCTdaJ2E56Yd5DzOX9IoWRXMZP4nfd2yxUqqjdJCW8thiBCbpBTY+Ge8m +MDwaTQtnvYVUmEibtUSPe8MROxw8NwZgXM5dR2xJko+TXy5p8LjM0+s5SSAzNfLCh/E Zx0E9b3M7LuLVARzIhl5pewPqTRm/qnp9sw8CHhcAws/BfgSqsC9Sxmp8P1bAUlp9JPb lAYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683828168; x=1686420168; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xTSE3cmMEGv7LdEi3eJD60fU08JJ0RxRb42PtUJipqg=; b=jFGa6NIueTXpEzjEZKIF61QYZEjCIhL0ikbp+H+prXZlWnK79F4W/sAtgmK72BpJZQ oRjNStrj36ht6QU+3xDuvaXtJcjkgSTEIRariTWcUd/IUeWBzh7nCqM6VvWy8CM/FJv5 bBxd2hNpCnp2HNWWxlxAumiMvocrIHBD6R5D5k4uH4XEXVjArFHZac65bGEZ2lFxqc62 vlTDze+NyGP6Tss5Ujr6CDhFHxGjHN2ePgt5CKvSOd71sbH2yrITjjwKzVqumdvSnmBJ LgjZEvqrHd8gA44uQCZ5hCOvnLVhfAQ4tTMUTD15nNikjau63XZoARL/JmBXy1YNthr/ JYjw== X-Gm-Message-State: AC+VfDzhfkFKoi9+KmkvQm7K6kgw8nnlXVm9/SDFxdOtGDnKh4jIEidt 4WTrCbFgDsNEpp68Tsa2VRjNwP28n+w= X-Received: by 2002:a9d:7c9a:0:b0:6ab:148e:1b7a with SMTP id q26-20020a9d7c9a000000b006ab148e1b7amr5496023otn.15.1683828168209; Thu, 11 May 2023 11:02:48 -0700 (PDT) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id c5-20020a9d6c85000000b006aaf5785651sm5589618otr.42.2023.05.11.11.02.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 11:02:47 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Thu, 11 May 2023 15:02:15 -0300 Message-Id: <20230511180215.14940-1-jamrial@gmail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Subject: [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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: tjzf5MbNKWX8 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;