opus_genericctls(3) Opus opus_genericctls(3) NNAAMMEE opus_genericctls - These macros are used with the opus_decoder_ctl and opus_encoder_ctl calls to generate a particular request. SSYYNNOOPPSSIISS MMaaccrrooss #define OOPPUUSS__RREESSEETT__SSTTAATTEE Resets the codec state to be equivalent to a freshly initialized state. #define OOPPUUSS__GGEETT__FFIINNAALL__RRAANNGGEE(x) Gets the final state of the codec's entropy coder. #define OOPPUUSS__GGEETT__BBAANNDDWWIIDDTTHH(x) Gets the encoder's configured bandpass or the decoder's last bandpass. #define OOPPUUSS__GGEETT__SSAAMMPPLLEE__RRAATTEE(x) Gets the sampling rate the encoder or decoder was initialized with. #define OOPPUUSS__SSEETT__PPHHAASSEE__IINNVVEERRSSIIOONN__DDIISSAABBLLEEDD(x) If set to 1, disables the use of phase inversion for intensity stereo, improving the quality of mono downmixes, but slightly reducing normal stereo quality. #define OOPPUUSS__GGEETT__PPHHAASSEE__IINNVVEERRSSIIOONN__DDIISSAABBLLEEDD(x) Gets the encoder's configured phase inversion status. #define OOPPUUSS__GGEETT__IINN__DDTTXX(x) Gets the DTX state of the encoder. DDeettaaiilleedd DDeessccrriippttiioonn These macros are used with the opus_decoder_ctl and opus_encoder_ctl calls to generate a particular request. When called on an OpusDecoder they apply to that particular decoder instance. When called on an OpusEncoder they apply to the corresponding setting on that encoder instance, if present. Some usage examples: int ret; opus_int32 pitch; ret = opus_decoder_ctl(dec_ctx, OPUS_GET_PITCH(&pitch)); if (ret == OPUS_OK) return ret; opus_encoder_ctl(enc_ctx, OPUS_RESET_STATE); opus_decoder_ctl(dec_ctx, OPUS_RESET_STATE); opus_int32 enc_bw, dec_bw; opus_encoder_ctl(enc_ctx, OPUS_GET_BANDWIDTH(&enc_bw)); opus_decoder_ctl(dec_ctx, OPUS_GET_BANDWIDTH(&dec_bw)); if (enc_bw != dec_bw) { printf("packet bandwidth mismatch!0); } SSeeee aallssoo:: OOppuuss EEnnccooddeerr, ooppuuss__ddeeccooddeerr__ccttll, ooppuuss__eennccooddeerr__ccttll, DDeeccooddeerr rreellaatteedd CCTTLLss, EEnnccooddeerr rreellaatteedd CCTTLLss MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ##ddeeffiinnee OOPPUUSS__GGEETT__BBAANNDDWWIIDDTTHH((xx)) Gets the encoder's configured bandpass or the decoder's last bandpass. SSeeee aallssoo:: OOPPUUSS__SSEETT__BBAANNDDWWIIDDTTHH PPaarraammeetteerrss:: _x opus_int32 *: Returns one of the following values: OOPPUUSS__AAUUTTOO (default) OOPPUUSS__BBAANNDDWWIIDDTTHH__NNAARRRROOWWBBAANNDD 4 kHz passband OOPPUUSS__BBAANNDDWWIIDDTTHH__MMEEDDIIUUMMBBAANNDD 6 kHz passband OOPPUUSS__BBAANNDDWWIIDDTTHH__WWIIDDEEBBAANNDD 8 kHz passband OOPPUUSS__BBAANNDDWWIIDDTTHH__SSUUPPEERRWWIIDDEEBBAANNDD 12 kHz passband OOPPUUSS__BBAANNDDWWIIDDTTHH__FFUULLLLBBAANNDD 20 kHz passband ##ddeeffiinnee OOPPUUSS__GGEETT__FFIINNAALL__RRAANNGGEE((xx)) Gets the final state of the codec's entropy coder. This is used for testing purposes, The encoder and decoder state should be identical after coding a payload (assuming no data corruption or software bugs) PPaarraammeetteerrss:: _x opus_uint32 *: Entropy coder state ##ddeeffiinnee OOPPUUSS__GGEETT__IINN__DDTTXX((xx)) Gets the DTX state of the encoder. Returns whether the last encoded frame was either a comfort noise update during DTX or not encoded because of DTX. PPaarraammeetteerrss:: _x opus_int32 *: Returns one of the following values: 00 The encoder is not in DTX. 11 The encoder is in DTX. ##ddeeffiinnee OOPPUUSS__GGEETT__PPHHAASSEE__IINNVVEERRSSIIOONN__DDIISSAABBLLEEDD((xx)) Gets the encoder's configured phase inversion status. SSeeee aallssoo:: OOPPUUSS__SSEETT__PPHHAASSEE__IINNVVEERRSSIIOONN__DDIISSAABBLLEEDD PPaarraammeetteerrss:: _x opus_int32 *: Returns one of the following values: 00 Stereo phase inversion enabled (default). 11 Stereo phase inversion disabled. ##ddeeffiinnee OOPPUUSS__GGEETT__SSAAMMPPLLEE__RRAATTEE((xx)) Gets the sampling rate the encoder or decoder was initialized with. This simply returns the Fs value passed to ooppuuss__eennccooddeerr__iinniitt(()) or ooppuuss__ddeeccooddeerr__iinniitt(()). PPaarraammeetteerrss:: _x opus_int32 *: Sampling rate of encoder or decoder. ##ddeeffiinnee OOPPUUSS__RREESSEETT__SSTTAATTEE Resets the codec state to be equivalent to a freshly initialized state. This should be called when switching streams in order to prevent the back to back decoding from giving different results from one at a time decoding. ##ddeeffiinnee OOPPUUSS__SSEETT__PPHHAASSEE__IINNVVEERRSSIIOONN__DDIISSAABBLLEEDD((xx)) If set to 1, disables the use of phase inversion for intensity stereo, improving the quality of mono downmixes, but slightly reducing normal stereo quality. Disabling phase inversion in the decoder does not comply with RFC 6716, although it does not cause any interoperability issue and is expected to become part of the Opus standard once RFC 6716 is updated by draft-ietf-codec-opus-update. SSeeee aallssoo:: OOPPUUSS__GGEETT__PPHHAASSEE__IINNVVEERRSSIIOONN__DDIISSAABBLLEEDD PPaarraammeetteerrss:: _x opus_int32: Allowed values: 00 Enable phase inversion (default). 11 Disable phase inversion. AAuutthhoorr Generated automatically by Doxygen for Opus from the source code. Version 1.3.1 Wed Aug 24 2022 opus_genericctls(3)