Delaying new DRED data when just out of silence
Some checks failed
DRED / CMake/${{ matrix.config.name }} (map[args:-DCMAKE_TOOLCHAIN_FILE=${ANDROID_HOME}/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a config:Release name:Android/Lib/ARMv8/Release os:ubuntu-latest]) (push) Has been cancelled
DRED / CMake/${{ matrix.config.name }} (map[args:-DCMAKE_TOOLCHAIN_FILE=${ANDROID_HOME}/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=x86_64 config:Release name:Android/Lib/X64/Release os:ubuntu-latest]) (push) Has been cancelled
Autotools / AutoMake/${{ matrix.config.name }} (map[automakeconfig:<nil> compiler:gcc name:Linux/GCC os:ubuntu-latest]) (push) Has been cancelled
Autotools / AutoMake/${{ matrix.config.name }} (map[buildconfig:--enable-assertions --enable-custom-modes --enable-dred --enable-osce compiler:gcc name:Linux/GCC/EnableDNN os:ubuntu-latest]) (push) Has been cancelled
Autotools / AutoMake/${{ matrix.config.name }} (map[buildconfig:--enable-assertions --enable-custom-modes compiler:gcc name:Linux/GCC/EnableCustomModes os:ubuntu-latest]) (push) Has been cancelled
Autotools / AutoMake/${{ matrix.config.name }} (map[buildconfig:--enable-assertions compiler:gcc name:Linux/GCC/EnableAssertions os:ubuntu-latest]) (push) Has been cancelled
CMake / Test build with CMake 3.1.0 (push) Has been cancelled
CMake / CMake MINGW (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args: config:Release name:Linux/Lib/X64/Release os:ubuntu-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args: config:Release name:MacOSX/Lib/X64/Release os:macos-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-DBUILD_FRAMEWORK=ON -DCMAKE_INSTALL_PREFIX=install config:Release name:MacOSX/Framework/X64/Release os:macos-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-DBUILD_SHARED_LIBS=ON config:Release name:Linux/So/X64/Release os:ubuntu-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-DBUILD_SHARED_LIBS=ON config:Release name:MacOSX/So/X64/Release os:macos-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-DCMAKE_TOOLCHAIN_FILE=${ANDROID_HOME}/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DBUILD_SHARED_LIBS=ON config:Release name:Android/So/ARMv8/Release os:ubuntu-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-DCMAKE_TOOLCHAIN_FILE=${ANDROID_HOME}/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a config:Release name:Android/Lib/ARMv8/Release os:ubuntu-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-DCMAKE_TOOLCHAIN_FILE=${ANDROID_HOME}/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=x86 -DBUILD_SHARED_LIBS=ON config:Release name:Android/So/X86/Release os:ubuntu-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-DCMAKE_TOOLCHAIN_FILE=${ANDROID_HOME}/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=x86 config:Release name:Android/Lib/X86/Release os:ubuntu-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-DCMAKE_TOOLCHAIN_FILE=${ANDROID_HOME}/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=x86_64 -DBUILD_SHARED_LIBS=ON config:Release name:Android/So/X64/Release os:ubuntu-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-DCMAKE_TOOLCHAIN_FILE=${ANDROID_HOME}/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=x86_64 config:Release name:Android/Lib/X64/Release os:ubuntu-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-DOPUS_ASSERTIONS=ON -DOPUS_FUZZING=ON config:Release name:AssertionsFuzz/Linux/Lib/X64/Release os:ubuntu-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-DOPUS_ASSERTIONS=ON -DOPUS_FUZZING=ON config:Release name:AssertionsFuzz/MacOSX/Lib/X64/Release os:macos-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-DOPUS_CUSTOM_MODES=ON config:Release name:CustomModes/Linux/Lib/X64/Release os:ubuntu-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-G "Unix Makefiles" -DBUILD_FRAMEWORK=ON -DCMAKE_INSTALL_PREFIX=install -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 config:Release name:iOS/Framework/arm64/Release os:macos-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-G "Unix Makefiles" -DBUILD_SHARED_LIBS=ON -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 config:Release name:iOS/Dll/arm64/Release os:macos-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 config:Release name:iOS/Lib/arm64/Release os:macos-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-G "Visual Studio 17 2022" -A ARM64 -DBUILD_SHARED_LIBS=ON config:Release name:Windows/Dll/ARMv8/Release os:windows-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-G "Visual Studio 17 2022" -A ARM64 config:Release name:Windows/Lib/armv8/Release os:windows-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-G "Visual Studio 17 2022" -A Win32 -DBUILD_SHARED_LIBS=ON config:Release name:Windows/Dll/X64/Release os:windows-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-G "Visual Studio 17 2022" -A Win32 -DBUILD_SHARED_LIBS=ON config:Release name:Windows/Dll/X86/Release os:windows-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-G "Visual Studio 17 2022" -A Win32 -DOPUS_ASSERTIONS=ON -DOPUS_FUZZING=ON config:Release name:AssertionsFuzz/Windows/Lib/X64/Release os:windows-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-G "Visual Studio 17 2022" -A Win32 config:Release name:Windows/Lib/X64/Release os:windows-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-G "Visual Studio 17 2022" -A Win32 config:Release name:Windows/Lib/X86/Release os:windows-latest]) (push) Has been cancelled
DRED / CMake/${{ matrix.config.name }} (map[args:-DOPUS_X86_PRESUME_AVX2=OFF config:Release name:MacOSX/Lib/X64/Release os:macos-latest]) (push) Has been cancelled
DRED / CMake/${{ matrix.config.name }} (map[args:-DOPUS_X86_PRESUME_AVX2=ON config:Release name:Linux/Lib/X64/Release os:ubuntu-latest]) (push) Has been cancelled
DRED / CMake/${{ matrix.config.name }} (map[args:-G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 config:Release name:iOS/Lib/arm64/Release os:macos-latest]) (push) Has been cancelled
DRED / CMake/${{ matrix.config.name }} (map[args:-G "Visual Studio 17 2022" -A ARM64 config:Release name:Windows/Lib/armv8/Release os:windows-latest]) (push) Has been cancelled
DRED / CMake/${{ matrix.config.name }} (map[args:-G "Visual Studio 17 2022" -DOPUS_X86_PRESUME_AVX2=ON config:Release name:Windows/Lib/X64/Release os:windows-latest]) (push) Has been cancelled
DRED / AutoTools/${{ matrix.config.name }} (map[automakeconfig:<nil> compiler:clang name:Linux/Clang os:ubuntu-latest]) (push) Has been cancelled
DRED / AutoTools/${{ matrix.config.name }} (map[automakeconfig:<nil> compiler:gcc name:Linux/GCC os:ubuntu-latest]) (push) Has been cancelled
Repository / Check trailing white spaces (push) Has been cancelled
Some checks failed
DRED / CMake/${{ matrix.config.name }} (map[args:-DCMAKE_TOOLCHAIN_FILE=${ANDROID_HOME}/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a config:Release name:Android/Lib/ARMv8/Release os:ubuntu-latest]) (push) Has been cancelled
DRED / CMake/${{ matrix.config.name }} (map[args:-DCMAKE_TOOLCHAIN_FILE=${ANDROID_HOME}/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=x86_64 config:Release name:Android/Lib/X64/Release os:ubuntu-latest]) (push) Has been cancelled
Autotools / AutoMake/${{ matrix.config.name }} (map[automakeconfig:<nil> compiler:gcc name:Linux/GCC os:ubuntu-latest]) (push) Has been cancelled
Autotools / AutoMake/${{ matrix.config.name }} (map[buildconfig:--enable-assertions --enable-custom-modes --enable-dred --enable-osce compiler:gcc name:Linux/GCC/EnableDNN os:ubuntu-latest]) (push) Has been cancelled
Autotools / AutoMake/${{ matrix.config.name }} (map[buildconfig:--enable-assertions --enable-custom-modes compiler:gcc name:Linux/GCC/EnableCustomModes os:ubuntu-latest]) (push) Has been cancelled
Autotools / AutoMake/${{ matrix.config.name }} (map[buildconfig:--enable-assertions compiler:gcc name:Linux/GCC/EnableAssertions os:ubuntu-latest]) (push) Has been cancelled
CMake / Test build with CMake 3.1.0 (push) Has been cancelled
CMake / CMake MINGW (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args: config:Release name:Linux/Lib/X64/Release os:ubuntu-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args: config:Release name:MacOSX/Lib/X64/Release os:macos-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-DBUILD_FRAMEWORK=ON -DCMAKE_INSTALL_PREFIX=install config:Release name:MacOSX/Framework/X64/Release os:macos-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-DBUILD_SHARED_LIBS=ON config:Release name:Linux/So/X64/Release os:ubuntu-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-DBUILD_SHARED_LIBS=ON config:Release name:MacOSX/So/X64/Release os:macos-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-DCMAKE_TOOLCHAIN_FILE=${ANDROID_HOME}/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DBUILD_SHARED_LIBS=ON config:Release name:Android/So/ARMv8/Release os:ubuntu-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-DCMAKE_TOOLCHAIN_FILE=${ANDROID_HOME}/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a config:Release name:Android/Lib/ARMv8/Release os:ubuntu-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-DCMAKE_TOOLCHAIN_FILE=${ANDROID_HOME}/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=x86 -DBUILD_SHARED_LIBS=ON config:Release name:Android/So/X86/Release os:ubuntu-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-DCMAKE_TOOLCHAIN_FILE=${ANDROID_HOME}/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=x86 config:Release name:Android/Lib/X86/Release os:ubuntu-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-DCMAKE_TOOLCHAIN_FILE=${ANDROID_HOME}/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=x86_64 -DBUILD_SHARED_LIBS=ON config:Release name:Android/So/X64/Release os:ubuntu-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-DCMAKE_TOOLCHAIN_FILE=${ANDROID_HOME}/ndk/25.2.9519653/build/cmake/android.toolchain.cmake -DANDROID_ABI=x86_64 config:Release name:Android/Lib/X64/Release os:ubuntu-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-DOPUS_ASSERTIONS=ON -DOPUS_FUZZING=ON config:Release name:AssertionsFuzz/Linux/Lib/X64/Release os:ubuntu-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-DOPUS_ASSERTIONS=ON -DOPUS_FUZZING=ON config:Release name:AssertionsFuzz/MacOSX/Lib/X64/Release os:macos-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-DOPUS_CUSTOM_MODES=ON config:Release name:CustomModes/Linux/Lib/X64/Release os:ubuntu-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-G "Unix Makefiles" -DBUILD_FRAMEWORK=ON -DCMAKE_INSTALL_PREFIX=install -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 config:Release name:iOS/Framework/arm64/Release os:macos-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-G "Unix Makefiles" -DBUILD_SHARED_LIBS=ON -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 config:Release name:iOS/Dll/arm64/Release os:macos-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 config:Release name:iOS/Lib/arm64/Release os:macos-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-G "Visual Studio 17 2022" -A ARM64 -DBUILD_SHARED_LIBS=ON config:Release name:Windows/Dll/ARMv8/Release os:windows-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-G "Visual Studio 17 2022" -A ARM64 config:Release name:Windows/Lib/armv8/Release os:windows-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-G "Visual Studio 17 2022" -A Win32 -DBUILD_SHARED_LIBS=ON config:Release name:Windows/Dll/X64/Release os:windows-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-G "Visual Studio 17 2022" -A Win32 -DBUILD_SHARED_LIBS=ON config:Release name:Windows/Dll/X86/Release os:windows-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-G "Visual Studio 17 2022" -A Win32 -DOPUS_ASSERTIONS=ON -DOPUS_FUZZING=ON config:Release name:AssertionsFuzz/Windows/Lib/X64/Release os:windows-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-G "Visual Studio 17 2022" -A Win32 config:Release name:Windows/Lib/X64/Release os:windows-latest]) (push) Has been cancelled
CMake / CMake/${{ matrix.config.name }} (map[args:-G "Visual Studio 17 2022" -A Win32 config:Release name:Windows/Lib/X86/Release os:windows-latest]) (push) Has been cancelled
DRED / CMake/${{ matrix.config.name }} (map[args:-DOPUS_X86_PRESUME_AVX2=OFF config:Release name:MacOSX/Lib/X64/Release os:macos-latest]) (push) Has been cancelled
DRED / CMake/${{ matrix.config.name }} (map[args:-DOPUS_X86_PRESUME_AVX2=ON config:Release name:Linux/Lib/X64/Release os:ubuntu-latest]) (push) Has been cancelled
DRED / CMake/${{ matrix.config.name }} (map[args:-G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 config:Release name:iOS/Lib/arm64/Release os:macos-latest]) (push) Has been cancelled
DRED / CMake/${{ matrix.config.name }} (map[args:-G "Visual Studio 17 2022" -A ARM64 config:Release name:Windows/Lib/armv8/Release os:windows-latest]) (push) Has been cancelled
DRED / CMake/${{ matrix.config.name }} (map[args:-G "Visual Studio 17 2022" -DOPUS_X86_PRESUME_AVX2=ON config:Release name:Windows/Lib/X64/Release os:windows-latest]) (push) Has been cancelled
DRED / AutoTools/${{ matrix.config.name }} (map[automakeconfig:<nil> compiler:clang name:Linux/Clang os:ubuntu-latest]) (push) Has been cancelled
DRED / AutoTools/${{ matrix.config.name }} (map[automakeconfig:<nil> compiler:gcc name:Linux/GCC os:ubuntu-latest]) (push) Has been cancelled
Repository / Check trailing white spaces (push) Has been cancelled
We don't need redundancy for the first active frame since we already have the main Opus payload.
This commit is contained in:
parent
c45120217b
commit
23c376e45b
@ -257,7 +257,7 @@ static int dred_voice_active(const unsigned char *activity_mem, int offset) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dred_encode_silk_frame(const DREDEnc *enc, unsigned char *buf, int max_chunks, int max_bytes, int q0, int dQ, unsigned char *activity_mem, int arch) {
|
||||
int dred_encode_silk_frame(DREDEnc *enc, unsigned char *buf, int max_chunks, int max_bytes, int q0, int dQ, unsigned char *activity_mem, int arch) {
|
||||
ec_enc ec_encoder;
|
||||
|
||||
int q_level;
|
||||
@ -270,12 +270,21 @@ int dred_encode_silk_frame(const DREDEnc *enc, unsigned char *buf, int max_chunk
|
||||
int latent_offset;
|
||||
int extra_dred_offset=0;
|
||||
int dred_encoded=0;
|
||||
int delayed_dred=0;
|
||||
|
||||
latent_offset = enc->latent_offset;
|
||||
/* Delaying new DRED data when just out of silence because we already have the
|
||||
main Opus payload for that frame. */
|
||||
if (activity_mem[0] && enc->last_extra_dred_offset>0) {
|
||||
latent_offset = enc->last_extra_dred_offset;
|
||||
delayed_dred = 1;
|
||||
enc->last_extra_dred_offset = 0;
|
||||
}
|
||||
while (latent_offset < enc->latents_buffer_fill && !dred_voice_active(activity_mem, latent_offset)) {
|
||||
latent_offset++;
|
||||
extra_dred_offset++;
|
||||
}
|
||||
if (!delayed_dred) enc->last_extra_dred_offset = extra_dred_offset;
|
||||
|
||||
/* entropy coding of state and latents */
|
||||
ec_enc_init(&ec_encoder, buf, max_bytes);
|
||||
|
||||
@ -51,6 +51,7 @@ typedef struct {
|
||||
int input_buffer_fill;
|
||||
int dred_offset;
|
||||
int latent_offset;
|
||||
int last_extra_dred_offset;
|
||||
float latents_buffer[DRED_MAX_FRAMES * DRED_LATENT_DIM];
|
||||
int latents_buffer_fill;
|
||||
float state_buffer[DRED_MAX_FRAMES * DRED_STATE_DIM];
|
||||
@ -65,6 +66,6 @@ void dred_deinit_encoder(DREDEnc *enc);
|
||||
|
||||
void dred_compute_latents(DREDEnc *enc, const float *pcm, int frame_size, int extra_delay, int arch);
|
||||
|
||||
int dred_encode_silk_frame(const DREDEnc *enc, unsigned char *buf, int max_chunks, int max_bytes, int q0, int dQ, unsigned char *activity_mem, int arch);
|
||||
int dred_encode_silk_frame(DREDEnc *enc, unsigned char *buf, int max_chunks, int max_bytes, int q0, int dQ, unsigned char *activity_mem, int arch);
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user