Coverage Report

Created: 2025-08-28 07:12

/src/fdk-aac/libFDK/include/FDK_trigFcts.h
Line
Count
Source (jump to first uncovered line)
1
/* -----------------------------------------------------------------------------
2
Software License for The Fraunhofer FDK AAC Codec Library for Android
3
4
© Copyright  1995 - 2018 Fraunhofer-Gesellschaft zur Förderung der angewandten
5
Forschung e.V. All rights reserved.
6
7
 1.    INTRODUCTION
8
The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software
9
that implements the MPEG Advanced Audio Coding ("AAC") encoding and decoding
10
scheme for digital audio. This FDK AAC Codec software is intended to be used on
11
a wide variety of Android devices.
12
13
AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient
14
general perceptual audio codecs. AAC-ELD is considered the best-performing
15
full-bandwidth communications codec by independent studies and is widely
16
deployed. AAC has been standardized by ISO and IEC as part of the MPEG
17
specifications.
18
19
Patent licenses for necessary patent claims for the FDK AAC Codec (including
20
those of Fraunhofer) may be obtained through Via Licensing
21
(www.vialicensing.com) or through the respective patent owners individually for
22
the purpose of encoding or decoding bit streams in products that are compliant
23
with the ISO/IEC MPEG audio standards. Please note that most manufacturers of
24
Android devices already license these patent claims through Via Licensing or
25
directly from the patent owners, and therefore FDK AAC Codec software may
26
already be covered under those patent licenses when it is used for those
27
licensed purposes only.
28
29
Commercially-licensed AAC software libraries, including floating-point versions
30
with enhanced sound quality, are also available from Fraunhofer. Users are
31
encouraged to check the Fraunhofer website for additional applications
32
information and documentation.
33
34
2.    COPYRIGHT LICENSE
35
36
Redistribution and use in source and binary forms, with or without modification,
37
are permitted without payment of copyright license fees provided that you
38
satisfy the following conditions:
39
40
You must retain the complete text of this software license in redistributions of
41
the FDK AAC Codec or your modifications thereto in source code form.
42
43
You must retain the complete text of this software license in the documentation
44
and/or other materials provided with redistributions of the FDK AAC Codec or
45
your modifications thereto in binary form. You must make available free of
46
charge copies of the complete source code of the FDK AAC Codec and your
47
modifications thereto to recipients of copies in binary form.
48
49
The name of Fraunhofer may not be used to endorse or promote products derived
50
from this library without prior written permission.
51
52
You may not charge copyright license fees for anyone to use, copy or distribute
53
the FDK AAC Codec software or your modifications thereto.
54
55
Your modified versions of the FDK AAC Codec must carry prominent notices stating
56
that you changed the software and the date of any change. For modified versions
57
of the FDK AAC Codec, the term "Fraunhofer FDK AAC Codec Library for Android"
58
must be replaced by the term "Third-Party Modified Version of the Fraunhofer FDK
59
AAC Codec Library for Android."
60
61
3.    NO PATENT LICENSE
62
63
NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without
64
limitation the patents of Fraunhofer, ARE GRANTED BY THIS SOFTWARE LICENSE.
65
Fraunhofer provides no warranty of patent non-infringement with respect to this
66
software.
67
68
You may use this FDK AAC Codec software or modifications thereto only for
69
purposes that are authorized by appropriate patent licenses.
70
71
4.    DISCLAIMER
72
73
This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright
74
holders and contributors "AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES,
75
including but not limited to the implied warranties of merchantability and
76
fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
77
CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary,
78
or consequential damages, including but not limited to procurement of substitute
79
goods or services; loss of use, data, or profits, or business interruption,
80
however caused and on any theory of liability, whether in contract, strict
81
liability, or tort (including negligence), arising in any way out of the use of
82
this software, even if advised of the possibility of such damage.
83
84
5.    CONTACT INFORMATION
85
86
Fraunhofer Institute for Integrated Circuits IIS
87
Attention: Audio and Multimedia Departments - FDK AAC LL
88
Am Wolfsmantel 33
89
91058 Erlangen, Germany
90
91
www.iis.fraunhofer.de/amm
92
amm-info@iis.fraunhofer.de
93
----------------------------------------------------------------------------- */
94
95
/******************* Library for basic calculation routines ********************
96
97
   Author(s):   Haricharan Lakshman, Manuel Jander
98
99
   Description: Trigonometric functions fixed point fractional implementation.
100
101
*******************************************************************************/
102
103
#if !defined(FDK_TRIGFCTS_H)
104
#define FDK_TRIGFCTS_H
105
106
#include "common_fix.h"
107
108
#include "FDK_tools_rom.h"
109
110
/* Fixed point precision definitions */
111
#define Q(format) ((FIXP_DBL)(((LONG)1) << (format)))
112
113
#ifndef M_PI
114
#define M_PI (3.14159265358979323846f)
115
#endif
116
117
/*!
118
 * Inverse tangent function.
119
 */
