From 19e2898a0d8382dafc234cab1da0e7a84f8d6225 Mon Sep 17 00:00:00 2001 From: the_hunter Date: Mon, 24 Feb 2025 10:43:38 +0200 Subject: [PATCH] Add option ENABLE_VORBIS_PSY Enable Vorbis psychoacoustic model for the Speex codec. This is an experimental feature in the Speex codec that improves sound quality. It allows the Speex codec to use the Vorbis psychoacoustic model for better speech compression, especially at higher bitrates. This model helps identify which parts of the sound are less noticeable to the human ear and compresses them more, while preserving overall quality. --- CMakeLists.txt | 1 + external/speex/CMakeLists.txt | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c8bb2b3..9d52ad4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,7 @@ option(ENABLE_EXCEPTIONS "Enable support for exception handling" option(ENABLE_ASAN "Enable AddressSanitizer" OFF) option(ENABLE_UBSAN "Enable UndefinedBehaviorSanitizer" OFF) option(ENABLE_LINK_TRACE "Enable linker trace flag (detailed output of the linking process)" OFF) +option(ENABLE_SPEEX_VORBIS_PSY "Enable Vorbis psychoacoustic model in the Speex codec" OFF) option(OPTIMIZE_FOR_CURRENT_CPU "Generate code optimized for the current (native) processor" OFF) #------------------------------------------------------------------------------- diff --git a/external/speex/CMakeLists.txt b/external/speex/CMakeLists.txt index 4d8c6c9..b34ae5d 100644 --- a/external/speex/CMakeLists.txt +++ b/external/speex/CMakeLists.txt @@ -13,7 +13,6 @@ project( "Speex" # Options #------------------------------------------------------------------------------- -option(SPEEX_ENABLE_VORBIS_PSY "Enable Vorbis psychoacoustic model" OFF) option(SPEEX_USE_KISS_FFT "Use KISS Fast Fourier Transform (otherwise OggVorbis)" OFF) #------------------------------------------------------------------------------- @@ -117,7 +116,7 @@ target_sources("${TARGET_NAME}" "src/smallft.h" > - $<$: + $<$: "src/vorbis_psy.c" "src/vorbis_psy.h" > @@ -166,7 +165,7 @@ target_compile_definitions("${TARGET_NAME}" EXPORT=__attribute__\(\(visibility\(\"default\"\)\)\) > - $<$:VORBIS_PSYCHO> + $<$:VORBIS_PSYCHO> $,USE_KISS_FFT,USE_SMALLFT> )