Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2012-07-11 10:54:47 +0400
committerGregory Maxwell <greg@xiph.org>2012-08-07 02:19:30 +0400
commit1cd5d95b3fe6ba959037e427324bea22563f67a3 (patch)
treec4614a02ab99d5a55d2ac35ca9e98371ff9bbb66 /include
parent02f19c26f17e43f3b8ac6cfe15a3d8a622f8ef07 (diff)
Implements OPUS_{GET,SET}_LSB_DEPTH
This implements an API used in future encoders to avoid dynalloc doing silly things on periodic LSB patterns and to reduce the bitrate on near-silence.
Diffstat (limited to 'include')
-rw-r--r--include/opus_defines.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/opus_defines.h b/include/opus_defines.h
index b2a559d4..14d5e5eb 100644
--- a/include/opus_defines.h
+++ b/include/opus_defines.h
@@ -142,6 +142,8 @@ extern "C" {
#define OPUS_GET_PITCH_REQUEST 4033
#define OPUS_SET_GAIN_REQUEST 4034
#define OPUS_GET_GAIN_REQUEST 4045
+#define OPUS_SET_LSB_DEPTH_REQUEST 4036
+#define OPUS_GET_LSB_DEPTH_REQUEST 4037
/* Macros to trigger compilation errors when the wrong types are provided to a CTL */
#define __opus_check_int(x) (((void)((x) == (opus_int32)0)), (opus_int32)(x))
@@ -464,6 +466,17 @@ extern "C" {
* @hideinitializer */
#define OPUS_GET_BANDWIDTH(x) OPUS_GET_BANDWIDTH_REQUEST, __opus_check_int_ptr(x)
+/** Configures the depth of signal being encoded.
+ * This is a hint which helps the encoder identify silence and near-silence.
+ * The supported values are between 8 and 24 (default)
+ * @param[in] x <tt>opus_int32</tt>: Input precision
+ * @hideinitializer */
+#define OPUS_SET_LSB_DEPTH(x) OPUS_SET_LSB_DEPTH_REQUEST, __opus_check_int(x)
+/** Gets the encoder's configured signal depth. @see OPUS_SET_LSB_DEPTH
+ *
+ * @param[out] x <tt>opus_int32*</tt>: Input precision
+ * @hideinitializer */
+#define OPUS_GET_LSB_DEPTH(x) OPUS_GET_LSB_DEPTH_REQUEST, __opus_check_int_ptr(x)
/**@}*/
/** @defgroup opus_decoderctls Decoder related CTLs