120
121
/* --- fixp_atan() ----    */
122
0
#define Q_ATANINP (25)  // Input in q25, Output in q30
123
0
#define Q_ATANOUT (30)
124
0
#define ATI_SF ((DFRACT_BITS - 1) - Q_ATANINP) /* 6  */
125
#define ATI_SCALE ((float)(1 << ATI_SF))
126
0
#define ATO_SF ((DFRACT_BITS - 1) - Q_ATANOUT) /* 1   ] -pi/2 .. pi/2 [ */
127
#define ATO_SCALE ((float)(1 << ATO_SF))
128
/* --- fixp_atan2() ---    */
129
0
#define Q_ATAN2OUT (29)
130
0
#define AT2O_SF ((DFRACT_BITS - 1) - Q_ATAN2OUT) /* 2   ] -pi   .. pi   ] */
131
#define AT2O_SCALE ((float)(1 << AT2O_SF))
132
// --------------------
133
134
FIXP_DBL fixp_atan(FIXP_DBL x);
135
FIXP_DBL fixp_atan2(FIXP_DBL y, FIXP_DBL x);
136
137
FIXP_DBL fixp_cos(FIXP_DBL x, int scale);
138
FIXP_DBL fixp_sin(FIXP_DBL x, int scale);
139
140
#define FIXP_COS_SIN
141
142
#include "FDK_tools_rom.h"
143
144
190M
#define SINETAB SineTable512
145
1.51G
#define LD 9
146
147
#ifndef FUNCTION_inline_fixp_cos_sin
148
149
#define FUNCTION_inline_fixp_cos_sin
150
151
/*
152
 * Calculates coarse lookup index and sign for sine.
153
 * Returns delta x residual.
154
 */
