From: "Kristofer Björkström" <Kristofer.Bjorkstrom@axis.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH] configure: add --disable-he-aac option
Date: Wed, 1 Feb 2023 14:32:46 +0000
Message-ID: <DU0PR02MB917105F56FFC398E37783E58F8D19@DU0PR02MB9171.eurprd02.prod.outlook.com> (raw)
From 6828ea418f0209dface9fbb23ff4657f66988f5e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kristofer=20Bj=C3=B6rkstr=C3=B6m?= <kristofb@axis.com>
Date: Wed, 1 Feb 2023 15:15:14 +0100
Subject: [PATCH] configure: add --disable-he-aac option
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Make it possible to disable HE and HEv2 support for AAC. To avoid
patents in HE-AAC.
Signed-off-by: Kristofer Björkström <kristofb@axis.com>
---
configure | 6 ++++++
libavcodec/aacdec_template.c | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/configure b/configure
index 47790d10f5..e51dd0027a 100755
--- a/configure
+++ b/configure
@@ -145,6 +145,7 @@ Component options:
--disable-fft disable FFT code
--disable-faan disable floating point AAN (I)DCT code
--disable-pixelutils disable pixel utils in libavutil
+ --disable-he-aac disable HE and HEv2 support for AAC
Individual component options:
--disable-everything disable all components listed below
@@ -1989,6 +1990,7 @@ CONFIG_LIST="
$SUBSYSTEM_LIST
autodetect
fontconfig
+ he_aac
large_tests
linux_perf
macos_kperf
@@ -4227,6 +4229,10 @@ for e in $env; do
eval "export $e"
done
+if disabled he_aac; then
+ add_cflags -DHE_AAC_DISABLED
+fi
+
if disabled autodetect; then
# Unless iconv is explicitely disabled by the user, we still want to probe
diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c
index 444dc4fa9d..3b95468067 100644
--- a/libavcodec/aacdec_template.c
+++ b/libavcodec/aacdec_template.c
@@ -1019,6 +1019,12 @@ static int decode_audio_specific_config_gb(AACContext *ac,
*m4ac = m4ac_bak;
return AVERROR_INVALIDDATA;
}
+#if HE_AAC_DISABLED
+ if (m4ac->ps > 0 || m4ac->sbr > 0 || avctx->profile >= FF_PROFILE_AAC_HE) {
+ av_log(avctx, AV_LOG_ERROR, "HE-AAC is not supported\n");
+ return AVERROR_INVALIDDATA;
+ }
+#endif
skip_bits_long(gb, i);
--
2.30.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".
next reply other threads:[~2023-02-01 14:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-01 14:32 Kristofer Björkström [this message]
2023-02-01 14:56 ` Hendrik Leppkes
2023-02-01 15:27 ` Jean-Baptiste Kempf
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=DU0PR02MB917105F56FFC398E37783E58F8D19@DU0PR02MB9171.eurprd02.prod.outlook.com \
--to=kristofer.bjorkstrom@axis.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