diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2016-04-20 13:27:06 -0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2016-09-01 01:23:06 -0400 |
commit | 18a380a7c209b482f63adeb19f5d398dcb1c10bd (patch) | |
tree | a1e39f2e7e961e12132adcd48e9415ec6438c1be /include | |
parent | 6db0908db3378c79c554a863bb4033465be7bc4a (diff) | |
download | opus-18a380a7c209b482f63adeb19f5d398dcb1c10bd.tar.gz |
Make it possible to ignore inverted phase stereo for downmix purposesexp_bitstream7
Diffstat (limited to 'include')
-rw-r--r-- | include/opus_defines.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/include/opus_defines.h b/include/opus_defines.h index 315412dd..0d9aab08 100644 --- a/include/opus_defines.h +++ b/include/opus_defines.h @@ -165,8 +165,9 @@ extern "C" { #define OPUS_GET_EXPERT_FRAME_DURATION_REQUEST 4041 #define OPUS_SET_PREDICTION_DISABLED_REQUEST 4042 #define OPUS_GET_PREDICTION_DISABLED_REQUEST 4043 - /* Don't use 4045, it's already taken by OPUS_GET_GAIN_REQUEST */ +#define OPUS_SET_PHASE_INVERSION_DISABLED_REQUEST 4046 +#define OPUS_GET_PHASE_INVERSION_DISABLED_REQUEST 4047 /* Macros to trigger compilation errors when the wrong types are provided to a CTL */ #define __opus_check_int(x) (((void)((x) == (opus_int32)0)), (opus_int32)(x)) @@ -681,6 +682,29 @@ extern "C" { */ #define OPUS_GET_SAMPLE_RATE(x) OPUS_GET_SAMPLE_RATE_REQUEST, __opus_check_int_ptr(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. Disabling phase + * inversion does not comply with RFC6716, even though it does not cause any + * interoperability issue. It will become part of the Opus standard once RFC6716 gets + * updated with draft-ietf-codec-opus-update. + * @see OPUS_GET_PHASE_INVERSION_DISABLED + * @param[in] x <tt>opus_int32</tt>: Allowed values: + * <dl> + * <dt>0</dt><dd>Enable phase inversion (default).</dd> + * <dt>1</dt><dd>Disable phase inversion.</dd> + * </dl> + * @hideinitializer */ +#define OPUS_SET_PHASE_INVERSION_DISABLED(x) OPUS_SET_PHASE_INVERSION_DISABLED_REQUEST, __opus_check_int(x) +/** Gets the encoder's configured phase inversion status. + * @see OPUS_SET_PHASE_INVERSION_DISABLED + * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values: + * <dl> + * <dt>0</dt><dd>Stereo phase inversion enabled (default).</dd> + * <dt>1</dt><dd>Stereo phase inversion disabled.</dd> + * </dl> + * @hideinitializer */ +#define OPUS_GET_PHASE_INVERSION_DISABLED(x) OPUS_GET_PHASE_INVERSION_DISABLED_REQUEST, __opus_check_int_ptr(x) + /**@}*/ /** @defgroup opus_decoderctls Decoder related CTLs |