155
static inline FIXP_DBL fixp_sin_cos_residual_inline(FIXP_DBL x, int scale,
156
                                                    FIXP_DBL *sine,
157
190M
                                                    FIXP_DBL *cosine) {
158
190M
  FIXP_DBL residual;
159
190M
  int s;
160
190M
  int shift = (31 - scale - LD - 1);
161
190M
  int ssign = 1;
162
190M
  int csign = 1;
163
164
190M
  residual = fMult(x, FL2FXCONST_DBL(1.0 / M_PI));
165
190M
  s = ((LONG)residual) >> shift;
166
167
190M
  residual &= ((1 << shift) - 1);
168
190M
  residual = fMult(residual, FL2FXCONST_DBL(M_PI / 4.0)) << 2;
169
190M
  residual <<= scale;
170
171
  /* Sine sign symmetry */
172
190M
  if (s & ((1 << LD) << 1)) {
173
252k
    ssign = -ssign;
174
252k
  }
175
  /* Cosine sign symmetry */
176
190M
  if ((s + (1 << LD)) & ((1 << LD) << 1)) {
177
79.2M
    csign = -csign;
178
79.2M
  }
179
180
190M
  s = fAbs(s);
181
182
190M
  s &= (((1 << LD) << 1) - 1); /* Modulo PI */
183
184
190M
  if (s > (1 << LD)) {
185
79.2M
    s = ((1 << LD) << 1) - s;
186
79.2M
  }
187
188
190M
  {
189
190M
    LONG sl, cl;
190
    /* Because of packed table */
191
190M
    if (s > (1 << (LD - 1))) {
192
95.8M
      FIXP_STP tmp;
193
      /* Cosine/Sine simetry for angles greater than PI/4 */
194
95.8M
      s = (1 << LD) - s;
195
95.8M
      tmp = SINETAB[s];
196
95.8M
      sl = (LONG)tmp.v.re;
197
95.8M
      cl = (LONG)tmp.v.im;
198
95.8M
    } else {
199
94.9M
      FIXP_STP tmp;
200
94.9M
      tmp = SINETAB[s];
201
94.9M
      sl = (LONG)tmp.v.im;
202
94.9M
      cl = (LONG)tmp.v.re;
203
94.9M
    }
204
205
190M
#ifdef SINETABLE_16BIT
206
190M
    *sine = (FIXP_DBL)((sl * ssign) << (DFRACT_BITS - FRACT_BITS));
207
190M
    *cosine = (FIXP_DBL)((cl * csign) << (DFRACT_BITS - FRACT_BITS));
208
#else
209
    /* scale down by 1 for overflow prevention. This is undone at the calling
210
     * function. */
211
    *sine = (FIXP_DBL)(sl * ssign) >> 1;
212
    *cosine = (FIXP_DBL)(cl * csign) >> 1;
213
#endif
214
190M
  }
215
216
190M
  return residual;
217
190M
}
Unexecuted instantiation: usacdec_lpc.cpp:fixp_sin_cos_residual_inline(int, int, int*, int*)
FDK_trigFcts.cpp:fixp_sin_cos_residual_inline(int, int, int*, int*)
Line
Count
Source
157
173M
                                                    FIXP_DBL *cosine) {
158
173M
  FIXP_DBL residual;
159
173M
  int s;
160
173M
  int shift = (31 - scale - LD - 1);
161
173M
  int ssign = 1;
162
173M
  int csign = 1;
163
164
173M
  residual = fMult(x, FL2FXCONST_DBL(1.0 / M_PI));
165
173M
  s = ((LONG)residual) >> shift;
166
167
173M
  residual &= ((1 << shift) - 1);
168
173M
  residual = fMult(residual, FL2FXCONST_DBL(M_PI / 4.0)) << 2;
169
173M
  residual <<= scale;
170
171
  /* Sine sign symmetry */
172
173M
  if (s & ((1 << LD) << 1)) {
173
0
    ssign = -ssign;
174
0
  }
175
  /* Cosine sign symmetry */
176
173M
  if ((s + (1 << LD)) & ((1 << LD) << 1)) {
177
79.1M
    csign = -csign;
178
79.1M
  }
179
180
173M
  s = fAbs(s);
181
182
173M
  s &= (((1 << LD) << 1) - 1); /* Modulo PI */
183
184
173M
  if (s > (1 << LD)) {
185
79.1M
    s = ((1 << LD) << 1) - s;
186
79.1M
  }
187
188
173M
  {
189
173M
    LONG sl, cl;
190
    /* Because of packed table */
191
173M
    if (s > (1 << (LD - 1))) {
192
95.7M
      FIXP_STP tmp;
193
      /* Cosine/Sine simetry for angles greater than PI/4 */
194
95.7M
      s = (1 << LD) - s;
195
95.7M
      tmp = SINETAB[s];
196
95.7M
      sl = (LONG)tmp.v.re;
197
95.7M
      cl = (LONG)tmp.v.im;
198
95.7M
    } else {
199
77.9M
      FIXP_STP tmp;
200
77.9M
      tmp = SINETAB[s];
201
77.9M
      sl = (LONG)tmp.v.im;
202
77.9M
      cl = (LONG)tmp.v.re;
203
77.9M
    }
204
205
173M
#ifdef SINETABLE_16BIT
206
173M
    *sine = (FIXP_DBL)((sl * ssign) << (DFRACT_BITS - FRACT_BITS));
207
173M
    *cosine = (FIXP_DBL)((cl * csign) << (DFRACT_BITS - FRACT_BITS));
208
#else
209
    /* scale down by 1 for overflow prevention. This is undone at the calling
210
     * function. */
211
    *sine = (FIXP_DBL)(sl * ssign) >> 1;
212
    *cosine = (FIXP_DBL)(cl * csign) >> 1;
213
#endif
214
173M
  }
215
216
173M
  return residual;
217
173M
}
Unexecuted instantiation: qmf.cpp:fixp_sin_cos_residual_inline(int, int, int*, int*)
Unexecuted instantiation: block.cpp:fixp_sin_cos_residual_inline(int, int, int*, int*)
Unexecuted instantiation: sac_dec.cpp:fixp_sin_cos_residual_inline(int, int, int*, int*)
sac_process.cpp:fixp_sin_cos_residual_inline(int, int, int*, int*)
Line
Count
Source
157
15.2M
                                                    FIXP_DBL *cosine) {
158
15.2M
  FIXP_DBL residual;
159
15.2M
  int s;
160
15.2M
  int shift = (31 - scale - LD - 1);
161
15.2M
  int ssign = 1;
162
15.2M
  int csign = 1;
163
164
15.2M
  residual = fMult(x, FL2FXCONST_DBL(1.0 / M_PI));
165
15.2M
  s = ((LONG)residual) >> shift;
166
167
15.2M
  residual &= ((1 << shift) - 1);
168
15.2M
  residual = fMult(residual, FL2FXCONST_DBL(M_PI / 4.0)) << 2;
169
15.2M
  residual <<= scale;
170
171
  /* Sine sign symmetry */
172
15.2M
  if (s & ((1 << LD) << 1)) {
173
205k
    ssign = -ssign;
174
205k
  }
175
  /* Cosine sign symmetry */
176
15.2M
  if ((s + (1 << LD)) & ((1 << LD) << 1)) {
177
97.0k
    csign = -csign;
178
97.0k
  }
179
180
15.2M
  s = fAbs(s);
181
182
15.2M
  s &= (((1 << LD) << 1) - 1); /* Modulo PI */
183
184
15.2M
  if (s > (1 << LD)) {
185
122k
    s = ((1 << LD) << 1) - s;
186
122k
  }
187
188
15.2M
  {
189
15.2M
    LONG sl, cl;
190
    /* Because of packed table */
191
15.2M
    if (s > (1 << (LD - 1))) {
192
103k
      FIXP_STP tmp;
193
      /* Cosine/Sine simetry for angles greater than PI/4 */
194
103k
      s = (1 << LD) - s;
195
103k
      tmp = SINETAB[s];
196
103k
      sl = (LONG)tmp.v.re;
197
103k
      cl = (LONG)tmp.v.im;
198
15.1M
    } else {
199
15.1M
      FIXP_STP tmp;
200
15.1M
      tmp = SINETAB[s];
201
15.1M
      sl = (LONG)tmp.v.im;
202
15.1M
      cl = (LONG)tmp.v.re;
203
15.1M
    }
204
205
15.2M
#ifdef SINETABLE_16BIT
206
15.2M
    *sine = (FIXP_DBL)((sl * ssign) << (DFRACT_BITS - FRACT_BITS));
207
15.2M
    *cosine = (FIXP_DBL)((cl * csign) << (DFRACT_BITS - FRACT_BITS));
208
#else
209
    /* scale down by 1 for overflow prevention. This is undone at the calling
210
     * function. */
211
    *sine = (FIXP_DBL)(sl * ssign) >> 1;
212
    *cosine = (FIXP_DBL)(cl * csign) >> 1;
213
#endif
214
15.2M
  }
215
216
15.2M
  return residual;
217
15.2M
}
psdec.cpp:fixp_sin_cos_residual_inline(int, int, int*, int*)
Line
Count
Source
157
1.88M
                                                    FIXP_DBL *cosine) {
158
1.88M
  FIXP_DBL residual;
159
1.88M
  int s;
160
1.88M
  int shift = (31 - scale - LD - 1);
161
1.88M
  int ssign = 1;
162
1.88M
  int csign = 1;
163
164
1.88M
  residual = fMult(x, FL2FXCONST_DBL(1.0 / M_PI));
165
1.88M
  s = ((LONG)residual) >> shift;
166
167
1.88M
  residual &= ((1 << shift) - 1);
168
1.88M
  residual = fMult(residual, FL2FXCONST_DBL(M_PI / 4.0)) << 2;
169
1.88M
  residual <<= scale;
170
171
  /* Sine sign symmetry */
172
1.88M
  if (s & ((1 << LD) << 1)) {
173
47.8k
    ssign = -ssign;
174
47.8k
  }
175
  /* Cosine sign symmetry */
176
1.88M
  if ((s + (1 << LD)) & ((1 << LD) << 1)) {
177
8.59k
    csign = -csign;
178
8.59k
  }
179
180
1.88M
  s = fAbs(s);
181
182
1.88M
  s &= (((1 << LD) << 1) - 1); /* Modulo PI */
183
184
1.88M
  if (s > (1 << LD)) {
185
7.55k
    s = ((1 << LD) << 1) - s;
186
7.55k
  }
187
188
1.88M
  {
189
1.88M
    LONG sl, cl;
190
    /* Because of packed table */
191
1.88M
    if (s > (1 << (LD - 1))) {
192
15.6k
      FIXP_STP tmp;
193
      /* Cosine/Sine simetry for angles greater than PI/4 */
194
15.6k
      s = (1 << LD) - s;
195
15.6k
      tmp = SINETAB[s];
196
15.6k
      sl = (LONG)tmp.v.re;
197
15.6k
      cl = (LONG)tmp.v.im;
198
1.86M
    } else {
199
1.86M
      FIXP_STP tmp;
200
1.86M
      tmp = SINETAB[s];
201
1.86M
      sl = (LONG)tmp.v.im;
202
1.86M
      cl = (LONG)tmp.v.re;
203
1.86M
    }
204
205
1.88M
#ifdef SINETABLE_16BIT
206
1.88M
    *sine = (FIXP_DBL)((sl * ssign) << (DFRACT_BITS - FRACT_BITS));
207
1.88M
    *cosine = (FIXP_DBL)((cl * csign) << (DFRACT_BITS - FRACT_BITS));
208
#else
209
    /* scale down by 1 for overflow prevention. This is undone at the calling
210
     * function. */
211
    *sine = (FIXP_DBL)(sl * ssign) >> 1;
212
    *cosine = (FIXP_DBL)(cl * csign) >> 1;
213
#endif
214
1.88M
  }
215
216
1.88M
  return residual;
217
1.88M
}
Unexecuted instantiation: sac_calcM1andM2.cpp:fixp_sin_cos_residual_inline(int, int, int*, int*)
Unexecuted instantiation: sacenc_dmx_tdom_enh.cpp:fixp_sin_cos_residual_inline(int, int, int*, int*)
Unexecuted instantiation: psy_configuration.cpp:fixp_sin_cos_residual_inline(int, int, int*, int*)
218
219
/**
220
 * \brief Calculate cosine and sine value each of 2 angles different angle
221
 * values.
222
 * \param x1 first angle value
223
 * \param x2 second angle value
224
 * \param scale exponent of x1 and x2
225
 * \param out pointer to 4 FIXP_DBL locations, were the values cos(x1), sin(x1),
226
 * cos(x2), sin(x2) will be stored into.
227
 */
