Skip to content

Commit f31a9bd

Browse files
committed
Enable Opus ML improvements
Related to: https://github.com/orgs/jamulussoftware/discussions/3244
1 parent 201d20d commit f31a9bd

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

Jamulus.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ contains(QT_ARCH, armeabi-v7a) | contains(QT_ARCH, arm64-v8a) {
696696
contains(QT_ARCH, x86_64):DEFINES_OPUS += OPUS_X86_PRESUME_SSE=1 OPUS_X86_PRESUME_SSE2=1
697697
DEFINES_OPUS += CPU_INFO_BY_C
698698
}
699-
DEFINES_OPUS += OPUS_BUILD=1 USE_ALLOCA=1 OPUS_HAVE_RTCD=1 HAVE_LRINTF=1 HAVE_LRINT=1
699+
DEFINES_OPUS += OPUS_BUILD=1 USE_ALLOCA=1 OPUS_HAVE_RTCD=1 HAVE_LRINTF=1 HAVE_LRINT=1 OPUS_DRED=1
700700

701701
DISTFILES += ChangeLog \
702702
COMPILING.md \

src/client.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ CClient::CClient ( const quint16 iPortNumber,
106106
opus_custom_encoder_ctl ( OpusEncoderMono, OPUS_SET_COMPLEXITY ( 1 ) );
107107
opus_custom_encoder_ctl ( OpusEncoderStereo, OPUS_SET_COMPLEXITY ( 1 ) );
108108

109+
// enable lowest decoder complexity for Opus64 decoders to enable DRED
110+
opus_custom_decoder_ctl ( Opus64DecoderMono, OPUS_SET_COMPLEXITY ( 5 ) );
111+
opus_custom_decoder_ctl ( Opus64DecoderStereo, OPUS_SET_COMPLEXITY ( 5 ) );
112+
109113
// Connections -------------------------------------------------------------
110114
// connections for the protocol mechanism
111115
QObject::connect ( &Channel, &CChannel::MessReadyForSending, this, &CClient::OnSendProtMessage );

src/server.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ CServer::CServer ( const int iNewMaxNumChan,
116116
opus_custom_encoder_ctl ( OpusEncoderMono[i], OPUS_SET_COMPLEXITY ( 1 ) );
117117
opus_custom_encoder_ctl ( OpusEncoderStereo[i], OPUS_SET_COMPLEXITY ( 1 ) );
118118

119+
// enable lowest decoder complexity for Opus64 decoders to enable DRED
120+
opus_custom_decoder_ctl ( Opus64DecoderMono[i], OPUS_SET_COMPLEXITY ( 5 ) );
121+
opus_custom_decoder_ctl ( Opus64DecoderStereo[i], OPUS_SET_COMPLEXITY ( 5 ) );
122+
119123
// init double-to-normal frame size conversion buffers -----------------
120124
// use worst case memory initialization to avoid allocating memory in
121125
// the time-critical thread

0 commit comments

Comments
 (0)