Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: include/opus_defines.h

Issue 107243004: Updating Opus to release 1.1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/opus
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « include/opus_custom.h ('k') | m4/as-gcc-inline-assembly.m4 » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2010-2011 Xiph.Org Foundation, Skype Limited 1 /* Copyright (c) 2010-2011 Xiph.Org Foundation, Skype Limited
2 Written by Jean-Marc Valin and Koen Vos */ 2 Written by Jean-Marc Valin and Koen Vos */
3 /* 3 /*
4 Redistribution and use in source and binary forms, with or without 4 Redistribution and use in source and binary forms, with or without
5 modification, are permitted provided that the following conditions 5 modification, are permitted provided that the following conditions
6 are met: 6 are met:
7 7
8 - Redistributions of source code must retain the above copyright 8 - Redistributions of source code must retain the above copyright
9 notice, this list of conditions and the following disclaimer. 9 notice, this list of conditions and the following disclaimer.
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 # define OPUS_RESTRICT __restrict__ 91 # define OPUS_RESTRICT __restrict__
92 # elif (defined(_MSC_VER) && _MSC_VER >= 1400) 92 # elif (defined(_MSC_VER) && _MSC_VER >= 1400)
93 # define OPUS_RESTRICT __restrict 93 # define OPUS_RESTRICT __restrict
94 # else 94 # else
95 # define OPUS_RESTRICT 95 # define OPUS_RESTRICT
96 # endif 96 # endif
97 #else 97 #else
98 # define OPUS_RESTRICT restrict 98 # define OPUS_RESTRICT restrict
99 #endif 99 #endif
100 100
101 #if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) )
102 # if OPUS_GNUC_PREREQ(2,7)
103 # define OPUS_INLINE __inline__
104 # elif (defined(_MSC_VER))
105 # define OPUS_INLINE __inline
106 # else
107 # define OPUS_INLINE
108 # endif
109 #else
110 # define OPUS_INLINE inline
111 #endif
112
101 /**Warning attributes for opus functions 113 /**Warning attributes for opus functions
102 * NONNULL is not used in OPUS_BUILD to avoid the compiler optimizing out 114 * NONNULL is not used in OPUS_BUILD to avoid the compiler optimizing out
103 * some paranoid null checks. */ 115 * some paranoid null checks. */
104 #if defined(__GNUC__) && OPUS_GNUC_PREREQ(3, 4) 116 #if defined(__GNUC__) && OPUS_GNUC_PREREQ(3, 4)
105 # define OPUS_WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__)) 117 # define OPUS_WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__))
106 #else 118 #else
107 # define OPUS_WARN_UNUSED_RESULT 119 # define OPUS_WARN_UNUSED_RESULT
108 #endif 120 #endif
109 #if !defined(OPUS_BUILD) && defined(__GNUC__) && OPUS_GNUC_PREREQ(3, 4) 121 #if !defined(OPUS_BUILD) && defined(__GNUC__) && OPUS_GNUC_PREREQ(3, 4)
110 # define OPUS_ARG_NONNULL(_x) __attribute__ ((__nonnull__(_x))) 122 # define OPUS_ARG_NONNULL(_x) __attribute__ ((__nonnull__(_x)))
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 #define OPUS_GET_SAMPLE_RATE_REQUEST 4029 156 #define OPUS_GET_SAMPLE_RATE_REQUEST 4029
145 #define OPUS_GET_FINAL_RANGE_REQUEST 4031 157 #define OPUS_GET_FINAL_RANGE_REQUEST 4031
146 #define OPUS_GET_PITCH_REQUEST 4033 158 #define OPUS_GET_PITCH_REQUEST 4033
147 #define OPUS_SET_GAIN_REQUEST 4034 159 #define OPUS_SET_GAIN_REQUEST 4034
148 #define OPUS_GET_GAIN_REQUEST 4045 /* Should have been 4035 */ 160 #define OPUS_GET_GAIN_REQUEST 4045 /* Should have been 4035 */
149 #define OPUS_SET_LSB_DEPTH_REQUEST 4036 161 #define OPUS_SET_LSB_DEPTH_REQUEST 4036
150 #define OPUS_GET_LSB_DEPTH_REQUEST 4037 162 #define OPUS_GET_LSB_DEPTH_REQUEST 4037
151 #define OPUS_GET_LAST_PACKET_DURATION_REQUEST 4039 163 #define OPUS_GET_LAST_PACKET_DURATION_REQUEST 4039
152 #define OPUS_SET_EXPERT_FRAME_DURATION_REQUEST 4040 164 #define OPUS_SET_EXPERT_FRAME_DURATION_REQUEST 4040
153 #define OPUS_GET_EXPERT_FRAME_DURATION_REQUEST 4041 165 #define OPUS_GET_EXPERT_FRAME_DURATION_REQUEST 4041
166 #define OPUS_SET_PREDICTION_DISABLED_REQUEST 4042
167 #define OPUS_GET_PREDICTION_DISABLED_REQUEST 4043
154 168
155 /* Don't use 4045, it's already taken by OPUS_GET_GAIN_REQUEST */ 169 /* Don't use 4045, it's already taken by OPUS_GET_GAIN_REQUEST */
156 170
157 /* Macros to trigger compilation errors when the wrong types are provided to a C TL */ 171 /* Macros to trigger compilation errors when the wrong types are provided to a C TL */
158 #define __opus_check_int(x) (((void)((x) == (opus_int32)0)), (opus_int32)(x)) 172 #define __opus_check_int(x) (((void)((x) == (opus_int32)0)), (opus_int32)(x))
159 #define __opus_check_int_ptr(ptr) ((ptr) + ((ptr) - (opus_int32*)(ptr))) 173 #define __opus_check_int_ptr(ptr) ((ptr) + ((ptr) - (opus_int32*)(ptr)))
160 #define __opus_check_uint_ptr(ptr) ((ptr) + ((ptr) - (opus_uint32*)(ptr))) 174 #define __opus_check_uint_ptr(ptr) ((ptr) + ((ptr) - (opus_uint32*)(ptr)))
161 #define __opus_check_val16_ptr(ptr) ((ptr) + ((ptr) - (opus_val16*)(ptr))) 175 #define __opus_check_val16_ptr(ptr) ((ptr) + ((ptr) - (opus_val16*)(ptr)))
162 /** @endcond */ 176 /** @endcond */
163 177
(...skipping 23 matching lines...) Expand all
187 #define OPUS_BANDWIDTH_SUPERWIDEBAND 1104 /**<12 kHz bandpass @hideiniti alizer*/ 201 #define OPUS_BANDWIDTH_SUPERWIDEBAND 1104 /**<12 kHz bandpass @hideiniti alizer*/
188 #define OPUS_BANDWIDTH_FULLBAND 1105 /**<20 kHz bandpass @hideiniti alizer*/ 202 #define OPUS_BANDWIDTH_FULLBAND 1105 /**<20 kHz bandpass @hideiniti alizer*/
189 203
190 #define OPUS_FRAMESIZE_ARG 5000 /**< Select frame size from th e argument (default) */ 204 #define OPUS_FRAMESIZE_ARG 5000 /**< Select frame size from th e argument (default) */
191 #define OPUS_FRAMESIZE_2_5_MS 5001 /**< Use 2.5 ms frames */ 205 #define OPUS_FRAMESIZE_2_5_MS 5001 /**< Use 2.5 ms frames */
192 #define OPUS_FRAMESIZE_5_MS 5002 /**< Use 5 ms frames */ 206 #define OPUS_FRAMESIZE_5_MS 5002 /**< Use 5 ms frames */
193 #define OPUS_FRAMESIZE_10_MS 5003 /**< Use 10 ms frames */ 207 #define OPUS_FRAMESIZE_10_MS 5003 /**< Use 10 ms frames */
194 #define OPUS_FRAMESIZE_20_MS 5004 /**< Use 20 ms frames */ 208 #define OPUS_FRAMESIZE_20_MS 5004 /**< Use 20 ms frames */
195 #define OPUS_FRAMESIZE_40_MS 5005 /**< Use 40 ms frames */ 209 #define OPUS_FRAMESIZE_40_MS 5005 /**< Use 40 ms frames */
196 #define OPUS_FRAMESIZE_60_MS 5006 /**< Use 60 ms frames */ 210 #define OPUS_FRAMESIZE_60_MS 5006 /**< Use 60 ms frames */
197 #define OPUS_FRAMESIZE_VARIABLE 5010 /**< Optimize the frame size d ynamically */
198 211
199 /**@}*/ 212 /**@}*/
200 213
201 214
202 /** @defgroup opus_encoderctls Encoder related CTLs 215 /** @defgroup opus_encoderctls Encoder related CTLs
203 * 216 *
204 * These are convenience macros for use with the \c opus_encode_ctl 217 * These are convenience macros for use with the \c opus_encode_ctl
205 * interface. They are used to generate the appropriate series of 218 * interface. They are used to generate the appropriate series of
206 * arguments for that call, passing the correct type, size and so 219 * arguments for that call, passing the correct type, size and so
207 * on as expected for each particular request. 220 * on as expected for each particular request.
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 * <dt>OPUS_FRAMESIZE_5_MS</dt><dd>Use 2.5 ms frames.</dd> 581 * <dt>OPUS_FRAMESIZE_5_MS</dt><dd>Use 2.5 ms frames.</dd>
569 * <dt>OPUS_FRAMESIZE_10_MS</dt><dd>Use 10 ms frames.</dd> 582 * <dt>OPUS_FRAMESIZE_10_MS</dt><dd>Use 10 ms frames.</dd>
570 * <dt>OPUS_FRAMESIZE_20_MS</dt><dd>Use 20 ms frames.</dd> 583 * <dt>OPUS_FRAMESIZE_20_MS</dt><dd>Use 20 ms frames.</dd>
571 * <dt>OPUS_FRAMESIZE_40_MS</dt><dd>Use 40 ms frames.</dd> 584 * <dt>OPUS_FRAMESIZE_40_MS</dt><dd>Use 40 ms frames.</dd>
572 * <dt>OPUS_FRAMESIZE_60_MS</dt><dd>Use 60 ms frames.</dd> 585 * <dt>OPUS_FRAMESIZE_60_MS</dt><dd>Use 60 ms frames.</dd>
573 * <dt>OPUS_FRAMESIZE_VARIABLE</dt><dd>Optimize the frame size dynamically.</dd > 586 * <dt>OPUS_FRAMESIZE_VARIABLE</dt><dd>Optimize the frame size dynamically.</dd >
574 * </dl> 587 * </dl>
575 * @hideinitializer */ 588 * @hideinitializer */
576 #define OPUS_GET_EXPERT_FRAME_DURATION(x) OPUS_GET_EXPERT_FRAME_DURATION_REQUEST , __opus_check_int_ptr(x) 589 #define OPUS_GET_EXPERT_FRAME_DURATION(x) OPUS_GET_EXPERT_FRAME_DURATION_REQUEST , __opus_check_int_ptr(x)
577 590
591 /** If set to 1, disables almost all use of prediction, making frames almost
592 completely independent. This reduces quality. (default : 0)
593 * @hideinitializer */
594 #define OPUS_SET_PREDICTION_DISABLED(x) OPUS_SET_PREDICTION_DISABLED_REQUEST, __ opus_check_int(x)
595 /** Gets the encoder's configured prediction status.
596 * @hideinitializer */
597 #define OPUS_GET_PREDICTION_DISABLED(x) OPUS_GET_PREDICTION_DISABLED_REQUEST, __ opus_check_int_ptr(x)
598
578 /**@}*/ 599 /**@}*/
579 600
580 /** @defgroup opus_genericctls Generic CTLs 601 /** @defgroup opus_genericctls Generic CTLs
581 * 602 *
582 * These macros are used with the \c opus_decoder_ctl and 603 * These macros are used with the \c opus_decoder_ctl and
583 * \c opus_encoder_ctl calls to generate a particular 604 * \c opus_encoder_ctl calls to generate a particular
584 * request. 605 * request.
585 * 606 *
586 * When called on an \c OpusDecoder they apply to that 607 * When called on an \c OpusDecoder they apply to that
587 * particular decoder instance. When called on an 608 * particular decoder instance. When called on an
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 * @returns Version string 717 * @returns Version string
697 */ 718 */
698 OPUS_EXPORT const char *opus_get_version_string(void); 719 OPUS_EXPORT const char *opus_get_version_string(void);
699 /**@}*/ 720 /**@}*/
700 721
701 #ifdef __cplusplus 722 #ifdef __cplusplus
702 } 723 }
703 #endif 724 #endif
704 725
705 #endif /* OPUS_DEFINES_H */ 726 #endif /* OPUS_DEFINES_H */
OLDNEW
« no previous file with comments | « include/opus_custom.h ('k') | m4/as-gcc-inline-assembly.m4 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698