mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] opus: add machine learning options
@ 2024-03-26  8:24 Philipp Zabel
  2024-04-08 11:05 ` [ptxdist] [APPLIED] " Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Philipp Zabel @ 2024-03-26  8:24 UTC (permalink / raw)
  To: ptxdist; +Cc: Philipp Zabel

Allow to use machine learning methods that improve voice quality under
sporadic packet loss and at low bitrates, by enabling the deep packet
loss concealment (PLC) and opus speech coding enhancement (OSCE),
respectively.

The speech coding enhancements are not yet standardized, but turning
them on does not have compability implications, as they are purely
voice quality enhancement steps done by the decoder.

For details, see https://opus-codec.org/demo/opus-1.5/.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 rules/opus.in   | 28 +++++++++++++++++++++++++++-
 rules/opus.make |  4 ++--
 2 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/rules/opus.in b/rules/opus.in
index d906da5e687a..df7e715690a6 100644
--- a/rules/opus.in
+++ b/rules/opus.in
@@ -1,9 +1,35 @@
 ## SECTION=multimedia_libs
 
-config OPUS
+menuconfig OPUS
 	tristate
 	prompt "opus"
 	select HOST_SYSTEM_PERL
 	select HOST_MESON
 	help
 	  Opus is a totally open, royalty-free, highly versatile audio codec.
+
+if OPUS
+
+config OPUS_DEEP_PLC
+	bool
+	prompt "enable deep packet loss concealment (PLC)"
+	help
+	  Improves voice quality under sporadic packet loss, by using a deep
+	  neural network to help with filling in short audio gaps in the
+	  decoder. The decoder complexity needs to be set to 5 or more for this.
+	  Increases binary size by about 1 MiB.
+	  For details, see https://opus-codec.org/demo/opus-1.5/.
+
+config OPUS_OSCE
+	bool
+	prompt "enable opus speech coding enhancement (OSCE)"
+	help
+	  Improves voice quality of low-bitrate streams by applying voice
+	  enhancements in the decoder.
+	  A Linear Adaptive Coding Enhancer (LACE, ~100 MFLOPS) is used at
+	  decoder complexity setting 6, and a Non-Linear variation (NoLACE,
+	  ~400 MFLOPS) is used at decoder complexity setting 7.
+	  Increases binary size by about 1.6 MiB.
+	  For details, see https://opus-codec.org/demo/opus-1.5/.
+
+endif
diff --git a/rules/opus.make b/rules/opus.make
index 0c3c659d0d43..707889c79662 100644
--- a/rules/opus.make
+++ b/rules/opus.make
@@ -53,10 +53,10 @@ OPUS_CONF_OPT	:= \
 	-Dcustom-modes=false \
 	-Ddocdir=doc/opus \
 	-Ddocs=disabled \
-	-Denable-deep-plc=false \
+	-Denable-deep-plc=$(call ptx/truefalse, PTXCONF_OPUS_DEEP_PLC) \
 	-Denable-dnn-debug-float=false \
 	-Denable-dred=false \
-	-Denable-osce=false \
+	-Denable-osce=$(call ptx/truefalse, PTXCONF_OPUS_OSCE) \
 	-Dextra-programs=disabled \
 	-Dfixed-point=$(call ptx/falsetrue, PTXCONF_HAS_HARDFLOAT) \
 	-Dfixed-point-debug=false \
-- 
2.39.2




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

* Re: [ptxdist] [APPLIED] opus: add machine learning options
  2024-03-26  8:24 [ptxdist] [PATCH] opus: add machine learning options Philipp Zabel
@ 2024-04-08 11:05 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2024-04-08 11:05 UTC (permalink / raw)
  To: ptxdist; +Cc: Philipp Zabel

Thanks, applied as 13df1bf7f28fbfe7632b2fba67391b9093dc5010.

Michael

[sent from post-receive hook]

On Mon, 08 Apr 2024 13:05:34 +0200, Philipp Zabel <p.zabel@pengutronix.de> wrote:
> Allow to use machine learning methods that improve voice quality under
> sporadic packet loss and at low bitrates, by enabling the deep packet
> loss concealment (PLC) and opus speech coding enhancement (OSCE),
> respectively.
> 
> The speech coding enhancements are not yet standardized, but turning
> them on does not have compability implications, as they are purely
> voice quality enhancement steps done by the decoder.
> 
> For details, see https://opus-codec.org/demo/opus-1.5/.
> 
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> Message-Id: <20240326082400.2458682-1-p.zabel@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/rules/opus.in b/rules/opus.in
> index d906da5e687a..df7e715690a6 100644
> --- a/rules/opus.in
> +++ b/rules/opus.in
> @@ -1,9 +1,35 @@
>  ## SECTION=multimedia_libs
>  
> -config OPUS
> +menuconfig OPUS
>  	tristate
>  	prompt "opus"
>  	select HOST_SYSTEM_PERL
>  	select HOST_MESON
>  	help
>  	  Opus is a totally open, royalty-free, highly versatile audio codec.
> +
> +if OPUS
> +
> +config OPUS_DEEP_PLC
> +	bool
> +	prompt "enable deep packet loss concealment (PLC)"
> +	help
> +	  Improves voice quality under sporadic packet loss, by using a deep
> +	  neural network to help with filling in short audio gaps in the
> +	  decoder. The decoder complexity needs to be set to 5 or more for this.
> +	  Increases binary size by about 1 MiB.
> +	  For details, see https://opus-codec.org/demo/opus-1.5/.
> +
> +config OPUS_OSCE
> +	bool
> +	prompt "enable opus speech coding enhancement (OSCE)"
> +	help
> +	  Improves voice quality of low-bitrate streams by applying voice
> +	  enhancements in the decoder.
> +	  A Linear Adaptive Coding Enhancer (LACE, ~100 MFLOPS) is used at
> +	  decoder complexity setting 6, and a Non-Linear variation (NoLACE,
> +	  ~400 MFLOPS) is used at decoder complexity setting 7.
> +	  Increases binary size by about 1.6 MiB.
> +	  For details, see https://opus-codec.org/demo/opus-1.5/.
> +
> +endif
> diff --git a/rules/opus.make b/rules/opus.make
> index 0c3c659d0d43..707889c79662 100644
> --- a/rules/opus.make
> +++ b/rules/opus.make
> @@ -53,10 +53,10 @@ OPUS_CONF_OPT	:= \
>  	-Dcustom-modes=false \
>  	-Ddocdir=doc/opus \
>  	-Ddocs=disabled \
> -	-Denable-deep-plc=false \
> +	-Denable-deep-plc=$(call ptx/truefalse, PTXCONF_OPUS_DEEP_PLC) \
>  	-Denable-dnn-debug-float=false \
>  	-Denable-dred=false \
> -	-Denable-osce=false \
> +	-Denable-osce=$(call ptx/truefalse, PTXCONF_OPUS_OSCE) \
>  	-Dextra-programs=disabled \
>  	-Dfixed-point=$(call ptx/falsetrue, PTXCONF_HAS_HARDFLOAT) \
>  	-Dfixed-point-debug=false \



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

end of thread, other threads:[~2024-04-08 11:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-26  8:24 [ptxdist] [PATCH] opus: add machine learning options Philipp Zabel
2024-04-08 11:05 ` [ptxdist] [APPLIED] " Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox