These are convenience macros for use with the opus_encode_ctl
interface.
More...
Detailed Description
These are convenience macros for use with the opus_encode_ctl
interface.
They are used to generate the appropriate series of arguments for that call, passing the correct type, size and so on as expected for each particular request.
Some usage examples:
- See also:
- Generic CTLs, Opus Encoder
Define Documentation
Gets the encoder's configured application.
- See also:
- OPUS_SET_APPLICATION
- Parameters:
-
[out] | x | int* : Application value |
Gets the encoder's bitrate configuration.
- See also:
- OPUS_SET_BITRATE
- Parameters:
-
[out] | x | opus_int32* : bitrate in bits per second. |
Gets the encoder's complexity configuration.
- See also:
- OPUS_SET_COMPLEXITY
- Parameters:
-
[out] | x | int* : 0-10, inclusive |
Gets encoder's configured use of discontinuous transmission.
- See also:
- OPUS_SET_DTX
- Parameters:
-
Gets the encoder's forced channel configuration.
- See also:
- OPUS_SET_FORCE_CHANNELS
- Parameters:
-
[out] | x | int* : OPUS_AUTO; 0; 1 |
Gets encoder's configured use of inband forward error correction.
- See also:
- OPUS_SET_INBAND_FEC
- Parameters:
-
Gets the total samples of delay added by the entire codec.
This can be queried by the encoder and then the provided number of samples can be skipped on from the start of the decoder's output to provide time aligned input and output. From the perspective of a decoding application the real data begins this many samples late.
The decoder contribution to this delay is identical for all decoders, but the encoder portion of the delay may vary from implementation to implementation, version to version, or even depend on the encoder's initial configuration. Applications needing delay compensation should call this CTL rather than hard-coding a value.
- Parameters:
-
[out] | x | int* : Number of lookahead samples |
Gets the encoder's configured maximum bandpass allowed.
- See also:
- OPUS_SET_MAX_BANDWIDTH
- Parameters:
-
[out] | x | int* : Bandwidth value |
Gets the encoder's configured packet loss percentage.
- See also:
- OPUS_SET_PACKET_LOSS_PERC
- Parameters:
-
[out] | x | int* : Loss percentage in the range 0-100, inclusive. |
Gets the encoder's configured signal type.
- See also:
- OPUS_SET_SIGNAL
- Parameters:
-
Gets the encoder's VBR configuration.
- See also:
- OPUS_SET_VBR
- Parameters:
-
Configures the encoder's intended application.
The initial value is a mandatory argument to the encoder_create function. The supported values are:
- OPUS_APPLICATION_VOIP Process signal for improved speech intelligibility
- OPUS_APPLICATION_AUDIO Favor faithfulness to the original input
- OPUS_APPLICATION_RESTRICTED_LOWDELAY Configure the minimum possible coding delay
- Parameters:
-
[in] | x | int : Application value |
Configures the encoder's bandpass.
- See also:
- OPUS_GET_BANDWIDTH The supported values are:
- Parameters:
-
[in] | x | int : Bandwidth value |
Configures the bitrate in the encoder.
Rates from 500 to 512000 bits per second are meaningful as well as the special values OPUS_BITRATE_AUTO and OPUS_BITRATE_MAX. The value OPUS_BITRATE_MAX can be used to cause the codec to use as much rate as it can, which is useful for controlling the rate by adjusting the output buffer size.
- Parameters:
-
[in] | x | opus_int32 : bitrate in bits per second. |
Configures the encoder's computational complexity.
The supported range is 0-10 inclusive with 10 representing the highest complexity. The default value is 10.
- Parameters:
-
[in] | x | int : 0-10, inclusive |
Configures the encoder's use of discontinuous transmission.
- Note:
- This is only applicable to the LPC layer
- Parameters:
-
[in] | x | int : DTX flag, 0 (disabled) is default |
Configures mono/stereo forcing in the encoder.
This is useful when the caller knows that the input signal is currently a mono source embedded in a stereo stream.
- Parameters:
-
[in] | x | int : OPUS_AUTO (default); 1 (forced mono); 2 (forced stereo) |
Configures the encoder's use of inband forward error correction.
- Note:
- This is only applicable to the LPC layer
- Parameters:
-
[in] | x | int : FEC flag, 0 (disabled) is default |
Configures the encoder's maximum bandpass allowed.
- See also:
- OPUS_GET_MAX_BANDWIDTH The supported values are:
- Parameters:
-
[in] | x | int : Bandwidth value |
Configures the encoder's expected packet loss percentage.
Higher values with trigger progressively more loss resistant behavior in the encoder at the expense of quality at a given bitrate in the lossless case, but greater quality under loss.
- Parameters:
-
[in] | x | int : Loss percentage in the range 0-100, inclusive. |
Configures the type of signal being encoded.
This is a hint which helps the encoder's mode selection. The supported values are:
- OPUS_SIGNAL_AUTO (default)
- OPUS_SIGNAL_VOICE
- OPUS_SIGNAL_MUSIC
- Parameters:
-
Configures VBR in the encoder.
The following values are currently supported:
- 0 CBR
- 1 VBR (default) The configured bitrate may not be met exactly because frames must be an integer number of bytes in length.
- Warning:
- Only the MDCT mode of Opus can provide hard CBR behavior.
- Parameters:
-
Configures constrained VBR in the encoder.
The following values are currently supported:
- 0 Unconstrained VBR (default)
- 1 Maximum one frame buffering delay assuming transport with a serialization speed of the nominal bitrate This setting is irrelevant when the encoder is in CBR mode.
- Warning:
- Only the MDCT mode of Opus currently heeds the constraint. Speech mode ignores it completely, hybrid mode may fail to obey it if the LPC layer uses more bitrate than the constraint would have permitted.
- Parameters:
-