| opus_defines.h | | opus_defines.h | |
| | | | |
| skipping to change at line 116 | | skipping to change at line 116 | |
| #define OPUS_GET_FINAL_RANGE_REQUEST 4031 | | #define OPUS_GET_FINAL_RANGE_REQUEST 4031 | |
| #define OPUS_GET_PITCH_REQUEST 4033 | | #define OPUS_GET_PITCH_REQUEST 4033 | |
| | | | |
| /* Macros to trigger compilation errors when the wrong types are provided t
o a CTL */ | | /* Macros to trigger compilation errors when the wrong types are provided t
o a CTL */ | |
| #define __opus_check_int(x) (((void)((x) == (opus_int32)0)), (opus_int32)(x
)) | | #define __opus_check_int(x) (((void)((x) == (opus_int32)0)), (opus_int32)(x
)) | |
| #define __opus_check_int_ptr(ptr) ((ptr) + ((ptr) - (opus_int32*)(ptr))) | | #define __opus_check_int_ptr(ptr) ((ptr) + ((ptr) - (opus_int32*)(ptr))) | |
| #define __opus_check_uint_ptr(ptr) ((ptr) + ((ptr) - (opus_uint32*)(ptr))) | | #define __opus_check_uint_ptr(ptr) ((ptr) + ((ptr) - (opus_uint32*)(ptr))) | |
| /** @endcond */ | | /** @endcond */ | |
| | | | |
| /** @defgroup ctlvalues Pre-defined values for CTL interface | | /** @defgroup ctlvalues Pre-defined values for CTL interface | |
|
| * @see genericctls,encoderctls | | * @see genericctls, encoderctls | |
| * @{ | | * @{ | |
| */ | | */ | |
| /* Values for the various encoder CTLs */ | | /* Values for the various encoder CTLs */ | |
| #define OPUS_AUTO -1000 /**<Auto/default setting
@hideinitializer*/ | | #define OPUS_AUTO -1000 /**<Auto/default setting
@hideinitializer*/ | |
| #define OPUS_BITRATE_MAX -1 /**<Maximum bitrate @hide
initializer*/ | | #define OPUS_BITRATE_MAX -1 /**<Maximum bitrate @hide
initializer*/ | |
| | | | |
| /** Best for "standard" VoIP/videoconference applications where listening q
uality and intelligibility matter most | | /** Best for "standard" VoIP/videoconference applications where listening q
uality and intelligibility matter most | |
| * @hideinitializer */ | | * @hideinitializer */ | |
| #define OPUS_APPLICATION_VOIP 2048 | | #define OPUS_APPLICATION_VOIP 2048 | |
| /** Best for broadcast/high-fidelity application where the decoded audio sh
ould be as close as possible to the input | | /** Best for broadcast/high-fidelity application where the decoded audio sh
ould be as close as possible to the input | |
| | | | |
| skipping to change at line 144 | | skipping to change at line 144 | |
| #define OPUS_SIGNAL_MUSIC 3002 /**< Signal being encoded
is music */ | | #define OPUS_SIGNAL_MUSIC 3002 /**< Signal being encoded
is music */ | |
| #define OPUS_BANDWIDTH_NARROWBAND 1101 /**< 4kHz bandpass @hidei
nitializer*/ | | #define OPUS_BANDWIDTH_NARROWBAND 1101 /**< 4kHz bandpass @hidei
nitializer*/ | |
| #define OPUS_BANDWIDTH_MEDIUMBAND 1102 /**< 6kHz bandpass @hidei
nitializer*/ | | #define OPUS_BANDWIDTH_MEDIUMBAND 1102 /**< 6kHz bandpass @hidei
nitializer*/ | |
| #define OPUS_BANDWIDTH_WIDEBAND 1103 /**< 8kHz bandpass @hidei
nitializer*/ | | #define OPUS_BANDWIDTH_WIDEBAND 1103 /**< 8kHz bandpass @hidei
nitializer*/ | |
| #define OPUS_BANDWIDTH_SUPERWIDEBAND 1104 /**<12kHz bandpass @hidei
nitializer*/ | | #define OPUS_BANDWIDTH_SUPERWIDEBAND 1104 /**<12kHz bandpass @hidei
nitializer*/ | |
| #define OPUS_BANDWIDTH_FULLBAND 1105 /**<20kHz bandpass @hidei
nitializer*/ | | #define OPUS_BANDWIDTH_FULLBAND 1105 /**<20kHz bandpass @hidei
nitializer*/ | |
| | | | |
| /**@}*/ | | /**@}*/ | |
| | | | |
| /** @defgroup encoderctls Encoder related CTLs | | /** @defgroup encoderctls Encoder related CTLs | |
|
| * @see genericctls,opusencoder | | * | |
| | | * These are convenience macros for use with the \c 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: | |
| | | * | |
| | | * @code | |
| | | * int ret; | |
| | | * ret = opus_encoder_ctl(enc_ctx, OPUS_SET_BANDWIDTH(OPUS_AUTO)); | |
| | | * if (ret != OPUS_OK) return ret; | |
| | | * | |
| | | * int rate; | |
| | | * opus_encoder_ctl(enc_ctx, OPUS_GET_BANDWIDTH(&rate)); | |
| | | * | |
| | | * opus_encoder_ctl(enc_ctx, OPUS_RESET_STATE); | |
| | | * @endcode | |
| | | * | |
| | | * @see genericctls, opusencoder | |
| * @{ | | * @{ | |
| */ | | */ | |
| | | | |
| /** Configures the encoder's computational complexity. | | /** Configures the encoder's computational complexity. | |
| * The supported range is 0-10 inclusive with 10 representing the highest
complexity. | | * The supported range is 0-10 inclusive with 10 representing the highest
complexity. | |
| * The default value is 10. | | * The default value is 10. | |
| * @param[in] x <tt>int</tt>: 0-10, inclusive | | * @param[in] x <tt>int</tt>: 0-10, inclusive | |
| * @hideinitializer */ | | * @hideinitializer */ | |
| #define OPUS_SET_COMPLEXITY(x) OPUS_SET_COMPLEXITY_REQUEST, __opus_check_in
t(x) | | #define OPUS_SET_COMPLEXITY(x) OPUS_SET_COMPLEXITY_REQUEST, __opus_check_in
t(x) | |
| /** Gets the encoder's complexity configuration, @see OPUS_SET_COMPLEXITY | | /** Gets the encoder's complexity configuration, @see OPUS_SET_COMPLEXITY | |
| | | | |
| skipping to change at line 264 | | skipping to change at line 283 | |
| * | | * | |
| * @param[out] x <tt>int*</tt>: Signal type | | * @param[out] x <tt>int*</tt>: Signal type | |
| * @hideinitializer */ | | * @hideinitializer */ | |
| #define OPUS_GET_SIGNAL(x) OPUS_GET_SIGNAL_REQUEST, __opus_check_int_ptr(x) | | #define OPUS_GET_SIGNAL(x) OPUS_GET_SIGNAL_REQUEST, __opus_check_int_ptr(x) | |
| | | | |
| /** Configures the encoder's intended application. | | /** Configures the encoder's intended application. | |
| * The initial value is a mandatory argument to the encoder_create functio
n. | | * The initial value is a mandatory argument to the encoder_create functio
n. | |
| * The supported values are: | | * The supported values are: | |
| * - OPUS_APPLICATION_VOIP Process signal for improved speech intelligibi
lity | | * - OPUS_APPLICATION_VOIP Process signal for improved speech intelligibi
lity | |
| * - OPUS_APPLICATION_AUDIO Favor faithfulness to the original input | | * - OPUS_APPLICATION_AUDIO Favor faithfulness to the original input | |
|
| | | * - OPUS_APPLICATION_RESTRICTED_LOWDELAY Configure the minimum possible | |
| | | coding delay | |
| | | * | |
| * @param[in] x <tt>int</tt>: Application value | | * @param[in] x <tt>int</tt>: Application value | |
| * @hideinitializer */ | | * @hideinitializer */ | |
| #define OPUS_SET_APPLICATION(x) OPUS_SET_APPLICATION_REQUEST, __opus_check_
int(x) | | #define OPUS_SET_APPLICATION(x) OPUS_SET_APPLICATION_REQUEST, __opus_check_
int(x) | |
| /** Gets the encoder's configured application, @see OPUS_SET_APPLICATION | | /** Gets the encoder's configured application, @see OPUS_SET_APPLICATION | |
| * | | * | |
| * @param[out] x <tt>int*</tt>: Application value | | * @param[out] x <tt>int*</tt>: Application value | |
| * @hideinitializer */ | | * @hideinitializer */ | |
| #define OPUS_GET_APPLICATION(x) OPUS_GET_APPLICATION_REQUEST, __opus_check_
int_ptr(x) | | #define OPUS_GET_APPLICATION(x) OPUS_GET_APPLICATION_REQUEST, __opus_check_
int_ptr(x) | |
| | | | |
| /** Gets the total samples of delay added by the entire codec. | | /** Gets the total samples of delay added by the entire codec. | |
| | | | |
| skipping to change at line 328 | | skipping to change at line 349 | |
| * @hideinitializer */ | | * @hideinitializer */ | |
| #define OPUS_SET_DTX(x) OPUS_SET_DTX_REQUEST, __opus_check_int(x) | | #define OPUS_SET_DTX(x) OPUS_SET_DTX_REQUEST, __opus_check_int(x) | |
| /** Gets encoder's configured use of discontinuous transmission, @see OPUS_
SET_DTX | | /** Gets encoder's configured use of discontinuous transmission, @see OPUS_
SET_DTX | |
| * | | * | |
| * @param[out] x <tt>int*</tt>: DTX flag | | * @param[out] x <tt>int*</tt>: DTX flag | |
| * @hideinitializer */ | | * @hideinitializer */ | |
| #define OPUS_GET_DTX(x) OPUS_GET_DTX_REQUEST, __opus_check_int_ptr(x) | | #define OPUS_GET_DTX(x) OPUS_GET_DTX_REQUEST, __opus_check_int_ptr(x) | |
| /**@}*/ | | /**@}*/ | |
| | | | |
| /** @defgroup genericctls Generic CTLs | | /** @defgroup genericctls Generic CTLs | |
|
| * @see opus_encoder_ctl,opusencoder,opusdecoder | | * | |
| | | * These macros are used with the \c opus_decoder_ctl and | |
| | | * \c opus_encoder_ctl calls to generate a particular | |
| | | * request. | |
| | | * | |
| | | * When called on an \c OpusDecoder they apply to that | |
| | | * particular decoder instance. When called on an | |
| | | * \c OpusEncoder they apply to the corresponding setting | |
| | | * on that encoder instance, if present. | |
| | | * | |
| | | * Some usage examples: | |
| | | * | |
| | | * @code | |
| | | * 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!\n"); | |
| | | * } | |
| | | * @endcode | |
| | | * | |
| | | * @see opusencoder, opus_decoder_ctl, opus_encoder_ctl | |
| * @{ | | * @{ | |
| */ | | */ | |
| | | | |
| /** Resets the codec state to be equivalent to a freshly initialized state. | | /** Resets the codec state to be equivalent to a freshly initialized state. | |
| * This should be called when switching streams in order to prevent | | * This should be called when switching streams in order to prevent | |
| * the back to back decoding from giving different results from | | * the back to back decoding from giving different results from | |
| * one at a time decoding. | | * one at a time decoding. | |
| * @hideinitializer */ | | * @hideinitializer */ | |
| #define OPUS_RESET_STATE 4028 | | #define OPUS_RESET_STATE 4028 | |
| | | | |
| | | | |
| skipping to change at line 354 | | skipping to change at line 404 | |
| * @param[out] x <tt>opus_uint32*</tt>: Entropy coder state | | * @param[out] x <tt>opus_uint32*</tt>: Entropy coder state | |
| * | | * | |
| * @hideinitializer */ | | * @hideinitializer */ | |
| #define OPUS_GET_FINAL_RANGE(x) OPUS_GET_FINAL_RANGE_REQUEST, __opus_check_
uint_ptr(x) | | #define OPUS_GET_FINAL_RANGE(x) OPUS_GET_FINAL_RANGE_REQUEST, __opus_check_
uint_ptr(x) | |
| | | | |
| /** Gets the pitch of the last decoded frame, if available. | | /** Gets the pitch of the last decoded frame, if available. | |
| * This can be used for any post-processing algorithm requiring the use of
pitch, | | * This can be used for any post-processing algorithm requiring the use of
pitch, | |
| * e.g. time stretching/shortening. If the last frame was not voiced, or i
f the | | * e.g. time stretching/shortening. If the last frame was not voiced, or i
f the | |
| * pitch was not coded in the frame, then zero is returned. | | * pitch was not coded in the frame, then zero is returned. | |
| * | | * | |
|
| | | * This CTL is only implemented for decoder instances. | |
| | | * | |
| * @param[out] x <tt>opus_int32*</tt>: pitch period at 48 kHz (or 0 if not
available) | | * @param[out] x <tt>opus_int32*</tt>: pitch period at 48 kHz (or 0 if not
available) | |
| * | | * | |
| * @hideinitializer */ | | * @hideinitializer */ | |
| #define OPUS_GET_PITCH(x) OPUS_GET_PITCH_REQUEST, __opus_check_int_ptr(x) | | #define OPUS_GET_PITCH(x) OPUS_GET_PITCH_REQUEST, __opus_check_int_ptr(x) | |
| | | | |
| /** Gets the encoder's configured bandpass or the decoder's last bandpass,
@see OPUS_SET_BANDWIDTH | | /** Gets the encoder's configured bandpass or the decoder's last bandpass,
@see OPUS_SET_BANDWIDTH | |
| * @param[out] x <tt>int*</tt>: Bandwidth value | | * @param[out] x <tt>int*</tt>: Bandwidth value | |
| * @hideinitializer */ | | * @hideinitializer */ | |
| #define OPUS_GET_BANDWIDTH(x) OPUS_GET_BANDWIDTH_REQUEST, __opus_check_int_
ptr(x) | | #define OPUS_GET_BANDWIDTH(x) OPUS_GET_BANDWIDTH_REQUEST, __opus_check_int_
ptr(x) | |
| | | | |
| | | | |
End of changes. 5 change blocks. |
| 3 lines changed or deleted | | 56 lines changed or added | |
|