Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 936909 - media-libs/opus-1.5.2: add new USE flags
Summary: media-libs/opus-1.5.2: add new USE flags
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-07-29 18:53 UTC by conflictvegetable
Modified: 2024-07-30 09:42 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description conflictvegetable 2024-07-29 18:53:03 UTC
Opus 1.5.x introduces new 2 features that can only be enabled at build-time and are disabled by default: Deep REDundancy (enable with -Ddred=enabled) and Opus Speech Coding Enhancement (enable with -Dosce=enabled). I think these features are worth giving the option to expose in USE flags, even if (for reasons detailed below) they are not yet ready for prime-time, as it were.

The Opus 1.5 demonstration page at https://opus-codec.org/demo/opus-1.5/ gives a nice rundown, but I'd like to extract the most relevant points from a packaging perspective:

* The models used are tiny by Machine Learning standards. The models are included with the very same release tarballs Gentoo uses right now. No extra sources are required to enable these features.

* Enabling these features adds a small increase in both code size (a few MB) and CPU load (1% more CPU utilization during realtime encode/decode). 

* DRED is not yet standardized and requires additional data to be added to the bitstream. Additionally, the DRED included with Opus 1.5 will not be compatible with the final version. That being said, this extra DRED data will simply be ignored if the decoder is incompatible. DRED-enabled files will remain completely playable in past and future decoders, but this particular incarnation of the DRED feature may not continue to work.  

* The new OSCE enhancements are also not yet standardized, but unlike DRED, the OSCE features (LACE and NoLACE) only improve the encoder while retaining the exact same bitstream format. As such, any files encoded with OSCE features are compatible with older decoders and will remain compatible with future ones.

* In terms of software that links against Opus: FFmpeg isn't able to use these features (yet).

Thus, I would like to also suggest that the new USE flags be disabled by default, potentially guarded with some kind of notice that they are experimental.
Comment 1 conflictvegetable 2024-07-30 03:53:31 UTC
I have misread the section of the demo page on LACE and NoLACE, so I'm going to correct myself.

The OSCE enhancements are not part of the encoder, they're effectively a 'filter' over the *decoder* when the decoder complexity is set to 6+ (LACE) or 7 (NoLACE). This means that there are no compatibility concerns at all, since it's just the decoder doing the magic on already-encoded files.
Comment 2 Larry the Git Cow gentoo-dev 2024-07-30 09:42:35 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a0dbdbc36a5a9b1e644bd2239143cdcbf3a3a3c

commit 3a0dbdbc36a5a9b1e644bd2239143cdcbf3a3a3c
Author:     Violet Purcell <vimproved@inventati.org>
AuthorDate: 2024-07-30 01:08:37 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2024-07-30 09:39:12 +0000

    media-libs/opus: add USE flags for deep-plc, dred, and osce
    
    Closes: https://bugs.gentoo.org/936909
    See-Also: https://opus-codec.org/demo/opus-1.5/
    Signed-off-by: Violet Purcell <vimproved@inventati.org>
    Closes: https://github.com/gentoo/gentoo/pull/37791
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 media-libs/opus/metadata.xml      | 3 +++
 media-libs/opus/opus-1.5.2.ebuild | 9 ++++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)