228
static inline void inline_fixp_cos_sin(FIXP_DBL x1, FIXP_DBL x2,
229
8.56M
                                       const int scale, FIXP_DBL *out) {
230
8.56M
  FIXP_DBL residual, error0, error1, sine, cosine;
231
8.56M
  residual = fixp_sin_cos_residual_inline(x1, scale, &sine, &cosine);
232
8.56M
  error0 = fMultDiv2(sine, residual);
233
8.56M
  error1 = fMultDiv2(cosine, residual);
234
235
8.56M
#ifdef SINETABLE_16BIT
236
8.56M
  *out++ = cosine - (error0 << 1);
237
8.56M
  *out++ = sine + (error1 << 1);
238
#else
239
  /* Undo downscaling by 1 which was done at fixp_sin_cos_residual_inline */
240
  *out++ = SATURATE_LEFT_SHIFT(cosine - (error0 << 1), 1, DFRACT_BITS);
241
  *out++ = SATURATE_LEFT_SHIFT(sine + (error1 << 1), 1, DFRACT_BITS);
242
#endif
243
244
8.56M
  residual = fixp_sin_cos_residual_inline(x2, scale, &sine, &cosine);
245
8.56M
  error0 = fMultDiv2(sine, residual);
246
8.56M
  error1 = fMultDiv2(cosine, residual);
247
248
8.56M
#ifdef SINETABLE_16BIT
249
8.56M
  *out++ = cosine - (error0 << 1);
250
8.56M
  *out++ = sine + (error1 << 1);
251
#else
252
  *out++ = SATURATE_LEFT_SHIFT(cosine - (error0 << 1), 1, DFRACT_BITS);
253
  *out++ = SATURATE_LEFT_SHIFT(sine + (error1 << 1), 1, DFRACT_BITS);
254
#endif
255
8.56M
}
Unexecuted instantiation: usacdec_lpc.cpp:inline_fixp_cos_sin(int, int, int, int*)
Unexecuted instantiation: FDK_trigFcts.cpp:inline_fixp_cos_sin(int, int, int, int*)
Unexecuted instantiation: qmf.cpp:inline_fixp_cos_sin(int, int, int, int*)
Unexecuted instantiation: block.cpp:inline_fixp_cos_sin(int, int, int, int*)
Unexecuted instantiation: sac_dec.cpp:inline_fixp_cos_sin(int, int, int, int*)
sac_process.cpp:inline_fixp_cos_sin(int, int, int, int*)
Line
Count
Source
229
7.62M
                                       const int scale, FIXP_DBL *out) {
230
7.62M
  FIXP_DBL residual, error0, error1, sine, cosine;
231
7.62M
  residual = fixp_sin_cos_residual_inline(x1, scale, &sine, &cosine);
232
7.62M
  error0 = fMultDiv2(sine, residual);
233
7.62M
  error1 = fMultDiv2(cosine, residual);
234
235
7.62M
#ifdef SINETABLE_16BIT
236
7.62M
  *out++ = cosine - (error0 << 1);
237
7.62M
  *out++ = sine + (error1 << 1);
238
#else
239
  /* Undo downscaling by 1 which was done at fixp_sin_cos_residual_inline */
240
  *out++ = SATURATE_LEFT_SHIFT(cosine - (error0 << 1), 1, DFRACT_BITS);
241
  *out++ = SATURATE_LEFT_SHIFT(sine + (error1 << 1), 1, DFRACT_BITS);
242
#endif
243
244
7.62M
  residual = fixp_sin_cos_residual_inline(x2, scale, &sine, &cosine);
245
7.62M
  error0 = fMultDiv2(sine, residual);
246
7.62M
  error1 = fMultDiv2(cosine, residual);
247
248
7.62M
#ifdef SINETABLE_16BIT
249
7.62M
  *out++ = cosine - (error0 << 1);
250
7.62M
  *out++ = sine + (error1 << 1);
251
#else
252
  *out++ = SATURATE_LEFT_SHIFT(cosine - (error0 << 1), 1, DFRACT_BITS);
253
  *out++ = SATURATE_LEFT_SHIFT(sine + (error1 << 1), 1, DFRACT_BITS);
254
#endif
255
7.62M
}
psdec.cpp:inline_fixp_cos_sin(int, int, int, int*)
Line
Count
Source
229
940k
                                       const int scale, FIXP_DBL *out) {
230
940k
  FIXP_DBL residual, error0, error1, sine, cosine;
231
940k
  residual = fixp_sin_cos_residual_inline(x1, scale, &sine, &cosine);
232
940k
  error0 = fMultDiv2(sine, residual);
233
940k
  error1 = fMultDiv2(cosine, residual);
234
235
940k
#ifdef SINETABLE_16BIT
236
940k
  *out++ = cosine - (error0 << 1);
237
940k
  *out++ = sine + (error1 << 1);
238
#else
239
  /* Undo downscaling by 1 which was done at fixp_sin_cos_residual_inline */
240
  *out++ = SATURATE_LEFT_SHIFT(cosine - (error0 << 1), 1, DFRACT_BITS);
241
  *out++ = SATURATE_LEFT_SHIFT(sine + (error1 << 1), 1, DFRACT_BITS);
242
#endif
243
244
940k
  residual = fixp_sin_cos_residual_inline(x2, scale, &sine, &cosine);
245
940k
  error0 = fMultDiv2(sine, residual);
246
940k
  error1 = fMultDiv2(cosine, residual);
247
248
940k
#ifdef SINETABLE_16BIT
249
940k
  *out++ = cosine - (error0 << 1);
250
940k
  *out++ = sine + (error1 << 1);
251
#else
252
  *out++ = SATURATE_LEFT_SHIFT(cosine - (error0 << 1), 1, DFRACT_BITS);
253
  *out++ = SATURATE_LEFT_SHIFT(sine + (error1 << 1), 1, DFRACT_BITS);
254
#endif
255
940k
}
Unexecuted instantiation: sac_calcM1andM2.cpp:inline_fixp_cos_sin(int, int, int, int*)
Unexecuted instantiation: sacenc_dmx_tdom_enh.cpp:inline_fixp_cos_sin(int, int, int, int*)
Unexecuted instantiation: psy_configuration.cpp:inline_fixp_cos_sin(int, int, int, int*)
256
#endif
257
258
#endif /* !defined(FDK_TRIGFCTS_H) */