- These are convenience macros for use with the opus_encode_ctl interface.
#define OPUS_SET_COMPLEXITY(x)
Configures the encoder's computational complexity.
#define OPUS_GET_COMPLEXITY(x)
Gets the encoder's complexity configuration.
#define OPUS_SET_BITRATE(x)
Configures the bitrate in the encoder.
#define OPUS_GET_BITRATE(x)
Gets the encoder's bitrate configuration.
#define OPUS_SET_VBR(x)
Enables or disables variable bitrate (VBR) in the encoder.
#define OPUS_GET_VBR(x)
Determine if variable bitrate (VBR) is enabled in the encoder.
#define OPUS_SET_VBR_CONSTRAINT(x)
Enables or disables constrained VBR in the encoder.
#define OPUS_GET_VBR_CONSTRAINT(x)
Determine if constrained VBR is enabled in the encoder.
#define OPUS_SET_FORCE_CHANNELS(x)
Configures mono/stereo forcing in the encoder.
#define OPUS_GET_FORCE_CHANNELS(x)
Gets the encoder's forced channel configuration.
#define OPUS_SET_MAX_BANDWIDTH(x)
Configures the maximum bandpass that the encoder will select automatically.
#define OPUS_GET_MAX_BANDWIDTH(x)
Gets the encoder's configured maximum allowed bandpass.
#define OPUS_SET_BANDWIDTH(x)
Sets the encoder's bandpass to a specific value.
#define OPUS_SET_SIGNAL(x)
Configures the type of signal being encoded.
#define OPUS_GET_SIGNAL(x)
Gets the encoder's configured signal type.
#define OPUS_SET_APPLICATION(x)
Configures the encoder's intended application.
#define OPUS_GET_APPLICATION(x)
Gets the encoder's configured application.
#define OPUS_GET_LOOKAHEAD(x)
Gets the total samples of delay added by the entire codec.
#define OPUS_SET_INBAND_FEC(x)
Configures the encoder's use of inband forward error correction (FEC).
#define OPUS_GET_INBAND_FEC(x)
Gets encoder's configured use of inband forward error correction.
#define OPUS_SET_PACKET_LOSS_PERC(x)
Configures the encoder's expected packet loss percentage.
#define OPUS_GET_PACKET_LOSS_PERC(x)
Gets the encoder's configured packet loss percentage.
#define OPUS_SET_DTX(x)
Configures the encoder's use of discontinuous transmission (DTX).
#define OPUS_GET_DTX(x)
Gets encoder's configured use of discontinuous transmission.
#define OPUS_SET_LSB_DEPTH(x)
Configures the depth of signal being encoded.
#define OPUS_GET_LSB_DEPTH(x)
Gets the encoder's configured signal depth.
#define OPUS_SET_EXPERT_FRAME_DURATION(x)
Configures the encoder's use of variable duration frames.
#define OPUS_GET_EXPERT_FRAME_DURATION(x)
Gets the encoder's configured use of variable duration frames.
#define OPUS_SET_PREDICTION_DISABLED(x)
If set to 1, disables almost all use of prediction, making frames almost completely independent.
#define OPUS_GET_PREDICTION_DISABLED(x)
Gets the encoder's configured prediction status.
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:
int ret; ret = opus_encoder_ctl(enc_ctx, OPUS_SET_BANDWIDTH(OPUS_AUTO)); if (ret != OPUS_OK) return ret; opus_int32 rate; opus_encoder_ctl(enc_ctx, OPUS_GET_BANDWIDTH(&rate)); opus_encoder_ctl(enc_ctx, OPUS_RESET_STATE);
See also
Gets the encoder's configured application.
See also
Parameters
Gets the encoder's bitrate configuration.
See also
Parameters
Gets the encoder's complexity configuration.
See also
Parameters
Gets encoder's configured use of discontinuous transmission.
See also
Parameters
Gets the encoder's configured use of variable duration frames.
See also
Parameters
Gets the encoder's forced channel configuration.
See also
Parameters
Gets encoder's configured use of inband forward error correction.
See also
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
Gets the encoder's configured signal depth.
See also
Parameters
Gets the encoder's configured maximum allowed bandpass.
See also
Parameters
Gets the encoder's configured packet loss percentage.
See also
Parameters
Gets the encoder's configured prediction status.
See also
Parameters
Gets the encoder's configured signal type.
See also
Parameters
Determine if variable bitrate (VBR) is enabled in the encoder.
See also
OPUS_GET_VBR_CONSTRAINT
Parameters
Determine if constrained VBR is enabled in the encoder.
See also
OPUS_GET_VBR
Parameters
Configures the encoder's intended application. The initial value is a mandatory argument to the encoder_create function.
See also
Parameters
Sets the encoder's bandpass to a specific value. This prevents the encoder from automatically selecting the bandpass based on the available bitrate. If an application knows the bandpass of the input audio it is providing, it should normally use OPUS_SET_MAX_BANDWIDTH instead, which still gives the encoder the freedom to reduce the bandpass when the bitrate becomes too low, for better overall quality.
See also
Parameters
Configures the bitrate in the encoder. Rates from 500 to 512000 bits per second are meaningful, as well as the special values OPUS_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.
See also
Parameters
Configures the encoder's computational complexity. The supported range is 0-10 inclusive with 10 representing the highest complexity.
See also
Parameters
Configures the encoder's use of discontinuous transmission (DTX).
Note
See also
Parameters
Configures the encoder's use of variable duration frames. When variable duration is enabled, the encoder is free to use a shorter frame size than the one requested in the opus_encode*() call. It is then the user's responsibility to verify how much audio was encoded by checking the ToC byte of the encoded packet. The part of the audio that was not encoded needs to be resent to the encoder for the next call. Do not use this option unless you really know what you are doing.
See also
Parameters
Configures mono/stereo forcing in the encoder. This can force the encoder to produce packets encoded as either mono or stereo, regardless of the format of the input audio. This is useful when the caller knows that the input signal is currently a mono source embedded in a stereo stream.
See also
Parameters
Configures the encoder's use of inband forward error correction (FEC).
Note
See also
Parameters
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 also
Parameters
Configures the maximum bandpass that the encoder will select automatically. Applications should normally use this instead of OPUS_SET_BANDWIDTH (leaving that set to the default, OPUS_AUTO). This allows the application to set an upper bound based on the type of input it is providing, but still gives the encoder the freedom to reduce the bandpass when the bitrate becomes too low, for better overall quality.
See also
Parameters
Configures the encoder's expected packet loss percentage. Higher values trigger progressively more loss resistant behavior in the encoder at the expense of quality at a given bitrate in the absence of packet loss, but greater quality under loss.
See also
Parameters
If set to 1, disables almost all use of prediction, making frames almost completely independent. This reduces quality.
See also
Parameters
Configures the type of signal being encoded. This is a hint which helps the encoder's mode selection.
See also
Parameters
Enables or disables variable bitrate (VBR) in the encoder. The configured bitrate may not be met exactly because frames must be an integer number of bytes in length.
See also
OPUS_SET_VBR_CONSTRAINT
Parameters
Enables or disables constrained VBR in the encoder. This setting is ignored when the encoder is in CBR mode.
Warning
See also
OPUS_SET_VBR
Parameters
Generated automatically by Doxygen for Opus from the source code.