Coverage Report

Created: 2025-11-11 06:41

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/aac/libFDK/include/FDK_trigFcts.h
Line
Count
Source
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
15.4M
#define SINETAB SineTable512
145
113M
#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
15.4M
                                                    FIXP_DBL *cosine) {
158
15.4M
  FIXP_DBL residual;
159
15.4M
  int s;
160
15.4M
  int shift = (31 - scale - LD - 1);
161
15.4M
  int ssign = 1;
162
15.4M
  int csign = 1;
163
164
15.4M
  residual = fMult(x, FL2FXCONST_DBL(1.0 / M_PI));
165
15.4M
  s = ((LONG)residual) >> shift;
166
167
15.4M
  residual &= ((1 << shift) - 1);
168
15.4M
  residual = fMult(residual, FL2FXCONST_DBL(M_PI / 4.0)) << 2;
169
15.4M
  residual <<= scale;
170
171
  /* Sine sign symmetry */
172
15.4M
  if (s & ((1 << LD) << 1)) {
173
885k
    ssign = -ssign;
174
885k
  }
175
  /* Cosine sign symmetry */
176
15.4M
  if ((s + (1 << LD)) & ((1 << LD) << 1)) {
177
2.47M
    csign = -csign;
178
2.47M
  }
179
180
15.4M
  s = fAbs(s);
181
182
15.4M
  s &= (((1 << LD) << 1) - 1); /* Modulo PI */
183
184
15.4M
  if (s > (1 << LD)) {
185
2.91M
    s = ((1 << LD) << 1) - s;
186
2.91M
  }
187
188
15.4M
  {
189
15.4M
    LONG sl, cl;
190
    /* Because of packed table */
191
15.4M
    if (s > (1 << (LD - 1))) {
192
2.85M
      FIXP_STP tmp;
193
      /* Cosine/Sine simetry for angles greater than PI/4 */
194
2.85M
      s = (1 << LD) - s;
195
2.85M
      tmp = SINETAB[s];
196
2.85M
      sl = (LONG)tmp.v.re;
197
2.85M
      cl = (LONG)tmp.v.im;
198
12.5M
    } else {
199
12.5M
      FIXP_STP tmp;
200
12.5M
      tmp = SINETAB[s];
201
12.5M
      sl = (LONG)tmp.v.im;
202
12.5M
      cl = (LONG)tmp.v.re;
203
12.5M
    }
204
205
15.4M
#ifdef SINETABLE_16BIT
206
15.4M
    *sine = (FIXP_DBL)((sl * ssign) << (DFRACT_BITS - FRACT_BITS));
207
15.4M
    *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.4M
  }
215
216
15.4M
  return residual;
217
15.4M
}
FDK_trigFcts.cpp:fixp_sin_cos_residual_inline(int, int, int*, int*)
Line
Count
Source
157
4.71M
                                                    FIXP_DBL *cosine) {
158
4.71M
  FIXP_DBL residual;
159
4.71M
  int s;
160
4.71M
  int shift = (31 - scale - LD - 1);
161
4.71M
  int ssign = 1;
162
4.71M
  int csign = 1;
163
164
4.71M
  residual = fMult(x, FL2FXCONST_DBL(1.0 / M_PI));
165
4.71M
  s = ((LONG)residual) >> shift;
166
167
4.71M
  residual &= ((1 << shift) - 1);
168
4.71M
  residual = fMult(residual, FL2FXCONST_DBL(M_PI / 4.0)) << 2;
169
4.71M
  residual <<= scale;
170
171
  /* Sine sign symmetry */
172
4.71M
  if (s & ((1 << LD) << 1)) {
173
0
    ssign = -ssign;
174
0
  }
175
  /* Cosine sign symmetry */
176
4.71M
  if ((s + (1 << LD)) & ((1 << LD) << 1)) {
177
2.24M
    csign = -csign;
178
2.24M
  }
179
180
4.71M
  s = fAbs(s);
181
182
4.71M
  s &= (((1 << LD) << 1) - 1); /* Modulo PI */
183
184
4.71M
  if (s > (1 << LD)) {
185
2.24M
    s = ((1 << LD) << 1) - s;
186
2.24M
  }
187
188
4.71M
  {
189
4.71M
    LONG sl, cl;
190
    /* Because of packed table */
191
4.71M
    if (s > (1 << (LD - 1))) {
192
2.45M
      FIXP_STP tmp;
193
      /* Cosine/Sine simetry for angles greater than PI/4 */
194
2.45M
      s = (1 << LD) - s;
195
2.45M
      tmp = SINETAB[s];
196
2.45M
      sl = (LONG)tmp.v.re;
197
2.45M
      cl = (LONG)tmp.v.im;
198
2.45M
    } else {
199
2.26M
      FIXP_STP tmp;
200
2.26M
      tmp = SINETAB[s];
201
2.26M
      sl = (LONG)tmp.v.im;
202
2.26M
      cl = (LONG)tmp.v.re;
203
2.26M
    }
204
205
4.71M
#ifdef SINETABLE_16BIT
206
4.71M
    *sine = (FIXP_DBL)((sl * ssign) << (DFRACT_BITS - FRACT_BITS));
207
4.71M
    *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
4.71M
  }
215
216
4.71M
  return residual;
217
4.71M
}
Unexecuted instantiation: block.cpp:fixp_sin_cos_residual_inline(int, int, int*, int*)
psdec.cpp:fixp_sin_cos_residual_inline(int, int, int*, int*)
Line
Count
Source
157
384k
                                                    FIXP_DBL *cosine) {
158
384k
  FIXP_DBL residual;
159
384k
  int s;
160
384k
  int shift = (31 - scale - LD - 1);
161
384k
  int ssign = 1;
162
384k
  int csign = 1;
163
164
384k
  residual = fMult(x, FL2FXCONST_DBL(1.0 / M_PI));
165
384k
  s = ((LONG)residual) >> shift;
166
167
384k
  residual &= ((1 << shift) - 1);
168
384k
  residual = fMult(residual, FL2FXCONST_DBL(M_PI / 4.0)) << 2;
169
384k
  residual <<= scale;
170
171
  /* Sine sign symmetry */
172
384k
  if (s & ((1 << LD) << 1)) {
173
16.0k
    ssign = -ssign;
174
16.0k
  }
175
  /* Cosine sign symmetry */
176
384k
  if ((s + (1 << LD)) & ((1 << LD) << 1)) {
177
3.77k
    csign = -csign;
178
3.77k
  }
179
180
384k
  s = fAbs(s);
181
182
384k
  s &= (((1 << LD) << 1) - 1); /* Modulo PI */
183
184
384k
  if (s > (1 << LD)) {
185
3.41k
    s = ((1 << LD) << 1) - s;
186
3.41k
  }
187
188
384k
  {
189
384k
    LONG sl, cl;
190
    /* Because of packed table */
191
384k
    if (s > (1 << (LD - 1))) {
192
6.25k
      FIXP_STP tmp;
193
      /* Cosine/Sine simetry for angles greater than PI/4 */
194
6.25k
      s = (1 << LD) - s;
195
6.25k
      tmp = SINETAB[s];
196
6.25k
      sl = (LONG)tmp.v.re;
197
6.25k
      cl = (LONG)tmp.v.im;
198
378k
    } else {
199
378k
      FIXP_STP tmp;
200
378k
      tmp = SINETAB[s];
201
378k
      sl = (LONG)tmp.v.im;
202
378k
      cl = (LONG)tmp.v.re;
203
378k
    }
204
205
384k
#ifdef SINETABLE_16BIT
206
384k
    *sine = (FIXP_DBL)((sl * ssign) << (DFRACT_BITS - FRACT_BITS));
207
384k
    *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
384k
  }
215
216
384k
  return residual;
217
384k
}
Unexecuted instantiation: psy_configuration.cpp:fixp_sin_cos_residual_inline(int, int, int*, int*)
Unexecuted instantiation: qmf.cpp:fixp_sin_cos_residual_inline(int, int, int*, int*)
Unexecuted instantiation: sac_calcM1andM2.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
10.3M
                                                    FIXP_DBL *cosine) {
158
10.3M
  FIXP_DBL residual;
159
10.3M
  int s;
160
10.3M
  int shift = (31 - scale - LD - 1);
161
10.3M
  int ssign = 1;
162
10.3M
  int csign = 1;
163
164
10.3M
  residual = fMult(x, FL2FXCONST_DBL(1.0 / M_PI));
165
10.3M
  s = ((LONG)residual) >> shift;
166
167
10.3M
  residual &= ((1 << shift) - 1);
168
10.3M
  residual = fMult(residual, FL2FXCONST_DBL(M_PI / 4.0)) << 2;
169
10.3M
  residual <<= scale;
170
171
  /* Sine sign symmetry */
172
10.3M
  if (s & ((1 << LD) << 1)) {
173
869k
    ssign = -ssign;
174
869k
  }
175
  /* Cosine sign symmetry */
176
10.3M
  if ((s + (1 << LD)) & ((1 << LD) << 1)) {
177
228k
    csign = -csign;
178
228k
  }
179
180
10.3M
  s = fAbs(s);
181
182
10.3M
  s &= (((1 << LD) << 1) - 1); /* Modulo PI */
183
184
10.3M
  if (s > (1 << LD)) {
185
663k
    s = ((1 << LD) << 1) - s;
186
663k
  }
187
188
10.3M
  {
189
10.3M
    LONG sl, cl;
190
    /* Because of packed table */
191
10.3M
    if (s > (1 << (LD - 1))) {
192
390k
      FIXP_STP tmp;
193
      /* Cosine/Sine simetry for angles greater than PI/4 */
194
390k
      s = (1 << LD) - s;
195
390k
      tmp = SINETAB[s];
196
390k
      sl = (LONG)tmp.v.re;
197
390k
      cl = (LONG)tmp.v.im;
198
9.95M
    } else {
199
9.95M
      FIXP_STP tmp;
200
9.95M
      tmp = SINETAB[s];
201
9.95M
      sl = (LONG)tmp.v.im;
202
9.95M
      cl = (LONG)tmp.v.re;
203
9.95M
    }
204
205
10.3M
#ifdef SINETABLE_16BIT
206
10.3M
    *sine = (FIXP_DBL)((sl * ssign) << (DFRACT_BITS - FRACT_BITS));
207
10.3M
    *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
10.3M
  }
215
216
10.3M
  return residual;
217
10.3M
}
Unexecuted instantiation: sacenc_dmx_tdom_enh.cpp:fixp_sin_cos_residual_inline(int, int, int*, int*)
Unexecuted instantiation: usacdec_lpc.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
5.36M
                                       const int scale, FIXP_DBL *out) {
230
5.36M
  FIXP_DBL residual, error0, error1, sine, cosine;
231
5.36M
  residual = fixp_sin_cos_residual_inline(x1, scale, &sine, &cosine);
232
5.36M
  error0 = fMultDiv2(sine, residual);
233
5.36M
  error1 = fMultDiv2(cosine, residual);
234
235
5.36M
#ifdef SINETABLE_16BIT
236
5.36M
  *out++ = cosine - (error0 << 1);
237
5.36M
  *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
5.36M
  residual = fixp_sin_cos_residual_inline(x2, scale, &sine, &cosine);
245
5.36M
  error0 = fMultDiv2(sine, residual);
246
5.36M
  error1 = fMultDiv2(cosine, residual);
247
248
5.36M
#ifdef SINETABLE_16BIT
249
5.36M
  *out++ = cosine - (error0 << 1);
250
5.36M
  *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
5.36M
}
Unexecuted instantiation: FDK_trigFcts.cpp:inline_fixp_cos_sin(int, int, int, int*)
Unexecuted instantiation: block.cpp:inline_fixp_cos_sin(int, int, int, int*)
psdec.cpp:inline_fixp_cos_sin(int, int, int, int*)
Line
Count
Source
229
192k
                                       const int scale, FIXP_DBL *out) {
230
192k
  FIXP_DBL residual, error0, error1, sine, cosine;
231
192k
  residual = fixp_sin_cos_residual_inline(x1, scale, &sine, &cosine);
232
192k
  error0 = fMultDiv2(sine, residual);
233
192k
  error1 = fMultDiv2(cosine, residual);
234
235
192k
#ifdef SINETABLE_16BIT
236
192k
  *out++ = cosine - (error0 << 1);
237
192k
  *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
192k
  residual = fixp_sin_cos_residual_inline(x2, scale, &sine, &cosine);
245
192k
  error0 = fMultDiv2(sine, residual);
246
192k
  error1 = fMultDiv2(cosine, residual);
247
248
192k
#ifdef SINETABLE_16BIT
249
192k
  *out++ = cosine - (error0 << 1);
250
192k
  *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
192k
}
Unexecuted instantiation: psy_configuration.cpp:inline_fixp_cos_sin(int, int, int, int*)
Unexecuted instantiation: qmf.cpp:inline_fixp_cos_sin(int, int, int, int*)
Unexecuted instantiation: sac_calcM1andM2.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
5.17M
                                       const int scale, FIXP_DBL *out) {
230
5.17M
  FIXP_DBL residual, error0, error1, sine, cosine;
231
5.17M
  residual = fixp_sin_cos_residual_inline(x1, scale, &sine, &cosine);
232
5.17M
  error0 = fMultDiv2(sine, residual);
233
5.17M
  error1 = fMultDiv2(cosine, residual);
234
235
5.17M
#ifdef SINETABLE_16BIT
236
5.17M
  *out++ = cosine - (error0 << 1);
237
5.17M
  *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
5.17M
  residual = fixp_sin_cos_residual_inline(x2, scale, &sine, &cosine);
245
5.17M
  error0 = fMultDiv2(sine, residual);
246
5.17M
  error1 = fMultDiv2(cosine, residual);
247
248
5.17M
#ifdef SINETABLE_16BIT
249
5.17M
  *out++ = cosine - (error0 << 1);
250
5.17M
  *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
5.17M
}
Unexecuted instantiation: sacenc_dmx_tdom_enh.cpp:inline_fixp_cos_sin(int, int, int, int*)
Unexecuted instantiation: usacdec_lpc.cpp:inline_fixp_cos_sin(int, int, int, int*)
256
#endif
257
258
#endif /* !defined(FDK_TRIGFCTS_H) */