Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] configure: add --disable-he-aac option
@ 2023-02-01 14:32 Kristofer Björkström
  2023-02-01 14:56 ` Hendrik Leppkes
  0 siblings, 1 reply; 3+ messages in thread
From: Kristofer Björkström @ 2023-02-01 14:32 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

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".

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [FFmpeg-devel] [PATCH] configure: add --disable-he-aac option
  2023-02-01 14:32 [FFmpeg-devel] [PATCH] configure: add --disable-he-aac option Kristofer Björkström
@ 2023-02-01 14:56 ` Hendrik Leppkes
  2023-02-01 15:27   ` Jean-Baptiste Kempf
  0 siblings, 1 reply; 3+ messages in thread
From: Hendrik Leppkes @ 2023-02-01 14:56 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On Wed, Feb 1, 2023 at 3:33 PM Kristofer Björkström
<Kristofer.Bjorkstrom@axis.com> wrote:
>
> 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.
>

I don't feel like this adds a good precedence to our codebase. We
generally ignore patents, because every codec is littered with them.
Having options to cherry-pick which patents are enabled and which are
not is not only very ugly, but also impossible to track or make any
guarantees on, so I think we should not even start.

- Hendrik
_______________________________________________
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".

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [FFmpeg-devel] [PATCH] configure: add --disable-he-aac option
  2023-02-01 14:56 ` Hendrik Leppkes
@ 2023-02-01 15:27   ` Jean-Baptiste Kempf
  0 siblings, 0 replies; 3+ messages in thread
From: Jean-Baptiste Kempf @ 2023-02-01 15:27 UTC (permalink / raw)
  To: ffmpeg-devel



On Wed, 1 Feb 2023, at 15:56, Hendrik Leppkes wrote:
> On Wed, Feb 1, 2023 at 3:33 PM Kristofer Björkström
> <Kristofer.Bjorkstrom@axis.com> wrote:
>>
>> Make it possible to disable HE and HEv2 support for AAC. To avoid
>> patents in HE-AAC.
>>
>
> I don't feel like this adds a good precedence to our codebase. We
> generally ignore patents, because every codec is littered with them.
> Having options to cherry-pick which patents are enabled and which are
> not is not only very ugly, but also impossible to track or make any
> guarantees on, so I think we should not even start.

I agree here.

Maybe AAC-LC and Main are patent-free, but that is a big maybe and that depends heavily on the country.

jb

-- 
Jean-Baptiste Kempf -  President
+33 672 704 734
_______________________________________________
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".

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-01 15:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-01 14:32 [FFmpeg-devel] [PATCH] configure: add --disable-he-aac option Kristofer Björkström
2023-02-01 14:56 ` Hendrik Leppkes
2023-02-01 15:27   ` Jean-Baptiste Kempf

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