summaryrefslogtreecommitdiffstats
path: root/thirdparty/opus/silk/tuning_parameters.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-11-18 09:56:18 +0100
committerRémi Verschelde <rverschelde@gmail.com>2019-11-18 09:56:48 +0100
commit46ae64cd60166ead412bacc1bf03e9c8f8965e2c (patch)
tree9e592667ffa91e55491a66733e5e3d7de0b666c9 /thirdparty/opus/silk/tuning_parameters.h
parent974646309bfe09c48c8a72bf751b0ea6ad8b5bc5 (diff)
downloadredot-engine-46ae64cd60166ead412bacc1bf03e9c8f8965e2c.tar.gz
Revert "Update opus to 1.3.1 and opusfile to 0.11"
This reverts commit e00426c512a7905f5f925d382c443bab7a0ca693. The way we handle platform-specific intrinsics is not good, so the current state will not compile on armv8. This commit also requires SSE4.1 support, which is likely not a good idea for portable binaries. We'll have to redo this with more caution after 3.2 is released, or we might simply drop opus as we're only using it as dependency for theora right now. Fixes #33606.
Diffstat (limited to 'thirdparty/opus/silk/tuning_parameters.h')
-rw-r--r--thirdparty/opus/silk/tuning_parameters.h28
1 files changed, 22 insertions, 6 deletions
diff --git a/thirdparty/opus/silk/tuning_parameters.h b/thirdparty/opus/silk/tuning_parameters.h
index d70275fd8f..5b8f404235 100644
--- a/thirdparty/opus/silk/tuning_parameters.h
+++ b/thirdparty/opus/silk/tuning_parameters.h
@@ -53,12 +53,19 @@ extern "C"
/* LPC analysis regularization */
#define FIND_LPC_COND_FAC 1e-5f
+/* LTP analysis defines */
+#define FIND_LTP_COND_FAC 1e-5f
+#define LTP_DAMPING 0.05f
+#define LTP_SMOOTHING 0.1f
+
+/* LTP quantization settings */
+#define MU_LTP_QUANT_NB 0.03f
+#define MU_LTP_QUANT_MB 0.025f
+#define MU_LTP_QUANT_WB 0.02f
+
/* Max cumulative LTP gain */
#define MAX_SUM_LOG_GAIN_DB 250.0f
-/* LTP analysis defines */
-#define LTP_CORR_INV_MAX 0.03f
-
/***********************/
/* High pass filtering */
/***********************/
@@ -96,16 +103,25 @@ extern "C"
#define SPARSE_SNR_INCR_dB 2.0f
/* threshold for sparseness measure above which to use lower quantization offset during unvoiced */
-#define ENERGY_VARIATION_THRESHOLD_QNT_OFFSET 0.6f
+#define SPARSENESS_THRESHOLD_QNT_OFFSET 0.75f
/* warping control */
#define WARPING_MULTIPLIER 0.015f
/* fraction added to first autocorrelation value */
-#define SHAPE_WHITE_NOISE_FRACTION 3e-5f
+#define SHAPE_WHITE_NOISE_FRACTION 5e-5f
/* noise shaping filter chirp factor */
-#define BANDWIDTH_EXPANSION 0.94f
+#define BANDWIDTH_EXPANSION 0.95f
+
+/* difference between chirp factors for analysis and synthesis noise shaping filters at low bitrates */
+#define LOW_RATE_BANDWIDTH_EXPANSION_DELTA 0.01f
+
+/* extra harmonic boosting (signal shaping) at low bitrates */
+#define LOW_RATE_HARMONIC_BOOST 0.1f
+
+/* extra harmonic boosting (signal shaping) for noisy input signals */
+#define LOW_INPUT_QUALITY_HARMONIC_BOOST 0.1f
/* harmonic noise shaping */
#define HARMONIC_SHAPING 0.3f