Skip to content

Commit

Permalink
osce enabled by default, dec_complexity=10
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Buethe committed Dec 14, 2023
1 parent 45df82b commit 895fb56
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 30 deletions.
50 changes: 26 additions & 24 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,32 @@ AS_IF([test "$enable_custom_modes" = "yes"],[

AM_CONDITIONAL([CUSTOM_MODES], [test "$enable_custom_modes" = "yes"])


AC_ARG_ENABLE([osce-training-data],
AS_HELP_STRING([--enable-osce-training-data], [enables feature output for SILK enhancement]),,
[enable_osc_training_data=no]
)

AS_IF([test "$enable_osce_training_data" = "yes"], [
AC_DEFINE([ENABLE_OSCE_TRAINING_DATA], [1], [Enable dumping of OSCE training data])
])

AC_MSG_CHECKING([argument osce training data])
AS_IF([test "$enable_osce_training_data" = "yes"], [
AC_MSG_RESULT([yes])
], [AC_MSG_RESULT([no])])

AC_ARG_ENABLE([osce],
AS_HELP_STRING([--disable-osce], [enables feature output for SILK enhancement]),,
[enable_osce=yes]
)

AS_IF([test "$enable_osce" = "yes" || test "$enable_osce_training_data" = "yes"], [
AC_DEFINE([ENABLE_OSCE], [1], [Enable Opus Speech Coding Enhancement])
])

AM_CONDITIONAL([ENABLE_OSCE], [test "$enable_osce" = "yes" || test "$enable_osce_training_data" = "yes"])

AC_ARG_ENABLE([dred],
[AS_HELP_STRING([--enable-dred], [Use Deep REDundancy (DRED)])],,
[enable_dred=no])
Expand Down Expand Up @@ -904,30 +930,6 @@ AS_IF([test "$enable_dnn_debug_float" = "no"], [
AC_DEFINE([DISABLE_DEBUG_FLOAT], [1], [Disable DNN debug float])
])

AC_ARG_ENABLE([osce-training-data],
AS_HELP_STRING([--enable-osce-training-data], [enables feature output for SILK enhancement]),,
[enable_osc_training_data=no]
)

AS_IF([test "$enable_osce_training_data" = "yes"], [
AC_DEFINE([ENABLE_OSCE_TRAINING_DATA], [1], [Enable dumping of OSCE training data])
])

AC_MSG_CHECKING([argument osce training data])
AS_IF([test "$enable_osce_training_data" = "yes"], [
AC_MSG_RESULT([yes])
], [AC_MSG_RESULT([no])])

AC_ARG_ENABLE([osce],
AS_HELP_STRING([--enable-osce], [enables feature output for SILK enhancement]),,
[enable_osce=no]
)

AS_IF([test "$enable_osce" = "yes" || test "$enable_osce_training_data" = "yes"], [
AC_DEFINE([ENABLE_OSCE], [1], [Enable Opus Speech Coding Enhancement])
])

AM_CONDITIONAL([ENABLE_OSCE], [test "$enable_osce" = "yes" || test "$enable_osce_training_data" = "yes"])

AM_CONDITIONAL([HAVE_DOXYGEN], [test "$HAVE_DOXYGEN" = "yes"])

Expand Down
4 changes: 2 additions & 2 deletions src/opus_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,10 +415,10 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data,
#ifdef ENABLE_OSCE
st->DecControl.osce_method = OSCE_METHOD_NONE;
#ifndef DISABLE_LACE
if (st->complexity >= 2) {st->DecControl.osce_method = OSCE_METHOD_LACE;}
if (st->complexity >= 5) {st->DecControl.osce_method = OSCE_METHOD_LACE;}
#endif
#ifndef DISABLE_NOLACE
if (st->complexity >= 5) {st->DecControl.osce_method = OSCE_METHOD_NOLACE;}
if (st->complexity >= 7) {st->DecControl.osce_method = OSCE_METHOD_NOLACE;}
#endif
#endif

Expand Down
6 changes: 2 additions & 4 deletions src/opus_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ int main(int argc, char *argv[])
use_vbr = 1;
max_payload_bytes = MAX_PACKET;
complexity = 10;
dec_complexity = 0;
dec_complexity = 10;
use_inbandfec = 0;
forcechannels = OPUS_AUTO;
use_dtx = 0;
Expand Down Expand Up @@ -691,11 +691,9 @@ int main(int argc, char *argv[])
opus_encoder_ctl(enc, OPUS_SET_DRED_DURATION(dred_duration));
}

#ifdef ENABLE_OSCE
#if 0
#ifdef ENABLE_OSCE_TRAINING_DATA
/* force encoder to use SILK for the time being */
opus_encoder_ctl(enc, OPUS_SET_FORCE_MODE(MODE_SILK_ONLY));
#endif
#endif
}
if (!encode_only)
Expand Down

0 comments on commit 895fb56

Please sign in to comment.