annotate src/opus-1.3/silk/control.h @ 169:223a55898ab9 tip default

Add null config files
author Chris Cannam <cannam@all-day-breakfast.com>
date Mon, 02 Mar 2020 14:03:47 +0000
parents 4664ac0c1032
children
rev   line source
cannam@154 1 /***********************************************************************
cannam@154 2 Copyright (c) 2006-2011, Skype Limited. All rights reserved.
cannam@154 3 Redistribution and use in source and binary forms, with or without
cannam@154 4 modification, are permitted provided that the following conditions
cannam@154 5 are met:
cannam@154 6 - Redistributions of source code must retain the above copyright notice,
cannam@154 7 this list of conditions and the following disclaimer.
cannam@154 8 - Redistributions in binary form must reproduce the above copyright
cannam@154 9 notice, this list of conditions and the following disclaimer in the
cannam@154 10 documentation and/or other materials provided with the distribution.
cannam@154 11 - Neither the name of Internet Society, IETF or IETF Trust, nor the
cannam@154 12 names of specific contributors, may be used to endorse or promote
cannam@154 13 products derived from this software without specific prior written
cannam@154 14 permission.
cannam@154 15 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
cannam@154 16 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
cannam@154 17 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
cannam@154 18 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
cannam@154 19 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
cannam@154 20 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
cannam@154 21 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
cannam@154 22 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
cannam@154 23 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
cannam@154 24 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
cannam@154 25 POSSIBILITY OF SUCH DAMAGE.
cannam@154 26 ***********************************************************************/
cannam@154 27
cannam@154 28 #ifndef SILK_CONTROL_H
cannam@154 29 #define SILK_CONTROL_H
cannam@154 30
cannam@154 31 #include "typedef.h"
cannam@154 32
cannam@154 33 #ifdef __cplusplus
cannam@154 34 extern "C"
cannam@154 35 {
cannam@154 36 #endif
cannam@154 37
cannam@154 38 /* Decoder API flags */
cannam@154 39 #define FLAG_DECODE_NORMAL 0
cannam@154 40 #define FLAG_PACKET_LOST 1
cannam@154 41 #define FLAG_DECODE_LBRR 2
cannam@154 42
cannam@154 43 /***********************************************/
cannam@154 44 /* Structure for controlling encoder operation */
cannam@154 45 /***********************************************/
cannam@154 46 typedef struct {
cannam@154 47 /* I: Number of channels; 1/2 */
cannam@154 48 opus_int32 nChannelsAPI;
cannam@154 49
cannam@154 50 /* I: Number of channels; 1/2 */
cannam@154 51 opus_int32 nChannelsInternal;
cannam@154 52
cannam@154 53 /* I: Input signal sampling rate in Hertz; 8000/12000/16000/24000/32000/44100/48000 */
cannam@154 54 opus_int32 API_sampleRate;
cannam@154 55
cannam@154 56 /* I: Maximum internal sampling rate in Hertz; 8000/12000/16000 */
cannam@154 57 opus_int32 maxInternalSampleRate;
cannam@154 58
cannam@154 59 /* I: Minimum internal sampling rate in Hertz; 8000/12000/16000 */
cannam@154 60 opus_int32 minInternalSampleRate;
cannam@154 61
cannam@154 62 /* I: Soft request for internal sampling rate in Hertz; 8000/12000/16000 */
cannam@154 63 opus_int32 desiredInternalSampleRate;
cannam@154 64
cannam@154 65 /* I: Number of samples per packet in milliseconds; 10/20/40/60 */
cannam@154 66 opus_int payloadSize_ms;
cannam@154 67
cannam@154 68 /* I: Bitrate during active speech in bits/second; internally limited */
cannam@154 69 opus_int32 bitRate;
cannam@154 70
cannam@154 71 /* I: Uplink packet loss in percent (0-100) */
cannam@154 72 opus_int packetLossPercentage;
cannam@154 73
cannam@154 74 /* I: Complexity mode; 0 is lowest, 10 is highest complexity */
cannam@154 75 opus_int complexity;
cannam@154 76
cannam@154 77 /* I: Flag to enable in-band Forward Error Correction (FEC); 0/1 */
cannam@154 78 opus_int useInBandFEC;
cannam@154 79
cannam@154 80 /* I: Flag to actually code in-band Forward Error Correction (FEC) in the current packet; 0/1 */
cannam@154 81 opus_int LBRR_coded;
cannam@154 82
cannam@154 83 /* I: Flag to enable discontinuous transmission (DTX); 0/1 */
cannam@154 84 opus_int useDTX;
cannam@154 85
cannam@154 86 /* I: Flag to use constant bitrate */
cannam@154 87 opus_int useCBR;
cannam@154 88
cannam@154 89 /* I: Maximum number of bits allowed for the frame */
cannam@154 90 opus_int maxBits;
cannam@154 91
cannam@154 92 /* I: Causes a smooth downmix to mono */
cannam@154 93 opus_int toMono;
cannam@154 94
cannam@154 95 /* I: Opus encoder is allowing us to switch bandwidth */
cannam@154 96 opus_int opusCanSwitch;
cannam@154 97
cannam@154 98 /* I: Make frames as independent as possible (but still use LPC) */
cannam@154 99 opus_int reducedDependency;
cannam@154 100
cannam@154 101 /* O: Internal sampling rate used, in Hertz; 8000/12000/16000 */
cannam@154 102 opus_int32 internalSampleRate;
cannam@154 103
cannam@154 104 /* O: Flag that bandwidth switching is allowed (because low voice activity) */
cannam@154 105 opus_int allowBandwidthSwitch;
cannam@154 106
cannam@154 107 /* O: Flag that SILK runs in WB mode without variable LP filter (use for switching between WB/SWB/FB) */
cannam@154 108 opus_int inWBmodeWithoutVariableLP;
cannam@154 109
cannam@154 110 /* O: Stereo width */
cannam@154 111 opus_int stereoWidth_Q14;
cannam@154 112
cannam@154 113 /* O: Tells the Opus encoder we're ready to switch */
cannam@154 114 opus_int switchReady;
cannam@154 115
cannam@154 116 /* O: SILK Signal type */
cannam@154 117 opus_int signalType;
cannam@154 118
cannam@154 119 /* O: SILK offset (dithering) */
cannam@154 120 opus_int offset;
cannam@154 121 } silk_EncControlStruct;
cannam@154 122
cannam@154 123 /**************************************************************************/
cannam@154 124 /* Structure for controlling decoder operation and reading decoder status */
cannam@154 125 /**************************************************************************/
cannam@154 126 typedef struct {
cannam@154 127 /* I: Number of channels; 1/2 */
cannam@154 128 opus_int32 nChannelsAPI;
cannam@154 129
cannam@154 130 /* I: Number of channels; 1/2 */
cannam@154 131 opus_int32 nChannelsInternal;
cannam@154 132
cannam@154 133 /* I: Output signal sampling rate in Hertz; 8000/12000/16000/24000/32000/44100/48000 */
cannam@154 134 opus_int32 API_sampleRate;
cannam@154 135
cannam@154 136 /* I: Internal sampling rate used, in Hertz; 8000/12000/16000 */
cannam@154 137 opus_int32 internalSampleRate;
cannam@154 138
cannam@154 139 /* I: Number of samples per packet in milliseconds; 10/20/40/60 */
cannam@154 140 opus_int payloadSize_ms;
cannam@154 141
cannam@154 142 /* O: Pitch lag of previous frame (0 if unvoiced), measured in samples at 48 kHz */
cannam@154 143 opus_int prevPitchLag;
cannam@154 144 } silk_DecControlStruct;
cannam@154 145
cannam@154 146 #ifdef __cplusplus
cannam@154 147 }
cannam@154 148 #endif
cannam@154 149
cannam@154 150 #endif