shithub: opus

Download patch

ref: 811dc74204c9acb9bcb5f3c74537880701f310a3
parent: 98b59a306bf9a90eb6320bcc393f08df3021c0f9
author: Ralph Giles <[email protected]>
date: Thu Jan 7 06:43:47 EST 2016

Suggest OPUS_LSB_DEPTH(14) for G.711. r=td-linux,mark4o

This is a reasonable choice for the (non-linear) dynamic
range of mu-law. A-law is technically 13 bit, maybe 12;
experimentation is needed.

Per irc discussion with Jean-Marc, Ron, and Mark Harris.

--- a/include/opus_defines.h
+++ b/include/opus_defines.h
@@ -523,10 +523,19 @@
   * @hideinitializer */
 #define OPUS_GET_DTX(x) OPUS_GET_DTX_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.
+  * It represents the number of significant bits of linear intensity below
+  * which the signal contains ignorable quantization or other noise.
+  *
+  * For example, OPUS_SET_LSB_DEPTH(14) would be an appropriate setting
+  * for G.711 u-law input. OPUS_SET_LSB_DEPTH(16) would be appropriate
+  * for 16-bit linear pcm input with opus_encode_float().
+  *
   * When using opus_encode() instead of opus_encode_float(), or when libopus
   * is compiled for fixed-point, the encoder uses the minimum of the value
   * set here and the value 16.
+  *
   * @see OPUS_GET_LSB_DEPTH
   * @param[in] x <tt>opus_int32</tt>: Input precision in bits, between 8 and 24
   *                                   (default: 24).