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 ESMTPS id EBAA94C7C2 for ; Sat, 8 Feb 2025 05:32:34 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 322E868B992; Sat, 8 Feb 2025 07:32:31 +0200 (EET) Received: from vidala.pars.ee (vidala.pars.ee [116.203.72.101]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 76C4E68B9A9 for ; Sat, 8 Feb 2025 07:32:24 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; s=202405r; d=lynne.ee; c=relaxed/relaxed; h=Message-ID:Date:Subject:To:From; t=1738992743; bh=UvGlTAKWYkHrDlGy6AMWxZU skCCOEY7M1Oyg8D41I0k=; b=ACLgpsnTy3SRQFAQK9qBen0u6drpdid+q3wluVCBKmaPNWc7yg m9WJC3dpN8DgoUOgUHZPULwjh8GMx52Obh5bOPJn5iUY5g60Gm3UdN1yeG7ADkhafyuojtws7rz ns9Cf3/kRSOz6qP6fQe/zGKzJJeKcL2xITJcj5l+E7w39zQxTmhu1D/vz0sQF5t0IYrMsDT4VMB 1fUdzLf+SZhpRKysgDOsciZSKBaTF0SEJciPfoZqQ47ZLctVKVbYMt56m9Vi2QmqzXRBm4334oP HUR2Q88kTJi+nhUTw8HJkFGzkDZFB5Rdqyvkiv5LVahWfxmXjFqigOXtL5tGQMtIovg==; DKIM-Signature: v=1; a=ed25519-sha256; s=202405e; d=lynne.ee; c=relaxed/relaxed; h=Message-ID:Date:Subject:To:From; t=1738992743; bh=UvGlTAKWYkHrDlGy6AMWxZU skCCOEY7M1Oyg8D41I0k=; b=IFGqoIz2AaKTpLTEOCM2CLO31xSuniFypsUYbIT8vZAz01g2cL oEzGnTMb2ymFgizgZWvx/gsOiVfBLWwl0pBw==; From: Lynne To: ffmpeg-devel@ffmpeg.org Date: Sat, 8 Feb 2025 06:32:12 +0100 Message-ID: <20250208053216.314838-1-dev@lynne.ee> X-Mailer: git-send-email 2.47.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] aacenc: move to libavcodec/aac/ 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 Cc: Lynne Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: The decoder was already moved there. --- libavcodec/Makefile | 5 +- libavcodec/aac/Makefile | 2 + libavcodec/{ => aac}/aaccoder.c | 0 libavcodec/aac/aaccoder.h | 46 +++++++++++++++++++ libavcodec/{ => aac}/aaccoder_twoloop.h | 0 libavcodec/{ => aac}/aacenc.c | 0 libavcodec/{ => aac}/aacenc.h | 0 libavcodec/{ => aac}/aacenc_is.c | 0 libavcodec/{ => aac}/aacenc_is.h | 0 libavcodec/{ => aac}/aacenc_quantization.h | 0 .../{ => aac}/aacenc_quantization_misc.h | 0 libavcodec/{ => aac}/aacenc_tns.c | 0 libavcodec/{ => aac}/aacenc_tns.h | 0 libavcodec/{ => aac}/aacenc_utils.h | 0 libavcodec/{ => aac}/aacencdsp.h | 0 libavcodec/{ => aac}/aacenctab.c | 0 libavcodec/{ => aac}/aacenctab.h | 0 libavcodec/aarch64/aacencdsp_init.c | 2 +- libavcodec/riscv/aacencdsp_init.c | 2 +- libavcodec/x86/aacencdsp_init.c | 2 +- tests/checkasm/aacencdsp.c | 4 +- 21 files changed, 54 insertions(+), 9 deletions(-) rename libavcodec/{ => aac}/aaccoder.c (100%) create mode 100644 libavcodec/aac/aaccoder.h rename libavcodec/{ => aac}/aaccoder_twoloop.h (100%) rename libavcodec/{ => aac}/aacenc.c (100%) rename libavcodec/{ => aac}/aacenc.h (100%) rename libavcodec/{ => aac}/aacenc_is.c (100%) rename libavcodec/{ => aac}/aacenc_is.h (100%) rename libavcodec/{ => aac}/aacenc_quantization.h (100%) rename libavcodec/{ => aac}/aacenc_quantization_misc.h (100%) rename libavcodec/{ => aac}/aacenc_tns.c (100%) rename libavcodec/{ => aac}/aacenc_tns.h (100%) rename libavcodec/{ => aac}/aacenc_utils.h (100%) rename libavcodec/{ => aac}/aacencdsp.h (100%) rename libavcodec/{ => aac}/aacenctab.c (100%) rename libavcodec/{ => aac}/aacenctab.h (100%) diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 499f826635..a5dcfb7d1b 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -194,10 +194,7 @@ OBJS-$(CONFIG_AAC_FIXED_DECODER) += aactab.o \ aacsbr_fixed.o aacps_common.o aacps_fixed.o \ kbdwin.o \ sbrdsp_fixed.o aacpsdsp_fixed.o cbrt_data_fixed.o -OBJS-$(CONFIG_AAC_ENCODER) += aacenc.o aaccoder.o aacenctab.o \ - aacpsy.o aactab.o \ - aacenc_is.o \ - aacenc_tns.o \ +OBJS-$(CONFIG_AAC_ENCODER) += aacpsy.o aactab.o \ psymodel.o kbdwin.o \ mpeg4audio_sample_rates.o OBJS-$(CONFIG_AAC_MEDIACODEC_DECODER) += mediacodecdec.o diff --git a/libavcodec/aac/Makefile b/libavcodec/aac/Makefile index 70b1dca274..489fa9f67a 100644 --- a/libavcodec/aac/Makefile +++ b/libavcodec/aac/Makefile @@ -1,6 +1,8 @@ clean:: $(RM) $(CLEANSUFFIXES:%=libavcodec/aac/%) +OBJS-$(CONFIG_AAC_ENCODER) += aacenc.o aaccoder.o aacenctab.o \ + aacenc_is.o aacenc_tns.o OBJS-$(CONFIG_AAC_DECODER) += aac/aacdec.o aac/aacdec_tab.o \ aac/aacdec_float.o aac/aacdec_usac.o \ aac/aacdec_ac.o aac/aacdec_lpd.o diff --git a/libavcodec/aaccoder.c b/libavcodec/aac/aaccoder.c similarity index 100% rename from libavcodec/aaccoder.c rename to libavcodec/aac/aaccoder.c diff --git a/libavcodec/aac/aaccoder.h b/libavcodec/aac/aaccoder.h new file mode 100644 index 0000000000..3f3b2612aa --- /dev/null +++ b/libavcodec/aac/aaccoder.h @@ -0,0 +1,46 @@ +/* + * AAC encoder + * Copyright (C) 2008 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AACCODER_H +#define AVCODEC_AACCODER_H + +#include "aacenc.h" + +void ff_aac_search_for_quantizers(AVCodecContext *avctx, AACEncContext *s, + SingleChannelElement *sce, const float lambda); +void ff_aac_set_special_band_scalefactors(AACEncContext *s, + SingleChannelElement *sce); + +void ff_aac_search_for_pns(AACEncContext *s, AVCodecContext *avctx, + SingleChannelElement *sce); +void ff_aac_mark_pns(AACEncContext *s, AVCodecContext *avctx, + SingleChannelElement *sce); + +void ff_aac_search_for_ms(AACEncContext *s, ChannelElement *cpe); + +void ff_aac_encode_window_bands_info(AACEncContext *s, SingleChannelElement *sce, + int win, int group_len, const float lambda); +void ff_aac_quantize_and_encode_band(AACEncContext *s, PutBitContext *pb, + const float *in, float *out, int size, + int scale_idx, int cb, const float lambda, + int rtz); + +#endif /* AVCODEC_AACCODER_H */ diff --git a/libavcodec/aaccoder_twoloop.h b/libavcodec/aac/aaccoder_twoloop.h similarity index 100% rename from libavcodec/aaccoder_twoloop.h rename to libavcodec/aac/aaccoder_twoloop.h diff --git a/libavcodec/aacenc.c b/libavcodec/aac/aacenc.c similarity index 100% rename from libavcodec/aacenc.c rename to libavcodec/aac/aacenc.c diff --git a/libavcodec/aacenc.h b/libavcodec/aac/aacenc.h similarity index 100% rename from libavcodec/aacenc.h rename to libavcodec/aac/aacenc.h diff --git a/libavcodec/aacenc_is.c b/libavcodec/aac/aacenc_is.c similarity index 100% rename from libavcodec/aacenc_is.c rename to libavcodec/aac/aacenc_is.c diff --git a/libavcodec/aacenc_is.h b/libavcodec/aac/aacenc_is.h similarity index 100% rename from libavcodec/aacenc_is.h rename to libavcodec/aac/aacenc_is.h diff --git a/libavcodec/aacenc_quantization.h b/libavcodec/aac/aacenc_quantization.h similarity index 100% rename from libavcodec/aacenc_quantization.h rename to libavcodec/aac/aacenc_quantization.h diff --git a/libavcodec/aacenc_quantization_misc.h b/libavcodec/aac/aacenc_quantization_misc.h similarity index 100% rename from libavcodec/aacenc_quantization_misc.h rename to libavcodec/aac/aacenc_quantization_misc.h diff --git a/libavcodec/aacenc_tns.c b/libavcodec/aac/aacenc_tns.c similarity index 100% rename from libavcodec/aacenc_tns.c rename to libavcodec/aac/aacenc_tns.c diff --git a/libavcodec/aacenc_tns.h b/libavcodec/aac/aacenc_tns.h similarity index 100% rename from libavcodec/aacenc_tns.h rename to libavcodec/aac/aacenc_tns.h diff --git a/libavcodec/aacenc_utils.h b/libavcodec/aac/aacenc_utils.h similarity index 100% rename from libavcodec/aacenc_utils.h rename to libavcodec/aac/aacenc_utils.h diff --git a/libavcodec/aacencdsp.h b/libavcodec/aac/aacencdsp.h similarity index 100% rename from libavcodec/aacencdsp.h rename to libavcodec/aac/aacencdsp.h diff --git a/libavcodec/aacenctab.c b/libavcodec/aac/aacenctab.c similarity index 100% rename from libavcodec/aacenctab.c rename to libavcodec/aac/aacenctab.c diff --git a/libavcodec/aacenctab.h b/libavcodec/aac/aacenctab.h similarity index 100% rename from libavcodec/aacenctab.h rename to libavcodec/aac/aacenctab.h diff --git a/libavcodec/aarch64/aacencdsp_init.c b/libavcodec/aarch64/aacencdsp_init.c index 23498e7891..bd2ccfc68d 100644 --- a/libavcodec/aarch64/aacencdsp_init.c +++ b/libavcodec/aarch64/aacencdsp_init.c @@ -22,7 +22,7 @@ #include "libavutil/arm/cpu.h" #include "libavutil/attributes.h" -#include "libavcodec/aacencdsp.h" +#include "libavcodec/aac/aacencdsp.h" void ff_abs_pow34_neon(float *out, const float *in, const int size); void ff_aac_quant_bands_neon(int *, const float *, const float *, int, int, diff --git a/libavcodec/riscv/aacencdsp_init.c b/libavcodec/riscv/aacencdsp_init.c index a2dc0a8d3f..1442487655 100644 --- a/libavcodec/riscv/aacencdsp_init.c +++ b/libavcodec/riscv/aacencdsp_init.c @@ -23,7 +23,7 @@ #include "libavutil/attributes.h" #include "libavutil/cpu.h" -#include "libavcodec/aacencdsp.h" +#include "libavcodec/aac/aacencdsp.h" void ff_abs_pow34_rvv(float *out, const float *in, const int size); void ff_aac_quant_bands_rvv(int *, const float *, const float *, int, int, diff --git a/libavcodec/x86/aacencdsp_init.c b/libavcodec/x86/aacencdsp_init.c index cf17dbf91d..5485eefd07 100644 --- a/libavcodec/x86/aacencdsp_init.c +++ b/libavcodec/x86/aacencdsp_init.c @@ -23,7 +23,7 @@ #include "libavutil/attributes.h" #include "libavutil/x86/cpu.h" -#include "libavcodec/aacencdsp.h" +#include "libavcodec/aac/aacencdsp.h" void ff_abs_pow34_sse(float *out, const float *in, const int size); diff --git a/tests/checkasm/aacencdsp.c b/tests/checkasm/aacencdsp.c index 5308a2ac03..c7fd46b8e0 100644 --- a/tests/checkasm/aacencdsp.c +++ b/tests/checkasm/aacencdsp.c @@ -22,8 +22,8 @@ #include "libavutil/mem_internal.h" -#include "libavcodec/aacenc_utils.h" -#include "libavcodec/aacencdsp.h" +#include "libavcodec/aac/aacenc_utils.h" +#include "libavcodec/aac/aacencdsp.h" #include "libavcodec/aactab.h" #include "checkasm.h" -- 2.47.2 _______________________________________________ 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".