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.
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.
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(-)