annotate src/opus-1.3/silk/control.h @ 83:ae30d91d2ffe

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