summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2005-10-31 18:56:29 +0000
committerDave Chapman <dave@dchapman.com>2005-10-31 18:56:29 +0000
commit65de1cc6af31f547bd36d320f09cbcc6e6975421 (patch)
treed1ab6e97adfacb3ef8ca95cdf1c90fcb025271b0
parentb83dc3861e5552a802767f37cb97d6b41c9f01cc (diff)
downloadrockbox-65de1cc6af31f547bd36d320f09cbcc6e6975421.tar.gz
rockbox-65de1cc6af31f547bd36d320f09cbcc6e6975421.zip
Initial check-in of unmodified libfaad (part of the FAAD2 project). This is the last version of libfaad available under the GPL - the state of FAAD2 CVS at midnight on 2005-02-01
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7699 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/libfaad/COPYING350
-rw-r--r--apps/codecs/libfaad/README122
-rw-r--r--apps/codecs/libfaad/analysis.h49
-rw-r--r--apps/codecs/libfaad/bits.c213
-rw-r--r--apps/codecs/libfaad/bits.h382
-rw-r--r--apps/codecs/libfaad/cfft.c1002
-rw-r--r--apps/codecs/libfaad/cfft.h53
-rw-r--r--apps/codecs/libfaad/cfft_tab.h1820
-rw-r--r--apps/codecs/libfaad/codebook/hcb.h142
-rw-r--r--apps/codecs/libfaad/codebook/hcb_1.h183
-rw-r--r--apps/codecs/libfaad/codebook/hcb_10.h309
-rw-r--r--apps/codecs/libfaad/codebook/hcb_11.h412
-rw-r--r--apps/codecs/libfaad/codebook/hcb_2.h182
-rw-r--r--apps/codecs/libfaad/codebook/hcb_3.h193
-rw-r--r--apps/codecs/libfaad/codebook/hcb_4.h196
-rw-r--r--apps/codecs/libfaad/codebook/hcb_5.h193
-rw-r--r--apps/codecs/libfaad/codebook/hcb_6.h179
-rw-r--r--apps/codecs/libfaad/codebook/hcb_7.h159
-rw-r--r--apps/codecs/libfaad/codebook/hcb_8.h170
-rw-r--r--apps/codecs/libfaad/codebook/hcb_9.h369
-rw-r--r--apps/codecs/libfaad/codebook/hcb_sf.h273
-rw-r--r--apps/codecs/libfaad/common.c519
-rw-r--r--apps/codecs/libfaad/common.h425
-rw-r--r--apps/codecs/libfaad/decoder.c1024
-rw-r--r--apps/codecs/libfaad/decoder.h121
-rw-r--r--apps/codecs/libfaad/drc.c170
-rw-r--r--apps/codecs/libfaad/drc.h46
-rw-r--r--apps/codecs/libfaad/drm_dec.c990
-rw-r--r--apps/codecs/libfaad/drm_dec.h97
-rw-r--r--apps/codecs/libfaad/error.c61
-rw-r--r--apps/codecs/libfaad/error.h41
-rw-r--r--apps/codecs/libfaad/filtbank.c404
-rw-r--r--apps/codecs/libfaad/filtbank.h58
-rw-r--r--apps/codecs/libfaad/fixed.h265
-rw-r--r--apps/codecs/libfaad/hcr.c409
-rw-r--r--apps/codecs/libfaad/huffman.c556
-rw-r--r--apps/codecs/libfaad/huffman.h44
-rw-r--r--apps/codecs/libfaad/ic_predict.c267
-rw-r--r--apps/codecs/libfaad/ic_predict.h249
-rw-r--r--apps/codecs/libfaad/iq_table.h16455
-rw-r--r--apps/codecs/libfaad/is.c106
-rw-r--r--apps/codecs/libfaad/is.h64
-rw-r--r--apps/codecs/libfaad/kbd_win.h2294
-rw-r--r--apps/codecs/libfaad/lt_predict.c215
-rw-r--r--apps/codecs/libfaad/lt_predict.h63
-rw-r--r--apps/codecs/libfaad/mdct.c298
-rw-r--r--apps/codecs/libfaad/mdct.h45
-rw-r--r--apps/codecs/libfaad/mdct_tab.h3652
-rw-r--r--apps/codecs/libfaad/mp4.c299
-rw-r--r--apps/codecs/libfaad/mp4.h49
-rw-r--r--apps/codecs/libfaad/ms.c74
-rw-r--r--apps/codecs/libfaad/ms.h41
-rw-r--r--apps/codecs/libfaad/output.c557
-rw-r--r--apps/codecs/libfaad/output.h45
-rw-r--r--apps/codecs/libfaad/pns.c265
-rw-r--r--apps/codecs/libfaad/pns.h53
-rw-r--r--apps/codecs/libfaad/ps_dec.c1985
-rw-r--r--apps/codecs/libfaad/ps_dec.h148
-rw-r--r--apps/codecs/libfaad/ps_syntax.c545
-rw-r--r--apps/codecs/libfaad/ps_tables.h547
-rw-r--r--apps/codecs/libfaad/pulse.c56
-rw-r--r--apps/codecs/libfaad/pulse.h40
-rw-r--r--apps/codecs/libfaad/rvlc.c530
-rw-r--r--apps/codecs/libfaad/rvlc.h53
-rw-r--r--apps/codecs/libfaad/sbr_dct.c2271
-rw-r--r--apps/codecs/libfaad/sbr_dct.h49
-rw-r--r--apps/codecs/libfaad/sbr_dec.c614
-rw-r--r--apps/codecs/libfaad/sbr_dec.h249
-rw-r--r--apps/codecs/libfaad/sbr_e_nf.c507
-rw-r--r--apps/codecs/libfaad/sbr_e_nf.h47
-rw-r--r--apps/codecs/libfaad/sbr_fbt.c761
-rw-r--r--apps/codecs/libfaad/sbr_fbt.h52
-rw-r--r--apps/codecs/libfaad/sbr_hfadj.c1720
-rw-r--r--apps/codecs/libfaad/sbr_hfadj.h54
-rw-r--r--apps/codecs/libfaad/sbr_hfgen.c666
-rw-r--r--apps/codecs/libfaad/sbr_hfgen.h46
-rw-r--r--apps/codecs/libfaad/sbr_huff.c357
-rw-r--r--apps/codecs/libfaad/sbr_huff.h43
-rw-r--r--apps/codecs/libfaad/sbr_noise.h561
-rw-r--r--apps/codecs/libfaad/sbr_qmf.c633
-rw-r--r--apps/codecs/libfaad/sbr_qmf.h52
-rw-r--r--apps/codecs/libfaad/sbr_qmf_c.h365
-rw-r--r--apps/codecs/libfaad/sbr_syntax.c871
-rw-r--r--apps/codecs/libfaad/sbr_syntax.h64
-rw-r--r--apps/codecs/libfaad/sbr_tf_grid.c258
-rw-r--r--apps/codecs/libfaad/sbr_tf_grid.h44
-rw-r--r--apps/codecs/libfaad/sine_win.h4301
-rw-r--r--apps/codecs/libfaad/specrec.c1272
-rw-r--r--apps/codecs/libfaad/specrec.h46
-rw-r--r--apps/codecs/libfaad/structs.h473
-rw-r--r--apps/codecs/libfaad/syntax.c2330
-rw-r--r--apps/codecs/libfaad/syntax.h124
-rw-r--r--apps/codecs/libfaad/tns.c306
-rw-r--r--apps/codecs/libfaad/tns.h48
94 files changed, 60360 insertions, 0 deletions
diff --git a/apps/codecs/libfaad/COPYING b/apps/codecs/libfaad/COPYING
new file mode 100644
index 0000000000..920c4e6744
--- /dev/null
+++ b/apps/codecs/libfaad/COPYING
@@ -0,0 +1,350 @@
1
2Any non-GPL usage of this software or parts of this software is strictly
3forbidden.
4
5Commercial non-GPL licensing of this software is possible.
6For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
7
8
9
10
11 GNU GENERAL PUBLIC LICENSE
12 Version 2, June 1991
13
14 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
15 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 Everyone is permitted to copy and distribute verbatim copies
17 of this license document, but changing it is not allowed.
18
19 Preamble
20
21 The licenses for most software are designed to take away your
22freedom to share and change it. By contrast, the GNU General Public
23License is intended to guarantee your freedom to share and change free
24software--to make sure the software is free for all its users. This
25General Public License applies to most of the Free Software
26Foundation's software and to any other program whose authors commit to
27using it. (Some other Free Software Foundation software is covered by
28the GNU Library General Public License instead.) You can apply it to
29your programs, too.
30
31 When we speak of free software, we are referring to freedom, not
32price. Our General Public Licenses are designed to make sure that you
33have the freedom to distribute copies of free software (and charge for
34this service if you wish), that you receive source code or can get it
35if you want it, that you can change the software or use pieces of it
36in new free programs; and that you know you can do these things.
37
38 To protect your rights, we need to make restrictions that forbid
39anyone to deny you these rights or to ask you to surrender the rights.
40These restrictions translate to certain responsibilities for you if you
41distribute copies of the software, or if you modify it.
42
43 For example, if you distribute copies of such a program, whether
44gratis or for a fee, you must give the recipients all the rights that
45you have. You must make sure that they, too, receive or can get the
46source code. And you must show them these terms so they know their
47rights.
48
49 We protect your rights with two steps: (1) copyright the software, and
50(2) offer you this license which gives you legal permission to copy,
51distribute and/or modify the software.
52
53 Also, for each author's protection and ours, we want to make certain
54that everyone understands that there is no warranty for this free
55software. If the software is modified by someone else and passed on, we
56want its recipients to know that what they have is not the original, so
57that any problems introduced by others will not reflect on the original
58authors' reputations.
59
60 Finally, any free program is threatened constantly by software
61patents. We wish to avoid the danger that redistributors of a free
62program will individually obtain patent licenses, in effect making the
63program proprietary. To prevent this, we have made it clear that any
64patent must be licensed for everyone's free use or not licensed at all.
65
66 The precise terms and conditions for copying, distribution and
67modification follow.
68
69 GNU GENERAL PUBLIC LICENSE
70 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
71
72 0. This License applies to any program or other work which contains
73a notice placed by the copyright holder saying it may be distributed
74under the terms of this General Public License. The "Program", below,
75refers to any such program or work, and a "work based on the Program"
76means either the Program or any derivative work under copyright law:
77that is to say, a work containing the Program or a portion of it,
78either verbatim or with modifications and/or translated into another
79language. (Hereinafter, translation is included without limitation in
80the term "modification".) Each licensee is addressed as "you".
81
82Activities other than copying, distribution and modification are not
83covered by this License; they are outside its scope. The act of
84running the Program is not restricted, and the output from the Program
85is covered only if its contents constitute a work based on the
86Program (independent of having been made by running the Program).
87Whether that is true depends on what the Program does.
88
89 1. You may copy and distribute verbatim copies of the Program's
90source code as you receive it, in any medium, provided that you
91conspicuously and appropriately publish on each copy an appropriate
92copyright notice and disclaimer of warranty; keep intact all the
93notices that refer to this License and to the absence of any warranty;
94and give any other recipients of the Program a copy of this License
95along with the Program.
96
97You may charge a fee for the physical act of transferring a copy, and
98you may at your option offer warranty protection in exchange for a fee.
99
100 2. You may modify your copy or copies of the Program or any portion
101of it, thus forming a work based on the Program, and copy and
102distribute such modifications or work under the terms of Section 1
103above, provided that you also meet all of these conditions:
104
105 a) You must cause the modified files to carry prominent notices
106 stating that you changed the files and the date of any change.
107
108 b) You must cause any work that you distribute or publish, that in
109 whole or in part contains or is derived from the Program or any
110 part thereof, to be licensed as a whole at no charge to all third
111 parties under the terms of this License.
112
113 c) If the modified program normally reads commands interactively
114 when run, you must cause it, when started running for such
115 interactive use in the most ordinary way, to print or display an
116 announcement including an appropriate copyright notice and a
117 notice that there is no warranty (or else, saying that you provide
118 a warranty) and that users may redistribute the program under
119 these conditions, and telling the user how to view a copy of this
120 License. (Exception: if the Program itself is interactive but
121 does not normally print such an announcement, your work based on
122 the Program is not required to print an announcement.)
123
124These requirements apply to the modified work as a whole. If
125identifiable sections of that work are not derived from the Program,
126and can be reasonably considered independent and separate works in
127themselves, then this License, and its terms, do not apply to those
128sections when you distribute them as separate works. But when you
129distribute the same sections as part of a whole which is a work based
130on the Program, the distribution of the whole must be on the terms of
131this License, whose permissions for other licensees extend to the
132entire whole, and thus to each and every part regardless of who wrote it.
133
134Thus, it is not the intent of this section to claim rights or contest
135your rights to work written entirely by you; rather, the intent is to
136exercise the right to control the distribution of derivative or
137collective works based on the Program.
138
139In addition, mere aggregation of another work not based on the Program
140with the Program (or with a work based on the Program) on a volume of
141a storage or distribution medium does not bring the other work under
142the scope of this License.
143
144 3. You may copy and distribute the Program (or a work based on it,
145under Section 2) in object code or executable form under the terms of
146Sections 1 and 2 above provided that you also do one of the following:
147
148 a) Accompany it with the complete corresponding machine-readable
149 source code, which must be distributed under the terms of Sections
150 1 and 2 above on a medium customarily used for software interchange; or,
151
152 b) Accompany it with a written offer, valid for at least three
153 years, to give any third party, for a charge no more than your
154 cost of physically performing source distribution, a complete
155 machine-readable copy of the corresponding source code, to be
156 distributed under the terms of Sections 1 and 2 above on a medium
157 customarily used for software interchange; or,
158
159 c) Accompany it with the information you received as to the offer
160 to distribute corresponding source code. (This alternative is
161 allowed only for noncommercial distribution and only if you
162 received the program in object code or executable form with such
163 an offer, in accord with Subsection b above.)
164
165The source code for a work means the preferred form of the work for
166making modifications to it. For an executable work, complete source
167code means all the source code for all modules it contains, plus any
168associated interface definition files, plus the scripts used to
169control compilation and installation of the executable. However, as a
170special exception, the source code distributed need not include
171anything that is normally distributed (in either source or binary
172form) with the major components (compiler, kernel, and so on) of the
173operating system on which the executable runs, unless that component
174itself accompanies the executable.
175
176If distribution of executable or object code is made by offering
177access to copy from a designated place, then offering equivalent
178access to copy the source code from the same place counts as
179distribution of the source code, even though third parties are not
180compelled to copy the source along with the object code.
181
182 4. You may not copy, modify, sublicense, or distribute the Program
183except as expressly provided under this License. Any attempt
184otherwise to copy, modify, sublicense or distribute the Program is
185void, and will automatically terminate your rights under this License.
186However, parties who have received copies, or rights, from you under
187this License will not have their licenses terminated so long as such
188parties remain in full compliance.
189
190 5. You are not required to accept this License, since you have not
191signed it. However, nothing else grants you permission to modify or
192distribute the Program or its derivative works. These actions are
193prohibited by law if you do not accept this License. Therefore, by
194modifying or distributing the Program (or any work based on the
195Program), you indicate your acceptance of this License to do so, and
196all its terms and conditions for copying, distributing or modifying
197the Program or works based on it.
198
199 6. Each time you redistribute the Program (or any work based on the
200Program), the recipient automatically receives a license from the
201original licensor to copy, distribute or modify the Program subject to
202these terms and conditions. You may not impose any further
203restrictions on the recipients' exercise of the rights granted herein.
204You are not responsible for enforcing compliance by third parties to
205this License.
206
207 7. If, as a consequence of a court judgment or allegation of patent
208infringement or for any other reason (not limited to patent issues),
209conditions are imposed on you (whether by court order, agreement or
210otherwise) that contradict the conditions of this License, they do not
211excuse you from the conditions of this License. If you cannot
212distribute so as to satisfy simultaneously your obligations under this
213License and any other pertinent obligations, then as a consequence you
214may not distribute the Program at all. For example, if a patent
215license would not permit royalty-free redistribution of the Program by
216all those who receive copies directly or indirectly through you, then
217the only way you could satisfy both it and this License would be to
218refrain entirely from distribution of the Program.
219
220If any portion of this section is held invalid or unenforceable under
221any particular circumstance, the balance of the section is intended to
222apply and the section as a whole is intended to apply in other
223circumstances.
224
225It is not the purpose of this section to induce you to infringe any
226patents or other property right claims or to contest validity of any
227such claims; this section has the sole purpose of protecting the
228integrity of the free software distribution system, which is
229implemented by public license practices. Many people have made
230generous contributions to the wide range of software distributed
231through that system in reliance on consistent application of that
232system; it is up to the author/donor to decide if he or she is willing
233to distribute software through any other system and a licensee cannot
234impose that choice.
235
236This section is intended to make thoroughly clear what is believed to
237be a consequence of the rest of this License.
238
239 8. If the distribution and/or use of the Program is restricted in
240certain countries either by patents or by copyrighted interfaces, the
241original copyright holder who places the Program under this License
242may add an explicit geographical distribution limitation excluding
243those countries, so that distribution is permitted only in or among
244countries not thus excluded. In such case, this License incorporates
245the limitation as if written in the body of this License.
246
247 9. The Free Software Foundation may publish revised and/or new versions
248of the General Public License from time to time. Such new versions will
249be similar in spirit to the present version, but may differ in detail to
250address new problems or concerns.
251
252Each version is given a distinguishing version number. If the Program
253specifies a version number of this License which applies to it and "any
254later version", you have the option of following the terms and conditions
255either of that version or of any later version published by the Free
256Software Foundation. If the Program does not specify a version number of
257this License, you may choose any version ever published by the Free Software
258Foundation.
259
260 10. If you wish to incorporate parts of the Program into other free
261programs whose distribution conditions are different, write to the author
262to ask for permission. For software which is copyrighted by the Free
263Software Foundation, write to the Free Software Foundation; we sometimes
264make exceptions for this. Our decision will be guided by the two goals
265of preserving the free status of all derivatives of our free software and
266of promoting the sharing and reuse of software generally.
267
268 NO WARRANTY
269
270 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
271FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
272OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
273PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
274OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
275MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
276TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
277PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
278REPAIR OR CORRECTION.
279
280 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
281WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
282REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
283INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
284OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
285TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
286YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
287PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
288POSSIBILITY OF SUCH DAMAGES.
289
290 END OF TERMS AND CONDITIONS
291
292 How to Apply These Terms to Your New Programs
293
294 If you develop a new program, and you want it to be of the greatest
295possible use to the public, the best way to achieve this is to make it
296free software which everyone can redistribute and change under these terms.
297
298 To do so, attach the following notices to the program. It is safest
299to attach them to the start of each source file to most effectively
300convey the exclusion of warranty; and each file should have at least
301the "copyright" line and a pointer to where the full notice is found.
302
303 <one line to give the program's name and a brief idea of what it does.>
304 Copyright (C) 19yy <name of author>
305
306 This program is free software; you can redistribute it and/or modify
307 it under the terms of the GNU General Public License as published by
308 the Free Software Foundation; either version 2 of the License, or
309 (at your option) any later version.
310
311 This program is distributed in the hope that it will be useful,
312 but WITHOUT ANY WARRANTY; without even the implied warranty of
313 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
314 GNU General Public License for more details.
315
316 You should have received a copy of the GNU General Public License
317 along with this program; if not, write to the Free Software
318 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
319
320
321Also add information on how to contact you by electronic and paper mail.
322
323If the program is interactive, make it output a short notice like this
324when it starts in an interactive mode:
325
326 Gnomovision version 69, Copyright (C) 19yy name of author
327 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
328 This is free software, and you are welcome to redistribute it
329 under certain conditions; type `show c' for details.
330
331The hypothetical commands `show w' and `show c' should show the appropriate
332parts of the General Public License. Of course, the commands you use may
333be called something other than `show w' and `show c'; they could even be
334mouse-clicks or menu items--whatever suits your program.
335
336You should also get your employer (if you work as a programmer) or your
337school, if any, to sign a "copyright disclaimer" for the program, if
338necessary. Here is a sample; alter the names:
339
340 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
341 `Gnomovision' (which makes passes at compilers) written by James Hacker.
342
343 <signature of Ty Coon>, 1 April 1989
344 Ty Coon, President of Vice
345
346This General Public License does not permit incorporating your program into
347proprietary programs. If your program is a subroutine library, you may
348consider it more useful to permit linking proprietary applications with the
349library. If this is what you want to do, use the GNU Library General
350Public License instead of this License.
diff --git a/apps/codecs/libfaad/README b/apps/codecs/libfaad/README
new file mode 100644
index 0000000000..a3a3d5a833
--- /dev/null
+++ b/apps/codecs/libfaad/README
@@ -0,0 +1,122 @@
1
2Freeware Advanced Audio (AAC) Decoder including SBR decoding
3http://www.audiocoding.com/
4
5FAAD2 is a HE, LC, MAIN and LTP profile, MPEG2 and MPEG-4 AAC decoder.
6FAAD2 includes code for SBR (HE AAC) decoding.
7FAAD2 is licensed under the GPL.
8
9
10__________
11COPYRIGHTS
12
13For FAAD2 the following license applies:
14
15******************************************************************************
16** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
17** Copyright (C) 2003 M. Bakker (mbakker(at)nero.com), Ahead Software AG
18**
19** This program is free software; you can redistribute it and/or modify
20** it under the terms of the GNU General Public License as published by
21** the Free Software Foundation; either version 2 of the License, or
22** (at your option) any later version.
23**
24** This program is distributed in the hope that it will be useful,
25** but WITHOUT ANY WARRANTY; without even the implied warranty of
26** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27** GNU General Public License for more details.
28**
29** You should have received a copy of the GNU General Public License
30** along with this program; if not, write to the Free Software
31** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
32**
33** Commercial non-GPL licensing of this software is also possible.
34** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
35******************************************************************************
36
37
38Please note that the use of this software may require the payment of
39patent royalties. You need to consider this issue before you start
40building derivative works. We are not warranting or indemnifying you in
41any way for patent royalities! YOU ARE SOLELY RESPONSIBLE FOR YOUR OWN
42ACTIONS!
43
44
45______
46PEOPLE
47
48FAAD2 is written by:
49 - M. Bakker (mbakker(at)nero.com).
50
51
52_______________
53VERSION HISTORY
54
55Sorry, try building a ChangeLog from CVS.
56
57__________________________________
58REDISTRIBUTED OPEN SOURCE PACKAGES
59
60This is the list of redistributed open source packages that are included
61in FAAD2:
62
63Name: mp4v2
64Version: 0.9.8.6
65Origin: http://www.mpeg4ip.net
66Author: David Mackie
67Directory: common/mp4v2
68License: MPL, Mozilla Public License, version 1.1
69
70Name: mp4av
71Version: 0.9.8.6
72Origin: http://www.mpeg4ip.net
73Author: David Mackie
74Directory: common/mp4av
75License: MPL, Mozilla Public License, version 1.1
76
77
78___________________
79DIRECTORY STRUCTURE
80
81faad2 - top level directory.
82
83 aacDECdrop - windows decoder/player with drag'n'drop functionality
84
85 common - generally used libraries and code.
86
87 faad - general common functions like filereading and streaming
88 as well as getting info from aac files.
89
90 mp4v2 - MPEG-4 file reading library.
91
92 mp4av - MPEG-4 file general function library.
93
94 mp4ff - Small MP4 file format library (includes tagging abilities).
95
96 CoreAAC - AAC DirectShow filter.
97
98 frontend - command line frontend to the FAAD2 library, also supports
99 MPEG-4 file decoding.
100
101 include - inlude file for the FAAD2 library.
102
103 libfaad - the FAAD2 AAC decoder library including SBR.
104
105 codebook - Huffman codebooks
106
107 plugins - plugins for all kinds of pograms.
108
109 in_mp4 - winamp MPEG-4 AAC file input plugin.
110
111 QCD - Quintessential player AAC plugin.
112
113 QCDMp4 - Quintessential player MP4 plugin.
114
115 winamp - winamp2 AAC input plugin.
116
117 winamp3 - winamp3 AAC input plugin.
118
119 xmms - xmms AAC plugin
120
121 mpeg4ip - plugin for the mpeg4ip player
122
diff --git a/apps/codecs/libfaad/analysis.h b/apps/codecs/libfaad/analysis.h
new file mode 100644
index 0000000000..f1c3da7a8f
--- /dev/null
+++ b/apps/codecs/libfaad/analysis.h
@@ -0,0 +1,49 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __ANALYSIS_H__
29#define __ANALYSIS_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35
36#ifdef ANALYSIS
37#define DEBUGDEC ,uint8_t print,uint16_t var,uint8_t *dbg
38#define DEBUGVAR(A,B,C) ,A,B,C
39extern uint16_t dbg_count;
40#else
41#define DEBUGDEC
42#define DEBUGVAR(A,B,C)
43#endif
44
45
46#ifdef __cplusplus
47}
48#endif
49#endif
diff --git a/apps/codecs/libfaad/bits.c b/apps/codecs/libfaad/bits.c
new file mode 100644
index 0000000000..952a4a9df7
--- /dev/null
+++ b/apps/codecs/libfaad/bits.c
@@ -0,0 +1,213 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#include "common.h"
29#include "structs.h"
30
31#include <stdlib.h>
32#include <string.h>
33#include "bits.h"
34
35/* initialize buffer, call once before first getbits or showbits */
36void faad_initbits(bitfile *ld, const void *_buffer, const uint32_t buffer_size)
37{
38 uint32_t tmp;
39
40 if (ld == NULL)
41 return;
42
43 memset(ld, 0, sizeof(bitfile));
44
45 if (buffer_size == 0 || _buffer == NULL)
46 {
47 ld->error = 1;
48 ld->no_more_reading = 1;
49 return;
50 }
51
52 ld->buffer = faad_malloc((buffer_size+12)*sizeof(uint8_t));
53 memset(ld->buffer, 0, (buffer_size+12)*sizeof(uint8_t));
54 memcpy(ld->buffer, _buffer, buffer_size*sizeof(uint8_t));
55
56 ld->buffer_size = buffer_size;
57
58 tmp = getdword((uint32_t*)ld->buffer);
59 ld->bufa = tmp;
60
61 tmp = getdword((uint32_t*)ld->buffer + 1);
62 ld->bufb = tmp;
63
64 ld->start = (uint32_t*)ld->buffer;
65 ld->tail = ((uint32_t*)ld->buffer + 2);
66
67 ld->bits_left = 32;
68
69 ld->bytes_used = 0;
70 ld->no_more_reading = 0;
71 ld->error = 0;
72}
73
74void faad_endbits(bitfile *ld)
75{
76 if (ld)
77 {
78 if (ld->buffer)
79 {
80 faad_free(ld->buffer);
81 ld->buffer = NULL;
82 }
83 }
84}
85
86uint32_t faad_get_processed_bits(bitfile *ld)
87{
88 return (uint32_t)(8 * (4*(ld->tail - ld->start) - 4) - (ld->bits_left));
89}
90
91uint8_t faad_byte_align(bitfile *ld)
92{
93 uint8_t remainder = (uint8_t)((32 - ld->bits_left) % 8);
94
95 if (remainder)
96 {
97 faad_flushbits(ld, 8 - remainder);
98 return (8 - remainder);
99 }
100 return 0;
101}
102
103void faad_flushbits_ex(bitfile *ld, uint32_t bits)
104{
105 uint32_t tmp;
106
107 ld->bufa = ld->bufb;
108 if (ld->no_more_reading == 0)
109 {
110 tmp = getdword(ld->tail);
111 ld->tail++;
112 } else {
113 tmp = 0;
114 }
115 ld->bufb = tmp;
116 ld->bits_left += (32 - bits);
117 ld->bytes_used += 4;
118 if (ld->bytes_used == ld->buffer_size)
119 ld->no_more_reading = 1;
120 if (ld->bytes_used > ld->buffer_size)
121 ld->error = 1;
122}
123
124/* rewind to beginning */
125void faad_rewindbits(bitfile *ld)
126{
127 uint32_t tmp;
128
129 tmp = ld->start[0];
130#ifndef ARCH_IS_BIG_ENDIAN
131 BSWAP(tmp);
132#endif
133 ld->bufa = tmp;
134
135 tmp = ld->start[1];
136#ifndef ARCH_IS_BIG_ENDIAN
137 BSWAP(tmp);
138#endif
139 ld->bufb = tmp;
140 ld->bits_left = 32;
141 ld->tail = &ld->start[2];
142 ld->bytes_used = 0;
143 ld->no_more_reading = 0;
144}
145
146uint8_t *faad_getbitbuffer(bitfile *ld, uint32_t bits
147 DEBUGDEC)
148{
149 uint16_t i;
150 uint8_t temp;
151 uint16_t bytes = (uint16_t)bits / 8;
152 uint8_t remainder = (uint8_t)bits % 8;
153
154 uint8_t *buffer = (uint8_t*)faad_malloc((bytes+1)*sizeof(uint8_t));
155
156 for (i = 0; i < bytes; i++)
157 {
158 buffer[i] = (uint8_t)faad_getbits(ld, 8 DEBUGVAR(print,var,dbg));
159 }
160
161 if (remainder)
162 {
163 temp = (uint8_t)faad_getbits(ld, remainder DEBUGVAR(print,var,dbg)) << (8-remainder);
164
165 buffer[bytes] = temp;
166 }
167
168 return buffer;
169}
170
171#ifdef DRM
172/* return the original data buffer */
173void *faad_origbitbuffer(bitfile *ld)
174{
175 return (void*)ld->start;
176}
177
178/* return the original data buffer size */
179uint32_t faad_origbitbuffer_size(bitfile *ld)
180{
181 return ld->buffer_size;
182}
183#endif
184
185/* reversed bit reading routines, used for RVLC and HCR */
186void faad_initbits_rev(bitfile *ld, void *buffer,
187 uint32_t bits_in_buffer)
188{
189 uint32_t tmp;
190 int32_t index;
191
192 ld->buffer_size = bit2byte(bits_in_buffer);
193
194 index = (bits_in_buffer+31)/32 - 1;
195
196 ld->start = (uint32_t*)buffer + index - 2;
197
198 tmp = getdword((uint32_t*)buffer + index);
199 ld->bufa = tmp;
200
201 tmp = getdword((uint32_t*)buffer + index - 1);
202 ld->bufb = tmp;
203
204 ld->tail = (uint32_t*)buffer + index;
205
206 ld->bits_left = bits_in_buffer % 32;
207 if (ld->bits_left == 0)
208 ld->bits_left = 32;
209
210 ld->bytes_used = 0;
211 ld->no_more_reading = 0;
212 ld->error = 0;
213}
diff --git a/apps/codecs/libfaad/bits.h b/apps/codecs/libfaad/bits.h
new file mode 100644
index 0000000000..56d413e0c8
--- /dev/null
+++ b/apps/codecs/libfaad/bits.h
@@ -0,0 +1,382 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __BITS_H__
29#define __BITS_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#include "analysis.h"
36#ifdef ANALYSIS
37#include <stdio.h>
38#endif
39
40#define BYTE_NUMBIT 8
41#define bit2byte(a) ((a+7)/BYTE_NUMBIT)
42
43typedef struct _bitfile
44{
45 /* bit input */
46 uint32_t bufa;
47 uint32_t bufb;
48 uint32_t bits_left;
49 uint32_t buffer_size; /* size of the buffer in bytes */
50 uint32_t bytes_used;
51 uint8_t no_more_reading;
52 uint8_t error;
53 uint32_t *tail;
54 uint32_t *start;
55 void *buffer;
56} bitfile;
57
58
59#if defined (_WIN32) && !defined(_WIN32_WCE) && !defined(__MINGW32__)
60#define BSWAP(a) __asm mov eax,a __asm bswap eax __asm mov a, eax
61#elif defined(LINUX) || defined(DJGPP) || defined(__MINGW32__)
62#define BSWAP(a) __asm__ ( "bswapl %0\n" : "=r" (a) : "0" (a) )
63#else
64#define BSWAP(a) \
65 ((a) = ( ((a)&0xff)<<24) | (((a)&0xff00)<<8) | (((a)>>8)&0xff00) | (((a)>>24)&0xff))
66#endif
67
68static uint32_t bitmask[] = {
69 0x0, 0x1, 0x3, 0x7, 0xF, 0x1F, 0x3F, 0x7F, 0xFF, 0x1FF,
70 0x3FF, 0x7FF, 0xFFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF,
71 0x1FFFF, 0x3FFFF, 0x7FFFF, 0xFFFFF, 0x1FFFFF, 0x3FFFFF,
72 0x7FFFFF, 0xFFFFFF, 0x1FFFFFF, 0x3FFFFFF, 0x7FFFFFF,
73 0xFFFFFFF, 0x1FFFFFFF, 0x3FFFFFFF, 0x7FFFFFFF
74 /* added bitmask 32, correct?!?!?! */
75 , 0xFFFFFFFF
76};
77
78void faad_initbits(bitfile *ld, const void *buffer, const uint32_t buffer_size);
79void faad_endbits(bitfile *ld);
80void faad_initbits_rev(bitfile *ld, void *buffer,
81 uint32_t bits_in_buffer);
82uint8_t faad_byte_align(bitfile *ld);
83uint32_t faad_get_processed_bits(bitfile *ld);
84void faad_flushbits_ex(bitfile *ld, uint32_t bits);
85void faad_rewindbits(bitfile *ld);
86uint8_t *faad_getbitbuffer(bitfile *ld, uint32_t bits
87 DEBUGDEC);
88#ifdef DRM
89void *faad_origbitbuffer(bitfile *ld);
90uint32_t faad_origbitbuffer_size(bitfile *ld);
91#endif
92
93/* circumvent memory alignment errors on ARM */
94static INLINE uint32_t getdword(void *mem)
95{
96#ifdef ARM
97 uint32_t tmp;
98#ifndef ARCH_IS_BIG_ENDIAN
99 ((uint8_t*)&tmp)[0] = ((uint8_t*)mem)[3];
100 ((uint8_t*)&tmp)[1] = ((uint8_t*)mem)[2];
101 ((uint8_t*)&tmp)[2] = ((uint8_t*)mem)[1];
102 ((uint8_t*)&tmp)[3] = ((uint8_t*)mem)[0];
103#else
104 ((uint8_t*)&tmp)[0] = ((uint8_t*)mem)[0];
105 ((uint8_t*)&tmp)[1] = ((uint8_t*)mem)[1];
106 ((uint8_t*)&tmp)[2] = ((uint8_t*)mem)[2];
107 ((uint8_t*)&tmp)[3] = ((uint8_t*)mem)[3];
108#endif
109
110 return tmp;
111#else
112 uint32_t tmp;
113 tmp = *(uint32_t*)mem;
114#ifndef ARCH_IS_BIG_ENDIAN
115 BSWAP(tmp);
116#endif
117 return tmp;
118#endif
119}
120
121static INLINE uint32_t faad_showbits(bitfile *ld, uint32_t bits)
122{
123 if (bits <= ld->bits_left)
124 {
125 return (ld->bufa >> (ld->bits_left - bits)) & bitmask[bits];
126 }
127
128 bits -= ld->bits_left;
129 return ((ld->bufa & bitmask[ld->bits_left]) << bits) | (ld->bufb >> (32 - bits));
130}
131
132static INLINE void faad_flushbits(bitfile *ld, uint32_t bits)
133{
134 /* do nothing if error */
135 if (ld->error != 0)
136 return;
137
138 if (bits < ld->bits_left)
139 {
140 ld->bits_left -= bits;
141 } else {
142 faad_flushbits_ex(ld, bits);
143 }
144}
145
146/* return next n bits (right adjusted) */
147static INLINE uint32_t faad_getbits(bitfile *ld, uint32_t n DEBUGDEC)
148{
149 uint32_t ret;
150
151 if (ld->no_more_reading || n == 0)
152 return 0;
153
154 ret = faad_showbits(ld, n);
155 faad_flushbits(ld, n);
156
157#ifdef ANALYSIS
158 if (print)
159 fprintf(stdout, "%4d %2d bits, val: %4d, variable: %d %s\n", dbg_count++, n, ret, var, dbg);
160#endif
161
162 return ret;
163}
164
165static INLINE uint8_t faad_get1bit(bitfile *ld DEBUGDEC)
166{
167 uint8_t r;
168
169 if (ld->bits_left > 0)
170 {
171 ld->bits_left--;
172 r = (uint8_t)((ld->bufa >> ld->bits_left) & 1);
173 return r;
174 }
175
176 /* bits_left == 0 */
177#if 0
178 r = (uint8_t)(ld->bufb >> 31);
179 faad_flushbits_ex(ld, 1);
180#else
181 r = (uint8_t)faad_getbits(ld, 1);
182#endif
183 return r;
184}
185
186/* reversed bitreading routines */
187static INLINE uint32_t faad_showbits_rev(bitfile *ld, uint32_t bits)
188{
189 uint8_t i;
190 uint32_t B = 0;
191
192 if (bits <= ld->bits_left)
193 {
194 for (i = 0; i < bits; i++)
195 {
196 if (ld->bufa & (1 << (i + (32 - ld->bits_left))))
197 B |= (1 << (bits - i - 1));
198 }
199 return B;
200 } else {
201 for (i = 0; i < ld->bits_left; i++)
202 {
203 if (ld->bufa & (1 << (i + (32 - ld->bits_left))))
204 B |= (1 << (bits - i - 1));
205 }
206 for (i = 0; i < bits - ld->bits_left; i++)
207 {
208 if (ld->bufb & (1 << (i + (32-ld->bits_left))))
209 B |= (1 << (bits - ld->bits_left - i - 1));
210 }
211 return B;
212 }
213}
214
215static INLINE void faad_flushbits_rev(bitfile *ld, uint32_t bits)
216{
217 /* do nothing if error */
218 if (ld->error != 0)
219 return;
220
221 if (bits < ld->bits_left)
222 {
223 ld->bits_left -= bits;
224 } else {
225 uint32_t tmp;
226
227 ld->bufa = ld->bufb;
228 tmp = getdword(ld->start);
229 ld->bufb = tmp;
230 ld->start--;
231 ld->bits_left += (32 - bits);
232
233 ld->bytes_used += 4;
234 if (ld->bytes_used == ld->buffer_size)
235 ld->no_more_reading = 1;
236 if (ld->bytes_used > ld->buffer_size)
237 ld->error = 1;
238 }
239}
240
241static INLINE uint32_t faad_getbits_rev(bitfile *ld, uint32_t n
242 DEBUGDEC)
243{
244 uint32_t ret;
245
246 if (ld->no_more_reading)
247 return 0;
248
249 if (n == 0)
250 return 0;
251
252 ret = faad_showbits_rev(ld, n);
253 faad_flushbits_rev(ld, n);
254
255#ifdef ANALYSIS
256 if (print)
257 fprintf(stdout, "%4d %2d bits, val: %4d, variable: %d %s\n", dbg_count++, n, ret, var, dbg);
258#endif
259
260 return ret;
261}
262
263#ifdef DRM
264static uint8_t faad_check_CRC(bitfile *ld, uint16_t len)
265{
266 uint8_t CRC;
267 uint16_t r=255; /* Initialize to all ones */
268
269 /* CRC polynome used x^8 + x^4 + x^3 + x^2 +1 */
270#define GPOLY 0435
271
272 faad_rewindbits(ld);
273
274 CRC = (uint8_t) ~faad_getbits(ld, 8
275 DEBUGVAR(1,999,"faad_check_CRC(): CRC")); /* CRC is stored inverted */
276
277 for (; len>0; len--)
278 {
279 r = ( (r << 1) ^ (( ( faad_get1bit(ld
280 DEBUGVAR(1,998,"")) & 1) ^ ((r >> 7) & 1)) * GPOLY )) & 0xFF;
281 }
282
283 if (r != CRC)
284 {
285 return 8;
286 } else {
287 return 0;
288 }
289}
290
291static uint8_t tabFlipbits[256] = {
292 0,128,64,192,32,160,96,224,16,144,80,208,48,176,112,240,
293 8,136,72,200,40,168,104,232,24,152,88,216,56,184,120,248,
294 4,132,68,196,36,164,100,228,20,148,84,212,52,180,116,244,
295 12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,
296 2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,
297 10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,
298 6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,
299 14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,
300 1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,
301 9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,
302 5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,
303 13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,
304 3,131,67,195,35,163,99,227,19,147,83,211,51,179,115,243,
305 11,139,75,203,43,171,107,235,27,155,91,219,59,187,123,251,
306 7,135,71,199,39,167,103,231,23,151,87,215,55,183,119,247,
307 15,143,79,207,47,175,111,239,31,159,95,223,63,191,127,255
308};
309#endif
310
311#ifdef ERROR_RESILIENCE
312
313/* Modified bit reading functions for HCR */
314
315typedef struct
316{
317 /* bit input */
318 uint32_t bufa;
319 uint32_t bufb;
320 int8_t len;
321} bits_t;
322
323
324static INLINE uint32_t showbits_hcr(bits_t *ld, uint8_t bits)
325{
326 if (bits == 0) return 0;
327 if (ld->len <= 32)
328 {
329 /* huffman_spectral_data_2 needs to read more than may be available, bits maybe
330 > ld->len, deliver 0 than */
331 if (ld->len >= bits)
332 return ((ld->bufa >> (ld->len - bits)) & (0xFFFFFFFF >> (32 - bits)));
333 else
334 return ((ld->bufa << (bits - ld->len)) & (0xFFFFFFFF >> (32 - bits)));
335 } else {
336 if ((ld->len - bits) < 32)
337 {
338 return ( (ld->bufb & (0xFFFFFFFF >> (64 - ld->len))) << (bits - ld->len + 32)) |
339 (ld->bufa >> (ld->len - bits));
340 } else {
341 return ((ld->bufb >> (ld->len - bits - 32)) & (0xFFFFFFFF >> (32 - bits)));
342 }
343 }
344}
345
346/* return 1 if position is outside of buffer, 0 otherwise */
347static INLINE int8_t flushbits_hcr( bits_t *ld, uint8_t bits)
348{
349 ld->len -= bits;
350
351 if (ld->len <0)
352 {
353 ld->len = 0;
354 return 1;
355 } else {
356 return 0;
357 }
358}
359
360static INLINE int8_t getbits_hcr(bits_t *ld, uint8_t n, uint32_t *result)
361{
362 *result = showbits_hcr(ld, n);
363 return flushbits_hcr(ld, n);
364}
365
366static INLINE int8_t get1bit_hcr(bits_t *ld, uint8_t *result)
367{
368 uint32_t res;
369 int8_t ret;
370
371 ret = getbits_hcr(ld, 1, &res);
372 *result = (int8_t)(res & 1);
373 return ret;
374}
375
376#endif
377
378
379#ifdef __cplusplus
380}
381#endif
382#endif
diff --git a/apps/codecs/libfaad/cfft.c b/apps/codecs/libfaad/cfft.c
new file mode 100644
index 0000000000..441cd692de
--- /dev/null
+++ b/apps/codecs/libfaad/cfft.c
@@ -0,0 +1,1002 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28/*
29 * Algorithmically based on Fortran-77 FFTPACK
30 * by Paul N. Swarztrauber(Version 4, 1985).
31 *
32 * Does even sized fft only
33 */
34
35/* isign is +1 for backward and -1 for forward transforms */
36
37#include "common.h"
38#include "structs.h"
39
40#include <stdlib.h>
41
42#include "cfft.h"
43#include "cfft_tab.h"
44
45
46/* static function declarations */
47static void passf2pos(const uint16_t ido, const uint16_t l1, const complex_t *cc,
48 complex_t *ch, const complex_t *wa);
49static void passf2neg(const uint16_t ido, const uint16_t l1, const complex_t *cc,
50 complex_t *ch, const complex_t *wa);
51static void passf3(const uint16_t ido, const uint16_t l1, const complex_t *cc,
52 complex_t *ch, const complex_t *wa1, const complex_t *wa2, const int8_t isign);
53static void passf4pos(const uint16_t ido, const uint16_t l1, const complex_t *cc, complex_t *ch,
54 const complex_t *wa1, const complex_t *wa2, const complex_t *wa3);
55static void passf4neg(const uint16_t ido, const uint16_t l1, const complex_t *cc, complex_t *ch,
56 const complex_t *wa1, const complex_t *wa2, const complex_t *wa3);
57static void passf5(const uint16_t ido, const uint16_t l1, const complex_t *cc, complex_t *ch,
58 const complex_t *wa1, const complex_t *wa2, const complex_t *wa3,
59 const complex_t *wa4, const int8_t isign);
60INLINE void cfftf1(uint16_t n, complex_t *c, complex_t *ch,
61 const uint16_t *ifac, const complex_t *wa, const int8_t isign);
62static void cffti1(uint16_t n, complex_t *wa, uint16_t *ifac);
63
64
65/*----------------------------------------------------------------------
66 passf2, passf3, passf4, passf5. Complex FFT passes fwd and bwd.
67 ----------------------------------------------------------------------*/
68
69static void passf2pos(const uint16_t ido, const uint16_t l1, const complex_t *cc,
70 complex_t *ch, const complex_t *wa)
71{
72 uint16_t i, k, ah, ac;
73
74 if (ido == 1)
75 {
76 for (k = 0; k < l1; k++)
77 {
78 ah = 2*k;
79 ac = 4*k;
80
81 RE(ch[ah]) = RE(cc[ac]) + RE(cc[ac+1]);
82 RE(ch[ah+l1]) = RE(cc[ac]) - RE(cc[ac+1]);
83 IM(ch[ah]) = IM(cc[ac]) + IM(cc[ac+1]);
84 IM(ch[ah+l1]) = IM(cc[ac]) - IM(cc[ac+1]);
85 }
86 } else {
87 for (k = 0; k < l1; k++)
88 {
89 ah = k*ido;
90 ac = 2*k*ido;
91
92 for (i = 0; i < ido; i++)
93 {
94 complex_t t2;
95
96 RE(ch[ah+i]) = RE(cc[ac+i]) + RE(cc[ac+i+ido]);
97 RE(t2) = RE(cc[ac+i]) - RE(cc[ac+i+ido]);
98
99 IM(ch[ah+i]) = IM(cc[ac+i]) + IM(cc[ac+i+ido]);
100 IM(t2) = IM(cc[ac+i]) - IM(cc[ac+i+ido]);
101
102#if 1
103 ComplexMult(&IM(ch[ah+i+l1*ido]), &RE(ch[ah+i+l1*ido]),
104 IM(t2), RE(t2), RE(wa[i]), IM(wa[i]));
105#else
106 ComplexMult(&RE(ch[ah+i+l1*ido]), &IM(ch[ah+i+l1*ido]),
107 RE(t2), IM(t2), RE(wa[i]), IM(wa[i]));
108#endif
109 }
110 }
111 }
112}
113
114static void passf2neg(const uint16_t ido, const uint16_t l1, const complex_t *cc,
115 complex_t *ch, const complex_t *wa)
116{
117 uint16_t i, k, ah, ac;
118
119 if (ido == 1)
120 {
121 for (k = 0; k < l1; k++)
122 {
123 ah = 2*k;
124 ac = 4*k;
125
126 RE(ch[ah]) = RE(cc[ac]) + RE(cc[ac+1]);
127 RE(ch[ah+l1]) = RE(cc[ac]) - RE(cc[ac+1]);
128 IM(ch[ah]) = IM(cc[ac]) + IM(cc[ac+1]);
129 IM(ch[ah+l1]) = IM(cc[ac]) - IM(cc[ac+1]);
130 }
131 } else {
132 for (k = 0; k < l1; k++)
133 {
134 ah = k*ido;
135 ac = 2*k*ido;
136
137 for (i = 0; i < ido; i++)
138 {
139 complex_t t2;
140
141 RE(ch[ah+i]) = RE(cc[ac+i]) + RE(cc[ac+i+ido]);
142 RE(t2) = RE(cc[ac+i]) - RE(cc[ac+i+ido]);
143
144 IM(ch[ah+i]) = IM(cc[ac+i]) + IM(cc[ac+i+ido]);
145 IM(t2) = IM(cc[ac+i]) - IM(cc[ac+i+ido]);
146
147#if 1
148 ComplexMult(&RE(ch[ah+i+l1*ido]), &IM(ch[ah+i+l1*ido]),
149 RE(t2), IM(t2), RE(wa[i]), IM(wa[i]));
150#else
151 ComplexMult(&IM(ch[ah+i+l1*ido]), &RE(ch[ah+i+l1*ido]),
152 IM(t2), RE(t2), RE(wa[i]), IM(wa[i]));
153#endif
154 }
155 }
156 }
157}
158
159
160static void passf3(const uint16_t ido, const uint16_t l1, const complex_t *cc,
161 complex_t *ch, const complex_t *wa1, const complex_t *wa2,
162 const int8_t isign)
163{
164 static real_t taur = FRAC_CONST(-0.5);
165 static real_t taui = FRAC_CONST(0.866025403784439);
166 uint16_t i, k, ac, ah;
167 complex_t c2, c3, d2, d3, t2;
168
169 if (ido == 1)
170 {
171 if (isign == 1)
172 {
173 for (k = 0; k < l1; k++)
174 {
175 ac = 3*k+1;
176 ah = k;
177
178 RE(t2) = RE(cc[ac]) + RE(cc[ac+1]);
179 IM(t2) = IM(cc[ac]) + IM(cc[ac+1]);
180 RE(c2) = RE(cc[ac-1]) + MUL_F(RE(t2),taur);
181 IM(c2) = IM(cc[ac-1]) + MUL_F(IM(t2),taur);
182
183 RE(ch[ah]) = RE(cc[ac-1]) + RE(t2);
184 IM(ch[ah]) = IM(cc[ac-1]) + IM(t2);
185
186 RE(c3) = MUL_F((RE(cc[ac]) - RE(cc[ac+1])), taui);
187 IM(c3) = MUL_F((IM(cc[ac]) - IM(cc[ac+1])), taui);
188
189 RE(ch[ah+l1]) = RE(c2) - IM(c3);
190 IM(ch[ah+l1]) = IM(c2) + RE(c3);
191 RE(ch[ah+2*l1]) = RE(c2) + IM(c3);
192 IM(ch[ah+2*l1]) = IM(c2) - RE(c3);
193 }
194 } else {
195 for (k = 0; k < l1; k++)
196 {
197 ac = 3*k+1;
198 ah = k;
199
200 RE(t2) = RE(cc[ac]) + RE(cc[ac+1]);
201 IM(t2) = IM(cc[ac]) + IM(cc[ac+1]);
202 RE(c2) = RE(cc[ac-1]) + MUL_F(RE(t2),taur);
203 IM(c2) = IM(cc[ac-1]) + MUL_F(IM(t2),taur);
204
205 RE(ch[ah]) = RE(cc[ac-1]) + RE(t2);
206 IM(ch[ah]) = IM(cc[ac-1]) + IM(t2);
207
208 RE(c3) = MUL_F((RE(cc[ac]) - RE(cc[ac+1])), taui);
209 IM(c3) = MUL_F((IM(cc[ac]) - IM(cc[ac+1])), taui);
210
211 RE(ch[ah+l1]) = RE(c2) + IM(c3);
212 IM(ch[ah+l1]) = IM(c2) - RE(c3);
213 RE(ch[ah+2*l1]) = RE(c2) - IM(c3);
214 IM(ch[ah+2*l1]) = IM(c2) + RE(c3);
215 }
216 }
217 } else {
218 if (isign == 1)
219 {
220 for (k = 0; k < l1; k++)
221 {
222 for (i = 0; i < ido; i++)
223 {
224 ac = i + (3*k+1)*ido;
225 ah = i + k * ido;
226
227 RE(t2) = RE(cc[ac]) + RE(cc[ac+ido]);
228 RE(c2) = RE(cc[ac-ido]) + MUL_F(RE(t2),taur);
229 IM(t2) = IM(cc[ac]) + IM(cc[ac+ido]);
230 IM(c2) = IM(cc[ac-ido]) + MUL_F(IM(t2),taur);
231
232 RE(ch[ah]) = RE(cc[ac-ido]) + RE(t2);
233 IM(ch[ah]) = IM(cc[ac-ido]) + IM(t2);
234
235 RE(c3) = MUL_F((RE(cc[ac]) - RE(cc[ac+ido])), taui);
236 IM(c3) = MUL_F((IM(cc[ac]) - IM(cc[ac+ido])), taui);
237
238 RE(d2) = RE(c2) - IM(c3);
239 IM(d3) = IM(c2) - RE(c3);
240 RE(d3) = RE(c2) + IM(c3);
241 IM(d2) = IM(c2) + RE(c3);
242
243#if 1
244 ComplexMult(&IM(ch[ah+l1*ido]), &RE(ch[ah+l1*ido]),
245 IM(d2), RE(d2), RE(wa1[i]), IM(wa1[i]));
246 ComplexMult(&IM(ch[ah+2*l1*ido]), &RE(ch[ah+2*l1*ido]),
247 IM(d3), RE(d3), RE(wa2[i]), IM(wa2[i]));
248#else
249 ComplexMult(&RE(ch[ah+l1*ido]), &IM(ch[ah+l1*ido]),
250 RE(d2), IM(d2), RE(wa1[i]), IM(wa1[i]));
251 ComplexMult(&RE(ch[ah+2*l1*ido]), &IM(ch[ah+2*l1*ido]),
252 RE(d3), IM(d3), RE(wa2[i]), IM(wa2[i]));
253#endif
254 }
255 }
256 } else {
257 for (k = 0; k < l1; k++)
258 {
259 for (i = 0; i < ido; i++)
260 {
261 ac = i + (3*k+1)*ido;
262 ah = i + k * ido;
263
264 RE(t2) = RE(cc[ac]) + RE(cc[ac+ido]);
265 RE(c2) = RE(cc[ac-ido]) + MUL_F(RE(t2),taur);
266 IM(t2) = IM(cc[ac]) + IM(cc[ac+ido]);
267 IM(c2) = IM(cc[ac-ido]) + MUL_F(IM(t2),taur);
268
269 RE(ch[ah]) = RE(cc[ac-ido]) + RE(t2);
270 IM(ch[ah]) = IM(cc[ac-ido]) + IM(t2);
271
272 RE(c3) = MUL_F((RE(cc[ac]) - RE(cc[ac+ido])), taui);
273 IM(c3) = MUL_F((IM(cc[ac]) - IM(cc[ac+ido])), taui);
274
275 RE(d2) = RE(c2) + IM(c3);
276 IM(d3) = IM(c2) + RE(c3);
277 RE(d3) = RE(c2) - IM(c3);
278 IM(d2) = IM(c2) - RE(c3);
279
280#if 1
281 ComplexMult(&RE(ch[ah+l1*ido]), &IM(ch[ah+l1*ido]),
282 RE(d2), IM(d2), RE(wa1[i]), IM(wa1[i]));
283 ComplexMult(&RE(ch[ah+2*l1*ido]), &IM(ch[ah+2*l1*ido]),
284 RE(d3), IM(d3), RE(wa2[i]), IM(wa2[i]));
285#else
286 ComplexMult(&IM(ch[ah+l1*ido]), &RE(ch[ah+l1*ido]),
287 IM(d2), RE(d2), RE(wa1[i]), IM(wa1[i]));
288 ComplexMult(&IM(ch[ah+2*l1*ido]), &RE(ch[ah+2*l1*ido]),
289 IM(d3), RE(d3), RE(wa2[i]), IM(wa2[i]));
290#endif
291 }
292 }
293 }
294 }
295}
296
297
298static void passf4pos(const uint16_t ido, const uint16_t l1, const complex_t *cc,
299 complex_t *ch, const complex_t *wa1, const complex_t *wa2,
300 const complex_t *wa3)
301{
302 uint16_t i, k, ac, ah;
303
304 if (ido == 1)
305 {
306 for (k = 0; k < l1; k++)
307 {
308 complex_t t1, t2, t3, t4;
309
310 ac = 4*k;
311 ah = k;
312
313 RE(t2) = RE(cc[ac]) + RE(cc[ac+2]);
314 RE(t1) = RE(cc[ac]) - RE(cc[ac+2]);
315 IM(t2) = IM(cc[ac]) + IM(cc[ac+2]);
316 IM(t1) = IM(cc[ac]) - IM(cc[ac+2]);
317 RE(t3) = RE(cc[ac+1]) + RE(cc[ac+3]);
318 IM(t4) = RE(cc[ac+1]) - RE(cc[ac+3]);
319 IM(t3) = IM(cc[ac+3]) + IM(cc[ac+1]);
320 RE(t4) = IM(cc[ac+3]) - IM(cc[ac+1]);
321
322 RE(ch[ah]) = RE(t2) + RE(t3);
323 RE(ch[ah+2*l1]) = RE(t2) - RE(t3);
324
325 IM(ch[ah]) = IM(t2) + IM(t3);
326 IM(ch[ah+2*l1]) = IM(t2) - IM(t3);
327
328 RE(ch[ah+l1]) = RE(t1) + RE(t4);
329 RE(ch[ah+3*l1]) = RE(t1) - RE(t4);
330
331 IM(ch[ah+l1]) = IM(t1) + IM(t4);
332 IM(ch[ah+3*l1]) = IM(t1) - IM(t4);
333 }
334 } else {
335 for (k = 0; k < l1; k++)
336 {
337 ac = 4*k*ido;
338 ah = k*ido;
339
340 for (i = 0; i < ido; i++)
341 {
342 complex_t c2, c3, c4, t1, t2, t3, t4;
343
344 RE(t2) = RE(cc[ac+i]) + RE(cc[ac+i+2*ido]);
345 RE(t1) = RE(cc[ac+i]) - RE(cc[ac+i+2*ido]);
346 IM(t2) = IM(cc[ac+i]) + IM(cc[ac+i+2*ido]);
347 IM(t1) = IM(cc[ac+i]) - IM(cc[ac+i+2*ido]);
348 RE(t3) = RE(cc[ac+i+ido]) + RE(cc[ac+i+3*ido]);
349 IM(t4) = RE(cc[ac+i+ido]) - RE(cc[ac+i+3*ido]);
350 IM(t3) = IM(cc[ac+i+3*ido]) + IM(cc[ac+i+ido]);
351 RE(t4) = IM(cc[ac+i+3*ido]) - IM(cc[ac+i+ido]);
352
353 RE(c2) = RE(t1) + RE(t4);
354 RE(c4) = RE(t1) - RE(t4);
355
356 IM(c2) = IM(t1) + IM(t4);
357 IM(c4) = IM(t1) - IM(t4);
358
359 RE(ch[ah+i]) = RE(t2) + RE(t3);
360 RE(c3) = RE(t2) - RE(t3);
361
362 IM(ch[ah+i]) = IM(t2) + IM(t3);
363 IM(c3) = IM(t2) - IM(t3);
364
365#if 1
366 ComplexMult(&IM(ch[ah+i+l1*ido]), &RE(ch[ah+i+l1*ido]),
367 IM(c2), RE(c2), RE(wa1[i]), IM(wa1[i]));
368 ComplexMult(&IM(ch[ah+i+2*l1*ido]), &RE(ch[ah+i+2*l1*ido]),
369 IM(c3), RE(c3), RE(wa2[i]), IM(wa2[i]));
370 ComplexMult(&IM(ch[ah+i+3*l1*ido]), &RE(ch[ah+i+3*l1*ido]),
371 IM(c4), RE(c4), RE(wa3[i]), IM(wa3[i]));
372#else
373 ComplexMult(&RE(ch[ah+i+l1*ido]), &IM(ch[ah+i+l1*ido]),
374 RE(c2), IM(c2), RE(wa1[i]), IM(wa1[i]));
375 ComplexMult(&RE(ch[ah+i+2*l1*ido]), &IM(ch[ah+i+2*l1*ido]),
376 RE(c3), IM(c3), RE(wa2[i]), IM(wa2[i]));
377 ComplexMult(&RE(ch[ah+i+3*l1*ido]), &IM(ch[ah+i+3*l1*ido]),
378 RE(c4), IM(c4), RE(wa3[i]), IM(wa3[i]));
379#endif
380 }
381 }
382 }
383}
384
385static void passf4neg(const uint16_t ido, const uint16_t l1, const complex_t *cc,
386 complex_t *ch, const complex_t *wa1, const complex_t *wa2,
387 const complex_t *wa3)
388{
389 uint16_t i, k, ac, ah;
390
391 if (ido == 1)
392 {
393 for (k = 0; k < l1; k++)
394 {
395 complex_t t1, t2, t3, t4;
396
397 ac = 4*k;
398 ah = k;
399
400 RE(t2) = RE(cc[ac]) + RE(cc[ac+2]);
401 RE(t1) = RE(cc[ac]) - RE(cc[ac+2]);
402 IM(t2) = IM(cc[ac]) + IM(cc[ac+2]);
403 IM(t1) = IM(cc[ac]) - IM(cc[ac+2]);
404 RE(t3) = RE(cc[ac+1]) + RE(cc[ac+3]);
405 IM(t4) = RE(cc[ac+1]) - RE(cc[ac+3]);
406 IM(t3) = IM(cc[ac+3]) + IM(cc[ac+1]);
407 RE(t4) = IM(cc[ac+3]) - IM(cc[ac+1]);
408
409 RE(ch[ah]) = RE(t2) + RE(t3);
410 RE(ch[ah+2*l1]) = RE(t2) - RE(t3);
411
412 IM(ch[ah]) = IM(t2) + IM(t3);
413 IM(ch[ah+2*l1]) = IM(t2) - IM(t3);
414
415 RE(ch[ah+l1]) = RE(t1) - RE(t4);
416 RE(ch[ah+3*l1]) = RE(t1) + RE(t4);
417
418 IM(ch[ah+l1]) = IM(t1) - IM(t4);
419 IM(ch[ah+3*l1]) = IM(t1) + IM(t4);
420 }
421 } else {
422 for (k = 0; k < l1; k++)
423 {
424 ac = 4*k*ido;
425 ah = k*ido;
426
427 for (i = 0; i < ido; i++)
428 {
429 complex_t c2, c3, c4, t1, t2, t3, t4;
430
431 RE(t2) = RE(cc[ac+i]) + RE(cc[ac+i+2*ido]);
432 RE(t1) = RE(cc[ac+i]) - RE(cc[ac+i+2*ido]);
433 IM(t2) = IM(cc[ac+i]) + IM(cc[ac+i+2*ido]);
434 IM(t1) = IM(cc[ac+i]) - IM(cc[ac+i+2*ido]);
435 RE(t3) = RE(cc[ac+i+ido]) + RE(cc[ac+i+3*ido]);
436 IM(t4) = RE(cc[ac+i+ido]) - RE(cc[ac+i+3*ido]);
437 IM(t3) = IM(cc[ac+i+3*ido]) + IM(cc[ac+i+ido]);
438 RE(t4) = IM(cc[ac+i+3*ido]) - IM(cc[ac+i+ido]);
439
440 RE(c2) = RE(t1) - RE(t4);
441 RE(c4) = RE(t1) + RE(t4);
442
443 IM(c2) = IM(t1) - IM(t4);
444 IM(c4) = IM(t1) + IM(t4);
445
446 RE(ch[ah+i]) = RE(t2) + RE(t3);
447 RE(c3) = RE(t2) - RE(t3);
448
449 IM(ch[ah+i]) = IM(t2) + IM(t3);
450 IM(c3) = IM(t2) - IM(t3);
451
452#if 1
453 ComplexMult(&RE(ch[ah+i+l1*ido]), &IM(ch[ah+i+l1*ido]),
454 RE(c2), IM(c2), RE(wa1[i]), IM(wa1[i]));
455 ComplexMult(&RE(ch[ah+i+2*l1*ido]), &IM(ch[ah+i+2*l1*ido]),
456 RE(c3), IM(c3), RE(wa2[i]), IM(wa2[i]));
457 ComplexMult(&RE(ch[ah+i+3*l1*ido]), &IM(ch[ah+i+3*l1*ido]),
458 RE(c4), IM(c4), RE(wa3[i]), IM(wa3[i]));
459#else
460 ComplexMult(&IM(ch[ah+i+l1*ido]), &RE(ch[ah+i+l1*ido]),
461 IM(c2), RE(c2), RE(wa1[i]), IM(wa1[i]));
462 ComplexMult(&IM(ch[ah+i+2*l1*ido]), &RE(ch[ah+i+2*l1*ido]),
463 IM(c3), RE(c3), RE(wa2[i]), IM(wa2[i]));
464 ComplexMult(&IM(ch[ah+i+3*l1*ido]), &RE(ch[ah+i+3*l1*ido]),
465 IM(c4), RE(c4), RE(wa3[i]), IM(wa3[i]));
466#endif
467 }
468 }
469 }
470}
471
472static void passf5(const uint16_t ido, const uint16_t l1, const complex_t *cc,
473 complex_t *ch, const complex_t *wa1, const complex_t *wa2, const complex_t *wa3,
474 const complex_t *wa4, const int8_t isign)
475{
476 static real_t tr11 = FRAC_CONST(0.309016994374947);
477 static real_t ti11 = FRAC_CONST(0.951056516295154);
478 static real_t tr12 = FRAC_CONST(-0.809016994374947);
479 static real_t ti12 = FRAC_CONST(0.587785252292473);
480 uint16_t i, k, ac, ah;
481 complex_t c2, c3, c4, c5, d3, d4, d5, d2, t2, t3, t4, t5;
482
483 if (ido == 1)
484 {
485 if (isign == 1)
486 {
487 for (k = 0; k < l1; k++)
488 {
489 ac = 5*k + 1;
490 ah = k;
491
492 RE(t2) = RE(cc[ac]) + RE(cc[ac+3]);
493 IM(t2) = IM(cc[ac]) + IM(cc[ac+3]);
494 RE(t3) = RE(cc[ac+1]) + RE(cc[ac+2]);
495 IM(t3) = IM(cc[ac+1]) + IM(cc[ac+2]);
496 RE(t4) = RE(cc[ac+1]) - RE(cc[ac+2]);
497 IM(t4) = IM(cc[ac+1]) - IM(cc[ac+2]);
498 RE(t5) = RE(cc[ac]) - RE(cc[ac+3]);
499 IM(t5) = IM(cc[ac]) - IM(cc[ac+3]);
500
501 RE(ch[ah]) = RE(cc[ac-1]) + RE(t2) + RE(t3);
502 IM(ch[ah]) = IM(cc[ac-1]) + IM(t2) + IM(t3);
503
504 RE(c2) = RE(cc[ac-1]) + MUL_F(RE(t2),tr11) + MUL_F(RE(t3),tr12);
505 IM(c2) = IM(cc[ac-1]) + MUL_F(IM(t2),tr11) + MUL_F(IM(t3),tr12);
506 RE(c3) = RE(cc[ac-1]) + MUL_F(RE(t2),tr12) + MUL_F(RE(t3),tr11);
507 IM(c3) = IM(cc[ac-1]) + MUL_F(IM(t2),tr12) + MUL_F(IM(t3),tr11);
508
509 ComplexMult(&RE(c5), &RE(c4),
510 ti11, ti12, RE(t5), RE(t4));
511 ComplexMult(&IM(c5), &IM(c4),
512 ti11, ti12, IM(t5), IM(t4));
513
514 RE(ch[ah+l1]) = RE(c2) - IM(c5);
515 IM(ch[ah+l1]) = IM(c2) + RE(c5);
516 RE(ch[ah+2*l1]) = RE(c3) - IM(c4);
517 IM(ch[ah+2*l1]) = IM(c3) + RE(c4);
518 RE(ch[ah+3*l1]) = RE(c3) + IM(c4);
519 IM(ch[ah+3*l1]) = IM(c3) - RE(c4);
520 RE(ch[ah+4*l1]) = RE(c2) + IM(c5);
521 IM(ch[ah+4*l1]) = IM(c2) - RE(c5);
522 }
523 } else {
524 for (k = 0; k < l1; k++)
525 {
526 ac = 5*k + 1;
527 ah = k;
528
529 RE(t2) = RE(cc[ac]) + RE(cc[ac+3]);
530 IM(t2) = IM(cc[ac]) + IM(cc[ac+3]);
531 RE(t3) = RE(cc[ac+1]) + RE(cc[ac+2]);
532 IM(t3) = IM(cc[ac+1]) + IM(cc[ac+2]);
533 RE(t4) = RE(cc[ac+1]) - RE(cc[ac+2]);
534 IM(t4) = IM(cc[ac+1]) - IM(cc[ac+2]);
535 RE(t5) = RE(cc[ac]) - RE(cc[ac+3]);
536 IM(t5) = IM(cc[ac]) - IM(cc[ac+3]);
537
538 RE(ch[ah]) = RE(cc[ac-1]) + RE(t2) + RE(t3);
539 IM(ch[ah]) = IM(cc[ac-1]) + IM(t2) + IM(t3);
540
541 RE(c2) = RE(cc[ac-1]) + MUL_F(RE(t2),tr11) + MUL_F(RE(t3),tr12);
542 IM(c2) = IM(cc[ac-1]) + MUL_F(IM(t2),tr11) + MUL_F(IM(t3),tr12);
543 RE(c3) = RE(cc[ac-1]) + MUL_F(RE(t2),tr12) + MUL_F(RE(t3),tr11);
544 IM(c3) = IM(cc[ac-1]) + MUL_F(IM(t2),tr12) + MUL_F(IM(t3),tr11);
545
546 ComplexMult(&RE(c4), &RE(c5),
547 ti12, ti11, RE(t5), RE(t4));
548 ComplexMult(&IM(c4), &IM(c5),
549 ti12, ti12, IM(t5), IM(t4));
550
551 RE(ch[ah+l1]) = RE(c2) + IM(c5);
552 IM(ch[ah+l1]) = IM(c2) - RE(c5);
553 RE(ch[ah+2*l1]) = RE(c3) + IM(c4);
554 IM(ch[ah+2*l1]) = IM(c3) - RE(c4);
555 RE(ch[ah+3*l1]) = RE(c3) - IM(c4);
556 IM(ch[ah+3*l1]) = IM(c3) + RE(c4);
557 RE(ch[ah+4*l1]) = RE(c2) - IM(c5);
558 IM(ch[ah+4*l1]) = IM(c2) + RE(c5);
559 }
560 }
561 } else {
562 if (isign == 1)
563 {
564 for (k = 0; k < l1; k++)
565 {
566 for (i = 0; i < ido; i++)
567 {
568 ac = i + (k*5 + 1) * ido;
569 ah = i + k * ido;
570
571 RE(t2) = RE(cc[ac]) + RE(cc[ac+3*ido]);
572 IM(t2) = IM(cc[ac]) + IM(cc[ac+3*ido]);
573 RE(t3) = RE(cc[ac+ido]) + RE(cc[ac+2*ido]);
574 IM(t3) = IM(cc[ac+ido]) + IM(cc[ac+2*ido]);
575 RE(t4) = RE(cc[ac+ido]) - RE(cc[ac+2*ido]);
576 IM(t4) = IM(cc[ac+ido]) - IM(cc[ac+2*ido]);
577 RE(t5) = RE(cc[ac]) - RE(cc[ac+3*ido]);
578 IM(t5) = IM(cc[ac]) - IM(cc[ac+3*ido]);
579
580 RE(ch[ah]) = RE(cc[ac-ido]) + RE(t2) + RE(t3);
581 IM(ch[ah]) = IM(cc[ac-ido]) + IM(t2) + IM(t3);
582
583 RE(c2) = RE(cc[ac-ido]) + MUL_F(RE(t2),tr11) + MUL_F(RE(t3),tr12);
584 IM(c2) = IM(cc[ac-ido]) + MUL_F(IM(t2),tr11) + MUL_F(IM(t3),tr12);
585 RE(c3) = RE(cc[ac-ido]) + MUL_F(RE(t2),tr12) + MUL_F(RE(t3),tr11);
586 IM(c3) = IM(cc[ac-ido]) + MUL_F(IM(t2),tr12) + MUL_F(IM(t3),tr11);
587
588 ComplexMult(&RE(c5), &RE(c4),
589 ti11, ti12, RE(t5), RE(t4));
590 ComplexMult(&IM(c5), &IM(c4),
591 ti11, ti12, IM(t5), IM(t4));
592
593 IM(d2) = IM(c2) + RE(c5);
594 IM(d3) = IM(c3) + RE(c4);
595 RE(d4) = RE(c3) + IM(c4);
596 RE(d5) = RE(c2) + IM(c5);
597 RE(d2) = RE(c2) - IM(c5);
598 IM(d5) = IM(c2) - RE(c5);
599 RE(d3) = RE(c3) - IM(c4);
600 IM(d4) = IM(c3) - RE(c4);
601
602#if 1
603 ComplexMult(&IM(ch[ah+l1*ido]), &RE(ch[ah+l1*ido]),
604 IM(d2), RE(d2), RE(wa1[i]), IM(wa1[i]));
605 ComplexMult(&IM(ch[ah+2*l1*ido]), &RE(ch[ah+2*l1*ido]),
606 IM(d3), RE(d3), RE(wa2[i]), IM(wa2[i]));
607 ComplexMult(&IM(ch[ah+3*l1*ido]), &RE(ch[ah+3*l1*ido]),
608 IM(d4), RE(d4), RE(wa3[i]), IM(wa3[i]));
609 ComplexMult(&IM(ch[ah+4*l1*ido]), &RE(ch[ah+4*l1*ido]),
610 IM(d5), RE(d5), RE(wa4[i]), IM(wa4[i]));
611#else
612 ComplexMult(&RE(ch[ah+l1*ido]), &IM(ch[ah+l1*ido]),
613 RE(d2), IM(d2), RE(wa1[i]), IM(wa1[i]));
614 ComplexMult(&RE(ch[ah+2*l1*ido]), &IM(ch[ah+2*l1*ido]),
615 RE(d3), IM(d3), RE(wa2[i]), IM(wa2[i]));
616 ComplexMult(&RE(ch[ah+3*l1*ido]), &IM(ch[ah+3*l1*ido]),
617 RE(d4), IM(d4), RE(wa3[i]), IM(wa3[i]));
618 ComplexMult(&RE(ch[ah+4*l1*ido]), &IM(ch[ah+4*l1*ido]),
619 RE(d5), IM(d5), RE(wa4[i]), IM(wa4[i]));
620#endif
621 }
622 }
623 } else {
624 for (k = 0; k < l1; k++)
625 {
626 for (i = 0; i < ido; i++)
627 {
628 ac = i + (k*5 + 1) * ido;
629 ah = i + k * ido;
630
631 RE(t2) = RE(cc[ac]) + RE(cc[ac+3*ido]);
632 IM(t2) = IM(cc[ac]) + IM(cc[ac+3*ido]);
633 RE(t3) = RE(cc[ac+ido]) + RE(cc[ac+2*ido]);
634 IM(t3) = IM(cc[ac+ido]) + IM(cc[ac+2*ido]);
635 RE(t4) = RE(cc[ac+ido]) - RE(cc[ac+2*ido]);
636 IM(t4) = IM(cc[ac+ido]) - IM(cc[ac+2*ido]);
637 RE(t5) = RE(cc[ac]) - RE(cc[ac+3*ido]);
638 IM(t5) = IM(cc[ac]) - IM(cc[ac+3*ido]);
639
640 RE(ch[ah]) = RE(cc[ac-ido]) + RE(t2) + RE(t3);
641 IM(ch[ah]) = IM(cc[ac-ido]) + IM(t2) + IM(t3);
642
643 RE(c2) = RE(cc[ac-ido]) + MUL_F(RE(t2),tr11) + MUL_F(RE(t3),tr12);
644 IM(c2) = IM(cc[ac-ido]) + MUL_F(IM(t2),tr11) + MUL_F(IM(t3),tr12);
645 RE(c3) = RE(cc[ac-ido]) + MUL_F(RE(t2),tr12) + MUL_F(RE(t3),tr11);
646 IM(c3) = IM(cc[ac-ido]) + MUL_F(IM(t2),tr12) + MUL_F(IM(t3),tr11);
647
648 ComplexMult(&RE(c4), &RE(c5),
649 ti12, ti11, RE(t5), RE(t4));
650 ComplexMult(&IM(c4), &IM(c5),
651 ti12, ti12, IM(t5), IM(t4));
652
653 IM(d2) = IM(c2) - RE(c5);
654 IM(d3) = IM(c3) - RE(c4);
655 RE(d4) = RE(c3) - IM(c4);
656 RE(d5) = RE(c2) - IM(c5);
657 RE(d2) = RE(c2) + IM(c5);
658 IM(d5) = IM(c2) + RE(c5);
659 RE(d3) = RE(c3) + IM(c4);
660 IM(d4) = IM(c3) + RE(c4);
661
662#if 1
663 ComplexMult(&RE(ch[ah+l1*ido]), &IM(ch[ah+l1*ido]),
664 RE(d2), IM(d2), RE(wa1[i]), IM(wa1[i]));
665 ComplexMult(&RE(ch[ah+2*l1*ido]), &IM(ch[ah+2*l1*ido]),
666 RE(d3), IM(d3), RE(wa2[i]), IM(wa2[i]));
667 ComplexMult(&RE(ch[ah+3*l1*ido]), &IM(ch[ah+3*l1*ido]),
668 RE(d4), IM(d4), RE(wa3[i]), IM(wa3[i]));
669 ComplexMult(&RE(ch[ah+4*l1*ido]), &IM(ch[ah+4*l1*ido]),
670 RE(d5), IM(d5), RE(wa4[i]), IM(wa4[i]));
671#else
672 ComplexMult(&IM(ch[ah+l1*ido]), &RE(ch[ah+l1*ido]),
673 IM(d2), RE(d2), RE(wa1[i]), IM(wa1[i]));
674 ComplexMult(&IM(ch[ah+2*l1*ido]), &RE(ch[ah+2*l1*ido]),
675 IM(d3), RE(d3), RE(wa2[i]), IM(wa2[i]));
676 ComplexMult(&IM(ch[ah+3*l1*ido]), &RE(ch[ah+3*l1*ido]),
677 IM(d4), RE(d4), RE(wa3[i]), IM(wa3[i]));
678 ComplexMult(&IM(ch[ah+4*l1*ido]), &RE(ch[ah+4*l1*ido]),
679 IM(d5), RE(d5), RE(wa4[i]), IM(wa4[i]));
680#endif
681 }
682 }
683 }
684 }
685}
686
687
688/*----------------------------------------------------------------------
689 cfftf1, cfftf, cfftb, cffti1, cffti. Complex FFTs.
690 ----------------------------------------------------------------------*/
691
692static INLINE void cfftf1pos(uint16_t n, complex_t *c, complex_t *ch,
693 const uint16_t *ifac, const complex_t *wa,
694 const int8_t isign)
695{
696 uint16_t i;
697 uint16_t k1, l1, l2;
698 uint16_t na, nf, ip, iw, ix2, ix3, ix4, ido, idl1;
699
700 nf = ifac[1];
701 na = 0;
702 l1 = 1;
703 iw = 0;
704
705 for (k1 = 2; k1 <= nf+1; k1++)
706 {
707 ip = ifac[k1];
708 l2 = ip*l1;
709 ido = n / l2;
710 idl1 = ido*l1;
711
712 switch (ip)
713 {
714 case 4:
715 ix2 = iw + ido;
716 ix3 = ix2 + ido;
717
718 if (na == 0)
719 passf4pos((const uint16_t)ido, (const uint16_t)l1, (const complex_t*)c, ch, &wa[iw], &wa[ix2], &wa[ix3]);
720 else
721 passf4pos((const uint16_t)ido, (const uint16_t)l1, (const complex_t*)ch, c, &wa[iw], &wa[ix2], &wa[ix3]);
722
723 na = 1 - na;
724 break;
725 case 2:
726 if (na == 0)
727 passf2pos((const uint16_t)ido, (const uint16_t)l1, (const complex_t*)c, ch, &wa[iw]);
728 else
729 passf2pos((const uint16_t)ido, (const uint16_t)l1, (const complex_t*)ch, c, &wa[iw]);
730
731 na = 1 - na;
732 break;
733 case 3:
734 ix2 = iw + ido;
735
736 if (na == 0)
737 passf3((const uint16_t)ido, (const uint16_t)l1, (const complex_t*)c, ch, &wa[iw], &wa[ix2], isign);
738 else
739 passf3((const uint16_t)ido, (const uint16_t)l1, (const complex_t*)ch, c, &wa[iw], &wa[ix2], isign);
740
741 na = 1 - na;
742 break;
743 case 5:
744 ix2 = iw + ido;
745 ix3 = ix2 + ido;
746 ix4 = ix3 + ido;
747
748 if (na == 0)
749 passf5((const uint16_t)ido, (const uint16_t)l1, (const complex_t*)c, ch, &wa[iw], &wa[ix2], &wa[ix3], &wa[ix4], isign);
750 else
751 passf5((const uint16_t)ido, (const uint16_t)l1, (const complex_t*)ch, c, &wa[iw], &wa[ix2], &wa[ix3], &wa[ix4], isign);
752
753 na = 1 - na;
754 break;
755 }
756
757 l1 = l2;
758 iw += (ip-1) * ido;
759 }
760
761 if (na == 0)
762 return;
763
764 for (i = 0; i < n; i++)
765 {
766 RE(c[i]) = RE(ch[i]);
767 IM(c[i]) = IM(ch[i]);
768 }
769}
770
771static INLINE void cfftf1neg(uint16_t n, complex_t *c, complex_t *ch,
772 const uint16_t *ifac, const complex_t *wa,
773 const int8_t isign)
774{
775 uint16_t i;
776 uint16_t k1, l1, l2;
777 uint16_t na, nf, ip, iw, ix2, ix3, ix4, ido, idl1;
778
779 nf = ifac[1];
780 na = 0;
781 l1 = 1;
782 iw = 0;
783
784 for (k1 = 2; k1 <= nf+1; k1++)
785 {
786 ip = ifac[k1];
787 l2 = ip*l1;
788 ido = n / l2;
789 idl1 = ido*l1;
790
791 switch (ip)
792 {
793 case 4:
794 ix2 = iw + ido;
795 ix3 = ix2 + ido;
796
797 if (na == 0)
798 passf4neg((const uint16_t)ido, (const uint16_t)l1, (const complex_t*)c, ch, &wa[iw], &wa[ix2], &wa[ix3]);
799 else
800 passf4neg((const uint16_t)ido, (const uint16_t)l1, (const complex_t*)ch, c, &wa[iw], &wa[ix2], &wa[ix3]);
801
802 na = 1 - na;
803 break;
804 case 2:
805 if (na == 0)
806 passf2neg((const uint16_t)ido, (const uint16_t)l1, (const complex_t*)c, ch, &wa[iw]);
807 else
808 passf2neg((const uint16_t)ido, (const uint16_t)l1, (const complex_t*)ch, c, &wa[iw]);
809
810 na = 1 - na;
811 break;
812 case 3:
813 ix2 = iw + ido;
814
815 if (na == 0)
816 passf3((const uint16_t)ido, (const uint16_t)l1, (const complex_t*)c, ch, &wa[iw], &wa[ix2], isign);
817 else
818 passf3((const uint16_t)ido, (const uint16_t)l1, (const complex_t*)ch, c, &wa[iw], &wa[ix2], isign);
819
820 na = 1 - na;
821 break;
822 case 5:
823 ix2 = iw + ido;
824 ix3 = ix2 + ido;
825 ix4 = ix3 + ido;
826
827 if (na == 0)
828 passf5((const uint16_t)ido, (const uint16_t)l1, (const complex_t*)c, ch, &wa[iw], &wa[ix2], &wa[ix3], &wa[ix4], isign);
829 else
830 passf5((const uint16_t)ido, (const uint16_t)l1, (const complex_t*)ch, c, &wa[iw], &wa[ix2], &wa[ix3], &wa[ix4], isign);
831
832 na = 1 - na;
833 break;
834 }
835
836 l1 = l2;
837 iw += (ip-1) * ido;
838 }
839
840 if (na == 0)
841 return;
842
843 for (i = 0; i < n; i++)
844 {
845 RE(c[i]) = RE(ch[i]);
846 IM(c[i]) = IM(ch[i]);
847 }
848}
849
850void cfftf(cfft_info *cfft, complex_t *c)
851{
852 cfftf1neg(cfft->n, c, cfft->work, (const uint16_t*)cfft->ifac, (const complex_t*)cfft->tab, -1);
853}
854
855void cfftb(cfft_info *cfft, complex_t *c)
856{
857 cfftf1pos(cfft->n, c, cfft->work, (const uint16_t*)cfft->ifac, (const complex_t*)cfft->tab, +1);
858}
859
860static void cffti1(uint16_t n, complex_t *wa, uint16_t *ifac)
861{
862 static uint16_t ntryh[4] = {3, 4, 2, 5};
863#ifndef FIXED_POINT
864 real_t arg, argh, argld, fi;
865 uint16_t ido, ipm;
866 uint16_t i1, k1, l1, l2;
867 uint16_t ld, ii, ip;
868#endif
869 uint16_t ntry = 0, i, j;
870 uint16_t ib;
871 uint16_t nf, nl, nq, nr;
872
873 nl = n;
874 nf = 0;
875 j = 0;
876
877startloop:
878 j++;
879
880 if (j <= 4)
881 ntry = ntryh[j-1];
882 else
883 ntry += 2;
884
885 do
886 {
887 nq = nl / ntry;
888 nr = nl - ntry*nq;
889
890 if (nr != 0)
891 goto startloop;
892
893 nf++;
894 ifac[nf+1] = ntry;
895 nl = nq;
896
897 if (ntry == 2 && nf != 1)
898 {
899 for (i = 2; i <= nf; i++)
900 {
901 ib = nf - i + 2;
902 ifac[ib+1] = ifac[ib];
903 }
904 ifac[2] = 2;
905 }
906 } while (nl != 1);
907
908 ifac[0] = n;
909 ifac[1] = nf;
910
911#ifndef FIXED_POINT
912 argh = (real_t)2.0*(real_t)M_PI / (real_t)n;
913 i = 0;
914 l1 = 1;
915
916 for (k1 = 1; k1 <= nf; k1++)
917 {
918 ip = ifac[k1+1];
919 ld = 0;
920 l2 = l1*ip;
921 ido = n / l2;
922 ipm = ip - 1;
923
924 for (j = 0; j < ipm; j++)
925 {
926 i1 = i;
927 RE(wa[i]) = 1.0;
928 IM(wa[i]) = 0.0;
929 ld += l1;
930 fi = 0;
931 argld = ld*argh;
932
933 for (ii = 0; ii < ido; ii++)
934 {
935 i++;
936 fi++;
937 arg = fi * argld;
938 RE(wa[i]) = (real_t)cos(arg);
939#if 1
940 IM(wa[i]) = (real_t)sin(arg);
941#else
942 IM(wa[i]) = (real_t)-sin(arg);
943#endif
944 }
945
946 if (ip > 5)
947 {
948 RE(wa[i1]) = RE(wa[i]);
949 IM(wa[i1]) = IM(wa[i]);
950 }
951 }
952 l1 = l2;
953 }
954#endif
955}
956
957cfft_info *cffti(uint16_t n)
958{
959 cfft_info *cfft = (cfft_info*)faad_malloc(sizeof(cfft_info));
960
961 cfft->n = n;
962 cfft->work = (complex_t*)faad_malloc(n*sizeof(complex_t));
963
964#ifndef FIXED_POINT
965 cfft->tab = (complex_t*)faad_malloc(n*sizeof(complex_t));
966
967 cffti1(n, cfft->tab, cfft->ifac);
968#else
969 cffti1(n, NULL, cfft->ifac);
970
971 switch (n)
972 {
973 case 64: cfft->tab = (complex_t*)cfft_tab_64; break;
974 case 512: cfft->tab = (complex_t*)cfft_tab_512; break;
975#ifdef LD_DEC
976 case 256: cfft->tab = (complex_t*)cfft_tab_256; break;
977#endif
978
979#ifdef ALLOW_SMALL_FRAMELENGTH
980 case 60: cfft->tab = (complex_t*)cfft_tab_60; break;
981 case 480: cfft->tab = (complex_t*)cfft_tab_480; break;
982#ifdef LD_DEC
983 case 240: cfft->tab = (complex_t*)cfft_tab_240; break;
984#endif
985#endif
986 case 128: cfft->tab = (complex_t*)cfft_tab_128; break;
987 }
988#endif
989
990 return cfft;
991}
992
993void cfftu(cfft_info *cfft)
994{
995 if (cfft->work) faad_free(cfft->work);
996#ifndef FIXED_POINT
997 if (cfft->tab) faad_free(cfft->tab);
998#endif
999
1000 if (cfft) faad_free(cfft);
1001}
1002
diff --git a/apps/codecs/libfaad/cfft.h b/apps/codecs/libfaad/cfft.h
new file mode 100644
index 0000000000..04d410e5a9
--- /dev/null
+++ b/apps/codecs/libfaad/cfft.h
@@ -0,0 +1,53 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __CFFT_H__
29#define __CFFT_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35typedef struct
36{
37 uint16_t n;
38 uint16_t ifac[15];
39 complex_t *work;
40 complex_t *tab;
41} cfft_info;
42
43
44void cfftf(cfft_info *cfft, complex_t *c);
45void cfftb(cfft_info *cfft, complex_t *c);
46cfft_info *cffti(uint16_t n);
47void cfftu(cfft_info *cfft);
48
49
50#ifdef __cplusplus
51}
52#endif
53#endif
diff --git a/apps/codecs/libfaad/cfft_tab.h b/apps/codecs/libfaad/cfft_tab.h
new file mode 100644
index 0000000000..7ab7a110ca
--- /dev/null
+++ b/apps/codecs/libfaad/cfft_tab.h
@@ -0,0 +1,1820 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __CFFT_TAB_H__
29#define __CFFT_TAB_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#ifdef FIXED_POINT
36
37ALIGN static const complex_t cfft_tab_512[] =
38{
39 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
40 { FRAC_CONST(0.999924719333649), FRAC_CONST(0.012271538376808) },
41 { FRAC_CONST(0.999698817729950), FRAC_CONST(0.024541229009628) },
42 { FRAC_CONST(0.999322354793549), FRAC_CONST(0.036807224154472) },
43 { FRAC_CONST(0.998795449733734), FRAC_CONST(0.049067676067352) },
44 { FRAC_CONST(0.998118102550507), FRAC_CONST(0.061320740729570) },
45 { FRAC_CONST(0.997290432453156), FRAC_CONST(0.073564566671848) },
46 { FRAC_CONST(0.996312618255615), FRAC_CONST(0.085797317326069) },
47 { FRAC_CONST(0.995184719562531), FRAC_CONST(0.098017141222954) },
48 { FRAC_CONST(0.993906974792480), FRAC_CONST(0.110222205519676) },
49 { FRAC_CONST(0.992479562759399), FRAC_CONST(0.122410677373409) },
50 { FRAC_CONST(0.990902662277222), FRAC_CONST(0.134580716490746) },
51 { FRAC_CONST(0.989176511764526), FRAC_CONST(0.146730467677116) },
52 { FRAC_CONST(0.987301409244537), FRAC_CONST(0.158858150243759) },
53 { FRAC_CONST(0.985277652740479), FRAC_CONST(0.170961901545525) },
54 { FRAC_CONST(0.983105480670929), FRAC_CONST(0.183039888739586) },
55 { FRAC_CONST(0.980785250663757), FRAC_CONST(0.195090323686600) },
56 { FRAC_CONST(0.978317379951477), FRAC_CONST(0.207111388444901) },
57 { FRAC_CONST(0.975702106952667), FRAC_CONST(0.219101235270500) },
58 { FRAC_CONST(0.972939968109131), FRAC_CONST(0.231058120727539) },
59 { FRAC_CONST(0.970031261444092), FRAC_CONST(0.242980197072029) },
60 { FRAC_CONST(0.966976463794708), FRAC_CONST(0.254865676164627) },
61 { FRAC_CONST(0.963776051998138), FRAC_CONST(0.266712784767151) },
62 { FRAC_CONST(0.960430502891541), FRAC_CONST(0.278519690036774) },
63 { FRAC_CONST(0.956940352916718), FRAC_CONST(0.290284663438797) },
64 { FRAC_CONST(0.953306019306183), FRAC_CONST(0.302005946636200) },
65 { FRAC_CONST(0.949528157711029), FRAC_CONST(0.313681751489639) },
66 { FRAC_CONST(0.945607304573059), FRAC_CONST(0.325310319662094) },
67 { FRAC_CONST(0.941544055938721), FRAC_CONST(0.336889863014221) },
68 { FRAC_CONST(0.937339007854462), FRAC_CONST(0.348418682813644) },
69 { FRAC_CONST(0.932992815971375), FRAC_CONST(0.359895050525665) },
70 { FRAC_CONST(0.928506076335907), FRAC_CONST(0.371317207813263) },
71 { FRAC_CONST(0.923879504203796), FRAC_CONST(0.382683455944061) },
72 { FRAC_CONST(0.919113874435425), FRAC_CONST(0.393992066383362) },
73 { FRAC_CONST(0.914209723472595), FRAC_CONST(0.405241340398788) },
74 { FRAC_CONST(0.909167945384979), FRAC_CONST(0.416429579257965) },
75 { FRAC_CONST(0.903989315032959), FRAC_CONST(0.427555084228516) },
76 { FRAC_CONST(0.898674488067627), FRAC_CONST(0.438616245985031) },
77 { FRAC_CONST(0.893224298954010), FRAC_CONST(0.449611335992813) },
78 { FRAC_CONST(0.887639641761780), FRAC_CONST(0.460538715124130) },
79 { FRAC_CONST(0.881921231746674), FRAC_CONST(0.471396744251251) },
80 { FRAC_CONST(0.876070082187653), FRAC_CONST(0.482183754444122) },
81 { FRAC_CONST(0.870086967945099), FRAC_CONST(0.492898225784302) },
82 { FRAC_CONST(0.863972842693329), FRAC_CONST(0.503538370132446) },
83 { FRAC_CONST(0.857728600502014), FRAC_CONST(0.514102756977081) },
84 { FRAC_CONST(0.851355195045471), FRAC_CONST(0.524589717388153) },
85 { FRAC_CONST(0.844853579998016), FRAC_CONST(0.534997642040253) },
86 { FRAC_CONST(0.838224709033966), FRAC_CONST(0.545324981212616) },
87 { FRAC_CONST(0.831469595432281), FRAC_CONST(0.555570244789124) },
88 { FRAC_CONST(0.824589252471924), FRAC_CONST(0.565731823444366) },
89 { FRAC_CONST(0.817584812641144), FRAC_CONST(0.575808227062225) },
90 { FRAC_CONST(0.810457170009613), FRAC_CONST(0.585797905921936) },
91 { FRAC_CONST(0.803207516670227), FRAC_CONST(0.595699310302734) },
92 { FRAC_CONST(0.795836925506592), FRAC_CONST(0.605511009693146) },
93 { FRAC_CONST(0.788346409797668), FRAC_CONST(0.615231633186340) },
94 { FRAC_CONST(0.780737221240997), FRAC_CONST(0.624859511852264) },
95 { FRAC_CONST(0.773010432720184), FRAC_CONST(0.634393334388733) },
96 { FRAC_CONST(0.765167236328125), FRAC_CONST(0.643831551074982) },
97 { FRAC_CONST(0.757208824157715), FRAC_CONST(0.653172850608826) },
98 { FRAC_CONST(0.749136388301849), FRAC_CONST(0.662415802478790) },
99 { FRAC_CONST(0.740951120853424), FRAC_CONST(0.671558976173401) },
100 { FRAC_CONST(0.732654273509979), FRAC_CONST(0.680601000785828) },
101 { FRAC_CONST(0.724247097969055), FRAC_CONST(0.689540565013886) },
102 { FRAC_CONST(0.715730786323547), FRAC_CONST(0.698376297950745) },
103 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
104 { FRAC_CONST(0.698376238346100), FRAC_CONST(0.715730845928192) },
105 { FRAC_CONST(0.689540505409241), FRAC_CONST(0.724247097969055) },
106 { FRAC_CONST(0.680601000785828), FRAC_CONST(0.732654273509979) },
107 { FRAC_CONST(0.671558916568756), FRAC_CONST(0.740951180458069) },
108 { FRAC_CONST(0.662415742874146), FRAC_CONST(0.749136388301849) },
109 { FRAC_CONST(0.653172791004181), FRAC_CONST(0.757208883762360) },
110 { FRAC_CONST(0.643831551074982), FRAC_CONST(0.765167295932770) },
111 { FRAC_CONST(0.634393274784088), FRAC_CONST(0.773010432720184) },
112 { FRAC_CONST(0.624859452247620), FRAC_CONST(0.780737280845642) },
113 { FRAC_CONST(0.615231573581696), FRAC_CONST(0.788346409797668) },
114 { FRAC_CONST(0.605511009693146), FRAC_CONST(0.795836925506592) },
115 { FRAC_CONST(0.595699310302734), FRAC_CONST(0.803207516670227) },
116 { FRAC_CONST(0.585797846317291), FRAC_CONST(0.810457170009613) },
117 { FRAC_CONST(0.575808167457581), FRAC_CONST(0.817584812641144) },
118 { FRAC_CONST(0.565731823444366), FRAC_CONST(0.824589312076569) },
119 { FRAC_CONST(0.555570185184479), FRAC_CONST(0.831469655036926) },
120 { FRAC_CONST(0.545324981212616), FRAC_CONST(0.838224709033966) },
121 { FRAC_CONST(0.534997642040253), FRAC_CONST(0.844853579998016) },
122 { FRAC_CONST(0.524589657783508), FRAC_CONST(0.851355195045471) },
123 { FRAC_CONST(0.514102697372437), FRAC_CONST(0.857728660106659) },
124 { FRAC_CONST(0.503538429737091), FRAC_CONST(0.863972842693329) },
125 { FRAC_CONST(0.492898195981979), FRAC_CONST(0.870086967945099) },
126 { FRAC_CONST(0.482183724641800), FRAC_CONST(0.876070141792297) },
127 { FRAC_CONST(0.471396654844284), FRAC_CONST(0.881921291351318) },
128 { FRAC_CONST(0.460538715124130), FRAC_CONST(0.887639641761780) },
129 { FRAC_CONST(0.449611306190491), FRAC_CONST(0.893224298954010) },
130 { FRAC_CONST(0.438616186380386), FRAC_CONST(0.898674488067627) },
131 { FRAC_CONST(0.427555114030838), FRAC_CONST(0.903989315032959) },
132 { FRAC_CONST(0.416429549455643), FRAC_CONST(0.909168004989624) },
133 { FRAC_CONST(0.405241280794144), FRAC_CONST(0.914209783077240) },
134 { FRAC_CONST(0.393991947174072), FRAC_CONST(0.919113874435425) },
135 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
136 { FRAC_CONST(0.371317148208618), FRAC_CONST(0.928506076335907) },
137 { FRAC_CONST(0.359894961118698), FRAC_CONST(0.932992815971375) },
138 { FRAC_CONST(0.348418682813644), FRAC_CONST(0.937339007854462) },
139 { FRAC_CONST(0.336889833211899), FRAC_CONST(0.941544055938721) },
140 { FRAC_CONST(0.325310230255127), FRAC_CONST(0.945607364177704) },
141 { FRAC_CONST(0.313681662082672), FRAC_CONST(0.949528217315674) },
142 { FRAC_CONST(0.302005946636200), FRAC_CONST(0.953306019306183) },
143 { FRAC_CONST(0.290284633636475), FRAC_CONST(0.956940352916718) },
144 { FRAC_CONST(0.278519600629807), FRAC_CONST(0.960430562496185) },
145 { FRAC_CONST(0.266712754964828), FRAC_CONST(0.963776051998138) },
146 { FRAC_CONST(0.254865646362305), FRAC_CONST(0.966976463794708) },
147 { FRAC_CONST(0.242980122566223), FRAC_CONST(0.970031261444092) },
148 { FRAC_CONST(0.231058135628700), FRAC_CONST(0.972939968109131) },
149 { FRAC_CONST(0.219101220369339), FRAC_CONST(0.975702106952667) },
150 { FRAC_CONST(0.207111328840256), FRAC_CONST(0.978317379951477) },
151 { FRAC_CONST(0.195090234279633), FRAC_CONST(0.980785310268402) },
152 { FRAC_CONST(0.183039888739586), FRAC_CONST(0.983105480670929) },
153 { FRAC_CONST(0.170961856842041), FRAC_CONST(0.985277652740479) },
154 { FRAC_CONST(0.158858075737953), FRAC_CONST(0.987301409244537) },
155 { FRAC_CONST(0.146730497479439), FRAC_CONST(0.989176511764526) },
156 { FRAC_CONST(0.134580686688423), FRAC_CONST(0.990902662277222) },
157 { FRAC_CONST(0.122410625219345), FRAC_CONST(0.992479562759399) },
158 { FRAC_CONST(0.110222116112709), FRAC_CONST(0.993906974792480) },
159 { FRAC_CONST(0.098017133772373), FRAC_CONST(0.995184719562531) },
160 { FRAC_CONST(0.085797272622585), FRAC_CONST(0.996312618255615) },
161 { FRAC_CONST(0.073564492166042), FRAC_CONST(0.997290432453156) },
162 { FRAC_CONST(0.061320748180151), FRAC_CONST(0.998118102550507) },
163 { FRAC_CONST(0.049067649990320), FRAC_CONST(0.998795449733734) },
164 { FRAC_CONST(0.036807164549828), FRAC_CONST(0.999322414398193) },
165 { FRAC_CONST(0.024541135877371), FRAC_CONST(0.999698817729950) },
166 { FRAC_CONST(0.012271529063582), FRAC_CONST(0.999924719333649) },
167 { FRAC_CONST(-0.000000043711388), FRAC_CONST(1.000000000000000) },
168 { FRAC_CONST(-0.012271616607904), FRAC_CONST(0.999924719333649) },
169 { FRAC_CONST(-0.024541223421693), FRAC_CONST(0.999698817729950) },
170 { FRAC_CONST(-0.036807250231504), FRAC_CONST(0.999322354793549) },
171 { FRAC_CONST(-0.049067739397287), FRAC_CONST(0.998795449733734) },
172 { FRAC_CONST(-0.061320833861828), FRAC_CONST(0.998118102550507) },
173 { FRAC_CONST(-0.073564574122429), FRAC_CONST(0.997290432453156) },
174 { FRAC_CONST(-0.085797362029552), FRAC_CONST(0.996312618255615) },
175 { FRAC_CONST(-0.098017223179340), FRAC_CONST(0.995184719562531) },
176 { FRAC_CONST(-0.110222205519676), FRAC_CONST(0.993906974792480) },
177 { FRAC_CONST(-0.122410707175732), FRAC_CONST(0.992479503154755) },
178 { FRAC_CONST(-0.134580776095390), FRAC_CONST(0.990902602672577) },
179 { FRAC_CONST(-0.146730571985245), FRAC_CONST(0.989176511764526) },
180 { FRAC_CONST(-0.158858165144920), FRAC_CONST(0.987301409244537) },
181 { FRAC_CONST(-0.170961946249008), FRAC_CONST(0.985277652740479) },
182 { FRAC_CONST(-0.183039978146553), FRAC_CONST(0.983105480670929) },
183 { FRAC_CONST(-0.195090323686600), FRAC_CONST(0.980785250663757) },
184 { FRAC_CONST(-0.207111418247223), FRAC_CONST(0.978317379951477) },
185 { FRAC_CONST(-0.219101309776306), FRAC_CONST(0.975702106952667) },
186 { FRAC_CONST(-0.231058210134506), FRAC_CONST(0.972939908504486) },
187 { FRAC_CONST(-0.242980197072029), FRAC_CONST(0.970031261444092) },
188 { FRAC_CONST(-0.254865705966949), FRAC_CONST(0.966976463794708) },
189 { FRAC_CONST(-0.266712844371796), FRAC_CONST(0.963776051998138) },
190 { FRAC_CONST(-0.278519690036774), FRAC_CONST(0.960430502891541) },
191 { FRAC_CONST(-0.290284723043442), FRAC_CONST(0.956940293312073) },
192 { FRAC_CONST(-0.302006036043167), FRAC_CONST(0.953306019306183) },
193 { FRAC_CONST(-0.313681721687317), FRAC_CONST(0.949528157711029) },
194 { FRAC_CONST(-0.325310319662094), FRAC_CONST(0.945607304573059) },
195 { FRAC_CONST(-0.336889922618866), FRAC_CONST(0.941544055938721) },
196 { FRAC_CONST(-0.348418772220612), FRAC_CONST(0.937338948249817) },
197 { FRAC_CONST(-0.359895050525665), FRAC_CONST(0.932992815971375) },
198 { FRAC_CONST(-0.371317237615585), FRAC_CONST(0.928506076335907) },
199 { FRAC_CONST(-0.382683515548706), FRAC_CONST(0.923879504203796) },
200 { FRAC_CONST(-0.393992036581039), FRAC_CONST(0.919113874435425) },
201 { FRAC_CONST(-0.405241340398788), FRAC_CONST(0.914209723472595) },
202 { FRAC_CONST(-0.416429519653320), FRAC_CONST(0.909168004989624) },
203 { FRAC_CONST(-0.427555084228516), FRAC_CONST(0.903989315032959) },
204 { FRAC_CONST(-0.438616245985031), FRAC_CONST(0.898674428462982) },
205 { FRAC_CONST(-0.449611365795136), FRAC_CONST(0.893224298954010) },
206 { FRAC_CONST(-0.460538804531097), FRAC_CONST(0.887639582157135) },
207 { FRAC_CONST(-0.471396833658218), FRAC_CONST(0.881921231746674) },
208 { FRAC_CONST(-0.482183903455734), FRAC_CONST(0.876070022583008) },
209 { FRAC_CONST(-0.492898166179657), FRAC_CONST(0.870087027549744) },
210 { FRAC_CONST(-0.503538370132446), FRAC_CONST(0.863972842693329) },
211 { FRAC_CONST(-0.514102756977081), FRAC_CONST(0.857728600502014) },
212 { FRAC_CONST(-0.524589717388153), FRAC_CONST(0.851355135440826) },
213 { FRAC_CONST(-0.534997701644897), FRAC_CONST(0.844853520393372) },
214 { FRAC_CONST(-0.545325100421906), FRAC_CONST(0.838224649429321) },
215 { FRAC_CONST(-0.555570363998413), FRAC_CONST(0.831469535827637) },
216 { FRAC_CONST(-0.565731763839722), FRAC_CONST(0.824589312076569) },
217 { FRAC_CONST(-0.575808167457581), FRAC_CONST(0.817584812641144) },
218 { FRAC_CONST(-0.585797905921936), FRAC_CONST(0.810457170009613) },
219 { FRAC_CONST(-0.595699369907379), FRAC_CONST(0.803207516670227) },
220 { FRAC_CONST(-0.605511128902435), FRAC_CONST(0.795836865901947) },
221 { FRAC_CONST(-0.615231692790985), FRAC_CONST(0.788346350193024) },
222 { FRAC_CONST(-0.624859631061554), FRAC_CONST(0.780737102031708) },
223 { FRAC_CONST(-0.634393274784088), FRAC_CONST(0.773010492324829) },
224 { FRAC_CONST(-0.643831551074982), FRAC_CONST(0.765167236328125) },
225 { FRAC_CONST(-0.653172850608826), FRAC_CONST(0.757208824157715) },
226 { FRAC_CONST(-0.662415802478790), FRAC_CONST(0.749136328697205) },
227 { FRAC_CONST(-0.671559035778046), FRAC_CONST(0.740951061248779) },
228 { FRAC_CONST(-0.680601119995117), FRAC_CONST(0.732654154300690) },
229 { FRAC_CONST(-0.689540684223175), FRAC_CONST(0.724246978759766) },
230 { FRAC_CONST(-0.698376238346100), FRAC_CONST(0.715730845928192) },
231 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
232 { FRAC_CONST(-0.715730845928192), FRAC_CONST(0.698376238346100) },
233 { FRAC_CONST(-0.724247157573700), FRAC_CONST(0.689540505409241) },
234 { FRAC_CONST(-0.732654333114624), FRAC_CONST(0.680600941181183) },
235 { FRAC_CONST(-0.740951240062714), FRAC_CONST(0.671558856964111) },
236 { FRAC_CONST(-0.749136507511139), FRAC_CONST(0.662415623664856) },
237 { FRAC_CONST(-0.757208824157715), FRAC_CONST(0.653172850608826) },
238 { FRAC_CONST(-0.765167295932770), FRAC_CONST(0.643831551074982) },
239 { FRAC_CONST(-0.773010492324829), FRAC_CONST(0.634393274784088) },
240 { FRAC_CONST(-0.780737280845642), FRAC_CONST(0.624859452247620) },
241 { FRAC_CONST(-0.788346469402313), FRAC_CONST(0.615231513977051) },
242 { FRAC_CONST(-0.795836985111237), FRAC_CONST(0.605510950088501) },
243 { FRAC_CONST(-0.803207635879517), FRAC_CONST(0.595699131488800) },
244 { FRAC_CONST(-0.810457170009613), FRAC_CONST(0.585797846317291) },
245 { FRAC_CONST(-0.817584812641144), FRAC_CONST(0.575808167457581) },
246 { FRAC_CONST(-0.824589312076569), FRAC_CONST(0.565731763839722) },
247 { FRAC_CONST(-0.831469655036926), FRAC_CONST(0.555570185184479) },
248 { FRAC_CONST(-0.838224768638611), FRAC_CONST(0.545324862003326) },
249 { FRAC_CONST(-0.844853639602661), FRAC_CONST(0.534997463226318) },
250 { FRAC_CONST(-0.851355314254761), FRAC_CONST(0.524589538574219) },
251 { FRAC_CONST(-0.857728600502014), FRAC_CONST(0.514102756977081) },
252 { FRAC_CONST(-0.863972842693329), FRAC_CONST(0.503538370132446) },
253 { FRAC_CONST(-0.870087027549744), FRAC_CONST(0.492898136377335) },
254 { FRAC_CONST(-0.876070141792297), FRAC_CONST(0.482183694839478) },
255 { FRAC_CONST(-0.881921350955963), FRAC_CONST(0.471396625041962) },
256 { FRAC_CONST(-0.887639701366425), FRAC_CONST(0.460538566112518) },
257 { FRAC_CONST(-0.893224298954010), FRAC_CONST(0.449611365795136) },
258 { FRAC_CONST(-0.898674488067627), FRAC_CONST(0.438616245985031) },
259 { FRAC_CONST(-0.903989315032959), FRAC_CONST(0.427555054426193) },
260 { FRAC_CONST(-0.909168004989624), FRAC_CONST(0.416429489850998) },
261 { FRAC_CONST(-0.914209783077240), FRAC_CONST(0.405241221189499) },
262 { FRAC_CONST(-0.919113874435425), FRAC_CONST(0.393991917371750) },
263 { FRAC_CONST(-0.923879623413086), FRAC_CONST(0.382683277130127) },
264 { FRAC_CONST(-0.928506076335907), FRAC_CONST(0.371317237615585) },
265 { FRAC_CONST(-0.932992815971375), FRAC_CONST(0.359895050525665) },
266 { FRAC_CONST(-0.937339007854462), FRAC_CONST(0.348418653011322) },
267 { FRAC_CONST(-0.941544115543365), FRAC_CONST(0.336889803409576) },
268 { FRAC_CONST(-0.945607364177704), FRAC_CONST(0.325310200452805) },
269 { FRAC_CONST(-0.949528217315674), FRAC_CONST(0.313681602478027) },
270 { FRAC_CONST(-0.953306078910828), FRAC_CONST(0.302005797624588) },
271 { FRAC_CONST(-0.956940352916718), FRAC_CONST(0.290284723043442) },
272 { FRAC_CONST(-0.960430502891541), FRAC_CONST(0.278519690036774) },
273 { FRAC_CONST(-0.963776051998138), FRAC_CONST(0.266712725162506) },
274 { FRAC_CONST(-0.966976463794708), FRAC_CONST(0.254865586757660) },
275 { FRAC_CONST(-0.970031261444092), FRAC_CONST(0.242980077862740) },
276 { FRAC_CONST(-0.972939968109131), FRAC_CONST(0.231057971715927) },
277 { FRAC_CONST(-0.975702166557312), FRAC_CONST(0.219101071357727) },
278 { FRAC_CONST(-0.978317379951477), FRAC_CONST(0.207111403346062) },
279 { FRAC_CONST(-0.980785310268402), FRAC_CONST(0.195090308785439) },
280 { FRAC_CONST(-0.983105480670929), FRAC_CONST(0.183039844036102) },
281 { FRAC_CONST(-0.985277652740479), FRAC_CONST(0.170961812138557) },
282 { FRAC_CONST(-0.987301409244537), FRAC_CONST(0.158858031034470) },
283 { FRAC_CONST(-0.989176511764526), FRAC_CONST(0.146730333566666) },
284 { FRAC_CONST(-0.990902662277222), FRAC_CONST(0.134580522775650) },
285 { FRAC_CONST(-0.992479503154755), FRAC_CONST(0.122410699725151) },
286 { FRAC_CONST(-0.993906974792480), FRAC_CONST(0.110222198069096) },
287 { FRAC_CONST(-0.995184719562531), FRAC_CONST(0.098017096519470) },
288 { FRAC_CONST(-0.996312618255615), FRAC_CONST(0.085797227919102) },
289 { FRAC_CONST(-0.997290492057800), FRAC_CONST(0.073564447462559) },
290 { FRAC_CONST(-0.998118102550507), FRAC_CONST(0.061320584267378) },
291 { FRAC_CONST(-0.998795449733734), FRAC_CONST(0.049067486077547) },
292 { FRAC_CONST(-0.999322354793549), FRAC_CONST(0.036807239055634) },
293 { FRAC_CONST(-0.999698817729950), FRAC_CONST(0.024541210383177) },
294 { FRAC_CONST(-0.999924719333649), FRAC_CONST(0.012271485291421) },
295 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
296 { FRAC_CONST(0.999698817729950), FRAC_CONST(0.024541229009628) },
297 { FRAC_CONST(0.998795449733734), FRAC_CONST(0.049067676067352) },
298 { FRAC_CONST(0.997290432453156), FRAC_CONST(0.073564566671848) },
299 { FRAC_CONST(0.995184719562531), FRAC_CONST(0.098017141222954) },
300 { FRAC_CONST(0.992479562759399), FRAC_CONST(0.122410677373409) },
301 { FRAC_CONST(0.989176511764526), FRAC_CONST(0.146730467677116) },
302 { FRAC_CONST(0.985277652740479), FRAC_CONST(0.170961901545525) },
303 { FRAC_CONST(0.980785250663757), FRAC_CONST(0.195090323686600) },
304 { FRAC_CONST(0.975702106952667), FRAC_CONST(0.219101235270500) },
305 { FRAC_CONST(0.970031261444092), FRAC_CONST(0.242980197072029) },
306 { FRAC_CONST(0.963776051998138), FRAC_CONST(0.266712784767151) },
307 { FRAC_CONST(0.956940352916718), FRAC_CONST(0.290284663438797) },
308 { FRAC_CONST(0.949528157711029), FRAC_CONST(0.313681751489639) },
309 { FRAC_CONST(0.941544055938721), FRAC_CONST(0.336889863014221) },
310 { FRAC_CONST(0.932992815971375), FRAC_CONST(0.359895050525665) },
311 { FRAC_CONST(0.923879504203796), FRAC_CONST(0.382683455944061) },
312 { FRAC_CONST(0.914209723472595), FRAC_CONST(0.405241340398788) },
313 { FRAC_CONST(0.903989315032959), FRAC_CONST(0.427555084228516) },
314 { FRAC_CONST(0.893224298954010), FRAC_CONST(0.449611335992813) },
315 { FRAC_CONST(0.881921231746674), FRAC_CONST(0.471396744251251) },
316 { FRAC_CONST(0.870086967945099), FRAC_CONST(0.492898225784302) },
317 { FRAC_CONST(0.857728600502014), FRAC_CONST(0.514102756977081) },
318 { FRAC_CONST(0.844853579998016), FRAC_CONST(0.534997642040253) },
319 { FRAC_CONST(0.831469595432281), FRAC_CONST(0.555570244789124) },
320 { FRAC_CONST(0.817584812641144), FRAC_CONST(0.575808227062225) },
321 { FRAC_CONST(0.803207516670227), FRAC_CONST(0.595699310302734) },
322 { FRAC_CONST(0.788346409797668), FRAC_CONST(0.615231633186340) },
323 { FRAC_CONST(0.773010432720184), FRAC_CONST(0.634393334388733) },
324 { FRAC_CONST(0.757208824157715), FRAC_CONST(0.653172850608826) },
325 { FRAC_CONST(0.740951120853424), FRAC_CONST(0.671558976173401) },
326 { FRAC_CONST(0.724247097969055), FRAC_CONST(0.689540565013886) },
327 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
328 { FRAC_CONST(0.689540505409241), FRAC_CONST(0.724247097969055) },
329 { FRAC_CONST(0.671558916568756), FRAC_CONST(0.740951180458069) },
330 { FRAC_CONST(0.653172791004181), FRAC_CONST(0.757208883762360) },
331 { FRAC_CONST(0.634393274784088), FRAC_CONST(0.773010432720184) },
332 { FRAC_CONST(0.615231573581696), FRAC_CONST(0.788346409797668) },
333 { FRAC_CONST(0.595699310302734), FRAC_CONST(0.803207516670227) },
334 { FRAC_CONST(0.575808167457581), FRAC_CONST(0.817584812641144) },
335 { FRAC_CONST(0.555570185184479), FRAC_CONST(0.831469655036926) },
336 { FRAC_CONST(0.534997642040253), FRAC_CONST(0.844853579998016) },
337 { FRAC_CONST(0.514102697372437), FRAC_CONST(0.857728660106659) },
338 { FRAC_CONST(0.492898195981979), FRAC_CONST(0.870086967945099) },
339 { FRAC_CONST(0.471396654844284), FRAC_CONST(0.881921291351318) },
340 { FRAC_CONST(0.449611306190491), FRAC_CONST(0.893224298954010) },
341 { FRAC_CONST(0.427555114030838), FRAC_CONST(0.903989315032959) },
342 { FRAC_CONST(0.405241280794144), FRAC_CONST(0.914209783077240) },
343 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
344 { FRAC_CONST(0.359894961118698), FRAC_CONST(0.932992815971375) },
345 { FRAC_CONST(0.336889833211899), FRAC_CONST(0.941544055938721) },
346 { FRAC_CONST(0.313681662082672), FRAC_CONST(0.949528217315674) },
347 { FRAC_CONST(0.290284633636475), FRAC_CONST(0.956940352916718) },
348 { FRAC_CONST(0.266712754964828), FRAC_CONST(0.963776051998138) },
349 { FRAC_CONST(0.242980122566223), FRAC_CONST(0.970031261444092) },
350 { FRAC_CONST(0.219101220369339), FRAC_CONST(0.975702106952667) },
351 { FRAC_CONST(0.195090234279633), FRAC_CONST(0.980785310268402) },
352 { FRAC_CONST(0.170961856842041), FRAC_CONST(0.985277652740479) },
353 { FRAC_CONST(0.146730497479439), FRAC_CONST(0.989176511764526) },
354 { FRAC_CONST(0.122410625219345), FRAC_CONST(0.992479562759399) },
355 { FRAC_CONST(0.098017133772373), FRAC_CONST(0.995184719562531) },
356 { FRAC_CONST(0.073564492166042), FRAC_CONST(0.997290432453156) },
357 { FRAC_CONST(0.049067649990320), FRAC_CONST(0.998795449733734) },
358 { FRAC_CONST(0.024541135877371), FRAC_CONST(0.999698817729950) },
359 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
360 { FRAC_CONST(0.998795449733734), FRAC_CONST(0.049067676067352) },
361 { FRAC_CONST(0.995184719562531), FRAC_CONST(0.098017141222954) },
362 { FRAC_CONST(0.989176511764526), FRAC_CONST(0.146730467677116) },
363 { FRAC_CONST(0.980785250663757), FRAC_CONST(0.195090323686600) },
364 { FRAC_CONST(0.970031261444092), FRAC_CONST(0.242980197072029) },
365 { FRAC_CONST(0.956940352916718), FRAC_CONST(0.290284663438797) },
366 { FRAC_CONST(0.941544055938721), FRAC_CONST(0.336889863014221) },
367 { FRAC_CONST(0.923879504203796), FRAC_CONST(0.382683455944061) },
368 { FRAC_CONST(0.903989315032959), FRAC_CONST(0.427555084228516) },
369 { FRAC_CONST(0.881921231746674), FRAC_CONST(0.471396744251251) },
370 { FRAC_CONST(0.857728600502014), FRAC_CONST(0.514102756977081) },
371 { FRAC_CONST(0.831469595432281), FRAC_CONST(0.555570244789124) },
372 { FRAC_CONST(0.803207516670227), FRAC_CONST(0.595699310302734) },
373 { FRAC_CONST(0.773010432720184), FRAC_CONST(0.634393334388733) },
374 { FRAC_CONST(0.740951120853424), FRAC_CONST(0.671558976173401) },
375 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
376 { FRAC_CONST(0.671558916568756), FRAC_CONST(0.740951180458069) },
377 { FRAC_CONST(0.634393274784088), FRAC_CONST(0.773010432720184) },
378 { FRAC_CONST(0.595699310302734), FRAC_CONST(0.803207516670227) },
379 { FRAC_CONST(0.555570185184479), FRAC_CONST(0.831469655036926) },
380 { FRAC_CONST(0.514102697372437), FRAC_CONST(0.857728660106659) },
381 { FRAC_CONST(0.471396654844284), FRAC_CONST(0.881921291351318) },
382 { FRAC_CONST(0.427555114030838), FRAC_CONST(0.903989315032959) },
383 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
384 { FRAC_CONST(0.336889833211899), FRAC_CONST(0.941544055938721) },
385 { FRAC_CONST(0.290284633636475), FRAC_CONST(0.956940352916718) },
386 { FRAC_CONST(0.242980122566223), FRAC_CONST(0.970031261444092) },
387 { FRAC_CONST(0.195090234279633), FRAC_CONST(0.980785310268402) },
388 { FRAC_CONST(0.146730497479439), FRAC_CONST(0.989176511764526) },
389 { FRAC_CONST(0.098017133772373), FRAC_CONST(0.995184719562531) },
390 { FRAC_CONST(0.049067649990320), FRAC_CONST(0.998795449733734) },
391 { FRAC_CONST(-0.000000043711388), FRAC_CONST(1.000000000000000) },
392 { FRAC_CONST(-0.049067739397287), FRAC_CONST(0.998795449733734) },
393 { FRAC_CONST(-0.098017223179340), FRAC_CONST(0.995184719562531) },
394 { FRAC_CONST(-0.146730571985245), FRAC_CONST(0.989176511764526) },
395 { FRAC_CONST(-0.195090323686600), FRAC_CONST(0.980785250663757) },
396 { FRAC_CONST(-0.242980197072029), FRAC_CONST(0.970031261444092) },
397 { FRAC_CONST(-0.290284723043442), FRAC_CONST(0.956940293312073) },
398 { FRAC_CONST(-0.336889922618866), FRAC_CONST(0.941544055938721) },
399 { FRAC_CONST(-0.382683515548706), FRAC_CONST(0.923879504203796) },
400 { FRAC_CONST(-0.427555084228516), FRAC_CONST(0.903989315032959) },
401 { FRAC_CONST(-0.471396833658218), FRAC_CONST(0.881921231746674) },
402 { FRAC_CONST(-0.514102756977081), FRAC_CONST(0.857728600502014) },
403 { FRAC_CONST(-0.555570363998413), FRAC_CONST(0.831469535827637) },
404 { FRAC_CONST(-0.595699369907379), FRAC_CONST(0.803207516670227) },
405 { FRAC_CONST(-0.634393274784088), FRAC_CONST(0.773010492324829) },
406 { FRAC_CONST(-0.671559035778046), FRAC_CONST(0.740951061248779) },
407 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
408 { FRAC_CONST(-0.740951240062714), FRAC_CONST(0.671558856964111) },
409 { FRAC_CONST(-0.773010492324829), FRAC_CONST(0.634393274784088) },
410 { FRAC_CONST(-0.803207635879517), FRAC_CONST(0.595699131488800) },
411 { FRAC_CONST(-0.831469655036926), FRAC_CONST(0.555570185184479) },
412 { FRAC_CONST(-0.857728600502014), FRAC_CONST(0.514102756977081) },
413 { FRAC_CONST(-0.881921350955963), FRAC_CONST(0.471396625041962) },
414 { FRAC_CONST(-0.903989315032959), FRAC_CONST(0.427555054426193) },
415 { FRAC_CONST(-0.923879623413086), FRAC_CONST(0.382683277130127) },
416 { FRAC_CONST(-0.941544115543365), FRAC_CONST(0.336889803409576) },
417 { FRAC_CONST(-0.956940352916718), FRAC_CONST(0.290284723043442) },
418 { FRAC_CONST(-0.970031261444092), FRAC_CONST(0.242980077862740) },
419 { FRAC_CONST(-0.980785310268402), FRAC_CONST(0.195090308785439) },
420 { FRAC_CONST(-0.989176511764526), FRAC_CONST(0.146730333566666) },
421 { FRAC_CONST(-0.995184719562531), FRAC_CONST(0.098017096519470) },
422 { FRAC_CONST(-0.998795449733734), FRAC_CONST(0.049067486077547) },
423 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
424 { FRAC_CONST(0.997290432453156), FRAC_CONST(0.073564566671848) },
425 { FRAC_CONST(0.989176511764526), FRAC_CONST(0.146730467677116) },
426 { FRAC_CONST(0.975702106952667), FRAC_CONST(0.219101235270500) },
427 { FRAC_CONST(0.956940352916718), FRAC_CONST(0.290284663438797) },
428 { FRAC_CONST(0.932992815971375), FRAC_CONST(0.359895050525665) },
429 { FRAC_CONST(0.903989315032959), FRAC_CONST(0.427555084228516) },
430 { FRAC_CONST(0.870086967945099), FRAC_CONST(0.492898225784302) },
431 { FRAC_CONST(0.831469595432281), FRAC_CONST(0.555570244789124) },
432 { FRAC_CONST(0.788346469402313), FRAC_CONST(0.615231573581696) },
433 { FRAC_CONST(0.740951120853424), FRAC_CONST(0.671558976173401) },
434 { FRAC_CONST(0.689540505409241), FRAC_CONST(0.724247097969055) },
435 { FRAC_CONST(0.634393274784088), FRAC_CONST(0.773010432720184) },
436 { FRAC_CONST(0.575808227062225), FRAC_CONST(0.817584812641144) },
437 { FRAC_CONST(0.514102697372437), FRAC_CONST(0.857728660106659) },
438 { FRAC_CONST(0.449611306190491), FRAC_CONST(0.893224298954010) },
439 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
440 { FRAC_CONST(0.313681751489639), FRAC_CONST(0.949528157711029) },
441 { FRAC_CONST(0.242980241775513), FRAC_CONST(0.970031261444092) },
442 { FRAC_CONST(0.170961856842041), FRAC_CONST(0.985277652740479) },
443 { FRAC_CONST(0.098017133772373), FRAC_CONST(0.995184719562531) },
444 { FRAC_CONST(0.024541255086660), FRAC_CONST(0.999698817729950) },
445 { FRAC_CONST(-0.049067739397287), FRAC_CONST(0.998795449733734) },
446 { FRAC_CONST(-0.122410707175732), FRAC_CONST(0.992479503154755) },
447 { FRAC_CONST(-0.195090323686600), FRAC_CONST(0.980785250663757) },
448 { FRAC_CONST(-0.266712725162506), FRAC_CONST(0.963776051998138) },
449 { FRAC_CONST(-0.336889803409576), FRAC_CONST(0.941544055938721) },
450 { FRAC_CONST(-0.405241340398788), FRAC_CONST(0.914209723472595) },
451 { FRAC_CONST(-0.471396833658218), FRAC_CONST(0.881921231746674) },
452 { FRAC_CONST(-0.534997701644897), FRAC_CONST(0.844853520393372) },
453 { FRAC_CONST(-0.595699369907379), FRAC_CONST(0.803207516670227) },
454 { FRAC_CONST(-0.653172850608826), FRAC_CONST(0.757208824157715) },
455 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
456 { FRAC_CONST(-0.757208824157715), FRAC_CONST(0.653172850608826) },
457 { FRAC_CONST(-0.803207516670227), FRAC_CONST(0.595699369907379) },
458 { FRAC_CONST(-0.844853520393372), FRAC_CONST(0.534997701644897) },
459 { FRAC_CONST(-0.881921231746674), FRAC_CONST(0.471396833658218) },
460 { FRAC_CONST(-0.914209783077240), FRAC_CONST(0.405241221189499) },
461 { FRAC_CONST(-0.941544115543365), FRAC_CONST(0.336889803409576) },
462 { FRAC_CONST(-0.963776051998138), FRAC_CONST(0.266712725162506) },
463 { FRAC_CONST(-0.980785310268402), FRAC_CONST(0.195090308785439) },
464 { FRAC_CONST(-0.992479503154755), FRAC_CONST(0.122410699725151) },
465 { FRAC_CONST(-0.998795449733734), FRAC_CONST(0.049067724496126) },
466 { FRAC_CONST(-0.999698817729950), FRAC_CONST(-0.024541147053242) },
467 { FRAC_CONST(-0.995184719562531), FRAC_CONST(-0.098017267882824) },
468 { FRAC_CONST(-0.985277652740479), FRAC_CONST(-0.170961990952492) },
469 { FRAC_CONST(-0.970031261444092), FRAC_CONST(-0.242980241775513) },
470 { FRAC_CONST(-0.949528157711029), FRAC_CONST(-0.313681781291962) },
471 { FRAC_CONST(-0.923879504203796), FRAC_CONST(-0.382683426141739) },
472 { FRAC_CONST(-0.893224298954010), FRAC_CONST(-0.449611306190491) },
473 { FRAC_CONST(-0.857728660106659), FRAC_CONST(-0.514102697372437) },
474 { FRAC_CONST(-0.817584872245789), FRAC_CONST(-0.575808107852936) },
475 { FRAC_CONST(-0.773010551929474), FRAC_CONST(-0.634393215179443) },
476 { FRAC_CONST(-0.724247038364410), FRAC_CONST(-0.689540624618530) },
477 { FRAC_CONST(-0.671558916568756), FRAC_CONST(-0.740951180458069) },
478 { FRAC_CONST(-0.615231573581696), FRAC_CONST(-0.788346469402313) },
479 { FRAC_CONST(-0.555570006370544), FRAC_CONST(-0.831469774246216) },
480 { FRAC_CONST(-0.492898195981979), FRAC_CONST(-0.870086967945099) },
481 { FRAC_CONST(-0.427554935216904), FRAC_CONST(-0.903989374637604) },
482 { FRAC_CONST(-0.359895110130310), FRAC_CONST(-0.932992756366730) },
483 { FRAC_CONST(-0.290284544229507), FRAC_CONST(-0.956940352916718) },
484 { FRAC_CONST(-0.219101369380951), FRAC_CONST(-0.975702106952667) },
485 { FRAC_CONST(-0.146730408072472), FRAC_CONST(-0.989176511764526) },
486 { FRAC_CONST(-0.073564760386944), FRAC_CONST(-0.997290432453156) },
487 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
488 { FRAC_CONST(0.995184719562531), FRAC_CONST(0.098017141222954) },
489 { FRAC_CONST(0.980785250663757), FRAC_CONST(0.195090323686600) },
490 { FRAC_CONST(0.956940352916718), FRAC_CONST(0.290284663438797) },
491 { FRAC_CONST(0.923879504203796), FRAC_CONST(0.382683455944061) },
492 { FRAC_CONST(0.881921231746674), FRAC_CONST(0.471396744251251) },
493 { FRAC_CONST(0.831469595432281), FRAC_CONST(0.555570244789124) },
494 { FRAC_CONST(0.773010432720184), FRAC_CONST(0.634393334388733) },
495 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
496 { FRAC_CONST(0.634393274784088), FRAC_CONST(0.773010432720184) },
497 { FRAC_CONST(0.555570185184479), FRAC_CONST(0.831469655036926) },
498 { FRAC_CONST(0.471396654844284), FRAC_CONST(0.881921291351318) },
499 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
500 { FRAC_CONST(0.290284633636475), FRAC_CONST(0.956940352916718) },
501 { FRAC_CONST(0.195090234279633), FRAC_CONST(0.980785310268402) },
502 { FRAC_CONST(0.098017133772373), FRAC_CONST(0.995184719562531) },
503 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
504 { FRAC_CONST(0.980785250663757), FRAC_CONST(0.195090323686600) },
505 { FRAC_CONST(0.923879504203796), FRAC_CONST(0.382683455944061) },
506 { FRAC_CONST(0.831469595432281), FRAC_CONST(0.555570244789124) },
507 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
508 { FRAC_CONST(0.555570185184479), FRAC_CONST(0.831469655036926) },
509 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
510 { FRAC_CONST(0.195090234279633), FRAC_CONST(0.980785310268402) },
511 { FRAC_CONST(-0.000000043711388), FRAC_CONST(1.000000000000000) },
512 { FRAC_CONST(-0.195090323686600), FRAC_CONST(0.980785250663757) },
513 { FRAC_CONST(-0.382683515548706), FRAC_CONST(0.923879504203796) },
514 { FRAC_CONST(-0.555570363998413), FRAC_CONST(0.831469535827637) },
515 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
516 { FRAC_CONST(-0.831469655036926), FRAC_CONST(0.555570185184479) },
517 { FRAC_CONST(-0.923879623413086), FRAC_CONST(0.382683277130127) },
518 { FRAC_CONST(-0.980785310268402), FRAC_CONST(0.195090308785439) },
519 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
520 { FRAC_CONST(0.956940352916718), FRAC_CONST(0.290284663438797) },
521 { FRAC_CONST(0.831469595432281), FRAC_CONST(0.555570244789124) },
522 { FRAC_CONST(0.634393274784088), FRAC_CONST(0.773010432720184) },
523 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
524 { FRAC_CONST(0.098017133772373), FRAC_CONST(0.995184719562531) },
525 { FRAC_CONST(-0.195090323686600), FRAC_CONST(0.980785250663757) },
526 { FRAC_CONST(-0.471396833658218), FRAC_CONST(0.881921231746674) },
527 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
528 { FRAC_CONST(-0.881921231746674), FRAC_CONST(0.471396833658218) },
529 { FRAC_CONST(-0.980785310268402), FRAC_CONST(0.195090308785439) },
530 { FRAC_CONST(-0.995184719562531), FRAC_CONST(-0.098017267882824) },
531 { FRAC_CONST(-0.923879504203796), FRAC_CONST(-0.382683426141739) },
532 { FRAC_CONST(-0.773010551929474), FRAC_CONST(-0.634393215179443) },
533 { FRAC_CONST(-0.555570006370544), FRAC_CONST(-0.831469774246216) },
534 { FRAC_CONST(-0.290284544229507), FRAC_CONST(-0.956940352916718) },
535 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
536 { FRAC_CONST(0.923879504203796), FRAC_CONST(0.382683455944061) },
537 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
538 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
539 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
540 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
541 { FRAC_CONST(-0.000000043711388), FRAC_CONST(1.000000000000000) },
542 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
543 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
544 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
545 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
546 { FRAC_CONST(-0.923879504203796), FRAC_CONST(-0.382683426141739) },
547 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
548 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
549 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
550 { FRAC_CONST(0.000000011924881), FRAC_CONST(-1.000000000000000) }
551};
552
553#ifdef ALLOW_SMALL_FRAMELENGTH
554ALIGN static const complex_t cfft_tab_480[] =
555{
556 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
557 { FRAC_CONST(0.999914348125458), FRAC_CONST(0.013089596293867) },
558 { FRAC_CONST(0.999657332897186), FRAC_CONST(0.026176949962974) },
559 { FRAC_CONST(0.999229013919830), FRAC_CONST(0.039259817451239) },
560 { FRAC_CONST(0.998629510402679), FRAC_CONST(0.052335958927870) },
561 { FRAC_CONST(0.997858941555023), FRAC_CONST(0.065403133630753) },
562 { FRAC_CONST(0.996917307376862), FRAC_CONST(0.078459098935127) },
563 { FRAC_CONST(0.995804905891418), FRAC_CONST(0.091501623392105) },
564 { FRAC_CONST(0.994521915912628), FRAC_CONST(0.104528464376926) },
565 { FRAC_CONST(0.993068456649780), FRAC_CONST(0.117537401616573) },
566 { FRAC_CONST(0.991444885730743), FRAC_CONST(0.130526199936867) },
567 { FRAC_CONST(0.989651381969452), FRAC_CONST(0.143492624163628) },
568 { FRAC_CONST(0.987688362598419), FRAC_CONST(0.156434476375580) },
569 { FRAC_CONST(0.985556066036224), FRAC_CONST(0.169349506497383) },
570 { FRAC_CONST(0.983254909515381), FRAC_CONST(0.182235524058342) },
571 { FRAC_CONST(0.980785250663757), FRAC_CONST(0.195090323686600) },
572 { FRAC_CONST(0.978147625923157), FRAC_CONST(0.207911700010300) },
573 { FRAC_CONST(0.975342333316803), FRAC_CONST(0.220697447657585) },
574 { FRAC_CONST(0.972369909286499), FRAC_CONST(0.233445376157761) },
575 { FRAC_CONST(0.969230890274048), FRAC_CONST(0.246153295040131) },
576 { FRAC_CONST(0.965925812721252), FRAC_CONST(0.258819043636322) },
577 { FRAC_CONST(0.962455213069916), FRAC_CONST(0.271440446376801) },
578 { FRAC_CONST(0.958819746971130), FRAC_CONST(0.284015357494354) },
579 { FRAC_CONST(0.955019950866699), FRAC_CONST(0.296541601419449) },
580 { FRAC_CONST(0.951056540012360), FRAC_CONST(0.309017002582550) },
581 { FRAC_CONST(0.946930110454559), FRAC_CONST(0.321439445018768) },
582 { FRAC_CONST(0.942641496658325), FRAC_CONST(0.333806872367859) },
583 { FRAC_CONST(0.938191354274750), FRAC_CONST(0.346117079257965) },
584 { FRAC_CONST(0.933580398559570), FRAC_CONST(0.358367949724197) },
585 { FRAC_CONST(0.928809583187103), FRAC_CONST(0.370557427406311) },
586 { FRAC_CONST(0.923879504203796), FRAC_CONST(0.382683455944061) },
587 { FRAC_CONST(0.918791174888611), FRAC_CONST(0.394743889570236) },
588 { FRAC_CONST(0.913545429706573), FRAC_CONST(0.406736642122269) },
589 { FRAC_CONST(0.908143162727356), FRAC_CONST(0.418659746646881) },
590 { FRAC_CONST(0.902585268020630), FRAC_CONST(0.430511116981506) },
591 { FRAC_CONST(0.896872758865356), FRAC_CONST(0.442288726568222) },
592 { FRAC_CONST(0.891006529331207), FRAC_CONST(0.453990519046783) },
593 { FRAC_CONST(0.884987652301788), FRAC_CONST(0.465614527463913) },
594 { FRAC_CONST(0.878817081451416), FRAC_CONST(0.477158784866333) },
595 { FRAC_CONST(0.872496008872986), FRAC_CONST(0.488621264696121) },
596 { FRAC_CONST(0.866025388240814), FRAC_CONST(0.500000000000000) },
597 { FRAC_CONST(0.859406411647797), FRAC_CONST(0.511293113231659) },
598 { FRAC_CONST(0.852640151977539), FRAC_CONST(0.522498548030853) },
599 { FRAC_CONST(0.845727801322937), FRAC_CONST(0.533614516258240) },
600 { FRAC_CONST(0.838670551776886), FRAC_CONST(0.544639050960541) },
601 { FRAC_CONST(0.831469595432281), FRAC_CONST(0.555570244789124) },
602 { FRAC_CONST(0.824126183986664), FRAC_CONST(0.566406250000000) },
603 { FRAC_CONST(0.816641509532928), FRAC_CONST(0.577145218849182) },
604 { FRAC_CONST(0.809017002582550), FRAC_CONST(0.587785243988037) },
605 { FRAC_CONST(0.801253795623779), FRAC_CONST(0.598324596881866) },
606 { FRAC_CONST(0.793353319168091), FRAC_CONST(0.608761429786682) },
607 { FRAC_CONST(0.785316884517670), FRAC_CONST(0.619093954563141) },
608 { FRAC_CONST(0.777145922183990), FRAC_CONST(0.629320383071899) },
609 { FRAC_CONST(0.768841803073883), FRAC_CONST(0.639438986778259) },
610 { FRAC_CONST(0.760405957698822), FRAC_CONST(0.649448096752167) },
611 { FRAC_CONST(0.751839756965637), FRAC_CONST(0.659345865249634) },
612 { FRAC_CONST(0.743144810199738), FRAC_CONST(0.669130623340607) },
613 { FRAC_CONST(0.734322488307953), FRAC_CONST(0.678800761699677) },
614 { FRAC_CONST(0.725374400615692), FRAC_CONST(0.688354551792145) },
615 { FRAC_CONST(0.716301918029785), FRAC_CONST(0.697790503501892) },
616 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
617 { FRAC_CONST(0.697790443897247), FRAC_CONST(0.716301977634430) },
618 { FRAC_CONST(0.688354551792145), FRAC_CONST(0.725374400615692) },
619 { FRAC_CONST(0.678800702095032), FRAC_CONST(0.734322547912598) },
620 { FRAC_CONST(0.669130563735962), FRAC_CONST(0.743144869804382) },
621 { FRAC_CONST(0.659345805644989), FRAC_CONST(0.751839816570282) },
622 { FRAC_CONST(0.649448037147522), FRAC_CONST(0.760405957698822) },
623 { FRAC_CONST(0.639438986778259), FRAC_CONST(0.768841862678528) },
624 { FRAC_CONST(0.629320383071899), FRAC_CONST(0.777145981788635) },
625 { FRAC_CONST(0.619093954563141), FRAC_CONST(0.785316944122314) },
626 { FRAC_CONST(0.608761370182037), FRAC_CONST(0.793353378772736) },
627 { FRAC_CONST(0.598324596881866), FRAC_CONST(0.801253855228424) },
628 { FRAC_CONST(0.587785243988037), FRAC_CONST(0.809017002582550) },
629 { FRAC_CONST(0.577145159244537), FRAC_CONST(0.816641569137573) },
630 { FRAC_CONST(0.566406250000000), FRAC_CONST(0.824126183986664) },
631 { FRAC_CONST(0.555570185184479), FRAC_CONST(0.831469655036926) },
632 { FRAC_CONST(0.544638991355896), FRAC_CONST(0.838670611381531) },
633 { FRAC_CONST(0.533614516258240), FRAC_CONST(0.845727801322937) },
634 { FRAC_CONST(0.522498488426209), FRAC_CONST(0.852640211582184) },
635 { FRAC_CONST(0.511293113231659), FRAC_CONST(0.859406411647797) },
636 { FRAC_CONST(0.499999970197678), FRAC_CONST(0.866025447845459) },
637 { FRAC_CONST(0.488621175289154), FRAC_CONST(0.872496068477631) },
638 { FRAC_CONST(0.477158755064011), FRAC_CONST(0.878817141056061) },
639 { FRAC_CONST(0.465614467859268), FRAC_CONST(0.884987652301788) },
640 { FRAC_CONST(0.453990519046783), FRAC_CONST(0.891006529331207) },
641 { FRAC_CONST(0.442288666963577), FRAC_CONST(0.896872758865356) },
642 { FRAC_CONST(0.430511027574539), FRAC_CONST(0.902585327625275) },
643 { FRAC_CONST(0.418659746646881), FRAC_CONST(0.908143162727356) },
644 { FRAC_CONST(0.406736612319946), FRAC_CONST(0.913545489311218) },
645 { FRAC_CONST(0.394743800163269), FRAC_CONST(0.918791234493256) },
646 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
647 { FRAC_CONST(0.370557397603989), FRAC_CONST(0.928809583187103) },
648 { FRAC_CONST(0.358367860317230), FRAC_CONST(0.933580458164215) },
649 { FRAC_CONST(0.346117049455643), FRAC_CONST(0.938191354274750) },
650 { FRAC_CONST(0.333806812763214), FRAC_CONST(0.942641496658325) },
651 { FRAC_CONST(0.321439474821091), FRAC_CONST(0.946930110454559) },
652 { FRAC_CONST(0.309016972780228), FRAC_CONST(0.951056540012360) },
653 { FRAC_CONST(0.296541512012482), FRAC_CONST(0.955019950866699) },
654 { FRAC_CONST(0.284015327692032), FRAC_CONST(0.958819746971130) },
655 { FRAC_CONST(0.271440386772156), FRAC_CONST(0.962455272674561) },
656 { FRAC_CONST(0.258819073438644), FRAC_CONST(0.965925812721252) },
657 { FRAC_CONST(0.246153265237808), FRAC_CONST(0.969230890274048) },
658 { FRAC_CONST(0.233445301651955), FRAC_CONST(0.972369909286499) },
659 { FRAC_CONST(0.220697447657585), FRAC_CONST(0.975342333316803) },
660 { FRAC_CONST(0.207911655306816), FRAC_CONST(0.978147625923157) },
661 { FRAC_CONST(0.195090234279633), FRAC_CONST(0.980785310268402) },
662 { FRAC_CONST(0.182235524058342), FRAC_CONST(0.983254909515381) },
663 { FRAC_CONST(0.169349446892738), FRAC_CONST(0.985556066036224) },
664 { FRAC_CONST(0.156434372067451), FRAC_CONST(0.987688362598419) },
665 { FRAC_CONST(0.143492594361305), FRAC_CONST(0.989651381969452) },
666 { FRAC_CONST(0.130526125431061), FRAC_CONST(0.991444885730743) },
667 { FRAC_CONST(0.117537401616573), FRAC_CONST(0.993068456649780) },
668 { FRAC_CONST(0.104528419673443), FRAC_CONST(0.994521915912628) },
669 { FRAC_CONST(0.091501533985138), FRAC_CONST(0.995804905891418) },
670 { FRAC_CONST(0.078459084033966), FRAC_CONST(0.996917307376862) },
671 { FRAC_CONST(0.065403074026108), FRAC_CONST(0.997858941555023) },
672 { FRAC_CONST(0.052335973829031), FRAC_CONST(0.998629510402679) },
673 { FRAC_CONST(0.039259787648916), FRAC_CONST(0.999229013919830) },
674 { FRAC_CONST(0.026176875457168), FRAC_CONST(0.999657332897186) },
675 { FRAC_CONST(0.013089597225189), FRAC_CONST(0.999914348125458) },
676 { FRAC_CONST(-0.000000043711388), FRAC_CONST(1.000000000000000) },
677 { FRAC_CONST(-0.013089684769511), FRAC_CONST(0.999914348125458) },
678 { FRAC_CONST(-0.026176963001490), FRAC_CONST(0.999657332897186) },
679 { FRAC_CONST(-0.039259877055883), FRAC_CONST(0.999229013919830) },
680 { FRAC_CONST(-0.052336059510708), FRAC_CONST(0.998629510402679) },
681 { FRAC_CONST(-0.065403163433075), FRAC_CONST(0.997858941555023) },
682 { FRAC_CONST(-0.078459173440933), FRAC_CONST(0.996917307376862) },
683 { FRAC_CONST(-0.091501623392105), FRAC_CONST(0.995804905891418) },
684 { FRAC_CONST(-0.104528509080410), FRAC_CONST(0.994521915912628) },
685 { FRAC_CONST(-0.117537491023541), FRAC_CONST(0.993068456649780) },
686 { FRAC_CONST(-0.130526214838028), FRAC_CONST(0.991444885730743) },
687 { FRAC_CONST(-0.143492683768272), FRAC_CONST(0.989651381969452) },
688 { FRAC_CONST(-0.156434446573257), FRAC_CONST(0.987688362598419) },
689 { FRAC_CONST(-0.169349536299706), FRAC_CONST(0.985556066036224) },
690 { FRAC_CONST(-0.182235598564148), FRAC_CONST(0.983254909515381) },
691 { FRAC_CONST(-0.195090323686600), FRAC_CONST(0.980785250663757) },
692 { FRAC_CONST(-0.207911744713783), FRAC_CONST(0.978147566318512) },
693 { FRAC_CONST(-0.220697522163391), FRAC_CONST(0.975342273712158) },
694 { FRAC_CONST(-0.233445391058922), FRAC_CONST(0.972369909286499) },
695 { FRAC_CONST(-0.246153354644775), FRAC_CONST(0.969230890274048) },
696 { FRAC_CONST(-0.258819162845612), FRAC_CONST(0.965925812721252) },
697 { FRAC_CONST(-0.271440476179123), FRAC_CONST(0.962455213069916) },
698 { FRAC_CONST(-0.284015417098999), FRAC_CONST(0.958819687366486) },
699 { FRAC_CONST(-0.296541571617126), FRAC_CONST(0.955019950866699) },
700 { FRAC_CONST(-0.309017032384872), FRAC_CONST(0.951056480407715) },
701 { FRAC_CONST(-0.321439564228058), FRAC_CONST(0.946930110454559) },
702 { FRAC_CONST(-0.333806872367859), FRAC_CONST(0.942641496658325) },
703 { FRAC_CONST(-0.346117109060287), FRAC_CONST(0.938191294670105) },
704 { FRAC_CONST(-0.358367949724197), FRAC_CONST(0.933580458164215) },
705 { FRAC_CONST(-0.370557487010956), FRAC_CONST(0.928809523582459) },
706 { FRAC_CONST(-0.382683515548706), FRAC_CONST(0.923879504203796) },
707 { FRAC_CONST(-0.394743859767914), FRAC_CONST(0.918791234493256) },
708 { FRAC_CONST(-0.406736701726913), FRAC_CONST(0.913545429706573) },
709 { FRAC_CONST(-0.418659836053848), FRAC_CONST(0.908143103122711) },
710 { FRAC_CONST(-0.430511116981506), FRAC_CONST(0.902585268020630) },
711 { FRAC_CONST(-0.442288637161255), FRAC_CONST(0.896872758865356) },
712 { FRAC_CONST(-0.453990608453751), FRAC_CONST(0.891006469726563) },
713 { FRAC_CONST(-0.465614557266235), FRAC_CONST(0.884987592697144) },
714 { FRAC_CONST(-0.477158725261688), FRAC_CONST(0.878817141056061) },
715 { FRAC_CONST(-0.488621354103088), FRAC_CONST(0.872495949268341) },
716 { FRAC_CONST(-0.500000059604645), FRAC_CONST(0.866025388240814) },
717 { FRAC_CONST(-0.511293053627014), FRAC_CONST(0.859406411647797) },
718 { FRAC_CONST(-0.522498667240143), FRAC_CONST(0.852640092372894) },
719 { FRAC_CONST(-0.533614575862885), FRAC_CONST(0.845727801322937) },
720 { FRAC_CONST(-0.544639050960541), FRAC_CONST(0.838670551776886) },
721 { FRAC_CONST(-0.555570363998413), FRAC_CONST(0.831469535827637) },
722 { FRAC_CONST(-0.566406309604645), FRAC_CONST(0.824126124382019) },
723 { FRAC_CONST(-0.577145218849182), FRAC_CONST(0.816641569137573) },
724 { FRAC_CONST(-0.587785184383392), FRAC_CONST(0.809017002582550) },
725 { FRAC_CONST(-0.598324656486511), FRAC_CONST(0.801253736019135) },
726 { FRAC_CONST(-0.608761429786682), FRAC_CONST(0.793353319168091) },
727 { FRAC_CONST(-0.619093894958496), FRAC_CONST(0.785316944122314) },
728 { FRAC_CONST(-0.629320502281189), FRAC_CONST(0.777145862579346) },
729 { FRAC_CONST(-0.639439046382904), FRAC_CONST(0.768841803073883) },
730 { FRAC_CONST(-0.649448037147522), FRAC_CONST(0.760405957698822) },
731 { FRAC_CONST(-0.659345924854279), FRAC_CONST(0.751839697360992) },
732 { FRAC_CONST(-0.669130682945251), FRAC_CONST(0.743144810199738) },
733 { FRAC_CONST(-0.678800761699677), FRAC_CONST(0.734322488307953) },
734 { FRAC_CONST(-0.688354671001434), FRAC_CONST(0.725374281406403) },
735 { FRAC_CONST(-0.697790503501892), FRAC_CONST(0.716301858425140) },
736 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
737 { FRAC_CONST(-0.716302037239075), FRAC_CONST(0.697790324687958) },
738 { FRAC_CONST(-0.725374460220337), FRAC_CONST(0.688354492187500) },
739 { FRAC_CONST(-0.734322547912598), FRAC_CONST(0.678800702095032) },
740 { FRAC_CONST(-0.743144929409027), FRAC_CONST(0.669130444526672) },
741 { FRAC_CONST(-0.751839876174927), FRAC_CONST(0.659345746040344) },
742 { FRAC_CONST(-0.760406017303467), FRAC_CONST(0.649448037147522) },
743 { FRAC_CONST(-0.768841803073883), FRAC_CONST(0.639439046382904) },
744 { FRAC_CONST(-0.777146041393280), FRAC_CONST(0.629320263862610) },
745 { FRAC_CONST(-0.785316944122314), FRAC_CONST(0.619093894958496) },
746 { FRAC_CONST(-0.793353319168091), FRAC_CONST(0.608761429786682) },
747 { FRAC_CONST(-0.801253914833069), FRAC_CONST(0.598324477672577) },
748 { FRAC_CONST(-0.809017062187195), FRAC_CONST(0.587785184383392) },
749 { FRAC_CONST(-0.816641569137573), FRAC_CONST(0.577145218849182) },
750 { FRAC_CONST(-0.824126303195953), FRAC_CONST(0.566406130790710) },
751 { FRAC_CONST(-0.831469655036926), FRAC_CONST(0.555570185184479) },
752 { FRAC_CONST(-0.838670551776886), FRAC_CONST(0.544639050960541) },
753 { FRAC_CONST(-0.845727920532227), FRAC_CONST(0.533614337444305) },
754 { FRAC_CONST(-0.852640211582184), FRAC_CONST(0.522498488426209) },
755 { FRAC_CONST(-0.859406411647797), FRAC_CONST(0.511293053627014) },
756 { FRAC_CONST(-0.866025388240814), FRAC_CONST(0.500000059604645) },
757 { FRAC_CONST(-0.872496068477631), FRAC_CONST(0.488621145486832) },
758 { FRAC_CONST(-0.878817141056061), FRAC_CONST(0.477158725261688) },
759 { FRAC_CONST(-0.884987652301788), FRAC_CONST(0.465614557266235) },
760 { FRAC_CONST(-0.891006588935852), FRAC_CONST(0.453990370035172) },
761 { FRAC_CONST(-0.896872758865356), FRAC_CONST(0.442288637161255) },
762 { FRAC_CONST(-0.902585268020630), FRAC_CONST(0.430511116981506) },
763 { FRAC_CONST(-0.908143222332001), FRAC_CONST(0.418659597635269) },
764 { FRAC_CONST(-0.913545489311218), FRAC_CONST(0.406736582517624) },
765 { FRAC_CONST(-0.918791234493256), FRAC_CONST(0.394743859767914) },
766 { FRAC_CONST(-0.923879623413086), FRAC_CONST(0.382683277130127) },
767 { FRAC_CONST(-0.928809583187103), FRAC_CONST(0.370557337999344) },
768 { FRAC_CONST(-0.933580458164215), FRAC_CONST(0.358367919921875) },
769 { FRAC_CONST(-0.938191413879395), FRAC_CONST(0.346116900444031) },
770 { FRAC_CONST(-0.942641556262970), FRAC_CONST(0.333806753158569) },
771 { FRAC_CONST(-0.946930170059204), FRAC_CONST(0.321439445018768) },
772 { FRAC_CONST(-0.951056599617004), FRAC_CONST(0.309016793966293) },
773 { FRAC_CONST(-0.955020010471344), FRAC_CONST(0.296541452407837) },
774 { FRAC_CONST(-0.958819746971130), FRAC_CONST(0.284015297889709) },
775 { FRAC_CONST(-0.962455213069916), FRAC_CONST(0.271440476179123) },
776 { FRAC_CONST(-0.965925872325897), FRAC_CONST(0.258818924427032) },
777 { FRAC_CONST(-0.969230949878693), FRAC_CONST(0.246153235435486) },
778 { FRAC_CONST(-0.972369909286499), FRAC_CONST(0.233445376157761) },
779 { FRAC_CONST(-0.975342333316803), FRAC_CONST(0.220697283744812) },
780 { FRAC_CONST(-0.978147625923157), FRAC_CONST(0.207911610603333) },
781 { FRAC_CONST(-0.980785310268402), FRAC_CONST(0.195090308785439) },
782 { FRAC_CONST(-0.983254909515381), FRAC_CONST(0.182235360145569) },
783 { FRAC_CONST(-0.985556066036224), FRAC_CONST(0.169349402189255) },
784 { FRAC_CONST(-0.987688362598419), FRAC_CONST(0.156434446573257) },
785 { FRAC_CONST(-0.989651441574097), FRAC_CONST(0.143492430448532) },
786 { FRAC_CONST(-0.991444885730743), FRAC_CONST(0.130526080727577) },
787 { FRAC_CONST(-0.993068456649780), FRAC_CONST(0.117537356913090) },
788 { FRAC_CONST(-0.994521915912628), FRAC_CONST(0.104528494179249) },
789 { FRAC_CONST(-0.995804965496063), FRAC_CONST(0.091501489281654) },
790 { FRAC_CONST(-0.996917366981506), FRAC_CONST(0.078459039330482) },
791 { FRAC_CONST(-0.997858941555023), FRAC_CONST(0.065403148531914) },
792 { FRAC_CONST(-0.998629570007324), FRAC_CONST(0.052335809916258) },
793 { FRAC_CONST(-0.999229013919830), FRAC_CONST(0.039259742945433) },
794 { FRAC_CONST(-0.999657332897186), FRAC_CONST(0.026176951825619) },
795 { FRAC_CONST(-0.999914348125458), FRAC_CONST(0.013089434243739) },
796 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
797 { FRAC_CONST(0.999657332897186), FRAC_CONST(0.026176949962974) },
798 { FRAC_CONST(0.998629510402679), FRAC_CONST(0.052335958927870) },
799 { FRAC_CONST(0.996917307376862), FRAC_CONST(0.078459098935127) },
800 { FRAC_CONST(0.994521915912628), FRAC_CONST(0.104528464376926) },
801 { FRAC_CONST(0.991444885730743), FRAC_CONST(0.130526199936867) },
802 { FRAC_CONST(0.987688362598419), FRAC_CONST(0.156434476375580) },
803 { FRAC_CONST(0.983254909515381), FRAC_CONST(0.182235524058342) },
804 { FRAC_CONST(0.978147625923157), FRAC_CONST(0.207911700010300) },
805 { FRAC_CONST(0.972369909286499), FRAC_CONST(0.233445376157761) },
806 { FRAC_CONST(0.965925812721252), FRAC_CONST(0.258819043636322) },
807 { FRAC_CONST(0.958819746971130), FRAC_CONST(0.284015357494354) },
808 { FRAC_CONST(0.951056540012360), FRAC_CONST(0.309017002582550) },
809 { FRAC_CONST(0.942641496658325), FRAC_CONST(0.333806872367859) },
810 { FRAC_CONST(0.933580398559570), FRAC_CONST(0.358367949724197) },
811 { FRAC_CONST(0.923879504203796), FRAC_CONST(0.382683455944061) },
812 { FRAC_CONST(0.913545429706573), FRAC_CONST(0.406736642122269) },
813 { FRAC_CONST(0.902585268020630), FRAC_CONST(0.430511116981506) },
814 { FRAC_CONST(0.891006529331207), FRAC_CONST(0.453990519046783) },
815 { FRAC_CONST(0.878817081451416), FRAC_CONST(0.477158784866333) },
816 { FRAC_CONST(0.866025388240814), FRAC_CONST(0.500000000000000) },
817 { FRAC_CONST(0.852640151977539), FRAC_CONST(0.522498548030853) },
818 { FRAC_CONST(0.838670551776886), FRAC_CONST(0.544639050960541) },
819 { FRAC_CONST(0.824126183986664), FRAC_CONST(0.566406250000000) },
820 { FRAC_CONST(0.809017002582550), FRAC_CONST(0.587785243988037) },
821 { FRAC_CONST(0.793353319168091), FRAC_CONST(0.608761429786682) },
822 { FRAC_CONST(0.777145922183990), FRAC_CONST(0.629320383071899) },
823 { FRAC_CONST(0.760405957698822), FRAC_CONST(0.649448096752167) },
824 { FRAC_CONST(0.743144810199738), FRAC_CONST(0.669130623340607) },
825 { FRAC_CONST(0.725374400615692), FRAC_CONST(0.688354551792145) },
826 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
827 { FRAC_CONST(0.688354551792145), FRAC_CONST(0.725374400615692) },
828 { FRAC_CONST(0.669130563735962), FRAC_CONST(0.743144869804382) },
829 { FRAC_CONST(0.649448037147522), FRAC_CONST(0.760405957698822) },
830 { FRAC_CONST(0.629320383071899), FRAC_CONST(0.777145981788635) },
831 { FRAC_CONST(0.608761370182037), FRAC_CONST(0.793353378772736) },
832 { FRAC_CONST(0.587785243988037), FRAC_CONST(0.809017002582550) },
833 { FRAC_CONST(0.566406250000000), FRAC_CONST(0.824126183986664) },
834 { FRAC_CONST(0.544638991355896), FRAC_CONST(0.838670611381531) },
835 { FRAC_CONST(0.522498488426209), FRAC_CONST(0.852640211582184) },
836 { FRAC_CONST(0.499999970197678), FRAC_CONST(0.866025447845459) },
837 { FRAC_CONST(0.477158755064011), FRAC_CONST(0.878817141056061) },
838 { FRAC_CONST(0.453990519046783), FRAC_CONST(0.891006529331207) },
839 { FRAC_CONST(0.430511027574539), FRAC_CONST(0.902585327625275) },
840 { FRAC_CONST(0.406736612319946), FRAC_CONST(0.913545489311218) },
841 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
842 { FRAC_CONST(0.358367860317230), FRAC_CONST(0.933580458164215) },
843 { FRAC_CONST(0.333806812763214), FRAC_CONST(0.942641496658325) },
844 { FRAC_CONST(0.309016972780228), FRAC_CONST(0.951056540012360) },
845 { FRAC_CONST(0.284015327692032), FRAC_CONST(0.958819746971130) },
846 { FRAC_CONST(0.258819073438644), FRAC_CONST(0.965925812721252) },
847 { FRAC_CONST(0.233445301651955), FRAC_CONST(0.972369909286499) },
848 { FRAC_CONST(0.207911655306816), FRAC_CONST(0.978147625923157) },
849 { FRAC_CONST(0.182235524058342), FRAC_CONST(0.983254909515381) },
850 { FRAC_CONST(0.156434372067451), FRAC_CONST(0.987688362598419) },
851 { FRAC_CONST(0.130526125431061), FRAC_CONST(0.991444885730743) },
852 { FRAC_CONST(0.104528419673443), FRAC_CONST(0.994521915912628) },
853 { FRAC_CONST(0.078459084033966), FRAC_CONST(0.996917307376862) },
854 { FRAC_CONST(0.052335973829031), FRAC_CONST(0.998629510402679) },
855 { FRAC_CONST(0.026176875457168), FRAC_CONST(0.999657332897186) },
856 { FRAC_CONST(-0.000000043711388), FRAC_CONST(1.000000000000000) },
857 { FRAC_CONST(-0.026176963001490), FRAC_CONST(0.999657332897186) },
858 { FRAC_CONST(-0.052336059510708), FRAC_CONST(0.998629510402679) },
859 { FRAC_CONST(-0.078459173440933), FRAC_CONST(0.996917307376862) },
860 { FRAC_CONST(-0.104528509080410), FRAC_CONST(0.994521915912628) },
861 { FRAC_CONST(-0.130526214838028), FRAC_CONST(0.991444885730743) },
862 { FRAC_CONST(-0.156434446573257), FRAC_CONST(0.987688362598419) },
863 { FRAC_CONST(-0.182235598564148), FRAC_CONST(0.983254909515381) },
864 { FRAC_CONST(-0.207911744713783), FRAC_CONST(0.978147566318512) },
865 { FRAC_CONST(-0.233445391058922), FRAC_CONST(0.972369909286499) },
866 { FRAC_CONST(-0.258819162845612), FRAC_CONST(0.965925812721252) },
867 { FRAC_CONST(-0.284015417098999), FRAC_CONST(0.958819687366486) },
868 { FRAC_CONST(-0.309017032384872), FRAC_CONST(0.951056480407715) },
869 { FRAC_CONST(-0.333806872367859), FRAC_CONST(0.942641496658325) },
870 { FRAC_CONST(-0.358367949724197), FRAC_CONST(0.933580458164215) },
871 { FRAC_CONST(-0.382683515548706), FRAC_CONST(0.923879504203796) },
872 { FRAC_CONST(-0.406736701726913), FRAC_CONST(0.913545429706573) },
873 { FRAC_CONST(-0.430511116981506), FRAC_CONST(0.902585268020630) },
874 { FRAC_CONST(-0.453990608453751), FRAC_CONST(0.891006469726563) },
875 { FRAC_CONST(-0.477158725261688), FRAC_CONST(0.878817141056061) },
876 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
877 { FRAC_CONST(0.998629510402679), FRAC_CONST(0.052335958927870) },
878 { FRAC_CONST(0.994521915912628), FRAC_CONST(0.104528464376926) },
879 { FRAC_CONST(0.987688362598419), FRAC_CONST(0.156434476375580) },
880 { FRAC_CONST(0.978147625923157), FRAC_CONST(0.207911700010300) },
881 { FRAC_CONST(0.965925812721252), FRAC_CONST(0.258819043636322) },
882 { FRAC_CONST(0.951056540012360), FRAC_CONST(0.309017002582550) },
883 { FRAC_CONST(0.933580398559570), FRAC_CONST(0.358367949724197) },
884 { FRAC_CONST(0.913545429706573), FRAC_CONST(0.406736642122269) },
885 { FRAC_CONST(0.891006529331207), FRAC_CONST(0.453990519046783) },
886 { FRAC_CONST(0.866025388240814), FRAC_CONST(0.500000000000000) },
887 { FRAC_CONST(0.838670551776886), FRAC_CONST(0.544639050960541) },
888 { FRAC_CONST(0.809017002582550), FRAC_CONST(0.587785243988037) },
889 { FRAC_CONST(0.777145922183990), FRAC_CONST(0.629320383071899) },
890 { FRAC_CONST(0.743144810199738), FRAC_CONST(0.669130623340607) },
891 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
892 { FRAC_CONST(0.669130563735962), FRAC_CONST(0.743144869804382) },
893 { FRAC_CONST(0.629320383071899), FRAC_CONST(0.777145981788635) },
894 { FRAC_CONST(0.587785243988037), FRAC_CONST(0.809017002582550) },
895 { FRAC_CONST(0.544638991355896), FRAC_CONST(0.838670611381531) },
896 { FRAC_CONST(0.499999970197678), FRAC_CONST(0.866025447845459) },
897 { FRAC_CONST(0.453990519046783), FRAC_CONST(0.891006529331207) },
898 { FRAC_CONST(0.406736612319946), FRAC_CONST(0.913545489311218) },
899 { FRAC_CONST(0.358367860317230), FRAC_CONST(0.933580458164215) },
900 { FRAC_CONST(0.309016972780228), FRAC_CONST(0.951056540012360) },
901 { FRAC_CONST(0.258819073438644), FRAC_CONST(0.965925812721252) },
902 { FRAC_CONST(0.207911655306816), FRAC_CONST(0.978147625923157) },
903 { FRAC_CONST(0.156434372067451), FRAC_CONST(0.987688362598419) },
904 { FRAC_CONST(0.104528419673443), FRAC_CONST(0.994521915912628) },
905 { FRAC_CONST(0.052335973829031), FRAC_CONST(0.998629510402679) },
906 { FRAC_CONST(-0.000000043711388), FRAC_CONST(1.000000000000000) },
907 { FRAC_CONST(-0.052336059510708), FRAC_CONST(0.998629510402679) },
908 { FRAC_CONST(-0.104528509080410), FRAC_CONST(0.994521915912628) },
909 { FRAC_CONST(-0.156434446573257), FRAC_CONST(0.987688362598419) },
910 { FRAC_CONST(-0.207911744713783), FRAC_CONST(0.978147566318512) },
911 { FRAC_CONST(-0.258819162845612), FRAC_CONST(0.965925812721252) },
912 { FRAC_CONST(-0.309017032384872), FRAC_CONST(0.951056480407715) },
913 { FRAC_CONST(-0.358367949724197), FRAC_CONST(0.933580458164215) },
914 { FRAC_CONST(-0.406736701726913), FRAC_CONST(0.913545429706573) },
915 { FRAC_CONST(-0.453990608453751), FRAC_CONST(0.891006469726563) },
916 { FRAC_CONST(-0.500000059604645), FRAC_CONST(0.866025388240814) },
917 { FRAC_CONST(-0.544639050960541), FRAC_CONST(0.838670551776886) },
918 { FRAC_CONST(-0.587785184383392), FRAC_CONST(0.809017002582550) },
919 { FRAC_CONST(-0.629320502281189), FRAC_CONST(0.777145862579346) },
920 { FRAC_CONST(-0.669130682945251), FRAC_CONST(0.743144810199738) },
921 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
922 { FRAC_CONST(-0.743144929409027), FRAC_CONST(0.669130444526672) },
923 { FRAC_CONST(-0.777146041393280), FRAC_CONST(0.629320263862610) },
924 { FRAC_CONST(-0.809017062187195), FRAC_CONST(0.587785184383392) },
925 { FRAC_CONST(-0.838670551776886), FRAC_CONST(0.544639050960541) },
926 { FRAC_CONST(-0.866025388240814), FRAC_CONST(0.500000059604645) },
927 { FRAC_CONST(-0.891006588935852), FRAC_CONST(0.453990370035172) },
928 { FRAC_CONST(-0.913545489311218), FRAC_CONST(0.406736582517624) },
929 { FRAC_CONST(-0.933580458164215), FRAC_CONST(0.358367919921875) },
930 { FRAC_CONST(-0.951056599617004), FRAC_CONST(0.309016793966293) },
931 { FRAC_CONST(-0.965925872325897), FRAC_CONST(0.258818924427032) },
932 { FRAC_CONST(-0.978147625923157), FRAC_CONST(0.207911610603333) },
933 { FRAC_CONST(-0.987688362598419), FRAC_CONST(0.156434446573257) },
934 { FRAC_CONST(-0.994521915912628), FRAC_CONST(0.104528494179249) },
935 { FRAC_CONST(-0.998629570007324), FRAC_CONST(0.052335809916258) },
936 { FRAC_CONST(-1.000000000000000), FRAC_CONST(-0.000000087422777) },
937 { FRAC_CONST(-0.998629510402679), FRAC_CONST(-0.052335985004902) },
938 { FRAC_CONST(-0.994521856307983), FRAC_CONST(-0.104528672993183) },
939 { FRAC_CONST(-0.987688302993774), FRAC_CONST(-0.156434610486031) },
940 { FRAC_CONST(-0.978147566318512), FRAC_CONST(-0.207911789417267) },
941 { FRAC_CONST(-0.965925812721252), FRAC_CONST(-0.258819073438644) },
942 { FRAC_CONST(-0.951056540012360), FRAC_CONST(-0.309016972780228) },
943 { FRAC_CONST(-0.933580398559570), FRAC_CONST(-0.358368098735809) },
944 { FRAC_CONST(-0.913545429706573), FRAC_CONST(-0.406736731529236) },
945 { FRAC_CONST(-0.891006529331207), FRAC_CONST(-0.453990548849106) },
946 { FRAC_CONST(-0.866025269031525), FRAC_CONST(-0.500000178813934) },
947 { FRAC_CONST(-0.838670492172241), FRAC_CONST(-0.544639170169830) },
948 { FRAC_CONST(-0.809016942977905), FRAC_CONST(-0.587785363197327) },
949 { FRAC_CONST(-0.777145922183990), FRAC_CONST(-0.629320442676544) },
950 { FRAC_CONST(-0.743144810199738), FRAC_CONST(-0.669130623340607) },
951 { FRAC_CONST(-0.707106649875641), FRAC_CONST(-0.707106888294220) },
952 { FRAC_CONST(-0.669130504131317), FRAC_CONST(-0.743144869804382) },
953 { FRAC_CONST(-0.629320323467255), FRAC_CONST(-0.777145981788635) },
954 { FRAC_CONST(-0.587785065174103), FRAC_CONST(-0.809017121791840) },
955 { FRAC_CONST(-0.544639110565186), FRAC_CONST(-0.838670551776886) },
956 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
957 { FRAC_CONST(0.996917307376862), FRAC_CONST(0.078459098935127) },
958 { FRAC_CONST(0.987688362598419), FRAC_CONST(0.156434476375580) },
959 { FRAC_CONST(0.972369909286499), FRAC_CONST(0.233445376157761) },
960 { FRAC_CONST(0.951056540012360), FRAC_CONST(0.309017002582550) },
961 { FRAC_CONST(0.923879504203796), FRAC_CONST(0.382683455944061) },
962 { FRAC_CONST(0.891006529331207), FRAC_CONST(0.453990519046783) },
963 { FRAC_CONST(0.852640151977539), FRAC_CONST(0.522498548030853) },
964 { FRAC_CONST(0.809017002582550), FRAC_CONST(0.587785243988037) },
965 { FRAC_CONST(0.760405957698822), FRAC_CONST(0.649448096752167) },
966 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
967 { FRAC_CONST(0.649448037147522), FRAC_CONST(0.760405957698822) },
968 { FRAC_CONST(0.587785243988037), FRAC_CONST(0.809017002582550) },
969 { FRAC_CONST(0.522498488426209), FRAC_CONST(0.852640211582184) },
970 { FRAC_CONST(0.453990519046783), FRAC_CONST(0.891006529331207) },
971 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
972 { FRAC_CONST(0.309016972780228), FRAC_CONST(0.951056540012360) },
973 { FRAC_CONST(0.233445301651955), FRAC_CONST(0.972369909286499) },
974 { FRAC_CONST(0.156434372067451), FRAC_CONST(0.987688362598419) },
975 { FRAC_CONST(0.078459084033966), FRAC_CONST(0.996917307376862) },
976 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
977 { FRAC_CONST(0.987688362598419), FRAC_CONST(0.156434476375580) },
978 { FRAC_CONST(0.951056540012360), FRAC_CONST(0.309017002582550) },
979 { FRAC_CONST(0.891006529331207), FRAC_CONST(0.453990519046783) },
980 { FRAC_CONST(0.809017002582550), FRAC_CONST(0.587785243988037) },
981 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
982 { FRAC_CONST(0.587785243988037), FRAC_CONST(0.809017002582550) },
983 { FRAC_CONST(0.453990519046783), FRAC_CONST(0.891006529331207) },
984 { FRAC_CONST(0.309016972780228), FRAC_CONST(0.951056540012360) },
985 { FRAC_CONST(0.156434372067451), FRAC_CONST(0.987688362598419) },
986 { FRAC_CONST(-0.000000043711388), FRAC_CONST(1.000000000000000) },
987 { FRAC_CONST(-0.156434446573257), FRAC_CONST(0.987688362598419) },
988 { FRAC_CONST(-0.309017032384872), FRAC_CONST(0.951056480407715) },
989 { FRAC_CONST(-0.453990608453751), FRAC_CONST(0.891006469726563) },
990 { FRAC_CONST(-0.587785184383392), FRAC_CONST(0.809017002582550) },
991 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
992 { FRAC_CONST(-0.809017062187195), FRAC_CONST(0.587785184383392) },
993 { FRAC_CONST(-0.891006588935852), FRAC_CONST(0.453990370035172) },
994 { FRAC_CONST(-0.951056599617004), FRAC_CONST(0.309016793966293) },
995 { FRAC_CONST(-0.987688362598419), FRAC_CONST(0.156434446573257) },
996 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
997 { FRAC_CONST(0.972369909286499), FRAC_CONST(0.233445376157761) },
998 { FRAC_CONST(0.891006529331207), FRAC_CONST(0.453990519046783) },
999 { FRAC_CONST(0.760405957698822), FRAC_CONST(0.649448096752167) },
1000 { FRAC_CONST(0.587785243988037), FRAC_CONST(0.809017002582550) },
1001 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
1002 { FRAC_CONST(0.156434372067451), FRAC_CONST(0.987688362598419) },
1003 { FRAC_CONST(-0.078459173440933), FRAC_CONST(0.996917307376862) },
1004 { FRAC_CONST(-0.309017032384872), FRAC_CONST(0.951056480407715) },
1005 { FRAC_CONST(-0.522498667240143), FRAC_CONST(0.852640092372894) },
1006 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
1007 { FRAC_CONST(-0.852640211582184), FRAC_CONST(0.522498488426209) },
1008 { FRAC_CONST(-0.951056599617004), FRAC_CONST(0.309016793966293) },
1009 { FRAC_CONST(-0.996917366981506), FRAC_CONST(0.078459039330482) },
1010 { FRAC_CONST(-0.987688302993774), FRAC_CONST(-0.156434610486031) },
1011 { FRAC_CONST(-0.923879504203796), FRAC_CONST(-0.382683426141739) },
1012 { FRAC_CONST(-0.809016942977905), FRAC_CONST(-0.587785363197327) },
1013 { FRAC_CONST(-0.649447917938232), FRAC_CONST(-0.760406076908112) },
1014 { FRAC_CONST(-0.453990221023560), FRAC_CONST(-0.891006648540497) },
1015 { FRAC_CONST(-0.233445450663567), FRAC_CONST(-0.972369909286499) },
1016 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1017 { FRAC_CONST(0.951056540012360), FRAC_CONST(0.309017002582550) },
1018 { FRAC_CONST(0.809017002582550), FRAC_CONST(0.587785243988037) },
1019 { FRAC_CONST(0.587785243988037), FRAC_CONST(0.809017002582550) },
1020 { FRAC_CONST(0.309016972780228), FRAC_CONST(0.951056540012360) },
1021 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1022 { FRAC_CONST(0.809017002582550), FRAC_CONST(0.587785243988037) },
1023 { FRAC_CONST(0.309016972780228), FRAC_CONST(0.951056540012360) },
1024 { FRAC_CONST(-0.309017032384872), FRAC_CONST(0.951056480407715) },
1025 { FRAC_CONST(-0.809017062187195), FRAC_CONST(0.587785184383392) },
1026 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1027 { FRAC_CONST(0.587785243988037), FRAC_CONST(0.809017002582550) },
1028 { FRAC_CONST(-0.309017032384872), FRAC_CONST(0.951056480407715) },
1029 { FRAC_CONST(-0.951056599617004), FRAC_CONST(0.309016793966293) },
1030 { FRAC_CONST(-0.809016942977905), FRAC_CONST(-0.587785363197327) },
1031 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1032 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1033 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1034 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1035 { FRAC_CONST(0.309017121791840), FRAC_CONST(-0.951056480407715) }
1036};
1037#endif
1038
1039ALIGN static const complex_t cfft_tab_64[] =
1040{
1041 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1042 { FRAC_CONST(0.995184719562531), FRAC_CONST(0.098017141222954) },
1043 { FRAC_CONST(0.980785250663757), FRAC_CONST(0.195090323686600) },
1044 { FRAC_CONST(0.956940352916718), FRAC_CONST(0.290284663438797) },
1045 { FRAC_CONST(0.923879504203796), FRAC_CONST(0.382683455944061) },
1046 { FRAC_CONST(0.881921231746674), FRAC_CONST(0.471396744251251) },
1047 { FRAC_CONST(0.831469595432281), FRAC_CONST(0.555570244789124) },
1048 { FRAC_CONST(0.773010432720184), FRAC_CONST(0.634393334388733) },
1049 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
1050 { FRAC_CONST(0.634393274784088), FRAC_CONST(0.773010432720184) },
1051 { FRAC_CONST(0.555570185184479), FRAC_CONST(0.831469655036926) },
1052 { FRAC_CONST(0.471396654844284), FRAC_CONST(0.881921291351318) },
1053 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
1054 { FRAC_CONST(0.290284633636475), FRAC_CONST(0.956940352916718) },
1055 { FRAC_CONST(0.195090234279633), FRAC_CONST(0.980785310268402) },
1056 { FRAC_CONST(0.098017133772373), FRAC_CONST(0.995184719562531) },
1057 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1058 { FRAC_CONST(0.980785250663757), FRAC_CONST(0.195090323686600) },
1059 { FRAC_CONST(0.923879504203796), FRAC_CONST(0.382683455944061) },
1060 { FRAC_CONST(0.831469595432281), FRAC_CONST(0.555570244789124) },
1061 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
1062 { FRAC_CONST(0.555570185184479), FRAC_CONST(0.831469655036926) },
1063 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
1064 { FRAC_CONST(0.195090234279633), FRAC_CONST(0.980785310268402) },
1065 { FRAC_CONST(-0.000000043711388), FRAC_CONST(1.000000000000000) },
1066 { FRAC_CONST(-0.195090323686600), FRAC_CONST(0.980785250663757) },
1067 { FRAC_CONST(-0.382683515548706), FRAC_CONST(0.923879504203796) },
1068 { FRAC_CONST(-0.555570363998413), FRAC_CONST(0.831469535827637) },
1069 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
1070 { FRAC_CONST(-0.831469655036926), FRAC_CONST(0.555570185184479) },
1071 { FRAC_CONST(-0.923879623413086), FRAC_CONST(0.382683277130127) },
1072 { FRAC_CONST(-0.980785310268402), FRAC_CONST(0.195090308785439) },
1073 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1074 { FRAC_CONST(0.956940352916718), FRAC_CONST(0.290284663438797) },
1075 { FRAC_CONST(0.831469595432281), FRAC_CONST(0.555570244789124) },
1076 { FRAC_CONST(0.634393274784088), FRAC_CONST(0.773010432720184) },
1077 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
1078 { FRAC_CONST(0.098017133772373), FRAC_CONST(0.995184719562531) },
1079 { FRAC_CONST(-0.195090323686600), FRAC_CONST(0.980785250663757) },
1080 { FRAC_CONST(-0.471396833658218), FRAC_CONST(0.881921231746674) },
1081 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
1082 { FRAC_CONST(-0.881921231746674), FRAC_CONST(0.471396833658218) },
1083 { FRAC_CONST(-0.980785310268402), FRAC_CONST(0.195090308785439) },
1084 { FRAC_CONST(-0.995184719562531), FRAC_CONST(-0.098017267882824) },
1085 { FRAC_CONST(-0.923879504203796), FRAC_CONST(-0.382683426141739) },
1086 { FRAC_CONST(-0.773010551929474), FRAC_CONST(-0.634393215179443) },
1087 { FRAC_CONST(-0.555570006370544), FRAC_CONST(-0.831469774246216) },
1088 { FRAC_CONST(-0.290284544229507), FRAC_CONST(-0.956940352916718) },
1089 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1090 { FRAC_CONST(0.923879504203796), FRAC_CONST(0.382683455944061) },
1091 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
1092 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
1093 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1094 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
1095 { FRAC_CONST(-0.000000043711388), FRAC_CONST(1.000000000000000) },
1096 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
1097 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1098 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
1099 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
1100 { FRAC_CONST(-0.923879504203796), FRAC_CONST(-0.382683426141739) },
1101 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1102 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1103 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1104 { FRAC_CONST(0.000000011924881), FRAC_CONST(-1.000000000000000) }
1105};
1106
1107#ifdef ALLOW_SMALL_FRAMELENGTH
1108ALIGN static const complex_t cfft_tab_60[] =
1109{
1110 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1111 { FRAC_CONST(0.994521915912628), FRAC_CONST(0.104528464376926) },
1112 { FRAC_CONST(0.978147625923157), FRAC_CONST(0.207911700010300) },
1113 { FRAC_CONST(0.951056540012360), FRAC_CONST(0.309017002582550) },
1114 { FRAC_CONST(0.913545429706573), FRAC_CONST(0.406736642122269) },
1115 { FRAC_CONST(0.866025388240814), FRAC_CONST(0.500000000000000) },
1116 { FRAC_CONST(0.809017002582550), FRAC_CONST(0.587785243988037) },
1117 { FRAC_CONST(0.743144810199738), FRAC_CONST(0.669130623340607) },
1118 { FRAC_CONST(0.669130563735962), FRAC_CONST(0.743144869804382) },
1119 { FRAC_CONST(0.587785243988037), FRAC_CONST(0.809017002582550) },
1120 { FRAC_CONST(0.499999970197678), FRAC_CONST(0.866025447845459) },
1121 { FRAC_CONST(0.406736612319946), FRAC_CONST(0.913545489311218) },
1122 { FRAC_CONST(0.309016972780228), FRAC_CONST(0.951056540012360) },
1123 { FRAC_CONST(0.207911655306816), FRAC_CONST(0.978147625923157) },
1124 { FRAC_CONST(0.104528419673443), FRAC_CONST(0.994521915912628) },
1125 { FRAC_CONST(-0.000000043711388), FRAC_CONST(1.000000000000000) },
1126 { FRAC_CONST(-0.104528509080410), FRAC_CONST(0.994521915912628) },
1127 { FRAC_CONST(-0.207911744713783), FRAC_CONST(0.978147566318512) },
1128 { FRAC_CONST(-0.309017032384872), FRAC_CONST(0.951056480407715) },
1129 { FRAC_CONST(-0.406736701726913), FRAC_CONST(0.913545429706573) },
1130 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1131 { FRAC_CONST(0.978147625923157), FRAC_CONST(0.207911700010300) },
1132 { FRAC_CONST(0.913545429706573), FRAC_CONST(0.406736642122269) },
1133 { FRAC_CONST(0.809017002582550), FRAC_CONST(0.587785243988037) },
1134 { FRAC_CONST(0.669130563735962), FRAC_CONST(0.743144869804382) },
1135 { FRAC_CONST(0.499999970197678), FRAC_CONST(0.866025447845459) },
1136 { FRAC_CONST(0.309016972780228), FRAC_CONST(0.951056540012360) },
1137 { FRAC_CONST(0.104528419673443), FRAC_CONST(0.994521915912628) },
1138 { FRAC_CONST(-0.104528509080410), FRAC_CONST(0.994521915912628) },
1139 { FRAC_CONST(-0.309017032384872), FRAC_CONST(0.951056480407715) },
1140 { FRAC_CONST(-0.500000059604645), FRAC_CONST(0.866025388240814) },
1141 { FRAC_CONST(-0.669130682945251), FRAC_CONST(0.743144810199738) },
1142 { FRAC_CONST(-0.809017062187195), FRAC_CONST(0.587785184383392) },
1143 { FRAC_CONST(-0.913545489311218), FRAC_CONST(0.406736582517624) },
1144 { FRAC_CONST(-0.978147625923157), FRAC_CONST(0.207911610603333) },
1145 { FRAC_CONST(-1.000000000000000), FRAC_CONST(-0.000000087422777) },
1146 { FRAC_CONST(-0.978147566318512), FRAC_CONST(-0.207911789417267) },
1147 { FRAC_CONST(-0.913545429706573), FRAC_CONST(-0.406736731529236) },
1148 { FRAC_CONST(-0.809016942977905), FRAC_CONST(-0.587785363197327) },
1149 { FRAC_CONST(-0.669130504131317), FRAC_CONST(-0.743144869804382) },
1150 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1151 { FRAC_CONST(0.951056540012360), FRAC_CONST(0.309017002582550) },
1152 { FRAC_CONST(0.809017002582550), FRAC_CONST(0.587785243988037) },
1153 { FRAC_CONST(0.587785243988037), FRAC_CONST(0.809017002582550) },
1154 { FRAC_CONST(0.309016972780228), FRAC_CONST(0.951056540012360) },
1155 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1156 { FRAC_CONST(0.809017002582550), FRAC_CONST(0.587785243988037) },
1157 { FRAC_CONST(0.309016972780228), FRAC_CONST(0.951056540012360) },
1158 { FRAC_CONST(-0.309017032384872), FRAC_CONST(0.951056480407715) },
1159 { FRAC_CONST(-0.809017062187195), FRAC_CONST(0.587785184383392) },
1160 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1161 { FRAC_CONST(0.587785243988037), FRAC_CONST(0.809017002582550) },
1162 { FRAC_CONST(-0.309017032384872), FRAC_CONST(0.951056480407715) },
1163 { FRAC_CONST(-0.951056599617004), FRAC_CONST(0.309016793966293) },
1164 { FRAC_CONST(-0.809016942977905), FRAC_CONST(-0.587785363197327) },
1165 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1166 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1167 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1168 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1169 { FRAC_CONST(0.309017121791840), FRAC_CONST(-0.951056480407715) }
1170};
1171#endif
1172
1173#ifdef LD_DEC
1174
1175ALIGN static const complex_t cfft_tab_256[] =
1176{
1177 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1178 { FRAC_CONST(0.999698817729950), FRAC_CONST(0.024541229009628) },
1179 { FRAC_CONST(0.998795449733734), FRAC_CONST(0.049067676067352) },
1180 { FRAC_CONST(0.997290432453156), FRAC_CONST(0.073564566671848) },
1181 { FRAC_CONST(0.995184719562531), FRAC_CONST(0.098017141222954) },
1182 { FRAC_CONST(0.992479562759399), FRAC_CONST(0.122410677373409) },
1183 { FRAC_CONST(0.989176511764526), FRAC_CONST(0.146730467677116) },
1184 { FRAC_CONST(0.985277652740479), FRAC_CONST(0.170961901545525) },
1185 { FRAC_CONST(0.980785250663757), FRAC_CONST(0.195090323686600) },
1186 { FRAC_CONST(0.975702106952667), FRAC_CONST(0.219101235270500) },
1187 { FRAC_CONST(0.970031261444092), FRAC_CONST(0.242980197072029) },
1188 { FRAC_CONST(0.963776051998138), FRAC_CONST(0.266712784767151) },
1189 { FRAC_CONST(0.956940352916718), FRAC_CONST(0.290284663438797) },
1190 { FRAC_CONST(0.949528157711029), FRAC_CONST(0.313681751489639) },
1191 { FRAC_CONST(0.941544055938721), FRAC_CONST(0.336889863014221) },
1192 { FRAC_CONST(0.932992815971375), FRAC_CONST(0.359895050525665) },
1193 { FRAC_CONST(0.923879504203796), FRAC_CONST(0.382683455944061) },
1194 { FRAC_CONST(0.914209723472595), FRAC_CONST(0.405241340398788) },
1195 { FRAC_CONST(0.903989315032959), FRAC_CONST(0.427555084228516) },
1196 { FRAC_CONST(0.893224298954010), FRAC_CONST(0.449611335992813) },
1197 { FRAC_CONST(0.881921231746674), FRAC_CONST(0.471396744251251) },
1198 { FRAC_CONST(0.870086967945099), FRAC_CONST(0.492898225784302) },
1199 { FRAC_CONST(0.857728600502014), FRAC_CONST(0.514102756977081) },
1200 { FRAC_CONST(0.844853579998016), FRAC_CONST(0.534997642040253) },
1201 { FRAC_CONST(0.831469595432281), FRAC_CONST(0.555570244789124) },
1202 { FRAC_CONST(0.817584812641144), FRAC_CONST(0.575808227062225) },
1203 { FRAC_CONST(0.803207516670227), FRAC_CONST(0.595699310302734) },
1204 { FRAC_CONST(0.788346409797668), FRAC_CONST(0.615231633186340) },
1205 { FRAC_CONST(0.773010432720184), FRAC_CONST(0.634393334388733) },
1206 { FRAC_CONST(0.757208824157715), FRAC_CONST(0.653172850608826) },
1207 { FRAC_CONST(0.740951120853424), FRAC_CONST(0.671558976173401) },
1208 { FRAC_CONST(0.724247097969055), FRAC_CONST(0.689540565013886) },
1209 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
1210 { FRAC_CONST(0.689540505409241), FRAC_CONST(0.724247097969055) },
1211 { FRAC_CONST(0.671558916568756), FRAC_CONST(0.740951180458069) },
1212 { FRAC_CONST(0.653172791004181), FRAC_CONST(0.757208883762360) },
1213 { FRAC_CONST(0.634393274784088), FRAC_CONST(0.773010432720184) },
1214 { FRAC_CONST(0.615231573581696), FRAC_CONST(0.788346409797668) },
1215 { FRAC_CONST(0.595699310302734), FRAC_CONST(0.803207516670227) },
1216 { FRAC_CONST(0.575808167457581), FRAC_CONST(0.817584812641144) },
1217 { FRAC_CONST(0.555570185184479), FRAC_CONST(0.831469655036926) },
1218 { FRAC_CONST(0.534997642040253), FRAC_CONST(0.844853579998016) },
1219 { FRAC_CONST(0.514102697372437), FRAC_CONST(0.857728660106659) },
1220 { FRAC_CONST(0.492898195981979), FRAC_CONST(0.870086967945099) },
1221 { FRAC_CONST(0.471396654844284), FRAC_CONST(0.881921291351318) },
1222 { FRAC_CONST(0.449611306190491), FRAC_CONST(0.893224298954010) },
1223 { FRAC_CONST(0.427555114030838), FRAC_CONST(0.903989315032959) },
1224 { FRAC_CONST(0.405241280794144), FRAC_CONST(0.914209783077240) },
1225 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
1226 { FRAC_CONST(0.359894961118698), FRAC_CONST(0.932992815971375) },
1227 { FRAC_CONST(0.336889833211899), FRAC_CONST(0.941544055938721) },
1228 { FRAC_CONST(0.313681662082672), FRAC_CONST(0.949528217315674) },
1229 { FRAC_CONST(0.290284633636475), FRAC_CONST(0.956940352916718) },
1230 { FRAC_CONST(0.266712754964828), FRAC_CONST(0.963776051998138) },
1231 { FRAC_CONST(0.242980122566223), FRAC_CONST(0.970031261444092) },
1232 { FRAC_CONST(0.219101220369339), FRAC_CONST(0.975702106952667) },
1233 { FRAC_CONST(0.195090234279633), FRAC_CONST(0.980785310268402) },
1234 { FRAC_CONST(0.170961856842041), FRAC_CONST(0.985277652740479) },
1235 { FRAC_CONST(0.146730497479439), FRAC_CONST(0.989176511764526) },
1236 { FRAC_CONST(0.122410625219345), FRAC_CONST(0.992479562759399) },
1237 { FRAC_CONST(0.098017133772373), FRAC_CONST(0.995184719562531) },
1238 { FRAC_CONST(0.073564492166042), FRAC_CONST(0.997290432453156) },
1239 { FRAC_CONST(0.049067649990320), FRAC_CONST(0.998795449733734) },
1240 { FRAC_CONST(0.024541135877371), FRAC_CONST(0.999698817729950) },
1241 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1242 { FRAC_CONST(0.998795449733734), FRAC_CONST(0.049067676067352) },
1243 { FRAC_CONST(0.995184719562531), FRAC_CONST(0.098017141222954) },
1244 { FRAC_CONST(0.989176511764526), FRAC_CONST(0.146730467677116) },
1245 { FRAC_CONST(0.980785250663757), FRAC_CONST(0.195090323686600) },
1246 { FRAC_CONST(0.970031261444092), FRAC_CONST(0.242980197072029) },
1247 { FRAC_CONST(0.956940352916718), FRAC_CONST(0.290284663438797) },
1248 { FRAC_CONST(0.941544055938721), FRAC_CONST(0.336889863014221) },
1249 { FRAC_CONST(0.923879504203796), FRAC_CONST(0.382683455944061) },
1250 { FRAC_CONST(0.903989315032959), FRAC_CONST(0.427555084228516) },
1251 { FRAC_CONST(0.881921231746674), FRAC_CONST(0.471396744251251) },
1252 { FRAC_CONST(0.857728600502014), FRAC_CONST(0.514102756977081) },
1253 { FRAC_CONST(0.831469595432281), FRAC_CONST(0.555570244789124) },
1254 { FRAC_CONST(0.803207516670227), FRAC_CONST(0.595699310302734) },
1255 { FRAC_CONST(0.773010432720184), FRAC_CONST(0.634393334388733) },
1256 { FRAC_CONST(0.740951120853424), FRAC_CONST(0.671558976173401) },
1257 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
1258 { FRAC_CONST(0.671558916568756), FRAC_CONST(0.740951180458069) },
1259 { FRAC_CONST(0.634393274784088), FRAC_CONST(0.773010432720184) },
1260 { FRAC_CONST(0.595699310302734), FRAC_CONST(0.803207516670227) },
1261 { FRAC_CONST(0.555570185184479), FRAC_CONST(0.831469655036926) },
1262 { FRAC_CONST(0.514102697372437), FRAC_CONST(0.857728660106659) },
1263 { FRAC_CONST(0.471396654844284), FRAC_CONST(0.881921291351318) },
1264 { FRAC_CONST(0.427555114030838), FRAC_CONST(0.903989315032959) },
1265 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
1266 { FRAC_CONST(0.336889833211899), FRAC_CONST(0.941544055938721) },
1267 { FRAC_CONST(0.290284633636475), FRAC_CONST(0.956940352916718) },
1268 { FRAC_CONST(0.242980122566223), FRAC_CONST(0.970031261444092) },
1269 { FRAC_CONST(0.195090234279633), FRAC_CONST(0.980785310268402) },
1270 { FRAC_CONST(0.146730497479439), FRAC_CONST(0.989176511764526) },
1271 { FRAC_CONST(0.098017133772373), FRAC_CONST(0.995184719562531) },
1272 { FRAC_CONST(0.049067649990320), FRAC_CONST(0.998795449733734) },
1273 { FRAC_CONST(-0.000000043711388), FRAC_CONST(1.000000000000000) },
1274 { FRAC_CONST(-0.049067739397287), FRAC_CONST(0.998795449733734) },
1275 { FRAC_CONST(-0.098017223179340), FRAC_CONST(0.995184719562531) },
1276 { FRAC_CONST(-0.146730571985245), FRAC_CONST(0.989176511764526) },
1277 { FRAC_CONST(-0.195090323686600), FRAC_CONST(0.980785250663757) },
1278 { FRAC_CONST(-0.242980197072029), FRAC_CONST(0.970031261444092) },
1279 { FRAC_CONST(-0.290284723043442), FRAC_CONST(0.956940293312073) },
1280 { FRAC_CONST(-0.336889922618866), FRAC_CONST(0.941544055938721) },
1281 { FRAC_CONST(-0.382683515548706), FRAC_CONST(0.923879504203796) },
1282 { FRAC_CONST(-0.427555084228516), FRAC_CONST(0.903989315032959) },
1283 { FRAC_CONST(-0.471396833658218), FRAC_CONST(0.881921231746674) },
1284 { FRAC_CONST(-0.514102756977081), FRAC_CONST(0.857728600502014) },
1285 { FRAC_CONST(-0.555570363998413), FRAC_CONST(0.831469535827637) },
1286 { FRAC_CONST(-0.595699369907379), FRAC_CONST(0.803207516670227) },
1287 { FRAC_CONST(-0.634393274784088), FRAC_CONST(0.773010492324829) },
1288 { FRAC_CONST(-0.671559035778046), FRAC_CONST(0.740951061248779) },
1289 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
1290 { FRAC_CONST(-0.740951240062714), FRAC_CONST(0.671558856964111) },
1291 { FRAC_CONST(-0.773010492324829), FRAC_CONST(0.634393274784088) },
1292 { FRAC_CONST(-0.803207635879517), FRAC_CONST(0.595699131488800) },
1293 { FRAC_CONST(-0.831469655036926), FRAC_CONST(0.555570185184479) },
1294 { FRAC_CONST(-0.857728600502014), FRAC_CONST(0.514102756977081) },
1295 { FRAC_CONST(-0.881921350955963), FRAC_CONST(0.471396625041962) },
1296 { FRAC_CONST(-0.903989315032959), FRAC_CONST(0.427555054426193) },
1297 { FRAC_CONST(-0.923879623413086), FRAC_CONST(0.382683277130127) },
1298 { FRAC_CONST(-0.941544115543365), FRAC_CONST(0.336889803409576) },
1299 { FRAC_CONST(-0.956940352916718), FRAC_CONST(0.290284723043442) },
1300 { FRAC_CONST(-0.970031261444092), FRAC_CONST(0.242980077862740) },
1301 { FRAC_CONST(-0.980785310268402), FRAC_CONST(0.195090308785439) },
1302 { FRAC_CONST(-0.989176511764526), FRAC_CONST(0.146730333566666) },
1303 { FRAC_CONST(-0.995184719562531), FRAC_CONST(0.098017096519470) },
1304 { FRAC_CONST(-0.998795449733734), FRAC_CONST(0.049067486077547) },
1305 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1306 { FRAC_CONST(0.997290432453156), FRAC_CONST(0.073564566671848) },
1307 { FRAC_CONST(0.989176511764526), FRAC_CONST(0.146730467677116) },
1308 { FRAC_CONST(0.975702106952667), FRAC_CONST(0.219101235270500) },
1309 { FRAC_CONST(0.956940352916718), FRAC_CONST(0.290284663438797) },
1310 { FRAC_CONST(0.932992815971375), FRAC_CONST(0.359895050525665) },
1311 { FRAC_CONST(0.903989315032959), FRAC_CONST(0.427555084228516) },
1312 { FRAC_CONST(0.870086967945099), FRAC_CONST(0.492898225784302) },
1313 { FRAC_CONST(0.831469595432281), FRAC_CONST(0.555570244789124) },
1314 { FRAC_CONST(0.788346469402313), FRAC_CONST(0.615231573581696) },
1315 { FRAC_CONST(0.740951120853424), FRAC_CONST(0.671558976173401) },
1316 { FRAC_CONST(0.689540505409241), FRAC_CONST(0.724247097969055) },
1317 { FRAC_CONST(0.634393274784088), FRAC_CONST(0.773010432720184) },
1318 { FRAC_CONST(0.575808227062225), FRAC_CONST(0.817584812641144) },
1319 { FRAC_CONST(0.514102697372437), FRAC_CONST(0.857728660106659) },
1320 { FRAC_CONST(0.449611306190491), FRAC_CONST(0.893224298954010) },
1321 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
1322 { FRAC_CONST(0.313681751489639), FRAC_CONST(0.949528157711029) },
1323 { FRAC_CONST(0.242980241775513), FRAC_CONST(0.970031261444092) },
1324 { FRAC_CONST(0.170961856842041), FRAC_CONST(0.985277652740479) },
1325 { FRAC_CONST(0.098017133772373), FRAC_CONST(0.995184719562531) },
1326 { FRAC_CONST(0.024541255086660), FRAC_CONST(0.999698817729950) },
1327 { FRAC_CONST(-0.049067739397287), FRAC_CONST(0.998795449733734) },
1328 { FRAC_CONST(-0.122410707175732), FRAC_CONST(0.992479503154755) },
1329 { FRAC_CONST(-0.195090323686600), FRAC_CONST(0.980785250663757) },
1330 { FRAC_CONST(-0.266712725162506), FRAC_CONST(0.963776051998138) },
1331 { FRAC_CONST(-0.336889803409576), FRAC_CONST(0.941544055938721) },
1332 { FRAC_CONST(-0.405241340398788), FRAC_CONST(0.914209723472595) },
1333 { FRAC_CONST(-0.471396833658218), FRAC_CONST(0.881921231746674) },
1334 { FRAC_CONST(-0.534997701644897), FRAC_CONST(0.844853520393372) },
1335 { FRAC_CONST(-0.595699369907379), FRAC_CONST(0.803207516670227) },
1336 { FRAC_CONST(-0.653172850608826), FRAC_CONST(0.757208824157715) },
1337 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
1338 { FRAC_CONST(-0.757208824157715), FRAC_CONST(0.653172850608826) },
1339 { FRAC_CONST(-0.803207516670227), FRAC_CONST(0.595699369907379) },
1340 { FRAC_CONST(-0.844853520393372), FRAC_CONST(0.534997701644897) },
1341 { FRAC_CONST(-0.881921231746674), FRAC_CONST(0.471396833658218) },
1342 { FRAC_CONST(-0.914209783077240), FRAC_CONST(0.405241221189499) },
1343 { FRAC_CONST(-0.941544115543365), FRAC_CONST(0.336889803409576) },
1344 { FRAC_CONST(-0.963776051998138), FRAC_CONST(0.266712725162506) },
1345 { FRAC_CONST(-0.980785310268402), FRAC_CONST(0.195090308785439) },
1346 { FRAC_CONST(-0.992479503154755), FRAC_CONST(0.122410699725151) },
1347 { FRAC_CONST(-0.998795449733734), FRAC_CONST(0.049067724496126) },
1348 { FRAC_CONST(-0.999698817729950), FRAC_CONST(-0.024541147053242) },
1349 { FRAC_CONST(-0.995184719562531), FRAC_CONST(-0.098017267882824) },
1350 { FRAC_CONST(-0.985277652740479), FRAC_CONST(-0.170961990952492) },
1351 { FRAC_CONST(-0.970031261444092), FRAC_CONST(-0.242980241775513) },
1352 { FRAC_CONST(-0.949528157711029), FRAC_CONST(-0.313681781291962) },
1353 { FRAC_CONST(-0.923879504203796), FRAC_CONST(-0.382683426141739) },
1354 { FRAC_CONST(-0.893224298954010), FRAC_CONST(-0.449611306190491) },
1355 { FRAC_CONST(-0.857728660106659), FRAC_CONST(-0.514102697372437) },
1356 { FRAC_CONST(-0.817584872245789), FRAC_CONST(-0.575808107852936) },
1357 { FRAC_CONST(-0.773010551929474), FRAC_CONST(-0.634393215179443) },
1358 { FRAC_CONST(-0.724247038364410), FRAC_CONST(-0.689540624618530) },
1359 { FRAC_CONST(-0.671558916568756), FRAC_CONST(-0.740951180458069) },
1360 { FRAC_CONST(-0.615231573581696), FRAC_CONST(-0.788346469402313) },
1361 { FRAC_CONST(-0.555570006370544), FRAC_CONST(-0.831469774246216) },
1362 { FRAC_CONST(-0.492898195981979), FRAC_CONST(-0.870086967945099) },
1363 { FRAC_CONST(-0.427554935216904), FRAC_CONST(-0.903989374637604) },
1364 { FRAC_CONST(-0.359895110130310), FRAC_CONST(-0.932992756366730) },
1365 { FRAC_CONST(-0.290284544229507), FRAC_CONST(-0.956940352916718) },
1366 { FRAC_CONST(-0.219101369380951), FRAC_CONST(-0.975702106952667) },
1367 { FRAC_CONST(-0.146730408072472), FRAC_CONST(-0.989176511764526) },
1368 { FRAC_CONST(-0.073564760386944), FRAC_CONST(-0.997290432453156) },
1369 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1370 { FRAC_CONST(0.995184719562531), FRAC_CONST(0.098017141222954) },
1371 { FRAC_CONST(0.980785250663757), FRAC_CONST(0.195090323686600) },
1372 { FRAC_CONST(0.956940352916718), FRAC_CONST(0.290284663438797) },
1373 { FRAC_CONST(0.923879504203796), FRAC_CONST(0.382683455944061) },
1374 { FRAC_CONST(0.881921231746674), FRAC_CONST(0.471396744251251) },
1375 { FRAC_CONST(0.831469595432281), FRAC_CONST(0.555570244789124) },
1376 { FRAC_CONST(0.773010432720184), FRAC_CONST(0.634393334388733) },
1377 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
1378 { FRAC_CONST(0.634393274784088), FRAC_CONST(0.773010432720184) },
1379 { FRAC_CONST(0.555570185184479), FRAC_CONST(0.831469655036926) },
1380 { FRAC_CONST(0.471396654844284), FRAC_CONST(0.881921291351318) },
1381 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
1382 { FRAC_CONST(0.290284633636475), FRAC_CONST(0.956940352916718) },
1383 { FRAC_CONST(0.195090234279633), FRAC_CONST(0.980785310268402) },
1384 { FRAC_CONST(0.098017133772373), FRAC_CONST(0.995184719562531) },
1385 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1386 { FRAC_CONST(0.980785250663757), FRAC_CONST(0.195090323686600) },
1387 { FRAC_CONST(0.923879504203796), FRAC_CONST(0.382683455944061) },
1388 { FRAC_CONST(0.831469595432281), FRAC_CONST(0.555570244789124) },
1389 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
1390 { FRAC_CONST(0.555570185184479), FRAC_CONST(0.831469655036926) },
1391 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
1392 { FRAC_CONST(0.195090234279633), FRAC_CONST(0.980785310268402) },
1393 { FRAC_CONST(-0.000000043711388), FRAC_CONST(1.000000000000000) },
1394 { FRAC_CONST(-0.195090323686600), FRAC_CONST(0.980785250663757) },
1395 { FRAC_CONST(-0.382683515548706), FRAC_CONST(0.923879504203796) },
1396 { FRAC_CONST(-0.555570363998413), FRAC_CONST(0.831469535827637) },
1397 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
1398 { FRAC_CONST(-0.831469655036926), FRAC_CONST(0.555570185184479) },
1399 { FRAC_CONST(-0.923879623413086), FRAC_CONST(0.382683277130127) },
1400 { FRAC_CONST(-0.980785310268402), FRAC_CONST(0.195090308785439) },
1401 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1402 { FRAC_CONST(0.956940352916718), FRAC_CONST(0.290284663438797) },
1403 { FRAC_CONST(0.831469595432281), FRAC_CONST(0.555570244789124) },
1404 { FRAC_CONST(0.634393274784088), FRAC_CONST(0.773010432720184) },
1405 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
1406 { FRAC_CONST(0.098017133772373), FRAC_CONST(0.995184719562531) },
1407 { FRAC_CONST(-0.195090323686600), FRAC_CONST(0.980785250663757) },
1408 { FRAC_CONST(-0.471396833658218), FRAC_CONST(0.881921231746674) },
1409 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
1410 { FRAC_CONST(-0.881921231746674), FRAC_CONST(0.471396833658218) },
1411 { FRAC_CONST(-0.980785310268402), FRAC_CONST(0.195090308785439) },
1412 { FRAC_CONST(-0.995184719562531), FRAC_CONST(-0.098017267882824) },
1413 { FRAC_CONST(-0.923879504203796), FRAC_CONST(-0.382683426141739) },
1414 { FRAC_CONST(-0.773010551929474), FRAC_CONST(-0.634393215179443) },
1415 { FRAC_CONST(-0.555570006370544), FRAC_CONST(-0.831469774246216) },
1416 { FRAC_CONST(-0.290284544229507), FRAC_CONST(-0.956940352916718) },
1417 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1418 { FRAC_CONST(0.923879504203796), FRAC_CONST(0.382683455944061) },
1419 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
1420 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
1421 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1422 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
1423 { FRAC_CONST(-0.000000043711388), FRAC_CONST(1.000000000000000) },
1424 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
1425 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1426 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
1427 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
1428 { FRAC_CONST(-0.923879504203796), FRAC_CONST(-0.382683426141739) },
1429 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1430 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1431 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1432 { FRAC_CONST(0.000000011924881), FRAC_CONST(-1.000000000000000) }
1433};
1434
1435#ifdef ALLOW_SMALL_FRAMELENGTH
1436ALIGN static const complex_t cfft_tab_240[] =
1437{
1438 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1439 { FRAC_CONST(0.999657332897186), FRAC_CONST(0.026176949962974) },
1440 { FRAC_CONST(0.998629510402679), FRAC_CONST(0.052335958927870) },
1441 { FRAC_CONST(0.996917307376862), FRAC_CONST(0.078459098935127) },
1442 { FRAC_CONST(0.994521915912628), FRAC_CONST(0.104528464376926) },
1443 { FRAC_CONST(0.991444885730743), FRAC_CONST(0.130526199936867) },
1444 { FRAC_CONST(0.987688362598419), FRAC_CONST(0.156434476375580) },
1445 { FRAC_CONST(0.983254909515381), FRAC_CONST(0.182235524058342) },
1446 { FRAC_CONST(0.978147625923157), FRAC_CONST(0.207911700010300) },
1447 { FRAC_CONST(0.972369909286499), FRAC_CONST(0.233445376157761) },
1448 { FRAC_CONST(0.965925812721252), FRAC_CONST(0.258819043636322) },
1449 { FRAC_CONST(0.958819746971130), FRAC_CONST(0.284015357494354) },
1450 { FRAC_CONST(0.951056540012360), FRAC_CONST(0.309017002582550) },
1451 { FRAC_CONST(0.942641496658325), FRAC_CONST(0.333806872367859) },
1452 { FRAC_CONST(0.933580398559570), FRAC_CONST(0.358367949724197) },
1453 { FRAC_CONST(0.923879504203796), FRAC_CONST(0.382683455944061) },
1454 { FRAC_CONST(0.913545429706573), FRAC_CONST(0.406736642122269) },
1455 { FRAC_CONST(0.902585268020630), FRAC_CONST(0.430511116981506) },
1456 { FRAC_CONST(0.891006529331207), FRAC_CONST(0.453990519046783) },
1457 { FRAC_CONST(0.878817081451416), FRAC_CONST(0.477158784866333) },
1458 { FRAC_CONST(0.866025388240814), FRAC_CONST(0.500000000000000) },
1459 { FRAC_CONST(0.852640151977539), FRAC_CONST(0.522498548030853) },
1460 { FRAC_CONST(0.838670551776886), FRAC_CONST(0.544639050960541) },
1461 { FRAC_CONST(0.824126183986664), FRAC_CONST(0.566406250000000) },
1462 { FRAC_CONST(0.809017002582550), FRAC_CONST(0.587785243988037) },
1463 { FRAC_CONST(0.793353319168091), FRAC_CONST(0.608761429786682) },
1464 { FRAC_CONST(0.777145922183990), FRAC_CONST(0.629320383071899) },
1465 { FRAC_CONST(0.760405957698822), FRAC_CONST(0.649448096752167) },
1466 { FRAC_CONST(0.743144810199738), FRAC_CONST(0.669130623340607) },
1467 { FRAC_CONST(0.725374400615692), FRAC_CONST(0.688354551792145) },
1468 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
1469 { FRAC_CONST(0.688354551792145), FRAC_CONST(0.725374400615692) },
1470 { FRAC_CONST(0.669130563735962), FRAC_CONST(0.743144869804382) },
1471 { FRAC_CONST(0.649448037147522), FRAC_CONST(0.760405957698822) },
1472 { FRAC_CONST(0.629320383071899), FRAC_CONST(0.777145981788635) },
1473 { FRAC_CONST(0.608761370182037), FRAC_CONST(0.793353378772736) },
1474 { FRAC_CONST(0.587785243988037), FRAC_CONST(0.809017002582550) },
1475 { FRAC_CONST(0.566406250000000), FRAC_CONST(0.824126183986664) },
1476 { FRAC_CONST(0.544638991355896), FRAC_CONST(0.838670611381531) },
1477 { FRAC_CONST(0.522498488426209), FRAC_CONST(0.852640211582184) },
1478 { FRAC_CONST(0.499999970197678), FRAC_CONST(0.866025447845459) },
1479 { FRAC_CONST(0.477158755064011), FRAC_CONST(0.878817141056061) },
1480 { FRAC_CONST(0.453990519046783), FRAC_CONST(0.891006529331207) },
1481 { FRAC_CONST(0.430511027574539), FRAC_CONST(0.902585327625275) },
1482 { FRAC_CONST(0.406736612319946), FRAC_CONST(0.913545489311218) },
1483 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
1484 { FRAC_CONST(0.358367860317230), FRAC_CONST(0.933580458164215) },
1485 { FRAC_CONST(0.333806812763214), FRAC_CONST(0.942641496658325) },
1486 { FRAC_CONST(0.309016972780228), FRAC_CONST(0.951056540012360) },
1487 { FRAC_CONST(0.284015327692032), FRAC_CONST(0.958819746971130) },
1488 { FRAC_CONST(0.258819073438644), FRAC_CONST(0.965925812721252) },
1489 { FRAC_CONST(0.233445301651955), FRAC_CONST(0.972369909286499) },
1490 { FRAC_CONST(0.207911655306816), FRAC_CONST(0.978147625923157) },
1491 { FRAC_CONST(0.182235524058342), FRAC_CONST(0.983254909515381) },
1492 { FRAC_CONST(0.156434372067451), FRAC_CONST(0.987688362598419) },
1493 { FRAC_CONST(0.130526125431061), FRAC_CONST(0.991444885730743) },
1494 { FRAC_CONST(0.104528419673443), FRAC_CONST(0.994521915912628) },
1495 { FRAC_CONST(0.078459084033966), FRAC_CONST(0.996917307376862) },
1496 { FRAC_CONST(0.052335973829031), FRAC_CONST(0.998629510402679) },
1497 { FRAC_CONST(0.026176875457168), FRAC_CONST(0.999657332897186) },
1498 { FRAC_CONST(-0.000000043711388), FRAC_CONST(1.000000000000000) },
1499 { FRAC_CONST(-0.026176963001490), FRAC_CONST(0.999657332897186) },
1500 { FRAC_CONST(-0.052336059510708), FRAC_CONST(0.998629510402679) },
1501 { FRAC_CONST(-0.078459173440933), FRAC_CONST(0.996917307376862) },
1502 { FRAC_CONST(-0.104528509080410), FRAC_CONST(0.994521915912628) },
1503 { FRAC_CONST(-0.130526214838028), FRAC_CONST(0.991444885730743) },
1504 { FRAC_CONST(-0.156434446573257), FRAC_CONST(0.987688362598419) },
1505 { FRAC_CONST(-0.182235598564148), FRAC_CONST(0.983254909515381) },
1506 { FRAC_CONST(-0.207911744713783), FRAC_CONST(0.978147566318512) },
1507 { FRAC_CONST(-0.233445391058922), FRAC_CONST(0.972369909286499) },
1508 { FRAC_CONST(-0.258819162845612), FRAC_CONST(0.965925812721252) },
1509 { FRAC_CONST(-0.284015417098999), FRAC_CONST(0.958819687366486) },
1510 { FRAC_CONST(-0.309017032384872), FRAC_CONST(0.951056480407715) },
1511 { FRAC_CONST(-0.333806872367859), FRAC_CONST(0.942641496658325) },
1512 { FRAC_CONST(-0.358367949724197), FRAC_CONST(0.933580458164215) },
1513 { FRAC_CONST(-0.382683515548706), FRAC_CONST(0.923879504203796) },
1514 { FRAC_CONST(-0.406736701726913), FRAC_CONST(0.913545429706573) },
1515 { FRAC_CONST(-0.430511116981506), FRAC_CONST(0.902585268020630) },
1516 { FRAC_CONST(-0.453990608453751), FRAC_CONST(0.891006469726563) },
1517 { FRAC_CONST(-0.477158725261688), FRAC_CONST(0.878817141056061) },
1518 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1519 { FRAC_CONST(0.998629510402679), FRAC_CONST(0.052335958927870) },
1520 { FRAC_CONST(0.994521915912628), FRAC_CONST(0.104528464376926) },
1521 { FRAC_CONST(0.987688362598419), FRAC_CONST(0.156434476375580) },
1522 { FRAC_CONST(0.978147625923157), FRAC_CONST(0.207911700010300) },
1523 { FRAC_CONST(0.965925812721252), FRAC_CONST(0.258819043636322) },
1524 { FRAC_CONST(0.951056540012360), FRAC_CONST(0.309017002582550) },
1525 { FRAC_CONST(0.933580398559570), FRAC_CONST(0.358367949724197) },
1526 { FRAC_CONST(0.913545429706573), FRAC_CONST(0.406736642122269) },
1527 { FRAC_CONST(0.891006529331207), FRAC_CONST(0.453990519046783) },
1528 { FRAC_CONST(0.866025388240814), FRAC_CONST(0.500000000000000) },
1529 { FRAC_CONST(0.838670551776886), FRAC_CONST(0.544639050960541) },
1530 { FRAC_CONST(0.809017002582550), FRAC_CONST(0.587785243988037) },
1531 { FRAC_CONST(0.777145922183990), FRAC_CONST(0.629320383071899) },
1532 { FRAC_CONST(0.743144810199738), FRAC_CONST(0.669130623340607) },
1533 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
1534 { FRAC_CONST(0.669130563735962), FRAC_CONST(0.743144869804382) },
1535 { FRAC_CONST(0.629320383071899), FRAC_CONST(0.777145981788635) },
1536 { FRAC_CONST(0.587785243988037), FRAC_CONST(0.809017002582550) },
1537 { FRAC_CONST(0.544638991355896), FRAC_CONST(0.838670611381531) },
1538 { FRAC_CONST(0.499999970197678), FRAC_CONST(0.866025447845459) },
1539 { FRAC_CONST(0.453990519046783), FRAC_CONST(0.891006529331207) },
1540 { FRAC_CONST(0.406736612319946), FRAC_CONST(0.913545489311218) },
1541 { FRAC_CONST(0.358367860317230), FRAC_CONST(0.933580458164215) },
1542 { FRAC_CONST(0.309016972780228), FRAC_CONST(0.951056540012360) },
1543 { FRAC_CONST(0.258819073438644), FRAC_CONST(0.965925812721252) },
1544 { FRAC_CONST(0.207911655306816), FRAC_CONST(0.978147625923157) },
1545 { FRAC_CONST(0.156434372067451), FRAC_CONST(0.987688362598419) },
1546 { FRAC_CONST(0.104528419673443), FRAC_CONST(0.994521915912628) },
1547 { FRAC_CONST(0.052335973829031), FRAC_CONST(0.998629510402679) },
1548 { FRAC_CONST(-0.000000043711388), FRAC_CONST(1.000000000000000) },
1549 { FRAC_CONST(-0.052336059510708), FRAC_CONST(0.998629510402679) },
1550 { FRAC_CONST(-0.104528509080410), FRAC_CONST(0.994521915912628) },
1551 { FRAC_CONST(-0.156434446573257), FRAC_CONST(0.987688362598419) },
1552 { FRAC_CONST(-0.207911744713783), FRAC_CONST(0.978147566318512) },
1553 { FRAC_CONST(-0.258819162845612), FRAC_CONST(0.965925812721252) },
1554 { FRAC_CONST(-0.309017032384872), FRAC_CONST(0.951056480407715) },
1555 { FRAC_CONST(-0.358367949724197), FRAC_CONST(0.933580458164215) },
1556 { FRAC_CONST(-0.406736701726913), FRAC_CONST(0.913545429706573) },
1557 { FRAC_CONST(-0.453990608453751), FRAC_CONST(0.891006469726563) },
1558 { FRAC_CONST(-0.500000059604645), FRAC_CONST(0.866025388240814) },
1559 { FRAC_CONST(-0.544639050960541), FRAC_CONST(0.838670551776886) },
1560 { FRAC_CONST(-0.587785184383392), FRAC_CONST(0.809017002582550) },
1561 { FRAC_CONST(-0.629320502281189), FRAC_CONST(0.777145862579346) },
1562 { FRAC_CONST(-0.669130682945251), FRAC_CONST(0.743144810199738) },
1563 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
1564 { FRAC_CONST(-0.743144929409027), FRAC_CONST(0.669130444526672) },
1565 { FRAC_CONST(-0.777146041393280), FRAC_CONST(0.629320263862610) },
1566 { FRAC_CONST(-0.809017062187195), FRAC_CONST(0.587785184383392) },
1567 { FRAC_CONST(-0.838670551776886), FRAC_CONST(0.544639050960541) },
1568 { FRAC_CONST(-0.866025388240814), FRAC_CONST(0.500000059604645) },
1569 { FRAC_CONST(-0.891006588935852), FRAC_CONST(0.453990370035172) },
1570 { FRAC_CONST(-0.913545489311218), FRAC_CONST(0.406736582517624) },
1571 { FRAC_CONST(-0.933580458164215), FRAC_CONST(0.358367919921875) },
1572 { FRAC_CONST(-0.951056599617004), FRAC_CONST(0.309016793966293) },
1573 { FRAC_CONST(-0.965925872325897), FRAC_CONST(0.258818924427032) },
1574 { FRAC_CONST(-0.978147625923157), FRAC_CONST(0.207911610603333) },
1575 { FRAC_CONST(-0.987688362598419), FRAC_CONST(0.156434446573257) },
1576 { FRAC_CONST(-0.994521915912628), FRAC_CONST(0.104528494179249) },
1577 { FRAC_CONST(-0.998629570007324), FRAC_CONST(0.052335809916258) },
1578 { FRAC_CONST(-1.000000000000000), FRAC_CONST(-0.000000087422777) },
1579 { FRAC_CONST(-0.998629510402679), FRAC_CONST(-0.052335985004902) },
1580 { FRAC_CONST(-0.994521856307983), FRAC_CONST(-0.104528672993183) },
1581 { FRAC_CONST(-0.987688302993774), FRAC_CONST(-0.156434610486031) },
1582 { FRAC_CONST(-0.978147566318512), FRAC_CONST(-0.207911789417267) },
1583 { FRAC_CONST(-0.965925812721252), FRAC_CONST(-0.258819073438644) },
1584 { FRAC_CONST(-0.951056540012360), FRAC_CONST(-0.309016972780228) },
1585 { FRAC_CONST(-0.933580398559570), FRAC_CONST(-0.358368098735809) },
1586 { FRAC_CONST(-0.913545429706573), FRAC_CONST(-0.406736731529236) },
1587 { FRAC_CONST(-0.891006529331207), FRAC_CONST(-0.453990548849106) },
1588 { FRAC_CONST(-0.866025269031525), FRAC_CONST(-0.500000178813934) },
1589 { FRAC_CONST(-0.838670492172241), FRAC_CONST(-0.544639170169830) },
1590 { FRAC_CONST(-0.809016942977905), FRAC_CONST(-0.587785363197327) },
1591 { FRAC_CONST(-0.777145922183990), FRAC_CONST(-0.629320442676544) },
1592 { FRAC_CONST(-0.743144810199738), FRAC_CONST(-0.669130623340607) },
1593 { FRAC_CONST(-0.707106649875641), FRAC_CONST(-0.707106888294220) },
1594 { FRAC_CONST(-0.669130504131317), FRAC_CONST(-0.743144869804382) },
1595 { FRAC_CONST(-0.629320323467255), FRAC_CONST(-0.777145981788635) },
1596 { FRAC_CONST(-0.587785065174103), FRAC_CONST(-0.809017121791840) },
1597 { FRAC_CONST(-0.544639110565186), FRAC_CONST(-0.838670551776886) },
1598 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1599 { FRAC_CONST(0.996917307376862), FRAC_CONST(0.078459098935127) },
1600 { FRAC_CONST(0.987688362598419), FRAC_CONST(0.156434476375580) },
1601 { FRAC_CONST(0.972369909286499), FRAC_CONST(0.233445376157761) },
1602 { FRAC_CONST(0.951056540012360), FRAC_CONST(0.309017002582550) },
1603 { FRAC_CONST(0.923879504203796), FRAC_CONST(0.382683455944061) },
1604 { FRAC_CONST(0.891006529331207), FRAC_CONST(0.453990519046783) },
1605 { FRAC_CONST(0.852640151977539), FRAC_CONST(0.522498548030853) },
1606 { FRAC_CONST(0.809017002582550), FRAC_CONST(0.587785243988037) },
1607 { FRAC_CONST(0.760405957698822), FRAC_CONST(0.649448096752167) },
1608 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
1609 { FRAC_CONST(0.649448037147522), FRAC_CONST(0.760405957698822) },
1610 { FRAC_CONST(0.587785243988037), FRAC_CONST(0.809017002582550) },
1611 { FRAC_CONST(0.522498488426209), FRAC_CONST(0.852640211582184) },
1612 { FRAC_CONST(0.453990519046783), FRAC_CONST(0.891006529331207) },
1613 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
1614 { FRAC_CONST(0.309016972780228), FRAC_CONST(0.951056540012360) },
1615 { FRAC_CONST(0.233445301651955), FRAC_CONST(0.972369909286499) },
1616 { FRAC_CONST(0.156434372067451), FRAC_CONST(0.987688362598419) },
1617 { FRAC_CONST(0.078459084033966), FRAC_CONST(0.996917307376862) },
1618 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1619 { FRAC_CONST(0.987688362598419), FRAC_CONST(0.156434476375580) },
1620 { FRAC_CONST(0.951056540012360), FRAC_CONST(0.309017002582550) },
1621 { FRAC_CONST(0.891006529331207), FRAC_CONST(0.453990519046783) },
1622 { FRAC_CONST(0.809017002582550), FRAC_CONST(0.587785243988037) },
1623 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
1624 { FRAC_CONST(0.587785243988037), FRAC_CONST(0.809017002582550) },
1625 { FRAC_CONST(0.453990519046783), FRAC_CONST(0.891006529331207) },
1626 { FRAC_CONST(0.309016972780228), FRAC_CONST(0.951056540012360) },
1627 { FRAC_CONST(0.156434372067451), FRAC_CONST(0.987688362598419) },
1628 { FRAC_CONST(-0.000000043711388), FRAC_CONST(1.000000000000000) },
1629 { FRAC_CONST(-0.156434446573257), FRAC_CONST(0.987688362598419) },
1630 { FRAC_CONST(-0.309017032384872), FRAC_CONST(0.951056480407715) },
1631 { FRAC_CONST(-0.453990608453751), FRAC_CONST(0.891006469726563) },
1632 { FRAC_CONST(-0.587785184383392), FRAC_CONST(0.809017002582550) },
1633 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
1634 { FRAC_CONST(-0.809017062187195), FRAC_CONST(0.587785184383392) },
1635 { FRAC_CONST(-0.891006588935852), FRAC_CONST(0.453990370035172) },
1636 { FRAC_CONST(-0.951056599617004), FRAC_CONST(0.309016793966293) },
1637 { FRAC_CONST(-0.987688362598419), FRAC_CONST(0.156434446573257) },
1638 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1639 { FRAC_CONST(0.972369909286499), FRAC_CONST(0.233445376157761) },
1640 { FRAC_CONST(0.891006529331207), FRAC_CONST(0.453990519046783) },
1641 { FRAC_CONST(0.760405957698822), FRAC_CONST(0.649448096752167) },
1642 { FRAC_CONST(0.587785243988037), FRAC_CONST(0.809017002582550) },
1643 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
1644 { FRAC_CONST(0.156434372067451), FRAC_CONST(0.987688362598419) },
1645 { FRAC_CONST(-0.078459173440933), FRAC_CONST(0.996917307376862) },
1646 { FRAC_CONST(-0.309017032384872), FRAC_CONST(0.951056480407715) },
1647 { FRAC_CONST(-0.522498667240143), FRAC_CONST(0.852640092372894) },
1648 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
1649 { FRAC_CONST(-0.852640211582184), FRAC_CONST(0.522498488426209) },
1650 { FRAC_CONST(-0.951056599617004), FRAC_CONST(0.309016793966293) },
1651 { FRAC_CONST(-0.996917366981506), FRAC_CONST(0.078459039330482) },
1652 { FRAC_CONST(-0.987688302993774), FRAC_CONST(-0.156434610486031) },
1653 { FRAC_CONST(-0.923879504203796), FRAC_CONST(-0.382683426141739) },
1654 { FRAC_CONST(-0.809016942977905), FRAC_CONST(-0.587785363197327) },
1655 { FRAC_CONST(-0.649447917938232), FRAC_CONST(-0.760406076908112) },
1656 { FRAC_CONST(-0.453990221023560), FRAC_CONST(-0.891006648540497) },
1657 { FRAC_CONST(-0.233445450663567), FRAC_CONST(-0.972369909286499) },
1658 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1659 { FRAC_CONST(0.951056540012360), FRAC_CONST(0.309017002582550) },
1660 { FRAC_CONST(0.809017002582550), FRAC_CONST(0.587785243988037) },
1661 { FRAC_CONST(0.587785243988037), FRAC_CONST(0.809017002582550) },
1662 { FRAC_CONST(0.309016972780228), FRAC_CONST(0.951056540012360) },
1663 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1664 { FRAC_CONST(0.809017002582550), FRAC_CONST(0.587785243988037) },
1665 { FRAC_CONST(0.309016972780228), FRAC_CONST(0.951056540012360) },
1666 { FRAC_CONST(-0.309017032384872), FRAC_CONST(0.951056480407715) },
1667 { FRAC_CONST(-0.809017062187195), FRAC_CONST(0.587785184383392) },
1668 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1669 { FRAC_CONST(0.587785243988037), FRAC_CONST(0.809017002582550) },
1670 { FRAC_CONST(-0.309017032384872), FRAC_CONST(0.951056480407715) },
1671 { FRAC_CONST(-0.951056599617004), FRAC_CONST(0.309016793966293) },
1672 { FRAC_CONST(-0.809016942977905), FRAC_CONST(-0.587785363197327) },
1673 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1674 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1675 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1676 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1677 { FRAC_CONST(0.309017121791840), FRAC_CONST(-0.951056480407715) }
1678};
1679#endif
1680
1681#endif
1682
1683ALIGN static const complex_t cfft_tab_128[] =
1684{
1685 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1686 { FRAC_CONST(0.998795449733734), FRAC_CONST(0.049067676067352) },
1687 { FRAC_CONST(0.995184719562531), FRAC_CONST(0.098017141222954) },
1688 { FRAC_CONST(0.989176511764526), FRAC_CONST(0.146730467677116) },
1689 { FRAC_CONST(0.980785250663757), FRAC_CONST(0.195090323686600) },
1690 { FRAC_CONST(0.970031261444092), FRAC_CONST(0.242980197072029) },
1691 { FRAC_CONST(0.956940352916718), FRAC_CONST(0.290284663438797) },
1692 { FRAC_CONST(0.941544055938721), FRAC_CONST(0.336889863014221) },
1693 { FRAC_CONST(0.923879504203796), FRAC_CONST(0.382683455944061) },
1694 { FRAC_CONST(0.903989315032959), FRAC_CONST(0.427555084228516) },
1695 { FRAC_CONST(0.881921231746674), FRAC_CONST(0.471396744251251) },
1696 { FRAC_CONST(0.857728600502014), FRAC_CONST(0.514102756977081) },
1697 { FRAC_CONST(0.831469595432281), FRAC_CONST(0.555570244789124) },
1698 { FRAC_CONST(0.803207516670227), FRAC_CONST(0.595699310302734) },
1699 { FRAC_CONST(0.773010432720184), FRAC_CONST(0.634393334388733) },
1700 { FRAC_CONST(0.740951120853424), FRAC_CONST(0.671558976173401) },
1701 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
1702 { FRAC_CONST(0.671558916568756), FRAC_CONST(0.740951180458069) },
1703 { FRAC_CONST(0.634393274784088), FRAC_CONST(0.773010432720184) },
1704 { FRAC_CONST(0.595699310302734), FRAC_CONST(0.803207516670227) },
1705 { FRAC_CONST(0.555570185184479), FRAC_CONST(0.831469655036926) },
1706 { FRAC_CONST(0.514102697372437), FRAC_CONST(0.857728660106659) },
1707 { FRAC_CONST(0.471396654844284), FRAC_CONST(0.881921291351318) },
1708 { FRAC_CONST(0.427555114030838), FRAC_CONST(0.903989315032959) },
1709 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
1710 { FRAC_CONST(0.336889833211899), FRAC_CONST(0.941544055938721) },
1711 { FRAC_CONST(0.290284633636475), FRAC_CONST(0.956940352916718) },
1712 { FRAC_CONST(0.242980122566223), FRAC_CONST(0.970031261444092) },
1713 { FRAC_CONST(0.195090234279633), FRAC_CONST(0.980785310268402) },
1714 { FRAC_CONST(0.146730497479439), FRAC_CONST(0.989176511764526) },
1715 { FRAC_CONST(0.098017133772373), FRAC_CONST(0.995184719562531) },
1716 { FRAC_CONST(0.049067649990320), FRAC_CONST(0.998795449733734) },
1717 { FRAC_CONST(-0.000000043711388), FRAC_CONST(1.000000000000000) },
1718 { FRAC_CONST(-0.049067739397287), FRAC_CONST(0.998795449733734) },
1719 { FRAC_CONST(-0.098017223179340), FRAC_CONST(0.995184719562531) },
1720 { FRAC_CONST(-0.146730571985245), FRAC_CONST(0.989176511764526) },
1721 { FRAC_CONST(-0.195090323686600), FRAC_CONST(0.980785250663757) },
1722 { FRAC_CONST(-0.242980197072029), FRAC_CONST(0.970031261444092) },
1723 { FRAC_CONST(-0.290284723043442), FRAC_CONST(0.956940293312073) },
1724 { FRAC_CONST(-0.336889922618866), FRAC_CONST(0.941544055938721) },
1725 { FRAC_CONST(-0.382683515548706), FRAC_CONST(0.923879504203796) },
1726 { FRAC_CONST(-0.427555084228516), FRAC_CONST(0.903989315032959) },
1727 { FRAC_CONST(-0.471396833658218), FRAC_CONST(0.881921231746674) },
1728 { FRAC_CONST(-0.514102756977081), FRAC_CONST(0.857728600502014) },
1729 { FRAC_CONST(-0.555570363998413), FRAC_CONST(0.831469535827637) },
1730 { FRAC_CONST(-0.595699369907379), FRAC_CONST(0.803207516670227) },
1731 { FRAC_CONST(-0.634393274784088), FRAC_CONST(0.773010492324829) },
1732 { FRAC_CONST(-0.671559035778046), FRAC_CONST(0.740951061248779) },
1733 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
1734 { FRAC_CONST(-0.740951240062714), FRAC_CONST(0.671558856964111) },
1735 { FRAC_CONST(-0.773010492324829), FRAC_CONST(0.634393274784088) },
1736 { FRAC_CONST(-0.803207635879517), FRAC_CONST(0.595699131488800) },
1737 { FRAC_CONST(-0.831469655036926), FRAC_CONST(0.555570185184479) },
1738 { FRAC_CONST(-0.857728600502014), FRAC_CONST(0.514102756977081) },
1739 { FRAC_CONST(-0.881921350955963), FRAC_CONST(0.471396625041962) },
1740 { FRAC_CONST(-0.903989315032959), FRAC_CONST(0.427555054426193) },
1741 { FRAC_CONST(-0.923879623413086), FRAC_CONST(0.382683277130127) },
1742 { FRAC_CONST(-0.941544115543365), FRAC_CONST(0.336889803409576) },
1743 { FRAC_CONST(-0.956940352916718), FRAC_CONST(0.290284723043442) },
1744 { FRAC_CONST(-0.970031261444092), FRAC_CONST(0.242980077862740) },
1745 { FRAC_CONST(-0.980785310268402), FRAC_CONST(0.195090308785439) },
1746 { FRAC_CONST(-0.989176511764526), FRAC_CONST(0.146730333566666) },
1747 { FRAC_CONST(-0.995184719562531), FRAC_CONST(0.098017096519470) },
1748 { FRAC_CONST(-0.998795449733734), FRAC_CONST(0.049067486077547) },
1749 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1750 { FRAC_CONST(0.995184719562531), FRAC_CONST(0.098017141222954) },
1751 { FRAC_CONST(0.980785250663757), FRAC_CONST(0.195090323686600) },
1752 { FRAC_CONST(0.956940352916718), FRAC_CONST(0.290284663438797) },
1753 { FRAC_CONST(0.923879504203796), FRAC_CONST(0.382683455944061) },
1754 { FRAC_CONST(0.881921231746674), FRAC_CONST(0.471396744251251) },
1755 { FRAC_CONST(0.831469595432281), FRAC_CONST(0.555570244789124) },
1756 { FRAC_CONST(0.773010432720184), FRAC_CONST(0.634393334388733) },
1757 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
1758 { FRAC_CONST(0.634393274784088), FRAC_CONST(0.773010432720184) },
1759 { FRAC_CONST(0.555570185184479), FRAC_CONST(0.831469655036926) },
1760 { FRAC_CONST(0.471396654844284), FRAC_CONST(0.881921291351318) },
1761 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
1762 { FRAC_CONST(0.290284633636475), FRAC_CONST(0.956940352916718) },
1763 { FRAC_CONST(0.195090234279633), FRAC_CONST(0.980785310268402) },
1764 { FRAC_CONST(0.098017133772373), FRAC_CONST(0.995184719562531) },
1765 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1766 { FRAC_CONST(0.980785250663757), FRAC_CONST(0.195090323686600) },
1767 { FRAC_CONST(0.923879504203796), FRAC_CONST(0.382683455944061) },
1768 { FRAC_CONST(0.831469595432281), FRAC_CONST(0.555570244789124) },
1769 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
1770 { FRAC_CONST(0.555570185184479), FRAC_CONST(0.831469655036926) },
1771 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
1772 { FRAC_CONST(0.195090234279633), FRAC_CONST(0.980785310268402) },
1773 { FRAC_CONST(-0.000000043711388), FRAC_CONST(1.000000000000000) },
1774 { FRAC_CONST(-0.195090323686600), FRAC_CONST(0.980785250663757) },
1775 { FRAC_CONST(-0.382683515548706), FRAC_CONST(0.923879504203796) },
1776 { FRAC_CONST(-0.555570363998413), FRAC_CONST(0.831469535827637) },
1777 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
1778 { FRAC_CONST(-0.831469655036926), FRAC_CONST(0.555570185184479) },
1779 { FRAC_CONST(-0.923879623413086), FRAC_CONST(0.382683277130127) },
1780 { FRAC_CONST(-0.980785310268402), FRAC_CONST(0.195090308785439) },
1781 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1782 { FRAC_CONST(0.956940352916718), FRAC_CONST(0.290284663438797) },
1783 { FRAC_CONST(0.831469595432281), FRAC_CONST(0.555570244789124) },
1784 { FRAC_CONST(0.634393274784088), FRAC_CONST(0.773010432720184) },
1785 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
1786 { FRAC_CONST(0.098017133772373), FRAC_CONST(0.995184719562531) },
1787 { FRAC_CONST(-0.195090323686600), FRAC_CONST(0.980785250663757) },
1788 { FRAC_CONST(-0.471396833658218), FRAC_CONST(0.881921231746674) },
1789 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
1790 { FRAC_CONST(-0.881921231746674), FRAC_CONST(0.471396833658218) },
1791 { FRAC_CONST(-0.980785310268402), FRAC_CONST(0.195090308785439) },
1792 { FRAC_CONST(-0.995184719562531), FRAC_CONST(-0.098017267882824) },
1793 { FRAC_CONST(-0.923879504203796), FRAC_CONST(-0.382683426141739) },
1794 { FRAC_CONST(-0.773010551929474), FRAC_CONST(-0.634393215179443) },
1795 { FRAC_CONST(-0.555570006370544), FRAC_CONST(-0.831469774246216) },
1796 { FRAC_CONST(-0.290284544229507), FRAC_CONST(-0.956940352916718) },
1797 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1798 { FRAC_CONST(0.923879504203796), FRAC_CONST(0.382683455944061) },
1799 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
1800 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
1801 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1802 { FRAC_CONST(0.707106769084930), FRAC_CONST(0.707106769084930) },
1803 { FRAC_CONST(-0.000000043711388), FRAC_CONST(1.000000000000000) },
1804 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
1805 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1806 { FRAC_CONST(0.382683426141739), FRAC_CONST(0.923879504203796) },
1807 { FRAC_CONST(-0.707106769084930), FRAC_CONST(0.707106769084930) },
1808 { FRAC_CONST(-0.923879504203796), FRAC_CONST(-0.382683426141739) },
1809 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1810 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1811 { FRAC_CONST(1.000000000000000), FRAC_CONST(0.000000000000000) },
1812 { FRAC_CONST(0.000000011924881), FRAC_CONST(-1.000000000000000) }
1813};
1814
1815#endif
1816
1817#ifdef __cplusplus
1818}
1819#endif
1820#endif
diff --git a/apps/codecs/libfaad/codebook/hcb.h b/apps/codecs/libfaad/codebook/hcb.h
new file mode 100644
index 0000000000..eaefdbf437
--- /dev/null
+++ b/apps/codecs/libfaad/codebook/hcb.h
@@ -0,0 +1,142 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __HCB_H__
29#define __HCB_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35/*
36 * Optimal huffman decoding for AAC taken from:
37 * "SELECTING AN OPTIMAL HUFFMAN DECODER FOR AAC" by
38 * VLADIMIR Z. MESAROVIC , RAGHUNATH RAO, MIROSLAV V. DOKIC, and SACHIN DEO
39 * AES paper 5436
40 *
41 * 2 methods are used for huffman decoding:
42 * - binary search
43 * - 2-step table lookup
44 *
45 * The choice of the "optimal" method is based on the fact that if the
46 * memory size for the Two-step is exorbitantly high then the decision
47 * is Binary search for that codebook. However, for marginally more memory
48 * size, if Twostep outperforms even the best case of Binary then the
49 * decision is Two-step for that codebook.
50 *
51 * The following methods are used for the different tables.
52 * codebook "optimal" method
53 * HCB_1 2-Step
54 * HCB_2 2-Step
55 * HCB_3 Binary
56 * HCB_4 2-Step
57 * HCB_5 Binary
58 * HCB_6 2-Step
59 * HCB_7 Binary
60 * HCB_8 2-Step
61 * HCB_9 Binary
62 * HCB_10 2-Step
63 * HCB_11 2-Step
64 * HCB_SF Binary
65 *
66 */
67
68
69#define ZERO_HCB 0
70#define FIRST_PAIR_HCB 5
71#define ESC_HCB 11
72#define QUAD_LEN 4
73#define PAIR_LEN 2
74#define NOISE_HCB 13
75#define INTENSITY_HCB2 14
76#define INTENSITY_HCB 15
77
78/* 1st step table */
79typedef struct
80{
81 uint8_t offset;
82 uint8_t extra_bits;
83} hcb;
84
85/* 2nd step table with quadruple data */
86typedef struct
87{
88 uint8_t bits;
89 int8_t x;
90 int8_t y;
91} hcb_2_pair;
92
93typedef struct
94{
95 uint8_t bits;
96 int8_t x;
97 int8_t y;
98 int8_t v;
99 int8_t w;
100} hcb_2_quad;
101
102/* binary search table */
103typedef struct
104{
105 uint8_t is_leaf;
106 int8_t data[4];
107} hcb_bin_quad;
108
109typedef struct
110{
111 uint8_t is_leaf;
112 int8_t data[2];
113} hcb_bin_pair;
114
115hcb *hcb_table[];
116hcb_2_quad *hcb_2_quad_table[];
117hcb_2_pair *hcb_2_pair_table[];
118hcb_bin_pair *hcb_bin_table[];
119uint8_t hcbN[];
120uint8_t unsigned_cb[];
121int hcb_2_quad_table_size[];
122int hcb_2_pair_table_size[];
123int hcb_bin_table_size[];
124
125#include "codebook/hcb_1.h"
126#include "codebook/hcb_2.h"
127#include "codebook/hcb_3.h"
128#include "codebook/hcb_4.h"
129#include "codebook/hcb_5.h"
130#include "codebook/hcb_6.h"
131#include "codebook/hcb_7.h"
132#include "codebook/hcb_8.h"
133#include "codebook/hcb_9.h"
134#include "codebook/hcb_10.h"
135#include "codebook/hcb_11.h"
136#include "codebook/hcb_sf.h"
137
138
139#ifdef __cplusplus
140}
141#endif
142#endif
diff --git a/apps/codecs/libfaad/codebook/hcb_1.h b/apps/codecs/libfaad/codebook/hcb_1.h
new file mode 100644
index 0000000000..610e578efb
--- /dev/null
+++ b/apps/codecs/libfaad/codebook/hcb_1.h
@@ -0,0 +1,183 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28/* 2-step huffman table HCB_1 */
29
30
31/* 1st step: 5 bits
32 * 2^5 = 32 entries
33 *
34 * Used to find offset into 2nd step table and number of extra bits to get
35 */
36static hcb hcb1_1[] = {
37 { /* 00000 */ 0, 0 },
38 { /* */ 0, 0 },
39 { /* */ 0, 0 },
40 { /* */ 0, 0 },
41 { /* */ 0, 0 },
42 { /* */ 0, 0 },
43 { /* */ 0, 0 },
44 { /* */ 0, 0 },
45 { /* */ 0, 0 },
46 { /* */ 0, 0 },
47 { /* */ 0, 0 },
48 { /* */ 0, 0 },
49 { /* */ 0, 0 },
50 { /* */ 0, 0 },
51 { /* */ 0, 0 },
52 { /* */ 0, 0 },
53 { /* 10000 */ 1, 0 },
54 { /* 10001 */ 2, 0 },
55 { /* 10010 */ 3, 0 },
56 { /* 10011 */ 4, 0 },
57 { /* 10100 */ 5, 0 },
58 { /* 10101 */ 6, 0 },
59 { /* 10110 */ 7, 0 },
60 { /* 10111 */ 8, 0 },
61
62 /* 7 bit codewords */
63 { /* 11000 */ 9, 2 },
64 { /* 11001 */ 13, 2 },
65 { /* 11010 */ 17, 2 },
66 { /* 11011 */ 21, 2 },
67 { /* 11100 */ 25, 2 },
68 { /* 11101 */ 29, 2 },
69
70 /* 9 bit codewords */
71 { /* 11110 */ 33, 4 },
72
73 /* 9/10/11 bit codewords */
74 { /* 11111 */ 49, 6 }
75};
76
77/* 2nd step table
78 *
79 * Gives size of codeword and actual data (x,y,v,w)
80 */
81static hcb_2_quad hcb1_2[] = {
82 /* 1 bit codeword */
83 { 1, 0, 0, 0, 0 },
84
85 /* 5 bit codewords */
86 { 5, 1, 0, 0, 0 },
87 { 5, -1, 0, 0, 0 },
88 { 5, 0, 0, 0, -1 },
89 { 5, 0, 1, 0, 0 },
90 { 5, 0, 0, 0, 1 },
91 { 5, 0, 0, -1, 0 },
92 { 5, 0, 0, 1, 0 },
93 { 5, 0, -1, 0, 0 },
94
95 /* 7 bit codewords */
96 /* first 5 bits: 11000 */
97 { 7, 1, -1, 0, 0 },
98 { 7, -1, 1, 0, 0 },
99 { 7, 0, 0, -1, 1 },
100 { 7, 0, 1, -1, 0 },
101 /* first 5 bits: 11001 */
102 { 7, 0, -1, 1, 0 },
103 { 7, 0, 0, 1, -1 },
104 { 7, 1, 1, 0, 0 },
105 { 7, 0, 0, -1, -1 },
106 /* first 5 bits: 11010 */
107 { 7, -1, -1, 0, 0 },
108 { 7, 0, -1, -1, 0 },
109 { 7, 1, 0, -1, 0 },
110 { 7, 0, 1, 0, -1 },
111 /* first 5 bits: 11011 */
112 { 7, -1, 0, 1, 0 },
113 { 7, 0, 0, 1, 1 },
114 { 7, 1, 0, 1, 0 },
115 { 7, 0, -1, 0, 1 },
116 /* first 5 bits: 11100 */
117 { 7, 0, 1, 1, 0 },
118 { 7, 0, 1, 0, 1 },
119 { 7, -1, 0, -1, 0 },
120 { 7, 1, 0, 0, 1 },
121 /* first 5 bits: 11101 */
122 { 7, -1, 0, 0, -1 },
123 { 7, 1, 0, 0, -1 },
124 { 7, -1, 0, 0, 1 },
125 { 7, 0, -1, 0, -1 },
126
127 /* 9 bit codeword */
128 /* first 5 bits: 11110 */
129 { 9, 1, 1, -1, 0 },
130 { 9, -1, 1, -1, 0 },
131 { 9, 1, -1, 1, 0 },
132 { 9, 0, 1, 1, -1 },
133 { 9, 0, 1, -1, 1 },
134 { 9, 0, -1, 1, 1 },
135 { 9, 0, -1, 1, -1 },
136 { 9, 1, -1, -1, 0 },
137 { 9, 1, 0, -1, 1 },
138 { 9, 0, 1, -1, -1 },
139 { 9, -1, 1, 1, 0 },
140 { 9, -1, 0, 1, -1 },
141 { 9, -1, -1, 1, 0 },
142 { 9, 0, -1, -1, 1 },
143 { 9, 1, -1, 0, 1 },
144 { 9, 1, -1, 0, -1 },
145
146 /* 9/10/11 bit codewords */
147 /* first 5 bits: 11111 */
148 /* 9 bit: reading 11 bits -> 2 too much so 4 entries for each codeword */
149 { 9, -1, 1, 0, -1 }, { 9, -1, 1, 0, -1 }, { 9, -1, 1, 0, -1 }, { 9, -1, 1, 0, -1 },
150 { 9, -1, -1, -1, 0 }, { 9, -1, -1, -1, 0 }, { 9, -1, -1, -1, 0 }, { 9, -1, -1, -1, 0 },
151 { 9, 0, -1, -1, -1 }, { 9, 0, -1, -1, -1 }, { 9, 0, -1, -1, -1 }, { 9, 0, -1, -1, -1 },
152 { 9, 0, 1, 1, 1 }, { 9, 0, 1, 1, 1 }, { 9, 0, 1, 1, 1 }, { 9, 0, 1, 1, 1 },
153 { 9, 1, 0, 1, -1 }, { 9, 1, 0, 1, -1 }, { 9, 1, 0, 1, -1 }, { 9, 1, 0, 1, -1 },
154 { 9, 1, 1, 0, 1 }, { 9, 1, 1, 0, 1 }, { 9, 1, 1, 0, 1 }, { 9, 1, 1, 0, 1 },
155 { 9, -1, 1, 0, 1 }, { 9, -1, 1, 0, 1 }, { 9, -1, 1, 0, 1 }, { 9, -1, 1, 0, 1 },
156 { 9, 1, 1, 1, 0 }, { 9, 1, 1, 1, 0 }, { 9, 1, 1, 1, 0 }, { 9, 1, 1, 1, 0 },
157 /* 10 bit: reading 11 bits -> 1 too much so 2 entries for each codeword */
158 { 10, -1, -1, 0, 1 }, { 10, -1, -1, 0, 1 },
159 { 10, -1, 0, -1, -1 }, { 10, -1, 0, -1, -1 },
160 { 10, 1, 1, 0, -1 }, { 10, 1, 1, 0, -1 },
161 { 10, 1, 0, -1, -1 }, { 10, 1, 0, -1, -1 },
162 { 10, -1, 0, -1, 1 }, { 10, -1, 0, -1, 1 },
163 { 10, -1, -1, 0, -1 }, { 10, -1, -1, 0, -1 },
164 { 10, -1, 0, 1, 1 }, { 10, -1, 0, 1, 1 },
165 { 10, 1, 0, 1, 1 }, { 10, 1, 0, 1, 1 },
166 /* 11 bit */
167 { 11, 1, -1, 1, -1 },
168 { 11, -1, 1, -1, 1 },
169 { 11, -1, 1, 1, -1 },
170 { 11, 1, -1, -1, 1 },
171 { 11, 1, 1, 1, 1 },
172 { 11, -1, -1, 1, 1 },
173 { 11, 1, 1, -1, -1 },
174 { 11, -1, -1, 1, -1 },
175 { 11, -1, -1, -1, -1 },
176 { 11, 1, 1, -1, 1 },
177 { 11, 1, -1, 1, 1 },
178 { 11, -1, 1, 1, 1 },
179 { 11, -1, 1, -1, -1 },
180 { 11, -1, -1, -1, 1 },
181 { 11, 1, -1, -1, -1 },
182 { 11, 1, 1, 1, -1 }
183};
diff --git a/apps/codecs/libfaad/codebook/hcb_10.h b/apps/codecs/libfaad/codebook/hcb_10.h
new file mode 100644
index 0000000000..7f1b6a4d7e
--- /dev/null
+++ b/apps/codecs/libfaad/codebook/hcb_10.h
@@ -0,0 +1,309 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28/* 2-step huffman table HCB_10 */
29
30
31/* 1st step: 6 bits
32 * 2^6 = 64 entries
33 *
34 * Used to find offset into 2nd step table and number of extra bits to get
35 */
36static hcb hcb10_1[] = {
37 /* 4 bit codewords */
38 { /* 000000 */ 0, 0 },
39 { /* */ 0, 0 },
40 { /* */ 0, 0 },
41 { /* */ 0, 0 },
42 { /* 000100 */ 1, 0 },
43 { /* */ 1, 0 },
44 { /* */ 1, 0 },
45 { /* */ 1, 0 },
46 { /* 001000 */ 2, 0 },
47 { /* */ 2, 0 },
48 { /* */ 2, 0 },
49 { /* */ 2, 0 },
50 /* 5 bit codewords */
51 { /* 001100 */ 3, 0 },
52 { /* */ 3, 0 },
53 { /* 001110 */ 4, 0 },
54 { /* */ 4, 0 },
55 { /* 010000 */ 5, 0 },
56 { /* */ 5, 0 },
57 { /* 010010 */ 6, 0 },
58 { /* */ 6, 0 },
59 { /* 010100 */ 7, 0 },
60 { /* */ 7, 0 },
61 { /* 010110 */ 8, 0 },
62 { /* */ 8, 0 },
63 { /* 011000 */ 9, 0 },
64 { /* */ 9, 0 },
65 { /* 011010 */ 10, 0 },
66 { /* */ 10, 0 },
67 /* 6 bit codewords */
68 { /* 011100 */ 11, 0 },
69 { /* 011101 */ 12, 0 },
70 { /* 011110 */ 13, 0 },
71 { /* 011111 */ 14, 0 },
72 { /* 100000 */ 15, 0 },
73 { /* 100001 */ 16, 0 },
74 { /* 100010 */ 17, 0 },
75 { /* 100011 */ 18, 0 },
76 { /* 100100 */ 19, 0 },
77 { /* 100101 */ 20, 0 },
78 { /* 100110 */ 21, 0 },
79 { /* 100111 */ 22, 0 },
80 { /* 101000 */ 23, 0 },
81 { /* 101001 */ 24, 0 },
82 /* 7 bit codewords */
83 { /* 101010 */ 25, 1 },
84 { /* 101011 */ 27, 1 },
85 { /* 101100 */ 29, 1 },
86 { /* 101101 */ 31, 1 },
87 { /* 101110 */ 33, 1 },
88 { /* 101111 */ 35, 1 },
89 { /* 110000 */ 37, 1 },
90 { /* 110001 */ 39, 1 },
91 /* 7/8 bit codewords */
92 { /* 110010 */ 41, 2 },
93 /* 8 bit codewords */
94 { /* 110011 */ 45, 2 },
95 { /* 110100 */ 49, 2 },
96 { /* 110101 */ 53, 2 },
97 { /* 110110 */ 57, 2 },
98 { /* 110111 */ 61, 2 },
99 /* 8/9 bit codewords */
100 { /* 111000 */ 65, 3 },
101 /* 9 bit codewords */
102 { /* 111001 */ 73, 3 },
103 { /* 111010 */ 81, 3 },
104 { /* 111011 */ 89, 3 },
105 /* 9/10 bit codewords */
106 { /* 111100 */ 97, 4 },
107 /* 10 bit codewords */
108 { /* 111101 */ 113, 4 },
109 { /* 111110 */ 129, 4 },
110 /* 10/11/12 bit codewords */
111 { /* 111111 */ 145, 6 }
112};
113
114/* 2nd step table
115 *
116 * Gives size of codeword and actual data (x,y,v,w)
117 */
118static hcb_2_pair hcb10_2[] = {
119 /* 4 bit codewords */
120 { 4, 1, 1 },
121 { 4, 1, 2 },
122 { 4, 2, 1 },
123
124 /* 5 bit codewords */
125 { 5, 2, 2 },
126 { 5, 1, 0 },
127 { 5, 0, 1 },
128 { 5, 1, 3 },
129 { 5, 3, 2 },
130 { 5, 3, 1 },
131 { 5, 2, 3 },
132 { 5, 3, 3 },
133
134 /* 6 bit codewords */
135 { 6, 2, 0 },
136 { 6, 0, 2 },
137 { 6, 2, 4 },
138 { 6, 4, 2 },
139 { 6, 1, 4 },
140 { 6, 4, 1 },
141 { 6, 0, 0 },
142 { 6, 4, 3 },
143 { 6, 3, 4 },
144 { 6, 3, 0 },
145 { 6, 0, 3 },
146 { 6, 4, 4 },
147 { 6, 2, 5 },
148 { 6, 5, 2 },
149
150 /* 7 bit codewords */
151 { 7, 1, 5 },
152 { 7, 5, 1 },
153 { 7, 5, 3 },
154 { 7, 3, 5 },
155 { 7, 5, 4 },
156 { 7, 4, 5 },
157 { 7, 6, 2 },
158 { 7, 2, 6 },
159 { 7, 6, 3 },
160 { 7, 4, 0 },
161 { 7, 6, 1 },
162 { 7, 0, 4 },
163 { 7, 1, 6 },
164 { 7, 3, 6 },
165 { 7, 5, 5 },
166 { 7, 6, 4 },
167
168 /* 7/8 bit codewords */
169 { 7, 4, 6 }, { 7, 4, 6 },
170 { 8, 6, 5 },
171 { 8, 7, 2 },
172
173 /* 8 bit codewords */
174 { 8, 3, 7 },
175 { 8, 2, 7 },
176 { 8, 5, 6 },
177 { 8, 8, 2 },
178 { 8, 7, 3 },
179 { 8, 5, 0 },
180 { 8, 7, 1 },
181 { 8, 0, 5 },
182 { 8, 8, 1 },
183 { 8, 1, 7 },
184 { 8, 8, 3 },
185 { 8, 7, 4 },
186 { 8, 4, 7 },
187 { 8, 2, 8 },
188 { 8, 6, 6 },
189 { 8, 7, 5 },
190 { 8, 1, 8 },
191 { 8, 3, 8 },
192 { 8, 8, 4 },
193 { 8, 4, 8 },
194
195 /* 8/9 bit codewords */
196 { 8, 5, 7 }, { 8, 5, 7 },
197 { 8, 8, 5 }, { 8, 8, 5 },
198 { 8, 5, 8 }, { 8, 5, 8 },
199 { 9, 7, 6 },
200 { 9, 6, 7 },
201
202 /* 9 bit codewords */
203 { 9, 9, 2 },
204 { 9, 6, 0 },
205 { 9, 6, 8 },
206 { 9, 9, 3 },
207 { 9, 3, 9 },
208 { 9, 9, 1 },
209 { 9, 2, 9 },
210 { 9, 0, 6 },
211 { 9, 8, 6 },
212 { 9, 9, 4 },
213 { 9, 4, 9 },
214 { 9, 10, 2 },
215 { 9, 1, 9 },
216 { 9, 7, 7 },
217 { 9, 8, 7 },
218 { 9, 9, 5 },
219 { 9, 7, 8 },
220 { 9, 10, 3 },
221 { 9, 5, 9 },
222 { 9, 10, 4 },
223 { 9, 2, 10 },
224 { 9, 10, 1 },
225 { 9, 3, 10 },
226 { 9, 9, 6 },
227
228 /* 9/10 bit codewords */
229 { 9, 6, 9 }, { 9, 6, 9 },
230 { 9, 8, 0 }, { 9, 8, 0 },
231 { 9, 4, 10 }, { 9, 4, 10 },
232 { 9, 7, 0 }, { 9, 7, 0 },
233 { 9, 11, 2 }, { 9, 11, 2 },
234 { 10, 7, 9 },
235 { 10, 11, 3 },
236 { 10, 10, 6 },
237 { 10, 1, 10 },
238 { 10, 11, 1 },
239 { 10, 9, 7 },
240
241 /* 10 bit codewords */
242 { 10, 0, 7 },
243 { 10, 8, 8 },
244 { 10, 10, 5 },
245 { 10, 3, 11 },
246 { 10, 5, 10 },
247 { 10, 8, 9 },
248 { 10, 11, 5 },
249 { 10, 0, 8 },
250 { 10, 11, 4 },
251 { 10, 2, 11 },
252 { 10, 7, 10 },
253 { 10, 6, 10 },
254 { 10, 10, 7 },
255 { 10, 4, 11 },
256 { 10, 1, 11 },
257 { 10, 12, 2 },
258 { 10, 9, 8 },
259 { 10, 12, 3 },
260 { 10, 11, 6 },
261 { 10, 5, 11 },
262 { 10, 12, 4 },
263 { 10, 11, 7 },
264 { 10, 12, 5 },
265 { 10, 3, 12 },
266 { 10, 6, 11 },
267 { 10, 9, 0 },
268 { 10, 10, 8 },
269 { 10, 10, 0 },
270 { 10, 12, 1 },
271 { 10, 0, 9 },
272 { 10, 4, 12 },
273 { 10, 9, 9 },
274
275 /* 10/11/12 bit codewords */
276 { 10, 12, 6 }, { 10, 12, 6 }, { 10, 12, 6 }, { 10, 12, 6 },
277 { 10, 2, 12 }, { 10, 2, 12 }, { 10, 2, 12 }, { 10, 2, 12 },
278 { 10, 8, 10 }, { 10, 8, 10 }, { 10, 8, 10 }, { 10, 8, 10 },
279 { 11, 9, 10 }, { 11, 9, 10 },
280 { 11, 1, 12 }, { 11, 1, 12 },
281 { 11, 11, 8 }, { 11, 11, 8 },
282 { 11, 12, 7 }, { 11, 12, 7 },
283 { 11, 7, 11 }, { 11, 7, 11 },
284 { 11, 5, 12 }, { 11, 5, 12 },
285 { 11, 6, 12 }, { 11, 6, 12 },
286 { 11, 10, 9 }, { 11, 10, 9 },
287 { 11, 8, 11 }, { 11, 8, 11 },
288 { 11, 12, 8 }, { 11, 12, 8 },
289 { 11, 0, 10 }, { 11, 0, 10 },
290 { 11, 7, 12 }, { 11, 7, 12 },
291 { 11, 11, 0 }, { 11, 11, 0 },
292 { 11, 10, 10 }, { 11, 10, 10 },
293 { 11, 11, 9 }, { 11, 11, 9 },
294 { 11, 11, 10 }, { 11, 11, 10 },
295 { 11, 0, 11 }, { 11, 0, 11 },
296 { 11, 11, 11 }, { 11, 11, 11 },
297 { 11, 9, 11 }, { 11, 9, 11 },
298 { 11, 10, 11 }, { 11, 10, 11 },
299 { 11, 12, 0 }, { 11, 12, 0 },
300 { 11, 8, 12 }, { 11, 8, 12 },
301 { 12, 12, 9 },
302 { 12, 10, 12 },
303 { 12, 9, 12 },
304 { 12, 11, 12 },
305 { 12, 12, 11 },
306 { 12, 0, 12 },
307 { 12, 12, 10 },
308 { 12, 12, 12 }
309};
diff --git a/apps/codecs/libfaad/codebook/hcb_11.h b/apps/codecs/libfaad/codebook/hcb_11.h
new file mode 100644
index 0000000000..c5137215f9
--- /dev/null
+++ b/apps/codecs/libfaad/codebook/hcb_11.h
@@ -0,0 +1,412 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28/* 2-step huffman table HCB_11 */
29
30
31/* 1st step: 5 bits
32 * 2^5 = 32 entries
33 *
34 * Used to find offset into 2nd step table and number of extra bits to get
35 */
36static hcb hcb11_1[] = {
37 /* 4 bits */
38 { /* 00000 */ 0, 0 },
39 { /* */ 0, 0 },
40 { /* 00010 */ 1, 0 },
41 { /* */ 1, 0 },
42
43 /* 5 bits */
44 { /* 00100 */ 2, 0 },
45 { /* 00101 */ 3, 0 },
46 { /* 00110 */ 4, 0 },
47 { /* 00111 */ 5, 0 },
48 { /* 01000 */ 6, 0 },
49 { /* 01001 */ 7, 0 },
50
51 /* 6 bits */
52 { /* 01010 */ 8, 1 },
53 { /* 01011 */ 10, 1 },
54 { /* 01100 */ 12, 1 },
55
56 /* 6/7 bits */
57 { /* 01101 */ 14, 2 },
58
59 /* 7 bits */
60 { /* 01110 */ 18, 2 },
61 { /* 01111 */ 22, 2 },
62 { /* 10000 */ 26, 2 },
63
64 /* 7/8 bits */
65 { /* 10001 */ 30, 3 },
66
67 /* 8 bits */
68 { /* 10010 */ 38, 3 },
69 { /* 10011 */ 46, 3 },
70 { /* 10100 */ 54, 3 },
71 { /* 10101 */ 62, 3 },
72 { /* 10110 */ 70, 3 },
73 { /* 10111 */ 78, 3 },
74
75 /* 8/9 bits */
76 { /* 11000 */ 86, 4 },
77
78 /* 9 bits */
79 { /* 11001 */ 102, 4 },
80 { /* 11010 */ 118, 4 },
81 { /* 11011 */ 134, 4 },
82
83 /* 9/10 bits */
84 { /* 11100 */ 150, 5 },
85
86 /* 10 bits */
87 { /* 11101 */ 182, 5 },
88 { /* 11110 */ 214, 5 },
89
90 /* 10/11/12 bits */
91 { /* 11111 */ 246, 7 }
92};
93
94/* 2nd step table
95 *
96 * Gives size of codeword and actual data (x,y,v,w)
97 */
98static hcb_2_pair hcb11_2[] = {
99 /* 4 */
100 { 4, 0, 0 },
101 { 4, 1, 1 },
102
103 /* 5 */
104 { 5, 16, 16 },
105 { 5, 1, 0 },
106 { 5, 0, 1 },
107 { 5, 2, 1 },
108 { 5, 1, 2 },
109 { 5, 2, 2 },
110
111 /* 6 */
112 { 6, 1, 3 },
113 { 6, 3, 1 },
114 { 6, 3, 2 },
115 { 6, 2, 0 },
116 { 6, 2, 3 },
117 { 6, 0, 2 },
118
119 /* 6/7 */
120 { 6, 3, 3 }, { 6, 3, 3 },
121 { 7, 4, 1 },
122 { 7, 1, 4 },
123
124 /* 7 */
125 { 7, 4, 2 },
126 { 7, 2, 4 },
127 { 7, 4, 3 },
128 { 7, 3, 4 },
129 { 7, 3, 0 },
130 { 7, 0, 3 },
131 { 7, 5, 1 },
132 { 7, 5, 2 },
133 { 7, 2, 5 },
134 { 7, 4, 4 },
135 { 7, 1, 5 },
136 { 7, 5, 3 },
137
138 /* 7/8 */
139 { 7, 3, 5 }, { 7, 3, 5 },
140 { 7, 5, 4 }, { 7, 5, 4 },
141 { 8, 4, 5 },
142 { 8, 6, 2 },
143 { 8, 2, 6 },
144 { 8, 6, 1 },
145
146 /* 8 */
147 { 8, 6, 3 },
148 { 8, 3, 6 },
149 { 8, 1, 6 },
150 { 8, 4, 16 },
151 { 8, 3, 16 },
152 { 8, 16, 5 },
153 { 8, 16, 3 },
154 { 8, 16, 4 },
155 { 8, 6, 4 },
156 { 8, 16, 6 },
157 { 8, 4, 0 },
158 { 8, 4, 6 },
159 { 8, 0, 4 },
160 { 8, 2, 16 },
161 { 8, 5, 5 },
162 { 8, 5, 16 },
163 { 8, 16, 7 },
164 { 8, 16, 2 },
165 { 8, 16, 8 },
166 { 8, 2, 7 },
167 { 8, 7, 2 },
168 { 8, 3, 7 },
169 { 8, 6, 5 },
170 { 8, 5, 6 },
171 { 8, 6, 16 },
172 { 8, 16, 10 },
173 { 8, 7, 3 },
174 { 8, 7, 1 },
175 { 8, 16, 9 },
176 { 8, 7, 16 },
177 { 8, 1, 16 },
178 { 8, 1, 7 },
179 { 8, 4, 7 },
180 { 8, 16, 11 },
181 { 8, 7, 4 },
182 { 8, 16, 12 },
183 { 8, 8, 16 },
184 { 8, 16, 1 },
185 { 8, 6, 6 },
186 { 8, 9, 16 },
187 { 8, 2, 8 },
188 { 8, 5, 7 },
189 { 8, 10, 16 },
190 { 8, 16, 13 },
191 { 8, 8, 3 },
192 { 8, 8, 2 },
193 { 8, 3, 8 },
194 { 8, 5, 0 },
195
196 /* 8/9 */
197 { 8, 16, 14 }, { 8, 16, 14 },
198 { 8, 11, 16 }, { 8, 11, 16 },
199 { 8, 7, 5 }, { 8, 7, 5 },
200 { 8, 4, 8 }, { 8, 4, 8 },
201 { 8, 6, 7 }, { 8, 6, 7 },
202 { 8, 7, 6 }, { 8, 7, 6 },
203 { 8, 0, 5 }, { 8, 0, 5 },
204 { 9, 8, 4 },
205 { 9, 16, 15 },
206
207 /* 9 */
208 { 9, 12, 16 },
209 { 9, 1, 8 },
210 { 9, 8, 1 },
211 { 9, 14, 16 },
212 { 9, 5, 8 },
213 { 9, 13, 16 },
214 { 9, 3, 9 },
215 { 9, 8, 5 },
216 { 9, 7, 7 },
217 { 9, 2, 9 },
218 { 9, 8, 6 },
219 { 9, 9, 2 },
220 { 9, 9, 3 },
221 { 9, 15, 16 },
222 { 9, 4, 9 },
223 { 9, 6, 8 },
224 { 9, 6, 0 },
225 { 9, 9, 4 },
226 { 9, 5, 9 },
227 { 9, 8, 7 },
228 { 9, 7, 8 },
229 { 9, 1, 9 },
230 { 9, 10, 3 },
231 { 9, 0, 6 },
232 { 9, 10, 2 },
233 { 9, 9, 1 },
234 { 9, 9, 5 },
235 { 9, 4, 10 },
236 { 9, 2, 10 },
237 { 9, 9, 6 },
238 { 9, 3, 10 },
239 { 9, 6, 9 },
240 { 9, 10, 4 },
241 { 9, 8, 8 },
242 { 9, 10, 5 },
243 { 9, 9, 7 },
244 { 9, 11, 3 },
245 { 9, 1, 10 },
246 { 9, 7, 0 },
247 { 9, 10, 6 },
248 { 9, 7, 9 },
249 { 9, 3, 11 },
250 { 9, 5, 10 },
251 { 9, 10, 1 },
252 { 9, 4, 11 },
253 { 9, 11, 2 },
254 { 9, 13, 2 },
255 { 9, 6, 10 },
256
257 /* 9/10 */
258 { 9, 13, 3 }, { 9, 13, 3 },
259 { 9, 2, 11 }, { 9, 2, 11 },
260 { 9, 16, 0 }, { 9, 16, 0 },
261 { 9, 5, 11 }, { 9, 5, 11 },
262 { 9, 11, 5 }, { 9, 11, 5 },
263 { 10, 11, 4 },
264 { 10, 9, 8 },
265 { 10, 7, 10 },
266 { 10, 8, 9 },
267 { 10, 0, 16 },
268 { 10, 4, 13 },
269 { 10, 0, 7 },
270 { 10, 3, 13 },
271 { 10, 11, 6 },
272 { 10, 13, 1 },
273 { 10, 13, 4 },
274 { 10, 12, 3 },
275 { 10, 2, 13 },
276 { 10, 13, 5 },
277 { 10, 8, 10 },
278 { 10, 6, 11 },
279 { 10, 10, 8 },
280 { 10, 10, 7 },
281 { 10, 14, 2 },
282 { 10, 12, 4 },
283 { 10, 1, 11 },
284 { 10, 4, 12 },
285
286 /* 10 */
287 { 10, 11, 1 },
288 { 10, 3, 12 },
289 { 10, 1, 13 },
290 { 10, 12, 2 },
291 { 10, 7, 11 },
292 { 10, 3, 14 },
293 { 10, 5, 12 },
294 { 10, 5, 13 },
295 { 10, 14, 4 },
296 { 10, 4, 14 },
297 { 10, 11, 7 },
298 { 10, 14, 3 },
299 { 10, 12, 5 },
300 { 10, 13, 6 },
301 { 10, 12, 6 },
302 { 10, 8, 0 },
303 { 10, 11, 8 },
304 { 10, 2, 12 },
305 { 10, 9, 9 },
306 { 10, 14, 5 },
307 { 10, 6, 13 },
308 { 10, 10, 10 },
309 { 10, 15, 2 },
310 { 10, 8, 11 },
311 { 10, 9, 10 },
312 { 10, 14, 6 },
313 { 10, 10, 9 },
314 { 10, 5, 14 },
315 { 10, 11, 9 },
316 { 10, 14, 1 },
317 { 10, 2, 14 },
318 { 10, 6, 12 },
319 { 10, 1, 12 },
320 { 10, 13, 8 },
321 { 10, 0, 8 },
322 { 10, 13, 7 },
323 { 10, 7, 12 },
324 { 10, 12, 7 },
325 { 10, 7, 13 },
326 { 10, 15, 3 },
327 { 10, 12, 1 },
328 { 10, 6, 14 },
329 { 10, 2, 15 },
330 { 10, 15, 5 },
331 { 10, 15, 4 },
332 { 10, 1, 14 },
333 { 10, 9, 11 },
334 { 10, 4, 15 },
335 { 10, 14, 7 },
336 { 10, 8, 13 },
337 { 10, 13, 9 },
338 { 10, 8, 12 },
339 { 10, 5, 15 },
340 { 10, 3, 15 },
341 { 10, 10, 11 },
342 { 10, 11, 10 },
343 { 10, 12, 8 },
344 { 10, 15, 6 },
345 { 10, 15, 7 },
346 { 10, 8, 14 },
347 { 10, 15, 1 },
348 { 10, 7, 14 },
349 { 10, 9, 0 },
350 { 10, 0, 9 },
351
352 /* 10/11/12 */
353 { 10, 9, 13 }, { 10, 9, 13 }, { 10, 9, 13 }, { 10, 9, 13 },
354 { 10, 9, 12 }, { 10, 9, 12 }, { 10, 9, 12 }, { 10, 9, 12 },
355 { 10, 12, 9 }, { 10, 12, 9 }, { 10, 12, 9 }, { 10, 12, 9 },
356 { 10, 14, 8 }, { 10, 14, 8 }, { 10, 14, 8 }, { 10, 14, 8 },
357 { 10, 10, 13 }, { 10, 10, 13 }, { 10, 10, 13 }, { 10, 10, 13 },
358 { 10, 14, 9 }, { 10, 14, 9 }, { 10, 14, 9 }, { 10, 14, 9 },
359 { 10, 12, 10 }, { 10, 12, 10 }, { 10, 12, 10 }, { 10, 12, 10 },
360 { 10, 6, 15 }, { 10, 6, 15 }, { 10, 6, 15 }, { 10, 6, 15 },
361 { 10, 7, 15 }, { 10, 7, 15 }, { 10, 7, 15 }, { 10, 7, 15 },
362
363 { 11, 9, 14 }, { 11, 9, 14 },
364 { 11, 15, 8 }, { 11, 15, 8 },
365 { 11, 11, 11 }, { 11, 11, 11 },
366 { 11, 11, 14 }, { 11, 11, 14 },
367 { 11, 1, 15 }, { 11, 1, 15 },
368 { 11, 10, 12 }, { 11, 10, 12 },
369 { 11, 10, 14 }, { 11, 10, 14 },
370 { 11, 13, 11 }, { 11, 13, 11 },
371 { 11, 13, 10 }, { 11, 13, 10 },
372 { 11, 11, 13 }, { 11, 11, 13 },
373 { 11, 11, 12 }, { 11, 11, 12 },
374 { 11, 8, 15 }, { 11, 8, 15 },
375 { 11, 14, 11 }, { 11, 14, 11 },
376 { 11, 13, 12 }, { 11, 13, 12 },
377 { 11, 12, 13 }, { 11, 12, 13 },
378 { 11, 15, 9 }, { 11, 15, 9 },
379 { 11, 14, 10 }, { 11, 14, 10 },
380 { 11, 10, 0 }, { 11, 10, 0 },
381 { 11, 12, 11 }, { 11, 12, 11 },
382 { 11, 9, 15 }, { 11, 9, 15 },
383 { 11, 0, 10 }, { 11, 0, 10 },
384 { 11, 12, 12 }, { 11, 12, 12 },
385 { 11, 11, 0 }, { 11, 11, 0 },
386 { 11, 12, 14 }, { 11, 12, 14 },
387 { 11, 10, 15 }, { 11, 10, 15 },
388 { 11, 13, 13 }, { 11, 13, 13 },
389 { 11, 0, 13 }, { 11, 0, 13 },
390 { 11, 14, 12 }, { 11, 14, 12 },
391 { 11, 15, 10 }, { 11, 15, 10 },
392 { 11, 15, 11 }, { 11, 15, 11 },
393 { 11, 11, 15 }, { 11, 11, 15 },
394 { 11, 14, 13 }, { 11, 14, 13 },
395 { 11, 13, 0 }, { 11, 13, 0 },
396 { 11, 0, 11 }, { 11, 0, 11 },
397 { 11, 13, 14 }, { 11, 13, 14 },
398 { 11, 15, 12 }, { 11, 15, 12 },
399 { 11, 15, 13 }, { 11, 15, 13 },
400 { 11, 12, 15 }, { 11, 12, 15 },
401 { 11, 14, 0 }, { 11, 14, 0 },
402 { 11, 14, 14 }, { 11, 14, 14 },
403 { 11, 13, 15 }, { 11, 13, 15 },
404 { 11, 12, 0 }, { 11, 12, 0 },
405 { 11, 14, 15 }, { 11, 14, 15 },
406 { 12, 0, 14 },
407 { 12, 0, 12 },
408 { 12, 15, 14 },
409 { 12, 15, 0 },
410 { 12, 0, 15 },
411 { 12, 15, 15 }
412};
diff --git a/apps/codecs/libfaad/codebook/hcb_2.h b/apps/codecs/libfaad/codebook/hcb_2.h
new file mode 100644
index 0000000000..bcc8857c15
--- /dev/null
+++ b/apps/codecs/libfaad/codebook/hcb_2.h
@@ -0,0 +1,182 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28/* 2-step huffman table HCB_2 */
29
30
31/* 1st step: 5 bits
32 * 2^5 = 32 entries
33 *
34 * Used to find offset into 2nd step table and number of extra bits to get
35 */
36static hcb hcb2_1[] = {
37 { /* 00000 */ 0, 0 },
38 { /* */ 0, 0 },
39 { /* */ 0, 0 },
40 { /* */ 0, 0 },
41 { /* 00100 */ 1, 0 },
42 { /* */ 1, 0 },
43 { /* 00110 */ 2, 0 },
44 { /* 00111 */ 3, 0 },
45 { /* 01000 */ 4, 0 },
46 { /* 01001 */ 5, 0 },
47 { /* 01010 */ 6, 0 },
48 { /* 01011 */ 7, 0 },
49 { /* 01100 */ 8, 0 },
50
51 /* 6 bit codewords */
52 { /* 01101 */ 9, 1 },
53 { /* 01110 */ 11, 1 },
54 { /* 01111 */ 13, 1 },
55 { /* 10000 */ 15, 1 },
56 { /* 10001 */ 17, 1 },
57 { /* 10010 */ 19, 1 },
58 { /* 10011 */ 21, 1 },
59 { /* 10100 */ 23, 1 },
60 { /* 10101 */ 25, 1 },
61 { /* 10110 */ 27, 1 },
62 { /* 10111 */ 29, 1 },
63 { /* 11000 */ 31, 1 },
64
65 /* 7 bit codewords */
66 { /* 11001 */ 33, 2 },
67 { /* 11010 */ 37, 2 },
68 { /* 11011 */ 41, 2 },
69
70 /* 7/8 bit codewords */
71 { /* 11100 */ 45, 3 },
72
73 /* 8 bit codewords */
74 { /* 11101 */ 53, 3 },
75 { /* 11110 */ 61, 3 },
76
77 /* 8/9 bit codewords */
78 { /* 11111 */ 69, 4 }
79};
80
81/* 2nd step table
82 *
83 * Gives size of codeword and actual data (x,y,v,w)
84 */
85static hcb_2_quad hcb2_2[] = {
86 /* 3 bit codeword */
87 { 3, 0, 0, 0, 0 },
88
89 /* 4 bit codeword */
90 { 4, 1, 0, 0, 0 },
91
92 /* 5 bit codewords */
93 { 5, -1, 0, 0, 0 },
94 { 5, 0, 0, 0, 1 },
95 { 5, 0, 0, -1, 0 },
96 { 5, 0, 0, 0, -1 },
97 { 5, 0, -1, 0, 0 },
98 { 5, 0, 0, 1, 0 },
99 { 5, 0, 1, 0, 0 },
100
101 /* 6 bit codewords */
102 { 6, 0, -1, 1, 0 },
103 { 6, -1, 1, 0, 0 },
104 { 6, 0, 1, -1, 0 },
105 { 6, 0, 0, 1, -1 },
106 { 6, 0, 1, 0, -1 },
107 { 6, 0, 0, -1, 1 },
108 { 6, -1, 0, 0, -1 },
109 { 6, 1, -1, 0, 0 },
110 { 6, 1, 0, -1, 0 },
111 { 6, -1, -1, 0, 0 },
112 { 6, 0, 0, -1, -1 },
113 { 6, 1, 0, 1, 0 },
114 { 6, 1, 0, 0, 1 },
115 { 6, 0, -1, 0, 1 },
116 { 6, -1, 0, 1, 0 },
117 { 6, 0, 1, 0, 1 },
118 { 6, 0, -1, -1, 0 },
119 { 6, -1, 0, 0, 1 },
120 { 6, 0, -1, 0, -1 },
121 { 6, -1, 0, -1, 0 },
122 { 6, 1, 1, 0, 0 },
123 { 6, 0, 1, 1, 0 },
124 { 6, 0, 0, 1, 1 },
125 { 6, 1, 0, 0, -1 },
126
127 /* 7 bit codewords */
128 { 7, 0, 1, -1, 1 },
129 { 7, 1, 0, -1, 1 },
130 { 7, -1, 1, -1, 0 },
131 { 7, 0, -1, 1, -1 },
132 { 7, 1, -1, 1, 0 },
133 { 7, 1, 1, 0, -1 },
134 { 7, 1, 0, 1, 1 },
135 { 7, -1, 1, 1, 0 },
136 { 7, 0, -1, -1, 1 },
137 { 7, 1, 1, 1, 0 },
138 { 7, -1, 0, 1, -1 },
139 { 7, -1, -1, -1, 0 },
140
141 /* 7/8 bit codewords */
142 { 7, -1, 0, -1, 1 }, { 7, -1, 0, -1, 1 },
143 { 7, 1, -1, -1, 0 }, { 7, 1, -1, -1, 0 },
144 { 7, 1, 1, -1, 0 }, { 7, 1, 1, -1, 0 },
145 { 8, 1, -1, 0, 1 },
146 { 8, -1, 1, 0, -1 },
147
148 /* 8 bit codewords */
149 { 8, -1, -1, 1, 0 },
150 { 8, -1, 0, 1, 1 },
151 { 8, -1, -1, 0, 1 },
152 { 8, -1, -1, 0, -1 },
153 { 8, 0, -1, -1, -1 },
154 { 8, 1, 0, 1, -1 },
155 { 8, 1, 0, -1, -1 },
156 { 8, 0, 1, -1, -1 },
157 { 8, 0, 1, 1, 1 },
158 { 8, -1, 1, 0, 1 },
159 { 8, -1, 0, -1, -1 },
160 { 8, 0, 1, 1, -1 },
161 { 8, 1, -1, 0, -1 },
162 { 8, 0, -1, 1, 1 },
163 { 8, 1, 1, 0, 1 },
164 { 8, 1, -1, 1, -1 },
165
166 /* 8/9 bit codewords */
167 { 8, -1, 1, -1, 1 }, { 8, -1, 1, -1, 1 },
168 { 9, 1, -1, -1, 1 },
169 { 9, -1, -1, -1, -1 },
170 { 9, -1, 1, 1, -1 },
171 { 9, -1, 1, 1, 1 },
172 { 9, 1, 1, 1, 1 },
173 { 9, -1, -1, 1, -1 },
174 { 9, 1, -1, 1, 1 },
175 { 9, -1, 1, -1, -1 },
176 { 9, -1, -1, 1, 1 },
177 { 9, 1, 1, -1, -1 },
178 { 9, 1, -1, -1, -1 },
179 { 9, -1, -1, -1, 1 },
180 { 9, 1, 1, -1, 1 },
181 { 9, 1, 1, 1, -1 }
182};
diff --git a/apps/codecs/libfaad/codebook/hcb_3.h b/apps/codecs/libfaad/codebook/hcb_3.h
new file mode 100644
index 0000000000..2672de0a47
--- /dev/null
+++ b/apps/codecs/libfaad/codebook/hcb_3.h
@@ -0,0 +1,193 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28/* Binary search huffman table HCB_3 */
29
30
31static hcb_bin_quad hcb3[] = {
32 { /* 0 */ 0, { 1, 2, 0, 0 } },
33 { /* 1 */ 1, { 0, 0, 0, 0 } }, /* 0 */
34 { /* 2 */ 0, { 1, 2, 0, 0 } },
35 { /* 3 */ 0, { 2, 3, 0, 0 } },
36 { /* 4 */ 0, { 3, 4, 0, 0 } },
37 { /* 5 */ 0, { 4, 5, 0, 0 } },
38 { /* 6 */ 0, { 5, 6, 0, 0 } },
39 { /* 7 */ 0, { 6, 7, 0, 0 } },
40 { /* 8 */ 0, { 7, 8, 0, 0 } },
41 { /* 9 */ 1, { 1, 0, 0, 0 } }, /* 1000 */
42 { /* 10 */ 1, { 0, 0, 0, 1 } }, /* 1001 */
43 { /* 11 */ 1, { 0, 1, 0, 0 } }, /* 1010 */
44 { /* 12 */ 1, { 0, 0, 1, 0 } }, /* 1011 */
45 { /* 13 */ 0, { 4, 5, 0, 0 } },
46 { /* 14 */ 0, { 5, 6, 0, 0 } },
47 { /* 15 */ 0, { 6, 7, 0, 0 } },
48 { /* 16 */ 0, { 7, 8, 0, 0 } },
49 { /* 17 */ 1, { 1, 1, 0, 0 } },
50 { /* 18 */ 1, { 0, 0, 1, 1 } },
51 { /* 19 */ 0, { 6, 7, 0, 0 } },
52 { /* 20 */ 0, { 7, 8, 0, 0 } },
53 { /* 21 */ 0, { 8, 9, 0, 0 } },
54 { /* 22 */ 0, { 9, 10, 0, 0 } },
55 { /* 23 */ 0, { 10, 11, 0, 0 } },
56 { /* 24 */ 0, { 11, 12, 0, 0 } },
57 { /* 25 */ 1, { 0, 1, 1, 0 } }, /* 110100 */
58 { /* 26 */ 1, { 0, 1, 0, 1 } }, /* 110101 */
59 { /* 27 */ 1, { 1, 0, 1, 0 } }, /* 110110 */
60 { /* 28 */ 1, { 0, 1, 1, 1 } }, /* 110111 */
61 { /* 29 */ 1, { 1, 0, 0, 1 } }, /* 111000 */
62 { /* 30 */ 1, { 1, 1, 1, 0 } }, /* 111001 */
63 { /* 31 */ 0, { 6, 7, 0, 0 } },
64 { /* 32 */ 0, { 7, 8, 0, 0 } },
65 { /* 33 */ 0, { 8, 9, 0, 0 } },
66 { /* 34 */ 0, { 9, 10, 0, 0 } },
67 { /* 35 */ 0, { 10, 11, 0, 0 } },
68 { /* 36 */ 0, { 11, 12, 0, 0 } },
69 { /* 37 */ 1, { 1, 1, 1, 1 } }, /* 1110100 */
70 { /* 38 */ 1, { 1, 0, 1, 1 } }, /* 1110101 */
71 { /* 39 */ 1, { 1, 1, 0, 1 } }, /* 1110110 */
72 { /* 40 */ 0, { 9, 10, 0, 0 } },
73 { /* 41 */ 0, { 10, 11, 0, 0 } },
74 { /* 42 */ 0, { 11, 12, 0, 0 } },
75 { /* 43 */ 0, { 12, 13, 0, 0 } },
76 { /* 44 */ 0, { 13, 14, 0, 0 } },
77 { /* 45 */ 0, { 14, 15, 0, 0 } },
78 { /* 46 */ 0, { 15, 16, 0, 0 } },
79 { /* 47 */ 0, { 16, 17, 0, 0 } },
80 { /* 48 */ 0, { 17, 18, 0, 0 } },
81 { /* 49 */ 1, { 2, 0, 0, 0 } }, /* 11101110 */
82 { /* 50 */ 1, { 0, 0, 0, 2 } }, /* 11101111 */
83 { /* 51 */ 1, { 0, 0, 1, 2 } }, /* 11110000 */
84 { /* 52 */ 1, { 2, 1, 0, 0 } }, /* 11110001 */
85 { /* 53 */ 1, { 1, 2, 1, 0 } }, /* 11110010 */
86 { /* 54 */ 0, { 13, 14, 0, 0 } },
87 { /* 55 */ 0, { 14, 15, 0, 0 } },
88 { /* 56 */ 0, { 15, 16, 0, 0 } },
89 { /* 57 */ 0, { 16, 17, 0, 0 } },
90 { /* 58 */ 0, { 17, 18, 0, 0 } },
91 { /* 59 */ 0, { 18, 19, 0, 0 } },
92 { /* 60 */ 0, { 19, 20, 0, 0 } },
93 { /* 61 */ 0, { 20, 21, 0, 0 } },
94 { /* 62 */ 0, { 21, 22, 0, 0 } },
95 { /* 63 */ 0, { 22, 23, 0, 0 } },
96 { /* 64 */ 0, { 23, 24, 0, 0 } },
97 { /* 65 */ 0, { 24, 25, 0, 0 } },
98 { /* 66 */ 0, { 25, 26, 0, 0 } },
99 { /* 67 */ 1, { 0, 0, 2, 1 } },
100 { /* 68 */ 1, { 0, 1, 2, 1 } },
101 { /* 69 */ 1, { 1, 2, 0, 0 } },
102 { /* 70 */ 1, { 0, 1, 1, 2 } },
103 { /* 71 */ 1, { 2, 1, 1, 0 } },
104 { /* 72 */ 1, { 0, 0, 2, 0 } },
105 { /* 73 */ 1, { 0, 2, 1, 0 } },
106 { /* 74 */ 1, { 0, 1, 2, 0 } },
107 { /* 75 */ 1, { 0, 2, 0, 0 } },
108 { /* 76 */ 1, { 0, 1, 0, 2 } },
109 { /* 77 */ 1, { 2, 0, 1, 0 } },
110 { /* 78 */ 1, { 1, 2, 1, 1 } },
111 { /* 79 */ 1, { 0, 2, 1, 1 } },
112 { /* 80 */ 1, { 1, 1, 2, 0 } },
113 { /* 81 */ 1, { 1, 1, 2, 1 } },
114 { /* 82 */ 0, { 11, 12, 0, 0 } },
115 { /* 83 */ 0, { 12, 13, 0, 0 } },
116 { /* 84 */ 0, { 13, 14, 0, 0 } },
117 { /* 85 */ 0, { 14, 15, 0, 0 } },
118 { /* 86 */ 0, { 15, 16, 0, 0 } },
119 { /* 87 */ 0, { 16, 17, 0, 0 } },
120 { /* 88 */ 0, { 17, 18, 0, 0 } },
121 { /* 89 */ 0, { 18, 19, 0, 0 } },
122 { /* 90 */ 0, { 19, 20, 0, 0 } },
123 { /* 91 */ 0, { 20, 21, 0, 0 } },
124 { /* 92 */ 0, { 21, 22, 0, 0 } },
125 { /* 93 */ 1, { 1, 2, 0, 1 } }, /* 1111101010 */
126 { /* 94 */ 1, { 1, 0, 2, 0 } }, /* 1111101011 */
127 { /* 95 */ 1, { 1, 0, 2, 1 } }, /* 1111101100 */
128 { /* 96 */ 1, { 0, 2, 0, 1 } }, /* 1111101101 */
129 { /* 97 */ 1, { 2, 1, 1, 1 } }, /* 1111101110 */
130 { /* 98 */ 1, { 1, 1, 1, 2 } }, /* 1111101111 */
131 { /* 99 */ 1, { 2, 1, 0, 1 } }, /* 1111110000 */
132 { /* 00 */ 1, { 1, 0, 1, 2 } }, /* 1111110001 */
133 { /* 01 */ 1, { 0, 0, 2, 2 } }, /* 1111110010 */
134 { /* 02 */ 1, { 0, 1, 2, 2 } }, /* 1111110011 */
135 { /* 03 */ 1, { 2, 2, 1, 0 } }, /* 1111110100 */
136 { /* 04 */ 1, { 1, 2, 2, 0 } }, /* 1111110101 */
137 { /* 05 */ 1, { 1, 0, 0, 2 } }, /* 1111110110 */
138 { /* 06 */ 1, { 2, 0, 0, 1 } }, /* 1111110111 */
139 { /* 07 */ 1, { 0, 2, 2, 1 } }, /* 1111111000 */
140 { /* 08 */ 0, { 7, 8, 0, 0 } },
141 { /* 09 */ 0, { 8, 9, 0, 0 } },
142 { /* 10 */ 0, { 9, 10, 0, 0 } },
143 { /* 11 */ 0, { 10, 11, 0, 0 } },
144 { /* 12 */ 0, { 11, 12, 0, 0 } },
145 { /* 13 */ 0, { 12, 13, 0, 0 } },
146 { /* 14 */ 0, { 13, 14, 0, 0 } },
147 { /* 15 */ 1, { 2, 2, 0, 0 } }, /* 11111110010 */
148 { /* 16 */ 1, { 1, 2, 2, 1 } }, /* 11111110011 */
149 { /* 17 */ 1, { 1, 1, 0, 2 } }, /* 11111110100 */
150 { /* 18 */ 1, { 2, 0, 1, 1 } }, /* 11111110101 */
151 { /* 19 */ 1, { 1, 1, 2, 2 } }, /* 11111110110 */
152 { /* 20 */ 1, { 2, 2, 1, 1 } }, /* 11111110111 */
153 { /* 21 */ 1, { 0, 2, 2, 0 } }, /* 11111111000 */
154 { /* 22 */ 1, { 0, 2, 1, 2 } }, /* 11111111001 */
155 { /* 23 */ 0, { 6, 7, 0, 0 } },
156 { /* 24 */ 0, { 7, 8, 0, 0 } },
157 { /* 25 */ 0, { 8, 9, 0, 0 } },
158 { /* 26 */ 0, { 9, 10, 0, 0 } },
159 { /* 27 */ 0, { 10, 11, 0, 0 } },
160 { /* 28 */ 0, { 11, 12, 0, 0 } },
161 { /* 29 */ 1, { 1, 0, 2, 2 } }, /* 111111110100 */
162 { /* 30 */ 1, { 2, 2, 0, 1 } }, /* 111111110101 */
163 { /* 31 */ 1, { 2, 1, 2, 0 } }, /* 111111110110 */
164 { /* 32 */ 1, { 2, 2, 2, 0 } }, /* 111111110111 */
165 { /* 33 */ 1, { 0, 2, 2, 2 } }, /* 111111111000 */
166 { /* 34 */ 1, { 2, 2, 2, 1 } }, /* 111111111001 */
167 { /* 35 */ 1, { 2, 1, 2, 1 } }, /* 111111111010 */
168 { /* 36 */ 1, { 1, 2, 1, 2 } }, /* 111111111011 */
169 { /* 37 */ 1, { 1, 2, 2, 2 } }, /* 111111111100 */
170 { /* 38 */ 0, { 3, 4, 0, 0 } },
171 { /* 39 */ 0, { 4, 5, 0, 0 } },
172 { /* 40 */ 0, { 5, 6, 0, 0 } },
173 { /* 41 */ 1, { 0, 2, 0, 2 } }, /* 1111111111010 */
174 { /* 42 */ 1, { 2, 0, 2, 0 } }, /* 1111111111011 */
175 { /* 43 */ 1, { 1, 2, 0, 2 } }, /* 1111111111100 */
176 { /* 44 */ 0, { 3, 4, 0, 0 } },
177 { /* 45 */ 0, { 4, 5, 0, 0 } },
178 { /* 46 */ 0, { 5, 6, 0, 0 } },
179 { /* 47 */ 1, { 2, 0, 2, 1 } }, /* 11111111111010 */
180 { /* 48 */ 1, { 2, 1, 1, 2 } }, /* 11111111111011 */
181 { /* 49 */ 1, { 2, 1, 0, 2 } }, /* 11111111111100 */
182 { /* 50 */ 0, { 3, 4, 0, 0 } },
183 { /* 51 */ 0, { 4, 5, 0, 0 } },
184 { /* 52 */ 0, { 5, 6, 0, 0 } },
185 { /* 53 */ 1, { 2, 2, 2, 2 } }, /* 111111111111010 */
186 { /* 54 */ 1, { 2, 2, 1, 2 } }, /* 111111111111011 */
187 { /* 55 */ 1, { 2, 1, 2, 2 } }, /* 111111111111100 */
188 { /* 56 */ 1, { 2, 0, 1, 2 } }, /* 111111111111101 */
189 { /* 57 */ 1, { 2, 0, 0, 2 } }, /* 111111111111110 */
190 { /* 58 */ 0, { 1, 2, 0, 0 } },
191 { /* 59 */ 1, { 2, 2, 0, 2 } }, /* 1111111111111110 */
192 { /* 60 */ 1, { 2, 0, 2, 2 } } /* 1111111111111111 */
193};
diff --git a/apps/codecs/libfaad/codebook/hcb_4.h b/apps/codecs/libfaad/codebook/hcb_4.h
new file mode 100644
index 0000000000..1dc90404f6
--- /dev/null
+++ b/apps/codecs/libfaad/codebook/hcb_4.h
@@ -0,0 +1,196 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28/* 2-step huffman table HCB_4 */
29
30
31/* 1st step: 5 bits
32 * 2^5 = 32 entries
33 *
34 * Used to find offset into 2nd step table and number of extra bits to get
35 */
36static hcb hcb4_1[] = {
37 /* 4 bit codewords */
38 { /* 00000 */ 0, 0 },
39 { /* */ 0, 0 },
40 { /* 00010 */ 1, 0 },
41 { /* */ 1, 0 },
42 { /* 00100 */ 2, 0 },
43 { /* */ 2, 0 },
44 { /* 00110 */ 3, 0 },
45 { /* */ 3, 0 },
46 { /* 01000 */ 4, 0 },
47 { /* */ 4, 0 },
48 { /* 01010 */ 5, 0 },
49 { /* */ 5, 0 },
50 { /* 01100 */ 6, 0 },
51 { /* */ 6, 0 },
52 { /* 01110 */ 7, 0 },
53 { /* */ 7, 0 },
54 { /* 10000 */ 8, 0 },
55 { /* */ 8, 0 },
56 { /* 10010 */ 9, 0 },
57 { /* */ 9, 0 },
58
59 /* 5 bit codewords */
60 { /* 10100 */ 10, 0 },
61 { /* 10101 */ 11, 0 },
62 { /* 10110 */ 12, 0 },
63 { /* 10111 */ 13, 0 },
64 { /* 11000 */ 14, 0 },
65 { /* 11001 */ 15, 0 },
66
67 /* 7 bit codewords */
68 { /* 11010 */ 16, 2 },
69 { /* 11011 */ 20, 2 },
70
71 /* 7/8 bit codewords */
72 { /* 11100 */ 24, 3 },
73
74 /* 8 bit codewords */
75 { /* 11101 */ 32, 3 },
76
77 /* 8/9 bit codewords */
78 { /* 11110 */ 40, 4 },
79
80 /* 9/10/11/12 bit codewords */
81 { /* 11111 */ 56, 7 }
82};
83
84/* 2nd step table
85 *
86 * Gives size of codeword and actual data (x,y,v,w)
87 */
88static hcb_2_quad hcb4_2[] = {
89 /* 4 bit codewords */
90 { 4, 1, 1, 1, 1 },
91 { 4, 0, 1, 1, 1 },
92 { 4, 1, 1, 0, 1 },
93 { 4, 1, 1, 1, 0 },
94 { 4, 1, 0, 1, 1 },
95 { 4, 1, 0, 0, 0 },
96 { 4, 1, 1, 0, 0 },
97 { 4, 0, 0, 0, 0 },
98 { 4, 0, 0, 1, 1 },
99 { 4, 1, 0, 1, 0 },
100
101 /* 5 bit codewords */
102 { 5, 1, 0, 0, 1 },
103 { 5, 0, 1, 1, 0 },
104 { 5, 0, 0, 0, 1 },
105 { 5, 0, 1, 0, 1 },
106 { 5, 0, 0, 1, 0 },
107 { 5, 0, 1, 0, 0 },
108
109 /* 7 bit codewords */
110 /* first 5 bits: 11010 */
111 { 7, 2, 1, 1, 1 },
112 { 7, 1, 1, 2, 1 },
113 { 7, 1, 2, 1, 1 },
114 { 7, 1, 1, 1, 2 },
115 /* first 5 bits: 11011 */
116 { 7, 2, 1, 1, 0 },
117 { 7, 2, 1, 0, 1 },
118 { 7, 1, 2, 1, 0 },
119 { 7, 2, 0, 1, 1 },
120
121 /* 7/8 bit codewords */
122 /* first 5 bits: 11100 */
123 { 7, 0, 1, 2, 1 }, { 7, 0, 1, 2, 1 },
124 { 8, 0, 1, 1, 2 },
125 { 8, 1, 1, 2, 0 },
126 { 8, 0, 2, 1, 1 },
127 { 8, 1, 0, 1, 2 },
128 { 8, 1, 2, 0, 1 },
129 { 8, 1, 1, 0, 2 },
130
131 /* 8 bit codewords */
132 { 8, 1, 0, 2, 1 },
133 { 8, 2, 1, 0, 0 },
134 { 8, 2, 0, 1, 0 },
135 { 8, 1, 2, 0, 0 },
136 { 8, 2, 0, 0, 1 },
137 { 8, 0, 1, 0, 2 },
138 { 8, 0, 2, 1, 0 },
139 { 8, 0, 0, 1, 2 },
140
141 /* 8/9 bit codewords */
142 { 8, 0, 1, 2, 0 }, { 8, 0, 1, 2, 0 },
143 { 8, 0, 2, 0, 1 }, { 8, 0, 2, 0, 1 },
144 { 8, 1, 0, 0, 2 }, { 8, 1, 0, 0, 2 },
145 { 8, 0, 0, 2, 1 }, { 8, 0, 0, 2, 1 },
146 { 8, 1, 0, 2, 0 }, { 8, 1, 0, 2, 0 },
147 { 8, 2, 0, 0, 0 }, { 8, 2, 0, 0, 0 },
148 { 8, 0, 0, 0, 2 }, { 8, 0, 0, 0, 2 },
149 { 9, 0, 2, 0, 0 },
150 { 9, 0, 0, 2, 0 },
151
152 /* 9/10/11 bit codewords */
153 /* 9 bit codewords repeated 2^3 = 8 times */
154 { 9, 1, 2, 2, 1 }, { 9, 1, 2, 2, 1 }, { 9, 1, 2, 2, 1 }, { 9, 1, 2, 2, 1 },
155 { 9, 1, 2, 2, 1 }, { 9, 1, 2, 2, 1 }, { 9, 1, 2, 2, 1 }, { 9, 1, 2, 2, 1 },
156 { 9, 2, 2, 1, 1 }, { 9, 2, 2, 1, 1 }, { 9, 2, 2, 1, 1 }, { 9, 2, 2, 1, 1 },
157 { 9, 2, 2, 1, 1 }, { 9, 2, 2, 1, 1 }, { 9, 2, 2, 1, 1 }, { 9, 2, 2, 1, 1 },
158 { 9, 2, 1, 2, 1 }, { 9, 2, 1, 2, 1 }, { 9, 2, 1, 2, 1 }, { 9, 2, 1, 2, 1 },
159 { 9, 2, 1, 2, 1 }, { 9, 2, 1, 2, 1 }, { 9, 2, 1, 2, 1 }, { 9, 2, 1, 2, 1 },
160 { 9, 1, 1, 2, 2 }, { 9, 1, 1, 2, 2 }, { 9, 1, 1, 2, 2 }, { 9, 1, 1, 2, 2 },
161 { 9, 1, 1, 2, 2 }, { 9, 1, 1, 2, 2 }, { 9, 1, 1, 2, 2 }, { 9, 1, 1, 2, 2 },
162 { 9, 1, 2, 1, 2 }, { 9, 1, 2, 1, 2 }, { 9, 1, 2, 1, 2 }, { 9, 1, 2, 1, 2 },
163 { 9, 1, 2, 1, 2 }, { 9, 1, 2, 1, 2 }, { 9, 1, 2, 1, 2 }, { 9, 1, 2, 1, 2 },
164 { 9, 2, 1, 1, 2 }, { 9, 2, 1, 1, 2 }, { 9, 2, 1, 1, 2 }, { 9, 2, 1, 1, 2 },
165 { 9, 2, 1, 1, 2 }, { 9, 2, 1, 1, 2 }, { 9, 2, 1, 1, 2 }, { 9, 2, 1, 1, 2 },
166 /* 10 bit codewords repeated 2^2 = 4 times */
167 { 10, 1, 2, 2, 0 }, { 10, 1, 2, 2, 0 }, { 10, 1, 2, 2, 0 }, { 10, 1, 2, 2, 0 },
168 { 10, 2, 2, 1, 0 }, { 10, 2, 2, 1, 0 }, { 10, 2, 2, 1, 0 }, { 10, 2, 2, 1, 0 },
169 { 10, 2, 1, 2, 0 }, { 10, 2, 1, 2, 0 }, { 10, 2, 1, 2, 0 }, { 10, 2, 1, 2, 0 },
170 { 10, 0, 2, 2, 1 }, { 10, 0, 2, 2, 1 }, { 10, 0, 2, 2, 1 }, { 10, 0, 2, 2, 1 },
171 { 10, 0, 1, 2, 2 }, { 10, 0, 1, 2, 2 }, { 10, 0, 1, 2, 2 }, { 10, 0, 1, 2, 2 },
172 { 10, 2, 2, 0, 1 }, { 10, 2, 2, 0, 1 }, { 10, 2, 2, 0, 1 }, { 10, 2, 2, 0, 1 },
173 { 10, 0, 2, 1, 2 }, { 10, 0, 2, 1, 2 }, { 10, 0, 2, 1, 2 }, { 10, 0, 2, 1, 2 },
174 { 10, 2, 0, 2, 1 }, { 10, 2, 0, 2, 1 }, { 10, 2, 0, 2, 1 }, { 10, 2, 0, 2, 1 },
175 { 10, 1, 0, 2, 2 }, { 10, 1, 0, 2, 2 }, { 10, 1, 0, 2, 2 }, { 10, 1, 0, 2, 2 },
176 { 10, 2, 2, 2, 1 }, { 10, 2, 2, 2, 1 }, { 10, 2, 2, 2, 1 }, { 10, 2, 2, 2, 1 },
177 { 10, 1, 2, 0, 2 }, { 10, 1, 2, 0, 2 }, { 10, 1, 2, 0, 2 }, { 10, 1, 2, 0, 2 },
178 { 10, 2, 0, 1, 2 }, { 10, 2, 0, 1, 2 }, { 10, 2, 0, 1, 2 }, { 10, 2, 0, 1, 2 },
179 { 10, 2, 1, 0, 2 }, { 10, 2, 1, 0, 2 }, { 10, 2, 1, 0, 2 }, { 10, 2, 1, 0, 2 },
180 { 10, 1, 2, 2, 2 }, { 10, 1, 2, 2, 2 }, { 10, 1, 2, 2, 2 }, { 10, 1, 2, 2, 2 },
181 /* 11 bit codewords repeated 2^1 = 2 times */
182 { 11, 2, 1, 2, 2 }, { 11, 2, 1, 2, 2 },
183 { 11, 2, 2, 1, 2 }, { 11, 2, 2, 1, 2 },
184 { 11, 0, 2, 2, 0 }, { 11, 0, 2, 2, 0 },
185 { 11, 2, 2, 0, 0 }, { 11, 2, 2, 0, 0 },
186 { 11, 0, 0, 2, 2 }, { 11, 0, 0, 2, 2 },
187 { 11, 2, 0, 2, 0 }, { 11, 2, 0, 2, 0 },
188 { 11, 0, 2, 0, 2 }, { 11, 0, 2, 0, 2 },
189 { 11, 2, 0, 0, 2 }, { 11, 2, 0, 0, 2 },
190 { 11, 2, 2, 2, 2 }, { 11, 2, 2, 2, 2 },
191 { 11, 0, 2, 2, 2 }, { 11, 0, 2, 2, 2 },
192 { 11, 2, 2, 2, 0 }, { 11, 2, 2, 2, 0 },
193 /* 12 bit codewords */
194 { 12, 2, 2, 0, 2 },
195 { 12, 2, 0, 2, 2 },
196};
diff --git a/apps/codecs/libfaad/codebook/hcb_5.h b/apps/codecs/libfaad/codebook/hcb_5.h
new file mode 100644
index 0000000000..d094a6b1c2
--- /dev/null
+++ b/apps/codecs/libfaad/codebook/hcb_5.h
@@ -0,0 +1,193 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28/* Binary search huffman table HCB_5 */
29
30
31static hcb_bin_pair hcb5[] = {
32 { /* 0 */ 0, { 1, 2 } },
33 { /* 1 */ 1, { 0, 0 } }, /* 0 */
34 { /* 2 */ 0, { 1, 2 } },
35 { /* 3 */ 0, { 2, 3 } },
36 { /* 4 */ 0, { 3, 4 } },
37 { /* 5 */ 0, { 4, 5 } },
38 { /* 6 */ 0, { 5, 6 } },
39 { /* 7 */ 0, { 6, 7 } },
40 { /* 8 */ 0, { 7, 8 } },
41 { /* 9 */ 1, { -1, 0 } }, /* 1000 */
42 { /* 10 */ 1, { 1, 0 } }, /* 1001 */
43 { /* 11 */ 1, { 0, 1 } }, /* 1010 */
44 { /* 12 */ 1, { 0, -1 } }, /* 1011 */
45 { /* 13 */ 0, { 4, 5 } },
46 { /* 14 */ 0, { 5, 6 } },
47 { /* 15 */ 0, { 6, 7 } },
48 { /* 16 */ 0, { 7, 8 } },
49 { /* 17 */ 1, { 1, -1 } },
50 { /* 18 */ 1, { -1, 1 } },
51 { /* 19 */ 1, { -1, -1 } },
52 { /* 20 */ 1, { 1, 1 } },
53 { /* 21 */ 0, { 4, 5 } },
54 { /* 22 */ 0, { 5, 6 } },
55 { /* 23 */ 0, { 6, 7 } },
56 { /* 24 */ 0, { 7, 8 } },
57 { /* 25 */ 0, { 8, 9 } },
58 { /* 26 */ 0, { 9, 10 } },
59 { /* 27 */ 0, { 10, 11 } },
60 { /* 28 */ 0, { 11, 12 } },
61 { /* 29 */ 0, { 12, 13 } },
62 { /* 30 */ 0, { 13, 14 } },
63 { /* 31 */ 0, { 14, 15 } },
64 { /* 32 */ 0, { 15, 16 } },
65 { /* 33 */ 1, { -2, 0 } },
66 { /* 34 */ 1, { 0, 2 } },
67 { /* 35 */ 1, { 2, 0 } },
68 { /* 36 */ 1, { 0, -2 } },
69 { /* 37 */ 0, { 12, 13 } },
70 { /* 38 */ 0, { 13, 14 } },
71 { /* 39 */ 0, { 14, 15 } },
72 { /* 40 */ 0, { 15, 16 } },
73 { /* 41 */ 0, { 16, 17 } },
74 { /* 42 */ 0, { 17, 18 } },
75 { /* 43 */ 0, { 18, 19 } },
76 { /* 44 */ 0, { 19, 20 } },
77 { /* 45 */ 0, { 20, 21 } },
78 { /* 46 */ 0, { 21, 22 } },
79 { /* 47 */ 0, { 22, 23 } },
80 { /* 48 */ 0, { 23, 24 } },
81 { /* 49 */ 1, { -2, -1 } },
82 { /* 50 */ 1, { 2, 1 } },
83 { /* 51 */ 1, { -1, -2 } },
84 { /* 52 */ 1, { 1, 2 } },
85 { /* 53 */ 1, { -2, 1 } },
86 { /* 54 */ 1, { 2, -1 } },
87 { /* 55 */ 1, { -1, 2 } },
88 { /* 56 */ 1, { 1, -2 } },
89 { /* 57 */ 1, { -3, 0 } },
90 { /* 58 */ 1, { 3, 0 } },
91 { /* 59 */ 1, { 0, -3 } },
92 { /* 60 */ 1, { 0, 3 } },
93 { /* 61 */ 0, { 12, 13 } },
94 { /* 62 */ 0, { 13, 14 } },
95 { /* 63 */ 0, { 14, 15 } },
96 { /* 64 */ 0, { 15, 16 } },
97 { /* 65 */ 0, { 16, 17 } },
98 { /* 66 */ 0, { 17, 18 } },
99 { /* 67 */ 0, { 18, 19 } },
100 { /* 68 */ 0, { 19, 20 } },
101 { /* 69 */ 0, { 20, 21 } },
102 { /* 70 */ 0, { 21, 22 } },
103 { /* 71 */ 0, { 22, 23 } },
104 { /* 72 */ 0, { 23, 24 } },
105 { /* 73 */ 1, { -3, -1 } },
106 { /* 74 */ 1, { 1, 3 } },
107 { /* 75 */ 1, { 3, 1 } },
108 { /* 76 */ 1, { -1, -3 } },
109 { /* 77 */ 1, { -3, 1 } },
110 { /* 78 */ 1, { 3, -1 } },
111 { /* 79 */ 1, { 1, -3 } },
112 { /* 80 */ 1, { -1, 3 } },
113 { /* 81 */ 1, { -2, 2 } },
114 { /* 82 */ 1, { 2, 2 } },
115 { /* 83 */ 1, { -2, -2 } },
116 { /* 84 */ 1, { 2, -2 } },
117 { /* 85 */ 0, { 12, 13 } },
118 { /* 86 */ 0, { 13, 14 } },
119 { /* 87 */ 0, { 14, 15 } },
120 { /* 88 */ 0, { 15, 16 } },
121 { /* 89 */ 0, { 16, 17 } },
122 { /* 90 */ 0, { 17, 18 } },
123 { /* 91 */ 0, { 18, 19 } },
124 { /* 92 */ 0, { 19, 20 } },
125 { /* 93 */ 0, { 20, 21 } },
126 { /* 94 */ 0, { 21, 22 } },
127 { /* 95 */ 0, { 22, 23 } },
128 { /* 96 */ 0, { 23, 24 } },
129 { /* 97 */ 1, { -3, -2 } },
130 { /* 98 */ 1, { 3, -2 } },
131 { /* 99 */ 1, { -2, 3 } },
132 { /* 00 */ 1, { 2, -3 } },
133 { /* 01 */ 1, { 3, 2 } },
134 { /* 02 */ 1, { 2, 3 } },
135 { /* 03 */ 1, { -3, 2 } },
136 { /* 04 */ 1, { -2, -3 } },
137 { /* 05 */ 1, { 0, -4 } },
138 { /* 06 */ 1, { -4, 0 } },
139 { /* 07 */ 1, { 4, 1 } },
140 { /* 08 */ 1, { 4, 0 } },
141 { /* 09 */ 0, { 12, 13 } },
142 { /* 10 */ 0, { 13, 14 } },
143 { /* 11 */ 0, { 14, 15 } },
144 { /* 12 */ 0, { 15, 16 } },
145 { /* 13 */ 0, { 16, 17 } },
146 { /* 14 */ 0, { 17, 18 } },
147 { /* 15 */ 0, { 18, 19 } },
148 { /* 16 */ 0, { 19, 20 } },
149 { /* 17 */ 0, { 20, 21 } },
150 { /* 18 */ 0, { 21, 22 } },
151 { /* 19 */ 0, { 22, 23 } },
152 { /* 20 */ 0, { 23, 24 } },
153 { /* 21 */ 1, { -4, -1 } },
154 { /* 22 */ 1, { 0, 4 } },
155 { /* 23 */ 1, { 4, -1 } },
156 { /* 24 */ 1, { -1, -4 } },
157 { /* 25 */ 1, { 1, 4 } },
158 { /* 26 */ 1, { -1, 4 } },
159 { /* 27 */ 1, { -4, 1 } },
160 { /* 28 */ 1, { 1, -4 } },
161 { /* 29 */ 1, { 3, -3 } },
162 { /* 30 */ 1, { -3, -3 } },
163 { /* 31 */ 1, { -3, 3 } },
164 { /* 32 */ 1, { -2, 4 } },
165 { /* 33 */ 1, { -4, -2 } },
166 { /* 34 */ 1, { 4, 2 } },
167 { /* 35 */ 1, { 2, -4 } },
168 { /* 36 */ 1, { 2, 4 } },
169 { /* 37 */ 1, { 3, 3 } },
170 { /* 38 */ 1, { -4, 2 } },
171 { /* 39 */ 0, { 6, 7 } },
172 { /* 40 */ 0, { 7, 8 } },
173 { /* 41 */ 0, { 8, 9 } },
174 { /* 42 */ 0, { 9, 10 } },
175 { /* 43 */ 0, { 10, 11 } },
176 { /* 44 */ 0, { 11, 12 } },
177 { /* 45 */ 1, { -2, -4 } },
178 { /* 46 */ 1, { 4, -2 } },
179 { /* 47 */ 1, { 3, -4 } },
180 { /* 48 */ 1, { -4, -3 } },
181 { /* 49 */ 1, { -4, 3 } },
182 { /* 50 */ 1, { 3, 4 } },
183 { /* 51 */ 1, { -3, 4 } },
184 { /* 52 */ 1, { 4, 3 } },
185 { /* 53 */ 1, { 4, -3 } },
186 { /* 54 */ 1, { -3, -4 } },
187 { /* 55 */ 0, { 2, 3 } },
188 { /* 56 */ 0, { 3, 4 } },
189 { /* 57 */ 1, { 4, -4 } },
190 { /* 58 */ 1, { -4, 4 } },
191 { /* 59 */ 1, { 4, 4 } },
192 { /* 60 */ 1, { -4, -4 } }
193};
diff --git a/apps/codecs/libfaad/codebook/hcb_6.h b/apps/codecs/libfaad/codebook/hcb_6.h
new file mode 100644
index 0000000000..4df2380ad2
--- /dev/null
+++ b/apps/codecs/libfaad/codebook/hcb_6.h
@@ -0,0 +1,179 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28/* 2-step huffman table HCB_6 */
29
30
31/* 1st step: 5 bits
32 * 2^5 = 32 entries
33 *
34 * Used to find offset into 2nd step table and number of extra bits to get
35 */
36static hcb hcb6_1[] = {
37 /* 4 bit codewords */
38 { /* 00000 */ 0, 0 },
39 { /* */ 0, 0 },
40 { /* 00010 */ 1, 0 },
41 { /* */ 1, 0 },
42 { /* 00100 */ 2, 0 },
43 { /* */ 2, 0 },
44 { /* 00110 */ 3, 0 },
45 { /* */ 3, 0 },
46 { /* 01000 */ 4, 0 },
47 { /* */ 4, 0 },
48 { /* 01010 */ 5, 0 },
49 { /* */ 5, 0 },
50 { /* 01100 */ 6, 0 },
51 { /* */ 6, 0 },
52 { /* 01110 */ 7, 0 },
53 { /* */ 7, 0 },
54 { /* 10000 */ 8, 0 },
55 { /* */ 8, 0 },
56
57 /* 6 bit codewords */
58 { /* 10010 */ 9, 1 },
59 { /* 10011 */ 11, 1 },
60 { /* 10100 */ 13, 1 },
61 { /* 10101 */ 15, 1 },
62 { /* 10110 */ 17, 1 },
63 { /* 10111 */ 19, 1 },
64 { /* 11000 */ 21, 1 },
65 { /* 11001 */ 23, 1 },
66
67 /* 7 bit codewords */
68 { /* 11010 */ 25, 2 },
69 { /* 11011 */ 29, 2 },
70 { /* 11100 */ 33, 2 },
71
72 /* 7/8 bit codewords */
73 { /* 11101 */ 37, 3 },
74
75 /* 8/9 bit codewords */
76 { /* 11110 */ 45, 4 },
77
78 /* 9/10/11 bit codewords */
79 { /* 11111 */ 61, 6 }
80};
81
82/* 2nd step table
83 *
84 * Gives size of codeword and actual data (x,y,v,w)
85 */
86static hcb_2_pair hcb6_2[] = {
87 /* 4 bit codewords */
88 { 4, 0, 0 },
89 { 4, 1, 0 },
90 { 4, 0, -1 },
91 { 4, 0, 1 },
92 { 4, -1, 0 },
93 { 4, 1, 1 },
94 { 4, -1, 1 },
95 { 4, 1, -1 },
96 { 4, -1, -1 },
97
98 /* 6 bit codewords */
99 { 6, 2, -1 },
100 { 6, 2, 1 },
101 { 6, -2, 1 },
102 { 6, -2, -1 },
103 { 6, -2, 0 },
104 { 6, -1, 2 },
105 { 6, 2, 0 },
106 { 6, 1, -2 },
107 { 6, 1, 2 },
108 { 6, 0, -2 },
109 { 6, -1, -2 },
110 { 6, 0, 2 },
111 { 6, 2, -2 },
112 { 6, -2, 2 },
113 { 6, -2, -2 },
114 { 6, 2, 2 },
115
116 /* 7 bit codewords */
117 { 7, -3, 1 },
118 { 7, 3, 1 },
119 { 7, 3, -1 },
120 { 7, -1, 3 },
121 { 7, -3, -1 },
122 { 7, 1, 3 },
123 { 7, 1, -3 },
124 { 7, -1, -3 },
125 { 7, 3, 0 },
126 { 7, -3, 0 },
127 { 7, 0, -3 },
128 { 7, 0, 3 },
129
130 /* 7/8 bit codewords */
131 { 7, 3, 2 }, { 7, 3, 2 },
132 { 8, -3, -2 },
133 { 8, -2, 3 },
134 { 8, 2, 3 },
135 { 8, 3, -2 },
136 { 8, 2, -3 },
137 { 8, -2, -3 },
138
139 /* 8 bit codewords */
140 { 8, -3, 2 }, { 8, -3, 2 },
141 { 8, 3, 3 }, { 8, 3, 3 },
142 { 9, 3, -3 },
143 { 9, -3, -3 },
144 { 9, -3, 3 },
145 { 9, 1, -4 },
146 { 9, -1, -4 },
147 { 9, 4, 1 },
148 { 9, -4, 1 },
149 { 9, -4, -1 },
150 { 9, 1, 4 },
151 { 9, 4, -1 },
152 { 9, -1, 4 },
153 { 9, 0, -4 },
154
155 /* 9/10/11 bit codewords */
156 { 9, -4, 2 }, { 9, -4, 2 }, { 9, -4, 2 }, { 9, -4, 2 },
157 { 9, -4, -2 }, { 9, -4, -2 }, { 9, -4, -2 }, { 9, -4, -2 },
158 { 9, 2, 4 }, { 9, 2, 4 }, { 9, 2, 4 }, { 9, 2, 4 },
159 { 9, -2, -4 }, { 9, -2, -4 }, { 9, -2, -4 }, { 9, -2, -4 },
160 { 9, -4, 0 }, { 9, -4, 0 }, { 9, -4, 0 }, { 9, -4, 0 },
161 { 9, 4, 2 }, { 9, 4, 2 }, { 9, 4, 2 }, { 9, 4, 2 },
162 { 9, 4, -2 }, { 9, 4, -2 }, { 9, 4, -2 }, { 9, 4, -2 },
163 { 9, -2, 4 }, { 9, -2, 4 }, { 9, -2, 4 }, { 9, -2, 4 },
164 { 9, 4, 0 }, { 9, 4, 0 }, { 9, 4, 0 }, { 9, 4, 0 },
165 { 9, 2, -4 }, { 9, 2, -4 }, { 9, 2, -4 }, { 9, 2, -4 },
166 { 9, 0, 4 }, { 9, 0, 4 }, { 9, 0, 4 }, { 9, 0, 4 },
167 { 10, -3, -4 }, { 10, -3, -4 },
168 { 10, -3, 4 }, { 10, -3, 4 },
169 { 10, 3, -4 }, { 10, 3, -4 },
170 { 10, 4, -3 }, { 10, 4, -3 },
171 { 10, 3, 4 }, { 10, 3, 4 },
172 { 10, 4, 3 }, { 10, 4, 3 },
173 { 10, -4, 3 }, { 10, -4, 3 },
174 { 10, -4, -3 }, { 10, -4, -3 },
175 { 11, 4, 4 },
176 { 11, -4, 4 },
177 { 11, -4, -4 },
178 { 11, 4, -4 }
179};
diff --git a/apps/codecs/libfaad/codebook/hcb_7.h b/apps/codecs/libfaad/codebook/hcb_7.h
new file mode 100644
index 0000000000..c26a1a328f
--- /dev/null
+++ b/apps/codecs/libfaad/codebook/hcb_7.h
@@ -0,0 +1,159 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28/* Binary search huffman table HCB_7 */
29
30
31static hcb_bin_pair hcb7[] = {
32 { /* 0 */ 0, { 1, 2 } },
33 { /* 1 */ 1, { 0, 0 } },
34 { /* 2 */ 0, { 1, 2 } },
35 { /* 3 */ 0, { 2, 3 } },
36 { /* 4 */ 0, { 3, 4 } },
37 { /* 5 */ 1, { 1, 0 } },
38 { /* 6 */ 1, { 0, 1 } },
39 { /* 7 */ 0, { 2, 3 } },
40 { /* 8 */ 0, { 3, 4 } },
41 { /* 9 */ 1, { 1, 1 } },
42 { /* 10 */ 0, { 3, 4 } },
43 { /* 11 */ 0, { 4, 5 } },
44 { /* 12 */ 0, { 5, 6 } },
45 { /* 13 */ 0, { 6, 7 } },
46 { /* 14 */ 0, { 7, 8 } },
47 { /* 15 */ 0, { 8, 9 } },
48 { /* 16 */ 0, { 9, 10 } },
49 { /* 17 */ 0, { 10, 11 } },
50 { /* 18 */ 0, { 11, 12 } },
51 { /* 19 */ 1, { 2, 1 } },
52 { /* 20 */ 1, { 1, 2 } },
53 { /* 21 */ 1, { 2, 0 } },
54 { /* 22 */ 1, { 0, 2 } },
55 { /* 23 */ 0, { 8, 9 } },
56 { /* 24 */ 0, { 9, 10 } },
57 { /* 25 */ 0, { 10, 11 } },
58 { /* 26 */ 0, { 11, 12 } },
59 { /* 27 */ 0, { 12, 13 } },
60 { /* 28 */ 0, { 13, 14 } },
61 { /* 29 */ 0, { 14, 15 } },
62 { /* 30 */ 0, { 15, 16 } },
63 { /* 31 */ 1, { 3, 1 } },
64 { /* 32 */ 1, { 1, 3 } },
65 { /* 33 */ 1, { 2, 2 } },
66 { /* 34 */ 1, { 3, 0 } },
67 { /* 35 */ 1, { 0, 3 } },
68 { /* 36 */ 0, { 11, 12 } },
69 { /* 37 */ 0, { 12, 13 } },
70 { /* 38 */ 0, { 13, 14 } },
71 { /* 39 */ 0, { 14, 15 } },
72 { /* 40 */ 0, { 15, 16 } },
73 { /* 41 */ 0, { 16, 17 } },
74 { /* 42 */ 0, { 17, 18 } },
75 { /* 43 */ 0, { 18, 19 } },
76 { /* 44 */ 0, { 19, 20 } },
77 { /* 45 */ 0, { 20, 21 } },
78 { /* 46 */ 0, { 21, 22 } },
79 { /* 47 */ 1, { 2, 3 } },
80 { /* 48 */ 1, { 3, 2 } },
81 { /* 49 */ 1, { 1, 4 } },
82 { /* 50 */ 1, { 4, 1 } },
83 { /* 51 */ 1, { 1, 5 } },
84 { /* 52 */ 1, { 5, 1 } },
85 { /* 53 */ 1, { 3, 3 } },
86 { /* 54 */ 1, { 2, 4 } },
87 { /* 55 */ 1, { 0, 4 } },
88 { /* 56 */ 1, { 4, 0 } },
89 { /* 57 */ 0, { 12, 13 } },
90 { /* 58 */ 0, { 13, 14 } },
91 { /* 59 */ 0, { 14, 15 } },
92 { /* 60 */ 0, { 15, 16 } },
93 { /* 61 */ 0, { 16, 17 } },
94 { /* 62 */ 0, { 17, 18 } },
95 { /* 63 */ 0, { 18, 19 } },
96 { /* 64 */ 0, { 19, 20 } },
97 { /* 65 */ 0, { 20, 21 } },
98 { /* 66 */ 0, { 21, 22 } },
99 { /* 67 */ 0, { 22, 23 } },
100 { /* 68 */ 0, { 23, 24 } },
101 { /* 69 */ 1, { 4, 2 } },
102 { /* 70 */ 1, { 2, 5 } },
103 { /* 71 */ 1, { 5, 2 } },
104 { /* 72 */ 1, { 0, 5 } },
105 { /* 73 */ 1, { 6, 1 } },
106 { /* 74 */ 1, { 5, 0 } },
107 { /* 75 */ 1, { 1, 6 } },
108 { /* 76 */ 1, { 4, 3 } },
109 { /* 77 */ 1, { 3, 5 } },
110 { /* 78 */ 1, { 3, 4 } },
111 { /* 79 */ 1, { 5, 3 } },
112 { /* 80 */ 1, { 2, 6 } },
113 { /* 81 */ 1, { 6, 2 } },
114 { /* 82 */ 1, { 1, 7 } },
115 { /* 83 */ 0, { 10, 11 } },
116 { /* 84 */ 0, { 11, 12 } },
117 { /* 85 */ 0, { 12, 13 } },
118 { /* 86 */ 0, { 13, 14 } },
119 { /* 87 */ 0, { 14, 15 } },
120 { /* 88 */ 0, { 15, 16 } },
121 { /* 89 */ 0, { 16, 17 } },
122 { /* 90 */ 0, { 17, 18 } },
123 { /* 91 */ 0, { 18, 19 } },
124 { /* 92 */ 0, { 19, 20 } },
125 { /* 93 */ 1, { 3, 6 } },
126 { /* 94 */ 1, { 0, 6 } },
127 { /* 95 */ 1, { 6, 0 } },
128 { /* 96 */ 1, { 4, 4 } },
129 { /* 97 */ 1, { 7, 1 } },
130 { /* 98 */ 1, { 4, 5 } },
131 { /* 99 */ 1, { 7, 2 } },
132 { /* 00 */ 1, { 5, 4 } },
133 { /* 01 */ 1, { 6, 3 } },
134 { /* 02 */ 1, { 2, 7 } },
135 { /* 03 */ 1, { 7, 3 } },
136 { /* 04 */ 1, { 6, 4 } },
137 { /* 05 */ 1, { 5, 5 } },
138 { /* 06 */ 1, { 4, 6 } },
139 { /* 07 */ 1, { 3, 7 } },
140 { /* 08 */ 0, { 5, 6 } },
141 { /* 09 */ 0, { 6, 7 } },
142 { /* 10 */ 0, { 7, 8 } },
143 { /* 11 */ 0, { 8, 9 } },
144 { /* 12 */ 0, { 9, 10 } },
145 { /* 13 */ 1, { 7, 0 } },
146 { /* 14 */ 1, { 0, 7 } },
147 { /* 15 */ 1, { 6, 5 } },
148 { /* 16 */ 1, { 5, 6 } },
149 { /* 17 */ 1, { 7, 4 } },
150 { /* 18 */ 1, { 4, 7 } },
151 { /* 19 */ 1, { 5, 7 } },
152 { /* 20 */ 1, { 7, 5 } },
153 { /* 21 */ 0, { 2, 3 } },
154 { /* 22 */ 0, { 3, 4 } },
155 { /* 23 */ 1, { 7, 6 } },
156 { /* 24 */ 1, { 6, 6 } },
157 { /* 25 */ 1, { 6, 7 } },
158 { /* 26 */ 1, { 7, 7 } }
159};
diff --git a/apps/codecs/libfaad/codebook/hcb_8.h b/apps/codecs/libfaad/codebook/hcb_8.h
new file mode 100644
index 0000000000..d75da9030e
--- /dev/null
+++ b/apps/codecs/libfaad/codebook/hcb_8.h
@@ -0,0 +1,170 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28/* 2-step huffman table HCB_8 */
29
30
31/* 1st step: 5 bits
32 * 2^5 = 32 entries
33 *
34 * Used to find offset into 2nd step table and number of extra bits to get
35 */
36static hcb hcb8_1[] = {
37 /* 3 bit codeword */
38 { /* 00000 */ 0, 0 },
39 { /* */ 0, 0 },
40 { /* */ 0, 0 },
41 { /* */ 0, 0 },
42
43 /* 4 bit codewords */
44 { /* 00100 */ 1, 0 },
45 { /* */ 1, 0 },
46 { /* 00110 */ 2, 0 },
47 { /* */ 2, 0 },
48 { /* 01000 */ 3, 0 },
49 { /* */ 3, 0 },
50 { /* 01010 */ 4, 0 },
51 { /* */ 4, 0 },
52 { /* 01100 */ 5, 0 },
53 { /* */ 5, 0 },
54
55 /* 5 bit codewords */
56 { /* 01110 */ 6, 0 },
57 { /* 01111 */ 7, 0 },
58 { /* 10000 */ 8, 0 },
59 { /* 10001 */ 9, 0 },
60 { /* 10010 */ 10, 0 },
61 { /* 10011 */ 11, 0 },
62 { /* 10100 */ 12, 0 },
63
64 /* 6 bit codewords */
65 { /* 10101 */ 13, 1 },
66 { /* 10110 */ 15, 1 },
67 { /* 10111 */ 17, 1 },
68 { /* 11000 */ 19, 1 },
69 { /* 11001 */ 21, 1 },
70
71 /* 7 bit codewords */
72 { /* 11010 */ 23, 2 },
73 { /* 11011 */ 27, 2 },
74 { /* 11100 */ 31, 2 },
75
76 /* 7/8 bit codewords */
77 { /* 11101 */ 35, 3 },
78
79 /* 8 bit codewords */
80 { /* 11110 */ 43, 3 },
81
82 /* 8/9/10 bit codewords */
83 { /* 11111 */ 51, 5 }
84};
85
86/* 2nd step table
87 *
88 * Gives size of codeword and actual data (x,y,v,w)
89 */
90static hcb_2_pair hcb8_2[] = {
91 /* 3 bit codeword */
92 { 3, 1, 1 },
93
94 /* 4 bit codewords */
95 { 4, 2, 1 },
96 { 4, 1, 0 },
97 { 4, 1, 2 },
98 { 4, 0, 1 },
99 { 4, 2, 2 },
100
101 /* 5 bit codewords */
102 { 5, 0, 0 },
103 { 5, 2, 0 },
104 { 5, 0, 2 },
105 { 5, 3, 1 },
106 { 5, 1, 3 },
107 { 5, 3, 2 },
108 { 5, 2, 3 },
109
110 /* 6 bit codewords */
111 { 6, 3, 3 },
112 { 6, 4, 1 },
113 { 6, 1, 4 },
114 { 6, 4, 2 },
115 { 6, 2, 4 },
116 { 6, 3, 0 },
117 { 6, 0, 3 },
118 { 6, 4, 3 },
119 { 6, 3, 4 },
120 { 6, 5, 2 },
121
122 /* 7 bit codewords */
123 { 7, 5, 1 },
124 { 7, 2, 5 },
125 { 7, 1, 5 },
126 { 7, 5, 3 },
127 { 7, 3, 5 },
128 { 7, 4, 4 },
129 { 7, 5, 4 },
130 { 7, 0, 4 },
131 { 7, 4, 5 },
132 { 7, 4, 0 },
133 { 7, 2, 6 },
134 { 7, 6, 2 },
135
136 /* 7/8 bit codewords */
137 { 7, 6, 1 }, { 7, 6, 1 },
138 { 7, 1, 6 }, { 7, 1, 6 },
139 { 8, 3, 6 },
140 { 8, 6, 3 },
141 { 8, 5, 5 },
142 { 8, 5, 0 },
143
144 /* 8 bit codewords */
145 { 8, 6, 4 },
146 { 8, 0, 5 },
147 { 8, 4, 6 },
148 { 8, 7, 1 },
149 { 8, 7, 2 },
150 { 8, 2, 7 },
151 { 8, 6, 5 },
152 { 8, 7, 3 },
153
154 /* 8/9/10 bit codewords */
155 { 8, 1, 7 }, { 8, 1, 7 }, { 8, 1, 7 }, { 8, 1, 7 },
156 { 8, 5, 6 }, { 8, 5, 6 }, { 8, 5, 6 }, { 8, 5, 6 },
157 { 8, 3, 7 }, { 8, 3, 7 }, { 8, 3, 7 }, { 8, 3, 7 },
158 { 9, 6, 6 }, { 9, 6, 6 },
159 { 9, 7, 4 }, { 9, 7, 4 },
160 { 9, 6, 0 }, { 9, 6, 0 },
161 { 9, 4, 7 }, { 9, 4, 7 },
162 { 9, 0, 6 }, { 9, 0, 6 },
163 { 9, 7, 5 }, { 9, 7, 5 },
164 { 9, 7, 6 }, { 9, 7, 6 },
165 { 9, 6, 7 }, { 9, 6, 7 },
166 { 10, 5, 7 },
167 { 10, 7, 0 },
168 { 10, 0, 7 },
169 { 10, 7, 7 }
170};
diff --git a/apps/codecs/libfaad/codebook/hcb_9.h b/apps/codecs/libfaad/codebook/hcb_9.h
new file mode 100644
index 0000000000..740a6c324e
--- /dev/null
+++ b/apps/codecs/libfaad/codebook/hcb_9.h
@@ -0,0 +1,369 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28/* Binary search huffman table HCB_9 */
29
30
31static hcb_bin_pair hcb9[] = {
32 { /* 0 */ 0, { 1, 2 } },
33 { /* 1 */ 1, { 0, 0 } },
34 { /* 2 */ 0, { 1, 2 } },
35 { /* 3 */ 0, { 2, 3 } },
36 { /* 4 */ 0, { 3, 4 } },
37 { /* 5 */ 1, { 1, 0 } },
38 { /* 6 */ 1, { 0, 1 } },
39 { /* 7 */ 0, { 2, 3 } },
40 { /* 8 */ 0, { 3, 4 } },
41 { /* 9 */ 1, { 1, 1 } },
42 { /* 10 */ 0, { 3, 4 } },
43 { /* 11 */ 0, { 4, 5 } },
44 { /* 12 */ 0, { 5, 6 } },
45 { /* 13 */ 0, { 6, 7 } },
46 { /* 14 */ 0, { 7, 8 } },
47 { /* 15 */ 0, { 8, 9 } },
48 { /* 16 */ 0, { 9, 10 } },
49 { /* 17 */ 0, { 10, 11 } },
50 { /* 18 */ 0, { 11, 12 } },
51 { /* 19 */ 1, { 2, 1 } },
52 { /* 20 */ 1, { 1, 2 } },
53 { /* 21 */ 1, { 2, 0 } },
54 { /* 22 */ 1, { 0, 2 } },
55 { /* 23 */ 0, { 8, 9 } },
56 { /* 24 */ 0, { 9, 10 } },
57 { /* 25 */ 0, { 10, 11 } },
58 { /* 26 */ 0, { 11, 12 } },
59 { /* 27 */ 0, { 12, 13 } },
60 { /* 28 */ 0, { 13, 14 } },
61 { /* 29 */ 0, { 14, 15 } },
62 { /* 30 */ 0, { 15, 16 } },
63 { /* 31 */ 1, { 3, 1 } },
64 { /* 32 */ 1, { 2, 2 } },
65 { /* 33 */ 1, { 1, 3 } },
66 { /* 34 */ 0, { 13, 14 } },
67 { /* 35 */ 0, { 14, 15 } },
68 { /* 36 */ 0, { 15, 16 } },
69 { /* 37 */ 0, { 16, 17 } },
70 { /* 38 */ 0, { 17, 18 } },
71 { /* 39 */ 0, { 18, 19 } },
72 { /* 40 */ 0, { 19, 20 } },
73 { /* 41 */ 0, { 20, 21 } },
74 { /* 42 */ 0, { 21, 22 } },
75 { /* 43 */ 0, { 22, 23 } },
76 { /* 44 */ 0, { 23, 24 } },
77 { /* 45 */ 0, { 24, 25 } },
78 { /* 46 */ 0, { 25, 26 } },
79 { /* 47 */ 1, { 3, 0 } },
80 { /* 48 */ 1, { 0, 3 } },
81 { /* 49 */ 1, { 2, 3 } },
82 { /* 50 */ 1, { 3, 2 } },
83 { /* 51 */ 1, { 1, 4 } },
84 { /* 52 */ 1, { 4, 1 } },
85 { /* 53 */ 1, { 2, 4 } },
86 { /* 54 */ 1, { 1, 5 } },
87 { /* 55 */ 0, { 18, 19 } },
88 { /* 56 */ 0, { 19, 20 } },
89 { /* 57 */ 0, { 20, 21 } },
90 { /* 58 */ 0, { 21, 22 } },
91 { /* 59 */ 0, { 22, 23 } },
92 { /* 60 */ 0, { 23, 24 } },
93 { /* 61 */ 0, { 24, 25 } },
94 { /* 62 */ 0, { 25, 26 } },
95 { /* 63 */ 0, { 26, 27 } },
96 { /* 64 */ 0, { 27, 28 } },
97 { /* 65 */ 0, { 28, 29 } },
98 { /* 66 */ 0, { 29, 30 } },
99 { /* 67 */ 0, { 30, 31 } },
100 { /* 68 */ 0, { 31, 32 } },
101 { /* 69 */ 0, { 32, 33 } },
102 { /* 70 */ 0, { 33, 34 } },
103 { /* 71 */ 0, { 34, 35 } },
104 { /* 72 */ 0, { 35, 36 } },
105 { /* 73 */ 1, { 4, 2 } },
106 { /* 74 */ 1, { 3, 3 } },
107 { /* 75 */ 1, { 0, 4 } },
108 { /* 76 */ 1, { 4, 0 } },
109 { /* 77 */ 1, { 5, 1 } },
110 { /* 78 */ 1, { 2, 5 } },
111 { /* 79 */ 1, { 1, 6 } },
112 { /* 80 */ 1, { 3, 4 } },
113 { /* 81 */ 1, { 5, 2 } },
114 { /* 82 */ 1, { 6, 1 } },
115 { /* 83 */ 1, { 4, 3 } },
116 { /* 84 */ 0, { 25, 26 } },
117 { /* 85 */ 0, { 26, 27 } },
118 { /* 86 */ 0, { 27, 28 } },
119 { /* 87 */ 0, { 28, 29 } },
120 { /* 88 */ 0, { 29, 30 } },
121 { /* 89 */ 0, { 30, 31 } },
122 { /* 90 */ 0, { 31, 32 } },
123 { /* 91 */ 0, { 32, 33 } },
124 { /* 92 */ 0, { 33, 34 } },
125 { /* 93 */ 0, { 34, 35 } },
126 { /* 94 */ 0, { 35, 36 } },
127 { /* 95 */ 0, { 36, 37 } },
128 { /* 96 */ 0, { 37, 38 } },
129 { /* 97 */ 0, { 38, 39 } },
130 { /* 98 */ 0, { 39, 40 } },
131 { /* 99 */ 0, { 40, 41 } },
132 { /* 00 */ 0, { 41, 42 } },
133 { /* 01 */ 0, { 42, 43 } },
134 { /* 02 */ 0, { 43, 44 } },
135 { /* 03 */ 0, { 44, 45 } },
136 { /* 04 */ 0, { 45, 46 } },
137 { /* 05 */ 0, { 46, 47 } },
138 { /* 06 */ 0, { 47, 48 } },
139 { /* 07 */ 0, { 48, 49 } },
140 { /* 08 */ 0, { 49, 50 } },
141 { /* 09 */ 1, { 0, 5 } },
142 { /* 10 */ 1, { 2, 6 } },
143 { /* 11 */ 1, { 5, 0 } },
144 { /* 12 */ 1, { 1, 7 } },
145 { /* 13 */ 1, { 3, 5 } },
146 { /* 14 */ 1, { 1, 8 } },
147 { /* 15 */ 1, { 8, 1 } },
148 { /* 16 */ 1, { 4, 4 } },
149 { /* 17 */ 1, { 5, 3 } },
150 { /* 18 */ 1, { 6, 2 } },
151 { /* 19 */ 1, { 7, 1 } },
152 { /* 20 */ 1, { 0, 6 } },
153 { /* 21 */ 1, { 8, 2 } },
154 { /* 22 */ 1, { 2, 8 } },
155 { /* 23 */ 1, { 3, 6 } },
156 { /* 24 */ 1, { 2, 7 } },
157 { /* 25 */ 1, { 4, 5 } },
158 { /* 26 */ 1, { 9, 1 } },
159 { /* 27 */ 1, { 1, 9 } },
160 { /* 28 */ 1, { 7, 2 } },
161 { /* 29 */ 0, { 30, 31 } },
162 { /* 30 */ 0, { 31, 32 } },
163 { /* 31 */ 0, { 32, 33 } },
164 { /* 32 */ 0, { 33, 34 } },
165 { /* 33 */ 0, { 34, 35 } },
166 { /* 34 */ 0, { 35, 36 } },
167 { /* 35 */ 0, { 36, 37 } },
168 { /* 36 */ 0, { 37, 38 } },
169 { /* 37 */ 0, { 38, 39 } },
170 { /* 38 */ 0, { 39, 40 } },
171 { /* 39 */ 0, { 40, 41 } },
172 { /* 40 */ 0, { 41, 42 } },
173 { /* 41 */ 0, { 42, 43 } },
174 { /* 42 */ 0, { 43, 44 } },
175 { /* 43 */ 0, { 44, 45 } },
176 { /* 44 */ 0, { 45, 46 } },
177 { /* 45 */ 0, { 46, 47 } },
178 { /* 46 */ 0, { 47, 48 } },
179 { /* 47 */ 0, { 48, 49 } },
180 { /* 48 */ 0, { 49, 50 } },
181 { /* 49 */ 0, { 50, 51 } },
182 { /* 50 */ 0, { 51, 52 } },
183 { /* 51 */ 0, { 52, 53 } },
184 { /* 52 */ 0, { 53, 54 } },
185 { /* 53 */ 0, { 54, 55 } },
186 { /* 54 */ 0, { 55, 56 } },
187 { /* 55 */ 0, { 56, 57 } },
188 { /* 56 */ 0, { 57, 58 } },
189 { /* 57 */ 0, { 58, 59 } },
190 { /* 58 */ 0, { 59, 60 } },
191 { /* 59 */ 1, { 6, 0 } },
192 { /* 60 */ 1, { 5, 4 } },
193 { /* 61 */ 1, { 6, 3 } },
194 { /* 62 */ 1, { 8, 3 } },
195 { /* 63 */ 1, { 0, 7 } },
196 { /* 64 */ 1, { 9, 2 } },
197 { /* 65 */ 1, { 3, 8 } },
198 { /* 66 */ 1, { 4, 6 } },
199 { /* 67 */ 1, { 3, 7 } },
200 { /* 68 */ 1, { 0, 8 } },
201 { /* 69 */ 1, { 10, 1 } },
202 { /* 70 */ 1, { 6, 4 } },
203 { /* 71 */ 1, { 2, 9 } },
204 { /* 72 */ 1, { 5, 5 } },
205 { /* 73 */ 1, { 8, 0 } },
206 { /* 74 */ 1, { 7, 0 } },
207 { /* 75 */ 1, { 7, 3 } },
208 { /* 76 */ 1, { 10, 2 } },
209 { /* 77 */ 1, { 9, 3 } },
210 { /* 78 */ 1, { 8, 4 } },
211 { /* 79 */ 1, { 1, 10 } },
212 { /* 80 */ 1, { 7, 4 } },
213 { /* 81 */ 1, { 6, 5 } },
214 { /* 82 */ 1, { 5, 6 } },
215 { /* 83 */ 1, { 4, 8 } },
216 { /* 84 */ 1, { 4, 7 } },
217 { /* 85 */ 1, { 3, 9 } },
218 { /* 86 */ 1, { 11, 1 } },
219 { /* 87 */ 1, { 5, 8 } },
220 { /* 88 */ 1, { 9, 0 } },
221 { /* 89 */ 1, { 8, 5 } },
222 { /* 90 */ 0, { 29, 30 } },
223 { /* 91 */ 0, { 30, 31 } },
224 { /* 92 */ 0, { 31, 32 } },
225 { /* 93 */ 0, { 32, 33 } },
226 { /* 94 */ 0, { 33, 34 } },
227 { /* 95 */ 0, { 34, 35 } },
228 { /* 96 */ 0, { 35, 36 } },
229 { /* 97 */ 0, { 36, 37 } },
230 { /* 98 */ 0, { 37, 38 } },
231 { /* 99 */ 0, { 38, 39 } },
232 { /* 00 */ 0, { 39, 40 } },
233 { /* 01 */ 0, { 40, 41 } },
234 { /* 02 */ 0, { 41, 42 } },
235 { /* 03 */ 0, { 42, 43 } },
236 { /* 04 */ 0, { 43, 44 } },
237 { /* 05 */ 0, { 44, 45 } },
238 { /* 06 */ 0, { 45, 46 } },
239 { /* 07 */ 0, { 46, 47 } },
240 { /* 08 */ 0, { 47, 48 } },
241 { /* 09 */ 0, { 48, 49 } },
242 { /* 10 */ 0, { 49, 50 } },
243 { /* 11 */ 0, { 50, 51 } },
244 { /* 12 */ 0, { 51, 52 } },
245 { /* 13 */ 0, { 52, 53 } },
246 { /* 14 */ 0, { 53, 54 } },
247 { /* 15 */ 0, { 54, 55 } },
248 { /* 16 */ 0, { 55, 56 } },
249 { /* 17 */ 0, { 56, 57 } },
250 { /* 18 */ 0, { 57, 58 } },
251 { /* 19 */ 1, { 10, 3 } },
252 { /* 20 */ 1, { 2, 10 } },
253 { /* 21 */ 1, { 0, 9 } },
254 { /* 22 */ 1, { 11, 2 } },
255 { /* 23 */ 1, { 9, 4 } },
256 { /* 24 */ 1, { 6, 6 } },
257 { /* 25 */ 1, { 12, 1 } },
258 { /* 26 */ 1, { 4, 9 } },
259 { /* 27 */ 1, { 8, 6 } },
260 { /* 28 */ 1, { 1, 11 } },
261 { /* 29 */ 1, { 9, 5 } },
262 { /* 30 */ 1, { 10, 4 } },
263 { /* 31 */ 1, { 5, 7 } },
264 { /* 32 */ 1, { 7, 5 } },
265 { /* 33 */ 1, { 2, 11 } },
266 { /* 34 */ 1, { 1, 12 } },
267 { /* 35 */ 1, { 12, 2 } },
268 { /* 36 */ 1, { 11, 3 } },
269 { /* 37 */ 1, { 3, 10 } },
270 { /* 38 */ 1, { 5, 9 } },
271 { /* 39 */ 1, { 6, 7 } },
272 { /* 40 */ 1, { 8, 7 } },
273 { /* 41 */ 1, { 11, 4 } },
274 { /* 42 */ 1, { 0, 10 } },
275 { /* 43 */ 1, { 7, 6 } },
276 { /* 44 */ 1, { 12, 3 } },
277 { /* 45 */ 1, { 10, 0 } },
278 { /* 46 */ 1, { 10, 5 } },
279 { /* 47 */ 1, { 4, 10 } },
280 { /* 48 */ 1, { 6, 8 } },
281 { /* 49 */ 1, { 2, 12 } },
282 { /* 50 */ 1, { 9, 6 } },
283 { /* 51 */ 1, { 9, 7 } },
284 { /* 52 */ 1, { 4, 11 } },
285 { /* 53 */ 1, { 11, 0 } },
286 { /* 54 */ 1, { 6, 9 } },
287 { /* 55 */ 1, { 3, 11 } },
288 { /* 56 */ 1, { 5, 10 } },
289 { /* 57 */ 0, { 20, 21 } },
290 { /* 58 */ 0, { 21, 22 } },
291 { /* 59 */ 0, { 22, 23 } },
292 { /* 60 */ 0, { 23, 24 } },
293 { /* 61 */ 0, { 24, 25 } },
294 { /* 62 */ 0, { 25, 26 } },
295 { /* 63 */ 0, { 26, 27 } },
296 { /* 64 */ 0, { 27, 28 } },
297 { /* 65 */ 0, { 28, 29 } },
298 { /* 66 */ 0, { 29, 30 } },
299 { /* 67 */ 0, { 30, 31 } },
300 { /* 68 */ 0, { 31, 32 } },
301 { /* 69 */ 0, { 32, 33 } },
302 { /* 70 */ 0, { 33, 34 } },
303 { /* 71 */ 0, { 34, 35 } },
304 { /* 72 */ 0, { 35, 36 } },
305 { /* 73 */ 0, { 36, 37 } },
306 { /* 74 */ 0, { 37, 38 } },
307 { /* 75 */ 0, { 38, 39 } },
308 { /* 76 */ 0, { 39, 40 } },
309 { /* 77 */ 1, { 8, 8 } },
310 { /* 78 */ 1, { 7, 8 } },
311 { /* 79 */ 1, { 12, 5 } },
312 { /* 80 */ 1, { 3, 12 } },
313 { /* 81 */ 1, { 11, 5 } },
314 { /* 82 */ 1, { 7, 7 } },
315 { /* 83 */ 1, { 12, 4 } },
316 { /* 84 */ 1, { 11, 6 } },
317 { /* 85 */ 1, { 10, 6 } },
318 { /* 86 */ 1, { 4, 12 } },
319 { /* 87 */ 1, { 7, 9 } },
320 { /* 88 */ 1, { 5, 11 } },
321 { /* 89 */ 1, { 0, 11 } },
322 { /* 90 */ 1, { 12, 6 } },
323 { /* 91 */ 1, { 6, 10 } },
324 { /* 92 */ 1, { 12, 0 } },
325 { /* 93 */ 1, { 10, 7 } },
326 { /* 94 */ 1, { 5, 12 } },
327 { /* 95 */ 1, { 7, 10 } },
328 { /* 96 */ 1, { 9, 8 } },
329 { /* 97 */ 1, { 0, 12 } },
330 { /* 98 */ 1, { 11, 7 } },
331 { /* 99 */ 1, { 8, 9 } },
332 { /* 00 */ 1, { 9, 9 } },
333 { /* 01 */ 1, { 10, 8 } },
334 { /* 02 */ 1, { 7, 11 } },
335 { /* 03 */ 1, { 12, 7 } },
336 { /* 04 */ 1, { 6, 11 } },
337 { /* 05 */ 1, { 8, 11 } },
338 { /* 06 */ 1, { 11, 8 } },
339 { /* 07 */ 1, { 7, 12 } },
340 { /* 08 */ 1, { 6, 12 } },
341 { /* 09 */ 0, { 8, 9 } },
342 { /* 10 */ 0, { 9, 10 } },
343 { /* 11 */ 0, { 10, 11 } },
344 { /* 12 */ 0, { 11, 12 } },
345 { /* 13 */ 0, { 12, 13 } },
346 { /* 14 */ 0, { 13, 14 } },
347 { /* 15 */ 0, { 14, 15 } },
348 { /* 16 */ 0, { 15, 16 } },
349 { /* 17 */ 1, { 8, 10 } },
350 { /* 18 */ 1, { 10, 9 } },
351 { /* 19 */ 1, { 8, 12 } },
352 { /* 20 */ 1, { 9, 10 } },
353 { /* 21 */ 1, { 9, 11 } },
354 { /* 22 */ 1, { 9, 12 } },
355 { /* 23 */ 1, { 10, 11 } },
356 { /* 24 */ 1, { 12, 9 } },
357 { /* 25 */ 1, { 10, 10 } },
358 { /* 26 */ 1, { 11, 9 } },
359 { /* 27 */ 1, { 12, 8 } },
360 { /* 28 */ 1, { 11, 10 } },
361 { /* 29 */ 1, { 12, 10 } },
362 { /* 30 */ 1, { 12, 11 } },
363 { /* 31 */ 0, { 2, 3 } },
364 { /* 32 */ 0, { 3, 4 } },
365 { /* 33 */ 1, { 10, 12 } },
366 { /* 34 */ 1, { 11, 11 } },
367 { /* 35 */ 1, { 11, 12 } },
368 { /* 36 */ 1, { 12, 12 } }
369};
diff --git a/apps/codecs/libfaad/codebook/hcb_sf.h b/apps/codecs/libfaad/codebook/hcb_sf.h
new file mode 100644
index 0000000000..aa5ccdbfcf
--- /dev/null
+++ b/apps/codecs/libfaad/codebook/hcb_sf.h
@@ -0,0 +1,273 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28/* Binary search huffman table HCB_SF */
29
30
31static uint8_t hcb_sf[][2] = {
32 { /* 0 */ 1, 2 },
33 { /* 1 */ 60, 0 },
34 { /* 2 */ 1, 2 },
35 { /* 3 */ 2, 3 },
36 { /* 4 */ 3, 4 },
37 { /* 5 */ 59, 0 },
38 { /* 6 */ 3, 4 },
39 { /* 7 */ 4, 5 },
40 { /* 8 */ 5, 6 },
41 { /* 9 */ 61, 0 },
42 { /* 10 */ 58, 0 },
43 { /* 11 */ 62, 0 },
44 { /* 12 */ 3, 4 },
45 { /* 13 */ 4, 5 },
46 { /* 14 */ 5, 6 },
47 { /* 15 */ 57, 0 },
48 { /* 16 */ 63, 0 },
49 { /* 17 */ 4, 5 },
50 { /* 18 */ 5, 6 },
51 { /* 19 */ 6, 7 },
52 { /* 20 */ 7, 8 },
53 { /* 21 */ 56, 0 },
54 { /* 22 */ 64, 0 },
55 { /* 23 */ 55, 0 },
56 { /* 24 */ 65, 0 },
57 { /* 25 */ 4, 5 },
58 { /* 26 */ 5, 6 },
59 { /* 27 */ 6, 7 },
60 { /* 28 */ 7, 8 },
61 { /* 29 */ 66, 0 },
62 { /* 30 */ 54, 0 },
63 { /* 31 */ 67, 0 },
64 { /* 32 */ 5, 6 },
65 { /* 33 */ 6, 7 },
66 { /* 34 */ 7, 8 },
67 { /* 35 */ 8, 9 },
68 { /* 36 */ 9, 10 },
69 { /* 37 */ 53, 0 },
70 { /* 38 */ 68, 0 },
71 { /* 39 */ 52, 0 },
72 { /* 40 */ 69, 0 },
73 { /* 41 */ 51, 0 },
74 { /* 42 */ 5, 6 },
75 { /* 43 */ 6, 7 },
76 { /* 44 */ 7, 8 },
77 { /* 45 */ 8, 9 },
78 { /* 46 */ 9, 10 },
79 { /* 47 */ 70, 0 },
80 { /* 48 */ 50, 0 },
81 { /* 49 */ 49, 0 },
82 { /* 50 */ 71, 0 },
83 { /* 51 */ 6, 7 },
84 { /* 52 */ 7, 8 },
85 { /* 53 */ 8, 9 },
86 { /* 54 */ 9, 10 },
87 { /* 55 */ 10, 11 },
88 { /* 56 */ 11, 12 },
89 { /* 57 */ 72, 0 },
90 { /* 58 */ 48, 0 },
91 { /* 59 */ 73, 0 },
92 { /* 60 */ 47, 0 },
93 { /* 61 */ 74, 0 },
94 { /* 62 */ 46, 0 },
95 { /* 63 */ 6, 7 },
96 { /* 64 */ 7, 8 },
97 { /* 65 */ 8, 9 },
98 { /* 66 */ 9, 10 },
99 { /* 67 */ 10, 11 },
100 { /* 68 */ 11, 12 },
101 { /* 69 */ 76, 0 },
102 { /* 70 */ 75, 0 },
103 { /* 71 */ 77, 0 },
104 { /* 72 */ 78, 0 },
105 { /* 73 */ 45, 0 },
106 { /* 74 */ 43, 0 },
107 { /* 75 */ 6, 7 },
108 { /* 76 */ 7, 8 },
109 { /* 77 */ 8, 9 },
110 { /* 78 */ 9, 10 },
111 { /* 79 */ 10, 11 },
112 { /* 80 */ 11, 12 },
113 { /* 81 */ 44, 0 },
114 { /* 82 */ 79, 0 },
115 { /* 83 */ 42, 0 },
116 { /* 84 */ 41, 0 },
117 { /* 85 */ 80, 0 },
118 { /* 86 */ 40, 0 },
119 { /* 87 */ 6, 7 },
120 { /* 88 */ 7, 8 },
121 { /* 89 */ 8, 9 },
122 { /* 90 */ 9, 10 },
123 { /* 91 */ 10, 11 },
124 { /* 92 */ 11, 12 },
125 { /* 93 */ 81, 0 },
126 { /* 94 */ 39, 0 },
127 { /* 95 */ 82, 0 },
128 { /* 96 */ 38, 0 },
129 { /* 97 */ 83, 0 },
130 { /* 98 */ 7, 8 },
131 { /* 99 */ 8, 9 },
132 { /* 00 */ 9, 10 },
133 { /* 01 */ 10, 11 },
134 { /* 02 */ 11, 12 },
135 { /* 03 */ 12, 13 },
136 { /* 04 */ 13, 14 },
137 { /* 05 */ 37, 0 },
138 { /* 06 */ 35, 0 },
139 { /* 07 */ 85, 0 },
140 { /* 08 */ 33, 0 },
141 { /* 09 */ 36, 0 },
142 { /* 10 */ 34, 0 },
143 { /* 11 */ 84, 0 },
144 { /* 12 */ 32, 0 },
145 { /* 13 */ 6, 7 },
146 { /* 14 */ 7, 8 },
147 { /* 15 */ 8, 9 },
148 { /* 16 */ 9, 10 },
149 { /* 17 */ 10, 11 },
150 { /* 18 */ 11, 12 },
151 { /* 19 */ 87, 0 },
152 { /* 20 */ 89, 0 },
153 { /* 21 */ 30, 0 },
154 { /* 22 */ 31, 0 },
155 { /* 23 */ 8, 9 },
156 { /* 24 */ 9, 10 },
157 { /* 25 */ 10, 11 },
158 { /* 26 */ 11, 12 },
159 { /* 27 */ 12, 13 },
160 { /* 28 */ 13, 14 },
161 { /* 29 */ 14, 15 },
162 { /* 30 */ 15, 16 },
163 { /* 31 */ 86, 0 },
164 { /* 32 */ 29, 0 },
165 { /* 33 */ 26, 0 },
166 { /* 34 */ 27, 0 },
167 { /* 35 */ 28, 0 },
168 { /* 36 */ 24, 0 },
169 { /* 37 */ 88, 0 },
170 { /* 38 */ 9, 10 },
171 { /* 39 */ 10, 11 },
172 { /* 40 */ 11, 12 },
173 { /* 41 */ 12, 13 },
174 { /* 42 */ 13, 14 },
175 { /* 43 */ 14, 15 },
176 { /* 44 */ 15, 16 },
177 { /* 45 */ 16, 17 },
178 { /* 46 */ 17, 18 },
179 { /* 47 */ 25, 0 },
180 { /* 48 */ 22, 0 },
181 { /* 49 */ 23, 0 },
182 { /* 50 */ 15, 16 },
183 { /* 51 */ 16, 17 },
184 { /* 52 */ 17, 18 },
185 { /* 53 */ 18, 19 },
186 { /* 54 */ 19, 20 },
187 { /* 55 */ 20, 21 },
188 { /* 56 */ 21, 22 },
189 { /* 57 */ 22, 23 },
190 { /* 58 */ 23, 24 },
191 { /* 59 */ 24, 25 },
192 { /* 60 */ 25, 26 },
193 { /* 61 */ 26, 27 },
194 { /* 62 */ 27, 28 },
195 { /* 63 */ 28, 29 },
196 { /* 64 */ 29, 30 },
197 { /* 65 */ 90, 0 },
198 { /* 66 */ 21, 0 },
199 { /* 67 */ 19, 0 },
200 { /* 68 */ 3, 0 },
201 { /* 69 */ 1, 0 },
202 { /* 70 */ 2, 0 },
203 { /* 71 */ 0, 0 },
204 { /* 72 */ 23, 24 },
205 { /* 73 */ 24, 25 },
206 { /* 74 */ 25, 26 },
207 { /* 75 */ 26, 27 },
208 { /* 76 */ 27, 28 },
209 { /* 77 */ 28, 29 },
210 { /* 78 */ 29, 30 },
211 { /* 79 */ 30, 31 },
212 { /* 80 */ 31, 32 },
213 { /* 81 */ 32, 33 },
214 { /* 82 */ 33, 34 },
215 { /* 83 */ 34, 35 },
216 { /* 84 */ 35, 36 },
217 { /* 85 */ 36, 37 },
218 { /* 86 */ 37, 38 },
219 { /* 87 */ 38, 39 },
220 { /* 88 */ 39, 40 },
221 { /* 89 */ 40, 41 },
222 { /* 90 */ 41, 42 },
223 { /* 91 */ 42, 43 },
224 { /* 92 */ 43, 44 },
225 { /* 93 */ 44, 45 },
226 { /* 94 */ 45, 46 },
227 { /* 95 */ 98, 0 },
228 { /* 96 */ 99, 0 },
229 { /* 97 */ 100, 0 },
230 { /* 98 */ 101, 0 },
231 { /* 99 */ 102, 0 },
232 { /* 00 */ 117, 0 },
233 { /* 01 */ 97, 0 },
234 { /* 02 */ 91, 0 },
235 { /* 03 */ 92, 0 },
236 { /* 04 */ 93, 0 },
237 { /* 05 */ 94, 0 },
238 { /* 06 */ 95, 0 },
239 { /* 07 */ 96, 0 },
240 { /* 08 */ 104, 0 },
241 { /* 09 */ 111, 0 },
242 { /* 10 */ 112, 0 },
243 { /* 11 */ 113, 0 },
244 { /* 12 */ 114, 0 },
245 { /* 13 */ 115, 0 },
246 { /* 14 */ 116, 0 },
247 { /* 15 */ 110, 0 },
248 { /* 16 */ 105, 0 },
249 { /* 17 */ 106, 0 },
250 { /* 18 */ 107, 0 },
251 { /* 19 */ 108, 0 },
252 { /* 20 */ 109, 0 },
253 { /* 21 */ 118, 0 },
254 { /* 22 */ 6, 0 },
255 { /* 23 */ 8, 0 },
256 { /* 24 */ 9, 0 },
257 { /* 25 */ 10, 0 },
258 { /* 26 */ 5, 0 },
259 { /* 27 */ 103, 0 },
260 { /* 28 */ 120, 0 },
261 { /* 29 */ 119, 0 },
262 { /* 30 */ 4, 0 },
263 { /* 31 */ 7, 0 },
264 { /* 32 */ 15, 0 },
265 { /* 33 */ 16, 0 },
266 { /* 34 */ 18, 0 },
267 { /* 35 */ 20, 0 },
268 { /* 36 */ 17, 0 },
269 { /* 37 */ 11, 0 },
270 { /* 38 */ 12, 0 },
271 { /* 39 */ 14, 0 },
272 { /* 40 */ 13, 0 }
273};
diff --git a/apps/codecs/libfaad/common.c b/apps/codecs/libfaad/common.c
new file mode 100644
index 0000000000..c0676b479f
--- /dev/null
+++ b/apps/codecs/libfaad/common.c
@@ -0,0 +1,519 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28/* just some common functions that could be used anywhere */
29
30#include "common.h"
31#include "structs.h"
32
33#include <stdlib.h>
34#include "syntax.h"
35
36
37/* Returns the sample rate index based on the samplerate */
38uint8_t get_sr_index(const uint32_t samplerate)
39{
40 if (92017 <= samplerate) return 0;
41 if (75132 <= samplerate) return 1;
42 if (55426 <= samplerate) return 2;
43 if (46009 <= samplerate) return 3;
44 if (37566 <= samplerate) return 4;
45 if (27713 <= samplerate) return 5;
46 if (23004 <= samplerate) return 6;
47 if (18783 <= samplerate) return 7;
48 if (13856 <= samplerate) return 8;
49 if (11502 <= samplerate) return 9;
50 if (9391 <= samplerate) return 10;
51 if (16428320 <= samplerate) return 11;
52
53 return 11;
54}
55
56/* Returns the sample rate based on the sample rate index */
57uint32_t get_sample_rate(const uint8_t sr_index)
58{
59 static const uint32_t sample_rates[] =
60 {
61 96000, 88200, 64000, 48000, 44100, 32000,
62 24000, 22050, 16000, 12000, 11025, 8000
63 };
64
65 if (sr_index < 12)
66 return sample_rates[sr_index];
67
68 return 0;
69}
70
71uint8_t max_pred_sfb(const uint8_t sr_index)
72{
73 static const uint8_t pred_sfb_max[] =
74 {
75 33, 33, 38, 40, 40, 40, 41, 41, 37, 37, 37, 34
76 };
77
78
79 if (sr_index < 12)
80 return pred_sfb_max[sr_index];
81
82 return 0;
83}
84
85uint8_t max_tns_sfb(const uint8_t sr_index, const uint8_t object_type,
86 const uint8_t is_short)
87{
88 /* entry for each sampling rate
89 * 1 Main/LC long window
90 * 2 Main/LC short window
91 * 3 SSR long window
92 * 4 SSR short window
93 */
94 static const uint8_t tns_sbf_max[][4] =
95 {
96 {31, 9, 28, 7}, /* 96000 */
97 {31, 9, 28, 7}, /* 88200 */
98 {34, 10, 27, 7}, /* 64000 */
99 {40, 14, 26, 6}, /* 48000 */
100 {42, 14, 26, 6}, /* 44100 */
101 {51, 14, 26, 6}, /* 32000 */
102 {46, 14, 29, 7}, /* 24000 */
103 {46, 14, 29, 7}, /* 22050 */
104 {42, 14, 23, 8}, /* 16000 */
105 {42, 14, 23, 8}, /* 12000 */
106 {42, 14, 23, 8}, /* 11025 */
107 {39, 14, 19, 7}, /* 8000 */
108 {39, 14, 19, 7}, /* 7350 */
109 {0,0,0,0},
110 {0,0,0,0},
111 {0,0,0,0}
112 };
113 uint8_t i = 0;
114
115 if (is_short) i++;
116 if (object_type == SSR) i += 2;
117
118 return tns_sbf_max[sr_index][i];
119}
120
121/* Returns 0 if an object type is decodable, otherwise returns -1 */
122int8_t can_decode_ot(const uint8_t object_type)
123{
124 switch (object_type)
125 {
126 case LC:
127 return 0;
128 case MAIN:
129#ifdef MAIN_DEC
130 return 0;
131#else
132 return -1;
133#endif
134 case SSR:
135#ifdef SSR_DEC
136 return 0;
137#else
138 return -1;
139#endif
140 case LTP:
141#ifdef LTP_DEC
142 return 0;
143#else
144 return -1;
145#endif
146
147 /* ER object types */
148#ifdef ERROR_RESILIENCE
149 case ER_LC:
150#ifdef DRM
151 case DRM_ER_LC:
152#endif
153 return 0;
154 case ER_LTP:
155#ifdef LTP_DEC
156 return 0;
157#else
158 return -1;
159#endif
160 case LD:
161#ifdef LD_DEC
162 return 0;
163#else
164 return -1;
165#endif
166#endif
167 }
168
169 return -1;
170}
171
172void *faad_malloc(size_t size)
173{
174#if 0 // defined(_WIN32) && !defined(_WIN32_WCE)
175 return _aligned_malloc(size, 16);
176#else // #ifdef 0
177 return malloc(size);
178#endif // #ifdef 0
179}
180
181/* common free function */
182void faad_free(void *b)
183{
184#if 0 // defined(_WIN32) && !defined(_WIN32_WCE)
185 _aligned_free(b);
186#else
187 free(b);
188}
189#endif
190
191static const uint8_t Parity [256] = { // parity
192 0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,
193 1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,
194 1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,
195 0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,
196 1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,
197 0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,
198 0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,
199 1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0
200};
201
202static uint32_t __r1 = 1;
203static uint32_t __r2 = 1;
204
205
206/*
207 * This is a simple random number generator with good quality for audio purposes.
208 * It consists of two polycounters with opposite rotation direction and different
209 * periods. The periods are coprime, so the total period is the product of both.
210 *
211 * -------------------------------------------------------------------------------------------------
212 * +-> |31:30:29:28:27:26:25:24:23:22:21:20:19:18:17:16:15:14:13:12:11:10: 9: 8: 7: 6: 5: 4: 3: 2: 1: 0|
213 * | -------------------------------------------------------------------------------------------------
214 * | | | | | | |
215 * | +--+--+--+-XOR-+--------+
216 * | |
217 * +--------------------------------------------------------------------------------------+
218 *
219 * -------------------------------------------------------------------------------------------------
220 * |31:30:29:28:27:26:25:24:23:22:21:20:19:18:17:16:15:14:13:12:11:10: 9: 8: 7: 6: 5: 4: 3: 2: 1: 0| <-+
221 * ------------------------------------------------------------------------------------------------- |
222 * | | | | |
223 * +--+----XOR----+--+ |
224 * | |
225 * +----------------------------------------------------------------------------------------+
226 *
227 *
228 * The first has an period of 3*5*17*257*65537, the second of 7*47*73*178481,
229 * which gives a period of 18.410.713.077.675.721.215. The result is the
230 * XORed values of both generators.
231 */
232uint32_t random_int(void)
233{
234 uint32_t t1, t2, t3, t4;
235
236 t3 = t1 = __r1; t4 = t2 = __r2; // Parity calculation is done via table lookup, this is also available
237 t1 &= 0xF5; t2 >>= 25; // on CPUs without parity, can be implemented in C and avoid unpredictable
238 t1 = Parity [t1]; t2 &= 0x63; // jumps and slow rotate through the carry flag operations.
239 t1 <<= 31; t2 = Parity [t2];
240
241 return (__r1 = (t3 >> 1) | t1 ) ^ (__r2 = (t4 + t4) | t2 );
242}
243
244uint32_t ones32(uint32_t x)
245{
246 x -= ((x >> 1) & 0x55555555);
247 x = (((x >> 2) & 0x33333333) + (x & 0x33333333));
248 x = (((x >> 4) + x) & 0x0f0f0f0f);
249 x += (x >> 8);
250 x += (x >> 16);
251
252 return (x & 0x0000003f);
253}
254
255uint32_t floor_log2(uint32_t x)
256{
257#if 1
258 x |= (x >> 1);
259 x |= (x >> 2);
260 x |= (x >> 4);
261 x |= (x >> 8);
262 x |= (x >> 16);
263
264 return (ones32(x) - 1);
265#else
266 uint32_t count = 0;
267
268 while (x >>= 1)
269 count++;
270
271 return count;
272#endif
273}
274
275/* returns position of first bit that is not 0 from msb,
276 * starting count at lsb */
277uint32_t wl_min_lzc(uint32_t x)
278{
279#if 1
280 x |= (x >> 1);
281 x |= (x >> 2);
282 x |= (x >> 4);
283 x |= (x >> 8);
284 x |= (x >> 16);
285
286 return (ones32(x));
287#else
288 uint32_t count = 0;
289
290 while (x >>= 1)
291 count++;
292
293 return (count + 1);
294#endif
295}
296
297#ifdef FIXED_POINT
298
299#define TABLE_BITS 6
300/* just take the maximum number of bits for interpolation */
301#define INTERP_BITS (REAL_BITS-TABLE_BITS)
302
303static const real_t pow2_tab[] = {
304 REAL_CONST(1.000000000000000), REAL_CONST(1.010889286051701), REAL_CONST(1.021897148654117),
305 REAL_CONST(1.033024879021228), REAL_CONST(1.044273782427414), REAL_CONST(1.055645178360557),
306 REAL_CONST(1.067140400676824), REAL_CONST(1.078760797757120), REAL_CONST(1.090507732665258),
307 REAL_CONST(1.102382583307841), REAL_CONST(1.114386742595892), REAL_CONST(1.126521618608242),
308 REAL_CONST(1.138788634756692), REAL_CONST(1.151189229952983), REAL_CONST(1.163724858777578),
309 REAL_CONST(1.176396991650281), REAL_CONST(1.189207115002721), REAL_CONST(1.202156731452703),
310 REAL_CONST(1.215247359980469), REAL_CONST(1.228480536106870), REAL_CONST(1.241857812073484),
311 REAL_CONST(1.255380757024691), REAL_CONST(1.269050957191733), REAL_CONST(1.282870016078778),
312 REAL_CONST(1.296839554651010), REAL_CONST(1.310961211524764), REAL_CONST(1.325236643159741),
313 REAL_CONST(1.339667524053303), REAL_CONST(1.354255546936893), REAL_CONST(1.369002422974591),
314 REAL_CONST(1.383909881963832), REAL_CONST(1.398979672538311), REAL_CONST(1.414213562373095),
315 REAL_CONST(1.429613338391970), REAL_CONST(1.445180806977047), REAL_CONST(1.460917794180647),
316 REAL_CONST(1.476826145939499), REAL_CONST(1.492907728291265), REAL_CONST(1.509164427593423),
317 REAL_CONST(1.525598150744538), REAL_CONST(1.542210825407941), REAL_CONST(1.559004400237837),
318 REAL_CONST(1.575980845107887), REAL_CONST(1.593142151342267), REAL_CONST(1.610490331949254),
319 REAL_CONST(1.628027421857348), REAL_CONST(1.645755478153965), REAL_CONST(1.663676580326736),
320 REAL_CONST(1.681792830507429), REAL_CONST(1.700106353718524), REAL_CONST(1.718619298122478),
321 REAL_CONST(1.737333835273706), REAL_CONST(1.756252160373300), REAL_CONST(1.775376492526521),
322 REAL_CONST(1.794709075003107), REAL_CONST(1.814252175500399), REAL_CONST(1.834008086409342),
323 REAL_CONST(1.853979125083386), REAL_CONST(1.874167634110300), REAL_CONST(1.894575981586966),
324 REAL_CONST(1.915206561397147), REAL_CONST(1.936061793492294), REAL_CONST(1.957144124175400),
325 REAL_CONST(1.978456026387951), REAL_CONST(2.000000000000000)
326};
327
328static const real_t log2_tab[] = {
329 REAL_CONST(0.000000000000000), REAL_CONST(0.022367813028455), REAL_CONST(0.044394119358453),
330 REAL_CONST(0.066089190457772), REAL_CONST(0.087462841250339), REAL_CONST(0.108524456778169),
331 REAL_CONST(0.129283016944966), REAL_CONST(0.149747119504682), REAL_CONST(0.169925001442312),
332 REAL_CONST(0.189824558880017), REAL_CONST(0.209453365628950), REAL_CONST(0.228818690495881),
333 REAL_CONST(0.247927513443585), REAL_CONST(0.266786540694901), REAL_CONST(0.285402218862248),
334 REAL_CONST(0.303780748177103), REAL_CONST(0.321928094887362), REAL_CONST(0.339850002884625),
335 REAL_CONST(0.357552004618084), REAL_CONST(0.375039431346925), REAL_CONST(0.392317422778760),
336 REAL_CONST(0.409390936137702), REAL_CONST(0.426264754702098), REAL_CONST(0.442943495848728),
337 REAL_CONST(0.459431618637297), REAL_CONST(0.475733430966398), REAL_CONST(0.491853096329675),
338 REAL_CONST(0.507794640198696), REAL_CONST(0.523561956057013), REAL_CONST(0.539158811108031),
339 REAL_CONST(0.554588851677637), REAL_CONST(0.569855608330948), REAL_CONST(0.584962500721156),
340 REAL_CONST(0.599912842187128), REAL_CONST(0.614709844115208), REAL_CONST(0.629356620079610),
341 REAL_CONST(0.643856189774725), REAL_CONST(0.658211482751795), REAL_CONST(0.672425341971496),
342 REAL_CONST(0.686500527183218), REAL_CONST(0.700439718141092), REAL_CONST(0.714245517666123),
343 REAL_CONST(0.727920454563199), REAL_CONST(0.741466986401147), REAL_CONST(0.754887502163469),
344 REAL_CONST(0.768184324776926), REAL_CONST(0.781359713524660), REAL_CONST(0.794415866350106),
345 REAL_CONST(0.807354922057604), REAL_CONST(0.820178962415188), REAL_CONST(0.832890014164742),
346 REAL_CONST(0.845490050944375), REAL_CONST(0.857980995127572), REAL_CONST(0.870364719583405),
347 REAL_CONST(0.882643049361841), REAL_CONST(0.894817763307943), REAL_CONST(0.906890595608519),
348 REAL_CONST(0.918863237274595), REAL_CONST(0.930737337562886), REAL_CONST(0.942514505339240),
349 REAL_CONST(0.954196310386875), REAL_CONST(0.965784284662087), REAL_CONST(0.977279923499917),
350 REAL_CONST(0.988684686772166), REAL_CONST(1.000000000000000)
351};
352
353real_t pow2_fix(real_t val)
354{
355 uint32_t x1, x2;
356 uint32_t errcorr;
357 uint32_t index_frac;
358 real_t retval;
359 int32_t whole = (val >> REAL_BITS);
360
361 /* rest = [0..1] */
362 int32_t rest = val - (whole << REAL_BITS);
363
364 /* index into pow2_tab */
365 int32_t index = rest >> (REAL_BITS-TABLE_BITS);
366
367
368 if (val == 0)
369 return (1<<REAL_BITS);
370
371 /* leave INTERP_BITS bits */
372 index_frac = rest >> (REAL_BITS-TABLE_BITS-INTERP_BITS);
373 index_frac = index_frac & ((1<<INTERP_BITS)-1);
374
375 if (whole > 0)
376 {
377 retval = 1 << whole;
378 } else {
379 retval = REAL_CONST(1) >> -whole;
380 }
381
382 x1 = pow2_tab[index & ((1<<TABLE_BITS)-1)];
383 x2 = pow2_tab[(index & ((1<<TABLE_BITS)-1)) + 1];
384 errcorr = ( (index_frac*(x2-x1))) >> INTERP_BITS;
385
386 if (whole > 0)
387 {
388 retval = retval * (errcorr + x1);
389 } else {
390 retval = MUL_R(retval, (errcorr + x1));
391 }
392
393 return retval;
394}
395
396int32_t pow2_int(real_t val)
397{
398 uint32_t x1, x2;
399 uint32_t errcorr;
400 uint32_t index_frac;
401 real_t retval;
402 int32_t whole = (val >> REAL_BITS);
403
404 /* rest = [0..1] */
405 int32_t rest = val - (whole << REAL_BITS);
406
407 /* index into pow2_tab */
408 int32_t index = rest >> (REAL_BITS-TABLE_BITS);
409
410
411 if (val == 0)
412 return 1;
413
414 /* leave INTERP_BITS bits */
415 index_frac = rest >> (REAL_BITS-TABLE_BITS-INTERP_BITS);
416 index_frac = index_frac & ((1<<INTERP_BITS)-1);
417
418 if (whole > 0)
419 retval = 1 << whole;
420 else
421 retval = 0;
422
423 x1 = pow2_tab[index & ((1<<TABLE_BITS)-1)];
424 x2 = pow2_tab[(index & ((1<<TABLE_BITS)-1)) + 1];
425 errcorr = ( (index_frac*(x2-x1))) >> INTERP_BITS;
426
427 retval = MUL_R(retval, (errcorr + x1));
428
429 return retval;
430}
431
432/* ld(x) = ld(x*y/y) = ld(x/y) + ld(y), with y=2^N and [1 <= (x/y) < 2] */
433int32_t log2_int(uint32_t val)
434{
435 uint32_t frac;
436 uint32_t whole = (val);
437 int32_t exp = 0;
438 uint32_t index;
439 uint32_t index_frac;
440 uint32_t x1, x2;
441 uint32_t errcorr;
442
443 /* error */
444 if (val == 0)
445 return -10000;
446
447 exp = floor_log2(val);
448 exp -= REAL_BITS;
449
450 /* frac = [1..2] */
451 if (exp >= 0)
452 frac = val >> exp;
453 else
454 frac = val << -exp;
455
456 /* index in the log2 table */
457 index = frac >> (REAL_BITS-TABLE_BITS);
458
459 /* leftover part for linear interpolation */
460 index_frac = frac & ((1<<(REAL_BITS-TABLE_BITS))-1);
461
462 /* leave INTERP_BITS bits */
463 index_frac = index_frac >> (REAL_BITS-TABLE_BITS-INTERP_BITS);
464
465 x1 = log2_tab[index & ((1<<TABLE_BITS)-1)];
466 x2 = log2_tab[(index & ((1<<TABLE_BITS)-1)) + 1];
467
468 /* linear interpolation */
469 /* retval = exp + ((index_frac)*x2 + (1-index_frac)*x1) */
470
471 errcorr = (index_frac * (x2-x1)) >> INTERP_BITS;
472
473 return ((exp+REAL_BITS) << REAL_BITS) + errcorr + x1;
474}
475
476/* ld(x) = ld(x*y/y) = ld(x/y) + ld(y), with y=2^N and [1 <= (x/y) < 2] */
477real_t log2_fix(uint32_t val)
478{
479 uint32_t frac;
480 uint32_t whole = (val >> REAL_BITS);
481 int8_t exp = 0;
482 uint32_t index;
483 uint32_t index_frac;
484 uint32_t x1, x2;
485 uint32_t errcorr;
486
487 /* error */
488 if (val == 0)
489 return -100000;
490
491 exp = floor_log2(val);
492 exp -= REAL_BITS;
493
494 /* frac = [1..2] */
495 if (exp >= 0)
496 frac = val >> exp;
497 else
498 frac = val << -exp;
499
500 /* index in the log2 table */
501 index = frac >> (REAL_BITS-TABLE_BITS);
502
503 /* leftover part for linear interpolation */
504 index_frac = frac & ((1<<(REAL_BITS-TABLE_BITS))-1);
505
506 /* leave INTERP_BITS bits */
507 index_frac = index_frac >> (REAL_BITS-TABLE_BITS-INTERP_BITS);
508
509 x1 = log2_tab[index & ((1<<TABLE_BITS)-1)];
510 x2 = log2_tab[(index & ((1<<TABLE_BITS)-1)) + 1];
511
512 /* linear interpolation */
513 /* retval = exp + ((index_frac)*x2 + (1-index_frac)*x1) */
514
515 errcorr = (index_frac * (x2-x1)) >> INTERP_BITS;
516
517 return (exp << REAL_BITS) + errcorr + x1;
518}
519#endif
diff --git a/apps/codecs/libfaad/common.h b/apps/codecs/libfaad/common.h
new file mode 100644
index 0000000000..efe8288b36
--- /dev/null
+++ b/apps/codecs/libfaad/common.h
@@ -0,0 +1,425 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __COMMON_H__
29#define __COMMON_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#ifdef HAVE_CONFIG_H
36# include "../config.h"
37#endif
38
39#define INLINE __inline
40#if 0 //defined(_WIN32) && !defined(_WIN32_WCE)
41#define ALIGN __declspec(align(16))
42#else
43#define ALIGN
44#endif
45
46#ifndef max
47#define max(a, b) (((a) > (b)) ? (a) : (b))
48#endif
49#ifndef min
50#define min(a, b) (((a) < (b)) ? (a) : (b))
51#endif
52
53/* COMPILE TIME DEFINITIONS */
54
55/* use double precision */
56/* #define USE_DOUBLE_PRECISION */
57/* use fixed point reals */
58//#define FIXED_POINT
59//#define BIG_IQ_TABLE
60
61/* Use if target platform has address generators with autoincrement */
62//#define PREFER_POINTERS
63
64#ifdef _WIN32_WCE
65#define FIXED_POINT
66#endif
67
68
69#define ERROR_RESILIENCE
70
71
72/* Allow decoding of MAIN profile AAC */
73#define MAIN_DEC
74/* Allow decoding of SSR profile AAC */
75//#define SSR_DEC
76/* Allow decoding of LTP profile AAC */
77#define LTP_DEC
78/* Allow decoding of LD profile AAC */
79#define LD_DEC
80/* Allow decoding of scalable profiles */
81//#define SCALABLE_DEC
82/* Allow decoding of Digital Radio Mondiale (DRM) */
83//#define DRM
84//#define DRM_PS
85
86/* LD can't do without LTP */
87#ifdef LD_DEC
88#ifndef ERROR_RESILIENCE
89#define ERROR_RESILIENCE
90#endif
91#ifndef LTP_DEC
92#define LTP_DEC
93#endif
94#endif
95
96#define ALLOW_SMALL_FRAMELENGTH
97
98
99// Define LC_ONLY_DECODER if you want a pure AAC LC decoder (independant of SBR_DEC and PS_DEC)
100//#define LC_ONLY_DECODER
101#ifdef LC_ONLY_DECODER
102 #undef LD_DEC
103 #undef LTP_DEC
104 #undef MAIN_DEC
105 #undef SSR_DEC
106 #undef DRM
107 #undef ALLOW_SMALL_FRAMELENGTH
108 #undef ERROR_RESILIENCE
109#endif
110
111#define SBR_DEC
112//#define SBR_LOW_POWER
113#define PS_DEC
114
115/* FIXED POINT: No MAIN decoding */
116#ifdef FIXED_POINT
117# ifdef MAIN_DEC
118# undef MAIN_DEC
119# endif
120#endif // FIXED_POINT
121
122#ifdef DRM
123# ifndef SCALABLE_DEC
124# define SCALABLE_DEC
125# endif
126#endif
127
128
129#ifdef FIXED_POINT
130#define DIV_R(A, B) (((int64_t)A << REAL_BITS)/B)
131#define DIV_C(A, B) (((int64_t)A << COEF_BITS)/B)
132#else
133#define DIV_R(A, B) ((A)/(B))
134#define DIV_C(A, B) ((A)/(B))
135#endif
136
137#ifndef SBR_LOW_POWER
138#define qmf_t complex_t
139#define QMF_RE(A) RE(A)
140#define QMF_IM(A) IM(A)
141#else
142#define qmf_t real_t
143#define QMF_RE(A) (A)
144#define QMF_IM(A)
145#endif
146
147
148/* END COMPILE TIME DEFINITIONS */
149
150#if defined(_WIN32) && !defined(__MINGW32__)
151
152#include <stdlib.h>
153
154typedef unsigned __int64 uint64_t;
155typedef unsigned __int32 uint32_t;
156typedef unsigned __int16 uint16_t;
157typedef unsigned __int8 uint8_t;
158typedef __int64 int64_t;
159typedef __int32 int32_t;
160typedef __int16 int16_t;
161typedef __int8 int8_t;
162typedef float float32_t;
163
164
165#else
166
167#include <stdio.h>
168#if HAVE_SYS_TYPES_H
169# include <sys/types.h>
170#endif
171#if HAVE_SYS_STAT_H
172# include <sys/stat.h>
173#endif
174#if STDC_HEADERS
175# include <stdlib.h>
176# include <stddef.h>
177#else
178# if HAVE_STDLIB_H
179# include <stdlib.h>
180# endif
181#endif
182#if HAVE_STRING_H
183# if !STDC_HEADERS && HAVE_MEMORY_H
184# include <memory.h>
185# endif
186# include <string.h>
187#endif
188#if HAVE_STRINGS_H
189# include <strings.h>
190#endif
191#if HAVE_INTTYPES_H
192# include <inttypes.h>
193#else
194# if HAVE_STDINT_H
195# include <stdint.h>
196# else
197/* we need these... */
198typedef unsigned long long uint64_t;
199typedef unsigned long uint32_t;
200typedef unsigned short uint16_t;
201typedef unsigned char uint8_t;
202typedef long long int64_t;
203typedef long int32_t;
204typedef short int16_t;
205typedef char int8_t;
206# endif
207#endif
208#if HAVE_UNISTD_H
209# include <unistd.h>
210#endif
211
212#ifndef HAVE_FLOAT32_T
213typedef float float32_t;
214#endif
215
216#if STDC_HEADERS
217# include <string.h>
218#else
219# if !HAVE_STRCHR
220# define strchr index
221# define strrchr rindex
222# endif
223char *strchr(), *strrchr();
224# if !HAVE_MEMCPY
225# define memcpy(d, s, n) bcopy((s), (d), (n))
226# define memmove(d, s, n) bcopy((s), (d), (n))
227# endif
228#endif
229
230#endif
231
232#ifdef WORDS_BIGENDIAN
233#define ARCH_IS_BIG_ENDIAN
234#endif
235
236/* FIXED_POINT doesn't work with MAIN and SSR yet */
237#ifdef FIXED_POINT
238 #undef MAIN_DEC
239 #undef SSR_DEC
240#endif
241
242
243#if defined(FIXED_POINT)
244
245 #include "fixed.h"
246
247#elif defined(USE_DOUBLE_PRECISION)
248
249 typedef double real_t;
250
251 #include <math.h>
252
253 #define MUL_R(A,B) ((A)*(B))
254 #define MUL_C(A,B) ((A)*(B))
255 #define MUL_F(A,B) ((A)*(B))
256
257 /* Complex multiplication */
258 static INLINE void ComplexMult(real_t *y1, real_t *y2,
259 real_t x1, real_t x2, real_t c1, real_t c2)
260 {
261 *y1 = MUL_F(x1, c1) + MUL_F(x2, c2);
262 *y2 = MUL_F(x2, c1) - MUL_F(x1, c2);
263 }
264
265 #define REAL_CONST(A) ((real_t)(A))
266 #define COEF_CONST(A) ((real_t)(A))
267 #define Q2_CONST(A) ((real_t)(A))
268 #define FRAC_CONST(A) ((real_t)(A)) /* pure fractional part */
269
270#else /* Normal floating point operation */
271
272 typedef float real_t;
273
274 #define MUL_R(A,B) ((A)*(B))
275 #define MUL_C(A,B) ((A)*(B))
276 #define MUL_F(A,B) ((A)*(B))
277
278 #define REAL_CONST(A) ((real_t)(A))
279 #define COEF_CONST(A) ((real_t)(A))
280 #define Q2_CONST(A) ((real_t)(A))
281 #define FRAC_CONST(A) ((real_t)(A)) /* pure fractional part */
282
283 /* Complex multiplication */
284 static INLINE void ComplexMult(real_t *y1, real_t *y2,
285 real_t x1, real_t x2, real_t c1, real_t c2)
286 {
287 *y1 = MUL_F(x1, c1) + MUL_F(x2, c2);
288 *y2 = MUL_F(x2, c1) - MUL_F(x1, c2);
289 }
290
291
292 #if defined(_WIN32) && !defined(__MINGW32__)
293 #define HAS_LRINTF
294 static INLINE int lrintf(float f)
295 {
296 int i;
297 __asm
298 {
299 fld f
300 fistp i
301 }
302 return i;
303 }
304 #elif (defined(__i386__) && defined(__GNUC__))
305 #define HAS_LRINTF
306 // from http://www.stereopsis.com/FPU.html
307 static INLINE int lrintf(float f)
308 {
309 int i;
310 __asm__ __volatile__ (
311 "flds %1 \n\t"
312 "fistpl %0 \n\t"
313 : "=m" (i)
314 : "m" (f));
315 return i;
316 }
317 #endif
318
319
320 #ifdef __ICL /* only Intel C compiler has fmath ??? */
321
322 #include <mathf.h>
323
324 #define sin sinf
325 #define cos cosf
326 #define log logf
327 #define floor floorf
328 #define ceil ceilf
329 #define sqrt sqrtf
330
331 #else
332
333#ifdef HAVE_LRINTF
334# define HAS_LRINTF
335# define _ISOC9X_SOURCE 1
336# define _ISOC99_SOURCE 1
337# define __USE_ISOC9X 1
338# define __USE_ISOC99 1
339#endif
340
341 #include <math.h>
342
343#ifdef HAVE_SINF
344# define sin sinf
345#error
346#endif
347#ifdef HAVE_COSF
348# define cos cosf
349#endif
350#ifdef HAVE_LOGF
351# define log logf
352#endif
353#ifdef HAVE_EXPF
354# define exp expf
355#endif
356#ifdef HAVE_FLOORF
357# define floor floorf
358#endif
359#ifdef HAVE_CEILF
360# define ceil ceilf
361#endif
362#ifdef HAVE_SQRTF
363# define sqrt sqrtf
364#endif
365
366 #endif
367
368#endif
369
370#ifndef HAS_LRINTF
371/* standard cast */
372#define lrintf(f) ((int32_t)(f))
373#endif
374
375typedef real_t complex_t[2];
376#define RE(A) A[0]
377#define IM(A) A[1]
378
379
380/* common functions */
381uint8_t cpu_has_sse(void);
382uint32_t random_int(void);
383uint32_t ones32(uint32_t x);
384uint32_t floor_log2(uint32_t x);
385uint32_t wl_min_lzc(uint32_t x);
386#ifdef FIXED_POINT
387#define LOG2_MIN_INF REAL_CONST(-10000)
388int32_t log2_int(uint32_t val);
389int32_t log2_fix(uint32_t val);
390int32_t pow2_int(real_t val);
391real_t pow2_fix(real_t val);
392#endif
393uint8_t get_sr_index(const uint32_t samplerate);
394uint8_t max_pred_sfb(const uint8_t sr_index);
395uint8_t max_tns_sfb(const uint8_t sr_index, const uint8_t object_type,
396 const uint8_t is_short);
397uint32_t get_sample_rate(const uint8_t sr_index);
398int8_t can_decode_ot(const uint8_t object_type);
399
400void *faad_malloc(size_t size);
401void faad_free(void *b);
402
403//#define PROFILE
404#ifdef PROFILE
405static int64_t faad_get_ts()
406{
407 __asm
408 {
409 rdtsc
410 }
411}
412#endif
413
414#ifndef M_PI
415#define M_PI 3.14159265358979323846
416#endif
417#ifndef M_PI_2 /* PI/2 */
418#define M_PI_2 1.57079632679489661923
419#endif
420
421
422#ifdef __cplusplus
423}
424#endif
425#endif
diff --git a/apps/codecs/libfaad/decoder.c b/apps/codecs/libfaad/decoder.c
new file mode 100644
index 0000000000..b2c37dadb8
--- /dev/null
+++ b/apps/codecs/libfaad/decoder.c
@@ -0,0 +1,1024 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#include "common.h"
29#include "structs.h"
30
31#include <stdlib.h>
32#include <string.h>
33
34#include "decoder.h"
35#include "mp4.h"
36#include "syntax.h"
37#include "error.h"
38#include "output.h"
39#include "filtbank.h"
40#include "drc.h"
41#ifdef SBR_DEC
42#include "sbr_dec.h"
43#include "sbr_syntax.h"
44#endif
45#ifdef SSR_DEC
46#include "ssr.h"
47#endif
48
49#ifdef ANALYSIS
50uint16_t dbg_count;
51#endif
52
53/* static function declarations */
54static void* aac_frame_decode(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
55 uint8_t *buffer, uint32_t buffer_size,
56 void **sample_buffer, uint32_t sample_buffer_size);
57static void create_channel_config(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo);
58
59
60char* NEAACDECAPI NeAACDecGetErrorMessage(uint8_t errcode)
61{
62 if (errcode >= NUM_ERROR_MESSAGES)
63 return NULL;
64 return err_msg[errcode];
65}
66
67uint32_t NEAACDECAPI NeAACDecGetCapabilities(void)
68{
69 uint32_t cap = 0;
70
71 /* can't do without it */
72 cap += LC_DEC_CAP;
73
74#ifdef MAIN_DEC
75 cap += MAIN_DEC_CAP;
76#endif
77#ifdef LTP_DEC
78 cap += LTP_DEC_CAP;
79#endif
80#ifdef LD_DEC
81 cap += LD_DEC_CAP;
82#endif
83#ifdef ERROR_RESILIENCE
84 cap += ERROR_RESILIENCE_CAP;
85#endif
86#ifdef FIXED_POINT
87 cap += FIXED_POINT_CAP;
88#endif
89
90 return cap;
91}
92
93NeAACDecHandle NEAACDECAPI NeAACDecOpen(void)
94{
95 uint8_t i;
96 NeAACDecHandle hDecoder = NULL;
97
98 if ((hDecoder = (NeAACDecHandle)faad_malloc(sizeof(NeAACDecStruct))) == NULL)
99 return NULL;
100
101 memset(hDecoder, 0, sizeof(NeAACDecStruct));
102
103 hDecoder->config.outputFormat = FAAD_FMT_16BIT;
104 hDecoder->config.defObjectType = MAIN;
105 hDecoder->config.defSampleRate = 44100; /* Default: 44.1kHz */
106 hDecoder->config.downMatrix = 0;
107 hDecoder->adts_header_present = 0;
108 hDecoder->adif_header_present = 0;
109#ifdef ERROR_RESILIENCE
110 hDecoder->aacSectionDataResilienceFlag = 0;
111 hDecoder->aacScalefactorDataResilienceFlag = 0;
112 hDecoder->aacSpectralDataResilienceFlag = 0;
113#endif
114 hDecoder->frameLength = 1024;
115
116 hDecoder->frame = 0;
117 hDecoder->sample_buffer = NULL;
118
119 for (i = 0; i < MAX_CHANNELS; i++)
120 {
121 hDecoder->window_shape_prev[i] = 0;
122 hDecoder->time_out[i] = NULL;
123 hDecoder->fb_intermed[i] = NULL;
124#ifdef SSR_DEC
125 hDecoder->ssr_overlap[i] = NULL;
126 hDecoder->prev_fmd[i] = NULL;
127#endif
128#ifdef MAIN_DEC
129 hDecoder->pred_stat[i] = NULL;
130#endif
131#ifdef LTP_DEC
132 hDecoder->ltp_lag[i] = 0;
133 hDecoder->lt_pred_stat[i] = NULL;
134#endif
135 }
136
137#ifdef SBR_DEC
138 for (i = 0; i < MAX_SYNTAX_ELEMENTS; i++)
139 {
140 hDecoder->sbr[i] = NULL;
141 }
142#endif
143
144 hDecoder->drc = drc_init(REAL_CONST(1.0), REAL_CONST(1.0));
145
146 return hDecoder;
147}
148
149NeAACDecConfigurationPtr NEAACDECAPI NeAACDecGetCurrentConfiguration(NeAACDecHandle hDecoder)
150{
151 if (hDecoder)
152 {
153 NeAACDecConfigurationPtr config = &(hDecoder->config);
154
155 return config;
156 }
157
158 return NULL;
159}
160
161uint8_t NEAACDECAPI NeAACDecSetConfiguration(NeAACDecHandle hDecoder,
162 NeAACDecConfigurationPtr config)
163{
164 if (hDecoder && config)
165 {
166 /* check if we can decode this object type */
167 if (can_decode_ot(config->defObjectType) < 0)
168 return 0;
169 hDecoder->config.defObjectType = config->defObjectType;
170
171 /* samplerate: anything but 0 should be possible */
172 if (config->defSampleRate == 0)
173 return 0;
174 hDecoder->config.defSampleRate = config->defSampleRate;
175
176 /* check output format */
177#ifdef FIXED_POINT
178 if ((config->outputFormat < 1) || (config->outputFormat > 4))
179 return 0;
180#else
181 if ((config->outputFormat < 1) || (config->outputFormat > 5))
182 return 0;
183#endif
184 hDecoder->config.outputFormat = config->outputFormat;
185
186 if (config->downMatrix > 1)
187 return 0;
188 hDecoder->config.downMatrix = config->downMatrix;
189
190 /* OK */
191 return 1;
192 }
193
194 return 0;
195}
196
197int32_t NEAACDECAPI NeAACDecInit(NeAACDecHandle hDecoder, uint8_t *buffer,
198 uint32_t buffer_size,
199 uint32_t *samplerate, uint8_t *channels)
200{
201 uint32_t bits = 0;
202 bitfile ld;
203 adif_header adif;
204 adts_header adts;
205
206 if ((hDecoder == NULL) || (samplerate == NULL) || (channels == NULL))
207 return -1;
208
209 hDecoder->sf_index = get_sr_index(hDecoder->config.defSampleRate);
210 hDecoder->object_type = hDecoder->config.defObjectType;
211 *samplerate = get_sample_rate(hDecoder->sf_index);
212 *channels = 1;
213
214 if (buffer != NULL)
215 {
216 faad_initbits(&ld, buffer, buffer_size);
217
218 /* Check if an ADIF header is present */
219 if ((buffer[0] == 'A') && (buffer[1] == 'D') &&
220 (buffer[2] == 'I') && (buffer[3] == 'F'))
221 {
222 hDecoder->adif_header_present = 1;
223
224 get_adif_header(&adif, &ld);
225 faad_byte_align(&ld);
226
227 hDecoder->sf_index = adif.pce[0].sf_index;
228 hDecoder->object_type = adif.pce[0].object_type + 1;
229
230 *samplerate = get_sample_rate(hDecoder->sf_index);
231 *channels = adif.pce[0].channels;
232
233 memcpy(&(hDecoder->pce), &(adif.pce[0]), sizeof(program_config));
234 hDecoder->pce_set = 1;
235
236 bits = bit2byte(faad_get_processed_bits(&ld));
237
238 /* Check if an ADTS header is present */
239 } else if (faad_showbits(&ld, 12) == 0xfff) {
240 hDecoder->adts_header_present = 1;
241
242 adts.old_format = hDecoder->config.useOldADTSFormat;
243 adts_frame(&adts, &ld);
244
245 hDecoder->sf_index = adts.sf_index;
246 hDecoder->object_type = adts.profile + 1;
247
248 *samplerate = get_sample_rate(hDecoder->sf_index);
249 *channels = (adts.channel_configuration > 6) ?
250 2 : adts.channel_configuration;
251 }
252
253 if (ld.error)
254 {
255 faad_endbits(&ld);
256 return -1;
257 }
258 faad_endbits(&ld);
259 }
260 hDecoder->channelConfiguration = *channels;
261
262#if (defined(PS_DEC) || defined(DRM_PS))
263 /* check if we have a mono file */
264 if (*channels == 1)
265 {
266 /* upMatrix to 2 channels for implicit signalling of PS */
267 *channels = 2;
268 }
269#endif
270
271#ifdef SBR_DEC
272 /* implicit signalling */
273 if (*samplerate <= 24000 && !(hDecoder->config.dontUpSampleImplicitSBR))
274 {
275 *samplerate *= 2;
276 hDecoder->forceUpSampling = 1;
277 } else if (*samplerate > 24000 && !(hDecoder->config.dontUpSampleImplicitSBR)) {
278 hDecoder->downSampledSBR = 1;
279 }
280#endif
281
282 /* must be done before frameLength is divided by 2 for LD */
283#ifdef SSR_DEC
284 if (hDecoder->object_type == SSR)
285 hDecoder->fb = ssr_filter_bank_init(hDecoder->frameLength/SSR_BANDS);
286 else
287#endif
288 hDecoder->fb = filter_bank_init(hDecoder->frameLength);
289
290#ifdef LD_DEC
291 if (hDecoder->object_type == LD)
292 hDecoder->frameLength >>= 1;
293#endif
294
295 if (can_decode_ot(hDecoder->object_type) < 0)
296 return -1;
297
298 return bits;
299}
300
301/* Init the library using a DecoderSpecificInfo */
302int8_t NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder, uint8_t *pBuffer,
303 uint32_t SizeOfDecoderSpecificInfo,
304 uint32_t *samplerate, uint8_t *channels)
305{
306 int8_t rc;
307 mp4AudioSpecificConfig mp4ASC;
308
309 if((hDecoder == NULL)
310 || (pBuffer == NULL)
311 || (SizeOfDecoderSpecificInfo < 2)
312 || (samplerate == NULL)
313 || (channels == NULL))
314 {
315 return -1;
316 }
317
318 hDecoder->adif_header_present = 0;
319 hDecoder->adts_header_present = 0;
320
321 /* decode the audio specific config */
322 rc = AudioSpecificConfig2(pBuffer, SizeOfDecoderSpecificInfo, &mp4ASC,
323 &(hDecoder->pce));
324
325 /* copy the relevant info to the decoder handle */
326 *samplerate = mp4ASC.samplingFrequency;
327 if (mp4ASC.channelsConfiguration)
328 {
329 *channels = mp4ASC.channelsConfiguration;
330 } else {
331 *channels = hDecoder->pce.channels;
332 hDecoder->pce_set = 1;
333 }
334#if (defined(PS_DEC) || defined(DRM_PS))
335 /* check if we have a mono file */
336 if (*channels == 1)
337 {
338 /* upMatrix to 2 channels for implicit signalling of PS */
339 *channels = 2;
340 }
341#endif
342 hDecoder->sf_index = mp4ASC.samplingFrequencyIndex;
343 hDecoder->object_type = mp4ASC.objectTypeIndex;
344#ifdef ERROR_RESILIENCE
345 hDecoder->aacSectionDataResilienceFlag = mp4ASC.aacSectionDataResilienceFlag;
346 hDecoder->aacScalefactorDataResilienceFlag = mp4ASC.aacScalefactorDataResilienceFlag;
347 hDecoder->aacSpectralDataResilienceFlag = mp4ASC.aacSpectralDataResilienceFlag;
348#endif
349#ifdef SBR_DEC
350 hDecoder->sbr_present_flag = mp4ASC.sbr_present_flag;
351 hDecoder->downSampledSBR = mp4ASC.downSampledSBR;
352 if (hDecoder->config.dontUpSampleImplicitSBR == 0)
353 hDecoder->forceUpSampling = mp4ASC.forceUpSampling;
354 else
355 hDecoder->forceUpSampling = 0;
356
357 /* AAC core decoder samplerate is 2 times as low */
358 if (((hDecoder->sbr_present_flag == 1)&&(!hDecoder->downSampledSBR)) || hDecoder->forceUpSampling == 1)
359 {
360 hDecoder->sf_index = get_sr_index(mp4ASC.samplingFrequency / 2);
361 }
362#endif
363
364 if (rc != 0)
365 {
366 return rc;
367 }
368 hDecoder->channelConfiguration = mp4ASC.channelsConfiguration;
369 if (mp4ASC.frameLengthFlag)
370#ifdef ALLOW_SMALL_FRAMELENGTH
371 hDecoder->frameLength = 960;
372#else
373 return -1;
374#endif
375
376 /* must be done before frameLength is divided by 2 for LD */
377#ifdef SSR_DEC
378 if (hDecoder->object_type == SSR)
379 hDecoder->fb = ssr_filter_bank_init(hDecoder->frameLength/SSR_BANDS);
380 else
381#endif
382 hDecoder->fb = filter_bank_init(hDecoder->frameLength);
383
384#ifdef LD_DEC
385 if (hDecoder->object_type == LD)
386 hDecoder->frameLength >>= 1;
387#endif
388
389 return 0;
390}
391
392#ifdef DRM
393int8_t NEAACDECAPI NeAACDecInitDRM(NeAACDecHandle *hDecoder, uint32_t samplerate,
394 uint8_t channels)
395{
396 if (hDecoder == NULL)
397 return 1; /* error */
398
399 NeAACDecClose(*hDecoder);
400
401 *hDecoder = NeAACDecOpen();
402
403 /* Special object type defined for DRM */
404 (*hDecoder)->config.defObjectType = DRM_ER_LC;
405
406 (*hDecoder)->config.defSampleRate = samplerate;
407#ifdef ERROR_RESILIENCE // This shoudl always be defined for DRM
408 (*hDecoder)->aacSectionDataResilienceFlag = 1; /* VCB11 */
409 (*hDecoder)->aacScalefactorDataResilienceFlag = 0; /* no RVLC */
410 (*hDecoder)->aacSpectralDataResilienceFlag = 1; /* HCR */
411#endif
412 (*hDecoder)->frameLength = 960;
413 (*hDecoder)->sf_index = get_sr_index((*hDecoder)->config.defSampleRate);
414 (*hDecoder)->object_type = (*hDecoder)->config.defObjectType;
415
416 if ((channels == DRMCH_STEREO) || (channels == DRMCH_SBR_STEREO))
417 (*hDecoder)->channelConfiguration = 2;
418 else
419 (*hDecoder)->channelConfiguration = 1;
420
421#ifdef SBR_DEC
422 if ((channels == DRMCH_MONO) || (channels == DRMCH_STEREO))
423 (*hDecoder)->sbr_present_flag = 0;
424 else
425 (*hDecoder)->sbr_present_flag = 1;
426#endif
427
428 (*hDecoder)->fb = filter_bank_init((*hDecoder)->frameLength);
429
430 return 0;
431}
432#endif
433
434void NEAACDECAPI NeAACDecClose(NeAACDecHandle hDecoder)
435{
436 uint8_t i;
437
438 if (hDecoder == NULL)
439 return;
440
441#ifdef PROFILE
442 printf("AAC decoder total: %I64d cycles\n", hDecoder->cycles);
443 printf("requant: %I64d cycles\n", hDecoder->requant_cycles);
444 printf("spectral_data: %I64d cycles\n", hDecoder->spectral_cycles);
445 printf("scalefactors: %I64d cycles\n", hDecoder->scalefac_cycles);
446 printf("output: %I64d cycles\n", hDecoder->output_cycles);
447#endif
448
449 for (i = 0; i < MAX_CHANNELS; i++)
450 {
451 if (hDecoder->time_out[i]) faad_free(hDecoder->time_out[i]);
452 if (hDecoder->fb_intermed[i]) faad_free(hDecoder->fb_intermed[i]);
453#ifdef SSR_DEC
454 if (hDecoder->ssr_overlap[i]) faad_free(hDecoder->ssr_overlap[i]);
455 if (hDecoder->prev_fmd[i]) faad_free(hDecoder->prev_fmd[i]);
456#endif
457#ifdef MAIN_DEC
458 if (hDecoder->pred_stat[i]) faad_free(hDecoder->pred_stat[i]);
459#endif
460#ifdef LTP_DEC
461 if (hDecoder->lt_pred_stat[i]) faad_free(hDecoder->lt_pred_stat[i]);
462#endif
463 }
464
465#ifdef SSR_DEC
466 if (hDecoder->object_type == SSR)
467 ssr_filter_bank_end(hDecoder->fb);
468 else
469#endif
470 filter_bank_end(hDecoder->fb);
471
472 drc_end(hDecoder->drc);
473
474 if (hDecoder->sample_buffer) faad_free(hDecoder->sample_buffer);
475
476#ifdef SBR_DEC
477 for (i = 0; i < MAX_SYNTAX_ELEMENTS; i++)
478 {
479 if (hDecoder->sbr[i])
480 sbrDecodeEnd(hDecoder->sbr[i]);
481 }
482#endif
483
484 if (hDecoder) faad_free(hDecoder);
485}
486
487void NEAACDECAPI NeAACDecPostSeekReset(NeAACDecHandle hDecoder, int32_t frame)
488{
489 if (hDecoder)
490 {
491 hDecoder->postSeekResetFlag = 1;
492
493 if (frame != -1)
494 hDecoder->frame = frame;
495 }
496}
497
498static void create_channel_config(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo)
499{
500 hInfo->num_front_channels = 0;
501 hInfo->num_side_channels = 0;
502 hInfo->num_back_channels = 0;
503 hInfo->num_lfe_channels = 0;
504 memset(hInfo->channel_position, 0, MAX_CHANNELS*sizeof(uint8_t));
505
506 if (hDecoder->downMatrix)
507 {
508 hInfo->num_front_channels = 2;
509 hInfo->channel_position[0] = FRONT_CHANNEL_LEFT;
510 hInfo->channel_position[1] = FRONT_CHANNEL_RIGHT;
511 return;
512 }
513
514 /* check if there is a PCE */
515 if (hDecoder->pce_set)
516 {
517 uint8_t i, chpos = 0;
518 uint8_t chdir, back_center = 0;
519
520 hInfo->num_front_channels = hDecoder->pce.num_front_channels;
521 hInfo->num_side_channels = hDecoder->pce.num_side_channels;
522 hInfo->num_back_channels = hDecoder->pce.num_back_channels;
523 hInfo->num_lfe_channels = hDecoder->pce.num_lfe_channels;
524
525 chdir = hInfo->num_front_channels;
526 if (chdir & 1)
527 {
528 hInfo->channel_position[chpos++] = FRONT_CHANNEL_CENTER;
529 chdir--;
530 }
531 for (i = 0; i < chdir; i += 2)
532 {
533 hInfo->channel_position[chpos++] = FRONT_CHANNEL_LEFT;
534 hInfo->channel_position[chpos++] = FRONT_CHANNEL_RIGHT;
535 }
536
537 for (i = 0; i < hInfo->num_side_channels; i += 2)
538 {
539 hInfo->channel_position[chpos++] = SIDE_CHANNEL_LEFT;
540 hInfo->channel_position[chpos++] = SIDE_CHANNEL_RIGHT;
541 }
542
543 chdir = hInfo->num_back_channels;
544 if (chdir & 1)
545 {
546 back_center = 1;
547 chdir--;
548 }
549 for (i = 0; i < chdir; i += 2)
550 {
551 hInfo->channel_position[chpos++] = BACK_CHANNEL_LEFT;
552 hInfo->channel_position[chpos++] = BACK_CHANNEL_RIGHT;
553 }
554 if (back_center)
555 {
556 hInfo->channel_position[chpos++] = BACK_CHANNEL_CENTER;
557 }
558
559 for (i = 0; i < hInfo->num_lfe_channels; i++)
560 {
561 hInfo->channel_position[chpos++] = LFE_CHANNEL;
562 }
563
564 } else {
565 switch (hDecoder->channelConfiguration)
566 {
567 case 1:
568 hInfo->num_front_channels = 1;
569 hInfo->channel_position[0] = FRONT_CHANNEL_CENTER;
570 break;
571 case 2:
572 hInfo->num_front_channels = 2;
573 hInfo->channel_position[0] = FRONT_CHANNEL_LEFT;
574 hInfo->channel_position[1] = FRONT_CHANNEL_RIGHT;
575 break;
576 case 3:
577 hInfo->num_front_channels = 3;
578 hInfo->channel_position[0] = FRONT_CHANNEL_CENTER;
579 hInfo->channel_position[1] = FRONT_CHANNEL_LEFT;
580 hInfo->channel_position[2] = FRONT_CHANNEL_RIGHT;
581 break;
582 case 4:
583 hInfo->num_front_channels = 3;
584 hInfo->num_back_channels = 1;
585 hInfo->channel_position[0] = FRONT_CHANNEL_CENTER;
586 hInfo->channel_position[1] = FRONT_CHANNEL_LEFT;
587 hInfo->channel_position[2] = FRONT_CHANNEL_RIGHT;
588 hInfo->channel_position[3] = BACK_CHANNEL_CENTER;
589 break;
590 case 5:
591 hInfo->num_front_channels = 3;
592 hInfo->num_back_channels = 2;
593 hInfo->channel_position[0] = FRONT_CHANNEL_CENTER;
594 hInfo->channel_position[1] = FRONT_CHANNEL_LEFT;
595 hInfo->channel_position[2] = FRONT_CHANNEL_RIGHT;
596 hInfo->channel_position[3] = BACK_CHANNEL_LEFT;
597 hInfo->channel_position[4] = BACK_CHANNEL_RIGHT;
598 break;
599 case 6:
600 hInfo->num_front_channels = 3;
601 hInfo->num_back_channels = 2;
602 hInfo->num_lfe_channels = 1;
603 hInfo->channel_position[0] = FRONT_CHANNEL_CENTER;
604 hInfo->channel_position[1] = FRONT_CHANNEL_LEFT;
605 hInfo->channel_position[2] = FRONT_CHANNEL_RIGHT;
606 hInfo->channel_position[3] = BACK_CHANNEL_LEFT;
607 hInfo->channel_position[4] = BACK_CHANNEL_RIGHT;
608 hInfo->channel_position[5] = LFE_CHANNEL;
609 break;
610 case 7:
611 hInfo->num_front_channels = 3;
612 hInfo->num_side_channels = 2;
613 hInfo->num_back_channels = 2;
614 hInfo->num_lfe_channels = 1;
615 hInfo->channel_position[0] = FRONT_CHANNEL_CENTER;
616 hInfo->channel_position[1] = FRONT_CHANNEL_LEFT;
617 hInfo->channel_position[2] = FRONT_CHANNEL_RIGHT;
618 hInfo->channel_position[3] = SIDE_CHANNEL_LEFT;
619 hInfo->channel_position[4] = SIDE_CHANNEL_RIGHT;
620 hInfo->channel_position[5] = BACK_CHANNEL_LEFT;
621 hInfo->channel_position[6] = BACK_CHANNEL_RIGHT;
622 hInfo->channel_position[7] = LFE_CHANNEL;
623 break;
624 default: /* channelConfiguration == 0 || channelConfiguration > 7 */
625 {
626 uint8_t i;
627 uint8_t ch = hDecoder->fr_channels - hDecoder->has_lfe;
628 if (ch & 1) /* there's either a center front or a center back channel */
629 {
630 uint8_t ch1 = (ch-1)/2;
631 if (hDecoder->first_syn_ele == ID_SCE)
632 {
633 hInfo->num_front_channels = ch1 + 1;
634 hInfo->num_back_channels = ch1;
635 hInfo->channel_position[0] = FRONT_CHANNEL_CENTER;
636 for (i = 1; i <= ch1; i+=2)
637 {
638 hInfo->channel_position[i] = FRONT_CHANNEL_LEFT;
639 hInfo->channel_position[i+1] = FRONT_CHANNEL_RIGHT;
640 }
641 for (i = ch1+1; i < ch; i+=2)
642 {
643 hInfo->channel_position[i] = BACK_CHANNEL_LEFT;
644 hInfo->channel_position[i+1] = BACK_CHANNEL_RIGHT;
645 }
646 } else {
647 hInfo->num_front_channels = ch1;
648 hInfo->num_back_channels = ch1 + 1;
649 for (i = 0; i < ch1; i+=2)
650 {
651 hInfo->channel_position[i] = FRONT_CHANNEL_LEFT;
652 hInfo->channel_position[i+1] = FRONT_CHANNEL_RIGHT;
653 }
654 for (i = ch1; i < ch-1; i+=2)
655 {
656 hInfo->channel_position[i] = BACK_CHANNEL_LEFT;
657 hInfo->channel_position[i+1] = BACK_CHANNEL_RIGHT;
658 }
659 hInfo->channel_position[ch-1] = BACK_CHANNEL_CENTER;
660 }
661 } else {
662 uint8_t ch1 = (ch)/2;
663 hInfo->num_front_channels = ch1;
664 hInfo->num_back_channels = ch1;
665 if (ch1 & 1)
666 {
667 hInfo->channel_position[0] = FRONT_CHANNEL_CENTER;
668 for (i = 1; i <= ch1; i+=2)
669 {
670 hInfo->channel_position[i] = FRONT_CHANNEL_LEFT;
671 hInfo->channel_position[i+1] = FRONT_CHANNEL_RIGHT;
672 }
673 for (i = ch1+1; i < ch-1; i+=2)
674 {
675 hInfo->channel_position[i] = BACK_CHANNEL_LEFT;
676 hInfo->channel_position[i+1] = BACK_CHANNEL_RIGHT;
677 }
678 hInfo->channel_position[ch-1] = BACK_CHANNEL_CENTER;
679 } else {
680 for (i = 0; i < ch1; i+=2)
681 {
682 hInfo->channel_position[i] = FRONT_CHANNEL_LEFT;
683 hInfo->channel_position[i+1] = FRONT_CHANNEL_RIGHT;
684 }
685 for (i = ch1; i < ch; i+=2)
686 {
687 hInfo->channel_position[i] = BACK_CHANNEL_LEFT;
688 hInfo->channel_position[i+1] = BACK_CHANNEL_RIGHT;
689 }
690 }
691 }
692 hInfo->num_lfe_channels = hDecoder->has_lfe;
693 for (i = ch; i < hDecoder->fr_channels; i++)
694 {
695 hInfo->channel_position[i] = LFE_CHANNEL;
696 }
697 }
698 break;
699 }
700 }
701}
702
703void* NEAACDECAPI NeAACDecDecode(NeAACDecHandle hDecoder,
704 NeAACDecFrameInfo *hInfo,
705 uint8_t *buffer, uint32_t buffer_size)
706{
707 return aac_frame_decode(hDecoder, hInfo, buffer, buffer_size, NULL, 0);
708}
709
710void* NEAACDECAPI NeAACDecDecode2(NeAACDecHandle hDecoder,
711 NeAACDecFrameInfo *hInfo,
712 uint8_t *buffer, uint32_t buffer_size,
713 void **sample_buffer, uint32_t sample_buffer_size)
714{
715 if ((sample_buffer == NULL) || (sample_buffer_size == 0))
716 {
717 hInfo->error = 27;
718 return NULL;
719 }
720
721 return aac_frame_decode(hDecoder, hInfo, buffer, buffer_size,
722 sample_buffer, sample_buffer_size);
723}
724
725static void* aac_frame_decode(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
726 uint8_t *buffer, uint32_t buffer_size,
727 void **sample_buffer2, uint32_t sample_buffer_size)
728{
729 uint8_t channels = 0;
730 uint8_t output_channels = 0;
731 bitfile ld;
732 uint32_t bitsconsumed;
733 uint16_t frame_len;
734 void *sample_buffer;
735
736#ifdef PROFILE
737 int64_t count = faad_get_ts();
738#endif
739
740 /* safety checks */
741 if ((hDecoder == NULL) || (hInfo == NULL) || (buffer == NULL))
742 {
743 return NULL;
744 }
745
746#if 0
747 printf("%d\n", buffer_size*8);
748#endif
749
750 frame_len = hDecoder->frameLength;
751
752
753 memset(hInfo, 0, sizeof(NeAACDecFrameInfo));
754 memset(hDecoder->internal_channel, 0, MAX_CHANNELS*sizeof(hDecoder->internal_channel[0]));
755
756 /* initialize the bitstream */
757 faad_initbits(&ld, buffer, buffer_size);
758
759#if 0
760 {
761 int i;
762 for (i = 0; i < ((buffer_size+3)>>2); i++)
763 {
764 uint8_t *buf;
765 uint32_t temp = 0;
766 buf = faad_getbitbuffer(&ld, 32);
767 //temp = getdword((void*)buf);
768 temp = *((uint32_t*)buf);
769 printf("0x%.8X\n", temp);
770 free(buf);
771 }
772 faad_endbits(&ld);
773 faad_initbits(&ld, buffer, buffer_size);
774 }
775#endif
776
777#ifdef DRM
778 if (hDecoder->object_type == DRM_ER_LC)
779 {
780 /* We do not support stereo right now */
781 if (0) //(hDecoder->channelConfiguration == 2)
782 {
783 hInfo->error = 8; // Throw CRC error
784 goto error;
785 }
786
787 faad_getbits(&ld, 8
788 DEBUGVAR(1,1,"NeAACDecDecode(): skip CRC"));
789 }
790#endif
791
792 if (hDecoder->adts_header_present)
793 {
794 adts_header adts;
795
796 adts.old_format = hDecoder->config.useOldADTSFormat;
797 if ((hInfo->error = adts_frame(&adts, &ld)) > 0)
798 goto error;
799
800 /* MPEG2 does byte_alignment() here,
801 * but ADTS header is always multiple of 8 bits in MPEG2
802 * so not needed to actually do it.
803 */
804 }
805
806#ifdef ANALYSIS
807 dbg_count = 0;
808#endif
809
810 /* decode the complete bitstream */
811#ifdef SCALABLE_DEC
812 if ((hDecoder->object_type == 6) || (hDecoder->object_type == DRM_ER_LC))
813 {
814 aac_scalable_main_element(hDecoder, hInfo, &ld, &hDecoder->pce, hDecoder->drc);
815 } else {
816#endif
817 raw_data_block(hDecoder, hInfo, &ld, &hDecoder->pce, hDecoder->drc);
818#ifdef SCALABLE_DEC
819 }
820#endif
821
822 channels = hDecoder->fr_channels;
823
824 if (hInfo->error > 0)
825 goto error;
826
827 /* safety check */
828 if (channels == 0 || channels > MAX_CHANNELS)
829 {
830 /* invalid number of channels */
831 hInfo->error = 12;
832 goto error;
833 }
834
835 /* no more bit reading after this */
836 bitsconsumed = faad_get_processed_bits(&ld);
837 hInfo->bytesconsumed = bit2byte(bitsconsumed);
838 if (ld.error)
839 {
840 hInfo->error = 14;
841 goto error;
842 }
843 faad_endbits(&ld);
844
845
846 if (!hDecoder->adts_header_present && !hDecoder->adif_header_present)
847 {
848 if (hDecoder->channelConfiguration == 0)
849 hDecoder->channelConfiguration = channels;
850
851 if (channels == 8) /* 7.1 */
852 hDecoder->channelConfiguration = 7;
853 if (channels == 7) /* not a standard channelConfiguration */
854 hDecoder->channelConfiguration = 0;
855 }
856
857 if ((channels == 5 || channels == 6) && hDecoder->config.downMatrix)
858 {
859 hDecoder->downMatrix = 1;
860 output_channels = 2;
861 } else {
862 output_channels = channels;
863 }
864
865#if (defined(PS_DEC) || defined(DRM_PS))
866 hDecoder->upMatrix = 0;
867 /* check if we have a mono file */
868 if (output_channels == 1)
869 {
870 /* upMatrix to 2 channels for implicit signalling of PS */
871 hDecoder->upMatrix = 1;
872 output_channels = 2;
873 }
874#endif
875
876 /* Make a channel configuration based on either a PCE or a channelConfiguration */
877 create_channel_config(hDecoder, hInfo);
878
879 /* number of samples in this frame */
880 hInfo->samples = frame_len*output_channels;
881 /* number of channels in this frame */
882 hInfo->channels = output_channels;
883 /* samplerate */
884 hInfo->samplerate = get_sample_rate(hDecoder->sf_index);
885 /* object type */
886 hInfo->object_type = hDecoder->object_type;
887 /* sbr */
888 hInfo->sbr = NO_SBR;
889 /* header type */
890 hInfo->header_type = RAW;
891 if (hDecoder->adif_header_present)
892 hInfo->header_type = ADIF;
893 if (hDecoder->adts_header_present)
894 hInfo->header_type = ADTS;
895#if (defined(PS_DEC) || defined(DRM_PS))
896 hInfo->ps = hDecoder->ps_used_global;
897#endif
898
899 /* check if frame has channel elements */
900 if (channels == 0)
901 {
902 hDecoder->frame++;
903 return NULL;
904 }
905
906 /* allocate the buffer for the final samples */
907 if ((hDecoder->sample_buffer == NULL) ||
908 (hDecoder->alloced_channels != output_channels))
909 {
910 static const uint8_t str[] = { sizeof(int16_t), sizeof(int32_t), sizeof(int32_t),
911 sizeof(float32_t), sizeof(double), sizeof(int16_t), sizeof(int16_t),
912 sizeof(int16_t), sizeof(int16_t), 0, 0, 0
913 };
914 uint8_t stride = str[hDecoder->config.outputFormat-1];
915#ifdef SBR_DEC
916 if (((hDecoder->sbr_present_flag == 1)&&(!hDecoder->downSampledSBR)) || (hDecoder->forceUpSampling == 1))
917 {
918 stride = 2 * stride;
919 }
920#endif
921 /* check if we want to use internal sample_buffer */
922 if (sample_buffer_size == 0)
923 {
924 if (hDecoder->sample_buffer)
925 faad_free(hDecoder->sample_buffer);
926 hDecoder->sample_buffer = NULL;
927 hDecoder->sample_buffer = faad_malloc(frame_len*output_channels*stride);
928 } else if (sample_buffer_size < frame_len*output_channels*stride) {
929 /* provided sample buffer is not big enough */
930 hInfo->error = 27;
931 return NULL;
932 }
933 hDecoder->alloced_channels = output_channels;
934 }
935
936 if (sample_buffer_size == 0)
937 {
938 sample_buffer = hDecoder->sample_buffer;
939 } else {
940 sample_buffer = *sample_buffer2;
941 }
942
943#ifdef SBR_DEC
944 if ((hDecoder->sbr_present_flag == 1) || (hDecoder->forceUpSampling == 1))
945 {
946 uint8_t ele;
947
948 /* this data is different when SBR is used or when the data is upsampled */
949 if (!hDecoder->downSampledSBR)
950 {
951 frame_len *= 2;
952 hInfo->samples *= 2;
953 hInfo->samplerate *= 2;
954 }
955
956 /* check if every element was provided with SBR data */
957 for (ele = 0; ele < hDecoder->fr_ch_ele; ele++)
958 {
959 if (hDecoder->sbr[ele] == NULL)
960 {
961 hInfo->error = 25;
962 goto error;
963 }
964 }
965
966 /* sbr */
967 if (hDecoder->sbr_present_flag == 1)
968 {
969 hInfo->object_type = HE_AAC;
970 hInfo->sbr = SBR_UPSAMPLED;
971 } else {
972 hInfo->sbr = NO_SBR_UPSAMPLED;
973 }
974 if (hDecoder->downSampledSBR)
975 {
976 hInfo->sbr = SBR_DOWNSAMPLED;
977 }
978 }
979#endif
980
981 sample_buffer = output_to_PCM(hDecoder, hDecoder->time_out, sample_buffer,
982 output_channels, frame_len, hDecoder->config.outputFormat);
983
984
985 hDecoder->postSeekResetFlag = 0;
986
987 hDecoder->frame++;
988#ifdef LD_DEC
989 if (hDecoder->object_type != LD)
990 {
991#endif
992 if (hDecoder->frame <= 1)
993 hInfo->samples = 0;
994#ifdef LD_DEC
995 } else {
996 /* LD encoders will give lower delay */
997 if (hDecoder->frame <= 0)
998 hInfo->samples = 0;
999 }
1000#endif
1001
1002 /* cleanup */
1003#ifdef ANALYSIS
1004 fflush(stdout);
1005#endif
1006
1007#ifdef PROFILE
1008 count = faad_get_ts() - count;
1009 hDecoder->cycles += count;
1010#endif
1011
1012 return sample_buffer;
1013
1014error:
1015
1016 faad_endbits(&ld);
1017
1018 /* cleanup */
1019#ifdef ANALYSIS
1020 fflush(stdout);
1021#endif
1022
1023 return NULL;
1024}
diff --git a/apps/codecs/libfaad/decoder.h b/apps/codecs/libfaad/decoder.h
new file mode 100644
index 0000000000..2b2eb8bc0c
--- /dev/null
+++ b/apps/codecs/libfaad/decoder.h
@@ -0,0 +1,121 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __DECODER_H__
29#define __DECODER_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#ifdef _WIN32
36 #pragma pack(push, 8)
37 #ifndef NEAACDECAPI
38 #define NEAACDECAPI __cdecl
39 #endif
40#else
41 #ifndef NEAACDECAPI
42 #define NEAACDECAPI
43 #endif
44#endif
45
46
47/* library output formats */
48#define FAAD_FMT_16BIT 1
49#define FAAD_FMT_24BIT 2
50#define FAAD_FMT_32BIT 3
51#define FAAD_FMT_FLOAT 4
52#define FAAD_FMT_FIXED FAAD_FMT_FLOAT
53#define FAAD_FMT_DOUBLE 5
54
55#define LC_DEC_CAP (1<<0)
56#define MAIN_DEC_CAP (1<<1)
57#define LTP_DEC_CAP (1<<2)
58#define LD_DEC_CAP (1<<3)
59#define ERROR_RESILIENCE_CAP (1<<4)
60#define FIXED_POINT_CAP (1<<5)
61
62#define FRONT_CHANNEL_CENTER (1)
63#define FRONT_CHANNEL_LEFT (2)
64#define FRONT_CHANNEL_RIGHT (3)
65#define SIDE_CHANNEL_LEFT (4)
66#define SIDE_CHANNEL_RIGHT (5)
67#define BACK_CHANNEL_LEFT (6)
68#define BACK_CHANNEL_RIGHT (7)
69#define BACK_CHANNEL_CENTER (8)
70#define LFE_CHANNEL (9)
71#define UNKNOWN_CHANNEL (0)
72
73char* NEAACDECAPI NeAACDecGetErrorMessage(uint8_t errcode);
74
75uint32_t NEAACDECAPI NeAACDecGetCapabilities(void);
76
77NeAACDecHandle NEAACDECAPI NeAACDecOpen(void);
78
79NeAACDecConfigurationPtr NEAACDECAPI NeAACDecGetCurrentConfiguration(NeAACDecHandle hDecoder);
80
81uint8_t NEAACDECAPI NeAACDecSetConfiguration(NeAACDecHandle hDecoder,
82 NeAACDecConfigurationPtr config);
83
84/* Init the library based on info from the AAC file (ADTS/ADIF) */
85int32_t NEAACDECAPI NeAACDecInit(NeAACDecHandle hDecoder,
86 uint8_t *buffer,
87 uint32_t buffer_size,
88 uint32_t *samplerate,
89 uint8_t *channels);
90
91/* Init the library using a DecoderSpecificInfo */
92int8_t NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder, uint8_t *pBuffer,
93 uint32_t SizeOfDecoderSpecificInfo,
94 uint32_t *samplerate, uint8_t *channels);
95
96/* Init the library for DRM */
97int8_t NEAACDECAPI NeAACDecInitDRM(NeAACDecHandle *hDecoder, uint32_t samplerate,
98 uint8_t channels);
99
100void NEAACDECAPI NeAACDecClose(NeAACDecHandle hDecoder);
101
102void NEAACDECAPI NeAACDecPostSeekReset(NeAACDecHandle hDecoder, int32_t frame);
103
104void* NEAACDECAPI NeAACDecDecode(NeAACDecHandle hDecoder,
105 NeAACDecFrameInfo *hInfo,
106 uint8_t *buffer,
107 uint32_t buffer_size);
108
109void* NEAACDECAPI NeAACDecDecode2(NeAACDecHandle hDecoder,
110 NeAACDecFrameInfo *hInfo,
111 uint8_t *buffer, uint32_t buffer_size,
112 void **sample_buffer, uint32_t sample_buffer_size);
113
114#ifdef _WIN32
115 #pragma pack(pop)
116#endif
117
118#ifdef __cplusplus
119}
120#endif
121#endif
diff --git a/apps/codecs/libfaad/drc.c b/apps/codecs/libfaad/drc.c
new file mode 100644
index 0000000000..7530d2d053
--- /dev/null
+++ b/apps/codecs/libfaad/drc.c
@@ -0,0 +1,170 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#include "common.h"
29#include "structs.h"
30
31#include <stdlib.h>
32#include <string.h>
33#include "syntax.h"
34#include "drc.h"
35
36drc_info *drc_init(real_t cut, real_t boost)
37{
38 drc_info *drc = (drc_info*)faad_malloc(sizeof(drc_info));
39 memset(drc, 0, sizeof(drc_info));
40
41 drc->ctrl1 = cut;
42 drc->ctrl2 = boost;
43
44 drc->num_bands = 1;
45 drc->band_top[0] = 1024/4 - 1;
46 drc->dyn_rng_sgn[0] = 1;
47 drc->dyn_rng_ctl[0] = 0;
48
49 return drc;
50}
51
52void drc_end(drc_info *drc)
53{
54 if (drc) faad_free(drc);
55}
56
57#ifdef FIXED_POINT
58static real_t drc_pow2_table[] =
59{
60 COEF_CONST(0.5146511183),
61 COEF_CONST(0.5297315472),
62 COEF_CONST(0.5452538663),
63 COEF_CONST(0.5612310242),
64 COEF_CONST(0.5776763484),
65 COEF_CONST(0.5946035575),
66 COEF_CONST(0.6120267717),
67 COEF_CONST(0.6299605249),
68 COEF_CONST(0.6484197773),
69 COEF_CONST(0.6674199271),
70 COEF_CONST(0.6869768237),
71 COEF_CONST(0.7071067812),
72 COEF_CONST(0.7278265914),
73 COEF_CONST(0.7491535384),
74 COEF_CONST(0.7711054127),
75 COEF_CONST(0.7937005260),
76 COEF_CONST(0.8169577266),
77 COEF_CONST(0.8408964153),
78 COEF_CONST(0.8655365610),
79 COEF_CONST(0.8908987181),
80 COEF_CONST(0.9170040432),
81 COEF_CONST(0.9438743127),
82 COEF_CONST(0.9715319412),
83 COEF_CONST(1.0000000000),
84 COEF_CONST(1.0293022366),
85 COEF_CONST(1.0594630944),
86 COEF_CONST(1.0905077327),
87 COEF_CONST(1.1224620483),
88 COEF_CONST(1.1553526969),
89 COEF_CONST(1.1892071150),
90 COEF_CONST(1.2240535433),
91 COEF_CONST(1.2599210499),
92 COEF_CONST(1.2968395547),
93 COEF_CONST(1.3348398542),
94 COEF_CONST(1.3739536475),
95 COEF_CONST(1.4142135624),
96 COEF_CONST(1.4556531828),
97 COEF_CONST(1.4983070769),
98 COEF_CONST(1.5422108254),
99 COEF_CONST(1.5874010520),
100 COEF_CONST(1.6339154532),
101 COEF_CONST(1.6817928305),
102 COEF_CONST(1.7310731220),
103 COEF_CONST(1.7817974363),
104 COEF_CONST(1.8340080864),
105 COEF_CONST(1.8877486254),
106 COEF_CONST(1.9430638823)
107};
108#endif
109
110void drc_decode(drc_info *drc, real_t *spec)
111{
112 uint16_t i, bd, top;
113#ifdef FIXED_POINT
114 int32_t exp, frac;
115#else
116 real_t factor, exp;
117#endif
118 uint16_t bottom = 0;
119
120 if (drc->num_bands == 1)
121 drc->band_top[0] = 1024/4 - 1;
122
123 for (bd = 0; bd < drc->num_bands; bd++)
124 {
125 top = 4 * (drc->band_top[bd] + 1);
126
127#ifndef FIXED_POINT
128 /* Decode DRC gain factor */
129 if (drc->dyn_rng_sgn[bd]) /* compress */
130 exp = -drc->ctrl1 * (drc->dyn_rng_ctl[bd] - (DRC_REF_LEVEL - drc->prog_ref_level))/REAL_CONST(24.0);
131 else /* boost */
132 exp = drc->ctrl2 * (drc->dyn_rng_ctl[bd] - (DRC_REF_LEVEL - drc->prog_ref_level))/REAL_CONST(24.0);
133 factor = (real_t)pow(2.0, exp);
134
135 /* Apply gain factor */
136 for (i = bottom; i < top; i++)
137 spec[i] *= factor;
138#else
139 /* Decode DRC gain factor */
140 if (drc->dyn_rng_sgn[bd]) /* compress */
141 {
142 exp = -1 * (drc->dyn_rng_ctl[bd] - (DRC_REF_LEVEL - drc->prog_ref_level))/ 24;
143 frac = -1 * (drc->dyn_rng_ctl[bd] - (DRC_REF_LEVEL - drc->prog_ref_level)) % 24;
144 } else { /* boost */
145 exp = (drc->dyn_rng_ctl[bd] - (DRC_REF_LEVEL - drc->prog_ref_level))/ 24;
146 frac = (drc->dyn_rng_ctl[bd] - (DRC_REF_LEVEL - drc->prog_ref_level)) % 24;
147 }
148
149 /* Apply gain factor */
150 if (exp < 0)
151 {
152 for (i = bottom; i < top; i++)
153 {
154 spec[i] >>= -exp;
155 if (frac)
156 spec[i] = MUL_R(spec[i],drc_pow2_table[frac+23]);
157 }
158 } else {
159 for (i = bottom; i < top; i++)
160 {
161 spec[i] <<= exp;
162 if (frac)
163 spec[i] = MUL_R(spec[i],drc_pow2_table[frac+23]);
164 }
165 }
166#endif
167
168 bottom = top;
169 }
170}
diff --git a/apps/codecs/libfaad/drc.h b/apps/codecs/libfaad/drc.h
new file mode 100644
index 0000000000..31d3db67ae
--- /dev/null
+++ b/apps/codecs/libfaad/drc.h
@@ -0,0 +1,46 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __DRC_H__
29#define __DRC_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#define DRC_REF_LEVEL 20*4 /* -20 dB */
36
37
38drc_info *drc_init(real_t cut, real_t boost);
39void drc_end(drc_info *drc);
40void drc_decode(drc_info *drc, real_t *spec);
41
42
43#ifdef __cplusplus
44}
45#endif
46#endif
diff --git a/apps/codecs/libfaad/drm_dec.c b/apps/codecs/libfaad/drm_dec.c
new file mode 100644
index 0000000000..8bf905169d
--- /dev/null
+++ b/apps/codecs/libfaad/drm_dec.c
@@ -0,0 +1,990 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR and PS decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#include <stdlib.h>
29#include <stdio.h>
30#include <string.h>
31#include <math.h>
32#include "common.h"
33
34#ifdef DRM
35
36#include "sbr_dec.h"
37#include "drm_dec.h"
38#include "bits.h"
39
40/* constants */
41#define DECAY_CUTOFF 3
42#define DECAY_SLOPE 0.05f
43
44/* type definitaions */
45typedef const int8_t (*drm_ps_huff_tab)[2];
46
47
48/* binary search huffman tables */
49static const int8_t f_huffman_sa[][2] =
50{
51 { /*0*/ -15, 1 }, /* index 0: 1 bits: x */
52 { 2, 3 }, /* index 1: 2 bits: 1x */
53 { /*7*/ -8, 4 }, /* index 2: 3 bits: 10x */
54 { 5, 6 }, /* index 3: 3 bits: 11x */
55 { /*1*/ -14, /*-1*/ -16 }, /* index 4: 4 bits: 101x */
56 { /*-2*/ -17, 7 }, /* index 5: 4 bits: 110x */
57 { 8, 9 }, /* index 6: 4 bits: 111x */
58 { /*2*/ -13, /*-3*/ -18 }, /* index 7: 5 bits: 1101x */
59 { /*3*/ -12, 10 }, /* index 8: 5 bits: 1110x */
60 { 11, 12 }, /* index 9: 5 bits: 1111x */
61 { /*4*/ -11, /*5*/ -10 }, /* index 10: 6 bits: 11101x */
62 { /*-4*/ -19, /*-5*/ -20 }, /* index 11: 6 bits: 11110x */
63 { /*6*/ -9, 13 }, /* index 12: 6 bits: 11111x */
64 { /*-7*/ -22, /*-6*/ -21 } /* index 13: 7 bits: 111111x */
65};
66
67static const int8_t t_huffman_sa[][2] =
68{
69 { /*0*/ -15, 1 }, /* index 0: 1 bits: x */
70 { 2, 3 }, /* index 1: 2 bits: 1x */
71 { /*-1*/ -16, /*1*/ -14 }, /* index 2: 3 bits: 10x */
72 { 4, 5 }, /* index 3: 3 bits: 11x */
73 { /*-2*/ -17, /*2*/ -13 }, /* index 4: 4 bits: 110x */
74 { 6, 7 }, /* index 5: 4 bits: 111x */
75 { /*-3*/ -18, /*3*/ -12 }, /* index 6: 5 bits: 1110x */
76 { 8, 9 }, /* index 7: 5 bits: 1111x */
77 { /*-4*/ -19, /*4*/ -11 }, /* index 8: 6 bits: 11110x */
78 { 10, 11 }, /* index 9: 6 bits: 11111x */
79 { /*-5*/ -20, /*5*/ -10 }, /* index 10: 7 bits: 111110x */
80 { /*-6*/ -21, 12 }, /* index 11: 7 bits: 111111x */
81 { /*-7*/ -22, 13 }, /* index 12: 8 bits: 1111111x */
82 { /*6*/ -9, /*7*/ -8 } /* index 13: 9 bits: 11111111x */
83};
84
85static const int8_t f_huffman_pan[][2] =
86{
87 { /*0*/ -15, 1 }, /* index 0: 1 bits: x */
88 { /*-1*/ -16, 2 }, /* index 1: 2 bits: 1x */
89 { /*1*/ -14, 3 }, /* index 2: 3 bits: 11x */
90 { 4, 5 }, /* index 3: 4 bits: 111x */
91 { /*-2*/ -17, /*2*/ -13 }, /* index 4: 5 bits: 1110x */
92 { 6, 7 }, /* index 5: 5 bits: 1111x */
93 { /*-3*/ -18, /*3*/ -12 }, /* index 6: 6 bits: 11110x */
94 { 8, 9 }, /* index 7: 6 bits: 11111x */
95 { /*-4*/ -19, /*4*/ -11 }, /* index 8: 7 bits: 111110x */
96 { 10, 11 }, /* index 9: 7 bits: 111111x */
97 { /*-5*/ -20, /*5*/ -10 }, /* index 10: 8 bits: 1111110x */
98 { 12, 13 }, /* index 11: 8 bits: 1111111x */
99 { /*-6*/ -21, /*6*/ -9 }, /* index 12: 9 bits: 11111110x */
100 { /*-7*/ -22, 14 }, /* index 13: 9 bits: 11111111x */
101 { /*7*/ -8, 15 }, /* index 14: 10 bits: 111111111x */
102 { 16, 17 }, /* index 15: 11 bits: 1111111111x */
103 { /*-8*/ -23, /*8*/ -7 }, /* index 16: 12 bits: 11111111110x */
104 { 18, 19 }, /* index 17: 12 bits: 11111111111x */
105 { /*-10*/ -25, 20 }, /* index 18: 13 bits: 111111111110x */
106 { 21, 22 }, /* index 19: 13 bits: 111111111111x */
107 { /*-9*/ -24, /*9*/ -6 }, /* index 20: 14 bits: 1111111111101x */
108 { /*10*/ -5, 23 }, /* index 21: 14 bits: 1111111111110x */
109 { 24, 25 }, /* index 22: 14 bits: 1111111111111x */
110 { /*-13*/ -28, /*-11*/ -26 }, /* index 23: 15 bits: 11111111111101x */
111 { /*11*/ -4, /*13*/ -2 }, /* index 24: 15 bits: 11111111111110x */
112 { 26, 27 }, /* index 25: 15 bits: 11111111111111x */
113 { /*-14*/ -29, /*-12*/ -27 }, /* index 26: 16 bits: 111111111111110x */
114 { /*12*/ -3, /*14*/ -1 } /* index 27: 16 bits: 111111111111111x */
115};
116
117static const int8_t t_huffman_pan[][2] =
118{
119 { /*0*/ -15, 1 }, /* index 0: 1 bits: x */
120 { /*-1*/ -16, 2 }, /* index 1: 2 bits: 1x */
121 { /*1*/ -14, 3 }, /* index 2: 3 bits: 11x */
122 { /*-2*/ -17, 4 }, /* index 3: 4 bits: 111x */
123 { /*2*/ -13, 5 }, /* index 4: 5 bits: 1111x */
124 { /*-3*/ -18, 6 }, /* index 5: 6 bits: 11111x */
125 { /*3*/ -12, 7 }, /* index 6: 7 bits: 111111x */
126 { /*-4*/ -19, 8 }, /* index 7: 8 bits: 1111111x */
127 { /*4*/ -11, 9 }, /* index 8: 9 bits: 11111111x */
128 { 10, 11 }, /* index 9: 10 bits: 111111111x */
129 { /*-5*/ -20, /*5*/ -10 }, /* index 10: 11 bits: 1111111110x */
130 { 12, 13 }, /* index 11: 11 bits: 1111111111x */
131 { /*-6*/ -21, /*6*/ -9 }, /* index 12: 12 bits: 11111111110x */
132 { 14, 15 }, /* index 13: 12 bits: 11111111111x */
133 { /*-7*/ -22, /*7*/ -8 }, /* index 14: 13 bits: 111111111110x */
134 { 16, 17 }, /* index 15: 13 bits: 111111111111x */
135 { /*-8*/ -23, /*8*/ -7 }, /* index 16: 14 bits: 1111111111110x */
136 { 18, 19 }, /* index 17: 14 bits: 1111111111111x */
137 { /*-10*/ -25, /*10*/ -5 }, /* index 18: 15 bits: 11111111111110x */
138 { 20, 21 }, /* index 19: 15 bits: 11111111111111x */
139 { /*-9*/ -24, /*9*/ -6 }, /* index 20: 16 bits: 111111111111110x */
140 { 22, 23 }, /* index 21: 16 bits: 111111111111111x */
141 { 24, 25 }, /* index 22: 17 bits: 1111111111111110x */
142 { 26, 27 }, /* index 23: 17 bits: 1111111111111111x */
143 { /*-14*/ -29, /*-13*/ -28 }, /* index 24: 18 bits: 11111111111111100x */
144 { /*-12*/ -27, /*-11*/ -26 }, /* index 25: 18 bits: 11111111111111101x */
145 { /*11*/ -4, /*12*/ -3 }, /* index 26: 18 bits: 11111111111111110x */
146 { /*13*/ -2, /*14*/ -1 } /* index 27: 18 bits: 11111111111111111x */
147};
148
149/* There are 3 classes in the standard but the last 2 are identical */
150static const real_t sa_quant[8][2] =
151{
152 { FRAC_CONST(0.0000), FRAC_CONST(0.0000) },
153 { FRAC_CONST(0.0501), FRAC_CONST(0.1778) },
154 { FRAC_CONST(0.0706), FRAC_CONST(0.2818) },
155 { FRAC_CONST(0.0995), FRAC_CONST(0.4467) },
156 { FRAC_CONST(0.1399), FRAC_CONST(0.5623) },
157 { FRAC_CONST(0.1957), FRAC_CONST(0.7079) },
158 { FRAC_CONST(0.2713), FRAC_CONST(0.8913) },
159 { FRAC_CONST(0.3699), FRAC_CONST(1.0000) },
160};
161
162/* We don't need the actual quantizer values */
163#if 0
164static const real_t pan_quant[8][5] =
165{
166 { COEF_CONST(0.0000), COEF_CONST(0.0000), COEF_CONST(0.0000), COEF_CONST(0.0000), COEF_CONST(0.0000) },
167 { COEF_CONST(0.1661), COEF_CONST(0.1661), COEF_CONST(0.3322), COEF_CONST(0.3322), COEF_CONST(0.3322) },
168 { COEF_CONST(0.3322), COEF_CONST(0.3322), COEF_CONST(0.6644), COEF_CONST(0.8305), COEF_CONST(0.8305) },
169 { COEF_CONST(0.4983), COEF_CONST(0.6644), COEF_CONST(0.9966), COEF_CONST(1.4949), COEF_CONST(1.6610) },
170 { COEF_CONST(0.6644), COEF_CONST(0.9966), COEF_CONST(1.4949), COEF_CONST(2.1593), COEF_CONST(2.4914) },
171 { COEF_CONST(0.8305), COEF_CONST(1.3288), COEF_CONST(2.1593), COEF_CONST(2.9897), COEF_CONST(3.4880) },
172 { COEF_CONST(0.9966), COEF_CONST(1.8271), COEF_CONST(2.8236), COEF_CONST(3.8202), COEF_CONST(4.6507) },
173 { COEF_CONST(1.3288), COEF_CONST(2.3253), COEF_CONST(3.4880), COEF_CONST(4.6507), COEF_CONST(5.8134) },
174};
175#endif
176
177/* 2^(pan_quant[x][y] */
178static const real_t pan_pow_2_pos[8][5] = {
179 { REAL_CONST(1.0000000), REAL_CONST(1.0000000), REAL_CONST(1.0000000), REAL_CONST(1.0000000), REAL_CONST(1.0000000) },
180 { REAL_CONST(1.1220021), REAL_CONST(1.1220021), REAL_CONST(1.2589312), REAL_CONST(1.2589312), REAL_CONST(1.2589312) },
181 { REAL_CONST(1.2589312), REAL_CONST(1.2589312), REAL_CONST(1.5849090), REAL_CONST(1.7783016), REAL_CONST(1.7783016) },
182 { REAL_CONST(1.4125481), REAL_CONST(1.5849090), REAL_CONST(1.9952921), REAL_CONST(2.8184461), REAL_CONST(3.1623565) },
183 { REAL_CONST(1.5849090), REAL_CONST(1.9952922), REAL_CONST(2.8184461), REAL_CONST(4.4669806), REAL_CONST(5.6232337) },
184 { REAL_CONST(1.7783016), REAL_CONST(2.5119365), REAL_CONST(4.4669806), REAL_CONST(7.9430881), REAL_CONST(11.219994) },
185 { REAL_CONST(1.9952921), REAL_CONST(3.5482312), REAL_CONST(7.0792671), REAL_CONST(14.125206), REAL_CONST(25.118876) },
186 { REAL_CONST(2.5119365), REAL_CONST(5.0116998), REAL_CONST(11.219994), REAL_CONST(25.118876), REAL_CONST(56.235140) }
187};
188
189/* 2^(-pan_quant[x][y] */
190static const real_t pan_pow_2_neg[8][5] = {
191 { REAL_CONST(1), REAL_CONST(1), REAL_CONST(1), REAL_CONST(1), REAL_CONST(1) },
192 { REAL_CONST(0.8912487), REAL_CONST(0.8912487), REAL_CONST(0.7943242), REAL_CONST(0.7943242), REAL_CONST(0.7943242) },
193 { REAL_CONST(0.7943242), REAL_CONST(0.7943242), REAL_CONST(0.6309511), REAL_CONST(0.5623344), REAL_CONST(0.5623344) },
194 { REAL_CONST(0.7079405), REAL_CONST(0.6309511), REAL_CONST(0.5011797), REAL_CONST(0.3548054), REAL_CONST(0.3162199) },
195 { REAL_CONST(0.6309511), REAL_CONST(0.5011797), REAL_CONST(0.3548054), REAL_CONST(0.2238649), REAL_CONST(0.1778336) },
196 { REAL_CONST(0.5623343), REAL_CONST(0.3980992), REAL_CONST(0.2238649), REAL_CONST(0.1258956), REAL_CONST(0.0891266) },
197 { REAL_CONST(0.5011797), REAL_CONST(0.2818306), REAL_CONST(0.1412576), REAL_CONST(0.0707954), REAL_CONST(0.0398107) },
198 { REAL_CONST(0.3980992), REAL_CONST(0.1995331), REAL_CONST(0.0891267), REAL_CONST(0.0398107), REAL_CONST(0.0177825) }
199};
200
201/* 2^(pan_quant[x][y]/30) */
202static const real_t pan_pow_2_30_pos[8][5] = {
203 { COEF_CONST(1), COEF_CONST(1), COEF_CONST(1), COEF_CONST(1), COEF_CONST(1) },
204 { COEF_CONST(1.003845098), COEF_CONST(1.003845098), COEF_CONST(1.007704982), COEF_CONST(1.007704982), COEF_CONST(1.007704982) },
205 { COEF_CONST(1.007704982), COEF_CONST(1.007704982), COEF_CONST(1.01546933), COEF_CONST(1.019373909), COEF_CONST(1.019373909) },
206 { COEF_CONST(1.011579706), COEF_CONST(1.01546933), COEF_CONST(1.023293502), COEF_CONST(1.035142941), COEF_CONST(1.039123167) },
207 { COEF_CONST(1.01546933), COEF_CONST(1.023293502), COEF_CONST(1.035142941), COEF_CONST(1.051155908), COEF_CONST(1.059252598) },
208 { COEF_CONST(1.019373909), COEF_CONST(1.03117796), COEF_CONST(1.051155908), COEF_CONST(1.071518432), COEF_CONST(1.0839263) },
209 { COEF_CONST(1.023293502), COEF_CONST(1.043118698), COEF_CONST(1.067414119), COEF_CONST(1.092277933), COEF_CONST(1.113439626) },
210 { COEF_CONST(1.03117796), COEF_CONST(1.055195268), COEF_CONST(1.0839263), COEF_CONST(1.113439626), COEF_CONST(1.143756546) }
211};
212
213/* 2^(-pan_quant[x][y]/30) */
214static const real_t pan_pow_2_30_neg[8][5] = {
215 { COEF_CONST(1), COEF_CONST(1), COEF_CONST(1), COEF_CONST(1), COEF_CONST(1) },
216 { COEF_CONST(0.99616963), COEF_CONST(0.99616963), COEF_CONST(0.992353931), COEF_CONST(0.992353931), COEF_CONST(0.99235393) },
217 { COEF_CONST(0.992353931), COEF_CONST(0.992353931), COEF_CONST(0.984766325), COEF_CONST(0.980994305), COEF_CONST(0.980994305) },
218 { COEF_CONST(0.988552848), COEF_CONST(0.984766325), COEF_CONST(0.977236734), COEF_CONST(0.966050157), COEF_CONST(0.962349827) },
219 { COEF_CONST(0.984766325), COEF_CONST(0.977236734), COEF_CONST(0.966050157), COEF_CONST(0.951333663), COEF_CONST(0.944061881) },
220 { COEF_CONST(0.980994305), COEF_CONST(0.969764715), COEF_CONST(0.951333663), COEF_CONST(0.933255062), COEF_CONST(0.922571949) },
221 { COEF_CONST(0.977236734), COEF_CONST(0.958663671), COEF_CONST(0.936843519), COEF_CONST(0.915517901), COEF_CONST(0.898117847) },
222 { COEF_CONST(0.969764715), COEF_CONST(0.947691892), COEF_CONST(0.922571949), COEF_CONST(0.898117847), COEF_CONST(0.874311936) }
223};
224
225static const real_t g_decayslope[MAX_SA_BAND] = {
226 FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(0.95),FRAC_CONST(0.9), FRAC_CONST(0.85), FRAC_CONST(0.8),
227 FRAC_CONST(0.75),FRAC_CONST(0.7), FRAC_CONST(0.65),FRAC_CONST(0.6), FRAC_CONST(0.55),FRAC_CONST(0.5), FRAC_CONST(0.45),
228 FRAC_CONST(0.4), FRAC_CONST(0.35),FRAC_CONST(0.3), FRAC_CONST(0.25),FRAC_CONST(0.2), FRAC_CONST(0.15), FRAC_CONST(0.1),
229 FRAC_CONST(0.05),FRAC_CONST(0), FRAC_CONST(0), FRAC_CONST(0), FRAC_CONST(0), FRAC_CONST(0), FRAC_CONST(0),
230 FRAC_CONST(0), FRAC_CONST(0), FRAC_CONST(0), FRAC_CONST(0), FRAC_CONST(0), FRAC_CONST(0), FRAC_CONST(0),
231 FRAC_CONST(0), FRAC_CONST(0), FRAC_CONST(0), FRAC_CONST(0), FRAC_CONST(0), FRAC_CONST(0), FRAC_CONST(0),
232 FRAC_CONST(0), FRAC_CONST(0), FRAC_CONST(0)
233};
234
235static const real_t sa_sqrt_1_minus[8][2] = {
236 { FRAC_CONST(1), FRAC_CONST(1) },
237 { FRAC_CONST(0.998744206), FRAC_CONST(0.984066644) },
238 { FRAC_CONST(0.997504707), FRAC_CONST(0.959473168) },
239 { FRAC_CONST(0.995037562), FRAC_CONST(0.894683804) },
240 { FRAC_CONST(0.990165638), FRAC_CONST(0.826933317) },
241 { FRAC_CONST(0.980663811), FRAC_CONST(0.706312672) },
242 { FRAC_CONST(0.962494836), FRAC_CONST(0.45341406) },
243 { FRAC_CONST(0.929071574), FRAC_CONST(0) }
244};
245
246static const uint8_t sa_freq_scale[9][2] =
247{
248 { 0, 0},
249 { 1, 1},
250 { 2, 2},
251 { 3, 3},
252 { 5, 5},
253 { 7, 7},
254 {10,10},
255 {13,13},
256 {46,23}
257};
258
259static const uint8_t pan_freq_scale[21] =
260{
261 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
262 11, 12, 13, 14, 15, 18, 22, 26, 32, 64
263};
264
265static const uint8_t pan_quant_class[20] =
266{
267 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
268 2, 2, 2, 2, 3, 3, 3, 4, 4, 4
269};
270
271/* Inverse mapping lookup */
272static const uint8_t pan_inv_freq[64] = {
273 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
274 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18,
275 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
276 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19
277};
278
279static const uint8_t sa_inv_freq[MAX_SA_BAND] = {
280 0, 1, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6,
281 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
282 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
283 7, 7, 7, 7, 7, 7, 7
284};
285
286static const real_t filter_coeff[] =
287{
288 FRAC_CONST(0.65143905754106),
289 FRAC_CONST(0.56471812200776),
290 FRAC_CONST(0.48954165955695)
291};
292
293static const uint8_t delay_length[][2] =
294{
295 { 1, 3 }, { 2, 4 }, { 3, 5 }
296};
297
298static const real_t delay_fraction[] =
299{
300 FRAC_CONST(0.43), FRAC_CONST(0.75), FRAC_CONST(0.347)
301};
302
303static const real_t peak_decay[2] =
304{
305 FRAC_CONST(0.58664621951003), FRAC_CONST(0.76592833836465)
306};
307
308static const real_t smooth_coeff[2] =
309{
310 FRAC_CONST(0.6), FRAC_CONST(0.25)
311};
312
313/* Please note that these are the same tables as in plain PS */
314static const complex_t Q_Fract_allpass_Qmf[][3] = {
315 { { FRAC_CONST(0.7804303765), FRAC_CONST(0.6252426505) }, { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(0.8550928831), FRAC_CONST(0.5184748173) } },
316 { { FRAC_CONST(-0.4399392009), FRAC_CONST(0.8980275393) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(-0.0643581524), FRAC_CONST(0.9979268909) } },
317 { { FRAC_CONST(-0.9723699093), FRAC_CONST(-0.2334454209) }, { FRAC_CONST(0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(-0.9146071672), FRAC_CONST(0.4043435752) } },
318 { { FRAC_CONST(0.0157073960), FRAC_CONST(-0.9998766184) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(-0.7814115286), FRAC_CONST(-0.6240159869) } },
319 { { FRAC_CONST(0.9792228341), FRAC_CONST(-0.2027871907) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(0.1920081824), FRAC_CONST(-0.9813933372) } },
320 { { FRAC_CONST(0.4115142524), FRAC_CONST(0.9114032984) }, { FRAC_CONST(0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(0.9589683414), FRAC_CONST(-0.2835132182) } },
321 { { FRAC_CONST(-0.7996847630), FRAC_CONST(0.6004201174) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(0.6947838664), FRAC_CONST(0.7192186117) } },
322 { { FRAC_CONST(-0.7604058385), FRAC_CONST(-0.6494481564) }, { FRAC_CONST(0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(-0.3164770305), FRAC_CONST(0.9486001730) } },
323 { { FRAC_CONST(0.4679299891), FRAC_CONST(-0.8837655187) }, { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(-0.9874414206), FRAC_CONST(0.1579856575) } },
324 { { FRAC_CONST(0.9645573497), FRAC_CONST(0.2638732493) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(-0.5966450572), FRAC_CONST(-0.8025052547) } },
325 { { FRAC_CONST(-0.0471066870), FRAC_CONST(0.9988898635) }, { FRAC_CONST(0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.4357025325), FRAC_CONST(-0.9000906944) } },
326 { { FRAC_CONST(-0.9851093888), FRAC_CONST(0.1719288528) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(0.9995546937), FRAC_CONST(-0.0298405960) } },
327 { { FRAC_CONST(-0.3826831877), FRAC_CONST(-0.9238796234) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(0.4886211455), FRAC_CONST(0.8724960685) } },
328 { { FRAC_CONST(0.8181498647), FRAC_CONST(-0.5750049949) }, { FRAC_CONST(0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.5477093458), FRAC_CONST(0.8366686702) } },
329 { { FRAC_CONST(0.7396308780), FRAC_CONST(0.6730127335) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.9951074123), FRAC_CONST(-0.0987988561) } },
330 { { FRAC_CONST(-0.4954589605), FRAC_CONST(0.8686313629) }, { FRAC_CONST(0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(-0.3725017905), FRAC_CONST(-0.9280315042) } },
331 { { FRAC_CONST(-0.9557929039), FRAC_CONST(-0.2940406799) }, { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(0.6506417990), FRAC_CONST(-0.7593847513) } },
332 { { FRAC_CONST(0.0784594864), FRAC_CONST(-0.9969173074) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.9741733670), FRAC_CONST(0.2258014232) } },
333 { { FRAC_CONST(0.9900237322), FRAC_CONST(-0.1409008205) }, { FRAC_CONST(0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.2502108514), FRAC_CONST(0.9681913853) } },
334 { { FRAC_CONST(0.3534744382), FRAC_CONST(0.9354441762) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(-0.7427945137), FRAC_CONST(0.6695194840) } },
335 { { FRAC_CONST(-0.8358076215), FRAC_CONST(0.5490224361) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(-0.9370992780), FRAC_CONST(-0.3490629196) } },
336 { { FRAC_CONST(-0.7181259394), FRAC_CONST(-0.6959131360) }, { FRAC_CONST(0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.1237744763), FRAC_CONST(-0.9923103452) } },
337 { { FRAC_CONST(0.5224990249), FRAC_CONST(-0.8526399136) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(0.8226406574), FRAC_CONST(-0.5685616732) } },
338 { { FRAC_CONST(0.9460852146), FRAC_CONST(0.3239179254) }, { FRAC_CONST(0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(0.8844994903), FRAC_CONST(0.4665412009) } },
339 { { FRAC_CONST(-0.1097348556), FRAC_CONST(0.9939609170) }, { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(-0.0047125919), FRAC_CONST(0.9999889135) } },
340 { { FRAC_CONST(-0.9939610362), FRAC_CONST(0.1097337380) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(-0.8888573647), FRAC_CONST(0.4581840038) } },
341 { { FRAC_CONST(-0.3239168525), FRAC_CONST(-0.9460855722) }, { FRAC_CONST(0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(-0.8172453642), FRAC_CONST(-0.5762898922) } },
342 { { FRAC_CONST(0.8526405096), FRAC_CONST(-0.5224980116) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(0.1331215799), FRAC_CONST(-0.9910997152) } },
343 { { FRAC_CONST(0.6959123611), FRAC_CONST(0.7181267142) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(0.9403476119), FRAC_CONST(-0.3402152061) } },
344 { { FRAC_CONST(-0.5490233898), FRAC_CONST(0.8358070254) }, { FRAC_CONST(0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(0.7364512086), FRAC_CONST(0.6764906645) } },
345 { { FRAC_CONST(-0.9354437590), FRAC_CONST(-0.3534754813) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.2593250275), FRAC_CONST(0.9657900929) } },
346 { { FRAC_CONST(0.1409019381), FRAC_CONST(-0.9900235534) }, { FRAC_CONST(0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(-0.9762582779), FRAC_CONST(0.2166097313) } },
347 { { FRAC_CONST(0.9969173670), FRAC_CONST(-0.0784583688) }, { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(-0.6434556246), FRAC_CONST(-0.7654833794) } },
348 { { FRAC_CONST(0.2940396070), FRAC_CONST(0.9557932615) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.3812320232), FRAC_CONST(-0.9244794250) } },
349 { { FRAC_CONST(-0.8686318994), FRAC_CONST(0.4954580069) }, { FRAC_CONST(0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.9959943891), FRAC_CONST(-0.0894154981) } },
350 { { FRAC_CONST(-0.6730118990), FRAC_CONST(-0.7396316528) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(0.5397993922), FRAC_CONST(0.8417937160) } },
351 { { FRAC_CONST(0.5750059485), FRAC_CONST(-0.8181492686) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(-0.4968227744), FRAC_CONST(0.8678520322) } },
352 { { FRAC_CONST(0.9238792062), FRAC_CONST(0.3826842010) }, { FRAC_CONST(0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.9992290139), FRAC_CONST(-0.0392601527) } },
353 { { FRAC_CONST(-0.1719299555), FRAC_CONST(0.9851091504) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.4271997511), FRAC_CONST(-0.9041572809) } },
354 { { FRAC_CONST(-0.9988899231), FRAC_CONST(0.0471055657) }, { FRAC_CONST(0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(0.6041822433), FRAC_CONST(-0.7968461514) } },
355 { { FRAC_CONST(-0.2638721764), FRAC_CONST(-0.9645576477) }, { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(0.9859085083), FRAC_CONST(0.1672853529) } },
356 { { FRAC_CONST(0.8837660551), FRAC_CONST(-0.4679289758) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.3075223565), FRAC_CONST(0.9515408874) } },
357 { { FRAC_CONST(0.6494473219), FRAC_CONST(0.7604066133) }, { FRAC_CONST(0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(-0.7015317082), FRAC_CONST(0.7126382589) } },
358 { { FRAC_CONST(-0.6004210114), FRAC_CONST(0.7996840477) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(-0.9562535882), FRAC_CONST(-0.2925389707) } },
359 { { FRAC_CONST(-0.9114028811), FRAC_CONST(-0.4115152657) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(-0.1827499419), FRAC_CONST(-0.9831594229) } },
360 { { FRAC_CONST(0.2027882934), FRAC_CONST(-0.9792225957) }, { FRAC_CONST(0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(0.7872582674), FRAC_CONST(-0.6166234016) } },
361 { { FRAC_CONST(0.9998766780), FRAC_CONST(-0.0157062728) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(0.9107555747), FRAC_CONST(0.4129458666) } },
362 { { FRAC_CONST(0.2334443331), FRAC_CONST(0.9723701477) }, { FRAC_CONST(0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(0.0549497530), FRAC_CONST(0.9984891415) } },
363 { { FRAC_CONST(-0.8980280757), FRAC_CONST(0.4399381876) }, { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(-0.8599416018), FRAC_CONST(0.5103924870) } },
364 { { FRAC_CONST(-0.6252418160), FRAC_CONST(-0.7804310918) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(-0.8501682281), FRAC_CONST(-0.5265110731) } },
365 { { FRAC_CONST(0.6252435446), FRAC_CONST(-0.7804297209) }, { FRAC_CONST(0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.0737608299), FRAC_CONST(-0.9972759485) } },
366 { { FRAC_CONST(0.8980270624), FRAC_CONST(0.4399402142) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(0.9183775187), FRAC_CONST(-0.3957053721) } },
367 { { FRAC_CONST(-0.2334465086), FRAC_CONST(0.9723696709) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(0.7754954696), FRAC_CONST(0.6313531399) } },
368 { { FRAC_CONST(-0.9998766184), FRAC_CONST(-0.0157085191) }, { FRAC_CONST(0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.2012493610), FRAC_CONST(0.9795400500) } },
369 { { FRAC_CONST(-0.2027861029), FRAC_CONST(-0.9792230725) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.9615978599), FRAC_CONST(0.2744622827) } },
370 { { FRAC_CONST(0.9114037752), FRAC_CONST(-0.4115132093) }, { FRAC_CONST(0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(-0.6879743338), FRAC_CONST(-0.7257350087) } },
371 { { FRAC_CONST(0.6004192233), FRAC_CONST(0.7996854186) }, { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(0.3254036009), FRAC_CONST(-0.9455752373) } },
372 { { FRAC_CONST(-0.6494490504), FRAC_CONST(0.7604051232) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.9888865948), FRAC_CONST(-0.1486719251) } },
373 { { FRAC_CONST(-0.8837650418), FRAC_CONST(-0.4679309726) }, { FRAC_CONST(0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.5890548825), FRAC_CONST(0.8080930114) } },
374 { { FRAC_CONST(0.2638743520), FRAC_CONST(-0.9645570517) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(-0.4441666007), FRAC_CONST(0.8959442377) } },
375 { { FRAC_CONST(0.9988898039), FRAC_CONST(0.0471078083) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(-0.9997915030), FRAC_CONST(0.0204183888) } },
376 { { FRAC_CONST(0.1719277352), FRAC_CONST(0.9851095676) }, { FRAC_CONST(0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.4803760946), FRAC_CONST(-0.8770626187) } },
377 { { FRAC_CONST(-0.9238800406), FRAC_CONST(0.3826821446) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(0.5555707216), FRAC_CONST(-0.8314692974) } },
378 { { FRAC_CONST(-0.5750041008), FRAC_CONST(-0.8181505203) }, { FRAC_CONST(0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(0.9941320419), FRAC_CONST(0.1081734300) } }
379};
380
381static const complex_t Phi_Fract_Qmf[] = {
382 { FRAC_CONST(0.8181497455), FRAC_CONST(0.5750052333) },
383 { FRAC_CONST(-0.2638730407), FRAC_CONST(0.9645574093) },
384 { FRAC_CONST(-0.9969173074), FRAC_CONST(0.0784590989) },
385 { FRAC_CONST(-0.4115143716), FRAC_CONST(-0.9114032984) },
386 { FRAC_CONST(0.7181262970), FRAC_CONST(-0.6959127784) },
387 { FRAC_CONST(0.8980275989), FRAC_CONST(0.4399391711) },
388 { FRAC_CONST(-0.1097343117), FRAC_CONST(0.9939609766) },
389 { FRAC_CONST(-0.9723699093), FRAC_CONST(0.2334453613) },
390 { FRAC_CONST(-0.5490227938), FRAC_CONST(-0.8358073831) },
391 { FRAC_CONST(0.6004202366), FRAC_CONST(-0.7996846437) },
392 { FRAC_CONST(0.9557930231), FRAC_CONST(0.2940403223) },
393 { FRAC_CONST(0.0471064523), FRAC_CONST(0.9988898635) },
394 { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) },
395 { FRAC_CONST(-0.6730124950), FRAC_CONST(-0.7396311164) },
396 { FRAC_CONST(0.4679298103), FRAC_CONST(-0.8837656379) },
397 { FRAC_CONST(0.9900236726), FRAC_CONST(0.1409012377) },
398 { FRAC_CONST(0.2027872950), FRAC_CONST(0.9792228341) },
399 { FRAC_CONST(-0.8526401520), FRAC_CONST(0.5224985480) },
400 { FRAC_CONST(-0.7804304361), FRAC_CONST(-0.6252426505) },
401 { FRAC_CONST(0.3239174187), FRAC_CONST(-0.9460853338) },
402 { FRAC_CONST(0.9998766184), FRAC_CONST(-0.0157073177) },
403 { FRAC_CONST(0.3534748554), FRAC_CONST(0.9354440570) },
404 { FRAC_CONST(-0.7604059577), FRAC_CONST(0.6494480371) },
405 { FRAC_CONST(-0.8686315417), FRAC_CONST(-0.4954586625) },
406 { FRAC_CONST(0.1719291061), FRAC_CONST(-0.9851093292) },
407 { FRAC_CONST(0.9851093292), FRAC_CONST(-0.1719291061) },
408 { FRAC_CONST(0.4954586625), FRAC_CONST(0.8686315417) },
409 { FRAC_CONST(-0.6494480371), FRAC_CONST(0.7604059577) },
410 { FRAC_CONST(-0.9354440570), FRAC_CONST(-0.3534748554) },
411 { FRAC_CONST(0.0157073177), FRAC_CONST(-0.9998766184) },
412 { FRAC_CONST(0.9460853338), FRAC_CONST(-0.3239174187) },
413 { FRAC_CONST(0.6252426505), FRAC_CONST(0.7804304361) },
414 { FRAC_CONST(-0.5224985480), FRAC_CONST(0.8526401520) },
415 { FRAC_CONST(-0.9792228341), FRAC_CONST(-0.2027872950) },
416 { FRAC_CONST(-0.1409012377), FRAC_CONST(-0.9900236726) },
417 { FRAC_CONST(0.8837656379), FRAC_CONST(-0.4679298103) },
418 { FRAC_CONST(0.7396311164), FRAC_CONST(0.6730124950) },
419 { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) },
420 { FRAC_CONST(-0.9988898635), FRAC_CONST(-0.0471064523) },
421 { FRAC_CONST(-0.2940403223), FRAC_CONST(-0.9557930231) },
422 { FRAC_CONST(0.7996846437), FRAC_CONST(-0.6004202366) },
423 { FRAC_CONST(0.8358073831), FRAC_CONST(0.5490227938) },
424 { FRAC_CONST(-0.2334453613), FRAC_CONST(0.9723699093) },
425 { FRAC_CONST(-0.9939609766), FRAC_CONST(0.1097343117) },
426 { FRAC_CONST(-0.4399391711), FRAC_CONST(-0.8980275989) },
427 { FRAC_CONST(0.6959127784), FRAC_CONST(-0.7181262970) },
428 { FRAC_CONST(0.9114032984), FRAC_CONST(0.4115143716) },
429 { FRAC_CONST(-0.0784590989), FRAC_CONST(0.9969173074) },
430 { FRAC_CONST(-0.9645574093), FRAC_CONST(0.2638730407) },
431 { FRAC_CONST(-0.5750052333), FRAC_CONST(-0.8181497455) },
432 { FRAC_CONST(0.5750052333), FRAC_CONST(-0.8181497455) },
433 { FRAC_CONST(0.9645574093), FRAC_CONST(0.2638730407) },
434 { FRAC_CONST(0.0784590989), FRAC_CONST(0.9969173074) },
435 { FRAC_CONST(-0.9114032984), FRAC_CONST(0.4115143716) },
436 { FRAC_CONST(-0.6959127784), FRAC_CONST(-0.7181262970) },
437 { FRAC_CONST(0.4399391711), FRAC_CONST(-0.8980275989) },
438 { FRAC_CONST(0.9939609766), FRAC_CONST(0.1097343117) },
439 { FRAC_CONST(0.2334453613), FRAC_CONST(0.9723699093) },
440 { FRAC_CONST(-0.8358073831), FRAC_CONST(0.5490227938) },
441 { FRAC_CONST(-0.7996846437), FRAC_CONST(-0.6004202366) },
442 { FRAC_CONST(0.2940403223), FRAC_CONST(-0.9557930231) },
443 { FRAC_CONST(0.9988898635), FRAC_CONST(-0.0471064523) },
444 { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) },
445 { FRAC_CONST(-0.7396311164), FRAC_CONST(0.6730124950) }
446};
447
448
449/* static function declarations */
450static void drm_ps_sa_element(drm_ps_info *ps, bitfile *ld);
451static void drm_ps_pan_element(drm_ps_info *ps, bitfile *ld);
452static int8_t huff_dec(bitfile *ld, drm_ps_huff_tab huff);
453
454
455uint16_t drm_ps_data(drm_ps_info *ps, bitfile *ld)
456{
457 uint16_t bits = (uint16_t)faad_get_processed_bits(ld);
458
459 ps->drm_ps_data_available = 1;
460
461 ps->bs_enable_sa = faad_get1bit(ld);
462 ps->bs_enable_pan = faad_get1bit(ld);
463
464 if (ps->bs_enable_sa)
465 {
466 drm_ps_sa_element(ps, ld);
467 }
468
469 if (ps->bs_enable_pan)
470 {
471 drm_ps_pan_element(ps, ld);
472 }
473
474 bits = (uint16_t)faad_get_processed_bits(ld) - bits;
475
476 return bits;
477}
478
479static void drm_ps_sa_element(drm_ps_info *ps, bitfile *ld)
480{
481 drm_ps_huff_tab huff;
482 uint8_t band;
483
484 ps->bs_sa_dt_flag = faad_get1bit(ld);
485 if (ps->bs_sa_dt_flag)
486 {
487 huff = t_huffman_sa;
488 } else {
489 huff = f_huffman_sa;
490 }
491
492 for (band = 0; band < DRM_NUM_SA_BANDS; band++)
493 {
494 ps->bs_sa_data[band] = huff_dec(ld, huff);
495 }
496}
497
498static void drm_ps_pan_element(drm_ps_info *ps, bitfile *ld)
499{
500 drm_ps_huff_tab huff;
501 uint8_t band;
502
503 ps->bs_pan_dt_flag = faad_get1bit(ld);
504 if (ps->bs_pan_dt_flag)
505 {
506 huff = t_huffman_pan;
507 } else {
508 huff = f_huffman_pan;
509 }
510
511 for (band = 0; band < DRM_NUM_PAN_BANDS; band++)
512 {
513 ps->bs_pan_data[band] = huff_dec(ld, huff);
514 }
515}
516
517/* binary search huffman decoding */
518static int8_t huff_dec(bitfile *ld, drm_ps_huff_tab huff)
519{
520 uint8_t bit;
521 int16_t index = 0;
522
523 while (index >= 0)
524 {
525 bit = (uint8_t)faad_get1bit(ld);
526 index = huff[index][bit];
527 }
528
529 return index + 15;
530}
531
532
533static int8_t sa_delta_clip(drm_ps_info *ps, int8_t i)
534{
535 if (i < 0) {
536 /* printf(" SAminclip %d", i); */
537 ps->sa_decode_error = 1;
538 return 0;
539 } else if (i > 7) {
540 /* printf(" SAmaxclip %d", i); */
541 ps->sa_decode_error = 1;
542 return 7;
543 } else
544 return i;
545}
546
547static int8_t pan_delta_clip(drm_ps_info *ps, int8_t i)
548{
549 if (i < -7) {
550 /* printf(" PANminclip %d", i); */
551 ps->pan_decode_error = 1;
552 return -7;
553 } else if (i > 7) {
554 /* printf(" PANmaxclip %d", i); */
555 ps->pan_decode_error = 1;
556 return 7;
557 } else
558 return i;
559}
560
561static void drm_ps_delta_decode(drm_ps_info *ps)
562{
563 uint8_t band;
564
565 if (ps->bs_enable_sa)
566 {
567 if (ps->bs_sa_dt_flag && !ps->g_last_had_sa)
568 {
569 for (band = 0; band < DRM_NUM_SA_BANDS; band++)
570 {
571 ps->g_prev_sa_index[band] = 0;
572 }
573 }
574 if (ps->bs_sa_dt_flag)
575 {
576 ps->g_sa_index[0] = sa_delta_clip(ps, ps->g_prev_sa_index[0]+ps->bs_sa_data[0]);
577
578 } else {
579 ps->g_sa_index[0] = sa_delta_clip(ps,ps->bs_sa_data[0]);
580 }
581
582 for (band = 1; band < DRM_NUM_SA_BANDS; band++)
583 {
584 if (ps->bs_sa_dt_flag)
585 {
586 ps->g_sa_index[band] = sa_delta_clip(ps, ps->g_prev_sa_index[band] + ps->bs_sa_data[band]);
587 } else {
588 ps->g_sa_index[band] = sa_delta_clip(ps, ps->g_sa_index[band-1] + ps->bs_sa_data[band]);
589 }
590 }
591 }
592
593 /* An error during SA decoding implies PAN data will be undecodable, too */
594 /* Also, we don't like on/off switching in PS, so we force to last settings */
595 if (ps->sa_decode_error) {
596 ps->pan_decode_error = 1;
597 ps->bs_enable_pan = ps->g_last_had_pan;
598 ps->bs_enable_sa = ps->g_last_had_sa;
599 }
600
601
602 if (ps->bs_enable_sa)
603 {
604 if (ps->sa_decode_error) {
605 for (band = 0; band < DRM_NUM_SA_BANDS; band++)
606 {
607 ps->g_sa_index[band] = ps->g_last_good_sa_index[band];
608 }
609 } else {
610 for (band = 0; band < DRM_NUM_SA_BANDS; band++)
611 {
612 ps->g_last_good_sa_index[band] = ps->g_sa_index[band];
613 }
614 }
615 }
616
617 if (ps->bs_enable_pan)
618 {
619 if (ps->bs_pan_dt_flag && !ps->g_last_had_pan)
620 {
621/* The DRM PS spec doesn't say anything about this case. (deltacoded in time without a previous frame)
622 AAC PS spec you must tread previous frame as 0, so that's what we try.
623*/
624 for (band = 0; band < DRM_NUM_PAN_BANDS; band++)
625 {
626 ps->g_prev_pan_index[band] = 0;
627 }
628 }
629
630 if (ps->bs_pan_dt_flag)
631 {
632 ps->g_pan_index[0] = pan_delta_clip(ps, ps->g_prev_pan_index[0]+ps->bs_pan_data[0]);
633 } else {
634 ps->g_pan_index[0] = pan_delta_clip(ps, ps->bs_pan_data[0]);
635 }
636
637 for (band = 1; band < DRM_NUM_PAN_BANDS; band++)
638 {
639 if (ps->bs_pan_dt_flag)
640 {
641 ps->g_pan_index[band] = pan_delta_clip(ps, ps->g_prev_pan_index[band] + ps->bs_pan_data[band]);
642 } else {
643 ps->g_pan_index[band] = pan_delta_clip(ps, ps->g_pan_index[band-1] + ps->bs_pan_data[band]);
644 }
645 }
646
647 if (ps->pan_decode_error) {
648 for (band = 0; band < DRM_NUM_PAN_BANDS; band++)
649 {
650 ps->g_pan_index[band] = ps->g_last_good_pan_index[band];
651 }
652 } else {
653 for (band = 0; band < DRM_NUM_PAN_BANDS; band++)
654 {
655 ps->g_last_good_pan_index[band] = ps->g_pan_index[band];
656 }
657 }
658 }
659}
660
661static void drm_calc_sa_side_signal(drm_ps_info *ps, qmf_t X[38][64], uint8_t rateselect)
662{
663 uint8_t s, b, k;
664 complex_t qfrac, tmp0, tmp, in, R0;
665 real_t peakdiff;
666 real_t nrg;
667 real_t power;
668 real_t transratio;
669 real_t new_delay_slopes[NUM_OF_LINKS];
670 uint8_t temp_delay_ser[NUM_OF_LINKS];
671 complex_t Phi_Fract;
672#ifdef FIXED_POINT
673 uint32_t in_re, in_im;
674#endif
675
676 for (b = 0; b < sa_freq_scale[DRM_NUM_SA_BANDS][rateselect]; b++)
677 {
678 /* set delay indices */
679 for (k = 0; k < NUM_OF_LINKS; k++)
680 temp_delay_ser[k] = ps->delay_buf_index_ser[k];
681
682 RE(Phi_Fract) = RE(Phi_Fract_Qmf[b]);
683 IM(Phi_Fract) = IM(Phi_Fract_Qmf[b]);
684
685 for (s = 0; s < NUM_OF_SUBSAMPLES; s++)
686 {
687 const real_t gamma = REAL_CONST(1.5);
688 const real_t sigma = REAL_CONST(1.5625);
689
690 RE(in) = QMF_RE(X[s][b]);
691 IM(in) = QMF_IM(X[s][b]);
692
693#ifdef FIXED_POINT
694 /* NOTE: all input is scaled by 2^(-5) because of fixed point QMF
695 * meaning that P will be scaled by 2^(-10) compared to floating point version
696 */
697 in_re = ((abs(RE(in))+(1<<(REAL_BITS-1)))>>REAL_BITS);
698 in_im = ((abs(IM(in))+(1<<(REAL_BITS-1)))>>REAL_BITS);
699 power = in_re*in_re + in_im*in_im;
700#else
701 power = MUL_R(RE(in),RE(in)) + MUL_R(IM(in),IM(in));
702#endif
703
704 ps->peakdecay_fast[b] = MUL_F(ps->peakdecay_fast[b], peak_decay[rateselect]);
705 if (ps->peakdecay_fast[b] < power)
706 ps->peakdecay_fast[b] = power;
707
708 peakdiff = ps->prev_peakdiff[b];
709 peakdiff += MUL_F((ps->peakdecay_fast[b] - power - ps->prev_peakdiff[b]), smooth_coeff[rateselect]);
710 ps->prev_peakdiff[b] = peakdiff;
711
712 nrg = ps->prev_nrg[b];
713 nrg += MUL_F((power - ps->prev_nrg[b]), smooth_coeff[rateselect]);
714 ps->prev_nrg[b] = nrg;
715
716 if (MUL_R(peakdiff, gamma) <= nrg) {
717 transratio = sigma;
718 } else {
719 transratio = MUL_R(DIV_R(nrg, MUL_R(peakdiff, gamma)), sigma);
720 }
721
722 for (k = 0; k < NUM_OF_LINKS; k++)
723 {
724 new_delay_slopes[k] = MUL_F(g_decayslope[b], filter_coeff[k]);
725 }
726
727 RE(tmp0) = RE(ps->d_buff[0][b]);
728 IM(tmp0) = IM(ps->d_buff[0][b]);
729
730 RE(ps->d_buff[0][b]) = RE(ps->d_buff[1][b]);
731 IM(ps->d_buff[0][b]) = IM(ps->d_buff[1][b]);
732
733 RE(ps->d_buff[1][b]) = RE(in);
734 IM(ps->d_buff[1][b]) = IM(in);
735
736 ComplexMult(&RE(tmp), &IM(tmp), RE(tmp0), IM(tmp0), RE(Phi_Fract), IM(Phi_Fract));
737
738 RE(R0) = RE(tmp);
739 IM(R0) = IM(tmp);
740
741 for (k = 0; k < NUM_OF_LINKS; k++)
742 {
743 RE(qfrac) = RE(Q_Fract_allpass_Qmf[b][k]);
744 IM(qfrac) = IM(Q_Fract_allpass_Qmf[b][k]);
745
746 RE(tmp0) = RE(ps->d2_buff[k][temp_delay_ser[k]][b]);
747 IM(tmp0) = IM(ps->d2_buff[k][temp_delay_ser[k]][b]);
748
749 ComplexMult(&RE(tmp), &IM(tmp), RE(tmp0), IM(tmp0), RE(qfrac), IM(qfrac));
750
751 RE(tmp) += -MUL_F(new_delay_slopes[k], RE(R0));
752 IM(tmp) += -MUL_F(new_delay_slopes[k], IM(R0));
753
754 RE(ps->d2_buff[k][temp_delay_ser[k]][b]) = RE(R0) + MUL_F(new_delay_slopes[k], RE(tmp));
755 IM(ps->d2_buff[k][temp_delay_ser[k]][b]) = IM(R0) + MUL_F(new_delay_slopes[k], IM(tmp));
756
757 RE(R0) = RE(tmp);
758 IM(R0) = IM(tmp);
759 }
760
761 QMF_RE(ps->SA[s][b]) = MUL_R(RE(R0), transratio);
762 QMF_IM(ps->SA[s][b]) = MUL_R(IM(R0), transratio);
763
764 for (k = 0; k < NUM_OF_LINKS; k++)
765 {
766 if (++temp_delay_ser[k] >= delay_length[k][rateselect])
767 temp_delay_ser[k] = 0;
768 }
769 }
770 }
771
772 for (k = 0; k < NUM_OF_LINKS; k++)
773 ps->delay_buf_index_ser[k] = temp_delay_ser[k];
774}
775
776static void drm_add_ambiance(drm_ps_info *ps, uint8_t rateselect, qmf_t X_left[38][64], qmf_t X_right[38][64])
777{
778 uint8_t s, b, ifreq, qclass;
779 real_t sa_map[MAX_SA_BAND], sa_dir_map[MAX_SA_BAND], k_sa_map[MAX_SA_BAND], k_sa_dir_map[MAX_SA_BAND];
780 real_t new_dir_map, new_sa_map;
781
782 if (ps->bs_enable_sa)
783 {
784 /* Instead of dequantization and mapping, we use an inverse mapping
785 to look up all the values we need */
786 for (b = 0; b < sa_freq_scale[DRM_NUM_SA_BANDS][rateselect]; b++)
787 {
788 const real_t inv_f_num_of_subsamples = FRAC_CONST(0.03333333333);
789
790 ifreq = sa_inv_freq[b];
791 qclass = (b != 0);
792
793 sa_map[b] = sa_quant[ps->g_prev_sa_index[ifreq]][qclass];
794 new_sa_map = sa_quant[ps->g_sa_index[ifreq]][qclass];
795
796 k_sa_map[b] = MUL_F(inv_f_num_of_subsamples, (new_sa_map - sa_map[b]));
797
798 sa_dir_map[b] = sa_sqrt_1_minus[ps->g_prev_sa_index[ifreq]][qclass];
799 new_dir_map = sa_sqrt_1_minus[ps->g_sa_index[ifreq]][qclass];
800
801 k_sa_dir_map[b] = MUL_F(inv_f_num_of_subsamples, (new_dir_map - sa_dir_map[b]));
802
803 }
804
805 for (s = 0; s < NUM_OF_SUBSAMPLES; s++)
806 {
807 for (b = 0; b < sa_freq_scale[DRM_NUM_SA_BANDS][rateselect]; b++)
808 {
809 QMF_RE(X_right[s][b]) = MUL_F(QMF_RE(X_left[s][b]), sa_dir_map[b]) - MUL_F(QMF_RE(ps->SA[s][b]), sa_map[b]);
810 QMF_IM(X_right[s][b]) = MUL_F(QMF_IM(X_left[s][b]), sa_dir_map[b]) - MUL_F(QMF_IM(ps->SA[s][b]), sa_map[b]);
811 QMF_RE(X_left[s][b]) = MUL_F(QMF_RE(X_left[s][b]), sa_dir_map[b]) + MUL_F(QMF_RE(ps->SA[s][b]), sa_map[b]);
812 QMF_IM(X_left[s][b]) = MUL_F(QMF_IM(X_left[s][b]), sa_dir_map[b]) + MUL_F(QMF_IM(ps->SA[s][b]), sa_map[b]);
813
814 sa_map[b] += k_sa_map[b];
815 sa_dir_map[b] += k_sa_dir_map[b];
816 }
817 for (b = sa_freq_scale[DRM_NUM_SA_BANDS][rateselect]; b < NUM_OF_QMF_CHANNELS; b++)
818 {
819 QMF_RE(X_right[s][b]) = QMF_RE(X_left[s][b]);
820 QMF_IM(X_right[s][b]) = QMF_IM(X_left[s][b]);
821 }
822 }
823 }
824 else {
825 for (s = 0; s < NUM_OF_SUBSAMPLES; s++)
826 {
827 for (b = 0; b < NUM_OF_QMF_CHANNELS; b++)
828 {
829 QMF_RE(X_right[s][b]) = QMF_RE(X_left[s][b]);
830 QMF_IM(X_right[s][b]) = QMF_IM(X_left[s][b]);
831 }
832 }
833 }
834}
835
836static void drm_add_pan(drm_ps_info *ps, uint8_t rateselect, qmf_t X_left[38][64], qmf_t X_right[38][64])
837{
838 uint8_t s, b, qclass, ifreq;
839 real_t tmp, coeff1, coeff2;
840 real_t pan_base[MAX_PAN_BAND];
841 real_t pan_delta[MAX_PAN_BAND];
842 qmf_t temp_l, temp_r;
843
844 if (ps->bs_enable_pan)
845 {
846 for (b = 0; b < NUM_OF_QMF_CHANNELS; b++)
847 {
848 /* Instead of dequantization, 20->64 mapping and 2^G(x,y) we do an
849 inverse mapping 64->20 and look up the 2^G(x,y) values directly */
850 ifreq = pan_inv_freq[b];
851 qclass = pan_quant_class[ifreq];
852
853 if (ps->g_prev_pan_index[ifreq] >= 0)
854 {
855 pan_base[b] = pan_pow_2_pos[ps->g_prev_pan_index[ifreq]][qclass];
856 } else {
857 pan_base[b] = pan_pow_2_neg[-ps->g_prev_pan_index[ifreq]][qclass];
858 }
859
860 /* 2^((a-b)/30) = 2^(a/30) * 1/(2^(b/30)) */
861 /* a en b can be negative so we may need to inverse parts */
862 if (ps->g_pan_index[ifreq] >= 0)
863 {
864 if (ps->g_prev_pan_index[ifreq] >= 0)
865 {
866 pan_delta[b] = MUL_C(pan_pow_2_30_pos[ps->g_pan_index[ifreq]][qclass],
867 pan_pow_2_30_neg[ps->g_prev_pan_index[ifreq]][qclass]);
868 } else {
869 pan_delta[b] = MUL_C(pan_pow_2_30_pos[ps->g_pan_index[ifreq]][qclass],
870 pan_pow_2_30_pos[-ps->g_prev_pan_index[ifreq]][qclass]);
871 }
872 } else {
873 if (ps->g_prev_pan_index[ifreq] >= 0)
874 {
875 pan_delta[b] = MUL_C(pan_pow_2_30_neg[-ps->g_pan_index[ifreq]][qclass],
876 pan_pow_2_30_neg[ps->g_prev_pan_index[ifreq]][qclass]);
877 } else {
878 pan_delta[b] = MUL_C(pan_pow_2_30_neg[-ps->g_pan_index[ifreq]][qclass],
879 pan_pow_2_30_pos[-ps->g_prev_pan_index[ifreq]][qclass]);
880 }
881 }
882 }
883
884 for (s = 0; s < NUM_OF_SUBSAMPLES; s++)
885 {
886 /* PAN always uses all 64 channels */
887 for (b = 0; b < NUM_OF_QMF_CHANNELS; b++)
888 {
889 tmp = pan_base[b];
890
891 coeff2 = DIV_R(REAL_CONST(2.0), (REAL_CONST(1.0) + tmp));
892 coeff1 = MUL_R(coeff2, tmp);
893
894 QMF_RE(temp_l) = QMF_RE(X_left[s][b]);
895 QMF_IM(temp_l) = QMF_IM(X_left[s][b]);
896 QMF_RE(temp_r) = QMF_RE(X_right[s][b]);
897 QMF_IM(temp_r) = QMF_IM(X_right[s][b]);
898
899 QMF_RE(X_left[s][b]) = MUL_R(QMF_RE(temp_l), coeff1);
900 QMF_IM(X_left[s][b]) = MUL_R(QMF_IM(temp_l), coeff1);
901 QMF_RE(X_right[s][b]) = MUL_R(QMF_RE(temp_r), coeff2);
902 QMF_IM(X_right[s][b]) = MUL_R(QMF_IM(temp_r), coeff2);
903
904 /* 2^(a+k*b) = 2^a * 2^b * ... * 2^b */
905 /* ^^^^^^^^^^^^^^^ k times */
906 pan_base[b] = MUL_C(pan_base[b], pan_delta[b]);
907 }
908 }
909 }
910}
911
912drm_ps_info *drm_ps_init(void)
913{
914 drm_ps_info *ps = (drm_ps_info*)faad_malloc(sizeof(drm_ps_info));
915
916 memset(ps, 0, sizeof(drm_ps_info));
917
918 return ps;
919}
920
921void drm_ps_free(drm_ps_info *ps)
922{
923 faad_free(ps);
924}
925
926/* main DRM PS decoding function */
927uint8_t drm_ps_decode(drm_ps_info *ps, uint8_t guess, uint32_t samplerate, qmf_t X_left[38][64], qmf_t X_right[38][64])
928{
929 uint8_t rateselect = (samplerate >= 24000);
930
931 if (ps == NULL)
932 {
933 memcpy(X_right, X_left, sizeof(qmf_t)*30*64);
934 return 0;
935 }
936
937 if (!ps->drm_ps_data_available && !guess)
938 {
939 memcpy(X_right, X_left, sizeof(qmf_t)*30*64);
940 memset(ps->g_prev_sa_index, 0, sizeof(ps->g_prev_sa_index));
941 memset(ps->g_prev_pan_index, 0, sizeof(ps->g_prev_pan_index));
942 return 0;
943 }
944
945 /* if SBR CRC doesn't match out, we can assume decode errors to start with,
946 and we'll guess what the parameters should be */
947 if (!guess)
948 {
949 ps->sa_decode_error = 0;
950 ps->pan_decode_error = 0;
951 drm_ps_delta_decode(ps);
952 } else
953 {
954 ps->sa_decode_error = 1;
955 ps->pan_decode_error = 1;
956 /* don't even bother decoding */
957 }
958
959 ps->drm_ps_data_available = 0;
960
961 drm_calc_sa_side_signal(ps, X_left, rateselect);
962 drm_add_ambiance(ps, rateselect, X_left, X_right);
963
964 if (ps->bs_enable_sa)
965 {
966 ps->g_last_had_sa = 1;
967
968 memcpy(ps->g_prev_sa_index, ps->g_sa_index, sizeof(int8_t) * DRM_NUM_SA_BANDS);
969
970 } else {
971 ps->g_last_had_sa = 0;
972 }
973
974 if (ps->bs_enable_pan)
975 {
976 drm_add_pan(ps, rateselect, X_left, X_right);
977
978 ps->g_last_had_pan = 1;
979
980 memcpy(ps->g_prev_pan_index, ps->g_pan_index, sizeof(int8_t) * DRM_NUM_PAN_BANDS);
981
982 } else {
983 ps->g_last_had_pan = 0;
984 }
985
986
987 return 0;
988}
989
990#endif
diff --git a/apps/codecs/libfaad/drm_dec.h b/apps/codecs/libfaad/drm_dec.h
new file mode 100644
index 0000000000..e90b2340bd
--- /dev/null
+++ b/apps/codecs/libfaad/drm_dec.h
@@ -0,0 +1,97 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __DRM_DEC_H__
29#define __DRM_DEC_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#include "bits.h"
36
37#define DRM_PARAMETRIC_STEREO 0
38#define DRM_NUM_SA_BANDS 8
39#define DRM_NUM_PAN_BANDS 20
40#define NUM_OF_LINKS 3
41#define NUM_OF_QMF_CHANNELS 64
42#define NUM_OF_SUBSAMPLES 30
43#define MAX_SA_BAND 46
44#define MAX_PAN_BAND 64
45#define MAX_DELAY 5
46
47typedef struct
48{
49 uint8_t drm_ps_data_available;
50 uint8_t bs_enable_sa;
51 uint8_t bs_enable_pan;
52
53 uint8_t bs_sa_dt_flag;
54 uint8_t bs_pan_dt_flag;
55
56 uint8_t g_last_had_sa;
57 uint8_t g_last_had_pan;
58
59 int8_t bs_sa_data[DRM_NUM_SA_BANDS];
60 int8_t bs_pan_data[DRM_NUM_PAN_BANDS];
61
62 int8_t g_sa_index[DRM_NUM_SA_BANDS];
63 int8_t g_pan_index[DRM_NUM_PAN_BANDS];
64 int8_t g_prev_sa_index[DRM_NUM_SA_BANDS];
65 int8_t g_prev_pan_index[DRM_NUM_PAN_BANDS];
66
67 int8_t sa_decode_error;
68 int8_t pan_decode_error;
69
70 int8_t g_last_good_sa_index[DRM_NUM_SA_BANDS];
71 int8_t g_last_good_pan_index[DRM_NUM_PAN_BANDS];
72
73 qmf_t SA[NUM_OF_SUBSAMPLES][MAX_SA_BAND];
74
75 complex_t d_buff[2][MAX_SA_BAND];
76 complex_t d2_buff[NUM_OF_LINKS][MAX_DELAY][MAX_SA_BAND];
77
78 uint8_t delay_buf_index_ser[NUM_OF_LINKS];
79
80 real_t prev_nrg[MAX_SA_BAND];
81 real_t prev_peakdiff[MAX_SA_BAND];
82 real_t peakdecay_fast[MAX_SA_BAND];
83} drm_ps_info;
84
85
86uint16_t drm_ps_data(drm_ps_info *ps, bitfile *ld);
87
88drm_ps_info *drm_ps_init(void);
89void drm_ps_free(drm_ps_info *ps);
90
91uint8_t drm_ps_decode(drm_ps_info *ps, uint8_t guess, uint32_t samplerate, qmf_t X_left[38][64], qmf_t X_right[38][64]);
92
93#ifdef __cplusplus
94}
95#endif
96#endif
97
diff --git a/apps/codecs/libfaad/error.c b/apps/codecs/libfaad/error.c
new file mode 100644
index 0000000000..8cfd761754
--- /dev/null
+++ b/apps/codecs/libfaad/error.c
@@ -0,0 +1,61 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#include "common.h"
29#include "error.h"
30
31char *err_msg[] = {
32 "No error",
33 "Gain control not yet implemented",
34 "Pulse coding not allowed in short blocks",
35 "Invalid huffman codebook",
36 "Scalefactor out of range",
37 "Unable to find ADTS syncword",
38 "Channel coupling not yet implemented",
39 "Channel configuration not allowed in error resilient frame",
40 "Bit error in error resilient scalefactor decoding",
41 "Error decoding huffman scalefactor (bitstream error)",
42 "Error decoding huffman codeword (bitstream error)",
43 "Non existent huffman codebook number found",
44 "Invalid number of channels",
45 "Maximum number of bitstream elements exceeded",
46 "Input data buffer too small",
47 "Array index out of range",
48 "Maximum number of scalefactor bands exceeded",
49 "Quantised value out of range",
50 "LTP lag out of range",
51 "Invalid SBR parameter decoded",
52 "SBR called without being initialised",
53 "Unexpected channel configuration change",
54 "Error in program_config_element",
55 "First SBR frame is not the same as first AAC frame",
56 "Unexpected fill element with SBR data",
57 "Not all elements were provided with SBR data",
58 "LTP decoding not available",
59 "Output data buffer too small"
60};
61
diff --git a/apps/codecs/libfaad/error.h b/apps/codecs/libfaad/error.h
new file mode 100644
index 0000000000..94ca7bba75
--- /dev/null
+++ b/apps/codecs/libfaad/error.h
@@ -0,0 +1,41 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __ERROR_H__
29#define __ERROR_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#define NUM_ERROR_MESSAGES 28
36extern char *err_msg[];
37
38#ifdef __cplusplus
39}
40#endif
41#endif
diff --git a/apps/codecs/libfaad/filtbank.c b/apps/codecs/libfaad/filtbank.c
new file mode 100644
index 0000000000..13cc265e21
--- /dev/null
+++ b/apps/codecs/libfaad/filtbank.c
@@ -0,0 +1,404 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#include "common.h"
29#include "structs.h"
30
31#include <stdlib.h>
32#include <string.h>
33#ifdef _WIN32_WCE
34#define assert(x)
35#else
36#include <assert.h>
37#endif
38
39#include "filtbank.h"
40#include "decoder.h"
41#include "syntax.h"
42#include "kbd_win.h"
43#include "sine_win.h"
44#include "mdct.h"
45
46
47fb_info *filter_bank_init(uint16_t frame_len)
48{
49 uint16_t nshort = frame_len/8;
50#ifdef LD_DEC
51 uint16_t frame_len_ld = frame_len/2;
52#endif
53
54 fb_info *fb = (fb_info*)faad_malloc(sizeof(fb_info));
55 memset(fb, 0, sizeof(fb_info));
56
57 /* normal */
58 fb->mdct256 = faad_mdct_init(2*nshort);
59 fb->mdct2048 = faad_mdct_init(2*frame_len);
60#ifdef LD_DEC
61 /* LD */
62 fb->mdct1024 = faad_mdct_init(2*frame_len_ld);
63#endif
64
65#ifdef ALLOW_SMALL_FRAMELENGTH
66 if (frame_len == 1024)
67 {
68#endif
69 fb->long_window[0] = sine_long_1024;
70 fb->short_window[0] = sine_short_128;
71 fb->long_window[1] = kbd_long_1024;
72 fb->short_window[1] = kbd_short_128;
73#ifdef LD_DEC
74 fb->ld_window[0] = sine_mid_512;
75 fb->ld_window[1] = ld_mid_512;
76#endif
77#ifdef ALLOW_SMALL_FRAMELENGTH
78 } else /* (frame_len == 960) */ {
79 fb->long_window[0] = sine_long_960;
80 fb->short_window[0] = sine_short_120;
81 fb->long_window[1] = kbd_long_960;
82 fb->short_window[1] = kbd_short_120;
83#ifdef LD_DEC
84 fb->ld_window[0] = sine_mid_480;
85 fb->ld_window[1] = ld_mid_480;
86#endif
87 }
88#endif
89
90 return fb;
91}
92
93void filter_bank_end(fb_info *fb)
94{
95 if (fb != NULL)
96 {
97#ifdef PROFILE
98 printf("FB: %I64d cycles\n", fb->cycles);
99#endif
100
101 faad_mdct_end(fb->mdct256);
102 faad_mdct_end(fb->mdct2048);
103#ifdef LD_DEC
104 faad_mdct_end(fb->mdct1024);
105#endif
106
107 faad_free(fb);
108 }
109}
110
111static INLINE void imdct_long(fb_info *fb, real_t *in_data, real_t *out_data, uint16_t len)
112{
113#ifdef LD_DEC
114 mdct_info *mdct = NULL;
115
116 switch (len)
117 {
118 case 2048:
119 case 1920:
120 mdct = fb->mdct2048;
121 break;
122 case 1024:
123 case 960:
124 mdct = fb->mdct1024;
125 break;
126 }
127
128 faad_imdct(mdct, in_data, out_data);
129#else
130 faad_imdct(fb->mdct2048, in_data, out_data);
131#endif
132}
133
134
135#ifdef LTP_DEC
136static INLINE void mdct(fb_info *fb, real_t *in_data, real_t *out_data, uint16_t len)
137{
138 mdct_info *mdct = NULL;
139
140 switch (len)
141 {
142 case 2048:
143 case 1920:
144 mdct = fb->mdct2048;
145 break;
146 case 256:
147 case 240:
148 mdct = fb->mdct256;
149 break;
150#ifdef LD_DEC
151 case 1024:
152 case 960:
153 mdct = fb->mdct1024;
154 break;
155#endif
156 }
157
158 faad_mdct(mdct, in_data, out_data);
159}
160#endif
161
162void ifilter_bank(fb_info *fb, uint8_t window_sequence, uint8_t window_shape,
163 uint8_t window_shape_prev, real_t *freq_in,
164 real_t *time_out, real_t *overlap,
165 uint8_t object_type, uint16_t frame_len)
166{
167 int16_t i;
168 ALIGN real_t transf_buf[2*1024] = {0};
169
170 const real_t *window_long = NULL;
171 const real_t *window_long_prev = NULL;
172 const real_t *window_short = NULL;
173 const real_t *window_short_prev = NULL;
174
175 uint16_t nlong = frame_len;
176 uint16_t nshort = frame_len/8;
177 uint16_t trans = nshort/2;
178
179 uint16_t nflat_ls = (nlong-nshort)/2;
180
181#ifdef PROFILE
182 int64_t count = faad_get_ts();
183#endif
184
185 /* select windows of current frame and previous frame (Sine or KBD) */
186#ifdef LD_DEC
187 if (object_type == LD)
188 {
189 window_long = fb->ld_window[window_shape];
190 window_long_prev = fb->ld_window[window_shape_prev];
191 } else {
192#endif
193 window_long = fb->long_window[window_shape];
194 window_long_prev = fb->long_window[window_shape_prev];
195 window_short = fb->short_window[window_shape];
196 window_short_prev = fb->short_window[window_shape_prev];
197#ifdef LD_DEC
198 }
199#endif
200
201#if 0
202 for (i = 0; i < 1024; i++)
203 {
204 printf("%d\n", freq_in[i]);
205 }
206#endif
207
208#if 0
209 printf("%d %d\n", window_sequence, window_shape);
210#endif
211
212 switch (window_sequence)
213 {
214 case ONLY_LONG_SEQUENCE:
215 /* perform iMDCT */
216 imdct_long(fb, freq_in, transf_buf, 2*nlong);
217
218 /* add second half output of previous frame to windowed output of current frame */
219 for (i = 0; i < nlong; i+=4)
220 {
221 time_out[i] = overlap[i] + MUL_F(transf_buf[i],window_long_prev[i]);
222 time_out[i+1] = overlap[i+1] + MUL_F(transf_buf[i+1],window_long_prev[i+1]);
223 time_out[i+2] = overlap[i+2] + MUL_F(transf_buf[i+2],window_long_prev[i+2]);
224 time_out[i+3] = overlap[i+3] + MUL_F(transf_buf[i+3],window_long_prev[i+3]);
225 }
226
227 /* window the second half and save as overlap for next frame */
228 for (i = 0; i < nlong; i+=4)
229 {
230 overlap[i] = MUL_F(transf_buf[nlong+i],window_long[nlong-1-i]);
231 overlap[i+1] = MUL_F(transf_buf[nlong+i+1],window_long[nlong-2-i]);
232 overlap[i+2] = MUL_F(transf_buf[nlong+i+2],window_long[nlong-3-i]);
233 overlap[i+3] = MUL_F(transf_buf[nlong+i+3],window_long[nlong-4-i]);
234 }
235 break;
236
237 case LONG_START_SEQUENCE:
238 /* perform iMDCT */
239 imdct_long(fb, freq_in, transf_buf, 2*nlong);
240
241 /* add second half output of previous frame to windowed output of current frame */
242 for (i = 0; i < nlong; i+=4)
243 {
244 time_out[i] = overlap[i] + MUL_F(transf_buf[i],window_long_prev[i]);
245 time_out[i+1] = overlap[i+1] + MUL_F(transf_buf[i+1],window_long_prev[i+1]);
246 time_out[i+2] = overlap[i+2] + MUL_F(transf_buf[i+2],window_long_prev[i+2]);
247 time_out[i+3] = overlap[i+3] + MUL_F(transf_buf[i+3],window_long_prev[i+3]);
248 }
249
250 /* window the second half and save as overlap for next frame */
251 /* construct second half window using padding with 1's and 0's */
252 for (i = 0; i < nflat_ls; i++)
253 overlap[i] = transf_buf[nlong+i];
254 for (i = 0; i < nshort; i++)
255 overlap[nflat_ls+i] = MUL_F(transf_buf[nlong+nflat_ls+i],window_short[nshort-i-1]);
256 for (i = 0; i < nflat_ls; i++)
257 overlap[nflat_ls+nshort+i] = 0;
258 break;
259
260 case EIGHT_SHORT_SEQUENCE:
261 /* perform iMDCT for each short block */
262 faad_imdct(fb->mdct256, freq_in+0*nshort, transf_buf+2*nshort*0);
263 faad_imdct(fb->mdct256, freq_in+1*nshort, transf_buf+2*nshort*1);
264 faad_imdct(fb->mdct256, freq_in+2*nshort, transf_buf+2*nshort*2);
265 faad_imdct(fb->mdct256, freq_in+3*nshort, transf_buf+2*nshort*3);
266 faad_imdct(fb->mdct256, freq_in+4*nshort, transf_buf+2*nshort*4);
267 faad_imdct(fb->mdct256, freq_in+5*nshort, transf_buf+2*nshort*5);
268 faad_imdct(fb->mdct256, freq_in+6*nshort, transf_buf+2*nshort*6);
269 faad_imdct(fb->mdct256, freq_in+7*nshort, transf_buf+2*nshort*7);
270
271 /* add second half output of previous frame to windowed output of current frame */
272 for (i = 0; i < nflat_ls; i++)
273 time_out[i] = overlap[i];
274 for(i = 0; i < nshort; i++)
275 {
276 time_out[nflat_ls+ i] = overlap[nflat_ls+ i] + MUL_F(transf_buf[nshort*0+i],window_short_prev[i]);
277 time_out[nflat_ls+1*nshort+i] = overlap[nflat_ls+nshort*1+i] + MUL_F(transf_buf[nshort*1+i],window_short[nshort-1-i]) + MUL_F(transf_buf[nshort*2+i],window_short[i]);
278 time_out[nflat_ls+2*nshort+i] = overlap[nflat_ls+nshort*2+i] + MUL_F(transf_buf[nshort*3+i],window_short[nshort-1-i]) + MUL_F(transf_buf[nshort*4+i],window_short[i]);
279 time_out[nflat_ls+3*nshort+i] = overlap[nflat_ls+nshort*3+i] + MUL_F(transf_buf[nshort*5+i],window_short[nshort-1-i]) + MUL_F(transf_buf[nshort*6+i],window_short[i]);
280 if (i < trans)
281 time_out[nflat_ls+4*nshort+i] = overlap[nflat_ls+nshort*4+i] + MUL_F(transf_buf[nshort*7+i],window_short[nshort-1-i]) + MUL_F(transf_buf[nshort*8+i],window_short[i]);
282 }
283
284 /* window the second half and save as overlap for next frame */
285 for(i = 0; i < nshort; i++)
286 {
287 if (i >= trans)
288 overlap[nflat_ls+4*nshort+i-nlong] = MUL_F(transf_buf[nshort*7+i],window_short[nshort-1-i]) + MUL_F(transf_buf[nshort*8+i],window_short[i]);
289 overlap[nflat_ls+5*nshort+i-nlong] = MUL_F(transf_buf[nshort*9+i],window_short[nshort-1-i]) + MUL_F(transf_buf[nshort*10+i],window_short[i]);
290 overlap[nflat_ls+6*nshort+i-nlong] = MUL_F(transf_buf[nshort*11+i],window_short[nshort-1-i]) + MUL_F(transf_buf[nshort*12+i],window_short[i]);
291 overlap[nflat_ls+7*nshort+i-nlong] = MUL_F(transf_buf[nshort*13+i],window_short[nshort-1-i]) + MUL_F(transf_buf[nshort*14+i],window_short[i]);
292 overlap[nflat_ls+8*nshort+i-nlong] = MUL_F(transf_buf[nshort*15+i],window_short[nshort-1-i]);
293 }
294 for (i = 0; i < nflat_ls; i++)
295 overlap[nflat_ls+nshort+i] = 0;
296 break;
297
298 case LONG_STOP_SEQUENCE:
299 /* perform iMDCT */
300 imdct_long(fb, freq_in, transf_buf, 2*nlong);
301
302 /* add second half output of previous frame to windowed output of current frame */
303 /* construct first half window using padding with 1's and 0's */
304 for (i = 0; i < nflat_ls; i++)
305 time_out[i] = overlap[i];
306 for (i = 0; i < nshort; i++)
307 time_out[nflat_ls+i] = overlap[nflat_ls+i] + MUL_F(transf_buf[nflat_ls+i],window_short_prev[i]);
308 for (i = 0; i < nflat_ls; i++)
309 time_out[nflat_ls+nshort+i] = overlap[nflat_ls+nshort+i] + transf_buf[nflat_ls+nshort+i];
310
311 /* window the second half and save as overlap for next frame */
312 for (i = 0; i < nlong; i++)
313 overlap[i] = MUL_F(transf_buf[nlong+i],window_long[nlong-1-i]);
314 break;
315 }
316
317#if 0
318 for (i = 0; i < 1024; i++)
319 {
320 printf("%d\n", time_out[i]);
321 //printf("0x%.8X\n", time_out[i]);
322 }
323#endif
324
325
326#ifdef PROFILE
327 count = faad_get_ts() - count;
328 fb->cycles += count;
329#endif
330}
331
332
333#ifdef LTP_DEC
334/* only works for LTP -> no overlapping, no short blocks */
335void filter_bank_ltp(fb_info *fb, uint8_t window_sequence, uint8_t window_shape,
336 uint8_t window_shape_prev, real_t *in_data, real_t *out_mdct,
337 uint8_t object_type, uint16_t frame_len)
338{
339 int16_t i;
340 ALIGN real_t windowed_buf[2*1024] = {0};
341
342 const real_t *window_long = NULL;
343 const real_t *window_long_prev = NULL;
344 const real_t *window_short = NULL;
345 const real_t *window_short_prev = NULL;
346
347 uint16_t nlong = frame_len;
348 uint16_t nshort = frame_len/8;
349 uint16_t nflat_ls = (nlong-nshort)/2;
350
351 assert(window_sequence != EIGHT_SHORT_SEQUENCE);
352
353#ifdef LD_DEC
354 if (object_type == LD)
355 {
356 window_long = fb->ld_window[window_shape];
357 window_long_prev = fb->ld_window[window_shape_prev];
358 } else {
359#endif
360 window_long = fb->long_window[window_shape];
361 window_long_prev = fb->long_window[window_shape_prev];
362 window_short = fb->short_window[window_shape];
363 window_short_prev = fb->short_window[window_shape_prev];
364#ifdef LD_DEC
365 }
366#endif
367
368 switch(window_sequence)
369 {
370 case ONLY_LONG_SEQUENCE:
371 for (i = nlong-1; i >= 0; i--)
372 {
373 windowed_buf[i] = MUL_F(in_data[i], window_long_prev[i]);
374 windowed_buf[i+nlong] = MUL_F(in_data[i+nlong], window_long[nlong-1-i]);
375 }
376 mdct(fb, windowed_buf, out_mdct, 2*nlong);
377 break;
378
379 case LONG_START_SEQUENCE:
380 for (i = 0; i < nlong; i++)
381 windowed_buf[i] = MUL_F(in_data[i], window_long_prev[i]);
382 for (i = 0; i < nflat_ls; i++)
383 windowed_buf[i+nlong] = in_data[i+nlong];
384 for (i = 0; i < nshort; i++)
385 windowed_buf[i+nlong+nflat_ls] = MUL_F(in_data[i+nlong+nflat_ls], window_short[nshort-1-i]);
386 for (i = 0; i < nflat_ls; i++)
387 windowed_buf[i+nlong+nflat_ls+nshort] = 0;
388 mdct(fb, windowed_buf, out_mdct, 2*nlong);
389 break;
390
391 case LONG_STOP_SEQUENCE:
392 for (i = 0; i < nflat_ls; i++)
393 windowed_buf[i] = 0;
394 for (i = 0; i < nshort; i++)
395 windowed_buf[i+nflat_ls] = MUL_F(in_data[i+nflat_ls], window_short_prev[i]);
396 for (i = 0; i < nflat_ls; i++)
397 windowed_buf[i+nflat_ls+nshort] = in_data[i+nflat_ls+nshort];
398 for (i = 0; i < nlong; i++)
399 windowed_buf[i+nlong] = MUL_F(in_data[i+nlong], window_long[nlong-1-i]);
400 mdct(fb, windowed_buf, out_mdct, 2*nlong);
401 break;
402 }
403}
404#endif
diff --git a/apps/codecs/libfaad/filtbank.h b/apps/codecs/libfaad/filtbank.h
new file mode 100644
index 0000000000..5227566078
--- /dev/null
+++ b/apps/codecs/libfaad/filtbank.h
@@ -0,0 +1,58 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __FILTBANK_H__
29#define __FILTBANK_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35
36fb_info *filter_bank_init(uint16_t frame_len);
37void filter_bank_end(fb_info *fb);
38
39#ifdef LTP_DEC
40void filter_bank_ltp(fb_info *fb,
41 uint8_t window_sequence,
42 uint8_t window_shape,
43 uint8_t window_shape_prev,
44 real_t *in_data,
45 real_t *out_mdct,
46 uint8_t object_type,
47 uint16_t frame_len);
48#endif
49
50void ifilter_bank(fb_info *fb, uint8_t window_sequence, uint8_t window_shape,
51 uint8_t window_shape_prev, real_t *freq_in,
52 real_t *time_out, real_t *overlap,
53 uint8_t object_type, uint16_t frame_len);
54
55#ifdef __cplusplus
56}
57#endif
58#endif
diff --git a/apps/codecs/libfaad/fixed.h b/apps/codecs/libfaad/fixed.h
new file mode 100644
index 0000000000..ac916ba0b9
--- /dev/null
+++ b/apps/codecs/libfaad/fixed.h
@@ -0,0 +1,265 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __FIXED_H__
29#define __FIXED_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#if defined(_WIN32_WCE) && defined(_ARM_)
36#include <cmnintrin.h>
37#endif
38
39#define COEF_BITS 28
40#define COEF_PRECISION (1 << COEF_BITS)
41#define REAL_BITS 14 // MAXIMUM OF 14 FOR FIXED POINT SBR
42#define REAL_PRECISION (1 << REAL_BITS)
43
44/* FRAC is the fractional only part of the fixed point number [0.0..1.0) */
45#define FRAC_SIZE 32 /* frac is a 32 bit integer */
46#define FRAC_BITS 31
47#define FRAC_PRECISION ((uint32_t)(1 << FRAC_BITS))
48#define FRAC_MAX 0x7FFFFFFF
49
50typedef int32_t real_t;
51
52
53#define REAL_CONST(A) (((A) >= 0) ? ((real_t)((A)*(REAL_PRECISION)+0.5)) : ((real_t)((A)*(REAL_PRECISION)-0.5)))
54#define COEF_CONST(A) (((A) >= 0) ? ((real_t)((A)*(COEF_PRECISION)+0.5)) : ((real_t)((A)*(COEF_PRECISION)-0.5)))
55#define FRAC_CONST(A) (((A) == 1.00) ? ((real_t)FRAC_MAX) : (((A) >= 0) ? ((real_t)((A)*(FRAC_PRECISION)+0.5)) : ((real_t)((A)*(FRAC_PRECISION)-0.5))))
56//#define FRAC_CONST(A) (((A) >= 0) ? ((real_t)((A)*(FRAC_PRECISION)+0.5)) : ((real_t)((A)*(FRAC_PRECISION)-0.5)))
57
58#define Q2_BITS 22
59#define Q2_PRECISION (1 << Q2_BITS)
60#define Q2_CONST(A) (((A) >= 0) ? ((real_t)((A)*(Q2_PRECISION)+0.5)) : ((real_t)((A)*(Q2_PRECISION)-0.5)))
61
62#if defined(_WIN32) && !defined(_WIN32_WCE)
63
64/* multiply with real shift */
65static INLINE real_t MUL_R(real_t A, real_t B)
66{
67 _asm {
68 mov eax,A
69 imul B
70 shrd eax,edx,REAL_BITS
71 }
72}
73
74/* multiply with coef shift */
75static INLINE real_t MUL_C(real_t A, real_t B)
76{
77 _asm {
78 mov eax,A
79 imul B
80 shrd eax,edx,COEF_BITS
81 }
82}
83
84static INLINE real_t MUL_Q2(real_t A, real_t B)
85{
86 _asm {
87 mov eax,A
88 imul B
89 shrd eax,edx,Q2_BITS
90 }
91}
92
93static INLINE real_t MUL_SHIFT6(real_t A, real_t B)
94{
95 _asm {
96 mov eax,A
97 imul B
98 shrd eax,edx,6
99 }
100}
101
102static INLINE real_t MUL_SHIFT23(real_t A, real_t B)
103{
104 _asm {
105 mov eax,A
106 imul B
107 shrd eax,edx,23
108 }
109}
110
111#if 1
112static INLINE real_t _MulHigh(real_t A, real_t B)
113{
114 _asm {
115 mov eax,A
116 imul B
117 mov eax,edx
118 }
119}
120
121/* multiply with fractional shift */
122static INLINE real_t MUL_F(real_t A, real_t B)
123{
124 return _MulHigh(A,B) << (FRAC_SIZE-FRAC_BITS);
125}
126
127/* Complex multiplication */
128static INLINE void ComplexMult(real_t *y1, real_t *y2,
129 real_t x1, real_t x2, real_t c1, real_t c2)
130{
131 *y1 = (_MulHigh(x1, c1) + _MulHigh(x2, c2))<<(FRAC_SIZE-FRAC_BITS);
132 *y2 = (_MulHigh(x2, c1) - _MulHigh(x1, c2))<<(FRAC_SIZE-FRAC_BITS);
133}
134#else
135static INLINE real_t MUL_F(real_t A, real_t B)
136{
137 _asm {
138 mov eax,A
139 imul B
140 shrd eax,edx,FRAC_BITS
141 }
142}
143
144/* Complex multiplication */
145static INLINE void ComplexMult(real_t *y1, real_t *y2,
146 real_t x1, real_t x2, real_t c1, real_t c2)
147{
148 *y1 = MUL_F(x1, c1) + MUL_F(x2, c2);
149 *y2 = MUL_F(x2, c1) - MUL_F(x1, c2);
150}
151#endif
152
153#elif defined(__GNUC__) && defined (__arm__)
154
155/* taken from MAD */
156#define arm_mul(x, y, SCALEBITS) \
157({ \
158 uint32_t __hi; \
159 uint32_t __lo; \
160 uint32_t __result; \
161 asm("smull %0, %1, %3, %4\n\t" \
162 "movs %0, %0, lsr %5\n\t" \
163 "adc %2, %0, %1, lsl %6" \
164 : "=&r" (__lo), "=&r" (__hi), "=r" (__result) \
165 : "%r" (x), "r" (y), \
166 "M" (SCALEBITS), "M" (32 - (SCALEBITS)) \
167 : "cc"); \
168 __result; \
169})
170
171static INLINE real_t MUL_R(real_t A, real_t B)
172{
173 return arm_mul(A, B, REAL_BITS);
174}
175
176static INLINE real_t MUL_C(real_t A, real_t B)
177{
178 return arm_mul(A, B, COEF_BITS);
179}
180
181static INLINE real_t MUL_Q2(real_t A, real_t B)
182{
183 return arm_mul(A, B, Q2_BITS);
184}
185
186static INLINE real_t MUL_SHIFT6(real_t A, real_t B)
187{
188 return arm_mul(A, B, 6);
189}
190
191static INLINE real_t MUL_SHIFT23(real_t A, real_t B)
192{
193 return arm_mul(A, B, 23);
194}
195
196static INLINE real_t _MulHigh(real_t x, real_t y)
197{
198 uint32_t __lo;
199 uint32_t __hi;
200 asm("smull\t%0, %1, %2, %3"
201 : "=&r"(__lo),"=&r"(__hi)
202 : "%r"(x),"r"(y)
203 : "cc");
204 return __hi;
205}
206
207static INLINE real_t MUL_F(real_t A, real_t B)
208{
209 return _MulHigh(A, B) << (FRAC_SIZE-FRAC_BITS);
210}
211
212/* Complex multiplication */
213static INLINE void ComplexMult(real_t *y1, real_t *y2,
214 real_t x1, real_t x2, real_t c1, real_t c2)
215{
216 int32_t tmp, yt1, yt2;
217 asm("smull %0, %1, %4, %6\n\t"
218 "smlal %0, %1, %5, %7\n\t"
219 "rsb %3, %4, #0\n\t"
220 "smull %0, %2, %5, %6\n\t"
221 "smlal %0, %2, %3, %7"
222 : "=&r" (tmp), "=&r" (yt1), "=&r" (yt2), "=r" (x1)
223 : "3" (x1), "r" (x2), "r" (c1), "r" (c2)
224 : "cc" );
225 *y1 = yt1 << (FRAC_SIZE-FRAC_BITS);
226 *y2 = yt2 << (FRAC_SIZE-FRAC_BITS);
227}
228
229#else
230
231 /* multiply with real shift */
232 #define MUL_R(A,B) (real_t)(((int64_t)(A)*(int64_t)(B)+(1 << (REAL_BITS-1))) >> REAL_BITS)
233 /* multiply with coef shift */
234 #define MUL_C(A,B) (real_t)(((int64_t)(A)*(int64_t)(B)+(1 << (COEF_BITS-1))) >> COEF_BITS)
235 /* multiply with fractional shift */
236#if defined(_WIN32_WCE) && defined(_ARM_)
237 /* eVC for PocketPC has an intrinsic function that returns only the high 32 bits of a 32x32 bit multiply */
238 static INLINE real_t MUL_F(real_t A, real_t B)
239 {
240 return _MulHigh(A,B) << (32-FRAC_BITS);
241 }
242#else
243 #define _MulHigh(A,B) (real_t)(((int64_t)(A)*(int64_t)(B)+(1 << (FRAC_SIZE-1))) >> FRAC_SIZE)
244 #define MUL_F(A,B) (real_t)(((int64_t)(A)*(int64_t)(B)+(1 << (FRAC_BITS-1))) >> FRAC_BITS)
245#endif
246 #define MUL_Q2(A,B) (real_t)(((int64_t)(A)*(int64_t)(B)+(1 << (Q2_BITS-1))) >> Q2_BITS)
247 #define MUL_SHIFT6(A,B) (real_t)(((int64_t)(A)*(int64_t)(B)+(1 << (6-1))) >> 6)
248 #define MUL_SHIFT23(A,B) (real_t)(((int64_t)(A)*(int64_t)(B)+(1 << (23-1))) >> 23)
249
250/* Complex multiplication */
251static INLINE void ComplexMult(real_t *y1, real_t *y2,
252 real_t x1, real_t x2, real_t c1, real_t c2)
253{
254 *y1 = (_MulHigh(x1, c1) + _MulHigh(x2, c2))<<(FRAC_SIZE-FRAC_BITS);
255 *y2 = (_MulHigh(x2, c1) - _MulHigh(x1, c2))<<(FRAC_SIZE-FRAC_BITS);
256}
257
258#endif
259
260
261
262#ifdef __cplusplus
263}
264#endif
265#endif
diff --git a/apps/codecs/libfaad/hcr.c b/apps/codecs/libfaad/hcr.c
new file mode 100644
index 0000000000..a5e67bb85d
--- /dev/null
+++ b/apps/codecs/libfaad/hcr.c
@@ -0,0 +1,409 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2004 G.C. Pascutto, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#include "common.h"
29#include "structs.h"
30
31#include <stdlib.h>
32#include <string.h>
33
34#include "specrec.h"
35#include "huffman.h"
36
37/* ISO/IEC 14496-3/Amd.1
38 * 8.5.3.3: Huffman Codeword Reordering for AAC spectral data (HCR)
39 *
40 * HCR devides the spectral data in known fixed size segments, and
41 * sorts it by the importance of the data. The importance is firstly
42 * the (lower) position in the spectrum, and secondly the largest
43 * value in the used codebook.
44 * The most important data is written at the start of each segment
45 * (at known positions), the remaining data is interleaved inbetween,
46 * with the writing direction alternating.
47 * Data length is not increased.
48*/
49
50#ifdef ERROR_RESILIENCE
51
52/* 8.5.3.3.1 Pre-sorting */
53
54#define NUM_CB 6
55#define NUM_CB_ER 22
56#define MAX_CB 32
57#define VCB11_FIRST 16
58#define VCB11_LAST 31
59
60static const uint8_t PreSortCB_STD[NUM_CB] =
61 { 11, 9, 7, 5, 3, 1};
62
63static const uint8_t PreSortCB_ER[NUM_CB_ER] =
64 { 11, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 9, 7, 5, 3, 1};
65
66/* 8.5.3.3.2 Derivation of segment width */
67
68static const uint8_t maxCwLen[MAX_CB] = {0, 11, 9, 20, 16, 13, 11, 14, 12, 17, 14, 49,
69 0, 0, 0, 0, 14, 17, 21, 21, 25, 25, 29, 29, 29, 29, 33, 33, 33, 37, 37, 41};
70
71#define segmentWidth(cb) min(maxCwLen[cb], ics->length_of_longest_codeword)
72
73/* bit-twiddling helpers */
74static const uint8_t S[] = {1, 2, 4, 8, 16};
75static const uint32_t B[] = {0x55555555, 0x33333333, 0x0F0F0F0F, 0x00FF00FF, 0x0000FFFF};
76
77typedef struct
78{
79 uint8_t cb;
80 uint8_t decoded;
81 uint16_t sp_offset;
82 bits_t bits;
83} codeword_t;
84
85/* rewind and reverse */
86/* 32 bit version */
87static uint32_t rewrev_word(uint32_t v, const uint8_t len)
88{
89 /* 32 bit reverse */
90 v = ((v >> S[0]) & B[0]) | ((v << S[0]) & ~B[0]);
91 v = ((v >> S[1]) & B[1]) | ((v << S[1]) & ~B[1]);
92 v = ((v >> S[2]) & B[2]) | ((v << S[2]) & ~B[2]);
93 v = ((v >> S[3]) & B[3]) | ((v << S[3]) & ~B[3]);
94 v = ((v >> S[4]) & B[4]) | ((v << S[4]) & ~B[4]);
95
96 /* shift off low bits */
97 v >>= (32 - len);
98
99 return v;
100}
101
102/* 64 bit version */
103static void rewrev_lword(uint32_t *hi, uint32_t *lo, const uint8_t len)
104{
105 if (len <= 32) {
106 *hi = 0;
107 *lo = rewrev_word(*lo, len);
108 } else
109 {
110 uint32_t t = *hi, v = *lo;
111
112 /* double 32 bit reverse */
113 v = ((v >> S[0]) & B[0]) | ((v << S[0]) & ~B[0]);
114 t = ((t >> S[0]) & B[0]) | ((t << S[0]) & ~B[0]);
115 v = ((v >> S[1]) & B[1]) | ((v << S[1]) & ~B[1]);
116 t = ((t >> S[1]) & B[1]) | ((t << S[1]) & ~B[1]);
117 v = ((v >> S[2]) & B[2]) | ((v << S[2]) & ~B[2]);
118 t = ((t >> S[2]) & B[2]) | ((t << S[2]) & ~B[2]);
119 v = ((v >> S[3]) & B[3]) | ((v << S[3]) & ~B[3]);
120 t = ((t >> S[3]) & B[3]) | ((t << S[3]) & ~B[3]);
121 v = ((v >> S[4]) & B[4]) | ((v << S[4]) & ~B[4]);
122 t = ((t >> S[4]) & B[4]) | ((t << S[4]) & ~B[4]);
123
124 /* last 32<>32 bit swap is implicit below */
125
126 /* shift off low bits (this is really only one 64 bit shift) */
127 *lo = (t >> (64 - len)) | (v << (len - 32));
128 *hi = v >> (64 - len);
129 }
130}
131
132
133/* bits_t version */
134static void rewrev_bits(bits_t *bits)
135{
136 if (bits->len == 0) return;
137 rewrev_lword(&bits->bufb, &bits->bufa, bits->len);
138}
139
140
141/* merge bits of a to b */
142static void concat_bits(bits_t *b, bits_t *a)
143{
144 uint32_t bl, bh, al, ah;
145
146 if (a->len == 0) return;
147
148 al = a->bufa;
149 ah = a->bufb;
150
151 if (b->len > 32)
152 {
153 /* maskoff superfluous high b bits */
154 bl = b->bufa;
155 bh = b->bufb & ((1 << (b->len-32)) - 1);
156 /* left shift a b->len bits */
157 ah = al << (b->len - 32);
158 al = 0;
159 } else {
160 bl = b->bufa & ((1 << (b->len)) - 1);
161 bh = 0;
162 ah = (ah << (b->len)) | (al >> (32 - b->len));
163 al = al << b->len;
164 }
165
166 /* merge */
167 b->bufa = bl | al;
168 b->bufb = bh | ah;
169
170 b->len += a->len;
171}
172
173uint8_t is_good_cb(uint8_t this_CB, uint8_t this_sec_CB)
174{
175 /* only want spectral data CB's */
176 if ((this_sec_CB > ZERO_HCB && this_sec_CB <= ESC_HCB) || (this_sec_CB >= VCB11_FIRST && this_sec_CB <= VCB11_LAST))
177 {
178 if (this_CB < ESC_HCB)
179 {
180 /* normal codebook pairs */
181 return ((this_sec_CB == this_CB) || (this_sec_CB == this_CB + 1));
182 } else
183 {
184 /* escape codebook */
185 return (this_sec_CB == this_CB);
186 }
187 }
188 return 0;
189}
190
191void read_segment(bits_t *segment, uint8_t segwidth, bitfile *ld)
192{
193 segment->len = segwidth;
194
195 if (segwidth > 32)
196 {
197 segment->bufb = faad_getbits(ld, segwidth - 32);
198 segment->bufa = faad_getbits(ld, 32);
199
200 } else {
201 segment->bufa = faad_getbits(ld, segwidth);
202 segment->bufb = 0;
203 }
204}
205
206void fill_in_codeword(codeword_t *codeword, uint16_t index, uint16_t sp, uint8_t cb)
207{
208 codeword[index].sp_offset = sp;
209 codeword[index].cb = cb;
210 codeword[index].decoded = 0;
211 codeword[index].bits.len = 0;
212}
213
214uint8_t reordered_spectral_data(NeAACDecHandle hDecoder, ic_stream *ics,
215 bitfile *ld, int16_t *spectral_data)
216{
217 uint16_t PCWs_done;
218 uint16_t numberOfSegments, numberOfSets, numberOfCodewords;
219
220 codeword_t codeword[512];
221 bits_t segment[512];
222
223 uint16_t sp_offset[8];
224 uint16_t g, i, sortloop, set, bitsread;
225 uint8_t w_idx, sfb, this_CB, last_CB, this_sec_CB;
226
227 const uint16_t nshort = hDecoder->frameLength/8;
228 const uint16_t sp_data_len = ics->length_of_reordered_spectral_data;
229
230 const uint8_t *PreSortCb;
231
232 /* no data (e.g. silence) */
233 if (sp_data_len == 0)
234 return 0;
235
236 /* since there is spectral data, at least one codeword has nonzero length */
237 if (ics->length_of_longest_codeword == 0)
238 return 10;
239
240 if (sp_data_len < ics->length_of_longest_codeword)
241 return 10;
242
243 sp_offset[0] = 0;
244 for (g = 1; g < ics->num_window_groups; g++)
245 {
246 sp_offset[g] = sp_offset[g-1] + nshort*ics->window_group_length[g-1];
247 }
248
249 PCWs_done = 0;
250 numberOfSegments = 0;
251 numberOfCodewords = 0;
252 bitsread = 0;
253
254 /* VCB11 code books in use */
255 if (hDecoder->aacSectionDataResilienceFlag)
256 {
257 PreSortCb = PreSortCB_ER;
258 last_CB = NUM_CB_ER;
259 } else
260 {
261 PreSortCb = PreSortCB_STD;
262 last_CB = NUM_CB;
263 }
264
265 /* step 1: decode PCW's (set 0), and stuff data in easier-to-use format */
266 for (sortloop = 0; sortloop < last_CB; sortloop++)
267 {
268 /* select codebook to process this pass */
269 this_CB = PreSortCb[sortloop];
270
271 /* loop over sfbs */
272 for (sfb = 0; sfb < ics->max_sfb; sfb++)
273 {
274 /* loop over all in this sfb, 4 lines per loop */
275 for (w_idx = 0; 4*w_idx < (ics->swb_offset[sfb+1] - ics->swb_offset[sfb]); w_idx++)
276 {
277 for(g = 0; g < ics->num_window_groups; g++)
278 {
279 for (i = 0; i < ics->num_sec[g]; i++)
280 {
281 /* check whether sfb used here is the one we want to process */
282 if ((ics->sect_start[g][i] <= sfb) && (ics->sect_end[g][i] > sfb))
283 {
284 /* check whether codebook used here is the one we want to process */
285 this_sec_CB = ics->sect_cb[g][i];
286
287 if (is_good_cb(this_CB, this_sec_CB))
288 {
289 /* precalculate some stuff */
290 uint16_t sect_sfb_size = ics->sect_sfb_offset[g][sfb+1] - ics->sect_sfb_offset[g][sfb];
291 uint8_t inc = (this_sec_CB < FIRST_PAIR_HCB) ? QUAD_LEN : PAIR_LEN;
292 uint16_t group_cws_count = (4*ics->window_group_length[g])/inc;
293 uint8_t segwidth = segmentWidth(this_sec_CB);
294 uint16_t cws;
295
296 /* read codewords until end of sfb or end of window group (shouldn't only 1 trigger?) */
297 for (cws = 0; (cws < group_cws_count) && ((cws + w_idx*group_cws_count) < sect_sfb_size); cws++)
298 {
299 uint16_t sp = sp_offset[g] + ics->sect_sfb_offset[g][sfb] + inc * (cws + w_idx*group_cws_count);
300
301 /* read and decode PCW */
302 if (!PCWs_done)
303 {
304 /* read in normal segments */
305 if (bitsread + segwidth <= sp_data_len)
306 {
307 read_segment(&segment[numberOfSegments], segwidth, ld);
308 bitsread += segwidth;
309
310 huffman_spectral_data_2(this_sec_CB, &segment[numberOfSegments], &spectral_data[sp]);
311
312 /* keep leftover bits */
313 rewrev_bits(&segment[numberOfSegments]);
314
315 numberOfSegments++;
316 } else {
317 /* remaining stuff after last segment, we unfortunately couldn't read
318 this in earlier because it might not fit in 64 bits. since we already
319 decoded (and removed) the PCW it is now guaranteed to fit */
320 if (bitsread < sp_data_len)
321 {
322 const uint8_t additional_bits = sp_data_len - bitsread;
323
324 read_segment(&segment[numberOfSegments], additional_bits, ld);
325 segment[numberOfSegments].len += segment[numberOfSegments-1].len;
326 rewrev_bits(&segment[numberOfSegments]);
327
328 if (segment[numberOfSegments-1].len > 32)
329 {
330 segment[numberOfSegments-1].bufb = segment[numberOfSegments].bufb +
331 showbits_hcr(&segment[numberOfSegments-1], segment[numberOfSegments-1].len - 32);
332 segment[numberOfSegments-1].bufa = segment[numberOfSegments].bufa +
333 showbits_hcr(&segment[numberOfSegments-1], 32);
334 } else {
335 segment[numberOfSegments-1].bufa = segment[numberOfSegments].bufa +
336 showbits_hcr(&segment[numberOfSegments-1], segment[numberOfSegments-1].len);
337 segment[numberOfSegments-1].bufb = segment[numberOfSegments].bufb;
338 }
339 segment[numberOfSegments-1].len += additional_bits;
340 }
341 bitsread = sp_data_len;
342 PCWs_done = 1;
343
344 fill_in_codeword(codeword, 0, sp, this_sec_CB);
345 }
346 } else {
347 fill_in_codeword(codeword, numberOfCodewords - numberOfSegments, sp, this_sec_CB);
348 }
349 numberOfCodewords++;
350 }
351 }
352 }
353 }
354 }
355 }
356 }
357 }
358
359 if (numberOfSegments == 0)
360 return 10;
361
362 numberOfSets = numberOfCodewords / numberOfSegments;
363
364 /* step 2: decode nonPCWs */
365 for (set = 1; set <= numberOfSets; set++)
366 {
367 uint16_t trial;
368
369 for (trial = 0; trial < numberOfSegments; trial++)
370 {
371 uint16_t codewordBase;
372
373 for (codewordBase = 0; codewordBase < numberOfSegments; codewordBase++)
374 {
375 const uint16_t segment_idx = (trial + codewordBase) % numberOfSegments;
376 const uint16_t codeword_idx = codewordBase + set*numberOfSegments - numberOfSegments;
377
378 /* data up */
379 if (codeword_idx >= numberOfCodewords - numberOfSegments) break;
380
381 if (!codeword[codeword_idx].decoded && segment[segment_idx].len > 0)
382 {
383 uint8_t tmplen;
384
385 if (codeword[codeword_idx].bits.len != 0)
386 concat_bits(&segment[segment_idx], &codeword[codeword_idx].bits);
387
388 tmplen = segment[segment_idx].len;
389
390 if (huffman_spectral_data_2(codeword[codeword_idx].cb, &segment[segment_idx],
391 &spectral_data[codeword[codeword_idx].sp_offset]) >= 0)
392 {
393 codeword[codeword_idx].decoded = 1;
394 } else
395 {
396 codeword[codeword_idx].bits = segment[segment_idx];
397 codeword[codeword_idx].bits.len = tmplen;
398 }
399
400 }
401 }
402 }
403 for (i = 0; i < numberOfSegments; i++)
404 rewrev_bits(&segment[i]);
405 }
406
407 return 0;
408}
409#endif
diff --git a/apps/codecs/libfaad/huffman.c b/apps/codecs/libfaad/huffman.c
new file mode 100644
index 0000000000..d1cc0660c3
--- /dev/null
+++ b/apps/codecs/libfaad/huffman.c
@@ -0,0 +1,556 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#include "common.h"
29#include "structs.h"
30
31#include <stdlib.h>
32#ifdef ANALYSIS
33#include <stdio.h>
34#endif
35
36#include "bits.h"
37#include "huffman.h"
38#include "codebook/hcb.h"
39
40
41/* static function declarations */
42static INLINE void huffman_sign_bits(bitfile *ld, int16_t *sp, uint8_t len);
43static INLINE int16_t huffman_getescape(bitfile *ld, int16_t sp);
44static uint8_t huffman_2step_quad(uint8_t cb, bitfile *ld, int16_t *sp);
45static uint8_t huffman_2step_quad_sign(uint8_t cb, bitfile *ld, int16_t *sp);
46static uint8_t huffman_2step_pair(uint8_t cb, bitfile *ld, int16_t *sp);
47static uint8_t huffman_2step_pair_sign(uint8_t cb, bitfile *ld, int16_t *sp);
48static uint8_t huffman_binary_quad(uint8_t cb, bitfile *ld, int16_t *sp);
49static uint8_t huffman_binary_quad_sign(uint8_t cb, bitfile *ld, int16_t *sp);
50static uint8_t huffman_binary_pair(uint8_t cb, bitfile *ld, int16_t *sp);
51static uint8_t huffman_binary_pair_sign(uint8_t cb, bitfile *ld, int16_t *sp);
52static int16_t huffman_codebook(uint8_t i);
53static void vcb11_check_LAV(uint8_t cb, int16_t *sp);
54
55int8_t huffman_scale_factor(bitfile *ld)
56{
57 uint16_t offset = 0;
58
59 while (hcb_sf[offset][1])
60 {
61 uint8_t b = faad_get1bit(ld
62 DEBUGVAR(1,255,"huffman_scale_factor()"));
63 offset += hcb_sf[offset][b];
64
65 if (offset > 240)
66 {
67 /* printf("ERROR: offset into hcb_sf = %d >240!\n", offset); */
68 return -1;
69 }
70 }
71
72 return hcb_sf[offset][0];
73}
74
75
76hcb *hcb_table[] = {
77 0, hcb1_1, hcb2_1, 0, hcb4_1, 0, hcb6_1, 0, hcb8_1, 0, hcb10_1, hcb11_1
78};
79
80hcb_2_quad *hcb_2_quad_table[] = {
81 0, hcb1_2, hcb2_2, 0, hcb4_2, 0, 0, 0, 0, 0, 0, 0
82};
83
84hcb_2_pair *hcb_2_pair_table[] = {
85 0, 0, 0, 0, 0, 0, hcb6_2, 0, hcb8_2, 0, hcb10_2, hcb11_2
86};
87
88hcb_bin_pair *hcb_bin_table[] = {
89 0, 0, 0, 0, 0, hcb5, 0, hcb7, 0, hcb9, 0, 0
90};
91
92uint8_t hcbN[] = { 0, 5, 5, 0, 5, 0, 5, 0, 5, 0, 6, 5 };
93
94/* defines whether a huffman codebook is unsigned or not */
95/* Table 4.6.2 */
96uint8_t unsigned_cb[] = { 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0,
97 /* codebook 16 to 31 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
98};
99
100int hcb_2_quad_table_size[] = { 0, 114, 86, 0, 185, 0, 0, 0, 0, 0, 0, 0 };
101int hcb_2_pair_table_size[] = { 0, 0, 0, 0, 0, 0, 126, 0, 83, 0, 210, 373 };
102int hcb_bin_table_size[] = { 0, 0, 0, 161, 0, 161, 0, 127, 0, 337, 0, 0 };
103
104static INLINE void huffman_sign_bits(bitfile *ld, int16_t *sp, uint8_t len)
105{
106 uint8_t i;
107
108 for (i = 0; i < len; i++)
109 {
110 if(sp[i])
111 {
112 if(faad_get1bit(ld
113 DEBUGVAR(1,5,"huffman_sign_bits(): sign bit")) & 1)
114 {
115 sp[i] = -sp[i];
116 }
117 }
118 }
119}
120
121static INLINE int16_t huffman_getescape(bitfile *ld, int16_t sp)
122{
123 uint8_t neg, i;
124 int16_t j;
125 int16_t off;
126
127 if (sp < 0)
128 {
129 if (sp != -16)
130 return sp;
131 neg = 1;
132 } else {
133 if (sp != 16)
134 return sp;
135 neg = 0;
136 }
137
138 for (i = 4; ; i++)
139 {
140 if (faad_get1bit(ld
141 DEBUGVAR(1,6,"huffman_getescape(): escape size")) == 0)
142 {
143 break;
144 }
145 }
146
147 off = (int16_t)faad_getbits(ld, i
148 DEBUGVAR(1,9,"huffman_getescape(): escape"));
149
150 j = off | (1<<i);
151 if (neg)
152 j = -j;
153
154 return j;
155}
156
157static uint8_t huffman_2step_quad(uint8_t cb, bitfile *ld, int16_t *sp)
158{
159 uint32_t cw;
160 uint16_t offset = 0;
161 uint8_t extra_bits;
162
163 cw = faad_showbits(ld, hcbN[cb]);
164 offset = hcb_table[cb][cw].offset;
165 extra_bits = hcb_table[cb][cw].extra_bits;
166
167 if (extra_bits)
168 {
169 /* we know for sure it's more than hcbN[cb] bits long */
170 faad_flushbits(ld, hcbN[cb]);
171 offset += (uint16_t)faad_showbits(ld, extra_bits);
172 faad_flushbits(ld, hcb_2_quad_table[cb][offset].bits - hcbN[cb]);
173 } else {
174 faad_flushbits(ld, hcb_2_quad_table[cb][offset].bits);
175 }
176
177 if (offset > hcb_2_quad_table_size[cb])
178 {
179 /* printf("ERROR: offset into hcb_2_quad_table = %d >%d!\n", offset,
180 hcb_2_quad_table_size[cb]); */
181 return 10;
182 }
183
184 sp[0] = hcb_2_quad_table[cb][offset].x;
185 sp[1] = hcb_2_quad_table[cb][offset].y;
186 sp[2] = hcb_2_quad_table[cb][offset].v;
187 sp[3] = hcb_2_quad_table[cb][offset].w;
188
189 return 0;
190}
191
192static uint8_t huffman_2step_quad_sign(uint8_t cb, bitfile *ld, int16_t *sp)
193{
194 uint8_t err = huffman_2step_quad(cb, ld, sp);
195 huffman_sign_bits(ld, sp, QUAD_LEN);
196
197 return err;
198}
199
200static uint8_t huffman_2step_pair(uint8_t cb, bitfile *ld, int16_t *sp)
201{
202 uint32_t cw;
203 uint16_t offset = 0;
204 uint8_t extra_bits;
205
206 cw = faad_showbits(ld, hcbN[cb]);
207 offset = hcb_table[cb][cw].offset;
208 extra_bits = hcb_table[cb][cw].extra_bits;
209
210 if (extra_bits)
211 {
212 /* we know for sure it's more than hcbN[cb] bits long */
213 faad_flushbits(ld, hcbN[cb]);
214 offset += (uint16_t)faad_showbits(ld, extra_bits);
215 faad_flushbits(ld, hcb_2_pair_table[cb][offset].bits - hcbN[cb]);
216 } else {
217 faad_flushbits(ld, hcb_2_pair_table[cb][offset].bits);
218 }
219
220 if (offset > hcb_2_pair_table_size[cb])
221 {
222 /* printf("ERROR: offset into hcb_2_pair_table = %d >%d!\n", offset,
223 hcb_2_pair_table_size[cb]); */
224 return 10;
225 }
226
227 sp[0] = hcb_2_pair_table[cb][offset].x;
228 sp[1] = hcb_2_pair_table[cb][offset].y;
229
230 return 0;
231}
232
233static uint8_t huffman_2step_pair_sign(uint8_t cb, bitfile *ld, int16_t *sp)
234{
235 uint8_t err = huffman_2step_pair(cb, ld, sp);
236 huffman_sign_bits(ld, sp, PAIR_LEN);
237
238 return err;
239}
240
241static uint8_t huffman_binary_quad(uint8_t cb, bitfile *ld, int16_t *sp)
242{
243 uint16_t offset = 0;
244
245 while (!hcb3[offset].is_leaf)
246 {
247 uint8_t b = faad_get1bit(ld
248 DEBUGVAR(1,255,"huffman_spectral_data():3"));
249 offset += hcb3[offset].data[b];
250 }
251
252 if (offset > hcb_bin_table_size[cb])
253 {
254 /* printf("ERROR: offset into hcb_bin_table = %d >%d!\n", offset,
255 hcb_bin_table_size[cb]); */
256 return 10;
257 }
258
259 sp[0] = hcb3[offset].data[0];
260 sp[1] = hcb3[offset].data[1];
261 sp[2] = hcb3[offset].data[2];
262 sp[3] = hcb3[offset].data[3];
263
264 return 0;
265}
266
267static uint8_t huffman_binary_quad_sign(uint8_t cb, bitfile *ld, int16_t *sp)
268{
269 uint8_t err = huffman_binary_quad(cb, ld, sp);
270 huffman_sign_bits(ld, sp, QUAD_LEN);
271
272 return err;
273}
274
275static uint8_t huffman_binary_pair(uint8_t cb, bitfile *ld, int16_t *sp)
276{
277 uint16_t offset = 0;
278
279 while (!hcb_bin_table[cb][offset].is_leaf)
280 {
281 uint8_t b = faad_get1bit(ld
282 DEBUGVAR(1,255,"huffman_spectral_data():9"));
283 offset += hcb_bin_table[cb][offset].data[b];
284 }
285
286 if (offset > hcb_bin_table_size[cb])
287 {
288 /* printf("ERROR: offset into hcb_bin_table = %d >%d!\n", offset,
289 hcb_bin_table_size[cb]); */
290 return 10;
291 }
292
293 sp[0] = hcb_bin_table[cb][offset].data[0];
294 sp[1] = hcb_bin_table[cb][offset].data[1];
295
296 return 0;
297}
298
299static uint8_t huffman_binary_pair_sign(uint8_t cb, bitfile *ld, int16_t *sp)
300{
301 uint8_t err = huffman_binary_pair(cb, ld, sp);
302 huffman_sign_bits(ld, sp, PAIR_LEN);
303
304 return err;
305}
306
307static int16_t huffman_codebook(uint8_t i)
308{
309 static const uint32_t data = 16428320;
310 if (i == 0) return (int16_t)(data >> 16) & 0xFFFF;
311 else return (int16_t)data & 0xFFFF;
312}
313
314static void vcb11_check_LAV(uint8_t cb, int16_t *sp)
315{
316 static const uint16_t vcb11_LAV_tab[] = {
317 16, 31, 47, 63, 95, 127, 159, 191, 223,
318 255, 319, 383, 511, 767, 1023, 2047
319 };
320 uint16_t max = 0;
321
322 if (cb < 16 || cb > 31)
323 return;
324
325 max = vcb11_LAV_tab[cb - 16];
326
327 if ((abs(sp[0]) > max) || (abs(sp[1]) > max))
328 {
329 sp[0] = 0;
330 sp[1] = 0;
331 }
332}
333
334uint8_t huffman_spectral_data(uint8_t cb, bitfile *ld, int16_t *sp)
335{
336 switch (cb)
337 {
338 case 1: /* 2-step method for data quadruples */
339 case 2:
340 return huffman_2step_quad(cb, ld, sp);
341 case 3: /* binary search for data quadruples */
342 return huffman_binary_quad_sign(cb, ld, sp);
343 case 4: /* 2-step method for data quadruples */
344 return huffman_2step_quad_sign(cb, ld, sp);
345 case 5: /* binary search for data pairs */
346 return huffman_binary_pair(cb, ld, sp);
347 case 6: /* 2-step method for data pairs */
348 return huffman_2step_pair(cb, ld, sp);
349 case 7: /* binary search for data pairs */
350 case 9:
351 return huffman_binary_pair_sign(cb, ld, sp);
352 case 8: /* 2-step method for data pairs */
353 case 10:
354 return huffman_2step_pair_sign(cb, ld, sp);
355 case 12: {
356 uint8_t err = huffman_2step_pair(11, ld, sp);
357 sp[0] = huffman_codebook(0); sp[1] = huffman_codebook(1);
358 return err; }
359 case 11:
360 {
361 uint8_t err = huffman_2step_pair_sign(11, ld, sp);
362 sp[0] = huffman_getescape(ld, sp[0]);
363 sp[1] = huffman_getescape(ld, sp[1]);
364 return err;
365 }
366#ifdef ERROR_RESILIENCE
367 /* VCB11 uses codebook 11 */
368 case 16: case 17: case 18: case 19: case 20: case 21: case 22: case 23:
369 case 24: case 25: case 26: case 27: case 28: case 29: case 30: case 31:
370 {
371 uint8_t err = huffman_2step_pair_sign(11, ld, sp);
372 sp[0] = huffman_getescape(ld, sp[0]);
373 sp[1] = huffman_getescape(ld, sp[1]);
374
375 /* check LAV (Largest Absolute Value) */
376 /* this finds errors in the ESCAPE signal */
377 vcb11_check_LAV(cb, sp);
378
379 return err;
380 }
381#endif
382 default:
383 /* Non existent codebook number, something went wrong */
384 return 11;
385 }
386
387 return 0;
388}
389
390
391#ifdef ERROR_RESILIENCE
392
393/* Special version of huffman_spectral_data
394Will not read from a bitfile but a bits_t structure.
395Will keep track of the bits decoded and return the number of bits remaining.
396Do not read more than ld->len, return -1 if codeword would be longer */
397
398int8_t huffman_spectral_data_2(uint8_t cb, bits_t *ld, int16_t *sp)
399{
400 uint32_t cw;
401 uint16_t offset = 0;
402 uint8_t extra_bits;
403 uint8_t i, vcb11 = 0;
404
405
406 switch (cb)
407 {
408 case 1: /* 2-step method for data quadruples */
409 case 2:
410 case 4:
411
412 cw = showbits_hcr(ld, hcbN[cb]);
413 offset = hcb_table[cb][cw].offset;
414 extra_bits = hcb_table[cb][cw].extra_bits;
415
416 if (extra_bits)
417 {
418 /* we know for sure it's more than hcbN[cb] bits long */
419 if ( flushbits_hcr(ld, hcbN[cb]) ) return -1;
420 offset += (uint16_t)showbits_hcr(ld, extra_bits);
421 if ( flushbits_hcr(ld, hcb_2_quad_table[cb][offset].bits - hcbN[cb]) ) return -1;
422 } else {
423 if ( flushbits_hcr(ld, hcb_2_quad_table[cb][offset].bits) ) return -1;
424 }
425
426 sp[0] = hcb_2_quad_table[cb][offset].x;
427 sp[1] = hcb_2_quad_table[cb][offset].y;
428 sp[2] = hcb_2_quad_table[cb][offset].v;
429 sp[3] = hcb_2_quad_table[cb][offset].w;
430 break;
431
432 case 6: /* 2-step method for data pairs */
433 case 8:
434 case 10:
435 case 11:
436 /* VCB11 uses codebook 11 */
437 case 16: case 17: case 18: case 19: case 20: case 21: case 22: case 23:
438 case 24: case 25: case 26: case 27: case 28: case 29: case 30: case 31:
439
440 if (cb >= 16)
441 {
442 /* store the virtual codebook */
443 vcb11 = cb;
444 cb = 11;
445 }
446
447 cw = showbits_hcr(ld, hcbN[cb]);
448 offset = hcb_table[cb][cw].offset;
449 extra_bits = hcb_table[cb][cw].extra_bits;
450
451 if (extra_bits)
452 {
453 /* we know for sure it's more than hcbN[cb] bits long */
454 if ( flushbits_hcr(ld, hcbN[cb]) ) return -1;
455 offset += (uint16_t)showbits_hcr(ld, extra_bits);
456 if ( flushbits_hcr(ld, hcb_2_pair_table[cb][offset].bits - hcbN[cb]) ) return -1;
457 } else {
458 if ( flushbits_hcr(ld, hcb_2_pair_table[cb][offset].bits) ) return -1;
459 }
460 sp[0] = hcb_2_pair_table[cb][offset].x;
461 sp[1] = hcb_2_pair_table[cb][offset].y;
462 break;
463
464 case 3: /* binary search for data quadruples */
465
466 while (!hcb3[offset].is_leaf)
467 {
468 uint8_t b;
469
470 if ( get1bit_hcr(ld, &b) ) return -1;
471 offset += hcb3[offset].data[b];
472 }
473
474 sp[0] = hcb3[offset].data[0];
475 sp[1] = hcb3[offset].data[1];
476 sp[2] = hcb3[offset].data[2];
477 sp[3] = hcb3[offset].data[3];
478
479 break;
480
481 case 5: /* binary search for data pairs */
482 case 7:
483 case 9:
484
485 while (!hcb_bin_table[cb][offset].is_leaf)
486 {
487 uint8_t b;
488
489 if (get1bit_hcr(ld, &b) ) return -1;
490 offset += hcb_bin_table[cb][offset].data[b];
491 }
492
493 sp[0] = hcb_bin_table[cb][offset].data[0];
494 sp[1] = hcb_bin_table[cb][offset].data[1];
495
496 break;
497 }
498
499 /* decode sign bits */
500 if (unsigned_cb[cb])
501 {
502 for(i = 0; i < ((cb < FIRST_PAIR_HCB) ? QUAD_LEN : PAIR_LEN); i++)
503 {
504 if(sp[i])
505 {
506 uint8_t b;
507 if ( get1bit_hcr(ld, &b) ) return -1;
508 if (b != 0) {
509 sp[i] = -sp[i];
510 }
511 }
512 }
513 }
514
515 /* decode huffman escape bits */
516 if ((cb == ESC_HCB) || (cb >= 16))
517 {
518 uint8_t k;
519 for (k = 0; k < 2; k++)
520 {
521 if ((sp[k] == 16) || (sp[k] == -16))
522 {
523 uint8_t neg, i;
524 int32_t j;
525 uint32_t off;
526
527 neg = (sp[k] < 0) ? 1 : 0;
528
529 for (i = 4; ; i++)
530 {
531 uint8_t b;
532 if (get1bit_hcr(ld, &b))
533 return -1;
534 if (b == 0)
535 break;
536 }
537
538 if (getbits_hcr(ld, i, &off))
539 return -1;
540 j = off + (1<<i);
541 sp[k] = (int16_t)((neg) ? -j : j);
542 }
543 }
544
545 if (vcb11 != 0)
546 {
547 /* check LAV (Largest Absolute Value) */
548 /* this finds errors in the ESCAPE signal */
549 vcb11_check_LAV(vcb11, sp);
550 }
551 }
552 return ld->len;
553}
554
555#endif
556
diff --git a/apps/codecs/libfaad/huffman.h b/apps/codecs/libfaad/huffman.h
new file mode 100644
index 0000000000..683689002d
--- /dev/null
+++ b/apps/codecs/libfaad/huffman.h
@@ -0,0 +1,44 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __HUFFMAN_H__
29#define __HUFFMAN_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35int8_t huffman_scale_factor(bitfile *ld);
36uint8_t huffman_spectral_data(uint8_t cb, bitfile *ld, int16_t *sp);
37#ifdef ERROR_RESILIENCE
38int8_t huffman_spectral_data_2(uint8_t cb, bits_t *ld, int16_t *sp);
39#endif
40
41#ifdef __cplusplus
42}
43#endif
44#endif
diff --git a/apps/codecs/libfaad/ic_predict.c b/apps/codecs/libfaad/ic_predict.c
new file mode 100644
index 0000000000..02cadd65b1
--- /dev/null
+++ b/apps/codecs/libfaad/ic_predict.c
@@ -0,0 +1,267 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#include "common.h"
29#include "structs.h"
30
31#ifdef MAIN_DEC
32
33#include "syntax.h"
34#include "ic_predict.h"
35#include "pns.h"
36
37
38static void flt_round(float32_t *pf)
39{
40 int32_t flg;
41 uint32_t tmp, tmp1, tmp2;
42
43 tmp = *(uint32_t*)pf;
44 flg = tmp & (uint32_t)0x00008000;
45 tmp &= (uint32_t)0xffff0000;
46 tmp1 = tmp;
47 /* round 1/2 lsb toward infinity */
48 if (flg)
49 {
50 tmp &= (uint32_t)0xff800000; /* extract exponent and sign */
51 tmp |= (uint32_t)0x00010000; /* insert 1 lsb */
52 tmp2 = tmp; /* add 1 lsb and elided one */
53 tmp &= (uint32_t)0xff800000; /* extract exponent and sign */
54
55 *pf = *(float32_t*)&tmp1 + *(float32_t*)&tmp2 - *(float32_t*)&tmp;
56 } else {
57 *pf = *(float32_t*)&tmp;
58 }
59}
60
61static int16_t quant_pred(float32_t x)
62{
63 int16_t q;
64 uint32_t *tmp = (uint32_t*)&x;
65
66 q = (int16_t)(*tmp>>16);
67
68 return q;
69}
70
71static float32_t inv_quant_pred(int16_t q)
72{
73 float32_t x;
74 uint32_t *tmp = (uint32_t*)&x;
75 *tmp = ((uint32_t)q)<<16;
76
77 return x;
78}
79
80static void ic_predict(pred_state *state, real_t input, real_t *output, uint8_t pred)
81{
82 uint16_t tmp;
83 int16_t i, j;
84 real_t dr1, predictedvalue;
85 real_t e0, e1;
86 real_t k1, k2;
87
88 real_t r[2];
89 real_t COR[2];
90 real_t VAR[2];
91
92 r[0] = inv_quant_pred(state->r[0]);
93 r[1] = inv_quant_pred(state->r[1]);
94 COR[0] = inv_quant_pred(state->COR[0]);
95 COR[1] = inv_quant_pred(state->COR[1]);
96 VAR[0] = inv_quant_pred(state->VAR[0]);
97 VAR[1] = inv_quant_pred(state->VAR[1]);
98
99
100#if 1
101 tmp = state->VAR[0];
102 j = (tmp >> 7);
103 i = tmp & 0x7f;
104 if (j >= 128)
105 {
106 j -= 128;
107 k1 = COR[0] * exp_table[j] * mnt_table[i];
108 } else {
109 k1 = REAL_CONST(0);
110 }
111#else
112
113 {
114#define B 0.953125
115 real_t c = COR[0];
116 real_t v = VAR[0];
117 real_t tmp;
118 if (c == 0 || v <= 1)
119 {
120 k1 = 0;
121 } else {
122 tmp = B / v;
123 flt_round(&tmp);
124 k1 = c * tmp;
125 }
126 }
127#endif
128
129 if (pred)
130 {
131#if 1
132 tmp = state->VAR[1];
133 j = (tmp >> 7);
134 i = tmp & 0x7f;
135 if (j >= 128)
136 {
137 j -= 128;
138 k2 = COR[1] * exp_table[j] * mnt_table[i];
139 } else {
140 k2 = REAL_CONST(0);
141 }
142#else
143
144#define B 0.953125
145 real_t c = COR[1];
146 real_t v = VAR[1];
147 real_t tmp;
148 if (c == 0 || v <= 1)
149 {
150 k2 = 0;
151 } else {
152 tmp = B / v;
153 flt_round(&tmp);
154 k2 = c * tmp;
155 }
156#endif
157
158 predictedvalue = k1*r[0] + k2*r[1];
159 flt_round(&predictedvalue);
160 *output = input + predictedvalue;
161 }
162
163 /* calculate new state data */
164 e0 = *output;
165 e1 = e0 - k1*r[0];
166 dr1 = k1*e0;
167
168 VAR[0] = ALPHA*VAR[0] + 0.5f * (r[0]*r[0] + e0*e0);
169 COR[0] = ALPHA*COR[0] + r[0]*e0;
170 VAR[1] = ALPHA*VAR[1] + 0.5f * (r[1]*r[1] + e1*e1);
171 COR[1] = ALPHA*COR[1] + r[1]*e1;
172
173 r[1] = A * (r[0]-dr1);
174 r[0] = A * e0;
175
176 state->r[0] = quant_pred(r[0]);
177 state->r[1] = quant_pred(r[1]);
178 state->COR[0] = quant_pred(COR[0]);
179 state->COR[1] = quant_pred(COR[1]);
180 state->VAR[0] = quant_pred(VAR[0]);
181 state->VAR[1] = quant_pred(VAR[1]);
182}
183
184static void reset_pred_state(pred_state *state)
185{
186 state->r[0] = 0;
187 state->r[1] = 0;
188 state->COR[0] = 0;
189 state->COR[1] = 0;
190 state->VAR[0] = 0x3F80;
191 state->VAR[1] = 0x3F80;
192}
193
194void pns_reset_pred_state(ic_stream *ics, pred_state *state)
195{
196 uint8_t sfb, g, b;
197 uint16_t i, offs, offs2;
198
199 /* prediction only for long blocks */
200 if (ics->window_sequence == EIGHT_SHORT_SEQUENCE)
201 return;
202
203 for (g = 0; g < ics->num_window_groups; g++)
204 {
205 for (b = 0; b < ics->window_group_length[g]; b++)
206 {
207 for (sfb = 0; sfb < ics->max_sfb; sfb++)
208 {
209 if (is_noise(ics, g, sfb))
210 {
211 offs = ics->swb_offset[sfb];
212 offs2 = ics->swb_offset[sfb+1];
213
214 for (i = offs; i < offs2; i++)
215 reset_pred_state(&state[i]);
216 }
217 }
218 }
219 }
220}
221
222void reset_all_predictors(pred_state *state, uint16_t frame_len)
223{
224 uint16_t i;
225
226 for (i = 0; i < frame_len; i++)
227 reset_pred_state(&state[i]);
228}
229
230/* intra channel prediction */
231void ic_prediction(ic_stream *ics, real_t *spec, pred_state *state,
232 uint16_t frame_len, uint8_t sf_index)
233{
234 uint8_t sfb;
235 uint16_t bin;
236
237 if (ics->window_sequence == EIGHT_SHORT_SEQUENCE)
238 {
239 reset_all_predictors(state, frame_len);
240 } else {
241 for (sfb = 0; sfb < max_pred_sfb(sf_index); sfb++)
242 {
243 uint16_t low = ics->swb_offset[sfb];
244 uint16_t high = ics->swb_offset[sfb+1];
245
246 for (bin = low; bin < high; bin++)
247 {
248 ic_predict(&state[bin], spec[bin], &spec[bin],
249 (ics->predictor_data_present && ics->pred.prediction_used[sfb]));
250 }
251 }
252
253 if (ics->predictor_data_present)
254 {
255 if (ics->pred.predictor_reset)
256 {
257 for (bin = ics->pred.predictor_reset_group_number - 1;
258 bin < frame_len; bin += 30)
259 {
260 reset_pred_state(&state[bin]);
261 }
262 }
263 }
264 }
265}
266
267#endif
diff --git a/apps/codecs/libfaad/ic_predict.h b/apps/codecs/libfaad/ic_predict.h
new file mode 100644
index 0000000000..acaa9d8a4b
--- /dev/null
+++ b/apps/codecs/libfaad/ic_predict.h
@@ -0,0 +1,249 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifdef MAIN_DEC
29
30#ifndef __IC_PREDICT_H__
31#define __IC_PREDICT_H__
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37#define ALPHA REAL_CONST(0.90625)
38#define A REAL_CONST(0.953125)
39
40
41void pns_reset_pred_state(ic_stream *ics, pred_state *state);
42void reset_all_predictors(pred_state *state, uint16_t frame_len);
43void ic_prediction(ic_stream *ics, real_t *spec, pred_state *state,
44 uint16_t frame_len, uint8_t sf_index);
45
46ALIGN static const real_t mnt_table[128] = {
47 COEF_CONST(0.9531250000), COEF_CONST(0.9453125000),
48 COEF_CONST(0.9375000000), COEF_CONST(0.9296875000),
49 COEF_CONST(0.9257812500), COEF_CONST(0.9179687500),
50 COEF_CONST(0.9101562500), COEF_CONST(0.9023437500),
51 COEF_CONST(0.8984375000), COEF_CONST(0.8906250000),
52 COEF_CONST(0.8828125000), COEF_CONST(0.8789062500),
53 COEF_CONST(0.8710937500), COEF_CONST(0.8671875000),
54 COEF_CONST(0.8593750000), COEF_CONST(0.8515625000),
55 COEF_CONST(0.8476562500), COEF_CONST(0.8398437500),
56 COEF_CONST(0.8359375000), COEF_CONST(0.8281250000),
57 COEF_CONST(0.8242187500), COEF_CONST(0.8203125000),
58 COEF_CONST(0.8125000000), COEF_CONST(0.8085937500),
59 COEF_CONST(0.8007812500), COEF_CONST(0.7968750000),
60 COEF_CONST(0.7929687500), COEF_CONST(0.7851562500),
61 COEF_CONST(0.7812500000), COEF_CONST(0.7773437500),
62 COEF_CONST(0.7734375000), COEF_CONST(0.7656250000),
63 COEF_CONST(0.7617187500), COEF_CONST(0.7578125000),
64 COEF_CONST(0.7539062500), COEF_CONST(0.7500000000),
65 COEF_CONST(0.7421875000), COEF_CONST(0.7382812500),
66 COEF_CONST(0.7343750000), COEF_CONST(0.7304687500),
67 COEF_CONST(0.7265625000), COEF_CONST(0.7226562500),
68 COEF_CONST(0.7187500000), COEF_CONST(0.7148437500),
69 COEF_CONST(0.7109375000), COEF_CONST(0.7070312500),
70 COEF_CONST(0.6992187500), COEF_CONST(0.6953125000),
71 COEF_CONST(0.6914062500), COEF_CONST(0.6875000000),
72 COEF_CONST(0.6835937500), COEF_CONST(0.6796875000),
73 COEF_CONST(0.6796875000), COEF_CONST(0.6757812500),
74 COEF_CONST(0.6718750000), COEF_CONST(0.6679687500),
75 COEF_CONST(0.6640625000), COEF_CONST(0.6601562500),
76 COEF_CONST(0.6562500000), COEF_CONST(0.6523437500),
77 COEF_CONST(0.6484375000), COEF_CONST(0.6445312500),
78 COEF_CONST(0.6406250000), COEF_CONST(0.6406250000),
79 COEF_CONST(0.6367187500), COEF_CONST(0.6328125000),
80 COEF_CONST(0.6289062500), COEF_CONST(0.6250000000),
81 COEF_CONST(0.6210937500), COEF_CONST(0.6210937500),
82 COEF_CONST(0.6171875000), COEF_CONST(0.6132812500),
83 COEF_CONST(0.6093750000), COEF_CONST(0.6054687500),
84 COEF_CONST(0.6054687500), COEF_CONST(0.6015625000),
85 COEF_CONST(0.5976562500), COEF_CONST(0.5937500000),
86 COEF_CONST(0.5937500000), COEF_CONST(0.5898437500),
87 COEF_CONST(0.5859375000), COEF_CONST(0.5820312500),
88 COEF_CONST(0.5820312500), COEF_CONST(0.5781250000),
89 COEF_CONST(0.5742187500), COEF_CONST(0.5742187500),
90 COEF_CONST(0.5703125000), COEF_CONST(0.5664062500),
91 COEF_CONST(0.5664062500), COEF_CONST(0.5625000000),
92 COEF_CONST(0.5585937500), COEF_CONST(0.5585937500),
93 COEF_CONST(0.5546875000), COEF_CONST(0.5507812500),
94 COEF_CONST(0.5507812500), COEF_CONST(0.5468750000),
95 COEF_CONST(0.5429687500), COEF_CONST(0.5429687500),
96 COEF_CONST(0.5390625000), COEF_CONST(0.5390625000),
97 COEF_CONST(0.5351562500), COEF_CONST(0.5312500000),
98 COEF_CONST(0.5312500000), COEF_CONST(0.5273437500),
99 COEF_CONST(0.5273437500), COEF_CONST(0.5234375000),
100 COEF_CONST(0.5195312500), COEF_CONST(0.5195312500),
101 COEF_CONST(0.5156250000), COEF_CONST(0.5156250000),
102 COEF_CONST(0.5117187500), COEF_CONST(0.5117187500),
103 COEF_CONST(0.5078125000), COEF_CONST(0.5078125000),
104 COEF_CONST(0.5039062500), COEF_CONST(0.5039062500),
105 COEF_CONST(0.5000000000), COEF_CONST(0.4980468750),
106 COEF_CONST(0.4960937500), COEF_CONST(0.4941406250),
107 COEF_CONST(0.4921875000), COEF_CONST(0.4902343750),
108 COEF_CONST(0.4882812500), COEF_CONST(0.4863281250),
109 COEF_CONST(0.4843750000), COEF_CONST(0.4824218750),
110 COEF_CONST(0.4804687500), COEF_CONST(0.4785156250)
111};
112
113ALIGN static const real_t exp_table[128] = {
114 COEF_CONST(0.50000000000000000000000000000000000000000000000000),
115 COEF_CONST(0.25000000000000000000000000000000000000000000000000),
116 COEF_CONST(0.12500000000000000000000000000000000000000000000000),
117 COEF_CONST(0.06250000000000000000000000000000000000000000000000),
118 COEF_CONST(0.03125000000000000000000000000000000000000000000000),
119 COEF_CONST(0.01562500000000000000000000000000000000000000000000),
120 COEF_CONST(0.00781250000000000000000000000000000000000000000000),
121 COEF_CONST(0.00390625000000000000000000000000000000000000000000),
122 COEF_CONST(0.00195312500000000000000000000000000000000000000000),
123 COEF_CONST(0.00097656250000000000000000000000000000000000000000),
124 COEF_CONST(0.00048828125000000000000000000000000000000000000000),
125 COEF_CONST(0.00024414062500000000000000000000000000000000000000),
126 COEF_CONST(0.00012207031250000000000000000000000000000000000000),
127 COEF_CONST(0.00006103515625000000000000000000000000000000000000),
128 COEF_CONST(0.00003051757812500000000000000000000000000000000000),
129 COEF_CONST(0.00001525878906250000000000000000000000000000000000),
130 COEF_CONST(0.00000762939453125000000000000000000000000000000000),
131 COEF_CONST(0.00000381469726562500000000000000000000000000000000),
132 COEF_CONST(0.00000190734863281250000000000000000000000000000000),
133 COEF_CONST(0.00000095367431640625000000000000000000000000000000),
134 COEF_CONST(0.00000047683715820312500000000000000000000000000000),
135 COEF_CONST(0.00000023841857910156250000000000000000000000000000),
136 COEF_CONST(0.00000011920928955078125000000000000000000000000000),
137 COEF_CONST(0.00000005960464477539062500000000000000000000000000),
138 COEF_CONST(0.00000002980232238769531300000000000000000000000000),
139 COEF_CONST(0.00000001490116119384765600000000000000000000000000),
140 COEF_CONST(0.00000000745058059692382810000000000000000000000000),
141 COEF_CONST(0.00000000372529029846191410000000000000000000000000),
142 COEF_CONST(0.00000000186264514923095700000000000000000000000000),
143 COEF_CONST(0.00000000093132257461547852000000000000000000000000),
144 COEF_CONST(0.00000000046566128730773926000000000000000000000000),
145 COEF_CONST(0.00000000023283064365386963000000000000000000000000),
146 COEF_CONST(0.00000000011641532182693481000000000000000000000000),
147 COEF_CONST(0.00000000005820766091346740700000000000000000000000),
148 COEF_CONST(0.00000000002910383045673370400000000000000000000000),
149 COEF_CONST(0.00000000001455191522836685200000000000000000000000),
150 COEF_CONST(0.00000000000727595761418342590000000000000000000000),
151 COEF_CONST(0.00000000000363797880709171300000000000000000000000),
152 COEF_CONST(0.00000000000181898940354585650000000000000000000000),
153 COEF_CONST(0.00000000000090949470177292824000000000000000000000),
154 COEF_CONST(0.00000000000045474735088646412000000000000000000000),
155 COEF_CONST(0.00000000000022737367544323206000000000000000000000),
156 COEF_CONST(0.00000000000011368683772161603000000000000000000000),
157 COEF_CONST(0.00000000000005684341886080801500000000000000000000),
158 COEF_CONST(0.00000000000002842170943040400700000000000000000000),
159 COEF_CONST(0.00000000000001421085471520200400000000000000000000),
160 COEF_CONST(0.00000000000000710542735760100190000000000000000000),
161 COEF_CONST(0.00000000000000355271367880050090000000000000000000),
162 COEF_CONST(0.00000000000000177635683940025050000000000000000000),
163 COEF_CONST(0.00000000000000088817841970012523000000000000000000),
164 COEF_CONST(0.00000000000000044408920985006262000000000000000000),
165 COEF_CONST(0.00000000000000022204460492503131000000000000000000),
166 COEF_CONST(0.00000000000000011102230246251565000000000000000000),
167 COEF_CONST(0.00000000000000005551115123125782700000000000000000),
168 COEF_CONST(0.00000000000000002775557561562891400000000000000000),
169 COEF_CONST(0.00000000000000001387778780781445700000000000000000),
170 COEF_CONST(0.00000000000000000693889390390722840000000000000000),
171 COEF_CONST(0.00000000000000000346944695195361420000000000000000),
172 COEF_CONST(0.00000000000000000173472347597680710000000000000000),
173 COEF_CONST(0.00000000000000000086736173798840355000000000000000),
174 COEF_CONST(0.00000000000000000043368086899420177000000000000000),
175 COEF_CONST(0.00000000000000000021684043449710089000000000000000),
176 COEF_CONST(0.00000000000000000010842021724855044000000000000000),
177 COEF_CONST(0.00000000000000000005421010862427522200000000000000),
178 COEF_CONST(0.00000000000000000002710505431213761100000000000000),
179 COEF_CONST(0.00000000000000000001355252715606880500000000000000),
180 COEF_CONST(0.00000000000000000000677626357803440270000000000000),
181 COEF_CONST(0.00000000000000000000338813178901720140000000000000),
182 COEF_CONST(0.00000000000000000000169406589450860070000000000000),
183 COEF_CONST(0.00000000000000000000084703294725430034000000000000),
184 COEF_CONST(0.00000000000000000000042351647362715017000000000000),
185 COEF_CONST(0.00000000000000000000021175823681357508000000000000),
186 COEF_CONST(0.00000000000000000000010587911840678754000000000000),
187 COEF_CONST(0.00000000000000000000005293955920339377100000000000),
188 COEF_CONST(0.00000000000000000000002646977960169688600000000000),
189 COEF_CONST(0.00000000000000000000001323488980084844300000000000),
190 COEF_CONST(0.00000000000000000000000661744490042422140000000000),
191 COEF_CONST(0.00000000000000000000000330872245021211070000000000),
192 COEF_CONST(0.00000000000000000000000165436122510605530000000000),
193 COEF_CONST(0.00000000000000000000000082718061255302767000000000),
194 COEF_CONST(0.00000000000000000000000041359030627651384000000000),
195 COEF_CONST(0.00000000000000000000000020679515313825692000000000),
196 COEF_CONST(0.00000000000000000000000010339757656912846000000000),
197 COEF_CONST(0.00000000000000000000000005169878828456423000000000),
198 COEF_CONST(0.00000000000000000000000002584939414228211500000000),
199 COEF_CONST(0.00000000000000000000000001292469707114105700000000),
200 COEF_CONST(0.00000000000000000000000000646234853557052870000000),
201 COEF_CONST(0.00000000000000000000000000323117426778526440000000),
202 COEF_CONST(0.00000000000000000000000000161558713389263220000000),
203 COEF_CONST(0.00000000000000000000000000080779356694631609000000),
204 COEF_CONST(0.00000000000000000000000000040389678347315804000000),
205 COEF_CONST(0.00000000000000000000000000020194839173657902000000),
206 COEF_CONST(0.00000000000000000000000000010097419586828951000000),
207 COEF_CONST(0.00000000000000000000000000005048709793414475600000),
208 COEF_CONST(0.00000000000000000000000000002524354896707237800000),
209 COEF_CONST(0.00000000000000000000000000001262177448353618900000),
210 COEF_CONST(0.00000000000000000000000000000631088724176809440000),
211 COEF_CONST(0.00000000000000000000000000000315544362088404720000),
212 COEF_CONST(0.00000000000000000000000000000157772181044202360000),
213 COEF_CONST(0.00000000000000000000000000000078886090522101181000),
214 COEF_CONST(0.00000000000000000000000000000039443045261050590000),
215 COEF_CONST(0.00000000000000000000000000000019721522630525295000),
216 COEF_CONST(0.00000000000000000000000000000009860761315262647600),
217 COEF_CONST(0.00000000000000000000000000000004930380657631323800),
218 COEF_CONST(0.00000000000000000000000000000002465190328815661900),
219 COEF_CONST(0.00000000000000000000000000000001232595164407830900),
220 COEF_CONST(0.00000000000000000000000000000000616297582203915470),
221 COEF_CONST(0.00000000000000000000000000000000308148791101957740),
222 COEF_CONST(0.00000000000000000000000000000000154074395550978870),
223 COEF_CONST(0.00000000000000000000000000000000077037197775489434),
224 COEF_CONST(0.00000000000000000000000000000000038518598887744717),
225 COEF_CONST(0.00000000000000000000000000000000019259299443872359),
226 COEF_CONST(0.00000000000000000000000000000000009629649721936179),
227 COEF_CONST(0.00000000000000000000000000000000004814824860968090),
228 COEF_CONST(0.00000000000000000000000000000000002407412430484045),
229 COEF_CONST(0.00000000000000000000000000000000001203706215242022),
230 COEF_CONST(0.00000000000000000000000000000000000601853107621011),
231 COEF_CONST(0.00000000000000000000000000000000000300926553810506),
232 COEF_CONST(0.00000000000000000000000000000000000150463276905253),
233 COEF_CONST(0.00000000000000000000000000000000000075231638452626),
234 COEF_CONST(0.00000000000000000000000000000000000037615819226313),
235 COEF_CONST(0.00000000000000000000000000000000000018807909613157),
236 COEF_CONST(0.00000000000000000000000000000000000009403954806578),
237 COEF_CONST(0.00000000000000000000000000000000000004701977403289),
238 COEF_CONST(0.00000000000000000000000000000000000002350988701645),
239 COEF_CONST(0.00000000000000000000000000000000000001175494350822),
240 COEF_CONST(0.0 /* 0000000000000000000000000000000000000587747175411 "floating point underflow" */),
241 COEF_CONST(0.0)
242};
243
244#ifdef __cplusplus
245}
246#endif
247#endif
248
249#endif
diff --git a/apps/codecs/libfaad/iq_table.h b/apps/codecs/libfaad/iq_table.h
new file mode 100644
index 0000000000..84d279c031
--- /dev/null
+++ b/apps/codecs/libfaad/iq_table.h
@@ -0,0 +1,16455 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef IQ_TABLE_H__
29#define IQ_TABLE_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35
36/* !!!DON'T CHANGE IQ_TABLE_SIZE!!! */
37
38
39#ifndef FIXED_POINT
40
41#define IQ_TABLE_SIZE 8192
42
43#ifdef _MSC_VER
44#pragma warning(disable:4305)
45#pragma warning(disable:4244)
46#endif
47
48ALIGN static const real_t iq_table[IQ_TABLE_SIZE] =
49{
50 0,
51 1,
52 2.5198420997897464,
53 4.3267487109222245,
54 6.3496042078727974,
55 8.5498797333834844,
56 10.902723556992836,
57 13.390518279406722,
58 15.999999999999998,
59 18.720754407467133,
60 21.544346900318832,
61 24.463780996262464,
62 27.47314182127996,
63 30.567350940369842,
64 33.741991698453212,
65 36.993181114957046,
66 40.317473596635935,
67 43.711787041189993,
68 47.173345095760126,
69 50.699631325716943,
70 54.288352331898118,
71 57.937407704003519,
72 61.6448652744185,
73 65.408940536585988,
74 69.227979374755591,
75 73.100443455321638,
76 77.024897778591622,
77 80.999999999999986,
78 85.024491212518527,
79 89.097187944889555,
80 93.216975178615741,
81 97.382800224133163,
82 101.59366732596474,
83 105.84863288986224,
84 110.14680124343441,
85 114.4873208566006,
86 118.86938096020653,
87 123.29220851090024,
88 127.75506545836058,
89 132.25724627755247,
90 136.79807573413572,
91 141.37690685569191,
92 145.99311908523086,
93 150.6461165966291,
94 155.33532675434674,
95 160.06019870205279,
96 164.82020206673349,
97 169.61482576651861,
98 174.44357691188537,
99 179.30597979112557,
100 184.20157493201927,
101 189.12991823257562,
102 194.09058015449685,
103 199.08314497371677,
104 204.1072100829694,
105 209.16238534187647,
106 214.24829247050752,
107 219.36456448277784,
108 224.51084515641216,
109 229.6867885365223,
110 234.89205847013176,
111 240.12632816923249,
112 245.38927980018505,
113 250.68060409747261,
114 255.99999999999991,
115 261.34717430828869,
116 266.72184136106449,
117 272.12372272986045,
118 277.55254693037961,
119 283.0080491494619,
120 288.48997098659891,
121 293.99806020902247,
122 299.53207051947408,
123 305.0917613358298,
124 310.67689758182206,
125 316.28724948815585,
126 321.92259240337177,
127 327.58270661385535,
128 333.26737717243742,
129 338.97639373507025,
130 344.70955040510125,
131 350.46664558470013,
132 356.24748183302603,
133 362.05186573075139,
134 367.87960775058258,
135 373.73052213344511,
136 379.60442677002078,
137 385.50114308734607,
138 391.42049594019937,
139 397.36231350702371,
140 403.32642719014467,
141 409.31267152006262,
142 415.32088406360799,
143 421.35090533576471,
144 427.40257871497619,
145 433.4757503617617,
146 439.5702691404793,
147 445.68598654408271,
148 451.82275662172759,
149 457.98043590909128,
150 464.15888336127773,
151 470.35796028818726,
152 476.5775302922363,
153 482.81745920832043,
154 489.07761504591741,
155 495.35786793323581,
156 501.65809006331688,
157 507.97815564200368,
158 514.31794083769648,
159 520.67732373281672,
160 527.05618427690604,
161 533.45440424129174,
162 539.87186717525128,
163 546.30845836361505,
164 552.76406478574609,
165 559.23857507584194,
166 565.73187948450413,
167 572.24386984152341,
168 578.77443951983378,
169 585.32348340058843,
170 591.89089783931263,
171 598.47658063309257,
172 605.08043098876044,
173 611.70234949203643,
174 618.3422380775919,
175 624.99999999999977,
176 631.67553980553748,
177 638.36876330481164,
178 645.07957754617485,
179 651.80789078990415,
180 658.55361248311499,
181 665.31665323538357,
182 672.09692479505225,
183 678.8943400261943,
184 685.70881288621433,
185 692.540258404062,
186 699.38859265903977,
187 706.25373276018058,
188 713.13559682617972,
189 720.03410396586037,
190 726.94917425915435,
191 733.88072873858209,
192 740.82868937121543,
193 747.79297904110535,
194 754.77352153216191,
195 761.77024151147043,
196 768.78306451302956,
197 775.81191692189896,
198 782.85672595874246,
199 789.91741966475445,
200 796.99392688695798,
201 804.08617726386274,
202 811.19410121147098,
203 818.31762990962227,
204 825.45669528866563,
205 832.61123001644864,
206 839.78116748561604,
207 846.96644180120552,
208 854.16698776853514,
209 861.38274088137143,
210 868.61363731036977,
211 875.85961389178203,
212 883.12060811641959,
213 890.39655811886757,
214 897.68740266694181,
215 904.99308115138172,
216 912.31353357577188,
217 919.64870054668756,
218 926.99852326405619,
219 934.36294351172899,
220 941.74190364825859,
221 949.13534659787422,
222 956.54321584165211,
223 963.96545540887348,
224 971.40200986856541,
225 978.85282432122176,
226 986.31784439069588,
227 993.7970162162635,
228 1001.29028644485,
229 1008.797602223418,
230 1016.3189111915103,
231 1023.8541614739464,
232 1031.4033016736653,
233 1038.9662808647138,
234 1046.5430485853758,
235 1054.1335548314366,
236 1061.7377500495838,
237 1069.3555851309357,
238 1076.9870114046978,
239 1084.6319806319441,
240 1092.2904449995174,
241 1099.9623571140482,
242 1107.6476699960892,
243 1115.3463370743607,
244 1123.058312180106,
245 1130.7835495415541,
246 1138.5220037784854,
247 1146.273629896901,
248 1154.0383832837879,
249 1161.816219701986,
250 1169.607095285146,
251 1177.4109665327808,
252 1185.2277903054078,
253 1193.0575238197798,
254 1200.9001246442001,
255 1208.7555506939248,
256 1216.6237602266442,
257 1224.5047118380478,
258 1232.3983644574657,
259 1240.3046773435874,
260 1248.2236100802568,
261 1256.1551225723395,
262 1264.099175041662,
263 1272.0557280230228,
264 1280.0247423602691,
265 1288.0061792024444,
266 1295.9999999999995,
267 1304.006166501068,
268 1312.0246407478062,
269 1320.0553850727929,
270 1328.0983620954903,
271 1336.1535347187651,
272 1344.2208661254647,
273 1352.3003197750522,
274 1360.3918594002962,
275 1368.4954490040145,
276 1376.6110528558709,
277 1384.7386354892244,
278 1392.8781616980295,
279 1401.0295965337855,
280 1409.1929053025353,
281 1417.3680535619119,
282 1425.5550071182327,
283 1433.7537320236374,
284 1441.9641945732744,
285 1450.1863613025282,
286 1458.4201989842913,
287 1466.6656746262797,
288 1474.9227554683875,
289 1483.1914089800841,
290 1491.4716028578516,
291 1499.7633050226596,
292 1508.0664836174794,
293 1516.3811070048375,
294 1524.7071437644029,
295 1533.0445626906128,
296 1541.3933327903342,
297 1549.7534232805581,
298 1558.1248035861302,
299 1566.507443337515,
300 1574.9013123685909,
301 1583.3063807144795,
302 1591.7226186094069,
303 1600.1499964845941,
304 1608.58848496618,
305 1617.0380548731737,
306 1625.4986772154357,
307 1633.9703231916887,
308 1642.4529641875577,
309 1650.9465717736346,
310 1659.4511177035752,
311 1667.9665739122186,
312 1676.4929125137353,
313 1685.030105799801,
314 1693.5781262377957,
315 1702.136946469027,
316 1710.7065393069795,
317 1719.2868777355877,
318 1727.8779349075323,
319 1736.4796841425596,
320 1745.092098925825,
321 1753.7151529062583,
322 1762.3488198949503,
323 1770.9930738635628,
324 1779.6478889427597,
325 1788.3132394206564,
326 1796.9890997412947,
327 1805.6754445031333,
328 1814.3722484575621,
329 1823.0794865074322,
330 1831.7971337056094,
331 1840.5251652535437,
332 1849.2635564998579,
333 1858.0122829389563,
334 1866.7713202096493,
335 1875.5406440937966,
336 1884.3202305149687,
337 1893.110055537124,
338 1901.9100953633042,
339 1910.7203263343454,
340 1919.5407249276057,
341 1928.3712677557098,
342 1937.2119315653083,
343 1946.0626932358525,
344 1954.923529778386,
345 1963.79441833435,
346 1972.6753361744036,
347 1981.5662606972594,
348 1990.467169428533,
349 1999.3780400196069,
350 2008.2988502465078,
351 2017.2295780087982,
352 2026.1702013284819,
353 2035.1206983489212,
354 2044.0810473337688,
355 2053.0512266659125,
356 2062.0312148464309,
357 2071.0209904935646,
358 2080.0205323416958,
359 2089.0298192403443,
360 2098.0488301531714,
361 2107.0775441569995,
362 2116.115940440839,
363 2125.1639983049317,
364 2134.2216971597995,
365 2143.2890165253098,
366 2152.3659360297484,
367 2161.4524354089031,
368 2170.5484945051617,
369 2179.6540932666144,
370 2188.7692117461711,
371 2197.8938301006888,
372 2207.0279285901042,
373 2216.1714875765838,
374 2225.324487523676,
375 2234.4869089954782,
376 2243.6587326558101,
377 2252.8399392673982,
378 2262.0305096910702,
379 2271.2304248849537,
380 2280.4396659036897,
381 2289.6582138976523,
382 2298.8860501121762,
383 2308.1231558867926,
384 2317.3695126544767,
385 2326.6251019409005,
386 2335.8899053636933,
387 2345.1639046317132,
388 2354.4470815443233,
389 2363.7394179906792,
390 2373.0408959490205,
391 2382.3514974859731,
392 2391.6712047558558,
393 2400.9999999999991,
394 2410.3378655460651,
395 2419.6847838073813,
396 2429.0407372822747,
397 2438.4057085534191,
398 2447.7796802871858,
399 2457.1626352330004,
400 2466.5545562227112,
401 2475.9554261699564,
402 2485.3652280695474,
403 2494.7839449968492,
404 2504.2115601071737,
405 2513.6480566351788,
406 2523.0934178942675,
407 2532.5476272760025,
408 2542.0106682495189,
409 2551.482524360948,
410 2560.9631792328441,
411 2570.4526165636184,
412 2579.9508201269791,
413 2589.4577737713744,
414 2598.9734614194458,
415 2608.4978670674823,
416 2618.0309747848837,
417 2627.5727687136259,
418 2637.1232330677353,
419 2646.6823521327647,
420 2656.2501102652768,
421 2665.8264918923328,
422 2675.4114815109842,
423 2685.0050636877722,
424 2694.6072230582295,
425 2704.2179443263894,
426 2713.8372122642972,
427 2723.4650117115279,
428 2733.1013275747096,
429 2742.7461448270483,
430 2752.3994485078601,
431 2762.0612237221085,
432 2771.7314556399419,
433 2781.4101294962406,
434 2791.0972305901655,
435 2800.7927442847094,
436 2810.4966560062589,
437 2820.2089512441521,
438 2829.9296155502466,
439 2839.6586345384894,
440 2849.3959938844923,
441 2859.1416793251065,
442 2868.8956766580086,
443 2878.6579717412847,
444 2888.4285504930212,
445 2898.2073988908974,
446 2907.9945029717837,
447 2917.789848831344,
448 2927.5934226236377,
449 2937.4052105607311,
450 2947.2251989123079,
451 2957.0533740052865,
452 2966.8897222234368,
453 2976.734230007005,
454 2986.5868838523397,
455 2996.4476703115197,
456 3006.3165759919889,
457 3016.1935875561908,
458 3026.0786917212095,
459 3035.9718752584108,
460 3045.8731249930906,
461 3055.7824278041207,
462 3065.6997706236039,
463 3075.625140436528,
464 3085.5585242804245,
465 3095.4999092450298,
466 3105.4492824719491,
467 3115.4066311543256,
468 3125.3719425365089,
469 3135.3452039137287,
470 3145.3264026317715,
471 3155.3155260866592,
472 3165.3125617243295,
473 3175.3174970403229,
474 3185.3303195794679,
475 3195.35101693557,
476 3205.3795767511078,
477 3215.4159867169251,
478 3225.460234571929,
479 3235.5123081027928,
480 3245.5721951436558,
481 3255.63988357583,
482 3265.7153613275095,
483 3275.7986163734795,
484 3285.8896367348289,
485 3295.9884104786665,
486 3306.0949257178395,
487 3316.2091706106517,
488 3326.331133360588,
489 3336.4608022160378,
490 3346.5981654700231,
491 3356.7432114599264,
492 3366.8959285672249,
493 3377.0563052172211,
494 3387.2243298787821,
495 3397.3999910640764,
496 3407.5832773283128,
497 3417.7741772694862,
498 3427.9726795281199,
499 3438.1787727870123,
500 3448.3924457709873,
501 3458.6136872466445,
502 3468.8424860221107,
503 3479.0788309467976,
504 3489.3227109111554,
505 3499.5741148464344,
506 3509.8330317244445,
507 3520.0994505573185,
508 3530.3733603972751,
509 3540.6547503363886,
510 3550.9436095063534,
511 3561.239927078258,
512 3571.5436922623535,
513 3581.8548943078308,
514 3592.1735225025936,
515 3602.4995661730372,
516 3612.8330146838275,
517 3623.1738574376814,
518 3633.5220838751502,
519 3643.8776834744031,
520 3654.2406457510142,
521 3664.6109602577494,
522 3674.9886165843564,
523 3685.3736043573545,
524 3695.7659132398294,
525 3706.1655329312248,
526 3716.5724531671399,
527 3726.9866637191262,
528 3737.4081543944876,
529 3747.8369150360782,
530 3758.2729355221072,
531 3768.7162057659411,
532 3779.1667157159077,
533 3789.6244553551055,
534 3800.0894147012082,
535 3810.5615838062768,
536 3821.0409527565694,
537 3831.5275116723533,
538 3842.0212507077194,
539 3852.522160050396,
540 3863.0302299215673,
541 3873.5454505756893,
542 3884.0678123003108,
543 3894.5973054158922,
544 3905.1339202756285,
545 3915.6776472652732,
546 3926.2284768029604,
547 3936.7863993390338,
548 3947.3514053558706,
549 3957.9234853677135,
550 3968.5026299204969,
551 3979.0888295916798,
552 3989.6820749900776,
553 4000.2823567556948,
554 4010.8896655595613,
555 4021.5039921035655,
556 4032.1253271202945,
557 4042.7536613728694,
558 4053.3889856547858,
559 4064.0312907897551,
560 4074.6805676315448,
561 4085.3368070638221,
562 4095.9999999999982,
563 4106.6701373830711,
564 4117.347210185475,
565 4128.0312094089259,
566 4138.722126084268,
567 4149.4199512713267,
568 4160.1246760587583,
569 4170.8362915638982,
570 4181.5547889326181,
571 4192.2801593391769,
572 4203.0123939860741,
573 4213.7514841039101,
574 4224.4974209512384,
575 4235.2501958144258,
576 4246.0098000075095,
577 4256.7762248720574,
578 4267.549461777031,
579 4278.3295021186423,
580 4289.1163373202198,
581 4299.9099588320714,
582 4310.7103581313495,
583 4321.5175267219138,
584 4332.3314561342004,
585 4343.152137925088,
586 4353.9795636777671,
587 4364.8137250016052,
588 4375.6546135320223,
589 4386.5022209303588,
590 4397.3565388837469,
591 4408.2175591049827,
592 4419.0852733324018,
593 4429.9596733297531,
594 4440.8407508860728,
595 4451.7284978155603,
596 4462.6229059574571,
597 4473.5239671759227,
598 4484.4316733599126,
599 4495.3460164230582,
600 4506.2669883035496,
601 4517.1945809640119,
602 4528.1287863913894,
603 4539.069596596828,
604 4550.0170036155587,
605 4560.9709995067806,
606 4571.931576353546,
607 4582.898726262647,
608 4593.8724413645004,
609 4604.8527138130348,
610 4615.8395357855816,
611 4626.8328994827571,
612 4637.8327971283588,
613 4648.8392209692511,
614 4659.8521632752563,
615 4670.8716163390473,
616 4681.8975724760394,
617 4692.9300240242837,
618 4703.9689633443595,
619 4715.0143828192668,
620 4726.0662748543255,
621 4737.1246318770682,
622 4748.1894463371373,
623 4759.2607107061804,
624 4770.3384174777493,
625 4781.4225591671993,
626 4792.5131283115852,
627 4803.6101174695614,
628 4814.7135192212854,
629 4825.8233261683154,
630 4836.9395309335096,
631 4848.0621261609349,
632 4859.1911045157631,
633 4870.3264586841779,
634 4881.4681813732768,
635 4892.6162653109768,
636 4903.7707032459193,
637 4914.931487947375,
638 4926.0986122051509,
639 4937.2720688294967,
640 4948.4518506510112,
641 4959.637950520555,
642 4970.8303613091521,
643 4982.0290759079044,
644 4993.2340872278974,
645 5004.4453882001153,
646 5015.6629717753467,
647 5026.8868309241007,
648 5038.1169586365131,
649 5049.353347922266,
650 5060.5959918104927,
651 5071.8448833496996,
652 5083.1000156076734,
653 5094.3613816713996,
654 5105.6289746469747,
655 5116.9027876595246,
656 5128.18281385312,
657 5139.4690463906918,
658 5150.7614784539473,
659 5162.0601032432933,
660 5173.3649139777472,
661 5184.6759038948594,
662 5195.9930662506322,
663 5207.3163943194386,
664 5218.6458813939435,
665 5229.9815207850224,
666 5241.3233058216847,
667 5252.6712298509919,
668 5264.025286237983,
669 5275.3854683655954,
670 5286.7517696345885,
671 5298.1241834634639,
672 5309.5027032883945,
673 5320.887322563146,
674 5332.2780347589978,
675 5343.6748333646756,
676 5355.0777118862716,
677 5366.4866638471722,
678 5377.901682787985,
679 5389.3227622664635,
680 5400.749895857437,
681 5412.1830771527357,
682 5423.622299761123,
683 5435.067557308219,
684 5446.5188434364318,
685 5457.9761518048872,
686 5469.4394760893592,
687 5480.9088099821975,
688 5492.3841471922606,
689 5503.8654814448455,
690 5515.3528064816201,
691 5526.846116060552,
692 5538.3454039558474,
693 5549.8506639578736,
694 5561.3618898731029,
695 5572.8790755240361,
696 5584.4022147491451,
697 5595.9313014027975,
698 5607.4663293552012,
699 5619.0072924923297,
700 5630.5541847158656,
701 5642.1069999431284,
702 5653.665732107017,
703 5665.230375155943,
704 5676.8009230537655,
705 5688.3773697797333,
706 5699.9597093284156,
707 5711.5479357096474,
708 5723.1420429484588,
709 5734.7420250850209,
710 5746.347876174581,
711 5757.9595902874016,
712 5769.5771615087006,
713 5781.2005839385911,
714 5792.8298516920213,
715 5804.4649588987149,
716 5816.1058997031105,
717 5827.7526682643065,
718 5839.4052587559972,
719 5851.0636653664196,
720 5862.7278822982908,
721 5874.3979037687541,
722 5886.0737240093204,
723 5897.7553372658094,
724 5909.4427377982956,
725 5921.1359198810505,
726 5932.8348778024874,
727 5944.5396058651031,
728 5956.2500983854261,
729 5967.9663496939575,
730 5979.6883541351208,
731 5991.4161060672022,
732 6003.1495998623004,
733 6014.8888299062692,
734 6026.6337905986684,
735 6038.3844763527022,
736 6050.1408815951781,
737 6061.9030007664414,
738 6073.6708283203316,
739 6085.4443587241267,
740 6097.2235864584891,
741 6109.0085060174197,
742 6120.7991119081998,
743 6132.595398651345,
744 6144.3973607805519,
745 6156.2049928426459,
746 6168.0182893975361,
747 6179.8372450181578,
748 6191.6618542904307,
749 6203.4921118132024,
750 6215.3280121982016,
751 6227.1695500699925,
752 6239.0167200659189,
753 6250.8695168360628,
754 6262.7279350431891,
755 6274.5919693627056,
756 6286.4616144826068,
757 6298.3368651034316,
758 6310.2177159382172,
759 6322.1041617124456,
760 6333.9961971640032,
761 6345.8938170431311,
762 6357.7970161123785,
763 6369.7057891465583,
764 6381.6201309327007,
765 6393.5400362700075,
766 6405.4654999698032,
767 6417.3965168554978,
768 6429.3330817625329,
769 6441.2751895383453,
770 6453.2228350423138,
771 6465.176013145724,
772 6477.134718731716,
773 6489.0989466952469,
774 6501.0686919430445,
775 6513.0439493935628,
776 6525.0247139769417,
777 6537.010980634961,
778 6549.002744321001,
779 6560.9999999999973,
780 6573.0027426483985,
781 6585.0109672541284,
782 6597.0246688165371,
783 6609.0438423463656,
784 6621.0684828657004,
785 6633.0985854079354,
786 6645.134145017727,
787 6657.1751567509573,
788 6669.2216156746908,
789 6681.2735168671343,
790 6693.3308554176001,
791 6705.3936264264594,
792 6717.461825005108,
793 6729.535446275926,
794 6741.6144853722335,
795 6753.6989374382601,
796 6765.7887976290967,
797 6777.8840611106634,
798 6789.9847230596661,
799 6802.0907786635626,
800 6814.2022231205201,
801 6826.3190516393797,
802 6838.4412594396181,
803 6850.5688417513074,
804 6862.701793815083,
805 6874.840110882099,
806 6886.9837882139991,
807 6899.1328210828724,
808 6911.2872047712199,
809 6923.4469345719199,
810 6935.6120057881863,
811 6947.7824137335365,
812 6959.9581537317536,
813 6972.1392211168532,
814 6984.3256112330409,
815 6996.5173194346862,
816 7008.7143410862773,
817 7020.9166715623942,
818 7033.1243062476678,
819 7045.3372405367481,
820 7057.5554698342685,
821 7069.7789895548103,
822 7082.0077951228714,
823 7094.2418819728273,
824 7106.4812455489018,
825 7118.7258813051285,
826 7130.9757847053224,
827 7143.2309512230404,
828 7155.4913763415516,
829 7167.7570555538041,
830 7180.0279843623894,
831 7192.3041582795131,
832 7204.5855728269571,
833 7216.8722235360519,
834 7229.1641059476406,
835 7241.4612156120484,
836 7253.7635480890503,
837 7266.0710989478375,
838 7278.3838637669869,
839 7290.7018381344296,
840 7303.0250176474174,
841 7315.3533979124932,
842 7327.6869745454596,
843 7340.0257431713462,
844 7352.3696994243801,
845 7364.7188389479543,
846 7377.0731573945968,
847 7389.4326504259407,
848 7401.7973137126937,
849 7414.1671429346061,
850 7426.5421337804428,
851 7438.922281947951,
852 7451.3075831438346,
853 7463.6980330837177,
854 7476.0936274921214,
855 7488.4943621024304,
856 7500.9002326568652,
857 7513.3112349064522,
858 7525.7273646109943,
859 7538.1486175390446,
860 7550.5749894678729,
861 7563.0064761834419,
862 7575.4430734803736,
863 7587.8847771619248,
864 7600.3315830399597,
865 7612.7834869349153,
866 7625.24048467578,
867 7637.7025721000637,
868 7650.1697450537677,
869 7662.6419993913596,
870 7675.1193309757446,
871 7687.6017356782404,
872 7700.0892093785433,
873 7712.5817479647112,
874 7725.079347333125,
875 7737.5820033884729,
876 7750.0897120437139,
877 7762.6024692200581,
878 7775.1202708469355,
879 7787.6431128619733,
880 7800.1709912109645,
881 7812.7039018478481,
882 7825.2418407346768,
883 7837.7848038415968,
884 7850.3327871468155,
885 7862.8857866365806,
886 7875.4437983051539,
887 7888.006818154784,
888 7900.5748421956796,
889 7913.1478664459901,
890 7925.725886931772,
891 7938.3088996869719,
892 7950.8969007533951,
893 7963.4898861806851,
894 7976.0878520262959,
895 7988.6907943554688,
896 8001.2987092412086,
897 8013.911592764257,
898 8026.5294410130691,
899 8039.1522500837891,
900 8051.7800160802271,
901 8064.412735113835,
902 8077.0504033036796,
903 8089.6930167764222,
904 8102.3405716662946,
905 8114.9930641150731,
906 8127.6504902720571,
907 8140.3128462940449,
908 8152.9801283453098,
909 8165.6523325975786,
910 8178.3294552300049,
911 8191.0114924291529,
912 8203.6984403889655,
913 8216.3902953107463,
914 8229.0870534031419,
915 8241.7887108821069,
916 8254.4952639708936,
917 8267.2067089000211,
918 8279.9230419072574,
919 8292.6442592375952,
920 8305.3703571432306,
921 8318.101331883543,
922 8330.8371797250657,
923 8343.577896941475,
924 8356.3234798135582,
925 8369.0739246291978,
926 8381.8292276833508,
927 8394.5893852780209,
928 8407.3543937222421,
929 8420.1242493320569,
930 8432.8989484304948,
931 8445.6784873475499,
932 8458.4628624201578,
933 8471.2520699921806,
934 8484.0461064143838,
935 8496.8449680444082,
936 8509.6486512467636,
937 8522.4571523927953,
938 8535.270467860666,
939 8548.0885940353437,
940 8560.9115273085663,
941 8573.7392640788403,
942 8586.5718007514006,
943 8599.4091337382069,
944 8612.2512594579148,
945 8625.0981743358552,
946 8637.9498748040205,
947 8650.8063573010386,
948 8663.6676182721567,
949 8676.533654169225,
950 8689.4044614506638,
951 8702.2800365814601,
952 8715.1603760331418,
953 8728.0454762837508,
954 8740.9353338178389,
955 8753.8299451264356,
956 8766.7293067070332,
957 8779.6334150635721,
958 8792.5422667064158,
959 8805.4558581523324,
960 8818.3741859244819,
961 8831.2972465523908,
962 8844.2250365719356,
963 8857.1575525253265,
964 8870.0947909610859,
965 8883.0367484340295,
966 8895.9834215052524,
967 8908.934806742107,
968 8921.8909007181846,
969 8934.8517000132997,
970 8947.817201213471,
971 8960.7874009109,
972 8973.7622957039603,
973 8986.7418821971733,
974 8999.7261570011924,
975 9012.7151167327884,
976 9025.7087580148236,
977 9038.7070774762469,
978 9051.7100717520643,
979 9064.7177374833282,
980 9077.7300713171153,
981 9090.7470699065179,
982 9103.7687299106146,
983 9116.7950479944648,
984 9129.8260208290812,
985 9142.8616450914233,
986 9155.9019174643727,
987 9168.9468346367157,
988 9181.9963933031358,
989 9195.0505901641845,
990 9208.1094219262741,
991 9221.1728853016557,
992 9234.240977008405,
993 9247.3136937704076,
994 9260.3910323173386,
995 9273.472989384647,
996 9286.5595617135423,
997 9299.6507460509747,
998 9312.7465391496207,
999 9325.8469377678684,
1000 9338.9519386698012,
1001 9352.0615386251757,
1002 9365.1757344094131,
1003 9378.2945228035842,
1004 9391.4179005943843,
1005 9404.5458645741273,
1006 9417.6784115407263,
1007 9430.8155382976747,
1008 9443.9572416540359,
1009 9457.1035184244265,
1010 9470.2543654290002,
1011 9483.4097794934296,
1012 9496.5697574488931,
1013 9509.7342961320664,
1014 9522.9033923850911,
1015 9536.0770430555804,
1016 9549.2552449965824,
1017 9562.4379950665825,
1018 9575.6252901294793,
1019 9588.8171270545736,
1020 9602.0135027165488,
1021 9615.2144139954635,
1022 9628.4198577767274,
1023 9641.629830951093,
1024 9654.844330414644,
1025 9668.0633530687719,
1026 9681.286895820167,
1027 9694.5149555808002,
1028 9707.7475292679192,
1029 9720.9846138040157,
1030 9734.2262061168276,
1031 9747.4723031393187,
1032 9760.7229018096641,
1033 9773.9779990712323,
1034 9787.2375918725811,
1035 9800.5016771674327,
1036 9813.7702519146696,
1037 9827.0433130783094,
1038 9840.3208576275028,
1039 9853.602882536512,
1040 9866.8893847846994,
1041 9880.1803613565116,
1042 9893.4758092414686,
1043 9906.7757254341523,
1044 9920.0801069341851,
1045 9933.3889507462245,
1046 9946.7022538799429,
1047 9960.0200133500221,
1048 9973.3422261761298,
1049 9986.6688893829159,
1050 9999.9999999999945,
1051 10013.335555061929,
1052 10026.675551608221,
1053 10040.019986683301,
1054 10053.368857336509,
1055 10066.722160622081,
1056 10080.079893599144,
1057 10093.442053331697,
1058 10106.808636888598,
1059 10120.179641343551,
1060 10133.555063775095,
1061 10146.934901266595,
1062 10160.31915090622,
1063 10173.707809786936,
1064 10187.100875006496,
1065 10200.498343667417,
1066 10213.900212876984,
1067 10227.306479747222,
1068 10240.717141394889,
1069 10254.132194941467,
1070 10267.551637513146,
1071 10280.975466240814,
1072 10294.40367826004,
1073 10307.836270711066,
1074 10321.273240738796,
1075 10334.71458549278,
1076 10348.160302127204,
1077 10361.610387800878,
1078 10375.064839677221,
1079 10388.523654924258,
1080 10401.986830714593,
1081 10415.454364225412,
1082 10428.926252638465,
1083 10442.402493140049,
1084 10455.883082921007,
1085 10469.368019176709,
1086 10482.85729910704,
1087 10496.350919916393,
1088 10509.848878813653,
1089 10523.351173012188,
1090 10536.857799729838,
1091 10550.3687561889,
1092 10563.884039616123,
1093 10577.403647242685,
1094 10590.927576304197,
1095 10604.455824040679,
1096 10617.988387696556,
1097 10631.525264520642,
1098 10645.066451766135,
1099 10658.611946690598,
1100 10672.161746555956,
1101 10685.715848628475,
1102 10699.274250178762,
1103 10712.836948481747,
1104 10726.403940816675,
1105 10739.975224467091,
1106 10753.550796720834,
1107 10767.130654870027,
1108 10780.714796211059,
1109 10794.303218044579,
1110 10807.895917675487,
1111 10821.492892412922,
1112 10835.094139570248,
1113 10848.699656465047,
1114 10862.309440419107,
1115 10875.923488758415,
1116 10889.541798813138,
1117 10903.16436791762,
1118 10916.791193410372,
1119 10930.422272634056,
1120 10944.05760293548,
1121 10957.697181665582,
1122 10971.341006179427,
1123 10984.98907383619,
1124 10998.641381999149,
1125 11012.297928035676,
1126 11025.958709317223,
1127 11039.623723219316,
1128 11053.292967121541,
1129 11066.966438407539,
1130 11080.64413446499,
1131 11094.326052685608,
1132 11108.012190465128,
1133 11121.702545203296,
1134 11135.397114303863,
1135 11149.095895174571,
1136 11162.798885227143,
1137 11176.506081877278,
1138 11190.217482544635,
1139 11203.933084652828,
1140 11217.652885629415,
1141 11231.376882905886,
1142 11245.105073917659,
1143 11258.837456104062,
1144 11272.574026908333,
1145 11286.314783777601,
1146 11300.059724162888,
1147 11313.808845519083,
1148 11327.562145304952,
1149 11341.319620983111,
1150 11355.081270020033,
1151 11368.847089886023,
1152 11382.617078055218,
1153 11396.391232005579,
1154 11410.169549218874,
1155 11423.952027180676,
1156 11437.738663380349,
1157 11451.529455311042,
1158 11465.324400469679,
1159 11479.123496356951,
1160 11492.926740477304,
1161 11506.734130338931,
1162 11520.545663453764,
1163 11534.361337337466,
1164 11548.181149509423,
1165 11562.005097492724,
1166 11575.83317881417,
1167 11589.665391004253,
1168 11603.501731597149,
1169 11617.342198130715,
1170 11631.186788146468,
1171 11645.035499189589,
1172 11658.888328808911,
1173 11672.745274556904,
1174 11686.606333989675,
1175 11700.471504666955,
1176 11714.340784152086,
1177 11728.214170012021,
1178 11742.091659817312,
1179 11755.973251142101,
1180 11769.858941564111,
1181 11783.748728664636,
1182 11797.642610028539,
1183 11811.540583244237,
1184 11825.442645903697,
1185 11839.34879560242,
1186 11853.259029939445,
1187 11867.173346517333,
1188 11881.091742942155,
1189 11895.014216823492,
1190 11908.940765774427,
1191 11922.871387411526,
1192 11936.806079354839,
1193 11950.744839227897,
1194 11964.687664657684,
1195 11978.634553274653,
1196 11992.585502712702,
1197 12006.540510609168,
1198 12020.499574604828,
1199 12034.462692343877,
1200 12048.429861473938,
1201 12062.401079646032,
1202 12076.376344514589,
1203 12090.355653737433,
1204 12104.339004975769,
1205 12118.326395894188,
1206 12132.317824160644,
1207 12146.313287446457,
1208 12160.312783426305,
1209 12174.316309778205,
1210 12188.323864183525,
1211 12202.335444326955,
1212 12216.351047896511,
1213 12230.370672583531,
1214 12244.394316082657,
1215 12258.421976091831,
1216 12272.453650312296,
1217 12286.489336448574,
1218 12300.529032208471,
1219 12314.572735303058,
1220 12328.620443446678,
1221 12342.672154356922,
1222 12356.727865754638,
1223 12370.787575363909,
1224 12384.851280912055,
1225 12398.918980129623,
1226 12412.990670750381,
1227 12427.066350511306,
1228 12441.146017152583,
1229 12455.229668417589,
1230 12469.317302052901,
1231 12483.40891580827,
1232 12497.50450743663,
1233 12511.604074694078,
1234 12525.707615339878,
1235 12539.815127136444,
1236 12553.926607849342,
1237 12568.042055247275,
1238 12582.161467102082,
1239 12596.284841188726,
1240 12610.41217528529,
1241 12624.543467172971,
1242 12638.678714636069,
1243 12652.817915461985,
1244 12666.961067441209,
1245 12681.108168367316,
1246 12695.259216036962,
1247 12709.414208249869,
1248 12723.573142808827,
1249 12737.736017519681,
1250 12751.902830191326,
1251 12766.073578635704,
1252 12780.248260667788,
1253 12794.426874105588,
1254 12808.609416770132,
1255 12822.795886485468,
1256 12836.986281078653,
1257 12851.180598379744,
1258 12865.378836221802,
1259 12879.580992440871,
1260 12893.787064875984,
1261 12907.997051369144,
1262 12922.210949765335,
1263 12936.428757912496,
1264 12950.650473661524,
1265 12964.876094866273,
1266 12979.105619383534,
1267 12993.339045073039,
1268 13007.576369797454,
1269 13021.817591422368,
1270 13036.062707816285,
1271 13050.311716850629,
1272 13064.564616399723,
1273 13078.821404340792,
1274 13093.082078553954,
1275 13107.346636922217,
1276 13121.615077331464,
1277 13135.887397670458,
1278 13150.163595830827,
1279 13164.44366970706,
1280 13178.727617196502,
1281 13193.015436199352,
1282 13207.307124618648,
1283 13221.602680360265,
1284 13235.902101332911,
1285 13250.205385448118,
1286 13264.512530620239,
1287 13278.823534766434,
1288 13293.138395806676,
1289 13307.457111663734,
1290 13321.779680263176,
1291 13336.106099533356,
1292 13350.436367405409,
1293 13364.77048181325,
1294 13379.108440693562,
1295 13393.450241985796,
1296 13407.795883632158,
1297 13422.145363577607,
1298 13436.498679769853,
1299 13450.855830159346,
1300 13465.216812699266,
1301 13479.581625345529,
1302 13493.950266056772,
1303 13508.32273279435,
1304 13522.699023522329,
1305 13537.079136207483,
1306 13551.463068819286,
1307 13565.850819329906,
1308 13580.2423857142,
1309 13594.63776594971,
1310 13609.036958016657,
1311 13623.439959897927,
1312 13637.846769579081,
1313 13652.257385048335,
1314 13666.67180429656,
1315 13681.090025317284,
1316 13695.512046106669,
1317 13709.937864663521,
1318 13724.367478989278,
1319 13738.800887088004,
1320 13753.238086966385,
1321 13767.679076633727,
1322 13782.123854101939,
1323 13796.572417385545,
1324 13811.024764501659,
1325 13825.480893469998,
1326 13839.94080231286,
1327 13854.404489055134,
1328 13868.871951724283,
1329 13883.34318835034,
1330 13897.818196965914,
1331 13912.296975606168,
1332 13926.779522308825,
1333 13941.26583511416,
1334 13955.755912064991,
1335 13970.249751206682,
1336 13984.747350587126,
1337 13999.248708256751,
1338 14013.753822268511,
1339 14028.262690677873,
1340 14042.775311542828,
1341 14057.291682923867,
1342 14071.811802883994,
1343 14086.335669488704,
1344 14100.863280805994,
1345 14115.394634906341,
1346 14129.92972986271,
1347 14144.468563750548,
1348 14159.01113464777,
1349 14173.55744063476,
1350 14188.107479794369,
1351 14202.661250211901,
1352 14217.218749975118,
1353 14231.779977174227,
1354 14246.344929901879,
1355 14260.913606253163,
1356 14275.486004325601,
1357 14290.062122219146,
1358 14304.641958036171,
1359 14319.225509881464,
1360 14333.812775862236,
1361 14348.403754088098,
1362 14362.998442671067,
1363 14377.59683972556,
1364 14392.198943368388,
1365 14406.804751718748,
1366 14421.414262898223,
1367 14436.027475030774,
1368 14450.64438624274,
1369 14465.264994662828,
1370 14479.889298422106,
1371 14494.517295654005,
1372 14509.148984494313,
1373 14523.784363081166,
1374 14538.423429555049,
1375 14553.066182058781,
1376 14567.712618737527,
1377 14582.362737738777,
1378 14597.016537212348,
1379 14611.674015310382,
1380 14626.33517018734,
1381 14640.999999999993,
1382 14655.668502907418,
1383 14670.340677071003,
1384 14685.016520654426,
1385 14699.696031823671,
1386 14714.379208746999,
1387 14729.066049594967,
1388 14743.756552540408,
1389 14758.45071575843,
1390 14773.148537426418,
1391 14787.850015724018,
1392 14802.555148833142,
1393 14817.263934937961,
1394 14831.976372224897,
1395 14846.692458882624,
1396 14861.41219310206,
1397 14876.135573076363,
1398 14890.862597000923,
1399 14905.593263073371,
1400 14920.327569493558,
1401 14935.065514463557,
1402 14949.807096187662,
1403 14964.552312872382,
1404 14979.301162726431,
1405 14994.053643960735,
1406 15008.809754788414,
1407 15023.569493424788,
1408 15038.332858087369,
1409 15053.099846995858,
1410 15067.870458372134,
1411 15082.644690440264,
1412 15097.422541426484,
1413 15112.204009559202,
1414 15126.989093068994,
1415 15141.777790188597,
1416 15156.570099152905,
1417 15171.366018198967,
1418 15186.165545565986,
1419 15200.968679495301,
1420 15215.775418230402,
1421 15230.585760016909,
1422 15245.399703102579,
1423 15260.217245737298,
1424 15275.038386173073,
1425 15289.863122664035,
1426 15304.691453466432,
1427 15319.523376838621,
1428 15334.358891041069,
1429 15349.197994336346,
1430 15364.040684989128,
1431 15378.886961266177,
1432 15393.736821436356,
1433 15408.590263770609,
1434 15423.447286541972,
1435 15438.307888025554,
1436 15453.172066498542,
1437 15468.039820240196,
1438 15482.91114753184,
1439 15497.786046656869,
1440 15512.664515900733,
1441 15527.546553550939,
1442 15542.432157897045,
1443 15557.32132723066,
1444 15572.214059845435,
1445 15587.110354037064,
1446 15602.010208103273,
1447 15616.913620343823,
1448 15631.820589060506,
1449 15646.731112557136,
1450 15661.645189139546,
1451 15676.562817115593,
1452 15691.483994795139,
1453 15706.408720490062,
1454 15721.336992514242,
1455 15736.268809183561,
1456 15751.204168815901,
1457 15766.143069731135,
1458 15781.085510251132,
1459 15796.03148869974,
1460 15810.981003402798,
1461 15825.934052688119,
1462 15840.890634885489,
1463 15855.850748326673,
1464 15870.814391345401,
1465 15885.781562277361,
1466 15900.752259460214,
1467 15915.726481233565,
1468 15930.704225938984,
1469 15945.685491919978,
1470 15960.670277522009,
1471 15975.658581092481,
1472 15990.65040098073,
1473 16005.645735538035,
1474 16020.644583117599,
1475 16035.646942074556,
1476 16050.652810765967,
1477 16065.662187550806,
1478 16080.675070789974,
1479 16095.691458846273,
1480 16110.711350084424,
1481 16125.734742871053,
1482 16140.761635574685,
1483 16155.792026565747,
1484 16170.825914216561,
1485 16185.863296901338,
1486 16200.904172996183,
1487 16215.948540879079,
1488 16230.996398929899,
1489 16246.047745530386,
1490 16261.102579064163,
1491 16276.160897916721,
1492 16291.22270047542,
1493 16306.287985129484,
1494 16321.356750269995,
1495 16336.428994289896,
1496 16351.504715583982,
1497 16366.5839125489,
1498 16381.666583583141,
1499 16396.752727087041,
1500 16411.842341462776,
1501 16426.935425114363,
1502 16442.031976447644,
1503 16457.131993870298,
1504 16472.235475791829,
1505 16487.342420623561,
1506 16502.452826778641,
1507 16517.566692672033,
1508 16532.684016720516,
1509 16547.804797342676,
1510 16562.929032958902,
1511 16578.056721991394,
1512 16593.18786286415,
1513 16608.322454002962,
1514 16623.460493835417,
1515 16638.601980790896,
1516 16653.746913300558,
1517 16668.895289797354,
1518 16684.047108716015,
1519 16699.202368493046,
1520 16714.361067566726,
1521 16729.523204377107,
1522 16744.688777366009,
1523 16759.857784977012,
1524 16775.030225655464,
1525 16790.206097848466,
1526 16805.385400004874,
1527 16820.568130575302,
1528 16835.754288012104,
1529 16850.943870769381,
1530 16866.136877302983,
1531 16881.333306070494,
1532 16896.53315553123,
1533 16911.736424146249,
1534 16926.943110378332,
1535 16942.153212691992,
1536 16957.366729553454,
1537 16972.583659430682,
1538 16987.804000793338,
1539 17003.027752112816,
1540 17018.254911862205,
1541 17033.485478516312,
1542 17048.719450551645,
1543 17063.956826446421,
1544 17079.197604680547,
1545 17094.44178373563,
1546 17109.689362094967,
1547 17124.940338243552,
1548 17140.194710668064,
1549 17155.452477856852,
1550 17170.713638299967,
1551 17185.978190489128,
1552 17201.246132917724,
1553 17216.517464080825,
1554 17231.792182475165,
1555 17247.070286599141,
1556 17262.351774952826,
1557 17277.636646037936,
1558 17292.924898357855,
1559 17308.216530417623,
1560 17323.511540723921,
1561 17338.809927785089,
1562 17354.111690111105,
1563 17369.416826213594,
1564 17384.725334605821,
1565 17400.037213802683,
1566 17415.352462320716,
1567 17430.67107867809,
1568 17445.993061394587,
1569 17461.318408991636,
1570 17476.647119992274,
1571 17491.979192921168,
1572 17507.314626304586,
1573 17522.653418670423,
1574 17537.995568548187,
1575 17553.341074468986,
1576 17568.689934965536,
1577 17584.042148572156,
1578 17599.397713824768,
1579 17614.75662926089,
1580 17630.118893419625,
1581 17645.484504841683,
1582 17660.853462069354,
1583 17676.225763646511,
1584 17691.601408118619,
1585 17706.980394032718,
1586 17722.362719937424,
1587 17737.748384382936,
1588 17753.137385921014,
1589 17768.529723104999,
1590 17783.92539448979,
1591 17799.324398631856,
1592 17814.726734089225,
1593 17830.13239942148,
1594 17845.541393189767,
1595 17860.95371395678,
1596 17876.369360286772,
1597 17891.788330745527,
1598 17907.210623900395,
1599 17922.636238320254,
1600 17938.065172575527,
1601 17953.497425238176,
1602 17968.932994881692,
1603 17984.371880081104,
1604 17999.814079412972,
1605 18015.259591455371,
1606 18030.708414787914,
1607 18046.160547991731,
1608 18061.615989649465,
1609 18077.074738345284,
1610 18092.536792664861,
1611 18108.002151195393,
1612 18123.470812525571,
1613 18138.942775245599,
1614 18154.418037947191,
1615 18169.896599223546,
1616 18185.37845766938,
1617 18200.863611880886,
1618 18216.352060455767,
1619 18231.843801993204,
1620 18247.338835093873,
1621 18262.837158359936,
1622 18278.338770395032,
1623 18293.84366980429,
1624 18309.351855194309,
1625 18324.863325173166,
1626 18340.378078350412,
1627 18355.896113337069,
1628 18371.417428745623,
1629 18386.942023190033,
1630 18402.469895285718,
1631 18418.00104364955,
1632 18433.53546689987,
1633 18449.073163656474,
1634 18464.614132540602,
1635 18480.158372174956,
1636 18495.705881183676,
1637 18511.256658192357,
1638 18526.810701828035,
1639 18542.368010719183,
1640 18557.928583495715,
1641 18573.492418788985,
1642 18589.059515231773,
1643 18604.629871458303,
1644 18620.203486104212,
1645 18635.78035780658,
1646 18651.360485203899,
1647 18666.943866936086,
1648 18682.53050164448,
1649 18698.120387971841,
1650 18713.713524562332,
1651 18729.30991006154,
1652 18744.909543116457,
1653 18760.512422375479,
1654 18776.118546488418,
1655 18791.727914106479,
1656 18807.340523882274,
1657 18822.95637446981,
1658 18838.575464524489,
1659 18854.197792703111,
1660 18869.823357663863,
1661 18885.452158066328,
1662 18901.08419257147,
1663 18916.719459841639,
1664 18932.357958540564,
1665 18947.999687333362,
1666 18963.644644886521,
1667 18979.292829867907,
1668 18994.944240946759,
1669 19010.598876793687,
1670 19026.256736080668,
1671 19041.917817481048,
1672 19057.582119669532,
1673 19073.2496413222,
1674 19088.920381116473,
1675 19104.594337731145,
1676 19120.271509846356,
1677 19135.951896143604,
1678 19151.635495305738,
1679 19167.322306016948,
1680 19183.012326962784,
1681 19198.705556830122,
1682 19214.401994307198,
1683 19230.101638083579,
1684 19245.804486850167,
1685 19261.510539299208,
1686 19277.219794124274,
1687 19292.932250020265,
1688 19308.647905683421,
1689 19324.366759811302,
1690 19340.088811102793,
1691 19355.8140582581,
1692 19371.542499978754,
1693 19387.2741349676,
1694 19403.008961928797,
1695 19418.746979567823,
1696 19434.488186591469,
1697 19450.232581707827,
1698 19465.980163626304,
1699 19481.730931057613,
1700 19497.484882713761,
1701 19513.242017308068,
1702 19529.002333555141,
1703 19544.765830170898,
1704 19560.532505872539,
1705 19576.302359378566,
1706 19592.075389408761,
1707 19607.851594684209,
1708 19623.630973927269,
1709 19639.41352586159,
1710 19655.199249212103,
1711 19670.988142705017,
1712 19686.780205067826,
1713 19702.575435029288,
1714 19718.373831319448,
1715 19734.175392669615,
1716 19749.980117812371,
1717 19765.788005481569,
1718 19781.599054412323,
1719 19797.413263341008,
1720 19813.230631005274,
1721 19829.051156144014,
1722 19844.874837497395,
1723 19860.701673806827,
1724 19876.531663814985,
1725 19892.364806265789,
1726 19908.201099904403,
1727 19924.040543477258,
1728 19939.883135732012,
1729 19955.728875417579,
1730 19971.577761284105,
1731 19987.429792082985,
1732 20003.284966566847,
1733 20019.14328348956,
1734 20035.004741606219,
1735 20050.869339673161,
1736 20066.737076447946,
1737 20082.607950689362,
1738 20098.481961157428,
1739 20114.359106613385,
1740 20130.239385819699,
1741 20146.122797540058,
1742 20162.009340539353,
1743 20177.899013583716,
1744 20193.791815440476,
1745 20209.687744878182,
1746 20225.586800666591,
1747 20241.488981576669,
1748 20257.394286380597,
1749 20273.302713851754,
1750 20289.214262764715,
1751 20305.128931895277,
1752 20321.046720020415,
1753 20336.967625918318,
1754 20352.891648368361,
1755 20368.818786151114,
1756 20384.749038048347,
1757 20400.682402843009,
1758 20416.618879319249,
1759 20432.558466262391,
1760 20448.501162458953,
1761 20464.446966696629,
1762 20480.395877764302,
1763 20496.347894452025,
1764 20512.303015551031,
1765 20528.261239853735,
1766 20544.22256615372,
1767 20560.186993245738,
1768 20576.15451992572,
1769 20592.125144990758,
1770 20608.098867239107,
1771 20624.075685470198,
1772 20640.055598484618,
1773 20656.038605084115,
1774 20672.024704071595,
1775 20688.013894251126,
1776 20704.006174427926,
1777 20720.001543408373,
1778 20735.999999999989,
1779 20752.001543011454,
1780 20768.006171252597,
1781 20784.013883534382,
1782 20800.024678668931,
1783 20816.038555469506,
1784 20832.055512750507,
1785 20848.075549327474,
1786 20864.098664017085,
1787 20880.124855637161,
1788 20896.154123006647,
1789 20912.186464945626,
1790 20928.221880275312,
1791 20944.260367818049,
1792 20960.301926397311,
1793 20976.346554837684,
1794 20992.394251964895,
1795 21008.445016605787,
1796 21024.498847588318,
1797 21040.555743741574,
1798 21056.615703895754,
1799 21072.678726882168,
1800 21088.744811533252,
1801 21104.813956682538,
1802 21120.886161164683,
1803 21136.961423815443,
1804 21153.039743471683,
1805 21169.121118971379,
1806 21185.205549153605,
1807 21201.293032858535,
1808 21217.383568927453,
1809 21233.477156202731,
1810 21249.573793527841,
1811 21265.673479747358,
1812 21281.776213706937,
1813 21297.881994253334,
1814 21313.990820234398,
1815 21330.102690499054,
1816 21346.21760389733,
1817 21362.335559280327,
1818 21378.456555500241,
1819 21394.580591410333,
1820 21410.707665864964,
1821 21426.83777771956,
1822 21442.970925830628,
1823 21459.107109055756,
1824 21475.246326253604,
1825 21491.388576283895,
1826 21507.533858007431,
1827 21523.682170286087,
1828 21539.833511982797,
1829 21555.987881961566,
1830 21572.145279087465,
1831 21588.305702226615,
1832 21604.469150246216,
1833 21620.635622014521,
1834 21636.805116400832,
1835 21652.977632275521,
1836 21669.153168510009,
1837 21685.331723976764,
1838 21701.513297549318,
1839 21717.697888102244,
1840 21733.885494511167,
1841 21750.076115652759,
1842 21766.269750404736,
1843 21782.466397645861,
1844 21798.666056255934,
1845 21814.868725115801,
1846 21831.074403107345,
1847 21847.283089113484,
1848 21863.494782018177,
1849 21879.709480706417,
1850 21895.927184064229,
1851 21912.147890978667,
1852 21928.371600337818,
1853 21944.598311030797,
1854 21960.828021947746,
1855 21977.060731979829,
1856 21993.296440019243,
1857 22009.535144959198,
1858 22025.77684569393,
1859 22042.021541118691,
1860 22058.269230129757,
1861 22074.519911624411,
1862 22090.773584500959,
1863 22107.030247658717,
1864 22123.289899998013,
1865 22139.552540420187,
1866 22155.818167827587,
1867 22172.086781123569,
1868 22188.358379212495,
1869 22204.632960999726,
1870 22220.910525391639,
1871 22237.191071295601,
1872 22253.474597619981,
1873 22269.761103274148,
1874 22286.050587168469,
1875 22302.343048214312,
1876 22318.638485324027,
1877 22334.936897410968,
1878 22351.23828338947,
1879 22367.542642174871,
1880 22383.849972683485,
1881 22400.160273832618,
1882 22416.473544540564,
1883 22432.789783726603,
1884 22449.108990310986,
1885 22465.431163214958,
1886 22481.75630136074,
1887 22498.084403671528,
1888 22514.415469071497,
1889 22530.749496485802,
1890 22547.086484840562,
1891 22563.426433062879,
1892 22579.769340080824,
1893 22596.115204823436,
1894 22612.464026220721,
1895 22628.815803203655,
1896 22645.170534704179,
1897 22661.5282196552,
1898 22677.888856990587,
1899 22694.252445645168,
1900 22710.618984554734,
1901 22726.988472656034,
1902 22743.360908886778,
1903 22759.736292185622,
1904 22776.114621492186,
1905 22792.495895747044,
1906 22808.880113891719,
1907 22825.267274868678,
1908 22841.657377621348,
1909 22858.050421094096,
1910 22874.446404232243,
1911 22890.845325982053,
1912 22907.247185290722,
1913 22923.651981106406,
1914 22940.059712378195,
1915 22956.470378056114,
1916 22972.883977091129,
1917 22989.300508435153,
1918 23005.719971041017,
1919 23022.142363862498,
1920 23038.567685854305,
1921 23054.995935972078,
1922 23071.427113172387,
1923 23087.86121641273,
1924 23104.298244651531,
1925 23120.738196848146,
1926 23137.181071962848,
1927 23153.626868956846,
1928 23170.075586792263,
1929 23186.527224432142,
1930 23202.981780840448,
1931 23219.439254982066,
1932 23235.899645822796,
1933 23252.362952329357,
1934 23268.829173469378,
1935 23285.298308211408,
1936 23301.770355524899,
1937 23318.245314380223,
1938 23334.723183748658,
1939 23351.203962602387,
1940 23367.687649914504,
1941 23384.174244659007,
1942 23400.663745810798,
1943 23417.15615234568,
1944 23433.651463240367,
1945 23450.149677472462,
1946 23466.650794020472,
1947 23483.154811863806,
1948 23499.661729982763,
1949 23516.171547358543,
1950 23532.684262973235,
1951 23549.199875809823,
1952 23565.718384852185,
1953 23582.239789085092,
1954 23598.764087494197,
1955 23615.291279066041,
1956 23631.821362788058,
1957 23648.354337648565,
1958 23664.890202636761,
1959 23681.428956742733,
1960 23697.970598957443,
1961 23714.515128272738,
1962 23731.062543681343,
1963 23747.612844176863,
1964 23764.166028753778,
1965 23780.72209640744,
1966 23797.281046134085,
1967 23813.842876930816,
1968 23830.407587795606,
1969 23846.975177727301,
1970 23863.545645725622,
1971 23880.11899079115,
1972 23896.695211925336,
1973 23913.274308130498,
1974 23929.856278409821,
1975 23946.441121767348,
1976 23963.028837207989,
1977 23979.619423737513,
1978 23996.212880362549,
1979 24012.809206090584,
1980 24029.408399929966,
1981 24046.010460889898,
1982 24062.615387980433,
1983 24079.223180212492,
1984 24095.833836597827,
1985 24112.447356149063,
1986 24129.063737879667,
1987 24145.682980803951,
1988 24162.305083937081,
1989 24178.930046295067,
1990 24195.557866894767,
1991 24212.188544753884,
1992 24228.822078890964,
1993 24245.458468325389,
1994 24262.097712077397,
1995 24278.739809168052,
1996 24295.384758619261,
1997 24312.032559453768,
1998 24328.683210695162,
1999 24345.336711367858,
2000 24361.993060497109,
2001 24378.652257108995,
2002 24395.314300230442,
2003 24411.979188889192,
2004 24428.646922113825,
2005 24445.317498933746,
2006 24461.990918379193,
2007 24478.667179481225,
2008 24495.346281271726,
2009 24512.028222783407,
2010 24528.713003049801,
2011 24545.400621105266,
2012 24562.091075984976,
2013 24578.784366724925,
2014 24595.480492361927,
2015 24612.179451933614,
2016 24628.881244478438,
2017 24645.585869035654,
2018 24662.293324645343,
2019 24679.003610348394,
2020 24695.716725186514,
2021 24712.432668202211,
2022 24729.151438438807,
2023 24745.873034940436,
2024 24762.597456752032,
2025 24779.324702919344,
2026 24796.054772488926,
2027 24812.787664508123,
2028 24829.5233780251,
2029 24846.261912088819,
2030 24863.003265749034,
2031 24879.747438056307,
2032 24896.494428062004,
2033 24913.244234818278,
2034 24929.996857378079,
2035 24946.752294795166,
2036 24963.510546124078,
2037 24980.271610420157,
2038 24997.035486739525,
2039 25013.802174139113,
2040 25030.571671676629,
2041 25047.343978410572,
2042 25064.119093400237,
2043 25080.897015705697,
2044 25097.677744387816,
2045 25114.461278508239,
2046 25131.2476171294,
2047 25148.036759314517,
2048 25164.828704127583,
2049 25181.623450633375,
2050 25198.42099789745,
2051 25215.221344986145,
2052 25232.024490966574,
2053 25248.830434906627,
2054 25265.639175874974,
2055 25282.450712941049,
2056 25299.265045175071,
2057 25316.082171648024,
2058 25332.902091431668,
2059 25349.724803598532,
2060 25366.550307221914,
2061 25383.378601375884,
2062 25400.209685135269,
2063 25417.043557575678,
2064 25433.880217773472,
2065 25450.719664805783,
2066 25467.561897750507,
2067 25484.406915686297,
2068 25501.254717692573,
2069 25518.105302849512,
2070 25534.958670238051,
2071 25551.814818939893,
2072 25568.67374803748,
2073 25585.535456614027,
2074 25602.399943753502,
2075 25619.267208540619,
2076 25636.137250060852,
2077 25653.010067400432,
2078 25669.885659646327,
2079 25686.76402588627,
2080 25703.645165208734,
2081 25720.529076702944,
2082 25737.415759458876,
2083 25754.305212567244,
2084 25771.197435119517,
2085 25788.092426207899,
2086 25804.990184925344,
2087 25821.890710365547,
2088 25838.794001622944,
2089 25855.700057792714,
2090 25872.608877970775,
2091 25889.520461253778,
2092 25906.434806739118,
2093 25923.351913524923,
2094 25940.271780710063,
2095 25957.194407394138,
2096 25974.11979267748,
2097 25991.047935661154,
2098 26007.978835446964,
2099 26024.912491137442,
2100 26041.848901835841,
2101 26058.788066646157,
2102 26075.729984673108,
2103 26092.674655022136,
2104 26109.622076799409,
2105 26126.572249111829,
2106 26143.525171067016,
2107 26160.480841773315,
2108 26177.43926033979,
2109 26194.400425876229,
2110 26211.364337493149,
2111 26228.330994301767,
2112 26245.30039541404,
2113 26262.272539942627,
2114 26279.247427000919,
2115 26296.225055703002,
2116 26313.205425163702,
2117 26330.188534498539,
2118 26347.174382823756,
2119 26364.162969256304,
2120 26381.154292913852,
2121 26398.148352914774,
2122 26415.145148378149,
2123 26432.144678423778,
2124 26449.146942172156,
2125 26466.151938744493,
2126 26483.159667262702,
2127 26500.170126849403,
2128 26517.183316627921,
2129 26534.199235722277,
2130 26551.217883257199,
2131 26568.239258358124,
2132 26585.263360151173,
2133 26602.290187763181,
2134 26619.319740321676,
2135 26636.352016954883,
2136 26653.387016791727,
2137 26670.424738961825,
2138 26687.465182595493,
2139 26704.508346823739,
2140 26721.554230778267,
2141 26738.602833591467,
2142 26755.65415439643,
2143 26772.708192326929,
2144 26789.764946517433,
2145 26806.824416103096,
2146 26823.886600219761,
2147 26840.95149800396,
2148 26858.019108592915,
2149 26875.089431124517,
2150 26892.162464737365,
2151 26909.238208570721,
2152 26926.316661764544,
2153 26943.397823459472,
2154 26960.481692796813,
2155 26977.568268918571,
2156 26994.657550967422,
2157 27011.749538086722,
2158 27028.844229420498,
2159 27045.941624113464,
2160 27063.041721311005,
2161 27080.144520159181,
2162 27097.250019804727,
2163 27114.35821939505,
2164 27131.469118078236,
2165 27148.582715003027,
2166 27165.699009318858,
2167 27182.818000175819,
2168 27199.939686724665,
2169 27217.064068116837,
2170 27234.191143504428,
2171 27251.320912040203,
2172 27268.453372877593,
2173 27285.588525170693,
2174 27302.726368074269,
2175 27319.866900743735,
2176 27337.010122335181,
2177 27354.156032005358,
2178 27371.304628911668,
2179 27388.455912212183,
2180 27405.609881065626,
2181 27422.766534631384,
2182 27439.925872069507,
2183 27457.087892540683,
2184 27474.252595206275,
2185 27491.419979228293,
2186 27508.5900437694,
2187 27525.762787992917,
2188 27542.93821106281,
2189 27560.116312143706,
2190 27577.297090400876,
2191 27594.480545000242,
2192 27611.666675108383,
2193 27628.855479892518,
2194 27646.046958520514,
2195 27663.241110160889,
2196 27680.437933982801,
2197 27697.637429156068,
2198 27714.839594851132,
2199 27732.04443023909,
2200 27749.251934491687,
2201 27766.462106781299,
2202 27783.674946280949,
2203 27800.890452164302,
2204 27818.108623605654,
2205 27835.329459779954,
2206 27852.55295986278,
2207 27869.779123030345,
2208 27887.007948459504,
2209 27904.239435327745,
2210 27921.473582813196,
2211 27938.710390094613,
2212 27955.949856351392,
2213 27973.19198076355,
2214 27990.436762511745,
2215 28007.684200777272,
2216 28024.934294742041,
2217 28042.187043588601,
2218 28059.442446500128,
2219 28076.700502660427,
2220 28093.961211253929,
2221 28111.224571465693,
2222 28128.490582481401,
2223 28145.759243487362,
2224 28163.030553670509,
2225 28180.304512218394,
2226 28197.581118319198,
2227 28214.860371161725,
2228 28232.14226993539,
2229 28249.42681383024,
2230 28266.71400203693,
2231 28284.003833746745,
2232 28301.296308151585,
2233 28318.591424443959,
2234 28335.889181817001,
2235 28353.189579464462,
2236 28370.492616580705,
2237 28387.798292360701,
2238 28405.106606000048,
2239 28422.417556694945,
2240 28439.731143642206,
2241 28457.047366039264,
2242 28474.366223084147,
2243 28491.687713975512,
2244 28509.011837912611,
2245 28526.338594095305,
2246 28543.667981724069,
2247 28560.999999999982,
2248 28578.334648124732,
2249 28595.671925300605,
2250 28613.011830730498,
2251 28630.354363617909,
2252 28647.699523166943,
2253 28665.0473085823,
2254 28682.397719069289,
2255 28699.750753833818,
2256 28717.10641208239,
2257 28734.464693022121,
2258 28751.825595860708,
2259 28769.189119806462,
2260 28786.55526406828,
2261 28803.924027855664,
2262 28821.295410378701,
2263 28838.669410848088,
2264 28856.046028475103,
2265 28873.425262471628,
2266 28890.80711205013,
2267 28908.191576423673,
2268 28925.578654805915,
2269 28942.968346411097,
2270 28960.360650454055,
2271 28977.755566150216,
2272 28995.153092715591,
2273 29012.553229366786,
2274 29029.955975320987,
2275 29047.361329795975,
2276 29064.769292010107,
2277 29082.179861182336,
2278 29099.593036532187,
2279 29117.00881727978,
2280 29134.427202645813,
2281 29151.848191851568,
2282 29169.271784118911,
2283 29186.697978670283,
2284 29204.126774728706,
2285 29221.55817151779,
2286 29238.992168261717,
2287 29256.42876418525,
2288 29273.867958513725,
2289 29291.309750473058,
2290 29308.754139289747,
2291 29326.201124190855,
2292 29343.65070440403,
2293 29361.102879157483,
2294 29378.557647680012,
2295 29396.015009200975,
2296 29413.474962950309,
2297 29430.937508158524,
2298 29448.402644056692,
2299 29465.870369876469,
2300 29483.340684850071,
2301 29500.81358821028,
2302 29518.289079190454,
2303 29535.767157024511,
2304 29553.247820946945,
2305 29570.731070192807,
2306 29588.216903997723,
2307 29605.70532159787,
2308 29623.19632223,
2309 29640.689905131429,
2310 29658.186069540028,
2311 29675.684814694236,
2312 29693.186139833047,
2313 29710.690044196028,
2314 29728.196527023298,
2315 29745.705587555527,
2316 29763.217225033964,
2317 29780.731438700397,
2318 29798.248227797183,
2319 29815.76759156723,
2320 29833.289529254005,
2321 29850.81404010153,
2322 29868.341123354381,
2323 29885.870778257693,
2324 29903.403004057145,
2325 29920.937799998974,
2326 29938.475165329975,
2327 29956.015099297485,
2328 29973.557601149394,
2329 29991.102670134147,
2330 30008.650305500738,
2331 30026.200506498706,
2332 30043.753272378144,
2333 30061.308602389683,
2334 30078.866495784507,
2335 30096.426951814352,
2336 30113.989969731494,
2337 30131.55554878875,
2338 30149.123688239491,
2339 30166.694387337629,
2340 30184.267645337608,
2341 30201.843461494434,
2342 30219.42183506364,
2343 30237.002765301309,
2344 30254.586251464058,
2345 30272.172292809046,
2346 30289.760888593977,
2347 30307.35203807709,
2348 30324.94574051716,
2349 30342.541995173502,
2350 30360.140801305966,
2351 30377.742158174944,
2352 30395.346065041358,
2353 30412.952521166666,
2354 30430.561525812864,
2355 30448.173078242475,
2356 30465.787177718561,
2357 30483.403823504719,
2358 30501.02301486507,
2359 30518.644751064272,
2360 30536.269031367516,
2361 30553.895855040515,
2362 30571.525221349519,
2363 30589.157129561307,
2364 30606.791578943175,
2365 30624.428568762964,
2366 30642.06809828903,
2367 30659.710166790261,
2368 30677.35477353607,
2369 30695.001917796391,
2370 30712.651598841687,
2371 30730.303815942945,
2372 30747.958568371676,
2373 30765.615855399912,
2374 30783.275676300211,
2375 30800.938030345646,
2376 30818.602916809814,
2377 30836.270334966837,
2378 30853.940284091354,
2379 30871.612763458521,
2380 30889.287772344011,
2381 30906.965310024025,
2382 30924.645375775272,
2383 30942.327968874983,
2384 30960.013088600903,
2385 30977.700734231294,
2386 30995.390905044929,
2387 31013.083600321101,
2388 31030.778819339619,
2389 31048.476561380798,
2390 31066.17682572547,
2391 31083.879611654978,
2392 31101.584918451179,
2393 31119.29274539644,
2394 31137.003091773637,
2395 31154.715956866155,
2396 31172.431339957893,
2397 31190.14924033326,
2398 31207.869657277162,
2399 31225.592590075023,
2400 31243.318038012771,
2401 31261.046000376838,
2402 31278.776476454172,
2403 31296.50946553221,
2404 31314.24496689891,
2405 31331.98297984272,
2406 31349.7235036526,
2407 31367.466537618013,
2408 31385.212081028923,
2409 31402.960133175795,
2410 31420.710693349596,
2411 31438.463760841791,
2412 31456.219334944351,
2413 31473.977414949743,
2414 31491.738000150934,
2415 31509.501089841389,
2416 31527.266683315069,
2417 31545.034779866437,
2418 31562.80537879045,
2419 31580.578479382562,
2420 31598.35408093872,
2421 31616.132182755369,
2422 31633.91278412945,
2423 31651.695884358396,
2424 31669.481482740131,
2425 31687.269578573076,
2426 31705.060171156143,
2427 31722.853259788735,
2428 31740.648843770748,
2429 31758.446922402567,
2430 31776.247494985066,
2431 31794.050560819614,
2432 31811.85611920806,
2433 31829.664169452753,
2434 31847.474710856521,
2435 31865.287742722685,
2436 31883.103264355046,
2437 31900.921275057899,
2438 31918.741774136019,
2439 31936.564760894671,
2440 31954.390234639599,
2441 31972.21819467704,
2442 31990.048640313704,
2443 32007.881570856793,
2444 32025.716985613984,
2445 32043.554883893445,
2446 32061.395265003815,
2447 32079.238128254223,
2448 32097.083472954269,
2449 32114.931298414049,
2450 32132.781603944117,
2451 32150.634388855524,
2452 32168.48965245979,
2453 32186.347394068915,
2454 32204.207612995371,
2455 32222.07030855212,
2456 32239.935480052583,
2457 32257.803126810672,
2458 32275.673248140767,
2459 32293.545843357719,
2460 32311.420911776862,
2461 32329.298452713996,
2462 32347.178465485395,
2463 32365.060949407813,
2464 32382.945903798463,
2465 32400.83332797504,
2466 32418.723221255706,
2467 32436.615582959093,
2468 32454.510412404306,
2469 32472.407708910916,
2470 32490.307471798966,
2471 32508.209700388961,
2472 32526.114394001877,
2473 32544.021551959166,
2474 32561.931173582732,
2475 32579.843258194956,
2476 32597.757805118679,
2477 32615.674813677211,
2478 32633.594283194328,
2479 32651.516212994258,
2480 32669.440602401712,
2481 32687.367450741847,
2482 32705.296757340297,
2483 32723.228521523146,
2484 32741.162742616943,
2485 32759.099419948703,
2486 32777.038552845901,
2487 32794.980140636464,
2488 32812.924182648792,
2489 32830.87067821173,
2490 32848.819626654593,
2491 32866.77102730715,
2492 32884.724879499619,
2493 32902.681182562686,
2494 32920.639935827494,
2495 32938.601138625643,
2496 32956.56479028918,
2497 32974.530890150607,
2498 32992.499437542894,
2499 33010.470431799447,
2500 33028.443872254145,
2501 33046.419758241311,
2502 33064.39808909571,
2503 33082.378864152583,
2504 33100.36208274759,
2505 33118.347744216881,
2506 33136.335847897026,
2507 33154.326393125062,
2508 33172.31937923847,
2509 33190.314805575174,
2510 33208.312671473555,
2511 33226.312976272442,
2512 33244.315719311111,
2513 33262.320899929284,
2514 33280.328517467125,
2515 33298.33857126526,
2516 33316.351060664747,
2517 33334.365985007091,
2518 33352.383343634239,
2519 33370.403135888591,
2520 33388.42536111299,
2521 33406.450018650721,
2522 33424.477107845501,
2523 33442.506628041512,
2524 33460.53857858335,
2525 33478.572958816083,
2526 33496.609768085189,
2527 33514.649005736617,
2528 33532.690671116739,
2529 33550.734763572356,
2530 33568.781282450735,
2531 33586.830227099563,
2532 33604.881596866973,
2533 33622.935391101528,
2534 33640.991609152239,
2535 33659.050250368542,
2536 33677.111314100322,
2537 33695.174799697881,
2538 33713.240706511984,
2539 33731.309033893805,
2540 33749.37978119497,
2541 33767.452947767531,
2542 33785.528532963974,
2543 33803.606536137209,
2544 33821.686956640602,
2545 33839.769793827938,
2546 33857.855047053425,
2547 33875.942715671707,
2548 33894.032799037872,
2549 33912.125296507431,
2550 33930.220207436316,
2551 33948.317531180888,
2552 33966.417267097961,
2553 33984.519414544746,
2554 34002.623972878901,
2555 34020.730941458511,
2556 34038.840319642077,
2557 34056.952106788536,
2558 34075.066302257255,
2559 34093.182905408015,
2560 34111.301915601027,
2561 34129.42333219693,
2562 34147.547154556785,
2563 34165.673382042078,
2564 34183.80201401472,
2565 34201.933049837033,
2566 34220.06648887178,
2567 34238.202330482141,
2568 34256.340574031703,
2569 34274.481218884495,
2570 34292.624264404949,
2571 34310.769709957938,
2572 34328.91755490873,
2573 34347.067798623029,
2574 34365.220440466954,
2575 34383.375479807051,
2576 34401.532916010263,
2577 34419.692748443973,
2578 34437.854976475966,
2579 34456.01959947445,
2580 34474.18661680806,
2581 34492.356027845817,
2582 34510.527831957188,
2583 34528.702028512052,
2584 34546.878616880676,
2585 34565.05759643377,
2586 34583.238966542449,
2587 34601.422726578232,
2588 34619.608875913065,
2589 34637.797413919296,
2590 34655.988339969692,
2591 34674.181653437423,
2592 34692.37735369608,
2593 34710.575440119668,
2594 34728.775912082579,
2595 34746.978768959649,
2596 34765.184010126082,
2597 34783.391634957537,
2598 34801.60164283005,
2599 34819.814033120063,
2600 34838.028805204456,
2601 34856.24595846048,
2602 34874.465492265823,
2603 34892.687405998557,
2604 34910.911699037177,
2605 34929.138370760564,
2606 34947.367420548027,
2607 34965.598847779271,
2608 34983.832651834389,
2609 35002.068832093908,
2610 35020.307387938738,
2611 35038.548318750189,
2612 35056.79162390998,
2613 35075.03730280025,
2614 35093.285354803513,
2615 35111.535779302685,
2616 35129.788575681116,
2617 35148.043743322516,
2618 35166.301281611013,
2619 35184.561189931141,
2620 35202.823467667826,
2621 35221.088114206388,
2622 35239.355128932555,
2623 35257.624511232447,
2624 35275.896260492584,
2625 35294.170376099886,
2626 35312.446857441668,
2627 35330.725703905628,
2628 35349.006914879887,
2629 35367.290489752944,
2630 35385.576427913686,
2631 35403.864728751418,
2632 35422.155391655811,
2633 35440.448416016967,
2634 35458.743801225341,
2635 35477.041546671804,
2636 35495.341651747622,
2637 35513.644115844436,
2638 35531.948938354304,
2639 35550.256118669655,
2640 35568.565656183309,
2641 35586.877550288496,
2642 35605.191800378816,
2643 35623.508405848268,
2644 35641.827366091238,
2645 35660.148680502505,
2646 35678.472348477233,
2647 35696.798369410979,
2648 35715.126742699678,
2649 35733.457467739659,
2650 35751.790543927644,
2651 35770.125970660738,
2652 35788.46374733642,
2653 35806.803873352568,
2654 35825.146348107453,
2655 35843.49117099971,
2656 35861.838341428367,
2657 35880.187858792851,
2658 35898.539722492955,
2659 35916.893931928862,
2660 35935.250486501129,
2661 35953.609385610718,
2662 35971.970628658957,
2663 35990.334215047558,
2664 36008.700144178612,
2665 36027.068415454596,
2666 36045.439028278372,
2667 36063.811982053165,
2668 36082.187276182609,
2669 36100.564910070694,
2670 36118.944883121789,
2671 36137.327194740654,
2672 36155.711844332429,
2673 36174.098831302617,
2674 36192.488155057115,
2675 36210.87981500219,
2676 36229.273810544473,
2677 36247.670141091003,
2678 36266.068806049167,
2679 36284.469804826738,
2680 36302.873136831862,
2681 36321.278801473069,
2682 36339.686798159251,
2683 36358.097126299683,
2684 36376.509785304013,
2685 36394.924774582258,
2686 36413.342093544816,
2687 36431.761741602444,
2688 36450.183718166292,
2689 36468.608022647859,
2690 36487.034654459028,
2691 36505.463613012063,
2692 36523.894897719583,
2693 36542.328507994578,
2694 36560.764443250409,
2695 36579.202702900831,
2696 36597.643286359926,
2697 36616.086193042182,
2698 36634.531422362437,
2699 36652.978973735895,
2700 36671.428846578143,
2701 36689.881040305125,
2702 36708.335554333149,
2703 36726.792388078902,
2704 36745.251540959427,
2705 36763.713012392138,
2706 36782.176801794812,
2707 36800.642908585593,
2708 36819.111332182983,
2709 36837.582072005869,
2710 36856.055127473483,
2711 36874.530498005421,
2712 36893.008183021651,
2713 36911.488181942506,
2714 36929.970494188674,
2715 36948.455119181206,
2716 36966.942056341519,
2717 36985.431305091392,
2718 37003.922864852961,
2719 37022.416735048733,
2720 37040.912915101559,
2721 37059.411404434657,
2722 37077.91220247162,
2723 37096.415308636388,
2724 37114.920722353243,
2725 37133.428443046862,
2726 37151.938470142253,
2727 37170.450803064785,
2728 37188.965441240209,
2729 37207.482384094597,
2730 37226.001631054402,
2731 37244.523181546429,
2732 37263.047034997842,
2733 37281.573190836149,
2734 37300.101648489224,
2735 37318.632407385296,
2736 37337.165466952945,
2737 37355.700826621112,
2738 37374.238485819085,
2739 37392.778443976509,
2740 37411.320700523385,
2741 37429.865254890057,
2742 37448.412106507232,
2743 37466.961254805974,
2744 37485.512699217681,
2745 37504.066439174116,
2746 37522.622474107404,
2747 37541.180803449992,
2748 37559.741426634704,
2749 37578.304343094693,
2750 37596.869552263488,
2751 37615.43705357494,
2752 37634.006846463279,
2753 37652.578930363044,
2754 37671.153304709165,
2755 37689.729968936896,
2756 37708.308922481847,
2757 37726.890164779965,
2758 37745.473695267559,
2759 37764.059513381275,
2760 37782.647618558112,
2761 37801.238010235415,
2762 37819.830687850859,
2763 37838.425650842495,
2764 37857.022898648691,
2765 37875.622430708172,
2766 37894.224246460013,
2767 37912.828345343616,
2768 37931.434726798747,
2769 37950.043390265506,
2770 37968.654335184328,
2771 37987.267560995999,
2772 38005.883067141665,
2773 38024.500853062775,
2774 38043.120918201159,
2775 38061.743261998963,
2776 38080.367883898682,
2777 38098.994783343158,
2778 38117.623959775563,
2779 38136.255412639417,
2780 38154.889141378575,
2781 38173.525145437234,
2782 38192.163424259939,
2783 38210.803977291551,
2784 38229.446803977284,
2785 38248.091903762703,
2786 38266.739276093685,
2787 38285.388920416466,
2788 38304.040836177606,
2789 38322.695022824002,
2790 38341.351479802899,
2791 38360.010206561863,
2792 38378.671202548816,
2793 38397.334467211993,
2794 38415.999999999978,
2795 38434.667800361683,
2796 38453.33786774637,
2797 38472.010201603611,
2798 38490.684801383337,
2799 38509.361666535784,
2800 38528.040796511552,
2801 38546.722190761553,
2802 38565.405848737035,
2803 38584.091769889594,
2804 38602.779953671132,
2805 38621.470399533908,
2806 38640.163106930493,
2807 38658.858075313794,
2808 38677.555304137059,
2809 38696.254792853862,
2810 38714.956540918094,
2811 38733.660547783991,
2812 38752.366812906112,
2813 38771.075335739348,
2814 38789.78611573892,
2815 38808.499152360368,
2816 38827.214445059573,
2817 38845.931993292739,
2818 38864.651796516388,
2819 38883.373854187383,
2820 38902.098165762916,
2821 38920.824730700486,
2822 38939.553548457938,
2823 38958.284618493431,
2824 38977.017940265461,
2825 38995.753513232834,
2826 39014.491336854699,
2827 39033.231410590517,
2828 39051.973733900079,
2829 39070.718306243485,
2830 39089.465127081188,
2831 39108.214195873945,
2832 39126.965512082832,
2833 39145.719075169261,
2834 39164.474884594965,
2835 39183.232939821988,
2836 39201.99324031271,
2837 39220.755785529815,
2838 39239.52057493633,
2839 39258.287607995589,
2840 39277.056884171245,
2841 39295.828402927284,
2842 39314.602163728006,
2843 39333.378166038019,
2844 39352.15640932227,
2845 39370.936893046004,
2846 39389.719616674811,
2847 39408.504579674584,
2848 39427.291781511522,
2849 39446.081221652174,
2850 39464.872899563372,
2851 39483.666814712291,
2852 39502.462966566411,
2853 39521.261354593538,
2854 39540.06197826178,
2855 39558.864837039568,
2856 39577.669930395656,
2857 39596.47725779911,
2858 39615.286818719302,
2859 39634.098612625923,
2860 39652.912638988993,
2861 39671.728897278823,
2862 39690.547386966064,
2863 39709.368107521652,
2864 39728.191058416858,
2865 39747.016239123259,
2866 39765.84364911275,
2867 39784.673287857528,
2868 39803.505154830105,
2869 39822.339249503319,
2870 39841.175571350293,
2871 39860.014119844491,
2872 39878.854894459677,
2873 39897.697894669909,
2874 39916.54311994958,
2875 39935.390569773372,
2876 39954.240243616303,
2877 39973.092140953675,
2878 39991.946261261117,
2879 40010.802604014549,
2880 40029.661168690225,
2881 40048.521954764678,
2882 40067.384961714779,
2883 40086.250189017679,
2884 40105.117636150855,
2885 40123.98730259209,
2886 40142.859187819471,
2887 40161.733291311379,
2888 40180.609612546526,
2889 40199.488151003912,
2890 40218.368906162854,
2891 40237.25187750296,
2892 40256.137064504153,
2893 40275.024466646668,
2894 40293.914083411029,
2895 40312.805914278084,
2896 40331.699958728961,
2897 40350.596216245103,
2898 40369.494686308273,
2899 40388.39536840051,
2900 40407.298262004173,
2901 40426.20336660192,
2902 40445.110681676706,
2903 40464.020206711793,
2904 40482.931941190756,
2905 40501.845884597446,
2906 40520.762036416032,
2907 40539.680396130985,
2908 40558.600963227072,
2909 40577.523737189367,
2910 40596.448717503234,
2911 40615.375903654342,
2912 40634.305295128659,
2913 40653.236891412453,
2914 40672.170691992294,
2915 40691.106696355047,
2916 40710.044903987873,
2917 40728.985314378238,
2918 40747.927927013901,
2919 40766.872741382918,
2920 40785.819756973651,
2921 40804.768973274746,
2922 40823.720389775161,
2923 40842.674005964131,
2924 40861.629821331211,
2925 40880.587835366234,
2926 40899.548047559321,
2927 40918.510457400931,
2928 40937.475064381761,
2929 40956.441867992849,
2930 40975.410867725499,
2931 40994.382063071331,
2932 41013.355453522236,
2933 41032.331038570417,
2934 41051.308817708363,
2935 41070.288790428858,
2936 41089.270956224987,
2937 41108.255314590111,
2938 41127.241865017888,
2939 41146.23060700229,
2940 41165.221540037543,
2941 41184.214663618193,
2942 41203.209977239079,
2943 41222.207480395307,
2944 41241.207172582297,
2945 41260.209053295752,
2946 41279.213122031659,
2947 41298.219378286303,
2948 41317.227821556255,
2949 41336.23845133838,
2950 41355.251267129832,
2951 41374.266268428037,
2952 41393.283454730743,
2953 41412.302825535953,
2954 41431.324380341983,
2955 41450.348118647416,
2956 41469.374039951144,
2957 41488.402143752326,
2958 41507.432429550427,
2959 41526.464896845187,
2960 41545.499545136627,
2961 41564.536373925075,
2962 41583.575382711126,
2963 41602.616570995662,
2964 41621.659938279874,
2965 41640.705484065205,
2966 41659.753207853406,
2967 41678.803109146495,
2968 41697.855187446803,
2969 41716.909442256911,
2970 41735.965873079709,
2971 41755.02447941836,
2972 41774.085260776315,
2973 41793.148216657297,
2974 41812.213346565331,
2975 41831.280650004708,
2976 41850.350126480014,
2977 41869.421775496106,
2978 41888.495596558132,
2979 41907.571589171515,
2980 41926.649752841957,
2981 41945.730087075463,
2982 41964.812591378286,
2983 41983.897265256979,
2984 42002.984108218378,
2985 42022.073119769593,
2986 42041.164299418015,
2987 42060.257646671307,
2988 42079.353161037419,
2989 42098.450842024591,
2990 42117.550689141324,
2991 42136.652701896404,
2992 42155.756879798893,
2993 42174.863222358137,
2994 42193.971729083758,
2995 42213.082399485655,
2996 42232.195233074002,
2997 42251.310229359246,
2998 42270.427387852127,
2999 42289.546708063644,
3000 42308.668189505079,
3001 42327.791831687995,
3002 42346.917634124227,
3003 42366.045596325886,
3004 42385.175717805352,
3005 42404.307998075295,
3006 42423.442436648642,
3007 42442.579033038608,
3008 42461.717786758672,
3009 42480.858697322597,
3010 42500.001764244422,
3011 42519.146987038446,
3012 42538.294365219248,
3013 42557.443898301688,
3014 42576.595585800882,
3015 42595.749427232236,
3016 42614.90542211142,
3017 42634.063569954378,
3018 42653.223870277317,
3019 42672.386322596729,
3020 42691.55092642938,
3021 42710.717681292292,
3022 42729.886586702756,
3023 42749.057642178363,
3024 42768.23084723694,
3025 42787.406201396603,
3026 42806.58370417574,
3027 42825.76335509299,
3028 42844.945153667286,
3029 42864.129099417805,
3030 42883.315191864014,
3031 42902.503430525649,
3032 42921.693814922692,
3033 42940.88634457541,
3034 42960.081019004348,
3035 42979.277837730297,
3036 42998.476800274322,
3037 43017.677906157769,
3038 43036.881154902228,
3039 43056.086546029583,
3040 43075.294079061961,
3041 43094.503753521763,
3042 43113.715568931671,
3043 43132.929524814601,
3044 43152.145620693766,
3045 43171.363856092619,
3046 43190.584230534907,
3047 43209.806743544621,
3048 43229.031394646016,
3049 43248.258183363621,
3050 43267.487109222224,
3051 43286.718171746885,
3052 43305.951370462906,
3053 43325.186704895881,
3054 43344.42417457165,
3055 43363.663779016322,
3056 43382.905517756262,
3057 43402.149390318104,
3058 43421.395396228749,
3059 43440.643535015348,
3060 43459.89380620532,
3061 43479.146209326354,
3062 43498.400743906379,
3063 43517.657409473606,
3064 43536.916205556496,
3065 43556.177131683784,
3066 43575.44018738444,
3067 43594.705372187724,
3068 43613.972685623135,
3069 43633.242127220445,
3070 43652.513696509668,
3071 43671.787393021099,
3072 43691.063216285271,
3073 43710.341165833001,
3074 43729.621241195346,
3075 43748.903441903625,
3076 43768.187767489413,
3077 43787.474217484552,
3078 43806.762791421126,
3079 43826.053488831501,
3080 43845.346309248278,
3081 43864.641252204325,
3082 43883.938317232765,
3083 43903.237503866971,
3084 43922.538811640596,
3085 43941.842240087513,
3086 43961.147788741881,
3087 43980.455457138101,
3088 43999.765244810835,
3089 44019.077151295001,
3090 44038.391176125755,
3091 44057.70731883854,
3092 44077.02557896902,
3093 44096.345956053141,
3094 44115.668449627083,
3095 44134.993059227287,
3096 44154.319784390456,
3097 44173.648624653535,
3098 44192.979579553728,
3099 44212.312648628489,
3100 44231.647831415532,
3101 44250.985127452805,
3102 44270.324536278538,
3103 44289.666057431183,
3104 44309.009690449464,
3105 44328.355434872348,
3106 44347.703290239064,
3107 44367.053256089079,
3108 44386.405331962109,
3109 44405.759517398139,
3110 44425.115811937387,
3111 44444.474215120332,
3112 44463.834726487694,
3113 44483.197345580462,
3114 44502.562071939843,
3115 44521.928905107328,
3116 44541.297844624634,
3117 44560.668890033732,
3118 44580.042040876848,
3119 44599.417296696454,
3120 44618.794657035272,
3121 44638.174121436256,
3122 44657.555689442641,
3123 44676.939360597877,
3124 44696.325134445673,
3125 44715.713010530002,
3126 44735.102988395054,
3127 44754.495067585296,
3128 44773.88924764542,
3129 44793.285528120374,
3130 44812.683908555344,
3131 44832.084388495779,
3132 44851.486967487363,
3133 44870.891645076015,
3134 44890.298420807922,
3135 44909.707294229491,
3136 44929.118264887409,
3137 44948.531332328566,
3138 44967.946496100136,
3139 44987.363755749502,
3140 45006.783110824319,
3141 45026.204560872473,
3142 45045.628105442098,
3143 45065.053744081561,
3144 45084.48147633949,
3145 45103.911301764747,
3146 45123.343219906426,
3147 45142.777230313885,
3148 45162.21333253671,
3149 45181.651526124733,
3150 45201.091810628037,
3151 45220.534185596924,
3152 45239.978650581965,
3153 45259.425205133957,
3154 45278.873848803938,
3155 45298.324581143192,
3156 45317.777401703235,
3157 45337.232310035848,
3158 45356.68930569302,
3159 45376.148388226997,
3160 45395.60955719027,
3161 45415.072812135557,
3162 45434.538152615823,
3163 45454.005578184282,
3164 45473.475088394356,
3165 45492.946682799746,
3166 45512.420360954362,
3167 45531.896122412363,
3168 45551.373966728155,
3169 45570.853893456362,
3170 45590.33590215187,
3171 45609.819992369776,
3172 45629.306163665438,
3173 45648.794415594442,
3174 45668.284747712612,
3175 45687.777159576006,
3176 45707.27165074092,
3177 45726.768220763894,
3178 45746.266869201696,
3179 45765.767595611323,
3180 45785.270399550034,
3181 45804.775280575297,
3182 45824.282238244828,
3183 45843.79127211657,
3184 45863.302381748719,
3185 45882.815566699683,
3186 45902.33082652813,
3187 45921.848160792935,
3188 45941.367569053225,
3189 45960.889050868354,
3190 45980.41260579793,
3191 45999.938233401757,
3192 46019.465933239902,
3193 46038.995704872657,
3194 46058.527547860547,
3195 46078.06146176433,
3196 46097.597446144995,
3197 46117.135500563774,
3198 46136.675624582109,
3199 46156.217817761702,
3200 46175.762079664462,
3201 46195.308409852543,
3202 46214.856807888333,
3203 46234.407273334444,
3204 46253.959805753715,
3205 46273.51440470924,
3206 46293.071069764315,
3207 46312.629800482478,
3208 46332.190596427499,
3209 46351.753457163381,
3210 46371.318382254351,
3211 46390.885371264863,
3212 46410.45442375962,
3213 46430.025539303526,
3214 46449.598717461733,
3215 46469.17395779962,
3216 46488.751259882782,
3217 46508.33062327707,
3218 46527.912047548532,
3219 46547.495532263471,
3220 46567.081076988397,
3221 46586.668681290059,
3222 46606.258344735434,
3223 46625.850066891719,
3224 46645.443847326351,
3225 46665.039685606986,
3226 46684.637581301497,
3227 46704.237533978005,
3228 46723.839543204842,
3229 46743.443608550573,
3230 46763.049729583989,
3231 46782.657905874104,
3232 46802.268136990162,
3233 46821.880422501628,
3234 46841.494761978196,
3235 46861.111154989776,
3236 46880.729601106526,
3237 46900.350099898795,
3238 46919.97265093719,
3239 46939.597253792526,
3240 46959.223908035841,
3241 46978.852613238392,
3242 46998.483368971691,
3243 47018.11617480743,
3244 47037.751030317551,
3245 47057.387935074221,
3246 47077.026888649809,
3247 47096.66789061694,
3248 47116.310940548428,
3249 47135.956038017328,
3250 47155.603182596918,
3251 47175.252373860698,
3252 47194.903611382375,
3253 47214.556894735892,
3254 47234.212223495422,
3255 47253.869597235338,
3256 47273.52901553025,
3257 47293.19047795498,
3258 47312.853984084577,
3259 47332.519533494306,
3260 47352.187125759658,
3261 47371.856760456343,
3262 47391.528437160297,
3263 47411.202155447652,
3264 47430.877914894787,
3265 47450.555715078299,
3266 47470.235555574982,
3267 47489.917435961863,
3268 47509.601355816201,
3269 47529.287314715453,
3270 47548.975312237308,
3271 47568.665347959672,
3272 47588.357421460656,
3273 47608.051532318605,
3274 47627.747680112072,
3275 47647.445864419846,
3276 47667.14608482091,
3277 47686.848340894474,
3278 47706.552632219973,
3279 47726.258958377046,
3280 47745.967318945557,
3281 47765.677713505589,
3282 47785.390141637428,
3283 47805.104602921601,
3284 47824.821096938824,
3285 47844.539623270044,
3286 47864.260181496429,
3287 47883.982771199349,
3288 47903.707391960394,
3289 47923.434043361369,
3290 47943.162724984308,
3291 47962.893436411439,
3292 47982.626177225218,
3293 48002.36094700831,
3294 48022.097745343599,
3295 48041.836571814172,
3296 48061.57742600335,
3297 48081.32030749465,
3298 48101.065215871815,
3299 48120.81215071879,
3300 48140.56111161974,
3301 48160.312098159047,
3302 48180.065109921306,
3303 48199.820146491307,
3304 48219.577207454073,
3305 48239.336292394844,
3306 48259.097400899045,
3307 48278.860532552339,
3308 48298.625686940592,
3309 48318.392863649875,
3310 48338.162062266485,
3311 48357.933282376915,
3312 48377.706523567889,
3313 48397.481785426316,
3314 48417.259067539344,
3315 48437.038369494308,
3316 48456.819690878765,
3317 48476.603031280487,
3318 48496.388390287451,
3319 48516.175767487839,
3320 48535.965162470042,
3321 48555.756574822684,
3322 48575.550004134566,
3323 48595.345449994718,
3324 48615.142911992378,
3325 48634.942389716991,
3326 48654.743882758201,
3327 48674.547390705877,
3328 48694.352913150084,
3329 48714.160449681112,
3330 48733.969999889443,
3331 48753.781563365759,
3332 48773.595139700978,
3333 48793.410728486211,
3334 48813.228329312769,
3335 48833.047941772187,
3336 48852.869565456189,
3337 48872.693199956717,
3338 48892.518844865925,
3339 48912.346499776155,
3340 48932.176164279976,
3341 48952.007837970152,
3342 48971.841520439666,
3343 48991.677211281676,
3344 49011.514910089587,
3345 49031.354616456978,
3346 49051.196329977654,
3347 49071.04005024561,
3348 49090.885776855059,
3349 49110.733509400408,
3350 49130.583247476279,
3351 49150.434990677488,
3352 49170.288738599062,
3353 49190.144490836232,
3354 49210.002246984441,
3355 49229.86200663932,
3356 49249.723769396718,
3357 49269.587534852675,
3358 49289.453302603448,
3359 49309.32107224549,
3360 49329.190843375451,
3361 49349.062615590192,
3362 49368.936388486785,
3363 49388.812161662492,
3364 49408.689934714785,
3365 49428.569707241324,
3366 49448.45147883999,
3367 49468.335249108866,
3368 49488.22101764621,
3369 49508.108784050521,
3370 49527.99854792047,
3371 49547.890308854934,
3372 49567.784066453009,
3373 49587.679820313977,
3374 49607.57757003732,
3375 49627.477315222721,
3376 49647.379055470075,
3377 49667.28279037946,
3378 49687.188519551179,
3379 49707.096242585707,
3380 49727.005959083741,
3381 49746.917668646165,
3382 49766.831370874068,
3383 49786.747065368734,
3384 49806.66475173166,
3385 49826.584429564515,
3386 49846.506098469203,
3387 49866.429758047794,
3388 49886.355407902578,
3389 49906.283047636032,
3390 49926.212676850846,
3391 49946.144295149883,
3392 49966.077902136225,
3393 49986.013497413151,
3394 50005.951080584135,
3395 50025.890651252834,
3396 50045.832209023123,
3397 50065.775753499074,
3398 50085.721284284933,
3399 50105.668800985164,
3400 50125.618303204428,
3401 50145.569790547575,
3402 50165.523262619652,
3403 50185.478719025901,
3404 50205.436159371769,
3405 50225.395583262893,
3406 50245.356990305103,
3407 50265.320380104429,
3408 50285.285752267104,
3409 50305.253106399534,
3410 50325.222442108337,
3411 50345.193759000336,
3412 50365.16705668252,
3413 50385.142334762102,
3414 50405.119592846473,
3415 50425.098830543218,
3416 50445.080047460127,
3417 50465.063243205179,
3418 50485.048417386541,
3419 50505.035569612577,
3420 50525.024699491856,
3421 50545.015806633128,
3422 50565.008890645338,
3423 50585.003951137631,
3424 50605.00098771933,
3425 50624.999999999971,
3426 50645.000987589265,
3427 50665.003950097132,
3428 50685.008887133677,
3429 50705.015798309192,
3430 50725.024683234165,
3431 50745.035541519283,
3432 50765.048372775411,
3433 50785.063176613621,
3434 50805.079952645159,
3435 50825.098700481489,
3436 50845.119419734241,
3437 50865.142110015244,
3438 50885.166770936521,
3439 50905.193402110279,
3440 50925.222003148934,
3441 50945.252573665071,
3442 50965.285113271471,
3443 50985.319621581119,
3444 51005.356098207172,
3445 51025.394542762981,
3446 51045.434954862096,
3447 51065.477334118244,
3448 51085.521680145357,
3449 51105.567992557546,
3450 51125.616270969113,
3451 51145.66651499454,
3452 51165.718724248516,
3453 51185.772898345916,
3454 51205.829036901778,
3455 51225.887139531362,
3456 51245.947205850105,
3457 51266.009235473619,
3458 51286.073228017718,
3459 51306.139183098399,
3460 51326.207100331856,
3461 51346.276979334456,
3462 51366.348819722756,
3463 51386.42262111351,
3464 51406.498383123653,
3465 51426.57610537031,
3466 51446.655787470787,
3467 51466.737429042587,
3468 51486.82102970338,
3469 51506.906589071048,
3470 51526.994106763632,
3471 51547.083582399391,
3472 51567.175015596738,
3473 51587.268405974297,
3474 51607.363753150858,
3475 51627.461056745415,
3476 51647.56031637713,
3477 51667.661531665362,
3478 51687.764702229651,
3479 51707.869827689727,
3480 51727.976907665499,
3481 51748.085941777055,
3482 51768.196929644677,
3483 51788.309870888836,
3484 51808.42476513017,
3485 51828.541611989524,
3486 51848.660411087905,
3487 51868.781162046515,
3488 51888.90386448674,
3489 51909.028518030143,
3490 51929.155122298485,
3491 51949.283676913685,
3492 51969.414181497872,
3493 51989.546635673345,
3494 52009.681039062583,
3495 52029.817391288263,
3496 52049.955691973213,
3497 52070.095940740481,
3498 52090.238137213273,
3499 52110.382281014987,
3500 52130.5283717692,
3501 52150.676409099666,
3502 52170.826392630333,
3503 52190.97832198532,
3504 52211.132196788931,
3505 52231.288016665654,
3506 52251.445781240145,
3507 52271.60549013727,
3508 52291.76714298204,
3509 52311.930739399664,
3510 52332.096279015546,
3511 52352.263761455244,
3512 52372.433186344519,
3513 52392.604553309284,
3514 52412.777861975665,
3515 52432.953111969946,
3516 52453.130302918595,
3517 52473.309434448267,
3518 52493.490506185793,
3519 52513.67351775818,
3520 52533.858468792605,
3521 52554.045358916446,
3522 52574.234187757254,
3523 52594.42495494274,
3524 52614.617660100812,
3525 52634.812302859558,
3526 52655.008882847229,
3527 52675.20739969227,
3528 52695.407853023295,
3529 52715.610242469098,
3530 52735.814567658657,
3531 52756.02082822111,
3532 52776.229023785803,
3533 52796.439153982225,
3534 52816.651218440056,
3535 52836.865216789171,
3536 52857.081148659599,
3537 52877.29901368155,
3538 52897.518811485425,
3539 52917.740541701773,
3540 52937.964203961354,
3541 52958.18979789508,
3542 52978.417323134046,
3543 52998.646779309529,
3544 53018.878166052978,
3545 53039.111482996006,
3546 53059.346729770419,
3547 53079.583906008193,
3548 53099.823011341483,
3549 53120.0640454026,
3550 53140.307007824063,
3551 53160.551898238533,
3552 53180.79871627887,
3553 53201.047461578091,
3554 53221.2981337694,
3555 53241.550732486176,
3556 53261.805257361964,
3557 53282.061708030487,
3558 53302.32008412564,
3559 53322.580385281493,
3560 53342.842611132299,
3561 53363.106761312469,
3562 53383.372835456597,
3563 53403.640833199453,
3564 53423.910754175973,
3565 53444.18259802126,
3566 53464.456364370613,
3567 53484.732052859479,
3568 53505.009663123499,
3569 53525.289194798468,
3570 53545.570647520362,
3571 53565.854020925333,
3572 53586.139314649699,
3573 53606.426528329954,
3574 53626.715661602764,
3575 53647.006714104959,
3576 53667.299685473547,
3577 53687.59457534572,
3578 53707.891383358816,
3579 53728.190109150361,
3580 53748.490752358055,
3581 53768.793312619753,
3582 53789.09778957349,
3583 53809.404182857485,
3584 53829.712492110106,
3585 53850.022716969899,
3586 53870.334857075584,
3587 53890.648912066055,
3588 53910.964881580367,
3589 53931.28276525774,
3590 53951.602562737586,
3591 53971.924273659461,
3592 53992.24789766311,
3593 54012.57343438844,
3594 54032.90088347553,
3595 54053.23024456462,
3596 54073.561517296133,
3597 54093.894701310644,
3598 54114.22979624891,
3599 54134.566801751855,
3600 54154.90571746057,
3601 54175.246543016314,
3602 54195.589278060506,
3603 54215.933922234755,
3604 54236.280475180814,
3605 54256.628936540626,
3606 54276.97930595628,
3607 54297.331583070045,
3608 54317.685767524359,
3609 54338.041858961828,
3610 54358.399857025215,
3611 54378.759761357462,
3612 54399.121571601667,
3613 54419.485287401105,
3614 54439.850908399218,
3615 54460.218434239614,
3616 54480.587864566056,
3617 54500.95919902248,
3618 54521.332437252997,
3619 54541.707578901878,
3620 54562.084623613555,
3621 54582.46357103264,
3622 54602.844420803893,
3623 54623.227172572246,
3624 54643.611825982807,
3625 54663.998380680838,
3626 54684.386836311773,
3627 54704.777192521207,
3628 54725.169448954897,
3629 54745.563605258772,
3630 54765.959661078923,
3631 54786.357616061614,
3632 54806.757469853255,
3633 54827.159222100439,
3634 54847.562872449904,
3635 54867.968420548583,
3636 54888.375866043534,
3637 54908.785208582012,
3638 54929.196447811417,
3639 54949.609583379322,
3640 54970.024614933463,
3641 54990.441542121727,
3642 55010.86036459219,
3643 55031.28108199306,
3644 55051.703693972733,
3645 55072.128200179759,
3646 55092.554600262847,
3647 55112.982893870874,
3648 55133.413080652877,
3649 55153.845160258061,
3650 55174.279132335789,
3651 55194.714996535586,
3652 55215.152752507143,
3653 55235.592399900306,
3654 55256.033938365079,
3655 55276.477367551655,
3656 55296.92268711036,
3657 55317.369896691685,
3658 55337.818995946305,
3659 55358.269984525024,
3660 55378.72286207883,
3661 55399.177628258869,
3662 55419.634282716441,
3663 55440.092825103013,
3664 55460.553255070205,
3665 55481.015572269804,
3666 55501.479776353764,
3667 55521.945866974187,
3668 55542.413843783339,
3669 55562.883706433655,
3670 55583.355454577715,
3671 55603.82908786826,
3672 55624.304605958219,
3673 55644.782008500639,
3674 55665.261295148754,
3675 55685.742465555952,
3676 55706.225519375774,
3677 55726.710456261928,
3678 55747.197275868275,
3679 55767.685977848843,
3680 55788.176561857814,
3681 55808.669027549528,
3682 55829.163374578478,
3683 55849.659602599328,
3684 55870.157711266889,
3685 55890.657700236145,
3686 55911.159569162221,
3687 55931.663317700411,
3688 55952.168945506164,
3689 55972.676452235086,
3690 55993.185837542944,
3691 56013.697101085651,
3692 56034.210242519301,
3693 56054.72526150012,
3694 56075.242157684508,
3695 56095.760930729011,
3696 56116.281580290342,
3697 56136.804106025367,
3698 56157.328507591104,
3699 56177.85478464474,
3700 56198.382936843598,
3701 56218.912963845185,
3702 56239.444865307138,
3703 56259.978640887268,
3704 56280.514290243525,
3705 56301.051813034042,
3706 56321.591208917082,
3707 56342.13247755108,
3708 56362.675618594607,
3709 56383.220631706419,
3710 56403.767516545398,
3711 56424.316272770608,
3712 56444.866900041241,
3713 56465.419398016667,
3714 56485.973766356394,
3715 56506.530004720102,
3716 56527.088112767611,
3717 56547.648090158902,
3718 56568.209936554107,
3719 56588.773651613519,
3720 56609.339234997584,
3721 56629.9066863669,
3722 56650.47600538221,
3723 56671.04719170442,
3724 56691.620244994599,
3725 56712.195164913959,
3726 56732.771951123868,
3727 56753.350603285835,
3728 56773.931121061541,
3729 56794.513504112823,
3730 56815.097752101647,
3731 56835.683864690152,
3732 56856.271841540627,
3733 56876.86168231551,
3734 56897.453386677393,
3735 56918.046954289028,
3736 56938.642384813298,
3737 56959.239677913261,
3738 56979.838833252121,
3739 57000.439850493225,
3740 57021.04272930009,
3741 57041.647469336371,
3742 57062.254070265873,
3743 57082.862531752558,
3744 57103.472853460553,
3745 57124.085035054108,
3746 57144.699076197649,
3747 57165.314976555739,
3748 57185.932735793103,
3749 57206.552353574611,
3750 57227.173829565276,
3751 57247.797163430281,
3752 57268.42235483494,
3753 57289.049403444733,
3754 57309.678308925286,
3755 57330.30907094237,
3756 57350.941689161911,
3757 57371.576163249985,
3758 57392.212492872815,
3759 57412.850677696784,
3760 57433.490717388406,
3761 57454.132611614368,
3762 57474.776360041491,
3763 57495.421962336746,
3764 57516.069418167266,
3765 57536.718727200314,
3766 57557.36988910332,
3767 57578.022903543861,
3768 57598.677770189643,
3769 57619.334488708548,
3770 57639.993058768589,
3771 57660.653480037938,
3772 57681.315752184906,
3773 57701.979874877965,
3774 57722.64584778573,
3775 57743.31367057695,
3776 57763.983342920546,
3777 57784.654864485572,
3778 57805.328234941233,
3779 57826.003453956881,
3780 57846.680521202026,
3781 57867.359436346305,
3782 57888.040199059527,
3783 57908.722809011633,
3784 57929.407265872709,
3785 57950.093569313001,
3786 57970.781719002895,
3787 57991.471714612911,
3788 58012.16355581375,
3789 58032.857242276223,
3790 58053.552773671312,
3791 58074.25014967013,
3792 58094.949369943948,
3793 58115.650434164185,
3794 58136.353342002389,
3795 58157.058093130276,
3796 58177.764687219693,
3797 58198.47312394264,
3798 58219.183402971255,
3799 58239.895523977837,
3800 58260.609486634821,
3801 58281.325290614775,
3802 58302.042935590434,
3803 58322.762421234678,
3804 58343.483747220511,
3805 58364.206913221096,
3806 58384.931918909751,
3807 58405.658763959924,
3808 58426.3874480452,
3809 58447.117970839339,
3810 58467.85033201622,
3811 58488.584531249864,
3812 58509.320568214462,
3813 58530.058442584334,
3814 58550.798154033931,
3815 58571.539702237875,
3816 58592.283086870906,
3817 58613.028307607929,
3818 58633.775364123983,
3819 58654.52425609425,
3820 58675.274983194053,
3821 58696.027545098877,
3822 58716.781941484325,
3823 58737.538172026158,
3824 58758.296236400274,
3825 58779.056134282728,
3826 58799.817865349694,
3827 58820.581429277503,
3828 58841.346825742643,
3829 58862.114054421712,
3830 58882.883114991484,
3831 58903.654007128847,
3832 58924.426730510851,
3833 58945.201284814684,
3834 58965.977669717664,
3835 58986.755884897269,
3836 59007.535930031117,
3837 59028.317804796949,
3838 59049.101508872664,
3839 59069.887041936301,
3840 59090.674403666046,
3841 59111.463593740213,
3842 59132.254611837263,
3843 59153.047457635803,
3844 59173.84213081457,
3845 59194.638631052461,
3846 59215.436958028506,
3847 59236.237111421855,
3848 59257.039090911829,
3849 59277.842896177877,
3850 59298.648526899589,
3851 59319.455982756685,
3852 59340.26526342905,
3853 59361.076368596696,
3854 59381.889297939757,
3855 59402.704051138542,
3856 59423.520627873484,
3857 59444.339027825139,
3858 59465.159250674224,
3859 59485.9812961016,
3860 59506.805163788253,
3861 59527.630853415307,
3862 59548.458364664046,
3863 59569.287697215863,
3864 59590.118850752311,
3865 59610.951824955089,
3866 59631.786619506012,
3867 59652.623234087048,
3868 59673.461668380311,
3869 59694.301922068029,
3870 59715.143994832593,
3871 59735.987886356525,
3872 59756.833596322482,
3873 59777.681124413255,
3874 59798.530470311794,
3875 59819.381633701159,
3876 59840.234614264569,
3877 59861.089411685381,
3878 59881.94602564707,
3879 59902.804455833269,
3880 59923.664701927737,
3881 59944.526763614384,
3882 59965.390640577243,
3883 59986.256332500488,
3884 60007.123839068438,
3885 60027.993159965539,
3886 60048.864294876381,
3887 60069.737243485688,
3888 60090.612005478324,
3889 60111.488580539284,
3890 60132.366968353708,
3891 60153.247168606867,
3892 60174.129180984164,
3893 60195.013005171153,
3894 60215.898640853513,
3895 60236.786087717061,
3896 60257.675345447751,
3897 60278.566413731671,
3898 60299.459292255044,
3899 60320.353980704247,
3900 60341.25047876576,
3901 60362.148786126229,
3902 60383.048902472423,
3903 60403.950827491237,
3904 60424.854560869717,
3905 60445.76010229504,
3906 60466.667451454516,
3907 60487.57660803559,
3908 60508.487571725847,
3909 60529.400342212997,
3910 60550.314919184893,
3911 60571.231302329521,
3912 60592.149491335003,
3913 60613.069485889588,
3914 60633.991285681674,
3915 60654.914890399785,
3916 60675.840299732568,
3917 60696.767513368832,
3918 60717.696530997484,
3919 60738.627352307602,
3920 60759.55997698837,
3921 60780.494404729128,
3922 60801.430635219323,
3923 60822.368668148556,
3924 60843.308503206565,
3925 60864.250140083204,
3926 60885.193578468468,
3927 60906.138818052495,
3928 60927.085858525541,
3929 60948.034699578006,
3930 60968.985340900421,
3931 60989.937782183442,
3932 61010.892023117864,
3933 61031.848063394616,
3934 61052.805902704764,
3935 61073.765540739492,
3936 61094.726977190134,
3937 61115.690211748137,
3938 61136.655244105103,
3939 61157.622073952742,
3940 61178.590700982917,
3941 61199.561124887616,
3942 61220.533345358948,
3943 61241.507362089171,
3944 61262.483174770663,
3945 61283.460783095943,
3946 61304.440186757645,
3947 61325.421385448557,
3948 61346.404378861582,
3949 61367.389166689762,
3950 61388.375748626262,
3951 61409.364124364387,
3952 61430.354293597571,
3953 61451.346256019373,
3954 61472.340011323497,
3955 61493.335559203762,
3956 61514.332899354122,
3957 61535.332031468672,
3958 61556.332955241618,
3959 61577.335670367313,
3960 61598.340176540238,
3961 61619.346473454993,
3962 61640.354560806329,
3963 61661.3644382891,
3964 61682.376105598312,
3965 61703.389562429089,
3966 61724.404808476691,
3967 61745.42184343651,
3968 61766.440667004063,
3969 61787.461278874987,
3970 61808.483678745069,
3971 61829.507866310203,
3972 61850.533841266435,
3973 61871.561603309929,
3974 61892.591152136971,
3975 61913.622487443987,
3976 61934.655608927525,
3977 61955.690516284267,
3978 61976.727209211022,
3979 61997.765687404724,
3980 62018.805950562448,
3981 62039.847998381381,
3982 62060.891830558845,
3983 62081.93744679229,
3984 62102.984846779298,
3985 62124.034030217575,
3986 62145.084996804966,
3987 62166.137746239416,
3988 62187.19227821903,
3989 62208.248592442025,
3990 62229.306688606739,
3991 62250.366566411656,
3992 62271.428225555377,
3993 62292.491665736627,
3994 62313.556886654267,
3995 62334.623888007271,
3996 62355.692669494762,
3997 62376.763230815974,
3998 62397.835571670272,
3999 62418.909691757144,
4000 62439.98559077621,
4001 62461.063268427228,
4002 62482.142724410049,
4003 62503.223958424685,
4004 62524.306970171267,
4005 62545.39175935003,
4006 62566.478325661366,
4007 62587.566668805768,
4008 62608.656788483881,
4009 62629.748684396451,
4010 62650.842356244357,
4011 62671.937803728622,
4012 62693.035026550366,
4013 62714.134024410858,
4014 62735.234797011479,
4015 62756.337344053733,
4016 62777.441665239276,
4017 62798.547760269852,
4018 62819.655628847358,
4019 62840.765270673801,
4020 62861.876685451323,
4021 62882.989872882186,
4022 62904.104832668774,
4023 62925.221564513602,
4024 62946.340068119309,
4025 62967.460343188657,
4026 62988.582389424526,
4027 63009.70620652994,
4028 63030.831794208025,
4029 63051.959152162039,
4030 63073.08828009537,
4031 63094.219177711529,
4032 63115.351844714154,
4033 63136.486280806988,
4034 63157.622485693922,
4035 63178.760459078956,
4036 63199.900200666219,
4037 63221.041710159967,
4038 63242.184987264569,
4039 63263.330031684534,
4040 63284.476843124474,
4041 63305.625421289144,
4042 63326.775765883409,
4043 63347.927876612259,
4044 63369.081753180813,
4045 63390.237395294316,
4046 63411.39480265812,
4047 63432.553974977716,
4048 63453.714911958712,
4049 63474.877613306839,
4050 63496.042078727944,
4051 63517.208307927998,
4052 63538.376300613119,
4053 63559.546056489504,
4054 63580.717575263516,
4055 63601.890856641607,
4056 63623.065900330374,
4057 63644.242706036515,
4058 63665.421273466869,
4059 63686.601602328381,
4060 63707.783692328136,
4061 63728.967543173334,
4062 63750.153154571279,
4063 63771.340526229418,
4064 63792.529657855317,
4065 63813.720549156649,
4066 63834.913199841227,
4067 63856.107609616978,
4068 63877.303778191941,
4069 63898.501705274284,
4070 63919.7013905723,
4071 63940.902833794404,
4072 63962.106034649114,
4073 63983.310992845094,
4074 64004.517708091109,
4075 64025.726180096048,
4076 64046.936408568938,
4077 64068.1483932189,
4078 64089.362133755196,
4079 64110.577629887193,
4080 64131.794881324393,
4081 64153.013887776404,
4082 64174.234648952966,
4083 64195.457164563937,
4084 64216.681434319289,
4085 64237.907457929112,
4086 64259.135235103626,
4087 64280.36476555316,
4088 64301.596048988169,
4089 64322.829085119236,
4090 64344.06387365704,
4091 64365.300414312398,
4092 64386.538706796251,
4093 64407.778750819634,
4094 64429.020546093721,
4095 64450.26409232981,
4096 64471.509389239291,
4097 64492.756436533709,
4098 64514.005233924705,
4099 64535.255781124033,
4100 64556.50807784358,
4101 64577.762123795357,
4102 64599.017918691468,
4103 64620.275462244172,
4104 64641.534754165805,
4105 64662.795794168844,
4106 64684.058581965895,
4107 64705.323117269661,
4108 64726.589399792974,
4109 64747.857429248776,
4110 64769.127205350138,
4111 64790.398727810236,
4112 64811.671996342375,
4113 64832.947010659969,
4114 64854.223770476558,
4115 64875.502275505794,
4116 64896.782525461451,
4117 64918.064520057414,
4118 64939.348259007682,
4119 64960.633742026388,
4120 64981.920968827762,
4121 65003.209939126165,
4122 65024.500652636067,
4123 65045.793109072067,
4124 65067.087308148861,
4125 65088.383249581282,
4126 65109.680933084259,
4127 65130.980358372864,
4128 65152.28152516226,
4129 65173.584433167736,
4130 65194.889082104703,
4131 65216.195471688683,
4132 65237.503601635319,
4133 65258.813471660353,
4134 65280.125081479666,
4135 65301.438430809241,
4136 65322.753519365178,
4137 65344.070346863708,
4138 65365.388913021146,
4139 65386.709217553958,
4140 65408.031260178701,
4141 65429.355040612056,
4142 65450.680558570821,
4143 65472.00781377191,
4144 65493.336805932355,
4145 65514.66753476928,
4146 65535.999999999956,
4147 65557.334201341757,
4148 65578.670138512171,
4149 65600.007811228788,
4150 65621.347219209332,
4151 65642.688362171626,
4152 65664.031239833639,
4153 65685.375851913413,
4154 65706.722198129137,
4155 65728.070278199084,
4156 65749.420091841661,
4157 65770.771638775404,
4158 65792.124918718939,
4159 65813.479931391004,
4160 65834.836676510458,
4161 65856.195153796303,
4162 65877.5553629676,
4163 65898.917303743554,
4164 65920.280975843489,
4165 65941.646378986843,
4166 65963.013512893158,
4167 65984.382377282076,
4168 66005.752971873386,
4169 66027.125296386963,
4170 66048.499350542799,
4171 66069.875134061018,
4172 66091.252646661844,
4173 66112.631888065618,
4174 66134.01285799277,
4175 66155.395556163887,
4176 66176.779982299631,
4177 66198.166136120795,
4178 66219.554017348273,
4179 66240.943625703105,
4180 66262.334960906388,
4181 66283.728022679396,
4182 66305.122810743444,
4183 66326.519324820023,
4184 66347.917564630698,
4185 66369.317529897162,
4186 66390.719220341227,
4187 66412.122635684791,
4188 66433.527775649884,
4189 66454.934639958636,
4190 66476.343228333324,
4191 66497.753540496284,
4192 66519.165576169995,
4193 66540.57933507704,
4194 66561.994816940118,
4195 66583.412021482043,
4196 66604.830948425733,
4197 66626.251597494222,
4198 66647.673968410629,
4199 66669.098060898235,
4200 66690.523874680381,
4201 66711.951409480564,
4202 66733.380665022371,
4203 66754.811641029475,
4204 66776.244337225711,
4205 66797.678753334985,
4206 66819.11488908132,
4207 66840.552744188884,
4208 66861.992318381905,
4209 66883.433611384738,
4210 66904.876622921889,
4211 66926.321352717903,
4212 66947.767800497502,
4213 66969.215965985466,
4214 66990.665848906734,
4215 67012.117448986304,
4216 67033.570765949335,
4217 67055.025799521056,
4218 67076.482549426815,
4219 67097.941015392076,
4220 67119.401197142433,
4221 67140.863094403554,
4222 67162.326706901222,
4223 67183.792034361351,
4224 67205.259076509959,
4225 67226.72783307315,
4226 67248.198303777172,
4227 67269.670488348347,
4228 67291.144386513144,
4229 67312.619997998088,
4230 67334.09732252988,
4231 67355.576359835293,
4232 67377.057109641188,
4233 67398.53957167457,
4234 67420.023745662547,
4235 67441.50963133233,
4236 67462.99722841123,
4237 67484.486536626689,
4238 67505.977555706224,
4239 67527.470285377494,
4240 67548.964725368263,
4241 67570.460875406367,
4242 67591.9587352198,
4243 67613.458304536631,
4244 67634.95958308503,
4245 67656.462570593329,
4246 67677.967266789899,
4247 67699.473671403248,
4248 67720.981784162024,
4249 67742.491604794923,
4250 67764.003133030797,
4251 67785.516368598575,
4252 67807.031311227314,
4253 67828.547960646174,
4254 67850.066316584402,
4255 67871.58637877139,
4256 67893.108146936589,
4257 67914.63162080961,
4258 67936.156800120138,
4259 67957.683684597971,
4260 67979.212273973011,
4261 68000.742567975263,
4262 68022.274566334876,
4263 68043.808268782057,
4264 68065.343675047145,
4265 68086.880784860579,
4266 68108.419597952918,
4267 68129.960114054789,
4268 68151.502332896969,
4269 68173.04625421032,
4270 68194.591877725834,
4271 68216.139203174564,
4272 68237.688230287706,
4273 68259.238958796544,
4274 68280.791388432481,
4275 68302.345518927032,
4276 68323.901350011787,
4277 68345.458881418483,
4278 68367.018112878912,
4279 68388.579044125028,
4280 68410.141674888844,
4281 68431.706004902502,
4282 68453.272033898262,
4283 68474.839761608455,
4284 68496.409187765545,
4285 68517.980312102081,
4286 68539.553134350732,
4287 68561.127654244279,
4288 68582.70387151558,
4289 68604.281785897634,
4290 68625.861397123503,
4291 68647.44270492639,
4292 68669.025709039604,
4293 68690.610409196524,
4294 68712.196805130661,
4295 68733.784896575627,
4296 68755.374683265123,
4297 68776.966164932994,
4298 68798.559341313128,
4299 68820.154212139591,
4300 68841.750777146473,
4301 68863.349036068044,
4302 68884.948988638629,
4303 68906.550634592684,
4304 68928.153973664739,
4305 68949.75900558944,
4306 68971.365730101577,
4307 68992.974146935987,
4308 69014.584255827634,
4309 69036.196056511588,
4310 69057.809548723017,
4311 69079.424732197207,
4312 69101.041606669532,
4313 69122.660171875468,
4314 69144.280427550606,
4315 69165.902373430625,
4316 69187.526009251334,
4317 69209.151334748618,
4318 69230.778349658474,
4319 69252.40705371699,
4320 69274.037446660412,
4321 69295.669528225,
4322 69317.303298147192,
4323 69338.938756163494,
4324 69360.575902010532,
4325 69382.214735425005,
4326 69403.855256143754,
4327 69425.497463903681,
4328 69447.141358441833,
4329 69468.78693949533,
4330 69490.434206801394,
4331 69512.083160097391,
4332 69533.733799120717,
4333 69555.386123608929,
4334 69577.04013329967,
4335 69598.695827930685,
4336 69620.353207239794,
4337 69642.012270964973,
4338 69663.67301884426,
4339 69685.335450615792,
4340 69706.999566017839,
4341 69728.665364788743,
4342 69750.332846666963,
4343 69772.002011391058,
4344 69793.672858699691,
4345 69815.345388331611,
4346 69837.019600025669,
4347 69858.695493520849,
4348 69880.373068556204,
4349 69902.052324870907,
4350 69923.733262204216,
4351 69945.415880295492,
4352 69967.100178884211,
4353 69988.786157709939,
4354 70010.473816512356,
4355 70032.163155031216,
4356 70053.854173006403,
4357 70075.546870177874,
4358 70097.241246285717,
4359 70118.937301070109,
4360 70140.635034271298,
4361 70162.334445629691,
4362 70184.035534885741,
4363 70205.738301780017,
4364 70227.442746053217,
4365 70249.1488674461,
4366 70270.856665699539,
4367 70292.566140554511,
4368 70314.277291752107,
4369 70335.990119033493,
4370 70357.704622139936,
4371 70379.420800812819,
4372 70401.138654793613,
4373 70422.85818382389,
4374 70444.579387645339,
4375 70466.302265999722,
4376 70488.026818628918,
4377 70509.753045274876,
4378 70531.480945679708,
4379 70553.210519585555,
4380 70574.941766734701,
4381 70596.674686869505,
4382 70618.409279732456,
4383 70640.145545066101,
4384 70661.883482613106,
4385 70683.623092116264,
4386 70705.364373318414,
4387 70727.107325962526,
4388 70748.851949791671,
4389 70770.598244549008,
4390 70792.346209977783,
4391 70814.095845821372,
4392 70835.847151823225,
4393 70857.600127726895,
4394 70879.354773276034,
4395 70901.111088214413,
4396 70922.869072285859,
4397 70944.628725234332,
4398 70966.390046803877,
4399 70988.153036738629,
4400 71009.917694782853,
4401 71031.684020680885,
4402 71053.45201417715,
4403 71075.221675016204,
4404 71096.993002942661,
4405 71118.765997701266,
4406 71140.540659036851,
4407 71162.316986694335,
4408 71184.09498041874,
4409 71205.874639955218,
4410 71227.655965048951,
4411 71249.438955445294,
4412 71271.223610889632,
4413 71293.009931127483,
4414 71314.797915904477,
4415 71336.587564966307,
4416 71358.378878058764,
4417 71380.171854927772,
4418 71401.966495319313,
4419 71423.762798979486,
4420 71445.560765654489,
4421 71467.360395090596,
4422 71489.161687034211,
4423 71510.964641231811,
4424 71532.769257429973,
4425 71554.575535375348,
4426 71576.383474814749,
4427 71598.19307549503,
4428 71620.004337163133,
4429 71641.817259566145,
4430 71663.631842451214,
4431 71685.4480855656,
4432 71707.26598865664,
4433 71729.085551471784,
4434 71750.906773758586,
4435 71772.729655264673,
4436 71794.554195737772,
4437 71816.380394925713,
4438 71838.208252576442,
4439 71860.037768437964,
4440 71881.868942258385,
4441 71903.701773785942,
4442 71925.536262768932,
4443 71947.372408955751,
4444 71969.210212094898,
4445 71991.049671934976,
4446 72012.890788224686,
4447 72034.73356071279,
4448 72056.577989148165,
4449 72078.424073279821,
4450 72100.271812856794,
4451 72122.121207628254,
4452 72143.97225734347,
4453 72165.824961751801,
4454 72187.679320602692,
4455 72209.53533364569,
4456 72231.393000630429,
4457 72253.252321306645,
4458 72275.113295424177,
4459 72296.975922732949,
4460 72318.840202982959,
4461 72340.706135924338,
4462 72362.573721307272,
4463 72384.442958882093,
4464 72406.313848399179,
4465 72428.186389609036,
4466 72450.060582262216,
4467 72471.936426109431,
4468 72493.813920901433,
4469 72515.693066389096,
4470 72537.573862323392,
4471 72559.456308455352,
4472 72581.340404536139,
4473 72603.226150316987,
4474 72625.113545549248,
4475 72647.002589984331,
4476 72668.893283373764,
4477 72690.785625469172,
4478 72712.679616022273,
4479 72734.575254784853,
4480 72756.472541508803,
4481 72778.371475946144,
4482 72800.272057848939,
4483 72822.174286969355,
4484 72844.07816305969,
4485 72865.983685872285,
4486 72887.890855159596,
4487 72909.799670674183,
4488 72931.710132168693,
4489 72953.622239395845,
4490 72975.535992108475,
4491 72997.451390059519,
4492 73019.368433001961,
4493 73041.287120688925,
4494 73063.207452873612,
4495 73085.129429309294,
4496 73107.053049749389,
4497 73128.978313947344,
4498 73150.905221656736,
4499 73172.833772631217,
4500 73194.763966624567,
4501 73216.695803390612,
4502 73238.62928268328,
4503 73260.564404256627,
4504 73282.501167864757,
4505 73304.439573261901,
4506 73326.379620202337,
4507 73348.321308440485,
4508 73370.264637730841,
4509 73392.209607827957,
4510 73414.156218486532,
4511 73436.104469461323,
4512 73458.054360507173,
4513 73480.005891379056,
4514 73501.959061831993,
4515 73523.913871621116,
4516 73545.870320501665,
4517 73567.828408228932,
4518 73589.78813455833,
4519 73611.749499245358,
4520 73633.712502045615,
4521 73655.677142714747,
4522 73677.643421008557,
4523 73699.611336682879,
4524 73721.580889493693,
4525 73743.552079197019,
4526 73765.524905548999,
4527 73787.499368305856,
4528 73809.475467223907,
4529 73831.453202059551,
4530 73853.432572569291,
4531 73875.413578509717,
4532 73897.396219637507,
4533 73919.380495709411,
4534 73941.36640648231,
4535 73963.353951713143,
4536 73985.343131158952,
4537 74007.333944576865,
4538 74029.326391724098,
4539 74051.320472357969,
4540 74073.316186235883,
4541 74095.313533115303,
4542 74117.312512753837,
4543 74139.313124909138,
4544 74161.315369338976,
4545 74183.319245801191,
4546 74205.324754053727,
4547 74227.331893854629,
4548 74249.340664961986,
4549 74271.351067134034,
4550 74293.363100129049,
4551 74315.376763705441,
4552 74337.392057621662,
4553 74359.408981636298,
4554 74381.427535508003,
4555 74403.447718995507,
4556 74425.469531857671,
4557 74447.492973853383,
4558 74469.518044741693,
4559 74491.54474428168,
4560 74513.573072232539,
4561 74535.603028353551,
4562 74557.634612404087,
4563 74579.667824143602,
4564 74601.702663331642,
4565 74623.739129727837,
4566 74645.777223091936,
4567 74667.816943183716,
4568 74689.858289763113,
4569 74711.901262590094,
4570 74733.945861424741,
4571 74755.992086027225,
4572 74778.039936157802,
4573 74800.089411576817,
4574 74822.140512044702,
4575 74844.193237321961,
4576 74866.24758716923,
4577 74888.303561347187,
4578 74910.36115961663,
4579 74932.420381738411,
4580 74954.481227473516,
4581 74976.543696582972,
4582 74998.607788827925,
4583 75020.673503969607,
4584 75042.740841769322,
4585 75064.809801988464,
4586 75086.88038438854,
4587 75108.952588731103,
4588 75131.026414777836,
4589 75153.101862290467,
4590 75175.178931030852,
4591 75197.257620760924,
4592 75219.33793124267,
4593 75241.419862238225,
4594 75263.503413509738,
4595 75285.588584819503,
4596 75307.675375929874,
4597 75329.763786603318,
4598 75351.853816602365,
4599 75373.945465689612,
4600 75396.038733627807,
4601 75418.133620179724,
4602 75440.230125108254,
4603 75462.32824817636,
4604 75484.427989147109,
4605 75506.529347783653,
4606 75528.63232384919,
4607 75550.736917107075,
4608 75572.843127320695,
4609 75594.950954253538,
4610 75617.060397669193,
4611 75639.171457331307,
4612 75661.284133003646,
4613 75683.398424450032,
4614 75705.514331434402,
4615 75727.631853720741,
4616 75749.750991073175,
4617 75771.871743255862,
4618 75793.994110033076,
4619 75816.118091169177,
4620 75838.243686428585,
4621 75860.370895575848,
4622 75882.499718375562,
4623 75904.630154592422,
4624 75926.762203991224,
4625 75948.895866336825,
4626 75971.031141394182,
4627 75993.168028928325,
4628 76015.306528704401,
4629 76037.4466404876,
4630 76059.588364043215,
4631 76081.731699136653,
4632 76103.876645533353,
4633 76126.023202998884,
4634 76148.171371298871,
4635 76170.321150199044,
4636 76192.472539465205,
4637 76214.625538863256,
4638 76236.780148159174,
4639 76258.936367119008,
4640 76281.094195508922,
4641 76303.253633095141,
4642 76325.414679643975,
4643 76347.577334921851,
4644 76369.741598695226,
4645 76391.907470730686,
4646 76414.074950794879,
4647 76436.244038654564,
4648 76458.414734076548,
4649 76480.587036827754,
4650 76502.760946675175,
4651 76524.936463385893,
4652 76547.11358672705,
4653 76569.292316465915,
4654 76591.472652369819,
4655 76613.654594206164,
4656 76635.838141742468,
4657 76658.023294746308,
4658 76680.210052985349,
4659 76702.398416227341,
4660 76724.588384240138,
4661 76746.779956791637,
4662 76768.973133649866,
4663 76791.167914582897,
4664 76813.364299358902,
4665 76835.562287746157,
4666 76857.761879512967,
4667 76879.963074427797,
4668 76902.165872259109,
4669 76924.37027277553,
4670 76946.576275745727,
4671 76968.783880938441,
4672 76990.993088122515,
4673 77013.203897066895,
4674 77035.416307540567,
4675 77057.630319312622,
4676 77079.845932152239,
4677 77102.063145828695,
4678 77124.281960111301,
4679 77146.50237476948,
4680 77168.724389572759,
4681 77190.948004290723,
4682 77213.173218693031,
4683 77235.400032549442,
4684 77257.628445629802,
4685 77279.858457704031,
4686 77302.090068542122,
4687 77324.323277914169,
4688 77346.558085590339,
4689 77368.794491340886,
4690 77391.032494936138,
4691 77413.272096146524,
4692 77435.51329474253,
4693 77457.756090494731,
4694 77480.000483173804,
4695 77502.246472550498,
4696 77524.494058395634,
4697 77546.743240480107,
4698 77568.994018574944,
4699 77591.246392451198,
4700 77613.500361880026,
4701 77635.755926632657,
4702 77658.013086480438,
4703 77680.271841194757,
4704 77702.532190547092,
4705 77724.794134309021,
4706 77747.057672252195,
4707 77769.322804148323,
4708 77791.589529769248,
4709 77813.857848886837,
4710 77836.127761273063,
4711 77858.399266699998,
4712 77880.67236493979,
4713 77902.947055764627,
4714 77925.223338946831,
4715 77947.50121425878,
4716 77969.780681472927,
4717 77992.061740361838,
4718 78014.344390698127,
4719 78036.628632254491,
4720 78058.914464803747,
4721 78081.201888118725,
4722 78103.490901972415,
4723 78125.781506137821,
4724 78148.073700388064,
4725 78170.367484496339,
4726 78192.662858235926,
4727 78214.959821380166,
4728 78237.258373702498,
4729 78259.558514976452,
4730 78281.860244975614,
4731 78304.163563473659,
4732 78326.468470244363,
4733 78348.77496506153,
4734 78371.083047699125,
4735 78393.392717931114,
4736 78415.703975531578,
4737 78438.016820274701,
4738 78460.331251934695,
4739 78482.647270285903,
4740 78504.964875102727,
4741 78527.284066159627,
4742 78549.604843231195,
4743 78571.927206092048,
4744 78594.251154516911,
4745 78616.576688280606,
4746 78638.903807157985,
4747 78661.232510924034,
4748 78683.562799353778,
4749 78705.894672222363,
4750 78728.228129304945,
4751 78750.563170376859,
4752 78772.899795213423,
4753 78795.238003590101,
4754 78817.577795282399,
4755 78839.919170065928,
4756 78862.262127716356,
4757 78884.606668009452,
4758 78906.952790721043,
4759 78929.300495627045,
4760 78951.64978250346,
4761 78974.000651126378,
4762 78996.353101271932,
4763 79018.707132716358,
4764 79041.062745235977,
4765 79063.41993860717,
4766 79085.778712606436,
4767 79108.139067010285,
4768 79130.501001595389,
4769 79152.864516138419,
4770 79175.22961041618,
4771 79197.596284205531,
4772 79219.96453728342,
4773 79242.33436942687,
4774 79264.705780412987,
4775 79287.078770018954,
4776 79309.453338022009,
4777 79331.829484199508,
4778 79354.207208328866,
4779 79376.586510187582,
4780 79398.967389553218,
4781 79421.349846203433,
4782 79443.733879915948,
4783 79466.119490468584,
4784 79488.50667763922,
4785 79510.895441205823,
4786 79533.285780946433,
4787 79555.677696639163,
4788 79578.071188062226,
4789 79600.466254993895,
4790 79622.862897212515,
4791 79645.261114496549,
4792 79667.660906624471,
4793 79690.062273374875,
4794 79712.465214526455,
4795 79734.869729857935,
4796 79757.275819148126,
4797 79779.683482175955,
4798 79802.092718720378,
4799 79824.503528560454,
4800 79846.915911475327,
4801 79869.329867244203,
4802 79891.745395646343,
4803 79914.162496461155,
4804 79936.581169468045,
4805 79959.001414446553,
4806 79981.423231176261,
4807 80003.846619436852,
4808 80026.271579008084,
4809 80048.698109669771,
4810 80071.12621120183,
4811 80093.555883384237,
4812 80115.987125997053,
4813 80138.419938820414,
4814 80160.854321634528,
4815 80183.290274219689,
4816 80205.727796356281,
4817 80228.166887824715,
4818 80250.607548405547,
4819 80273.049777879336,
4820 80295.493576026798,
4821 80317.938942628651,
4822 80340.385877465727,
4823 80362.834380318949,
4824 80385.28445096928,
4825 80407.736089197788,
4826 80430.189294785596,
4827 80452.644067513917,
4828 80475.100407164035,
4829 80497.558313517322,
4830 80520.017786355209,
4831 80542.478825459213,
4832 80564.941430610925,
4833 80587.405601592007,
4834 80609.871338184195,
4835 80632.338640169342,
4836 80654.8075073293,
4837 80677.277939446067,
4838 80699.749936301683,
4839 80722.223497678278,
4840 80744.698623358039,
4841 80767.17531312324,
4842 80789.653566756242,
4843 80812.133384039465,
4844 80834.614764755403,
4845 80857.097708686648,
4846 80879.582215615854,
4847 80902.068285325731,
4848 80924.555917599093,
4849 80947.045112218824,
4850 80969.535868967869,
4851 80992.028187629272,
4852 81014.522067986123,
4853 81037.017509821613,
4854 81059.514512919006,
4855 81082.013077061609,
4856 81104.513202032831,
4857 81127.014887616184,
4858 81149.518133595193,
4859 81172.022939753486,
4860 81194.529305874807,
4861 81217.037231742899,
4862 81239.546717141639,
4863 81262.057761854958,
4864 81284.570365666848,
4865 81307.084528361403,
4866 81329.600249722775,
4867 81352.117529535186,
4868 81374.636367582949,
4869 81397.156763650448,
4870 81419.678717522125,
4871 81442.202228982511,
4872 81464.727297816222,
4873 81487.253923807933,
4874 81509.782106742379,
4875 81532.311846404409,
4876 81554.843142578902,
4877 81577.375995050839,
4878 81599.910403605274,
4879 81622.446368027333,
4880 81644.983888102215,
4881 81667.522963615178,
4882 81690.063594351581,
4883 81712.605780096841,
4884 81735.149520636449,
4885 81757.694815755967,
4886 81780.241665241047,
4887 81802.79006887741,
4888 81825.340026450824,
4889 81847.891537747171,
4890 81870.444602552379,
4891 81892.999220652477,
4892 81915.555391833506,
4893 81938.113115881672,
4894 81960.672392583176,
4895 81983.233221724338,
4896 82005.795603091537,
4897 82028.359536471224,
4898 82050.925021649906,
4899 82073.492058414209,
4900 82096.060646550788,
4901 82118.630785846399,
4902 82141.202476087841,
4903 82163.775717062032,
4904 82186.35050855593,
4905 82208.926850356569,
4906 82231.504742251054,
4907 82254.084184026578,
4908 82276.665175470393,
4909 82299.24771636985,
4910 82321.831806512317,
4911 82344.417445685307,
4912 82367.004633676348,
4913 82389.593370273054,
4914 82412.183655263143,
4915 82434.775488434374,
4916 82457.368869574595,
4917 82479.963798471697,
4918 82502.560274913689,
4919 82525.158298688606,
4920 82547.757869584602,
4921 82570.35898738986,
4922 82592.961651892678,
4923 82615.565862881398,
4924 82638.171620144421,
4925 82660.778923470265,
4926 82683.387772647475,
4927 82705.998167464713,
4928 82728.610107710658,
4929 82751.223593174116,
4930 82773.83862364394,
4931 82796.45519890904,
4932 82819.073318758441,
4933 82841.692982981185,
4934 82864.314191366429,
4935 82886.936943703375,
4936 82909.561239781324,
4937 82932.187079389638,
4938 82954.814462317736,
4939 82977.443388355125,
4940 83000.073857291369,
4941 83022.70586891612,
4942 83045.339423019104,
4943 83067.974519390089,
4944 83090.611157818959,
4945 83113.249338095629,
4946 83135.8890600101,
4947 83158.530323352461,
4948 83181.173127912858,
4949 83203.817473481497,
4950 83226.463359848669,
4951 83249.11078680474,
4952 83271.759754140134,
4953 83294.410261645375,
4954 83317.062309111003,
4955 83339.715896327703,
4956 83362.371023086147,
4957 83385.027689177165,
4958 83407.685894391587,
4959 83430.345638520361,
4960 83453.006921354478,
4961 83475.669742685001,
4962 83498.334102303095,
4963 83520.999999999942,
4964 83543.667435566866,
4965 83566.336408795192,
4966 83589.006919476349,
4967 83611.678967401851,
4968 83634.352552363242,
4969 83657.027674152167,
4970 83679.704332560359,
4971 83702.382527379552,
4972 83725.062258401638,
4973 83747.743525418511,
4974 83770.42632822218,
4975 83793.110666604684,
4976 83815.796540358162,
4977 83838.483949274829,
4978 83861.172893146941,
4979 83883.863371766842,
4980 83906.555384926964,
4981 83929.248932419752,
4982 83951.944014037799,
4983 83974.640629573696,
4984 83997.338778820151,
4985 84020.038461569929,
4986 84042.739677615857,
4987 84065.442426750829,
4988 84088.146708767847,
4989 84110.852523459922,
4990 84133.559870620171,
4991 84156.268750041796,
4992 84178.979161518029,
4993 84201.691104842204,
4994 84224.404579807713,
4995 84247.119586208006,
4996 84269.83612383662,
4997 84292.55419248715,
4998 84315.273791953281,
4999 84337.994922028738,
5000 84360.717582507335,
5001 84383.441773182945,
5002 84406.167493849513,
5003 84428.894744301069,
5004 84451.623524331691,
5005 84474.353833735542,
5006 84497.085672306828,
5007 84519.819039839858,
5008 84542.553936128999,
5009 84565.290360968676,
5010 84588.028314153402,
5011 84610.767795477717,
5012 84633.508804736295,
5013 84656.251341723822,
5014 84678.995406235073,
5015 84701.740998064924,
5016 84724.488117008252,
5017 84747.236762860062,
5018 84769.986935415407,
5019 84792.73863446941,
5020 84815.491859817252,
5021 84838.246611254188,
5022 84861.002888575575,
5023 84883.760691576768,
5024 84906.520020053256,
5025 84929.28087380057,
5026 84952.043252614312,
5027 84974.807156290146,
5028 84997.572584623806,
5029 85020.339537411113,
5030 85043.108014447949,
5031 85065.878015530237,
5032 85088.649540453989,
5033 85111.422589015303,
5034 85134.197161010321,
5035 85156.973256235244,
5036 85179.750874486374,
5037 85202.530015560071,
5038 85225.310679252725,
5039 85248.092865360857,
5040 85270.876573681016,
5041 85293.661804009811,
5042 85316.448556143951,
5043 85339.236829880188,
5044 85362.026625015351,
5045 85384.817941346351,
5046 85407.610778670132,
5047 85430.405136783724,
5048 85453.201015484257,
5049 85475.998414568865,
5050 85498.797333834795,
5051 85521.597773079353,
5052 85544.399732099904,
5053 85567.203210693886,
5054 85590.008208658808,
5055 85612.814725792239,
5056 85635.62276189182,
5057 85658.432316755265,
5058 85681.243390180331,
5059 85704.055981964877,
5060 85726.870091906807,
5061 85749.685719804082,
5062 85772.502865454764,
5063 85795.321528656961,
5064 85818.141709208852,
5065 85840.963406908675,
5066 85863.78662155474,
5067 85886.611352945445,
5068 85909.437600879217,
5069 85932.26536515457,
5070 85955.094645570091,
5071 85977.92544192441,
5072 86000.757754016275,
5073 86023.591581644432,
5074 86046.426924607746,
5075 86069.263782705122,
5076 86092.102155735556,
5077 86114.942043498071,
5078 86137.783445791807,
5079 86160.626362415918,
5080 86183.470793169676,
5081 86206.316737852379,
5082 86229.164196263402,
5083 86252.013168202204,
5084 86274.863653468303,
5085 86297.715651861261,
5086 86320.569163180728,
5087 86343.424187226425,
5088 86366.280723798132,
5089 86389.138772695675,
5090 86411.998333718977,
5091 86434.859406668009,
5092 86457.721991342827,
5093 86480.586087543532,
5094 86503.451695070296,
5095 86526.318813723352,
5096 86549.187443303032,
5097 86572.057583609683,
5098 86594.929234443756,
5099 86617.802395605773,
5100 86640.677066896271,
5101 86663.553248115903,
5102 86686.43093906538,
5103 86709.310139545443,
5104 86732.190849356964,
5105 86755.073068300815,
5106 86777.956796177954,
5107 86800.842032789442,
5108 86823.728777936354,
5109 86846.617031419853,
5110 86869.506793041175,
5111 86892.398062601613,
5112 86915.290839902518,
5113 86938.185124745316,
5114 86961.080916931489,
5115 86983.978216262592,
5116 87006.87702254027,
5117 87029.777335566177,
5118 87052.67915514209,
5119 87075.582481069796,
5120 87098.487313151185,
5121 87121.39365118822,
5122 87144.301494982894,
5123 87167.210844337285,
5124 87190.121699053532,
5125 87213.034058933845,
5126 87235.947923780506,
5127 87258.863293395829,
5128 87281.780167582241,
5129 87304.698546142172,
5130 87327.618428878181,
5131 87350.539815592856,
5132 87373.462706088845,
5133 87396.387100168897,
5134 87419.312997635774,
5135 87442.240398292357,
5136 87465.16930194154,
5137 87488.099708386319,
5138 87511.031617429733,
5139 87533.965028874911,
5140 87556.899942525008,
5141 87579.836358183282,
5142 87602.774275653021,
5143 87625.713694737613,
5144 87648.654615240492,
5145 87671.597036965148,
5146 87694.540959715145,
5147 87717.486383294105,
5148 87740.433307505737,
5149 87763.381732153779,
5150 87786.331657042057,
5151 87809.283081974456,
5152 87832.236006754916,
5153 87855.190431187453,
5154 87878.146355076155,
5155 87901.103778225151,
5156 87924.062700438633,
5157 87947.023121520891,
5158 87969.985041276246,
5159 87992.948459509105,
5160 88015.913376023906,
5161 88038.879790625171,
5162 88061.847703117513,
5163 88084.817113305573,
5164 88107.788020994049,
5165 88130.760425987726,
5166 88153.734328091465,
5167 88176.709727110137,
5168 88199.686622848749,
5169 88222.665015112303,
5170 88245.644903705906,
5171 88268.626288434709,
5172 88291.609169103947,
5173 88314.593545518903,
5174 88337.579417484914,
5175 88360.566784807408,
5176 88383.555647291854,
5177 88406.546004743795,
5178 88429.537856968818,
5179 88452.531203772611,
5180 88475.52604496089,
5181 88498.522380339447,
5182 88521.52020971413,
5183 88544.519532890874,
5184 88567.520349675644,
5185 88590.522659874507,
5186 88613.526463293543,
5187 88636.531759738922,
5188 88659.538549016899,
5189 88682.546830933745,
5190 88705.556605295846,
5191 88728.567871909589,
5192 88751.580630581491,
5193 88774.594881118086,
5194 88797.610623325963,
5195 88820.62785701183,
5196 88843.646581982393,
5197 88866.666798044462,
5198 88889.688505004888,
5199 88912.711702670611,
5200 88935.7363908486,
5201 88958.762569345898,
5202 88981.790237969632,
5203 89004.81939652696,
5204 89027.850044825114,
5205 89050.882182671412,
5206 89073.9158098732,
5207 89096.950926237885,
5208 89119.987531572973,
5209 89143.025625686001,
5210 89166.065208384563,
5211 89189.106279476357,
5212 89212.148838769106,
5213 89235.192886070581,
5214 89258.238421188667,
5215 89281.285443931265,
5216 89304.333954106376,
5217 89327.383951522017,
5218 89350.435435986306,
5219 89373.488407307406,
5220 89396.542865293537,
5221 89419.598809753006,
5222 89442.656240494165,
5223 89465.715157325409,
5224 89488.775560055219,
5225 89511.837448492137,
5226 89534.900822444746,
5227 89557.965681721733,
5228 89581.032026131812,
5229 89604.099855483742,
5230 89627.169169586399,
5231 89650.239968248672,
5232 89673.312251279538,
5233 89696.386018488018,
5234 89719.461269683205,
5235 89742.53800467425,
5236 89765.616223270365,
5237 89788.69592528083,
5238 89811.777110514988,
5239 89834.859778782207,
5240 89857.943929891975,
5241 89881.029563653807,
5242 89904.116679877261,
5243 89927.205278372014,
5244 89950.29535894774,
5245 89973.386921414218,
5246 89996.479965581268,
5247 90019.574491258769,
5248 90042.670498256688,
5249 90065.767986385021,
5250 90088.866955453836,
5251 90111.967405273259,
5252 90135.069335653476,
5253 90158.172746404758,
5254 90181.277637337407,
5255 90204.384008261797,
5256 90227.49185898836,
5257 90250.601189327586,
5258 90273.711999090039,
5259 90296.824288086325,
5260 90319.938056127125,
5261 90343.053303023189,
5262 90366.170028585286,
5263 90389.288232624298,
5264 90412.407914951138,
5265 90435.529075376777,
5266 90458.651713712257,
5267 90481.775829768681,
5268 90504.901423357209,
5269 90528.028494289058,
5270 90551.157042375504,
5271 90574.287067427911,
5272 90597.418569257643,
5273 90620.551547676194,
5274 90643.686002495073,
5275 90666.821933525847,
5276 90689.959340580186,
5277 90713.098223469773,
5278 90736.238582006365,
5279 90759.380416001804,
5280 90782.523725267951,
5281 90805.668509616764,
5282 90828.814768860233,
5283 90851.962502810435,
5284 90875.11171127946,
5285 90898.262394079517,
5286 90921.414551022855,
5287 90944.568181921743,
5288 90967.72328658856,
5289 90990.879864835719,
5290 91014.037916475718,
5291 91037.19744132107,
5292 91060.358439184391,
5293 91083.520909878338,
5294 91106.684853215629,
5295 91129.850269009039,
5296 91153.017157071401,
5297 91176.185517215621,
5298 91199.355349254649,
5299 91222.526653001492,
5300 91245.699428269247,
5301 91268.873674871036,
5302 91292.049392620058,
5303 91315.226581329553,
5304 91338.405240812834,
5305 91361.585370883287,
5306 91384.766971354344,
5307 91407.950042039476,
5308 91431.134582752245,
5309 91454.320593306256,
5310 91477.508073515171,
5311 91500.697023192712,
5312 91523.887442152685,
5313 91547.07933020893,
5314 91570.272687175326,
5315 91593.467512865856,
5316 91616.663807094534,
5317 91639.861569675442,
5318 91663.060800422725,
5319 91686.261499150554,
5320 91709.463665673218,
5321 91732.66729980502,
5322 91755.872401360321,
5323 91779.078970153569,
5324 91802.287005999257,
5325 91825.49650871192,
5326 91848.707478106167,
5327 91871.91991399668,
5328 91895.133816198169,
5329 91918.349184525418,
5330 91941.566018793281,
5331 91964.784318816659,
5332 91988.004084410495,
5333 92011.22531538982,
5334 92034.448011569708,
5335 92057.672172765277,
5336 92080.897798791746,
5337 92104.124889464365,
5338 92127.353444598411,
5339 92150.58346400928,
5340 92173.814947512379,
5341 92197.04789492322,
5342 92220.282306057314,
5343 92243.518180730272,
5344 92266.755518757753,
5345 92289.994319955469,
5346 92313.234584139194,
5347 92336.476311124774,
5348 92359.719500728082,
5349 92382.964152765067,
5350 92406.210267051734,
5351 92429.457843404161,
5352 92452.706881638471,
5353 92475.957381570814,
5354 92499.209343017443,
5355 92522.462765794655,
5356 92545.717649718805,
5357 92568.973994606305,
5358 92592.231800273614,
5359 92615.491066537259,
5360 92638.751793213814,
5361 92662.01398011994,
5362 92685.277627072326,
5363 92708.54273388772,
5364 92731.809300382942,
5365 92755.077326374871,
5366 92778.346811680414,
5367 92801.617756116568,
5368 92824.890159500384,
5369 92848.164021648947,
5370 92871.439342379424,
5371 92894.716121509016,
5372 92917.994358855023,
5373 92941.274054234746,
5374 92964.555207465572,
5375 92987.837818364962,
5376 93011.121886750407,
5377 93034.407412439468,
5378 93057.694395249753,
5379 93080.982834998955,
5380 93104.272731504767,
5381 93127.564084584999,
5382 93150.856894057491,
5383 93174.15115974014,
5384 93197.446881450916,
5385 93220.744059007804,
5386 93244.04269222889,
5387 93267.342780932304,
5388 93290.644324936235,
5389 93313.947324058914,
5390 93337.251778118633,
5391 93360.557686933767,
5392 93383.865050322696,
5393 93407.173868103928,
5394 93430.484140095941,
5395 93453.795866117362,
5396 93477.109045986799,
5397 93500.423679522952,
5398 93523.739766544561,
5399 93547.057306870454,
5400 93570.376300319491,
5401 93593.696746710571,
5402 93617.018645862699,
5403 93640.341997594893,
5404 93663.666801726242,
5405 93686.993058075881,
5406 93710.320766463032,
5407 93733.64992670693,
5408 93756.980538626914,
5409 93780.312602042337,
5410 93803.646116772637,
5411 93826.981082637285,
5412 93850.317499455836,
5413 93873.655367047861,
5414 93896.994685233032,
5415 93920.335453831038,
5416 93943.677672661666,
5417 93967.021341544707,
5418 93990.366460300051,
5419 94013.713028747632,
5420 94037.061046707429,
5421 94060.410513999494,
5422 94083.761430443905,
5423 94107.113795860845,
5424 94130.467610070496,
5425 94153.822872893157,
5426 94177.179584149111,
5427 94200.537743658759,
5428 94223.897351242529,
5429 94247.25840672091,
5430 94270.620909914433,
5431 94293.98486064373,
5432 94317.350258729421,
5433 94340.71710399224,
5434 94364.085396252936,
5435 94387.455135332348,
5436 94410.82632105134,
5437 94434.198953230851,
5438 94457.573031691878,
5439 94480.948556255447,
5440 94504.325526742658,
5441 94527.70394297468,
5442 94551.083804772716,
5443 94574.465111958023,
5444 94597.847864351934,
5445 94621.232061775823,
5446 94644.617704051096,
5447 94668.004790999272,
5448 94691.393322441872,
5449 94714.783298200506,
5450 94738.174718096794,
5451 94761.567581952477,
5452 94784.961889589307,
5453 94808.357640829097,
5454 94831.754835493703,
5455 94855.153473405066,
5456 94878.553554385173,
5457 94901.955078256055,
5458 94925.358044839784,
5459 94948.762453958523,
5460 94972.168305434476,
5461 94995.575599089891,
5462 95018.984334747074,
5463 95042.394512228391,
5464 95065.806131356265,
5465 95089.219191953176,
5466 95112.633693841635,
5467 95136.04963684424,
5468 95159.467020783617,
5469 95182.885845482466,
5470 95206.306110763529,
5471 95229.727816449609,
5472 95253.150962363579,
5473 95276.575548328314,
5474 95300.001574166803,
5475 95323.429039702052,
5476 95346.857944757154,
5477 95370.288289155214,
5478 95393.720072719429,
5479 95417.153295273019,
5480 95440.587956639298,
5481 95464.024056641589,
5482 95487.461595103305,
5483 95510.900571847902,
5484 95534.340986698866,
5485 95557.782839479783,
5486 95581.226130014256,
5487 95604.670858125959,
5488 95628.117023638595,
5489 95651.564626375985,
5490 95675.013666161918,
5491 95698.464142820303,
5492 95721.916056175076,
5493 95745.369406050231,
5494 95768.824192269807,
5495 95792.280414657915,
5496 95815.738073038709,
5497 95839.197167236387,
5498 95862.657697075221,
5499 95886.11966237954,
5500 95909.583062973688,
5501 95933.047898682111,
5502 95956.514169329268,
5503 95979.981874739708,
5504 96003.451014738006,
5505 96026.921589148798,
5506 96050.393597796792,
5507 96073.867040506724,
5508 96097.341917103375,
5509 96120.818227411626,
5510 96144.295971256375,
5511 96167.775148462577,
5512 96191.255758855244,
5513 96214.737802259449,
5514 96238.221278500292,
5515 96261.70618740299,
5516 96285.192528792715,
5517 96308.680302494788,
5518 96332.169508334526,
5519 96355.660146137321,
5520 96379.152215728609,
5521 96402.645716933868,
5522 96426.14064957868,
5523 96449.637013488609,
5524 96473.134808489311,
5525 96496.63403440651,
5526 96520.134691065963,
5527 96543.636778293469,
5528 96567.140295914898,
5529 96590.645243756153,
5530 96614.151621643221,
5531 96637.659429402134,
5532 96661.168666858954,
5533 96684.679333839798,
5534 96708.191430170875,
5535 96731.70495567839,
5536 96755.219910188665,
5537 96778.736293528011,
5538 96802.254105522836,
5539 96825.77334599958,
5540 96849.29401478474,
5541 96872.816111704873,
5542 96896.339636586577,
5543 96919.864589256511,
5544 96943.390969541389,
5545 96966.918777267958,
5546 96990.448012263048,
5547 97013.978674353522,
5548 97037.510763366285,
5549 97061.044279128328,
5550 97084.579221466673,
5551 97108.115590208385,
5552 97131.653385180587,
5553 97155.19260621049,
5554 97178.733253125291,
5555 97202.2753257523,
5556 97225.81882391886,
5557 97249.363747452342,
5558 97272.910096180189,
5559 97296.457869929916,
5560 97320.007068529041,
5561 97343.557691805196,
5562 97367.109739586012,
5563 97390.663211699197,
5564 97414.218107972498,
5565 97437.774428233737,
5566 97461.332172310766,
5567 97484.891340031507,
5568 97508.451931223899,
5569 97532.013945715982,
5570 97555.577383335811,
5571 97579.142243911512,
5572 97602.708527271257,
5573 97626.276233243261,
5574 97649.845361655811,
5575 97673.415912337223,
5576 97696.987885115886,
5577 97720.561279820206,
5578 97744.1360962787,
5579 97767.712334319876,
5580 97791.289993772341,
5581 97814.869074464703,
5582 97838.449576225685,
5583 97862.031498883996,
5584 97885.614842268449,
5585 97909.199606207883,
5586 97932.785790531183,
5587 97956.37339506732,
5588 97979.962419645264,
5589 98003.552864094076,
5590 98027.144728242856,
5591 98050.738011920766,
5592 98074.332714956996,
5593 98097.928837180807,
5594 98121.526378421506,
5595 98145.125338508456,
5596 98168.725717271067,
5597 98192.327514538789,
5598 98215.930730141132,
5599 98239.535363907664,
5600 98263.141415668011,
5601 98286.748885251814,
5602 98310.357772488816,
5603 98333.968077208759,
5604 98357.579799241488,
5605 98381.192938416847,
5606 98404.807494564782,
5607 98428.42346751524,
5608 98452.040857098269,
5609 98475.659663143917,
5610 98499.27988548232,
5611 98522.901523943656,
5612 98546.524578358163,
5613 98570.149048556093,
5614 98593.774934367786,
5615 98617.402235623624,
5616 98641.030952154048,
5617 98664.661083789513,
5618 98688.292630360564,
5619 98711.925591697771,
5620 98735.559967631794,
5621 98759.195757993293,
5622 98782.832962613014,
5623 98806.471581321734,
5624 98830.111613950285,
5625 98853.753060329575,
5626 98877.39592029051,
5627 98901.040193664099,
5628 98924.68588028138,
5629 98948.33297997342,
5630 98971.981492571387,
5631 98995.63141790645,
5632 99019.282755809851,
5633 99042.935506112874,
5634 99066.589668646877,
5635 99090.245243243233,
5636 99113.902229733401,
5637 99137.560627948857,
5638 99161.220437721131,
5639 99184.881658881859,
5640 99208.544291262631,
5641 99232.208334695169,
5642 99255.87378901121,
5643 99279.540654042547,
5644 99303.208929621018,
5645 99326.878615578535,
5646 99350.549711746993,
5647 99374.222217958435,
5648 99397.896134044888,
5649 99421.571459838422,
5650 99445.248195171211,
5651 99468.926339875441,
5652 99492.605893783344,
5653 99516.286856727209,
5654 99539.969228539398,
5655 99563.653009052287,
5656 99587.338198098325,
5657 99611.024795510006,
5658 99634.712801119866,
5659 99658.402214760499,
5660 99682.093036264545,
5661 99705.785265464699,
5662 99729.478902193689,
5663 99753.173946284325,
5664 99776.870397569437,
5665 99800.56825588191,
5666 99824.267521054688,
5667 99847.968192920773,
5668 99871.670271313182,
5669 99895.373756065004,
5670 99919.078647009388,
5671 99942.78494397951,
5672 99966.492646808634,
5673 99990.20175533001,
5674 100013.91226937699,
5675 100037.62418878295,
5676 100061.33751338134,
5677 100085.05224300563,
5678 100108.76837748935,
5679 100132.4859166661,
5680 100156.2048603695,
5681 100179.92520843323,
5682 100203.64696069101,
5683 100227.37011697664,
5684 100251.09467712394,
5685 100274.82064096678,
5686 100298.54800833909,
5687 100322.27677907483,
5688 100346.00695300807,
5689 100369.73852997283,
5690 100393.47150980328,
5691 100417.20589233354,
5692 100440.94167739789,
5693 100464.67886483055,
5694 100488.41745446586,
5695 100512.1574461382,
5696 100535.89883968196,
5697 100559.64163493161,
5698 100583.38583172169,
5699 100607.13142988674,
5700 100630.87842926137,
5701 100654.62682968024,
5702 100678.37663097809,
5703 100702.12783298964,
5704 100725.88043554971,
5705 100749.63443849317,
5706 100773.38984165489,
5707 100797.14664486986,
5708 100820.90484797307,
5709 100844.66445079957,
5710 100868.42545318443,
5711 100892.18785496285,
5712 100915.95165596998,
5713 100939.71685604109,
5714 100963.48345501146,
5715 100987.25145271645,
5716 101011.02084899142,
5717 101034.79164367182,
5718 101058.56383659317,
5719 101082.33742759094,
5720 101106.11241650078,
5721 101129.88880315828,
5722 101153.66658739912,
5723 101177.44576905905,
5724 101201.22634797383,
5725 101225.00832397929,
5726 101248.7916969113,
5727 101272.57646660579,
5728 101296.36263289873,
5729 101320.15019562612,
5730 101343.93915462404,
5731 101367.7295097286,
5732 101391.52126077596,
5733 101415.31440760233,
5734 101439.10895004397,
5735 101462.9048879372,
5736 101486.70222111834,
5737 101510.50094942382,
5738 101534.30107269008,
5739 101558.10259075361,
5740 101581.90550345098,
5741 101605.70981061876,
5742 101629.5155120936,
5743 101653.32260771218,
5744 101677.13109731126,
5745 101700.9409807276,
5746 101724.75225779804,
5747 101748.56492835947,
5748 101772.37899224881,
5749 101796.19444930303,
5750 101820.01129935916,
5751 101843.82954225427,
5752 101867.64917782549,
5753 101891.47020590997,
5754 101915.29262634492,
5755 101939.11643896763,
5756 101962.94164361537,
5757 101986.76824012553,
5758 102010.59622833549,
5759 102034.42560808272,
5760 102058.25637920471,
5761 102082.08854153901,
5762 102105.9220949232,
5763 102129.75703919494,
5764 102153.59337419191,
5765 102177.43109975185,
5766 102201.27021571253,
5767 102225.1107219118,
5768 102248.95261818753,
5769 102272.79590437764,
5770 102296.64058032009,
5771 102320.48664585294,
5772 102344.33410081422,
5773 102368.18294504205,
5774 102392.03317837461,
5775 102415.88480065008,
5776 102439.73781170673,
5777 102463.59221138287,
5778 102487.44799951684,
5779 102511.30517594704,
5780 102535.1637405119,
5781 102559.02369304992,
5782 102582.88503339965,
5783 102606.74776139967,
5784 102630.61187688859,
5785 102654.4773797051,
5786 102678.34426968795,
5787 102702.21254667587,
5788 102726.08221050771,
5789 102749.95326102231,
5790 102773.8256980586,
5791 102797.69952145554,
5792 102821.57473105213,
5793 102845.45132668741,
5794 102869.32930820051,
5795 102893.20867543056,
5796 102917.08942821674,
5797 102940.97156639832,
5798 102964.85508981455,
5799 102988.73999830478,
5800 103012.6262917084,
5801 103036.51396986481,
5802 103060.40303261351,
5803 103084.293479794,
5804 103108.18531124585,
5805 103132.07852680866,
5806 103155.97312632212,
5807 103179.8691096259,
5808 103203.76647655977,
5809 103227.66522696352,
5810 103251.56536067701,
5811 103275.46687754011,
5812 103299.36977739276,
5813 103323.27406007495,
5814 103347.1797254267,
5815 103371.0867732881,
5816 103394.99520349925,
5817 103418.90501590034,
5818 103442.81621033157,
5819 103466.72878663319,
5820 103490.64274464553,
5821 103514.55808420894,
5822 103538.4748051638,
5823 103562.39290735057,
5824 103586.31239060973,
5825 103610.23325478184,
5826 103634.15549970744,
5827 103658.07912522719,
5828 103682.00413118176,
5829 103705.93051741188,
5830 103729.85828375829,
5831 103753.78743006183,
5832 103777.71795616332,
5833 103801.64986190372,
5834 103825.58314712394,
5835 103849.51781166498,
5836 103873.4538553679,
5837 103897.39127807376,
5838 103921.33007962372,
5839 103945.27025985894,
5840 103969.21181862066,
5841 103993.15475575015,
5842 104017.0990710887,
5843 104041.0447644777,
5844 104064.99183575854,
5845 104088.94028477269,
5846 104112.89011136163,
5847 104136.84131536692,
5848 104160.79389663014,
5849 104184.74785499295,
5850 104208.70319029699,
5851 104232.65990238401,
5852 104256.61799109577,
5853 104280.57745627411,
5854 104304.53829776087,
5855 104328.50051539797,
5856 104352.46410902737,
5857 104376.42907849104,
5858 104400.39542363105,
5859 104424.36314428948,
5860 104448.33224030846,
5861 104472.3027115302,
5862 104496.27455779689,
5863 104520.24777895081,
5864 104544.22237483428,
5865 104568.19834528965,
5866 104592.17569015936,
5867 104616.15440928582,
5868 104640.13450251156,
5869 104664.1159696791,
5870 104688.09881063103,
5871 104712.08302520998,
5872 104736.06861325864,
5873 104760.05557461972,
5874 104784.043909136,
5875 104808.03361665027,
5876 104832.0246970054,
5877 104856.01715004431,
5878 104880.01097560991,
5879 104904.00617354522,
5880 104928.00274369326,
5881 104952.00068589712,
5882 104975.99999999993,
5883 105000.00068584486,
5884 105024.00274327511,
5885 105048.00617213396,
5886 105072.0109722647,
5887 105096.0171435107,
5888 105120.02468571534,
5889 105144.03359872208,
5890 105168.04388237436,
5891 105192.05553651576,
5892 105216.06856098982,
5893 105240.08295564017,
5894 105264.09872031047,
5895 105288.11585484444,
5896 105312.13435908582,
5897 105336.1542328784,
5898 105360.17547606604,
5899 105384.19808849262,
5900 105408.22207000206,
5901 105432.24742043833,
5902 105456.27413964548,
5903 105480.30222746753,
5904 105504.33168374863,
5905 105528.36250833291,
5906 105552.39470106458,
5907 105576.42826178786,
5908 105600.46319034706,
5909 105624.49948658649,
5910 105648.53715035053,
5911 105672.5761814836,
5912 105696.61657983017,
5913 105720.65834523473,
5914 105744.70147754184,
5915 105768.7459765961,
5916 105792.79184224214,
5917 105816.83907432464,
5918 105840.88767268835,
5919 105864.93763717801,
5920 105888.98896763846,
5921 105913.04166391456,
5922 105937.09572585119,
5923 105961.15115329332,
5924 105985.20794608595,
5925 106009.26610407409,
5926 106033.32562710284,
5927 106057.38651501729,
5928 106081.44876766266,
5929 106105.51238488412,
5930 106129.57736652695,
5931 106153.64371243643,
5932 106177.71142245791,
5933 106201.78049643678,
5934 106225.85093421848,
5935 106249.92273564848,
5936 106273.99590057228,
5937 106298.07042883546,
5938 106322.14632028362,
5939 106346.22357476239,
5940 106370.30219211751,
5941 106394.38217219469,
5942 106418.46351483969,
5943 106442.54621989837,
5944 106466.63028721658,
5945 106490.71571664025,
5946 106514.80250801529,
5947 106538.89066118775,
5948 106562.98017600364,
5949 106587.07105230905,
5950 106611.16328995011,
5951 106635.25688877302,
5952 106659.35184862395,
5953 106683.44816934918,
5954 106707.54585079502,
5955 106731.64489280782,
5956 106755.74529523395,
5957 106779.84705791986,
5958 106803.95018071201,
5959 106828.05466345693,
5960 106852.16050600118,
5961 106876.26770819137,
5962 106900.37626987413,
5963 106924.48619089619,
5964 106948.59747110425,
5965 106972.71011034511,
5966 106996.82410846559,
5967 107020.93946531253,
5968 107045.05618073288,
5969 107069.17425457356,
5970 107093.29368668159,
5971 107117.41447690397,
5972 107141.53662508781,
5973 107165.66013108024,
5974 107189.7849947284,
5975 107213.91121587952,
5976 107238.03879438085,
5977 107262.16773007967,
5978 107286.29802282334,
5979 107310.42967245923,
5980 107334.56267883476,
5981 107358.69704179741,
5982 107382.83276119467,
5983 107406.96983687414,
5984 107431.10826868335,
5985 107455.24805646999,
5986 107479.38920008171,
5987 107503.53169936626,
5988 107527.67555417139,
5989 107551.82076434491,
5990 107575.96732973469,
5991 107600.11525018861,
5992 107624.26452555459,
5993 107648.41515568066,
5994 107672.56714041479,
5995 107696.72047960508,
5996 107720.87517309963,
5997 107745.03122074658,
5998 107769.18862239413,
5999 107793.34737789053,
6000 107817.50748708403,
6001 107841.66894982298,
6002 107865.83176595572,
6003 107889.99593533068,
6004 107914.16145779629,
6005 107938.32833320105,
6006 107962.49656139348,
6007 107986.66614222217,
6008 108010.83707553572,
6009 108035.00936118282,
6010 108059.18299901215,
6011 108083.35798887245,
6012 108107.53433061253,
6013 108131.71202408121,
6014 108155.89106912735,
6015 108180.07146559987,
6016 108204.25321334775,
6017 108228.43631221994,
6018 108252.62076206553,
6019 108276.80656273357,
6020 108300.99371407321,
6021 108325.18221593359,
6022 108349.37206816394,
6023 108373.56327061349,
6024 108397.75582313156,
6025 108421.94972556747,
6026 108446.1449777706,
6027 108470.34157959036,
6028 108494.53953087622,
6029 108518.73883147769,
6030 108542.93948124432,
6031 108567.14148002568,
6032 108591.34482767139,
6033 108615.54952403114,
6034 108639.75556895464,
6035 108663.96296229165,
6036 108688.17170389196,
6037 108712.38179360541,
6038 108736.59323128188,
6039 108760.80601677128,
6040 108785.02014992358,
6041 108809.23563058881,
6042 108833.45245861699,
6043 108857.67063385822,
6044 108881.89015616261,
6045 108906.11102538036,
6046 108930.33324136167,
6047 108954.55680395682,
6048 108978.78171301607,
6049 109003.00796838976,
6050 109027.23556992831,
6051 109051.46451748211,
6052 109075.69481090162,
6053 109099.92645003737,
6054 109124.15943473989,
6055 109148.39376485976,
6056 109172.62944024763,
6057 109196.86646075416,
6058 109221.10482623006,
6059 109245.34453652608,
6060 109269.58559149304,
6061 109293.82799098175,
6062 109318.07173484311,
6063 109342.31682292801,
6064 109366.56325508743,
6065 109390.81103117237,
6066 109415.06015103387,
6067 109439.31061452301,
6068 109463.56242149093,
6069 109487.8155717888,
6070 109512.07006526781,
6071 109536.3259017792,
6072 109560.58308117429,
6073 109584.8416033044,
6074 109609.1014680209,
6075 109633.36267517522,
6076 109657.62522461878,
6077 109681.88911620311,
6078 109706.15434977971,
6079 109730.4209252002,
6080 109754.68884231619,
6081 109778.95810097932,
6082 109803.22870104131,
6083 109827.50064235389,
6084 109851.77392476884,
6085 109876.04854813802,
6086 109900.32451231324,
6087 109924.60181714644,
6088 109948.88046248957,
6089 109973.1604481946,
6090 109997.44177411357,
6091 110021.72444009855,
6092 110046.00844600165,
6093 110070.29379167501,
6094 110094.58047697082,
6095 110118.86850174134,
6096 110143.15786583882,
6097 110167.44856911557,
6098 110191.74061142397,
6099 110216.03399261639,
6100 110240.32871254528,
6101 110264.62477106311,
6102 110288.9221680224,
6103 110313.22090327571,
6104 110337.52097667565,
6105 110361.82238807483,
6106 110386.12513732594,
6107 110410.42922428172,
6108 110434.73464879491,
6109 110459.04141071832,
6110 110483.34950990479,
6111 110507.6589462072,
6112 110531.96971947847,
6113 110556.28182957157,
6114 110580.5952763395,
6115 110604.91005963532,
6116 110629.22617931209,
6117 110653.54363522294,
6118 110677.86242722106,
6119 110702.18255515963,
6120 110726.50401889188,
6121 110750.82681827113,
6122 110775.1509531507,
6123 110799.47642338395,
6124 110823.80322882428,
6125 110848.13136932514,
6126 110872.46084474004,
6127 110896.79165492248,
6128 110921.12379972603,
6129 110945.4572790043,
6130 110969.79209261097,
6131 110994.12824039967,
6132 111018.46572222417,
6133 111042.80453793822,
6134 111067.14468739564,
6135 111091.48617045028,
6136 111115.82898695602,
6137 111140.1731367668,
6138 111164.51861973655,
6139 111188.86543571933,
6140 111213.21358456917,
6141 111237.56306614014,
6142 111261.91388028639,
6143 111286.26602686207,
6144 111310.61950572141,
6145 111334.97431671864,
6146 111359.33045970804,
6147 111383.68793454397,
6148 111408.04674108078,
6149 111432.40687917286,
6150 111456.76834867468,
6151 111481.13114944073,
6152 111505.49528132551,
6153 111529.86074418361,
6154 111554.22753786964,
6155 111578.59566223821,
6156 111602.96511714405,
6157 111627.33590244185,
6158 111651.7080179864,
6159 111676.08146363248,
6160 111700.45623923496,
6161 111724.8323446487,
6162 111749.20977972864,
6163 111773.58854432974,
6164 111797.96863830699,
6165 111822.35006151545,
6166 111846.73281381019,
6167 111871.11689504632,
6168 111895.50230507903,
6169 111919.8890437635,
6170 111944.27711095495,
6171 111968.6665065087,
6172 111993.05723028004,
6173 112017.44928212435,
6174 112041.842661897,
6175 112066.23736945343,
6176 112090.63340464912,
6177 112115.03076733962,
6178 112139.42945738042,
6179 112163.82947462716,
6180 112188.23081893545,
6181 112212.63349016097,
6182 112237.03748815943,
6183 112261.44281278658,
6184 112285.84946389822,
6185 112310.25744135017,
6186 112334.66674499828,
6187 112359.07737469849,
6188 112383.48933030672,
6189 112407.90261167898,
6190 112432.31721867126,
6191 112456.73315113965,
6192 112481.15040894024,
6193 112505.56899192919,
6194 112529.98889996267,
6195 112554.41013289688,
6196 112578.8326905881,
6197 112603.25657289263,
6198 112627.68177966679,
6199 112652.10831076698,
6200 112676.53616604958,
6201 112700.96534537108,
6202 112725.39584858794,
6203 112749.82767555672,
6204 112774.26082613398,
6205 112798.6953001763,
6206 112823.13109754038,
6207 112847.56821808286,
6208 112872.00666166049,
6209 112896.44642813003,
6210 112920.88751734827,
6211 112945.32992917208,
6212 112969.77366345831,
6213 112994.21872006389,
6214 113018.66509884578,
6215 113043.11279966099,
6216 113067.56182236652,
6217 113092.01216681948,
6218 113116.46383287695,
6219 113140.9168203961,
6220 113165.37112923413,
6221 113189.82675924824,
6222 113214.28371029573,
6223 113238.74198223387,
6224 113263.20157492002,
6225 113287.66248821157,
6226 113312.12472196593,
6227 113336.58827604055,
6228 113361.05315029295,
6229 113385.51934458067,
6230 113409.98685876124,
6231 113434.45569269233,
6232 113458.92584623155,
6233 113483.39731923661,
6234 113507.87011156522,
6235 113532.34422307517,
6236 113556.81965362425,
6237 113581.2964030703,
6238 113605.77447127122,
6239 113630.25385808491,
6240 113654.73456336933,
6241 113679.2165869825,
6242 113703.69992878241,
6243 113728.18458862718,
6244 113752.67056637487,
6245 113777.15786188368,
6246 113801.64647501177,
6247 113826.13640561736,
6248 113850.62765355874,
6249 113875.12021869418,
6250 113899.61410088204,
6251 113924.1092999807,
6252 113948.60581584855,
6253 113973.10364834407,
6254 113997.60279732574,
6255 114022.1032626521,
6256 114046.60504418171,
6257 114071.10814177318,
6258 114095.61255528514,
6259 114120.11828457628,
6260 114144.62532950533,
6261 114169.13368993104,
6262 114193.6433657122,
6263 114218.15435670764,
6264 114242.66666277625,
6265 114267.18028377694,
6266 114291.69521956862,
6267 114316.21147001031,
6268 114340.72903496103,
6269 114365.24791427983,
6270 114389.7681078258,
6271 114414.2896154581,
6272 114438.81243703589,
6273 114463.33657241837,
6274 114487.8620214648,
6275 114512.38878403447,
6276 114536.91685998671,
6277 114561.44624918087,
6278 114585.97695147636,
6279 114610.5089667326,
6280 114635.04229480909,
6281 114659.57693556532,
6282 114684.11288886084,
6283 114708.65015455526,
6284 114733.18873250818,
6285 114757.72862257928,
6286 114782.26982462825,
6287 114806.81233851484,
6288 114831.35616409882,
6289 114855.90130123998,
6290 114880.44774979822,
6291 114904.99550963337,
6292 114929.5445806054,
6293 114954.09496257425,
6294 114978.64665539992,
6295 115003.19965894247,
6296 115027.75397306195,
6297 115052.30959761847,
6298 115076.86653247218,
6299 115101.42477748329,
6300 115125.984332512,
6301 115150.54519741859,
6302 115175.10737206334,
6303 115199.67085630659,
6304 115224.23565000873,
6305 115248.80175303014,
6306 115273.3691652313,
6307 115297.93788647266,
6308 115322.50791661476,
6309 115347.07925551817,
6310 115371.65190304347,
6311 115396.22585905129,
6312 115420.80112340231,
6313 115445.37769595724,
6314 115469.95557657682,
6315 115494.53476512182,
6316 115519.11526145306,
6317 115543.69706543141,
6318 115568.28017691776,
6319 115592.86459577303,
6320 115617.4503218582,
6321 115642.03735503425,
6322 115666.62569516223,
6323 115691.21534210323,
6324 115715.80629571836,
6325 115740.39855586876,
6326 115764.99212241563,
6327 115789.58699522018,
6328 115814.18317414368,
6329 115838.78065904744,
6330 115863.37944979276,
6331 115887.97954624105,
6332 115912.5809482537,
6333 115937.18365569216,
6334 115961.78766841792,
6335 115986.39298629249,
6336 116010.99960917742,
6337 116035.60753693432,
6338 116060.21676942479,
6339 116084.82730651053,
6340 116109.43914805322,
6341 116134.0522939146,
6342 116158.66674395646,
6343 116183.2824980406,
6344 116207.89955602887,
6345 116232.51791778316,
6346 116257.13758316539,
6347 116281.75855203751,
6348 116306.38082426153,
6349 116331.00439969949,
6350 116355.62927821343,
6351 116380.25545966547,
6352 116404.88294391775,
6353 116429.51173083246,
6354 116454.14182027178,
6355 116478.77321209799,
6356 116503.40590617337,
6357 116528.03990236025,
6358 116552.67520052097,
6359 116577.31180051794,
6360 116601.94970221359,
6361 116626.5889054704,
6362 116651.22941015086,
6363 116675.87121611751,
6364 116700.51432323294,
6365 116725.15873135976,
6366 116749.8044403606,
6367 116774.45145009817,
6368 116799.0997604352,
6369 116823.74937123443,
6370 116848.40028235866,
6371 116873.05249367072,
6372 116897.70600503348,
6373 116922.36081630984,
6374 116947.01692736275,
6375 116971.67433805518,
6376 116996.33304825013,
6377 117020.99305781067,
6378 117045.65436659988,
6379 117070.31697448085,
6380 117094.98088131678,
6381 117119.64608697082,
6382 117144.31259130624,
6383 117168.98039418629,
6384 117193.64949547425,
6385 117218.31989503348,
6386 117242.99159272734,
6387 117267.66458841923,
6388 117292.33888197262,
6389 117317.01447325097,
6390 117341.6913621178,
6391 117366.36954843666,
6392 117391.04903207115,
6393 117415.72981288488,
6394 117440.41189074152,
6395 117465.09526550474,
6396 117489.77993703831,
6397 117514.46590520597,
6398 117539.15316987153,
6399 117563.84173089883,
6400 117588.53158815173,
6401 117613.22274149416,
6402 117637.91519079007,
6403 117662.60893590341,
6404 117687.30397669821,
6405 117712.00031303853,
6406 117736.69794478847,
6407 117761.39687181212,
6408 117786.09709397367,
6409 117810.7986111373,
6410 117835.50142316725,
6411 117860.20552992777,
6412 117884.91093128319,
6413 117909.6176270978,
6414 117934.32561723603,
6415 117959.03490156225,
6416 117983.74547994092,
6417 118008.45735223651,
6418 118033.17051831353,
6419 118057.88497803656,
6420 118082.60073127014,
6421 118107.31777787894,
6422 118132.03611772758,
6423 118156.75575068076,
6424 118181.47667660323,
6425 118206.19889535972,
6426 118230.92240681504,
6427 118255.64721083404,
6428 118280.37330728157,
6429 118305.10069602253,
6430 118329.82937692189,
6431 118354.55934984458,
6432 118379.29061465565,
6433 118404.02317122012,
6434 118428.75701940308,
6435 118453.49215906965,
6436 118478.22859008498,
6437 118502.96631231424,
6438 118527.70532562268,
6439 118552.44562987552,
6440 118577.18722493808,
6441 118601.93011067568,
6442 118626.67428695368,
6443 118651.41975363747,
6444 118676.16651059251,
6445 118700.91455768423,
6446 118725.66389477813,
6447 118750.41452173979,
6448 118775.16643843475,
6449 118799.91964472862,
6450 118824.67414048707,
6451 118849.42992557574,
6452 118874.18699986035,
6453 118898.94536320666,
6454 118923.70501548045,
6455 118948.46595654752,
6456 118973.22818627374,
6457 118997.99170452499,
6458 119022.7565111672,
6459 119047.52260606633,
6460 119072.28998908834,
6461 119097.0586600993,
6462 119121.82861896523,
6463 119146.59986555226,
6464 119171.3723997265,
6465 119196.14622135412,
6466 119220.92133030134,
6467 119245.69772643436,
6468 119270.47540961947,
6469 119295.25437972297,
6470 119320.03463661121,
6471 119344.81618015055,
6472 119369.5990102074,
6473 119394.38312664822,
6474 119419.16852933947,
6475 119443.95521814766,
6476 119468.74319293935,
6477 119493.53245358112,
6478 119518.32299993958,
6479 119543.11483188139,
6480 119567.90794927324,
6481 119592.70235198183,
6482 119617.49803987393,
6483 119642.29501281632,
6484 119667.09327067583,
6485 119691.89281331931,
6486 119716.69364061367,
6487 119741.49575242582,
6488 119766.29914862274,
6489 119791.10382907141,
6490 119815.90979363887,
6491 119840.71704219218,
6492 119865.52557459843,
6493 119890.33539072477,
6494 119915.14649043836,
6495 119939.95887360642,
6496 119964.77254009615,
6497 119989.58748977486,
6498 120014.40372250983,
6499 120039.22123816841,
6500 120064.04003661797,
6501 120088.86011772591,
6502 120113.6814813597,
6503 120138.5041273868,
6504 120163.3280556747,
6505 120188.15326609099,
6506 120212.97975850321,
6507 120237.807532779,
6508 120262.63658878599,
6509 120287.46692639188,
6510 120312.29854546436,
6511 120337.13144587121,
6512 120361.9656274802,
6513 120386.80109015915,
6514 120411.63783377589,
6515 120436.47585819835,
6516 120461.31516329442,
6517 120486.15574893207,
6518 120510.99761497928,
6519 120535.84076130406,
6520 120560.68518777451,
6521 120585.53089425867,
6522 120610.3778806247,
6523 120635.22614674074,
6524 120660.07569247499,
6525 120684.92651769568,
6526 120709.77862227106,
6527 120734.63200606944,
6528 120759.48666895913,
6529 120784.3426108085,
6530 120809.19983148595,
6531 120834.05833085992,
6532 120858.91810879884,
6533 120883.77916517125,
6534 120908.64149984565,
6535 120933.5051126906,
6536 120958.37000357473,
6537 120983.23617236665,
6538 121008.10361893504,
6539 121032.97234314861,
6540 121057.84234487606,
6541 121082.71362398617,
6542 121107.58618034775,
6543 121132.46001382964,
6544 121157.33512430069,
6545 121182.21151162982,
6546 121207.08917568595,
6547 121231.96811633807,
6548 121256.84833345517,
6549 121281.72982690629,
6550 121306.61259656049,
6551 121331.49664228689,
6552 121356.38196395461,
6553 121381.26856143285,
6554 121406.15643459078,
6555 121431.04558329767,
6556 121455.93600742276,
6557 121480.82770683538,
6558 121505.72068140487,
6559 121530.61493100057,
6560 121555.51045549192,
6561 121580.40725474835,
6562 121605.30532863933,
6563 121630.20467703436,
6564 121655.10529980299,
6565 121680.00719681478,
6566 121704.91036793934,
6567 121729.81481304632,
6568 121754.72053200539,
6569 121779.62752468624,
6570 121804.53579095862,
6571 121829.44533069231,
6572 121854.3561437571,
6573 121879.26823002285,
6574 121904.1815893594,
6575 121929.09622163669,
6576 121954.01212672464,
6577 121978.92930449323,
6578 122003.84775481246,
6579 122028.76747755238,
6580 122053.68847258303,
6581 122078.61073977455,
6582 122103.53427899707,
6583 122128.45909012076,
6584 122153.38517301581,
6585 122178.31252755247,
6586 122203.24115360099,
6587 122228.17105103172,
6588 122253.10221971494,
6589 122278.03465952107,
6590 122302.96837032049,
6591 122327.90335198362,
6592 122352.83960438096,
6593 122377.777127383,
6594 122402.71592086025,
6595 122427.65598468333,
6596 122452.59731872278,
6597 122477.53992284928,
6598 122502.48379693348,
6599 122527.42894084606,
6600 122552.37535445779,
6601 122577.32303763942,
6602 122602.27199026172,
6603 122627.22221219557,
6604 122652.17370331181,
6605 122677.12646348133,
6606 122702.08049257506,
6607 122727.03579046397,
6608 122751.99235701906,
6609 122776.95019211136,
6610 122801.9092956119,
6611 122826.8696673918,
6612 122851.83130732219,
6613 122876.79421527422,
6614 122901.75839111909,
6615 122926.72383472799,
6616 122951.69054597223,
6617 122976.65852472307,
6618 123001.62777085182,
6619 123026.59828422987,
6620 123051.57006472857,
6621 123076.54311221937,
6622 123101.5174265737,
6623 123126.49300766307,
6624 123151.46985535898,
6625 123176.44796953299,
6626 123201.42735005668,
6627 123226.40799680166,
6628 123251.38990963959,
6629 123276.37308844214,
6630 123301.35753308103,
6631 123326.343243428,
6632 123351.33021935483,
6633 123376.31846073334,
6634 123401.30796743535,
6635 123426.29873933276,
6636 123451.29077629748,
6637 123476.28407820144,
6638 123501.2786449166,
6639 123526.27447631498,
6640 123551.27157226863,
6641 123576.26993264959,
6642 123601.26955732999,
6643 123626.27044618195,
6644 123651.27259907764,
6645 123676.27601588926,
6646 123701.28069648903,
6647 123726.28664074924,
6648 123751.29384854218,
6649 123776.30231974016,
6650 123801.31205421555,
6651 123826.32305184075,
6652 123851.33531248817,
6653 123876.34883603029,
6654 123901.36362233957,
6655 123926.37967128855,
6656 123951.39698274979,
6657 123976.41555659588,
6658 124001.43539269941,
6659 124026.45649093305,
6660 124051.47885116948,
6661 124076.50247328142,
6662 124101.5273571416,
6663 124126.55350262282,
6664 124151.58090959788,
6665 124176.60957793961,
6666 124201.63950752091,
6667 124226.67069821467,
6668 124251.70314989384,
6669 124276.73686243138,
6670 124301.7718357003,
6671 124326.80806957364,
6672 124351.84556392446,
6673 124376.88431862585,
6674 124401.92433355095,
6675 124426.96560857294,
6676 124452.00814356498,
6677 124477.05193840031,
6678 124502.0969929522,
6679 124527.14330709392,
6680 124552.19088069882,
6681 124577.23971364023,
6682 124602.28980579154,
6683 124627.34115702618,
6684 124652.3937672176,
6685 124677.44763623926,
6686 124702.50276396469,
6687 124727.55915026742,
6688 124752.61679502104,
6689 124777.67569809916,
6690 124802.73585937542,
6691 124827.79727872348,
6692 124852.85995601704,
6693 124877.92389112986,
6694 124902.98908393568,
6695 124928.05553430831,
6696 124953.1232421216,
6697 124978.19220724938,
6698 125003.26242956554,
6699 125028.33390894404,
6700 125053.40664525882,
6701 125078.48063838384,
6702 125103.55588819318,
6703 125128.63239456083,
6704 125153.71015736091,
6705 125178.78917646752,
6706 125203.86945175481,
6707 125228.95098309696,
6708 125254.03377036817,
6709 125279.1178134427,
6710 125304.20311219479,
6711 125329.28966649878,
6712 125354.37747622898,
6713 125379.46654125977,
6714 125404.55686146552,
6715 125429.6484367207,
6716 125454.74126689974,
6717 125479.83535187715,
6718 125504.93069152744,
6719 125530.02728572517,
6720 125555.12513434493,
6721 125580.22423726133,
6722 125605.32459434902,
6723 125630.4262054827,
6724 125655.52907053704,
6725 125680.63318938682,
6726 125705.73856190679,
6727 125730.84518797178,
6728 125755.9530674566,
6729 125781.06220023613,
6730 125806.17258618528,
6731 125831.28422517896,
6732 125856.39711709213,
6733 125881.51126179981,
6734 125906.62665917698,
6735 125931.74330909875,
6736 125956.86121144016,
6737 125981.98036607634,
6738 126007.10077288245,
6739 126032.22243173365,
6740 126057.34534250517,
6741 126082.46950507225,
6742 126107.59491931014,
6743 126132.72158509417,
6744 126157.84950229966,
6745 126182.97867080198,
6746 126208.10909047653,
6747 126233.24076119871,
6748 126258.37368284403,
6749 126283.50785528794,
6750 126308.64327840599,
6751 126333.77995207369,
6752 126358.91787616667,
6753 126384.0570505605,
6754 126409.19747513086,
6755 126434.3391497534,
6756 126459.48207430386,
6757 126484.62624865794,
6758 126509.77167269142,
6759 126534.9183462801,
6760 126560.06626929982,
6761 126585.21544162642,
6762 126610.36586313581,
6763 126635.51753370393,
6764 126660.67045320668,
6765 126685.82462152008,
6766 126710.98003852014,
6767 126736.13670408291,
6768 126761.29461808444,
6769 126786.45378040087,
6770 126811.61419090834,
6771 126836.77584948298,
6772 126861.93875600102,
6773 126887.10291033868,
6774 126912.26831237224,
6775 126937.43496197795,
6776 126962.60285903217,
6777 126987.77200341123,
6778 127012.94239499152,
6779 127038.11403364947,
6780 127063.2869192615,
6781 127088.46105170409,
6782 127113.63643085376,
6783 127138.81305658702,
6784 127163.99092878048,
6785 127189.17004731069,
6786 127214.35041205429,
6787 127239.53202288797,
6788 127264.71487968838,
6789 127289.89898233226,
6790 127315.08433069635,
6791 127340.27092465744,
6792 127365.45876409234,
6793 127390.64784887788,
6794 127415.83817889093,
6795 127441.02975400841,
6796 127466.22257410725,
6797 127491.41663906439,
6798 127516.61194875685,
6799 127541.80850306165,
6800 127567.00630185583,
6801 127592.20534501647,
6802 127617.4056324207,
6803 127642.60716394568,
6804 127667.80993946856,
6805 127693.01395886653,
6806 127718.21922201688,
6807 127743.42572879682,
6808 127768.63347908368,
6809 127793.84247275478,
6810 127819.05270968749,
6811 127844.26418975917,
6812 127869.47691284724,
6813 127894.69087882918,
6814 127919.90608758242,
6815 127945.12253898452,
6816 127970.34023291297,
6817 127995.55916924537,
6818 128020.77934785932,
6819 128046.00076863244,
6820 128071.22343144237,
6821 128096.44733616684,
6822 128121.67248268353,
6823 128146.89887087021,
6824 128172.12650060465,
6825 128197.35537176467,
6826 128222.5854842281,
6827 128247.81683787282,
6828 128273.04943257671,
6829 128298.28326821771,
6830 128323.51834467379,
6831 128348.75466182294,
6832 128373.99221954317,
6833 128399.23101771252,
6834 128424.47105620909,
6835 128449.71233491098,
6836 128474.95485369631,
6837 128500.19861244329,
6838 128525.44361103009,
6839 128550.68984933494,
6840 128575.93732723613,
6841 128601.18604461191,
6842 128626.43600134061,
6843 128651.68719730059,
6844 128676.93963237021,
6845 128702.1933064279,
6846 128727.44821935208,
6847 128752.70437102125,
6848 128777.96176131385,
6849 128803.22039010846,
6850 128828.48025728362,
6851 128853.74136271792,
6852 128879.00370628996,
6853 128904.26728787841,
6854 128929.53210736193,
6855 128954.79816461923,
6856 128980.06545952905,
6857 129005.33399197015,
6858 129030.60376182134,
6859 129055.87476896142,
6860 129081.14701326926,
6861 129106.42049462376,
6862 129131.6952129038,
6863 129156.97116798835,
6864 129182.24835975636,
6865 129207.52678808685,
6866 129232.80645285884,
6867 129258.08735395141,
6868 129283.36949124365,
6869 129308.65286461466,
6870 129333.9374739436,
6871 129359.22331910966,
6872 129384.51039999202,
6873 129409.79871646997,
6874 129435.08826842274,
6875 129460.37905572963,
6876 129485.67107826998,
6877 129510.96433592314,
6878 129536.25882856851,
6879 129561.55455608548,
6880 129586.85151835352,
6881 129612.14971525209,
6882 129637.4491466607,
6883 129662.74981245887,
6884 129688.0517125262,
6885 129713.35484674224,
6886 129738.65921498663,
6887 129763.96481713903,
6888 129789.27165307909,
6889 129814.57972268655,
6890 129839.88902584116,
6891 129865.19956242264,
6892 129890.51133231082,
6893 129915.82433538554,
6894 129941.13857152662,
6895 129966.45404061397,
6896 129991.7707425275,
6897 130017.08867714716,
6898 130042.4078443529,
6899 130067.72824402474,
6900 130093.04987604271,
6901 130118.37274028687,
6902 130143.69683663732,
6903 130169.02216497416,
6904 130194.34872517755,
6905 130219.67651712766,
6906 130245.0055407047,
6907 130270.33579578891,
6908 130295.66728226055,
6909 130320.99999999991,
6910 130346.33394888733,
6911 130371.66912880314,
6912 130397.00553962773,
6913 130422.34318124152,
6914 130447.68205352494,
6915 130473.02215635845,
6916 130498.36348962256,
6917 130523.70605319779,
6918 130549.0498469647,
6919 130574.39487080388,
6920 130599.74112459592,
6921 130625.08860822149,
6922 130650.43732156123,
6923 130675.78726449587,
6924 130701.13843690613,
6925 130726.49083867275,
6926 130751.84446967654,
6927 130777.19932979831,
6928 130802.5554189189,
6929 130827.91273691918,
6930 130853.27128368006,
6931 130878.63105908247,
6932 130903.99206300738,
6933 130929.35429533575,
6934 130954.71775594862,
6935 130980.08244472703,
6936 131005.44836155206,
6937 131030.81550630482,
6938 131056.18387886642,
6939 131081.55347911804,
6940 131106.92430694087,
6941 131132.29636221612,
6942 131157.66964482504,
6943 131183.0441546489,
6944 131208.41989156904,
6945 131233.79685546676,
6946 131259.17504622342,
6947 131284.55446372041,
6948 131309.93510783918,
6949 131335.31697846117,
6950 131360.70007546784,
6951 131386.0843987407,
6952 131411.46994816128,
6953 131436.85672361116,
6954 131462.24472497194,
6955 131487.63395212521,
6956 131513.02440495262,
6957 131538.41608333588,
6958 131563.80898715663,
6959 131589.2031162967,
6960 131614.59847063778,
6961 131639.9950500617,
6962 131665.39285445024,
6963 131690.79188368531,
6964 131716.19213764873,
6965 131741.59361622241,
6966 131766.99631928833,
6967 131792.40024672839,
6968 131817.80539842462,
6969 131843.21177425905,
6970 131868.61937411371,
6971 131894.02819787065,
6972 131919.43824541202,
6973 131944.84951661993,
6974 131970.26201137656,
6975 131995.67572956407,
6976 132021.09067106468,
6977 132046.50683576067,
6978 132071.9242235343,
6979 132097.34283426782,
6980 132122.76266784366,
6981 132148.1837241441,
6982 132173.60600305157,
6983 132199.02950444847,
6984 132224.45422821722,
6985 132249.88017424036,
6986 132275.30734240031,
6987 132300.73573257966,
6988 132326.16534466096,
6989 132351.59617852676,
6990 132377.02823405969,
6991 132402.46151114244,
6992 132427.89600965759,
6993 132453.33172948789,
6994 132478.76867051609,
6995 132504.20683262491,
6996 132529.64621569714,
6997 132555.08681961559,
6998 132580.5286442631,
6999 132605.97168952253,
7000 132631.41595527678,
7001 132656.86144140881,
7002 132682.30814780149,
7003 132707.75607433787,
7004 132733.20522090094,
7005 132758.65558737374,
7006 132784.10717363929,
7007 132809.55997958075,
7008 132835.01400508118,
7009 132860.46925002377,
7010 132885.92571429166,
7011 132911.38339776811,
7012 132936.84230033628,
7013 132962.30242187946,
7014 132987.76376228096,
7015 133013.22632142407,
7016 133038.69009919214,
7017 133064.15509546854,
7018 133089.62131013666,
7019 133115.08874307995,
7020 133140.55739418184,
7021 133166.02726332581,
7022 133191.49835039541,
7023 133216.97065527414,
7024 133242.44417784561,
7025 133267.91891799335,
7026 133293.39487560102,
7027 133318.87205055228,
7028 133344.35044273079,
7029 133369.83005202023,
7030 133395.31087830439,
7031 133420.79292146701,
7032 133446.27618139185,
7033 133471.76065796276,
7034 133497.24635106357,
7035 133522.73326057816,
7036 133548.22138639039,
7037 133573.71072838426,
7038 133599.20128644365,
7039 133624.69306045261,
7040 133650.1860502951,
7041 133675.68025585517,
7042 133701.1756770169,
7043 133726.67231366437,
7044 133752.17016568172,
7045 133777.66923295305,
7046 133803.16951536259,
7047 133828.67101279454,
7048 133854.17372513309,
7049 133879.67765226253,
7050 133905.18279406714,
7051 133930.68915043125,
7052 133956.19672123916,
7053 133981.70550637526,
7054 134007.21550572399,
7055 134032.7267191697,
7056 134058.23914659687,
7057 134083.75278789,
7058 134109.26764293358,
7059 134134.78371161217,
7060 134160.30099381026,
7061 134185.8194894125,
7062 134211.33919830353,
7063 134236.8601203679,
7064 134262.38225549037,
7065 134287.90560355558,
7066 134313.43016444831,
7067 134338.95593805326,
7068 134364.48292425525,
7069 134390.01112293909,
7070 134415.54053398955,
7071 134441.07115729159,
7072 134466.60299273001,
7073 134492.1360401898,
7074 134517.67029955584,
7075 134543.20577071316,
7076 134568.74245354676,
7077 134594.28034794159,
7078 134619.81945378278,
7079 134645.35977095537,
7080 134670.90129934452,
7081 134696.4440388353,
7082 134721.98798931291,
7083 134747.53315066252,
7084 134773.07952276937,
7085 134798.62710551871,
7086 134824.17589879577,
7087 134849.72590248589,
7088 134875.27711647438,
7089 134900.82954064661,
7090 134926.38317488792,
7091 134951.93801908373,
7092 134977.49407311951,
7093 135003.05133688069,
7094 135028.60981025276,
7095 135054.16949312127,
7096 135079.73038537172,
7097 135105.29248688967,
7098 135130.85579756077,
7099 135156.42031727062,
7100 135181.98604590484,
7101 135207.55298334916,
7102 135233.12112948924,
7103 135258.69048421088,
7104 135284.26104739975,
7105 135309.83281894168,
7106 135335.4057987225,
7107 135360.97998662802,
7108 135386.55538254412,
7109 135412.13198635669,
7110 135437.70979795168,
7111 135463.28881721498,
7112 135488.86904403262,
7113 135514.45047829056,
7114 135540.03311987486,
7115 135565.61696867159,
7116 135591.20202456677,
7117 135616.78828744654,
7118 135642.37575719706,
7119 135667.96443370447,
7120 135693.55431685498,
7121 135719.14540653475,
7122 135744.73770263011,
7123 135770.33120502727,
7124 135795.92591361253,
7125 135821.52182827223,
7126 135847.11894889272,
7127 135872.7172753604,
7128 135898.31680756161,
7129 135923.91754538284,
7130 135949.51948871053,
7131 135975.12263743114,
7132 136000.72699143123,
7133 136026.33255059729,
7134 136051.93931481591,
7135 136077.54728397369,
7136 136103.15645795723,
7137 136128.76683665317,
7138 136154.37841994822,
7139 136179.99120772901,
7140 136205.60519988232,
7141 136231.2203962949,
7142 136256.83679685349,
7143 136282.45440144493,
7144 136308.07320995603,
7145 136333.69322227367,
7146 136359.31443828469,
7147 136384.93685787608,
7148 136410.56048093468,
7149 136436.18530734754,
7150 136461.81133700156,
7151 136487.43856978384,
7152 136513.06700558143,
7153 136538.6966442813,
7154 136564.32748577066,
7155 136589.95952993655,
7156 136615.59277666616,
7157 136641.22722584667,
7158 136666.86287736523,
7159 136692.49973110916,
7160 136718.13778696564,
7161 136743.77704482197,
7162 136769.41750456547,
7163 136795.05916608346,
7164 136820.70202926331,
7165 136846.34609399244,
7166 136871.99136015819,
7167 136897.63782764805,
7168 136923.28549634948,
7169 136948.93436614997,
7170 136974.58443693706,
7171 137000.23570859825,
7172 137025.88818102115,
7173 137051.54185409332,
7174 137077.19672770242,
7175 137102.85280173609,
7176 137128.51007608202,
7177 137154.16855062786,
7178 137179.82822526142,
7179 137205.48909987041,
7180 137231.15117434258,
7181 137256.8144485658,
7182 137282.47892242789,
7183 137308.14459581667,
7184 137333.81146862009,
7185 137359.47954072602,
7186 137385.14881202241,
7187 137410.81928239719,
7188 137436.49095173844,
7189 137462.16381993407,
7190 137487.83788687221,
7191 137513.51315244089,
7192 137539.18961652822,
7193 137564.86727902229,
7194 137590.54613981131,
7195 137616.22619878338,
7196 137641.90745582676,
7197 137667.58991082967,
7198 137693.27356368033,
7199 137718.95841426702,
7200 137744.64446247809,
7201 137770.33170820182,
7202 137796.02015132661,
7203 137821.70979174081,
7204 137847.40062933284,
7205 137873.09266399115,
7206 137898.78589560417,
7207 137924.48032406042,
7208 137950.17594924837,
7209 137975.8727710566,
7210 138001.57078937365,
7211 138027.27000408815,
7212 138052.97041508864,
7213 138078.67202226384,
7214 138104.3748255024,
7215 138130.07882469296,
7216 138155.78401972432,
7217 138181.49041048516,
7218 138207.1979968643,
7219 138232.9067787505,
7220 138258.61675603263,
7221 138284.32792859949,
7222 138310.04029633995,
7223 138335.75385914298,
7224 138361.46861689744,
7225 138387.18456949232,
7226 138412.90171681659,
7227 138438.62005875923,
7228 138464.33959520931,
7229 138490.06032605586,
7230 138515.78225118798,
7231 138541.50537049473,
7232 138567.2296838653,
7233 138592.95519118884,
7234 138618.68189235451,
7235 138644.40978725153,
7236 138670.13887576913,
7237 138695.86915779658,
7238 138721.60063322316,
7239 138747.33330193823,
7240 138773.06716383106,
7241 138798.80221879104,
7242 138824.53846670757,
7243 138850.27590747006,
7244 138876.01454096794,
7245 138901.7543670907,
7246 138927.49538572782,
7247 138953.2375967688,
7248 138978.9810001032,
7249 139004.72559562061,
7250 139030.47138321059,
7251 139056.2183627628,
7252 139081.96653416683,
7253 139107.71589731239,
7254 139133.46645208917,
7255 139159.21819838689,
7256 139184.97113609532,
7257 139210.72526510421,
7258 139236.48058530336,
7259 139262.23709658257,
7260 139287.99479883176,
7261 139313.75369194071,
7262 139339.51377579942,
7263 139365.27505029776,
7264 139391.03751532568,
7265 139416.80117077316,
7266 139442.56601653024,
7267 139468.33205248689,
7268 139494.09927853322,
7269 139519.86769455927,
7270 139545.63730045516,
7271 139571.408096111,
7272 139597.18008141697,
7273 139622.95325626322,
7274 139648.72762054001,
7275 139674.5031741375,
7276 139700.27991694602,
7277 139726.05784885579,
7278 139751.83696975713,
7279 139777.61727954043,
7280 139803.39877809596,
7281 139829.18146531415,
7282 139854.96534108539,
7283 139880.75040530015,
7284 139906.53665784886,
7285 139932.32409862199,
7286 139958.11272751007,
7287 139983.90254440365,
7288 140009.69354919327,
7289 140035.48574176949,
7290 140061.27912202294,
7291 140087.07368984428,
7292 140112.86944512415,
7293 140138.66638775321,
7294 140164.4645176222,
7295 140190.26383462184,
7296 140216.06433864293,
7297 140241.86602957622,
7298 140267.66890731253,
7299 140293.47297174268,
7300 140319.27822275754,
7301 140345.08466024802,
7302 140370.89228410498,
7303 140396.70109421943,
7304 140422.51109048226,
7305 140448.32227278448,
7306 140474.13464101712,
7307 140499.94819507122,
7308 140525.76293483781,
7309 140551.57886020801,
7310 140577.3959710729,
7311 140603.21426732364,
7312 140629.03374885136,
7313 140654.85441554731,
7314 140680.67626730262,
7315 140706.49930400858,
7316 140732.32352555645,
7317 140758.1489318375,
7318 140783.97552274304,
7319 140809.80329816442,
7320 140835.63225799298,
7321 140861.46240212015,
7322 140887.29373043729,
7323 140913.12624283586,
7324 140938.95993920733,
7325 140964.79481944317,
7326 140990.63088343487,
7327 141016.46813107401,
7328 141042.30656225214,
7329 141068.14617686081,
7330 141093.98697479168,
7331 141119.82895593636,
7332 141145.6721201865,
7333 141171.51646743377,
7334 141197.36199756994,
7335 141223.20871048668,
7336 141249.05660607578,
7337 141274.90568422904,
7338 141300.75594483822,
7339 141326.6073877952,
7340 141352.4600129918,
7341 141378.31382031992,
7342 141404.16880967148,
7343 141430.02498093838,
7344 141455.8823340126,
7345 141481.74086878612,
7346 141507.60058515094,
7347 141533.46148299909,
7348 141559.32356222265,
7349 141585.18682271364,
7350 141611.05126436421,
7351 141636.9168870665,
7352 141662.78369071262,
7353 141688.65167519479,
7354 141714.5208404052,
7355 141740.39118623605,
7356 141766.26271257963,
7357 141792.1354193282,
7358 141818.00930637406,
7359 141843.88437360956,
7360 141869.760620927,
7361 141895.6380482188,
7362 141921.51665537735,
7363 141947.39644229505,
7364 141973.27740886438,
7365 141999.15955497778,
7366 142025.04288052776,
7367 142050.92738540689,
7368 142076.81306950765,
7369 142102.69993272264,
7370 142128.58797494444,
7371 142154.47719606571,
7372 142180.36759597904,
7373 142206.25917457714,
7374 142232.15193175265,
7375 142258.04586739838,
7376 142283.94098140698,
7377 142309.83727367126,
7378 142335.73474408401,
7379 142361.63339253806,
7380 142387.5332189262,
7381 142413.43422314132,
7382 142439.33640507635,
7383 142465.23976462413,
7384 142491.14430167765,
7385 142517.05001612983,
7386 142542.95690787368,
7387 142568.86497680223,
7388 142594.77422280848,
7389 142620.68464578551,
7390 142646.5962456264,
7391 142672.50902222423,
7392 142698.42297547215,
7393 142724.33810526333,
7394 142750.25441149093,
7395 142776.17189404817,
7396 142802.09055282827,
7397 142828.01038772447,
7398 142853.93139863008,
7399 142879.85358543837,
7400 142905.77694804268,
7401 142931.70148633636,
7402 142957.62720021277,
7403 142983.55408956532,
7404 143009.48215428743,
7405 143035.41139427255,
7406 143061.34180941415,
7407 143087.27339960571,
7408 143113.20616474075,
7409 143139.14010471283,
7410 143165.07521941551,
7411 143191.01150874238,
7412 143216.94897258704,
7413 143242.88761084314,
7414 143268.82742340435,
7415 143294.76841016437,
7416 143320.71057101688,
7417 143346.65390585564,
7418 143372.59841457437,
7419 143398.54409706692,
7420 143424.49095322701,
7421 143450.43898294857,
7422 143476.38818612538,
7423 143502.33856265133,
7424 143528.29011242036,
7425 143554.24283532638,
7426 143580.19673126334,
7427 143606.1518001252,
7428 143632.10804180597,
7429 143658.06545619969,
7430 143684.02404320039,
7431 143709.98380270213,
7432 143735.944734599,
7433 143761.90683878519,
7434 143787.87011515474,
7435 143813.83456360188,
7436 143839.8001840208,
7437 143865.76697630569,
7438 143891.73494035081,
7439 143917.7040760504,
7440 143943.67438329876,
7441 143969.6458619902,
7442 143995.61851201905,
7443 144021.59233327967,
7444 144047.56732566646,
7445 144073.54348907378,
7446 144099.52082339607,
7447 144125.49932852783,
7448 144151.4790043635,
7449 144177.45985079758,
7450 144203.44186772458,
7451 144229.42505503909,
7452 144255.40941263564,
7453 144281.39494040885,
7454 144307.38163825331,
7455 144333.36950606373,
7456 144359.35854373468,
7457 144385.34875116093,
7458 144411.34012823718,
7459 144437.33267485813,
7460 144463.32639091855,
7461 144489.32127631325,
7462 144515.31733093705,
7463 144541.31455468474,
7464 144567.3129474512,
7465 144593.3125091313,
7466 144619.31323961995,
7467 144645.31513881206,
7468 144671.31820660262,
7469 144697.32244288657,
7470 144723.32784755889,
7471 144749.33442051467,
7472 144775.34216164888,
7473 144801.35107085665,
7474 144827.36114803303,
7475 144853.37239307314,
7476 144879.38480587213,
7477 144905.39838632516,
7478 144931.41313432742,
7479 144957.4290497741,
7480 144983.44613256046,
7481 145009.46438258173,
7482 145035.48379973322,
7483 145061.50438391021,
7484 145087.52613500805,
7485 145113.54905292206,
7486 145139.57313754765,
7487 145165.59838878017,
7488 145191.62480651509,
7489 145217.65239064783,
7490 145243.68114107384,
7491 145269.71105768863,
7492 145295.74214038774,
7493 145321.77438906668,
7494 145347.80780362099,
7495 145373.84238394629,
7496 145399.87812993818,
7497 145425.91504149229,
7498 145451.95311850426,
7499 145477.9923608698,
7500 145504.03276848458,
7501 145530.07434124436,
7502 145556.11707904484,
7503 145582.16098178181,
7504 145608.20604935108,
7505 145634.25228164849,
7506 145660.29967856981,
7507 145686.34824001096,
7508 145712.39796586783,
7509 145738.4488560363,
7510 145764.50091041232,
7511 145790.55412889185,
7512 145816.60851137087,
7513 145842.66405774537,
7514 145868.72076791141,
7515 145894.77864176501,
7516 145920.83767920226,
7517 145946.89788011924,
7518 145972.95924441208,
7519 145999.02177197693,
7520 146025.08546270995,
7521 146051.15031650732,
7522 146077.21633326527,
7523 146103.28351288004,
7524 146129.35185524789,
7525 146155.42136026506,
7526 146181.49202782792,
7527 146207.56385783272,
7528 146233.63685017588,
7529 146259.71100475377,
7530 146285.78632146274,
7531 146311.86280019928,
7532 146337.94044085976,
7533 146364.01924334071,
7534 146390.09920753856,
7535 146416.18033334985,
7536 146442.26262067116,
7537 146468.34606939898,
7538 146494.43067942993,
7539 146520.51645066062,
7540 146546.60338298764,
7541 146572.69147630769,
7542 146598.78073051744,
7543 146624.87114551352,
7544 146650.96272119274,
7545 146677.05545745179,
7546 146703.14935418745,
7547 146729.2444112965,
7548 146755.34062867577,
7549 146781.43800622207,
7550 146807.53654383228,
7551 146833.63624140329,
7552 146859.73709883197,
7553 146885.83911601527,
7554 146911.94229285014,
7555 146938.04662923355,
7556 146964.15212506248,
7557 146990.25878023397,
7558 147016.36659464505,
7559 147042.47556819281,
7560 147068.58570077427,
7561 147094.6969922866,
7562 147120.80944262692,
7563 147146.92305169237,
7564 147173.03781938017,
7565 147199.15374558745,
7566 147225.27083021149,
7567 147251.38907314953,
7568 147277.50847429881,
7569 147303.62903355664,
7570 147329.75075082036,
7571 147355.87362598727,
7572 147381.99765895473,
7573 147408.12284962015,
7574 147434.24919788091,
7575 147460.37670363448,
7576 147486.50536677826,
7577 147512.63518720976,
7578 147538.76616482646,
7579 147564.89829952587,
7580 147591.03159120557,
7581 147617.16603976308,
7582 147643.30164509601,
7583 147669.43840710199,
7584 147695.57632567859,
7585 147721.71540072354,
7586 147747.85563213445,
7587 147773.99701980909,
7588 147800.13956364512,
7589 147826.28326354033,
7590 147852.42811939248,
7591 147878.57413109933,
7592 147904.72129855872,
7593 147930.86962166851,
7594 147957.01910032652,
7595 147983.16973443062,
7596 148009.32152387875,
7597 148035.47446856883,
7598 148061.62856839882,
7599 148087.78382326665,
7600 148113.94023307035,
7601 148140.09779770792,
7602 148166.25651707739,
7603 148192.41639107687,
7604 148218.57741960438,
7605 148244.73960255808,
7606 148270.90293983606,
7607 148297.0674313365,
7608 148323.23307695755,
7609 148349.39987659742,
7610 148375.56783015432,
7611 148401.73693752653,
7612 148427.90719861226,
7613 148454.07861330983,
7614 148480.25118151752,
7615 148506.42490313368,
7616 148532.59977805667,
7617 148558.77580618486,
7618 148584.95298741665,
7619 148611.13132165043,
7620 148637.31080878471,
7621 148663.49144871789,
7622 148689.6732413485,
7623 148715.85618657502,
7624 148742.040284296,
7625 148768.22553440998,
7626 148794.41193681557,
7627 148820.59949141133,
7628 148846.78819809589,
7629 148872.97805676793,
7630 148899.16906732606,
7631 148925.36122966901,
7632 148951.55454369547,
7633 148977.74900930419,
7634 149003.9446263939,
7635 149030.1413948634,
7636 149056.33931461151,
7637 149082.53838553699,
7638 149108.73860753875,
7639 149134.9399805156,
7640 149161.14250436646,
7641 149187.34617899026,
7642 149213.5510042859,
7643 149239.75698015234,
7644 149265.96410648854,
7645 149292.17238319354,
7646 149318.38181016635,
7647 149344.59238730598,
7648 149370.80411451156,
7649 149397.01699168212,
7650 149423.23101871679,
7651 149449.44619551473,
7652 149475.66252197503,
7653 149501.87999799693,
7654 149528.0986234796,
7655 149554.31839832227,
7656 149580.53932242419,
7657 149606.76139568459,
7658 149632.98461800278,
7659 149659.20898927809,
7660 149685.43450940982,
7661 149711.66117829733,
7662 149737.88899584001,
7663 149764.11796193724,
7664 149790.34807648844,
7665 149816.57933939309,
7666 149842.81175055061,
7667 149869.04530986046,
7668 149895.28001722222,
7669 149921.51587253538,
7670 149947.75287569952,
7671 149973.99102661415,
7672 150000.23032517891,
7673 150026.47077129342,
7674 150052.71236485732,
7675 150078.95510577026,
7676 150105.1989939319,
7677 150131.444029242,
7678 150157.69021160025,
7679 150183.93754090639,
7680 150210.18601706024,
7681 150236.43563996154,
7682 150262.68640951012,
7683 150288.93832560582,
7684 150315.19138814852,
7685 150341.44559703805,
7686 150367.70095217437,
7687 150393.95745345735,
7688 150420.21510078697,
7689 150446.47389406321,
7690 150472.73383318601,
7691 150498.99491805542,
7692 150525.25714857146,
7693 150551.52052463419,
7694 150577.78504614369,
7695 150604.05071300003,
7696 150630.31752510337,
7697 150656.58548235384,
7698 150682.85458465159,
7699 150709.1248318968,
7700 150735.39622398972,
7701 150761.66876083051,
7702 150787.9424423195,
7703 150814.21726835691,
7704 150840.49323884305,
7705 150866.77035367821,
7706 150893.04861276277,
7707 150919.32801599705,
7708 150945.60856328148,
7709 150971.89025451642,
7710 150998.17308960229,
7711 151024.45706843957,
7712 151050.74219092872,
7713 151077.02845697021,
7714 151103.31586646455,
7715 151129.60441931229,
7716 151155.894115414,
7717 151182.1849546702,
7718 151208.47693698155,
7719 151234.77006224863,
7720 151261.06433037209,
7721 151287.35974125259,
7722 151313.65629479082,
7723 151339.95399088747,
7724 151366.25282944329,
7725 151392.55281035902,
7726 151418.85393353543,
7727 151445.1561988733,
7728 151471.45960627345,
7729 151497.76415563675,
7730 151524.06984686397,
7731 151550.37667985607,
7732 151576.68465451393,
7733 151602.99377073845,
7734 151629.30402843058,
7735 151655.61542749128,
7736 151681.92796782157,
7737 151708.24164932242,
7738 151734.55647189484,
7739 151760.87243543993,
7740 151787.18953985872,
7741 151813.50778505235,
7742 151839.82717092187,
7743 151866.14769736846,
7744 151892.46936429327,
7745 151918.79217159748,
7746 151945.11611918229,
7747 151971.44120694889,
7748 151997.76743479856,
7749 152024.09480263255,
7750 152050.42331035214,
7751 152076.75295785864,
7752 152103.08374505339,
7753 152129.41567183775,
7754 152155.74873811303,
7755 152182.08294378067,
7756 152208.41828874208,
7757 152234.75477289871,
7758 152261.09239615197,
7759 152287.43115840337,
7760 152313.77105955439,
7761 152340.11209950657,
7762 152366.45427816146,
7763 152392.79759542056,
7764 152419.14205118554,
7765 152445.48764535793,
7766 152471.8343778394,
7767 152498.18224853161,
7768 152524.53125733617,
7769 152550.88140415482,
7770 152577.23268888926,
7771 152603.58511144121,
7772 152629.93867171241,
7773 152656.29336960468,
7774 152682.64920501978,
7775 152709.00617785956,
7776 152735.36428802583,
7777 152761.72353542043,
7778 152788.08391994529,
7779 152814.44544150229,
7780 152840.80809999333,
7781 152867.17189532038,
7782 152893.53682738543,
7783 152919.90289609041,
7784 152946.27010133737,
7785 152972.63844302832,
7786 152999.00792106529,
7787 153025.37853535041,
7788 153051.7502857857,
7789 153078.12317227334,
7790 153104.4971947154,
7791 153130.8723530141,
7792 153157.24864707157,
7793 153183.62607679001,
7794 153210.00464207167,
7795 153236.38434281875,
7796 153262.76517893354,
7797 153289.14715031831,
7798 153315.53025687535,
7799 153341.91449850702,
7800 153368.2998751156,
7801 153394.68638660354,
7802 153421.07403287315,
7803 153447.46281382689,
7804 153473.85272936718,
7805 153500.24377939643,
7806 153526.63596381716,
7807 153553.02928253182,
7808 153579.42373544298,
7809 153605.81932245308,
7810 153632.21604346478,
7811 153658.61389838057,
7812 153685.0128871031,
7813 153711.41300953497,
7814 153737.81426557881,
7815 153764.21665513728,
7816 153790.62017811305,
7817 153817.02483440886,
7818 153843.43062392739,
7819 153869.83754657139,
7820 153896.24560224367,
7821 153922.65479084692,
7822 153949.06511228404,
7823 153975.4765664578,
7824 154001.88915327107,
7825 154028.30287262669,
7826 154054.71772442761,
7827 154081.13370857667,
7828 154107.55082497682,
7829 154133.96907353101,
7830 154160.38845414223,
7831 154186.80896671346,
7832 154213.23061114774,
7833 154239.65338734805,
7834 154266.07729521746,
7835 154292.50233465908,
7836 154318.92850557598,
7837 154345.35580787127,
7838 154371.7842414481,
7839 154398.21380620965,
7840 154424.64450205903,
7841 154451.07632889951,
7842 154477.50928663427,
7843 154503.94337516659,
7844 154530.37859439969,
7845 154556.81494423689,
7846 154583.25242458144,
7847 154609.69103533673,
7848 154636.13077640603,
7849 154662.57164769279,
7850 154689.01364910032,
7851 154715.45678053208,
7852 154741.90104189145,
7853 154768.34643308193,
7854 154794.79295400696,
7855 154821.24060457002,
7856 154847.68938467462,
7857 154874.13929422433,
7858 154900.59033312264,
7859 154927.04250127316,
7860 154953.49579857948,
7861 154979.95022494521,
7862 155006.40578027396,
7863 155032.86246446942,
7864 155059.32027743524,
7865 155085.77921907514,
7866 155112.2392892928,
7867 155138.70048799197,
7868 155165.16281507642,
7869 155191.62627044989,
7870 155218.09085401625,
7871 155244.55656567923,
7872 155271.02340534274,
7873 155297.49137291059,
7874 155323.96046828668,
7875 155350.4306913749,
7876 155376.90204207919,
7877 155403.37452030348,
7878 155429.84812595171,
7879 155456.32285892789,
7880 155482.79871913602,
7881 155509.27570648011,
7882 155535.75382086422,
7883 155562.23306219239,
7884 155588.71343036872,
7885 155615.19492529731,
7886 155641.67754688227,
7887 155668.16129502779,
7888 155694.64616963797,
7889 155721.13217061706,
7890 155747.61929786921,
7891 155774.10755129869,
7892 155800.59693080973,
7893 155827.08743630661,
7894 155853.57906769359,
7895 155880.07182487496,
7896 155906.56570775513,
7897 155933.06071623837,
7898 155959.55685022907,
7899 155986.05410963166,
7900 156012.5524943505,
7901 156039.05200429002,
7902 156065.55263935472,
7903 156092.054399449,
7904 156118.5572844774,
7905 156145.06129434443,
7906 156171.5664289546,
7907 156198.07268821247,
7908 156224.5800720226,
7909 156251.08858028959,
7910 156277.59821291809,
7911 156304.10896981266,
7912 156330.62085087801,
7913 156357.1338560188,
7914 156383.64798513969,
7915 156410.16323814544,
7916 156436.67961494075,
7917 156463.1971154304,
7918 156489.71573951913,
7919 156516.23548711176,
7920 156542.75635811311,
7921 156569.27835242799,
7922 156595.80146996127,
7923 156622.32571061782,
7924 156648.85107430254,
7925 156675.37756092031,
7926 156701.90517037612,
7927 156728.43390257491,
7928 156754.96375742162,
7929 156781.49473482129,
7930 156808.02683467892,
7931 156834.5600568995,
7932 156861.09440138817,
7933 156887.62986804993,
7934 156914.16645678994,
7935 156940.70416751326,
7936 156967.24300012505,
7937 156993.78295453047,
7938 157020.32403063469,
7939 157046.8662283429,
7940 157073.40954756032,
7941 157099.9539881922,
7942 157126.49955014378,
7943 157153.04623332032,
7944 157179.59403762716,
7945 157206.14296296958,
7946 157232.69300925292,
7947 157259.24417638258,
7948 157285.79646426387,
7949 157312.34987280221,
7950 157338.90440190304,
7951 157365.46005147175,
7952 157392.01682141385,
7953 157418.57471163478,
7954 157445.13372204005,
7955 157471.69385253513,
7956 157498.25510302564,
7957 157524.81747341706,
7958 157551.38096361503,
7959 157577.9455735251,
7960 157604.51130305286,
7961 157631.07815210402,
7962 157657.64612058419,
7963 157684.21520839902,
7964 157710.78541545427,
7965 157737.35674165559,
7966 157763.92918690876,
7967 157790.50275111952,
7968 157817.07743419363,
7969 157843.65323603692,
7970 157870.23015655516,
7971 157896.80819565422,
7972 157923.3873532399,
7973 157949.96762921812,
7974 157976.54902349479,
7975 158003.13153597576,
7976 158029.71516656701,
7977 158056.29991517449,
7978 158082.88578170416,
7979 158109.47276606198,
7980 158136.06086815402,
7981 158162.65008788629,
7982 158189.24042516484,
7983 158215.83187989573,
7984 158242.42445198505,
7985 158269.01814133892,
7986 158295.61294786347,
7987 158322.20887146486,
7988 158348.80591204923,
7989 158375.4040695228,
7990 158402.00334379176,
7991 158428.60373476235,
7992 158455.2052423408,
7993 158481.80786643337,
7994 158508.41160694641,
7995 158535.01646378616,
7996 158561.62243685898,
7997 158588.2295260712,
7998 158614.8377313292,
7999 158641.44705253936,
8000 158668.05748960807,
8001 158694.66904244179,
8002 158721.28171094693,
8003 158747.89549502998,
8004 158774.5103945974,
8005 158801.12640955573,
8006 158827.74353981143,
8007 158854.36178527112,
8008 158880.9811458413,
8009 158907.60162142856,
8010 158934.22321193956,
8011 158960.84591728085,
8012 158987.46973735912,
8013 159014.09467208097,
8014 159040.72072135314,
8015 159067.3478850823,
8016 159093.97616317519,
8017 159120.60555553852,
8018 159147.23606207906,
8019 159173.8676827036,
8020 159200.50041731889,
8021 159227.13426583182,
8022 159253.76922814918,
8023 159280.40530417781,
8024 159307.04249382461,
8025 159333.68079699649,
8026 159360.32021360032,
8027 159386.96074354305,
8028 159413.60238673165,
8029 159440.24514307309,
8030 159466.88901247433,
8031 159493.53399484244,
8032 159520.18009008438,
8033 159546.82729810724,
8034 159573.47561881805,
8035 159600.12505212394,
8036 159626.77559793202,
8037 159653.42725614941,
8038 159680.08002668325,
8039 159706.73390944069,
8040 159733.38890432892,
8041 159760.04501125516,
8042 159786.70223012666,
8043 159813.36056085059,
8044 159840.02000333427,
8045 159866.68055748497,
8046 159893.34222320997,
8047 159920.00500041663,
8048 159946.66888901225,
8049 159973.33388890422,
8050 159999.99999999988,
8051 160026.66722220668,
8052 160053.33555543202,
8053 160080.0049995833,
8054 160106.67555456801,
8055 160133.3472202936,
8056 160160.0199966676,
8057 160186.6938835975,
8058 160213.36888099083,
8059 160240.04498875517,
8060 160266.72220679806,
8061 160293.40053502709,
8062 160320.07997334987,
8063 160346.76052167406,
8064 160373.44217990729,
8065 160400.1249479572,
8066 160426.80882573154,
8067 160453.49381313793,
8068 160480.17991008417,
8069 160506.86711647795,
8070 160533.55543222709,
8071 160560.24485723933,
8072 160586.93539142248,
8073 160613.62703468435,
8074 160640.31978693281,
8075 160667.01364807569,
8076 160693.70861802087,
8077 160720.40469667627,
8078 160747.1018839498,
8079 160773.80017974938,
8080 160800.49958398298,
8081 160827.20009655855,
8082 160853.90171738411,
8083 160880.60444636765,
8084 160907.30828341722,
8085 160934.01322844089,
8086 160960.71928134665,
8087 160987.42644204266,
8088 161014.13471043704,
8089 161040.84408643784,
8090 161067.55456995327,
8091 161094.26616089148,
8092 161120.97885916062,
8093 161147.69266466892,
8094 161174.40757732463,
8095 161201.12359703594,
8096 161227.84072371112,
8097 161254.55895725847,
8098 161281.27829758628,
8099 161307.99874460287,
8100 161334.72029821656,
8101 161361.44295833571,
8102 161388.1667248687,
8103 161414.89159772391,
8104 161441.61757680977,
8105 161468.34466203468,
8106 161495.07285330712,
8107 161521.80215053557,
8108 161548.53255362847,
8109 161575.26406249436,
8110 161601.99667704175,
8111 161628.7303971792,
8112 161655.46522281526,
8113 161682.20115385848,
8114 161708.93819021754,
8115 161735.67633180099,
8116 161762.41557851751,
8117 161789.15593027571,
8118 161815.89738698432,
8119 161842.63994855201,
8120 161869.38361488748,
8121 161896.1283858995,
8122 161922.87426149679,
8123 161949.62124158812,
8124 161976.36932608229,
8125 162003.1185148881,
8126 162029.8688079144,
8127 162056.62020507001,
8128 162083.37270626382,
8129 162110.12631140469,
8130 162136.88102040152,
8131 162163.63683316324,
8132 162190.39374959879,
8133 162217.15176961714,
8134 162243.91089312723,
8135 162270.67112003808,
8136 162297.43245025873,
8137 162324.19488369819,
8138 162350.9584202655,
8139 162377.72305986975,
8140 162404.48880242003,
8141 162431.25564782543,
8142 162458.02359599507,
8143 162484.79264683815,
8144 162511.56280026378,
8145 162538.33405618116,
8146 162565.10641449949,
8147 162591.87987512801,
8148 162618.65443797593,
8149 162645.43010295252,
8150 162672.20686996708,
8151 162698.98473892888,
8152 162725.76370974723,
8153 162752.54378233149,
8154 162779.32495659095,
8155 162806.10723243505,
8156 162832.89060977317,
8157 162859.67508851466,
8158 162886.46066856899,
8159 162913.24734984562,
8160 162940.03513225398,
8161 162966.82401570358,
8162 162993.6140001039,
8163 163020.40508536444,
8164 163047.19727139481,
8165 163073.99055810447,
8166 163100.78494540305,
8167 163127.58043320014,
8168 163154.37702140535,
8169 163181.17470992831,
8170 163207.97349867865,
8171 163234.77338756606,
8172 163261.57437650024,
8173 163288.37646539087,
8174 163315.17965414765,
8175 163341.98394268038,
8176 163368.78933089875,
8177 163395.59581871261,
8178 163422.40340603172,
8179 163449.2120927659,
8180 163476.02187882498,
8181 163502.83276411882,
8182 163529.6447485573,
8183 163556.45783205028,
8184 163583.2720145077,
8185 163610.08729583945,
8186 163636.90367595552,
8187 163663.72115476584,
8188 163690.53973218042,
8189 163717.35940810922,
8190 163744.18018246227,
8191 163771.00205514964,
8192 163797.82502608138,
8193 163824.64909516752,
8194 163851.4742623182,
8195 163878.3005274435,
8196 163905.12789045356,
8197 163931.95635125853,
8198 163958.78590976857,
8199 163985.61656589387,
8200 164012.44831954464,
8201 164039.28117063109,
8202 164066.11511906344,
8203 164092.95016475199,
8204 164119.78630760699,
8205 164146.62354753874,
8206 164173.46188445756,
8207 164200.30131827376,
8208 164227.14184889771,
8209 164253.98347623978,
8210 164280.82620021031,
8211 164307.67002071979,
8212 164334.51493767856,
8213 164361.3609509971,
8214 164388.20806058586,
8215 164415.05626635533,
8216 164441.905568216,
8217 164468.75596607837,
8218 164495.607459853,
8219 164522.4600494504,
8220 164549.31373478117,
8221 164576.16851575591,
8222 164603.02439228518,
8223 164629.88136427966,
8224 164656.73943164994,
8225 164683.59859430668,
8226 164710.45885216061,
8227 164737.32020512238,
8228 164764.1826531027,
8229 164791.04619601235,
8230 164817.91083376206,
8231 164844.77656626256,
8232 164871.64339342469,
8233 164898.51131515924,
8234 164925.38033137703,
8235 164952.25044198887,
8236 164979.1216469057,
8237 165005.9939460383,
8238 165032.86733929763,
8239 165059.7418265946,
8240 165086.61740784015,
8241 165113.4940829452
8242};
8243
8244#else
8245
8246#ifdef BIG_IQ_TABLE
8247#define IQ_TABLE_SIZE 8192
8248#else
8249#define IQ_TABLE_SIZE 1026
8250#endif
8251
8252ALIGN static const real_t iq_table[IQ_TABLE_SIZE] =
8253{
8254 REAL_CONST(0.0),
8255 REAL_CONST(1.0/8.0),
8256 REAL_CONST(2.5198420997897464/8.0),
8257 REAL_CONST(4.3267487109222245/8.0),
8258 REAL_CONST(6.3496042078727974/8.0),
8259 REAL_CONST(8.5498797333834844/8.0),
8260 REAL_CONST(10.902723556992836/8.0),
8261 REAL_CONST(13.390518279406722/8.0),
8262 REAL_CONST(15.999999999999998/8.0),
8263 REAL_CONST(18.720754407467133/8.0),
8264 REAL_CONST(21.544346900318832/8.0),
8265 REAL_CONST(24.463780996262464/8.0),
8266 REAL_CONST(27.47314182127996/8.0),
8267 REAL_CONST(30.567350940369842/8.0),
8268 REAL_CONST(33.741991698453212/8.0),
8269 REAL_CONST(36.993181114957046/8.0),
8270 REAL_CONST(40.317473596635935/8.0),
8271 REAL_CONST(43.711787041189993/8.0),
8272 REAL_CONST(47.173345095760126/8.0),
8273 REAL_CONST(50.699631325716943/8.0),
8274 REAL_CONST(54.288352331898118/8.0),
8275 REAL_CONST(57.937407704003519/8.0),
8276 REAL_CONST(61.6448652744185/8.0),
8277 REAL_CONST(65.408940536585988/8.0),
8278 REAL_CONST(69.227979374755591/8.0),
8279 REAL_CONST(73.100443455321638/8.0),
8280 REAL_CONST(77.024897778591622/8.0),
8281 REAL_CONST(80.999999999999986/8.0),
8282 REAL_CONST(85.024491212518527/8.0),
8283 REAL_CONST(89.097187944889555/8.0),
8284 REAL_CONST(93.216975178615741/8.0),
8285 REAL_CONST(97.382800224133163/8.0),
8286 REAL_CONST(101.59366732596474/8.0),
8287 REAL_CONST(105.84863288986224/8.0),
8288 REAL_CONST(110.14680124343441/8.0),
8289 REAL_CONST(114.4873208566006/8.0),
8290 REAL_CONST(118.86938096020653/8.0),
8291 REAL_CONST(123.29220851090024/8.0),
8292 REAL_CONST(127.75506545836058/8.0),
8293 REAL_CONST(132.25724627755247/8.0),
8294 REAL_CONST(136.79807573413572/8.0),
8295 REAL_CONST(141.37690685569191/8.0),
8296 REAL_CONST(145.99311908523086/8.0),
8297 REAL_CONST(150.6461165966291/8.0),
8298 REAL_CONST(155.33532675434674/8.0),
8299 REAL_CONST(160.06019870205279/8.0),
8300 REAL_CONST(164.82020206673349/8.0),
8301 REAL_CONST(169.61482576651861/8.0),
8302 REAL_CONST(174.44357691188537/8.0),
8303 REAL_CONST(179.30597979112557/8.0),
8304 REAL_CONST(184.20157493201927/8.0),
8305 REAL_CONST(189.12991823257562/8.0),
8306 REAL_CONST(194.09058015449685/8.0),
8307 REAL_CONST(199.08314497371677/8.0),
8308 REAL_CONST(204.1072100829694/8.0),
8309 REAL_CONST(209.16238534187647/8.0),
8310 REAL_CONST(214.24829247050752/8.0),
8311 REAL_CONST(219.36456448277784/8.0),
8312 REAL_CONST(224.51084515641216/8.0),
8313 REAL_CONST(229.6867885365223/8.0),
8314 REAL_CONST(234.89205847013176/8.0),
8315 REAL_CONST(240.12632816923249/8.0),
8316 REAL_CONST(245.38927980018505/8.0),
8317 REAL_CONST(250.68060409747261/8.0),
8318 REAL_CONST(255.99999999999991/8.0),
8319 REAL_CONST(261.34717430828869/8.0),
8320 REAL_CONST(266.72184136106449/8.0),
8321 REAL_CONST(272.12372272986045/8.0),
8322 REAL_CONST(277.55254693037961/8.0),
8323 REAL_CONST(283.0080491494619/8.0),
8324 REAL_CONST(288.48997098659891/8.0),
8325 REAL_CONST(293.99806020902247/8.0),
8326 REAL_CONST(299.53207051947408/8.0),
8327 REAL_CONST(305.0917613358298/8.0),
8328 REAL_CONST(310.67689758182206/8.0),
8329 REAL_CONST(316.28724948815585/8.0),
8330 REAL_CONST(321.92259240337177/8.0),
8331 REAL_CONST(327.58270661385535/8.0),
8332 REAL_CONST(333.26737717243742/8.0),
8333 REAL_CONST(338.97639373507025/8.0),
8334 REAL_CONST(344.70955040510125/8.0),
8335 REAL_CONST(350.46664558470013/8.0),
8336 REAL_CONST(356.24748183302603/8.0),
8337 REAL_CONST(362.05186573075139/8.0),
8338 REAL_CONST(367.87960775058258/8.0),
8339 REAL_CONST(373.73052213344511/8.0),
8340 REAL_CONST(379.60442677002078/8.0),
8341 REAL_CONST(385.50114308734607/8.0),
8342 REAL_CONST(391.42049594019937/8.0),
8343 REAL_CONST(397.36231350702371/8.0),
8344 REAL_CONST(403.32642719014467/8.0),
8345 REAL_CONST(409.31267152006262/8.0),
8346 REAL_CONST(415.32088406360799/8.0),
8347 REAL_CONST(421.35090533576471/8.0),
8348 REAL_CONST(427.40257871497619/8.0),
8349 REAL_CONST(433.4757503617617/8.0),
8350 REAL_CONST(439.5702691404793/8.0),
8351 REAL_CONST(445.68598654408271/8.0),
8352 REAL_CONST(451.82275662172759/8.0),
8353 REAL_CONST(457.98043590909128/8.0),
8354 REAL_CONST(464.15888336127773/8.0),
8355 REAL_CONST(470.35796028818726/8.0),
8356 REAL_CONST(476.5775302922363/8.0),
8357 REAL_CONST(482.81745920832043/8.0),
8358 REAL_CONST(489.07761504591741/8.0),
8359 REAL_CONST(495.35786793323581/8.0),
8360 REAL_CONST(501.65809006331688/8.0),
8361 REAL_CONST(507.97815564200368/8.0),
8362 REAL_CONST(514.31794083769648/8.0),
8363 REAL_CONST(520.67732373281672/8.0),
8364 REAL_CONST(527.05618427690604/8.0),
8365 REAL_CONST(533.45440424129174/8.0),
8366 REAL_CONST(539.87186717525128/8.0),
8367 REAL_CONST(546.30845836361505/8.0),
8368 REAL_CONST(552.76406478574609/8.0),
8369 REAL_CONST(559.23857507584194/8.0),
8370 REAL_CONST(565.73187948450413/8.0),
8371 REAL_CONST(572.24386984152341/8.0),
8372 REAL_CONST(578.77443951983378/8.0),
8373 REAL_CONST(585.32348340058843/8.0),
8374 REAL_CONST(591.89089783931263/8.0),
8375 REAL_CONST(598.47658063309257/8.0),
8376 REAL_CONST(605.08043098876044/8.0),
8377 REAL_CONST(611.70234949203643/8.0),
8378 REAL_CONST(618.3422380775919/8.0),
8379 REAL_CONST(624.99999999999977/8.0),
8380 REAL_CONST(631.67553980553748/8.0),
8381 REAL_CONST(638.36876330481164/8.0),
8382 REAL_CONST(645.07957754617485/8.0),
8383 REAL_CONST(651.80789078990415/8.0),
8384 REAL_CONST(658.55361248311499/8.0),
8385 REAL_CONST(665.31665323538357/8.0),
8386 REAL_CONST(672.09692479505225/8.0),
8387 REAL_CONST(678.8943400261943/8.0),
8388 REAL_CONST(685.70881288621433/8.0),
8389 REAL_CONST(692.540258404062/8.0),
8390 REAL_CONST(699.38859265903977/8.0),
8391 REAL_CONST(706.25373276018058/8.0),
8392 REAL_CONST(713.13559682617972/8.0),
8393 REAL_CONST(720.03410396586037/8.0),
8394 REAL_CONST(726.94917425915435/8.0),
8395 REAL_CONST(733.88072873858209/8.0),
8396 REAL_CONST(740.82868937121543/8.0),
8397 REAL_CONST(747.79297904110535/8.0),
8398 REAL_CONST(754.77352153216191/8.0),
8399 REAL_CONST(761.77024151147043/8.0),
8400 REAL_CONST(768.78306451302956/8.0),
8401 REAL_CONST(775.81191692189896/8.0),
8402 REAL_CONST(782.85672595874246/8.0),
8403 REAL_CONST(789.91741966475445/8.0),
8404 REAL_CONST(796.99392688695798/8.0),
8405 REAL_CONST(804.08617726386274/8.0),
8406 REAL_CONST(811.19410121147098/8.0),
8407 REAL_CONST(818.31762990962227/8.0),
8408 REAL_CONST(825.45669528866563/8.0),
8409 REAL_CONST(832.61123001644864/8.0),
8410 REAL_CONST(839.78116748561604/8.0),
8411 REAL_CONST(846.96644180120552/8.0),
8412 REAL_CONST(854.16698776853514/8.0),
8413 REAL_CONST(861.38274088137143/8.0),
8414 REAL_CONST(868.61363731036977/8.0),
8415 REAL_CONST(875.85961389178203/8.0),
8416 REAL_CONST(883.12060811641959/8.0),
8417 REAL_CONST(890.39655811886757/8.0),
8418 REAL_CONST(897.68740266694181/8.0),
8419 REAL_CONST(904.99308115138172/8.0),
8420 REAL_CONST(912.31353357577188/8.0),
8421 REAL_CONST(919.64870054668756/8.0),
8422 REAL_CONST(926.99852326405619/8.0),
8423 REAL_CONST(934.36294351172899/8.0),
8424 REAL_CONST(941.74190364825859/8.0),
8425 REAL_CONST(949.13534659787422/8.0),
8426 REAL_CONST(956.54321584165211/8.0),
8427 REAL_CONST(963.96545540887348/8.0),
8428 REAL_CONST(971.40200986856541/8.0),
8429 REAL_CONST(978.85282432122176/8.0),
8430 REAL_CONST(986.31784439069588/8.0),
8431 REAL_CONST(993.7970162162635/8.0),
8432 REAL_CONST(1001.29028644485/8.0),
8433 REAL_CONST(1008.797602223418/8.0),
8434 REAL_CONST(1016.3189111915103/8.0),
8435 REAL_CONST(1023.8541614739464/8.0),
8436 REAL_CONST(1031.4033016736653/8.0),
8437 REAL_CONST(1038.9662808647138/8.0),
8438 REAL_CONST(1046.5430485853758/8.0),
8439 REAL_CONST(1054.1335548314366/8.0),
8440 REAL_CONST(1061.7377500495838/8.0),
8441 REAL_CONST(1069.3555851309357/8.0),
8442 REAL_CONST(1076.9870114046978/8.0),
8443 REAL_CONST(1084.6319806319441/8.0),
8444 REAL_CONST(1092.2904449995174/8.0),
8445 REAL_CONST(1099.9623571140482/8.0),
8446 REAL_CONST(1107.6476699960892/8.0),
8447 REAL_CONST(1115.3463370743607/8.0),
8448 REAL_CONST(1123.058312180106/8.0),
8449 REAL_CONST(1130.7835495415541/8.0),
8450 REAL_CONST(1138.5220037784854/8.0),
8451 REAL_CONST(1146.273629896901/8.0),
8452 REAL_CONST(1154.0383832837879/8.0),
8453 REAL_CONST(1161.816219701986/8.0),
8454 REAL_CONST(1169.607095285146/8.0),
8455 REAL_CONST(1177.4109665327808/8.0),
8456 REAL_CONST(1185.2277903054078/8.0),
8457 REAL_CONST(1193.0575238197798/8.0),
8458 REAL_CONST(1200.9001246442001/8.0),
8459 REAL_CONST(1208.7555506939248/8.0),
8460 REAL_CONST(1216.6237602266442/8.0),
8461 REAL_CONST(1224.5047118380478/8.0),
8462 REAL_CONST(1232.3983644574657/8.0),
8463 REAL_CONST(1240.3046773435874/8.0),
8464 REAL_CONST(1248.2236100802568/8.0),
8465 REAL_CONST(1256.1551225723395/8.0),
8466 REAL_CONST(1264.099175041662/8.0),
8467 REAL_CONST(1272.0557280230228/8.0),
8468 REAL_CONST(1280.0247423602691/8.0),
8469 REAL_CONST(1288.0061792024444/8.0),
8470 REAL_CONST(1295.9999999999995/8.0),
8471 REAL_CONST(1304.006166501068/8.0),
8472 REAL_CONST(1312.0246407478062/8.0),
8473 REAL_CONST(1320.0553850727929/8.0),
8474 REAL_CONST(1328.0983620954903/8.0),
8475 REAL_CONST(1336.1535347187651/8.0),
8476 REAL_CONST(1344.2208661254647/8.0),
8477 REAL_CONST(1352.3003197750522/8.0),
8478 REAL_CONST(1360.3918594002962/8.0),
8479 REAL_CONST(1368.4954490040145/8.0),
8480 REAL_CONST(1376.6110528558709/8.0),
8481 REAL_CONST(1384.7386354892244/8.0),
8482 REAL_CONST(1392.8781616980295/8.0),
8483 REAL_CONST(1401.0295965337855/8.0),
8484 REAL_CONST(1409.1929053025353/8.0),
8485 REAL_CONST(1417.3680535619119/8.0),
8486 REAL_CONST(1425.5550071182327/8.0),
8487 REAL_CONST(1433.7537320236374/8.0),
8488 REAL_CONST(1441.9641945732744/8.0),
8489 REAL_CONST(1450.1863613025282/8.0),
8490 REAL_CONST(1458.4201989842913/8.0),
8491 REAL_CONST(1466.6656746262797/8.0),
8492 REAL_CONST(1474.9227554683875/8.0),
8493 REAL_CONST(1483.1914089800841/8.0),
8494 REAL_CONST(1491.4716028578516/8.0),
8495 REAL_CONST(1499.7633050226596/8.0),
8496 REAL_CONST(1508.0664836174794/8.0),
8497 REAL_CONST(1516.3811070048375/8.0),
8498 REAL_CONST(1524.7071437644029/8.0),
8499 REAL_CONST(1533.0445626906128/8.0),
8500 REAL_CONST(1541.3933327903342/8.0),
8501 REAL_CONST(1549.7534232805581/8.0),
8502 REAL_CONST(1558.1248035861302/8.0),
8503 REAL_CONST(1566.507443337515/8.0),
8504 REAL_CONST(1574.9013123685909/8.0),
8505 REAL_CONST(1583.3063807144795/8.0),
8506 REAL_CONST(1591.7226186094069/8.0),
8507 REAL_CONST(1600.1499964845941/8.0),
8508 REAL_CONST(1608.58848496618/8.0),
8509 REAL_CONST(1617.0380548731737/8.0),
8510 REAL_CONST(1625.4986772154357/8.0),
8511 REAL_CONST(1633.9703231916887/8.0),
8512 REAL_CONST(1642.4529641875577/8.0),
8513 REAL_CONST(1650.9465717736346/8.0),
8514 REAL_CONST(1659.4511177035752/8.0),
8515 REAL_CONST(1667.9665739122186/8.0),
8516 REAL_CONST(1676.4929125137353/8.0),
8517 REAL_CONST(1685.030105799801/8.0),
8518 REAL_CONST(1693.5781262377957/8.0),
8519 REAL_CONST(1702.136946469027/8.0),
8520 REAL_CONST(1710.7065393069795/8.0),
8521 REAL_CONST(1719.2868777355877/8.0),
8522 REAL_CONST(1727.8779349075323/8.0),
8523 REAL_CONST(1736.4796841425596/8.0),
8524 REAL_CONST(1745.092098925825/8.0),
8525 REAL_CONST(1753.7151529062583/8.0),
8526 REAL_CONST(1762.3488198949503/8.0),
8527 REAL_CONST(1770.9930738635628/8.0),
8528 REAL_CONST(1779.6478889427597/8.0),
8529 REAL_CONST(1788.3132394206564/8.0),
8530 REAL_CONST(1796.9890997412947/8.0),
8531 REAL_CONST(1805.6754445031333/8.0),
8532 REAL_CONST(1814.3722484575621/8.0),
8533 REAL_CONST(1823.0794865074322/8.0),
8534 REAL_CONST(1831.7971337056094/8.0),
8535 REAL_CONST(1840.5251652535437/8.0),
8536 REAL_CONST(1849.2635564998579/8.0),
8537 REAL_CONST(1858.0122829389563/8.0),
8538 REAL_CONST(1866.7713202096493/8.0),
8539 REAL_CONST(1875.5406440937966/8.0),
8540 REAL_CONST(1884.3202305149687/8.0),
8541 REAL_CONST(1893.110055537124/8.0),
8542 REAL_CONST(1901.9100953633042/8.0),
8543 REAL_CONST(1910.7203263343454/8.0),
8544 REAL_CONST(1919.5407249276057/8.0),
8545 REAL_CONST(1928.3712677557098/8.0),
8546 REAL_CONST(1937.2119315653083/8.0),
8547 REAL_CONST(1946.0626932358525/8.0),
8548 REAL_CONST(1954.923529778386/8.0),
8549 REAL_CONST(1963.79441833435/8.0),
8550 REAL_CONST(1972.6753361744036/8.0),
8551 REAL_CONST(1981.5662606972594/8.0),
8552 REAL_CONST(1990.467169428533/8.0),
8553 REAL_CONST(1999.3780400196069/8.0),
8554 REAL_CONST(2008.2988502465078/8.0),
8555 REAL_CONST(2017.2295780087982/8.0),
8556 REAL_CONST(2026.1702013284819/8.0),
8557 REAL_CONST(2035.1206983489212/8.0),
8558 REAL_CONST(2044.0810473337688/8.0),
8559 REAL_CONST(2053.0512266659125/8.0),
8560 REAL_CONST(2062.0312148464309/8.0),
8561 REAL_CONST(2071.0209904935646/8.0),
8562 REAL_CONST(2080.0205323416958/8.0),
8563 REAL_CONST(2089.0298192403443/8.0),
8564 REAL_CONST(2098.0488301531714/8.0),
8565 REAL_CONST(2107.0775441569995/8.0),
8566 REAL_CONST(2116.115940440839/8.0),
8567 REAL_CONST(2125.1639983049317/8.0),
8568 REAL_CONST(2134.2216971597995/8.0),
8569 REAL_CONST(2143.2890165253098/8.0),
8570 REAL_CONST(2152.3659360297484/8.0),
8571 REAL_CONST(2161.4524354089031/8.0),
8572 REAL_CONST(2170.5484945051617/8.0),
8573 REAL_CONST(2179.6540932666144/8.0),
8574 REAL_CONST(2188.7692117461711/8.0),
8575 REAL_CONST(2197.8938301006888/8.0),
8576 REAL_CONST(2207.0279285901042/8.0),
8577 REAL_CONST(2216.1714875765838/8.0),
8578 REAL_CONST(2225.324487523676/8.0),
8579 REAL_CONST(2234.4869089954782/8.0),
8580 REAL_CONST(2243.6587326558101/8.0),
8581 REAL_CONST(2252.8399392673982/8.0),
8582 REAL_CONST(2262.0305096910702/8.0),
8583 REAL_CONST(2271.2304248849537/8.0),
8584 REAL_CONST(2280.4396659036897/8.0),
8585 REAL_CONST(2289.6582138976523/8.0),
8586 REAL_CONST(2298.8860501121762/8.0),
8587 REAL_CONST(2308.1231558867926/8.0),
8588 REAL_CONST(2317.3695126544767/8.0),
8589 REAL_CONST(2326.6251019409005/8.0),
8590 REAL_CONST(2335.8899053636933/8.0),
8591 REAL_CONST(2345.1639046317132/8.0),
8592 REAL_CONST(2354.4470815443233/8.0),
8593 REAL_CONST(2363.7394179906792/8.0),
8594 REAL_CONST(2373.0408959490205/8.0),
8595 REAL_CONST(2382.3514974859731/8.0),
8596 REAL_CONST(2391.6712047558558/8.0),
8597 REAL_CONST(2400.9999999999991/8.0),
8598 REAL_CONST(2410.3378655460651/8.0),
8599 REAL_CONST(2419.6847838073813/8.0),
8600 REAL_CONST(2429.0407372822747/8.0),
8601 REAL_CONST(2438.4057085534191/8.0),
8602 REAL_CONST(2447.7796802871858/8.0),
8603 REAL_CONST(2457.1626352330004/8.0),
8604 REAL_CONST(2466.5545562227112/8.0),
8605 REAL_CONST(2475.9554261699564/8.0),
8606 REAL_CONST(2485.3652280695474/8.0),
8607 REAL_CONST(2494.7839449968492/8.0),
8608 REAL_CONST(2504.2115601071737/8.0),
8609 REAL_CONST(2513.6480566351788/8.0),
8610 REAL_CONST(2523.0934178942675/8.0),
8611 REAL_CONST(2532.5476272760025/8.0),
8612 REAL_CONST(2542.0106682495189/8.0),
8613 REAL_CONST(2551.482524360948/8.0),
8614 REAL_CONST(2560.9631792328441/8.0),
8615 REAL_CONST(2570.4526165636184/8.0),
8616 REAL_CONST(2579.9508201269791/8.0),
8617 REAL_CONST(2589.4577737713744/8.0),
8618 REAL_CONST(2598.9734614194458/8.0),
8619 REAL_CONST(2608.4978670674823/8.0),
8620 REAL_CONST(2618.0309747848837/8.0),
8621 REAL_CONST(2627.5727687136259/8.0),
8622 REAL_CONST(2637.1232330677353/8.0),
8623 REAL_CONST(2646.6823521327647/8.0),
8624 REAL_CONST(2656.2501102652768/8.0),
8625 REAL_CONST(2665.8264918923328/8.0),
8626 REAL_CONST(2675.4114815109842/8.0),
8627 REAL_CONST(2685.0050636877722/8.0),
8628 REAL_CONST(2694.6072230582295/8.0),
8629 REAL_CONST(2704.2179443263894/8.0),
8630 REAL_CONST(2713.8372122642972/8.0),
8631 REAL_CONST(2723.4650117115279/8.0),
8632 REAL_CONST(2733.1013275747096/8.0),
8633 REAL_CONST(2742.7461448270483/8.0),
8634 REAL_CONST(2752.3994485078601/8.0),
8635 REAL_CONST(2762.0612237221085/8.0),
8636 REAL_CONST(2771.7314556399419/8.0),
8637 REAL_CONST(2781.4101294962406/8.0),
8638 REAL_CONST(2791.0972305901655/8.0),
8639 REAL_CONST(2800.7927442847094/8.0),
8640 REAL_CONST(2810.4966560062589/8.0),
8641 REAL_CONST(2820.2089512441521/8.0),
8642 REAL_CONST(2829.9296155502466/8.0),
8643 REAL_CONST(2839.6586345384894/8.0),
8644 REAL_CONST(2849.3959938844923/8.0),
8645 REAL_CONST(2859.1416793251065/8.0),
8646 REAL_CONST(2868.8956766580086/8.0),
8647 REAL_CONST(2878.6579717412847/8.0),
8648 REAL_CONST(2888.4285504930212/8.0),
8649 REAL_CONST(2898.2073988908974/8.0),
8650 REAL_CONST(2907.9945029717837/8.0),
8651 REAL_CONST(2917.789848831344/8.0),
8652 REAL_CONST(2927.5934226236377/8.0),
8653 REAL_CONST(2937.4052105607311/8.0),
8654 REAL_CONST(2947.2251989123079/8.0),
8655 REAL_CONST(2957.0533740052865/8.0),
8656 REAL_CONST(2966.8897222234368/8.0),
8657 REAL_CONST(2976.734230007005/8.0),
8658 REAL_CONST(2986.5868838523397/8.0),
8659 REAL_CONST(2996.4476703115197/8.0),
8660 REAL_CONST(3006.3165759919889/8.0),
8661 REAL_CONST(3016.1935875561908/8.0),
8662 REAL_CONST(3026.0786917212095/8.0),
8663 REAL_CONST(3035.9718752584108/8.0),
8664 REAL_CONST(3045.8731249930906/8.0),
8665 REAL_CONST(3055.7824278041207/8.0),
8666 REAL_CONST(3065.6997706236039/8.0),
8667 REAL_CONST(3075.625140436528/8.0),
8668 REAL_CONST(3085.5585242804245/8.0),
8669 REAL_CONST(3095.4999092450298/8.0),
8670 REAL_CONST(3105.4492824719491/8.0),
8671 REAL_CONST(3115.4066311543256/8.0),
8672 REAL_CONST(3125.3719425365089/8.0),
8673 REAL_CONST(3135.3452039137287/8.0),
8674 REAL_CONST(3145.3264026317715/8.0),
8675 REAL_CONST(3155.3155260866592/8.0),
8676 REAL_CONST(3165.3125617243295/8.0),
8677 REAL_CONST(3175.3174970403229/8.0),
8678 REAL_CONST(3185.3303195794679/8.0),
8679 REAL_CONST(3195.35101693557/8.0),
8680 REAL_CONST(3205.3795767511078/8.0),
8681 REAL_CONST(3215.4159867169251/8.0),
8682 REAL_CONST(3225.460234571929/8.0),
8683 REAL_CONST(3235.5123081027928/8.0),
8684 REAL_CONST(3245.5721951436558/8.0),
8685 REAL_CONST(3255.63988357583/8.0),
8686 REAL_CONST(3265.7153613275095/8.0),
8687 REAL_CONST(3275.7986163734795/8.0),
8688 REAL_CONST(3285.8896367348289/8.0),
8689 REAL_CONST(3295.9884104786665/8.0),
8690 REAL_CONST(3306.0949257178395/8.0),
8691 REAL_CONST(3316.2091706106517/8.0),
8692 REAL_CONST(3326.331133360588/8.0),
8693 REAL_CONST(3336.4608022160378/8.0),
8694 REAL_CONST(3346.5981654700231/8.0),
8695 REAL_CONST(3356.7432114599264/8.0),
8696 REAL_CONST(3366.8959285672249/8.0),
8697 REAL_CONST(3377.0563052172211/8.0),
8698 REAL_CONST(3387.2243298787821/8.0),
8699 REAL_CONST(3397.3999910640764/8.0),
8700 REAL_CONST(3407.5832773283128/8.0),
8701 REAL_CONST(3417.7741772694862/8.0),
8702 REAL_CONST(3427.9726795281199/8.0),
8703 REAL_CONST(3438.1787727870123/8.0),
8704 REAL_CONST(3448.3924457709873/8.0),
8705 REAL_CONST(3458.6136872466445/8.0),
8706 REAL_CONST(3468.8424860221107/8.0),
8707 REAL_CONST(3479.0788309467976/8.0),
8708 REAL_CONST(3489.3227109111554/8.0),
8709 REAL_CONST(3499.5741148464344/8.0),
8710 REAL_CONST(3509.8330317244445/8.0),
8711 REAL_CONST(3520.0994505573185/8.0),
8712 REAL_CONST(3530.3733603972751/8.0),
8713 REAL_CONST(3540.6547503363886/8.0),
8714 REAL_CONST(3550.9436095063534/8.0),
8715 REAL_CONST(3561.239927078258/8.0),
8716 REAL_CONST(3571.5436922623535/8.0),
8717 REAL_CONST(3581.8548943078308/8.0),
8718 REAL_CONST(3592.1735225025936/8.0),
8719 REAL_CONST(3602.4995661730372/8.0),
8720 REAL_CONST(3612.8330146838275/8.0),
8721 REAL_CONST(3623.1738574376814/8.0),
8722 REAL_CONST(3633.5220838751502/8.0),
8723 REAL_CONST(3643.8776834744031/8.0),
8724 REAL_CONST(3654.2406457510142/8.0),
8725 REAL_CONST(3664.6109602577494/8.0),
8726 REAL_CONST(3674.9886165843564/8.0),
8727 REAL_CONST(3685.3736043573545/8.0),
8728 REAL_CONST(3695.7659132398294/8.0),
8729 REAL_CONST(3706.1655329312248/8.0),
8730 REAL_CONST(3716.5724531671399/8.0),
8731 REAL_CONST(3726.9866637191262/8.0),
8732 REAL_CONST(3737.4081543944876/8.0),
8733 REAL_CONST(3747.8369150360782/8.0),
8734 REAL_CONST(3758.2729355221072/8.0),
8735 REAL_CONST(3768.7162057659411/8.0),
8736 REAL_CONST(3779.1667157159077/8.0),
8737 REAL_CONST(3789.6244553551055/8.0),
8738 REAL_CONST(3800.0894147012082/8.0),
8739 REAL_CONST(3810.5615838062768/8.0),
8740 REAL_CONST(3821.0409527565694/8.0),
8741 REAL_CONST(3831.5275116723533/8.0),
8742 REAL_CONST(3842.0212507077194/8.0),
8743 REAL_CONST(3852.522160050396/8.0),
8744 REAL_CONST(3863.0302299215673/8.0),
8745 REAL_CONST(3873.5454505756893/8.0),
8746 REAL_CONST(3884.0678123003108/8.0),
8747 REAL_CONST(3894.5973054158922/8.0),
8748 REAL_CONST(3905.1339202756285/8.0),
8749 REAL_CONST(3915.6776472652732/8.0),
8750 REAL_CONST(3926.2284768029604/8.0),
8751 REAL_CONST(3936.7863993390338/8.0),
8752 REAL_CONST(3947.3514053558706/8.0),
8753 REAL_CONST(3957.9234853677135/8.0),
8754 REAL_CONST(3968.5026299204969/8.0),
8755 REAL_CONST(3979.0888295916798/8.0),
8756 REAL_CONST(3989.6820749900776/8.0),
8757 REAL_CONST(4000.2823567556948/8.0),
8758 REAL_CONST(4010.8896655595613/8.0),
8759 REAL_CONST(4021.5039921035655/8.0),
8760 REAL_CONST(4032.1253271202945/8.0),
8761 REAL_CONST(4042.7536613728694/8.0),
8762 REAL_CONST(4053.3889856547858/8.0),
8763 REAL_CONST(4064.0312907897551/8.0),
8764 REAL_CONST(4074.6805676315448/8.0),
8765 REAL_CONST(4085.3368070638221/8.0),
8766 REAL_CONST(4095.9999999999982/8.0),
8767 REAL_CONST(4106.6701373830711/8.0),
8768 REAL_CONST(4117.347210185475/8.0),
8769 REAL_CONST(4128.0312094089259/8.0),
8770 REAL_CONST(4138.722126084268/8.0),
8771 REAL_CONST(4149.4199512713267/8.0),
8772 REAL_CONST(4160.1246760587583/8.0),
8773 REAL_CONST(4170.8362915638982/8.0),
8774 REAL_CONST(4181.5547889326181/8.0),
8775 REAL_CONST(4192.2801593391769/8.0),
8776 REAL_CONST(4203.0123939860741/8.0),
8777 REAL_CONST(4213.7514841039101/8.0),
8778 REAL_CONST(4224.4974209512384/8.0),
8779 REAL_CONST(4235.2501958144258/8.0),
8780 REAL_CONST(4246.0098000075095/8.0),
8781 REAL_CONST(4256.7762248720574/8.0),
8782 REAL_CONST(4267.549461777031/8.0),
8783 REAL_CONST(4278.3295021186423/8.0),
8784 REAL_CONST(4289.1163373202198/8.0),
8785 REAL_CONST(4299.9099588320714/8.0),
8786 REAL_CONST(4310.7103581313495/8.0),
8787 REAL_CONST(4321.5175267219138/8.0),
8788 REAL_CONST(4332.3314561342004/8.0),
8789 REAL_CONST(4343.152137925088/8.0),
8790 REAL_CONST(4353.9795636777671/8.0),
8791 REAL_CONST(4364.8137250016052/8.0),
8792 REAL_CONST(4375.6546135320223/8.0),
8793 REAL_CONST(4386.5022209303588/8.0),
8794 REAL_CONST(4397.3565388837469/8.0),
8795 REAL_CONST(4408.2175591049827/8.0),
8796 REAL_CONST(4419.0852733324018/8.0),
8797 REAL_CONST(4429.9596733297531/8.0),
8798 REAL_CONST(4440.8407508860728/8.0),
8799 REAL_CONST(4451.7284978155603/8.0),
8800 REAL_CONST(4462.6229059574571/8.0),
8801 REAL_CONST(4473.5239671759227/8.0),
8802 REAL_CONST(4484.4316733599126/8.0),
8803 REAL_CONST(4495.3460164230582/8.0),
8804 REAL_CONST(4506.2669883035496/8.0),
8805 REAL_CONST(4517.1945809640119/8.0),
8806 REAL_CONST(4528.1287863913894/8.0),
8807 REAL_CONST(4539.069596596828/8.0),
8808 REAL_CONST(4550.0170036155587/8.0),
8809 REAL_CONST(4560.9709995067806/8.0),
8810 REAL_CONST(4571.931576353546/8.0),
8811 REAL_CONST(4582.898726262647/8.0),
8812 REAL_CONST(4593.8724413645004/8.0),
8813 REAL_CONST(4604.8527138130348/8.0),
8814 REAL_CONST(4615.8395357855816/8.0),
8815 REAL_CONST(4626.8328994827571/8.0),
8816 REAL_CONST(4637.8327971283588/8.0),
8817 REAL_CONST(4648.8392209692511/8.0),
8818 REAL_CONST(4659.8521632752563/8.0),
8819 REAL_CONST(4670.8716163390473/8.0),
8820 REAL_CONST(4681.8975724760394/8.0),
8821 REAL_CONST(4692.9300240242837/8.0),
8822 REAL_CONST(4703.9689633443595/8.0),
8823 REAL_CONST(4715.0143828192668/8.0),
8824 REAL_CONST(4726.0662748543255/8.0),
8825 REAL_CONST(4737.1246318770682/8.0),
8826 REAL_CONST(4748.1894463371373/8.0),
8827 REAL_CONST(4759.2607107061804/8.0),
8828 REAL_CONST(4770.3384174777493/8.0),
8829 REAL_CONST(4781.4225591671993/8.0),
8830 REAL_CONST(4792.5131283115852/8.0),
8831 REAL_CONST(4803.6101174695614/8.0),
8832 REAL_CONST(4814.7135192212854/8.0),
8833 REAL_CONST(4825.8233261683154/8.0),
8834 REAL_CONST(4836.9395309335096/8.0),
8835 REAL_CONST(4848.0621261609349/8.0),
8836 REAL_CONST(4859.1911045157631/8.0),
8837 REAL_CONST(4870.3264586841779/8.0),
8838 REAL_CONST(4881.4681813732768/8.0),
8839 REAL_CONST(4892.6162653109768/8.0),
8840 REAL_CONST(4903.7707032459193/8.0),
8841 REAL_CONST(4914.931487947375/8.0),
8842 REAL_CONST(4926.0986122051509/8.0),
8843 REAL_CONST(4937.2720688294967/8.0),
8844 REAL_CONST(4948.4518506510112/8.0),
8845 REAL_CONST(4959.637950520555/8.0),
8846 REAL_CONST(4970.8303613091521/8.0),
8847 REAL_CONST(4982.0290759079044/8.0),
8848 REAL_CONST(4993.2340872278974/8.0),
8849 REAL_CONST(5004.4453882001153/8.0),
8850 REAL_CONST(5015.6629717753467/8.0),
8851 REAL_CONST(5026.8868309241007/8.0),
8852 REAL_CONST(5038.1169586365131/8.0),
8853 REAL_CONST(5049.353347922266/8.0),
8854 REAL_CONST(5060.5959918104927/8.0),
8855 REAL_CONST(5071.8448833496996/8.0),
8856 REAL_CONST(5083.1000156076734/8.0),
8857 REAL_CONST(5094.3613816713996/8.0),
8858 REAL_CONST(5105.6289746469747/8.0),
8859 REAL_CONST(5116.9027876595246/8.0),
8860 REAL_CONST(5128.18281385312/8.0),
8861 REAL_CONST(5139.4690463906918/8.0),
8862 REAL_CONST(5150.7614784539473/8.0),
8863 REAL_CONST(5162.0601032432933/8.0),
8864 REAL_CONST(5173.3649139777472/8.0),
8865 REAL_CONST(5184.6759038948594/8.0),
8866 REAL_CONST(5195.9930662506322/8.0),
8867 REAL_CONST(5207.3163943194386/8.0),
8868 REAL_CONST(5218.6458813939435/8.0),
8869 REAL_CONST(5229.9815207850224/8.0),
8870 REAL_CONST(5241.3233058216847/8.0),
8871 REAL_CONST(5252.6712298509919/8.0),
8872 REAL_CONST(5264.025286237983/8.0),
8873 REAL_CONST(5275.3854683655954/8.0),
8874 REAL_CONST(5286.7517696345885/8.0),
8875 REAL_CONST(5298.1241834634639/8.0),
8876 REAL_CONST(5309.5027032883945/8.0),
8877 REAL_CONST(5320.887322563146/8.0),
8878 REAL_CONST(5332.2780347589978/8.0),
8879 REAL_CONST(5343.6748333646756/8.0),
8880 REAL_CONST(5355.0777118862716/8.0),
8881 REAL_CONST(5366.4866638471722/8.0),
8882 REAL_CONST(5377.901682787985/8.0),
8883 REAL_CONST(5389.3227622664635/8.0),
8884 REAL_CONST(5400.749895857437/8.0),
8885 REAL_CONST(5412.1830771527357/8.0),
8886 REAL_CONST(5423.622299761123/8.0),
8887 REAL_CONST(5435.067557308219/8.0),
8888 REAL_CONST(5446.5188434364318/8.0),
8889 REAL_CONST(5457.9761518048872/8.0),
8890 REAL_CONST(5469.4394760893592/8.0),
8891 REAL_CONST(5480.9088099821975/8.0),
8892 REAL_CONST(5492.3841471922606/8.0),
8893 REAL_CONST(5503.8654814448455/8.0),
8894 REAL_CONST(5515.3528064816201/8.0),
8895 REAL_CONST(5526.846116060552/8.0),
8896 REAL_CONST(5538.3454039558474/8.0),
8897 REAL_CONST(5549.8506639578736/8.0),
8898 REAL_CONST(5561.3618898731029/8.0),
8899 REAL_CONST(5572.8790755240361/8.0),
8900 REAL_CONST(5584.4022147491451/8.0),
8901 REAL_CONST(5595.9313014027975/8.0),
8902 REAL_CONST(5607.4663293552012/8.0),
8903 REAL_CONST(5619.0072924923297/8.0),
8904 REAL_CONST(5630.5541847158656/8.0),
8905 REAL_CONST(5642.1069999431284/8.0),
8906 REAL_CONST(5653.665732107017/8.0),
8907 REAL_CONST(5665.230375155943/8.0),
8908 REAL_CONST(5676.8009230537655/8.0),
8909 REAL_CONST(5688.3773697797333/8.0),
8910 REAL_CONST(5699.9597093284156/8.0),
8911 REAL_CONST(5711.5479357096474/8.0),
8912 REAL_CONST(5723.1420429484588/8.0),
8913 REAL_CONST(5734.7420250850209/8.0),
8914 REAL_CONST(5746.347876174581/8.0),
8915 REAL_CONST(5757.9595902874016/8.0),
8916 REAL_CONST(5769.5771615087006/8.0),
8917 REAL_CONST(5781.2005839385911/8.0),
8918 REAL_CONST(5792.8298516920213/8.0),
8919 REAL_CONST(5804.4649588987149/8.0),
8920 REAL_CONST(5816.1058997031105/8.0),
8921 REAL_CONST(5827.7526682643065/8.0),
8922 REAL_CONST(5839.4052587559972/8.0),
8923 REAL_CONST(5851.0636653664196/8.0),
8924 REAL_CONST(5862.7278822982908/8.0),
8925 REAL_CONST(5874.3979037687541/8.0),
8926 REAL_CONST(5886.0737240093204/8.0),
8927 REAL_CONST(5897.7553372658094/8.0),
8928 REAL_CONST(5909.4427377982956/8.0),
8929 REAL_CONST(5921.1359198810505/8.0),
8930 REAL_CONST(5932.8348778024874/8.0),
8931 REAL_CONST(5944.5396058651031/8.0),
8932 REAL_CONST(5956.2500983854261/8.0),
8933 REAL_CONST(5967.9663496939575/8.0),
8934 REAL_CONST(5979.6883541351208/8.0),
8935 REAL_CONST(5991.4161060672022/8.0),
8936 REAL_CONST(6003.1495998623004/8.0),
8937 REAL_CONST(6014.8888299062692/8.0),
8938 REAL_CONST(6026.6337905986684/8.0),
8939 REAL_CONST(6038.3844763527022/8.0),
8940 REAL_CONST(6050.1408815951781/8.0),
8941 REAL_CONST(6061.9030007664414/8.0),
8942 REAL_CONST(6073.6708283203316/8.0),
8943 REAL_CONST(6085.4443587241267/8.0),
8944 REAL_CONST(6097.2235864584891/8.0),
8945 REAL_CONST(6109.0085060174197/8.0),
8946 REAL_CONST(6120.7991119081998/8.0),
8947 REAL_CONST(6132.595398651345/8.0),
8948 REAL_CONST(6144.3973607805519/8.0),
8949 REAL_CONST(6156.2049928426459/8.0),
8950 REAL_CONST(6168.0182893975361/8.0),
8951 REAL_CONST(6179.8372450181578/8.0),
8952 REAL_CONST(6191.6618542904307/8.0),
8953 REAL_CONST(6203.4921118132024/8.0),
8954 REAL_CONST(6215.3280121982016/8.0),
8955 REAL_CONST(6227.1695500699925/8.0),
8956 REAL_CONST(6239.0167200659189/8.0),
8957 REAL_CONST(6250.8695168360628/8.0),
8958 REAL_CONST(6262.7279350431891/8.0),
8959 REAL_CONST(6274.5919693627056/8.0),
8960 REAL_CONST(6286.4616144826068/8.0),
8961 REAL_CONST(6298.3368651034316/8.0),
8962 REAL_CONST(6310.2177159382172/8.0),
8963 REAL_CONST(6322.1041617124456/8.0),
8964 REAL_CONST(6333.9961971640032/8.0),
8965 REAL_CONST(6345.8938170431311/8.0),
8966 REAL_CONST(6357.7970161123785/8.0),
8967 REAL_CONST(6369.7057891465583/8.0),
8968 REAL_CONST(6381.6201309327007/8.0),
8969 REAL_CONST(6393.5400362700075/8.0),
8970 REAL_CONST(6405.4654999698032/8.0),
8971 REAL_CONST(6417.3965168554978/8.0),
8972 REAL_CONST(6429.3330817625329/8.0),
8973 REAL_CONST(6441.2751895383453/8.0),
8974 REAL_CONST(6453.2228350423138/8.0),
8975 REAL_CONST(6465.176013145724/8.0),
8976 REAL_CONST(6477.134718731716/8.0),
8977 REAL_CONST(6489.0989466952469/8.0),
8978 REAL_CONST(6501.0686919430445/8.0),
8979 REAL_CONST(6513.0439493935628/8.0),
8980 REAL_CONST(6525.0247139769417/8.0),
8981 REAL_CONST(6537.010980634961/8.0),
8982 REAL_CONST(6549.002744321001/8.0),
8983 REAL_CONST(6560.9999999999973/8.0),
8984 REAL_CONST(6573.0027426483985/8.0),
8985 REAL_CONST(6585.0109672541284/8.0),
8986 REAL_CONST(6597.0246688165371/8.0),
8987 REAL_CONST(6609.0438423463656/8.0),
8988 REAL_CONST(6621.0684828657004/8.0),
8989 REAL_CONST(6633.0985854079354/8.0),
8990 REAL_CONST(6645.134145017727/8.0),
8991 REAL_CONST(6657.1751567509573/8.0),
8992 REAL_CONST(6669.2216156746908/8.0),
8993 REAL_CONST(6681.2735168671343/8.0),
8994 REAL_CONST(6693.3308554176001/8.0),
8995 REAL_CONST(6705.3936264264594/8.0),
8996 REAL_CONST(6717.461825005108/8.0),
8997 REAL_CONST(6729.535446275926/8.0),
8998 REAL_CONST(6741.6144853722335/8.0),
8999 REAL_CONST(6753.6989374382601/8.0),
9000 REAL_CONST(6765.7887976290967/8.0),
9001 REAL_CONST(6777.8840611106634/8.0),
9002 REAL_CONST(6789.9847230596661/8.0),
9003 REAL_CONST(6802.0907786635626/8.0),
9004 REAL_CONST(6814.2022231205201/8.0),
9005 REAL_CONST(6826.3190516393797/8.0),
9006 REAL_CONST(6838.4412594396181/8.0),
9007 REAL_CONST(6850.5688417513074/8.0),
9008 REAL_CONST(6862.701793815083/8.0),
9009 REAL_CONST(6874.840110882099/8.0),
9010 REAL_CONST(6886.9837882139991/8.0),
9011 REAL_CONST(6899.1328210828724/8.0),
9012 REAL_CONST(6911.2872047712199/8.0),
9013 REAL_CONST(6923.4469345719199/8.0),
9014 REAL_CONST(6935.6120057881863/8.0),
9015 REAL_CONST(6947.7824137335365/8.0),
9016 REAL_CONST(6959.9581537317536/8.0),
9017 REAL_CONST(6972.1392211168532/8.0),
9018 REAL_CONST(6984.3256112330409/8.0),
9019 REAL_CONST(6996.5173194346862/8.0),
9020 REAL_CONST(7008.7143410862773/8.0),
9021 REAL_CONST(7020.9166715623942/8.0),
9022 REAL_CONST(7033.1243062476678/8.0),
9023 REAL_CONST(7045.3372405367481/8.0),
9024 REAL_CONST(7057.5554698342685/8.0),
9025 REAL_CONST(7069.7789895548103/8.0),
9026 REAL_CONST(7082.0077951228714/8.0),
9027 REAL_CONST(7094.2418819728273/8.0),
9028 REAL_CONST(7106.4812455489018/8.0),
9029 REAL_CONST(7118.7258813051285/8.0),
9030 REAL_CONST(7130.9757847053224/8.0),
9031 REAL_CONST(7143.2309512230404/8.0),
9032 REAL_CONST(7155.4913763415516/8.0),
9033 REAL_CONST(7167.7570555538041/8.0),
9034 REAL_CONST(7180.0279843623894/8.0),
9035 REAL_CONST(7192.3041582795131/8.0),
9036 REAL_CONST(7204.5855728269571/8.0),
9037 REAL_CONST(7216.8722235360519/8.0),
9038 REAL_CONST(7229.1641059476406/8.0),
9039 REAL_CONST(7241.4612156120484/8.0),
9040 REAL_CONST(7253.7635480890503/8.0),
9041 REAL_CONST(7266.0710989478375/8.0),
9042 REAL_CONST(7278.3838637669869/8.0),
9043 REAL_CONST(7290.7018381344296/8.0),
9044 REAL_CONST(7303.0250176474174/8.0),
9045 REAL_CONST(7315.3533979124932/8.0),
9046 REAL_CONST(7327.6869745454596/8.0),
9047 REAL_CONST(7340.0257431713462/8.0),
9048 REAL_CONST(7352.3696994243801/8.0),
9049 REAL_CONST(7364.7188389479543/8.0),
9050 REAL_CONST(7377.0731573945968/8.0),
9051 REAL_CONST(7389.4326504259407/8.0),
9052 REAL_CONST(7401.7973137126937/8.0),
9053 REAL_CONST(7414.1671429346061/8.0),
9054 REAL_CONST(7426.5421337804428/8.0),
9055 REAL_CONST(7438.922281947951/8.0),
9056 REAL_CONST(7451.3075831438346/8.0),
9057 REAL_CONST(7463.6980330837177/8.0),
9058 REAL_CONST(7476.0936274921214/8.0),
9059 REAL_CONST(7488.4943621024304/8.0),
9060 REAL_CONST(7500.9002326568652/8.0),
9061 REAL_CONST(7513.3112349064522/8.0),
9062 REAL_CONST(7525.7273646109943/8.0),
9063 REAL_CONST(7538.1486175390446/8.0),
9064 REAL_CONST(7550.5749894678729/8.0),
9065 REAL_CONST(7563.0064761834419/8.0),
9066 REAL_CONST(7575.4430734803736/8.0),
9067 REAL_CONST(7587.8847771619248/8.0),
9068 REAL_CONST(7600.3315830399597/8.0),
9069 REAL_CONST(7612.7834869349153/8.0),
9070 REAL_CONST(7625.24048467578/8.0),
9071 REAL_CONST(7637.7025721000637/8.0),
9072 REAL_CONST(7650.1697450537677/8.0),
9073 REAL_CONST(7662.6419993913596/8.0),
9074 REAL_CONST(7675.1193309757446/8.0),
9075 REAL_CONST(7687.6017356782404/8.0),
9076 REAL_CONST(7700.0892093785433/8.0),
9077 REAL_CONST(7712.5817479647112/8.0),
9078 REAL_CONST(7725.079347333125/8.0),
9079 REAL_CONST(7737.5820033884729/8.0),
9080 REAL_CONST(7750.0897120437139/8.0),
9081 REAL_CONST(7762.6024692200581/8.0),
9082 REAL_CONST(7775.1202708469355/8.0),
9083 REAL_CONST(7787.6431128619733/8.0),
9084 REAL_CONST(7800.1709912109645/8.0),
9085 REAL_CONST(7812.7039018478481/8.0),
9086 REAL_CONST(7825.2418407346768/8.0),
9087 REAL_CONST(7837.7848038415968/8.0),
9088 REAL_CONST(7850.3327871468155/8.0),
9089 REAL_CONST(7862.8857866365806/8.0),
9090 REAL_CONST(7875.4437983051539/8.0),
9091 REAL_CONST(7888.006818154784/8.0),
9092 REAL_CONST(7900.5748421956796/8.0),
9093 REAL_CONST(7913.1478664459901/8.0),
9094 REAL_CONST(7925.725886931772/8.0),
9095 REAL_CONST(7938.3088996869719/8.0),
9096 REAL_CONST(7950.8969007533951/8.0),
9097 REAL_CONST(7963.4898861806851/8.0),
9098 REAL_CONST(7976.0878520262959/8.0),
9099 REAL_CONST(7988.6907943554688/8.0),
9100 REAL_CONST(8001.2987092412086/8.0),
9101 REAL_CONST(8013.911592764257/8.0),
9102 REAL_CONST(8026.5294410130691/8.0),
9103 REAL_CONST(8039.1522500837891/8.0),
9104 REAL_CONST(8051.7800160802271/8.0),
9105 REAL_CONST(8064.412735113835/8.0),
9106 REAL_CONST(8077.0504033036796/8.0),
9107 REAL_CONST(8089.6930167764222/8.0),
9108 REAL_CONST(8102.3405716662946/8.0),
9109 REAL_CONST(8114.9930641150731/8.0),
9110 REAL_CONST(8127.6504902720571/8.0),
9111 REAL_CONST(8140.3128462940449/8.0),
9112 REAL_CONST(8152.9801283453098/8.0),
9113 REAL_CONST(8165.6523325975786/8.0),
9114 REAL_CONST(8178.3294552300049/8.0),
9115 REAL_CONST(8191.0114924291529/8.0),
9116 REAL_CONST(8203.6984403889655/8.0),
9117 REAL_CONST(8216.3902953107463/8.0),
9118 REAL_CONST(8229.0870534031419/8.0),
9119 REAL_CONST(8241.7887108821069/8.0),
9120 REAL_CONST(8254.4952639708936/8.0),
9121 REAL_CONST(8267.2067089000211/8.0),
9122 REAL_CONST(8279.9230419072574/8.0),
9123 REAL_CONST(8292.6442592375952/8.0),
9124 REAL_CONST(8305.3703571432306/8.0),
9125 REAL_CONST(8318.101331883543/8.0),
9126 REAL_CONST(8330.8371797250657/8.0),
9127 REAL_CONST(8343.577896941475/8.0),
9128 REAL_CONST(8356.3234798135582/8.0),
9129 REAL_CONST(8369.0739246291978/8.0),
9130 REAL_CONST(8381.8292276833508/8.0),
9131 REAL_CONST(8394.5893852780209/8.0),
9132 REAL_CONST(8407.3543937222421/8.0),
9133 REAL_CONST(8420.1242493320569/8.0),
9134 REAL_CONST(8432.8989484304948/8.0),
9135 REAL_CONST(8445.6784873475499/8.0),
9136 REAL_CONST(8458.4628624201578/8.0),
9137 REAL_CONST(8471.2520699921806/8.0),
9138 REAL_CONST(8484.0461064143838/8.0),
9139 REAL_CONST(8496.8449680444082/8.0),
9140 REAL_CONST(8509.6486512467636/8.0),
9141 REAL_CONST(8522.4571523927953/8.0),
9142 REAL_CONST(8535.270467860666/8.0),
9143 REAL_CONST(8548.0885940353437/8.0),
9144 REAL_CONST(8560.9115273085663/8.0),
9145 REAL_CONST(8573.7392640788403/8.0),
9146 REAL_CONST(8586.5718007514006/8.0),
9147 REAL_CONST(8599.4091337382069/8.0),
9148 REAL_CONST(8612.2512594579148/8.0),
9149 REAL_CONST(8625.0981743358552/8.0),
9150 REAL_CONST(8637.9498748040205/8.0),
9151 REAL_CONST(8650.8063573010386/8.0),
9152 REAL_CONST(8663.6676182721567/8.0),
9153 REAL_CONST(8676.533654169225/8.0),
9154 REAL_CONST(8689.4044614506638/8.0),
9155 REAL_CONST(8702.2800365814601/8.0),
9156 REAL_CONST(8715.1603760331418/8.0),
9157 REAL_CONST(8728.0454762837508/8.0),
9158 REAL_CONST(8740.9353338178389/8.0),
9159 REAL_CONST(8753.8299451264356/8.0),
9160 REAL_CONST(8766.7293067070332/8.0),
9161 REAL_CONST(8779.6334150635721/8.0),
9162 REAL_CONST(8792.5422667064158/8.0),
9163 REAL_CONST(8805.4558581523324/8.0),
9164 REAL_CONST(8818.3741859244819/8.0),
9165 REAL_CONST(8831.2972465523908/8.0),
9166 REAL_CONST(8844.2250365719356/8.0),
9167 REAL_CONST(8857.1575525253265/8.0),
9168 REAL_CONST(8870.0947909610859/8.0),
9169 REAL_CONST(8883.0367484340295/8.0),
9170 REAL_CONST(8895.9834215052524/8.0),
9171 REAL_CONST(8908.934806742107/8.0),
9172 REAL_CONST(8921.8909007181846/8.0),
9173 REAL_CONST(8934.8517000132997/8.0),
9174 REAL_CONST(8947.817201213471/8.0),
9175 REAL_CONST(8960.7874009109/8.0),
9176 REAL_CONST(8973.7622957039603/8.0),
9177 REAL_CONST(8986.7418821971733/8.0),
9178 REAL_CONST(8999.7261570011924/8.0),
9179 REAL_CONST(9012.7151167327884/8.0),
9180 REAL_CONST(9025.7087580148236/8.0),
9181 REAL_CONST(9038.7070774762469/8.0),
9182 REAL_CONST(9051.7100717520643/8.0),
9183 REAL_CONST(9064.7177374833282/8.0),
9184 REAL_CONST(9077.7300713171153/8.0),
9185 REAL_CONST(9090.7470699065179/8.0),
9186 REAL_CONST(9103.7687299106146/8.0),
9187 REAL_CONST(9116.7950479944648/8.0),
9188 REAL_CONST(9129.8260208290812/8.0),
9189 REAL_CONST(9142.8616450914233/8.0),
9190 REAL_CONST(9155.9019174643727/8.0),
9191 REAL_CONST(9168.9468346367157/8.0),
9192 REAL_CONST(9181.9963933031358/8.0),
9193 REAL_CONST(9195.0505901641845/8.0),
9194 REAL_CONST(9208.1094219262741/8.0),
9195 REAL_CONST(9221.1728853016557/8.0),
9196 REAL_CONST(9234.240977008405/8.0),
9197 REAL_CONST(9247.3136937704076/8.0),
9198 REAL_CONST(9260.3910323173386/8.0),
9199 REAL_CONST(9273.472989384647/8.0),
9200 REAL_CONST(9286.5595617135423/8.0),
9201 REAL_CONST(9299.6507460509747/8.0),
9202 REAL_CONST(9312.7465391496207/8.0),
9203 REAL_CONST(9325.8469377678684/8.0),
9204 REAL_CONST(9338.9519386698012/8.0),
9205 REAL_CONST(9352.0615386251757/8.0),
9206 REAL_CONST(9365.1757344094131/8.0),
9207 REAL_CONST(9378.2945228035842/8.0),
9208 REAL_CONST(9391.4179005943843/8.0),
9209 REAL_CONST(9404.5458645741273/8.0),
9210 REAL_CONST(9417.6784115407263/8.0),
9211 REAL_CONST(9430.8155382976747/8.0),
9212 REAL_CONST(9443.9572416540359/8.0),
9213 REAL_CONST(9457.1035184244265/8.0),
9214 REAL_CONST(9470.2543654290002/8.0),
9215 REAL_CONST(9483.4097794934296/8.0),
9216 REAL_CONST(9496.5697574488931/8.0),
9217 REAL_CONST(9509.7342961320664/8.0),
9218 REAL_CONST(9522.9033923850911/8.0),
9219 REAL_CONST(9536.0770430555804/8.0),
9220 REAL_CONST(9549.2552449965824/8.0),
9221 REAL_CONST(9562.4379950665825/8.0),
9222 REAL_CONST(9575.6252901294793/8.0),
9223 REAL_CONST(9588.8171270545736/8.0),
9224 REAL_CONST(9602.0135027165488/8.0),
9225 REAL_CONST(9615.2144139954635/8.0),
9226 REAL_CONST(9628.4198577767274/8.0),
9227 REAL_CONST(9641.629830951093/8.0),
9228 REAL_CONST(9654.844330414644/8.0),
9229 REAL_CONST(9668.0633530687719/8.0),
9230 REAL_CONST(9681.286895820167/8.0),
9231 REAL_CONST(9694.5149555808002/8.0),
9232 REAL_CONST(9707.7475292679192/8.0),
9233 REAL_CONST(9720.9846138040157/8.0),
9234 REAL_CONST(9734.2262061168276/8.0),
9235 REAL_CONST(9747.4723031393187/8.0),
9236 REAL_CONST(9760.7229018096641/8.0),
9237 REAL_CONST(9773.9779990712323/8.0),
9238 REAL_CONST(9787.2375918725811/8.0),
9239 REAL_CONST(9800.5016771674327/8.0),
9240 REAL_CONST(9813.7702519146696/8.0),
9241 REAL_CONST(9827.0433130783094/8.0),
9242 REAL_CONST(9840.3208576275028/8.0),
9243 REAL_CONST(9853.602882536512/8.0),
9244 REAL_CONST(9866.8893847846994/8.0),
9245 REAL_CONST(9880.1803613565116/8.0),
9246 REAL_CONST(9893.4758092414686/8.0),
9247 REAL_CONST(9906.7757254341523/8.0),
9248 REAL_CONST(9920.0801069341851/8.0),
9249 REAL_CONST(9933.3889507462245/8.0),
9250 REAL_CONST(9946.7022538799429/8.0),
9251 REAL_CONST(9960.0200133500221/8.0),
9252 REAL_CONST(9973.3422261761298/8.0),
9253 REAL_CONST(9986.6688893829159/8.0),
9254 REAL_CONST(9999.9999999999945/8.0),
9255 REAL_CONST(10013.335555061929/8.0),
9256 REAL_CONST(10026.675551608221/8.0),
9257 REAL_CONST(10040.019986683301/8.0),
9258 REAL_CONST(10053.368857336509/8.0),
9259 REAL_CONST(10066.722160622081/8.0),
9260 REAL_CONST(10080.079893599144/8.0),
9261 REAL_CONST(10093.442053331697/8.0),
9262 REAL_CONST(10106.808636888598/8.0),
9263 REAL_CONST(10120.179641343551/8.0),
9264 REAL_CONST(10133.555063775095/8.0),
9265 REAL_CONST(10146.934901266595/8.0),
9266 REAL_CONST(10160.31915090622/8.0),
9267 REAL_CONST(10173.707809786936/8.0),
9268 REAL_CONST(10187.100875006496/8.0),
9269 REAL_CONST(10200.498343667417/8.0),
9270 REAL_CONST(10213.900212876984/8.0),
9271 REAL_CONST(10227.306479747222/8.0),
9272 REAL_CONST(10240.717141394889/8.0),
9273 REAL_CONST(10254.132194941467/8.0),
9274 REAL_CONST(10267.551637513146/8.0),
9275 REAL_CONST(10280.975466240814/8.0),
9276 REAL_CONST(10294.40367826004/8.0),
9277 REAL_CONST(10307.836270711066/8.0),
9278 REAL_CONST(10321.273240738796/8.0),
9279 REAL_CONST(10334.71458549278/8.0)
9280#ifdef BIG_IQ_TABLE
9281 ,REAL_CONST(10348.160302127204/8.0),
9282 REAL_CONST(10361.610387800878/8.0),
9283 REAL_CONST(10375.064839677221/8.0),
9284 REAL_CONST(10388.523654924258/8.0),
9285 REAL_CONST(10401.986830714593/8.0),
9286 REAL_CONST(10415.454364225412/8.0),
9287 REAL_CONST(10428.926252638465/8.0),
9288 REAL_CONST(10442.402493140049/8.0),
9289 REAL_CONST(10455.883082921007/8.0),
9290 REAL_CONST(10469.368019176709/8.0),
9291 REAL_CONST(10482.85729910704/8.0),
9292 REAL_CONST(10496.350919916393/8.0),
9293 REAL_CONST(10509.848878813653/8.0),
9294 REAL_CONST(10523.351173012188/8.0),
9295 REAL_CONST(10536.857799729838/8.0),
9296 REAL_CONST(10550.3687561889/8.0),
9297 REAL_CONST(10563.884039616123/8.0),
9298 REAL_CONST(10577.403647242685/8.0),
9299 REAL_CONST(10590.927576304197/8.0),
9300 REAL_CONST(10604.455824040679/8.0),
9301 REAL_CONST(10617.988387696556/8.0),
9302 REAL_CONST(10631.525264520642/8.0),
9303 REAL_CONST(10645.066451766135/8.0),
9304 REAL_CONST(10658.611946690598/8.0),
9305 REAL_CONST(10672.161746555956/8.0),
9306 REAL_CONST(10685.715848628475/8.0),
9307 REAL_CONST(10699.274250178762/8.0),
9308 REAL_CONST(10712.836948481747/8.0),
9309 REAL_CONST(10726.403940816675/8.0),
9310 REAL_CONST(10739.975224467091/8.0),
9311 REAL_CONST(10753.550796720834/8.0),
9312 REAL_CONST(10767.130654870027/8.0),
9313 REAL_CONST(10780.714796211059/8.0),
9314 REAL_CONST(10794.303218044579/8.0),
9315 REAL_CONST(10807.895917675487/8.0),
9316 REAL_CONST(10821.492892412922/8.0),
9317 REAL_CONST(10835.094139570248/8.0),
9318 REAL_CONST(10848.699656465047/8.0),
9319 REAL_CONST(10862.309440419107/8.0),
9320 REAL_CONST(10875.923488758415/8.0),
9321 REAL_CONST(10889.541798813138/8.0),
9322 REAL_CONST(10903.16436791762/8.0),
9323 REAL_CONST(10916.791193410372/8.0),
9324 REAL_CONST(10930.422272634056/8.0),
9325 REAL_CONST(10944.05760293548/8.0),
9326 REAL_CONST(10957.697181665582/8.0),
9327 REAL_CONST(10971.341006179427/8.0),
9328 REAL_CONST(10984.98907383619/8.0),
9329 REAL_CONST(10998.641381999149/8.0),
9330 REAL_CONST(11012.297928035676/8.0),
9331 REAL_CONST(11025.958709317223/8.0),
9332 REAL_CONST(11039.623723219316/8.0),
9333 REAL_CONST(11053.292967121541/8.0),
9334 REAL_CONST(11066.966438407539/8.0),
9335 REAL_CONST(11080.64413446499/8.0),
9336 REAL_CONST(11094.326052685608/8.0),
9337 REAL_CONST(11108.012190465128/8.0),
9338 REAL_CONST(11121.702545203296/8.0),
9339 REAL_CONST(11135.397114303863/8.0),
9340 REAL_CONST(11149.095895174571/8.0),
9341 REAL_CONST(11162.798885227143/8.0),
9342 REAL_CONST(11176.506081877278/8.0),
9343 REAL_CONST(11190.217482544635/8.0),
9344 REAL_CONST(11203.933084652828/8.0),
9345 REAL_CONST(11217.652885629415/8.0),
9346 REAL_CONST(11231.376882905886/8.0),
9347 REAL_CONST(11245.105073917659/8.0),
9348 REAL_CONST(11258.837456104062/8.0),
9349 REAL_CONST(11272.574026908333/8.0),
9350 REAL_CONST(11286.314783777601/8.0),
9351 REAL_CONST(11300.059724162888/8.0),
9352 REAL_CONST(11313.808845519083/8.0),
9353 REAL_CONST(11327.562145304952/8.0),
9354 REAL_CONST(11341.319620983111/8.0),
9355 REAL_CONST(11355.081270020033/8.0),
9356 REAL_CONST(11368.847089886023/8.0),
9357 REAL_CONST(11382.617078055218/8.0),
9358 REAL_CONST(11396.391232005579/8.0),
9359 REAL_CONST(11410.169549218874/8.0),
9360 REAL_CONST(11423.952027180676/8.0),
9361 REAL_CONST(11437.738663380349/8.0),
9362 REAL_CONST(11451.529455311042/8.0),
9363 REAL_CONST(11465.324400469679/8.0),
9364 REAL_CONST(11479.123496356951/8.0),
9365 REAL_CONST(11492.926740477304/8.0),
9366 REAL_CONST(11506.734130338931/8.0),
9367 REAL_CONST(11520.545663453764/8.0),
9368 REAL_CONST(11534.361337337466/8.0),
9369 REAL_CONST(11548.181149509423/8.0),
9370 REAL_CONST(11562.005097492724/8.0),
9371 REAL_CONST(11575.83317881417/8.0),
9372 REAL_CONST(11589.665391004253/8.0),
9373 REAL_CONST(11603.501731597149/8.0),
9374 REAL_CONST(11617.342198130715/8.0),
9375 REAL_CONST(11631.186788146468/8.0),
9376 REAL_CONST(11645.035499189589/8.0),
9377 REAL_CONST(11658.888328808911/8.0),
9378 REAL_CONST(11672.745274556904/8.0),
9379 REAL_CONST(11686.606333989675/8.0),
9380 REAL_CONST(11700.471504666955/8.0),
9381 REAL_CONST(11714.340784152086/8.0),
9382 REAL_CONST(11728.214170012021/8.0),
9383 REAL_CONST(11742.091659817312/8.0),
9384 REAL_CONST(11755.973251142101/8.0),
9385 REAL_CONST(11769.858941564111/8.0),
9386 REAL_CONST(11783.748728664636/8.0),
9387 REAL_CONST(11797.642610028539/8.0),
9388 REAL_CONST(11811.540583244237/8.0),
9389 REAL_CONST(11825.442645903697/8.0),
9390 REAL_CONST(11839.34879560242/8.0),
9391 REAL_CONST(11853.259029939445/8.0),
9392 REAL_CONST(11867.173346517333/8.0),
9393 REAL_CONST(11881.091742942155/8.0),
9394 REAL_CONST(11895.014216823492/8.0),
9395 REAL_CONST(11908.940765774427/8.0),
9396 REAL_CONST(11922.871387411526/8.0),
9397 REAL_CONST(11936.806079354839/8.0),
9398 REAL_CONST(11950.744839227897/8.0),
9399 REAL_CONST(11964.687664657684/8.0),
9400 REAL_CONST(11978.634553274653/8.0),
9401 REAL_CONST(11992.585502712702/8.0),
9402 REAL_CONST(12006.540510609168/8.0),
9403 REAL_CONST(12020.499574604828/8.0),
9404 REAL_CONST(12034.462692343877/8.0),
9405 REAL_CONST(12048.429861473938/8.0),
9406 REAL_CONST(12062.401079646032/8.0),
9407 REAL_CONST(12076.376344514589/8.0),
9408 REAL_CONST(12090.355653737433/8.0),
9409 REAL_CONST(12104.339004975769/8.0),
9410 REAL_CONST(12118.326395894188/8.0),
9411 REAL_CONST(12132.317824160644/8.0),
9412 REAL_CONST(12146.313287446457/8.0),
9413 REAL_CONST(12160.312783426305/8.0),
9414 REAL_CONST(12174.316309778205/8.0),
9415 REAL_CONST(12188.323864183525/8.0),
9416 REAL_CONST(12202.335444326955/8.0),
9417 REAL_CONST(12216.351047896511/8.0),
9418 REAL_CONST(12230.370672583531/8.0),
9419 REAL_CONST(12244.394316082657/8.0),
9420 REAL_CONST(12258.421976091831/8.0),
9421 REAL_CONST(12272.453650312296/8.0),
9422 REAL_CONST(12286.489336448574/8.0),
9423 REAL_CONST(12300.529032208471/8.0),
9424 REAL_CONST(12314.572735303058/8.0),
9425 REAL_CONST(12328.620443446678/8.0),
9426 REAL_CONST(12342.672154356922/8.0),
9427 REAL_CONST(12356.727865754638/8.0),
9428 REAL_CONST(12370.787575363909/8.0),
9429 REAL_CONST(12384.851280912055/8.0),
9430 REAL_CONST(12398.918980129623/8.0),
9431 REAL_CONST(12412.990670750381/8.0),
9432 REAL_CONST(12427.066350511306/8.0),
9433 REAL_CONST(12441.146017152583/8.0),
9434 REAL_CONST(12455.229668417589/8.0),
9435 REAL_CONST(12469.317302052901/8.0),
9436 REAL_CONST(12483.40891580827/8.0),
9437 REAL_CONST(12497.50450743663/8.0),
9438 REAL_CONST(12511.604074694078/8.0),
9439 REAL_CONST(12525.707615339878/8.0),
9440 REAL_CONST(12539.815127136444/8.0),
9441 REAL_CONST(12553.926607849342/8.0),
9442 REAL_CONST(12568.042055247275/8.0),
9443 REAL_CONST(12582.161467102082/8.0),
9444 REAL_CONST(12596.284841188726/8.0),
9445 REAL_CONST(12610.41217528529/8.0),
9446 REAL_CONST(12624.543467172971/8.0),
9447 REAL_CONST(12638.678714636069/8.0),
9448 REAL_CONST(12652.817915461985/8.0),
9449 REAL_CONST(12666.961067441209/8.0),
9450 REAL_CONST(12681.108168367316/8.0),
9451 REAL_CONST(12695.259216036962/8.0),
9452 REAL_CONST(12709.414208249869/8.0),
9453 REAL_CONST(12723.573142808827/8.0),
9454 REAL_CONST(12737.736017519681/8.0),
9455 REAL_CONST(12751.902830191326/8.0),
9456 REAL_CONST(12766.073578635704/8.0),
9457 REAL_CONST(12780.248260667788/8.0),
9458 REAL_CONST(12794.426874105588/8.0),
9459 REAL_CONST(12808.609416770132/8.0),
9460 REAL_CONST(12822.795886485468/8.0),
9461 REAL_CONST(12836.986281078653/8.0),
9462 REAL_CONST(12851.180598379744/8.0),
9463 REAL_CONST(12865.378836221802/8.0),
9464 REAL_CONST(12879.580992440871/8.0),
9465 REAL_CONST(12893.787064875984/8.0),
9466 REAL_CONST(12907.997051369144/8.0),
9467 REAL_CONST(12922.210949765335/8.0),
9468 REAL_CONST(12936.428757912496/8.0),
9469 REAL_CONST(12950.650473661524/8.0),
9470 REAL_CONST(12964.876094866273/8.0),
9471 REAL_CONST(12979.105619383534/8.0),
9472 REAL_CONST(12993.339045073039/8.0),
9473 REAL_CONST(13007.576369797454/8.0),
9474 REAL_CONST(13021.817591422368/8.0),
9475 REAL_CONST(13036.062707816285/8.0),
9476 REAL_CONST(13050.311716850629/8.0),
9477 REAL_CONST(13064.564616399723/8.0),
9478 REAL_CONST(13078.821404340792/8.0),
9479 REAL_CONST(13093.082078553954/8.0),
9480 REAL_CONST(13107.346636922217/8.0),
9481 REAL_CONST(13121.615077331464/8.0),
9482 REAL_CONST(13135.887397670458/8.0),
9483 REAL_CONST(13150.163595830827/8.0),
9484 REAL_CONST(13164.44366970706/8.0),
9485 REAL_CONST(13178.727617196502/8.0),
9486 REAL_CONST(13193.015436199352/8.0),
9487 REAL_CONST(13207.307124618648/8.0),
9488 REAL_CONST(13221.602680360265/8.0),
9489 REAL_CONST(13235.902101332911/8.0),
9490 REAL_CONST(13250.205385448118/8.0),
9491 REAL_CONST(13264.512530620239/8.0),
9492 REAL_CONST(13278.823534766434/8.0),
9493 REAL_CONST(13293.138395806676/8.0),
9494 REAL_CONST(13307.457111663734/8.0),
9495 REAL_CONST(13321.779680263176/8.0),
9496 REAL_CONST(13336.106099533356/8.0),
9497 REAL_CONST(13350.436367405409/8.0),
9498 REAL_CONST(13364.77048181325/8.0),
9499 REAL_CONST(13379.108440693562/8.0),
9500 REAL_CONST(13393.450241985796/8.0),
9501 REAL_CONST(13407.795883632158/8.0),
9502 REAL_CONST(13422.145363577607/8.0),
9503 REAL_CONST(13436.498679769853/8.0),
9504 REAL_CONST(13450.855830159346/8.0),
9505 REAL_CONST(13465.216812699266/8.0),
9506 REAL_CONST(13479.581625345529/8.0),
9507 REAL_CONST(13493.950266056772/8.0),
9508 REAL_CONST(13508.32273279435/8.0),
9509 REAL_CONST(13522.699023522329/8.0),
9510 REAL_CONST(13537.079136207483/8.0),
9511 REAL_CONST(13551.463068819286/8.0),
9512 REAL_CONST(13565.850819329906/8.0),
9513 REAL_CONST(13580.2423857142/8.0),
9514 REAL_CONST(13594.63776594971/8.0),
9515 REAL_CONST(13609.036958016657/8.0),
9516 REAL_CONST(13623.439959897927/8.0),
9517 REAL_CONST(13637.846769579081/8.0),
9518 REAL_CONST(13652.257385048335/8.0),
9519 REAL_CONST(13666.67180429656/8.0),
9520 REAL_CONST(13681.090025317284/8.0),
9521 REAL_CONST(13695.512046106669/8.0),
9522 REAL_CONST(13709.937864663521/8.0),
9523 REAL_CONST(13724.367478989278/8.0),
9524 REAL_CONST(13738.800887088004/8.0),
9525 REAL_CONST(13753.238086966385/8.0),
9526 REAL_CONST(13767.679076633727/8.0),
9527 REAL_CONST(13782.123854101939/8.0),
9528 REAL_CONST(13796.572417385545/8.0),
9529 REAL_CONST(13811.024764501659/8.0),
9530 REAL_CONST(13825.480893469998/8.0),
9531 REAL_CONST(13839.94080231286/8.0),
9532 REAL_CONST(13854.404489055134/8.0),
9533 REAL_CONST(13868.871951724283/8.0),
9534 REAL_CONST(13883.34318835034/8.0),
9535 REAL_CONST(13897.818196965914/8.0),
9536 REAL_CONST(13912.296975606168/8.0),
9537 REAL_CONST(13926.779522308825/8.0),
9538 REAL_CONST(13941.26583511416/8.0),
9539 REAL_CONST(13955.755912064991/8.0),
9540 REAL_CONST(13970.249751206682/8.0),
9541 REAL_CONST(13984.747350587126/8.0),
9542 REAL_CONST(13999.248708256751/8.0),
9543 REAL_CONST(14013.753822268511/8.0),
9544 REAL_CONST(14028.262690677873/8.0),
9545 REAL_CONST(14042.775311542828/8.0),
9546 REAL_CONST(14057.291682923867/8.0),
9547 REAL_CONST(14071.811802883994/8.0),
9548 REAL_CONST(14086.335669488704/8.0),
9549 REAL_CONST(14100.863280805994/8.0),
9550 REAL_CONST(14115.394634906341/8.0),
9551 REAL_CONST(14129.92972986271/8.0),
9552 REAL_CONST(14144.468563750548/8.0),
9553 REAL_CONST(14159.01113464777/8.0),
9554 REAL_CONST(14173.55744063476/8.0),
9555 REAL_CONST(14188.107479794369/8.0),
9556 REAL_CONST(14202.661250211901/8.0),
9557 REAL_CONST(14217.218749975118/8.0),
9558 REAL_CONST(14231.779977174227/8.0),
9559 REAL_CONST(14246.344929901879/8.0),
9560 REAL_CONST(14260.913606253163/8.0),
9561 REAL_CONST(14275.486004325601/8.0),
9562 REAL_CONST(14290.062122219146/8.0),
9563 REAL_CONST(14304.641958036171/8.0),
9564 REAL_CONST(14319.225509881464/8.0),
9565 REAL_CONST(14333.812775862236/8.0),
9566 REAL_CONST(14348.403754088098/8.0),
9567 REAL_CONST(14362.998442671067/8.0),
9568 REAL_CONST(14377.59683972556/8.0),
9569 REAL_CONST(14392.198943368388/8.0),
9570 REAL_CONST(14406.804751718748/8.0),
9571 REAL_CONST(14421.414262898223/8.0),
9572 REAL_CONST(14436.027475030774/8.0),
9573 REAL_CONST(14450.64438624274/8.0),
9574 REAL_CONST(14465.264994662828/8.0),
9575 REAL_CONST(14479.889298422106/8.0),
9576 REAL_CONST(14494.517295654005/8.0),
9577 REAL_CONST(14509.148984494313/8.0),
9578 REAL_CONST(14523.784363081166/8.0),
9579 REAL_CONST(14538.423429555049/8.0),
9580 REAL_CONST(14553.066182058781/8.0),
9581 REAL_CONST(14567.712618737527/8.0),
9582 REAL_CONST(14582.362737738777/8.0),
9583 REAL_CONST(14597.016537212348/8.0),
9584 REAL_CONST(14611.674015310382/8.0),
9585 REAL_CONST(14626.33517018734/8.0),
9586 REAL_CONST(14640.999999999993/8.0),
9587 REAL_CONST(14655.668502907418/8.0),
9588 REAL_CONST(14670.340677071003/8.0),
9589 REAL_CONST(14685.016520654426/8.0),
9590 REAL_CONST(14699.696031823671/8.0),
9591 REAL_CONST(14714.379208746999/8.0),
9592 REAL_CONST(14729.066049594967/8.0),
9593 REAL_CONST(14743.756552540408/8.0),
9594 REAL_CONST(14758.45071575843/8.0),
9595 REAL_CONST(14773.148537426418/8.0),
9596 REAL_CONST(14787.850015724018/8.0),
9597 REAL_CONST(14802.555148833142/8.0),
9598 REAL_CONST(14817.263934937961/8.0),
9599 REAL_CONST(14831.976372224897/8.0),
9600 REAL_CONST(14846.692458882624/8.0),
9601 REAL_CONST(14861.41219310206/8.0),
9602 REAL_CONST(14876.135573076363/8.0),
9603 REAL_CONST(14890.862597000923/8.0),
9604 REAL_CONST(14905.593263073371/8.0),
9605 REAL_CONST(14920.327569493558/8.0),
9606 REAL_CONST(14935.065514463557/8.0),
9607 REAL_CONST(14949.807096187662/8.0),
9608 REAL_CONST(14964.552312872382/8.0),
9609 REAL_CONST(14979.301162726431/8.0),
9610 REAL_CONST(14994.053643960735/8.0),
9611 REAL_CONST(15008.809754788414/8.0),
9612 REAL_CONST(15023.569493424788/8.0),
9613 REAL_CONST(15038.332858087369/8.0),
9614 REAL_CONST(15053.099846995858/8.0),
9615 REAL_CONST(15067.870458372134/8.0),
9616 REAL_CONST(15082.644690440264/8.0),
9617 REAL_CONST(15097.422541426484/8.0),
9618 REAL_CONST(15112.204009559202/8.0),
9619 REAL_CONST(15126.989093068994/8.0),
9620 REAL_CONST(15141.777790188597/8.0),
9621 REAL_CONST(15156.570099152905/8.0),
9622 REAL_CONST(15171.366018198967/8.0),
9623 REAL_CONST(15186.165545565986/8.0),
9624 REAL_CONST(15200.968679495301/8.0),
9625 REAL_CONST(15215.775418230402/8.0),
9626 REAL_CONST(15230.585760016909/8.0),
9627 REAL_CONST(15245.399703102579/8.0),
9628 REAL_CONST(15260.217245737298/8.0),
9629 REAL_CONST(15275.038386173073/8.0),
9630 REAL_CONST(15289.863122664035/8.0),
9631 REAL_CONST(15304.691453466432/8.0),
9632 REAL_CONST(15319.523376838621/8.0),
9633 REAL_CONST(15334.358891041069/8.0),
9634 REAL_CONST(15349.197994336346/8.0),
9635 REAL_CONST(15364.040684989128/8.0),
9636 REAL_CONST(15378.886961266177/8.0),
9637 REAL_CONST(15393.736821436356/8.0),
9638 REAL_CONST(15408.590263770609/8.0),
9639 REAL_CONST(15423.447286541972/8.0),
9640 REAL_CONST(15438.307888025554/8.0),
9641 REAL_CONST(15453.172066498542/8.0),
9642 REAL_CONST(15468.039820240196/8.0),
9643 REAL_CONST(15482.91114753184/8.0),
9644 REAL_CONST(15497.786046656869/8.0),
9645 REAL_CONST(15512.664515900733/8.0),
9646 REAL_CONST(15527.546553550939/8.0),
9647 REAL_CONST(15542.432157897045/8.0),
9648 REAL_CONST(15557.32132723066/8.0),
9649 REAL_CONST(15572.214059845435/8.0),
9650 REAL_CONST(15587.110354037064/8.0),
9651 REAL_CONST(15602.010208103273/8.0),
9652 REAL_CONST(15616.913620343823/8.0),
9653 REAL_CONST(15631.820589060506/8.0),
9654 REAL_CONST(15646.731112557136/8.0),
9655 REAL_CONST(15661.645189139546/8.0),
9656 REAL_CONST(15676.562817115593/8.0),
9657 REAL_CONST(15691.483994795139/8.0),
9658 REAL_CONST(15706.408720490062/8.0),
9659 REAL_CONST(15721.336992514242/8.0),
9660 REAL_CONST(15736.268809183561/8.0),
9661 REAL_CONST(15751.204168815901/8.0),
9662 REAL_CONST(15766.143069731135/8.0),
9663 REAL_CONST(15781.085510251132/8.0),
9664 REAL_CONST(15796.03148869974/8.0),
9665 REAL_CONST(15810.981003402798/8.0),
9666 REAL_CONST(15825.934052688119/8.0),
9667 REAL_CONST(15840.890634885489/8.0),
9668 REAL_CONST(15855.850748326673/8.0),
9669 REAL_CONST(15870.814391345401/8.0),
9670 REAL_CONST(15885.781562277361/8.0),
9671 REAL_CONST(15900.752259460214/8.0),
9672 REAL_CONST(15915.726481233565/8.0),
9673 REAL_CONST(15930.704225938984/8.0),
9674 REAL_CONST(15945.685491919978/8.0),
9675 REAL_CONST(15960.670277522009/8.0),
9676 REAL_CONST(15975.658581092481/8.0),
9677 REAL_CONST(15990.65040098073/8.0),
9678 REAL_CONST(16005.645735538035/8.0),
9679 REAL_CONST(16020.644583117599/8.0),
9680 REAL_CONST(16035.646942074556/8.0),
9681 REAL_CONST(16050.652810765967/8.0),
9682 REAL_CONST(16065.662187550806/8.0),
9683 REAL_CONST(16080.675070789974/8.0),
9684 REAL_CONST(16095.691458846273/8.0),
9685 REAL_CONST(16110.711350084424/8.0),
9686 REAL_CONST(16125.734742871053/8.0),
9687 REAL_CONST(16140.761635574685/8.0),
9688 REAL_CONST(16155.792026565747/8.0),
9689 REAL_CONST(16170.825914216561/8.0),
9690 REAL_CONST(16185.863296901338/8.0),
9691 REAL_CONST(16200.904172996183/8.0),
9692 REAL_CONST(16215.948540879079/8.0),
9693 REAL_CONST(16230.996398929899/8.0),
9694 REAL_CONST(16246.047745530386/8.0),
9695 REAL_CONST(16261.102579064163/8.0),
9696 REAL_CONST(16276.160897916721/8.0),
9697 REAL_CONST(16291.22270047542/8.0),
9698 REAL_CONST(16306.287985129484/8.0),
9699 REAL_CONST(16321.356750269995/8.0),
9700 REAL_CONST(16336.428994289896/8.0),
9701 REAL_CONST(16351.504715583982/8.0),
9702 REAL_CONST(16366.5839125489/8.0),
9703 REAL_CONST(16381.666583583141/8.0),
9704 REAL_CONST(16396.752727087041/8.0),
9705 REAL_CONST(16411.842341462776/8.0),
9706 REAL_CONST(16426.935425114363/8.0),
9707 REAL_CONST(16442.031976447644/8.0),
9708 REAL_CONST(16457.131993870298/8.0),
9709 REAL_CONST(16472.235475791829/8.0),
9710 REAL_CONST(16487.342420623561/8.0),
9711 REAL_CONST(16502.452826778641/8.0),
9712 REAL_CONST(16517.566692672033/8.0),
9713 REAL_CONST(16532.684016720516/8.0),
9714 REAL_CONST(16547.804797342676/8.0),
9715 REAL_CONST(16562.929032958902/8.0),
9716 REAL_CONST(16578.056721991394/8.0),
9717 REAL_CONST(16593.18786286415/8.0),
9718 REAL_CONST(16608.322454002962/8.0),
9719 REAL_CONST(16623.460493835417/8.0),
9720 REAL_CONST(16638.601980790896/8.0),
9721 REAL_CONST(16653.746913300558/8.0),
9722 REAL_CONST(16668.895289797354/8.0),
9723 REAL_CONST(16684.047108716015/8.0),
9724 REAL_CONST(16699.202368493046/8.0),
9725 REAL_CONST(16714.361067566726/8.0),
9726 REAL_CONST(16729.523204377107/8.0),
9727 REAL_CONST(16744.688777366009/8.0),
9728 REAL_CONST(16759.857784977012/8.0),
9729 REAL_CONST(16775.030225655464/8.0),
9730 REAL_CONST(16790.206097848466/8.0),
9731 REAL_CONST(16805.385400004874/8.0),
9732 REAL_CONST(16820.568130575302/8.0),
9733 REAL_CONST(16835.754288012104/8.0),
9734 REAL_CONST(16850.943870769381/8.0),
9735 REAL_CONST(16866.136877302983/8.0),
9736 REAL_CONST(16881.333306070494/8.0),
9737 REAL_CONST(16896.53315553123/8.0),
9738 REAL_CONST(16911.736424146249/8.0),
9739 REAL_CONST(16926.943110378332/8.0),
9740 REAL_CONST(16942.153212691992/8.0),
9741 REAL_CONST(16957.366729553454/8.0),
9742 REAL_CONST(16972.583659430682/8.0),
9743 REAL_CONST(16987.804000793338/8.0),
9744 REAL_CONST(17003.027752112816/8.0),
9745 REAL_CONST(17018.254911862205/8.0),
9746 REAL_CONST(17033.485478516312/8.0),
9747 REAL_CONST(17048.719450551645/8.0),
9748 REAL_CONST(17063.956826446421/8.0),
9749 REAL_CONST(17079.197604680547/8.0),
9750 REAL_CONST(17094.44178373563/8.0),
9751 REAL_CONST(17109.689362094967/8.0),
9752 REAL_CONST(17124.940338243552/8.0),
9753 REAL_CONST(17140.194710668064/8.0),
9754 REAL_CONST(17155.452477856852/8.0),
9755 REAL_CONST(17170.713638299967/8.0),
9756 REAL_CONST(17185.978190489128/8.0),
9757 REAL_CONST(17201.246132917724/8.0),
9758 REAL_CONST(17216.517464080825/8.0),
9759 REAL_CONST(17231.792182475165/8.0),
9760 REAL_CONST(17247.070286599141/8.0),
9761 REAL_CONST(17262.351774952826/8.0),
9762 REAL_CONST(17277.636646037936/8.0),
9763 REAL_CONST(17292.924898357855/8.0),
9764 REAL_CONST(17308.216530417623/8.0),
9765 REAL_CONST(17323.511540723921/8.0),
9766 REAL_CONST(17338.809927785089/8.0),
9767 REAL_CONST(17354.111690111105/8.0),
9768 REAL_CONST(17369.416826213594/8.0),
9769 REAL_CONST(17384.725334605821/8.0),
9770 REAL_CONST(17400.037213802683/8.0),
9771 REAL_CONST(17415.352462320716/8.0),
9772 REAL_CONST(17430.67107867809/8.0),
9773 REAL_CONST(17445.993061394587/8.0),
9774 REAL_CONST(17461.318408991636/8.0),
9775 REAL_CONST(17476.647119992274/8.0),
9776 REAL_CONST(17491.979192921168/8.0),
9777 REAL_CONST(17507.314626304586/8.0),
9778 REAL_CONST(17522.653418670423/8.0),
9779 REAL_CONST(17537.995568548187/8.0),
9780 REAL_CONST(17553.341074468986/8.0),
9781 REAL_CONST(17568.689934965536/8.0),
9782 REAL_CONST(17584.042148572156/8.0),
9783 REAL_CONST(17599.397713824768/8.0),
9784 REAL_CONST(17614.75662926089/8.0),
9785 REAL_CONST(17630.118893419625/8.0),
9786 REAL_CONST(17645.484504841683/8.0),
9787 REAL_CONST(17660.853462069354/8.0),
9788 REAL_CONST(17676.225763646511/8.0),
9789 REAL_CONST(17691.601408118619/8.0),
9790 REAL_CONST(17706.980394032718/8.0),
9791 REAL_CONST(17722.362719937424/8.0),
9792 REAL_CONST(17737.748384382936/8.0),
9793 REAL_CONST(17753.137385921014/8.0),
9794 REAL_CONST(17768.529723104999/8.0),
9795 REAL_CONST(17783.92539448979/8.0),
9796 REAL_CONST(17799.324398631856/8.0),
9797 REAL_CONST(17814.726734089225/8.0),
9798 REAL_CONST(17830.13239942148/8.0),
9799 REAL_CONST(17845.541393189767/8.0),
9800 REAL_CONST(17860.95371395678/8.0),
9801 REAL_CONST(17876.369360286772/8.0),
9802 REAL_CONST(17891.788330745527/8.0),
9803 REAL_CONST(17907.210623900395/8.0),
9804 REAL_CONST(17922.636238320254/8.0),
9805 REAL_CONST(17938.065172575527/8.0),
9806 REAL_CONST(17953.497425238176/8.0),
9807 REAL_CONST(17968.932994881692/8.0),
9808 REAL_CONST(17984.371880081104/8.0),
9809 REAL_CONST(17999.814079412972/8.0),
9810 REAL_CONST(18015.259591455371/8.0),
9811 REAL_CONST(18030.708414787914/8.0),
9812 REAL_CONST(18046.160547991731/8.0),
9813 REAL_CONST(18061.615989649465/8.0),
9814 REAL_CONST(18077.074738345284/8.0),
9815 REAL_CONST(18092.536792664861/8.0),
9816 REAL_CONST(18108.002151195393/8.0),
9817 REAL_CONST(18123.470812525571/8.0),
9818 REAL_CONST(18138.942775245599/8.0),
9819 REAL_CONST(18154.418037947191/8.0),
9820 REAL_CONST(18169.896599223546/8.0),
9821 REAL_CONST(18185.37845766938/8.0),
9822 REAL_CONST(18200.863611880886/8.0),
9823 REAL_CONST(18216.352060455767/8.0),
9824 REAL_CONST(18231.843801993204/8.0),
9825 REAL_CONST(18247.338835093873/8.0),
9826 REAL_CONST(18262.837158359936/8.0),
9827 REAL_CONST(18278.338770395032/8.0),
9828 REAL_CONST(18293.84366980429/8.0),
9829 REAL_CONST(18309.351855194309/8.0),
9830 REAL_CONST(18324.863325173166/8.0),
9831 REAL_CONST(18340.378078350412/8.0),
9832 REAL_CONST(18355.896113337069/8.0),
9833 REAL_CONST(18371.417428745623/8.0),
9834 REAL_CONST(18386.942023190033/8.0),
9835 REAL_CONST(18402.469895285718/8.0),
9836 REAL_CONST(18418.00104364955/8.0),
9837 REAL_CONST(18433.53546689987/8.0),
9838 REAL_CONST(18449.073163656474/8.0),
9839 REAL_CONST(18464.614132540602/8.0),
9840 REAL_CONST(18480.158372174956/8.0),
9841 REAL_CONST(18495.705881183676/8.0),
9842 REAL_CONST(18511.256658192357/8.0),
9843 REAL_CONST(18526.810701828035/8.0),
9844 REAL_CONST(18542.368010719183/8.0),
9845 REAL_CONST(18557.928583495715/8.0),
9846 REAL_CONST(18573.492418788985/8.0),
9847 REAL_CONST(18589.059515231773/8.0),
9848 REAL_CONST(18604.629871458303/8.0),
9849 REAL_CONST(18620.203486104212/8.0),
9850 REAL_CONST(18635.78035780658/8.0),
9851 REAL_CONST(18651.360485203899/8.0),
9852 REAL_CONST(18666.943866936086/8.0),
9853 REAL_CONST(18682.53050164448/8.0),
9854 REAL_CONST(18698.120387971841/8.0),
9855 REAL_CONST(18713.713524562332/8.0),
9856 REAL_CONST(18729.30991006154/8.0),
9857 REAL_CONST(18744.909543116457/8.0),
9858 REAL_CONST(18760.512422375479/8.0),
9859 REAL_CONST(18776.118546488418/8.0),
9860 REAL_CONST(18791.727914106479/8.0),
9861 REAL_CONST(18807.340523882274/8.0),
9862 REAL_CONST(18822.95637446981/8.0),
9863 REAL_CONST(18838.575464524489/8.0),
9864 REAL_CONST(18854.197792703111/8.0),
9865 REAL_CONST(18869.823357663863/8.0),
9866 REAL_CONST(18885.452158066328/8.0),
9867 REAL_CONST(18901.08419257147/8.0),
9868 REAL_CONST(18916.719459841639/8.0),
9869 REAL_CONST(18932.357958540564/8.0),
9870 REAL_CONST(18947.999687333362/8.0),
9871 REAL_CONST(18963.644644886521/8.0),
9872 REAL_CONST(18979.292829867907/8.0),
9873 REAL_CONST(18994.944240946759/8.0),
9874 REAL_CONST(19010.598876793687/8.0),
9875 REAL_CONST(19026.256736080668/8.0),
9876 REAL_CONST(19041.917817481048/8.0),
9877 REAL_CONST(19057.582119669532/8.0),
9878 REAL_CONST(19073.2496413222/8.0),
9879 REAL_CONST(19088.920381116473/8.0),
9880 REAL_CONST(19104.594337731145/8.0),
9881 REAL_CONST(19120.271509846356/8.0),
9882 REAL_CONST(19135.951896143604/8.0),
9883 REAL_CONST(19151.635495305738/8.0),
9884 REAL_CONST(19167.322306016948/8.0),
9885 REAL_CONST(19183.012326962784/8.0),
9886 REAL_CONST(19198.705556830122/8.0),
9887 REAL_CONST(19214.401994307198/8.0),
9888 REAL_CONST(19230.101638083579/8.0),
9889 REAL_CONST(19245.804486850167/8.0),
9890 REAL_CONST(19261.510539299208/8.0),
9891 REAL_CONST(19277.219794124274/8.0),
9892 REAL_CONST(19292.932250020265/8.0),
9893 REAL_CONST(19308.647905683421/8.0),
9894 REAL_CONST(19324.366759811302/8.0),
9895 REAL_CONST(19340.088811102793/8.0),
9896 REAL_CONST(19355.8140582581/8.0),
9897 REAL_CONST(19371.542499978754/8.0),
9898 REAL_CONST(19387.2741349676/8.0),
9899 REAL_CONST(19403.008961928797/8.0),
9900 REAL_CONST(19418.746979567823/8.0),
9901 REAL_CONST(19434.488186591469/8.0),
9902 REAL_CONST(19450.232581707827/8.0),
9903 REAL_CONST(19465.980163626304/8.0),
9904 REAL_CONST(19481.730931057613/8.0),
9905 REAL_CONST(19497.484882713761/8.0),
9906 REAL_CONST(19513.242017308068/8.0),
9907 REAL_CONST(19529.002333555141/8.0),
9908 REAL_CONST(19544.765830170898/8.0),
9909 REAL_CONST(19560.532505872539/8.0),
9910 REAL_CONST(19576.302359378566/8.0),
9911 REAL_CONST(19592.075389408761/8.0),
9912 REAL_CONST(19607.851594684209/8.0),
9913 REAL_CONST(19623.630973927269/8.0),
9914 REAL_CONST(19639.41352586159/8.0),
9915 REAL_CONST(19655.199249212103/8.0),
9916 REAL_CONST(19670.988142705017/8.0),
9917 REAL_CONST(19686.780205067826/8.0),
9918 REAL_CONST(19702.575435029288/8.0),
9919 REAL_CONST(19718.373831319448/8.0),
9920 REAL_CONST(19734.175392669615/8.0),
9921 REAL_CONST(19749.980117812371/8.0),
9922 REAL_CONST(19765.788005481569/8.0),
9923 REAL_CONST(19781.599054412323/8.0),
9924 REAL_CONST(19797.413263341008/8.0),
9925 REAL_CONST(19813.230631005274/8.0),
9926 REAL_CONST(19829.051156144014/8.0),
9927 REAL_CONST(19844.874837497395/8.0),
9928 REAL_CONST(19860.701673806827/8.0),
9929 REAL_CONST(19876.531663814985/8.0),
9930 REAL_CONST(19892.364806265789/8.0),
9931 REAL_CONST(19908.201099904403/8.0),
9932 REAL_CONST(19924.040543477258/8.0),
9933 REAL_CONST(19939.883135732012/8.0),
9934 REAL_CONST(19955.728875417579/8.0),
9935 REAL_CONST(19971.577761284105/8.0),
9936 REAL_CONST(19987.429792082985/8.0),
9937 REAL_CONST(20003.284966566847/8.0),
9938 REAL_CONST(20019.14328348956/8.0),
9939 REAL_CONST(20035.004741606219/8.0),
9940 REAL_CONST(20050.869339673161/8.0),
9941 REAL_CONST(20066.737076447946/8.0),
9942 REAL_CONST(20082.607950689362/8.0),
9943 REAL_CONST(20098.481961157428/8.0),
9944 REAL_CONST(20114.359106613385/8.0),
9945 REAL_CONST(20130.239385819699/8.0),
9946 REAL_CONST(20146.122797540058/8.0),
9947 REAL_CONST(20162.009340539353/8.0),
9948 REAL_CONST(20177.899013583716/8.0),
9949 REAL_CONST(20193.791815440476/8.0),
9950 REAL_CONST(20209.687744878182/8.0),
9951 REAL_CONST(20225.586800666591/8.0),
9952 REAL_CONST(20241.488981576669/8.0),
9953 REAL_CONST(20257.394286380597/8.0),
9954 REAL_CONST(20273.302713851754/8.0),
9955 REAL_CONST(20289.214262764715/8.0),
9956 REAL_CONST(20305.128931895277/8.0),
9957 REAL_CONST(20321.046720020415/8.0),
9958 REAL_CONST(20336.967625918318/8.0),
9959 REAL_CONST(20352.891648368361/8.0),
9960 REAL_CONST(20368.818786151114/8.0),
9961 REAL_CONST(20384.749038048347/8.0),
9962 REAL_CONST(20400.682402843009/8.0),
9963 REAL_CONST(20416.618879319249/8.0),
9964 REAL_CONST(20432.558466262391/8.0),
9965 REAL_CONST(20448.501162458953/8.0),
9966 REAL_CONST(20464.446966696629/8.0),
9967 REAL_CONST(20480.395877764302/8.0),
9968 REAL_CONST(20496.347894452025/8.0),
9969 REAL_CONST(20512.303015551031/8.0),
9970 REAL_CONST(20528.261239853735/8.0),
9971 REAL_CONST(20544.22256615372/8.0),
9972 REAL_CONST(20560.186993245738/8.0),
9973 REAL_CONST(20576.15451992572/8.0),
9974 REAL_CONST(20592.125144990758/8.0),
9975 REAL_CONST(20608.098867239107/8.0),
9976 REAL_CONST(20624.075685470198/8.0),
9977 REAL_CONST(20640.055598484618/8.0),
9978 REAL_CONST(20656.038605084115/8.0),
9979 REAL_CONST(20672.024704071595/8.0),
9980 REAL_CONST(20688.013894251126/8.0),
9981 REAL_CONST(20704.006174427926/8.0),
9982 REAL_CONST(20720.001543408373/8.0),
9983 REAL_CONST(20735.999999999989/8.0),
9984 REAL_CONST(20752.001543011454/8.0),
9985 REAL_CONST(20768.006171252597/8.0),
9986 REAL_CONST(20784.013883534382/8.0),
9987 REAL_CONST(20800.024678668931/8.0),
9988 REAL_CONST(20816.038555469506/8.0),
9989 REAL_CONST(20832.055512750507/8.0),
9990 REAL_CONST(20848.075549327474/8.0),
9991 REAL_CONST(20864.098664017085/8.0),
9992 REAL_CONST(20880.124855637161/8.0),
9993 REAL_CONST(20896.154123006647/8.0),
9994 REAL_CONST(20912.186464945626/8.0),
9995 REAL_CONST(20928.221880275312/8.0),
9996 REAL_CONST(20944.260367818049/8.0),
9997 REAL_CONST(20960.301926397311/8.0),
9998 REAL_CONST(20976.346554837684/8.0),
9999 REAL_CONST(20992.394251964895/8.0),
10000 REAL_CONST(21008.445016605787/8.0),
10001 REAL_CONST(21024.498847588318/8.0),
10002 REAL_CONST(21040.555743741574/8.0),
10003 REAL_CONST(21056.615703895754/8.0),
10004 REAL_CONST(21072.678726882168/8.0),
10005 REAL_CONST(21088.744811533252/8.0),
10006 REAL_CONST(21104.813956682538/8.0),
10007 REAL_CONST(21120.886161164683/8.0),
10008 REAL_CONST(21136.961423815443/8.0),
10009 REAL_CONST(21153.039743471683/8.0),
10010 REAL_CONST(21169.121118971379/8.0),
10011 REAL_CONST(21185.205549153605/8.0),
10012 REAL_CONST(21201.293032858535/8.0),
10013 REAL_CONST(21217.383568927453/8.0),
10014 REAL_CONST(21233.477156202731/8.0),
10015 REAL_CONST(21249.573793527841/8.0),
10016 REAL_CONST(21265.673479747358/8.0),
10017 REAL_CONST(21281.776213706937/8.0),
10018 REAL_CONST(21297.881994253334/8.0),
10019 REAL_CONST(21313.990820234398/8.0),
10020 REAL_CONST(21330.102690499054/8.0),
10021 REAL_CONST(21346.21760389733/8.0),
10022 REAL_CONST(21362.335559280327/8.0),
10023 REAL_CONST(21378.456555500241/8.0),
10024 REAL_CONST(21394.580591410333/8.0),
10025 REAL_CONST(21410.707665864964/8.0),
10026 REAL_CONST(21426.83777771956/8.0),
10027 REAL_CONST(21442.970925830628/8.0),
10028 REAL_CONST(21459.107109055756/8.0),
10029 REAL_CONST(21475.246326253604/8.0),
10030 REAL_CONST(21491.388576283895/8.0),
10031 REAL_CONST(21507.533858007431/8.0),
10032 REAL_CONST(21523.682170286087/8.0),
10033 REAL_CONST(21539.833511982797/8.0),
10034 REAL_CONST(21555.987881961566/8.0),
10035 REAL_CONST(21572.145279087465/8.0),
10036 REAL_CONST(21588.305702226615/8.0),
10037 REAL_CONST(21604.469150246216/8.0),
10038 REAL_CONST(21620.635622014521/8.0),
10039 REAL_CONST(21636.805116400832/8.0),
10040 REAL_CONST(21652.977632275521/8.0),
10041 REAL_CONST(21669.153168510009/8.0),
10042 REAL_CONST(21685.331723976764/8.0),
10043 REAL_CONST(21701.513297549318/8.0),
10044 REAL_CONST(21717.697888102244/8.0),
10045 REAL_CONST(21733.885494511167/8.0),
10046 REAL_CONST(21750.076115652759/8.0),
10047 REAL_CONST(21766.269750404736/8.0),
10048 REAL_CONST(21782.466397645861/8.0),
10049 REAL_CONST(21798.666056255934/8.0),
10050 REAL_CONST(21814.868725115801/8.0),
10051 REAL_CONST(21831.074403107345/8.0),
10052 REAL_CONST(21847.283089113484/8.0),
10053 REAL_CONST(21863.494782018177/8.0),
10054 REAL_CONST(21879.709480706417/8.0),
10055 REAL_CONST(21895.927184064229/8.0),
10056 REAL_CONST(21912.147890978667/8.0),
10057 REAL_CONST(21928.371600337818/8.0),
10058 REAL_CONST(21944.598311030797/8.0),
10059 REAL_CONST(21960.828021947746/8.0),
10060 REAL_CONST(21977.060731979829/8.0),
10061 REAL_CONST(21993.296440019243/8.0),
10062 REAL_CONST(22009.535144959198/8.0),
10063 REAL_CONST(22025.77684569393/8.0),
10064 REAL_CONST(22042.021541118691/8.0),
10065 REAL_CONST(22058.269230129757/8.0),
10066 REAL_CONST(22074.519911624411/8.0),
10067 REAL_CONST(22090.773584500959/8.0),
10068 REAL_CONST(22107.030247658717/8.0),
10069 REAL_CONST(22123.289899998013/8.0),
10070 REAL_CONST(22139.552540420187/8.0),
10071 REAL_CONST(22155.818167827587/8.0),
10072 REAL_CONST(22172.086781123569/8.0),
10073 REAL_CONST(22188.358379212495/8.0),
10074 REAL_CONST(22204.632960999726/8.0),
10075 REAL_CONST(22220.910525391639/8.0),
10076 REAL_CONST(22237.191071295601/8.0),
10077 REAL_CONST(22253.474597619981/8.0),
10078 REAL_CONST(22269.761103274148/8.0),
10079 REAL_CONST(22286.050587168469/8.0),
10080 REAL_CONST(22302.343048214312/8.0),
10081 REAL_CONST(22318.638485324027/8.0),
10082 REAL_CONST(22334.936897410968/8.0),
10083 REAL_CONST(22351.23828338947/8.0),
10084 REAL_CONST(22367.542642174871/8.0),
10085 REAL_CONST(22383.849972683485/8.0),
10086 REAL_CONST(22400.160273832618/8.0),
10087 REAL_CONST(22416.473544540564/8.0),
10088 REAL_CONST(22432.789783726603/8.0),
10089 REAL_CONST(22449.108990310986/8.0),
10090 REAL_CONST(22465.431163214958/8.0),
10091 REAL_CONST(22481.75630136074/8.0),
10092 REAL_CONST(22498.084403671528/8.0),
10093 REAL_CONST(22514.415469071497/8.0),
10094 REAL_CONST(22530.749496485802/8.0),
10095 REAL_CONST(22547.086484840562/8.0),
10096 REAL_CONST(22563.426433062879/8.0),
10097 REAL_CONST(22579.769340080824/8.0),
10098 REAL_CONST(22596.115204823436/8.0),
10099 REAL_CONST(22612.464026220721/8.0),
10100 REAL_CONST(22628.815803203655/8.0),
10101 REAL_CONST(22645.170534704179/8.0),
10102 REAL_CONST(22661.5282196552/8.0),
10103 REAL_CONST(22677.888856990587/8.0),
10104 REAL_CONST(22694.252445645168/8.0),
10105 REAL_CONST(22710.618984554734/8.0),
10106 REAL_CONST(22726.988472656034/8.0),
10107 REAL_CONST(22743.360908886778/8.0),
10108 REAL_CONST(22759.736292185622/8.0),
10109 REAL_CONST(22776.114621492186/8.0),
10110 REAL_CONST(22792.495895747044/8.0),
10111 REAL_CONST(22808.880113891719/8.0),
10112 REAL_CONST(22825.267274868678/8.0),
10113 REAL_CONST(22841.657377621348/8.0),
10114 REAL_CONST(22858.050421094096/8.0),
10115 REAL_CONST(22874.446404232243/8.0),
10116 REAL_CONST(22890.845325982053/8.0),
10117 REAL_CONST(22907.247185290722/8.0),
10118 REAL_CONST(22923.651981106406/8.0),
10119 REAL_CONST(22940.059712378195/8.0),
10120 REAL_CONST(22956.470378056114/8.0),
10121 REAL_CONST(22972.883977091129/8.0),
10122 REAL_CONST(22989.300508435153/8.0),
10123 REAL_CONST(23005.719971041017/8.0),
10124 REAL_CONST(23022.142363862498/8.0),
10125 REAL_CONST(23038.567685854305/8.0),
10126 REAL_CONST(23054.995935972078/8.0),
10127 REAL_CONST(23071.427113172387/8.0),
10128 REAL_CONST(23087.86121641273/8.0),
10129 REAL_CONST(23104.298244651531/8.0),
10130 REAL_CONST(23120.738196848146/8.0),
10131 REAL_CONST(23137.181071962848/8.0),
10132 REAL_CONST(23153.626868956846/8.0),
10133 REAL_CONST(23170.075586792263/8.0),
10134 REAL_CONST(23186.527224432142/8.0),
10135 REAL_CONST(23202.981780840448/8.0),
10136 REAL_CONST(23219.439254982066/8.0),
10137 REAL_CONST(23235.899645822796/8.0),
10138 REAL_CONST(23252.362952329357/8.0),
10139 REAL_CONST(23268.829173469378/8.0),
10140 REAL_CONST(23285.298308211408/8.0),
10141 REAL_CONST(23301.770355524899/8.0),
10142 REAL_CONST(23318.245314380223/8.0),
10143 REAL_CONST(23334.723183748658/8.0),
10144 REAL_CONST(23351.203962602387/8.0),
10145 REAL_CONST(23367.687649914504/8.0),
10146 REAL_CONST(23384.174244659007/8.0),
10147 REAL_CONST(23400.663745810798/8.0),
10148 REAL_CONST(23417.15615234568/8.0),
10149 REAL_CONST(23433.651463240367/8.0),
10150 REAL_CONST(23450.149677472462/8.0),
10151 REAL_CONST(23466.650794020472/8.0),
10152 REAL_CONST(23483.154811863806/8.0),
10153 REAL_CONST(23499.661729982763/8.0),
10154 REAL_CONST(23516.171547358543/8.0),
10155 REAL_CONST(23532.684262973235/8.0),
10156 REAL_CONST(23549.199875809823/8.0),
10157 REAL_CONST(23565.718384852185/8.0),
10158 REAL_CONST(23582.239789085092/8.0),
10159 REAL_CONST(23598.764087494197/8.0),
10160 REAL_CONST(23615.291279066041/8.0),
10161 REAL_CONST(23631.821362788058/8.0),
10162 REAL_CONST(23648.354337648565/8.0),
10163 REAL_CONST(23664.890202636761/8.0),
10164 REAL_CONST(23681.428956742733/8.0),
10165 REAL_CONST(23697.970598957443/8.0),
10166 REAL_CONST(23714.515128272738/8.0),
10167 REAL_CONST(23731.062543681343/8.0),
10168 REAL_CONST(23747.612844176863/8.0),
10169 REAL_CONST(23764.166028753778/8.0),
10170 REAL_CONST(23780.72209640744/8.0),
10171 REAL_CONST(23797.281046134085/8.0),
10172 REAL_CONST(23813.842876930816/8.0),
10173 REAL_CONST(23830.407587795606/8.0),
10174 REAL_CONST(23846.975177727301/8.0),
10175 REAL_CONST(23863.545645725622/8.0),
10176 REAL_CONST(23880.11899079115/8.0),
10177 REAL_CONST(23896.695211925336/8.0),
10178 REAL_CONST(23913.274308130498/8.0),
10179 REAL_CONST(23929.856278409821/8.0),
10180 REAL_CONST(23946.441121767348/8.0),
10181 REAL_CONST(23963.028837207989/8.0),
10182 REAL_CONST(23979.619423737513/8.0),
10183 REAL_CONST(23996.212880362549/8.0),
10184 REAL_CONST(24012.809206090584/8.0),
10185 REAL_CONST(24029.408399929966/8.0),
10186 REAL_CONST(24046.010460889898/8.0),
10187 REAL_CONST(24062.615387980433/8.0),
10188 REAL_CONST(24079.223180212492/8.0),
10189 REAL_CONST(24095.833836597827/8.0),
10190 REAL_CONST(24112.447356149063/8.0),
10191 REAL_CONST(24129.063737879667/8.0),
10192 REAL_CONST(24145.682980803951/8.0),
10193 REAL_CONST(24162.305083937081/8.0),
10194 REAL_CONST(24178.930046295067/8.0),
10195 REAL_CONST(24195.557866894767/8.0),
10196 REAL_CONST(24212.188544753884/8.0),
10197 REAL_CONST(24228.822078890964/8.0),
10198 REAL_CONST(24245.458468325389/8.0),
10199 REAL_CONST(24262.097712077397/8.0),
10200 REAL_CONST(24278.739809168052/8.0),
10201 REAL_CONST(24295.384758619261/8.0),
10202 REAL_CONST(24312.032559453768/8.0),
10203 REAL_CONST(24328.683210695162/8.0),
10204 REAL_CONST(24345.336711367858/8.0),
10205 REAL_CONST(24361.993060497109/8.0),
10206 REAL_CONST(24378.652257108995/8.0),
10207 REAL_CONST(24395.314300230442/8.0),
10208 REAL_CONST(24411.979188889192/8.0),
10209 REAL_CONST(24428.646922113825/8.0),
10210 REAL_CONST(24445.317498933746/8.0),
10211 REAL_CONST(24461.990918379193/8.0),
10212 REAL_CONST(24478.667179481225/8.0),
10213 REAL_CONST(24495.346281271726/8.0),
10214 REAL_CONST(24512.028222783407/8.0),
10215 REAL_CONST(24528.713003049801/8.0),
10216 REAL_CONST(24545.400621105266/8.0),
10217 REAL_CONST(24562.091075984976/8.0),
10218 REAL_CONST(24578.784366724925/8.0),
10219 REAL_CONST(24595.480492361927/8.0),
10220 REAL_CONST(24612.179451933614/8.0),
10221 REAL_CONST(24628.881244478438/8.0),
10222 REAL_CONST(24645.585869035654/8.0),
10223 REAL_CONST(24662.293324645343/8.0),
10224 REAL_CONST(24679.003610348394/8.0),
10225 REAL_CONST(24695.716725186514/8.0),
10226 REAL_CONST(24712.432668202211/8.0),
10227 REAL_CONST(24729.151438438807/8.0),
10228 REAL_CONST(24745.873034940436/8.0),
10229 REAL_CONST(24762.597456752032/8.0),
10230 REAL_CONST(24779.324702919344/8.0),
10231 REAL_CONST(24796.054772488926/8.0),
10232 REAL_CONST(24812.787664508123/8.0),
10233 REAL_CONST(24829.5233780251/8.0),
10234 REAL_CONST(24846.261912088819/8.0),
10235 REAL_CONST(24863.003265749034/8.0),
10236 REAL_CONST(24879.747438056307/8.0),
10237 REAL_CONST(24896.494428062004/8.0),
10238 REAL_CONST(24913.244234818278/8.0),
10239 REAL_CONST(24929.996857378079/8.0),
10240 REAL_CONST(24946.752294795166/8.0),
10241 REAL_CONST(24963.510546124078/8.0),
10242 REAL_CONST(24980.271610420157/8.0),
10243 REAL_CONST(24997.035486739525/8.0),
10244 REAL_CONST(25013.802174139113/8.0),
10245 REAL_CONST(25030.571671676629/8.0),
10246 REAL_CONST(25047.343978410572/8.0),
10247 REAL_CONST(25064.119093400237/8.0),
10248 REAL_CONST(25080.897015705697/8.0),
10249 REAL_CONST(25097.677744387816/8.0),
10250 REAL_CONST(25114.461278508239/8.0),
10251 REAL_CONST(25131.2476171294/8.0),
10252 REAL_CONST(25148.036759314517/8.0),
10253 REAL_CONST(25164.828704127583/8.0),
10254 REAL_CONST(25181.623450633375/8.0),
10255 REAL_CONST(25198.42099789745/8.0),
10256 REAL_CONST(25215.221344986145/8.0),
10257 REAL_CONST(25232.024490966574/8.0),
10258 REAL_CONST(25248.830434906627/8.0),
10259 REAL_CONST(25265.639175874974/8.0),
10260 REAL_CONST(25282.450712941049/8.0),
10261 REAL_CONST(25299.265045175071/8.0),
10262 REAL_CONST(25316.082171648024/8.0),
10263 REAL_CONST(25332.902091431668/8.0),
10264 REAL_CONST(25349.724803598532/8.0),
10265 REAL_CONST(25366.550307221914/8.0),
10266 REAL_CONST(25383.378601375884/8.0),
10267 REAL_CONST(25400.209685135269/8.0),
10268 REAL_CONST(25417.043557575678/8.0),
10269 REAL_CONST(25433.880217773472/8.0),
10270 REAL_CONST(25450.719664805783/8.0),
10271 REAL_CONST(25467.561897750507/8.0),
10272 REAL_CONST(25484.406915686297/8.0),
10273 REAL_CONST(25501.254717692573/8.0),
10274 REAL_CONST(25518.105302849512/8.0),
10275 REAL_CONST(25534.958670238051/8.0),
10276 REAL_CONST(25551.814818939893/8.0),
10277 REAL_CONST(25568.67374803748/8.0),
10278 REAL_CONST(25585.535456614027/8.0),
10279 REAL_CONST(25602.399943753502/8.0),
10280 REAL_CONST(25619.267208540619/8.0),
10281 REAL_CONST(25636.137250060852/8.0),
10282 REAL_CONST(25653.010067400432/8.0),
10283 REAL_CONST(25669.885659646327/8.0),
10284 REAL_CONST(25686.76402588627/8.0),
10285 REAL_CONST(25703.645165208734/8.0),
10286 REAL_CONST(25720.529076702944/8.0),
10287 REAL_CONST(25737.415759458876/8.0),
10288 REAL_CONST(25754.305212567244/8.0),
10289 REAL_CONST(25771.197435119517/8.0),
10290 REAL_CONST(25788.092426207899/8.0),
10291 REAL_CONST(25804.990184925344/8.0),
10292 REAL_CONST(25821.890710365547/8.0),
10293 REAL_CONST(25838.794001622944/8.0),
10294 REAL_CONST(25855.700057792714/8.0),
10295 REAL_CONST(25872.608877970775/8.0),
10296 REAL_CONST(25889.520461253778/8.0),
10297 REAL_CONST(25906.434806739118/8.0),
10298 REAL_CONST(25923.351913524923/8.0),
10299 REAL_CONST(25940.271780710063/8.0),
10300 REAL_CONST(25957.194407394138/8.0),
10301 REAL_CONST(25974.11979267748/8.0),
10302 REAL_CONST(25991.047935661154/8.0),
10303 REAL_CONST(26007.978835446964/8.0),
10304 REAL_CONST(26024.912491137442/8.0),
10305 REAL_CONST(26041.848901835841/8.0),
10306 REAL_CONST(26058.788066646157/8.0),
10307 REAL_CONST(26075.729984673108/8.0),
10308 REAL_CONST(26092.674655022136/8.0),
10309 REAL_CONST(26109.622076799409/8.0),
10310 REAL_CONST(26126.572249111829/8.0),
10311 REAL_CONST(26143.525171067016/8.0),
10312 REAL_CONST(26160.480841773315/8.0),
10313 REAL_CONST(26177.43926033979/8.0),
10314 REAL_CONST(26194.400425876229/8.0),
10315 REAL_CONST(26211.364337493149/8.0),
10316 REAL_CONST(26228.330994301767/8.0),
10317 REAL_CONST(26245.30039541404/8.0),
10318 REAL_CONST(26262.272539942627/8.0),
10319 REAL_CONST(26279.247427000919/8.0),
10320 REAL_CONST(26296.225055703002/8.0),
10321 REAL_CONST(26313.205425163702/8.0),
10322 REAL_CONST(26330.188534498539/8.0),
10323 REAL_CONST(26347.174382823756/8.0),
10324 REAL_CONST(26364.162969256304/8.0),
10325 REAL_CONST(26381.154292913852/8.0),
10326 REAL_CONST(26398.148352914774/8.0),
10327 REAL_CONST(26415.145148378149/8.0),
10328 REAL_CONST(26432.144678423778/8.0),
10329 REAL_CONST(26449.146942172156/8.0),
10330 REAL_CONST(26466.151938744493/8.0),
10331 REAL_CONST(26483.159667262702/8.0),
10332 REAL_CONST(26500.170126849403/8.0),
10333 REAL_CONST(26517.183316627921/8.0),
10334 REAL_CONST(26534.199235722277/8.0),
10335 REAL_CONST(26551.217883257199/8.0),
10336 REAL_CONST(26568.239258358124/8.0),
10337 REAL_CONST(26585.263360151173/8.0),
10338 REAL_CONST(26602.290187763181/8.0),
10339 REAL_CONST(26619.319740321676/8.0),
10340 REAL_CONST(26636.352016954883/8.0),
10341 REAL_CONST(26653.387016791727/8.0),
10342 REAL_CONST(26670.424738961825/8.0),
10343 REAL_CONST(26687.465182595493/8.0),
10344 REAL_CONST(26704.508346823739/8.0),
10345 REAL_CONST(26721.554230778267/8.0),
10346 REAL_CONST(26738.602833591467/8.0),
10347 REAL_CONST(26755.65415439643/8.0),
10348 REAL_CONST(26772.708192326929/8.0),
10349 REAL_CONST(26789.764946517433/8.0),
10350 REAL_CONST(26806.824416103096/8.0),
10351 REAL_CONST(26823.886600219761/8.0),
10352 REAL_CONST(26840.95149800396/8.0),
10353 REAL_CONST(26858.019108592915/8.0),
10354 REAL_CONST(26875.089431124517/8.0),
10355 REAL_CONST(26892.162464737365/8.0),
10356 REAL_CONST(26909.238208570721/8.0),
10357 REAL_CONST(26926.316661764544/8.0),
10358 REAL_CONST(26943.397823459472/8.0),
10359 REAL_CONST(26960.481692796813/8.0),
10360 REAL_CONST(26977.568268918571/8.0),
10361 REAL_CONST(26994.657550967422/8.0),
10362 REAL_CONST(27011.749538086722/8.0),
10363 REAL_CONST(27028.844229420498/8.0),
10364 REAL_CONST(27045.941624113464/8.0),
10365 REAL_CONST(27063.041721311005/8.0),
10366 REAL_CONST(27080.144520159181/8.0),
10367 REAL_CONST(27097.250019804727/8.0),
10368 REAL_CONST(27114.35821939505/8.0),
10369 REAL_CONST(27131.469118078236/8.0),
10370 REAL_CONST(27148.582715003027/8.0),
10371 REAL_CONST(27165.699009318858/8.0),
10372 REAL_CONST(27182.818000175819/8.0),
10373 REAL_CONST(27199.939686724665/8.0),
10374 REAL_CONST(27217.064068116837/8.0),
10375 REAL_CONST(27234.191143504428/8.0),
10376 REAL_CONST(27251.320912040203/8.0),
10377 REAL_CONST(27268.453372877593/8.0),
10378 REAL_CONST(27285.588525170693/8.0),
10379 REAL_CONST(27302.726368074269/8.0),
10380 REAL_CONST(27319.866900743735/8.0),
10381 REAL_CONST(27337.010122335181/8.0),
10382 REAL_CONST(27354.156032005358/8.0),
10383 REAL_CONST(27371.304628911668/8.0),
10384 REAL_CONST(27388.455912212183/8.0),
10385 REAL_CONST(27405.609881065626/8.0),
10386 REAL_CONST(27422.766534631384/8.0),
10387 REAL_CONST(27439.925872069507/8.0),
10388 REAL_CONST(27457.087892540683/8.0),
10389 REAL_CONST(27474.252595206275/8.0),
10390 REAL_CONST(27491.419979228293/8.0),
10391 REAL_CONST(27508.5900437694/8.0),
10392 REAL_CONST(27525.762787992917/8.0),
10393 REAL_CONST(27542.93821106281/8.0),
10394 REAL_CONST(27560.116312143706/8.0),
10395 REAL_CONST(27577.297090400876/8.0),
10396 REAL_CONST(27594.480545000242/8.0),
10397 REAL_CONST(27611.666675108383/8.0),
10398 REAL_CONST(27628.855479892518/8.0),
10399 REAL_CONST(27646.046958520514/8.0),
10400 REAL_CONST(27663.241110160889/8.0),
10401 REAL_CONST(27680.437933982801/8.0),
10402 REAL_CONST(27697.637429156068/8.0),
10403 REAL_CONST(27714.839594851132/8.0),
10404 REAL_CONST(27732.04443023909/8.0),
10405 REAL_CONST(27749.251934491687/8.0),
10406 REAL_CONST(27766.462106781299/8.0),
10407 REAL_CONST(27783.674946280949/8.0),
10408 REAL_CONST(27800.890452164302/8.0),
10409 REAL_CONST(27818.108623605654/8.0),
10410 REAL_CONST(27835.329459779954/8.0),
10411 REAL_CONST(27852.55295986278/8.0),
10412 REAL_CONST(27869.779123030345/8.0),
10413 REAL_CONST(27887.007948459504/8.0),
10414 REAL_CONST(27904.239435327745/8.0),
10415 REAL_CONST(27921.473582813196/8.0),
10416 REAL_CONST(27938.710390094613/8.0),
10417 REAL_CONST(27955.949856351392/8.0),
10418 REAL_CONST(27973.19198076355/8.0),
10419 REAL_CONST(27990.436762511745/8.0),
10420 REAL_CONST(28007.684200777272/8.0),
10421 REAL_CONST(28024.934294742041/8.0),
10422 REAL_CONST(28042.187043588601/8.0),
10423 REAL_CONST(28059.442446500128/8.0),
10424 REAL_CONST(28076.700502660427/8.0),
10425 REAL_CONST(28093.961211253929/8.0),
10426 REAL_CONST(28111.224571465693/8.0),
10427 REAL_CONST(28128.490582481401/8.0),
10428 REAL_CONST(28145.759243487362/8.0),
10429 REAL_CONST(28163.030553670509/8.0),
10430 REAL_CONST(28180.304512218394/8.0),
10431 REAL_CONST(28197.581118319198/8.0),
10432 REAL_CONST(28214.860371161725/8.0),
10433 REAL_CONST(28232.14226993539/8.0),
10434 REAL_CONST(28249.42681383024/8.0),
10435 REAL_CONST(28266.71400203693/8.0),
10436 REAL_CONST(28284.003833746745/8.0),
10437 REAL_CONST(28301.296308151585/8.0),
10438 REAL_CONST(28318.591424443959/8.0),
10439 REAL_CONST(28335.889181817001/8.0),
10440 REAL_CONST(28353.189579464462/8.0),
10441 REAL_CONST(28370.492616580705/8.0),
10442 REAL_CONST(28387.798292360701/8.0),
10443 REAL_CONST(28405.106606000048/8.0),
10444 REAL_CONST(28422.417556694945/8.0),
10445 REAL_CONST(28439.731143642206/8.0),
10446 REAL_CONST(28457.047366039264/8.0),
10447 REAL_CONST(28474.366223084147/8.0),
10448 REAL_CONST(28491.687713975512/8.0),
10449 REAL_CONST(28509.011837912611/8.0),
10450 REAL_CONST(28526.338594095305/8.0),
10451 REAL_CONST(28543.667981724069/8.0),
10452 REAL_CONST(28560.999999999982/8.0),
10453 REAL_CONST(28578.334648124732/8.0),
10454 REAL_CONST(28595.671925300605/8.0),
10455 REAL_CONST(28613.011830730498/8.0),
10456 REAL_CONST(28630.354363617909/8.0),
10457 REAL_CONST(28647.699523166943/8.0),
10458 REAL_CONST(28665.0473085823/8.0),
10459 REAL_CONST(28682.397719069289/8.0),
10460 REAL_CONST(28699.750753833818/8.0),
10461 REAL_CONST(28717.10641208239/8.0),
10462 REAL_CONST(28734.464693022121/8.0),
10463 REAL_CONST(28751.825595860708/8.0),
10464 REAL_CONST(28769.189119806462/8.0),
10465 REAL_CONST(28786.55526406828/8.0),
10466 REAL_CONST(28803.924027855664/8.0),
10467 REAL_CONST(28821.295410378701/8.0),
10468 REAL_CONST(28838.669410848088/8.0),
10469 REAL_CONST(28856.046028475103/8.0),
10470 REAL_CONST(28873.425262471628/8.0),
10471 REAL_CONST(28890.80711205013/8.0),
10472 REAL_CONST(28908.191576423673/8.0),
10473 REAL_CONST(28925.578654805915/8.0),
10474 REAL_CONST(28942.968346411097/8.0),
10475 REAL_CONST(28960.360650454055/8.0),
10476 REAL_CONST(28977.755566150216/8.0),
10477 REAL_CONST(28995.153092715591/8.0),
10478 REAL_CONST(29012.553229366786/8.0),
10479 REAL_CONST(29029.955975320987/8.0),
10480 REAL_CONST(29047.361329795975/8.0),
10481 REAL_CONST(29064.769292010107/8.0),
10482 REAL_CONST(29082.179861182336/8.0),
10483 REAL_CONST(29099.593036532187/8.0),
10484 REAL_CONST(29117.00881727978/8.0),
10485 REAL_CONST(29134.427202645813/8.0),
10486 REAL_CONST(29151.848191851568/8.0),
10487 REAL_CONST(29169.271784118911/8.0),
10488 REAL_CONST(29186.697978670283/8.0),
10489 REAL_CONST(29204.126774728706/8.0),
10490 REAL_CONST(29221.55817151779/8.0),
10491 REAL_CONST(29238.992168261717/8.0),
10492 REAL_CONST(29256.42876418525/8.0),
10493 REAL_CONST(29273.867958513725/8.0),
10494 REAL_CONST(29291.309750473058/8.0),
10495 REAL_CONST(29308.754139289747/8.0),
10496 REAL_CONST(29326.201124190855/8.0),
10497 REAL_CONST(29343.65070440403/8.0),
10498 REAL_CONST(29361.102879157483/8.0),
10499 REAL_CONST(29378.557647680012/8.0),
10500 REAL_CONST(29396.015009200975/8.0),
10501 REAL_CONST(29413.474962950309/8.0),
10502 REAL_CONST(29430.937508158524/8.0),
10503 REAL_CONST(29448.402644056692/8.0),
10504 REAL_CONST(29465.870369876469/8.0),
10505 REAL_CONST(29483.340684850071/8.0),
10506 REAL_CONST(29500.81358821028/8.0),
10507 REAL_CONST(29518.289079190454/8.0),
10508 REAL_CONST(29535.767157024511/8.0),
10509 REAL_CONST(29553.247820946945/8.0),
10510 REAL_CONST(29570.731070192807/8.0),
10511 REAL_CONST(29588.216903997723/8.0),
10512 REAL_CONST(29605.70532159787/8.0),
10513 REAL_CONST(29623.19632223/8.0),
10514 REAL_CONST(29640.689905131429/8.0),
10515 REAL_CONST(29658.186069540028/8.0),
10516 REAL_CONST(29675.684814694236/8.0),
10517 REAL_CONST(29693.186139833047/8.0),
10518 REAL_CONST(29710.690044196028/8.0),
10519 REAL_CONST(29728.196527023298/8.0),
10520 REAL_CONST(29745.705587555527/8.0),
10521 REAL_CONST(29763.217225033964/8.0),
10522 REAL_CONST(29780.731438700397/8.0),
10523 REAL_CONST(29798.248227797183/8.0),
10524 REAL_CONST(29815.76759156723/8.0),
10525 REAL_CONST(29833.289529254005/8.0),
10526 REAL_CONST(29850.81404010153/8.0),
10527 REAL_CONST(29868.341123354381/8.0),
10528 REAL_CONST(29885.870778257693/8.0),
10529 REAL_CONST(29903.403004057145/8.0),
10530 REAL_CONST(29920.937799998974/8.0),
10531 REAL_CONST(29938.475165329975/8.0),
10532 REAL_CONST(29956.015099297485/8.0),
10533 REAL_CONST(29973.557601149394/8.0),
10534 REAL_CONST(29991.102670134147/8.0),
10535 REAL_CONST(30008.650305500738/8.0),
10536 REAL_CONST(30026.200506498706/8.0),
10537 REAL_CONST(30043.753272378144/8.0),
10538 REAL_CONST(30061.308602389683/8.0),
10539 REAL_CONST(30078.866495784507/8.0),
10540 REAL_CONST(30096.426951814352/8.0),
10541 REAL_CONST(30113.989969731494/8.0),
10542 REAL_CONST(30131.55554878875/8.0),
10543 REAL_CONST(30149.123688239491/8.0),
10544 REAL_CONST(30166.694387337629/8.0),
10545 REAL_CONST(30184.267645337608/8.0),
10546 REAL_CONST(30201.843461494434/8.0),
10547 REAL_CONST(30219.42183506364/8.0),
10548 REAL_CONST(30237.002765301309/8.0),
10549 REAL_CONST(30254.586251464058/8.0),
10550 REAL_CONST(30272.172292809046/8.0),
10551 REAL_CONST(30289.760888593977/8.0),
10552 REAL_CONST(30307.35203807709/8.0),
10553 REAL_CONST(30324.94574051716/8.0),
10554 REAL_CONST(30342.541995173502/8.0),
10555 REAL_CONST(30360.140801305966/8.0),
10556 REAL_CONST(30377.742158174944/8.0),
10557 REAL_CONST(30395.346065041358/8.0),
10558 REAL_CONST(30412.952521166666/8.0),
10559 REAL_CONST(30430.561525812864/8.0),
10560 REAL_CONST(30448.173078242475/8.0),
10561 REAL_CONST(30465.787177718561/8.0),
10562 REAL_CONST(30483.403823504719/8.0),
10563 REAL_CONST(30501.02301486507/8.0),
10564 REAL_CONST(30518.644751064272/8.0),
10565 REAL_CONST(30536.269031367516/8.0),
10566 REAL_CONST(30553.895855040515/8.0),
10567 REAL_CONST(30571.525221349519/8.0),
10568 REAL_CONST(30589.157129561307/8.0),
10569 REAL_CONST(30606.791578943175/8.0),
10570 REAL_CONST(30624.428568762964/8.0),
10571 REAL_CONST(30642.06809828903/8.0),
10572 REAL_CONST(30659.710166790261/8.0),
10573 REAL_CONST(30677.35477353607/8.0),
10574 REAL_CONST(30695.001917796391/8.0),
10575 REAL_CONST(30712.651598841687/8.0),
10576 REAL_CONST(30730.303815942945/8.0),
10577 REAL_CONST(30747.958568371676/8.0),
10578 REAL_CONST(30765.615855399912/8.0),
10579 REAL_CONST(30783.275676300211/8.0),
10580 REAL_CONST(30800.938030345646/8.0),
10581 REAL_CONST(30818.602916809814/8.0),
10582 REAL_CONST(30836.270334966837/8.0),
10583 REAL_CONST(30853.940284091354/8.0),
10584 REAL_CONST(30871.612763458521/8.0),
10585 REAL_CONST(30889.287772344011/8.0),
10586 REAL_CONST(30906.965310024025/8.0),
10587 REAL_CONST(30924.645375775272/8.0),
10588 REAL_CONST(30942.327968874983/8.0),
10589 REAL_CONST(30960.013088600903/8.0),
10590 REAL_CONST(30977.700734231294/8.0),
10591 REAL_CONST(30995.390905044929/8.0),
10592 REAL_CONST(31013.083600321101/8.0),
10593 REAL_CONST(31030.778819339619/8.0),
10594 REAL_CONST(31048.476561380798/8.0),
10595 REAL_CONST(31066.17682572547/8.0),
10596 REAL_CONST(31083.879611654978/8.0),
10597 REAL_CONST(31101.584918451179/8.0),
10598 REAL_CONST(31119.29274539644/8.0),
10599 REAL_CONST(31137.003091773637/8.0),
10600 REAL_CONST(31154.715956866155/8.0),
10601 REAL_CONST(31172.431339957893/8.0),
10602 REAL_CONST(31190.14924033326/8.0),
10603 REAL_CONST(31207.869657277162/8.0),
10604 REAL_CONST(31225.592590075023/8.0),
10605 REAL_CONST(31243.318038012771/8.0),
10606 REAL_CONST(31261.046000376838/8.0),
10607 REAL_CONST(31278.776476454172/8.0),
10608 REAL_CONST(31296.50946553221/8.0),
10609 REAL_CONST(31314.24496689891/8.0),
10610 REAL_CONST(31331.98297984272/8.0),
10611 REAL_CONST(31349.7235036526/8.0),
10612 REAL_CONST(31367.466537618013/8.0),
10613 REAL_CONST(31385.212081028923/8.0),
10614 REAL_CONST(31402.960133175795/8.0),
10615 REAL_CONST(31420.710693349596/8.0),
10616 REAL_CONST(31438.463760841791/8.0),
10617 REAL_CONST(31456.219334944351/8.0),
10618 REAL_CONST(31473.977414949743/8.0),
10619 REAL_CONST(31491.738000150934/8.0),
10620 REAL_CONST(31509.501089841389/8.0),
10621 REAL_CONST(31527.266683315069/8.0),
10622 REAL_CONST(31545.034779866437/8.0),
10623 REAL_CONST(31562.80537879045/8.0),
10624 REAL_CONST(31580.578479382562/8.0),
10625 REAL_CONST(31598.35408093872/8.0),
10626 REAL_CONST(31616.132182755369/8.0),
10627 REAL_CONST(31633.91278412945/8.0),
10628 REAL_CONST(31651.695884358396/8.0),
10629 REAL_CONST(31669.481482740131/8.0),
10630 REAL_CONST(31687.269578573076/8.0),
10631 REAL_CONST(31705.060171156143/8.0),
10632 REAL_CONST(31722.853259788735/8.0),
10633 REAL_CONST(31740.648843770748/8.0),
10634 REAL_CONST(31758.446922402567/8.0),
10635 REAL_CONST(31776.247494985066/8.0),
10636 REAL_CONST(31794.050560819614/8.0),
10637 REAL_CONST(31811.85611920806/8.0),
10638 REAL_CONST(31829.664169452753/8.0),
10639 REAL_CONST(31847.474710856521/8.0),
10640 REAL_CONST(31865.287742722685/8.0),
10641 REAL_CONST(31883.103264355046/8.0),
10642 REAL_CONST(31900.921275057899/8.0),
10643 REAL_CONST(31918.741774136019/8.0),
10644 REAL_CONST(31936.564760894671/8.0),
10645 REAL_CONST(31954.390234639599/8.0),
10646 REAL_CONST(31972.21819467704/8.0),
10647 REAL_CONST(31990.048640313704/8.0),
10648 REAL_CONST(32007.881570856793/8.0),
10649 REAL_CONST(32025.716985613984/8.0),
10650 REAL_CONST(32043.554883893445/8.0),
10651 REAL_CONST(32061.395265003815/8.0),
10652 REAL_CONST(32079.238128254223/8.0),
10653 REAL_CONST(32097.083472954269/8.0),
10654 REAL_CONST(32114.931298414049/8.0),
10655 REAL_CONST(32132.781603944117/8.0),
10656 REAL_CONST(32150.634388855524/8.0),
10657 REAL_CONST(32168.48965245979/8.0),
10658 REAL_CONST(32186.347394068915/8.0),
10659 REAL_CONST(32204.207612995371/8.0),
10660 REAL_CONST(32222.07030855212/8.0),
10661 REAL_CONST(32239.935480052583/8.0),
10662 REAL_CONST(32257.803126810672/8.0),
10663 REAL_CONST(32275.673248140767/8.0),
10664 REAL_CONST(32293.545843357719/8.0),
10665 REAL_CONST(32311.420911776862/8.0),
10666 REAL_CONST(32329.298452713996/8.0),
10667 REAL_CONST(32347.178465485395/8.0),
10668 REAL_CONST(32365.060949407813/8.0),
10669 REAL_CONST(32382.945903798463/8.0),
10670 REAL_CONST(32400.83332797504/8.0),
10671 REAL_CONST(32418.723221255706/8.0),
10672 REAL_CONST(32436.615582959093/8.0),
10673 REAL_CONST(32454.510412404306/8.0),
10674 REAL_CONST(32472.407708910916/8.0),
10675 REAL_CONST(32490.307471798966/8.0),
10676 REAL_CONST(32508.209700388961/8.0),
10677 REAL_CONST(32526.114394001877/8.0),
10678 REAL_CONST(32544.021551959166/8.0),
10679 REAL_CONST(32561.931173582732/8.0),
10680 REAL_CONST(32579.843258194956/8.0),
10681 REAL_CONST(32597.757805118679/8.0),
10682 REAL_CONST(32615.674813677211/8.0),
10683 REAL_CONST(32633.594283194328/8.0),
10684 REAL_CONST(32651.516212994258/8.0),
10685 REAL_CONST(32669.440602401712/8.0),
10686 REAL_CONST(32687.367450741847/8.0),
10687 REAL_CONST(32705.296757340297/8.0),
10688 REAL_CONST(32723.228521523146/8.0),
10689 REAL_CONST(32741.162742616943/8.0),
10690 REAL_CONST(32759.099419948703/8.0),
10691 REAL_CONST(32777.038552845901/8.0),
10692 REAL_CONST(32794.980140636464/8.0),
10693 REAL_CONST(32812.924182648792/8.0),
10694 REAL_CONST(32830.87067821173/8.0),
10695 REAL_CONST(32848.819626654593/8.0),
10696 REAL_CONST(32866.77102730715/8.0),
10697 REAL_CONST(32884.724879499619/8.0),
10698 REAL_CONST(32902.681182562686/8.0),
10699 REAL_CONST(32920.639935827494/8.0),
10700 REAL_CONST(32938.601138625643/8.0),
10701 REAL_CONST(32956.56479028918/8.0),
10702 REAL_CONST(32974.530890150607/8.0),
10703 REAL_CONST(32992.499437542894/8.0),
10704 REAL_CONST(33010.470431799447/8.0),
10705 REAL_CONST(33028.443872254145/8.0),
10706 REAL_CONST(33046.419758241311/8.0),
10707 REAL_CONST(33064.39808909571/8.0),
10708 REAL_CONST(33082.378864152583/8.0),
10709 REAL_CONST(33100.36208274759/8.0),
10710 REAL_CONST(33118.347744216881/8.0),
10711 REAL_CONST(33136.335847897026/8.0),
10712 REAL_CONST(33154.326393125062/8.0),
10713 REAL_CONST(33172.31937923847/8.0),
10714 REAL_CONST(33190.314805575174/8.0),
10715 REAL_CONST(33208.312671473555/8.0),
10716 REAL_CONST(33226.312976272442/8.0),
10717 REAL_CONST(33244.315719311111/8.0),
10718 REAL_CONST(33262.320899929284/8.0),
10719 REAL_CONST(33280.328517467125/8.0),
10720 REAL_CONST(33298.33857126526/8.0),
10721 REAL_CONST(33316.351060664747/8.0),
10722 REAL_CONST(33334.365985007091/8.0),
10723 REAL_CONST(33352.383343634239/8.0),
10724 REAL_CONST(33370.403135888591/8.0),
10725 REAL_CONST(33388.42536111299/8.0),
10726 REAL_CONST(33406.450018650721/8.0),
10727 REAL_CONST(33424.477107845501/8.0),
10728 REAL_CONST(33442.506628041512/8.0),
10729 REAL_CONST(33460.53857858335/8.0),
10730 REAL_CONST(33478.572958816083/8.0),
10731 REAL_CONST(33496.609768085189/8.0),
10732 REAL_CONST(33514.649005736617/8.0),
10733 REAL_CONST(33532.690671116739/8.0),
10734 REAL_CONST(33550.734763572356/8.0),
10735 REAL_CONST(33568.781282450735/8.0),
10736 REAL_CONST(33586.830227099563/8.0),
10737 REAL_CONST(33604.881596866973/8.0),
10738 REAL_CONST(33622.935391101528/8.0),
10739 REAL_CONST(33640.991609152239/8.0),
10740 REAL_CONST(33659.050250368542/8.0),
10741 REAL_CONST(33677.111314100322/8.0),
10742 REAL_CONST(33695.174799697881/8.0),
10743 REAL_CONST(33713.240706511984/8.0),
10744 REAL_CONST(33731.309033893805/8.0),
10745 REAL_CONST(33749.37978119497/8.0),
10746 REAL_CONST(33767.452947767531/8.0),
10747 REAL_CONST(33785.528532963974/8.0),
10748 REAL_CONST(33803.606536137209/8.0),
10749 REAL_CONST(33821.686956640602/8.0),
10750 REAL_CONST(33839.769793827938/8.0),
10751 REAL_CONST(33857.855047053425/8.0),
10752 REAL_CONST(33875.942715671707/8.0),
10753 REAL_CONST(33894.032799037872/8.0),
10754 REAL_CONST(33912.125296507431/8.0),
10755 REAL_CONST(33930.220207436316/8.0),
10756 REAL_CONST(33948.317531180888/8.0),
10757 REAL_CONST(33966.417267097961/8.0),
10758 REAL_CONST(33984.519414544746/8.0),
10759 REAL_CONST(34002.623972878901/8.0),
10760 REAL_CONST(34020.730941458511/8.0),
10761 REAL_CONST(34038.840319642077/8.0),
10762 REAL_CONST(34056.952106788536/8.0),
10763 REAL_CONST(34075.066302257255/8.0),
10764 REAL_CONST(34093.182905408015/8.0),
10765 REAL_CONST(34111.301915601027/8.0),
10766 REAL_CONST(34129.42333219693/8.0),
10767 REAL_CONST(34147.547154556785/8.0),
10768 REAL_CONST(34165.673382042078/8.0),
10769 REAL_CONST(34183.80201401472/8.0),
10770 REAL_CONST(34201.933049837033/8.0),
10771 REAL_CONST(34220.06648887178/8.0),
10772 REAL_CONST(34238.202330482141/8.0),
10773 REAL_CONST(34256.340574031703/8.0),
10774 REAL_CONST(34274.481218884495/8.0),
10775 REAL_CONST(34292.624264404949/8.0),
10776 REAL_CONST(34310.769709957938/8.0),
10777 REAL_CONST(34328.91755490873/8.0),
10778 REAL_CONST(34347.067798623029/8.0),
10779 REAL_CONST(34365.220440466954/8.0),
10780 REAL_CONST(34383.375479807051/8.0),
10781 REAL_CONST(34401.532916010263/8.0),
10782 REAL_CONST(34419.692748443973/8.0),
10783 REAL_CONST(34437.854976475966/8.0),
10784 REAL_CONST(34456.01959947445/8.0),
10785 REAL_CONST(34474.18661680806/8.0),
10786 REAL_CONST(34492.356027845817/8.0),
10787 REAL_CONST(34510.527831957188/8.0),
10788 REAL_CONST(34528.702028512052/8.0),
10789 REAL_CONST(34546.878616880676/8.0),
10790 REAL_CONST(34565.05759643377/8.0),
10791 REAL_CONST(34583.238966542449/8.0),
10792 REAL_CONST(34601.422726578232/8.0),
10793 REAL_CONST(34619.608875913065/8.0),
10794 REAL_CONST(34637.797413919296/8.0),
10795 REAL_CONST(34655.988339969692/8.0),
10796 REAL_CONST(34674.181653437423/8.0),
10797 REAL_CONST(34692.37735369608/8.0),
10798 REAL_CONST(34710.575440119668/8.0),
10799 REAL_CONST(34728.775912082579/8.0),
10800 REAL_CONST(34746.978768959649/8.0),
10801 REAL_CONST(34765.184010126082/8.0),
10802 REAL_CONST(34783.391634957537/8.0),
10803 REAL_CONST(34801.60164283005/8.0),
10804 REAL_CONST(34819.814033120063/8.0),
10805 REAL_CONST(34838.028805204456/8.0),
10806 REAL_CONST(34856.24595846048/8.0),
10807 REAL_CONST(34874.465492265823/8.0),
10808 REAL_CONST(34892.687405998557/8.0),
10809 REAL_CONST(34910.911699037177/8.0),
10810 REAL_CONST(34929.138370760564/8.0),
10811 REAL_CONST(34947.367420548027/8.0),
10812 REAL_CONST(34965.598847779271/8.0),
10813 REAL_CONST(34983.832651834389/8.0),
10814 REAL_CONST(35002.068832093908/8.0),
10815 REAL_CONST(35020.307387938738/8.0),
10816 REAL_CONST(35038.548318750189/8.0),
10817 REAL_CONST(35056.79162390998/8.0),
10818 REAL_CONST(35075.03730280025/8.0),
10819 REAL_CONST(35093.285354803513/8.0),
10820 REAL_CONST(35111.535779302685/8.0),
10821 REAL_CONST(35129.788575681116/8.0),
10822 REAL_CONST(35148.043743322516/8.0),
10823 REAL_CONST(35166.301281611013/8.0),
10824 REAL_CONST(35184.561189931141/8.0),
10825 REAL_CONST(35202.823467667826/8.0),
10826 REAL_CONST(35221.088114206388/8.0),
10827 REAL_CONST(35239.355128932555/8.0),
10828 REAL_CONST(35257.624511232447/8.0),
10829 REAL_CONST(35275.896260492584/8.0),
10830 REAL_CONST(35294.170376099886/8.0),
10831 REAL_CONST(35312.446857441668/8.0),
10832 REAL_CONST(35330.725703905628/8.0),
10833 REAL_CONST(35349.006914879887/8.0),
10834 REAL_CONST(35367.290489752944/8.0),
10835 REAL_CONST(35385.576427913686/8.0),
10836 REAL_CONST(35403.864728751418/8.0),
10837 REAL_CONST(35422.155391655811/8.0),
10838 REAL_CONST(35440.448416016967/8.0),
10839 REAL_CONST(35458.743801225341/8.0),
10840 REAL_CONST(35477.041546671804/8.0),
10841 REAL_CONST(35495.341651747622/8.0),
10842 REAL_CONST(35513.644115844436/8.0),
10843 REAL_CONST(35531.948938354304/8.0),
10844 REAL_CONST(35550.256118669655/8.0),
10845 REAL_CONST(35568.565656183309/8.0),
10846 REAL_CONST(35586.877550288496/8.0),
10847 REAL_CONST(35605.191800378816/8.0),
10848 REAL_CONST(35623.508405848268/8.0),
10849 REAL_CONST(35641.827366091238/8.0),
10850 REAL_CONST(35660.148680502505/8.0),
10851 REAL_CONST(35678.472348477233/8.0),
10852 REAL_CONST(35696.798369410979/8.0),
10853 REAL_CONST(35715.126742699678/8.0),
10854 REAL_CONST(35733.457467739659/8.0),
10855 REAL_CONST(35751.790543927644/8.0),
10856 REAL_CONST(35770.125970660738/8.0),
10857 REAL_CONST(35788.46374733642/8.0),
10858 REAL_CONST(35806.803873352568/8.0),
10859 REAL_CONST(35825.146348107453/8.0),
10860 REAL_CONST(35843.49117099971/8.0),
10861 REAL_CONST(35861.838341428367/8.0),
10862 REAL_CONST(35880.187858792851/8.0),
10863 REAL_CONST(35898.539722492955/8.0),
10864 REAL_CONST(35916.893931928862/8.0),
10865 REAL_CONST(35935.250486501129/8.0),
10866 REAL_CONST(35953.609385610718/8.0),
10867 REAL_CONST(35971.970628658957/8.0),
10868 REAL_CONST(35990.334215047558/8.0),
10869 REAL_CONST(36008.700144178612/8.0),
10870 REAL_CONST(36027.068415454596/8.0),
10871 REAL_CONST(36045.439028278372/8.0),
10872 REAL_CONST(36063.811982053165/8.0),
10873 REAL_CONST(36082.187276182609/8.0),
10874 REAL_CONST(36100.564910070694/8.0),
10875 REAL_CONST(36118.944883121789/8.0),
10876 REAL_CONST(36137.327194740654/8.0),
10877 REAL_CONST(36155.711844332429/8.0),
10878 REAL_CONST(36174.098831302617/8.0),
10879 REAL_CONST(36192.488155057115/8.0),
10880 REAL_CONST(36210.87981500219/8.0),
10881 REAL_CONST(36229.273810544473/8.0),
10882 REAL_CONST(36247.670141091003/8.0),
10883 REAL_CONST(36266.068806049167/8.0),
10884 REAL_CONST(36284.469804826738/8.0),
10885 REAL_CONST(36302.873136831862/8.0),
10886 REAL_CONST(36321.278801473069/8.0),
10887 REAL_CONST(36339.686798159251/8.0),
10888 REAL_CONST(36358.097126299683/8.0),
10889 REAL_CONST(36376.509785304013/8.0),
10890 REAL_CONST(36394.924774582258/8.0),
10891 REAL_CONST(36413.342093544816/8.0),
10892 REAL_CONST(36431.761741602444/8.0),
10893 REAL_CONST(36450.183718166292/8.0),
10894 REAL_CONST(36468.608022647859/8.0),
10895 REAL_CONST(36487.034654459028/8.0),
10896 REAL_CONST(36505.463613012063/8.0),
10897 REAL_CONST(36523.894897719583/8.0),
10898 REAL_CONST(36542.328507994578/8.0),
10899 REAL_CONST(36560.764443250409/8.0),
10900 REAL_CONST(36579.202702900831/8.0),
10901 REAL_CONST(36597.643286359926/8.0),
10902 REAL_CONST(36616.086193042182/8.0),
10903 REAL_CONST(36634.531422362437/8.0),
10904 REAL_CONST(36652.978973735895/8.0),
10905 REAL_CONST(36671.428846578143/8.0),
10906 REAL_CONST(36689.881040305125/8.0),
10907 REAL_CONST(36708.335554333149/8.0),
10908 REAL_CONST(36726.792388078902/8.0),
10909 REAL_CONST(36745.251540959427/8.0),
10910 REAL_CONST(36763.713012392138/8.0),
10911 REAL_CONST(36782.176801794812/8.0),
10912 REAL_CONST(36800.642908585593/8.0),
10913 REAL_CONST(36819.111332182983/8.0),
10914 REAL_CONST(36837.582072005869/8.0),
10915 REAL_CONST(36856.055127473483/8.0),
10916 REAL_CONST(36874.530498005421/8.0),
10917 REAL_CONST(36893.008183021651/8.0),
10918 REAL_CONST(36911.488181942506/8.0),
10919 REAL_CONST(36929.970494188674/8.0),
10920 REAL_CONST(36948.455119181206/8.0),
10921 REAL_CONST(36966.942056341519/8.0),
10922 REAL_CONST(36985.431305091392/8.0),
10923 REAL_CONST(37003.922864852961/8.0),
10924 REAL_CONST(37022.416735048733/8.0),
10925 REAL_CONST(37040.912915101559/8.0),
10926 REAL_CONST(37059.411404434657/8.0),
10927 REAL_CONST(37077.91220247162/8.0),
10928 REAL_CONST(37096.415308636388/8.0),
10929 REAL_CONST(37114.920722353243/8.0),
10930 REAL_CONST(37133.428443046862/8.0),
10931 REAL_CONST(37151.938470142253/8.0),
10932 REAL_CONST(37170.450803064785/8.0),
10933 REAL_CONST(37188.965441240209/8.0),
10934 REAL_CONST(37207.482384094597/8.0),
10935 REAL_CONST(37226.001631054402/8.0),
10936 REAL_CONST(37244.523181546429/8.0),
10937 REAL_CONST(37263.047034997842/8.0),
10938 REAL_CONST(37281.573190836149/8.0),
10939 REAL_CONST(37300.101648489224/8.0),
10940 REAL_CONST(37318.632407385296/8.0),
10941 REAL_CONST(37337.165466952945/8.0),
10942 REAL_CONST(37355.700826621112/8.0),
10943 REAL_CONST(37374.238485819085/8.0),
10944 REAL_CONST(37392.778443976509/8.0),
10945 REAL_CONST(37411.320700523385/8.0),
10946 REAL_CONST(37429.865254890057/8.0),
10947 REAL_CONST(37448.412106507232/8.0),
10948 REAL_CONST(37466.961254805974/8.0),
10949 REAL_CONST(37485.512699217681/8.0),
10950 REAL_CONST(37504.066439174116/8.0),
10951 REAL_CONST(37522.622474107404/8.0),
10952 REAL_CONST(37541.180803449992/8.0),
10953 REAL_CONST(37559.741426634704/8.0),
10954 REAL_CONST(37578.304343094693/8.0),
10955 REAL_CONST(37596.869552263488/8.0),
10956 REAL_CONST(37615.43705357494/8.0),
10957 REAL_CONST(37634.006846463279/8.0),
10958 REAL_CONST(37652.578930363044/8.0),
10959 REAL_CONST(37671.153304709165/8.0),
10960 REAL_CONST(37689.729968936896/8.0),
10961 REAL_CONST(37708.308922481847/8.0),
10962 REAL_CONST(37726.890164779965/8.0),
10963 REAL_CONST(37745.473695267559/8.0),
10964 REAL_CONST(37764.059513381275/8.0),
10965 REAL_CONST(37782.647618558112/8.0),
10966 REAL_CONST(37801.238010235415/8.0),
10967 REAL_CONST(37819.830687850859/8.0),
10968 REAL_CONST(37838.425650842495/8.0),
10969 REAL_CONST(37857.022898648691/8.0),
10970 REAL_CONST(37875.622430708172/8.0),
10971 REAL_CONST(37894.224246460013/8.0),
10972 REAL_CONST(37912.828345343616/8.0),
10973 REAL_CONST(37931.434726798747/8.0),
10974 REAL_CONST(37950.043390265506/8.0),
10975 REAL_CONST(37968.654335184328/8.0),
10976 REAL_CONST(37987.267560995999/8.0),
10977 REAL_CONST(38005.883067141665/8.0),
10978 REAL_CONST(38024.500853062775/8.0),
10979 REAL_CONST(38043.120918201159/8.0),
10980 REAL_CONST(38061.743261998963/8.0),
10981 REAL_CONST(38080.367883898682/8.0),
10982 REAL_CONST(38098.994783343158/8.0),
10983 REAL_CONST(38117.623959775563/8.0),
10984 REAL_CONST(38136.255412639417/8.0),
10985 REAL_CONST(38154.889141378575/8.0),
10986 REAL_CONST(38173.525145437234/8.0),
10987 REAL_CONST(38192.163424259939/8.0),
10988 REAL_CONST(38210.803977291551/8.0),
10989 REAL_CONST(38229.446803977284/8.0),
10990 REAL_CONST(38248.091903762703/8.0),
10991 REAL_CONST(38266.739276093685/8.0),
10992 REAL_CONST(38285.388920416466/8.0),
10993 REAL_CONST(38304.040836177606/8.0),
10994 REAL_CONST(38322.695022824002/8.0),
10995 REAL_CONST(38341.351479802899/8.0),
10996 REAL_CONST(38360.010206561863/8.0),
10997 REAL_CONST(38378.671202548816/8.0),
10998 REAL_CONST(38397.334467211993/8.0),
10999 REAL_CONST(38415.999999999978/8.0),
11000 REAL_CONST(38434.667800361683/8.0),
11001 REAL_CONST(38453.33786774637/8.0),
11002 REAL_CONST(38472.010201603611/8.0),
11003 REAL_CONST(38490.684801383337/8.0),
11004 REAL_CONST(38509.361666535784/8.0),
11005 REAL_CONST(38528.040796511552/8.0),
11006 REAL_CONST(38546.722190761553/8.0),
11007 REAL_CONST(38565.405848737035/8.0),
11008 REAL_CONST(38584.091769889594/8.0),
11009 REAL_CONST(38602.779953671132/8.0),
11010 REAL_CONST(38621.470399533908/8.0),
11011 REAL_CONST(38640.163106930493/8.0),
11012 REAL_CONST(38658.858075313794/8.0),
11013 REAL_CONST(38677.555304137059/8.0),
11014 REAL_CONST(38696.254792853862/8.0),
11015 REAL_CONST(38714.956540918094/8.0),
11016 REAL_CONST(38733.660547783991/8.0),
11017 REAL_CONST(38752.366812906112/8.0),
11018 REAL_CONST(38771.075335739348/8.0),
11019 REAL_CONST(38789.78611573892/8.0),
11020 REAL_CONST(38808.499152360368/8.0),
11021 REAL_CONST(38827.214445059573/8.0),
11022 REAL_CONST(38845.931993292739/8.0),
11023 REAL_CONST(38864.651796516388/8.0),
11024 REAL_CONST(38883.373854187383/8.0),
11025 REAL_CONST(38902.098165762916/8.0),
11026 REAL_CONST(38920.824730700486/8.0),
11027 REAL_CONST(38939.553548457938/8.0),
11028 REAL_CONST(38958.284618493431/8.0),
11029 REAL_CONST(38977.017940265461/8.0),
11030 REAL_CONST(38995.753513232834/8.0),
11031 REAL_CONST(39014.491336854699/8.0),
11032 REAL_CONST(39033.231410590517/8.0),
11033 REAL_CONST(39051.973733900079/8.0),
11034 REAL_CONST(39070.718306243485/8.0),
11035 REAL_CONST(39089.465127081188/8.0),
11036 REAL_CONST(39108.214195873945/8.0),
11037 REAL_CONST(39126.965512082832/8.0),
11038 REAL_CONST(39145.719075169261/8.0),
11039 REAL_CONST(39164.474884594965/8.0),
11040 REAL_CONST(39183.232939821988/8.0),
11041 REAL_CONST(39201.99324031271/8.0),
11042 REAL_CONST(39220.755785529815/8.0),
11043 REAL_CONST(39239.52057493633/8.0),
11044 REAL_CONST(39258.287607995589/8.0),
11045 REAL_CONST(39277.056884171245/8.0),
11046 REAL_CONST(39295.828402927284/8.0),
11047 REAL_CONST(39314.602163728006/8.0),
11048 REAL_CONST(39333.378166038019/8.0),
11049 REAL_CONST(39352.15640932227/8.0),
11050 REAL_CONST(39370.936893046004/8.0),
11051 REAL_CONST(39389.719616674811/8.0),
11052 REAL_CONST(39408.504579674584/8.0),
11053 REAL_CONST(39427.291781511522/8.0),
11054 REAL_CONST(39446.081221652174/8.0),
11055 REAL_CONST(39464.872899563372/8.0),
11056 REAL_CONST(39483.666814712291/8.0),
11057 REAL_CONST(39502.462966566411/8.0),
11058 REAL_CONST(39521.261354593538/8.0),
11059 REAL_CONST(39540.06197826178/8.0),
11060 REAL_CONST(39558.864837039568/8.0),
11061 REAL_CONST(39577.669930395656/8.0),
11062 REAL_CONST(39596.47725779911/8.0),
11063 REAL_CONST(39615.286818719302/8.0),
11064 REAL_CONST(39634.098612625923/8.0),
11065 REAL_CONST(39652.912638988993/8.0),
11066 REAL_CONST(39671.728897278823/8.0),
11067 REAL_CONST(39690.547386966064/8.0),
11068 REAL_CONST(39709.368107521652/8.0),
11069 REAL_CONST(39728.191058416858/8.0),
11070 REAL_CONST(39747.016239123259/8.0),
11071 REAL_CONST(39765.84364911275/8.0),
11072 REAL_CONST(39784.673287857528/8.0),
11073 REAL_CONST(39803.505154830105/8.0),
11074 REAL_CONST(39822.339249503319/8.0),
11075 REAL_CONST(39841.175571350293/8.0),
11076 REAL_CONST(39860.014119844491/8.0),
11077 REAL_CONST(39878.854894459677/8.0),
11078 REAL_CONST(39897.697894669909/8.0),
11079 REAL_CONST(39916.54311994958/8.0),
11080 REAL_CONST(39935.390569773372/8.0),
11081 REAL_CONST(39954.240243616303/8.0),
11082 REAL_CONST(39973.092140953675/8.0),
11083 REAL_CONST(39991.946261261117/8.0),
11084 REAL_CONST(40010.802604014549/8.0),
11085 REAL_CONST(40029.661168690225/8.0),
11086 REAL_CONST(40048.521954764678/8.0),
11087 REAL_CONST(40067.384961714779/8.0),
11088 REAL_CONST(40086.250189017679/8.0),
11089 REAL_CONST(40105.117636150855/8.0),
11090 REAL_CONST(40123.98730259209/8.0),
11091 REAL_CONST(40142.859187819471/8.0),
11092 REAL_CONST(40161.733291311379/8.0),
11093 REAL_CONST(40180.609612546526/8.0),
11094 REAL_CONST(40199.488151003912/8.0),
11095 REAL_CONST(40218.368906162854/8.0),
11096 REAL_CONST(40237.25187750296/8.0),
11097 REAL_CONST(40256.137064504153/8.0),
11098 REAL_CONST(40275.024466646668/8.0),
11099 REAL_CONST(40293.914083411029/8.0),
11100 REAL_CONST(40312.805914278084/8.0),
11101 REAL_CONST(40331.699958728961/8.0),
11102 REAL_CONST(40350.596216245103/8.0),
11103 REAL_CONST(40369.494686308273/8.0),
11104 REAL_CONST(40388.39536840051/8.0),
11105 REAL_CONST(40407.298262004173/8.0),
11106 REAL_CONST(40426.20336660192/8.0),
11107 REAL_CONST(40445.110681676706/8.0),
11108 REAL_CONST(40464.020206711793/8.0),
11109 REAL_CONST(40482.931941190756/8.0),
11110 REAL_CONST(40501.845884597446/8.0),
11111 REAL_CONST(40520.762036416032/8.0),
11112 REAL_CONST(40539.680396130985/8.0),
11113 REAL_CONST(40558.600963227072/8.0),
11114 REAL_CONST(40577.523737189367/8.0),
11115 REAL_CONST(40596.448717503234/8.0),
11116 REAL_CONST(40615.375903654342/8.0),
11117 REAL_CONST(40634.305295128659/8.0),
11118 REAL_CONST(40653.236891412453/8.0),
11119 REAL_CONST(40672.170691992294/8.0),
11120 REAL_CONST(40691.106696355047/8.0),
11121 REAL_CONST(40710.044903987873/8.0),
11122 REAL_CONST(40728.985314378238/8.0),
11123 REAL_CONST(40747.927927013901/8.0),
11124 REAL_CONST(40766.872741382918/8.0),
11125 REAL_CONST(40785.819756973651/8.0),
11126 REAL_CONST(40804.768973274746/8.0),
11127 REAL_CONST(40823.720389775161/8.0),
11128 REAL_CONST(40842.674005964131/8.0),
11129 REAL_CONST(40861.629821331211/8.0),
11130 REAL_CONST(40880.587835366234/8.0),
11131 REAL_CONST(40899.548047559321/8.0),
11132 REAL_CONST(40918.510457400931/8.0),
11133 REAL_CONST(40937.475064381761/8.0),
11134 REAL_CONST(40956.441867992849/8.0),
11135 REAL_CONST(40975.410867725499/8.0),
11136 REAL_CONST(40994.382063071331/8.0),
11137 REAL_CONST(41013.355453522236/8.0),
11138 REAL_CONST(41032.331038570417/8.0),
11139 REAL_CONST(41051.308817708363/8.0),
11140 REAL_CONST(41070.288790428858/8.0),
11141 REAL_CONST(41089.270956224987/8.0),
11142 REAL_CONST(41108.255314590111/8.0),
11143 REAL_CONST(41127.241865017888/8.0),
11144 REAL_CONST(41146.23060700229/8.0),
11145 REAL_CONST(41165.221540037543/8.0),
11146 REAL_CONST(41184.214663618193/8.0),
11147 REAL_CONST(41203.209977239079/8.0),
11148 REAL_CONST(41222.207480395307/8.0),
11149 REAL_CONST(41241.207172582297/8.0),
11150 REAL_CONST(41260.209053295752/8.0),
11151 REAL_CONST(41279.213122031659/8.0),
11152 REAL_CONST(41298.219378286303/8.0),
11153 REAL_CONST(41317.227821556255/8.0),
11154 REAL_CONST(41336.23845133838/8.0),
11155 REAL_CONST(41355.251267129832/8.0),
11156 REAL_CONST(41374.266268428037/8.0),
11157 REAL_CONST(41393.283454730743/8.0),
11158 REAL_CONST(41412.302825535953/8.0),
11159 REAL_CONST(41431.324380341983/8.0),
11160 REAL_CONST(41450.348118647416/8.0),
11161 REAL_CONST(41469.374039951144/8.0),
11162 REAL_CONST(41488.402143752326/8.0),
11163 REAL_CONST(41507.432429550427/8.0),
11164 REAL_CONST(41526.464896845187/8.0),
11165 REAL_CONST(41545.499545136627/8.0),
11166 REAL_CONST(41564.536373925075/8.0),
11167 REAL_CONST(41583.575382711126/8.0),
11168 REAL_CONST(41602.616570995662/8.0),
11169 REAL_CONST(41621.659938279874/8.0),
11170 REAL_CONST(41640.705484065205/8.0),
11171 REAL_CONST(41659.753207853406/8.0),
11172 REAL_CONST(41678.803109146495/8.0),
11173 REAL_CONST(41697.855187446803/8.0),
11174 REAL_CONST(41716.909442256911/8.0),
11175 REAL_CONST(41735.965873079709/8.0),
11176 REAL_CONST(41755.02447941836/8.0),
11177 REAL_CONST(41774.085260776315/8.0),
11178 REAL_CONST(41793.148216657297/8.0),
11179 REAL_CONST(41812.213346565331/8.0),
11180 REAL_CONST(41831.280650004708/8.0),
11181 REAL_CONST(41850.350126480014/8.0),
11182 REAL_CONST(41869.421775496106/8.0),
11183 REAL_CONST(41888.495596558132/8.0),
11184 REAL_CONST(41907.571589171515/8.0),
11185 REAL_CONST(41926.649752841957/8.0),
11186 REAL_CONST(41945.730087075463/8.0),
11187 REAL_CONST(41964.812591378286/8.0),
11188 REAL_CONST(41983.897265256979/8.0),
11189 REAL_CONST(42002.984108218378/8.0),
11190 REAL_CONST(42022.073119769593/8.0),
11191 REAL_CONST(42041.164299418015/8.0),
11192 REAL_CONST(42060.257646671307/8.0),
11193 REAL_CONST(42079.353161037419/8.0),
11194 REAL_CONST(42098.450842024591/8.0),
11195 REAL_CONST(42117.550689141324/8.0),
11196 REAL_CONST(42136.652701896404/8.0),
11197 REAL_CONST(42155.756879798893/8.0),
11198 REAL_CONST(42174.863222358137/8.0),
11199 REAL_CONST(42193.971729083758/8.0),
11200 REAL_CONST(42213.082399485655/8.0),
11201 REAL_CONST(42232.195233074002/8.0),
11202 REAL_CONST(42251.310229359246/8.0),
11203 REAL_CONST(42270.427387852127/8.0),
11204 REAL_CONST(42289.546708063644/8.0),
11205 REAL_CONST(42308.668189505079/8.0),
11206 REAL_CONST(42327.791831687995/8.0),
11207 REAL_CONST(42346.917634124227/8.0),
11208 REAL_CONST(42366.045596325886/8.0),
11209 REAL_CONST(42385.175717805352/8.0),
11210 REAL_CONST(42404.307998075295/8.0),
11211 REAL_CONST(42423.442436648642/8.0),
11212 REAL_CONST(42442.579033038608/8.0),
11213 REAL_CONST(42461.717786758672/8.0),
11214 REAL_CONST(42480.858697322597/8.0),
11215 REAL_CONST(42500.001764244422/8.0),
11216 REAL_CONST(42519.146987038446/8.0),
11217 REAL_CONST(42538.294365219248/8.0),
11218 REAL_CONST(42557.443898301688/8.0),
11219 REAL_CONST(42576.595585800882/8.0),
11220 REAL_CONST(42595.749427232236/8.0),
11221 REAL_CONST(42614.90542211142/8.0),
11222 REAL_CONST(42634.063569954378/8.0),
11223 REAL_CONST(42653.223870277317/8.0),
11224 REAL_CONST(42672.386322596729/8.0),
11225 REAL_CONST(42691.55092642938/8.0),
11226 REAL_CONST(42710.717681292292/8.0),
11227 REAL_CONST(42729.886586702756/8.0),
11228 REAL_CONST(42749.057642178363/8.0),
11229 REAL_CONST(42768.23084723694/8.0),
11230 REAL_CONST(42787.406201396603/8.0),
11231 REAL_CONST(42806.58370417574/8.0),
11232 REAL_CONST(42825.76335509299/8.0),
11233 REAL_CONST(42844.945153667286/8.0),
11234 REAL_CONST(42864.129099417805/8.0),
11235 REAL_CONST(42883.315191864014/8.0),
11236 REAL_CONST(42902.503430525649/8.0),
11237 REAL_CONST(42921.693814922692/8.0),
11238 REAL_CONST(42940.88634457541/8.0),
11239 REAL_CONST(42960.081019004348/8.0),
11240 REAL_CONST(42979.277837730297/8.0),
11241 REAL_CONST(42998.476800274322/8.0),
11242 REAL_CONST(43017.677906157769/8.0),
11243 REAL_CONST(43036.881154902228/8.0),
11244 REAL_CONST(43056.086546029583/8.0),
11245 REAL_CONST(43075.294079061961/8.0),
11246 REAL_CONST(43094.503753521763/8.0),
11247 REAL_CONST(43113.715568931671/8.0),
11248 REAL_CONST(43132.929524814601/8.0),
11249 REAL_CONST(43152.145620693766/8.0),
11250 REAL_CONST(43171.363856092619/8.0),
11251 REAL_CONST(43190.584230534907/8.0),
11252 REAL_CONST(43209.806743544621/8.0),
11253 REAL_CONST(43229.031394646016/8.0),
11254 REAL_CONST(43248.258183363621/8.0),
11255 REAL_CONST(43267.487109222224/8.0),
11256 REAL_CONST(43286.718171746885/8.0),
11257 REAL_CONST(43305.951370462906/8.0),
11258 REAL_CONST(43325.186704895881/8.0),
11259 REAL_CONST(43344.42417457165/8.0),
11260 REAL_CONST(43363.663779016322/8.0),
11261 REAL_CONST(43382.905517756262/8.0),
11262 REAL_CONST(43402.149390318104/8.0),
11263 REAL_CONST(43421.395396228749/8.0),
11264 REAL_CONST(43440.643535015348/8.0),
11265 REAL_CONST(43459.89380620532/8.0),
11266 REAL_CONST(43479.146209326354/8.0),
11267 REAL_CONST(43498.400743906379/8.0),
11268 REAL_CONST(43517.657409473606/8.0),
11269 REAL_CONST(43536.916205556496/8.0),
11270 REAL_CONST(43556.177131683784/8.0),
11271 REAL_CONST(43575.44018738444/8.0),
11272 REAL_CONST(43594.705372187724/8.0),
11273 REAL_CONST(43613.972685623135/8.0),
11274 REAL_CONST(43633.242127220445/8.0),
11275 REAL_CONST(43652.513696509668/8.0),
11276 REAL_CONST(43671.787393021099/8.0),
11277 REAL_CONST(43691.063216285271/8.0),
11278 REAL_CONST(43710.341165833001/8.0),
11279 REAL_CONST(43729.621241195346/8.0),
11280 REAL_CONST(43748.903441903625/8.0),
11281 REAL_CONST(43768.187767489413/8.0),
11282 REAL_CONST(43787.474217484552/8.0),
11283 REAL_CONST(43806.762791421126/8.0),
11284 REAL_CONST(43826.053488831501/8.0),
11285 REAL_CONST(43845.346309248278/8.0),
11286 REAL_CONST(43864.641252204325/8.0),
11287 REAL_CONST(43883.938317232765/8.0),
11288 REAL_CONST(43903.237503866971/8.0),
11289 REAL_CONST(43922.538811640596/8.0),
11290 REAL_CONST(43941.842240087513/8.0),
11291 REAL_CONST(43961.147788741881/8.0),
11292 REAL_CONST(43980.455457138101/8.0),
11293 REAL_CONST(43999.765244810835/8.0),
11294 REAL_CONST(44019.077151295001/8.0),
11295 REAL_CONST(44038.391176125755/8.0),
11296 REAL_CONST(44057.70731883854/8.0),
11297 REAL_CONST(44077.02557896902/8.0),
11298 REAL_CONST(44096.345956053141/8.0),
11299 REAL_CONST(44115.668449627083/8.0),
11300 REAL_CONST(44134.993059227287/8.0),
11301 REAL_CONST(44154.319784390456/8.0),
11302 REAL_CONST(44173.648624653535/8.0),
11303 REAL_CONST(44192.979579553728/8.0),
11304 REAL_CONST(44212.312648628489/8.0),
11305 REAL_CONST(44231.647831415532/8.0),
11306 REAL_CONST(44250.985127452805/8.0),
11307 REAL_CONST(44270.324536278538/8.0),
11308 REAL_CONST(44289.666057431183/8.0),
11309 REAL_CONST(44309.009690449464/8.0),
11310 REAL_CONST(44328.355434872348/8.0),
11311 REAL_CONST(44347.703290239064/8.0),
11312 REAL_CONST(44367.053256089079/8.0),
11313 REAL_CONST(44386.405331962109/8.0),
11314 REAL_CONST(44405.759517398139/8.0),
11315 REAL_CONST(44425.115811937387/8.0),
11316 REAL_CONST(44444.474215120332/8.0),
11317 REAL_CONST(44463.834726487694/8.0),
11318 REAL_CONST(44483.197345580462/8.0),
11319 REAL_CONST(44502.562071939843/8.0),
11320 REAL_CONST(44521.928905107328/8.0),
11321 REAL_CONST(44541.297844624634/8.0),
11322 REAL_CONST(44560.668890033732/8.0),
11323 REAL_CONST(44580.042040876848/8.0),
11324 REAL_CONST(44599.417296696454/8.0),
11325 REAL_CONST(44618.794657035272/8.0),
11326 REAL_CONST(44638.174121436256/8.0),
11327 REAL_CONST(44657.555689442641/8.0),
11328 REAL_CONST(44676.939360597877/8.0),
11329 REAL_CONST(44696.325134445673/8.0),
11330 REAL_CONST(44715.713010530002/8.0),
11331 REAL_CONST(44735.102988395054/8.0),
11332 REAL_CONST(44754.495067585296/8.0),
11333 REAL_CONST(44773.88924764542/8.0),
11334 REAL_CONST(44793.285528120374/8.0),
11335 REAL_CONST(44812.683908555344/8.0),
11336 REAL_CONST(44832.084388495779/8.0),
11337 REAL_CONST(44851.486967487363/8.0),
11338 REAL_CONST(44870.891645076015/8.0),
11339 REAL_CONST(44890.298420807922/8.0),
11340 REAL_CONST(44909.707294229491/8.0),
11341 REAL_CONST(44929.118264887409/8.0),
11342 REAL_CONST(44948.531332328566/8.0),
11343 REAL_CONST(44967.946496100136/8.0),
11344 REAL_CONST(44987.363755749502/8.0),
11345 REAL_CONST(45006.783110824319/8.0),
11346 REAL_CONST(45026.204560872473/8.0),
11347 REAL_CONST(45045.628105442098/8.0),
11348 REAL_CONST(45065.053744081561/8.0),
11349 REAL_CONST(45084.48147633949/8.0),
11350 REAL_CONST(45103.911301764747/8.0),
11351 REAL_CONST(45123.343219906426/8.0),
11352 REAL_CONST(45142.777230313885/8.0),
11353 REAL_CONST(45162.21333253671/8.0),
11354 REAL_CONST(45181.651526124733/8.0),
11355 REAL_CONST(45201.091810628037/8.0),
11356 REAL_CONST(45220.534185596924/8.0),
11357 REAL_CONST(45239.978650581965/8.0),
11358 REAL_CONST(45259.425205133957/8.0),
11359 REAL_CONST(45278.873848803938/8.0),
11360 REAL_CONST(45298.324581143192/8.0),
11361 REAL_CONST(45317.777401703235/8.0),
11362 REAL_CONST(45337.232310035848/8.0),
11363 REAL_CONST(45356.68930569302/8.0),
11364 REAL_CONST(45376.148388226997/8.0),
11365 REAL_CONST(45395.60955719027/8.0),
11366 REAL_CONST(45415.072812135557/8.0),
11367 REAL_CONST(45434.538152615823/8.0),
11368 REAL_CONST(45454.005578184282/8.0),
11369 REAL_CONST(45473.475088394356/8.0),
11370 REAL_CONST(45492.946682799746/8.0),
11371 REAL_CONST(45512.420360954362/8.0),
11372 REAL_CONST(45531.896122412363/8.0),
11373 REAL_CONST(45551.373966728155/8.0),
11374 REAL_CONST(45570.853893456362/8.0),
11375 REAL_CONST(45590.33590215187/8.0),
11376 REAL_CONST(45609.819992369776/8.0),
11377 REAL_CONST(45629.306163665438/8.0),
11378 REAL_CONST(45648.794415594442/8.0),
11379 REAL_CONST(45668.284747712612/8.0),
11380 REAL_CONST(45687.777159576006/8.0),
11381 REAL_CONST(45707.27165074092/8.0),
11382 REAL_CONST(45726.768220763894/8.0),
11383 REAL_CONST(45746.266869201696/8.0),
11384 REAL_CONST(45765.767595611323/8.0),
11385 REAL_CONST(45785.270399550034/8.0),
11386 REAL_CONST(45804.775280575297/8.0),
11387 REAL_CONST(45824.282238244828/8.0),
11388 REAL_CONST(45843.79127211657/8.0),
11389 REAL_CONST(45863.302381748719/8.0),
11390 REAL_CONST(45882.815566699683/8.0),
11391 REAL_CONST(45902.33082652813/8.0),
11392 REAL_CONST(45921.848160792935/8.0),
11393 REAL_CONST(45941.367569053225/8.0),
11394 REAL_CONST(45960.889050868354/8.0),
11395 REAL_CONST(45980.41260579793/8.0),
11396 REAL_CONST(45999.938233401757/8.0),
11397 REAL_CONST(46019.465933239902/8.0),
11398 REAL_CONST(46038.995704872657/8.0),
11399 REAL_CONST(46058.527547860547/8.0),
11400 REAL_CONST(46078.06146176433/8.0),
11401 REAL_CONST(46097.597446144995/8.0),
11402 REAL_CONST(46117.135500563774/8.0),
11403 REAL_CONST(46136.675624582109/8.0),
11404 REAL_CONST(46156.217817761702/8.0),
11405 REAL_CONST(46175.762079664462/8.0),
11406 REAL_CONST(46195.308409852543/8.0),
11407 REAL_CONST(46214.856807888333/8.0),
11408 REAL_CONST(46234.407273334444/8.0),
11409 REAL_CONST(46253.959805753715/8.0),
11410 REAL_CONST(46273.51440470924/8.0),
11411 REAL_CONST(46293.071069764315/8.0),
11412 REAL_CONST(46312.629800482478/8.0),
11413 REAL_CONST(46332.190596427499/8.0),
11414 REAL_CONST(46351.753457163381/8.0),
11415 REAL_CONST(46371.318382254351/8.0),
11416 REAL_CONST(46390.885371264863/8.0),
11417 REAL_CONST(46410.45442375962/8.0),
11418 REAL_CONST(46430.025539303526/8.0),
11419 REAL_CONST(46449.598717461733/8.0),
11420 REAL_CONST(46469.17395779962/8.0),
11421 REAL_CONST(46488.751259882782/8.0),
11422 REAL_CONST(46508.33062327707/8.0),
11423 REAL_CONST(46527.912047548532/8.0),
11424 REAL_CONST(46547.495532263471/8.0),
11425 REAL_CONST(46567.081076988397/8.0),
11426 REAL_CONST(46586.668681290059/8.0),
11427 REAL_CONST(46606.258344735434/8.0),
11428 REAL_CONST(46625.850066891719/8.0),
11429 REAL_CONST(46645.443847326351/8.0),
11430 REAL_CONST(46665.039685606986/8.0),
11431 REAL_CONST(46684.637581301497/8.0),
11432 REAL_CONST(46704.237533978005/8.0),
11433 REAL_CONST(46723.839543204842/8.0),
11434 REAL_CONST(46743.443608550573/8.0),
11435 REAL_CONST(46763.049729583989/8.0),
11436 REAL_CONST(46782.657905874104/8.0),
11437 REAL_CONST(46802.268136990162/8.0),
11438 REAL_CONST(46821.880422501628/8.0),
11439 REAL_CONST(46841.494761978196/8.0),
11440 REAL_CONST(46861.111154989776/8.0),
11441 REAL_CONST(46880.729601106526/8.0),
11442 REAL_CONST(46900.350099898795/8.0),
11443 REAL_CONST(46919.97265093719/8.0),
11444 REAL_CONST(46939.597253792526/8.0),
11445 REAL_CONST(46959.223908035841/8.0),
11446 REAL_CONST(46978.852613238392/8.0),
11447 REAL_CONST(46998.483368971691/8.0),
11448 REAL_CONST(47018.11617480743/8.0),
11449 REAL_CONST(47037.751030317551/8.0),
11450 REAL_CONST(47057.387935074221/8.0),
11451 REAL_CONST(47077.026888649809/8.0),
11452 REAL_CONST(47096.66789061694/8.0),
11453 REAL_CONST(47116.310940548428/8.0),
11454 REAL_CONST(47135.956038017328/8.0),
11455 REAL_CONST(47155.603182596918/8.0),
11456 REAL_CONST(47175.252373860698/8.0),
11457 REAL_CONST(47194.903611382375/8.0),
11458 REAL_CONST(47214.556894735892/8.0),
11459 REAL_CONST(47234.212223495422/8.0),
11460 REAL_CONST(47253.869597235338/8.0),
11461 REAL_CONST(47273.52901553025/8.0),
11462 REAL_CONST(47293.19047795498/8.0),
11463 REAL_CONST(47312.853984084577/8.0),
11464 REAL_CONST(47332.519533494306/8.0),
11465 REAL_CONST(47352.187125759658/8.0),
11466 REAL_CONST(47371.856760456343/8.0),
11467 REAL_CONST(47391.528437160297/8.0),
11468 REAL_CONST(47411.202155447652/8.0),
11469 REAL_CONST(47430.877914894787/8.0),
11470 REAL_CONST(47450.555715078299/8.0),
11471 REAL_CONST(47470.235555574982/8.0),
11472 REAL_CONST(47489.917435961863/8.0),
11473 REAL_CONST(47509.601355816201/8.0),
11474 REAL_CONST(47529.287314715453/8.0),
11475 REAL_CONST(47548.975312237308/8.0),
11476 REAL_CONST(47568.665347959672/8.0),
11477 REAL_CONST(47588.357421460656/8.0),
11478 REAL_CONST(47608.051532318605/8.0),
11479 REAL_CONST(47627.747680112072/8.0),
11480 REAL_CONST(47647.445864419846/8.0),
11481 REAL_CONST(47667.14608482091/8.0),
11482 REAL_CONST(47686.848340894474/8.0),
11483 REAL_CONST(47706.552632219973/8.0),
11484 REAL_CONST(47726.258958377046/8.0),
11485 REAL_CONST(47745.967318945557/8.0),
11486 REAL_CONST(47765.677713505589/8.0),
11487 REAL_CONST(47785.390141637428/8.0),
11488 REAL_CONST(47805.104602921601/8.0),
11489 REAL_CONST(47824.821096938824/8.0),
11490 REAL_CONST(47844.539623270044/8.0),
11491 REAL_CONST(47864.260181496429/8.0),
11492 REAL_CONST(47883.982771199349/8.0),
11493 REAL_CONST(47903.707391960394/8.0),
11494 REAL_CONST(47923.434043361369/8.0),
11495 REAL_CONST(47943.162724984308/8.0),
11496 REAL_CONST(47962.893436411439/8.0),
11497 REAL_CONST(47982.626177225218/8.0),
11498 REAL_CONST(48002.36094700831/8.0),
11499 REAL_CONST(48022.097745343599/8.0),
11500 REAL_CONST(48041.836571814172/8.0),
11501 REAL_CONST(48061.57742600335/8.0),
11502 REAL_CONST(48081.32030749465/8.0),
11503 REAL_CONST(48101.065215871815/8.0),
11504 REAL_CONST(48120.81215071879/8.0),
11505 REAL_CONST(48140.56111161974/8.0),
11506 REAL_CONST(48160.312098159047/8.0),
11507 REAL_CONST(48180.065109921306/8.0),
11508 REAL_CONST(48199.820146491307/8.0),
11509 REAL_CONST(48219.577207454073/8.0),
11510 REAL_CONST(48239.336292394844/8.0),
11511 REAL_CONST(48259.097400899045/8.0),
11512 REAL_CONST(48278.860532552339/8.0),
11513 REAL_CONST(48298.625686940592/8.0),
11514 REAL_CONST(48318.392863649875/8.0),
11515 REAL_CONST(48338.162062266485/8.0),
11516 REAL_CONST(48357.933282376915/8.0),
11517 REAL_CONST(48377.706523567889/8.0),
11518 REAL_CONST(48397.481785426316/8.0),
11519 REAL_CONST(48417.259067539344/8.0),
11520 REAL_CONST(48437.038369494308/8.0),
11521 REAL_CONST(48456.819690878765/8.0),
11522 REAL_CONST(48476.603031280487/8.0),
11523 REAL_CONST(48496.388390287451/8.0),
11524 REAL_CONST(48516.175767487839/8.0),
11525 REAL_CONST(48535.965162470042/8.0),
11526 REAL_CONST(48555.756574822684/8.0),
11527 REAL_CONST(48575.550004134566/8.0),
11528 REAL_CONST(48595.345449994718/8.0),
11529 REAL_CONST(48615.142911992378/8.0),
11530 REAL_CONST(48634.942389716991/8.0),
11531 REAL_CONST(48654.743882758201/8.0),
11532 REAL_CONST(48674.547390705877/8.0),
11533 REAL_CONST(48694.352913150084/8.0),
11534 REAL_CONST(48714.160449681112/8.0),
11535 REAL_CONST(48733.969999889443/8.0),
11536 REAL_CONST(48753.781563365759/8.0),
11537 REAL_CONST(48773.595139700978/8.0),
11538 REAL_CONST(48793.410728486211/8.0),
11539 REAL_CONST(48813.228329312769/8.0),
11540 REAL_CONST(48833.047941772187/8.0),
11541 REAL_CONST(48852.869565456189/8.0),
11542 REAL_CONST(48872.693199956717/8.0),
11543 REAL_CONST(48892.518844865925/8.0),
11544 REAL_CONST(48912.346499776155/8.0),
11545 REAL_CONST(48932.176164279976/8.0),
11546 REAL_CONST(48952.007837970152/8.0),
11547 REAL_CONST(48971.841520439666/8.0),
11548 REAL_CONST(48991.677211281676/8.0),
11549 REAL_CONST(49011.514910089587/8.0),
11550 REAL_CONST(49031.354616456978/8.0),
11551 REAL_CONST(49051.196329977654/8.0),
11552 REAL_CONST(49071.04005024561/8.0),
11553 REAL_CONST(49090.885776855059/8.0),
11554 REAL_CONST(49110.733509400408/8.0),
11555 REAL_CONST(49130.583247476279/8.0),
11556 REAL_CONST(49150.434990677488/8.0),
11557 REAL_CONST(49170.288738599062/8.0),
11558 REAL_CONST(49190.144490836232/8.0),
11559 REAL_CONST(49210.002246984441/8.0),
11560 REAL_CONST(49229.86200663932/8.0),
11561 REAL_CONST(49249.723769396718/8.0),
11562 REAL_CONST(49269.587534852675/8.0),
11563 REAL_CONST(49289.453302603448/8.0),
11564 REAL_CONST(49309.32107224549/8.0),
11565 REAL_CONST(49329.190843375451/8.0),
11566 REAL_CONST(49349.062615590192/8.0),
11567 REAL_CONST(49368.936388486785/8.0),
11568 REAL_CONST(49388.812161662492/8.0),
11569 REAL_CONST(49408.689934714785/8.0),
11570 REAL_CONST(49428.569707241324/8.0),
11571 REAL_CONST(49448.45147883999/8.0),
11572 REAL_CONST(49468.335249108866/8.0),
11573 REAL_CONST(49488.22101764621/8.0),
11574 REAL_CONST(49508.108784050521/8.0),
11575 REAL_CONST(49527.99854792047/8.0),
11576 REAL_CONST(49547.890308854934/8.0),
11577 REAL_CONST(49567.784066453009/8.0),
11578 REAL_CONST(49587.679820313977/8.0),
11579 REAL_CONST(49607.57757003732/8.0),
11580 REAL_CONST(49627.477315222721/8.0),
11581 REAL_CONST(49647.379055470075/8.0),
11582 REAL_CONST(49667.28279037946/8.0),
11583 REAL_CONST(49687.188519551179/8.0),
11584 REAL_CONST(49707.096242585707/8.0),
11585 REAL_CONST(49727.005959083741/8.0),
11586 REAL_CONST(49746.917668646165/8.0),
11587 REAL_CONST(49766.831370874068/8.0),
11588 REAL_CONST(49786.747065368734/8.0),
11589 REAL_CONST(49806.66475173166/8.0),
11590 REAL_CONST(49826.584429564515/8.0),
11591 REAL_CONST(49846.506098469203/8.0),
11592 REAL_CONST(49866.429758047794/8.0),
11593 REAL_CONST(49886.355407902578/8.0),
11594 REAL_CONST(49906.283047636032/8.0),
11595 REAL_CONST(49926.212676850846/8.0),
11596 REAL_CONST(49946.144295149883/8.0),
11597 REAL_CONST(49966.077902136225/8.0),
11598 REAL_CONST(49986.013497413151/8.0),
11599 REAL_CONST(50005.951080584135/8.0),
11600 REAL_CONST(50025.890651252834/8.0),
11601 REAL_CONST(50045.832209023123/8.0),
11602 REAL_CONST(50065.775753499074/8.0),
11603 REAL_CONST(50085.721284284933/8.0),
11604 REAL_CONST(50105.668800985164/8.0),
11605 REAL_CONST(50125.618303204428/8.0),
11606 REAL_CONST(50145.569790547575/8.0),
11607 REAL_CONST(50165.523262619652/8.0),
11608 REAL_CONST(50185.478719025901/8.0),
11609 REAL_CONST(50205.436159371769/8.0),
11610 REAL_CONST(50225.395583262893/8.0),
11611 REAL_CONST(50245.356990305103/8.0),
11612 REAL_CONST(50265.320380104429/8.0),
11613 REAL_CONST(50285.285752267104/8.0),
11614 REAL_CONST(50305.253106399534/8.0),
11615 REAL_CONST(50325.222442108337/8.0),
11616 REAL_CONST(50345.193759000336/8.0),
11617 REAL_CONST(50365.16705668252/8.0),
11618 REAL_CONST(50385.142334762102/8.0),
11619 REAL_CONST(50405.119592846473/8.0),
11620 REAL_CONST(50425.098830543218/8.0),
11621 REAL_CONST(50445.080047460127/8.0),
11622 REAL_CONST(50465.063243205179/8.0),
11623 REAL_CONST(50485.048417386541/8.0),
11624 REAL_CONST(50505.035569612577/8.0),
11625 REAL_CONST(50525.024699491856/8.0),
11626 REAL_CONST(50545.015806633128/8.0),
11627 REAL_CONST(50565.008890645338/8.0),
11628 REAL_CONST(50585.003951137631/8.0),
11629 REAL_CONST(50605.00098771933/8.0),
11630 REAL_CONST(50624.999999999971/8.0),
11631 REAL_CONST(50645.000987589265/8.0),
11632 REAL_CONST(50665.003950097132/8.0),
11633 REAL_CONST(50685.008887133677/8.0),
11634 REAL_CONST(50705.015798309192/8.0),
11635 REAL_CONST(50725.024683234165/8.0),
11636 REAL_CONST(50745.035541519283/8.0),
11637 REAL_CONST(50765.048372775411/8.0),
11638 REAL_CONST(50785.063176613621/8.0),
11639 REAL_CONST(50805.079952645159/8.0),
11640 REAL_CONST(50825.098700481489/8.0),
11641 REAL_CONST(50845.119419734241/8.0),
11642 REAL_CONST(50865.142110015244/8.0),
11643 REAL_CONST(50885.166770936521/8.0),
11644 REAL_CONST(50905.193402110279/8.0),
11645 REAL_CONST(50925.222003148934/8.0),
11646 REAL_CONST(50945.252573665071/8.0),
11647 REAL_CONST(50965.285113271471/8.0),
11648 REAL_CONST(50985.319621581119/8.0),
11649 REAL_CONST(51005.356098207172/8.0),
11650 REAL_CONST(51025.394542762981/8.0),
11651 REAL_CONST(51045.434954862096/8.0),
11652 REAL_CONST(51065.477334118244/8.0),
11653 REAL_CONST(51085.521680145357/8.0),
11654 REAL_CONST(51105.567992557546/8.0),
11655 REAL_CONST(51125.616270969113/8.0),
11656 REAL_CONST(51145.66651499454/8.0),
11657 REAL_CONST(51165.718724248516/8.0),
11658 REAL_CONST(51185.772898345916/8.0),
11659 REAL_CONST(51205.829036901778/8.0),
11660 REAL_CONST(51225.887139531362/8.0),
11661 REAL_CONST(51245.947205850105/8.0),
11662 REAL_CONST(51266.009235473619/8.0),
11663 REAL_CONST(51286.073228017718/8.0),
11664 REAL_CONST(51306.139183098399/8.0),
11665 REAL_CONST(51326.207100331856/8.0),
11666 REAL_CONST(51346.276979334456/8.0),
11667 REAL_CONST(51366.348819722756/8.0),
11668 REAL_CONST(51386.42262111351/8.0),
11669 REAL_CONST(51406.498383123653/8.0),
11670 REAL_CONST(51426.57610537031/8.0),
11671 REAL_CONST(51446.655787470787/8.0),
11672 REAL_CONST(51466.737429042587/8.0),
11673 REAL_CONST(51486.82102970338/8.0),
11674 REAL_CONST(51506.906589071048/8.0),
11675 REAL_CONST(51526.994106763632/8.0),
11676 REAL_CONST(51547.083582399391/8.0),
11677 REAL_CONST(51567.175015596738/8.0),
11678 REAL_CONST(51587.268405974297/8.0),
11679 REAL_CONST(51607.363753150858/8.0),
11680 REAL_CONST(51627.461056745415/8.0),
11681 REAL_CONST(51647.56031637713/8.0),
11682 REAL_CONST(51667.661531665362/8.0),
11683 REAL_CONST(51687.764702229651/8.0),
11684 REAL_CONST(51707.869827689727/8.0),
11685 REAL_CONST(51727.976907665499/8.0),
11686 REAL_CONST(51748.085941777055/8.0),
11687 REAL_CONST(51768.196929644677/8.0),
11688 REAL_CONST(51788.309870888836/8.0),
11689 REAL_CONST(51808.42476513017/8.0),
11690 REAL_CONST(51828.541611989524/8.0),
11691 REAL_CONST(51848.660411087905/8.0),
11692 REAL_CONST(51868.781162046515/8.0),
11693 REAL_CONST(51888.90386448674/8.0),
11694 REAL_CONST(51909.028518030143/8.0),
11695 REAL_CONST(51929.155122298485/8.0),
11696 REAL_CONST(51949.283676913685/8.0),
11697 REAL_CONST(51969.414181497872/8.0),
11698 REAL_CONST(51989.546635673345/8.0),
11699 REAL_CONST(52009.681039062583/8.0),
11700 REAL_CONST(52029.817391288263/8.0),
11701 REAL_CONST(52049.955691973213/8.0),
11702 REAL_CONST(52070.095940740481/8.0),
11703 REAL_CONST(52090.238137213273/8.0),
11704 REAL_CONST(52110.382281014987/8.0),
11705 REAL_CONST(52130.5283717692/8.0),
11706 REAL_CONST(52150.676409099666/8.0),
11707 REAL_CONST(52170.826392630333/8.0),
11708 REAL_CONST(52190.97832198532/8.0),
11709 REAL_CONST(52211.132196788931/8.0),
11710 REAL_CONST(52231.288016665654/8.0),
11711 REAL_CONST(52251.445781240145/8.0),
11712 REAL_CONST(52271.60549013727/8.0),
11713 REAL_CONST(52291.76714298204/8.0),
11714 REAL_CONST(52311.930739399664/8.0),
11715 REAL_CONST(52332.096279015546/8.0),
11716 REAL_CONST(52352.263761455244/8.0),
11717 REAL_CONST(52372.433186344519/8.0),
11718 REAL_CONST(52392.604553309284/8.0),
11719 REAL_CONST(52412.777861975665/8.0),
11720 REAL_CONST(52432.953111969946/8.0),
11721 REAL_CONST(52453.130302918595/8.0),
11722 REAL_CONST(52473.309434448267/8.0),
11723 REAL_CONST(52493.490506185793/8.0),
11724 REAL_CONST(52513.67351775818/8.0),
11725 REAL_CONST(52533.858468792605/8.0),
11726 REAL_CONST(52554.045358916446/8.0),
11727 REAL_CONST(52574.234187757254/8.0),
11728 REAL_CONST(52594.42495494274/8.0),
11729 REAL_CONST(52614.617660100812/8.0),
11730 REAL_CONST(52634.812302859558/8.0),
11731 REAL_CONST(52655.008882847229/8.0),
11732 REAL_CONST(52675.20739969227/8.0),
11733 REAL_CONST(52695.407853023295/8.0),
11734 REAL_CONST(52715.610242469098/8.0),
11735 REAL_CONST(52735.814567658657/8.0),
11736 REAL_CONST(52756.02082822111/8.0),
11737 REAL_CONST(52776.229023785803/8.0),
11738 REAL_CONST(52796.439153982225/8.0),
11739 REAL_CONST(52816.651218440056/8.0),
11740 REAL_CONST(52836.865216789171/8.0),
11741 REAL_CONST(52857.081148659599/8.0),
11742 REAL_CONST(52877.29901368155/8.0),
11743 REAL_CONST(52897.518811485425/8.0),
11744 REAL_CONST(52917.740541701773/8.0),
11745 REAL_CONST(52937.964203961354/8.0),
11746 REAL_CONST(52958.18979789508/8.0),
11747 REAL_CONST(52978.417323134046/8.0),
11748 REAL_CONST(52998.646779309529/8.0),
11749 REAL_CONST(53018.878166052978/8.0),
11750 REAL_CONST(53039.111482996006/8.0),
11751 REAL_CONST(53059.346729770419/8.0),
11752 REAL_CONST(53079.583906008193/8.0),
11753 REAL_CONST(53099.823011341483/8.0),
11754 REAL_CONST(53120.0640454026/8.0),
11755 REAL_CONST(53140.307007824063/8.0),
11756 REAL_CONST(53160.551898238533/8.0),
11757 REAL_CONST(53180.79871627887/8.0),
11758 REAL_CONST(53201.047461578091/8.0),
11759 REAL_CONST(53221.2981337694/8.0),
11760 REAL_CONST(53241.550732486176/8.0),
11761 REAL_CONST(53261.805257361964/8.0),
11762 REAL_CONST(53282.061708030487/8.0),
11763 REAL_CONST(53302.32008412564/8.0),
11764 REAL_CONST(53322.580385281493/8.0),
11765 REAL_CONST(53342.842611132299/8.0),
11766 REAL_CONST(53363.106761312469/8.0),
11767 REAL_CONST(53383.372835456597/8.0),
11768 REAL_CONST(53403.640833199453/8.0),
11769 REAL_CONST(53423.910754175973/8.0),
11770 REAL_CONST(53444.18259802126/8.0),
11771 REAL_CONST(53464.456364370613/8.0),
11772 REAL_CONST(53484.732052859479/8.0),
11773 REAL_CONST(53505.009663123499/8.0),
11774 REAL_CONST(53525.289194798468/8.0),
11775 REAL_CONST(53545.570647520362/8.0),
11776 REAL_CONST(53565.854020925333/8.0),
11777 REAL_CONST(53586.139314649699/8.0),
11778 REAL_CONST(53606.426528329954/8.0),
11779 REAL_CONST(53626.715661602764/8.0),
11780 REAL_CONST(53647.006714104959/8.0),
11781 REAL_CONST(53667.299685473547/8.0),
11782 REAL_CONST(53687.59457534572/8.0),
11783 REAL_CONST(53707.891383358816/8.0),
11784 REAL_CONST(53728.190109150361/8.0),
11785 REAL_CONST(53748.490752358055/8.0),
11786 REAL_CONST(53768.793312619753/8.0),
11787 REAL_CONST(53789.09778957349/8.0),
11788 REAL_CONST(53809.404182857485/8.0),
11789 REAL_CONST(53829.712492110106/8.0),
11790 REAL_CONST(53850.022716969899/8.0),
11791 REAL_CONST(53870.334857075584/8.0),
11792 REAL_CONST(53890.648912066055/8.0),
11793 REAL_CONST(53910.964881580367/8.0),
11794 REAL_CONST(53931.28276525774/8.0),
11795 REAL_CONST(53951.602562737586/8.0),
11796 REAL_CONST(53971.924273659461/8.0),
11797 REAL_CONST(53992.24789766311/8.0),
11798 REAL_CONST(54012.57343438844/8.0),
11799 REAL_CONST(54032.90088347553/8.0),
11800 REAL_CONST(54053.23024456462/8.0),
11801 REAL_CONST(54073.561517296133/8.0),
11802 REAL_CONST(54093.894701310644/8.0),
11803 REAL_CONST(54114.22979624891/8.0),
11804 REAL_CONST(54134.566801751855/8.0),
11805 REAL_CONST(54154.90571746057/8.0),
11806 REAL_CONST(54175.246543016314/8.0),
11807 REAL_CONST(54195.589278060506/8.0),
11808 REAL_CONST(54215.933922234755/8.0),
11809 REAL_CONST(54236.280475180814/8.0),
11810 REAL_CONST(54256.628936540626/8.0),
11811 REAL_CONST(54276.97930595628/8.0),
11812 REAL_CONST(54297.331583070045/8.0),
11813 REAL_CONST(54317.685767524359/8.0),
11814 REAL_CONST(54338.041858961828/8.0),
11815 REAL_CONST(54358.399857025215/8.0),
11816 REAL_CONST(54378.759761357462/8.0),
11817 REAL_CONST(54399.121571601667/8.0),
11818 REAL_CONST(54419.485287401105/8.0),
11819 REAL_CONST(54439.850908399218/8.0),
11820 REAL_CONST(54460.218434239614/8.0),
11821 REAL_CONST(54480.587864566056/8.0),
11822 REAL_CONST(54500.95919902248/8.0),
11823 REAL_CONST(54521.332437252997/8.0),
11824 REAL_CONST(54541.707578901878/8.0),
11825 REAL_CONST(54562.084623613555/8.0),
11826 REAL_CONST(54582.46357103264/8.0),
11827 REAL_CONST(54602.844420803893/8.0),
11828 REAL_CONST(54623.227172572246/8.0),
11829 REAL_CONST(54643.611825982807/8.0),
11830 REAL_CONST(54663.998380680838/8.0),
11831 REAL_CONST(54684.386836311773/8.0),
11832 REAL_CONST(54704.777192521207/8.0),
11833 REAL_CONST(54725.169448954897/8.0),
11834 REAL_CONST(54745.563605258772/8.0),
11835 REAL_CONST(54765.959661078923/8.0),
11836 REAL_CONST(54786.357616061614/8.0),
11837 REAL_CONST(54806.757469853255/8.0),
11838 REAL_CONST(54827.159222100439/8.0),
11839 REAL_CONST(54847.562872449904/8.0),
11840 REAL_CONST(54867.968420548583/8.0),
11841 REAL_CONST(54888.375866043534/8.0),
11842 REAL_CONST(54908.785208582012/8.0),
11843 REAL_CONST(54929.196447811417/8.0),
11844 REAL_CONST(54949.609583379322/8.0),
11845 REAL_CONST(54970.024614933463/8.0),
11846 REAL_CONST(54990.441542121727/8.0),
11847 REAL_CONST(55010.86036459219/8.0),
11848 REAL_CONST(55031.28108199306/8.0),
11849 REAL_CONST(55051.703693972733/8.0),
11850 REAL_CONST(55072.128200179759/8.0),
11851 REAL_CONST(55092.554600262847/8.0),
11852 REAL_CONST(55112.982893870874/8.0),
11853 REAL_CONST(55133.413080652877/8.0),
11854 REAL_CONST(55153.845160258061/8.0),
11855 REAL_CONST(55174.279132335789/8.0),
11856 REAL_CONST(55194.714996535586/8.0),
11857 REAL_CONST(55215.152752507143/8.0),
11858 REAL_CONST(55235.592399900306/8.0),
11859 REAL_CONST(55256.033938365079/8.0),
11860 REAL_CONST(55276.477367551655/8.0),
11861 REAL_CONST(55296.92268711036/8.0),
11862 REAL_CONST(55317.369896691685/8.0),
11863 REAL_CONST(55337.818995946305/8.0),
11864 REAL_CONST(55358.269984525024/8.0),
11865 REAL_CONST(55378.72286207883/8.0),
11866 REAL_CONST(55399.177628258869/8.0),
11867 REAL_CONST(55419.634282716441/8.0),
11868 REAL_CONST(55440.092825103013/8.0),
11869 REAL_CONST(55460.553255070205/8.0),
11870 REAL_CONST(55481.015572269804/8.0),
11871 REAL_CONST(55501.479776353764/8.0),
11872 REAL_CONST(55521.945866974187/8.0),
11873 REAL_CONST(55542.413843783339/8.0),
11874 REAL_CONST(55562.883706433655/8.0),
11875 REAL_CONST(55583.355454577715/8.0),
11876 REAL_CONST(55603.82908786826/8.0),
11877 REAL_CONST(55624.304605958219/8.0),
11878 REAL_CONST(55644.782008500639/8.0),
11879 REAL_CONST(55665.261295148754/8.0),
11880 REAL_CONST(55685.742465555952/8.0),
11881 REAL_CONST(55706.225519375774/8.0),
11882 REAL_CONST(55726.710456261928/8.0),
11883 REAL_CONST(55747.197275868275/8.0),
11884 REAL_CONST(55767.685977848843/8.0),
11885 REAL_CONST(55788.176561857814/8.0),
11886 REAL_CONST(55808.669027549528/8.0),
11887 REAL_CONST(55829.163374578478/8.0),
11888 REAL_CONST(55849.659602599328/8.0),
11889 REAL_CONST(55870.157711266889/8.0),
11890 REAL_CONST(55890.657700236145/8.0),
11891 REAL_CONST(55911.159569162221/8.0),
11892 REAL_CONST(55931.663317700411/8.0),
11893 REAL_CONST(55952.168945506164/8.0),
11894 REAL_CONST(55972.676452235086/8.0),
11895 REAL_CONST(55993.185837542944/8.0),
11896 REAL_CONST(56013.697101085651/8.0),
11897 REAL_CONST(56034.210242519301/8.0),
11898 REAL_CONST(56054.72526150012/8.0),
11899 REAL_CONST(56075.242157684508/8.0),
11900 REAL_CONST(56095.760930729011/8.0),
11901 REAL_CONST(56116.281580290342/8.0),
11902 REAL_CONST(56136.804106025367/8.0),
11903 REAL_CONST(56157.328507591104/8.0),
11904 REAL_CONST(56177.85478464474/8.0),
11905 REAL_CONST(56198.382936843598/8.0),
11906 REAL_CONST(56218.912963845185/8.0),
11907 REAL_CONST(56239.444865307138/8.0),
11908 REAL_CONST(56259.978640887268/8.0),
11909 REAL_CONST(56280.514290243525/8.0),
11910 REAL_CONST(56301.051813034042/8.0),
11911 REAL_CONST(56321.591208917082/8.0),
11912 REAL_CONST(56342.13247755108/8.0),
11913 REAL_CONST(56362.675618594607/8.0),
11914 REAL_CONST(56383.220631706419/8.0),
11915 REAL_CONST(56403.767516545398/8.0),
11916 REAL_CONST(56424.316272770608/8.0),
11917 REAL_CONST(56444.866900041241/8.0),
11918 REAL_CONST(56465.419398016667/8.0),
11919 REAL_CONST(56485.973766356394/8.0),
11920 REAL_CONST(56506.530004720102/8.0),
11921 REAL_CONST(56527.088112767611/8.0),
11922 REAL_CONST(56547.648090158902/8.0),
11923 REAL_CONST(56568.209936554107/8.0),
11924 REAL_CONST(56588.773651613519/8.0),
11925 REAL_CONST(56609.339234997584/8.0),
11926 REAL_CONST(56629.9066863669/8.0),
11927 REAL_CONST(56650.47600538221/8.0),
11928 REAL_CONST(56671.04719170442/8.0),
11929 REAL_CONST(56691.620244994599/8.0),
11930 REAL_CONST(56712.195164913959/8.0),
11931 REAL_CONST(56732.771951123868/8.0),
11932 REAL_CONST(56753.350603285835/8.0),
11933 REAL_CONST(56773.931121061541/8.0),
11934 REAL_CONST(56794.513504112823/8.0),
11935 REAL_CONST(56815.097752101647/8.0),
11936 REAL_CONST(56835.683864690152/8.0),
11937 REAL_CONST(56856.271841540627/8.0),
11938 REAL_CONST(56876.86168231551/8.0),
11939 REAL_CONST(56897.453386677393/8.0),
11940 REAL_CONST(56918.046954289028/8.0),
11941 REAL_CONST(56938.642384813298/8.0),
11942 REAL_CONST(56959.239677913261/8.0),
11943 REAL_CONST(56979.838833252121/8.0),
11944 REAL_CONST(57000.439850493225/8.0),
11945 REAL_CONST(57021.04272930009/8.0),
11946 REAL_CONST(57041.647469336371/8.0),
11947 REAL_CONST(57062.254070265873/8.0),
11948 REAL_CONST(57082.862531752558/8.0),
11949 REAL_CONST(57103.472853460553/8.0),
11950 REAL_CONST(57124.085035054108/8.0),
11951 REAL_CONST(57144.699076197649/8.0),
11952 REAL_CONST(57165.314976555739/8.0),
11953 REAL_CONST(57185.932735793103/8.0),
11954 REAL_CONST(57206.552353574611/8.0),
11955 REAL_CONST(57227.173829565276/8.0),
11956 REAL_CONST(57247.797163430281/8.0),
11957 REAL_CONST(57268.42235483494/8.0),
11958 REAL_CONST(57289.049403444733/8.0),
11959 REAL_CONST(57309.678308925286/8.0),
11960 REAL_CONST(57330.30907094237/8.0),
11961 REAL_CONST(57350.941689161911/8.0),
11962 REAL_CONST(57371.576163249985/8.0),
11963 REAL_CONST(57392.212492872815/8.0),
11964 REAL_CONST(57412.850677696784/8.0),
11965 REAL_CONST(57433.490717388406/8.0),
11966 REAL_CONST(57454.132611614368/8.0),
11967 REAL_CONST(57474.776360041491/8.0),
11968 REAL_CONST(57495.421962336746/8.0),
11969 REAL_CONST(57516.069418167266/8.0),
11970 REAL_CONST(57536.718727200314/8.0),
11971 REAL_CONST(57557.36988910332/8.0),
11972 REAL_CONST(57578.022903543861/8.0),
11973 REAL_CONST(57598.677770189643/8.0),
11974 REAL_CONST(57619.334488708548/8.0),
11975 REAL_CONST(57639.993058768589/8.0),
11976 REAL_CONST(57660.653480037938/8.0),
11977 REAL_CONST(57681.315752184906/8.0),
11978 REAL_CONST(57701.979874877965/8.0),
11979 REAL_CONST(57722.64584778573/8.0),
11980 REAL_CONST(57743.31367057695/8.0),
11981 REAL_CONST(57763.983342920546/8.0),
11982 REAL_CONST(57784.654864485572/8.0),
11983 REAL_CONST(57805.328234941233/8.0),
11984 REAL_CONST(57826.003453956881/8.0),
11985 REAL_CONST(57846.680521202026/8.0),
11986 REAL_CONST(57867.359436346305/8.0),
11987 REAL_CONST(57888.040199059527/8.0),
11988 REAL_CONST(57908.722809011633/8.0),
11989 REAL_CONST(57929.407265872709/8.0),
11990 REAL_CONST(57950.093569313001/8.0),
11991 REAL_CONST(57970.781719002895/8.0),
11992 REAL_CONST(57991.471714612911/8.0),
11993 REAL_CONST(58012.16355581375/8.0),
11994 REAL_CONST(58032.857242276223/8.0),
11995 REAL_CONST(58053.552773671312/8.0),
11996 REAL_CONST(58074.25014967013/8.0),
11997 REAL_CONST(58094.949369943948/8.0),
11998 REAL_CONST(58115.650434164185/8.0),
11999 REAL_CONST(58136.353342002389/8.0),
12000 REAL_CONST(58157.058093130276/8.0),
12001 REAL_CONST(58177.764687219693/8.0),
12002 REAL_CONST(58198.47312394264/8.0),
12003 REAL_CONST(58219.183402971255/8.0),
12004 REAL_CONST(58239.895523977837/8.0),
12005 REAL_CONST(58260.609486634821/8.0),
12006 REAL_CONST(58281.325290614775/8.0),
12007 REAL_CONST(58302.042935590434/8.0),
12008 REAL_CONST(58322.762421234678/8.0),
12009 REAL_CONST(58343.483747220511/8.0),
12010 REAL_CONST(58364.206913221096/8.0),
12011 REAL_CONST(58384.931918909751/8.0),
12012 REAL_CONST(58405.658763959924/8.0),
12013 REAL_CONST(58426.3874480452/8.0),
12014 REAL_CONST(58447.117970839339/8.0),
12015 REAL_CONST(58467.85033201622/8.0),
12016 REAL_CONST(58488.584531249864/8.0),
12017 REAL_CONST(58509.320568214462/8.0),
12018 REAL_CONST(58530.058442584334/8.0),
12019 REAL_CONST(58550.798154033931/8.0),
12020 REAL_CONST(58571.539702237875/8.0),
12021 REAL_CONST(58592.283086870906/8.0),
12022 REAL_CONST(58613.028307607929/8.0),
12023 REAL_CONST(58633.775364123983/8.0),
12024 REAL_CONST(58654.52425609425/8.0),
12025 REAL_CONST(58675.274983194053/8.0),
12026 REAL_CONST(58696.027545098877/8.0),
12027 REAL_CONST(58716.781941484325/8.0),
12028 REAL_CONST(58737.538172026158/8.0),
12029 REAL_CONST(58758.296236400274/8.0),
12030 REAL_CONST(58779.056134282728/8.0),
12031 REAL_CONST(58799.817865349694/8.0),
12032 REAL_CONST(58820.581429277503/8.0),
12033 REAL_CONST(58841.346825742643/8.0),
12034 REAL_CONST(58862.114054421712/8.0),
12035 REAL_CONST(58882.883114991484/8.0),
12036 REAL_CONST(58903.654007128847/8.0),
12037 REAL_CONST(58924.426730510851/8.0),
12038 REAL_CONST(58945.201284814684/8.0),
12039 REAL_CONST(58965.977669717664/8.0),
12040 REAL_CONST(58986.755884897269/8.0),
12041 REAL_CONST(59007.535930031117/8.0),
12042 REAL_CONST(59028.317804796949/8.0),
12043 REAL_CONST(59049.101508872664/8.0),
12044 REAL_CONST(59069.887041936301/8.0),
12045 REAL_CONST(59090.674403666046/8.0),
12046 REAL_CONST(59111.463593740213/8.0),
12047 REAL_CONST(59132.254611837263/8.0),
12048 REAL_CONST(59153.047457635803/8.0),
12049 REAL_CONST(59173.84213081457/8.0),
12050 REAL_CONST(59194.638631052461/8.0),
12051 REAL_CONST(59215.436958028506/8.0),
12052 REAL_CONST(59236.237111421855/8.0),
12053 REAL_CONST(59257.039090911829/8.0),
12054 REAL_CONST(59277.842896177877/8.0),
12055 REAL_CONST(59298.648526899589/8.0),
12056 REAL_CONST(59319.455982756685/8.0),
12057 REAL_CONST(59340.26526342905/8.0),
12058 REAL_CONST(59361.076368596696/8.0),
12059 REAL_CONST(59381.889297939757/8.0),
12060 REAL_CONST(59402.704051138542/8.0),
12061 REAL_CONST(59423.520627873484/8.0),
12062 REAL_CONST(59444.339027825139/8.0),
12063 REAL_CONST(59465.159250674224/8.0),
12064 REAL_CONST(59485.9812961016/8.0),
12065 REAL_CONST(59506.805163788253/8.0),
12066 REAL_CONST(59527.630853415307/8.0),
12067 REAL_CONST(59548.458364664046/8.0),
12068 REAL_CONST(59569.287697215863/8.0),
12069 REAL_CONST(59590.118850752311/8.0),
12070 REAL_CONST(59610.951824955089/8.0),
12071 REAL_CONST(59631.786619506012/8.0),
12072 REAL_CONST(59652.623234087048/8.0),
12073 REAL_CONST(59673.461668380311/8.0),
12074 REAL_CONST(59694.301922068029/8.0),
12075 REAL_CONST(59715.143994832593/8.0),
12076 REAL_CONST(59735.987886356525/8.0),
12077 REAL_CONST(59756.833596322482/8.0),
12078 REAL_CONST(59777.681124413255/8.0),
12079 REAL_CONST(59798.530470311794/8.0),
12080 REAL_CONST(59819.381633701159/8.0),
12081 REAL_CONST(59840.234614264569/8.0),
12082 REAL_CONST(59861.089411685381/8.0),
12083 REAL_CONST(59881.94602564707/8.0),
12084 REAL_CONST(59902.804455833269/8.0),
12085 REAL_CONST(59923.664701927737/8.0),
12086 REAL_CONST(59944.526763614384/8.0),
12087 REAL_CONST(59965.390640577243/8.0),
12088 REAL_CONST(59986.256332500488/8.0),
12089 REAL_CONST(60007.123839068438/8.0),
12090 REAL_CONST(60027.993159965539/8.0),
12091 REAL_CONST(60048.864294876381/8.0),
12092 REAL_CONST(60069.737243485688/8.0),
12093 REAL_CONST(60090.612005478324/8.0),
12094 REAL_CONST(60111.488580539284/8.0),
12095 REAL_CONST(60132.366968353708/8.0),
12096 REAL_CONST(60153.247168606867/8.0),
12097 REAL_CONST(60174.129180984164/8.0),
12098 REAL_CONST(60195.013005171153/8.0),
12099 REAL_CONST(60215.898640853513/8.0),
12100 REAL_CONST(60236.786087717061/8.0),
12101 REAL_CONST(60257.675345447751/8.0),
12102 REAL_CONST(60278.566413731671/8.0),
12103 REAL_CONST(60299.459292255044/8.0),
12104 REAL_CONST(60320.353980704247/8.0),
12105 REAL_CONST(60341.25047876576/8.0),
12106 REAL_CONST(60362.148786126229/8.0),
12107 REAL_CONST(60383.048902472423/8.0),
12108 REAL_CONST(60403.950827491237/8.0),
12109 REAL_CONST(60424.854560869717/8.0),
12110 REAL_CONST(60445.76010229504/8.0),
12111 REAL_CONST(60466.667451454516/8.0),
12112 REAL_CONST(60487.57660803559/8.0),
12113 REAL_CONST(60508.487571725847/8.0),
12114 REAL_CONST(60529.400342212997/8.0),
12115 REAL_CONST(60550.314919184893/8.0),
12116 REAL_CONST(60571.231302329521/8.0),
12117 REAL_CONST(60592.149491335003/8.0),
12118 REAL_CONST(60613.069485889588/8.0),
12119 REAL_CONST(60633.991285681674/8.0),
12120 REAL_CONST(60654.914890399785/8.0),
12121 REAL_CONST(60675.840299732568/8.0),
12122 REAL_CONST(60696.767513368832/8.0),
12123 REAL_CONST(60717.696530997484/8.0),
12124 REAL_CONST(60738.627352307602/8.0),
12125 REAL_CONST(60759.55997698837/8.0),
12126 REAL_CONST(60780.494404729128/8.0),
12127 REAL_CONST(60801.430635219323/8.0),
12128 REAL_CONST(60822.368668148556/8.0),
12129 REAL_CONST(60843.308503206565/8.0),
12130 REAL_CONST(60864.250140083204/8.0),
12131 REAL_CONST(60885.193578468468/8.0),
12132 REAL_CONST(60906.138818052495/8.0),
12133 REAL_CONST(60927.085858525541/8.0),
12134 REAL_CONST(60948.034699578006/8.0),
12135 REAL_CONST(60968.985340900421/8.0),
12136 REAL_CONST(60989.937782183442/8.0),
12137 REAL_CONST(61010.892023117864/8.0),
12138 REAL_CONST(61031.848063394616/8.0),
12139 REAL_CONST(61052.805902704764/8.0),
12140 REAL_CONST(61073.765540739492/8.0),
12141 REAL_CONST(61094.726977190134/8.0),
12142 REAL_CONST(61115.690211748137/8.0),
12143 REAL_CONST(61136.655244105103/8.0),
12144 REAL_CONST(61157.622073952742/8.0),
12145 REAL_CONST(61178.590700982917/8.0),
12146 REAL_CONST(61199.561124887616/8.0),
12147 REAL_CONST(61220.533345358948/8.0),
12148 REAL_CONST(61241.507362089171/8.0),
12149 REAL_CONST(61262.483174770663/8.0),
12150 REAL_CONST(61283.460783095943/8.0),
12151 REAL_CONST(61304.440186757645/8.0),
12152 REAL_CONST(61325.421385448557/8.0),
12153 REAL_CONST(61346.404378861582/8.0),
12154 REAL_CONST(61367.389166689762/8.0),
12155 REAL_CONST(61388.375748626262/8.0),
12156 REAL_CONST(61409.364124364387/8.0),
12157 REAL_CONST(61430.354293597571/8.0),
12158 REAL_CONST(61451.346256019373/8.0),
12159 REAL_CONST(61472.340011323497/8.0),
12160 REAL_CONST(61493.335559203762/8.0),
12161 REAL_CONST(61514.332899354122/8.0),
12162 REAL_CONST(61535.332031468672/8.0),
12163 REAL_CONST(61556.332955241618/8.0),
12164 REAL_CONST(61577.335670367313/8.0),
12165 REAL_CONST(61598.340176540238/8.0),
12166 REAL_CONST(61619.346473454993/8.0),
12167 REAL_CONST(61640.354560806329/8.0),
12168 REAL_CONST(61661.3644382891/8.0),
12169 REAL_CONST(61682.376105598312/8.0),
12170 REAL_CONST(61703.389562429089/8.0),
12171 REAL_CONST(61724.404808476691/8.0),
12172 REAL_CONST(61745.42184343651/8.0),
12173 REAL_CONST(61766.440667004063/8.0),
12174 REAL_CONST(61787.461278874987/8.0),
12175 REAL_CONST(61808.483678745069/8.0),
12176 REAL_CONST(61829.507866310203/8.0),
12177 REAL_CONST(61850.533841266435/8.0),
12178 REAL_CONST(61871.561603309929/8.0),
12179 REAL_CONST(61892.591152136971/8.0),
12180 REAL_CONST(61913.622487443987/8.0),
12181 REAL_CONST(61934.655608927525/8.0),
12182 REAL_CONST(61955.690516284267/8.0),
12183 REAL_CONST(61976.727209211022/8.0),
12184 REAL_CONST(61997.765687404724/8.0),
12185 REAL_CONST(62018.805950562448/8.0),
12186 REAL_CONST(62039.847998381381/8.0),
12187 REAL_CONST(62060.891830558845/8.0),
12188 REAL_CONST(62081.93744679229/8.0),
12189 REAL_CONST(62102.984846779298/8.0),
12190 REAL_CONST(62124.034030217575/8.0),
12191 REAL_CONST(62145.084996804966/8.0),
12192 REAL_CONST(62166.137746239416/8.0),
12193 REAL_CONST(62187.19227821903/8.0),
12194 REAL_CONST(62208.248592442025/8.0),
12195 REAL_CONST(62229.306688606739/8.0),
12196 REAL_CONST(62250.366566411656/8.0),
12197 REAL_CONST(62271.428225555377/8.0),
12198 REAL_CONST(62292.491665736627/8.0),
12199 REAL_CONST(62313.556886654267/8.0),
12200 REAL_CONST(62334.623888007271/8.0),
12201 REAL_CONST(62355.692669494762/8.0),
12202 REAL_CONST(62376.763230815974/8.0),
12203 REAL_CONST(62397.835571670272/8.0),
12204 REAL_CONST(62418.909691757144/8.0),
12205 REAL_CONST(62439.98559077621/8.0),
12206 REAL_CONST(62461.063268427228/8.0),
12207 REAL_CONST(62482.142724410049/8.0),
12208 REAL_CONST(62503.223958424685/8.0),
12209 REAL_CONST(62524.306970171267/8.0),
12210 REAL_CONST(62545.39175935003/8.0),
12211 REAL_CONST(62566.478325661366/8.0),
12212 REAL_CONST(62587.566668805768/8.0),
12213 REAL_CONST(62608.656788483881/8.0),
12214 REAL_CONST(62629.748684396451/8.0),
12215 REAL_CONST(62650.842356244357/8.0),
12216 REAL_CONST(62671.937803728622/8.0),
12217 REAL_CONST(62693.035026550366/8.0),
12218 REAL_CONST(62714.134024410858/8.0),
12219 REAL_CONST(62735.234797011479/8.0),
12220 REAL_CONST(62756.337344053733/8.0),
12221 REAL_CONST(62777.441665239276/8.0),
12222 REAL_CONST(62798.547760269852/8.0),
12223 REAL_CONST(62819.655628847358/8.0),
12224 REAL_CONST(62840.765270673801/8.0),
12225 REAL_CONST(62861.876685451323/8.0),
12226 REAL_CONST(62882.989872882186/8.0),
12227 REAL_CONST(62904.104832668774/8.0),
12228 REAL_CONST(62925.221564513602/8.0),
12229 REAL_CONST(62946.340068119309/8.0),
12230 REAL_CONST(62967.460343188657/8.0),
12231 REAL_CONST(62988.582389424526/8.0),
12232 REAL_CONST(63009.70620652994/8.0),
12233 REAL_CONST(63030.831794208025/8.0),
12234 REAL_CONST(63051.959152162039/8.0),
12235 REAL_CONST(63073.08828009537/8.0),
12236 REAL_CONST(63094.219177711529/8.0),
12237 REAL_CONST(63115.351844714154/8.0),
12238 REAL_CONST(63136.486280806988/8.0),
12239 REAL_CONST(63157.622485693922/8.0),
12240 REAL_CONST(63178.760459078956/8.0),
12241 REAL_CONST(63199.900200666219/8.0),
12242 REAL_CONST(63221.041710159967/8.0),
12243 REAL_CONST(63242.184987264569/8.0),
12244 REAL_CONST(63263.330031684534/8.0),
12245 REAL_CONST(63284.476843124474/8.0),
12246 REAL_CONST(63305.625421289144/8.0),
12247 REAL_CONST(63326.775765883409/8.0),
12248 REAL_CONST(63347.927876612259/8.0),
12249 REAL_CONST(63369.081753180813/8.0),
12250 REAL_CONST(63390.237395294316/8.0),
12251 REAL_CONST(63411.39480265812/8.0),
12252 REAL_CONST(63432.553974977716/8.0),
12253 REAL_CONST(63453.714911958712/8.0),
12254 REAL_CONST(63474.877613306839/8.0),
12255 REAL_CONST(63496.042078727944/8.0),
12256 REAL_CONST(63517.208307927998/8.0),
12257 REAL_CONST(63538.376300613119/8.0),
12258 REAL_CONST(63559.546056489504/8.0),
12259 REAL_CONST(63580.717575263516/8.0),
12260 REAL_CONST(63601.890856641607/8.0),
12261 REAL_CONST(63623.065900330374/8.0),
12262 REAL_CONST(63644.242706036515/8.0),
12263 REAL_CONST(63665.421273466869/8.0),
12264 REAL_CONST(63686.601602328381/8.0),
12265 REAL_CONST(63707.783692328136/8.0),
12266 REAL_CONST(63728.967543173334/8.0),
12267 REAL_CONST(63750.153154571279/8.0),
12268 REAL_CONST(63771.340526229418/8.0),
12269 REAL_CONST(63792.529657855317/8.0),
12270 REAL_CONST(63813.720549156649/8.0),
12271 REAL_CONST(63834.913199841227/8.0),
12272 REAL_CONST(63856.107609616978/8.0),
12273 REAL_CONST(63877.303778191941/8.0),
12274 REAL_CONST(63898.501705274284/8.0),
12275 REAL_CONST(63919.7013905723/8.0),
12276 REAL_CONST(63940.902833794404/8.0),
12277 REAL_CONST(63962.106034649114/8.0),
12278 REAL_CONST(63983.310992845094/8.0),
12279 REAL_CONST(64004.517708091109/8.0),
12280 REAL_CONST(64025.726180096048/8.0),
12281 REAL_CONST(64046.936408568938/8.0),
12282 REAL_CONST(64068.1483932189/8.0),
12283 REAL_CONST(64089.362133755196/8.0),
12284 REAL_CONST(64110.577629887193/8.0),
12285 REAL_CONST(64131.794881324393/8.0),
12286 REAL_CONST(64153.013887776404/8.0),
12287 REAL_CONST(64174.234648952966/8.0),
12288 REAL_CONST(64195.457164563937/8.0),
12289 REAL_CONST(64216.681434319289/8.0),
12290 REAL_CONST(64237.907457929112/8.0),
12291 REAL_CONST(64259.135235103626/8.0),
12292 REAL_CONST(64280.36476555316/8.0),
12293 REAL_CONST(64301.596048988169/8.0),
12294 REAL_CONST(64322.829085119236/8.0),
12295 REAL_CONST(64344.06387365704/8.0),
12296 REAL_CONST(64365.300414312398/8.0),
12297 REAL_CONST(64386.538706796251/8.0),
12298 REAL_CONST(64407.778750819634/8.0),
12299 REAL_CONST(64429.020546093721/8.0),
12300 REAL_CONST(64450.26409232981/8.0),
12301 REAL_CONST(64471.509389239291/8.0),
12302 REAL_CONST(64492.756436533709/8.0),
12303 REAL_CONST(64514.005233924705/8.0),
12304 REAL_CONST(64535.255781124033/8.0),
12305 REAL_CONST(64556.50807784358/8.0),
12306 REAL_CONST(64577.762123795357/8.0),
12307 REAL_CONST(64599.017918691468/8.0),
12308 REAL_CONST(64620.275462244172/8.0),
12309 REAL_CONST(64641.534754165805/8.0),
12310 REAL_CONST(64662.795794168844/8.0),
12311 REAL_CONST(64684.058581965895/8.0),
12312 REAL_CONST(64705.323117269661/8.0),
12313 REAL_CONST(64726.589399792974/8.0),
12314 REAL_CONST(64747.857429248776/8.0),
12315 REAL_CONST(64769.127205350138/8.0),
12316 REAL_CONST(64790.398727810236/8.0),
12317 REAL_CONST(64811.671996342375/8.0),
12318 REAL_CONST(64832.947010659969/8.0),
12319 REAL_CONST(64854.223770476558/8.0),
12320 REAL_CONST(64875.502275505794/8.0),
12321 REAL_CONST(64896.782525461451/8.0),
12322 REAL_CONST(64918.064520057414/8.0),
12323 REAL_CONST(64939.348259007682/8.0),
12324 REAL_CONST(64960.633742026388/8.0),
12325 REAL_CONST(64981.920968827762/8.0),
12326 REAL_CONST(65003.209939126165/8.0),
12327 REAL_CONST(65024.500652636067/8.0),
12328 REAL_CONST(65045.793109072067/8.0),
12329 REAL_CONST(65067.087308148861/8.0),
12330 REAL_CONST(65088.383249581282/8.0),
12331 REAL_CONST(65109.680933084259/8.0),
12332 REAL_CONST(65130.980358372864/8.0),
12333 REAL_CONST(65152.28152516226/8.0),
12334 REAL_CONST(65173.584433167736/8.0),
12335 REAL_CONST(65194.889082104703/8.0),
12336 REAL_CONST(65216.195471688683/8.0),
12337 REAL_CONST(65237.503601635319/8.0),
12338 REAL_CONST(65258.813471660353/8.0),
12339 REAL_CONST(65280.125081479666/8.0),
12340 REAL_CONST(65301.438430809241/8.0),
12341 REAL_CONST(65322.753519365178/8.0),
12342 REAL_CONST(65344.070346863708/8.0),
12343 REAL_CONST(65365.388913021146/8.0),
12344 REAL_CONST(65386.709217553958/8.0),
12345 REAL_CONST(65408.031260178701/8.0),
12346 REAL_CONST(65429.355040612056/8.0),
12347 REAL_CONST(65450.680558570821/8.0),
12348 REAL_CONST(65472.00781377191/8.0),
12349 REAL_CONST(65493.336805932355/8.0),
12350 REAL_CONST(65514.66753476928/8.0),
12351 REAL_CONST(65535.999999999956/8.0),
12352 REAL_CONST(65557.334201341757/8.0),
12353 REAL_CONST(65578.670138512171/8.0),
12354 REAL_CONST(65600.007811228788/8.0),
12355 REAL_CONST(65621.347219209332/8.0),
12356 REAL_CONST(65642.688362171626/8.0),
12357 REAL_CONST(65664.031239833639/8.0),
12358 REAL_CONST(65685.375851913413/8.0),
12359 REAL_CONST(65706.722198129137/8.0),
12360 REAL_CONST(65728.070278199084/8.0),
12361 REAL_CONST(65749.420091841661/8.0),
12362 REAL_CONST(65770.771638775404/8.0),
12363 REAL_CONST(65792.124918718939/8.0),
12364 REAL_CONST(65813.479931391004/8.0),
12365 REAL_CONST(65834.836676510458/8.0),
12366 REAL_CONST(65856.195153796303/8.0),
12367 REAL_CONST(65877.5553629676/8.0),
12368 REAL_CONST(65898.917303743554/8.0),
12369 REAL_CONST(65920.280975843489/8.0),
12370 REAL_CONST(65941.646378986843/8.0),
12371 REAL_CONST(65963.013512893158/8.0),
12372 REAL_CONST(65984.382377282076/8.0),
12373 REAL_CONST(66005.752971873386/8.0),
12374 REAL_CONST(66027.125296386963/8.0),
12375 REAL_CONST(66048.499350542799/8.0),
12376 REAL_CONST(66069.875134061018/8.0),
12377 REAL_CONST(66091.252646661844/8.0),
12378 REAL_CONST(66112.631888065618/8.0),
12379 REAL_CONST(66134.01285799277/8.0),
12380 REAL_CONST(66155.395556163887/8.0),
12381 REAL_CONST(66176.779982299631/8.0),
12382 REAL_CONST(66198.166136120795/8.0),
12383 REAL_CONST(66219.554017348273/8.0),
12384 REAL_CONST(66240.943625703105/8.0),
12385 REAL_CONST(66262.334960906388/8.0),
12386 REAL_CONST(66283.728022679396/8.0),
12387 REAL_CONST(66305.122810743444/8.0),
12388 REAL_CONST(66326.519324820023/8.0),
12389 REAL_CONST(66347.917564630698/8.0),
12390 REAL_CONST(66369.317529897162/8.0),
12391 REAL_CONST(66390.719220341227/8.0),
12392 REAL_CONST(66412.122635684791/8.0),
12393 REAL_CONST(66433.527775649884/8.0),
12394 REAL_CONST(66454.934639958636/8.0),
12395 REAL_CONST(66476.343228333324/8.0),
12396 REAL_CONST(66497.753540496284/8.0),
12397 REAL_CONST(66519.165576169995/8.0),
12398 REAL_CONST(66540.57933507704/8.0),
12399 REAL_CONST(66561.994816940118/8.0),
12400 REAL_CONST(66583.412021482043/8.0),
12401 REAL_CONST(66604.830948425733/8.0),
12402 REAL_CONST(66626.251597494222/8.0),
12403 REAL_CONST(66647.673968410629/8.0),
12404 REAL_CONST(66669.098060898235/8.0),
12405 REAL_CONST(66690.523874680381/8.0),
12406 REAL_CONST(66711.951409480564/8.0),
12407 REAL_CONST(66733.380665022371/8.0),
12408 REAL_CONST(66754.811641029475/8.0),
12409 REAL_CONST(66776.244337225711/8.0),
12410 REAL_CONST(66797.678753334985/8.0),
12411 REAL_CONST(66819.11488908132/8.0),
12412 REAL_CONST(66840.552744188884/8.0),
12413 REAL_CONST(66861.992318381905/8.0),
12414 REAL_CONST(66883.433611384738/8.0),
12415 REAL_CONST(66904.876622921889/8.0),
12416 REAL_CONST(66926.321352717903/8.0),
12417 REAL_CONST(66947.767800497502/8.0),
12418 REAL_CONST(66969.215965985466/8.0),
12419 REAL_CONST(66990.665848906734/8.0),
12420 REAL_CONST(67012.117448986304/8.0),
12421 REAL_CONST(67033.570765949335/8.0),
12422 REAL_CONST(67055.025799521056/8.0),
12423 REAL_CONST(67076.482549426815/8.0),
12424 REAL_CONST(67097.941015392076/8.0),
12425 REAL_CONST(67119.401197142433/8.0),
12426 REAL_CONST(67140.863094403554/8.0),
12427 REAL_CONST(67162.326706901222/8.0),
12428 REAL_CONST(67183.792034361351/8.0),
12429 REAL_CONST(67205.259076509959/8.0),
12430 REAL_CONST(67226.72783307315/8.0),
12431 REAL_CONST(67248.198303777172/8.0),
12432 REAL_CONST(67269.670488348347/8.0),
12433 REAL_CONST(67291.144386513144/8.0),
12434 REAL_CONST(67312.619997998088/8.0),
12435 REAL_CONST(67334.09732252988/8.0),
12436 REAL_CONST(67355.576359835293/8.0),
12437 REAL_CONST(67377.057109641188/8.0),
12438 REAL_CONST(67398.53957167457/8.0),
12439 REAL_CONST(67420.023745662547/8.0),
12440 REAL_CONST(67441.50963133233/8.0),
12441 REAL_CONST(67462.99722841123/8.0),
12442 REAL_CONST(67484.486536626689/8.0),
12443 REAL_CONST(67505.977555706224/8.0),
12444 REAL_CONST(67527.470285377494/8.0),
12445 REAL_CONST(67548.964725368263/8.0),
12446 REAL_CONST(67570.460875406367/8.0),
12447 REAL_CONST(67591.9587352198/8.0),
12448 REAL_CONST(67613.458304536631/8.0),
12449 REAL_CONST(67634.95958308503/8.0),
12450 REAL_CONST(67656.462570593329/8.0),
12451 REAL_CONST(67677.967266789899/8.0),
12452 REAL_CONST(67699.473671403248/8.0),
12453 REAL_CONST(67720.981784162024/8.0),
12454 REAL_CONST(67742.491604794923/8.0),
12455 REAL_CONST(67764.003133030797/8.0),
12456 REAL_CONST(67785.516368598575/8.0),
12457 REAL_CONST(67807.031311227314/8.0),
12458 REAL_CONST(67828.547960646174/8.0),
12459 REAL_CONST(67850.066316584402/8.0),
12460 REAL_CONST(67871.58637877139/8.0),
12461 REAL_CONST(67893.108146936589/8.0),
12462 REAL_CONST(67914.63162080961/8.0),
12463 REAL_CONST(67936.156800120138/8.0),
12464 REAL_CONST(67957.683684597971/8.0),
12465 REAL_CONST(67979.212273973011/8.0),
12466 REAL_CONST(68000.742567975263/8.0),
12467 REAL_CONST(68022.274566334876/8.0),
12468 REAL_CONST(68043.808268782057/8.0),
12469 REAL_CONST(68065.343675047145/8.0),
12470 REAL_CONST(68086.880784860579/8.0),
12471 REAL_CONST(68108.419597952918/8.0),
12472 REAL_CONST(68129.960114054789/8.0),
12473 REAL_CONST(68151.502332896969/8.0),
12474 REAL_CONST(68173.04625421032/8.0),
12475 REAL_CONST(68194.591877725834/8.0),
12476 REAL_CONST(68216.139203174564/8.0),
12477 REAL_CONST(68237.688230287706/8.0),
12478 REAL_CONST(68259.238958796544/8.0),
12479 REAL_CONST(68280.791388432481/8.0),
12480 REAL_CONST(68302.345518927032/8.0),
12481 REAL_CONST(68323.901350011787/8.0),
12482 REAL_CONST(68345.458881418483/8.0),
12483 REAL_CONST(68367.018112878912/8.0),
12484 REAL_CONST(68388.579044125028/8.0),
12485 REAL_CONST(68410.141674888844/8.0),
12486 REAL_CONST(68431.706004902502/8.0),
12487 REAL_CONST(68453.272033898262/8.0),
12488 REAL_CONST(68474.839761608455/8.0),
12489 REAL_CONST(68496.409187765545/8.0),
12490 REAL_CONST(68517.980312102081/8.0),
12491 REAL_CONST(68539.553134350732/8.0),
12492 REAL_CONST(68561.127654244279/8.0),
12493 REAL_CONST(68582.70387151558/8.0),
12494 REAL_CONST(68604.281785897634/8.0),
12495 REAL_CONST(68625.861397123503/8.0),
12496 REAL_CONST(68647.44270492639/8.0),
12497 REAL_CONST(68669.025709039604/8.0),
12498 REAL_CONST(68690.610409196524/8.0),
12499 REAL_CONST(68712.196805130661/8.0),
12500 REAL_CONST(68733.784896575627/8.0),
12501 REAL_CONST(68755.374683265123/8.0),
12502 REAL_CONST(68776.966164932994/8.0),
12503 REAL_CONST(68798.559341313128/8.0),
12504 REAL_CONST(68820.154212139591/8.0),
12505 REAL_CONST(68841.750777146473/8.0),
12506 REAL_CONST(68863.349036068044/8.0),
12507 REAL_CONST(68884.948988638629/8.0),
12508 REAL_CONST(68906.550634592684/8.0),
12509 REAL_CONST(68928.153973664739/8.0),
12510 REAL_CONST(68949.75900558944/8.0),
12511 REAL_CONST(68971.365730101577/8.0),
12512 REAL_CONST(68992.974146935987/8.0),
12513 REAL_CONST(69014.584255827634/8.0),
12514 REAL_CONST(69036.196056511588/8.0),
12515 REAL_CONST(69057.809548723017/8.0),
12516 REAL_CONST(69079.424732197207/8.0),
12517 REAL_CONST(69101.041606669532/8.0),
12518 REAL_CONST(69122.660171875468/8.0),
12519 REAL_CONST(69144.280427550606/8.0),
12520 REAL_CONST(69165.902373430625/8.0),
12521 REAL_CONST(69187.526009251334/8.0),
12522 REAL_CONST(69209.151334748618/8.0),
12523 REAL_CONST(69230.778349658474/8.0),
12524 REAL_CONST(69252.40705371699/8.0),
12525 REAL_CONST(69274.037446660412/8.0),
12526 REAL_CONST(69295.669528225/8.0),
12527 REAL_CONST(69317.303298147192/8.0),
12528 REAL_CONST(69338.938756163494/8.0),
12529 REAL_CONST(69360.575902010532/8.0),
12530 REAL_CONST(69382.214735425005/8.0),
12531 REAL_CONST(69403.855256143754/8.0),
12532 REAL_CONST(69425.497463903681/8.0),
12533 REAL_CONST(69447.141358441833/8.0),
12534 REAL_CONST(69468.78693949533/8.0),
12535 REAL_CONST(69490.434206801394/8.0),
12536 REAL_CONST(69512.083160097391/8.0),
12537 REAL_CONST(69533.733799120717/8.0),
12538 REAL_CONST(69555.386123608929/8.0),
12539 REAL_CONST(69577.04013329967/8.0),
12540 REAL_CONST(69598.695827930685/8.0),
12541 REAL_CONST(69620.353207239794/8.0),
12542 REAL_CONST(69642.012270964973/8.0),
12543 REAL_CONST(69663.67301884426/8.0),
12544 REAL_CONST(69685.335450615792/8.0),
12545 REAL_CONST(69706.999566017839/8.0),
12546 REAL_CONST(69728.665364788743/8.0),
12547 REAL_CONST(69750.332846666963/8.0),
12548 REAL_CONST(69772.002011391058/8.0),
12549 REAL_CONST(69793.672858699691/8.0),
12550 REAL_CONST(69815.345388331611/8.0),
12551 REAL_CONST(69837.019600025669/8.0),
12552 REAL_CONST(69858.695493520849/8.0),
12553 REAL_CONST(69880.373068556204/8.0),
12554 REAL_CONST(69902.052324870907/8.0),
12555 REAL_CONST(69923.733262204216/8.0),
12556 REAL_CONST(69945.415880295492/8.0),
12557 REAL_CONST(69967.100178884211/8.0),
12558 REAL_CONST(69988.786157709939/8.0),
12559 REAL_CONST(70010.473816512356/8.0),
12560 REAL_CONST(70032.163155031216/8.0),
12561 REAL_CONST(70053.854173006403/8.0),
12562 REAL_CONST(70075.546870177874/8.0),
12563 REAL_CONST(70097.241246285717/8.0),
12564 REAL_CONST(70118.937301070109/8.0),
12565 REAL_CONST(70140.635034271298/8.0),
12566 REAL_CONST(70162.334445629691/8.0),
12567 REAL_CONST(70184.035534885741/8.0),
12568 REAL_CONST(70205.738301780017/8.0),
12569 REAL_CONST(70227.442746053217/8.0),
12570 REAL_CONST(70249.1488674461/8.0),
12571 REAL_CONST(70270.856665699539/8.0),
12572 REAL_CONST(70292.566140554511/8.0),
12573 REAL_CONST(70314.277291752107/8.0),
12574 REAL_CONST(70335.990119033493/8.0),
12575 REAL_CONST(70357.704622139936/8.0),
12576 REAL_CONST(70379.420800812819/8.0),
12577 REAL_CONST(70401.138654793613/8.0),
12578 REAL_CONST(70422.85818382389/8.0),
12579 REAL_CONST(70444.579387645339/8.0),
12580 REAL_CONST(70466.302265999722/8.0),
12581 REAL_CONST(70488.026818628918/8.0),
12582 REAL_CONST(70509.753045274876/8.0),
12583 REAL_CONST(70531.480945679708/8.0),
12584 REAL_CONST(70553.210519585555/8.0),
12585 REAL_CONST(70574.941766734701/8.0),
12586 REAL_CONST(70596.674686869505/8.0),
12587 REAL_CONST(70618.409279732456/8.0),
12588 REAL_CONST(70640.145545066101/8.0),
12589 REAL_CONST(70661.883482613106/8.0),
12590 REAL_CONST(70683.623092116264/8.0),
12591 REAL_CONST(70705.364373318414/8.0),
12592 REAL_CONST(70727.107325962526/8.0),
12593 REAL_CONST(70748.851949791671/8.0),
12594 REAL_CONST(70770.598244549008/8.0),
12595 REAL_CONST(70792.346209977783/8.0),
12596 REAL_CONST(70814.095845821372/8.0),
12597 REAL_CONST(70835.847151823225/8.0),
12598 REAL_CONST(70857.600127726895/8.0),
12599 REAL_CONST(70879.354773276034/8.0),
12600 REAL_CONST(70901.111088214413/8.0),
12601 REAL_CONST(70922.869072285859/8.0),
12602 REAL_CONST(70944.628725234332/8.0),
12603 REAL_CONST(70966.390046803877/8.0),
12604 REAL_CONST(70988.153036738629/8.0),
12605 REAL_CONST(71009.917694782853/8.0),
12606 REAL_CONST(71031.684020680885/8.0),
12607 REAL_CONST(71053.45201417715/8.0),
12608 REAL_CONST(71075.221675016204/8.0),
12609 REAL_CONST(71096.993002942661/8.0),
12610 REAL_CONST(71118.765997701266/8.0),
12611 REAL_CONST(71140.540659036851/8.0),
12612 REAL_CONST(71162.316986694335/8.0),
12613 REAL_CONST(71184.09498041874/8.0),
12614 REAL_CONST(71205.874639955218/8.0),
12615 REAL_CONST(71227.655965048951/8.0),
12616 REAL_CONST(71249.438955445294/8.0),
12617 REAL_CONST(71271.223610889632/8.0),
12618 REAL_CONST(71293.009931127483/8.0),
12619 REAL_CONST(71314.797915904477/8.0),
12620 REAL_CONST(71336.587564966307/8.0),
12621 REAL_CONST(71358.378878058764/8.0),
12622 REAL_CONST(71380.171854927772/8.0),
12623 REAL_CONST(71401.966495319313/8.0),
12624 REAL_CONST(71423.762798979486/8.0),
12625 REAL_CONST(71445.560765654489/8.0),
12626 REAL_CONST(71467.360395090596/8.0),
12627 REAL_CONST(71489.161687034211/8.0),
12628 REAL_CONST(71510.964641231811/8.0),
12629 REAL_CONST(71532.769257429973/8.0),
12630 REAL_CONST(71554.575535375348/8.0),
12631 REAL_CONST(71576.383474814749/8.0),
12632 REAL_CONST(71598.19307549503/8.0),
12633 REAL_CONST(71620.004337163133/8.0),
12634 REAL_CONST(71641.817259566145/8.0),
12635 REAL_CONST(71663.631842451214/8.0),
12636 REAL_CONST(71685.4480855656/8.0),
12637 REAL_CONST(71707.26598865664/8.0),
12638 REAL_CONST(71729.085551471784/8.0),
12639 REAL_CONST(71750.906773758586/8.0),
12640 REAL_CONST(71772.729655264673/8.0),
12641 REAL_CONST(71794.554195737772/8.0),
12642 REAL_CONST(71816.380394925713/8.0),
12643 REAL_CONST(71838.208252576442/8.0),
12644 REAL_CONST(71860.037768437964/8.0),
12645 REAL_CONST(71881.868942258385/8.0),
12646 REAL_CONST(71903.701773785942/8.0),
12647 REAL_CONST(71925.536262768932/8.0),
12648 REAL_CONST(71947.372408955751/8.0),
12649 REAL_CONST(71969.210212094898/8.0),
12650 REAL_CONST(71991.049671934976/8.0),
12651 REAL_CONST(72012.890788224686/8.0),
12652 REAL_CONST(72034.73356071279/8.0),
12653 REAL_CONST(72056.577989148165/8.0),
12654 REAL_CONST(72078.424073279821/8.0),
12655 REAL_CONST(72100.271812856794/8.0),
12656 REAL_CONST(72122.121207628254/8.0),
12657 REAL_CONST(72143.97225734347/8.0),
12658 REAL_CONST(72165.824961751801/8.0),
12659 REAL_CONST(72187.679320602692/8.0),
12660 REAL_CONST(72209.53533364569/8.0),
12661 REAL_CONST(72231.393000630429/8.0),
12662 REAL_CONST(72253.252321306645/8.0),
12663 REAL_CONST(72275.113295424177/8.0),
12664 REAL_CONST(72296.975922732949/8.0),
12665 REAL_CONST(72318.840202982959/8.0),
12666 REAL_CONST(72340.706135924338/8.0),
12667 REAL_CONST(72362.573721307272/8.0),
12668 REAL_CONST(72384.442958882093/8.0),
12669 REAL_CONST(72406.313848399179/8.0),
12670 REAL_CONST(72428.186389609036/8.0),
12671 REAL_CONST(72450.060582262216/8.0),
12672 REAL_CONST(72471.936426109431/8.0),
12673 REAL_CONST(72493.813920901433/8.0),
12674 REAL_CONST(72515.693066389096/8.0),
12675 REAL_CONST(72537.573862323392/8.0),
12676 REAL_CONST(72559.456308455352/8.0),
12677 REAL_CONST(72581.340404536139/8.0),
12678 REAL_CONST(72603.226150316987/8.0),
12679 REAL_CONST(72625.113545549248/8.0),
12680 REAL_CONST(72647.002589984331/8.0),
12681 REAL_CONST(72668.893283373764/8.0),
12682 REAL_CONST(72690.785625469172/8.0),
12683 REAL_CONST(72712.679616022273/8.0),
12684 REAL_CONST(72734.575254784853/8.0),
12685 REAL_CONST(72756.472541508803/8.0),
12686 REAL_CONST(72778.371475946144/8.0),
12687 REAL_CONST(72800.272057848939/8.0),
12688 REAL_CONST(72822.174286969355/8.0),
12689 REAL_CONST(72844.07816305969/8.0),
12690 REAL_CONST(72865.983685872285/8.0),
12691 REAL_CONST(72887.890855159596/8.0),
12692 REAL_CONST(72909.799670674183/8.0),
12693 REAL_CONST(72931.710132168693/8.0),
12694 REAL_CONST(72953.622239395845/8.0),
12695 REAL_CONST(72975.535992108475/8.0),
12696 REAL_CONST(72997.451390059519/8.0),
12697 REAL_CONST(73019.368433001961/8.0),
12698 REAL_CONST(73041.287120688925/8.0),
12699 REAL_CONST(73063.207452873612/8.0),
12700 REAL_CONST(73085.129429309294/8.0),
12701 REAL_CONST(73107.053049749389/8.0),
12702 REAL_CONST(73128.978313947344/8.0),
12703 REAL_CONST(73150.905221656736/8.0),
12704 REAL_CONST(73172.833772631217/8.0),
12705 REAL_CONST(73194.763966624567/8.0),
12706 REAL_CONST(73216.695803390612/8.0),
12707 REAL_CONST(73238.62928268328/8.0),
12708 REAL_CONST(73260.564404256627/8.0),
12709 REAL_CONST(73282.501167864757/8.0),
12710 REAL_CONST(73304.439573261901/8.0),
12711 REAL_CONST(73326.379620202337/8.0),
12712 REAL_CONST(73348.321308440485/8.0),
12713 REAL_CONST(73370.264637730841/8.0),
12714 REAL_CONST(73392.209607827957/8.0),
12715 REAL_CONST(73414.156218486532/8.0),
12716 REAL_CONST(73436.104469461323/8.0),
12717 REAL_CONST(73458.054360507173/8.0),
12718 REAL_CONST(73480.005891379056/8.0),
12719 REAL_CONST(73501.959061831993/8.0),
12720 REAL_CONST(73523.913871621116/8.0),
12721 REAL_CONST(73545.870320501665/8.0),
12722 REAL_CONST(73567.828408228932/8.0),
12723 REAL_CONST(73589.78813455833/8.0),
12724 REAL_CONST(73611.749499245358/8.0),
12725 REAL_CONST(73633.712502045615/8.0),
12726 REAL_CONST(73655.677142714747/8.0),
12727 REAL_CONST(73677.643421008557/8.0),
12728 REAL_CONST(73699.611336682879/8.0),
12729 REAL_CONST(73721.580889493693/8.0),
12730 REAL_CONST(73743.552079197019/8.0),
12731 REAL_CONST(73765.524905548999/8.0),
12732 REAL_CONST(73787.499368305856/8.0),
12733 REAL_CONST(73809.475467223907/8.0),
12734 REAL_CONST(73831.453202059551/8.0),
12735 REAL_CONST(73853.432572569291/8.0),
12736 REAL_CONST(73875.413578509717/8.0),
12737 REAL_CONST(73897.396219637507/8.0),
12738 REAL_CONST(73919.380495709411/8.0),
12739 REAL_CONST(73941.36640648231/8.0),
12740 REAL_CONST(73963.353951713143/8.0),
12741 REAL_CONST(73985.343131158952/8.0),
12742 REAL_CONST(74007.333944576865/8.0),
12743 REAL_CONST(74029.326391724098/8.0),
12744 REAL_CONST(74051.320472357969/8.0),
12745 REAL_CONST(74073.316186235883/8.0),
12746 REAL_CONST(74095.313533115303/8.0),
12747 REAL_CONST(74117.312512753837/8.0),
12748 REAL_CONST(74139.313124909138/8.0),
12749 REAL_CONST(74161.315369338976/8.0),
12750 REAL_CONST(74183.319245801191/8.0),
12751 REAL_CONST(74205.324754053727/8.0),
12752 REAL_CONST(74227.331893854629/8.0),
12753 REAL_CONST(74249.340664961986/8.0),
12754 REAL_CONST(74271.351067134034/8.0),
12755 REAL_CONST(74293.363100129049/8.0),
12756 REAL_CONST(74315.376763705441/8.0),
12757 REAL_CONST(74337.392057621662/8.0),
12758 REAL_CONST(74359.408981636298/8.0),
12759 REAL_CONST(74381.427535508003/8.0),
12760 REAL_CONST(74403.447718995507/8.0),
12761 REAL_CONST(74425.469531857671/8.0),
12762 REAL_CONST(74447.492973853383/8.0),
12763 REAL_CONST(74469.518044741693/8.0),
12764 REAL_CONST(74491.54474428168/8.0),
12765 REAL_CONST(74513.573072232539/8.0),
12766 REAL_CONST(74535.603028353551/8.0),
12767 REAL_CONST(74557.634612404087/8.0),
12768 REAL_CONST(74579.667824143602/8.0),
12769 REAL_CONST(74601.702663331642/8.0),
12770 REAL_CONST(74623.739129727837/8.0),
12771 REAL_CONST(74645.777223091936/8.0),
12772 REAL_CONST(74667.816943183716/8.0),
12773 REAL_CONST(74689.858289763113/8.0),
12774 REAL_CONST(74711.901262590094/8.0),
12775 REAL_CONST(74733.945861424741/8.0),
12776 REAL_CONST(74755.992086027225/8.0),
12777 REAL_CONST(74778.039936157802/8.0),
12778 REAL_CONST(74800.089411576817/8.0),
12779 REAL_CONST(74822.140512044702/8.0),
12780 REAL_CONST(74844.193237321961/8.0),
12781 REAL_CONST(74866.24758716923/8.0),
12782 REAL_CONST(74888.303561347187/8.0),
12783 REAL_CONST(74910.36115961663/8.0),
12784 REAL_CONST(74932.420381738411/8.0),
12785 REAL_CONST(74954.481227473516/8.0),
12786 REAL_CONST(74976.543696582972/8.0),
12787 REAL_CONST(74998.607788827925/8.0),
12788 REAL_CONST(75020.673503969607/8.0),
12789 REAL_CONST(75042.740841769322/8.0),
12790 REAL_CONST(75064.809801988464/8.0),
12791 REAL_CONST(75086.88038438854/8.0),
12792 REAL_CONST(75108.952588731103/8.0),
12793 REAL_CONST(75131.026414777836/8.0),
12794 REAL_CONST(75153.101862290467/8.0),
12795 REAL_CONST(75175.178931030852/8.0),
12796 REAL_CONST(75197.257620760924/8.0),
12797 REAL_CONST(75219.33793124267/8.0),
12798 REAL_CONST(75241.419862238225/8.0),
12799 REAL_CONST(75263.503413509738/8.0),
12800 REAL_CONST(75285.588584819503/8.0),
12801 REAL_CONST(75307.675375929874/8.0),
12802 REAL_CONST(75329.763786603318/8.0),
12803 REAL_CONST(75351.853816602365/8.0),
12804 REAL_CONST(75373.945465689612/8.0),
12805 REAL_CONST(75396.038733627807/8.0),
12806 REAL_CONST(75418.133620179724/8.0),
12807 REAL_CONST(75440.230125108254/8.0),
12808 REAL_CONST(75462.32824817636/8.0),
12809 REAL_CONST(75484.427989147109/8.0),
12810 REAL_CONST(75506.529347783653/8.0),
12811 REAL_CONST(75528.63232384919/8.0),
12812 REAL_CONST(75550.736917107075/8.0),
12813 REAL_CONST(75572.843127320695/8.0),
12814 REAL_CONST(75594.950954253538/8.0),
12815 REAL_CONST(75617.060397669193/8.0),
12816 REAL_CONST(75639.171457331307/8.0),
12817 REAL_CONST(75661.284133003646/8.0),
12818 REAL_CONST(75683.398424450032/8.0),
12819 REAL_CONST(75705.514331434402/8.0),
12820 REAL_CONST(75727.631853720741/8.0),
12821 REAL_CONST(75749.750991073175/8.0),
12822 REAL_CONST(75771.871743255862/8.0),
12823 REAL_CONST(75793.994110033076/8.0),
12824 REAL_CONST(75816.118091169177/8.0),
12825 REAL_CONST(75838.243686428585/8.0),
12826 REAL_CONST(75860.370895575848/8.0),
12827 REAL_CONST(75882.499718375562/8.0),
12828 REAL_CONST(75904.630154592422/8.0),
12829 REAL_CONST(75926.762203991224/8.0),
12830 REAL_CONST(75948.895866336825/8.0),
12831 REAL_CONST(75971.031141394182/8.0),
12832 REAL_CONST(75993.168028928325/8.0),
12833 REAL_CONST(76015.306528704401/8.0),
12834 REAL_CONST(76037.4466404876/8.0),
12835 REAL_CONST(76059.588364043215/8.0),
12836 REAL_CONST(76081.731699136653/8.0),
12837 REAL_CONST(76103.876645533353/8.0),
12838 REAL_CONST(76126.023202998884/8.0),
12839 REAL_CONST(76148.171371298871/8.0),
12840 REAL_CONST(76170.321150199044/8.0),
12841 REAL_CONST(76192.472539465205/8.0),
12842 REAL_CONST(76214.625538863256/8.0),
12843 REAL_CONST(76236.780148159174/8.0),
12844 REAL_CONST(76258.936367119008/8.0),
12845 REAL_CONST(76281.094195508922/8.0),
12846 REAL_CONST(76303.253633095141/8.0),
12847 REAL_CONST(76325.414679643975/8.0),
12848 REAL_CONST(76347.577334921851/8.0),
12849 REAL_CONST(76369.741598695226/8.0),
12850 REAL_CONST(76391.907470730686/8.0),
12851 REAL_CONST(76414.074950794879/8.0),
12852 REAL_CONST(76436.244038654564/8.0),
12853 REAL_CONST(76458.414734076548/8.0),
12854 REAL_CONST(76480.587036827754/8.0),
12855 REAL_CONST(76502.760946675175/8.0),
12856 REAL_CONST(76524.936463385893/8.0),
12857 REAL_CONST(76547.11358672705/8.0),
12858 REAL_CONST(76569.292316465915/8.0),
12859 REAL_CONST(76591.472652369819/8.0),
12860 REAL_CONST(76613.654594206164/8.0),
12861 REAL_CONST(76635.838141742468/8.0),
12862 REAL_CONST(76658.023294746308/8.0),
12863 REAL_CONST(76680.210052985349/8.0),
12864 REAL_CONST(76702.398416227341/8.0),
12865 REAL_CONST(76724.588384240138/8.0),
12866 REAL_CONST(76746.779956791637/8.0),
12867 REAL_CONST(76768.973133649866/8.0),
12868 REAL_CONST(76791.167914582897/8.0),
12869 REAL_CONST(76813.364299358902/8.0),
12870 REAL_CONST(76835.562287746157/8.0),
12871 REAL_CONST(76857.761879512967/8.0),
12872 REAL_CONST(76879.963074427797/8.0),
12873 REAL_CONST(76902.165872259109/8.0),
12874 REAL_CONST(76924.37027277553/8.0),
12875 REAL_CONST(76946.576275745727/8.0),
12876 REAL_CONST(76968.783880938441/8.0),
12877 REAL_CONST(76990.993088122515/8.0),
12878 REAL_CONST(77013.203897066895/8.0),
12879 REAL_CONST(77035.416307540567/8.0),
12880 REAL_CONST(77057.630319312622/8.0),
12881 REAL_CONST(77079.845932152239/8.0),
12882 REAL_CONST(77102.063145828695/8.0),
12883 REAL_CONST(77124.281960111301/8.0),
12884 REAL_CONST(77146.50237476948/8.0),
12885 REAL_CONST(77168.724389572759/8.0),
12886 REAL_CONST(77190.948004290723/8.0),
12887 REAL_CONST(77213.173218693031/8.0),
12888 REAL_CONST(77235.400032549442/8.0),
12889 REAL_CONST(77257.628445629802/8.0),
12890 REAL_CONST(77279.858457704031/8.0),
12891 REAL_CONST(77302.090068542122/8.0),
12892 REAL_CONST(77324.323277914169/8.0),
12893 REAL_CONST(77346.558085590339/8.0),
12894 REAL_CONST(77368.794491340886/8.0),
12895 REAL_CONST(77391.032494936138/8.0),
12896 REAL_CONST(77413.272096146524/8.0),
12897 REAL_CONST(77435.51329474253/8.0),
12898 REAL_CONST(77457.756090494731/8.0),
12899 REAL_CONST(77480.000483173804/8.0),
12900 REAL_CONST(77502.246472550498/8.0),
12901 REAL_CONST(77524.494058395634/8.0),
12902 REAL_CONST(77546.743240480107/8.0),
12903 REAL_CONST(77568.994018574944/8.0),
12904 REAL_CONST(77591.246392451198/8.0),
12905 REAL_CONST(77613.500361880026/8.0),
12906 REAL_CONST(77635.755926632657/8.0),
12907 REAL_CONST(77658.013086480438/8.0),
12908 REAL_CONST(77680.271841194757/8.0),
12909 REAL_CONST(77702.532190547092/8.0),
12910 REAL_CONST(77724.794134309021/8.0),
12911 REAL_CONST(77747.057672252195/8.0),
12912 REAL_CONST(77769.322804148323/8.0),
12913 REAL_CONST(77791.589529769248/8.0),
12914 REAL_CONST(77813.857848886837/8.0),
12915 REAL_CONST(77836.127761273063/8.0),
12916 REAL_CONST(77858.399266699998/8.0),
12917 REAL_CONST(77880.67236493979/8.0),
12918 REAL_CONST(77902.947055764627/8.0),
12919 REAL_CONST(77925.223338946831/8.0),
12920 REAL_CONST(77947.50121425878/8.0),
12921 REAL_CONST(77969.780681472927/8.0),
12922 REAL_CONST(77992.061740361838/8.0),
12923 REAL_CONST(78014.344390698127/8.0),
12924 REAL_CONST(78036.628632254491/8.0),
12925 REAL_CONST(78058.914464803747/8.0),
12926 REAL_CONST(78081.201888118725/8.0),
12927 REAL_CONST(78103.490901972415/8.0),
12928 REAL_CONST(78125.781506137821/8.0),
12929 REAL_CONST(78148.073700388064/8.0),
12930 REAL_CONST(78170.367484496339/8.0),
12931 REAL_CONST(78192.662858235926/8.0),
12932 REAL_CONST(78214.959821380166/8.0),
12933 REAL_CONST(78237.258373702498/8.0),
12934 REAL_CONST(78259.558514976452/8.0),
12935 REAL_CONST(78281.860244975614/8.0),
12936 REAL_CONST(78304.163563473659/8.0),
12937 REAL_CONST(78326.468470244363/8.0),
12938 REAL_CONST(78348.77496506153/8.0),
12939 REAL_CONST(78371.083047699125/8.0),
12940 REAL_CONST(78393.392717931114/8.0),
12941 REAL_CONST(78415.703975531578/8.0),
12942 REAL_CONST(78438.016820274701/8.0),
12943 REAL_CONST(78460.331251934695/8.0),
12944 REAL_CONST(78482.647270285903/8.0),
12945 REAL_CONST(78504.964875102727/8.0),
12946 REAL_CONST(78527.284066159627/8.0),
12947 REAL_CONST(78549.604843231195/8.0),
12948 REAL_CONST(78571.927206092048/8.0),
12949 REAL_CONST(78594.251154516911/8.0),
12950 REAL_CONST(78616.576688280606/8.0),
12951 REAL_CONST(78638.903807157985/8.0),
12952 REAL_CONST(78661.232510924034/8.0),
12953 REAL_CONST(78683.562799353778/8.0),
12954 REAL_CONST(78705.894672222363/8.0),
12955 REAL_CONST(78728.228129304945/8.0),
12956 REAL_CONST(78750.563170376859/8.0),
12957 REAL_CONST(78772.899795213423/8.0),
12958 REAL_CONST(78795.238003590101/8.0),
12959 REAL_CONST(78817.577795282399/8.0),
12960 REAL_CONST(78839.919170065928/8.0),
12961 REAL_CONST(78862.262127716356/8.0),
12962 REAL_CONST(78884.606668009452/8.0),
12963 REAL_CONST(78906.952790721043/8.0),
12964 REAL_CONST(78929.300495627045/8.0),
12965 REAL_CONST(78951.64978250346/8.0),
12966 REAL_CONST(78974.000651126378/8.0),
12967 REAL_CONST(78996.353101271932/8.0),
12968 REAL_CONST(79018.707132716358/8.0),
12969 REAL_CONST(79041.062745235977/8.0),
12970 REAL_CONST(79063.41993860717/8.0),
12971 REAL_CONST(79085.778712606436/8.0),
12972 REAL_CONST(79108.139067010285/8.0),
12973 REAL_CONST(79130.501001595389/8.0),
12974 REAL_CONST(79152.864516138419/8.0),
12975 REAL_CONST(79175.22961041618/8.0),
12976 REAL_CONST(79197.596284205531/8.0),
12977 REAL_CONST(79219.96453728342/8.0),
12978 REAL_CONST(79242.33436942687/8.0),
12979 REAL_CONST(79264.705780412987/8.0),
12980 REAL_CONST(79287.078770018954/8.0),
12981 REAL_CONST(79309.453338022009/8.0),
12982 REAL_CONST(79331.829484199508/8.0),
12983 REAL_CONST(79354.207208328866/8.0),
12984 REAL_CONST(79376.586510187582/8.0),
12985 REAL_CONST(79398.967389553218/8.0),
12986 REAL_CONST(79421.349846203433/8.0),
12987 REAL_CONST(79443.733879915948/8.0),
12988 REAL_CONST(79466.119490468584/8.0),
12989 REAL_CONST(79488.50667763922/8.0),
12990 REAL_CONST(79510.895441205823/8.0),
12991 REAL_CONST(79533.285780946433/8.0),
12992 REAL_CONST(79555.677696639163/8.0),
12993 REAL_CONST(79578.071188062226/8.0),
12994 REAL_CONST(79600.466254993895/8.0),
12995 REAL_CONST(79622.862897212515/8.0),
12996 REAL_CONST(79645.261114496549/8.0),
12997 REAL_CONST(79667.660906624471/8.0),
12998 REAL_CONST(79690.062273374875/8.0),
12999 REAL_CONST(79712.465214526455/8.0),
13000 REAL_CONST(79734.869729857935/8.0),
13001 REAL_CONST(79757.275819148126/8.0),
13002 REAL_CONST(79779.683482175955/8.0),
13003 REAL_CONST(79802.092718720378/8.0),
13004 REAL_CONST(79824.503528560454/8.0),
13005 REAL_CONST(79846.915911475327/8.0),
13006 REAL_CONST(79869.329867244203/8.0),
13007 REAL_CONST(79891.745395646343/8.0),
13008 REAL_CONST(79914.162496461155/8.0),
13009 REAL_CONST(79936.581169468045/8.0),
13010 REAL_CONST(79959.001414446553/8.0),
13011 REAL_CONST(79981.423231176261/8.0),
13012 REAL_CONST(80003.846619436852/8.0),
13013 REAL_CONST(80026.271579008084/8.0),
13014 REAL_CONST(80048.698109669771/8.0),
13015 REAL_CONST(80071.12621120183/8.0),
13016 REAL_CONST(80093.555883384237/8.0),
13017 REAL_CONST(80115.987125997053/8.0),
13018 REAL_CONST(80138.419938820414/8.0),
13019 REAL_CONST(80160.854321634528/8.0),
13020 REAL_CONST(80183.290274219689/8.0),
13021 REAL_CONST(80205.727796356281/8.0),
13022 REAL_CONST(80228.166887824715/8.0),
13023 REAL_CONST(80250.607548405547/8.0),
13024 REAL_CONST(80273.049777879336/8.0),
13025 REAL_CONST(80295.493576026798/8.0),
13026 REAL_CONST(80317.938942628651/8.0),
13027 REAL_CONST(80340.385877465727/8.0),
13028 REAL_CONST(80362.834380318949/8.0),
13029 REAL_CONST(80385.28445096928/8.0),
13030 REAL_CONST(80407.736089197788/8.0),
13031 REAL_CONST(80430.189294785596/8.0),
13032 REAL_CONST(80452.644067513917/8.0),
13033 REAL_CONST(80475.100407164035/8.0),
13034 REAL_CONST(80497.558313517322/8.0),
13035 REAL_CONST(80520.017786355209/8.0),
13036 REAL_CONST(80542.478825459213/8.0),
13037 REAL_CONST(80564.941430610925/8.0),
13038 REAL_CONST(80587.405601592007/8.0),
13039 REAL_CONST(80609.871338184195/8.0),
13040 REAL_CONST(80632.338640169342/8.0),
13041 REAL_CONST(80654.8075073293/8.0),
13042 REAL_CONST(80677.277939446067/8.0),
13043 REAL_CONST(80699.749936301683/8.0),
13044 REAL_CONST(80722.223497678278/8.0),
13045 REAL_CONST(80744.698623358039/8.0),
13046 REAL_CONST(80767.17531312324/8.0),
13047 REAL_CONST(80789.653566756242/8.0),
13048 REAL_CONST(80812.133384039465/8.0),
13049 REAL_CONST(80834.614764755403/8.0),
13050 REAL_CONST(80857.097708686648/8.0),
13051 REAL_CONST(80879.582215615854/8.0),
13052 REAL_CONST(80902.068285325731/8.0),
13053 REAL_CONST(80924.555917599093/8.0),
13054 REAL_CONST(80947.045112218824/8.0),
13055 REAL_CONST(80969.535868967869/8.0),
13056 REAL_CONST(80992.028187629272/8.0),
13057 REAL_CONST(81014.522067986123/8.0),
13058 REAL_CONST(81037.017509821613/8.0),
13059 REAL_CONST(81059.514512919006/8.0),
13060 REAL_CONST(81082.013077061609/8.0),
13061 REAL_CONST(81104.513202032831/8.0),
13062 REAL_CONST(81127.014887616184/8.0),
13063 REAL_CONST(81149.518133595193/8.0),
13064 REAL_CONST(81172.022939753486/8.0),
13065 REAL_CONST(81194.529305874807/8.0),
13066 REAL_CONST(81217.037231742899/8.0),
13067 REAL_CONST(81239.546717141639/8.0),
13068 REAL_CONST(81262.057761854958/8.0),
13069 REAL_CONST(81284.570365666848/8.0),
13070 REAL_CONST(81307.084528361403/8.0),
13071 REAL_CONST(81329.600249722775/8.0),
13072 REAL_CONST(81352.117529535186/8.0),
13073 REAL_CONST(81374.636367582949/8.0),
13074 REAL_CONST(81397.156763650448/8.0),
13075 REAL_CONST(81419.678717522125/8.0),
13076 REAL_CONST(81442.202228982511/8.0),
13077 REAL_CONST(81464.727297816222/8.0),
13078 REAL_CONST(81487.253923807933/8.0),
13079 REAL_CONST(81509.782106742379/8.0),
13080 REAL_CONST(81532.311846404409/8.0),
13081 REAL_CONST(81554.843142578902/8.0),
13082 REAL_CONST(81577.375995050839/8.0),
13083 REAL_CONST(81599.910403605274/8.0),
13084 REAL_CONST(81622.446368027333/8.0),
13085 REAL_CONST(81644.983888102215/8.0),
13086 REAL_CONST(81667.522963615178/8.0),
13087 REAL_CONST(81690.063594351581/8.0),
13088 REAL_CONST(81712.605780096841/8.0),
13089 REAL_CONST(81735.149520636449/8.0),
13090 REAL_CONST(81757.694815755967/8.0),
13091 REAL_CONST(81780.241665241047/8.0),
13092 REAL_CONST(81802.79006887741/8.0),
13093 REAL_CONST(81825.340026450824/8.0),
13094 REAL_CONST(81847.891537747171/8.0),
13095 REAL_CONST(81870.444602552379/8.0),
13096 REAL_CONST(81892.999220652477/8.0),
13097 REAL_CONST(81915.555391833506/8.0),
13098 REAL_CONST(81938.113115881672/8.0),
13099 REAL_CONST(81960.672392583176/8.0),
13100 REAL_CONST(81983.233221724338/8.0),
13101 REAL_CONST(82005.795603091537/8.0),
13102 REAL_CONST(82028.359536471224/8.0),
13103 REAL_CONST(82050.925021649906/8.0),
13104 REAL_CONST(82073.492058414209/8.0),
13105 REAL_CONST(82096.060646550788/8.0),
13106 REAL_CONST(82118.630785846399/8.0),
13107 REAL_CONST(82141.202476087841/8.0),
13108 REAL_CONST(82163.775717062032/8.0),
13109 REAL_CONST(82186.35050855593/8.0),
13110 REAL_CONST(82208.926850356569/8.0),
13111 REAL_CONST(82231.504742251054/8.0),
13112 REAL_CONST(82254.084184026578/8.0),
13113 REAL_CONST(82276.665175470393/8.0),
13114 REAL_CONST(82299.24771636985/8.0),
13115 REAL_CONST(82321.831806512317/8.0),
13116 REAL_CONST(82344.417445685307/8.0),
13117 REAL_CONST(82367.004633676348/8.0),
13118 REAL_CONST(82389.593370273054/8.0),
13119 REAL_CONST(82412.183655263143/8.0),
13120 REAL_CONST(82434.775488434374/8.0),
13121 REAL_CONST(82457.368869574595/8.0),
13122 REAL_CONST(82479.963798471697/8.0),
13123 REAL_CONST(82502.560274913689/8.0),
13124 REAL_CONST(82525.158298688606/8.0),
13125 REAL_CONST(82547.757869584602/8.0),
13126 REAL_CONST(82570.35898738986/8.0),
13127 REAL_CONST(82592.961651892678/8.0),
13128 REAL_CONST(82615.565862881398/8.0),
13129 REAL_CONST(82638.171620144421/8.0),
13130 REAL_CONST(82660.778923470265/8.0),
13131 REAL_CONST(82683.387772647475/8.0),
13132 REAL_CONST(82705.998167464713/8.0),
13133 REAL_CONST(82728.610107710658/8.0),
13134 REAL_CONST(82751.223593174116/8.0),
13135 REAL_CONST(82773.83862364394/8.0),
13136 REAL_CONST(82796.45519890904/8.0),
13137 REAL_CONST(82819.073318758441/8.0),
13138 REAL_CONST(82841.692982981185/8.0),
13139 REAL_CONST(82864.314191366429/8.0),
13140 REAL_CONST(82886.936943703375/8.0),
13141 REAL_CONST(82909.561239781324/8.0),
13142 REAL_CONST(82932.187079389638/8.0),
13143 REAL_CONST(82954.814462317736/8.0),
13144 REAL_CONST(82977.443388355125/8.0),
13145 REAL_CONST(83000.073857291369/8.0),
13146 REAL_CONST(83022.70586891612/8.0),
13147 REAL_CONST(83045.339423019104/8.0),
13148 REAL_CONST(83067.974519390089/8.0),
13149 REAL_CONST(83090.611157818959/8.0),
13150 REAL_CONST(83113.249338095629/8.0),
13151 REAL_CONST(83135.8890600101/8.0),
13152 REAL_CONST(83158.530323352461/8.0),
13153 REAL_CONST(83181.173127912858/8.0),
13154 REAL_CONST(83203.817473481497/8.0),
13155 REAL_CONST(83226.463359848669/8.0),
13156 REAL_CONST(83249.11078680474/8.0),
13157 REAL_CONST(83271.759754140134/8.0),
13158 REAL_CONST(83294.410261645375/8.0),
13159 REAL_CONST(83317.062309111003/8.0),
13160 REAL_CONST(83339.715896327703/8.0),
13161 REAL_CONST(83362.371023086147/8.0),
13162 REAL_CONST(83385.027689177165/8.0),
13163 REAL_CONST(83407.685894391587/8.0),
13164 REAL_CONST(83430.345638520361/8.0),
13165 REAL_CONST(83453.006921354478/8.0),
13166 REAL_CONST(83475.669742685001/8.0),
13167 REAL_CONST(83498.334102303095/8.0),
13168 REAL_CONST(83520.999999999942/8.0),
13169 REAL_CONST(83543.667435566866/8.0),
13170 REAL_CONST(83566.336408795192/8.0),
13171 REAL_CONST(83589.006919476349/8.0),
13172 REAL_CONST(83611.678967401851/8.0),
13173 REAL_CONST(83634.352552363242/8.0),
13174 REAL_CONST(83657.027674152167/8.0),
13175 REAL_CONST(83679.704332560359/8.0),
13176 REAL_CONST(83702.382527379552/8.0),
13177 REAL_CONST(83725.062258401638/8.0),
13178 REAL_CONST(83747.743525418511/8.0),
13179 REAL_CONST(83770.42632822218/8.0),
13180 REAL_CONST(83793.110666604684/8.0),
13181 REAL_CONST(83815.796540358162/8.0),
13182 REAL_CONST(83838.483949274829/8.0),
13183 REAL_CONST(83861.172893146941/8.0),
13184 REAL_CONST(83883.863371766842/8.0),
13185 REAL_CONST(83906.555384926964/8.0),
13186 REAL_CONST(83929.248932419752/8.0),
13187 REAL_CONST(83951.944014037799/8.0),
13188 REAL_CONST(83974.640629573696/8.0),
13189 REAL_CONST(83997.338778820151/8.0),
13190 REAL_CONST(84020.038461569929/8.0),
13191 REAL_CONST(84042.739677615857/8.0),
13192 REAL_CONST(84065.442426750829/8.0),
13193 REAL_CONST(84088.146708767847/8.0),
13194 REAL_CONST(84110.852523459922/8.0),
13195 REAL_CONST(84133.559870620171/8.0),
13196 REAL_CONST(84156.268750041796/8.0),
13197 REAL_CONST(84178.979161518029/8.0),
13198 REAL_CONST(84201.691104842204/8.0),
13199 REAL_CONST(84224.404579807713/8.0),
13200 REAL_CONST(84247.119586208006/8.0),
13201 REAL_CONST(84269.83612383662/8.0),
13202 REAL_CONST(84292.55419248715/8.0),
13203 REAL_CONST(84315.273791953281/8.0),
13204 REAL_CONST(84337.994922028738/8.0),
13205 REAL_CONST(84360.717582507335/8.0),
13206 REAL_CONST(84383.441773182945/8.0),
13207 REAL_CONST(84406.167493849513/8.0),
13208 REAL_CONST(84428.894744301069/8.0),
13209 REAL_CONST(84451.623524331691/8.0),
13210 REAL_CONST(84474.353833735542/8.0),
13211 REAL_CONST(84497.085672306828/8.0),
13212 REAL_CONST(84519.819039839858/8.0),
13213 REAL_CONST(84542.553936128999/8.0),
13214 REAL_CONST(84565.290360968676/8.0),
13215 REAL_CONST(84588.028314153402/8.0),
13216 REAL_CONST(84610.767795477717/8.0),
13217 REAL_CONST(84633.508804736295/8.0),
13218 REAL_CONST(84656.251341723822/8.0),
13219 REAL_CONST(84678.995406235073/8.0),
13220 REAL_CONST(84701.740998064924/8.0),
13221 REAL_CONST(84724.488117008252/8.0),
13222 REAL_CONST(84747.236762860062/8.0),
13223 REAL_CONST(84769.986935415407/8.0),
13224 REAL_CONST(84792.73863446941/8.0),
13225 REAL_CONST(84815.491859817252/8.0),
13226 REAL_CONST(84838.246611254188/8.0),
13227 REAL_CONST(84861.002888575575/8.0),
13228 REAL_CONST(84883.760691576768/8.0),
13229 REAL_CONST(84906.520020053256/8.0),
13230 REAL_CONST(84929.28087380057/8.0),
13231 REAL_CONST(84952.043252614312/8.0),
13232 REAL_CONST(84974.807156290146/8.0),
13233 REAL_CONST(84997.572584623806/8.0),
13234 REAL_CONST(85020.339537411113/8.0),
13235 REAL_CONST(85043.108014447949/8.0),
13236 REAL_CONST(85065.878015530237/8.0),
13237 REAL_CONST(85088.649540453989/8.0),
13238 REAL_CONST(85111.422589015303/8.0),
13239 REAL_CONST(85134.197161010321/8.0),
13240 REAL_CONST(85156.973256235244/8.0),
13241 REAL_CONST(85179.750874486374/8.0),
13242 REAL_CONST(85202.530015560071/8.0),
13243 REAL_CONST(85225.310679252725/8.0),
13244 REAL_CONST(85248.092865360857/8.0),
13245 REAL_CONST(85270.876573681016/8.0),
13246 REAL_CONST(85293.661804009811/8.0),
13247 REAL_CONST(85316.448556143951/8.0),
13248 REAL_CONST(85339.236829880188/8.0),
13249 REAL_CONST(85362.026625015351/8.0),
13250 REAL_CONST(85384.817941346351/8.0),
13251 REAL_CONST(85407.610778670132/8.0),
13252 REAL_CONST(85430.405136783724/8.0),
13253 REAL_CONST(85453.201015484257/8.0),
13254 REAL_CONST(85475.998414568865/8.0),
13255 REAL_CONST(85498.797333834795/8.0),
13256 REAL_CONST(85521.597773079353/8.0),
13257 REAL_CONST(85544.399732099904/8.0),
13258 REAL_CONST(85567.203210693886/8.0),
13259 REAL_CONST(85590.008208658808/8.0),
13260 REAL_CONST(85612.814725792239/8.0),
13261 REAL_CONST(85635.62276189182/8.0),
13262 REAL_CONST(85658.432316755265/8.0),
13263 REAL_CONST(85681.243390180331/8.0),
13264 REAL_CONST(85704.055981964877/8.0),
13265 REAL_CONST(85726.870091906807/8.0),
13266 REAL_CONST(85749.685719804082/8.0),
13267 REAL_CONST(85772.502865454764/8.0),
13268 REAL_CONST(85795.321528656961/8.0),
13269 REAL_CONST(85818.141709208852/8.0),
13270 REAL_CONST(85840.963406908675/8.0),
13271 REAL_CONST(85863.78662155474/8.0),
13272 REAL_CONST(85886.611352945445/8.0),
13273 REAL_CONST(85909.437600879217/8.0),
13274 REAL_CONST(85932.26536515457/8.0),
13275 REAL_CONST(85955.094645570091/8.0),
13276 REAL_CONST(85977.92544192441/8.0),
13277 REAL_CONST(86000.757754016275/8.0),
13278 REAL_CONST(86023.591581644432/8.0),
13279 REAL_CONST(86046.426924607746/8.0),
13280 REAL_CONST(86069.263782705122/8.0),
13281 REAL_CONST(86092.102155735556/8.0),
13282 REAL_CONST(86114.942043498071/8.0),
13283 REAL_CONST(86137.783445791807/8.0),
13284 REAL_CONST(86160.626362415918/8.0),
13285 REAL_CONST(86183.470793169676/8.0),
13286 REAL_CONST(86206.316737852379/8.0),
13287 REAL_CONST(86229.164196263402/8.0),
13288 REAL_CONST(86252.013168202204/8.0),
13289 REAL_CONST(86274.863653468303/8.0),
13290 REAL_CONST(86297.715651861261/8.0),
13291 REAL_CONST(86320.569163180728/8.0),
13292 REAL_CONST(86343.424187226425/8.0),
13293 REAL_CONST(86366.280723798132/8.0),
13294 REAL_CONST(86389.138772695675/8.0),
13295 REAL_CONST(86411.998333718977/8.0),
13296 REAL_CONST(86434.859406668009/8.0),
13297 REAL_CONST(86457.721991342827/8.0),
13298 REAL_CONST(86480.586087543532/8.0),
13299 REAL_CONST(86503.451695070296/8.0),
13300 REAL_CONST(86526.318813723352/8.0),
13301 REAL_CONST(86549.187443303032/8.0),
13302 REAL_CONST(86572.057583609683/8.0),
13303 REAL_CONST(86594.929234443756/8.0),
13304 REAL_CONST(86617.802395605773/8.0),
13305 REAL_CONST(86640.677066896271/8.0),
13306 REAL_CONST(86663.553248115903/8.0),
13307 REAL_CONST(86686.43093906538/8.0),
13308 REAL_CONST(86709.310139545443/8.0),
13309 REAL_CONST(86732.190849356964/8.0),
13310 REAL_CONST(86755.073068300815/8.0),
13311 REAL_CONST(86777.956796177954/8.0),
13312 REAL_CONST(86800.842032789442/8.0),
13313 REAL_CONST(86823.728777936354/8.0),
13314 REAL_CONST(86846.617031419853/8.0),
13315 REAL_CONST(86869.506793041175/8.0),
13316 REAL_CONST(86892.398062601613/8.0),
13317 REAL_CONST(86915.290839902518/8.0),
13318 REAL_CONST(86938.185124745316/8.0),
13319 REAL_CONST(86961.080916931489/8.0),
13320 REAL_CONST(86983.978216262592/8.0),
13321 REAL_CONST(87006.87702254027/8.0),
13322 REAL_CONST(87029.777335566177/8.0),
13323 REAL_CONST(87052.67915514209/8.0),
13324 REAL_CONST(87075.582481069796/8.0),
13325 REAL_CONST(87098.487313151185/8.0),
13326 REAL_CONST(87121.39365118822/8.0),
13327 REAL_CONST(87144.301494982894/8.0),
13328 REAL_CONST(87167.210844337285/8.0),
13329 REAL_CONST(87190.121699053532/8.0),
13330 REAL_CONST(87213.034058933845/8.0),
13331 REAL_CONST(87235.947923780506/8.0),
13332 REAL_CONST(87258.863293395829/8.0),
13333 REAL_CONST(87281.780167582241/8.0),
13334 REAL_CONST(87304.698546142172/8.0),
13335 REAL_CONST(87327.618428878181/8.0),
13336 REAL_CONST(87350.539815592856/8.0),
13337 REAL_CONST(87373.462706088845/8.0),
13338 REAL_CONST(87396.387100168897/8.0),
13339 REAL_CONST(87419.312997635774/8.0),
13340 REAL_CONST(87442.240398292357/8.0),
13341 REAL_CONST(87465.16930194154/8.0),
13342 REAL_CONST(87488.099708386319/8.0),
13343 REAL_CONST(87511.031617429733/8.0),
13344 REAL_CONST(87533.965028874911/8.0),
13345 REAL_CONST(87556.899942525008/8.0),
13346 REAL_CONST(87579.836358183282/8.0),
13347 REAL_CONST(87602.774275653021/8.0),
13348 REAL_CONST(87625.713694737613/8.0),
13349 REAL_CONST(87648.654615240492/8.0),
13350 REAL_CONST(87671.597036965148/8.0),
13351 REAL_CONST(87694.540959715145/8.0),
13352 REAL_CONST(87717.486383294105/8.0),
13353 REAL_CONST(87740.433307505737/8.0),
13354 REAL_CONST(87763.381732153779/8.0),
13355 REAL_CONST(87786.331657042057/8.0),
13356 REAL_CONST(87809.283081974456/8.0),
13357 REAL_CONST(87832.236006754916/8.0),
13358 REAL_CONST(87855.190431187453/8.0),
13359 REAL_CONST(87878.146355076155/8.0),
13360 REAL_CONST(87901.103778225151/8.0),
13361 REAL_CONST(87924.062700438633/8.0),
13362 REAL_CONST(87947.023121520891/8.0),
13363 REAL_CONST(87969.985041276246/8.0),
13364 REAL_CONST(87992.948459509105/8.0),
13365 REAL_CONST(88015.913376023906/8.0),
13366 REAL_CONST(88038.879790625171/8.0),
13367 REAL_CONST(88061.847703117513/8.0),
13368 REAL_CONST(88084.817113305573/8.0),
13369 REAL_CONST(88107.788020994049/8.0),
13370 REAL_CONST(88130.760425987726/8.0),
13371 REAL_CONST(88153.734328091465/8.0),
13372 REAL_CONST(88176.709727110137/8.0),
13373 REAL_CONST(88199.686622848749/8.0),
13374 REAL_CONST(88222.665015112303/8.0),
13375 REAL_CONST(88245.644903705906/8.0),
13376 REAL_CONST(88268.626288434709/8.0),
13377 REAL_CONST(88291.609169103947/8.0),
13378 REAL_CONST(88314.593545518903/8.0),
13379 REAL_CONST(88337.579417484914/8.0),
13380 REAL_CONST(88360.566784807408/8.0),
13381 REAL_CONST(88383.555647291854/8.0),
13382 REAL_CONST(88406.546004743795/8.0),
13383 REAL_CONST(88429.537856968818/8.0),
13384 REAL_CONST(88452.531203772611/8.0),
13385 REAL_CONST(88475.52604496089/8.0),
13386 REAL_CONST(88498.522380339447/8.0),
13387 REAL_CONST(88521.52020971413/8.0),
13388 REAL_CONST(88544.519532890874/8.0),
13389 REAL_CONST(88567.520349675644/8.0),
13390 REAL_CONST(88590.522659874507/8.0),
13391 REAL_CONST(88613.526463293543/8.0),
13392 REAL_CONST(88636.531759738922/8.0),
13393 REAL_CONST(88659.538549016899/8.0),
13394 REAL_CONST(88682.546830933745/8.0),
13395 REAL_CONST(88705.556605295846/8.0),
13396 REAL_CONST(88728.567871909589/8.0),
13397 REAL_CONST(88751.580630581491/8.0),
13398 REAL_CONST(88774.594881118086/8.0),
13399 REAL_CONST(88797.610623325963/8.0),
13400 REAL_CONST(88820.62785701183/8.0),
13401 REAL_CONST(88843.646581982393/8.0),
13402 REAL_CONST(88866.666798044462/8.0),
13403 REAL_CONST(88889.688505004888/8.0),
13404 REAL_CONST(88912.711702670611/8.0),
13405 REAL_CONST(88935.7363908486/8.0),
13406 REAL_CONST(88958.762569345898/8.0),
13407 REAL_CONST(88981.790237969632/8.0),
13408 REAL_CONST(89004.81939652696/8.0),
13409 REAL_CONST(89027.850044825114/8.0),
13410 REAL_CONST(89050.882182671412/8.0),
13411 REAL_CONST(89073.9158098732/8.0),
13412 REAL_CONST(89096.950926237885/8.0),
13413 REAL_CONST(89119.987531572973/8.0),
13414 REAL_CONST(89143.025625686001/8.0),
13415 REAL_CONST(89166.065208384563/8.0),
13416 REAL_CONST(89189.106279476357/8.0),
13417 REAL_CONST(89212.148838769106/8.0),
13418 REAL_CONST(89235.192886070581/8.0),
13419 REAL_CONST(89258.238421188667/8.0),
13420 REAL_CONST(89281.285443931265/8.0),
13421 REAL_CONST(89304.333954106376/8.0),
13422 REAL_CONST(89327.383951522017/8.0),
13423 REAL_CONST(89350.435435986306/8.0),
13424 REAL_CONST(89373.488407307406/8.0),
13425 REAL_CONST(89396.542865293537/8.0),
13426 REAL_CONST(89419.598809753006/8.0),
13427 REAL_CONST(89442.656240494165/8.0),
13428 REAL_CONST(89465.715157325409/8.0),
13429 REAL_CONST(89488.775560055219/8.0),
13430 REAL_CONST(89511.837448492137/8.0),
13431 REAL_CONST(89534.900822444746/8.0),
13432 REAL_CONST(89557.965681721733/8.0),
13433 REAL_CONST(89581.032026131812/8.0),
13434 REAL_CONST(89604.099855483742/8.0),
13435 REAL_CONST(89627.169169586399/8.0),
13436 REAL_CONST(89650.239968248672/8.0),
13437 REAL_CONST(89673.312251279538/8.0),
13438 REAL_CONST(89696.386018488018/8.0),
13439 REAL_CONST(89719.461269683205/8.0),
13440 REAL_CONST(89742.53800467425/8.0),
13441 REAL_CONST(89765.616223270365/8.0),
13442 REAL_CONST(89788.69592528083/8.0),
13443 REAL_CONST(89811.777110514988/8.0),
13444 REAL_CONST(89834.859778782207/8.0),
13445 REAL_CONST(89857.943929891975/8.0),
13446 REAL_CONST(89881.029563653807/8.0),
13447 REAL_CONST(89904.116679877261/8.0),
13448 REAL_CONST(89927.205278372014/8.0),
13449 REAL_CONST(89950.29535894774/8.0),
13450 REAL_CONST(89973.386921414218/8.0),
13451 REAL_CONST(89996.479965581268/8.0),
13452 REAL_CONST(90019.574491258769/8.0),
13453 REAL_CONST(90042.670498256688/8.0),
13454 REAL_CONST(90065.767986385021/8.0),
13455 REAL_CONST(90088.866955453836/8.0),
13456 REAL_CONST(90111.967405273259/8.0),
13457 REAL_CONST(90135.069335653476/8.0),
13458 REAL_CONST(90158.172746404758/8.0),
13459 REAL_CONST(90181.277637337407/8.0),
13460 REAL_CONST(90204.384008261797/8.0),
13461 REAL_CONST(90227.49185898836/8.0),
13462 REAL_CONST(90250.601189327586/8.0),
13463 REAL_CONST(90273.711999090039/8.0),
13464 REAL_CONST(90296.824288086325/8.0),
13465 REAL_CONST(90319.938056127125/8.0),
13466 REAL_CONST(90343.053303023189/8.0),
13467 REAL_CONST(90366.170028585286/8.0),
13468 REAL_CONST(90389.288232624298/8.0),
13469 REAL_CONST(90412.407914951138/8.0),
13470 REAL_CONST(90435.529075376777/8.0),
13471 REAL_CONST(90458.651713712257/8.0),
13472 REAL_CONST(90481.775829768681/8.0),
13473 REAL_CONST(90504.901423357209/8.0),
13474 REAL_CONST(90528.028494289058/8.0),
13475 REAL_CONST(90551.157042375504/8.0),
13476 REAL_CONST(90574.287067427911/8.0),
13477 REAL_CONST(90597.418569257643/8.0),
13478 REAL_CONST(90620.551547676194/8.0),
13479 REAL_CONST(90643.686002495073/8.0),
13480 REAL_CONST(90666.821933525847/8.0),
13481 REAL_CONST(90689.959340580186/8.0),
13482 REAL_CONST(90713.098223469773/8.0),
13483 REAL_CONST(90736.238582006365/8.0),
13484 REAL_CONST(90759.380416001804/8.0),
13485 REAL_CONST(90782.523725267951/8.0),
13486 REAL_CONST(90805.668509616764/8.0),
13487 REAL_CONST(90828.814768860233/8.0),
13488 REAL_CONST(90851.962502810435/8.0),
13489 REAL_CONST(90875.11171127946/8.0),
13490 REAL_CONST(90898.262394079517/8.0),
13491 REAL_CONST(90921.414551022855/8.0),
13492 REAL_CONST(90944.568181921743/8.0),
13493 REAL_CONST(90967.72328658856/8.0),
13494 REAL_CONST(90990.879864835719/8.0),
13495 REAL_CONST(91014.037916475718/8.0),
13496 REAL_CONST(91037.19744132107/8.0),
13497 REAL_CONST(91060.358439184391/8.0),
13498 REAL_CONST(91083.520909878338/8.0),
13499 REAL_CONST(91106.684853215629/8.0),
13500 REAL_CONST(91129.850269009039/8.0),
13501 REAL_CONST(91153.017157071401/8.0),
13502 REAL_CONST(91176.185517215621/8.0),
13503 REAL_CONST(91199.355349254649/8.0),
13504 REAL_CONST(91222.526653001492/8.0),
13505 REAL_CONST(91245.699428269247/8.0),
13506 REAL_CONST(91268.873674871036/8.0),
13507 REAL_CONST(91292.049392620058/8.0),
13508 REAL_CONST(91315.226581329553/8.0),
13509 REAL_CONST(91338.405240812834/8.0),
13510 REAL_CONST(91361.585370883287/8.0),
13511 REAL_CONST(91384.766971354344/8.0),
13512 REAL_CONST(91407.950042039476/8.0),
13513 REAL_CONST(91431.134582752245/8.0),
13514 REAL_CONST(91454.320593306256/8.0),
13515 REAL_CONST(91477.508073515171/8.0),
13516 REAL_CONST(91500.697023192712/8.0),
13517 REAL_CONST(91523.887442152685/8.0),
13518 REAL_CONST(91547.07933020893/8.0),
13519 REAL_CONST(91570.272687175326/8.0),
13520 REAL_CONST(91593.467512865856/8.0),
13521 REAL_CONST(91616.663807094534/8.0),
13522 REAL_CONST(91639.861569675442/8.0),
13523 REAL_CONST(91663.060800422725/8.0),
13524 REAL_CONST(91686.261499150554/8.0),
13525 REAL_CONST(91709.463665673218/8.0),
13526 REAL_CONST(91732.66729980502/8.0),
13527 REAL_CONST(91755.872401360321/8.0),
13528 REAL_CONST(91779.078970153569/8.0),
13529 REAL_CONST(91802.287005999257/8.0),
13530 REAL_CONST(91825.49650871192/8.0),
13531 REAL_CONST(91848.707478106167/8.0),
13532 REAL_CONST(91871.91991399668/8.0),
13533 REAL_CONST(91895.133816198169/8.0),
13534 REAL_CONST(91918.349184525418/8.0),
13535 REAL_CONST(91941.566018793281/8.0),
13536 REAL_CONST(91964.784318816659/8.0),
13537 REAL_CONST(91988.004084410495/8.0),
13538 REAL_CONST(92011.22531538982/8.0),
13539 REAL_CONST(92034.448011569708/8.0),
13540 REAL_CONST(92057.672172765277/8.0),
13541 REAL_CONST(92080.897798791746/8.0),
13542 REAL_CONST(92104.124889464365/8.0),
13543 REAL_CONST(92127.353444598411/8.0),
13544 REAL_CONST(92150.58346400928/8.0),
13545 REAL_CONST(92173.814947512379/8.0),
13546 REAL_CONST(92197.04789492322/8.0),
13547 REAL_CONST(92220.282306057314/8.0),
13548 REAL_CONST(92243.518180730272/8.0),
13549 REAL_CONST(92266.755518757753/8.0),
13550 REAL_CONST(92289.994319955469/8.0),
13551 REAL_CONST(92313.234584139194/8.0),
13552 REAL_CONST(92336.476311124774/8.0),
13553 REAL_CONST(92359.719500728082/8.0),
13554 REAL_CONST(92382.964152765067/8.0),
13555 REAL_CONST(92406.210267051734/8.0),
13556 REAL_CONST(92429.457843404161/8.0),
13557 REAL_CONST(92452.706881638471/8.0),
13558 REAL_CONST(92475.957381570814/8.0),
13559 REAL_CONST(92499.209343017443/8.0),
13560 REAL_CONST(92522.462765794655/8.0),
13561 REAL_CONST(92545.717649718805/8.0),
13562 REAL_CONST(92568.973994606305/8.0),
13563 REAL_CONST(92592.231800273614/8.0),
13564 REAL_CONST(92615.491066537259/8.0),
13565 REAL_CONST(92638.751793213814/8.0),
13566 REAL_CONST(92662.01398011994/8.0),
13567 REAL_CONST(92685.277627072326/8.0),
13568 REAL_CONST(92708.54273388772/8.0),
13569 REAL_CONST(92731.809300382942/8.0),
13570 REAL_CONST(92755.077326374871/8.0),
13571 REAL_CONST(92778.346811680414/8.0),
13572 REAL_CONST(92801.617756116568/8.0),
13573 REAL_CONST(92824.890159500384/8.0),
13574 REAL_CONST(92848.164021648947/8.0),
13575 REAL_CONST(92871.439342379424/8.0),
13576 REAL_CONST(92894.716121509016/8.0),
13577 REAL_CONST(92917.994358855023/8.0),
13578 REAL_CONST(92941.274054234746/8.0),
13579 REAL_CONST(92964.555207465572/8.0),
13580 REAL_CONST(92987.837818364962/8.0),
13581 REAL_CONST(93011.121886750407/8.0),
13582 REAL_CONST(93034.407412439468/8.0),
13583 REAL_CONST(93057.694395249753/8.0),
13584 REAL_CONST(93080.982834998955/8.0),
13585 REAL_CONST(93104.272731504767/8.0),
13586 REAL_CONST(93127.564084584999/8.0),
13587 REAL_CONST(93150.856894057491/8.0),
13588 REAL_CONST(93174.15115974014/8.0),
13589 REAL_CONST(93197.446881450916/8.0),
13590 REAL_CONST(93220.744059007804/8.0),
13591 REAL_CONST(93244.04269222889/8.0),
13592 REAL_CONST(93267.342780932304/8.0),
13593 REAL_CONST(93290.644324936235/8.0),
13594 REAL_CONST(93313.947324058914/8.0),
13595 REAL_CONST(93337.251778118633/8.0),
13596 REAL_CONST(93360.557686933767/8.0),
13597 REAL_CONST(93383.865050322696/8.0),
13598 REAL_CONST(93407.173868103928/8.0),
13599 REAL_CONST(93430.484140095941/8.0),
13600 REAL_CONST(93453.795866117362/8.0),
13601 REAL_CONST(93477.109045986799/8.0),
13602 REAL_CONST(93500.423679522952/8.0),
13603 REAL_CONST(93523.739766544561/8.0),
13604 REAL_CONST(93547.057306870454/8.0),
13605 REAL_CONST(93570.376300319491/8.0),
13606 REAL_CONST(93593.696746710571/8.0),
13607 REAL_CONST(93617.018645862699/8.0),
13608 REAL_CONST(93640.341997594893/8.0),
13609 REAL_CONST(93663.666801726242/8.0),
13610 REAL_CONST(93686.993058075881/8.0),
13611 REAL_CONST(93710.320766463032/8.0),
13612 REAL_CONST(93733.64992670693/8.0),
13613 REAL_CONST(93756.980538626914/8.0),
13614 REAL_CONST(93780.312602042337/8.0),
13615 REAL_CONST(93803.646116772637/8.0),
13616 REAL_CONST(93826.981082637285/8.0),
13617 REAL_CONST(93850.317499455836/8.0),
13618 REAL_CONST(93873.655367047861/8.0),
13619 REAL_CONST(93896.994685233032/8.0),
13620 REAL_CONST(93920.335453831038/8.0),
13621 REAL_CONST(93943.677672661666/8.0),
13622 REAL_CONST(93967.021341544707/8.0),
13623 REAL_CONST(93990.366460300051/8.0),
13624 REAL_CONST(94013.713028747632/8.0),
13625 REAL_CONST(94037.061046707429/8.0),
13626 REAL_CONST(94060.410513999494/8.0),
13627 REAL_CONST(94083.761430443905/8.0),
13628 REAL_CONST(94107.113795860845/8.0),
13629 REAL_CONST(94130.467610070496/8.0),
13630 REAL_CONST(94153.822872893157/8.0),
13631 REAL_CONST(94177.179584149111/8.0),
13632 REAL_CONST(94200.537743658759/8.0),
13633 REAL_CONST(94223.897351242529/8.0),
13634 REAL_CONST(94247.25840672091/8.0),
13635 REAL_CONST(94270.620909914433/8.0),
13636 REAL_CONST(94293.98486064373/8.0),
13637 REAL_CONST(94317.350258729421/8.0),
13638 REAL_CONST(94340.71710399224/8.0),
13639 REAL_CONST(94364.085396252936/8.0),
13640 REAL_CONST(94387.455135332348/8.0),
13641 REAL_CONST(94410.82632105134/8.0),
13642 REAL_CONST(94434.198953230851/8.0),
13643 REAL_CONST(94457.573031691878/8.0),
13644 REAL_CONST(94480.948556255447/8.0),
13645 REAL_CONST(94504.325526742658/8.0),
13646 REAL_CONST(94527.70394297468/8.0),
13647 REAL_CONST(94551.083804772716/8.0),
13648 REAL_CONST(94574.465111958023/8.0),
13649 REAL_CONST(94597.847864351934/8.0),
13650 REAL_CONST(94621.232061775823/8.0),
13651 REAL_CONST(94644.617704051096/8.0),
13652 REAL_CONST(94668.004790999272/8.0),
13653 REAL_CONST(94691.393322441872/8.0),
13654 REAL_CONST(94714.783298200506/8.0),
13655 REAL_CONST(94738.174718096794/8.0),
13656 REAL_CONST(94761.567581952477/8.0),
13657 REAL_CONST(94784.961889589307/8.0),
13658 REAL_CONST(94808.357640829097/8.0),
13659 REAL_CONST(94831.754835493703/8.0),
13660 REAL_CONST(94855.153473405066/8.0),
13661 REAL_CONST(94878.553554385173/8.0),
13662 REAL_CONST(94901.955078256055/8.0),
13663 REAL_CONST(94925.358044839784/8.0),
13664 REAL_CONST(94948.762453958523/8.0),
13665 REAL_CONST(94972.168305434476/8.0),
13666 REAL_CONST(94995.575599089891/8.0),
13667 REAL_CONST(95018.984334747074/8.0),
13668 REAL_CONST(95042.394512228391/8.0),
13669 REAL_CONST(95065.806131356265/8.0),
13670 REAL_CONST(95089.219191953176/8.0),
13671 REAL_CONST(95112.633693841635/8.0),
13672 REAL_CONST(95136.04963684424/8.0),
13673 REAL_CONST(95159.467020783617/8.0),
13674 REAL_CONST(95182.885845482466/8.0),
13675 REAL_CONST(95206.306110763529/8.0),
13676 REAL_CONST(95229.727816449609/8.0),
13677 REAL_CONST(95253.150962363579/8.0),
13678 REAL_CONST(95276.575548328314/8.0),
13679 REAL_CONST(95300.001574166803/8.0),
13680 REAL_CONST(95323.429039702052/8.0),
13681 REAL_CONST(95346.857944757154/8.0),
13682 REAL_CONST(95370.288289155214/8.0),
13683 REAL_CONST(95393.720072719429/8.0),
13684 REAL_CONST(95417.153295273019/8.0),
13685 REAL_CONST(95440.587956639298/8.0),
13686 REAL_CONST(95464.024056641589/8.0),
13687 REAL_CONST(95487.461595103305/8.0),
13688 REAL_CONST(95510.900571847902/8.0),
13689 REAL_CONST(95534.340986698866/8.0),
13690 REAL_CONST(95557.782839479783/8.0),
13691 REAL_CONST(95581.226130014256/8.0),
13692 REAL_CONST(95604.670858125959/8.0),
13693 REAL_CONST(95628.117023638595/8.0),
13694 REAL_CONST(95651.564626375985/8.0),
13695 REAL_CONST(95675.013666161918/8.0),
13696 REAL_CONST(95698.464142820303/8.0),
13697 REAL_CONST(95721.916056175076/8.0),
13698 REAL_CONST(95745.369406050231/8.0),
13699 REAL_CONST(95768.824192269807/8.0),
13700 REAL_CONST(95792.280414657915/8.0),
13701 REAL_CONST(95815.738073038709/8.0),
13702 REAL_CONST(95839.197167236387/8.0),
13703 REAL_CONST(95862.657697075221/8.0),
13704 REAL_CONST(95886.11966237954/8.0),
13705 REAL_CONST(95909.583062973688/8.0),
13706 REAL_CONST(95933.047898682111/8.0),
13707 REAL_CONST(95956.514169329268/8.0),
13708 REAL_CONST(95979.981874739708/8.0),
13709 REAL_CONST(96003.451014738006/8.0),
13710 REAL_CONST(96026.921589148798/8.0),
13711 REAL_CONST(96050.393597796792/8.0),
13712 REAL_CONST(96073.867040506724/8.0),
13713 REAL_CONST(96097.341917103375/8.0),
13714 REAL_CONST(96120.818227411626/8.0),
13715 REAL_CONST(96144.295971256375/8.0),
13716 REAL_CONST(96167.775148462577/8.0),
13717 REAL_CONST(96191.255758855244/8.0),
13718 REAL_CONST(96214.737802259449/8.0),
13719 REAL_CONST(96238.221278500292/8.0),
13720 REAL_CONST(96261.70618740299/8.0),
13721 REAL_CONST(96285.192528792715/8.0),
13722 REAL_CONST(96308.680302494788/8.0),
13723 REAL_CONST(96332.169508334526/8.0),
13724 REAL_CONST(96355.660146137321/8.0),
13725 REAL_CONST(96379.152215728609/8.0),
13726 REAL_CONST(96402.645716933868/8.0),
13727 REAL_CONST(96426.14064957868/8.0),
13728 REAL_CONST(96449.637013488609/8.0),
13729 REAL_CONST(96473.134808489311/8.0),
13730 REAL_CONST(96496.63403440651/8.0),
13731 REAL_CONST(96520.134691065963/8.0),
13732 REAL_CONST(96543.636778293469/8.0),
13733 REAL_CONST(96567.140295914898/8.0),
13734 REAL_CONST(96590.645243756153/8.0),
13735 REAL_CONST(96614.151621643221/8.0),
13736 REAL_CONST(96637.659429402134/8.0),
13737 REAL_CONST(96661.168666858954/8.0),
13738 REAL_CONST(96684.679333839798/8.0),
13739 REAL_CONST(96708.191430170875/8.0),
13740 REAL_CONST(96731.70495567839/8.0),
13741 REAL_CONST(96755.219910188665/8.0),
13742 REAL_CONST(96778.736293528011/8.0),
13743 REAL_CONST(96802.254105522836/8.0),
13744 REAL_CONST(96825.77334599958/8.0),
13745 REAL_CONST(96849.29401478474/8.0),
13746 REAL_CONST(96872.816111704873/8.0),
13747 REAL_CONST(96896.339636586577/8.0),
13748 REAL_CONST(96919.864589256511/8.0),
13749 REAL_CONST(96943.390969541389/8.0),
13750 REAL_CONST(96966.918777267958/8.0),
13751 REAL_CONST(96990.448012263048/8.0),
13752 REAL_CONST(97013.978674353522/8.0),
13753 REAL_CONST(97037.510763366285/8.0),
13754 REAL_CONST(97061.044279128328/8.0),
13755 REAL_CONST(97084.579221466673/8.0),
13756 REAL_CONST(97108.115590208385/8.0),
13757 REAL_CONST(97131.653385180587/8.0),
13758 REAL_CONST(97155.19260621049/8.0),
13759 REAL_CONST(97178.733253125291/8.0),
13760 REAL_CONST(97202.2753257523/8.0),
13761 REAL_CONST(97225.81882391886/8.0),
13762 REAL_CONST(97249.363747452342/8.0),
13763 REAL_CONST(97272.910096180189/8.0),
13764 REAL_CONST(97296.457869929916/8.0),
13765 REAL_CONST(97320.007068529041/8.0),
13766 REAL_CONST(97343.557691805196/8.0),
13767 REAL_CONST(97367.109739586012/8.0),
13768 REAL_CONST(97390.663211699197/8.0),
13769 REAL_CONST(97414.218107972498/8.0),
13770 REAL_CONST(97437.774428233737/8.0),
13771 REAL_CONST(97461.332172310766/8.0),
13772 REAL_CONST(97484.891340031507/8.0),
13773 REAL_CONST(97508.451931223899/8.0),
13774 REAL_CONST(97532.013945715982/8.0),
13775 REAL_CONST(97555.577383335811/8.0),
13776 REAL_CONST(97579.142243911512/8.0),
13777 REAL_CONST(97602.708527271257/8.0),
13778 REAL_CONST(97626.276233243261/8.0),
13779 REAL_CONST(97649.845361655811/8.0),
13780 REAL_CONST(97673.415912337223/8.0),
13781 REAL_CONST(97696.987885115886/8.0),
13782 REAL_CONST(97720.561279820206/8.0),
13783 REAL_CONST(97744.1360962787/8.0),
13784 REAL_CONST(97767.712334319876/8.0),
13785 REAL_CONST(97791.289993772341/8.0),
13786 REAL_CONST(97814.869074464703/8.0),
13787 REAL_CONST(97838.449576225685/8.0),
13788 REAL_CONST(97862.031498883996/8.0),
13789 REAL_CONST(97885.614842268449/8.0),
13790 REAL_CONST(97909.199606207883/8.0),
13791 REAL_CONST(97932.785790531183/8.0),
13792 REAL_CONST(97956.37339506732/8.0),
13793 REAL_CONST(97979.962419645264/8.0),
13794 REAL_CONST(98003.552864094076/8.0),
13795 REAL_CONST(98027.144728242856/8.0),
13796 REAL_CONST(98050.738011920766/8.0),
13797 REAL_CONST(98074.332714956996/8.0),
13798 REAL_CONST(98097.928837180807/8.0),
13799 REAL_CONST(98121.526378421506/8.0),
13800 REAL_CONST(98145.125338508456/8.0),
13801 REAL_CONST(98168.725717271067/8.0),
13802 REAL_CONST(98192.327514538789/8.0),
13803 REAL_CONST(98215.930730141132/8.0),
13804 REAL_CONST(98239.535363907664/8.0),
13805 REAL_CONST(98263.141415668011/8.0),
13806 REAL_CONST(98286.748885251814/8.0),
13807 REAL_CONST(98310.357772488816/8.0),
13808 REAL_CONST(98333.968077208759/8.0),
13809 REAL_CONST(98357.579799241488/8.0),
13810 REAL_CONST(98381.192938416847/8.0),
13811 REAL_CONST(98404.807494564782/8.0),
13812 REAL_CONST(98428.42346751524/8.0),
13813 REAL_CONST(98452.040857098269/8.0),
13814 REAL_CONST(98475.659663143917/8.0),
13815 REAL_CONST(98499.27988548232/8.0),
13816 REAL_CONST(98522.901523943656/8.0),
13817 REAL_CONST(98546.524578358163/8.0),
13818 REAL_CONST(98570.149048556093/8.0),
13819 REAL_CONST(98593.774934367786/8.0),
13820 REAL_CONST(98617.402235623624/8.0),
13821 REAL_CONST(98641.030952154048/8.0),
13822 REAL_CONST(98664.661083789513/8.0),
13823 REAL_CONST(98688.292630360564/8.0),
13824 REAL_CONST(98711.925591697771/8.0),
13825 REAL_CONST(98735.559967631794/8.0),
13826 REAL_CONST(98759.195757993293/8.0),
13827 REAL_CONST(98782.832962613014/8.0),
13828 REAL_CONST(98806.471581321734/8.0),
13829 REAL_CONST(98830.111613950285/8.0),
13830 REAL_CONST(98853.753060329575/8.0),
13831 REAL_CONST(98877.39592029051/8.0),
13832 REAL_CONST(98901.040193664099/8.0),
13833 REAL_CONST(98924.68588028138/8.0),
13834 REAL_CONST(98948.33297997342/8.0),
13835 REAL_CONST(98971.981492571387/8.0),
13836 REAL_CONST(98995.63141790645/8.0),
13837 REAL_CONST(99019.282755809851/8.0),
13838 REAL_CONST(99042.935506112874/8.0),
13839 REAL_CONST(99066.589668646877/8.0),
13840 REAL_CONST(99090.245243243233/8.0),
13841 REAL_CONST(99113.902229733401/8.0),
13842 REAL_CONST(99137.560627948857/8.0),
13843 REAL_CONST(99161.220437721131/8.0),
13844 REAL_CONST(99184.881658881859/8.0),
13845 REAL_CONST(99208.544291262631/8.0),
13846 REAL_CONST(99232.208334695169/8.0),
13847 REAL_CONST(99255.87378901121/8.0),
13848 REAL_CONST(99279.540654042547/8.0),
13849 REAL_CONST(99303.208929621018/8.0),
13850 REAL_CONST(99326.878615578535/8.0),
13851 REAL_CONST(99350.549711746993/8.0),
13852 REAL_CONST(99374.222217958435/8.0),
13853 REAL_CONST(99397.896134044888/8.0),
13854 REAL_CONST(99421.571459838422/8.0),
13855 REAL_CONST(99445.248195171211/8.0),
13856 REAL_CONST(99468.926339875441/8.0),
13857 REAL_CONST(99492.605893783344/8.0),
13858 REAL_CONST(99516.286856727209/8.0),
13859 REAL_CONST(99539.969228539398/8.0),
13860 REAL_CONST(99563.653009052287/8.0),
13861 REAL_CONST(99587.338198098325/8.0),
13862 REAL_CONST(99611.024795510006/8.0),
13863 REAL_CONST(99634.712801119866/8.0),
13864 REAL_CONST(99658.402214760499/8.0),
13865 REAL_CONST(99682.093036264545/8.0),
13866 REAL_CONST(99705.785265464699/8.0),
13867 REAL_CONST(99729.478902193689/8.0),
13868 REAL_CONST(99753.173946284325/8.0),
13869 REAL_CONST(99776.870397569437/8.0),
13870 REAL_CONST(99800.56825588191/8.0),
13871 REAL_CONST(99824.267521054688/8.0),
13872 REAL_CONST(99847.968192920773/8.0),
13873 REAL_CONST(99871.670271313182/8.0),
13874 REAL_CONST(99895.373756065004/8.0),
13875 REAL_CONST(99919.078647009388/8.0),
13876 REAL_CONST(99942.78494397951/8.0),
13877 REAL_CONST(99966.492646808634/8.0),
13878 REAL_CONST(99990.20175533001/8.0),
13879 REAL_CONST(100013.91226937699/8.0),
13880 REAL_CONST(100037.62418878295/8.0),
13881 REAL_CONST(100061.33751338134/8.0),
13882 REAL_CONST(100085.05224300563/8.0),
13883 REAL_CONST(100108.76837748935/8.0),
13884 REAL_CONST(100132.4859166661/8.0),
13885 REAL_CONST(100156.2048603695/8.0),
13886 REAL_CONST(100179.92520843323/8.0),
13887 REAL_CONST(100203.64696069101/8.0),
13888 REAL_CONST(100227.37011697664/8.0),
13889 REAL_CONST(100251.09467712394/8.0),
13890 REAL_CONST(100274.82064096678/8.0),
13891 REAL_CONST(100298.54800833909/8.0),
13892 REAL_CONST(100322.27677907483/8.0),
13893 REAL_CONST(100346.00695300807/8.0),
13894 REAL_CONST(100369.73852997283/8.0),
13895 REAL_CONST(100393.47150980328/8.0),
13896 REAL_CONST(100417.20589233354/8.0),
13897 REAL_CONST(100440.94167739789/8.0),
13898 REAL_CONST(100464.67886483055/8.0),
13899 REAL_CONST(100488.41745446586/8.0),
13900 REAL_CONST(100512.1574461382/8.0),
13901 REAL_CONST(100535.89883968196/8.0),
13902 REAL_CONST(100559.64163493161/8.0),
13903 REAL_CONST(100583.38583172169/8.0),
13904 REAL_CONST(100607.13142988674/8.0),
13905 REAL_CONST(100630.87842926137/8.0),
13906 REAL_CONST(100654.62682968024/8.0),
13907 REAL_CONST(100678.37663097809/8.0),
13908 REAL_CONST(100702.12783298964/8.0),
13909 REAL_CONST(100725.88043554971/8.0),
13910 REAL_CONST(100749.63443849317/8.0),
13911 REAL_CONST(100773.38984165489/8.0),
13912 REAL_CONST(100797.14664486986/8.0),
13913 REAL_CONST(100820.90484797307/8.0),
13914 REAL_CONST(100844.66445079957/8.0),
13915 REAL_CONST(100868.42545318443/8.0),
13916 REAL_CONST(100892.18785496285/8.0),
13917 REAL_CONST(100915.95165596998/8.0),
13918 REAL_CONST(100939.71685604109/8.0),
13919 REAL_CONST(100963.48345501146/8.0),
13920 REAL_CONST(100987.25145271645/8.0),
13921 REAL_CONST(101011.02084899142/8.0),
13922 REAL_CONST(101034.79164367182/8.0),
13923 REAL_CONST(101058.56383659317/8.0),
13924 REAL_CONST(101082.33742759094/8.0),
13925 REAL_CONST(101106.11241650078/8.0),
13926 REAL_CONST(101129.88880315828/8.0),
13927 REAL_CONST(101153.66658739912/8.0),
13928 REAL_CONST(101177.44576905905/8.0),
13929 REAL_CONST(101201.22634797383/8.0),
13930 REAL_CONST(101225.00832397929/8.0),
13931 REAL_CONST(101248.7916969113/8.0),
13932 REAL_CONST(101272.57646660579/8.0),
13933 REAL_CONST(101296.36263289873/8.0),
13934 REAL_CONST(101320.15019562612/8.0),
13935 REAL_CONST(101343.93915462404/8.0),
13936 REAL_CONST(101367.7295097286/8.0),
13937 REAL_CONST(101391.52126077596/8.0),
13938 REAL_CONST(101415.31440760233/8.0),
13939 REAL_CONST(101439.10895004397/8.0),
13940 REAL_CONST(101462.9048879372/8.0),
13941 REAL_CONST(101486.70222111834/8.0),
13942 REAL_CONST(101510.50094942382/8.0),
13943 REAL_CONST(101534.30107269008/8.0),
13944 REAL_CONST(101558.10259075361/8.0),
13945 REAL_CONST(101581.90550345098/8.0),
13946 REAL_CONST(101605.70981061876/8.0),
13947 REAL_CONST(101629.5155120936/8.0),
13948 REAL_CONST(101653.32260771218/8.0),
13949 REAL_CONST(101677.13109731126/8.0),
13950 REAL_CONST(101700.9409807276/8.0),
13951 REAL_CONST(101724.75225779804/8.0),
13952 REAL_CONST(101748.56492835947/8.0),
13953 REAL_CONST(101772.37899224881/8.0),
13954 REAL_CONST(101796.19444930303/8.0),
13955 REAL_CONST(101820.01129935916/8.0),
13956 REAL_CONST(101843.82954225427/8.0),
13957 REAL_CONST(101867.64917782549/8.0),
13958 REAL_CONST(101891.47020590997/8.0),
13959 REAL_CONST(101915.29262634492/8.0),
13960 REAL_CONST(101939.11643896763/8.0),
13961 REAL_CONST(101962.94164361537/8.0),
13962 REAL_CONST(101986.76824012553/8.0),
13963 REAL_CONST(102010.59622833549/8.0),
13964 REAL_CONST(102034.42560808272/8.0),
13965 REAL_CONST(102058.25637920471/8.0),
13966 REAL_CONST(102082.08854153901/8.0),
13967 REAL_CONST(102105.9220949232/8.0),
13968 REAL_CONST(102129.75703919494/8.0),
13969 REAL_CONST(102153.59337419191/8.0),
13970 REAL_CONST(102177.43109975185/8.0),
13971 REAL_CONST(102201.27021571253/8.0),
13972 REAL_CONST(102225.1107219118/8.0),
13973 REAL_CONST(102248.95261818753/8.0),
13974 REAL_CONST(102272.79590437764/8.0),
13975 REAL_CONST(102296.64058032009/8.0),
13976 REAL_CONST(102320.48664585294/8.0),
13977 REAL_CONST(102344.33410081422/8.0),
13978 REAL_CONST(102368.18294504205/8.0),
13979 REAL_CONST(102392.03317837461/8.0),
13980 REAL_CONST(102415.88480065008/8.0),
13981 REAL_CONST(102439.73781170673/8.0),
13982 REAL_CONST(102463.59221138287/8.0),
13983 REAL_CONST(102487.44799951684/8.0),
13984 REAL_CONST(102511.30517594704/8.0),
13985 REAL_CONST(102535.1637405119/8.0),
13986 REAL_CONST(102559.02369304992/8.0),
13987 REAL_CONST(102582.88503339965/8.0),
13988 REAL_CONST(102606.74776139967/8.0),
13989 REAL_CONST(102630.61187688859/8.0),
13990 REAL_CONST(102654.4773797051/8.0),
13991 REAL_CONST(102678.34426968795/8.0),
13992 REAL_CONST(102702.21254667587/8.0),
13993 REAL_CONST(102726.08221050771/8.0),
13994 REAL_CONST(102749.95326102231/8.0),
13995 REAL_CONST(102773.8256980586/8.0),
13996 REAL_CONST(102797.69952145554/8.0),
13997 REAL_CONST(102821.57473105213/8.0),
13998 REAL_CONST(102845.45132668741/8.0),
13999 REAL_CONST(102869.32930820051/8.0),
14000 REAL_CONST(102893.20867543056/8.0),
14001 REAL_CONST(102917.08942821674/8.0),
14002 REAL_CONST(102940.97156639832/8.0),
14003 REAL_CONST(102964.85508981455/8.0),
14004 REAL_CONST(102988.73999830478/8.0),
14005 REAL_CONST(103012.6262917084/8.0),
14006 REAL_CONST(103036.51396986481/8.0),
14007 REAL_CONST(103060.40303261351/8.0),
14008 REAL_CONST(103084.293479794/8.0),
14009 REAL_CONST(103108.18531124585/8.0),
14010 REAL_CONST(103132.07852680866/8.0),
14011 REAL_CONST(103155.97312632212/8.0),
14012 REAL_CONST(103179.8691096259/8.0),
14013 REAL_CONST(103203.76647655977/8.0),
14014 REAL_CONST(103227.66522696352/8.0),
14015 REAL_CONST(103251.56536067701/8.0),
14016 REAL_CONST(103275.46687754011/8.0),
14017 REAL_CONST(103299.36977739276/8.0),
14018 REAL_CONST(103323.27406007495/8.0),
14019 REAL_CONST(103347.1797254267/8.0),
14020 REAL_CONST(103371.0867732881/8.0),
14021 REAL_CONST(103394.99520349925/8.0),
14022 REAL_CONST(103418.90501590034/8.0),
14023 REAL_CONST(103442.81621033157/8.0),
14024 REAL_CONST(103466.72878663319/8.0),
14025 REAL_CONST(103490.64274464553/8.0),
14026 REAL_CONST(103514.55808420894/8.0),
14027 REAL_CONST(103538.4748051638/8.0),
14028 REAL_CONST(103562.39290735057/8.0),
14029 REAL_CONST(103586.31239060973/8.0),
14030 REAL_CONST(103610.23325478184/8.0),
14031 REAL_CONST(103634.15549970744/8.0),
14032 REAL_CONST(103658.07912522719/8.0),
14033 REAL_CONST(103682.00413118176/8.0),
14034 REAL_CONST(103705.93051741188/8.0),
14035 REAL_CONST(103729.85828375829/8.0),
14036 REAL_CONST(103753.78743006183/8.0),
14037 REAL_CONST(103777.71795616332/8.0),
14038 REAL_CONST(103801.64986190372/8.0),
14039 REAL_CONST(103825.58314712394/8.0),
14040 REAL_CONST(103849.51781166498/8.0),
14041 REAL_CONST(103873.4538553679/8.0),
14042 REAL_CONST(103897.39127807376/8.0),
14043 REAL_CONST(103921.33007962372/8.0),
14044 REAL_CONST(103945.27025985894/8.0),
14045 REAL_CONST(103969.21181862066/8.0),
14046 REAL_CONST(103993.15475575015/8.0),
14047 REAL_CONST(104017.0990710887/8.0),
14048 REAL_CONST(104041.0447644777/8.0),
14049 REAL_CONST(104064.99183575854/8.0),
14050 REAL_CONST(104088.94028477269/8.0),
14051 REAL_CONST(104112.89011136163/8.0),
14052 REAL_CONST(104136.84131536692/8.0),
14053 REAL_CONST(104160.79389663014/8.0),
14054 REAL_CONST(104184.74785499295/8.0),
14055 REAL_CONST(104208.70319029699/8.0),
14056 REAL_CONST(104232.65990238401/8.0),
14057 REAL_CONST(104256.61799109577/8.0),
14058 REAL_CONST(104280.57745627411/8.0),
14059 REAL_CONST(104304.53829776087/8.0),
14060 REAL_CONST(104328.50051539797/8.0),
14061 REAL_CONST(104352.46410902737/8.0),
14062 REAL_CONST(104376.42907849104/8.0),
14063 REAL_CONST(104400.39542363105/8.0),
14064 REAL_CONST(104424.36314428948/8.0),
14065 REAL_CONST(104448.33224030846/8.0),
14066 REAL_CONST(104472.3027115302/8.0),
14067 REAL_CONST(104496.27455779689/8.0),
14068 REAL_CONST(104520.24777895081/8.0),
14069 REAL_CONST(104544.22237483428/8.0),
14070 REAL_CONST(104568.19834528965/8.0),
14071 REAL_CONST(104592.17569015936/8.0),
14072 REAL_CONST(104616.15440928582/8.0),
14073 REAL_CONST(104640.13450251156/8.0),
14074 REAL_CONST(104664.1159696791/8.0),
14075 REAL_CONST(104688.09881063103/8.0),
14076 REAL_CONST(104712.08302520998/8.0),
14077 REAL_CONST(104736.06861325864/8.0),
14078 REAL_CONST(104760.05557461972/8.0),
14079 REAL_CONST(104784.043909136/8.0),
14080 REAL_CONST(104808.03361665027/8.0),
14081 REAL_CONST(104832.0246970054/8.0),
14082 REAL_CONST(104856.01715004431/8.0),
14083 REAL_CONST(104880.01097560991/8.0),
14084 REAL_CONST(104904.00617354522/8.0),
14085 REAL_CONST(104928.00274369326/8.0),
14086 REAL_CONST(104952.00068589712/8.0),
14087 REAL_CONST(104975.99999999993/8.0),
14088 REAL_CONST(105000.00068584486/8.0),
14089 REAL_CONST(105024.00274327511/8.0),
14090 REAL_CONST(105048.00617213396/8.0),
14091 REAL_CONST(105072.0109722647/8.0),
14092 REAL_CONST(105096.0171435107/8.0),
14093 REAL_CONST(105120.02468571534/8.0),
14094 REAL_CONST(105144.03359872208/8.0),
14095 REAL_CONST(105168.04388237436/8.0),
14096 REAL_CONST(105192.05553651576/8.0),
14097 REAL_CONST(105216.06856098982/8.0),
14098 REAL_CONST(105240.08295564017/8.0),
14099 REAL_CONST(105264.09872031047/8.0),
14100 REAL_CONST(105288.11585484444/8.0),
14101 REAL_CONST(105312.13435908582/8.0),
14102 REAL_CONST(105336.1542328784/8.0),
14103 REAL_CONST(105360.17547606604/8.0),
14104 REAL_CONST(105384.19808849262/8.0),
14105 REAL_CONST(105408.22207000206/8.0),
14106 REAL_CONST(105432.24742043833/8.0),
14107 REAL_CONST(105456.27413964548/8.0),
14108 REAL_CONST(105480.30222746753/8.0),
14109 REAL_CONST(105504.33168374863/8.0),
14110 REAL_CONST(105528.36250833291/8.0),
14111 REAL_CONST(105552.39470106458/8.0),
14112 REAL_CONST(105576.42826178786/8.0),
14113 REAL_CONST(105600.46319034706/8.0),
14114 REAL_CONST(105624.49948658649/8.0),
14115 REAL_CONST(105648.53715035053/8.0),
14116 REAL_CONST(105672.5761814836/8.0),
14117 REAL_CONST(105696.61657983017/8.0),
14118 REAL_CONST(105720.65834523473/8.0),
14119 REAL_CONST(105744.70147754184/8.0),
14120 REAL_CONST(105768.7459765961/8.0),
14121 REAL_CONST(105792.79184224214/8.0),
14122 REAL_CONST(105816.83907432464/8.0),
14123 REAL_CONST(105840.88767268835/8.0),
14124 REAL_CONST(105864.93763717801/8.0),
14125 REAL_CONST(105888.98896763846/8.0),
14126 REAL_CONST(105913.04166391456/8.0),
14127 REAL_CONST(105937.09572585119/8.0),
14128 REAL_CONST(105961.15115329332/8.0),
14129 REAL_CONST(105985.20794608595/8.0),
14130 REAL_CONST(106009.26610407409/8.0),
14131 REAL_CONST(106033.32562710284/8.0),
14132 REAL_CONST(106057.38651501729/8.0),
14133 REAL_CONST(106081.44876766266/8.0),
14134 REAL_CONST(106105.51238488412/8.0),
14135 REAL_CONST(106129.57736652695/8.0),
14136 REAL_CONST(106153.64371243643/8.0),
14137 REAL_CONST(106177.71142245791/8.0),
14138 REAL_CONST(106201.78049643678/8.0),
14139 REAL_CONST(106225.85093421848/8.0),
14140 REAL_CONST(106249.92273564848/8.0),
14141 REAL_CONST(106273.99590057228/8.0),
14142 REAL_CONST(106298.07042883546/8.0),
14143 REAL_CONST(106322.14632028362/8.0),
14144 REAL_CONST(106346.22357476239/8.0),
14145 REAL_CONST(106370.30219211751/8.0),
14146 REAL_CONST(106394.38217219469/8.0),
14147 REAL_CONST(106418.46351483969/8.0),
14148 REAL_CONST(106442.54621989837/8.0),
14149 REAL_CONST(106466.63028721658/8.0),
14150 REAL_CONST(106490.71571664025/8.0),
14151 REAL_CONST(106514.80250801529/8.0),
14152 REAL_CONST(106538.89066118775/8.0),
14153 REAL_CONST(106562.98017600364/8.0),
14154 REAL_CONST(106587.07105230905/8.0),
14155 REAL_CONST(106611.16328995011/8.0),
14156 REAL_CONST(106635.25688877302/8.0),
14157 REAL_CONST(106659.35184862395/8.0),
14158 REAL_CONST(106683.44816934918/8.0),
14159 REAL_CONST(106707.54585079502/8.0),
14160 REAL_CONST(106731.64489280782/8.0),
14161 REAL_CONST(106755.74529523395/8.0),
14162 REAL_CONST(106779.84705791986/8.0),
14163 REAL_CONST(106803.95018071201/8.0),
14164 REAL_CONST(106828.05466345693/8.0),
14165 REAL_CONST(106852.16050600118/8.0),
14166 REAL_CONST(106876.26770819137/8.0),
14167 REAL_CONST(106900.37626987413/8.0),
14168 REAL_CONST(106924.48619089619/8.0),
14169 REAL_CONST(106948.59747110425/8.0),
14170 REAL_CONST(106972.71011034511/8.0),
14171 REAL_CONST(106996.82410846559/8.0),
14172 REAL_CONST(107020.93946531253/8.0),
14173 REAL_CONST(107045.05618073288/8.0),
14174 REAL_CONST(107069.17425457356/8.0),
14175 REAL_CONST(107093.29368668159/8.0),
14176 REAL_CONST(107117.41447690397/8.0),
14177 REAL_CONST(107141.53662508781/8.0),
14178 REAL_CONST(107165.66013108024/8.0),
14179 REAL_CONST(107189.7849947284/8.0),
14180 REAL_CONST(107213.91121587952/8.0),
14181 REAL_CONST(107238.03879438085/8.0),
14182 REAL_CONST(107262.16773007967/8.0),
14183 REAL_CONST(107286.29802282334/8.0),
14184 REAL_CONST(107310.42967245923/8.0),
14185 REAL_CONST(107334.56267883476/8.0),
14186 REAL_CONST(107358.69704179741/8.0),
14187 REAL_CONST(107382.83276119467/8.0),
14188 REAL_CONST(107406.96983687414/8.0),
14189 REAL_CONST(107431.10826868335/8.0),
14190 REAL_CONST(107455.24805646999/8.0),
14191 REAL_CONST(107479.38920008171/8.0),
14192 REAL_CONST(107503.53169936626/8.0),
14193 REAL_CONST(107527.67555417139/8.0),
14194 REAL_CONST(107551.82076434491/8.0),
14195 REAL_CONST(107575.96732973469/8.0),
14196 REAL_CONST(107600.11525018861/8.0),
14197 REAL_CONST(107624.26452555459/8.0),
14198 REAL_CONST(107648.41515568066/8.0),
14199 REAL_CONST(107672.56714041479/8.0),
14200 REAL_CONST(107696.72047960508/8.0),
14201 REAL_CONST(107720.87517309963/8.0),
14202 REAL_CONST(107745.03122074658/8.0),
14203 REAL_CONST(107769.18862239413/8.0),
14204 REAL_CONST(107793.34737789053/8.0),
14205 REAL_CONST(107817.50748708403/8.0),
14206 REAL_CONST(107841.66894982298/8.0),
14207 REAL_CONST(107865.83176595572/8.0),
14208 REAL_CONST(107889.99593533068/8.0),
14209 REAL_CONST(107914.16145779629/8.0),
14210 REAL_CONST(107938.32833320105/8.0),
14211 REAL_CONST(107962.49656139348/8.0),
14212 REAL_CONST(107986.66614222217/8.0),
14213 REAL_CONST(108010.83707553572/8.0),
14214 REAL_CONST(108035.00936118282/8.0),
14215 REAL_CONST(108059.18299901215/8.0),
14216 REAL_CONST(108083.35798887245/8.0),
14217 REAL_CONST(108107.53433061253/8.0),
14218 REAL_CONST(108131.71202408121/8.0),
14219 REAL_CONST(108155.89106912735/8.0),
14220 REAL_CONST(108180.07146559987/8.0),
14221 REAL_CONST(108204.25321334775/8.0),
14222 REAL_CONST(108228.43631221994/8.0),
14223 REAL_CONST(108252.62076206553/8.0),
14224 REAL_CONST(108276.80656273357/8.0),
14225 REAL_CONST(108300.99371407321/8.0),
14226 REAL_CONST(108325.18221593359/8.0),
14227 REAL_CONST(108349.37206816394/8.0),
14228 REAL_CONST(108373.56327061349/8.0),
14229 REAL_CONST(108397.75582313156/8.0),
14230 REAL_CONST(108421.94972556747/8.0),
14231 REAL_CONST(108446.1449777706/8.0),
14232 REAL_CONST(108470.34157959036/8.0),
14233 REAL_CONST(108494.53953087622/8.0),
14234 REAL_CONST(108518.73883147769/8.0),
14235 REAL_CONST(108542.93948124432/8.0),
14236 REAL_CONST(108567.14148002568/8.0),
14237 REAL_CONST(108591.34482767139/8.0),
14238 REAL_CONST(108615.54952403114/8.0),
14239 REAL_CONST(108639.75556895464/8.0),
14240 REAL_CONST(108663.96296229165/8.0),
14241 REAL_CONST(108688.17170389196/8.0),
14242 REAL_CONST(108712.38179360541/8.0),
14243 REAL_CONST(108736.59323128188/8.0),
14244 REAL_CONST(108760.80601677128/8.0),
14245 REAL_CONST(108785.02014992358/8.0),
14246 REAL_CONST(108809.23563058881/8.0),
14247 REAL_CONST(108833.45245861699/8.0),
14248 REAL_CONST(108857.67063385822/8.0),
14249 REAL_CONST(108881.89015616261/8.0),
14250 REAL_CONST(108906.11102538036/8.0),
14251 REAL_CONST(108930.33324136167/8.0),
14252 REAL_CONST(108954.55680395682/8.0),
14253 REAL_CONST(108978.78171301607/8.0),
14254 REAL_CONST(109003.00796838976/8.0),
14255 REAL_CONST(109027.23556992831/8.0),
14256 REAL_CONST(109051.46451748211/8.0),
14257 REAL_CONST(109075.69481090162/8.0),
14258 REAL_CONST(109099.92645003737/8.0),
14259 REAL_CONST(109124.15943473989/8.0),
14260 REAL_CONST(109148.39376485976/8.0),
14261 REAL_CONST(109172.62944024763/8.0),
14262 REAL_CONST(109196.86646075416/8.0),
14263 REAL_CONST(109221.10482623006/8.0),
14264 REAL_CONST(109245.34453652608/8.0),
14265 REAL_CONST(109269.58559149304/8.0),
14266 REAL_CONST(109293.82799098175/8.0),
14267 REAL_CONST(109318.07173484311/8.0),
14268 REAL_CONST(109342.31682292801/8.0),
14269 REAL_CONST(109366.56325508743/8.0),
14270 REAL_CONST(109390.81103117237/8.0),
14271 REAL_CONST(109415.06015103387/8.0),
14272 REAL_CONST(109439.31061452301/8.0),
14273 REAL_CONST(109463.56242149093/8.0),
14274 REAL_CONST(109487.8155717888/8.0),
14275 REAL_CONST(109512.07006526781/8.0),
14276 REAL_CONST(109536.3259017792/8.0),
14277 REAL_CONST(109560.58308117429/8.0),
14278 REAL_CONST(109584.8416033044/8.0),
14279 REAL_CONST(109609.1014680209/8.0),
14280 REAL_CONST(109633.36267517522/8.0),
14281 REAL_CONST(109657.62522461878/8.0),
14282 REAL_CONST(109681.88911620311/8.0),
14283 REAL_CONST(109706.15434977971/8.0),
14284 REAL_CONST(109730.4209252002/8.0),
14285 REAL_CONST(109754.68884231619/8.0),
14286 REAL_CONST(109778.95810097932/8.0),
14287 REAL_CONST(109803.22870104131/8.0),
14288 REAL_CONST(109827.50064235389/8.0),
14289 REAL_CONST(109851.77392476884/8.0),
14290 REAL_CONST(109876.04854813802/8.0),
14291 REAL_CONST(109900.32451231324/8.0),
14292 REAL_CONST(109924.60181714644/8.0),
14293 REAL_CONST(109948.88046248957/8.0),
14294 REAL_CONST(109973.1604481946/8.0),
14295 REAL_CONST(109997.44177411357/8.0),
14296 REAL_CONST(110021.72444009855/8.0),
14297 REAL_CONST(110046.00844600165/8.0),
14298 REAL_CONST(110070.29379167501/8.0),
14299 REAL_CONST(110094.58047697082/8.0),
14300 REAL_CONST(110118.86850174134/8.0),
14301 REAL_CONST(110143.15786583882/8.0),
14302 REAL_CONST(110167.44856911557/8.0),
14303 REAL_CONST(110191.74061142397/8.0),
14304 REAL_CONST(110216.03399261639/8.0),
14305 REAL_CONST(110240.32871254528/8.0),
14306 REAL_CONST(110264.62477106311/8.0),
14307 REAL_CONST(110288.9221680224/8.0),
14308 REAL_CONST(110313.22090327571/8.0),
14309 REAL_CONST(110337.52097667565/8.0),
14310 REAL_CONST(110361.82238807483/8.0),
14311 REAL_CONST(110386.12513732594/8.0),
14312 REAL_CONST(110410.42922428172/8.0),
14313 REAL_CONST(110434.73464879491/8.0),
14314 REAL_CONST(110459.04141071832/8.0),
14315 REAL_CONST(110483.34950990479/8.0),
14316 REAL_CONST(110507.6589462072/8.0),
14317 REAL_CONST(110531.96971947847/8.0),
14318 REAL_CONST(110556.28182957157/8.0),
14319 REAL_CONST(110580.5952763395/8.0),
14320 REAL_CONST(110604.91005963532/8.0),
14321 REAL_CONST(110629.22617931209/8.0),
14322 REAL_CONST(110653.54363522294/8.0),
14323 REAL_CONST(110677.86242722106/8.0),
14324 REAL_CONST(110702.18255515963/8.0),
14325 REAL_CONST(110726.50401889188/8.0),
14326 REAL_CONST(110750.82681827113/8.0),
14327 REAL_CONST(110775.1509531507/8.0),
14328 REAL_CONST(110799.47642338395/8.0),
14329 REAL_CONST(110823.80322882428/8.0),
14330 REAL_CONST(110848.13136932514/8.0),
14331 REAL_CONST(110872.46084474004/8.0),
14332 REAL_CONST(110896.79165492248/8.0),
14333 REAL_CONST(110921.12379972603/8.0),
14334 REAL_CONST(110945.4572790043/8.0),
14335 REAL_CONST(110969.79209261097/8.0),
14336 REAL_CONST(110994.12824039967/8.0),
14337 REAL_CONST(111018.46572222417/8.0),
14338 REAL_CONST(111042.80453793822/8.0),
14339 REAL_CONST(111067.14468739564/8.0),
14340 REAL_CONST(111091.48617045028/8.0),
14341 REAL_CONST(111115.82898695602/8.0),
14342 REAL_CONST(111140.1731367668/8.0),
14343 REAL_CONST(111164.51861973655/8.0),
14344 REAL_CONST(111188.86543571933/8.0),
14345 REAL_CONST(111213.21358456917/8.0),
14346 REAL_CONST(111237.56306614014/8.0),
14347 REAL_CONST(111261.91388028639/8.0),
14348 REAL_CONST(111286.26602686207/8.0),
14349 REAL_CONST(111310.61950572141/8.0),
14350 REAL_CONST(111334.97431671864/8.0),
14351 REAL_CONST(111359.33045970804/8.0),
14352 REAL_CONST(111383.68793454397/8.0),
14353 REAL_CONST(111408.04674108078/8.0),
14354 REAL_CONST(111432.40687917286/8.0),
14355 REAL_CONST(111456.76834867468/8.0),
14356 REAL_CONST(111481.13114944073/8.0),
14357 REAL_CONST(111505.49528132551/8.0),
14358 REAL_CONST(111529.86074418361/8.0),
14359 REAL_CONST(111554.22753786964/8.0),
14360 REAL_CONST(111578.59566223821/8.0),
14361 REAL_CONST(111602.96511714405/8.0),
14362 REAL_CONST(111627.33590244185/8.0),
14363 REAL_CONST(111651.7080179864/8.0),
14364 REAL_CONST(111676.08146363248/8.0),
14365 REAL_CONST(111700.45623923496/8.0),
14366 REAL_CONST(111724.8323446487/8.0),
14367 REAL_CONST(111749.20977972864/8.0),
14368 REAL_CONST(111773.58854432974/8.0),
14369 REAL_CONST(111797.96863830699/8.0),
14370 REAL_CONST(111822.35006151545/8.0),
14371 REAL_CONST(111846.73281381019/8.0),
14372 REAL_CONST(111871.11689504632/8.0),
14373 REAL_CONST(111895.50230507903/8.0),
14374 REAL_CONST(111919.8890437635/8.0),
14375 REAL_CONST(111944.27711095495/8.0),
14376 REAL_CONST(111968.6665065087/8.0),
14377 REAL_CONST(111993.05723028004/8.0),
14378 REAL_CONST(112017.44928212435/8.0),
14379 REAL_CONST(112041.842661897/8.0),
14380 REAL_CONST(112066.23736945343/8.0),
14381 REAL_CONST(112090.63340464912/8.0),
14382 REAL_CONST(112115.03076733962/8.0),
14383 REAL_CONST(112139.42945738042/8.0),
14384 REAL_CONST(112163.82947462716/8.0),
14385 REAL_CONST(112188.23081893545/8.0),
14386 REAL_CONST(112212.63349016097/8.0),
14387 REAL_CONST(112237.03748815943/8.0),
14388 REAL_CONST(112261.44281278658/8.0),
14389 REAL_CONST(112285.84946389822/8.0),
14390 REAL_CONST(112310.25744135017/8.0),
14391 REAL_CONST(112334.66674499828/8.0),
14392 REAL_CONST(112359.07737469849/8.0),
14393 REAL_CONST(112383.48933030672/8.0),
14394 REAL_CONST(112407.90261167898/8.0),
14395 REAL_CONST(112432.31721867126/8.0),
14396 REAL_CONST(112456.73315113965/8.0),
14397 REAL_CONST(112481.15040894024/8.0),
14398 REAL_CONST(112505.56899192919/8.0),
14399 REAL_CONST(112529.98889996267/8.0),
14400 REAL_CONST(112554.41013289688/8.0),
14401 REAL_CONST(112578.8326905881/8.0),
14402 REAL_CONST(112603.25657289263/8.0),
14403 REAL_CONST(112627.68177966679/8.0),
14404 REAL_CONST(112652.10831076698/8.0),
14405 REAL_CONST(112676.53616604958/8.0),
14406 REAL_CONST(112700.96534537108/8.0),
14407 REAL_CONST(112725.39584858794/8.0),
14408 REAL_CONST(112749.82767555672/8.0),
14409 REAL_CONST(112774.26082613398/8.0),
14410 REAL_CONST(112798.6953001763/8.0),
14411 REAL_CONST(112823.13109754038/8.0),
14412 REAL_CONST(112847.56821808286/8.0),
14413 REAL_CONST(112872.00666166049/8.0),
14414 REAL_CONST(112896.44642813003/8.0),
14415 REAL_CONST(112920.88751734827/8.0),
14416 REAL_CONST(112945.32992917208/8.0),
14417 REAL_CONST(112969.77366345831/8.0),
14418 REAL_CONST(112994.21872006389/8.0),
14419 REAL_CONST(113018.66509884578/8.0),
14420 REAL_CONST(113043.11279966099/8.0),
14421 REAL_CONST(113067.56182236652/8.0),
14422 REAL_CONST(113092.01216681948/8.0),
14423 REAL_CONST(113116.46383287695/8.0),
14424 REAL_CONST(113140.9168203961/8.0),
14425 REAL_CONST(113165.37112923413/8.0),
14426 REAL_CONST(113189.82675924824/8.0),
14427 REAL_CONST(113214.28371029573/8.0),
14428 REAL_CONST(113238.74198223387/8.0),
14429 REAL_CONST(113263.20157492002/8.0),
14430 REAL_CONST(113287.66248821157/8.0),
14431 REAL_CONST(113312.12472196593/8.0),
14432 REAL_CONST(113336.58827604055/8.0),
14433 REAL_CONST(113361.05315029295/8.0),
14434 REAL_CONST(113385.51934458067/8.0),
14435 REAL_CONST(113409.98685876124/8.0),
14436 REAL_CONST(113434.45569269233/8.0),
14437 REAL_CONST(113458.92584623155/8.0),
14438 REAL_CONST(113483.39731923661/8.0),
14439 REAL_CONST(113507.87011156522/8.0),
14440 REAL_CONST(113532.34422307517/8.0),
14441 REAL_CONST(113556.81965362425/8.0),
14442 REAL_CONST(113581.2964030703/8.0),
14443 REAL_CONST(113605.77447127122/8.0),
14444 REAL_CONST(113630.25385808491/8.0),
14445 REAL_CONST(113654.73456336933/8.0),
14446 REAL_CONST(113679.2165869825/8.0),
14447 REAL_CONST(113703.69992878241/8.0),
14448 REAL_CONST(113728.18458862718/8.0),
14449 REAL_CONST(113752.67056637487/8.0),
14450 REAL_CONST(113777.15786188368/8.0),
14451 REAL_CONST(113801.64647501177/8.0),
14452 REAL_CONST(113826.13640561736/8.0),
14453 REAL_CONST(113850.62765355874/8.0),
14454 REAL_CONST(113875.12021869418/8.0),
14455 REAL_CONST(113899.61410088204/8.0),
14456 REAL_CONST(113924.1092999807/8.0),
14457 REAL_CONST(113948.60581584855/8.0),
14458 REAL_CONST(113973.10364834407/8.0),
14459 REAL_CONST(113997.60279732574/8.0),
14460 REAL_CONST(114022.1032626521/8.0),
14461 REAL_CONST(114046.60504418171/8.0),
14462 REAL_CONST(114071.10814177318/8.0),
14463 REAL_CONST(114095.61255528514/8.0),
14464 REAL_CONST(114120.11828457628/8.0),
14465 REAL_CONST(114144.62532950533/8.0),
14466 REAL_CONST(114169.13368993104/8.0),
14467 REAL_CONST(114193.6433657122/8.0),
14468 REAL_CONST(114218.15435670764/8.0),
14469 REAL_CONST(114242.66666277625/8.0),
14470 REAL_CONST(114267.18028377694/8.0),
14471 REAL_CONST(114291.69521956862/8.0),
14472 REAL_CONST(114316.21147001031/8.0),
14473 REAL_CONST(114340.72903496103/8.0),
14474 REAL_CONST(114365.24791427983/8.0),
14475 REAL_CONST(114389.7681078258/8.0),
14476 REAL_CONST(114414.2896154581/8.0),
14477 REAL_CONST(114438.81243703589/8.0),
14478 REAL_CONST(114463.33657241837/8.0),
14479 REAL_CONST(114487.8620214648/8.0),
14480 REAL_CONST(114512.38878403447/8.0),
14481 REAL_CONST(114536.91685998671/8.0),
14482 REAL_CONST(114561.44624918087/8.0),
14483 REAL_CONST(114585.97695147636/8.0),
14484 REAL_CONST(114610.5089667326/8.0),
14485 REAL_CONST(114635.04229480909/8.0),
14486 REAL_CONST(114659.57693556532/8.0),
14487 REAL_CONST(114684.11288886084/8.0),
14488 REAL_CONST(114708.65015455526/8.0),
14489 REAL_CONST(114733.18873250818/8.0),
14490 REAL_CONST(114757.72862257928/8.0),
14491 REAL_CONST(114782.26982462825/8.0),
14492 REAL_CONST(114806.81233851484/8.0),
14493 REAL_CONST(114831.35616409882/8.0),
14494 REAL_CONST(114855.90130123998/8.0),
14495 REAL_CONST(114880.44774979822/8.0),
14496 REAL_CONST(114904.99550963337/8.0),
14497 REAL_CONST(114929.5445806054/8.0),
14498 REAL_CONST(114954.09496257425/8.0),
14499 REAL_CONST(114978.64665539992/8.0),
14500 REAL_CONST(115003.19965894247/8.0),
14501 REAL_CONST(115027.75397306195/8.0),
14502 REAL_CONST(115052.30959761847/8.0),
14503 REAL_CONST(115076.86653247218/8.0),
14504 REAL_CONST(115101.42477748329/8.0),
14505 REAL_CONST(115125.984332512/8.0),
14506 REAL_CONST(115150.54519741859/8.0),
14507 REAL_CONST(115175.10737206334/8.0),
14508 REAL_CONST(115199.67085630659/8.0),
14509 REAL_CONST(115224.23565000873/8.0),
14510 REAL_CONST(115248.80175303014/8.0),
14511 REAL_CONST(115273.3691652313/8.0),
14512 REAL_CONST(115297.93788647266/8.0),
14513 REAL_CONST(115322.50791661476/8.0),
14514 REAL_CONST(115347.07925551817/8.0),
14515 REAL_CONST(115371.65190304347/8.0),
14516 REAL_CONST(115396.22585905129/8.0),
14517 REAL_CONST(115420.80112340231/8.0),
14518 REAL_CONST(115445.37769595724/8.0),
14519 REAL_CONST(115469.95557657682/8.0),
14520 REAL_CONST(115494.53476512182/8.0),
14521 REAL_CONST(115519.11526145306/8.0),
14522 REAL_CONST(115543.69706543141/8.0),
14523 REAL_CONST(115568.28017691776/8.0),
14524 REAL_CONST(115592.86459577303/8.0),
14525 REAL_CONST(115617.4503218582/8.0),
14526 REAL_CONST(115642.03735503425/8.0),
14527 REAL_CONST(115666.62569516223/8.0),
14528 REAL_CONST(115691.21534210323/8.0),
14529 REAL_CONST(115715.80629571836/8.0),
14530 REAL_CONST(115740.39855586876/8.0),
14531 REAL_CONST(115764.99212241563/8.0),
14532 REAL_CONST(115789.58699522018/8.0),
14533 REAL_CONST(115814.18317414368/8.0),
14534 REAL_CONST(115838.78065904744/8.0),
14535 REAL_CONST(115863.37944979276/8.0),
14536 REAL_CONST(115887.97954624105/8.0),
14537 REAL_CONST(115912.5809482537/8.0),
14538 REAL_CONST(115937.18365569216/8.0),
14539 REAL_CONST(115961.78766841792/8.0),
14540 REAL_CONST(115986.39298629249/8.0),
14541 REAL_CONST(116010.99960917742/8.0),
14542 REAL_CONST(116035.60753693432/8.0),
14543 REAL_CONST(116060.21676942479/8.0),
14544 REAL_CONST(116084.82730651053/8.0),
14545 REAL_CONST(116109.43914805322/8.0),
14546 REAL_CONST(116134.0522939146/8.0),
14547 REAL_CONST(116158.66674395646/8.0),
14548 REAL_CONST(116183.2824980406/8.0),
14549 REAL_CONST(116207.89955602887/8.0),
14550 REAL_CONST(116232.51791778316/8.0),
14551 REAL_CONST(116257.13758316539/8.0),
14552 REAL_CONST(116281.75855203751/8.0),
14553 REAL_CONST(116306.38082426153/8.0),
14554 REAL_CONST(116331.00439969949/8.0),
14555 REAL_CONST(116355.62927821343/8.0),
14556 REAL_CONST(116380.25545966547/8.0),
14557 REAL_CONST(116404.88294391775/8.0),
14558 REAL_CONST(116429.51173083246/8.0),
14559 REAL_CONST(116454.14182027178/8.0),
14560 REAL_CONST(116478.77321209799/8.0),
14561 REAL_CONST(116503.40590617337/8.0),
14562 REAL_CONST(116528.03990236025/8.0),
14563 REAL_CONST(116552.67520052097/8.0),
14564 REAL_CONST(116577.31180051794/8.0),
14565 REAL_CONST(116601.94970221359/8.0),
14566 REAL_CONST(116626.5889054704/8.0),
14567 REAL_CONST(116651.22941015086/8.0),
14568 REAL_CONST(116675.87121611751/8.0),
14569 REAL_CONST(116700.51432323294/8.0),
14570 REAL_CONST(116725.15873135976/8.0),
14571 REAL_CONST(116749.8044403606/8.0),
14572 REAL_CONST(116774.45145009817/8.0),
14573 REAL_CONST(116799.0997604352/8.0),
14574 REAL_CONST(116823.74937123443/8.0),
14575 REAL_CONST(116848.40028235866/8.0),
14576 REAL_CONST(116873.05249367072/8.0),
14577 REAL_CONST(116897.70600503348/8.0),
14578 REAL_CONST(116922.36081630984/8.0),
14579 REAL_CONST(116947.01692736275/8.0),
14580 REAL_CONST(116971.67433805518/8.0),
14581 REAL_CONST(116996.33304825013/8.0),
14582 REAL_CONST(117020.99305781067/8.0),
14583 REAL_CONST(117045.65436659988/8.0),
14584 REAL_CONST(117070.31697448085/8.0),
14585 REAL_CONST(117094.98088131678/8.0),
14586 REAL_CONST(117119.64608697082/8.0),
14587 REAL_CONST(117144.31259130624/8.0),
14588 REAL_CONST(117168.98039418629/8.0),
14589 REAL_CONST(117193.64949547425/8.0),
14590 REAL_CONST(117218.31989503348/8.0),
14591 REAL_CONST(117242.99159272734/8.0),
14592 REAL_CONST(117267.66458841923/8.0),
14593 REAL_CONST(117292.33888197262/8.0),
14594 REAL_CONST(117317.01447325097/8.0),
14595 REAL_CONST(117341.6913621178/8.0),
14596 REAL_CONST(117366.36954843666/8.0),
14597 REAL_CONST(117391.04903207115/8.0),
14598 REAL_CONST(117415.72981288488/8.0),
14599 REAL_CONST(117440.41189074152/8.0),
14600 REAL_CONST(117465.09526550474/8.0),
14601 REAL_CONST(117489.77993703831/8.0),
14602 REAL_CONST(117514.46590520597/8.0),
14603 REAL_CONST(117539.15316987153/8.0),
14604 REAL_CONST(117563.84173089883/8.0),
14605 REAL_CONST(117588.53158815173/8.0),
14606 REAL_CONST(117613.22274149416/8.0),
14607 REAL_CONST(117637.91519079007/8.0),
14608 REAL_CONST(117662.60893590341/8.0),
14609 REAL_CONST(117687.30397669821/8.0),
14610 REAL_CONST(117712.00031303853/8.0),
14611 REAL_CONST(117736.69794478847/8.0),
14612 REAL_CONST(117761.39687181212/8.0),
14613 REAL_CONST(117786.09709397367/8.0),
14614 REAL_CONST(117810.7986111373/8.0),
14615 REAL_CONST(117835.50142316725/8.0),
14616 REAL_CONST(117860.20552992777/8.0),
14617 REAL_CONST(117884.91093128319/8.0),
14618 REAL_CONST(117909.6176270978/8.0),
14619 REAL_CONST(117934.32561723603/8.0),
14620 REAL_CONST(117959.03490156225/8.0),
14621 REAL_CONST(117983.74547994092/8.0),
14622 REAL_CONST(118008.45735223651/8.0),
14623 REAL_CONST(118033.17051831353/8.0),
14624 REAL_CONST(118057.88497803656/8.0),
14625 REAL_CONST(118082.60073127014/8.0),
14626 REAL_CONST(118107.31777787894/8.0),
14627 REAL_CONST(118132.03611772758/8.0),
14628 REAL_CONST(118156.75575068076/8.0),
14629 REAL_CONST(118181.47667660323/8.0),
14630 REAL_CONST(118206.19889535972/8.0),
14631 REAL_CONST(118230.92240681504/8.0),
14632 REAL_CONST(118255.64721083404/8.0),
14633 REAL_CONST(118280.37330728157/8.0),
14634 REAL_CONST(118305.10069602253/8.0),
14635 REAL_CONST(118329.82937692189/8.0),
14636 REAL_CONST(118354.55934984458/8.0),
14637 REAL_CONST(118379.29061465565/8.0),
14638 REAL_CONST(118404.02317122012/8.0),
14639 REAL_CONST(118428.75701940308/8.0),
14640 REAL_CONST(118453.49215906965/8.0),
14641 REAL_CONST(118478.22859008498/8.0),
14642 REAL_CONST(118502.96631231424/8.0),
14643 REAL_CONST(118527.70532562268/8.0),
14644 REAL_CONST(118552.44562987552/8.0),
14645 REAL_CONST(118577.18722493808/8.0),
14646 REAL_CONST(118601.93011067568/8.0),
14647 REAL_CONST(118626.67428695368/8.0),
14648 REAL_CONST(118651.41975363747/8.0),
14649 REAL_CONST(118676.16651059251/8.0),
14650 REAL_CONST(118700.91455768423/8.0),
14651 REAL_CONST(118725.66389477813/8.0),
14652 REAL_CONST(118750.41452173979/8.0),
14653 REAL_CONST(118775.16643843475/8.0),
14654 REAL_CONST(118799.91964472862/8.0),
14655 REAL_CONST(118824.67414048707/8.0),
14656 REAL_CONST(118849.42992557574/8.0),
14657 REAL_CONST(118874.18699986035/8.0),
14658 REAL_CONST(118898.94536320666/8.0),
14659 REAL_CONST(118923.70501548045/8.0),
14660 REAL_CONST(118948.46595654752/8.0),
14661 REAL_CONST(118973.22818627374/8.0),
14662 REAL_CONST(118997.99170452499/8.0),
14663 REAL_CONST(119022.7565111672/8.0),
14664 REAL_CONST(119047.52260606633/8.0),
14665 REAL_CONST(119072.28998908834/8.0),
14666 REAL_CONST(119097.0586600993/8.0),
14667 REAL_CONST(119121.82861896523/8.0),
14668 REAL_CONST(119146.59986555226/8.0),
14669 REAL_CONST(119171.3723997265/8.0),
14670 REAL_CONST(119196.14622135412/8.0),
14671 REAL_CONST(119220.92133030134/8.0),
14672 REAL_CONST(119245.69772643436/8.0),
14673 REAL_CONST(119270.47540961947/8.0),
14674 REAL_CONST(119295.25437972297/8.0),
14675 REAL_CONST(119320.03463661121/8.0),
14676 REAL_CONST(119344.81618015055/8.0),
14677 REAL_CONST(119369.5990102074/8.0),
14678 REAL_CONST(119394.38312664822/8.0),
14679 REAL_CONST(119419.16852933947/8.0),
14680 REAL_CONST(119443.95521814766/8.0),
14681 REAL_CONST(119468.74319293935/8.0),
14682 REAL_CONST(119493.53245358112/8.0),
14683 REAL_CONST(119518.32299993958/8.0),
14684 REAL_CONST(119543.11483188139/8.0),
14685 REAL_CONST(119567.90794927324/8.0),
14686 REAL_CONST(119592.70235198183/8.0),
14687 REAL_CONST(119617.49803987393/8.0),
14688 REAL_CONST(119642.29501281632/8.0),
14689 REAL_CONST(119667.09327067583/8.0),
14690 REAL_CONST(119691.89281331931/8.0),
14691 REAL_CONST(119716.69364061367/8.0),
14692 REAL_CONST(119741.49575242582/8.0),
14693 REAL_CONST(119766.29914862274/8.0),
14694 REAL_CONST(119791.10382907141/8.0),
14695 REAL_CONST(119815.90979363887/8.0),
14696 REAL_CONST(119840.71704219218/8.0),
14697 REAL_CONST(119865.52557459843/8.0),
14698 REAL_CONST(119890.33539072477/8.0),
14699 REAL_CONST(119915.14649043836/8.0),
14700 REAL_CONST(119939.95887360642/8.0),
14701 REAL_CONST(119964.77254009615/8.0),
14702 REAL_CONST(119989.58748977486/8.0),
14703 REAL_CONST(120014.40372250983/8.0),
14704 REAL_CONST(120039.22123816841/8.0),
14705 REAL_CONST(120064.04003661797/8.0),
14706 REAL_CONST(120088.86011772591/8.0),
14707 REAL_CONST(120113.6814813597/8.0),
14708 REAL_CONST(120138.5041273868/8.0),
14709 REAL_CONST(120163.3280556747/8.0),
14710 REAL_CONST(120188.15326609099/8.0),
14711 REAL_CONST(120212.97975850321/8.0),
14712 REAL_CONST(120237.807532779/8.0),
14713 REAL_CONST(120262.63658878599/8.0),
14714 REAL_CONST(120287.46692639188/8.0),
14715 REAL_CONST(120312.29854546436/8.0),
14716 REAL_CONST(120337.13144587121/8.0),
14717 REAL_CONST(120361.9656274802/8.0),
14718 REAL_CONST(120386.80109015915/8.0),
14719 REAL_CONST(120411.63783377589/8.0),
14720 REAL_CONST(120436.47585819835/8.0),
14721 REAL_CONST(120461.31516329442/8.0),
14722 REAL_CONST(120486.15574893207/8.0),
14723 REAL_CONST(120510.99761497928/8.0),
14724 REAL_CONST(120535.84076130406/8.0),
14725 REAL_CONST(120560.68518777451/8.0),
14726 REAL_CONST(120585.53089425867/8.0),
14727 REAL_CONST(120610.3778806247/8.0),
14728 REAL_CONST(120635.22614674074/8.0),
14729 REAL_CONST(120660.07569247499/8.0),
14730 REAL_CONST(120684.92651769568/8.0),
14731 REAL_CONST(120709.77862227106/8.0),
14732 REAL_CONST(120734.63200606944/8.0),
14733 REAL_CONST(120759.48666895913/8.0),
14734 REAL_CONST(120784.3426108085/8.0),
14735 REAL_CONST(120809.19983148595/8.0),
14736 REAL_CONST(120834.05833085992/8.0),
14737 REAL_CONST(120858.91810879884/8.0),
14738 REAL_CONST(120883.77916517125/8.0),
14739 REAL_CONST(120908.64149984565/8.0),
14740 REAL_CONST(120933.5051126906/8.0),
14741 REAL_CONST(120958.37000357473/8.0),
14742 REAL_CONST(120983.23617236665/8.0),
14743 REAL_CONST(121008.10361893504/8.0),
14744 REAL_CONST(121032.97234314861/8.0),
14745 REAL_CONST(121057.84234487606/8.0),
14746 REAL_CONST(121082.71362398617/8.0),
14747 REAL_CONST(121107.58618034775/8.0),
14748 REAL_CONST(121132.46001382964/8.0),
14749 REAL_CONST(121157.33512430069/8.0),
14750 REAL_CONST(121182.21151162982/8.0),
14751 REAL_CONST(121207.08917568595/8.0),
14752 REAL_CONST(121231.96811633807/8.0),
14753 REAL_CONST(121256.84833345517/8.0),
14754 REAL_CONST(121281.72982690629/8.0),
14755 REAL_CONST(121306.61259656049/8.0),
14756 REAL_CONST(121331.49664228689/8.0),
14757 REAL_CONST(121356.38196395461/8.0),
14758 REAL_CONST(121381.26856143285/8.0),
14759 REAL_CONST(121406.15643459078/8.0),
14760 REAL_CONST(121431.04558329767/8.0),
14761 REAL_CONST(121455.93600742276/8.0),
14762 REAL_CONST(121480.82770683538/8.0),
14763 REAL_CONST(121505.72068140487/8.0),
14764 REAL_CONST(121530.61493100057/8.0),
14765 REAL_CONST(121555.51045549192/8.0),
14766 REAL_CONST(121580.40725474835/8.0),
14767 REAL_CONST(121605.30532863933/8.0),
14768 REAL_CONST(121630.20467703436/8.0),
14769 REAL_CONST(121655.10529980299/8.0),
14770 REAL_CONST(121680.00719681478/8.0),
14771 REAL_CONST(121704.91036793934/8.0),
14772 REAL_CONST(121729.81481304632/8.0),
14773 REAL_CONST(121754.72053200539/8.0),
14774 REAL_CONST(121779.62752468624/8.0),
14775 REAL_CONST(121804.53579095862/8.0),
14776 REAL_CONST(121829.44533069231/8.0),
14777 REAL_CONST(121854.3561437571/8.0),
14778 REAL_CONST(121879.26823002285/8.0),
14779 REAL_CONST(121904.1815893594/8.0),
14780 REAL_CONST(121929.09622163669/8.0),
14781 REAL_CONST(121954.01212672464/8.0),
14782 REAL_CONST(121978.92930449323/8.0),
14783 REAL_CONST(122003.84775481246/8.0),
14784 REAL_CONST(122028.76747755238/8.0),
14785 REAL_CONST(122053.68847258303/8.0),
14786 REAL_CONST(122078.61073977455/8.0),
14787 REAL_CONST(122103.53427899707/8.0),
14788 REAL_CONST(122128.45909012076/8.0),
14789 REAL_CONST(122153.38517301581/8.0),
14790 REAL_CONST(122178.31252755247/8.0),
14791 REAL_CONST(122203.24115360099/8.0),
14792 REAL_CONST(122228.17105103172/8.0),
14793 REAL_CONST(122253.10221971494/8.0),
14794 REAL_CONST(122278.03465952107/8.0),
14795 REAL_CONST(122302.96837032049/8.0),
14796 REAL_CONST(122327.90335198362/8.0),
14797 REAL_CONST(122352.83960438096/8.0),
14798 REAL_CONST(122377.777127383/8.0),
14799 REAL_CONST(122402.71592086025/8.0),
14800 REAL_CONST(122427.65598468333/8.0),
14801 REAL_CONST(122452.59731872278/8.0),
14802 REAL_CONST(122477.53992284928/8.0),
14803 REAL_CONST(122502.48379693348/8.0),
14804 REAL_CONST(122527.42894084606/8.0),
14805 REAL_CONST(122552.37535445779/8.0),
14806 REAL_CONST(122577.32303763942/8.0),
14807 REAL_CONST(122602.27199026172/8.0),
14808 REAL_CONST(122627.22221219557/8.0),
14809 REAL_CONST(122652.17370331181/8.0),
14810 REAL_CONST(122677.12646348133/8.0),
14811 REAL_CONST(122702.08049257506/8.0),
14812 REAL_CONST(122727.03579046397/8.0),
14813 REAL_CONST(122751.99235701906/8.0),
14814 REAL_CONST(122776.95019211136/8.0),
14815 REAL_CONST(122801.9092956119/8.0),
14816 REAL_CONST(122826.8696673918/8.0),
14817 REAL_CONST(122851.83130732219/8.0),
14818 REAL_CONST(122876.79421527422/8.0),
14819 REAL_CONST(122901.75839111909/8.0),
14820 REAL_CONST(122926.72383472799/8.0),
14821 REAL_CONST(122951.69054597223/8.0),
14822 REAL_CONST(122976.65852472307/8.0),
14823 REAL_CONST(123001.62777085182/8.0),
14824 REAL_CONST(123026.59828422987/8.0),
14825 REAL_CONST(123051.57006472857/8.0),
14826 REAL_CONST(123076.54311221937/8.0),
14827 REAL_CONST(123101.5174265737/8.0),
14828 REAL_CONST(123126.49300766307/8.0),
14829 REAL_CONST(123151.46985535898/8.0),
14830 REAL_CONST(123176.44796953299/8.0),
14831 REAL_CONST(123201.42735005668/8.0),
14832 REAL_CONST(123226.40799680166/8.0),
14833 REAL_CONST(123251.38990963959/8.0),
14834 REAL_CONST(123276.37308844214/8.0),
14835 REAL_CONST(123301.35753308103/8.0),
14836 REAL_CONST(123326.343243428/8.0),
14837 REAL_CONST(123351.33021935483/8.0),
14838 REAL_CONST(123376.31846073334/8.0),
14839 REAL_CONST(123401.30796743535/8.0),
14840 REAL_CONST(123426.29873933276/8.0),
14841 REAL_CONST(123451.29077629748/8.0),
14842 REAL_CONST(123476.28407820144/8.0),
14843 REAL_CONST(123501.2786449166/8.0),
14844 REAL_CONST(123526.27447631498/8.0),
14845 REAL_CONST(123551.27157226863/8.0),
14846 REAL_CONST(123576.26993264959/8.0),
14847 REAL_CONST(123601.26955732999/8.0),
14848 REAL_CONST(123626.27044618195/8.0),
14849 REAL_CONST(123651.27259907764/8.0),
14850 REAL_CONST(123676.27601588926/8.0),
14851 REAL_CONST(123701.28069648903/8.0),
14852 REAL_CONST(123726.28664074924/8.0),
14853 REAL_CONST(123751.29384854218/8.0),
14854 REAL_CONST(123776.30231974016/8.0),
14855 REAL_CONST(123801.31205421555/8.0),
14856 REAL_CONST(123826.32305184075/8.0),
14857 REAL_CONST(123851.33531248817/8.0),
14858 REAL_CONST(123876.34883603029/8.0),
14859 REAL_CONST(123901.36362233957/8.0),
14860 REAL_CONST(123926.37967128855/8.0),
14861 REAL_CONST(123951.39698274979/8.0),
14862 REAL_CONST(123976.41555659588/8.0),
14863 REAL_CONST(124001.43539269941/8.0),
14864 REAL_CONST(124026.45649093305/8.0),
14865 REAL_CONST(124051.47885116948/8.0),
14866 REAL_CONST(124076.50247328142/8.0),
14867 REAL_CONST(124101.5273571416/8.0),
14868 REAL_CONST(124126.55350262282/8.0),
14869 REAL_CONST(124151.58090959788/8.0),
14870 REAL_CONST(124176.60957793961/8.0),
14871 REAL_CONST(124201.63950752091/8.0),
14872 REAL_CONST(124226.67069821467/8.0),
14873 REAL_CONST(124251.70314989384/8.0),
14874 REAL_CONST(124276.73686243138/8.0),
14875 REAL_CONST(124301.7718357003/8.0),
14876 REAL_CONST(124326.80806957364/8.0),
14877 REAL_CONST(124351.84556392446/8.0),
14878 REAL_CONST(124376.88431862585/8.0),
14879 REAL_CONST(124401.92433355095/8.0),
14880 REAL_CONST(124426.96560857294/8.0),
14881 REAL_CONST(124452.00814356498/8.0),
14882 REAL_CONST(124477.05193840031/8.0),
14883 REAL_CONST(124502.0969929522/8.0),
14884 REAL_CONST(124527.14330709392/8.0),
14885 REAL_CONST(124552.19088069882/8.0),
14886 REAL_CONST(124577.23971364023/8.0),
14887 REAL_CONST(124602.28980579154/8.0),
14888 REAL_CONST(124627.34115702618/8.0),
14889 REAL_CONST(124652.3937672176/8.0),
14890 REAL_CONST(124677.44763623926/8.0),
14891 REAL_CONST(124702.50276396469/8.0),
14892 REAL_CONST(124727.55915026742/8.0),
14893 REAL_CONST(124752.61679502104/8.0),
14894 REAL_CONST(124777.67569809916/8.0),
14895 REAL_CONST(124802.73585937542/8.0),
14896 REAL_CONST(124827.79727872348/8.0),
14897 REAL_CONST(124852.85995601704/8.0),
14898 REAL_CONST(124877.92389112986/8.0),
14899 REAL_CONST(124902.98908393568/8.0),
14900 REAL_CONST(124928.05553430831/8.0),
14901 REAL_CONST(124953.1232421216/8.0),
14902 REAL_CONST(124978.19220724938/8.0),
14903 REAL_CONST(125003.26242956554/8.0),
14904 REAL_CONST(125028.33390894404/8.0),
14905 REAL_CONST(125053.40664525882/8.0),
14906 REAL_CONST(125078.48063838384/8.0),
14907 REAL_CONST(125103.55588819318/8.0),
14908 REAL_CONST(125128.63239456083/8.0),
14909 REAL_CONST(125153.71015736091/8.0),
14910 REAL_CONST(125178.78917646752/8.0),
14911 REAL_CONST(125203.86945175481/8.0),
14912 REAL_CONST(125228.95098309696/8.0),
14913 REAL_CONST(125254.03377036817/8.0),
14914 REAL_CONST(125279.1178134427/8.0),
14915 REAL_CONST(125304.20311219479/8.0),
14916 REAL_CONST(125329.28966649878/8.0),
14917 REAL_CONST(125354.37747622898/8.0),
14918 REAL_CONST(125379.46654125977/8.0),
14919 REAL_CONST(125404.55686146552/8.0),
14920 REAL_CONST(125429.6484367207/8.0),
14921 REAL_CONST(125454.74126689974/8.0),
14922 REAL_CONST(125479.83535187715/8.0),
14923 REAL_CONST(125504.93069152744/8.0),
14924 REAL_CONST(125530.02728572517/8.0),
14925 REAL_CONST(125555.12513434493/8.0),
14926 REAL_CONST(125580.22423726133/8.0),
14927 REAL_CONST(125605.32459434902/8.0),
14928 REAL_CONST(125630.4262054827/8.0),
14929 REAL_CONST(125655.52907053704/8.0),
14930 REAL_CONST(125680.63318938682/8.0),
14931 REAL_CONST(125705.73856190679/8.0),
14932 REAL_CONST(125730.84518797178/8.0),
14933 REAL_CONST(125755.9530674566/8.0),
14934 REAL_CONST(125781.06220023613/8.0),
14935 REAL_CONST(125806.17258618528/8.0),
14936 REAL_CONST(125831.28422517896/8.0),
14937 REAL_CONST(125856.39711709213/8.0),
14938 REAL_CONST(125881.51126179981/8.0),
14939 REAL_CONST(125906.62665917698/8.0),
14940 REAL_CONST(125931.74330909875/8.0),
14941 REAL_CONST(125956.86121144016/8.0),
14942 REAL_CONST(125981.98036607634/8.0),
14943 REAL_CONST(126007.10077288245/8.0),
14944 REAL_CONST(126032.22243173365/8.0),
14945 REAL_CONST(126057.34534250517/8.0),
14946 REAL_CONST(126082.46950507225/8.0),
14947 REAL_CONST(126107.59491931014/8.0),
14948 REAL_CONST(126132.72158509417/8.0),
14949 REAL_CONST(126157.84950229966/8.0),
14950 REAL_CONST(126182.97867080198/8.0),
14951 REAL_CONST(126208.10909047653/8.0),
14952 REAL_CONST(126233.24076119871/8.0),
14953 REAL_CONST(126258.37368284403/8.0),
14954 REAL_CONST(126283.50785528794/8.0),
14955 REAL_CONST(126308.64327840599/8.0),
14956 REAL_CONST(126333.77995207369/8.0),
14957 REAL_CONST(126358.91787616667/8.0),
14958 REAL_CONST(126384.0570505605/8.0),
14959 REAL_CONST(126409.19747513086/8.0),
14960 REAL_CONST(126434.3391497534/8.0),
14961 REAL_CONST(126459.48207430386/8.0),
14962 REAL_CONST(126484.62624865794/8.0),
14963 REAL_CONST(126509.77167269142/8.0),
14964 REAL_CONST(126534.9183462801/8.0),
14965 REAL_CONST(126560.06626929982/8.0),
14966 REAL_CONST(126585.21544162642/8.0),
14967 REAL_CONST(126610.36586313581/8.0),
14968 REAL_CONST(126635.51753370393/8.0),
14969 REAL_CONST(126660.67045320668/8.0),
14970 REAL_CONST(126685.82462152008/8.0),
14971 REAL_CONST(126710.98003852014/8.0),
14972 REAL_CONST(126736.13670408291/8.0),
14973 REAL_CONST(126761.29461808444/8.0),
14974 REAL_CONST(126786.45378040087/8.0),
14975 REAL_CONST(126811.61419090834/8.0),
14976 REAL_CONST(126836.77584948298/8.0),
14977 REAL_CONST(126861.93875600102/8.0),
14978 REAL_CONST(126887.10291033868/8.0),
14979 REAL_CONST(126912.26831237224/8.0),
14980 REAL_CONST(126937.43496197795/8.0),
14981 REAL_CONST(126962.60285903217/8.0),
14982 REAL_CONST(126987.77200341123/8.0),
14983 REAL_CONST(127012.94239499152/8.0),
14984 REAL_CONST(127038.11403364947/8.0),
14985 REAL_CONST(127063.2869192615/8.0),
14986 REAL_CONST(127088.46105170409/8.0),
14987 REAL_CONST(127113.63643085376/8.0),
14988 REAL_CONST(127138.81305658702/8.0),
14989 REAL_CONST(127163.99092878048/8.0),
14990 REAL_CONST(127189.17004731069/8.0),
14991 REAL_CONST(127214.35041205429/8.0),
14992 REAL_CONST(127239.53202288797/8.0),
14993 REAL_CONST(127264.71487968838/8.0),
14994 REAL_CONST(127289.89898233226/8.0),
14995 REAL_CONST(127315.08433069635/8.0),
14996 REAL_CONST(127340.27092465744/8.0),
14997 REAL_CONST(127365.45876409234/8.0),
14998 REAL_CONST(127390.64784887788/8.0),
14999 REAL_CONST(127415.83817889093/8.0),
15000 REAL_CONST(127441.02975400841/8.0),
15001 REAL_CONST(127466.22257410725/8.0),
15002 REAL_CONST(127491.41663906439/8.0),
15003 REAL_CONST(127516.61194875685/8.0),
15004 REAL_CONST(127541.80850306165/8.0),
15005 REAL_CONST(127567.00630185583/8.0),
15006 REAL_CONST(127592.20534501647/8.0),
15007 REAL_CONST(127617.4056324207/8.0),
15008 REAL_CONST(127642.60716394568/8.0),
15009 REAL_CONST(127667.80993946856/8.0),
15010 REAL_CONST(127693.01395886653/8.0),
15011 REAL_CONST(127718.21922201688/8.0),
15012 REAL_CONST(127743.42572879682/8.0),
15013 REAL_CONST(127768.63347908368/8.0),
15014 REAL_CONST(127793.84247275478/8.0),
15015 REAL_CONST(127819.05270968749/8.0),
15016 REAL_CONST(127844.26418975917/8.0),
15017 REAL_CONST(127869.47691284724/8.0),
15018 REAL_CONST(127894.69087882918/8.0),
15019 REAL_CONST(127919.90608758242/8.0),
15020 REAL_CONST(127945.12253898452/8.0),
15021 REAL_CONST(127970.34023291297/8.0),
15022 REAL_CONST(127995.55916924537/8.0),
15023 REAL_CONST(128020.77934785932/8.0),
15024 REAL_CONST(128046.00076863244/8.0),
15025 REAL_CONST(128071.22343144237/8.0),
15026 REAL_CONST(128096.44733616684/8.0),
15027 REAL_CONST(128121.67248268353/8.0),
15028 REAL_CONST(128146.89887087021/8.0),
15029 REAL_CONST(128172.12650060465/8.0),
15030 REAL_CONST(128197.35537176467/8.0),
15031 REAL_CONST(128222.5854842281/8.0),
15032 REAL_CONST(128247.81683787282/8.0),
15033 REAL_CONST(128273.04943257671/8.0),
15034 REAL_CONST(128298.28326821771/8.0),
15035 REAL_CONST(128323.51834467379/8.0),
15036 REAL_CONST(128348.75466182294/8.0),
15037 REAL_CONST(128373.99221954317/8.0),
15038 REAL_CONST(128399.23101771252/8.0),
15039 REAL_CONST(128424.47105620909/8.0),
15040 REAL_CONST(128449.71233491098/8.0),
15041 REAL_CONST(128474.95485369631/8.0),
15042 REAL_CONST(128500.19861244329/8.0),
15043 REAL_CONST(128525.44361103009/8.0),
15044 REAL_CONST(128550.68984933494/8.0),
15045 REAL_CONST(128575.93732723613/8.0),
15046 REAL_CONST(128601.18604461191/8.0),
15047 REAL_CONST(128626.43600134061/8.0),
15048 REAL_CONST(128651.68719730059/8.0),
15049 REAL_CONST(128676.93963237021/8.0),
15050 REAL_CONST(128702.1933064279/8.0),
15051 REAL_CONST(128727.44821935208/8.0),
15052 REAL_CONST(128752.70437102125/8.0),
15053 REAL_CONST(128777.96176131385/8.0),
15054 REAL_CONST(128803.22039010846/8.0),
15055 REAL_CONST(128828.48025728362/8.0),
15056 REAL_CONST(128853.74136271792/8.0),
15057 REAL_CONST(128879.00370628996/8.0),
15058 REAL_CONST(128904.26728787841/8.0),
15059 REAL_CONST(128929.53210736193/8.0),
15060 REAL_CONST(128954.79816461923/8.0),
15061 REAL_CONST(128980.06545952905/8.0),
15062 REAL_CONST(129005.33399197015/8.0),
15063 REAL_CONST(129030.60376182134/8.0),
15064 REAL_CONST(129055.87476896142/8.0),
15065 REAL_CONST(129081.14701326926/8.0),
15066 REAL_CONST(129106.42049462376/8.0),
15067 REAL_CONST(129131.6952129038/8.0),
15068 REAL_CONST(129156.97116798835/8.0),
15069 REAL_CONST(129182.24835975636/8.0),
15070 REAL_CONST(129207.52678808685/8.0),
15071 REAL_CONST(129232.80645285884/8.0),
15072 REAL_CONST(129258.08735395141/8.0),
15073 REAL_CONST(129283.36949124365/8.0),
15074 REAL_CONST(129308.65286461466/8.0),
15075 REAL_CONST(129333.9374739436/8.0),
15076 REAL_CONST(129359.22331910966/8.0),
15077 REAL_CONST(129384.51039999202/8.0),
15078 REAL_CONST(129409.79871646997/8.0),
15079 REAL_CONST(129435.08826842274/8.0),
15080 REAL_CONST(129460.37905572963/8.0),
15081 REAL_CONST(129485.67107826998/8.0),
15082 REAL_CONST(129510.96433592314/8.0),
15083 REAL_CONST(129536.25882856851/8.0),
15084 REAL_CONST(129561.55455608548/8.0),
15085 REAL_CONST(129586.85151835352/8.0),
15086 REAL_CONST(129612.14971525209/8.0),
15087 REAL_CONST(129637.4491466607/8.0),
15088 REAL_CONST(129662.74981245887/8.0),
15089 REAL_CONST(129688.0517125262/8.0),
15090 REAL_CONST(129713.35484674224/8.0),
15091 REAL_CONST(129738.65921498663/8.0),
15092 REAL_CONST(129763.96481713903/8.0),
15093 REAL_CONST(129789.27165307909/8.0),
15094 REAL_CONST(129814.57972268655/8.0),
15095 REAL_CONST(129839.88902584116/8.0),
15096 REAL_CONST(129865.19956242264/8.0),
15097 REAL_CONST(129890.51133231082/8.0),
15098 REAL_CONST(129915.82433538554/8.0),
15099 REAL_CONST(129941.13857152662/8.0),
15100 REAL_CONST(129966.45404061397/8.0),
15101 REAL_CONST(129991.7707425275/8.0),
15102 REAL_CONST(130017.08867714716/8.0),
15103 REAL_CONST(130042.4078443529/8.0),
15104 REAL_CONST(130067.72824402474/8.0),
15105 REAL_CONST(130093.04987604271/8.0),
15106 REAL_CONST(130118.37274028687/8.0),
15107 REAL_CONST(130143.69683663732/8.0),
15108 REAL_CONST(130169.02216497416/8.0),
15109 REAL_CONST(130194.34872517755/8.0),
15110 REAL_CONST(130219.67651712766/8.0),
15111 REAL_CONST(130245.0055407047/8.0),
15112 REAL_CONST(130270.33579578891/8.0),
15113 REAL_CONST(130295.66728226055/8.0),
15114 REAL_CONST(130320.99999999991/8.0),
15115 REAL_CONST(130346.33394888733/8.0),
15116 REAL_CONST(130371.66912880314/8.0),
15117 REAL_CONST(130397.00553962773/8.0),
15118 REAL_CONST(130422.34318124152/8.0),
15119 REAL_CONST(130447.68205352494/8.0),
15120 REAL_CONST(130473.02215635845/8.0),
15121 REAL_CONST(130498.36348962256/8.0),
15122 REAL_CONST(130523.70605319779/8.0),
15123 REAL_CONST(130549.0498469647/8.0),
15124 REAL_CONST(130574.39487080388/8.0),
15125 REAL_CONST(130599.74112459592/8.0),
15126 REAL_CONST(130625.08860822149/8.0),
15127 REAL_CONST(130650.43732156123/8.0),
15128 REAL_CONST(130675.78726449587/8.0),
15129 REAL_CONST(130701.13843690613/8.0),
15130 REAL_CONST(130726.49083867275/8.0),
15131 REAL_CONST(130751.84446967654/8.0),
15132 REAL_CONST(130777.19932979831/8.0),
15133 REAL_CONST(130802.5554189189/8.0),
15134 REAL_CONST(130827.91273691918/8.0),
15135 REAL_CONST(130853.27128368006/8.0),
15136 REAL_CONST(130878.63105908247/8.0),
15137 REAL_CONST(130903.99206300738/8.0),
15138 REAL_CONST(130929.35429533575/8.0),
15139 REAL_CONST(130954.71775594862/8.0),
15140 REAL_CONST(130980.08244472703/8.0),
15141 REAL_CONST(131005.44836155206/8.0),
15142 REAL_CONST(131030.81550630482/8.0),
15143 REAL_CONST(131056.18387886642/8.0),
15144 REAL_CONST(131081.55347911804/8.0),
15145 REAL_CONST(131106.92430694087/8.0),
15146 REAL_CONST(131132.29636221612/8.0),
15147 REAL_CONST(131157.66964482504/8.0),
15148 REAL_CONST(131183.0441546489/8.0),
15149 REAL_CONST(131208.41989156904/8.0),
15150 REAL_CONST(131233.79685546676/8.0),
15151 REAL_CONST(131259.17504622342/8.0),
15152 REAL_CONST(131284.55446372041/8.0),
15153 REAL_CONST(131309.93510783918/8.0),
15154 REAL_CONST(131335.31697846117/8.0),
15155 REAL_CONST(131360.70007546784/8.0),
15156 REAL_CONST(131386.0843987407/8.0),
15157 REAL_CONST(131411.46994816128/8.0),
15158 REAL_CONST(131436.85672361116/8.0),
15159 REAL_CONST(131462.24472497194/8.0),
15160 REAL_CONST(131487.63395212521/8.0),
15161 REAL_CONST(131513.02440495262/8.0),
15162 REAL_CONST(131538.41608333588/8.0),
15163 REAL_CONST(131563.80898715663/8.0),
15164 REAL_CONST(131589.2031162967/8.0),
15165 REAL_CONST(131614.59847063778/8.0),
15166 REAL_CONST(131639.9950500617/8.0),
15167 REAL_CONST(131665.39285445024/8.0),
15168 REAL_CONST(131690.79188368531/8.0),
15169 REAL_CONST(131716.19213764873/8.0),
15170 REAL_CONST(131741.59361622241/8.0),
15171 REAL_CONST(131766.99631928833/8.0),
15172 REAL_CONST(131792.40024672839/8.0),
15173 REAL_CONST(131817.80539842462/8.0),
15174 REAL_CONST(131843.21177425905/8.0),
15175 REAL_CONST(131868.61937411371/8.0),
15176 REAL_CONST(131894.02819787065/8.0),
15177 REAL_CONST(131919.43824541202/8.0),
15178 REAL_CONST(131944.84951661993/8.0),
15179 REAL_CONST(131970.26201137656/8.0),
15180 REAL_CONST(131995.67572956407/8.0),
15181 REAL_CONST(132021.09067106468/8.0),
15182 REAL_CONST(132046.50683576067/8.0),
15183 REAL_CONST(132071.9242235343/8.0),
15184 REAL_CONST(132097.34283426782/8.0),
15185 REAL_CONST(132122.76266784366/8.0),
15186 REAL_CONST(132148.1837241441/8.0),
15187 REAL_CONST(132173.60600305157/8.0),
15188 REAL_CONST(132199.02950444847/8.0),
15189 REAL_CONST(132224.45422821722/8.0),
15190 REAL_CONST(132249.88017424036/8.0),
15191 REAL_CONST(132275.30734240031/8.0),
15192 REAL_CONST(132300.73573257966/8.0),
15193 REAL_CONST(132326.16534466096/8.0),
15194 REAL_CONST(132351.59617852676/8.0),
15195 REAL_CONST(132377.02823405969/8.0),
15196 REAL_CONST(132402.46151114244/8.0),
15197 REAL_CONST(132427.89600965759/8.0),
15198 REAL_CONST(132453.33172948789/8.0),
15199 REAL_CONST(132478.76867051609/8.0),
15200 REAL_CONST(132504.20683262491/8.0),
15201 REAL_CONST(132529.64621569714/8.0),
15202 REAL_CONST(132555.08681961559/8.0),
15203 REAL_CONST(132580.5286442631/8.0),
15204 REAL_CONST(132605.97168952253/8.0),
15205 REAL_CONST(132631.41595527678/8.0),
15206 REAL_CONST(132656.86144140881/8.0),
15207 REAL_CONST(132682.30814780149/8.0),
15208 REAL_CONST(132707.75607433787/8.0),
15209 REAL_CONST(132733.20522090094/8.0),
15210 REAL_CONST(132758.65558737374/8.0),
15211 REAL_CONST(132784.10717363929/8.0),
15212 REAL_CONST(132809.55997958075/8.0),
15213 REAL_CONST(132835.01400508118/8.0),
15214 REAL_CONST(132860.46925002377/8.0),
15215 REAL_CONST(132885.92571429166/8.0),
15216 REAL_CONST(132911.38339776811/8.0),
15217 REAL_CONST(132936.84230033628/8.0),
15218 REAL_CONST(132962.30242187946/8.0),
15219 REAL_CONST(132987.76376228096/8.0),
15220 REAL_CONST(133013.22632142407/8.0),
15221 REAL_CONST(133038.69009919214/8.0),
15222 REAL_CONST(133064.15509546854/8.0),
15223 REAL_CONST(133089.62131013666/8.0),
15224 REAL_CONST(133115.08874307995/8.0),
15225 REAL_CONST(133140.55739418184/8.0),
15226 REAL_CONST(133166.02726332581/8.0),
15227 REAL_CONST(133191.49835039541/8.0),
15228 REAL_CONST(133216.97065527414/8.0),
15229 REAL_CONST(133242.44417784561/8.0),
15230 REAL_CONST(133267.91891799335/8.0),
15231 REAL_CONST(133293.39487560102/8.0),
15232 REAL_CONST(133318.87205055228/8.0),
15233 REAL_CONST(133344.35044273079/8.0),
15234 REAL_CONST(133369.83005202023/8.0),
15235 REAL_CONST(133395.31087830439/8.0),
15236 REAL_CONST(133420.79292146701/8.0),
15237 REAL_CONST(133446.27618139185/8.0),
15238 REAL_CONST(133471.76065796276/8.0),
15239 REAL_CONST(133497.24635106357/8.0),
15240 REAL_CONST(133522.73326057816/8.0),
15241 REAL_CONST(133548.22138639039/8.0),
15242 REAL_CONST(133573.71072838426/8.0),
15243 REAL_CONST(133599.20128644365/8.0),
15244 REAL_CONST(133624.69306045261/8.0),
15245 REAL_CONST(133650.1860502951/8.0),
15246 REAL_CONST(133675.68025585517/8.0),
15247 REAL_CONST(133701.1756770169/8.0),
15248 REAL_CONST(133726.67231366437/8.0),
15249 REAL_CONST(133752.17016568172/8.0),
15250 REAL_CONST(133777.66923295305/8.0),
15251 REAL_CONST(133803.16951536259/8.0),
15252 REAL_CONST(133828.67101279454/8.0),
15253 REAL_CONST(133854.17372513309/8.0),
15254 REAL_CONST(133879.67765226253/8.0),
15255 REAL_CONST(133905.18279406714/8.0),
15256 REAL_CONST(133930.68915043125/8.0),
15257 REAL_CONST(133956.19672123916/8.0),
15258 REAL_CONST(133981.70550637526/8.0),
15259 REAL_CONST(134007.21550572399/8.0),
15260 REAL_CONST(134032.7267191697/8.0),
15261 REAL_CONST(134058.23914659687/8.0),
15262 REAL_CONST(134083.75278789/8.0),
15263 REAL_CONST(134109.26764293358/8.0),
15264 REAL_CONST(134134.78371161217/8.0),
15265 REAL_CONST(134160.30099381026/8.0),
15266 REAL_CONST(134185.8194894125/8.0),
15267 REAL_CONST(134211.33919830353/8.0),
15268 REAL_CONST(134236.8601203679/8.0),
15269 REAL_CONST(134262.38225549037/8.0),
15270 REAL_CONST(134287.90560355558/8.0),
15271 REAL_CONST(134313.43016444831/8.0),
15272 REAL_CONST(134338.95593805326/8.0),
15273 REAL_CONST(134364.48292425525/8.0),
15274 REAL_CONST(134390.01112293909/8.0),
15275 REAL_CONST(134415.54053398955/8.0),
15276 REAL_CONST(134441.07115729159/8.0),
15277 REAL_CONST(134466.60299273001/8.0),
15278 REAL_CONST(134492.1360401898/8.0),
15279 REAL_CONST(134517.67029955584/8.0),
15280 REAL_CONST(134543.20577071316/8.0),
15281 REAL_CONST(134568.74245354676/8.0),
15282 REAL_CONST(134594.28034794159/8.0),
15283 REAL_CONST(134619.81945378278/8.0),
15284 REAL_CONST(134645.35977095537/8.0),
15285 REAL_CONST(134670.90129934452/8.0),
15286 REAL_CONST(134696.4440388353/8.0),
15287 REAL_CONST(134721.98798931291/8.0),
15288 REAL_CONST(134747.53315066252/8.0),
15289 REAL_CONST(134773.07952276937/8.0),
15290 REAL_CONST(134798.62710551871/8.0),
15291 REAL_CONST(134824.17589879577/8.0),
15292 REAL_CONST(134849.72590248589/8.0),
15293 REAL_CONST(134875.27711647438/8.0),
15294 REAL_CONST(134900.82954064661/8.0),
15295 REAL_CONST(134926.38317488792/8.0),
15296 REAL_CONST(134951.93801908373/8.0),
15297 REAL_CONST(134977.49407311951/8.0),
15298 REAL_CONST(135003.05133688069/8.0),
15299 REAL_CONST(135028.60981025276/8.0),
15300 REAL_CONST(135054.16949312127/8.0),
15301 REAL_CONST(135079.73038537172/8.0),
15302 REAL_CONST(135105.29248688967/8.0),
15303 REAL_CONST(135130.85579756077/8.0),
15304 REAL_CONST(135156.42031727062/8.0),
15305 REAL_CONST(135181.98604590484/8.0),
15306 REAL_CONST(135207.55298334916/8.0),
15307 REAL_CONST(135233.12112948924/8.0),
15308 REAL_CONST(135258.69048421088/8.0),
15309 REAL_CONST(135284.26104739975/8.0),
15310 REAL_CONST(135309.83281894168/8.0),
15311 REAL_CONST(135335.4057987225/8.0),
15312 REAL_CONST(135360.97998662802/8.0),
15313 REAL_CONST(135386.55538254412/8.0),
15314 REAL_CONST(135412.13198635669/8.0),
15315 REAL_CONST(135437.70979795168/8.0),
15316 REAL_CONST(135463.28881721498/8.0),
15317 REAL_CONST(135488.86904403262/8.0),
15318 REAL_CONST(135514.45047829056/8.0),
15319 REAL_CONST(135540.03311987486/8.0),
15320 REAL_CONST(135565.61696867159/8.0),
15321 REAL_CONST(135591.20202456677/8.0),
15322 REAL_CONST(135616.78828744654/8.0),
15323 REAL_CONST(135642.37575719706/8.0),
15324 REAL_CONST(135667.96443370447/8.0),
15325 REAL_CONST(135693.55431685498/8.0),
15326 REAL_CONST(135719.14540653475/8.0),
15327 REAL_CONST(135744.73770263011/8.0),
15328 REAL_CONST(135770.33120502727/8.0),
15329 REAL_CONST(135795.92591361253/8.0),
15330 REAL_CONST(135821.52182827223/8.0),
15331 REAL_CONST(135847.11894889272/8.0),
15332 REAL_CONST(135872.7172753604/8.0),
15333 REAL_CONST(135898.31680756161/8.0),
15334 REAL_CONST(135923.91754538284/8.0),
15335 REAL_CONST(135949.51948871053/8.0),
15336 REAL_CONST(135975.12263743114/8.0),
15337 REAL_CONST(136000.72699143123/8.0),
15338 REAL_CONST(136026.33255059729/8.0),
15339 REAL_CONST(136051.93931481591/8.0),
15340 REAL_CONST(136077.54728397369/8.0),
15341 REAL_CONST(136103.15645795723/8.0),
15342 REAL_CONST(136128.76683665317/8.0),
15343 REAL_CONST(136154.37841994822/8.0),
15344 REAL_CONST(136179.99120772901/8.0),
15345 REAL_CONST(136205.60519988232/8.0),
15346 REAL_CONST(136231.2203962949/8.0),
15347 REAL_CONST(136256.83679685349/8.0),
15348 REAL_CONST(136282.45440144493/8.0),
15349 REAL_CONST(136308.07320995603/8.0),
15350 REAL_CONST(136333.69322227367/8.0),
15351 REAL_CONST(136359.31443828469/8.0),
15352 REAL_CONST(136384.93685787608/8.0),
15353 REAL_CONST(136410.56048093468/8.0),
15354 REAL_CONST(136436.18530734754/8.0),
15355 REAL_CONST(136461.81133700156/8.0),
15356 REAL_CONST(136487.43856978384/8.0),
15357 REAL_CONST(136513.06700558143/8.0),
15358 REAL_CONST(136538.6966442813/8.0),
15359 REAL_CONST(136564.32748577066/8.0),
15360 REAL_CONST(136589.95952993655/8.0),
15361 REAL_CONST(136615.59277666616/8.0),
15362 REAL_CONST(136641.22722584667/8.0),
15363 REAL_CONST(136666.86287736523/8.0),
15364 REAL_CONST(136692.49973110916/8.0),
15365 REAL_CONST(136718.13778696564/8.0),
15366 REAL_CONST(136743.77704482197/8.0),
15367 REAL_CONST(136769.41750456547/8.0),
15368 REAL_CONST(136795.05916608346/8.0),
15369 REAL_CONST(136820.70202926331/8.0),
15370 REAL_CONST(136846.34609399244/8.0),
15371 REAL_CONST(136871.99136015819/8.0),
15372 REAL_CONST(136897.63782764805/8.0),
15373 REAL_CONST(136923.28549634948/8.0),
15374 REAL_CONST(136948.93436614997/8.0),
15375 REAL_CONST(136974.58443693706/8.0),
15376 REAL_CONST(137000.23570859825/8.0),
15377 REAL_CONST(137025.88818102115/8.0),
15378 REAL_CONST(137051.54185409332/8.0),
15379 REAL_CONST(137077.19672770242/8.0),
15380 REAL_CONST(137102.85280173609/8.0),
15381 REAL_CONST(137128.51007608202/8.0),
15382 REAL_CONST(137154.16855062786/8.0),
15383 REAL_CONST(137179.82822526142/8.0),
15384 REAL_CONST(137205.48909987041/8.0),
15385 REAL_CONST(137231.15117434258/8.0),
15386 REAL_CONST(137256.8144485658/8.0),
15387 REAL_CONST(137282.47892242789/8.0),
15388 REAL_CONST(137308.14459581667/8.0),
15389 REAL_CONST(137333.81146862009/8.0),
15390 REAL_CONST(137359.47954072602/8.0),
15391 REAL_CONST(137385.14881202241/8.0),
15392 REAL_CONST(137410.81928239719/8.0),
15393 REAL_CONST(137436.49095173844/8.0),
15394 REAL_CONST(137462.16381993407/8.0),
15395 REAL_CONST(137487.83788687221/8.0),
15396 REAL_CONST(137513.51315244089/8.0),
15397 REAL_CONST(137539.18961652822/8.0),
15398 REAL_CONST(137564.86727902229/8.0),
15399 REAL_CONST(137590.54613981131/8.0),
15400 REAL_CONST(137616.22619878338/8.0),
15401 REAL_CONST(137641.90745582676/8.0),
15402 REAL_CONST(137667.58991082967/8.0),
15403 REAL_CONST(137693.27356368033/8.0),
15404 REAL_CONST(137718.95841426702/8.0),
15405 REAL_CONST(137744.64446247809/8.0),
15406 REAL_CONST(137770.33170820182/8.0),
15407 REAL_CONST(137796.02015132661/8.0),
15408 REAL_CONST(137821.70979174081/8.0),
15409 REAL_CONST(137847.40062933284/8.0),
15410 REAL_CONST(137873.09266399115/8.0),
15411 REAL_CONST(137898.78589560417/8.0),
15412 REAL_CONST(137924.48032406042/8.0),
15413 REAL_CONST(137950.17594924837/8.0),
15414 REAL_CONST(137975.8727710566/8.0),
15415 REAL_CONST(138001.57078937365/8.0),
15416 REAL_CONST(138027.27000408815/8.0),
15417 REAL_CONST(138052.97041508864/8.0),
15418 REAL_CONST(138078.67202226384/8.0),
15419 REAL_CONST(138104.3748255024/8.0),
15420 REAL_CONST(138130.07882469296/8.0),
15421 REAL_CONST(138155.78401972432/8.0),
15422 REAL_CONST(138181.49041048516/8.0),
15423 REAL_CONST(138207.1979968643/8.0),
15424 REAL_CONST(138232.9067787505/8.0),
15425 REAL_CONST(138258.61675603263/8.0),
15426 REAL_CONST(138284.32792859949/8.0),
15427 REAL_CONST(138310.04029633995/8.0),
15428 REAL_CONST(138335.75385914298/8.0),
15429 REAL_CONST(138361.46861689744/8.0),
15430 REAL_CONST(138387.18456949232/8.0),
15431 REAL_CONST(138412.90171681659/8.0),
15432 REAL_CONST(138438.62005875923/8.0),
15433 REAL_CONST(138464.33959520931/8.0),
15434 REAL_CONST(138490.06032605586/8.0),
15435 REAL_CONST(138515.78225118798/8.0),
15436 REAL_CONST(138541.50537049473/8.0),
15437 REAL_CONST(138567.2296838653/8.0),
15438 REAL_CONST(138592.95519118884/8.0),
15439 REAL_CONST(138618.68189235451/8.0),
15440 REAL_CONST(138644.40978725153/8.0),
15441 REAL_CONST(138670.13887576913/8.0),
15442 REAL_CONST(138695.86915779658/8.0),
15443 REAL_CONST(138721.60063322316/8.0),
15444 REAL_CONST(138747.33330193823/8.0),
15445 REAL_CONST(138773.06716383106/8.0),
15446 REAL_CONST(138798.80221879104/8.0),
15447 REAL_CONST(138824.53846670757/8.0),
15448 REAL_CONST(138850.27590747006/8.0),
15449 REAL_CONST(138876.01454096794/8.0),
15450 REAL_CONST(138901.7543670907/8.0),
15451 REAL_CONST(138927.49538572782/8.0),
15452 REAL_CONST(138953.2375967688/8.0),
15453 REAL_CONST(138978.9810001032/8.0),
15454 REAL_CONST(139004.72559562061/8.0),
15455 REAL_CONST(139030.47138321059/8.0),
15456 REAL_CONST(139056.2183627628/8.0),
15457 REAL_CONST(139081.96653416683/8.0),
15458 REAL_CONST(139107.71589731239/8.0),
15459 REAL_CONST(139133.46645208917/8.0),
15460 REAL_CONST(139159.21819838689/8.0),
15461 REAL_CONST(139184.97113609532/8.0),
15462 REAL_CONST(139210.72526510421/8.0),
15463 REAL_CONST(139236.48058530336/8.0),
15464 REAL_CONST(139262.23709658257/8.0),
15465 REAL_CONST(139287.99479883176/8.0),
15466 REAL_CONST(139313.75369194071/8.0),
15467 REAL_CONST(139339.51377579942/8.0),
15468 REAL_CONST(139365.27505029776/8.0),
15469 REAL_CONST(139391.03751532568/8.0),
15470 REAL_CONST(139416.80117077316/8.0),
15471 REAL_CONST(139442.56601653024/8.0),
15472 REAL_CONST(139468.33205248689/8.0),
15473 REAL_CONST(139494.09927853322/8.0),
15474 REAL_CONST(139519.86769455927/8.0),
15475 REAL_CONST(139545.63730045516/8.0),
15476 REAL_CONST(139571.408096111/8.0),
15477 REAL_CONST(139597.18008141697/8.0),
15478 REAL_CONST(139622.95325626322/8.0),
15479 REAL_CONST(139648.72762054001/8.0),
15480 REAL_CONST(139674.5031741375/8.0),
15481 REAL_CONST(139700.27991694602/8.0),
15482 REAL_CONST(139726.05784885579/8.0),
15483 REAL_CONST(139751.83696975713/8.0),
15484 REAL_CONST(139777.61727954043/8.0),
15485 REAL_CONST(139803.39877809596/8.0),
15486 REAL_CONST(139829.18146531415/8.0),
15487 REAL_CONST(139854.96534108539/8.0),
15488 REAL_CONST(139880.75040530015/8.0),
15489 REAL_CONST(139906.53665784886/8.0),
15490 REAL_CONST(139932.32409862199/8.0),
15491 REAL_CONST(139958.11272751007/8.0),
15492 REAL_CONST(139983.90254440365/8.0),
15493 REAL_CONST(140009.69354919327/8.0),
15494 REAL_CONST(140035.48574176949/8.0),
15495 REAL_CONST(140061.27912202294/8.0),
15496 REAL_CONST(140087.07368984428/8.0),
15497 REAL_CONST(140112.86944512415/8.0),
15498 REAL_CONST(140138.66638775321/8.0),
15499 REAL_CONST(140164.4645176222/8.0),
15500 REAL_CONST(140190.26383462184/8.0),
15501 REAL_CONST(140216.06433864293/8.0),
15502 REAL_CONST(140241.86602957622/8.0),
15503 REAL_CONST(140267.66890731253/8.0),
15504 REAL_CONST(140293.47297174268/8.0),
15505 REAL_CONST(140319.27822275754/8.0),
15506 REAL_CONST(140345.08466024802/8.0),
15507 REAL_CONST(140370.89228410498/8.0),
15508 REAL_CONST(140396.70109421943/8.0),
15509 REAL_CONST(140422.51109048226/8.0),
15510 REAL_CONST(140448.32227278448/8.0),
15511 REAL_CONST(140474.13464101712/8.0),
15512 REAL_CONST(140499.94819507122/8.0),
15513 REAL_CONST(140525.76293483781/8.0),
15514 REAL_CONST(140551.57886020801/8.0),
15515 REAL_CONST(140577.3959710729/8.0),
15516 REAL_CONST(140603.21426732364/8.0),
15517 REAL_CONST(140629.03374885136/8.0),
15518 REAL_CONST(140654.85441554731/8.0),
15519 REAL_CONST(140680.67626730262/8.0),
15520 REAL_CONST(140706.49930400858/8.0),
15521 REAL_CONST(140732.32352555645/8.0),
15522 REAL_CONST(140758.1489318375/8.0),
15523 REAL_CONST(140783.97552274304/8.0),
15524 REAL_CONST(140809.80329816442/8.0),
15525 REAL_CONST(140835.63225799298/8.0),
15526 REAL_CONST(140861.46240212015/8.0),
15527 REAL_CONST(140887.29373043729/8.0),
15528 REAL_CONST(140913.12624283586/8.0),
15529 REAL_CONST(140938.95993920733/8.0),
15530 REAL_CONST(140964.79481944317/8.0),
15531 REAL_CONST(140990.63088343487/8.0),
15532 REAL_CONST(141016.46813107401/8.0),
15533 REAL_CONST(141042.30656225214/8.0),
15534 REAL_CONST(141068.14617686081/8.0),
15535 REAL_CONST(141093.98697479168/8.0),
15536 REAL_CONST(141119.82895593636/8.0),
15537 REAL_CONST(141145.6721201865/8.0),
15538 REAL_CONST(141171.51646743377/8.0),
15539 REAL_CONST(141197.36199756994/8.0),
15540 REAL_CONST(141223.20871048668/8.0),
15541 REAL_CONST(141249.05660607578/8.0),
15542 REAL_CONST(141274.90568422904/8.0),
15543 REAL_CONST(141300.75594483822/8.0),
15544 REAL_CONST(141326.6073877952/8.0),
15545 REAL_CONST(141352.4600129918/8.0),
15546 REAL_CONST(141378.31382031992/8.0),
15547 REAL_CONST(141404.16880967148/8.0),
15548 REAL_CONST(141430.02498093838/8.0),
15549 REAL_CONST(141455.8823340126/8.0),
15550 REAL_CONST(141481.74086878612/8.0),
15551 REAL_CONST(141507.60058515094/8.0),
15552 REAL_CONST(141533.46148299909/8.0),
15553 REAL_CONST(141559.32356222265/8.0),
15554 REAL_CONST(141585.18682271364/8.0),
15555 REAL_CONST(141611.05126436421/8.0),
15556 REAL_CONST(141636.9168870665/8.0),
15557 REAL_CONST(141662.78369071262/8.0),
15558 REAL_CONST(141688.65167519479/8.0),
15559 REAL_CONST(141714.5208404052/8.0),
15560 REAL_CONST(141740.39118623605/8.0),
15561 REAL_CONST(141766.26271257963/8.0),
15562 REAL_CONST(141792.1354193282/8.0),
15563 REAL_CONST(141818.00930637406/8.0),
15564 REAL_CONST(141843.88437360956/8.0),
15565 REAL_CONST(141869.760620927/8.0),
15566 REAL_CONST(141895.6380482188/8.0),
15567 REAL_CONST(141921.51665537735/8.0),
15568 REAL_CONST(141947.39644229505/8.0),
15569 REAL_CONST(141973.27740886438/8.0),
15570 REAL_CONST(141999.15955497778/8.0),
15571 REAL_CONST(142025.04288052776/8.0),
15572 REAL_CONST(142050.92738540689/8.0),
15573 REAL_CONST(142076.81306950765/8.0),
15574 REAL_CONST(142102.69993272264/8.0),
15575 REAL_CONST(142128.58797494444/8.0),
15576 REAL_CONST(142154.47719606571/8.0),
15577 REAL_CONST(142180.36759597904/8.0),
15578 REAL_CONST(142206.25917457714/8.0),
15579 REAL_CONST(142232.15193175265/8.0),
15580 REAL_CONST(142258.04586739838/8.0),
15581 REAL_CONST(142283.94098140698/8.0),
15582 REAL_CONST(142309.83727367126/8.0),
15583 REAL_CONST(142335.73474408401/8.0),
15584 REAL_CONST(142361.63339253806/8.0),
15585 REAL_CONST(142387.5332189262/8.0),
15586 REAL_CONST(142413.43422314132/8.0),
15587 REAL_CONST(142439.33640507635/8.0),
15588 REAL_CONST(142465.23976462413/8.0),
15589 REAL_CONST(142491.14430167765/8.0),
15590 REAL_CONST(142517.05001612983/8.0),
15591 REAL_CONST(142542.95690787368/8.0),
15592 REAL_CONST(142568.86497680223/8.0),
15593 REAL_CONST(142594.77422280848/8.0),
15594 REAL_CONST(142620.68464578551/8.0),
15595 REAL_CONST(142646.5962456264/8.0),
15596 REAL_CONST(142672.50902222423/8.0),
15597 REAL_CONST(142698.42297547215/8.0),
15598 REAL_CONST(142724.33810526333/8.0),
15599 REAL_CONST(142750.25441149093/8.0),
15600 REAL_CONST(142776.17189404817/8.0),
15601 REAL_CONST(142802.09055282827/8.0),
15602 REAL_CONST(142828.01038772447/8.0),
15603 REAL_CONST(142853.93139863008/8.0),
15604 REAL_CONST(142879.85358543837/8.0),
15605 REAL_CONST(142905.77694804268/8.0),
15606 REAL_CONST(142931.70148633636/8.0),
15607 REAL_CONST(142957.62720021277/8.0),
15608 REAL_CONST(142983.55408956532/8.0),
15609 REAL_CONST(143009.48215428743/8.0),
15610 REAL_CONST(143035.41139427255/8.0),
15611 REAL_CONST(143061.34180941415/8.0),
15612 REAL_CONST(143087.27339960571/8.0),
15613 REAL_CONST(143113.20616474075/8.0),
15614 REAL_CONST(143139.14010471283/8.0),
15615 REAL_CONST(143165.07521941551/8.0),
15616 REAL_CONST(143191.01150874238/8.0),
15617 REAL_CONST(143216.94897258704/8.0),
15618 REAL_CONST(143242.88761084314/8.0),
15619 REAL_CONST(143268.82742340435/8.0),
15620 REAL_CONST(143294.76841016437/8.0),
15621 REAL_CONST(143320.71057101688/8.0),
15622 REAL_CONST(143346.65390585564/8.0),
15623 REAL_CONST(143372.59841457437/8.0),
15624 REAL_CONST(143398.54409706692/8.0),
15625 REAL_CONST(143424.49095322701/8.0),
15626 REAL_CONST(143450.43898294857/8.0),
15627 REAL_CONST(143476.38818612538/8.0),
15628 REAL_CONST(143502.33856265133/8.0),
15629 REAL_CONST(143528.29011242036/8.0),
15630 REAL_CONST(143554.24283532638/8.0),
15631 REAL_CONST(143580.19673126334/8.0),
15632 REAL_CONST(143606.1518001252/8.0),
15633 REAL_CONST(143632.10804180597/8.0),
15634 REAL_CONST(143658.06545619969/8.0),
15635 REAL_CONST(143684.02404320039/8.0),
15636 REAL_CONST(143709.98380270213/8.0),
15637 REAL_CONST(143735.944734599/8.0),
15638 REAL_CONST(143761.90683878519/8.0),
15639 REAL_CONST(143787.87011515474/8.0),
15640 REAL_CONST(143813.83456360188/8.0),
15641 REAL_CONST(143839.8001840208/8.0),
15642 REAL_CONST(143865.76697630569/8.0),
15643 REAL_CONST(143891.73494035081/8.0),
15644 REAL_CONST(143917.7040760504/8.0),
15645 REAL_CONST(143943.67438329876/8.0),
15646 REAL_CONST(143969.6458619902/8.0),
15647 REAL_CONST(143995.61851201905/8.0),
15648 REAL_CONST(144021.59233327967/8.0),
15649 REAL_CONST(144047.56732566646/8.0),
15650 REAL_CONST(144073.54348907378/8.0),
15651 REAL_CONST(144099.52082339607/8.0),
15652 REAL_CONST(144125.49932852783/8.0),
15653 REAL_CONST(144151.4790043635/8.0),
15654 REAL_CONST(144177.45985079758/8.0),
15655 REAL_CONST(144203.44186772458/8.0),
15656 REAL_CONST(144229.42505503909/8.0),
15657 REAL_CONST(144255.40941263564/8.0),
15658 REAL_CONST(144281.39494040885/8.0),
15659 REAL_CONST(144307.38163825331/8.0),
15660 REAL_CONST(144333.36950606373/8.0),
15661 REAL_CONST(144359.35854373468/8.0),
15662 REAL_CONST(144385.34875116093/8.0),
15663 REAL_CONST(144411.34012823718/8.0),
15664 REAL_CONST(144437.33267485813/8.0),
15665 REAL_CONST(144463.32639091855/8.0),
15666 REAL_CONST(144489.32127631325/8.0),
15667 REAL_CONST(144515.31733093705/8.0),
15668 REAL_CONST(144541.31455468474/8.0),
15669 REAL_CONST(144567.3129474512/8.0),
15670 REAL_CONST(144593.3125091313/8.0),
15671 REAL_CONST(144619.31323961995/8.0),
15672 REAL_CONST(144645.31513881206/8.0),
15673 REAL_CONST(144671.31820660262/8.0),
15674 REAL_CONST(144697.32244288657/8.0),
15675 REAL_CONST(144723.32784755889/8.0),
15676 REAL_CONST(144749.33442051467/8.0),
15677 REAL_CONST(144775.34216164888/8.0),
15678 REAL_CONST(144801.35107085665/8.0),
15679 REAL_CONST(144827.36114803303/8.0),
15680 REAL_CONST(144853.37239307314/8.0),
15681 REAL_CONST(144879.38480587213/8.0),
15682 REAL_CONST(144905.39838632516/8.0),
15683 REAL_CONST(144931.41313432742/8.0),
15684 REAL_CONST(144957.4290497741/8.0),
15685 REAL_CONST(144983.44613256046/8.0),
15686 REAL_CONST(145009.46438258173/8.0),
15687 REAL_CONST(145035.48379973322/8.0),
15688 REAL_CONST(145061.50438391021/8.0),
15689 REAL_CONST(145087.52613500805/8.0),
15690 REAL_CONST(145113.54905292206/8.0),
15691 REAL_CONST(145139.57313754765/8.0),
15692 REAL_CONST(145165.59838878017/8.0),
15693 REAL_CONST(145191.62480651509/8.0),
15694 REAL_CONST(145217.65239064783/8.0),
15695 REAL_CONST(145243.68114107384/8.0),
15696 REAL_CONST(145269.71105768863/8.0),
15697 REAL_CONST(145295.74214038774/8.0),
15698 REAL_CONST(145321.77438906668/8.0),
15699 REAL_CONST(145347.80780362099/8.0),
15700 REAL_CONST(145373.84238394629/8.0),
15701 REAL_CONST(145399.87812993818/8.0),
15702 REAL_CONST(145425.91504149229/8.0),
15703 REAL_CONST(145451.95311850426/8.0),
15704 REAL_CONST(145477.9923608698/8.0),
15705 REAL_CONST(145504.03276848458/8.0),
15706 REAL_CONST(145530.07434124436/8.0),
15707 REAL_CONST(145556.11707904484/8.0),
15708 REAL_CONST(145582.16098178181/8.0),
15709 REAL_CONST(145608.20604935108/8.0),
15710 REAL_CONST(145634.25228164849/8.0),
15711 REAL_CONST(145660.29967856981/8.0),
15712 REAL_CONST(145686.34824001096/8.0),
15713 REAL_CONST(145712.39796586783/8.0),
15714 REAL_CONST(145738.4488560363/8.0),
15715 REAL_CONST(145764.50091041232/8.0),
15716 REAL_CONST(145790.55412889185/8.0),
15717 REAL_CONST(145816.60851137087/8.0),
15718 REAL_CONST(145842.66405774537/8.0),
15719 REAL_CONST(145868.72076791141/8.0),
15720 REAL_CONST(145894.77864176501/8.0),
15721 REAL_CONST(145920.83767920226/8.0),
15722 REAL_CONST(145946.89788011924/8.0),
15723 REAL_CONST(145972.95924441208/8.0),
15724 REAL_CONST(145999.02177197693/8.0),
15725 REAL_CONST(146025.08546270995/8.0),
15726 REAL_CONST(146051.15031650732/8.0),
15727 REAL_CONST(146077.21633326527/8.0),
15728 REAL_CONST(146103.28351288004/8.0),
15729 REAL_CONST(146129.35185524789/8.0),
15730 REAL_CONST(146155.42136026506/8.0),
15731 REAL_CONST(146181.49202782792/8.0),
15732 REAL_CONST(146207.56385783272/8.0),
15733 REAL_CONST(146233.63685017588/8.0),
15734 REAL_CONST(146259.71100475377/8.0),
15735 REAL_CONST(146285.78632146274/8.0),
15736 REAL_CONST(146311.86280019928/8.0),
15737 REAL_CONST(146337.94044085976/8.0),
15738 REAL_CONST(146364.01924334071/8.0),
15739 REAL_CONST(146390.09920753856/8.0),
15740 REAL_CONST(146416.18033334985/8.0),
15741 REAL_CONST(146442.26262067116/8.0),
15742 REAL_CONST(146468.34606939898/8.0),
15743 REAL_CONST(146494.43067942993/8.0),
15744 REAL_CONST(146520.51645066062/8.0),
15745 REAL_CONST(146546.60338298764/8.0),
15746 REAL_CONST(146572.69147630769/8.0),
15747 REAL_CONST(146598.78073051744/8.0),
15748 REAL_CONST(146624.87114551352/8.0),
15749 REAL_CONST(146650.96272119274/8.0),
15750 REAL_CONST(146677.05545745179/8.0),
15751 REAL_CONST(146703.14935418745/8.0),
15752 REAL_CONST(146729.2444112965/8.0),
15753 REAL_CONST(146755.34062867577/8.0),
15754 REAL_CONST(146781.43800622207/8.0),
15755 REAL_CONST(146807.53654383228/8.0),
15756 REAL_CONST(146833.63624140329/8.0),
15757 REAL_CONST(146859.73709883197/8.0),
15758 REAL_CONST(146885.83911601527/8.0),
15759 REAL_CONST(146911.94229285014/8.0),
15760 REAL_CONST(146938.04662923355/8.0),
15761 REAL_CONST(146964.15212506248/8.0),
15762 REAL_CONST(146990.25878023397/8.0),
15763 REAL_CONST(147016.36659464505/8.0),
15764 REAL_CONST(147042.47556819281/8.0),
15765 REAL_CONST(147068.58570077427/8.0),
15766 REAL_CONST(147094.6969922866/8.0),
15767 REAL_CONST(147120.80944262692/8.0),
15768 REAL_CONST(147146.92305169237/8.0),
15769 REAL_CONST(147173.03781938017/8.0),
15770 REAL_CONST(147199.15374558745/8.0),
15771 REAL_CONST(147225.27083021149/8.0),
15772 REAL_CONST(147251.38907314953/8.0),
15773 REAL_CONST(147277.50847429881/8.0),
15774 REAL_CONST(147303.62903355664/8.0),
15775 REAL_CONST(147329.75075082036/8.0),
15776 REAL_CONST(147355.87362598727/8.0),
15777 REAL_CONST(147381.99765895473/8.0),
15778 REAL_CONST(147408.12284962015/8.0),
15779 REAL_CONST(147434.24919788091/8.0),
15780 REAL_CONST(147460.37670363448/8.0),
15781 REAL_CONST(147486.50536677826/8.0),
15782 REAL_CONST(147512.63518720976/8.0),
15783 REAL_CONST(147538.76616482646/8.0),
15784 REAL_CONST(147564.89829952587/8.0),
15785 REAL_CONST(147591.03159120557/8.0),
15786 REAL_CONST(147617.16603976308/8.0),
15787 REAL_CONST(147643.30164509601/8.0),
15788 REAL_CONST(147669.43840710199/8.0),
15789 REAL_CONST(147695.57632567859/8.0),
15790 REAL_CONST(147721.71540072354/8.0),
15791 REAL_CONST(147747.85563213445/8.0),
15792 REAL_CONST(147773.99701980909/8.0),
15793 REAL_CONST(147800.13956364512/8.0),
15794 REAL_CONST(147826.28326354033/8.0),
15795 REAL_CONST(147852.42811939248/8.0),
15796 REAL_CONST(147878.57413109933/8.0),
15797 REAL_CONST(147904.72129855872/8.0),
15798 REAL_CONST(147930.86962166851/8.0),
15799 REAL_CONST(147957.01910032652/8.0),
15800 REAL_CONST(147983.16973443062/8.0),
15801 REAL_CONST(148009.32152387875/8.0),
15802 REAL_CONST(148035.47446856883/8.0),
15803 REAL_CONST(148061.62856839882/8.0),
15804 REAL_CONST(148087.78382326665/8.0),
15805 REAL_CONST(148113.94023307035/8.0),
15806 REAL_CONST(148140.09779770792/8.0),
15807 REAL_CONST(148166.25651707739/8.0),
15808 REAL_CONST(148192.41639107687/8.0),
15809 REAL_CONST(148218.57741960438/8.0),
15810 REAL_CONST(148244.73960255808/8.0),
15811 REAL_CONST(148270.90293983606/8.0),
15812 REAL_CONST(148297.0674313365/8.0),
15813 REAL_CONST(148323.23307695755/8.0),
15814 REAL_CONST(148349.39987659742/8.0),
15815 REAL_CONST(148375.56783015432/8.0),
15816 REAL_CONST(148401.73693752653/8.0),
15817 REAL_CONST(148427.90719861226/8.0),
15818 REAL_CONST(148454.07861330983/8.0),
15819 REAL_CONST(148480.25118151752/8.0),
15820 REAL_CONST(148506.42490313368/8.0),
15821 REAL_CONST(148532.59977805667/8.0),
15822 REAL_CONST(148558.77580618486/8.0),
15823 REAL_CONST(148584.95298741665/8.0),
15824 REAL_CONST(148611.13132165043/8.0),
15825 REAL_CONST(148637.31080878471/8.0),
15826 REAL_CONST(148663.49144871789/8.0),
15827 REAL_CONST(148689.6732413485/8.0),
15828 REAL_CONST(148715.85618657502/8.0),
15829 REAL_CONST(148742.040284296/8.0),
15830 REAL_CONST(148768.22553440998/8.0),
15831 REAL_CONST(148794.41193681557/8.0),
15832 REAL_CONST(148820.59949141133/8.0),
15833 REAL_CONST(148846.78819809589/8.0),
15834 REAL_CONST(148872.97805676793/8.0),
15835 REAL_CONST(148899.16906732606/8.0),
15836 REAL_CONST(148925.36122966901/8.0),
15837 REAL_CONST(148951.55454369547/8.0),
15838 REAL_CONST(148977.74900930419/8.0),
15839 REAL_CONST(149003.9446263939/8.0),
15840 REAL_CONST(149030.1413948634/8.0),
15841 REAL_CONST(149056.33931461151/8.0),
15842 REAL_CONST(149082.53838553699/8.0),
15843 REAL_CONST(149108.73860753875/8.0),
15844 REAL_CONST(149134.9399805156/8.0),
15845 REAL_CONST(149161.14250436646/8.0),
15846 REAL_CONST(149187.34617899026/8.0),
15847 REAL_CONST(149213.5510042859/8.0),
15848 REAL_CONST(149239.75698015234/8.0),
15849 REAL_CONST(149265.96410648854/8.0),
15850 REAL_CONST(149292.17238319354/8.0),
15851 REAL_CONST(149318.38181016635/8.0),
15852 REAL_CONST(149344.59238730598/8.0),
15853 REAL_CONST(149370.80411451156/8.0),
15854 REAL_CONST(149397.01699168212/8.0),
15855 REAL_CONST(149423.23101871679/8.0),
15856 REAL_CONST(149449.44619551473/8.0),
15857 REAL_CONST(149475.66252197503/8.0),
15858 REAL_CONST(149501.87999799693/8.0),
15859 REAL_CONST(149528.0986234796/8.0),
15860 REAL_CONST(149554.31839832227/8.0),
15861 REAL_CONST(149580.53932242419/8.0),
15862 REAL_CONST(149606.76139568459/8.0),
15863 REAL_CONST(149632.98461800278/8.0),
15864 REAL_CONST(149659.20898927809/8.0),
15865 REAL_CONST(149685.43450940982/8.0),
15866 REAL_CONST(149711.66117829733/8.0),
15867 REAL_CONST(149737.88899584001/8.0),
15868 REAL_CONST(149764.11796193724/8.0),
15869 REAL_CONST(149790.34807648844/8.0),
15870 REAL_CONST(149816.57933939309/8.0),
15871 REAL_CONST(149842.81175055061/8.0),
15872 REAL_CONST(149869.04530986046/8.0),
15873 REAL_CONST(149895.28001722222/8.0),
15874 REAL_CONST(149921.51587253538/8.0),
15875 REAL_CONST(149947.75287569952/8.0),
15876 REAL_CONST(149973.99102661415/8.0),
15877 REAL_CONST(150000.23032517891/8.0),
15878 REAL_CONST(150026.47077129342/8.0),
15879 REAL_CONST(150052.71236485732/8.0),
15880 REAL_CONST(150078.95510577026/8.0),
15881 REAL_CONST(150105.1989939319/8.0),
15882 REAL_CONST(150131.444029242/8.0),
15883 REAL_CONST(150157.69021160025/8.0),
15884 REAL_CONST(150183.93754090639/8.0),
15885 REAL_CONST(150210.18601706024/8.0),
15886 REAL_CONST(150236.43563996154/8.0),
15887 REAL_CONST(150262.68640951012/8.0),
15888 REAL_CONST(150288.93832560582/8.0),
15889 REAL_CONST(150315.19138814852/8.0),
15890 REAL_CONST(150341.44559703805/8.0),
15891 REAL_CONST(150367.70095217437/8.0),
15892 REAL_CONST(150393.95745345735/8.0),
15893 REAL_CONST(150420.21510078697/8.0),
15894 REAL_CONST(150446.47389406321/8.0),
15895 REAL_CONST(150472.73383318601/8.0),
15896 REAL_CONST(150498.99491805542/8.0),
15897 REAL_CONST(150525.25714857146/8.0),
15898 REAL_CONST(150551.52052463419/8.0),
15899 REAL_CONST(150577.78504614369/8.0),
15900 REAL_CONST(150604.05071300003/8.0),
15901 REAL_CONST(150630.31752510337/8.0),
15902 REAL_CONST(150656.58548235384/8.0),
15903 REAL_CONST(150682.85458465159/8.0),
15904 REAL_CONST(150709.1248318968/8.0),
15905 REAL_CONST(150735.39622398972/8.0),
15906 REAL_CONST(150761.66876083051/8.0),
15907 REAL_CONST(150787.9424423195/8.0),
15908 REAL_CONST(150814.21726835691/8.0),
15909 REAL_CONST(150840.49323884305/8.0),
15910 REAL_CONST(150866.77035367821/8.0),
15911 REAL_CONST(150893.04861276277/8.0),
15912 REAL_CONST(150919.32801599705/8.0),
15913 REAL_CONST(150945.60856328148/8.0),
15914 REAL_CONST(150971.89025451642/8.0),
15915 REAL_CONST(150998.17308960229/8.0),
15916 REAL_CONST(151024.45706843957/8.0),
15917 REAL_CONST(151050.74219092872/8.0),
15918 REAL_CONST(151077.02845697021/8.0),
15919 REAL_CONST(151103.31586646455/8.0),
15920 REAL_CONST(151129.60441931229/8.0),
15921 REAL_CONST(151155.894115414/8.0),
15922 REAL_CONST(151182.1849546702/8.0),
15923 REAL_CONST(151208.47693698155/8.0),
15924 REAL_CONST(151234.77006224863/8.0),
15925 REAL_CONST(151261.06433037209/8.0),
15926 REAL_CONST(151287.35974125259/8.0),
15927 REAL_CONST(151313.65629479082/8.0),
15928 REAL_CONST(151339.95399088747/8.0),
15929 REAL_CONST(151366.25282944329/8.0),
15930 REAL_CONST(151392.55281035902/8.0),
15931 REAL_CONST(151418.85393353543/8.0),
15932 REAL_CONST(151445.1561988733/8.0),
15933 REAL_CONST(151471.45960627345/8.0),
15934 REAL_CONST(151497.76415563675/8.0),
15935 REAL_CONST(151524.06984686397/8.0),
15936 REAL_CONST(151550.37667985607/8.0),
15937 REAL_CONST(151576.68465451393/8.0),
15938 REAL_CONST(151602.99377073845/8.0),
15939 REAL_CONST(151629.30402843058/8.0),
15940 REAL_CONST(151655.61542749128/8.0),
15941 REAL_CONST(151681.92796782157/8.0),
15942 REAL_CONST(151708.24164932242/8.0),
15943 REAL_CONST(151734.55647189484/8.0),
15944 REAL_CONST(151760.87243543993/8.0),
15945 REAL_CONST(151787.18953985872/8.0),
15946 REAL_CONST(151813.50778505235/8.0),
15947 REAL_CONST(151839.82717092187/8.0),
15948 REAL_CONST(151866.14769736846/8.0),
15949 REAL_CONST(151892.46936429327/8.0),
15950 REAL_CONST(151918.79217159748/8.0),
15951 REAL_CONST(151945.11611918229/8.0),
15952 REAL_CONST(151971.44120694889/8.0),
15953 REAL_CONST(151997.76743479856/8.0),
15954 REAL_CONST(152024.09480263255/8.0),
15955 REAL_CONST(152050.42331035214/8.0),
15956 REAL_CONST(152076.75295785864/8.0),
15957 REAL_CONST(152103.08374505339/8.0),
15958 REAL_CONST(152129.41567183775/8.0),
15959 REAL_CONST(152155.74873811303/8.0),
15960 REAL_CONST(152182.08294378067/8.0),
15961 REAL_CONST(152208.41828874208/8.0),
15962 REAL_CONST(152234.75477289871/8.0),
15963 REAL_CONST(152261.09239615197/8.0),
15964 REAL_CONST(152287.43115840337/8.0),
15965 REAL_CONST(152313.77105955439/8.0),
15966 REAL_CONST(152340.11209950657/8.0),
15967 REAL_CONST(152366.45427816146/8.0),
15968 REAL_CONST(152392.79759542056/8.0),
15969 REAL_CONST(152419.14205118554/8.0),
15970 REAL_CONST(152445.48764535793/8.0),
15971 REAL_CONST(152471.8343778394/8.0),
15972 REAL_CONST(152498.18224853161/8.0),
15973 REAL_CONST(152524.53125733617/8.0),
15974 REAL_CONST(152550.88140415482/8.0),
15975 REAL_CONST(152577.23268888926/8.0),
15976 REAL_CONST(152603.58511144121/8.0),
15977 REAL_CONST(152629.93867171241/8.0),
15978 REAL_CONST(152656.29336960468/8.0),
15979 REAL_CONST(152682.64920501978/8.0),
15980 REAL_CONST(152709.00617785956/8.0),
15981 REAL_CONST(152735.36428802583/8.0),
15982 REAL_CONST(152761.72353542043/8.0),
15983 REAL_CONST(152788.08391994529/8.0),
15984 REAL_CONST(152814.44544150229/8.0),
15985 REAL_CONST(152840.80809999333/8.0),
15986 REAL_CONST(152867.17189532038/8.0),
15987 REAL_CONST(152893.53682738543/8.0),
15988 REAL_CONST(152919.90289609041/8.0),
15989 REAL_CONST(152946.27010133737/8.0),
15990 REAL_CONST(152972.63844302832/8.0),
15991 REAL_CONST(152999.00792106529/8.0),
15992 REAL_CONST(153025.37853535041/8.0),
15993 REAL_CONST(153051.7502857857/8.0),
15994 REAL_CONST(153078.12317227334/8.0),
15995 REAL_CONST(153104.4971947154/8.0),
15996 REAL_CONST(153130.8723530141/8.0),
15997 REAL_CONST(153157.24864707157/8.0),
15998 REAL_CONST(153183.62607679001/8.0),
15999 REAL_CONST(153210.00464207167/8.0),
16000 REAL_CONST(153236.38434281875/8.0),
16001 REAL_CONST(153262.76517893354/8.0),
16002 REAL_CONST(153289.14715031831/8.0),
16003 REAL_CONST(153315.53025687535/8.0),
16004 REAL_CONST(153341.91449850702/8.0),
16005 REAL_CONST(153368.2998751156/8.0),
16006 REAL_CONST(153394.68638660354/8.0),
16007 REAL_CONST(153421.07403287315/8.0),
16008 REAL_CONST(153447.46281382689/8.0),
16009 REAL_CONST(153473.85272936718/8.0),
16010 REAL_CONST(153500.24377939643/8.0),
16011 REAL_CONST(153526.63596381716/8.0),
16012 REAL_CONST(153553.02928253182/8.0),
16013 REAL_CONST(153579.42373544298/8.0),
16014 REAL_CONST(153605.81932245308/8.0),
16015 REAL_CONST(153632.21604346478/8.0),
16016 REAL_CONST(153658.61389838057/8.0),
16017 REAL_CONST(153685.0128871031/8.0),
16018 REAL_CONST(153711.41300953497/8.0),
16019 REAL_CONST(153737.81426557881/8.0),
16020 REAL_CONST(153764.21665513728/8.0),
16021 REAL_CONST(153790.62017811305/8.0),
16022 REAL_CONST(153817.02483440886/8.0),
16023 REAL_CONST(153843.43062392739/8.0),
16024 REAL_CONST(153869.83754657139/8.0),
16025 REAL_CONST(153896.24560224367/8.0),
16026 REAL_CONST(153922.65479084692/8.0),
16027 REAL_CONST(153949.06511228404/8.0),
16028 REAL_CONST(153975.4765664578/8.0),
16029 REAL_CONST(154001.88915327107/8.0),
16030 REAL_CONST(154028.30287262669/8.0),
16031 REAL_CONST(154054.71772442761/8.0),
16032 REAL_CONST(154081.13370857667/8.0),
16033 REAL_CONST(154107.55082497682/8.0),
16034 REAL_CONST(154133.96907353101/8.0),
16035 REAL_CONST(154160.38845414223/8.0),
16036 REAL_CONST(154186.80896671346/8.0),
16037 REAL_CONST(154213.23061114774/8.0),
16038 REAL_CONST(154239.65338734805/8.0),
16039 REAL_CONST(154266.07729521746/8.0),
16040 REAL_CONST(154292.50233465908/8.0),
16041 REAL_CONST(154318.92850557598/8.0),
16042 REAL_CONST(154345.35580787127/8.0),
16043 REAL_CONST(154371.7842414481/8.0),
16044 REAL_CONST(154398.21380620965/8.0),
16045 REAL_CONST(154424.64450205903/8.0),
16046 REAL_CONST(154451.07632889951/8.0),
16047 REAL_CONST(154477.50928663427/8.0),
16048 REAL_CONST(154503.94337516659/8.0),
16049 REAL_CONST(154530.37859439969/8.0),
16050 REAL_CONST(154556.81494423689/8.0),
16051 REAL_CONST(154583.25242458144/8.0),
16052 REAL_CONST(154609.69103533673/8.0),
16053 REAL_CONST(154636.13077640603/8.0),
16054 REAL_CONST(154662.57164769279/8.0),
16055 REAL_CONST(154689.01364910032/8.0),
16056 REAL_CONST(154715.45678053208/8.0),
16057 REAL_CONST(154741.90104189145/8.0),
16058 REAL_CONST(154768.34643308193/8.0),
16059 REAL_CONST(154794.79295400696/8.0),
16060 REAL_CONST(154821.24060457002/8.0),
16061 REAL_CONST(154847.68938467462/8.0),
16062 REAL_CONST(154874.13929422433/8.0),
16063 REAL_CONST(154900.59033312264/8.0),
16064 REAL_CONST(154927.04250127316/8.0),
16065 REAL_CONST(154953.49579857948/8.0),
16066 REAL_CONST(154979.95022494521/8.0),
16067 REAL_CONST(155006.40578027396/8.0),
16068 REAL_CONST(155032.86246446942/8.0),
16069 REAL_CONST(155059.32027743524/8.0),
16070 REAL_CONST(155085.77921907514/8.0),
16071 REAL_CONST(155112.2392892928/8.0),
16072 REAL_CONST(155138.70048799197/8.0),
16073 REAL_CONST(155165.16281507642/8.0),
16074 REAL_CONST(155191.62627044989/8.0),
16075 REAL_CONST(155218.09085401625/8.0),
16076 REAL_CONST(155244.55656567923/8.0),
16077 REAL_CONST(155271.02340534274/8.0),
16078 REAL_CONST(155297.49137291059/8.0),
16079 REAL_CONST(155323.96046828668/8.0),
16080 REAL_CONST(155350.4306913749/8.0),
16081 REAL_CONST(155376.90204207919/8.0),
16082 REAL_CONST(155403.37452030348/8.0),
16083 REAL_CONST(155429.84812595171/8.0),
16084 REAL_CONST(155456.32285892789/8.0),
16085 REAL_CONST(155482.79871913602/8.0),
16086 REAL_CONST(155509.27570648011/8.0),
16087 REAL_CONST(155535.75382086422/8.0),
16088 REAL_CONST(155562.23306219239/8.0),
16089 REAL_CONST(155588.71343036872/8.0),
16090 REAL_CONST(155615.19492529731/8.0),
16091 REAL_CONST(155641.67754688227/8.0),
16092 REAL_CONST(155668.16129502779/8.0),
16093 REAL_CONST(155694.64616963797/8.0),
16094 REAL_CONST(155721.13217061706/8.0),
16095 REAL_CONST(155747.61929786921/8.0),
16096 REAL_CONST(155774.10755129869/8.0),
16097 REAL_CONST(155800.59693080973/8.0),
16098 REAL_CONST(155827.08743630661/8.0),
16099 REAL_CONST(155853.57906769359/8.0),
16100 REAL_CONST(155880.07182487496/8.0),
16101 REAL_CONST(155906.56570775513/8.0),
16102 REAL_CONST(155933.06071623837/8.0),
16103 REAL_CONST(155959.55685022907/8.0),
16104 REAL_CONST(155986.05410963166/8.0),
16105 REAL_CONST(156012.5524943505/8.0),
16106 REAL_CONST(156039.05200429002/8.0),
16107 REAL_CONST(156065.55263935472/8.0),
16108 REAL_CONST(156092.054399449/8.0),
16109 REAL_CONST(156118.5572844774/8.0),
16110 REAL_CONST(156145.06129434443/8.0),
16111 REAL_CONST(156171.5664289546/8.0),
16112 REAL_CONST(156198.07268821247/8.0),
16113 REAL_CONST(156224.5800720226/8.0),
16114 REAL_CONST(156251.08858028959/8.0),
16115 REAL_CONST(156277.59821291809/8.0),
16116 REAL_CONST(156304.10896981266/8.0),
16117 REAL_CONST(156330.62085087801/8.0),
16118 REAL_CONST(156357.1338560188/8.0),
16119 REAL_CONST(156383.64798513969/8.0),
16120 REAL_CONST(156410.16323814544/8.0),
16121 REAL_CONST(156436.67961494075/8.0),
16122 REAL_CONST(156463.1971154304/8.0),
16123 REAL_CONST(156489.71573951913/8.0),
16124 REAL_CONST(156516.23548711176/8.0),
16125 REAL_CONST(156542.75635811311/8.0),
16126 REAL_CONST(156569.27835242799/8.0),
16127 REAL_CONST(156595.80146996127/8.0),
16128 REAL_CONST(156622.32571061782/8.0),
16129 REAL_CONST(156648.85107430254/8.0),
16130 REAL_CONST(156675.37756092031/8.0),
16131 REAL_CONST(156701.90517037612/8.0),
16132 REAL_CONST(156728.43390257491/8.0),
16133 REAL_CONST(156754.96375742162/8.0),
16134 REAL_CONST(156781.49473482129/8.0),
16135 REAL_CONST(156808.02683467892/8.0),
16136 REAL_CONST(156834.5600568995/8.0),
16137 REAL_CONST(156861.09440138817/8.0),
16138 REAL_CONST(156887.62986804993/8.0),
16139 REAL_CONST(156914.16645678994/8.0),
16140 REAL_CONST(156940.70416751326/8.0),
16141 REAL_CONST(156967.24300012505/8.0),
16142 REAL_CONST(156993.78295453047/8.0),
16143 REAL_CONST(157020.32403063469/8.0),
16144 REAL_CONST(157046.8662283429/8.0),
16145 REAL_CONST(157073.40954756032/8.0),
16146 REAL_CONST(157099.9539881922/8.0),
16147 REAL_CONST(157126.49955014378/8.0),
16148 REAL_CONST(157153.04623332032/8.0),
16149 REAL_CONST(157179.59403762716/8.0),
16150 REAL_CONST(157206.14296296958/8.0),
16151 REAL_CONST(157232.69300925292/8.0),
16152 REAL_CONST(157259.24417638258/8.0),
16153 REAL_CONST(157285.79646426387/8.0),
16154 REAL_CONST(157312.34987280221/8.0),
16155 REAL_CONST(157338.90440190304/8.0),
16156 REAL_CONST(157365.46005147175/8.0),
16157 REAL_CONST(157392.01682141385/8.0),
16158 REAL_CONST(157418.57471163478/8.0),
16159 REAL_CONST(157445.13372204005/8.0),
16160 REAL_CONST(157471.69385253513/8.0),
16161 REAL_CONST(157498.25510302564/8.0),
16162 REAL_CONST(157524.81747341706/8.0),
16163 REAL_CONST(157551.38096361503/8.0),
16164 REAL_CONST(157577.9455735251/8.0),
16165 REAL_CONST(157604.51130305286/8.0),
16166 REAL_CONST(157631.07815210402/8.0),
16167 REAL_CONST(157657.64612058419/8.0),
16168 REAL_CONST(157684.21520839902/8.0),
16169 REAL_CONST(157710.78541545427/8.0),
16170 REAL_CONST(157737.35674165559/8.0),
16171 REAL_CONST(157763.92918690876/8.0),
16172 REAL_CONST(157790.50275111952/8.0),
16173 REAL_CONST(157817.07743419363/8.0),
16174 REAL_CONST(157843.65323603692/8.0),
16175 REAL_CONST(157870.23015655516/8.0),
16176 REAL_CONST(157896.80819565422/8.0),
16177 REAL_CONST(157923.3873532399/8.0),
16178 REAL_CONST(157949.96762921812/8.0),
16179 REAL_CONST(157976.54902349479/8.0),
16180 REAL_CONST(158003.13153597576/8.0),
16181 REAL_CONST(158029.71516656701/8.0),
16182 REAL_CONST(158056.29991517449/8.0),
16183 REAL_CONST(158082.88578170416/8.0),
16184 REAL_CONST(158109.47276606198/8.0),
16185 REAL_CONST(158136.06086815402/8.0),
16186 REAL_CONST(158162.65008788629/8.0),
16187 REAL_CONST(158189.24042516484/8.0),
16188 REAL_CONST(158215.83187989573/8.0),
16189 REAL_CONST(158242.42445198505/8.0),
16190 REAL_CONST(158269.01814133892/8.0),
16191 REAL_CONST(158295.61294786347/8.0),
16192 REAL_CONST(158322.20887146486/8.0),
16193 REAL_CONST(158348.80591204923/8.0),
16194 REAL_CONST(158375.4040695228/8.0),
16195 REAL_CONST(158402.00334379176/8.0),
16196 REAL_CONST(158428.60373476235/8.0),
16197 REAL_CONST(158455.2052423408/8.0),
16198 REAL_CONST(158481.80786643337/8.0),
16199 REAL_CONST(158508.41160694641/8.0),
16200 REAL_CONST(158535.01646378616/8.0),
16201 REAL_CONST(158561.62243685898/8.0),
16202 REAL_CONST(158588.2295260712/8.0),
16203 REAL_CONST(158614.8377313292/8.0),
16204 REAL_CONST(158641.44705253936/8.0),
16205 REAL_CONST(158668.05748960807/8.0),
16206 REAL_CONST(158694.66904244179/8.0),
16207 REAL_CONST(158721.28171094693/8.0),
16208 REAL_CONST(158747.89549502998/8.0),
16209 REAL_CONST(158774.5103945974/8.0),
16210 REAL_CONST(158801.12640955573/8.0),
16211 REAL_CONST(158827.74353981143/8.0),
16212 REAL_CONST(158854.36178527112/8.0),
16213 REAL_CONST(158880.9811458413/8.0),
16214 REAL_CONST(158907.60162142856/8.0),
16215 REAL_CONST(158934.22321193956/8.0),
16216 REAL_CONST(158960.84591728085/8.0),
16217 REAL_CONST(158987.46973735912/8.0),
16218 REAL_CONST(159014.09467208097/8.0),
16219 REAL_CONST(159040.72072135314/8.0),
16220 REAL_CONST(159067.3478850823/8.0),
16221 REAL_CONST(159093.97616317519/8.0),
16222 REAL_CONST(159120.60555553852/8.0),
16223 REAL_CONST(159147.23606207906/8.0),
16224 REAL_CONST(159173.8676827036/8.0),
16225 REAL_CONST(159200.50041731889/8.0),
16226 REAL_CONST(159227.13426583182/8.0),
16227 REAL_CONST(159253.76922814918/8.0),
16228 REAL_CONST(159280.40530417781/8.0),
16229 REAL_CONST(159307.04249382461/8.0),
16230 REAL_CONST(159333.68079699649/8.0),
16231 REAL_CONST(159360.32021360032/8.0),
16232 REAL_CONST(159386.96074354305/8.0),
16233 REAL_CONST(159413.60238673165/8.0),
16234 REAL_CONST(159440.24514307309/8.0),
16235 REAL_CONST(159466.88901247433/8.0),
16236 REAL_CONST(159493.53399484244/8.0),
16237 REAL_CONST(159520.18009008438/8.0),
16238 REAL_CONST(159546.82729810724/8.0),
16239 REAL_CONST(159573.47561881805/8.0),
16240 REAL_CONST(159600.12505212394/8.0),
16241 REAL_CONST(159626.77559793202/8.0),
16242 REAL_CONST(159653.42725614941/8.0),
16243 REAL_CONST(159680.08002668325/8.0),
16244 REAL_CONST(159706.73390944069/8.0),
16245 REAL_CONST(159733.38890432892/8.0),
16246 REAL_CONST(159760.04501125516/8.0),
16247 REAL_CONST(159786.70223012666/8.0),
16248 REAL_CONST(159813.36056085059/8.0),
16249 REAL_CONST(159840.02000333427/8.0),
16250 REAL_CONST(159866.68055748497/8.0),
16251 REAL_CONST(159893.34222320997/8.0),
16252 REAL_CONST(159920.00500041663/8.0),
16253 REAL_CONST(159946.66888901225/8.0),
16254 REAL_CONST(159973.33388890422/8.0),
16255 REAL_CONST(159999.99999999988/8.0),
16256 REAL_CONST(160026.66722220668/8.0),
16257 REAL_CONST(160053.33555543202/8.0),
16258 REAL_CONST(160080.0049995833/8.0),
16259 REAL_CONST(160106.67555456801/8.0),
16260 REAL_CONST(160133.3472202936/8.0),
16261 REAL_CONST(160160.0199966676/8.0),
16262 REAL_CONST(160186.6938835975/8.0),
16263 REAL_CONST(160213.36888099083/8.0),
16264 REAL_CONST(160240.04498875517/8.0),
16265 REAL_CONST(160266.72220679806/8.0),
16266 REAL_CONST(160293.40053502709/8.0),
16267 REAL_CONST(160320.07997334987/8.0),
16268 REAL_CONST(160346.76052167406/8.0),
16269 REAL_CONST(160373.44217990729/8.0),
16270 REAL_CONST(160400.1249479572/8.0),
16271 REAL_CONST(160426.80882573154/8.0),
16272 REAL_CONST(160453.49381313793/8.0),
16273 REAL_CONST(160480.17991008417/8.0),
16274 REAL_CONST(160506.86711647795/8.0),
16275 REAL_CONST(160533.55543222709/8.0),
16276 REAL_CONST(160560.24485723933/8.0),
16277 REAL_CONST(160586.93539142248/8.0),
16278 REAL_CONST(160613.62703468435/8.0),
16279 REAL_CONST(160640.31978693281/8.0),
16280 REAL_CONST(160667.01364807569/8.0),
16281 REAL_CONST(160693.70861802087/8.0),
16282 REAL_CONST(160720.40469667627/8.0),
16283 REAL_CONST(160747.1018839498/8.0),
16284 REAL_CONST(160773.80017974938/8.0),
16285 REAL_CONST(160800.49958398298/8.0),
16286 REAL_CONST(160827.20009655855/8.0),
16287 REAL_CONST(160853.90171738411/8.0),
16288 REAL_CONST(160880.60444636765/8.0),
16289 REAL_CONST(160907.30828341722/8.0),
16290 REAL_CONST(160934.01322844089/8.0),
16291 REAL_CONST(160960.71928134665/8.0),
16292 REAL_CONST(160987.42644204266/8.0),
16293 REAL_CONST(161014.13471043704/8.0),
16294 REAL_CONST(161040.84408643784/8.0),
16295 REAL_CONST(161067.55456995327/8.0),
16296 REAL_CONST(161094.26616089148/8.0),
16297 REAL_CONST(161120.97885916062/8.0),
16298 REAL_CONST(161147.69266466892/8.0),
16299 REAL_CONST(161174.40757732463/8.0),
16300 REAL_CONST(161201.12359703594/8.0),
16301 REAL_CONST(161227.84072371112/8.0),
16302 REAL_CONST(161254.55895725847/8.0),
16303 REAL_CONST(161281.27829758628/8.0),
16304 REAL_CONST(161307.99874460287/8.0),
16305 REAL_CONST(161334.72029821656/8.0),
16306 REAL_CONST(161361.44295833571/8.0),
16307 REAL_CONST(161388.1667248687/8.0),
16308 REAL_CONST(161414.89159772391/8.0),
16309 REAL_CONST(161441.61757680977/8.0),
16310 REAL_CONST(161468.34466203468/8.0),
16311 REAL_CONST(161495.07285330712/8.0),
16312 REAL_CONST(161521.80215053557/8.0),
16313 REAL_CONST(161548.53255362847/8.0),
16314 REAL_CONST(161575.26406249436/8.0),
16315 REAL_CONST(161601.99667704175/8.0),
16316 REAL_CONST(161628.7303971792/8.0),
16317 REAL_CONST(161655.46522281526/8.0),
16318 REAL_CONST(161682.20115385848/8.0),
16319 REAL_CONST(161708.93819021754/8.0),
16320 REAL_CONST(161735.67633180099/8.0),
16321 REAL_CONST(161762.41557851751/8.0),
16322 REAL_CONST(161789.15593027571/8.0),
16323 REAL_CONST(161815.89738698432/8.0),
16324 REAL_CONST(161842.63994855201/8.0),
16325 REAL_CONST(161869.38361488748/8.0),
16326 REAL_CONST(161896.1283858995/8.0),
16327 REAL_CONST(161922.87426149679/8.0),
16328 REAL_CONST(161949.62124158812/8.0),
16329 REAL_CONST(161976.36932608229/8.0),
16330 REAL_CONST(162003.1185148881/8.0),
16331 REAL_CONST(162029.8688079144/8.0),
16332 REAL_CONST(162056.62020507001/8.0),
16333 REAL_CONST(162083.37270626382/8.0),
16334 REAL_CONST(162110.12631140469/8.0),
16335 REAL_CONST(162136.88102040152/8.0),
16336 REAL_CONST(162163.63683316324/8.0),
16337 REAL_CONST(162190.39374959879/8.0),
16338 REAL_CONST(162217.15176961714/8.0),
16339 REAL_CONST(162243.91089312723/8.0),
16340 REAL_CONST(162270.67112003808/8.0),
16341 REAL_CONST(162297.43245025873/8.0),
16342 REAL_CONST(162324.19488369819/8.0),
16343 REAL_CONST(162350.9584202655/8.0),
16344 REAL_CONST(162377.72305986975/8.0),
16345 REAL_CONST(162404.48880242003/8.0),
16346 REAL_CONST(162431.25564782543/8.0),
16347 REAL_CONST(162458.02359599507/8.0),
16348 REAL_CONST(162484.79264683815/8.0),
16349 REAL_CONST(162511.56280026378/8.0),
16350 REAL_CONST(162538.33405618116/8.0),
16351 REAL_CONST(162565.10641449949/8.0),
16352 REAL_CONST(162591.87987512801/8.0),
16353 REAL_CONST(162618.65443797593/8.0),
16354 REAL_CONST(162645.43010295252/8.0),
16355 REAL_CONST(162672.20686996708/8.0),
16356 REAL_CONST(162698.98473892888/8.0),
16357 REAL_CONST(162725.76370974723/8.0),
16358 REAL_CONST(162752.54378233149/8.0),
16359 REAL_CONST(162779.32495659095/8.0),
16360 REAL_CONST(162806.10723243505/8.0),
16361 REAL_CONST(162832.89060977317/8.0),
16362 REAL_CONST(162859.67508851466/8.0),
16363 REAL_CONST(162886.46066856899/8.0),
16364 REAL_CONST(162913.24734984562/8.0),
16365 REAL_CONST(162940.03513225398/8.0),
16366 REAL_CONST(162966.82401570358/8.0),
16367 REAL_CONST(162993.6140001039/8.0),
16368 REAL_CONST(163020.40508536444/8.0),
16369 REAL_CONST(163047.19727139481/8.0),
16370 REAL_CONST(163073.99055810447/8.0),
16371 REAL_CONST(163100.78494540305/8.0),
16372 REAL_CONST(163127.58043320014/8.0),
16373 REAL_CONST(163154.37702140535/8.0),
16374 REAL_CONST(163181.17470992831/8.0),
16375 REAL_CONST(163207.97349867865/8.0),
16376 REAL_CONST(163234.77338756606/8.0),
16377 REAL_CONST(163261.57437650024/8.0),
16378 REAL_CONST(163288.37646539087/8.0),
16379 REAL_CONST(163315.17965414765/8.0),
16380 REAL_CONST(163341.98394268038/8.0),
16381 REAL_CONST(163368.78933089875/8.0),
16382 REAL_CONST(163395.59581871261/8.0),
16383 REAL_CONST(163422.40340603172/8.0),
16384 REAL_CONST(163449.2120927659/8.0),
16385 REAL_CONST(163476.02187882498/8.0),
16386 REAL_CONST(163502.83276411882/8.0),
16387 REAL_CONST(163529.6447485573/8.0),
16388 REAL_CONST(163556.45783205028/8.0),
16389 REAL_CONST(163583.2720145077/8.0),
16390 REAL_CONST(163610.08729583945/8.0),
16391 REAL_CONST(163636.90367595552/8.0),
16392 REAL_CONST(163663.72115476584/8.0),
16393 REAL_CONST(163690.53973218042/8.0),
16394 REAL_CONST(163717.35940810922/8.0),
16395 REAL_CONST(163744.18018246227/8.0),
16396 REAL_CONST(163771.00205514964/8.0),
16397 REAL_CONST(163797.82502608138/8.0),
16398 REAL_CONST(163824.64909516752/8.0),
16399 REAL_CONST(163851.4742623182/8.0),
16400 REAL_CONST(163878.3005274435/8.0),
16401 REAL_CONST(163905.12789045356/8.0),
16402 REAL_CONST(163931.95635125853/8.0),
16403 REAL_CONST(163958.78590976857/8.0),
16404 REAL_CONST(163985.61656589387/8.0),
16405 REAL_CONST(164012.44831954464/8.0),
16406 REAL_CONST(164039.28117063109/8.0),
16407 REAL_CONST(164066.11511906344/8.0),
16408 REAL_CONST(164092.95016475199/8.0),
16409 REAL_CONST(164119.78630760699/8.0),
16410 REAL_CONST(164146.62354753874/8.0),
16411 REAL_CONST(164173.46188445756/8.0),
16412 REAL_CONST(164200.30131827376/8.0),
16413 REAL_CONST(164227.14184889771/8.0),
16414 REAL_CONST(164253.98347623978/8.0),
16415 REAL_CONST(164280.82620021031/8.0),
16416 REAL_CONST(164307.67002071979/8.0),
16417 REAL_CONST(164334.51493767856/8.0),
16418 REAL_CONST(164361.3609509971/8.0),
16419 REAL_CONST(164388.20806058586/8.0),
16420 REAL_CONST(164415.05626635533/8.0),
16421 REAL_CONST(164441.905568216/8.0),
16422 REAL_CONST(164468.75596607837/8.0),
16423 REAL_CONST(164495.607459853/8.0),
16424 REAL_CONST(164522.4600494504/8.0),
16425 REAL_CONST(164549.31373478117/8.0),
16426 REAL_CONST(164576.16851575591/8.0),
16427 REAL_CONST(164603.02439228518/8.0),
16428 REAL_CONST(164629.88136427966/8.0),
16429 REAL_CONST(164656.73943164994/8.0),
16430 REAL_CONST(164683.59859430668/8.0),
16431 REAL_CONST(164710.45885216061/8.0),
16432 REAL_CONST(164737.32020512238/8.0),
16433 REAL_CONST(164764.1826531027/8.0),
16434 REAL_CONST(164791.04619601235/8.0),
16435 REAL_CONST(164817.91083376206/8.0),
16436 REAL_CONST(164844.77656626256/8.0),
16437 REAL_CONST(164871.64339342469/8.0),
16438 REAL_CONST(164898.51131515924/8.0),
16439 REAL_CONST(164925.38033137703/8.0),
16440 REAL_CONST(164952.25044198887/8.0),
16441 REAL_CONST(164979.1216469057/8.0),
16442 REAL_CONST(165005.9939460383/8.0),
16443 REAL_CONST(165032.86733929763/8.0),
16444 REAL_CONST(165059.7418265946/8.0),
16445 REAL_CONST(165086.61740784015/8.0),
16446 REAL_CONST(165113.4940829452/8.0)
16447#endif
16448};
16449
16450#endif
16451
16452#ifdef __cplusplus
16453}
16454#endif
16455#endif
diff --git a/apps/codecs/libfaad/is.c b/apps/codecs/libfaad/is.c
new file mode 100644
index 0000000000..127558fb7d
--- /dev/null
+++ b/apps/codecs/libfaad/is.c
@@ -0,0 +1,106 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#include "common.h"
29#include "structs.h"
30
31#include "syntax.h"
32#include "is.h"
33
34#ifdef FIXED_POINT
35static real_t pow05_table[] = {
36 COEF_CONST(1.68179283050743), /* 0.5^(-3/4) */
37 COEF_CONST(1.41421356237310), /* 0.5^(-2/4) */
38 COEF_CONST(1.18920711500272), /* 0.5^(-1/4) */
39 COEF_CONST(1.0), /* 0.5^( 0/4) */
40 COEF_CONST(0.84089641525371), /* 0.5^(+1/4) */
41 COEF_CONST(0.70710678118655), /* 0.5^(+2/4) */
42 COEF_CONST(0.59460355750136) /* 0.5^(+3/4) */
43};
44#endif
45
46void is_decode(ic_stream *ics, ic_stream *icsr, real_t *l_spec, real_t *r_spec,
47 uint16_t frame_len)
48{
49 uint8_t g, sfb, b;
50 uint16_t i;
51#ifndef FIXED_POINT
52 real_t scale;
53#else
54 int32_t exp, frac;
55#endif
56
57 uint16_t nshort = frame_len/8;
58 uint8_t group = 0;
59
60 for (g = 0; g < icsr->num_window_groups; g++)
61 {
62 /* Do intensity stereo decoding */
63 for (b = 0; b < icsr->window_group_length[g]; b++)
64 {
65 for (sfb = 0; sfb < icsr->max_sfb; sfb++)
66 {
67 if (is_intensity(icsr, g, sfb))
68 {
69#ifdef MAIN_DEC
70 /* For scalefactor bands coded in intensity stereo the
71 corresponding predictors in the right channel are
72 switched to "off".
73 */
74 ics->pred.prediction_used[sfb] = 0;
75 icsr->pred.prediction_used[sfb] = 0;
76#endif
77
78#ifndef FIXED_POINT
79 scale = (real_t)pow(0.5, (0.25*icsr->scale_factors[g][sfb]));
80#else
81 exp = icsr->scale_factors[g][sfb] >> 2;
82 frac = icsr->scale_factors[g][sfb] & 3;
83#endif
84
85 /* Scale from left to right channel,
86 do not touch left channel */
87 for (i = icsr->swb_offset[sfb]; i < icsr->swb_offset[sfb+1]; i++)
88 {
89#ifndef FIXED_POINT
90 r_spec[(group*nshort)+i] = MUL_R(l_spec[(group*nshort)+i], scale);
91#else
92 if (exp < 0)
93 r_spec[(group*nshort)+i] = l_spec[(group*nshort)+i] << -exp;
94 else
95 r_spec[(group*nshort)+i] = l_spec[(group*nshort)+i] >> exp;
96 r_spec[(group*nshort)+i] = MUL_C(r_spec[(group*nshort)+i], pow05_table[frac + 3]);
97#endif
98 if (is_intensity(icsr, g, sfb) != invert_intensity(ics, g, sfb))
99 r_spec[(group*nshort)+i] = -r_spec[(group*nshort)+i];
100 }
101 }
102 }
103 group++;
104 }
105 }
106}
diff --git a/apps/codecs/libfaad/is.h b/apps/codecs/libfaad/is.h
new file mode 100644
index 0000000000..1b68f3ec49
--- /dev/null
+++ b/apps/codecs/libfaad/is.h
@@ -0,0 +1,64 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __IS_H__
29#define __IS_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#include "syntax.h"
36
37void is_decode(ic_stream *ics, ic_stream *icsr, real_t *l_spec, real_t *r_spec,
38 uint16_t frame_len);
39
40static INLINE int8_t is_intensity(ic_stream *ics, uint8_t group, uint8_t sfb)
41{
42 switch (ics->sfb_cb[group][sfb])
43 {
44 case INTENSITY_HCB:
45 return 1;
46 case INTENSITY_HCB2:
47 return -1;
48 default:
49 return 0;
50 }
51}
52
53static INLINE int8_t invert_intensity(ic_stream *ics, uint8_t group, uint8_t sfb)
54{
55 if (ics->ms_mask_present == 1)
56 return (1-2*ics->ms_used[group][sfb]);
57 return 1;
58}
59
60
61#ifdef __cplusplus
62}
63#endif
64#endif
diff --git a/apps/codecs/libfaad/kbd_win.h b/apps/codecs/libfaad/kbd_win.h
new file mode 100644
index 0000000000..933e6c1ded
--- /dev/null
+++ b/apps/codecs/libfaad/kbd_win.h
@@ -0,0 +1,2294 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __KBD_WIN_H__
29#define __KBD_WIN_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#ifdef _MSC_VER
36#pragma warning(disable:4305)
37#pragma warning(disable:4244)
38#endif
39
40ALIGN static const real_t kbd_long_1024[] =
41{
42 FRAC_CONST(0.00029256153896361),
43 FRAC_CONST(0.00042998567353047),
44 FRAC_CONST(0.00054674074589540),
45 FRAC_CONST(0.00065482304299792),
46 FRAC_CONST(0.00075870195068747),
47 FRAC_CONST(0.00086059331713336),
48 FRAC_CONST(0.00096177541439010),
49 FRAC_CONST(0.0010630609410878),
50 FRAC_CONST(0.0011650036308132),
51 FRAC_CONST(0.0012680012194148),
52 FRAC_CONST(0.0013723517232956),
53 FRAC_CONST(0.0014782864109136),
54 FRAC_CONST(0.0015859901976719),
55 FRAC_CONST(0.0016956148252373),
56 FRAC_CONST(0.0018072876903517),
57 FRAC_CONST(0.0019211179405514),
58 FRAC_CONST(0.0020372007924215),
59 FRAC_CONST(0.0021556206591754),
60 FRAC_CONST(0.0022764534599614),
61 FRAC_CONST(0.0023997683540995),
62 FRAC_CONST(0.0025256290631156),
63 FRAC_CONST(0.0026540948920831),
64 FRAC_CONST(0.0027852215281403),
65 FRAC_CONST(0.0029190616715331),
66 FRAC_CONST(0.0030556655443223),
67 FRAC_CONST(0.0031950812943391),
68 FRAC_CONST(0.0033373553240392),
69 FRAC_CONST(0.0034825325586930),
70 FRAC_CONST(0.0036306566699199),
71 FRAC_CONST(0.0037817702604646),
72 FRAC_CONST(0.0039359150179719),
73 FRAC_CONST(0.0040931318437260),
74 FRAC_CONST(0.0042534609610026),
75 FRAC_CONST(0.0044169420066964),
76 FRAC_CONST(0.0045836141091341),
77 FRAC_CONST(0.0047535159544086),
78 FRAC_CONST(0.0049266858431214),
79 FRAC_CONST(0.0051031617390698),
80 FRAC_CONST(0.0052829813111335),
81 FRAC_CONST(0.0054661819693975),
82 FRAC_CONST(0.0056528008963682),
83 FRAC_CONST(0.0058428750739943),
84 FRAC_CONST(0.0060364413070882),
85 FRAC_CONST(0.0062335362436492),
86 FRAC_CONST(0.0064341963925079),
87 FRAC_CONST(0.0066384581386503),
88 FRAC_CONST(0.0068463577565218),
89 FRAC_CONST(0.0070579314215715),
90 FRAC_CONST(0.0072732152202559),
91 FRAC_CONST(0.0074922451586909),
92 FRAC_CONST(0.0077150571701162),
93 FRAC_CONST(0.0079416871213115),
94 FRAC_CONST(0.0081721708180857),
95 FRAC_CONST(0.0084065440099458),
96 FRAC_CONST(0.0086448423940363),
97 FRAC_CONST(0.0088871016184291),
98 FRAC_CONST(0.0091333572848345),
99 FRAC_CONST(0.0093836449507939),
100 FRAC_CONST(0.0096380001314086),
101 FRAC_CONST(0.0098964583006517),
102 FRAC_CONST(0.010159054892306),
103 FRAC_CONST(0.010425825300561),
104 FRAC_CONST(0.010696804880310),
105 FRAC_CONST(0.010972028947167),
106 FRAC_CONST(0.011251532777236),
107 FRAC_CONST(0.011535351606646),
108 FRAC_CONST(0.011823520630897),
109 FRAC_CONST(0.012116075003993),
110 FRAC_CONST(0.012413049837429),
111 FRAC_CONST(0.012714480198999),
112 FRAC_CONST(0.013020401111478),
113 FRAC_CONST(0.013330847551161),
114 FRAC_CONST(0.013645854446288),
115 FRAC_CONST(0.013965456675352),
116 FRAC_CONST(0.014289689065314),
117 FRAC_CONST(0.014618586389712),
118 FRAC_CONST(0.014952183366697),
119 FRAC_CONST(0.015290514656976),
120 FRAC_CONST(0.015633614861688),
121 FRAC_CONST(0.015981518520214),
122 FRAC_CONST(0.016334260107915),
123 FRAC_CONST(0.016691874033817),
124 FRAC_CONST(0.017054394638241),
125 FRAC_CONST(0.017421856190380),
126 FRAC_CONST(0.017794292885832),
127 FRAC_CONST(0.018171738844085),
128 FRAC_CONST(0.018554228105962),
129 FRAC_CONST(0.018941794631032),
130 FRAC_CONST(0.019334472294980),
131 FRAC_CONST(0.019732294886947),
132 FRAC_CONST(0.020135296106839),
133 FRAC_CONST(0.020543509562604),
134 FRAC_CONST(0.020956968767488),
135 FRAC_CONST(0.021375707137257),
136 FRAC_CONST(0.021799757987407),
137 FRAC_CONST(0.022229154530343),
138 FRAC_CONST(0.022663929872540),
139 FRAC_CONST(0.023104117011689),
140 FRAC_CONST(0.023549748833816),
141 FRAC_CONST(0.024000858110398),
142 FRAC_CONST(0.024457477495451),
143 FRAC_CONST(0.024919639522613),
144 FRAC_CONST(0.025387376602207),
145 FRAC_CONST(0.025860721018295),
146 FRAC_CONST(0.026339704925726),
147 FRAC_CONST(0.026824360347160),
148 FRAC_CONST(0.027314719170100),
149 FRAC_CONST(0.027810813143900),
150 FRAC_CONST(0.028312673876775),
151 FRAC_CONST(0.028820332832801),
152 FRAC_CONST(0.029333821328905),
153 FRAC_CONST(0.029853170531859),
154 FRAC_CONST(0.030378411455255),
155 FRAC_CONST(0.030909574956490),
156 FRAC_CONST(0.031446691733739),
157 FRAC_CONST(0.031989792322926),
158 FRAC_CONST(0.032538907094693),
159 FRAC_CONST(0.033094066251369),
160 FRAC_CONST(0.033655299823935),
161 FRAC_CONST(0.034222637668991),
162 FRAC_CONST(0.034796109465717),
163 FRAC_CONST(0.035375744712844),
164 FRAC_CONST(0.035961572725616),
165 FRAC_CONST(0.036553622632758),
166 FRAC_CONST(0.037151923373446),
167 FRAC_CONST(0.037756503694277),
168 FRAC_CONST(0.038367392146243),
169 FRAC_CONST(0.038984617081711),
170 FRAC_CONST(0.039608206651398),
171 FRAC_CONST(0.040238188801359),
172 FRAC_CONST(0.040874591269976),
173 FRAC_CONST(0.041517441584950),
174 FRAC_CONST(0.042166767060301),
175 FRAC_CONST(0.042822594793376),
176 FRAC_CONST(0.043484951661852),
177 FRAC_CONST(0.044153864320760),
178 FRAC_CONST(0.044829359199509),
179 FRAC_CONST(0.045511462498913),
180 FRAC_CONST(0.046200200188234),
181 FRAC_CONST(0.046895598002228),
182 FRAC_CONST(0.047597681438201),
183 FRAC_CONST(0.048306475753074),
184 FRAC_CONST(0.049022005960455),
185 FRAC_CONST(0.049744296827725),
186 FRAC_CONST(0.050473372873129),
187 FRAC_CONST(0.051209258362879),
188 FRAC_CONST(0.051951977308273),
189 FRAC_CONST(0.052701553462813),
190 FRAC_CONST(0.053458010319350),
191 FRAC_CONST(0.054221371107223),
192 FRAC_CONST(0.054991658789428),
193 FRAC_CONST(0.055768896059787),
194 FRAC_CONST(0.056553105340134),
195 FRAC_CONST(0.057344308777513),
196 FRAC_CONST(0.058142528241393),
197 FRAC_CONST(0.058947785320893),
198 FRAC_CONST(0.059760101322019),
199 FRAC_CONST(0.060579497264926),
200 FRAC_CONST(0.061405993881180),
201 FRAC_CONST(0.062239611611049),
202 FRAC_CONST(0.063080370600799),
203 FRAC_CONST(0.063928290700012),
204 FRAC_CONST(0.064783391458919),
205 FRAC_CONST(0.065645692125747),
206 FRAC_CONST(0.066515211644086),
207 FRAC_CONST(0.067391968650269),
208 FRAC_CONST(0.068275981470777),
209 FRAC_CONST(0.069167268119652),
210 FRAC_CONST(0.070065846295935),
211 FRAC_CONST(0.070971733381121),
212 FRAC_CONST(0.071884946436630),
213 FRAC_CONST(0.072805502201299),
214 FRAC_CONST(0.073733417088896),
215 FRAC_CONST(0.074668707185649),
216 FRAC_CONST(0.075611388247794),
217 FRAC_CONST(0.076561475699152),
218 FRAC_CONST(0.077518984628715),
219 FRAC_CONST(0.078483929788261),
220 FRAC_CONST(0.079456325589986),
221 FRAC_CONST(0.080436186104162),
222 FRAC_CONST(0.081423525056808),
223 FRAC_CONST(0.082418355827392),
224 FRAC_CONST(0.083420691446553),
225 FRAC_CONST(0.084430544593841),
226 FRAC_CONST(0.085447927595483),
227 FRAC_CONST(0.086472852422178),
228 FRAC_CONST(0.087505330686900),
229 FRAC_CONST(0.088545373642744),
230 FRAC_CONST(0.089592992180780),
231 FRAC_CONST(0.090648196827937),
232 FRAC_CONST(0.091710997744919),
233 FRAC_CONST(0.092781404724131),
234 FRAC_CONST(0.093859427187640),
235 FRAC_CONST(0.094945074185163),
236 FRAC_CONST(0.096038354392069),
237 FRAC_CONST(0.097139276107423),
238 FRAC_CONST(0.098247847252041),
239 FRAC_CONST(0.099364075366580),
240 FRAC_CONST(0.10048796760965),
241 FRAC_CONST(0.10161953075597),
242 FRAC_CONST(0.10275877119451),
243 FRAC_CONST(0.10390569492671),
244 FRAC_CONST(0.10506030756469),
245 FRAC_CONST(0.10622261432949),
246 FRAC_CONST(0.10739262004941),
247 FRAC_CONST(0.10857032915821),
248 FRAC_CONST(0.10975574569357),
249 FRAC_CONST(0.11094887329534),
250 FRAC_CONST(0.11214971520402),
251 FRAC_CONST(0.11335827425914),
252 FRAC_CONST(0.11457455289772),
253 FRAC_CONST(0.11579855315274),
254 FRAC_CONST(0.11703027665170),
255 FRAC_CONST(0.11826972461510),
256 FRAC_CONST(0.11951689785504),
257 FRAC_CONST(0.12077179677383),
258 FRAC_CONST(0.12203442136263),
259 FRAC_CONST(0.12330477120008),
260 FRAC_CONST(0.12458284545102),
261 FRAC_CONST(0.12586864286523),
262 FRAC_CONST(0.12716216177615),
263 FRAC_CONST(0.12846340009971),
264 FRAC_CONST(0.12977235533312),
265 FRAC_CONST(0.13108902455375),
266 FRAC_CONST(0.13241340441801),
267 FRAC_CONST(0.13374549116025),
268 FRAC_CONST(0.13508528059173),
269 FRAC_CONST(0.13643276809961),
270 FRAC_CONST(0.13778794864595),
271 FRAC_CONST(0.13915081676677),
272 FRAC_CONST(0.14052136657114),
273 FRAC_CONST(0.14189959174027),
274 FRAC_CONST(0.14328548552671),
275 FRAC_CONST(0.14467904075349),
276 FRAC_CONST(0.14608024981336),
277 FRAC_CONST(0.14748910466804),
278 FRAC_CONST(0.14890559684750),
279 FRAC_CONST(0.15032971744929),
280 FRAC_CONST(0.15176145713790),
281 FRAC_CONST(0.15320080614414),
282 FRAC_CONST(0.15464775426459),
283 FRAC_CONST(0.15610229086100),
284 FRAC_CONST(0.15756440485987),
285 FRAC_CONST(0.15903408475193),
286 FRAC_CONST(0.16051131859170),
287 FRAC_CONST(0.16199609399712),
288 FRAC_CONST(0.16348839814917),
289 FRAC_CONST(0.16498821779156),
290 FRAC_CONST(0.16649553923042),
291 FRAC_CONST(0.16801034833404),
292 FRAC_CONST(0.16953263053270),
293 FRAC_CONST(0.17106237081842),
294 FRAC_CONST(0.17259955374484),
295 FRAC_CONST(0.17414416342714),
296 FRAC_CONST(0.17569618354193),
297 FRAC_CONST(0.17725559732720),
298 FRAC_CONST(0.17882238758238),
299 FRAC_CONST(0.18039653666830),
300 FRAC_CONST(0.18197802650733),
301 FRAC_CONST(0.18356683858343),
302 FRAC_CONST(0.18516295394233),
303 FRAC_CONST(0.18676635319174),
304 FRAC_CONST(0.18837701650148),
305 FRAC_CONST(0.18999492360384),
306 FRAC_CONST(0.19162005379380),
307 FRAC_CONST(0.19325238592940),
308 FRAC_CONST(0.19489189843209),
309 FRAC_CONST(0.19653856928714),
310 FRAC_CONST(0.19819237604409),
311 FRAC_CONST(0.19985329581721),
312 FRAC_CONST(0.20152130528605),
313 FRAC_CONST(0.20319638069594),
314 FRAC_CONST(0.20487849785865),
315 FRAC_CONST(0.20656763215298),
316 FRAC_CONST(0.20826375852540),
317 FRAC_CONST(0.20996685149083),
318 FRAC_CONST(0.21167688513330),
319 FRAC_CONST(0.21339383310678),
320 FRAC_CONST(0.21511766863598),
321 FRAC_CONST(0.21684836451719),
322 FRAC_CONST(0.21858589311922),
323 FRAC_CONST(0.22033022638425),
324 FRAC_CONST(0.22208133582887),
325 FRAC_CONST(0.22383919254503),
326 FRAC_CONST(0.22560376720111),
327 FRAC_CONST(0.22737503004300),
328 FRAC_CONST(0.22915295089517),
329 FRAC_CONST(0.23093749916189),
330 FRAC_CONST(0.23272864382838),
331 FRAC_CONST(0.23452635346201),
332 FRAC_CONST(0.23633059621364),
333 FRAC_CONST(0.23814133981883),
334 FRAC_CONST(0.23995855159925),
335 FRAC_CONST(0.24178219846403),
336 FRAC_CONST(0.24361224691114),
337 FRAC_CONST(0.24544866302890),
338 FRAC_CONST(0.24729141249740),
339 FRAC_CONST(0.24914046059007),
340 FRAC_CONST(0.25099577217522),
341 FRAC_CONST(0.25285731171763),
342 FRAC_CONST(0.25472504328019),
343 FRAC_CONST(0.25659893052556),
344 FRAC_CONST(0.25847893671788),
345 FRAC_CONST(0.26036502472451),
346 FRAC_CONST(0.26225715701781),
347 FRAC_CONST(0.26415529567692),
348 FRAC_CONST(0.26605940238966),
349 FRAC_CONST(0.26796943845439),
350 FRAC_CONST(0.26988536478190),
351 FRAC_CONST(0.27180714189742),
352 FRAC_CONST(0.27373472994256),
353 FRAC_CONST(0.27566808867736),
354 FRAC_CONST(0.27760717748238),
355 FRAC_CONST(0.27955195536071),
356 FRAC_CONST(0.28150238094021),
357 FRAC_CONST(0.28345841247557),
358 FRAC_CONST(0.28542000785059),
359 FRAC_CONST(0.28738712458038),
360 FRAC_CONST(0.28935971981364),
361 FRAC_CONST(0.29133775033492),
362 FRAC_CONST(0.29332117256704),
363 FRAC_CONST(0.29530994257338),
364 FRAC_CONST(0.29730401606034),
365 FRAC_CONST(0.29930334837974),
366 FRAC_CONST(0.30130789453132),
367 FRAC_CONST(0.30331760916521),
368 FRAC_CONST(0.30533244658452),
369 FRAC_CONST(0.30735236074785),
370 FRAC_CONST(0.30937730527195),
371 FRAC_CONST(0.31140723343430),
372 FRAC_CONST(0.31344209817583),
373 FRAC_CONST(0.31548185210356),
374 FRAC_CONST(0.31752644749341),
375 FRAC_CONST(0.31957583629288),
376 FRAC_CONST(0.32162997012390),
377 FRAC_CONST(0.32368880028565),
378 FRAC_CONST(0.32575227775738),
379 FRAC_CONST(0.32782035320134),
380 FRAC_CONST(0.32989297696566),
381 FRAC_CONST(0.33197009908736),
382 FRAC_CONST(0.33405166929523),
383 FRAC_CONST(0.33613763701295),
384 FRAC_CONST(0.33822795136203),
385 FRAC_CONST(0.34032256116495),
386 FRAC_CONST(0.34242141494820),
387 FRAC_CONST(0.34452446094547),
388 FRAC_CONST(0.34663164710072),
389 FRAC_CONST(0.34874292107143),
390 FRAC_CONST(0.35085823023181),
391 FRAC_CONST(0.35297752167598),
392 FRAC_CONST(0.35510074222129),
393 FRAC_CONST(0.35722783841160),
394 FRAC_CONST(0.35935875652060),
395 FRAC_CONST(0.36149344255514),
396 FRAC_CONST(0.36363184225864),
397 FRAC_CONST(0.36577390111444),
398 FRAC_CONST(0.36791956434930),
399 FRAC_CONST(0.37006877693676),
400 FRAC_CONST(0.37222148360070),
401 FRAC_CONST(0.37437762881878),
402 FRAC_CONST(0.37653715682603),
403 FRAC_CONST(0.37870001161834),
404 FRAC_CONST(0.38086613695607),
405 FRAC_CONST(0.38303547636766),
406 FRAC_CONST(0.38520797315322),
407 FRAC_CONST(0.38738357038821),
408 FRAC_CONST(0.38956221092708),
409 FRAC_CONST(0.39174383740701),
410 FRAC_CONST(0.39392839225157),
411 FRAC_CONST(0.39611581767449),
412 FRAC_CONST(0.39830605568342),
413 FRAC_CONST(0.40049904808370),
414 FRAC_CONST(0.40269473648218),
415 FRAC_CONST(0.40489306229101),
416 FRAC_CONST(0.40709396673153),
417 FRAC_CONST(0.40929739083810),
418 FRAC_CONST(0.41150327546197),
419 FRAC_CONST(0.41371156127524),
420 FRAC_CONST(0.41592218877472),
421 FRAC_CONST(0.41813509828594),
422 FRAC_CONST(0.42035022996702),
423 FRAC_CONST(0.42256752381274),
424 FRAC_CONST(0.42478691965848),
425 FRAC_CONST(0.42700835718423),
426 FRAC_CONST(0.42923177591866),
427 FRAC_CONST(0.43145711524314),
428 FRAC_CONST(0.43368431439580),
429 FRAC_CONST(0.43591331247564),
430 FRAC_CONST(0.43814404844658),
431 FRAC_CONST(0.44037646114161),
432 FRAC_CONST(0.44261048926688),
433 FRAC_CONST(0.44484607140589),
434 FRAC_CONST(0.44708314602359),
435 FRAC_CONST(0.44932165147057),
436 FRAC_CONST(0.45156152598727),
437 FRAC_CONST(0.45380270770813),
438 FRAC_CONST(0.45604513466581),
439 FRAC_CONST(0.45828874479543),
440 FRAC_CONST(0.46053347593880),
441 FRAC_CONST(0.46277926584861),
442 FRAC_CONST(0.46502605219277),
443 FRAC_CONST(0.46727377255861),
444 FRAC_CONST(0.46952236445718),
445 FRAC_CONST(0.47177176532752),
446 FRAC_CONST(0.47402191254100),
447 FRAC_CONST(0.47627274340557),
448 FRAC_CONST(0.47852419517009),
449 FRAC_CONST(0.48077620502869),
450 FRAC_CONST(0.48302871012505),
451 FRAC_CONST(0.48528164755674),
452 FRAC_CONST(0.48753495437962),
453 FRAC_CONST(0.48978856761212),
454 FRAC_CONST(0.49204242423966),
455 FRAC_CONST(0.49429646121898),
456 FRAC_CONST(0.49655061548250),
457 FRAC_CONST(0.49880482394273),
458 FRAC_CONST(0.50105902349665),
459 FRAC_CONST(0.50331315103004),
460 FRAC_CONST(0.50556714342194),
461 FRAC_CONST(0.50782093754901),
462 FRAC_CONST(0.51007447028990),
463 FRAC_CONST(0.51232767852971),
464 FRAC_CONST(0.51458049916433),
465 FRAC_CONST(0.51683286910489),
466 FRAC_CONST(0.51908472528213),
467 FRAC_CONST(0.52133600465083),
468 FRAC_CONST(0.52358664419420),
469 FRAC_CONST(0.52583658092832),
470 FRAC_CONST(0.52808575190648),
471 FRAC_CONST(0.53033409422367),
472 FRAC_CONST(0.53258154502092),
473 FRAC_CONST(0.53482804148974),
474 FRAC_CONST(0.53707352087652),
475 FRAC_CONST(0.53931792048690),
476 FRAC_CONST(0.54156117769021),
477 FRAC_CONST(0.54380322992385),
478 FRAC_CONST(0.54604401469766),
479 FRAC_CONST(0.54828346959835),
480 FRAC_CONST(0.55052153229384),
481 FRAC_CONST(0.55275814053768),
482 FRAC_CONST(0.55499323217338),
483 FRAC_CONST(0.55722674513883),
484 FRAC_CONST(0.55945861747062),
485 FRAC_CONST(0.56168878730842),
486 FRAC_CONST(0.56391719289930),
487 FRAC_CONST(0.56614377260214),
488 FRAC_CONST(0.56836846489188),
489 FRAC_CONST(0.57059120836390),
490 FRAC_CONST(0.57281194173835),
491 FRAC_CONST(0.57503060386439),
492 FRAC_CONST(0.57724713372458),
493 FRAC_CONST(0.57946147043912),
494 FRAC_CONST(0.58167355327012),
495 FRAC_CONST(0.58388332162591),
496 FRAC_CONST(0.58609071506528),
497 FRAC_CONST(0.58829567330173),
498 FRAC_CONST(0.59049813620770),
499 FRAC_CONST(0.59269804381879),
500 FRAC_CONST(0.59489533633802),
501 FRAC_CONST(0.59708995413996),
502 FRAC_CONST(0.59928183777495),
503 FRAC_CONST(0.60147092797329),
504 FRAC_CONST(0.60365716564937),
505 FRAC_CONST(0.60584049190582),
506 FRAC_CONST(0.60802084803764),
507 FRAC_CONST(0.61019817553632),
508 FRAC_CONST(0.61237241609393),
509 FRAC_CONST(0.61454351160718),
510 FRAC_CONST(0.61671140418155),
511 FRAC_CONST(0.61887603613527),
512 FRAC_CONST(0.62103735000336),
513 FRAC_CONST(0.62319528854167),
514 FRAC_CONST(0.62534979473088),
515 FRAC_CONST(0.62750081178042),
516 FRAC_CONST(0.62964828313250),
517 FRAC_CONST(0.63179215246597),
518 FRAC_CONST(0.63393236370030),
519 FRAC_CONST(0.63606886099946),
520 FRAC_CONST(0.63820158877577),
521 FRAC_CONST(0.64033049169379),
522 FRAC_CONST(0.64245551467413),
523 FRAC_CONST(0.64457660289729),
524 FRAC_CONST(0.64669370180740),
525 FRAC_CONST(0.64880675711607),
526 FRAC_CONST(0.65091571480603),
527 FRAC_CONST(0.65302052113494),
528 FRAC_CONST(0.65512112263906),
529 FRAC_CONST(0.65721746613689),
530 FRAC_CONST(0.65930949873289),
531 FRAC_CONST(0.66139716782102),
532 FRAC_CONST(0.66348042108842),
533 FRAC_CONST(0.66555920651892),
534 FRAC_CONST(0.66763347239664),
535 FRAC_CONST(0.66970316730947),
536 FRAC_CONST(0.67176824015260),
537 FRAC_CONST(0.67382864013196),
538 FRAC_CONST(0.67588431676768),
539 FRAC_CONST(0.67793521989751),
540 FRAC_CONST(0.67998129968017),
541 FRAC_CONST(0.68202250659876),
542 FRAC_CONST(0.68405879146403),
543 FRAC_CONST(0.68609010541774),
544 FRAC_CONST(0.68811639993588),
545 FRAC_CONST(0.69013762683195),
546 FRAC_CONST(0.69215373826012),
547 FRAC_CONST(0.69416468671849),
548 FRAC_CONST(0.69617042505214),
549 FRAC_CONST(0.69817090645634),
550 FRAC_CONST(0.70016608447958),
551 FRAC_CONST(0.70215591302664),
552 FRAC_CONST(0.70414034636163),
553 FRAC_CONST(0.70611933911096),
554 FRAC_CONST(0.70809284626630),
555 FRAC_CONST(0.71006082318751),
556 FRAC_CONST(0.71202322560554),
557 FRAC_CONST(0.71398000962530),
558 FRAC_CONST(0.71593113172842),
559 FRAC_CONST(0.71787654877613),
560 FRAC_CONST(0.71981621801195),
561 FRAC_CONST(0.72175009706445),
562 FRAC_CONST(0.72367814394990),
563 FRAC_CONST(0.72560031707496),
564 FRAC_CONST(0.72751657523927),
565 FRAC_CONST(0.72942687763803),
566 FRAC_CONST(0.73133118386457),
567 FRAC_CONST(0.73322945391280),
568 FRAC_CONST(0.73512164817975),
569 FRAC_CONST(0.73700772746796),
570 FRAC_CONST(0.73888765298787),
571 FRAC_CONST(0.74076138636020),
572 FRAC_CONST(0.74262888961827),
573 FRAC_CONST(0.74449012521027),
574 FRAC_CONST(0.74634505600152),
575 FRAC_CONST(0.74819364527663),
576 FRAC_CONST(0.75003585674175),
577 FRAC_CONST(0.75187165452661),
578 FRAC_CONST(0.75370100318668),
579 FRAC_CONST(0.75552386770515),
580 FRAC_CONST(0.75734021349500),
581 FRAC_CONST(0.75915000640095),
582 FRAC_CONST(0.76095321270137),
583 FRAC_CONST(0.76274979911019),
584 FRAC_CONST(0.76453973277875),
585 FRAC_CONST(0.76632298129757),
586 FRAC_CONST(0.76809951269819),
587 FRAC_CONST(0.76986929545481),
588 FRAC_CONST(0.77163229848604),
589 FRAC_CONST(0.77338849115651),
590 FRAC_CONST(0.77513784327849),
591 FRAC_CONST(0.77688032511340),
592 FRAC_CONST(0.77861590737340),
593 FRAC_CONST(0.78034456122283),
594 FRAC_CONST(0.78206625827961),
595 FRAC_CONST(0.78378097061667),
596 FRAC_CONST(0.78548867076330),
597 FRAC_CONST(0.78718933170643),
598 FRAC_CONST(0.78888292689189),
599 FRAC_CONST(0.79056943022564),
600 FRAC_CONST(0.79224881607494),
601 FRAC_CONST(0.79392105926949),
602 FRAC_CONST(0.79558613510249),
603 FRAC_CONST(0.79724401933170),
604 FRAC_CONST(0.79889468818046),
605 FRAC_CONST(0.80053811833858),
606 FRAC_CONST(0.80217428696334),
607 FRAC_CONST(0.80380317168028),
608 FRAC_CONST(0.80542475058405),
609 FRAC_CONST(0.80703900223920),
610 FRAC_CONST(0.80864590568089),
611 FRAC_CONST(0.81024544041560),
612 FRAC_CONST(0.81183758642175),
613 FRAC_CONST(0.81342232415032),
614 FRAC_CONST(0.81499963452540),
615 FRAC_CONST(0.81656949894467),
616 FRAC_CONST(0.81813189927991),
617 FRAC_CONST(0.81968681787738),
618 FRAC_CONST(0.82123423755821),
619 FRAC_CONST(0.82277414161874),
620 FRAC_CONST(0.82430651383076),
621 FRAC_CONST(0.82583133844180),
622 FRAC_CONST(0.82734860017528),
623 FRAC_CONST(0.82885828423070),
624 FRAC_CONST(0.83036037628369),
625 FRAC_CONST(0.83185486248609),
626 FRAC_CONST(0.83334172946597),
627 FRAC_CONST(0.83482096432759),
628 FRAC_CONST(0.83629255465130),
629 FRAC_CONST(0.83775648849344),
630 FRAC_CONST(0.83921275438615),
631 FRAC_CONST(0.84066134133716),
632 FRAC_CONST(0.84210223882952),
633 FRAC_CONST(0.84353543682130),
634 FRAC_CONST(0.84496092574524),
635 FRAC_CONST(0.84637869650833),
636 FRAC_CONST(0.84778874049138),
637 FRAC_CONST(0.84919104954855),
638 FRAC_CONST(0.85058561600677),
639 FRAC_CONST(0.85197243266520),
640 FRAC_CONST(0.85335149279457),
641 FRAC_CONST(0.85472279013653),
642 FRAC_CONST(0.85608631890295),
643 FRAC_CONST(0.85744207377513),
644 FRAC_CONST(0.85879004990298),
645 FRAC_CONST(0.86013024290422),
646 FRAC_CONST(0.86146264886346),
647 FRAC_CONST(0.86278726433124),
648 FRAC_CONST(0.86410408632306),
649 FRAC_CONST(0.86541311231838),
650 FRAC_CONST(0.86671434025950),
651 FRAC_CONST(0.86800776855046),
652 FRAC_CONST(0.86929339605590),
653 FRAC_CONST(0.87057122209981),
654 FRAC_CONST(0.87184124646433),
655 FRAC_CONST(0.87310346938840),
656 FRAC_CONST(0.87435789156650),
657 FRAC_CONST(0.87560451414719),
658 FRAC_CONST(0.87684333873173),
659 FRAC_CONST(0.87807436737261),
660 FRAC_CONST(0.87929760257204),
661 FRAC_CONST(0.88051304728038),
662 FRAC_CONST(0.88172070489456),
663 FRAC_CONST(0.88292057925645),
664 FRAC_CONST(0.88411267465117),
665 FRAC_CONST(0.88529699580537),
666 FRAC_CONST(0.88647354788545),
667 FRAC_CONST(0.88764233649580),
668 FRAC_CONST(0.88880336767692),
669 FRAC_CONST(0.88995664790351),
670 FRAC_CONST(0.89110218408260),
671 FRAC_CONST(0.89223998355154),
672 FRAC_CONST(0.89337005407600),
673 FRAC_CONST(0.89449240384793),
674 FRAC_CONST(0.89560704148345),
675 FRAC_CONST(0.89671397602074),
676 FRAC_CONST(0.89781321691786),
677 FRAC_CONST(0.89890477405053),
678 FRAC_CONST(0.89998865770993),
679 FRAC_CONST(0.90106487860034),
680 FRAC_CONST(0.90213344783689),
681 FRAC_CONST(0.90319437694315),
682 FRAC_CONST(0.90424767784873),
683 FRAC_CONST(0.90529336288690),
684 FRAC_CONST(0.90633144479201),
685 FRAC_CONST(0.90736193669708),
686 FRAC_CONST(0.90838485213119),
687 FRAC_CONST(0.90940020501694),
688 FRAC_CONST(0.91040800966776),
689 FRAC_CONST(0.91140828078533),
690 FRAC_CONST(0.91240103345685),
691 FRAC_CONST(0.91338628315231),
692 FRAC_CONST(0.91436404572173),
693 FRAC_CONST(0.91533433739238),
694 FRAC_CONST(0.91629717476594),
695 FRAC_CONST(0.91725257481564),
696 FRAC_CONST(0.91820055488334),
697 FRAC_CONST(0.91914113267664),
698 FRAC_CONST(0.92007432626589),
699 FRAC_CONST(0.92100015408120),
700 FRAC_CONST(0.92191863490944),
701 FRAC_CONST(0.92282978789113),
702 FRAC_CONST(0.92373363251740),
703 FRAC_CONST(0.92463018862687),
704 FRAC_CONST(0.92551947640245),
705 FRAC_CONST(0.92640151636824),
706 FRAC_CONST(0.92727632938624),
707 FRAC_CONST(0.92814393665320),
708 FRAC_CONST(0.92900435969727),
709 FRAC_CONST(0.92985762037477),
710 FRAC_CONST(0.93070374086684),
711 FRAC_CONST(0.93154274367610),
712 FRAC_CONST(0.93237465162328),
713 FRAC_CONST(0.93319948784382),
714 FRAC_CONST(0.93401727578443),
715 FRAC_CONST(0.93482803919967),
716 FRAC_CONST(0.93563180214841),
717 FRAC_CONST(0.93642858899043),
718 FRAC_CONST(0.93721842438279),
719 FRAC_CONST(0.93800133327637),
720 FRAC_CONST(0.93877734091223),
721 FRAC_CONST(0.93954647281807),
722 FRAC_CONST(0.94030875480458),
723 FRAC_CONST(0.94106421296182),
724 FRAC_CONST(0.94181287365556),
725 FRAC_CONST(0.94255476352362),
726 FRAC_CONST(0.94328990947213),
727 FRAC_CONST(0.94401833867184),
728 FRAC_CONST(0.94474007855439),
729 FRAC_CONST(0.94545515680855),
730 FRAC_CONST(0.94616360137644),
731 FRAC_CONST(0.94686544044975),
732 FRAC_CONST(0.94756070246592),
733 FRAC_CONST(0.94824941610434),
734 FRAC_CONST(0.94893161028248),
735 FRAC_CONST(0.94960731415209),
736 FRAC_CONST(0.95027655709525),
737 FRAC_CONST(0.95093936872056),
738 FRAC_CONST(0.95159577885924),
739 FRAC_CONST(0.95224581756115),
740 FRAC_CONST(0.95288951509097),
741 FRAC_CONST(0.95352690192417),
742 FRAC_CONST(0.95415800874314),
743 FRAC_CONST(0.95478286643320),
744 FRAC_CONST(0.95540150607863),
745 FRAC_CONST(0.95601395895871),
746 FRAC_CONST(0.95662025654373),
747 FRAC_CONST(0.95722043049100),
748 FRAC_CONST(0.95781451264084),
749 FRAC_CONST(0.95840253501260),
750 FRAC_CONST(0.95898452980058),
751 FRAC_CONST(0.95956052937008),
752 FRAC_CONST(0.96013056625336),
753 FRAC_CONST(0.96069467314557),
754 FRAC_CONST(0.96125288290073),
755 FRAC_CONST(0.96180522852773),
756 FRAC_CONST(0.96235174318622),
757 FRAC_CONST(0.96289246018262),
758 FRAC_CONST(0.96342741296604),
759 FRAC_CONST(0.96395663512424),
760 FRAC_CONST(0.96448016037959),
761 FRAC_CONST(0.96499802258499),
762 FRAC_CONST(0.96551025571985),
763 FRAC_CONST(0.96601689388602),
764 FRAC_CONST(0.96651797130376),
765 FRAC_CONST(0.96701352230768),
766 FRAC_CONST(0.96750358134269),
767 FRAC_CONST(0.96798818295998),
768 FRAC_CONST(0.96846736181297),
769 FRAC_CONST(0.96894115265327),
770 FRAC_CONST(0.96940959032667),
771 FRAC_CONST(0.96987270976912),
772 FRAC_CONST(0.97033054600270),
773 FRAC_CONST(0.97078313413161),
774 FRAC_CONST(0.97123050933818),
775 FRAC_CONST(0.97167270687887),
776 FRAC_CONST(0.97210976208030),
777 FRAC_CONST(0.97254171033525),
778 FRAC_CONST(0.97296858709871),
779 FRAC_CONST(0.97339042788392),
780 FRAC_CONST(0.97380726825843),
781 FRAC_CONST(0.97421914384017),
782 FRAC_CONST(0.97462609029350),
783 FRAC_CONST(0.97502814332534),
784 FRAC_CONST(0.97542533868127),
785 FRAC_CONST(0.97581771214160),
786 FRAC_CONST(0.97620529951759),
787 FRAC_CONST(0.97658813664749),
788 FRAC_CONST(0.97696625939282),
789 FRAC_CONST(0.97733970363445),
790 FRAC_CONST(0.97770850526884),
791 FRAC_CONST(0.97807270020427),
792 FRAC_CONST(0.97843232435704),
793 FRAC_CONST(0.97878741364771),
794 FRAC_CONST(0.97913800399743),
795 FRAC_CONST(0.97948413132414),
796 FRAC_CONST(0.97982583153895),
797 FRAC_CONST(0.98016314054243),
798 FRAC_CONST(0.98049609422096),
799 FRAC_CONST(0.98082472844313),
800 FRAC_CONST(0.98114907905608),
801 FRAC_CONST(0.98146918188197),
802 FRAC_CONST(0.98178507271438),
803 FRAC_CONST(0.98209678731477),
804 FRAC_CONST(0.98240436140902),
805 FRAC_CONST(0.98270783068385),
806 FRAC_CONST(0.98300723078342),
807 FRAC_CONST(0.98330259730589),
808 FRAC_CONST(0.98359396579995),
809 FRAC_CONST(0.98388137176152),
810 FRAC_CONST(0.98416485063031),
811 FRAC_CONST(0.98444443778651),
812 FRAC_CONST(0.98472016854752),
813 FRAC_CONST(0.98499207816463),
814 FRAC_CONST(0.98526020181980),
815 FRAC_CONST(0.98552457462240),
816 FRAC_CONST(0.98578523160609),
817 FRAC_CONST(0.98604220772560),
818 FRAC_CONST(0.98629553785362),
819 FRAC_CONST(0.98654525677772),
820 FRAC_CONST(0.98679139919726),
821 FRAC_CONST(0.98703399972035),
822 FRAC_CONST(0.98727309286089),
823 FRAC_CONST(0.98750871303556),
824 FRAC_CONST(0.98774089456089),
825 FRAC_CONST(0.98796967165036),
826 FRAC_CONST(0.98819507841154),
827 FRAC_CONST(0.98841714884323),
828 FRAC_CONST(0.98863591683269),
829 FRAC_CONST(0.98885141615285),
830 FRAC_CONST(0.98906368045957),
831 FRAC_CONST(0.98927274328896),
832 FRAC_CONST(0.98947863805473),
833 FRAC_CONST(0.98968139804554),
834 FRAC_CONST(0.98988105642241),
835 FRAC_CONST(0.99007764621618),
836 FRAC_CONST(0.99027120032501),
837 FRAC_CONST(0.99046175151186),
838 FRAC_CONST(0.99064933240208),
839 FRAC_CONST(0.99083397548099),
840 FRAC_CONST(0.99101571309153),
841 FRAC_CONST(0.99119457743191),
842 FRAC_CONST(0.99137060055337),
843 FRAC_CONST(0.99154381435784),
844 FRAC_CONST(0.99171425059582),
845 FRAC_CONST(0.99188194086414),
846 FRAC_CONST(0.99204691660388),
847 FRAC_CONST(0.99220920909823),
848 FRAC_CONST(0.99236884947045),
849 FRAC_CONST(0.99252586868186),
850 FRAC_CONST(0.99268029752989),
851 FRAC_CONST(0.99283216664606),
852 FRAC_CONST(0.99298150649419),
853 FRAC_CONST(0.99312834736847),
854 FRAC_CONST(0.99327271939167),
855 FRAC_CONST(0.99341465251338),
856 FRAC_CONST(0.99355417650825),
857 FRAC_CONST(0.99369132097430),
858 FRAC_CONST(0.99382611533130),
859 FRAC_CONST(0.99395858881910),
860 FRAC_CONST(0.99408877049612),
861 FRAC_CONST(0.99421668923778),
862 FRAC_CONST(0.99434237373503),
863 FRAC_CONST(0.99446585249289),
864 FRAC_CONST(0.99458715382906),
865 FRAC_CONST(0.99470630587254),
866 FRAC_CONST(0.99482333656229),
867 FRAC_CONST(0.99493827364600),
868 FRAC_CONST(0.99505114467878),
869 FRAC_CONST(0.99516197702200),
870 FRAC_CONST(0.99527079784214),
871 FRAC_CONST(0.99537763410962),
872 FRAC_CONST(0.99548251259777),
873 FRAC_CONST(0.99558545988178),
874 FRAC_CONST(0.99568650233767),
875 FRAC_CONST(0.99578566614138),
876 FRAC_CONST(0.99588297726783),
877 FRAC_CONST(0.99597846149005),
878 FRAC_CONST(0.99607214437834),
879 FRAC_CONST(0.99616405129947),
880 FRAC_CONST(0.99625420741595),
881 FRAC_CONST(0.99634263768527),
882 FRAC_CONST(0.99642936685928),
883 FRAC_CONST(0.99651441948352),
884 FRAC_CONST(0.99659781989663),
885 FRAC_CONST(0.99667959222978),
886 FRAC_CONST(0.99675976040620),
887 FRAC_CONST(0.99683834814063),
888 FRAC_CONST(0.99691537893895),
889 FRAC_CONST(0.99699087609774),
890 FRAC_CONST(0.99706486270391),
891 FRAC_CONST(0.99713736163442),
892 FRAC_CONST(0.99720839555593),
893 FRAC_CONST(0.99727798692461),
894 FRAC_CONST(0.99734615798589),
895 FRAC_CONST(0.99741293077431),
896 FRAC_CONST(0.99747832711337),
897 FRAC_CONST(0.99754236861541),
898 FRAC_CONST(0.99760507668158),
899 FRAC_CONST(0.99766647250181),
900 FRAC_CONST(0.99772657705478),
901 FRAC_CONST(0.99778541110799),
902 FRAC_CONST(0.99784299521785),
903 FRAC_CONST(0.99789934972976),
904 FRAC_CONST(0.99795449477828),
905 FRAC_CONST(0.99800845028730),
906 FRAC_CONST(0.99806123597027),
907 FRAC_CONST(0.99811287133042),
908 FRAC_CONST(0.99816337566108),
909 FRAC_CONST(0.99821276804596),
910 FRAC_CONST(0.99826106735952),
911 FRAC_CONST(0.99830829226732),
912 FRAC_CONST(0.99835446122649),
913 FRAC_CONST(0.99839959248609),
914 FRAC_CONST(0.99844370408765),
915 FRAC_CONST(0.99848681386566),
916 FRAC_CONST(0.99852893944805),
917 FRAC_CONST(0.99857009825685),
918 FRAC_CONST(0.99861030750869),
919 FRAC_CONST(0.99864958421549),
920 FRAC_CONST(0.99868794518504),
921 FRAC_CONST(0.99872540702178),
922 FRAC_CONST(0.99876198612738),
923 FRAC_CONST(0.99879769870160),
924 FRAC_CONST(0.99883256074295),
925 FRAC_CONST(0.99886658804953),
926 FRAC_CONST(0.99889979621983),
927 FRAC_CONST(0.99893220065356),
928 FRAC_CONST(0.99896381655254),
929 FRAC_CONST(0.99899465892154),
930 FRAC_CONST(0.99902474256924),
931 FRAC_CONST(0.99905408210916),
932 FRAC_CONST(0.99908269196056),
933 FRAC_CONST(0.99911058634952),
934 FRAC_CONST(0.99913777930986),
935 FRAC_CONST(0.99916428468421),
936 FRAC_CONST(0.99919011612505),
937 FRAC_CONST(0.99921528709576),
938 FRAC_CONST(0.99923981087174),
939 FRAC_CONST(0.99926370054150),
940 FRAC_CONST(0.99928696900779),
941 FRAC_CONST(0.99930962898876),
942 FRAC_CONST(0.99933169301910),
943 FRAC_CONST(0.99935317345126),
944 FRAC_CONST(0.99937408245662),
945 FRAC_CONST(0.99939443202674),
946 FRAC_CONST(0.99941423397457),
947 FRAC_CONST(0.99943349993572),
948 FRAC_CONST(0.99945224136972),
949 FRAC_CONST(0.99947046956130),
950 FRAC_CONST(0.99948819562171),
951 FRAC_CONST(0.99950543049000),
952 FRAC_CONST(0.99952218493439),
953 FRAC_CONST(0.99953846955355),
954 FRAC_CONST(0.99955429477803),
955 FRAC_CONST(0.99956967087154),
956 FRAC_CONST(0.99958460793242),
957 FRAC_CONST(0.99959911589494),
958 FRAC_CONST(0.99961320453077),
959 FRAC_CONST(0.99962688345035),
960 FRAC_CONST(0.99964016210433),
961 FRAC_CONST(0.99965304978499),
962 FRAC_CONST(0.99966555562769),
963 FRAC_CONST(0.99967768861231),
964 FRAC_CONST(0.99968945756473),
965 FRAC_CONST(0.99970087115825),
966 FRAC_CONST(0.99971193791510),
967 FRAC_CONST(0.99972266620792),
968 FRAC_CONST(0.99973306426121),
969 FRAC_CONST(0.99974314015288),
970 FRAC_CONST(0.99975290181568),
971 FRAC_CONST(0.99976235703876),
972 FRAC_CONST(0.99977151346914),
973 FRAC_CONST(0.99978037861326),
974 FRAC_CONST(0.99978895983845),
975 FRAC_CONST(0.99979726437448),
976 FRAC_CONST(0.99980529931507),
977 FRAC_CONST(0.99981307161943),
978 FRAC_CONST(0.99982058811377),
979 FRAC_CONST(0.99982785549283),
980 FRAC_CONST(0.99983488032144),
981 FRAC_CONST(0.99984166903600),
982 FRAC_CONST(0.99984822794606),
983 FRAC_CONST(0.99985456323584),
984 FRAC_CONST(0.99986068096572),
985 FRAC_CONST(0.99986658707386),
986 FRAC_CONST(0.99987228737764),
987 FRAC_CONST(0.99987778757524),
988 FRAC_CONST(0.99988309324717),
989 FRAC_CONST(0.99988820985777),
990 FRAC_CONST(0.99989314275675),
991 FRAC_CONST(0.99989789718072),
992 FRAC_CONST(0.99990247825468),
993 FRAC_CONST(0.99990689099357),
994 FRAC_CONST(0.99991114030376),
995 FRAC_CONST(0.99991523098456),
996 FRAC_CONST(0.99991916772971),
997 FRAC_CONST(0.99992295512891),
998 FRAC_CONST(0.99992659766930),
999 FRAC_CONST(0.99993009973692),
1000 FRAC_CONST(0.99993346561824),
1001 FRAC_CONST(0.99993669950161),
1002 FRAC_CONST(0.99993980547870),
1003 FRAC_CONST(0.99994278754604),
1004 FRAC_CONST(0.99994564960642),
1005 FRAC_CONST(0.99994839547033),
1006 FRAC_CONST(0.99995102885747),
1007 FRAC_CONST(0.99995355339809),
1008 FRAC_CONST(0.99995597263451),
1009 FRAC_CONST(0.99995829002249),
1010 FRAC_CONST(0.99996050893264),
1011 FRAC_CONST(0.99996263265183),
1012 FRAC_CONST(0.99996466438460),
1013 FRAC_CONST(0.99996660725452),
1014 FRAC_CONST(0.99996846430558),
1015 FRAC_CONST(0.99997023850356),
1016 FRAC_CONST(0.99997193273736),
1017 FRAC_CONST(0.99997354982037),
1018 FRAC_CONST(0.99997509249183),
1019 FRAC_CONST(0.99997656341810),
1020 FRAC_CONST(0.99997796519400),
1021 FRAC_CONST(0.99997930034415),
1022 FRAC_CONST(0.99998057132421),
1023 FRAC_CONST(0.99998178052220),
1024 FRAC_CONST(0.99998293025975),
1025 FRAC_CONST(0.99998402279338),
1026 FRAC_CONST(0.99998506031574),
1027 FRAC_CONST(0.99998604495686),
1028 FRAC_CONST(0.99998697878536),
1029 FRAC_CONST(0.99998786380966),
1030 FRAC_CONST(0.99998870197921),
1031 FRAC_CONST(0.99998949518567),
1032 FRAC_CONST(0.99999024526408),
1033 FRAC_CONST(0.99999095399401),
1034 FRAC_CONST(0.99999162310077),
1035 FRAC_CONST(0.99999225425649),
1036 FRAC_CONST(0.99999284908128),
1037 FRAC_CONST(0.99999340914435),
1038 FRAC_CONST(0.99999393596510),
1039 FRAC_CONST(0.99999443101421),
1040 FRAC_CONST(0.99999489571473),
1041 FRAC_CONST(0.99999533144314),
1042 FRAC_CONST(0.99999573953040),
1043 FRAC_CONST(0.99999612126300),
1044 FRAC_CONST(0.99999647788395),
1045 FRAC_CONST(0.99999681059383),
1046 FRAC_CONST(0.99999712055178),
1047 FRAC_CONST(0.99999740887647),
1048 FRAC_CONST(0.99999767664709),
1049 FRAC_CONST(0.99999792490431),
1050 FRAC_CONST(0.99999815465123),
1051 FRAC_CONST(0.99999836685427),
1052 FRAC_CONST(0.99999856244415),
1053 FRAC_CONST(0.99999874231676),
1054 FRAC_CONST(0.99999890733405),
1055 FRAC_CONST(0.99999905832493),
1056 FRAC_CONST(0.99999919608613),
1057 FRAC_CONST(0.99999932138304),
1058 FRAC_CONST(0.99999943495056),
1059 FRAC_CONST(0.99999953749392),
1060 FRAC_CONST(0.99999962968950),
1061 FRAC_CONST(0.99999971218563),
1062 FRAC_CONST(0.99999978560337),
1063 FRAC_CONST(0.99999985053727),
1064 FRAC_CONST(0.99999990755616),
1065 FRAC_CONST(0.99999995720387)
1066};
1067
1068#ifdef ALLOW_SMALL_FRAMELENGTH
1069ALIGN static const real_t kbd_long_960[] = {
1070 FRAC_CONST(0.0003021562530949),
1071 FRAC_CONST(0.0004452267024786),
1072 FRAC_CONST(0.0005674947527496),
1073 FRAC_CONST(0.0006812465553466),
1074 FRAC_CONST(0.0007910496776387),
1075 FRAC_CONST(0.0008991655033895),
1076 FRAC_CONST(0.0010068978259384),
1077 FRAC_CONST(0.0011150758515751),
1078 FRAC_CONST(0.0012242653193642),
1079 FRAC_CONST(0.0013348735658205),
1080 FRAC_CONST(0.0014472068670273),
1081 FRAC_CONST(0.0015615039850448),
1082 FRAC_CONST(0.0016779568885263),
1083 FRAC_CONST(0.0017967241232412),
1084 FRAC_CONST(0.0019179397560955),
1085 FRAC_CONST(0.0020417195415393),
1086 FRAC_CONST(0.0021681652836642),
1087 FRAC_CONST(0.0022973679910599),
1088 FRAC_CONST(0.0024294102029937),
1089 FRAC_CONST(0.0025643677339078),
1090 FRAC_CONST(0.0027023110014772),
1091 FRAC_CONST(0.0028433060512612),
1092 FRAC_CONST(0.0029874153568025),
1093 FRAC_CONST(0.0031346984511728),
1094 FRAC_CONST(0.0032852124303662),
1095 FRAC_CONST(0.0034390123581190),
1096 FRAC_CONST(0.0035961515940931),
1097 FRAC_CONST(0.0037566820618961),
1098 FRAC_CONST(0.0039206544694386),
1099 FRAC_CONST(0.0040881184912194),
1100 FRAC_CONST(0.0042591229199617),
1101 FRAC_CONST(0.0044337157933972),
1102 FRAC_CONST(0.0046119445007641),
1103 FRAC_CONST(0.0047938558726415),
1104 FRAC_CONST(0.0049794962570131),
1105 FRAC_CONST(0.0051689115838900),
1106 FRAC_CONST(0.0053621474203763),
1107 FRAC_CONST(0.0055592490177131),
1108 FRAC_CONST(0.0057602613515573),
1109 FRAC_CONST(0.0059652291565289),
1110 FRAC_CONST(0.0061741969558843),
1111 FRAC_CONST(0.0063872090870253),
1112 FRAC_CONST(0.0066043097234387),
1113 FRAC_CONST(0.0068255428935640),
1114 FRAC_CONST(0.0070509524970088),
1115 FRAC_CONST(0.0072805823184660),
1116 FRAC_CONST(0.0075144760396340),
1117 FRAC_CONST(0.0077526772493942),
1118 FRAC_CONST(0.0079952294524673),
1119 FRAC_CONST(0.0082421760767325),
1120 FRAC_CONST(0.0084935604793733),
1121 FRAC_CONST(0.0087494259519870),
1122 FRAC_CONST(0.0090098157247792),
1123 FRAC_CONST(0.0092747729699467),
1124 FRAC_CONST(0.0095443408043399),
1125 FRAC_CONST(0.0098185622914832),
1126 FRAC_CONST(0.0100974804430226),
1127 FRAC_CONST(0.0103811382196612),
1128 FRAC_CONST(0.0106695785316351),
1129 FRAC_CONST(0.0109628442387771),
1130 FRAC_CONST(0.0112609781502091),
1131 FRAC_CONST(0.0115640230236993),
1132 FRAC_CONST(0.0118720215647169),
1133 FRAC_CONST(0.0121850164252137),
1134 FRAC_CONST(0.0125030502021561),
1135 FRAC_CONST(0.0128261654358321),
1136 FRAC_CONST(0.0131544046079532),
1137 FRAC_CONST(0.0134878101395681),
1138 FRAC_CONST(0.0138264243888068),
1139 FRAC_CONST(0.0141702896484671),
1140 FRAC_CONST(0.0145194481434592),
1141 FRAC_CONST(0.0148739420281182),
1142 FRAC_CONST(0.0152338133833959),
1143 FRAC_CONST(0.0155991042139432),
1144 FRAC_CONST(0.0159698564450882),
1145 FRAC_CONST(0.0163461119197227),
1146 FRAC_CONST(0.0167279123950996),
1147 FRAC_CONST(0.0171152995395520),
1148 FRAC_CONST(0.0175083149291368),
1149 FRAC_CONST(0.0179070000442104),
1150 FRAC_CONST(0.0183113962659409),
1151 FRAC_CONST(0.0187215448727609),
1152 FRAC_CONST(0.0191374870367659),
1153 FRAC_CONST(0.0195592638200623),
1154 FRAC_CONST(0.0199869161710679),
1155 FRAC_CONST(0.0204204849207691),
1156 FRAC_CONST(0.0208600107789370),
1157 FRAC_CONST(0.0213055343303066),
1158 FRAC_CONST(0.0217570960307201),
1159 FRAC_CONST(0.0222147362032386),
1160 FRAC_CONST(0.0226784950342228),
1161 FRAC_CONST(0.0231484125693867),
1162 FRAC_CONST(0.0236245287098244),
1163 FRAC_CONST(0.0241068832080138),
1164 FRAC_CONST(0.0245955156637973),
1165 FRAC_CONST(0.0250904655203431),
1166 FRAC_CONST(0.0255917720600868),
1167 FRAC_CONST(0.0260994744006559),
1168 FRAC_CONST(0.0266136114907790),
1169 FRAC_CONST(0.0271342221061795),
1170 FRAC_CONST(0.0276613448454576),
1171 FRAC_CONST(0.0281950181259587),
1172 FRAC_CONST(0.0287352801796329),
1173 FRAC_CONST(0.0292821690488833),
1174 FRAC_CONST(0.0298357225824074),
1175 FRAC_CONST(0.0303959784310299),
1176 FRAC_CONST(0.0309629740435296),
1177 FRAC_CONST(0.0315367466624615),
1178 FRAC_CONST(0.0321173333199732),
1179 FRAC_CONST(0.0327047708336193),
1180 FRAC_CONST(0.0332990958021720),
1181 FRAC_CONST(0.0339003446014307),
1182 FRAC_CONST(0.0345085533800302),
1183 FRAC_CONST(0.0351237580552491),
1184 FRAC_CONST(0.0357459943088193),
1185 FRAC_CONST(0.0363752975827358),
1186 FRAC_CONST(0.0370117030750704),
1187 FRAC_CONST(0.0376552457357870),
1188 FRAC_CONST(0.0383059602625614),
1189 FRAC_CONST(0.0389638810966056),
1190 FRAC_CONST(0.0396290424184964),
1191 FRAC_CONST(0.0403014781440112),
1192 FRAC_CONST(0.0409812219199691),
1193 FRAC_CONST(0.0416683071200799),
1194 FRAC_CONST(0.0423627668408009),
1195 FRAC_CONST(0.0430646338972016),
1196 FRAC_CONST(0.0437739408188385),
1197 FRAC_CONST(0.0444907198456388),
1198 FRAC_CONST(0.0452150029237951),
1199 FRAC_CONST(0.0459468217016708),
1200 FRAC_CONST(0.0466862075257170),
1201 FRAC_CONST(0.0474331914364021),
1202 FRAC_CONST(0.0481878041641539),
1203 FRAC_CONST(0.0489500761253148),
1204 FRAC_CONST(0.0497200374181119),
1205 FRAC_CONST(0.0504977178186404),
1206 FRAC_CONST(0.0512831467768636),
1207 FRAC_CONST(0.0520763534126273),
1208 FRAC_CONST(0.0528773665116913),
1209 FRAC_CONST(0.0536862145217772),
1210 FRAC_CONST(0.0545029255486345),
1211 FRAC_CONST(0.0553275273521232),
1212 FRAC_CONST(0.0561600473423164),
1213 FRAC_CONST(0.0570005125756209),
1214 FRAC_CONST(0.0578489497509179),
1215 FRAC_CONST(0.0587053852057233),
1216 FRAC_CONST(0.0595698449123695),
1217 FRAC_CONST(0.0604423544742077),
1218 FRAC_CONST(0.0613229391218317),
1219 FRAC_CONST(0.0622116237093247),
1220 FRAC_CONST(0.0631084327105284),
1221 FRAC_CONST(0.0640133902153352),
1222 FRAC_CONST(0.0649265199260043),
1223 FRAC_CONST(0.0658478451535027),
1224 FRAC_CONST(0.0667773888138695),
1225 FRAC_CONST(0.0677151734246072),
1226 FRAC_CONST(0.0686612211010977),
1227 FRAC_CONST(0.0696155535530446),
1228 FRAC_CONST(0.0705781920809429),
1229 FRAC_CONST(0.0715491575725758),
1230 FRAC_CONST(0.0725284704995383),
1231 FRAC_CONST(0.0735161509137906),
1232 FRAC_CONST(0.0745122184442388),
1233 FRAC_CONST(0.0755166922933461),
1234 FRAC_CONST(0.0765295912337720),
1235 FRAC_CONST(0.0775509336050437),
1236 FRAC_CONST(0.0785807373102561),
1237 FRAC_CONST(0.0796190198128044),
1238 FRAC_CONST(0.0806657981331473),
1239 FRAC_CONST(0.0817210888456026),
1240 FRAC_CONST(0.0827849080751753),
1241 FRAC_CONST(0.0838572714944183),
1242 FRAC_CONST(0.0849381943203265),
1243 FRAC_CONST(0.0860276913112652),
1244 FRAC_CONST(0.0871257767639319),
1245 FRAC_CONST(0.0882324645103534),
1246 FRAC_CONST(0.0893477679149177),
1247 FRAC_CONST(0.0904716998714418),
1248 FRAC_CONST(0.0916042728002747),
1249 FRAC_CONST(0.0927454986454381),
1250 FRAC_CONST(0.0938953888718020),
1251 FRAC_CONST(0.0950539544622996),
1252 FRAC_CONST(0.0962212059151784),
1253 FRAC_CONST(0.0973971532412897),
1254 FRAC_CONST(0.0985818059614169),
1255 FRAC_CONST(0.0997751731036425),
1256 FRAC_CONST(0.1009772632007537),
1257 FRAC_CONST(0.1021880842876888),
1258 FRAC_CONST(0.1034076438990227),
1259 FRAC_CONST(0.1046359490664932),
1260 FRAC_CONST(0.1058730063165681),
1261 FRAC_CONST(0.1071188216680533),
1262 FRAC_CONST(0.1083734006297428),
1263 FRAC_CONST(0.1096367481981100),
1264 FRAC_CONST(0.1109088688550422),
1265 FRAC_CONST(0.1121897665656167),
1266 FRAC_CONST(0.1134794447759207),
1267 FRAC_CONST(0.1147779064109143),
1268 FRAC_CONST(0.1160851538723372),
1269 FRAC_CONST(0.1174011890366591),
1270 FRAC_CONST(0.1187260132530751),
1271 FRAC_CONST(0.1200596273415457),
1272 FRAC_CONST(0.1214020315908810),
1273 FRAC_CONST(0.1227532257568719),
1274 FRAC_CONST(0.1241132090604651),
1275 FRAC_CONST(0.1254819801859856),
1276 FRAC_CONST(0.1268595372794049),
1277 FRAC_CONST(0.1282458779466558),
1278 FRAC_CONST(0.1296409992519942),
1279 FRAC_CONST(0.1310448977164081),
1280 FRAC_CONST(0.1324575693160745),
1281 FRAC_CONST(0.1338790094808633),
1282 FRAC_CONST(0.1353092130928902),
1283 FRAC_CONST(0.1367481744851168),
1284 FRAC_CONST(0.1381958874400010),
1285 FRAC_CONST(0.1396523451881945),
1286 FRAC_CONST(0.1411175404072910),
1287 FRAC_CONST(0.1425914652206223),
1288 FRAC_CONST(0.1440741111961058),
1289 FRAC_CONST(0.1455654693451402),
1290 FRAC_CONST(0.1470655301215526),
1291 FRAC_CONST(0.1485742834205956),
1292 FRAC_CONST(0.1500917185779945),
1293 FRAC_CONST(0.1516178243690463),
1294 FRAC_CONST(0.1531525890077689),
1295 FRAC_CONST(0.1546960001461024),
1296 FRAC_CONST(0.1562480448731608),
1297 FRAC_CONST(0.1578087097145364),
1298 FRAC_CONST(0.1593779806316558),
1299 FRAC_CONST(0.1609558430211876),
1300 FRAC_CONST(0.1625422817145027),
1301 FRAC_CONST(0.1641372809771871),
1302 FRAC_CONST(0.1657408245086070),
1303 FRAC_CONST(0.1673528954415270),
1304 FRAC_CONST(0.1689734763417811),
1305 FRAC_CONST(0.1706025492079969),
1306 FRAC_CONST(0.1722400954713725),
1307 FRAC_CONST(0.1738860959955082),
1308 FRAC_CONST(0.1755405310762898),
1309 FRAC_CONST(0.1772033804418275),
1310 FRAC_CONST(0.1788746232524467),
1311 FRAC_CONST(0.1805542381007349),
1312 FRAC_CONST(0.1822422030116404),
1313 FRAC_CONST(0.1839384954426268),
1314 FRAC_CONST(0.1856430922838810),
1315 FRAC_CONST(0.1873559698585756),
1316 FRAC_CONST(0.1890771039231862),
1317 FRAC_CONST(0.1908064696678625),
1318 FRAC_CONST(0.1925440417168546),
1319 FRAC_CONST(0.1942897941289937),
1320 FRAC_CONST(0.1960437003982277),
1321 FRAC_CONST(0.1978057334542116),
1322 FRAC_CONST(0.1995758656629525),
1323 FRAC_CONST(0.2013540688275098),
1324 FRAC_CONST(0.2031403141887507),
1325 FRAC_CONST(0.2049345724261595),
1326 FRAC_CONST(0.2067368136587033),
1327 FRAC_CONST(0.2085470074457521),
1328 FRAC_CONST(0.2103651227880538),
1329 FRAC_CONST(0.2121911281287646),
1330 FRAC_CONST(0.2140249913545346),
1331 FRAC_CONST(0.2158666797966480),
1332 FRAC_CONST(0.2177161602322188),
1333 FRAC_CONST(0.2195733988854414),
1334 FRAC_CONST(0.2214383614288963),
1335 FRAC_CONST(0.2233110129849106),
1336 FRAC_CONST(0.2251913181269740),
1337 FRAC_CONST(0.2270792408812093),
1338 FRAC_CONST(0.2289747447278976),
1339 FRAC_CONST(0.2308777926030592),
1340 FRAC_CONST(0.2327883469000885),
1341 FRAC_CONST(0.2347063694714437),
1342 FRAC_CONST(0.2366318216303919),
1343 FRAC_CONST(0.2385646641528076),
1344 FRAC_CONST(0.2405048572790267),
1345 FRAC_CONST(0.2424523607157545),
1346 FRAC_CONST(0.2444071336380283),
1347 FRAC_CONST(0.2463691346912334),
1348 FRAC_CONST(0.2483383219931741),
1349 FRAC_CONST(0.2503146531361985),
1350 FRAC_CONST(0.2522980851893767),
1351 FRAC_CONST(0.2542885747007335),
1352 FRAC_CONST(0.2562860776995335),
1353 FRAC_CONST(0.2582905496986215),
1354 FRAC_CONST(0.2603019456968142),
1355 FRAC_CONST(0.2623202201813464),
1356 FRAC_CONST(0.2643453271303700),
1357 FRAC_CONST(0.2663772200155053),
1358 FRAC_CONST(0.2684158518044454),
1359 FRAC_CONST(0.2704611749636135),
1360 FRAC_CONST(0.2725131414608710),
1361 FRAC_CONST(0.2745717027682799),
1362 FRAC_CONST(0.2766368098649151),
1363 FRAC_CONST(0.2787084132397296),
1364 FRAC_CONST(0.2807864628944707),
1365 FRAC_CONST(0.2828709083466482),
1366 FRAC_CONST(0.2849616986325523),
1367 FRAC_CONST(0.2870587823103237),
1368 FRAC_CONST(0.2891621074630737),
1369 FRAC_CONST(0.2912716217020546),
1370 FRAC_CONST(0.2933872721698803),
1371 FRAC_CONST(0.2955090055437973),
1372 FRAC_CONST(0.2976367680390041),
1373 FRAC_CONST(0.2997705054120213),
1374 FRAC_CONST(0.3019101629641097),
1375 FRAC_CONST(0.3040556855447379),
1376 FRAC_CONST(0.3062070175550981),
1377 FRAC_CONST(0.3083641029516701),
1378 FRAC_CONST(0.3105268852498334),
1379 FRAC_CONST(0.3126953075275265),
1380 FRAC_CONST(0.3148693124289546),
1381 FRAC_CONST(0.3170488421683428),
1382 FRAC_CONST(0.3192338385337370),
1383 FRAC_CONST(0.3214242428908514),
1384 FRAC_CONST(0.3236199961869606),
1385 FRAC_CONST(0.3258210389548392),
1386 FRAC_CONST(0.3280273113167459),
1387 FRAC_CONST(0.3302387529884521),
1388 FRAC_CONST(0.3324553032833160),
1389 FRAC_CONST(0.3346769011164010),
1390 FRAC_CONST(0.3369034850086373),
1391 FRAC_CONST(0.3391349930910280),
1392 FRAC_CONST(0.3413713631088974),
1393 FRAC_CONST(0.3436125324261830),
1394 FRAC_CONST(0.3458584380297697),
1395 FRAC_CONST(0.3481090165338656),
1396 FRAC_CONST(0.3503642041844199),
1397 FRAC_CONST(0.3526239368635820),
1398 FRAC_CONST(0.3548881500942010),
1399 FRAC_CONST(0.3571567790443668),
1400 FRAC_CONST(0.3594297585319891),
1401 FRAC_CONST(0.3617070230294185),
1402 FRAC_CONST(0.3639885066681048),
1403 FRAC_CONST(0.3662741432432950),
1404 FRAC_CONST(0.3685638662187693),
1405 FRAC_CONST(0.3708576087316147),
1406 FRAC_CONST(0.3731553035970366),
1407 FRAC_CONST(0.3754568833132069),
1408 FRAC_CONST(0.3777622800661488),
1409 FRAC_CONST(0.3800714257346570),
1410 FRAC_CONST(0.3823842518952546),
1411 FRAC_CONST(0.3847006898271841),
1412 FRAC_CONST(0.3870206705174334),
1413 FRAC_CONST(0.3893441246657958),
1414 FRAC_CONST(0.3916709826899639),
1415 FRAC_CONST(0.3940011747306560),
1416 FRAC_CONST(0.3963346306567764),
1417 FRAC_CONST(0.3986712800706062),
1418 FRAC_CONST(0.4010110523130271),
1419 FRAC_CONST(0.4033538764687756),
1420 FRAC_CONST(0.4056996813717284),
1421 FRAC_CONST(0.4080483956102172),
1422 FRAC_CONST(0.4103999475323736),
1423 FRAC_CONST(0.4127542652515031),
1424 FRAC_CONST(0.4151112766514873),
1425 FRAC_CONST(0.4174709093922143),
1426 FRAC_CONST(0.4198330909150365),
1427 FRAC_CONST(0.4221977484482556),
1428 FRAC_CONST(0.4245648090126334),
1429 FRAC_CONST(0.4269341994269293),
1430 FRAC_CONST(0.4293058463134616),
1431 FRAC_CONST(0.4316796761036958),
1432 FRAC_CONST(0.4340556150438547),
1433 FRAC_CONST(0.4364335892005536),
1434 FRAC_CONST(0.4388135244664580),
1435 FRAC_CONST(0.4411953465659639),
1436 FRAC_CONST(0.4435789810609000),
1437 FRAC_CONST(0.4459643533562509),
1438 FRAC_CONST(0.4483513887059016),
1439 FRAC_CONST(0.4507400122184019),
1440 FRAC_CONST(0.4531301488627497),
1441 FRAC_CONST(0.4555217234741947),
1442 FRAC_CONST(0.4579146607600593),
1443 FRAC_CONST(0.4603088853055777),
1444 FRAC_CONST(0.4627043215797521),
1445 FRAC_CONST(0.4651008939412254),
1446 FRAC_CONST(0.4674985266441709),
1447 FRAC_CONST(0.4698971438441951),
1448 FRAC_CONST(0.4722966696042580),
1449 FRAC_CONST(0.4746970279006055),
1450 FRAC_CONST(0.4770981426287164),
1451 FRAC_CONST(0.4794999376092619),
1452 FRAC_CONST(0.4819023365940778),
1453 FRAC_CONST(0.4843052632721476),
1454 FRAC_CONST(0.4867086412755978),
1455 FRAC_CONST(0.4891123941857028),
1456 FRAC_CONST(0.4915164455388997),
1457 FRAC_CONST(0.4939207188328126),
1458 FRAC_CONST(0.4963251375322855),
1459 FRAC_CONST(0.4987296250754225),
1460 FRAC_CONST(0.5011341048796359),
1461 FRAC_CONST(0.5035385003477012),
1462 FRAC_CONST(0.5059427348738168),
1463 FRAC_CONST(0.5083467318496706),
1464 FRAC_CONST(0.5107504146705106),
1465 FRAC_CONST(0.5131537067412193),
1466 FRAC_CONST(0.5155565314823923),
1467 FRAC_CONST(0.5179588123364193),
1468 FRAC_CONST(0.5203604727735667),
1469 FRAC_CONST(0.5227614362980630),
1470 FRAC_CONST(0.5251616264541841),
1471 FRAC_CONST(0.5275609668323384),
1472 FRAC_CONST(0.5299593810751532),
1473 FRAC_CONST(0.5323567928835578),
1474 FRAC_CONST(0.5347531260228663),
1475 FRAC_CONST(0.5371483043288580),
1476 FRAC_CONST(0.5395422517138538),
1477 FRAC_CONST(0.5419348921727899),
1478 FRAC_CONST(0.5443261497892862),
1479 FRAC_CONST(0.5467159487417104),
1480 FRAC_CONST(0.5491042133092364),
1481 FRAC_CONST(0.5514908678778958),
1482 FRAC_CONST(0.5538758369466227),
1483 FRAC_CONST(0.5562590451332913),
1484 FRAC_CONST(0.5586404171807443),
1485 FRAC_CONST(0.5610198779628133),
1486 FRAC_CONST(0.5633973524903286),
1487 FRAC_CONST(0.5657727659171199),
1488 FRAC_CONST(0.5681460435460047),
1489 FRAC_CONST(0.5705171108347663),
1490 FRAC_CONST(0.5728858934021188),
1491 FRAC_CONST(0.5752523170336598),
1492 FRAC_CONST(0.5776163076878088),
1493 FRAC_CONST(0.5799777915017323),
1494 FRAC_CONST(0.5823366947972535),
1495 FRAC_CONST(0.5846929440867458),
1496 FRAC_CONST(0.5870464660790119),
1497 FRAC_CONST(0.5893971876851449),
1498 FRAC_CONST(0.5917450360243719),
1499 FRAC_CONST(0.5940899384298793),
1500 FRAC_CONST(0.5964318224546208),
1501 FRAC_CONST(0.5987706158771039),
1502 FRAC_CONST(0.6011062467071583),
1503 FRAC_CONST(0.6034386431916822),
1504 FRAC_CONST(0.6057677338203681),
1505 FRAC_CONST(0.6080934473314057),
1506 FRAC_CONST(0.6104157127171639),
1507 FRAC_CONST(0.6127344592298474),
1508 FRAC_CONST(0.6150496163871310),
1509 FRAC_CONST(0.6173611139777690),
1510 FRAC_CONST(0.6196688820671789),
1511 FRAC_CONST(0.6219728510029997),
1512 FRAC_CONST(0.6242729514206247),
1513 FRAC_CONST(0.6265691142487051),
1514 FRAC_CONST(0.6288612707146283),
1515 FRAC_CONST(0.6311493523499663),
1516 FRAC_CONST(0.6334332909958958),
1517 FRAC_CONST(0.6357130188085891),
1518 FRAC_CONST(0.6379884682645743),
1519 FRAC_CONST(0.6402595721660647),
1520 FRAC_CONST(0.6425262636462578),
1521 FRAC_CONST(0.6447884761746012),
1522 FRAC_CONST(0.6470461435620266),
1523 FRAC_CONST(0.6492991999661505),
1524 FRAC_CONST(0.6515475798964411),
1525 FRAC_CONST(0.6537912182193508),
1526 FRAC_CONST(0.6560300501634142),
1527 FRAC_CONST(0.6582640113243098),
1528 FRAC_CONST(0.6604930376698862),
1529 FRAC_CONST(0.6627170655451516),
1530 FRAC_CONST(0.6649360316772256),
1531 FRAC_CONST(0.6671498731802533),
1532 FRAC_CONST(0.6693585275602818),
1533 FRAC_CONST(0.6715619327200959),
1534 FRAC_CONST(0.6737600269640164),
1535 FRAC_CONST(0.6759527490026566),
1536 FRAC_CONST(0.6781400379576392),
1537 FRAC_CONST(0.6803218333662715),
1538 FRAC_CONST(0.6824980751861787),
1539 FRAC_CONST(0.6846687037998949),
1540 FRAC_CONST(0.6868336600194123),
1541 FRAC_CONST(0.6889928850906855),
1542 FRAC_CONST(0.6911463206980928),
1543 FRAC_CONST(0.6932939089688525),
1544 FRAC_CONST(0.6954355924773949),
1545 FRAC_CONST(0.6975713142496884),
1546 FRAC_CONST(0.6997010177675195),
1547 FRAC_CONST(0.7018246469727265),
1548 FRAC_CONST(0.7039421462713862),
1549 FRAC_CONST(0.7060534605379528),
1550 FRAC_CONST(0.7081585351193496),
1551 FRAC_CONST(0.7102573158390105),
1552 FRAC_CONST(0.7123497490008750),
1553 FRAC_CONST(0.7144357813933307),
1554 FRAC_CONST(0.7165153602931092),
1555 FRAC_CONST(0.7185884334691287),
1556 FRAC_CONST(0.7206549491862871),
1557 FRAC_CONST(0.7227148562092042),
1558 FRAC_CONST(0.7247681038059106),
1559 FRAC_CONST(0.7268146417514855),
1560 FRAC_CONST(0.7288544203316418),
1561 FRAC_CONST(0.7308873903462577),
1562 FRAC_CONST(0.7329135031128549),
1563 FRAC_CONST(0.7349327104700221),
1564 FRAC_CONST(0.7369449647807855),
1565 FRAC_CONST(0.7389502189359237),
1566 FRAC_CONST(0.7409484263572271),
1567 FRAC_CONST(0.7429395410007016),
1568 FRAC_CONST(0.7449235173597176),
1569 FRAC_CONST(0.7469003104681008),
1570 FRAC_CONST(0.7488698759031670),
1571 FRAC_CONST(0.7508321697887005),
1572 FRAC_CONST(0.7527871487978728),
1573 FRAC_CONST(0.7547347701561059),
1574 FRAC_CONST(0.7566749916438754),
1575 FRAC_CONST(0.7586077715994560),
1576 FRAC_CONST(0.7605330689216074),
1577 FRAC_CONST(0.7624508430722016),
1578 FRAC_CONST(0.7643610540787891),
1579 FRAC_CONST(0.7662636625371070),
1580 FRAC_CONST(0.7681586296135255),
1581 FRAC_CONST(0.7700459170474343),
1582 FRAC_CONST(0.7719254871535672),
1583 FRAC_CONST(0.7737973028242671),
1584 FRAC_CONST(0.7756613275316875),
1585 FRAC_CONST(0.7775175253299340),
1586 FRAC_CONST(0.7793658608571425),
1587 FRAC_CONST(0.7812062993374951),
1588 FRAC_CONST(0.7830388065831744),
1589 FRAC_CONST(0.7848633489962533),
1590 FRAC_CONST(0.7866798935705233),
1591 FRAC_CONST(0.7884884078932579),
1592 FRAC_CONST(0.7902888601469138),
1593 FRAC_CONST(0.7920812191107668),
1594 FRAC_CONST(0.7938654541624850),
1595 FRAC_CONST(0.7956415352796368),
1596 FRAC_CONST(0.7974094330411343),
1597 FRAC_CONST(0.7991691186286133),
1598 FRAC_CONST(0.8009205638277465),
1599 FRAC_CONST(0.8026637410294932),
1600 FRAC_CONST(0.8043986232312831),
1601 FRAC_CONST(0.8061251840381346),
1602 FRAC_CONST(0.8078433976637077),
1603 FRAC_CONST(0.8095532389312917),
1604 FRAC_CONST(0.8112546832747255),
1605 FRAC_CONST(0.8129477067392539),
1606 FRAC_CONST(0.8146322859823164),
1607 FRAC_CONST(0.8163083982742698),
1608 FRAC_CONST(0.8179760214990457),
1609 FRAC_CONST(0.8196351341547393),
1610 FRAC_CONST(0.8212857153541345),
1611 FRAC_CONST(0.8229277448251595),
1612 FRAC_CONST(0.8245612029112778),
1613 FRAC_CONST(0.8261860705718113),
1614 FRAC_CONST(0.8278023293821971),
1615 FRAC_CONST(0.8294099615341773),
1616 FRAC_CONST(0.8310089498359212),
1617 FRAC_CONST(0.8325992777120815),
1618 FRAC_CONST(0.8341809292037831),
1619 FRAC_CONST(0.8357538889685445),
1620 FRAC_CONST(0.8373181422801330),
1621 FRAC_CONST(0.8388736750283521),
1622 FRAC_CONST(0.8404204737187619),
1623 FRAC_CONST(0.8419585254723335),
1624 FRAC_CONST(0.8434878180250348),
1625 FRAC_CONST(0.8450083397273509),
1626 FRAC_CONST(0.8465200795437368),
1627 FRAC_CONST(0.8480230270520029),
1628 FRAC_CONST(0.8495171724426350),
1629 FRAC_CONST(0.8510025065180464),
1630 FRAC_CONST(0.8524790206917633),
1631 FRAC_CONST(0.8539467069875448),
1632 FRAC_CONST(0.8554055580384357),
1633 FRAC_CONST(0.8568555670857525),
1634 FRAC_CONST(0.8582967279780043),
1635 FRAC_CONST(0.8597290351697464),
1636 FRAC_CONST(0.8611524837203691),
1637 FRAC_CONST(0.8625670692928198),
1638 FRAC_CONST(0.8639727881522599),
1639 FRAC_CONST(0.8653696371646555),
1640 FRAC_CONST(0.8667576137953045),
1641 FRAC_CONST(0.8681367161072958),
1642 FRAC_CONST(0.8695069427599065),
1643 FRAC_CONST(0.8708682930069319),
1644 FRAC_CONST(0.8722207666949527),
1645 FRAC_CONST(0.8735643642615368),
1646 FRAC_CONST(0.8748990867333771),
1647 FRAC_CONST(0.8762249357243662),
1648 FRAC_CONST(0.8775419134336067),
1649 FRAC_CONST(0.8788500226433579),
1650 FRAC_CONST(0.8801492667169208),
1651 FRAC_CONST(0.8814396495964587),
1652 FRAC_CONST(0.8827211758007560),
1653 FRAC_CONST(0.8839938504229149),
1654 FRAC_CONST(0.8852576791279895),
1655 FRAC_CONST(0.8865126681505587),
1656 FRAC_CONST(0.8877588242922386),
1657 FRAC_CONST(0.8889961549191320),
1658 FRAC_CONST(0.8902246679592184),
1659 FRAC_CONST(0.8914443718996848),
1660 FRAC_CONST(0.8926552757841945),
1661 FRAC_CONST(0.8938573892100969),
1662 FRAC_CONST(0.8950507223255798),
1663 FRAC_CONST(0.8962352858267605),
1664 FRAC_CONST(0.8974110909547198),
1665 FRAC_CONST(0.8985781494924783),
1666 FRAC_CONST(0.8997364737619142),
1667 FRAC_CONST(0.9008860766206249),
1668 FRAC_CONST(0.9020269714587307),
1669 FRAC_CONST(0.9031591721956235),
1670 FRAC_CONST(0.9042826932766591),
1671 FRAC_CONST(0.9053975496697941),
1672 FRAC_CONST(0.9065037568621681),
1673 FRAC_CONST(0.9076013308566311),
1674 FRAC_CONST(0.9086902881682180),
1675 FRAC_CONST(0.9097706458205682),
1676 FRAC_CONST(0.9108424213422940),
1677 FRAC_CONST(0.9119056327632955),
1678 FRAC_CONST(0.9129602986110235),
1679 FRAC_CONST(0.9140064379066919),
1680 FRAC_CONST(0.9150440701614393),
1681 FRAC_CONST(0.9160732153724396),
1682 FRAC_CONST(0.9170938940189634),
1683 FRAC_CONST(0.9181061270583908),
1684 FRAC_CONST(0.9191099359221748),
1685 FRAC_CONST(0.9201053425117579),
1686 FRAC_CONST(0.9210923691944400),
1687 FRAC_CONST(0.9220710387992010),
1688 FRAC_CONST(0.9230413746124764),
1689 FRAC_CONST(0.9240034003738882),
1690 FRAC_CONST(0.9249571402719298),
1691 FRAC_CONST(0.9259026189396085),
1692 FRAC_CONST(0.9268398614500427),
1693 FRAC_CONST(0.9277688933120170),
1694 FRAC_CONST(0.9286897404654957),
1695 FRAC_CONST(0.9296024292770939),
1696 FRAC_CONST(0.9305069865355076),
1697 FRAC_CONST(0.9314034394469048),
1698 FRAC_CONST(0.9322918156302762),
1699 FRAC_CONST(0.9331721431127471),
1700 FRAC_CONST(0.9340444503248519),
1701 FRAC_CONST(0.9349087660957711),
1702 FRAC_CONST(0.9357651196485313),
1703 FRAC_CONST(0.9366135405951697),
1704 FRAC_CONST(0.9374540589318637),
1705 FRAC_CONST(0.9382867050340261),
1706 FRAC_CONST(0.9391115096513655),
1707 FRAC_CONST(0.9399285039029165),
1708 FRAC_CONST(0.9407377192720349),
1709 FRAC_CONST(0.9415391876013639),
1710 FRAC_CONST(0.9423329410877687),
1711 FRAC_CONST(0.9431190122772415),
1712 FRAC_CONST(0.9438974340597782),
1713 FRAC_CONST(0.9446682396642262),
1714 FRAC_CONST(0.9454314626531054),
1715 FRAC_CONST(0.9461871369174033),
1716 FRAC_CONST(0.9469352966713429),
1717 FRAC_CONST(0.9476759764471278),
1718 FRAC_CONST(0.9484092110896616),
1719 FRAC_CONST(0.9491350357512457),
1720 FRAC_CONST(0.9498534858862532),
1721 FRAC_CONST(0.9505645972457831),
1722 FRAC_CONST(0.9512684058722927),
1723 FRAC_CONST(0.9519649480942105),
1724 FRAC_CONST(0.9526542605205314),
1725 FRAC_CONST(0.9533363800353921),
1726 FRAC_CONST(0.9540113437926313),
1727 FRAC_CONST(0.9546791892103320),
1728 FRAC_CONST(0.9553399539653500),
1729 FRAC_CONST(0.9559936759878265),
1730 FRAC_CONST(0.9566403934556893),
1731 FRAC_CONST(0.9572801447891388),
1732 FRAC_CONST(0.9579129686451244),
1733 FRAC_CONST(0.9585389039118085),
1734 FRAC_CONST(0.9591579897030224),
1735 FRAC_CONST(0.9597702653527108),
1736 FRAC_CONST(0.9603757704093711),
1737 FRAC_CONST(0.9609745446304828),
1738 FRAC_CONST(0.9615666279769324),
1739 FRAC_CONST(0.9621520606074324),
1740 FRAC_CONST(0.9627308828729358),
1741 FRAC_CONST(0.9633031353110477),
1742 FRAC_CONST(0.9638688586404335),
1743 FRAC_CONST(0.9644280937552258),
1744 FRAC_CONST(0.9649808817194311),
1745 FRAC_CONST(0.9655272637613366),
1746 FRAC_CONST(0.9660672812679171),
1747 FRAC_CONST(0.9666009757792454),
1748 FRAC_CONST(0.9671283889829055),
1749 FRAC_CONST(0.9676495627084089),
1750 FRAC_CONST(0.9681645389216160),
1751 FRAC_CONST(0.9686733597191652),
1752 FRAC_CONST(0.9691760673229058),
1753 FRAC_CONST(0.9696727040743406),
1754 FRAC_CONST(0.9701633124290767),
1755 FRAC_CONST(0.9706479349512860),
1756 FRAC_CONST(0.9711266143081750),
1757 FRAC_CONST(0.9715993932644684),
1758 FRAC_CONST(0.9720663146769026),
1759 FRAC_CONST(0.9725274214887337),
1760 FRAC_CONST(0.9729827567242596),
1761 FRAC_CONST(0.9734323634833574),
1762 FRAC_CONST(0.9738762849360358),
1763 FRAC_CONST(0.9743145643170059),
1764 FRAC_CONST(0.9747472449202687),
1765 FRAC_CONST(0.9751743700937215),
1766 FRAC_CONST(0.9755959832337850),
1767 FRAC_CONST(0.9760121277800496),
1768 FRAC_CONST(0.9764228472099433),
1769 FRAC_CONST(0.9768281850334235),
1770 FRAC_CONST(0.9772281847876897),
1771 FRAC_CONST(0.9776228900319223),
1772 FRAC_CONST(0.9780123443420448),
1773 FRAC_CONST(0.9783965913055132),
1774 FRAC_CONST(0.9787756745161313),
1775 FRAC_CONST(0.9791496375688939),
1776 FRAC_CONST(0.9795185240548578),
1777 FRAC_CONST(0.9798823775560431),
1778 FRAC_CONST(0.9802412416403639),
1779 FRAC_CONST(0.9805951598565897),
1780 FRAC_CONST(0.9809441757293399),
1781 FRAC_CONST(0.9812883327541090),
1782 FRAC_CONST(0.9816276743923267),
1783 FRAC_CONST(0.9819622440664515),
1784 FRAC_CONST(0.9822920851550995),
1785 FRAC_CONST(0.9826172409882086),
1786 FRAC_CONST(0.9829377548422400),
1787 FRAC_CONST(0.9832536699354163),
1788 FRAC_CONST(0.9835650294229984),
1789 FRAC_CONST(0.9838718763926001),
1790 FRAC_CONST(0.9841742538595437),
1791 FRAC_CONST(0.9844722047622547),
1792 FRAC_CONST(0.9847657719576983),
1793 FRAC_CONST(0.9850549982168574),
1794 FRAC_CONST(0.9853399262202529),
1795 FRAC_CONST(0.9856205985535073),
1796 FRAC_CONST(0.9858970577029519),
1797 FRAC_CONST(0.9861693460512790),
1798 FRAC_CONST(0.9864375058732389),
1799 FRAC_CONST(0.9867015793313820),
1800 FRAC_CONST(0.9869616084718489),
1801 FRAC_CONST(0.9872176352202061),
1802 FRAC_CONST(0.9874697013773301),
1803 FRAC_CONST(0.9877178486153397),
1804 FRAC_CONST(0.9879621184735767),
1805 FRAC_CONST(0.9882025523546365),
1806 FRAC_CONST(0.9884391915204485),
1807 FRAC_CONST(0.9886720770884069),
1808 FRAC_CONST(0.9889012500275530),
1809 FRAC_CONST(0.9891267511548089),
1810 FRAC_CONST(0.9893486211312621),
1811 FRAC_CONST(0.9895669004585049),
1812 FRAC_CONST(0.9897816294750255),
1813 FRAC_CONST(0.9899928483526520),
1814 FRAC_CONST(0.9902005970930525),
1815 FRAC_CONST(0.9904049155242876),
1816 FRAC_CONST(0.9906058432974180),
1817 FRAC_CONST(0.9908034198831690),
1818 FRAC_CONST(0.9909976845686489),
1819 FRAC_CONST(0.9911886764541239),
1820 FRAC_CONST(0.9913764344498495),
1821 FRAC_CONST(0.9915609972729590),
1822 FRAC_CONST(0.9917424034444086),
1823 FRAC_CONST(0.9919206912859797),
1824 FRAC_CONST(0.9920958989173397),
1825 FRAC_CONST(0.9922680642531603),
1826 FRAC_CONST(0.9924372250002933),
1827 FRAC_CONST(0.9926034186550070),
1828 FRAC_CONST(0.9927666825002789),
1829 FRAC_CONST(0.9929270536031491),
1830 FRAC_CONST(0.9930845688121325),
1831 FRAC_CONST(0.9932392647546895),
1832 FRAC_CONST(0.9933911778347579),
1833 FRAC_CONST(0.9935403442303433),
1834 FRAC_CONST(0.9936867998911693),
1835 FRAC_CONST(0.9938305805363887),
1836 FRAC_CONST(0.9939717216523539),
1837 FRAC_CONST(0.9941102584904481),
1838 FRAC_CONST(0.9942462260649764),
1839 FRAC_CONST(0.9943796591511174),
1840 FRAC_CONST(0.9945105922829353),
1841 FRAC_CONST(0.9946390597514524),
1842 FRAC_CONST(0.9947650956027824),
1843 FRAC_CONST(0.9948887336363228),
1844 FRAC_CONST(0.9950100074030103),
1845 FRAC_CONST(0.9951289502036336),
1846 FRAC_CONST(0.9952455950872091),
1847 FRAC_CONST(0.9953599748494155),
1848 FRAC_CONST(0.9954721220310890),
1849 FRAC_CONST(0.9955820689167787),
1850 FRAC_CONST(0.9956898475333619),
1851 FRAC_CONST(0.9957954896487196),
1852 FRAC_CONST(0.9958990267704713),
1853 FRAC_CONST(0.9960004901447701),
1854 FRAC_CONST(0.9960999107551559),
1855 FRAC_CONST(0.9961973193214694),
1856 FRAC_CONST(0.9962927462988245),
1857 FRAC_CONST(0.9963862218766388),
1858 FRAC_CONST(0.9964777759777242),
1859 FRAC_CONST(0.9965674382574342),
1860 FRAC_CONST(0.9966552381028704),
1861 FRAC_CONST(0.9967412046321465),
1862 FRAC_CONST(0.9968253666937095),
1863 FRAC_CONST(0.9969077528657186),
1864 FRAC_CONST(0.9969883914554805),
1865 FRAC_CONST(0.9970673104989413),
1866 FRAC_CONST(0.9971445377602348),
1867 FRAC_CONST(0.9972201007312871),
1868 FRAC_CONST(0.9972940266314749),
1869 FRAC_CONST(0.9973663424073412),
1870 FRAC_CONST(0.9974370747323638),
1871 FRAC_CONST(0.9975062500067785),
1872 FRAC_CONST(0.9975738943574574),
1873 FRAC_CONST(0.9976400336378379),
1874 FRAC_CONST(0.9977046934279079),
1875 FRAC_CONST(0.9977678990342401),
1876 FRAC_CONST(0.9978296754900812),
1877 FRAC_CONST(0.9978900475554902),
1878 FRAC_CONST(0.9979490397175296),
1879 FRAC_CONST(0.9980066761905056),
1880 FRAC_CONST(0.9980629809162593),
1881 FRAC_CONST(0.9981179775645063),
1882 FRAC_CONST(0.9981716895332257),
1883 FRAC_CONST(0.9982241399490979),
1884 FRAC_CONST(0.9982753516679893),
1885 FRAC_CONST(0.9983253472754841),
1886 FRAC_CONST(0.9983741490874634),
1887 FRAC_CONST(0.9984217791507299),
1888 FRAC_CONST(0.9984682592436778),
1889 FRAC_CONST(0.9985136108770075),
1890 FRAC_CONST(0.9985578552944850),
1891 FRAC_CONST(0.9986010134737439),
1892 FRAC_CONST(0.9986431061271304),
1893 FRAC_CONST(0.9986841537025921),
1894 FRAC_CONST(0.9987241763846056),
1895 FRAC_CONST(0.9987631940951476),
1896 FRAC_CONST(0.9988012264947044),
1897 FRAC_CONST(0.9988382929833222),
1898 FRAC_CONST(0.9988744127016956),
1899 FRAC_CONST(0.9989096045322947),
1900 FRAC_CONST(0.9989438871005292),
1901 FRAC_CONST(0.9989772787759494),
1902 FRAC_CONST(0.9990097976734847),
1903 FRAC_CONST(0.9990414616547146),
1904 FRAC_CONST(0.9990722883291779),
1905 FRAC_CONST(0.9991022950557125),
1906 FRAC_CONST(0.9991314989438310),
1907 FRAC_CONST(0.9991599168551279),
1908 FRAC_CONST(0.9991875654047181),
1909 FRAC_CONST(0.9992144609627068),
1910 FRAC_CONST(0.9992406196556911),
1911 FRAC_CONST(0.9992660573682882),
1912 FRAC_CONST(0.9992907897446957),
1913 FRAC_CONST(0.9993148321902777),
1914 FRAC_CONST(0.9993381998731797),
1915 FRAC_CONST(0.9993609077259696),
1916 FRAC_CONST(0.9993829704473038),
1917 FRAC_CONST(0.9994044025036201),
1918 FRAC_CONST(0.9994252181308537),
1919 FRAC_CONST(0.9994454313361775),
1920 FRAC_CONST(0.9994650558997651),
1921 FRAC_CONST(0.9994841053765757),
1922 FRAC_CONST(0.9995025930981609),
1923 FRAC_CONST(0.9995205321744921),
1924 FRAC_CONST(0.9995379354958073),
1925 FRAC_CONST(0.9995548157344778),
1926 FRAC_CONST(0.9995711853468930),
1927 FRAC_CONST(0.9995870565753632),
1928 FRAC_CONST(0.9996024414500382),
1929 FRAC_CONST(0.9996173517908444),
1930 FRAC_CONST(0.9996317992094352),
1931 FRAC_CONST(0.9996457951111574),
1932 FRAC_CONST(0.9996593506970310),
1933 FRAC_CONST(0.9996724769657434),
1934 FRAC_CONST(0.9996851847156547),
1935 FRAC_CONST(0.9996974845468164),
1936 FRAC_CONST(0.9997093868630000),
1937 FRAC_CONST(0.9997209018737374),
1938 FRAC_CONST(0.9997320395963699),
1939 FRAC_CONST(0.9997428098581069),
1940 FRAC_CONST(0.9997532222980933),
1941 FRAC_CONST(0.9997632863694836),
1942 FRAC_CONST(0.9997730113415246),
1943 FRAC_CONST(0.9997824063016426),
1944 FRAC_CONST(0.9997914801575380),
1945 FRAC_CONST(0.9998002416392840),
1946 FRAC_CONST(0.9998086993014300),
1947 FRAC_CONST(0.9998168615251084),
1948 FRAC_CONST(0.9998247365201450),
1949 FRAC_CONST(0.9998323323271717),
1950 FRAC_CONST(0.9998396568197407),
1951 FRAC_CONST(0.9998467177064404),
1952 FRAC_CONST(0.9998535225330116),
1953 FRAC_CONST(0.9998600786844637),
1954 FRAC_CONST(0.9998663933871905),
1955 FRAC_CONST(0.9998724737110845),
1956 FRAC_CONST(0.9998783265716498),
1957 FRAC_CONST(0.9998839587321121),
1958 FRAC_CONST(0.9998893768055266),
1959 FRAC_CONST(0.9998945872568815),
1960 FRAC_CONST(0.9998995964051983),
1961 FRAC_CONST(0.9999044104256269),
1962 FRAC_CONST(0.9999090353515359),
1963 FRAC_CONST(0.9999134770765971),
1964 FRAC_CONST(0.9999177413568642),
1965 FRAC_CONST(0.9999218338128448),
1966 FRAC_CONST(0.9999257599315647),
1967 FRAC_CONST(0.9999295250686255),
1968 FRAC_CONST(0.9999331344502529),
1969 FRAC_CONST(0.9999365931753376),
1970 FRAC_CONST(0.9999399062174669),
1971 FRAC_CONST(0.9999430784269460),
1972 FRAC_CONST(0.9999461145328103),
1973 FRAC_CONST(0.9999490191448277),
1974 FRAC_CONST(0.9999517967554878),
1975 FRAC_CONST(0.9999544517419835),
1976 FRAC_CONST(0.9999569883681778),
1977 FRAC_CONST(0.9999594107865607),
1978 FRAC_CONST(0.9999617230401926),
1979 FRAC_CONST(0.9999639290646355),
1980 FRAC_CONST(0.9999660326898712),
1981 FRAC_CONST(0.9999680376422052),
1982 FRAC_CONST(0.9999699475461585),
1983 FRAC_CONST(0.9999717659263435),
1984 FRAC_CONST(0.9999734962093266),
1985 FRAC_CONST(0.9999751417254756),
1986 FRAC_CONST(0.9999767057107922),
1987 FRAC_CONST(0.9999781913087290),
1988 FRAC_CONST(0.9999796015719915),
1989 FRAC_CONST(0.9999809394643231),
1990 FRAC_CONST(0.9999822078622751),
1991 FRAC_CONST(0.9999834095569596),
1992 FRAC_CONST(0.9999845472557860),
1993 FRAC_CONST(0.9999856235841805),
1994 FRAC_CONST(0.9999866410872889),
1995 FRAC_CONST(0.9999876022316609),
1996 FRAC_CONST(0.9999885094069193),
1997 FRAC_CONST(0.9999893649274085),
1998 FRAC_CONST(0.9999901710338274),
1999 FRAC_CONST(0.9999909298948430),
2000 FRAC_CONST(0.9999916436086862),
2001 FRAC_CONST(0.9999923142047299),
2002 FRAC_CONST(0.9999929436450469),
2003 FRAC_CONST(0.9999935338259505),
2004 FRAC_CONST(0.9999940865795161),
2005 FRAC_CONST(0.9999946036750835),
2006 FRAC_CONST(0.9999950868207405),
2007 FRAC_CONST(0.9999955376647868),
2008 FRAC_CONST(0.9999959577971798),
2009 FRAC_CONST(0.9999963487509599),
2010 FRAC_CONST(0.9999967120036571),
2011 FRAC_CONST(0.9999970489786785),
2012 FRAC_CONST(0.9999973610466748),
2013 FRAC_CONST(0.9999976495268890),
2014 FRAC_CONST(0.9999979156884846),
2015 FRAC_CONST(0.9999981607518545),
2016 FRAC_CONST(0.9999983858899099),
2017 FRAC_CONST(0.9999985922293493),
2018 FRAC_CONST(0.9999987808519092),
2019 FRAC_CONST(0.9999989527955938),
2020 FRAC_CONST(0.9999991090558848),
2021 FRAC_CONST(0.9999992505869332),
2022 FRAC_CONST(0.9999993783027293),
2023 FRAC_CONST(0.9999994930782556),
2024 FRAC_CONST(0.9999995957506171),
2025 FRAC_CONST(0.9999996871201549),
2026 FRAC_CONST(0.9999997679515386),
2027 FRAC_CONST(0.9999998389748399),
2028 FRAC_CONST(0.9999999008865869),
2029 FRAC_CONST(0.9999999543507984)
2030};
2031#endif
2032
2033ALIGN static const real_t kbd_short_128[] =
2034{
2035 FRAC_CONST(4.3795702929468881e-005),
2036 FRAC_CONST(0.00011867384265436617),
2037 FRAC_CONST(0.0002307165763996192),
2038 FRAC_CONST(0.00038947282760568383),
2039 FRAC_CONST(0.00060581272288302553),
2040 FRAC_CONST(0.00089199695169487453),
2041 FRAC_CONST(0.0012617254423430522),
2042 FRAC_CONST(0.0017301724373162003),
2043 FRAC_CONST(0.0023140071937421476),
2044 FRAC_CONST(0.0030313989666022221),
2045 FRAC_CONST(0.0039020049735530842),
2046 FRAC_CONST(0.0049469401815512024),
2047 FRAC_CONST(0.0061887279335368318),
2048 FRAC_CONST(0.0076512306364647726),
2049 FRAC_CONST(0.0093595599562652423),
2050 FRAC_CONST(0.011339966208377799),
2051 FRAC_CONST(0.013619706891715299),
2052 FRAC_CONST(0.016226894586323766),
2053 FRAC_CONST(0.019190324717288168),
2054 FRAC_CONST(0.022539283975960878),
2055 FRAC_CONST(0.026303340480472455),
2056 FRAC_CONST(0.030512117046644357),
2057 FRAC_CONST(0.03519504922365594),
2058 FRAC_CONST(0.040381130021856941),
2059 FRAC_CONST(0.046098643518702249),
2060 FRAC_CONST(0.052374889768730587),
2061 FRAC_CONST(0.059235903660769147),
2062 FRAC_CONST(0.066706170556282418),
2063 FRAC_CONST(0.074808341703430481),
2064 FRAC_CONST(0.083562952548726227),
2065 FRAC_CONST(0.092988147159339674),
2066 FRAC_CONST(0.1030994120216919),
2067 FRAC_CONST(0.11390932249409955),
2068 FRAC_CONST(0.12542730516149531),
2069 FRAC_CONST(0.13765941926783826),
2070 FRAC_CONST(0.15060816028651081),
2071 FRAC_CONST(0.16427228853114245),
2072 FRAC_CONST(0.17864668550988483),
2073 FRAC_CONST(0.19372224048676889),
2074 FRAC_CONST(0.20948576943658073),
2075 FRAC_CONST(0.22591996826744942),
2076 FRAC_CONST(0.24300340184133981),
2077 FRAC_CONST(0.26071052995068139),
2078 FRAC_CONST(0.27901177101369551),
2079 FRAC_CONST(0.29787360383626599),
2080 FRAC_CONST(0.3172587073594233),
2081 FRAC_CONST(0.33712613787396362),
2082 FRAC_CONST(0.35743154274286698),
2083 FRAC_CONST(0.37812740923363009),
2084 FRAC_CONST(0.39916334663203618),
2085 FRAC_CONST(0.42048639939189658),
2086 FRAC_CONST(0.4420413886774246),
2087 FRAC_CONST(0.4637712792815169),
2088 FRAC_CONST(0.4856175685594023),
2089 FRAC_CONST(0.50752069370766872),
2090 FRAC_CONST(0.52942045344797806),
2091 FRAC_CONST(0.55125643994680196),
2092 FRAC_CONST(0.57296847662071559),
2093 FRAC_CONST(0.59449705734411495),
2094 FRAC_CONST(0.61578378249506627),
2095 FRAC_CONST(0.63677178724712891),
2096 FRAC_CONST(0.65740615754163356),
2097 FRAC_CONST(0.67763432925662526),
2098 FRAC_CONST(0.69740646622548552),
2099 FRAC_CONST(0.71667581294953808),
2100 FRAC_CONST(0.73539901809352737),
2101 FRAC_CONST(0.75353642514900732),
2102 FRAC_CONST(0.77105232699609816),
2103 FRAC_CONST(0.78791518148597028),
2104 FRAC_CONST(0.80409778560147072),
2105 FRAC_CONST(0.81957740622770781),
2106 FRAC_CONST(0.83433586607383625),
2107 FRAC_CONST(0.84835958382689225),
2108 FRAC_CONST(0.86163956818294229),
2109 FRAC_CONST(0.87417136598406997),
2110 FRAC_CONST(0.88595496528524853),
2111 FRAC_CONST(0.89699465477567619),
2112 FRAC_CONST(0.90729884157670959),
2113 FRAC_CONST(0.91687983002436779),
2114 FRAC_CONST(0.92575356460899649),
2115 FRAC_CONST(0.93393934077779084),
2116 FRAC_CONST(0.94145948779657318),
2117 FRAC_CONST(0.94833902830402828),
2118 FRAC_CONST(0.95460531956280026),
2119 FRAC_CONST(0.96028768170574896),
2120 FRAC_CONST(0.96541701848104766),
2121 FRAC_CONST(0.97002543610646474),
2122 FRAC_CONST(0.97414586584250062),
2123 FRAC_CONST(0.97781169577969584),
2124 FRAC_CONST(0.98105641710392333),
2125 FRAC_CONST(0.98391328975491177),
2126 FRAC_CONST(0.98641503193166202),
2127 FRAC_CONST(0.98859353733226141),
2128 FRAC_CONST(0.99047962335771556),
2129 FRAC_CONST(0.9921028127769449),
2130 FRAC_CONST(0.99349115056397752),
2131 FRAC_CONST(0.99467105680259038),
2132 FRAC_CONST(0.9956672157341897),
2133 FRAC_CONST(0.99650250022834352),
2134 FRAC_CONST(0.99719793020823266),
2135 FRAC_CONST(0.99777266288955657),
2136 FRAC_CONST(0.99824401211201486),
2137 FRAC_CONST(0.99862749357391212),
2138 FRAC_CONST(0.99893689243401962),
2139 FRAC_CONST(0.99918434952623147),
2140 FRAC_CONST(0.99938046234161726),
2141 FRAC_CONST(0.99953439696357238),
2142 FRAC_CONST(0.99965400728430465),
2143 FRAC_CONST(0.99974595807027455),
2144 FRAC_CONST(0.99981584876278362),
2145 FRAC_CONST(0.99986833527824281),
2146 FRAC_CONST(0.99990724749057802),
2147 FRAC_CONST(0.99993570051598468),
2148 FRAC_CONST(0.99995619835942084),
2149 FRAC_CONST(0.99997072890647543),
2150 FRAC_CONST(0.9999808496399144),
2151 FRAC_CONST(0.99998776381655818),
2152 FRAC_CONST(0.99999238714961569),
2153 FRAC_CONST(0.99999540529959718),
2154 FRAC_CONST(0.99999732268176988),
2155 FRAC_CONST(0.99999850325054862),
2156 FRAC_CONST(0.99999920402413744),
2157 FRAC_CONST(0.9999996021706401),
2158 FRAC_CONST(0.99999981649545566),
2159 FRAC_CONST(0.99999992415545547),
2160 FRAC_CONST(0.99999997338493041),
2161 FRAC_CONST(0.99999999295825959),
2162 FRAC_CONST(0.99999999904096815)
2163};
2164
2165#ifdef ALLOW_SMALL_FRAMELENGTH
2166ALIGN static const real_t kbd_short_120[] =
2167{
2168 FRAC_CONST(0.0000452320086910),
2169 FRAC_CONST(0.0001274564692111),
2170 FRAC_CONST(0.0002529398385345),
2171 FRAC_CONST(0.0004335140496648),
2172 FRAC_CONST(0.0006827100966952),
2173 FRAC_CONST(0.0010158708222246),
2174 FRAC_CONST(0.0014502162869659),
2175 FRAC_CONST(0.0020048865156264),
2176 FRAC_CONST(0.0027009618393178),
2177 FRAC_CONST(0.0035614590925043),
2178 FRAC_CONST(0.0046113018122711),
2179 FRAC_CONST(0.0058772627936484),
2180 FRAC_CONST(0.0073878776584103),
2181 FRAC_CONST(0.0091733284512589),
2182 FRAC_CONST(0.0112652966728373),
2183 FRAC_CONST(0.0136967855861945),
2184 FRAC_CONST(0.0165019120857793),
2185 FRAC_CONST(0.0197156688892217),
2186 FRAC_CONST(0.0233736582950619),
2187 FRAC_CONST(0.0275117992367496),
2188 FRAC_CONST(0.0321660098468534),
2189 FRAC_CONST(0.0373718682174417),
2190 FRAC_CONST(0.0431642544948834),
2191 FRAC_CONST(0.0495769778717676),
2192 FRAC_CONST(0.0566423924273392),
2193 FRAC_CONST(0.0643910061132260),
2194 FRAC_CONST(0.0728510874761729),
2195 FRAC_CONST(0.0820482749475221),
2196 FRAC_CONST(0.0920051937045235),
2197 FRAC_CONST(0.1027410852163450),
2198 FRAC_CONST(0.1142714546239370),
2199 FRAC_CONST(0.1266077410648368),
2200 FRAC_CONST(0.1397570159398145),
2201 FRAC_CONST(0.1537217139274270),
2202 FRAC_CONST(0.1684994012857075),
2203 FRAC_CONST(0.1840825856392944),
2204 FRAC_CONST(0.2004585710384133),
2205 FRAC_CONST(0.2176093615976121),
2206 FRAC_CONST(0.2355116164824983),
2207 FRAC_CONST(0.2541366584185075),
2208 FRAC_CONST(0.2734505372545160),
2209 FRAC_CONST(0.2934141494343369),
2210 FRAC_CONST(0.3139834135200387),
2211 FRAC_CONST(0.3351095011824163),
2212 FRAC_CONST(0.3567391223361566),
2213 FRAC_CONST(0.3788148623608774),
2214 FRAC_CONST(0.4012755686250732),
2215 FRAC_CONST(0.4240567828288110),
2216 FRAC_CONST(0.4470912150133537),
2217 FRAC_CONST(0.4703092544619664),
2218 FRAC_CONST(0.4936395121456694),
2219 FRAC_CONST(0.5170093888596962),
2220 FRAC_CONST(0.5403456627591340),
2221 FRAC_CONST(0.5635750896430154),
2222 FRAC_CONST(0.5866250090612892),
2223 FRAC_CONST(0.6094239491338723),
2224 FRAC_CONST(0.6319022228794100),
2225 FRAC_CONST(0.6539925088563087),
2226 FRAC_CONST(0.6756304090216887),
2227 FRAC_CONST(0.6967549769155277),
2228 FRAC_CONST(0.7173092095766250),
2229 FRAC_CONST(0.7372404969921184),
2230 FRAC_CONST(0.7565010233699827),
2231 FRAC_CONST(0.7750481150999984),
2232 FRAC_CONST(0.7928445309277697),
2233 FRAC_CONST(0.8098586906021583),
2234 FRAC_CONST(0.8260648390616000),
2235 FRAC_CONST(0.8414431440907889),
2236 FRAC_CONST(0.8559797262966709),
2237 FRAC_CONST(0.8696666212110165),
2238 FRAC_CONST(0.8825016743142358),
2239 FRAC_CONST(0.8944883707784486),
2240 FRAC_CONST(0.9056356027326216),
2241 FRAC_CONST(0.9159573778427816),
2242 FRAC_CONST(0.9254724739583072),
2243 FRAC_CONST(0.9342040454819434),
2244 FRAC_CONST(0.9421791879559176),
2245 FRAC_CONST(0.9494284680976784),
2246 FRAC_CONST(0.9559854271440150),
2247 FRAC_CONST(0.9618860658493898),
2248 FRAC_CONST(0.9671683198119525),
2249 FRAC_CONST(0.9718715339497299),
2250 FRAC_CONST(0.9760359449042233),
2251 FRAC_CONST(0.9797021798981759),
2252 FRAC_CONST(0.9829107801140203),
2253 FRAC_CONST(0.9857017559923277),
2254 FRAC_CONST(0.9881141809867999),
2255 FRAC_CONST(0.9901858292742826),
2256 FRAC_CONST(0.9919528617340944),
2257 FRAC_CONST(0.9934495632180476),
2258 FRAC_CONST(0.9947081327749199),
2259 FRAC_CONST(0.9957585271195989),
2260 FRAC_CONST(0.9966283562984427),
2261 FRAC_CONST(0.9973428292485683),
2262 FRAC_CONST(0.9979247458259197),
2263 FRAC_CONST(0.9983945309245774),
2264 FRAC_CONST(0.9987703055583410),
2265 FRAC_CONST(0.9990679892449266),
2266 FRAC_CONST(0.9993014277313617),
2267 FRAC_CONST(0.9994825400228521),
2268 FRAC_CONST(0.9996214788122335),
2269 FRAC_CONST(0.9997267987294857),
2270 FRAC_CONST(0.9998056273097539),
2271 FRAC_CONST(0.9998638341781910),
2272 FRAC_CONST(0.9999061946325793),
2273 FRAC_CONST(0.9999365445321382),
2274 FRAC_CONST(0.9999579241373735),
2275 FRAC_CONST(0.9999727092594598),
2276 FRAC_CONST(0.9999827287418790),
2277 FRAC_CONST(0.9999893678912771),
2278 FRAC_CONST(0.9999936579844555),
2279 FRAC_CONST(0.9999963523959187),
2280 FRAC_CONST(0.9999979902130101),
2281 FRAC_CONST(0.9999989484358076),
2282 FRAC_CONST(0.9999994840031031),
2283 FRAC_CONST(0.9999997669534347),
2284 FRAC_CONST(0.9999999060327799),
2285 FRAC_CONST(0.9999999680107184),
2286 FRAC_CONST(0.9999999918774242),
2287 FRAC_CONST(0.9999999989770326)
2288};
2289#endif
2290
2291#ifdef __cplusplus
2292}
2293#endif
2294#endif
diff --git a/apps/codecs/libfaad/lt_predict.c b/apps/codecs/libfaad/lt_predict.c
new file mode 100644
index 0000000000..ad6bc77f69
--- /dev/null
+++ b/apps/codecs/libfaad/lt_predict.c
@@ -0,0 +1,215 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28
29#include "common.h"
30#include "structs.h"
31
32#ifdef LTP_DEC
33
34#include <stdlib.h>
35#include "syntax.h"
36#include "lt_predict.h"
37#include "filtbank.h"
38#include "tns.h"
39
40
41/* static function declarations */
42static int16_t real_to_int16(real_t sig_in);
43
44
45/* check if the object type is an object type that can have LTP */
46uint8_t is_ltp_ot(uint8_t object_type)
47{
48#ifdef LTP_DEC
49 if ((object_type == LTP)
50#ifdef ERROR_RESILIENCE
51 || (object_type == ER_LTP)
52#endif
53#ifdef LD_DEC
54 || (object_type == LD)
55#endif
56#ifdef SCALABLE_DEC
57 || (object_type == 6) /* TODO */
58#endif
59 )
60 {
61 return 1;
62 }
63#endif
64
65 return 0;
66}
67
68ALIGN static const real_t codebook[8] =
69{
70 REAL_CONST(0.570829),
71 REAL_CONST(0.696616),
72 REAL_CONST(0.813004),
73 REAL_CONST(0.911304),
74 REAL_CONST(0.984900),
75 REAL_CONST(1.067894),
76 REAL_CONST(1.194601),
77 REAL_CONST(1.369533)
78};
79
80void lt_prediction(ic_stream *ics, ltp_info *ltp, real_t *spec,
81 int16_t *lt_pred_stat, fb_info *fb, uint8_t win_shape,
82 uint8_t win_shape_prev, uint8_t sr_index,
83 uint8_t object_type, uint16_t frame_len)
84{
85 uint8_t sfb;
86 uint16_t bin, i, num_samples;
87 ALIGN real_t x_est[2048];
88 ALIGN real_t X_est[2048];
89
90 if (ics->window_sequence != EIGHT_SHORT_SEQUENCE)
91 {
92 if (ltp->data_present)
93 {
94 num_samples = frame_len << 1;
95
96 for(i = 0; i < num_samples; i++)
97 {
98 /* The extra lookback M (N/2 for LD, 0 for LTP) is handled
99 in the buffer updating */
100
101#if 0
102 x_est[i] = MUL_R_C(lt_pred_stat[num_samples + i - ltp->lag],
103 codebook[ltp->coef]);
104#else
105 /* lt_pred_stat is a 16 bit int, multiplied with the fixed point real
106 this gives a real for x_est
107 */
108 x_est[i] = (real_t)lt_pred_stat[num_samples + i - ltp->lag] * codebook[ltp->coef];
109#endif
110 }
111
112 filter_bank_ltp(fb, ics->window_sequence, win_shape, win_shape_prev,
113 x_est, X_est, object_type, frame_len);
114
115 tns_encode_frame(ics, &(ics->tns), sr_index, object_type, X_est,
116 frame_len);
117
118 for (sfb = 0; sfb < ltp->last_band; sfb++)
119 {
120 if (ltp->long_used[sfb])
121 {
122 uint16_t low = ics->swb_offset[sfb];
123 uint16_t high = ics->swb_offset[sfb+1];
124
125 for (bin = low; bin < high; bin++)
126 {
127 spec[bin] += X_est[bin];
128 }
129 }
130 }
131 }
132 }
133}
134
135#ifdef FIXED_POINT
136static INLINE int16_t real_to_int16(real_t sig_in)
137{
138 if (sig_in >= 0)
139 {
140 sig_in += (1 << (REAL_BITS-1));
141 if (sig_in >= REAL_CONST(32768))
142 return 32767;
143 } else {
144 sig_in += -(1 << (REAL_BITS-1));
145 if (sig_in <= REAL_CONST(-32768))
146 return -32768;
147 }
148
149 return (sig_in >> REAL_BITS);
150}
151#else
152static INLINE int16_t real_to_int16(real_t sig_in)
153{
154 if (sig_in >= 0)
155 {
156#ifndef HAS_LRINTF
157 sig_in += 0.5f;
158#endif
159 if (sig_in >= 32768.0f)
160 return 32767;
161 } else {
162#ifndef HAS_LRINTF
163 sig_in += -0.5f;
164#endif
165 if (sig_in <= -32768.0f)
166 return -32768;
167 }
168
169 return lrintf(sig_in);
170}
171#endif
172
173void lt_update_state(int16_t *lt_pred_stat, real_t *time, real_t *overlap,
174 uint16_t frame_len, uint8_t object_type)
175{
176 uint16_t i;
177
178 /*
179 * The reference point for index i and the content of the buffer
180 * lt_pred_stat are arranged so that lt_pred_stat(0 ... N/2 - 1) contains the
181 * last aliased half window from the IMDCT, and lt_pred_stat(N/2 ... N-1)
182 * is always all zeros. The rest of lt_pred_stat (i<0) contains the previous
183 * fully reconstructed time domain samples, i.e., output of the decoder.
184 *
185 * These values are shifted up by N*2 to avoid (i<0)
186 *
187 * For the LD object type an extra 512 samples lookback is accomodated here.
188 */
189#ifdef LD_DEC
190 if (object_type == LD)
191 {
192 for (i = 0; i < frame_len; i++)
193 {
194 lt_pred_stat[i] /* extra 512 */ = lt_pred_stat[i + frame_len];
195 lt_pred_stat[frame_len + i] = lt_pred_stat[i + (frame_len * 2)];
196 lt_pred_stat[(frame_len * 2) + i] = real_to_int16(time[i]);
197 lt_pred_stat[(frame_len * 3) + i] = real_to_int16(overlap[i]);
198 }
199 } else {
200#endif
201 for (i = 0; i < frame_len; i++)
202 {
203 lt_pred_stat[i] = lt_pred_stat[i + frame_len];
204 lt_pred_stat[frame_len + i] = real_to_int16(time[i]);
205 lt_pred_stat[(frame_len * 2) + i] = real_to_int16(overlap[i]);
206#if 0 /* set to zero once upon initialisation */
207 lt_pred_stat[(frame_len * 3) + i] = 0;
208#endif
209 }
210#ifdef LD_DEC
211 }
212#endif
213}
214
215#endif
diff --git a/apps/codecs/libfaad/lt_predict.h b/apps/codecs/libfaad/lt_predict.h
new file mode 100644
index 0000000000..1c10751888
--- /dev/null
+++ b/apps/codecs/libfaad/lt_predict.h
@@ -0,0 +1,63 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifdef LTP_DEC
29
30#ifndef __LT_PREDICT_H__
31#define __LT_PREDICT_H__
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37#include "filtbank.h"
38
39uint8_t is_ltp_ot(uint8_t object_type);
40
41void lt_prediction(ic_stream *ics,
42 ltp_info *ltp,
43 real_t *spec,
44 int16_t *lt_pred_stat,
45 fb_info *fb,
46 uint8_t win_shape,
47 uint8_t win_shape_prev,
48 uint8_t sr_index,
49 uint8_t object_type,
50 uint16_t frame_len);
51
52void lt_update_state(int16_t *lt_pred_stat,
53 real_t *time,
54 real_t *overlap,
55 uint16_t frame_len,
56 uint8_t object_type);
57
58#ifdef __cplusplus
59}
60#endif
61#endif
62
63#endif
diff --git a/apps/codecs/libfaad/mdct.c b/apps/codecs/libfaad/mdct.c
new file mode 100644
index 0000000000..78712a0bc5
--- /dev/null
+++ b/apps/codecs/libfaad/mdct.c
@@ -0,0 +1,298 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28/*
29 * Fast (I)MDCT Implementation using (I)FFT ((Inverse) Fast Fourier Transform)
30 * and consists of three steps: pre-(I)FFT complex multiplication, complex
31 * (I)FFT, post-(I)FFT complex multiplication,
32 *
33 * As described in:
34 * P. Duhamel, Y. Mahieux, and J.P. Petit, "A Fast Algorithm for the
35 * Implementation of Filter Banks Based on 'Time Domain Aliasing
36 * Cancellation’," IEEE Proc. on ICASSP‘91, 1991, pp. 2209-2212.
37 *
38 *
39 * As of April 6th 2002 completely rewritten.
40 * This (I)MDCT can now be used for any data size n, where n is divisible by 8.
41 *
42 */
43
44#include "common.h"
45#include "structs.h"
46
47#include <stdlib.h>
48#ifdef _WIN32_WCE
49#define assert(x)
50#else
51#include <assert.h>
52#endif
53
54#include "cfft.h"
55#include "mdct.h"
56#include "mdct_tab.h"
57
58
59mdct_info *faad_mdct_init(uint16_t N)
60{
61 mdct_info *mdct = (mdct_info*)faad_malloc(sizeof(mdct_info));
62
63 assert(N % 8 == 0);
64
65 mdct->N = N;
66
67 /* NOTE: For "small framelengths" in FIXED_POINT the coefficients need to be
68 * scaled by sqrt("(nearest power of 2) > N" / N) */
69
70 /* RE(mdct->sincos[k]) = scale*(real_t)(cos(2.0*M_PI*(k+1./8.) / (real_t)N));
71 * IM(mdct->sincos[k]) = scale*(real_t)(sin(2.0*M_PI*(k+1./8.) / (real_t)N)); */
72 /* scale is 1 for fixed point, sqrt(N) for floating point */
73 switch (N)
74 {
75 case 2048: mdct->sincos = (complex_t*)mdct_tab_2048; break;
76 case 256: mdct->sincos = (complex_t*)mdct_tab_256; break;
77#ifdef LD_DEC
78 case 1024: mdct->sincos = (complex_t*)mdct_tab_1024; break;
79#endif
80#ifdef ALLOW_SMALL_FRAMELENGTH
81 case 1920: mdct->sincos = (complex_t*)mdct_tab_1920; break;
82 case 240: mdct->sincos = (complex_t*)mdct_tab_240; break;
83#ifdef LD_DEC
84 case 960: mdct->sincos = (complex_t*)mdct_tab_960; break;
85#endif
86#endif
87#ifdef SSR_DEC
88 case 512: mdct->sincos = (complex_t*)mdct_tab_512; break;
89 case 64: mdct->sincos = (complex_t*)mdct_tab_64; break;
90#endif
91 }
92
93 /* initialise fft */
94 mdct->cfft = cffti(N/4);
95
96#ifdef PROFILE
97 mdct->cycles = 0;
98 mdct->fft_cycles = 0;
99#endif
100
101 return mdct;
102}
103
104void faad_mdct_end(mdct_info *mdct)
105{
106 if (mdct != NULL)
107 {
108#ifdef PROFILE
109 printf("MDCT[%.4d]: %I64d cycles\n", mdct->N, mdct->cycles);
110 printf("CFFT[%.4d]: %I64d cycles\n", mdct->N/4, mdct->fft_cycles);
111#endif
112
113 cfftu(mdct->cfft);
114
115 faad_free(mdct);
116 }
117}
118
119void faad_imdct(mdct_info *mdct, real_t *X_in, real_t *X_out)
120{
121 uint16_t k;
122
123 complex_t x;
124#ifdef ALLOW_SMALL_FRAMELENGTH
125#ifdef FIXED_POINT
126 real_t scale, b_scale = 0;
127#endif
128#endif
129 ALIGN complex_t Z1[512];
130 complex_t *sincos = mdct->sincos;
131
132 uint16_t N = mdct->N;
133 uint16_t N2 = N >> 1;
134 uint16_t N4 = N >> 2;
135 uint16_t N8 = N >> 3;
136
137#ifdef PROFILE
138 int64_t count1, count2 = faad_get_ts();
139#endif
140
141#ifdef ALLOW_SMALL_FRAMELENGTH
142#ifdef FIXED_POINT
143 /* detect non-power of 2 */
144 if (N & (N-1))
145 {
146 /* adjust scale for non-power of 2 MDCT */
147 /* 2048/1920 */
148 b_scale = 1;
149 scale = COEF_CONST(1.0666666666666667);
150 }
151#endif
152#endif
153
154 /* pre-IFFT complex multiplication */
155 for (k = 0; k < N4; k++)
156 {
157 ComplexMult(&IM(Z1[k]), &RE(Z1[k]),
158 X_in[2*k], X_in[N2 - 1 - 2*k], RE(sincos[k]), IM(sincos[k]));
159 }
160
161#ifdef PROFILE
162 count1 = faad_get_ts();
163#endif
164
165 /* complex IFFT, any non-scaling FFT can be used here */
166 cfftb(mdct->cfft, Z1);
167
168#ifdef PROFILE
169 count1 = faad_get_ts() - count1;
170#endif
171
172 /* post-IFFT complex multiplication */
173 for (k = 0; k < N4; k++)
174 {
175 RE(x) = RE(Z1[k]);
176 IM(x) = IM(Z1[k]);
177 ComplexMult(&IM(Z1[k]), &RE(Z1[k]),
178 IM(x), RE(x), RE(sincos[k]), IM(sincos[k]));
179
180#ifdef ALLOW_SMALL_FRAMELENGTH
181#ifdef FIXED_POINT
182 /* non-power of 2 MDCT scaling */
183 if (b_scale)
184 {
185 RE(Z1[k]) = MUL_C(RE(Z1[k]), scale);
186 IM(Z1[k]) = MUL_C(IM(Z1[k]), scale);
187 }
188#endif
189#endif
190 }
191
192 /* reordering */
193 for (k = 0; k < N8; k+=2)
194 {
195 X_out[ 2*k] = IM(Z1[N8 + k]);
196 X_out[ 2 + 2*k] = IM(Z1[N8 + 1 + k]);
197
198 X_out[ 1 + 2*k] = -RE(Z1[N8 - 1 - k]);
199 X_out[ 3 + 2*k] = -RE(Z1[N8 - 2 - k]);
200
201 X_out[N4 + 2*k] = RE(Z1[ k]);
202 X_out[N4 + + 2 + 2*k] = RE(Z1[ 1 + k]);
203
204 X_out[N4 + 1 + 2*k] = -IM(Z1[N4 - 1 - k]);
205 X_out[N4 + 3 + 2*k] = -IM(Z1[N4 - 2 - k]);
206
207 X_out[N2 + 2*k] = RE(Z1[N8 + k]);
208 X_out[N2 + + 2 + 2*k] = RE(Z1[N8 + 1 + k]);
209
210 X_out[N2 + 1 + 2*k] = -IM(Z1[N8 - 1 - k]);
211 X_out[N2 + 3 + 2*k] = -IM(Z1[N8 - 2 - k]);
212
213 X_out[N2 + N4 + 2*k] = -IM(Z1[ k]);
214 X_out[N2 + N4 + 2 + 2*k] = -IM(Z1[ 1 + k]);
215
216 X_out[N2 + N4 + 1 + 2*k] = RE(Z1[N4 - 1 - k]);
217 X_out[N2 + N4 + 3 + 2*k] = RE(Z1[N4 - 2 - k]);
218 }
219
220#ifdef PROFILE
221 count2 = faad_get_ts() - count2;
222 mdct->fft_cycles += count1;
223 mdct->cycles += (count2 - count1);
224#endif
225}
226
227#ifdef LTP_DEC
228void faad_mdct(mdct_info *mdct, real_t *X_in, real_t *X_out)
229{
230 uint16_t k;
231
232 complex_t x;
233 ALIGN complex_t Z1[512];
234 complex_t *sincos = mdct->sincos;
235
236 uint16_t N = mdct->N;
237 uint16_t N2 = N >> 1;
238 uint16_t N4 = N >> 2;
239 uint16_t N8 = N >> 3;
240
241#ifndef FIXED_POINT
242 real_t scale = REAL_CONST(N);
243#else
244 real_t scale = REAL_CONST(4.0/N);
245#endif
246
247#ifdef ALLOW_SMALL_FRAMELENGTH
248#ifdef FIXED_POINT
249 /* detect non-power of 2 */
250 if (N & (N-1))
251 {
252 /* adjust scale for non-power of 2 MDCT */
253 /* *= sqrt(2048/1920) */
254 scale = MUL_C(scale, COEF_CONST(1.0327955589886444));
255 }
256#endif
257#endif
258
259 /* pre-FFT complex multiplication */
260 for (k = 0; k < N8; k++)
261 {
262 uint16_t n = k << 1;
263 RE(x) = X_in[N - N4 - 1 - n] + X_in[N - N4 + n];
264 IM(x) = X_in[ N4 + n] - X_in[ N4 - 1 - n];
265
266 ComplexMult(&RE(Z1[k]), &IM(Z1[k]),
267 RE(x), IM(x), RE(sincos[k]), IM(sincos[k]));
268
269 RE(Z1[k]) = MUL_R(RE(Z1[k]), scale);
270 IM(Z1[k]) = MUL_R(IM(Z1[k]), scale);
271
272 RE(x) = X_in[N2 - 1 - n] - X_in[ n];
273 IM(x) = X_in[N2 + n] + X_in[N - 1 - n];
274
275 ComplexMult(&RE(Z1[k + N8]), &IM(Z1[k + N8]),
276 RE(x), IM(x), RE(sincos[k + N8]), IM(sincos[k + N8]));
277
278 RE(Z1[k + N8]) = MUL_R(RE(Z1[k + N8]), scale);
279 IM(Z1[k + N8]) = MUL_R(IM(Z1[k + N8]), scale);
280 }
281
282 /* complex FFT, any non-scaling FFT can be used here */
283 cfftf(mdct->cfft, Z1);
284
285 /* post-FFT complex multiplication */
286 for (k = 0; k < N4; k++)
287 {
288 uint16_t n = k << 1;
289 ComplexMult(&RE(x), &IM(x),
290 RE(Z1[k]), IM(Z1[k]), RE(sincos[k]), IM(sincos[k]));
291
292 X_out[ n] = -RE(x);
293 X_out[N2 - 1 - n] = IM(x);
294 X_out[N2 + n] = -IM(x);
295 X_out[N - 1 - n] = RE(x);
296 }
297}
298#endif
diff --git a/apps/codecs/libfaad/mdct.h b/apps/codecs/libfaad/mdct.h
new file mode 100644
index 0000000000..308be816f9
--- /dev/null
+++ b/apps/codecs/libfaad/mdct.h
@@ -0,0 +1,45 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __MDCT_H__
29#define __MDCT_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35
36mdct_info *faad_mdct_init(uint16_t N);
37void faad_mdct_end(mdct_info *mdct);
38void faad_imdct(mdct_info *mdct, real_t *X_in, real_t *X_out);
39void faad_mdct(mdct_info *mdct, real_t *X_in, real_t *X_out);
40
41
42#ifdef __cplusplus
43}
44#endif
45#endif
diff --git a/apps/codecs/libfaad/mdct_tab.h b/apps/codecs/libfaad/mdct_tab.h
new file mode 100644
index 0000000000..ce48535f63
--- /dev/null
+++ b/apps/codecs/libfaad/mdct_tab.h
@@ -0,0 +1,3652 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __MDCT_TAB_H__
29#define __MDCT_TAB_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#ifdef FIXED_POINT
36
37/* 256 (N/4) complex twiddle factors */
38ALIGN static const complex_t mdct_tab_2048[] =
39{
40 { FRAC_CONST(0.999999926465718), FRAC_CONST(0.000383495187571) },
41 { FRAC_CONST(0.999994043728986), FRAC_CONST(0.003451449920136) },
42 { FRAC_CONST(0.999978748667469), FRAC_CONST(0.006519372166339) },
43 { FRAC_CONST(0.999954041425130), FRAC_CONST(0.009587233049729) },
44 { FRAC_CONST(0.999919922234523), FRAC_CONST(0.012655003694430) },
45 { FRAC_CONST(0.999876391416790), FRAC_CONST(0.015722655225417) },
46 { FRAC_CONST(0.999823449381662), FRAC_CONST(0.018790158768785) },
47 { FRAC_CONST(0.999761096627447), FRAC_CONST(0.021857485452022) },
48 { FRAC_CONST(0.999689333741034), FRAC_CONST(0.024924606404281) },
49 { FRAC_CONST(0.999608161397882), FRAC_CONST(0.027991492756653) },
50 { FRAC_CONST(0.999517580362017), FRAC_CONST(0.031058115642435) },
51 { FRAC_CONST(0.999417591486022), FRAC_CONST(0.034124446197403) },
52 { FRAC_CONST(0.999308195711029), FRAC_CONST(0.037190455560088) },
53 { FRAC_CONST(0.999189394066715), FRAC_CONST(0.040256114872041) },
54 { FRAC_CONST(0.999061187671285), FRAC_CONST(0.043321395278110) },
55 { FRAC_CONST(0.998923577731466), FRAC_CONST(0.046386267926707) },
56 { FRAC_CONST(0.998776565542496), FRAC_CONST(0.049450703970085) },
57 { FRAC_CONST(0.998620152488109), FRAC_CONST(0.052514674564603) },
58 { FRAC_CONST(0.998454340040525), FRAC_CONST(0.055578150871005) },
59 { FRAC_CONST(0.998279129760433), FRAC_CONST(0.058641104054683) },
60 { FRAC_CONST(0.998094523296980), FRAC_CONST(0.061703505285957) },
61 { FRAC_CONST(0.997900522387752), FRAC_CONST(0.064765325740340) },
62 { FRAC_CONST(0.997697128858759), FRAC_CONST(0.067826536598811) },
63 { FRAC_CONST(0.997484344624418), FRAC_CONST(0.070887109048088) },
64 { FRAC_CONST(0.997262171687536), FRAC_CONST(0.073947014280897) },
65 { FRAC_CONST(0.997030612139289), FRAC_CONST(0.077006223496246) },
66 { FRAC_CONST(0.996789668159205), FRAC_CONST(0.080064707899691) },
67 { FRAC_CONST(0.996539342015138), FRAC_CONST(0.083122438703613) },
68 { FRAC_CONST(0.996279636063255), FRAC_CONST(0.086179387127485) },
69 { FRAC_CONST(0.996010552748006), FRAC_CONST(0.089235524398144) },
70 { FRAC_CONST(0.995732094602106), FRAC_CONST(0.092290821750062) },
71 { FRAC_CONST(0.995444264246510), FRAC_CONST(0.095345250425618) },
72 { FRAC_CONST(0.995147064390386), FRAC_CONST(0.098398781675364) },
73 { FRAC_CONST(0.994840497831093), FRAC_CONST(0.101451386758302) },
74 { FRAC_CONST(0.994524567454152), FRAC_CONST(0.104503036942151) },
75 { FRAC_CONST(0.994199276233219), FRAC_CONST(0.107553703503616) },
76 { FRAC_CONST(0.993864627230060), FRAC_CONST(0.110603357728662) },
77 { FRAC_CONST(0.993520623594518), FRAC_CONST(0.113651970912782) },
78 { FRAC_CONST(0.993167268564487), FRAC_CONST(0.116699514361268) },
79 { FRAC_CONST(0.992804565465879), FRAC_CONST(0.119745959389480) },
80 { FRAC_CONST(0.992432517712594), FRAC_CONST(0.122791277323117) },
81 { FRAC_CONST(0.992051128806486), FRAC_CONST(0.125835439498487) },
82 { FRAC_CONST(0.991660402337333), FRAC_CONST(0.128878417262777) },
83 { FRAC_CONST(0.991260341982802), FRAC_CONST(0.131920181974320) },
84 { FRAC_CONST(0.990850951508414), FRAC_CONST(0.134960705002869) },
85 { FRAC_CONST(0.990432234767506), FRAC_CONST(0.137999957729863) },
86 { FRAC_CONST(0.990004195701201), FRAC_CONST(0.141037911548698) },
87 { FRAC_CONST(0.989566838338365), FRAC_CONST(0.144074537864995) },
88 { FRAC_CONST(0.989120166795573), FRAC_CONST(0.147109808096872) },
89 { FRAC_CONST(0.988664185277066), FRAC_CONST(0.150143693675208) },
90 { FRAC_CONST(0.988198898074718), FRAC_CONST(0.153176166043918) },
91 { FRAC_CONST(0.987724309567987), FRAC_CONST(0.156207196660216) },
92 { FRAC_CONST(0.987240424223882), FRAC_CONST(0.159236756994888) },
93 { FRAC_CONST(0.986747246596917), FRAC_CONST(0.162264818532558) },
94 { FRAC_CONST(0.986244781329065), FRAC_CONST(0.165291352771958) },
95 { FRAC_CONST(0.985733033149723), FRAC_CONST(0.168316331226195) },
96 { FRAC_CONST(0.985212006875659), FRAC_CONST(0.171339725423019) },
97 { FRAC_CONST(0.984681707410971), FRAC_CONST(0.174361506905094) },
98 { FRAC_CONST(0.984142139747039), FRAC_CONST(0.177381647230260) },
99 { FRAC_CONST(0.983593308962479), FRAC_CONST(0.180400117971807) },
100 { FRAC_CONST(0.983035220223096), FRAC_CONST(0.183416890718739) },
101 { FRAC_CONST(0.982467878781833), FRAC_CONST(0.186431937076042) },
102 { FRAC_CONST(0.981891289978725), FRAC_CONST(0.189445228664950) },
103 { FRAC_CONST(0.981305459240845), FRAC_CONST(0.192456737123217) },
104 { FRAC_CONST(0.980710392082254), FRAC_CONST(0.195466434105377) },
105 { FRAC_CONST(0.980106094103952), FRAC_CONST(0.198474291283016) },
106 { FRAC_CONST(0.979492570993821), FRAC_CONST(0.201480280345038) },
107 { FRAC_CONST(0.978869828526574), FRAC_CONST(0.204484372997927) },
108 { FRAC_CONST(0.978237872563701), FRAC_CONST(0.207486540966021) },
109 { FRAC_CONST(0.977596709053412), FRAC_CONST(0.210486755991770) },
110 { FRAC_CONST(0.976946344030582), FRAC_CONST(0.213484989836008) },
111 { FRAC_CONST(0.976286783616694), FRAC_CONST(0.216481214278217) },
112 { FRAC_CONST(0.975618034019782), FRAC_CONST(0.219475401116790) },
113 { FRAC_CONST(0.974940101534372), FRAC_CONST(0.222467522169302) },
114 { FRAC_CONST(0.974252992541423), FRAC_CONST(0.225457549272769) },
115 { FRAC_CONST(0.973556713508266), FRAC_CONST(0.228445454283916) },
116 { FRAC_CONST(0.972851270988544), FRAC_CONST(0.231431209079446) },
117 { FRAC_CONST(0.972136671622152), FRAC_CONST(0.234414785556295) },
118 { FRAC_CONST(0.971412922135171), FRAC_CONST(0.237396155631907) },
119 { FRAC_CONST(0.970680029339806), FRAC_CONST(0.240375291244489) },
120 { FRAC_CONST(0.969938000134324), FRAC_CONST(0.243352164353285) },
121 { FRAC_CONST(0.969186841502986), FRAC_CONST(0.246326746938829) },
122 { FRAC_CONST(0.968426560515983), FRAC_CONST(0.249299011003218) },
123 { FRAC_CONST(0.967657164329370), FRAC_CONST(0.252268928570371) },
124 { FRAC_CONST(0.966878660184996), FRAC_CONST(0.255236471686292) },
125 { FRAC_CONST(0.966091055410439), FRAC_CONST(0.258201612419335) },
126 { FRAC_CONST(0.965294357418935), FRAC_CONST(0.261164322860466) },
127 { FRAC_CONST(0.964488573709308), FRAC_CONST(0.264124575123528) },
128 { FRAC_CONST(0.963673711865903), FRAC_CONST(0.267082341345496) },
129 { FRAC_CONST(0.962849779558509), FRAC_CONST(0.270037593686751) },
130 { FRAC_CONST(0.962016784542291), FRAC_CONST(0.272990304331330) },
131 { FRAC_CONST(0.961174734657714), FRAC_CONST(0.275940445487197) },
132 { FRAC_CONST(0.960323637830474), FRAC_CONST(0.278887989386500) },
133 { FRAC_CONST(0.959463502071418), FRAC_CONST(0.281832908285833) },
134 { FRAC_CONST(0.958594335476470), FRAC_CONST(0.284775174466498) },
135 { FRAC_CONST(0.957716146226559), FRAC_CONST(0.287714760234765) },
136 { FRAC_CONST(0.956828942587535), FRAC_CONST(0.290651637922133) },
137 { FRAC_CONST(0.955932732910098), FRAC_CONST(0.293585779885591) },
138 { FRAC_CONST(0.955027525629714), FRAC_CONST(0.296517158507877) },
139 { FRAC_CONST(0.954113329266539), FRAC_CONST(0.299445746197740) },
140 { FRAC_CONST(0.953190152425337), FRAC_CONST(0.302371515390196) },
141 { FRAC_CONST(0.952258003795400), FRAC_CONST(0.305294438546792) },
142 { FRAC_CONST(0.951316892150466), FRAC_CONST(0.308214488155861) },
143 { FRAC_CONST(0.950366826348636), FRAC_CONST(0.311131636732785) },
144 { FRAC_CONST(0.949407815332292), FRAC_CONST(0.314045856820251) },
145 { FRAC_CONST(0.948439868128010), FRAC_CONST(0.316957120988508) },
146 { FRAC_CONST(0.947462993846478), FRAC_CONST(0.319865401835631) },
147 { FRAC_CONST(0.946477201682409), FRAC_CONST(0.322770671987771) },
148 { FRAC_CONST(0.945482500914454), FRAC_CONST(0.325672904099420) },
149 { FRAC_CONST(0.944478900905116), FRAC_CONST(0.328572070853664) },
150 { FRAC_CONST(0.943466411100659), FRAC_CONST(0.331468144962441) },
151 { FRAC_CONST(0.942445041031025), FRAC_CONST(0.334361099166799) },
152 { FRAC_CONST(0.941414800309736), FRAC_CONST(0.337250906237151) },
153 { FRAC_CONST(0.940375698633812), FRAC_CONST(0.340137538973532) },
154 { FRAC_CONST(0.939327745783671), FRAC_CONST(0.343020970205856) },
155 { FRAC_CONST(0.938270951623047), FRAC_CONST(0.345901172794169) },
156 { FRAC_CONST(0.937205326098888), FRAC_CONST(0.348778119628908) },
157 { FRAC_CONST(0.936130879241267), FRAC_CONST(0.351651783631155) },
158 { FRAC_CONST(0.935047621163287), FRAC_CONST(0.354522137752887) },
159 { FRAC_CONST(0.933955562060987), FRAC_CONST(0.357389154977241) },
160 { FRAC_CONST(0.932854712213241), FRAC_CONST(0.360252808318757) },
161 { FRAC_CONST(0.931745081981669), FRAC_CONST(0.363113070823639) },
162 { FRAC_CONST(0.930626681810532), FRAC_CONST(0.365969915570009) },
163 { FRAC_CONST(0.929499522226639), FRAC_CONST(0.368823315668154) },
164 { FRAC_CONST(0.928363613839244), FRAC_CONST(0.371673244260787) },
165 { FRAC_CONST(0.927218967339952), FRAC_CONST(0.374519674523293) },
166 { FRAC_CONST(0.926065593502609), FRAC_CONST(0.377362579663988) },
167 { FRAC_CONST(0.924903503183211), FRAC_CONST(0.380201932924366) },
168 { FRAC_CONST(0.923732707319793), FRAC_CONST(0.383037707579352) },
169 { FRAC_CONST(0.922553216932333), FRAC_CONST(0.385869876937555) },
170 { FRAC_CONST(0.921365043122642), FRAC_CONST(0.388698414341519) },
171 { FRAC_CONST(0.920168197074266), FRAC_CONST(0.391523293167972) },
172 { FRAC_CONST(0.918962690052376), FRAC_CONST(0.394344486828080) },
173 { FRAC_CONST(0.917748533403661), FRAC_CONST(0.397161968767692) },
174 { FRAC_CONST(0.916525738556228), FRAC_CONST(0.399975712467595) },
175 { FRAC_CONST(0.915294317019487), FRAC_CONST(0.402785691443764) },
176 { FRAC_CONST(0.914054280384047), FRAC_CONST(0.405591879247604) },
177 { FRAC_CONST(0.912805640321604), FRAC_CONST(0.408394249466208) },
178 { FRAC_CONST(0.911548408584834), FRAC_CONST(0.411192775722600) },
179 { FRAC_CONST(0.910282597007282), FRAC_CONST(0.413987431675985) },
180 { FRAC_CONST(0.909008217503247), FRAC_CONST(0.416778191021998) },
181 { FRAC_CONST(0.907725282067676), FRAC_CONST(0.419565027492947) },
182 { FRAC_CONST(0.906433802776045), FRAC_CONST(0.422347914858067) },
183 { FRAC_CONST(0.905133791784250), FRAC_CONST(0.425126826923762) },
184 { FRAC_CONST(0.903825261328488), FRAC_CONST(0.427901737533854) },
185 { FRAC_CONST(0.902508223725146), FRAC_CONST(0.430672620569827) },
186 { FRAC_CONST(0.901182691370685), FRAC_CONST(0.433439449951074) },
187 { FRAC_CONST(0.899848676741519), FRAC_CONST(0.436202199635144) },
188 { FRAC_CONST(0.898506192393902), FRAC_CONST(0.438960843617984) },
189 { FRAC_CONST(0.897155250963809), FRAC_CONST(0.441715355934187) },
190 { FRAC_CONST(0.895795865166814), FRAC_CONST(0.444465710657234) },
191 { FRAC_CONST(0.894428047797974), FRAC_CONST(0.447211881899738) },
192 { FRAC_CONST(0.893051811731707), FRAC_CONST(0.449953843813691) },
193 { FRAC_CONST(0.891667169921672), FRAC_CONST(0.452691570590701) },
194 { FRAC_CONST(0.890274135400645), FRAC_CONST(0.455425036462242) },
195 { FRAC_CONST(0.888872721280396), FRAC_CONST(0.458154215699893) },
196 { FRAC_CONST(0.887462940751569), FRAC_CONST(0.460879082615579) },
197 { FRAC_CONST(0.886044807083556), FRAC_CONST(0.463599611561814) },
198 { FRAC_CONST(0.884618333624370), FRAC_CONST(0.466315776931944) },
199 { FRAC_CONST(0.883183533800523), FRAC_CONST(0.469027553160387) },
200 { FRAC_CONST(0.881740421116898), FRAC_CONST(0.471734914722871) },
201 { FRAC_CONST(0.880289009156621), FRAC_CONST(0.474437836136679) },
202 { FRAC_CONST(0.878829311580933), FRAC_CONST(0.477136291960885) },
203 { FRAC_CONST(0.877361342129065), FRAC_CONST(0.479830256796594) },
204 { FRAC_CONST(0.875885114618104), FRAC_CONST(0.482519705287184) },
205 { FRAC_CONST(0.874400642942865), FRAC_CONST(0.485204612118542) },
206 { FRAC_CONST(0.872907941075761), FRAC_CONST(0.487884952019301) },
207 { FRAC_CONST(0.871407023066671), FRAC_CONST(0.490560699761082) },
208 { FRAC_CONST(0.869897903042806), FRAC_CONST(0.493231830158728) },
209 { FRAC_CONST(0.868380595208580), FRAC_CONST(0.495898318070542) },
210 { FRAC_CONST(0.866855113845470), FRAC_CONST(0.498560138398525) },
211 { FRAC_CONST(0.865321473311890), FRAC_CONST(0.501217266088610) },
212 { FRAC_CONST(0.863779688043047), FRAC_CONST(0.503869676130899) },
213 { FRAC_CONST(0.862229772550811), FRAC_CONST(0.506517343559899) },
214 { FRAC_CONST(0.860671741423578), FRAC_CONST(0.509160243454755) },
215 { FRAC_CONST(0.859105609326130), FRAC_CONST(0.511798350939487) },
216 { FRAC_CONST(0.857531390999499), FRAC_CONST(0.514431641183223) },
217 { FRAC_CONST(0.855949101260827), FRAC_CONST(0.517060089400432) },
218 { FRAC_CONST(0.854358755003227), FRAC_CONST(0.519683670851158) },
219 { FRAC_CONST(0.852760367195645), FRAC_CONST(0.522302360841255) },
220 { FRAC_CONST(0.851153952882715), FRAC_CONST(0.524916134722613) },
221 { FRAC_CONST(0.849539527184621), FRAC_CONST(0.527524967893398) },
222 { FRAC_CONST(0.847917105296951), FRAC_CONST(0.530128835798279) },
223 { FRAC_CONST(0.846286702490560), FRAC_CONST(0.532727713928659) },
224 { FRAC_CONST(0.844648334111418), FRAC_CONST(0.535321577822907) },
225 { FRAC_CONST(0.843002015580473), FRAC_CONST(0.537910403066589) },
226 { FRAC_CONST(0.841347762393502), FRAC_CONST(0.540494165292695) },
227 { FRAC_CONST(0.839685590120966), FRAC_CONST(0.543072840181872) },
228 { FRAC_CONST(0.838015514407864), FRAC_CONST(0.545646403462649) },
229 { FRAC_CONST(0.836337550973584), FRAC_CONST(0.548214830911668) },
230 { FRAC_CONST(0.834651715611756), FRAC_CONST(0.550778098353912) },
231 { FRAC_CONST(0.832958024190107), FRAC_CONST(0.553336181662932) },
232 { FRAC_CONST(0.831256492650303), FRAC_CONST(0.555889056761074) },
233 { FRAC_CONST(0.829547137007809), FRAC_CONST(0.558436699619704) },
234 { FRAC_CONST(0.827829973351730), FRAC_CONST(0.560979086259438) },
235 { FRAC_CONST(0.826105017844665), FRAC_CONST(0.563516192750365) },
236 { FRAC_CONST(0.824372286722551), FRAC_CONST(0.566047995212271) },
237 { FRAC_CONST(0.822631796294515), FRAC_CONST(0.568574469814869) },
238 { FRAC_CONST(0.820883562942715), FRAC_CONST(0.571095592778017) },
239 { FRAC_CONST(0.819127603122188), FRAC_CONST(0.573611340371945) },
240 { FRAC_CONST(0.817363933360698), FRAC_CONST(0.576121688917478) },
241 { FRAC_CONST(0.815592570258577), FRAC_CONST(0.578626614786261) },
242 { FRAC_CONST(0.813813530488567), FRAC_CONST(0.581126094400978) },
243 { FRAC_CONST(0.812026830795670), FRAC_CONST(0.583620104235573) },
244 { FRAC_CONST(0.810232487996982), FRAC_CONST(0.586108620815476) },
245 { FRAC_CONST(0.808430518981543), FRAC_CONST(0.588591620717823) },
246 { FRAC_CONST(0.806620940710170), FRAC_CONST(0.591069080571671) },
247 { FRAC_CONST(0.804803770215303), FRAC_CONST(0.593540977058226) },
248 { FRAC_CONST(0.802979024600843), FRAC_CONST(0.596007286911057) },
249 { FRAC_CONST(0.801146721041991), FRAC_CONST(0.598467986916314) },
250 { FRAC_CONST(0.799306876785086), FRAC_CONST(0.600923053912954) },
251 { FRAC_CONST(0.797459509147442), FRAC_CONST(0.603372464792950) },
252 { FRAC_CONST(0.795604635517188), FRAC_CONST(0.605816196501515) },
253 { FRAC_CONST(0.793742273353100), FRAC_CONST(0.608254226037314) },
254 { FRAC_CONST(0.791872440184440), FRAC_CONST(0.610686530452686) },
255 { FRAC_CONST(0.789995153610791), FRAC_CONST(0.613113086853855) },
256 { FRAC_CONST(0.788110431301888), FRAC_CONST(0.615533872401147) },
257 { FRAC_CONST(0.786218290997456), FRAC_CONST(0.617948864309208) },
258 { FRAC_CONST(0.784318750507039), FRAC_CONST(0.620358039847214) },
259 { FRAC_CONST(0.782411827709837), FRAC_CONST(0.622761376339086) },
260 { FRAC_CONST(0.780497540554532), FRAC_CONST(0.625158851163708) },
261 { FRAC_CONST(0.778575907059125), FRAC_CONST(0.627550441755132) },
262 { FRAC_CONST(0.776646945310762), FRAC_CONST(0.629936125602796) },
263 { FRAC_CONST(0.774710673465566), FRAC_CONST(0.632315880251738) },
264 { FRAC_CONST(0.772767109748464), FRAC_CONST(0.634689683302798) },
265 { FRAC_CONST(0.770816272453019), FRAC_CONST(0.637057512412839) },
266 { FRAC_CONST(0.768858179941253), FRAC_CONST(0.639419345294951) },
267 { FRAC_CONST(0.766892850643481), FRAC_CONST(0.641775159718664) },
268 { FRAC_CONST(0.764920303058128), FRAC_CONST(0.644124933510155) },
269 { FRAC_CONST(0.762940555751566), FRAC_CONST(0.646468644552458) },
270 { FRAC_CONST(0.760953627357928), FRAC_CONST(0.648806270785673) },
271 { FRAC_CONST(0.758959536578942), FRAC_CONST(0.651137790207170) },
272 { FRAC_CONST(0.756958302183750), FRAC_CONST(0.653463180871802) },
273 { FRAC_CONST(0.754949943008733), FRAC_CONST(0.655782420892106) },
274 { FRAC_CONST(0.752934477957330), FRAC_CONST(0.658095488438511) },
275 { FRAC_CONST(0.750911925999868), FRAC_CONST(0.660402361739545) },
276 { FRAC_CONST(0.748882306173375), FRAC_CONST(0.662703019082037) },
277 { FRAC_CONST(0.746845637581407), FRAC_CONST(0.664997438811325) },
278 { FRAC_CONST(0.744801939393863), FRAC_CONST(0.667285599331456) },
279 { FRAC_CONST(0.742751230846809), FRAC_CONST(0.669567479105392) },
280 { FRAC_CONST(0.740693531242296), FRAC_CONST(0.671843056655212) },
281 { FRAC_CONST(0.738628859948175), FRAC_CONST(0.674112310562312) },
282 { FRAC_CONST(0.736557236397919), FRAC_CONST(0.676375219467612) },
283 { FRAC_CONST(0.734478680090438), FRAC_CONST(0.678631762071749) },
284 { FRAC_CONST(0.732393210589896), FRAC_CONST(0.680881917135287) },
285 { FRAC_CONST(0.730300847525525), FRAC_CONST(0.683125663478909) },
286 { FRAC_CONST(0.728201610591445), FRAC_CONST(0.685362979983619) },
287 { FRAC_CONST(0.726095519546471), FRAC_CONST(0.687593845590942) },
288 { FRAC_CONST(0.723982594213936), FRAC_CONST(0.689818239303122) },
289 { FRAC_CONST(0.721862854481496), FRAC_CONST(0.692036140183319) },
290 { FRAC_CONST(0.719736320300951), FRAC_CONST(0.694247527355803) },
291 { FRAC_CONST(0.717603011688049), FRAC_CONST(0.696452380006158) },
292 { FRAC_CONST(0.715462948722304), FRAC_CONST(0.698650677381469) },
293 { FRAC_CONST(0.713316151546803), FRAC_CONST(0.700842398790526) },
294 { FRAC_CONST(0.711162640368018), FRAC_CONST(0.703027523604011) },
295 { FRAC_CONST(0.709002435455618), FRAC_CONST(0.705206031254698) },
296 { FRAC_CONST(0.706835557142274), FRAC_CONST(0.707377901237642) },
297 { FRAC_CONST(0.704662025823469), FRAC_CONST(0.709543113110377) },
298 { FRAC_CONST(0.702481861957308), FRAC_CONST(0.711701646493103) },
299 { FRAC_CONST(0.700295086064324), FRAC_CONST(0.713853481068882) },
300 { FRAC_CONST(0.698101718727284), FRAC_CONST(0.715998596583829) },
301 { FRAC_CONST(0.695901780590997), FRAC_CONST(0.718136972847297) },
302 { FRAC_CONST(0.693695292362118), FRAC_CONST(0.720268589732077) },
303 { FRAC_CONST(0.691482274808956), FRAC_CONST(0.722393427174578) },
304 { FRAC_CONST(0.689262748761273), FRAC_CONST(0.724511465175020) },
305 { FRAC_CONST(0.687036735110096), FRAC_CONST(0.726622683797623) },
306 { FRAC_CONST(0.684804254807511), FRAC_CONST(0.728727063170794) },
307 { FRAC_CONST(0.682565328866473), FRAC_CONST(0.730824583487312) },
308 { FRAC_CONST(0.680319978360607), FRAC_CONST(0.732915225004518) },
309 { FRAC_CONST(0.678068224424007), FRAC_CONST(0.734998968044497) },
310 { FRAC_CONST(0.675810088251037), FRAC_CONST(0.737075792994266) },
311 { FRAC_CONST(0.673545591096136), FRAC_CONST(0.739145680305957) },
312 { FRAC_CONST(0.671274754273613), FRAC_CONST(0.741208610497004) },
313 { FRAC_CONST(0.668997599157450), FRAC_CONST(0.743264564150321) },
314 { FRAC_CONST(0.666714147181098), FRAC_CONST(0.745313521914490) },
315 { FRAC_CONST(0.664424419837275), FRAC_CONST(0.747355464503940) },
316 { FRAC_CONST(0.662128438677769), FRAC_CONST(0.749390372699130) },
317 { FRAC_CONST(0.659826225313227), FRAC_CONST(0.751418227346727) },
318 { FRAC_CONST(0.657517801412960), FRAC_CONST(0.753439009359794) },
319 { FRAC_CONST(0.655203188704732), FRAC_CONST(0.755452699717958) },
320 { FRAC_CONST(0.652882408974559), FRAC_CONST(0.757459279467601) },
321 { FRAC_CONST(0.650555484066504), FRAC_CONST(0.759458729722028) },
322 { FRAC_CONST(0.648222435882470), FRAC_CONST(0.761451031661654) },
323 { FRAC_CONST(0.645883286381996), FRAC_CONST(0.763436166534172) },
324 { FRAC_CONST(0.643538057582048), FRAC_CONST(0.765414115654738) },
325 { FRAC_CONST(0.641186771556811), FRAC_CONST(0.767384860406142) },
326 { FRAC_CONST(0.638829450437486), FRAC_CONST(0.769348382238982) },
327 { FRAC_CONST(0.636466116412077), FRAC_CONST(0.771304662671845) },
328 { FRAC_CONST(0.634096791725184), FRAC_CONST(0.773253683291473) },
329 { FRAC_CONST(0.631721498677792), FRAC_CONST(0.775195425752941) },
330 { FRAC_CONST(0.629340259627066), FRAC_CONST(0.777129871779832) },
331 { FRAC_CONST(0.626953096986133), FRAC_CONST(0.779057003164401) },
332 { FRAC_CONST(0.624560033223877), FRAC_CONST(0.780976801767754) },
333 { FRAC_CONST(0.622161090864727), FRAC_CONST(0.782889249520015) },
334 { FRAC_CONST(0.619756292488441), FRAC_CONST(0.784794328420499) },
335 { FRAC_CONST(0.617345660729897), FRAC_CONST(0.786692020537877) },
336 { FRAC_CONST(0.614929218278880), FRAC_CONST(0.788582308010347) },
337 { FRAC_CONST(0.612506987879866), FRAC_CONST(0.790465173045805) },
338 { FRAC_CONST(0.610078992331810), FRAC_CONST(0.792340597922007) },
339 { FRAC_CONST(0.607645254487931), FRAC_CONST(0.794208564986741) },
340 { FRAC_CONST(0.605205797255497), FRAC_CONST(0.796069056657988) },
341 { FRAC_CONST(0.602760643595607), FRAC_CONST(0.797922055424093) },
342 { FRAC_CONST(0.600309816522980), FRAC_CONST(0.799767543843926) },
343 { FRAC_CONST(0.597853339105734), FRAC_CONST(0.801605504547046) },
344 { FRAC_CONST(0.595391234465169), FRAC_CONST(0.803435920233868) },
345 { FRAC_CONST(0.592923525775551), FRAC_CONST(0.805258773675822) },
346 { FRAC_CONST(0.590450236263896), FRAC_CONST(0.807074047715518) },
347 { FRAC_CONST(0.587971389209745), FRAC_CONST(0.808881725266904) },
348 { FRAC_CONST(0.585487007944951), FRAC_CONST(0.810681789315431) },
349 { FRAC_CONST(0.582997115853458), FRAC_CONST(0.812474222918210) },
350 { FRAC_CONST(0.580501736371077), FRAC_CONST(0.814259009204175) },
351 { FRAC_CONST(0.578000892985270), FRAC_CONST(0.816036131374237) },
352 { FRAC_CONST(0.575494609234928), FRAC_CONST(0.817805572701444) },
353 { FRAC_CONST(0.572982908710149), FRAC_CONST(0.819567316531142) },
354 { FRAC_CONST(0.570465815052013), FRAC_CONST(0.821321346281127) },
355 { FRAC_CONST(0.567943351952366), FRAC_CONST(0.823067645441802) },
356 { FRAC_CONST(0.565415543153590), FRAC_CONST(0.824806197576334) },
357 { FRAC_CONST(0.562882412448385), FRAC_CONST(0.826536986320810) },
358 { FRAC_CONST(0.560343983679541), FRAC_CONST(0.828259995384386) },
359 { FRAC_CONST(0.557800280739717), FRAC_CONST(0.829975208549444) },
360 { FRAC_CONST(0.555251327571214), FRAC_CONST(0.831682609671745) },
361 { FRAC_CONST(0.552697148165750), FRAC_CONST(0.833382182680580) },
362 { FRAC_CONST(0.550137766564234), FRAC_CONST(0.835073911578919) },
363 { FRAC_CONST(0.547573206856540), FRAC_CONST(0.836757780443567) },
364 { FRAC_CONST(0.545003493181281), FRAC_CONST(0.838433773425308) },
365 { FRAC_CONST(0.542428649725581), FRAC_CONST(0.840101874749058) },
366 { FRAC_CONST(0.539848700724848), FRAC_CONST(0.841762068714012) },
367 { FRAC_CONST(0.537263670462543), FRAC_CONST(0.843414339693793) },
368 { FRAC_CONST(0.534673583269956), FRAC_CONST(0.845058672136595) },
369 { FRAC_CONST(0.532078463525974), FRAC_CONST(0.846695050565337) },
370 { FRAC_CONST(0.529478335656852), FRAC_CONST(0.848323459577802) },
371 { FRAC_CONST(0.526873224135985), FRAC_CONST(0.849943883846782) },
372 { FRAC_CONST(0.524263153483673), FRAC_CONST(0.851556308120229) },
373 { FRAC_CONST(0.521648148266897), FRAC_CONST(0.853160717221390) },
374 { FRAC_CONST(0.519028233099081), FRAC_CONST(0.854757096048957) },
375 { FRAC_CONST(0.516403432639864), FRAC_CONST(0.856345429577204) },
376 { FRAC_CONST(0.513773771594868), FRAC_CONST(0.857925702856130) },
377 { FRAC_CONST(0.511139274715464), FRAC_CONST(0.859497901011602) },
378 { FRAC_CONST(0.508499966798541), FRAC_CONST(0.861062009245491) },
379 { FRAC_CONST(0.505855872686269), FRAC_CONST(0.862618012835817) },
380 { FRAC_CONST(0.503207017265869), FRAC_CONST(0.864165897136879) },
381 { FRAC_CONST(0.500553425469378), FRAC_CONST(0.865705647579402) },
382 { FRAC_CONST(0.497895122273411), FRAC_CONST(0.867237249670668) },
383 { FRAC_CONST(0.495232132698931), FRAC_CONST(0.868760688994655) },
384 { FRAC_CONST(0.492564481811011), FRAC_CONST(0.870275951212172) },
385 { FRAC_CONST(0.489892194718595), FRAC_CONST(0.871783022060993) },
386 { FRAC_CONST(0.487215296574269), FRAC_CONST(0.873281887355994) },
387 { FRAC_CONST(0.484533812574016), FRAC_CONST(0.874772532989284) },
388 { FRAC_CONST(0.481847767956986), FRAC_CONST(0.876254944930338) },
389 { FRAC_CONST(0.479157188005253), FRAC_CONST(0.877729109226132) },
390 { FRAC_CONST(0.476462098043581), FRAC_CONST(0.879195012001267) },
391 { FRAC_CONST(0.473762523439183), FRAC_CONST(0.880652639458111) },
392 { FRAC_CONST(0.471058489601483), FRAC_CONST(0.882101977876918) },
393 { FRAC_CONST(0.468350021981877), FRAC_CONST(0.883543013615962) },
394 { FRAC_CONST(0.465637146073494), FRAC_CONST(0.884975733111667) },
395 { FRAC_CONST(0.462919887410955), FRAC_CONST(0.886400122878730) },
396 { FRAC_CONST(0.460198271570134), FRAC_CONST(0.887816169510255) },
397 { FRAC_CONST(0.457472324167916), FRAC_CONST(0.889223859677868) },
398 { FRAC_CONST(0.454742070861955), FRAC_CONST(0.890623180131856) },
399 { FRAC_CONST(0.452007537350437), FRAC_CONST(0.892014117701280) },
400 { FRAC_CONST(0.449268749371830), FRAC_CONST(0.893396659294108) },
401 { FRAC_CONST(0.446525732704651), FRAC_CONST(0.894770791897330) },
402 { FRAC_CONST(0.443778513167218), FRAC_CONST(0.896136502577087) },
403 { FRAC_CONST(0.441027116617407), FRAC_CONST(0.897493778478790) },
404 { FRAC_CONST(0.438271568952410), FRAC_CONST(0.898842606827242) },
405 { FRAC_CONST(0.435511896108492), FRAC_CONST(0.900182974926757) },
406 { FRAC_CONST(0.432748124060744), FRAC_CONST(0.901514870161279) },
407 { FRAC_CONST(0.429980278822841), FRAC_CONST(0.902838279994503) },
408 { FRAC_CONST(0.427208386446796), FRAC_CONST(0.904153191969992) },
409 { FRAC_CONST(0.424432473022717), FRAC_CONST(0.905459593711293) },
410 { FRAC_CONST(0.421652564678558), FRAC_CONST(0.906757472922057) },
411 { FRAC_CONST(0.418868687579875), FRAC_CONST(0.908046817386148) },
412 { FRAC_CONST(0.416080867929579), FRAC_CONST(0.909327614967767) },
413 { FRAC_CONST(0.413289131967691), FRAC_CONST(0.910599853611559) },
414 { FRAC_CONST(0.410493505971093), FRAC_CONST(0.911863521342729) },
415 { FRAC_CONST(0.407694016253280), FRAC_CONST(0.913118606267154) },
416 { FRAC_CONST(0.404890689164118), FRAC_CONST(0.914365096571498) },
417 { FRAC_CONST(0.402083551089587), FRAC_CONST(0.915602980523320) },
418 { FRAC_CONST(0.399272628451541), FRAC_CONST(0.916832246471184) },
419 { FRAC_CONST(0.396457947707454), FRAC_CONST(0.918052882844770) },
420 { FRAC_CONST(0.393639535350173), FRAC_CONST(0.919264878154985) },
421 { FRAC_CONST(0.390817417907669), FRAC_CONST(0.920468220994067) },
422 { FRAC_CONST(0.387991621942785), FRAC_CONST(0.921662900035695) },
423 { FRAC_CONST(0.385162174052990), FRAC_CONST(0.922848904035094) },
424 { FRAC_CONST(0.382329100870125), FRAC_CONST(0.924026221829144) },
425 { FRAC_CONST(0.379492429060153), FRAC_CONST(0.925194842336480) },
426 { FRAC_CONST(0.376652185322910), FRAC_CONST(0.926354754557603) },
427 { FRAC_CONST(0.373808396391851), FRAC_CONST(0.927505947574975) },
428 { FRAC_CONST(0.370961089033802), FRAC_CONST(0.928648410553131) },
429 { FRAC_CONST(0.368110290048703), FRAC_CONST(0.929782132738772) },
430 { FRAC_CONST(0.365256026269360), FRAC_CONST(0.930907103460875) },
431 { FRAC_CONST(0.362398324561191), FRAC_CONST(0.932023312130786) },
432 { FRAC_CONST(0.359537211821973), FRAC_CONST(0.933130748242325) },
433 { FRAC_CONST(0.356672714981588), FRAC_CONST(0.934229401371881) },
434 { FRAC_CONST(0.353804861001772), FRAC_CONST(0.935319261178512) },
435 { FRAC_CONST(0.350933676875858), FRAC_CONST(0.936400317404042) },
436 { FRAC_CONST(0.348059189628526), FRAC_CONST(0.937472559873159) },
437 { FRAC_CONST(0.345181426315543), FRAC_CONST(0.938535978493509) },
438 { FRAC_CONST(0.342300414023514), FRAC_CONST(0.939590563255789) },
439 { FRAC_CONST(0.339416179869623), FRAC_CONST(0.940636304233848) },
440 { FRAC_CONST(0.336528751001382), FRAC_CONST(0.941673191584771) },
441 { FRAC_CONST(0.333638154596371), FRAC_CONST(0.942701215548982) },
442 { FRAC_CONST(0.330744417861983), FRAC_CONST(0.943720366450326) },
443 { FRAC_CONST(0.327847568035171), FRAC_CONST(0.944730634696168) },
444 { FRAC_CONST(0.324947632382188), FRAC_CONST(0.945732010777477) },
445 { FRAC_CONST(0.322044638198335), FRAC_CONST(0.946724485268921) },
446 { FRAC_CONST(0.319138612807696), FRAC_CONST(0.947708048828952) },
447 { FRAC_CONST(0.316229583562890), FRAC_CONST(0.948682692199895) },
448 { FRAC_CONST(0.313317577844809), FRAC_CONST(0.949648406208035) },
449 { FRAC_CONST(0.310402623062359), FRAC_CONST(0.950605181763705) },
450 { FRAC_CONST(0.307484746652204), FRAC_CONST(0.951553009861369) },
451 { FRAC_CONST(0.304563976078509), FRAC_CONST(0.952491881579706) },
452 { FRAC_CONST(0.301640338832679), FRAC_CONST(0.953421788081700) },
453 { FRAC_CONST(0.298713862433100), FRAC_CONST(0.954342720614716) },
454 { FRAC_CONST(0.295784574424884), FRAC_CONST(0.955254670510587) },
455 { FRAC_CONST(0.292852502379605), FRAC_CONST(0.956157629185692) },
456 { FRAC_CONST(0.289917673895041), FRAC_CONST(0.957051588141041) },
457 { FRAC_CONST(0.286980116594916), FRAC_CONST(0.957936538962351) },
458 { FRAC_CONST(0.284039858128637), FRAC_CONST(0.958812473320129) },
459 { FRAC_CONST(0.281096926171038), FRAC_CONST(0.959679382969747) },
460 { FRAC_CONST(0.278151348422115), FRAC_CONST(0.960537259751520) },
461 { FRAC_CONST(0.275203152606767), FRAC_CONST(0.961386095590786) },
462 { FRAC_CONST(0.272252366474537), FRAC_CONST(0.962225882497979) },
463 { FRAC_CONST(0.269299017799346), FRAC_CONST(0.963056612568704) },
464 { FRAC_CONST(0.266343134379238), FRAC_CONST(0.963878277983814) },
465 { FRAC_CONST(0.263384744036113), FRAC_CONST(0.964690871009481) },
466 { FRAC_CONST(0.260423874615468), FRAC_CONST(0.965494383997270) },
467 { FRAC_CONST(0.257460553986133), FRAC_CONST(0.966288809384210) },
468 { FRAC_CONST(0.254494810040011), FRAC_CONST(0.967074139692867) },
469 { FRAC_CONST(0.251526670691813), FRAC_CONST(0.967850367531414) },
470 { FRAC_CONST(0.248556163878797), FRAC_CONST(0.968617485593698) },
471 { FRAC_CONST(0.245583317560504), FRAC_CONST(0.969375486659311) },
472 { FRAC_CONST(0.242608159718497), FRAC_CONST(0.970124363593660) },
473 { FRAC_CONST(0.239630718356094), FRAC_CONST(0.970864109348029) },
474 { FRAC_CONST(0.236651021498106), FRAC_CONST(0.971594716959650) },
475 { FRAC_CONST(0.233669097190577), FRAC_CONST(0.972316179551765) },
476 { FRAC_CONST(0.230684973500512), FRAC_CONST(0.973028490333694) },
477 { FRAC_CONST(0.227698678515621), FRAC_CONST(0.973731642600896) },
478 { FRAC_CONST(0.224710240344050), FRAC_CONST(0.974425629735035) },
479 { FRAC_CONST(0.221719687114115), FRAC_CONST(0.975110445204039) },
480 { FRAC_CONST(0.218727046974045), FRAC_CONST(0.975786082562164) },
481 { FRAC_CONST(0.215732348091706), FRAC_CONST(0.976452535450054) },
482 { FRAC_CONST(0.212735618654346), FRAC_CONST(0.977109797594801) },
483 { FRAC_CONST(0.209736886868323), FRAC_CONST(0.977757862810003) },
484 { FRAC_CONST(0.206736180958844), FRAC_CONST(0.978396724995823) },
485 { FRAC_CONST(0.203733529169694), FRAC_CONST(0.979026378139048) },
486 { FRAC_CONST(0.200728959762976), FRAC_CONST(0.979646816313141) },
487 { FRAC_CONST(0.197722501018842), FRAC_CONST(0.980258033678304) },
488 { FRAC_CONST(0.194714181235226), FRAC_CONST(0.980860024481524) },
489 { FRAC_CONST(0.191704028727580), FRAC_CONST(0.981452783056636) },
490 { FRAC_CONST(0.188692071828605), FRAC_CONST(0.982036303824369) },
491 { FRAC_CONST(0.185678338887988), FRAC_CONST(0.982610581292405) },
492 { FRAC_CONST(0.182662858272129), FRAC_CONST(0.983175610055424) },
493 { FRAC_CONST(0.179645658363882), FRAC_CONST(0.983731384795162) },
494 { FRAC_CONST(0.176626767562281), FRAC_CONST(0.984277900280454) },
495 { FRAC_CONST(0.173606214282275), FRAC_CONST(0.984815151367289) },
496 { FRAC_CONST(0.170584026954464), FRAC_CONST(0.985343132998855) },
497 { FRAC_CONST(0.167560234024824), FRAC_CONST(0.985861840205587) },
498 { FRAC_CONST(0.164534863954446), FRAC_CONST(0.986371268105216) },
499 { FRAC_CONST(0.161507945219266), FRAC_CONST(0.986871411902812) },
500 { FRAC_CONST(0.158479506309796), FRAC_CONST(0.987362266890832) },
501 { FRAC_CONST(0.155449575730856), FRAC_CONST(0.987843828449162) },
502 { FRAC_CONST(0.152418182001307), FRAC_CONST(0.988316092045160) },
503 { FRAC_CONST(0.149385353653780), FRAC_CONST(0.988779053233702) },
504 { FRAC_CONST(0.146351119234411), FRAC_CONST(0.989232707657220) },
505 { FRAC_CONST(0.143315507302572), FRAC_CONST(0.989677051045747) },
506 { FRAC_CONST(0.140278546430595), FRAC_CONST(0.990112079216954) },
507 { FRAC_CONST(0.137240265203516), FRAC_CONST(0.990537788076189) },
508 { FRAC_CONST(0.134200692218792), FRAC_CONST(0.990954173616519) },
509 { FRAC_CONST(0.131159856086043), FRAC_CONST(0.991361231918763) },
510 { FRAC_CONST(0.128117785426777), FRAC_CONST(0.991758959151536) },
511 { FRAC_CONST(0.125074508874121), FRAC_CONST(0.992147351571276) },
512 { FRAC_CONST(0.122030055072553), FRAC_CONST(0.992526405522286) },
513 { FRAC_CONST(0.118984452677633), FRAC_CONST(0.992896117436766) },
514 { FRAC_CONST(0.115937730355728), FRAC_CONST(0.993256483834846) },
515 { FRAC_CONST(0.112889916783750), FRAC_CONST(0.993607501324622) },
516 { FRAC_CONST(0.109841040648883), FRAC_CONST(0.993949166602181) },
517 { FRAC_CONST(0.106791130648307), FRAC_CONST(0.994281476451642) },
518 { FRAC_CONST(0.103740215488939), FRAC_CONST(0.994604427745176) },
519 { FRAC_CONST(0.100688323887154), FRAC_CONST(0.994918017443043) },
520 { FRAC_CONST(0.097635484568517), FRAC_CONST(0.995222242593618) },
521 { FRAC_CONST(0.094581726267515), FRAC_CONST(0.995517100333418) },
522 { FRAC_CONST(0.091527077727285), FRAC_CONST(0.995802587887129) },
523 { FRAC_CONST(0.088471567699341), FRAC_CONST(0.996078702567634) },
524 { FRAC_CONST(0.085415224943307), FRAC_CONST(0.996345441776036) },
525 { FRAC_CONST(0.082358078226647), FRAC_CONST(0.996602803001684) },
526 { FRAC_CONST(0.079300156324388), FRAC_CONST(0.996850783822197) },
527 { FRAC_CONST(0.076241488018856), FRAC_CONST(0.997089381903483) },
528 { FRAC_CONST(0.073182102099403), FRAC_CONST(0.997318594999769) },
529 { FRAC_CONST(0.070122027362134), FRAC_CONST(0.997538420953611) },
530 { FRAC_CONST(0.067061292609637), FRAC_CONST(0.997748857695926) },
531 { FRAC_CONST(0.063999926650714), FRAC_CONST(0.997949903246001) },
532 { FRAC_CONST(0.060937958300107), FRAC_CONST(0.998141555711521) },
533 { FRAC_CONST(0.057875416378229), FRAC_CONST(0.998323813288578) },
534 { FRAC_CONST(0.054812329710890), FRAC_CONST(0.998496674261695) },
535 { FRAC_CONST(0.051748727129028), FRAC_CONST(0.998660137003838) },
536 { FRAC_CONST(0.048684637468439), FRAC_CONST(0.998814199976435) },
537 { FRAC_CONST(0.045620089569500), FRAC_CONST(0.998958861729386) },
538 { FRAC_CONST(0.042555112276904), FRAC_CONST(0.999094120901079) },
539 { FRAC_CONST(0.039489734439384), FRAC_CONST(0.999219976218404) },
540 { FRAC_CONST(0.036423984909444), FRAC_CONST(0.999336426496761) },
541 { FRAC_CONST(0.033357892543086), FRAC_CONST(0.999443470640078) },
542 { FRAC_CONST(0.030291486199539), FRAC_CONST(0.999541107640813) },
543 { FRAC_CONST(0.027224794740988), FRAC_CONST(0.999629336579970) },
544 { FRAC_CONST(0.024157847032300), FRAC_CONST(0.999708156627105) },
545 { FRAC_CONST(0.021090671940755), FRAC_CONST(0.999777567040333) },
546 { FRAC_CONST(0.018023298335774), FRAC_CONST(0.999837567166337) },
547 { FRAC_CONST(0.014955755088644), FRAC_CONST(0.999888156440373) },
548 { FRAC_CONST(0.011888071072252), FRAC_CONST(0.999929334386276) },
549 { FRAC_CONST(0.008820275160808), FRAC_CONST(0.999961100616463) },
550 { FRAC_CONST(0.005752396229574), FRAC_CONST(0.999983454831938) },
551 { FRAC_CONST(0.002684463154596), FRAC_CONST(0.999996396822294) }
552};
553
554/* 64 (N/4) complex twiddle factors */
555ALIGN static const complex_t mdct_tab_256[] =
556{
557 { FRAC_CONST(0.999995293809576), FRAC_CONST(0.003067956762966) },
558 { FRAC_CONST(0.999618822495179), FRAC_CONST(0.027608145778966) },
559 { FRAC_CONST(0.998640218180265), FRAC_CONST(0.052131704680283) },
560 { FRAC_CONST(0.997060070339483), FRAC_CONST(0.076623861392031) },
561 { FRAC_CONST(0.994879330794806), FRAC_CONST(0.101069862754828) },
562 { FRAC_CONST(0.992099313142192), FRAC_CONST(0.125454983411546) },
563 { FRAC_CONST(0.988721691960324), FRAC_CONST(0.149764534677322) },
564 { FRAC_CONST(0.984748501801904), FRAC_CONST(0.173983873387464) },
565 { FRAC_CONST(0.980182135968117), FRAC_CONST(0.198098410717954) },
566 { FRAC_CONST(0.975025345066994), FRAC_CONST(0.222093620973204) },
567 { FRAC_CONST(0.969281235356549), FRAC_CONST(0.245955050335795) },
568 { FRAC_CONST(0.962953266873684), FRAC_CONST(0.269668325572915) },
569 { FRAC_CONST(0.956045251349996), FRAC_CONST(0.293219162694259) },
570 { FRAC_CONST(0.948561349915730), FRAC_CONST(0.316593375556166) },
571 { FRAC_CONST(0.940506070593268), FRAC_CONST(0.339776884406827) },
572 { FRAC_CONST(0.931884265581668), FRAC_CONST(0.362755724367397) },
573 { FRAC_CONST(0.922701128333879), FRAC_CONST(0.385516053843919) },
574 { FRAC_CONST(0.912962190428398), FRAC_CONST(0.408044162864979) },
575 { FRAC_CONST(0.902673318237259), FRAC_CONST(0.430326481340083) },
576 { FRAC_CONST(0.891840709392343), FRAC_CONST(0.452349587233771) },
577 { FRAC_CONST(0.880470889052161), FRAC_CONST(0.474100214650550) },
578 { FRAC_CONST(0.868570705971341), FRAC_CONST(0.495565261825773) },
579 { FRAC_CONST(0.856147328375194), FRAC_CONST(0.516731799017650) },
580 { FRAC_CONST(0.843208239641845), FRAC_CONST(0.537587076295645) },
581 { FRAC_CONST(0.829761233794523), FRAC_CONST(0.558118531220556) },
582 { FRAC_CONST(0.815814410806734), FRAC_CONST(0.578313796411656) },
583 { FRAC_CONST(0.801376171723140), FRAC_CONST(0.598160706996342) },
584 { FRAC_CONST(0.786455213599086), FRAC_CONST(0.617647307937804) },
585 { FRAC_CONST(0.771060524261814), FRAC_CONST(0.636761861236284) },
586 { FRAC_CONST(0.755201376896537), FRAC_CONST(0.655492852999615) },
587 { FRAC_CONST(0.738887324460615), FRAC_CONST(0.673829000378756) },
588 { FRAC_CONST(0.722128193929215), FRAC_CONST(0.691759258364158) },
589 { FRAC_CONST(0.704934080375905), FRAC_CONST(0.709272826438866) },
590 { FRAC_CONST(0.687315340891759), FRAC_CONST(0.726359155084346) },
591 { FRAC_CONST(0.669282588346636), FRAC_CONST(0.743007952135122) },
592 { FRAC_CONST(0.650846684996381), FRAC_CONST(0.759209188978388) },
593 { FRAC_CONST(0.632018735939809), FRAC_CONST(0.774953106594874) },
594 { FRAC_CONST(0.612810082429410), FRAC_CONST(0.790230221437310) },
595 { FRAC_CONST(0.593232295039800), FRAC_CONST(0.805031331142964) },
596 { FRAC_CONST(0.573297166698042), FRAC_CONST(0.819347520076797) },
597 { FRAC_CONST(0.553016705580028), FRAC_CONST(0.833170164701913) },
598 { FRAC_CONST(0.532403127877198), FRAC_CONST(0.846490938774052) },
599 { FRAC_CONST(0.511468850437971), FRAC_CONST(0.859301818357008) },
600 { FRAC_CONST(0.490226483288291), FRAC_CONST(0.871595086655951) },
601 { FRAC_CONST(0.468688822035828), FRAC_CONST(0.883363338665732) },
602 { FRAC_CONST(0.446868840162374), FRAC_CONST(0.894599485631383) },
603 { FRAC_CONST(0.424779681209109), FRAC_CONST(0.905296759318119) },
604 { FRAC_CONST(0.402434650859419), FRAC_CONST(0.915448716088268) },
605 { FRAC_CONST(0.379847208924051), FRAC_CONST(0.925049240782678) },
606 { FRAC_CONST(0.357030961233430), FRAC_CONST(0.934092550404259) },
607 { FRAC_CONST(0.333999651442009), FRAC_CONST(0.942573197601447) },
608 { FRAC_CONST(0.310767152749611), FRAC_CONST(0.950486073949482) },
609 { FRAC_CONST(0.287347459544730), FRAC_CONST(0.957826413027533) },
610 { FRAC_CONST(0.263754678974832), FRAC_CONST(0.964589793289813) },
611 { FRAC_CONST(0.240003022448742), FRAC_CONST(0.970772140728950) },
612 { FRAC_CONST(0.216106797076220), FRAC_CONST(0.976369731330021) },
613 { FRAC_CONST(0.192080397049892), FRAC_CONST(0.981379193313755) },
614 { FRAC_CONST(0.167938294974731), FRAC_CONST(0.985797509167567) },
615 { FRAC_CONST(0.143695033150295), FRAC_CONST(0.989622017463201) },
616 { FRAC_CONST(0.119365214810991), FRAC_CONST(0.992850414459865) },
617 { FRAC_CONST(0.094963495329639), FRAC_CONST(0.995480755491927) },
618 { FRAC_CONST(0.070504573389614), FRAC_CONST(0.997511456140303) },
619 { FRAC_CONST(0.046003182130915), FRAC_CONST(0.998941293186857) },
620 { FRAC_CONST(0.021474080275470), FRAC_CONST(0.999769405351215) }
621};
622
623#ifdef LD_DEC
624/* 256 (N/4) complex twiddle factors */
625ALIGN static const complex_t mdct_tab_1024[] =
626{
627 { FRAC_CONST(0.999999705862882), FRAC_CONST(0.000766990318743) },
628 { FRAC_CONST(0.999976174986898), FRAC_CONST(0.006902858724730) },
629 { FRAC_CONST(0.999914995573113), FRAC_CONST(0.013038467241987) },
630 { FRAC_CONST(0.999816169924900), FRAC_CONST(0.019173584868323) },
631 { FRAC_CONST(0.999679701762988), FRAC_CONST(0.025307980620025) },
632 { FRAC_CONST(0.999505596225325), FRAC_CONST(0.031441423540560) },
633 { FRAC_CONST(0.999293859866888), FRAC_CONST(0.037573682709270) },
634 { FRAC_CONST(0.999044500659429), FRAC_CONST(0.043704527250063) },
635 { FRAC_CONST(0.998757527991183), FRAC_CONST(0.049833726340107) },
636 { FRAC_CONST(0.998432952666508), FRAC_CONST(0.055961049218521) },
637 { FRAC_CONST(0.998070786905482), FRAC_CONST(0.062086265195060) },
638 { FRAC_CONST(0.997671044343441), FRAC_CONST(0.068209143658806) },
639 { FRAC_CONST(0.997233740030466), FRAC_CONST(0.074329454086846) },
640 { FRAC_CONST(0.996758890430818), FRAC_CONST(0.080446966052950) },
641 { FRAC_CONST(0.996246513422316), FRAC_CONST(0.086561449236251) },
642 { FRAC_CONST(0.995696628295664), FRAC_CONST(0.092672673429913) },
643 { FRAC_CONST(0.995109255753726), FRAC_CONST(0.098780408549800) },
644 { FRAC_CONST(0.994484417910748), FRAC_CONST(0.104884424643135) },
645 { FRAC_CONST(0.993822138291520), FRAC_CONST(0.110984491897163) },
646 { FRAC_CONST(0.993122441830496), FRAC_CONST(0.117080380647801) },
647 { FRAC_CONST(0.992385354870852), FRAC_CONST(0.123171861388280) },
648 { FRAC_CONST(0.991610905163495), FRAC_CONST(0.129258704777796) },
649 { FRAC_CONST(0.990799121866020), FRAC_CONST(0.135340681650134) },
650 { FRAC_CONST(0.989950035541609), FRAC_CONST(0.141417563022303) },
651 { FRAC_CONST(0.989063678157882), FRAC_CONST(0.147489120103154) },
652 { FRAC_CONST(0.988140083085693), FRAC_CONST(0.153555124301993) },
653 { FRAC_CONST(0.987179285097874), FRAC_CONST(0.159615347237193) },
654 { FRAC_CONST(0.986181320367928), FRAC_CONST(0.165669560744784) },
655 { FRAC_CONST(0.985146226468662), FRAC_CONST(0.171717536887050) },
656 { FRAC_CONST(0.984074042370776), FRAC_CONST(0.177759047961107) },
657 { FRAC_CONST(0.982964808441396), FRAC_CONST(0.183793866507478) },
658 { FRAC_CONST(0.981818566442553), FRAC_CONST(0.189821765318656) },
659 { FRAC_CONST(0.980635359529608), FRAC_CONST(0.195842517447658) },
660 { FRAC_CONST(0.979415232249635), FRAC_CONST(0.201855896216568) },
661 { FRAC_CONST(0.978158230539735), FRAC_CONST(0.207861675225075) },
662 { FRAC_CONST(0.976864401725313), FRAC_CONST(0.213859628358994) },
663 { FRAC_CONST(0.975533794518291), FRAC_CONST(0.219849529798779) },
664 { FRAC_CONST(0.974166459015280), FRAC_CONST(0.225831154028026) },
665 { FRAC_CONST(0.972762446695689), FRAC_CONST(0.231804275841965) },
666 { FRAC_CONST(0.971321810419786), FRAC_CONST(0.237768670355934) },
667 { FRAC_CONST(0.969844604426715), FRAC_CONST(0.243724113013852) },
668 { FRAC_CONST(0.968330884332445), FRAC_CONST(0.249670379596669) },
669 { FRAC_CONST(0.966780707127683), FRAC_CONST(0.255607246230807) },
670 { FRAC_CONST(0.965194131175725), FRAC_CONST(0.261534489396596) },
671 { FRAC_CONST(0.963571216210257), FRAC_CONST(0.267451885936678) },
672 { FRAC_CONST(0.961912023333112), FRAC_CONST(0.273359213064419) },
673 { FRAC_CONST(0.960216615011963), FRAC_CONST(0.279256248372291) },
674 { FRAC_CONST(0.958485055077976), FRAC_CONST(0.285142769840249) },
675 { FRAC_CONST(0.956717408723403), FRAC_CONST(0.291018555844085) },
676 { FRAC_CONST(0.954913742499131), FRAC_CONST(0.296883385163778) },
677 { FRAC_CONST(0.953074124312172), FRAC_CONST(0.302737036991819) },
678 { FRAC_CONST(0.951198623423113), FRAC_CONST(0.308579290941525) },
679 { FRAC_CONST(0.949287310443502), FRAC_CONST(0.314409927055337) },
680 { FRAC_CONST(0.947340257333192), FRAC_CONST(0.320228725813100) },
681 { FRAC_CONST(0.945357537397632), FRAC_CONST(0.326035468140330) },
682 { FRAC_CONST(0.943339225285108), FRAC_CONST(0.331829935416461) },
683 { FRAC_CONST(0.941285396983929), FRAC_CONST(0.337611909483075) },
684 { FRAC_CONST(0.939196129819570), FRAC_CONST(0.343381172652115) },
685 { FRAC_CONST(0.937071502451759), FRAC_CONST(0.349137507714085) },
686 { FRAC_CONST(0.934911594871516), FRAC_CONST(0.354880697946223) },
687 { FRAC_CONST(0.932716488398140), FRAC_CONST(0.360610527120662) },
688 { FRAC_CONST(0.930486265676150), FRAC_CONST(0.366326779512574) },
689 { FRAC_CONST(0.928221010672169), FRAC_CONST(0.372029239908285) },
690 { FRAC_CONST(0.925920808671770), FRAC_CONST(0.377717693613386) },
691 { FRAC_CONST(0.923585746276257), FRAC_CONST(0.383391926460809) },
692 { FRAC_CONST(0.921215911399409), FRAC_CONST(0.389051724818894) },
693 { FRAC_CONST(0.918811393264170), FRAC_CONST(0.394696875599434) },
694 { FRAC_CONST(0.916372282399289), FRAC_CONST(0.400327166265690) },
695 { FRAC_CONST(0.913898670635912), FRAC_CONST(0.405942384840403) },
696 { FRAC_CONST(0.911390651104122), FRAC_CONST(0.411542319913765) },
697 { FRAC_CONST(0.908848318229439), FRAC_CONST(0.417126760651388) },
698 { FRAC_CONST(0.906271767729258), FRAC_CONST(0.422695496802233) },
699 { FRAC_CONST(0.903661096609248), FRAC_CONST(0.428248318706532) },
700 { FRAC_CONST(0.901016403159702), FRAC_CONST(0.433785017303679) },
701 { FRAC_CONST(0.898337786951834), FRAC_CONST(0.439305384140100) },
702 { FRAC_CONST(0.895625348834030), FRAC_CONST(0.444809211377105) },
703 { FRAC_CONST(0.892879190928052), FRAC_CONST(0.450296291798709) },
704 { FRAC_CONST(0.890099416625192), FRAC_CONST(0.455766418819435) },
705 { FRAC_CONST(0.887286130582383), FRAC_CONST(0.461219386492092) },
706 { FRAC_CONST(0.884439438718254), FRAC_CONST(0.466654989515531) },
707 { FRAC_CONST(0.881559448209144), FRAC_CONST(0.472073023242369) },
708 { FRAC_CONST(0.878646267485068), FRAC_CONST(0.477473283686698) },
709 { FRAC_CONST(0.875700006225635), FRAC_CONST(0.482855567531766) },
710 { FRAC_CONST(0.872720775355914), FRAC_CONST(0.488219672137627) },
711 { FRAC_CONST(0.869708687042266), FRAC_CONST(0.493565395548775) },
712 { FRAC_CONST(0.866663854688111), FRAC_CONST(0.498892536501745) },
713 { FRAC_CONST(0.863586392929668), FRAC_CONST(0.504200894432690) },
714 { FRAC_CONST(0.860476417631632), FRAC_CONST(0.509490269484936) },
715 { FRAC_CONST(0.857334045882816), FRAC_CONST(0.514760462516501) },
716 { FRAC_CONST(0.854159395991739), FRAC_CONST(0.520011275107596) },
717 { FRAC_CONST(0.850952587482176), FRAC_CONST(0.525242509568095) },
718 { FRAC_CONST(0.847713741088654), FRAC_CONST(0.530453968944976) },
719 { FRAC_CONST(0.844442978751911), FRAC_CONST(0.535645457029741) },
720 { FRAC_CONST(0.841140423614298), FRAC_CONST(0.540816778365797) },
721 { FRAC_CONST(0.837806200015151), FRAC_CONST(0.545967738255818) },
722 { FRAC_CONST(0.834440433486103), FRAC_CONST(0.551098142769075) },
723 { FRAC_CONST(0.831043250746362), FRAC_CONST(0.556207798748740) },
724 { FRAC_CONST(0.827614779697938), FRAC_CONST(0.561296513819151) },
725 { FRAC_CONST(0.824155149420829), FRAC_CONST(0.566364096393064) },
726 { FRAC_CONST(0.820664490168157), FRAC_CONST(0.571410355678857) },
727 { FRAC_CONST(0.817142933361273), FRAC_CONST(0.576435101687722) },
728 { FRAC_CONST(0.813590611584799), FRAC_CONST(0.581438145240810) },
729 { FRAC_CONST(0.810007658581641), FRAC_CONST(0.586419297976361) },
730 { FRAC_CONST(0.806394209247956), FRAC_CONST(0.591378372356788) },
731 { FRAC_CONST(0.802750399628069), FRAC_CONST(0.596315181675744) },
732 { FRAC_CONST(0.799076366909352), FRAC_CONST(0.601229540065149) },
733 { FRAC_CONST(0.795372249417061), FRAC_CONST(0.606121262502186) },
734 { FRAC_CONST(0.791638186609126), FRAC_CONST(0.610990164816272) },
735 { FRAC_CONST(0.787874319070900), FRAC_CONST(0.615836063695985) },
736 { FRAC_CONST(0.784080788509870), FRAC_CONST(0.620658776695972) },
737 { FRAC_CONST(0.780257737750317), FRAC_CONST(0.625458122243814) },
738 { FRAC_CONST(0.776405310727940), FRAC_CONST(0.630233919646864) },
739 { FRAC_CONST(0.772523652484441), FRAC_CONST(0.634985989099049) },
740 { FRAC_CONST(0.768612909162058), FRAC_CONST(0.639714151687640) },
741 { FRAC_CONST(0.764673227998067), FRAC_CONST(0.644418229399988) },
742 { FRAC_CONST(0.760704757319237), FRAC_CONST(0.649098045130226) },
743 { FRAC_CONST(0.756707646536246), FRAC_CONST(0.653753422685936) },
744 { FRAC_CONST(0.752682046138055), FRAC_CONST(0.658384186794785) },
745 { FRAC_CONST(0.748628107686245), FRAC_CONST(0.662990163111121) },
746 { FRAC_CONST(0.744545983809307), FRAC_CONST(0.667571178222540) },
747 { FRAC_CONST(0.740435828196898), FRAC_CONST(0.672127059656412) },
748 { FRAC_CONST(0.736297795594053), FRAC_CONST(0.676657635886375) },
749 { FRAC_CONST(0.732132041795361), FRAC_CONST(0.681162736338795) },
750 { FRAC_CONST(0.727938723639099), FRAC_CONST(0.685642191399187) },
751 { FRAC_CONST(0.723717999001324), FRAC_CONST(0.690095832418600) },
752 { FRAC_CONST(0.719470026789933), FRAC_CONST(0.694523491719966) },
753 { FRAC_CONST(0.715194966938680), FRAC_CONST(0.698925002604414) },
754 { FRAC_CONST(0.710892980401152), FRAC_CONST(0.703300199357549) },
755 { FRAC_CONST(0.706564229144710), FRAC_CONST(0.707648917255684) },
756 { FRAC_CONST(0.702208876144392), FRAC_CONST(0.711970992572050) },
757 { FRAC_CONST(0.697827085376777), FRAC_CONST(0.716266262582953) },
758 { FRAC_CONST(0.693419021813812), FRAC_CONST(0.720534565573905) },
759 { FRAC_CONST(0.688984851416597), FRAC_CONST(0.724775740845711) },
760 { FRAC_CONST(0.684524741129142), FRAC_CONST(0.728989628720519) },
761 { FRAC_CONST(0.680038858872079), FRAC_CONST(0.733176070547833) },
762 { FRAC_CONST(0.675527373536339), FRAC_CONST(0.737334908710483) },
763 { FRAC_CONST(0.670990454976794), FRAC_CONST(0.741465986630563) },
764 { FRAC_CONST(0.666428274005865), FRAC_CONST(0.745569148775325) },
765 { FRAC_CONST(0.661841002387087), FRAC_CONST(0.749644240663033) },
766 { FRAC_CONST(0.657228812828643), FRAC_CONST(0.753691108868781) },
767 { FRAC_CONST(0.652591878976863), FRAC_CONST(0.757709601030268) },
768 { FRAC_CONST(0.647930375409685), FRAC_CONST(0.761699565853535) },
769 { FRAC_CONST(0.643244477630086), FRAC_CONST(0.765660853118662) },
770 { FRAC_CONST(0.638534362059467), FRAC_CONST(0.769593313685423) },
771 { FRAC_CONST(0.633800206031017), FRAC_CONST(0.773496799498899) },
772 { FRAC_CONST(0.629042187783036), FRAC_CONST(0.777371163595056) },
773 { FRAC_CONST(0.624260486452221), FRAC_CONST(0.781216260106276) },
774 { FRAC_CONST(0.619455282066924), FRAC_CONST(0.785031944266848) },
775 { FRAC_CONST(0.614626755540375), FRAC_CONST(0.788818072418420) },
776 { FRAC_CONST(0.609775088663868), FRAC_CONST(0.792574502015408) },
777 { FRAC_CONST(0.604900464099920), FRAC_CONST(0.796301091630359) },
778 { FRAC_CONST(0.600003065375389), FRAC_CONST(0.799997700959282) },
779 { FRAC_CONST(0.595083076874570), FRAC_CONST(0.803664190826924) },
780 { FRAC_CONST(0.590140683832249), FRAC_CONST(0.807300423192014) },
781 { FRAC_CONST(0.585176072326730), FRAC_CONST(0.810906261152460) },
782 { FRAC_CONST(0.580189429272832), FRAC_CONST(0.814481568950499) },
783 { FRAC_CONST(0.575180942414845), FRAC_CONST(0.818026211977813) },
784 { FRAC_CONST(0.570150800319470), FRAC_CONST(0.821540056780598) },
785 { FRAC_CONST(0.565099192368714), FRAC_CONST(0.825022971064580) },
786 { FRAC_CONST(0.560026308752760), FRAC_CONST(0.828474823700007) },
787 { FRAC_CONST(0.554932340462810), FRAC_CONST(0.831895484726578) },
788 { FRAC_CONST(0.549817479283891), FRAC_CONST(0.835284825358337) },
789 { FRAC_CONST(0.544681917787635), FRAC_CONST(0.838642717988527) },
790 { FRAC_CONST(0.539525849325029), FRAC_CONST(0.841969036194388) },
791 { FRAC_CONST(0.534349468019138), FRAC_CONST(0.845263654741918) },
792 { FRAC_CONST(0.529152968757791), FRAC_CONST(0.848526449590593) },
793 { FRAC_CONST(0.523936547186249), FRAC_CONST(0.851757297898029) },
794 { FRAC_CONST(0.518700399699835), FRAC_CONST(0.854956078024615) },
795 { FRAC_CONST(0.513444723436544), FRAC_CONST(0.858122669538086) },
796 { FRAC_CONST(0.508169716269615), FRAC_CONST(0.861256953218062) },
797 { FRAC_CONST(0.502875576800087), FRAC_CONST(0.864358811060534) },
798 { FRAC_CONST(0.497562504349319), FRAC_CONST(0.867428126282307) },
799 { FRAC_CONST(0.492230698951486), FRAC_CONST(0.870464783325398) },
800 { FRAC_CONST(0.486880361346047), FRAC_CONST(0.873468667861385) },
801 { FRAC_CONST(0.481511692970190), FRAC_CONST(0.876439666795714) },
802 { FRAC_CONST(0.476124895951244), FRAC_CONST(0.879377668271953) },
803 { FRAC_CONST(0.470720173099072), FRAC_CONST(0.882282561676009) },
804 { FRAC_CONST(0.465297727898435), FRAC_CONST(0.885154237640285) },
805 { FRAC_CONST(0.459857764501330), FRAC_CONST(0.887992588047806) },
806 { FRAC_CONST(0.454400487719304), FRAC_CONST(0.890797506036281) },
807 { FRAC_CONST(0.448926103015743), FRAC_CONST(0.893568886002136) },
808 { FRAC_CONST(0.443434816498138), FRAC_CONST(0.896306623604480) },
809 { FRAC_CONST(0.437926834910323), FRAC_CONST(0.899010615769039) },
810 { FRAC_CONST(0.432402365624690), FRAC_CONST(0.901680760692038) },
811 { FRAC_CONST(0.426861616634386), FRAC_CONST(0.904316957844028) },
812 { FRAC_CONST(0.421304796545480), FRAC_CONST(0.906919107973678) },
813 { FRAC_CONST(0.415732114569105), FRAC_CONST(0.909487113111505) },
814 { FRAC_CONST(0.410143780513590), FRAC_CONST(0.912020876573568) },
815 { FRAC_CONST(0.404540004776553), FRAC_CONST(0.914520302965104) },
816 { FRAC_CONST(0.398920998336983), FRAC_CONST(0.916985298184123) },
817 { FRAC_CONST(0.393286972747297), FRAC_CONST(0.919415769424947) },
818 { FRAC_CONST(0.387638140125373), FRAC_CONST(0.921811625181708) },
819 { FRAC_CONST(0.381974713146567), FRAC_CONST(0.924172775251791) },
820 { FRAC_CONST(0.376296905035705), FRAC_CONST(0.926499130739231) },
821 { FRAC_CONST(0.370604929559052), FRAC_CONST(0.928790604058057) },
822 { FRAC_CONST(0.364899001016267), FRAC_CONST(0.931047108935595) },
823 { FRAC_CONST(0.359179334232337), FRAC_CONST(0.933268560415712) },
824 { FRAC_CONST(0.353446144549481), FRAC_CONST(0.935454874862015) },
825 { FRAC_CONST(0.347699647819051), FRAC_CONST(0.937605969961000) },
826 { FRAC_CONST(0.341940060393402), FRAC_CONST(0.939721764725153) },
827 { FRAC_CONST(0.336167599117745), FRAC_CONST(0.941802179495998) },
828 { FRAC_CONST(0.330382481321983), FRAC_CONST(0.943847135947093) },
829 { FRAC_CONST(0.324584924812532), FRAC_CONST(0.945856557086984) },
830 { FRAC_CONST(0.318775147864118), FRAC_CONST(0.947830367262101) },
831 { FRAC_CONST(0.312953369211560), FRAC_CONST(0.949768492159607) },
832 { FRAC_CONST(0.307119808041533), FRAC_CONST(0.951670858810194) },
833 { FRAC_CONST(0.301274683984318), FRAC_CONST(0.953537395590833) },
834 { FRAC_CONST(0.295418217105532), FRAC_CONST(0.955368032227470) },
835 { FRAC_CONST(0.289550627897843), FRAC_CONST(0.957162699797670) },
836 { FRAC_CONST(0.283672137272669), FRAC_CONST(0.958921330733213) },
837 { FRAC_CONST(0.277782966551858), FRAC_CONST(0.960643858822638) },
838 { FRAC_CONST(0.271883337459360), FRAC_CONST(0.962330219213737) },
839 { FRAC_CONST(0.265973472112876), FRAC_CONST(0.963980348415994) },
840 { FRAC_CONST(0.260053593015495), FRAC_CONST(0.965594184302977) },
841 { FRAC_CONST(0.254123923047321), FRAC_CONST(0.967171666114677) },
842 { FRAC_CONST(0.248184685457075), FRAC_CONST(0.968712734459795) },
843 { FRAC_CONST(0.242236103853696), FRAC_CONST(0.970217331317979) },
844 { FRAC_CONST(0.236278402197920), FRAC_CONST(0.971685400042009) },
845 { FRAC_CONST(0.230311804793846), FRAC_CONST(0.973116885359925) },
846 { FRAC_CONST(0.224336536280494), FRAC_CONST(0.974511733377116) },
847 { FRAC_CONST(0.218352821623346), FRAC_CONST(0.975869891578341) },
848 { FRAC_CONST(0.212360886105879), FRAC_CONST(0.977191308829712) },
849 { FRAC_CONST(0.206360955321076), FRAC_CONST(0.978475935380617) },
850 { FRAC_CONST(0.200353255162940), FRAC_CONST(0.979723722865591) },
851 { FRAC_CONST(0.194338011817989), FRAC_CONST(0.980934624306142) },
852 { FRAC_CONST(0.188315451756732), FRAC_CONST(0.982108594112514) },
853 { FRAC_CONST(0.182285801725153), FRAC_CONST(0.983245588085407) },
854 { FRAC_CONST(0.176249288736168), FRAC_CONST(0.984345563417642) },
855 { FRAC_CONST(0.170206140061078), FRAC_CONST(0.985408478695768) },
856 { FRAC_CONST(0.164156583221016), FRAC_CONST(0.986434293901627) },
857 { FRAC_CONST(0.158100845978377), FRAC_CONST(0.987422970413855) },
858 { FRAC_CONST(0.152039156328246), FRAC_CONST(0.988374471009341) },
859 { FRAC_CONST(0.145971742489812), FRAC_CONST(0.989288759864625) },
860 { FRAC_CONST(0.139898832897777), FRAC_CONST(0.990165802557248) },
861 { FRAC_CONST(0.133820656193755), FRAC_CONST(0.991005566067049) },
862 { FRAC_CONST(0.127737441217662), FRAC_CONST(0.991808018777406) },
863 { FRAC_CONST(0.121649416999106), FRAC_CONST(0.992573130476429) },
864 { FRAC_CONST(0.115556812748755), FRAC_CONST(0.993300872358093) },
865 { FRAC_CONST(0.109459857849718), FRAC_CONST(0.993991217023329) },
866 { FRAC_CONST(0.103358781848900), FRAC_CONST(0.994644138481051) },
867 { FRAC_CONST(0.097253814448363), FRAC_CONST(0.995259612149133) },
868 { FRAC_CONST(0.091145185496681), FRAC_CONST(0.995837614855342) },
869 { FRAC_CONST(0.085033124980280), FRAC_CONST(0.996378124838200) },
870 { FRAC_CONST(0.078917863014785), FRAC_CONST(0.996881121747814) },
871 { FRAC_CONST(0.072799629836352), FRAC_CONST(0.997346586646633) },
872 { FRAC_CONST(0.066678655793002), FRAC_CONST(0.997774502010168) },
873 { FRAC_CONST(0.060555171335948), FRAC_CONST(0.998164851727646) },
874 { FRAC_CONST(0.054429407010919), FRAC_CONST(0.998517621102622) },
875 { FRAC_CONST(0.048301593449480), FRAC_CONST(0.998832796853528) },
876 { FRAC_CONST(0.042171961360348), FRAC_CONST(0.999110367114175) },
877 { FRAC_CONST(0.036040741520706), FRAC_CONST(0.999350321434199) },
878 { FRAC_CONST(0.029908164767517), FRAC_CONST(0.999552650779457) },
879 { FRAC_CONST(0.023774461988828), FRAC_CONST(0.999717347532362) },
880 { FRAC_CONST(0.017639864115082), FRAC_CONST(0.999844405492175) },
881 { FRAC_CONST(0.011504602110423), FRAC_CONST(0.999933819875236) },
882 { FRAC_CONST(0.005368906963996), FRAC_CONST(0.999985587315143) }
883};
884#endif // LD_DEC
885
886#ifdef ALLOW_SMALL_FRAMELENGTH
887/* 480 (N/4) complex twiddle factors */
888ALIGN static const complex_t mdct_tab_1920[] =
889{
890 { FRAC_CONST(0.999999916334328), FRAC_CONST(0.000409061532028) },
891 { FRAC_CONST(0.999993223088129), FRAC_CONST(0.003681545574400) },
892 { FRAC_CONST(0.999975820717897), FRAC_CONST(0.006953990190376) },
893 { FRAC_CONST(0.999947709409999), FRAC_CONST(0.010226360334704) },
894 { FRAC_CONST(0.999908889465485), FRAC_CONST(0.013498620962929) },
895 { FRAC_CONST(0.999859361300084), FRAC_CONST(0.016770737031768) },
896 { FRAC_CONST(0.999799125444203), FRAC_CONST(0.020042673499487) },
897 { FRAC_CONST(0.999728182542920), FRAC_CONST(0.023314395326274) },
898 { FRAC_CONST(0.999646533355977), FRAC_CONST(0.026585867474619) },
899 { FRAC_CONST(0.999554178757770), FRAC_CONST(0.029857054909681) },
900 { FRAC_CONST(0.999451119737344), FRAC_CONST(0.033127922599673) },
901 { FRAC_CONST(0.999337357398377), FRAC_CONST(0.036398435516228) },
902 { FRAC_CONST(0.999212892959173), FRAC_CONST(0.039668558634781) },
903 { FRAC_CONST(0.999077727752645), FRAC_CONST(0.042938256934941) },
904 { FRAC_CONST(0.998931863226306), FRAC_CONST(0.046207495400865) },
905 { FRAC_CONST(0.998775300942246), FRAC_CONST(0.049476239021636) },
906 { FRAC_CONST(0.998608042577122), FRAC_CONST(0.052744452791636) },
907 { FRAC_CONST(0.998430089922136), FRAC_CONST(0.056012101710921) },
908 { FRAC_CONST(0.998241444883019), FRAC_CONST(0.059279150785597) },
909 { FRAC_CONST(0.998042109480008), FRAC_CONST(0.062545565028192) },
910 { FRAC_CONST(0.997832085847824), FRAC_CONST(0.065811309458034) },
911 { FRAC_CONST(0.997611376235651), FRAC_CONST(0.069076349101624) },
912 { FRAC_CONST(0.997379983007114), FRAC_CONST(0.072340648993011) },
913 { FRAC_CONST(0.997137908640245), FRAC_CONST(0.075604174174166) },
914 { FRAC_CONST(0.996885155727469), FRAC_CONST(0.078866889695354) },
915 { FRAC_CONST(0.996621726975566), FRAC_CONST(0.082128760615515) },
916 { FRAC_CONST(0.996347625205645), FRAC_CONST(0.085389752002632) },
917 { FRAC_CONST(0.996062853353117), FRAC_CONST(0.088649828934106) },
918 { FRAC_CONST(0.995767414467660), FRAC_CONST(0.091908956497133) },
919 { FRAC_CONST(0.995461311713186), FRAC_CONST(0.095167099789075) },
920 { FRAC_CONST(0.995144548367810), FRAC_CONST(0.098424223917834) },
921 { FRAC_CONST(0.994817127823813), FRAC_CONST(0.101680294002229) },
922 { FRAC_CONST(0.994479053587606), FRAC_CONST(0.104935275172364) },
923 { FRAC_CONST(0.994130329279692), FRAC_CONST(0.108189132570007) },
924 { FRAC_CONST(0.993770958634630), FRAC_CONST(0.111441831348957) },
925 { FRAC_CONST(0.993400945500988), FRAC_CONST(0.114693336675426) },
926 { FRAC_CONST(0.993020293841312), FRAC_CONST(0.117943613728403) },
927 { FRAC_CONST(0.992629007732074), FRAC_CONST(0.121192627700032) },
928 { FRAC_CONST(0.992227091363634), FRAC_CONST(0.124440343795983) },
929 { FRAC_CONST(0.991814549040194), FRAC_CONST(0.127686727235827) },
930 { FRAC_CONST(0.991391385179751), FRAC_CONST(0.130931743253405) },
931 { FRAC_CONST(0.990957604314048), FRAC_CONST(0.134175357097202) },
932 { FRAC_CONST(0.990513211088533), FRAC_CONST(0.137417534030720) },
933 { FRAC_CONST(0.990058210262297), FRAC_CONST(0.140658239332849) },
934 { FRAC_CONST(0.989592606708036), FRAC_CONST(0.143897438298239) },
935 { FRAC_CONST(0.989116405411988), FRAC_CONST(0.147135096237670) },
936 { FRAC_CONST(0.988629611473887), FRAC_CONST(0.150371178478428) },
937 { FRAC_CONST(0.988132230106905), FRAC_CONST(0.153605650364672) },
938 { FRAC_CONST(0.987624266637598), FRAC_CONST(0.156838477257806) },
939 { FRAC_CONST(0.987105726505845), FRAC_CONST(0.160069624536852) },
940 { FRAC_CONST(0.986576615264794), FRAC_CONST(0.163299057598817) },
941 { FRAC_CONST(0.986036938580803), FRAC_CONST(0.166526741859069) },
942 { FRAC_CONST(0.985486702233375), FRAC_CONST(0.169752642751702) },
943 { FRAC_CONST(0.984925912115099), FRAC_CONST(0.172976725729910) },
944 { FRAC_CONST(0.984354574231587), FRAC_CONST(0.176198956266353) },
945 { FRAC_CONST(0.983772694701407), FRAC_CONST(0.179419299853531) },
946 { FRAC_CONST(0.983180279756024), FRAC_CONST(0.182637722004152) },
947 { FRAC_CONST(0.982577335739725), FRAC_CONST(0.185854188251500) },
948 { FRAC_CONST(0.981963869109555), FRAC_CONST(0.189068664149806) },
949 { FRAC_CONST(0.981339886435250), FRAC_CONST(0.192281115274616) },
950 { FRAC_CONST(0.980705394399163), FRAC_CONST(0.195491507223158) },
951 { FRAC_CONST(0.980060399796194), FRAC_CONST(0.198699805614714) },
952 { FRAC_CONST(0.979404909533716), FRAC_CONST(0.201905976090986) },
953 { FRAC_CONST(0.978738930631504), FRAC_CONST(0.205109984316464) },
954 { FRAC_CONST(0.978062470221657), FRAC_CONST(0.208311795978794) },
955 { FRAC_CONST(0.977375535548522), FRAC_CONST(0.211511376789145) },
956 { FRAC_CONST(0.976678133968618), FRAC_CONST(0.214708692482577) },
957 { FRAC_CONST(0.975970272950556), FRAC_CONST(0.217903708818409) },
958 { FRAC_CONST(0.975251960074958), FRAC_CONST(0.221096391580581) },
959 { FRAC_CONST(0.974523203034377), FRAC_CONST(0.224286706578026) },
960 { FRAC_CONST(0.973784009633218), FRAC_CONST(0.227474619645035) },
961 { FRAC_CONST(0.973034387787646), FRAC_CONST(0.230660096641619) },
962 { FRAC_CONST(0.972274345525510), FRAC_CONST(0.233843103453878) },
963 { FRAC_CONST(0.971503890986252), FRAC_CONST(0.237023605994367) },
964 { FRAC_CONST(0.970723032420820), FRAC_CONST(0.240201570202459) },
965 { FRAC_CONST(0.969931778191584), FRAC_CONST(0.243376962044711) },
966 { FRAC_CONST(0.969130136772239), FRAC_CONST(0.246549747515226) },
967 { FRAC_CONST(0.968318116747721), FRAC_CONST(0.249719892636022) },
968 { FRAC_CONST(0.967495726814114), FRAC_CONST(0.252887363457390) },
969 { FRAC_CONST(0.966662975778551), FRAC_CONST(0.256052126058264) },
970 { FRAC_CONST(0.965819872559127), FRAC_CONST(0.259214146546579) },
971 { FRAC_CONST(0.964966426184802), FRAC_CONST(0.262373391059634) },
972 { FRAC_CONST(0.964102645795299), FRAC_CONST(0.265529825764461) },
973 { FRAC_CONST(0.963228540641012), FRAC_CONST(0.268683416858178) },
974 { FRAC_CONST(0.962344120082907), FRAC_CONST(0.271834130568359) },
975 { FRAC_CONST(0.961449393592416), FRAC_CONST(0.274981933153391) },
976 { FRAC_CONST(0.960544370751341), FRAC_CONST(0.278126790902837) },
977 { FRAC_CONST(0.959629061251750), FRAC_CONST(0.281268670137799) },
978 { FRAC_CONST(0.958703474895872), FRAC_CONST(0.284407537211272) },
979 { FRAC_CONST(0.957767621595993), FRAC_CONST(0.287543358508512) },
980 { FRAC_CONST(0.956821511374351), FRAC_CONST(0.290676100447394) },
981 { FRAC_CONST(0.955865154363025), FRAC_CONST(0.293805729478766) },
982 { FRAC_CONST(0.954898560803832), FRAC_CONST(0.296932212086818) },
983 { FRAC_CONST(0.953921741048211), FRAC_CONST(0.300055514789431) },
984 { FRAC_CONST(0.952934705557117), FRAC_CONST(0.303175604138543) },
985 { FRAC_CONST(0.951937464900908), FRAC_CONST(0.306292446720504) },
986 { FRAC_CONST(0.950930029759229), FRAC_CONST(0.309406009156434) },
987 { FRAC_CONST(0.949912410920903), FRAC_CONST(0.312516258102580) },
988 { FRAC_CONST(0.948884619283808), FRAC_CONST(0.315623160250676) },
989 { FRAC_CONST(0.947846665854767), FRAC_CONST(0.318726682328294) },
990 { FRAC_CONST(0.946798561749429), FRAC_CONST(0.321826791099207) },
991 { FRAC_CONST(0.945740318192145), FRAC_CONST(0.324923453363742) },
992 { FRAC_CONST(0.944671946515855), FRAC_CONST(0.328016635959131) },
993 { FRAC_CONST(0.943593458161960), FRAC_CONST(0.331106305759876) },
994 { FRAC_CONST(0.942504864680205), FRAC_CONST(0.334192429678095) },
995 { FRAC_CONST(0.941406177728551), FRAC_CONST(0.337274974663880) },
996 { FRAC_CONST(0.940297409073052), FRAC_CONST(0.340353907705650) },
997 { FRAC_CONST(0.939178570587730), FRAC_CONST(0.343429195830507) },
998 { FRAC_CONST(0.938049674254446), FRAC_CONST(0.346500806104585) },
999 { FRAC_CONST(0.936910732162774), FRAC_CONST(0.349568705633406) },
1000 { FRAC_CONST(0.935761756509868), FRAC_CONST(0.352632861562230) },
1001 { FRAC_CONST(0.934602759600334), FRAC_CONST(0.355693241076410) },
1002 { FRAC_CONST(0.933433753846097), FRAC_CONST(0.358749811401739) },
1003 { FRAC_CONST(0.932254751766271), FRAC_CONST(0.361802539804806) },
1004 { FRAC_CONST(0.931065765987021), FRAC_CONST(0.364851393593340) },
1005 { FRAC_CONST(0.929866809241428), FRAC_CONST(0.367896340116568) },
1006 { FRAC_CONST(0.928657894369357), FRAC_CONST(0.370937346765559) },
1007 { FRAC_CONST(0.927439034317314), FRAC_CONST(0.373974380973575) },
1008 { FRAC_CONST(0.926210242138311), FRAC_CONST(0.377007410216418) },
1009 { FRAC_CONST(0.924971530991726), FRAC_CONST(0.380036402012783) },
1010 { FRAC_CONST(0.923722914143160), FRAC_CONST(0.383061323924602) },
1011 { FRAC_CONST(0.922464404964295), FRAC_CONST(0.386082143557389) },
1012 { FRAC_CONST(0.921196016932755), FRAC_CONST(0.389098828560595) },
1013 { FRAC_CONST(0.919917763631956), FRAC_CONST(0.392111346627946) },
1014 { FRAC_CONST(0.918629658750963), FRAC_CONST(0.395119665497795) },
1015 { FRAC_CONST(0.917331716084346), FRAC_CONST(0.398123752953462) },
1016 { FRAC_CONST(0.916023949532027), FRAC_CONST(0.401123576823585) },
1017 { FRAC_CONST(0.914706373099136), FRAC_CONST(0.404119104982459) },
1018 { FRAC_CONST(0.913379000895858), FRAC_CONST(0.407110305350386) },
1019 { FRAC_CONST(0.912041847137282), FRAC_CONST(0.410097145894012) },
1020 { FRAC_CONST(0.910694926143251), FRAC_CONST(0.413079594626675) },
1021 { FRAC_CONST(0.909338252338207), FRAC_CONST(0.416057619608744) },
1022 { FRAC_CONST(0.907971840251037), FRAC_CONST(0.419031188947965) },
1023 { FRAC_CONST(0.906595704514915), FRAC_CONST(0.422000270799800) },
1024 { FRAC_CONST(0.905209859867151), FRAC_CONST(0.424964833367766) },
1025 { FRAC_CONST(0.903814321149027), FRAC_CONST(0.427924844903780) },
1026 { FRAC_CONST(0.902409103305641), FRAC_CONST(0.430880273708497) },
1027 { FRAC_CONST(0.900994221385748), FRAC_CONST(0.433831088131649) },
1028 { FRAC_CONST(0.899569690541596), FRAC_CONST(0.436777256572384) },
1029 { FRAC_CONST(0.898135526028766), FRAC_CONST(0.439718747479604) },
1030 { FRAC_CONST(0.896691743206008), FRAC_CONST(0.442655529352306) },
1031 { FRAC_CONST(0.895238357535076), FRAC_CONST(0.445587570739915) },
1032 { FRAC_CONST(0.893775384580563), FRAC_CONST(0.448514840242624) },
1033 { FRAC_CONST(0.892302840009734), FRAC_CONST(0.451437306511726) },
1034 { FRAC_CONST(0.890820739592359), FRAC_CONST(0.454354938249958) },
1035 { FRAC_CONST(0.889329099200541), FRAC_CONST(0.457267704211826) },
1036 { FRAC_CONST(0.887827934808551), FRAC_CONST(0.460175573203949) },
1037 { FRAC_CONST(0.886317262492655), FRAC_CONST(0.463078514085383) },
1038 { FRAC_CONST(0.884797098430938), FRAC_CONST(0.465976495767966) },
1039 { FRAC_CONST(0.883267458903136), FRAC_CONST(0.468869487216642) },
1040 { FRAC_CONST(0.881728360290461), FRAC_CONST(0.471757457449795) },
1041 { FRAC_CONST(0.880179819075421), FRAC_CONST(0.474640375539586) },
1042 { FRAC_CONST(0.878621851841649), FRAC_CONST(0.477518210612278) },
1043 { FRAC_CONST(0.877054475273722), FRAC_CONST(0.480390931848569) },
1044 { FRAC_CONST(0.875477706156984), FRAC_CONST(0.483258508483922) },
1045 { FRAC_CONST(0.873891561377366), FRAC_CONST(0.486120909808896) },
1046 { FRAC_CONST(0.872296057921204), FRAC_CONST(0.488978105169472) },
1047 { FRAC_CONST(0.870691212875058), FRAC_CONST(0.491830063967383) },
1048 { FRAC_CONST(0.869077043425529), FRAC_CONST(0.494676755660442) },
1049 { FRAC_CONST(0.867453566859076), FRAC_CONST(0.497518149762867) },
1050 { FRAC_CONST(0.865820800561827), FRAC_CONST(0.500354215845611) },
1051 { FRAC_CONST(0.864178762019399), FRAC_CONST(0.503184923536685) },
1052 { FRAC_CONST(0.862527468816704), FRAC_CONST(0.506010242521482) },
1053 { FRAC_CONST(0.860866938637767), FRAC_CONST(0.508830142543107) },
1054 { FRAC_CONST(0.859197189265532), FRAC_CONST(0.511644593402696) },
1055 { FRAC_CONST(0.857518238581672), FRAC_CONST(0.514453564959741) },
1056 { FRAC_CONST(0.855830104566401), FRAC_CONST(0.517257027132414) },
1057 { FRAC_CONST(0.854132805298278), FRAC_CONST(0.520054949897887) },
1058 { FRAC_CONST(0.852426358954015), FRAC_CONST(0.522847303292655) },
1059 { FRAC_CONST(0.850710783808280), FRAC_CONST(0.525634057412856) },
1060 { FRAC_CONST(0.848986098233506), FRAC_CONST(0.528415182414593) },
1061 { FRAC_CONST(0.847252320699689), FRAC_CONST(0.531190648514252) },
1062 { FRAC_CONST(0.845509469774194), FRAC_CONST(0.533960425988819) },
1063 { FRAC_CONST(0.843757564121554), FRAC_CONST(0.536724485176205) },
1064 { FRAC_CONST(0.841996622503271), FRAC_CONST(0.539482796475555) },
1065 { FRAC_CONST(0.840226663777615), FRAC_CONST(0.542235330347571) },
1066 { FRAC_CONST(0.838447706899422), FRAC_CONST(0.544982057314827) },
1067 { FRAC_CONST(0.836659770919891), FRAC_CONST(0.547722947962084) },
1068 { FRAC_CONST(0.834862874986380), FRAC_CONST(0.550457972936605) },
1069 { FRAC_CONST(0.833057038342201), FRAC_CONST(0.553187102948470) },
1070 { FRAC_CONST(0.831242280326413), FRAC_CONST(0.555910308770889) },
1071 { FRAC_CONST(0.829418620373617), FRAC_CONST(0.558627561240515) },
1072 { FRAC_CONST(0.827586078013746), FRAC_CONST(0.561338831257758) },
1073 { FRAC_CONST(0.825744672871856), FRAC_CONST(0.564044089787093) },
1074 { FRAC_CONST(0.823894424667918), FRAC_CONST(0.566743307857377) },
1075 { FRAC_CONST(0.822035353216601), FRAC_CONST(0.569436456562150) },
1076 { FRAC_CONST(0.820167478427070), FRAC_CONST(0.572123507059955) },
1077 { FRAC_CONST(0.818290820302761), FRAC_CONST(0.574804430574639) },
1078 { FRAC_CONST(0.816405398941175), FRAC_CONST(0.577479198395666) },
1079 { FRAC_CONST(0.814511234533661), FRAC_CONST(0.580147781878420) },
1080 { FRAC_CONST(0.812608347365198), FRAC_CONST(0.582810152444517) },
1081 { FRAC_CONST(0.810696757814178), FRAC_CONST(0.585466281582107) },
1082 { FRAC_CONST(0.808776486352191), FRAC_CONST(0.588116140846181) },
1083 { FRAC_CONST(0.806847553543799), FRAC_CONST(0.590759701858874) },
1084 { FRAC_CONST(0.804909980046325), FRAC_CONST(0.593396936309773) },
1085 { FRAC_CONST(0.802963786609623), FRAC_CONST(0.596027815956215) },
1086 { FRAC_CONST(0.801008994075862), FRAC_CONST(0.598652312623592) },
1087 { FRAC_CONST(0.799045623379300), FRAC_CONST(0.601270398205654) },
1088 { FRAC_CONST(0.797073695546059), FRAC_CONST(0.603882044664808) },
1089 { FRAC_CONST(0.795093231693901), FRAC_CONST(0.606487224032418) },
1090 { FRAC_CONST(0.793104253032005), FRAC_CONST(0.609085908409106) },
1091 { FRAC_CONST(0.791106780860733), FRAC_CONST(0.611678069965050) },
1092 { FRAC_CONST(0.789100836571407), FRAC_CONST(0.614263680940283) },
1093 { FRAC_CONST(0.787086441646080), FRAC_CONST(0.616842713644988) },
1094 { FRAC_CONST(0.785063617657302), FRAC_CONST(0.619415140459796) },
1095 { FRAC_CONST(0.783032386267894), FRAC_CONST(0.621980933836084) },
1096 { FRAC_CONST(0.780992769230711), FRAC_CONST(0.624540066296266) },
1097 { FRAC_CONST(0.778944788388414), FRAC_CONST(0.627092510434089) },
1098 { FRAC_CONST(0.776888465673232), FRAC_CONST(0.629638238914927) },
1099 { FRAC_CONST(0.774823823106730), FRAC_CONST(0.632177224476073) },
1100 { FRAC_CONST(0.772750882799570), FRAC_CONST(0.634709439927031) },
1101 { FRAC_CONST(0.770669666951277), FRAC_CONST(0.637234858149809) },
1102 { FRAC_CONST(0.768580197850002), FRAC_CONST(0.639753452099206) },
1103 { FRAC_CONST(0.766482497872280), FRAC_CONST(0.642265194803105) },
1104 { FRAC_CONST(0.764376589482793), FRAC_CONST(0.644770059362758) },
1105 { FRAC_CONST(0.762262495234126), FRAC_CONST(0.647268018953079) },
1106 { FRAC_CONST(0.760140237766532), FRAC_CONST(0.649759046822928) },
1107 { FRAC_CONST(0.758009839807683), FRAC_CONST(0.652243116295397) },
1108 { FRAC_CONST(0.755871324172429), FRAC_CONST(0.654720200768098) },
1109 { FRAC_CONST(0.753724713762555), FRAC_CONST(0.657190273713446) },
1110 { FRAC_CONST(0.751570031566534), FRAC_CONST(0.659653308678945) },
1111 { FRAC_CONST(0.749407300659280), FRAC_CONST(0.662109279287469) },
1112 { FRAC_CONST(0.747236544201905), FRAC_CONST(0.664558159237545) },
1113 { FRAC_CONST(0.745057785441466), FRAC_CONST(0.666999922303638) },
1114 { FRAC_CONST(0.742871047710719), FRAC_CONST(0.669434542336425) },
1115 { FRAC_CONST(0.740676354427868), FRAC_CONST(0.671861993263083) },
1116 { FRAC_CONST(0.738473729096316), FRAC_CONST(0.674282249087562) },
1117 { FRAC_CONST(0.736263195304409), FRAC_CONST(0.676695283890867) },
1118 { FRAC_CONST(0.734044776725190), FRAC_CONST(0.679101071831334) },
1119 { FRAC_CONST(0.731818497116138), FRAC_CONST(0.681499587144906) },
1120 { FRAC_CONST(0.729584380318920), FRAC_CONST(0.683890804145412) },
1121 { FRAC_CONST(0.727342450259131), FRAC_CONST(0.686274697224838) },
1122 { FRAC_CONST(0.725092730946042), FRAC_CONST(0.688651240853606) },
1123 { FRAC_CONST(0.722835246472338), FRAC_CONST(0.691020409580841) },
1124 { FRAC_CONST(0.720570021013866), FRAC_CONST(0.693382178034651) },
1125 { FRAC_CONST(0.718297078829369), FRAC_CONST(0.695736520922392) },
1126 { FRAC_CONST(0.716016444260233), FRAC_CONST(0.698083413030944) },
1127 { FRAC_CONST(0.713728141730222), FRAC_CONST(0.700422829226978) },
1128 { FRAC_CONST(0.711432195745216), FRAC_CONST(0.702754744457225) },
1129 { FRAC_CONST(0.709128630892954), FRAC_CONST(0.705079133748748) },
1130 { FRAC_CONST(0.706817471842764), FRAC_CONST(0.707395972209203) },
1131 { FRAC_CONST(0.704498743345302), FRAC_CONST(0.709705235027113) },
1132 { FRAC_CONST(0.702172470232289), FRAC_CONST(0.712006897472128) },
1133 { FRAC_CONST(0.699838677416240), FRAC_CONST(0.714300934895292) },
1134 { FRAC_CONST(0.697497389890200), FRAC_CONST(0.716587322729308) },
1135 { FRAC_CONST(0.695148632727480), FRAC_CONST(0.718866036488799) },
1136 { FRAC_CONST(0.692792431081381), FRAC_CONST(0.721137051770570) },
1137 { FRAC_CONST(0.690428810184929), FRAC_CONST(0.723400344253874) },
1138 { FRAC_CONST(0.688057795350606), FRAC_CONST(0.725655889700665) },
1139 { FRAC_CONST(0.685679411970075), FRAC_CONST(0.727903663955865) },
1140 { FRAC_CONST(0.683293685513912), FRAC_CONST(0.730143642947616) },
1141 { FRAC_CONST(0.680900641531330), FRAC_CONST(0.732375802687543) },
1142 { FRAC_CONST(0.678500305649909), FRAC_CONST(0.734600119271009) },
1143 { FRAC_CONST(0.676092703575316), FRAC_CONST(0.736816568877370) },
1144 { FRAC_CONST(0.673677861091036), FRAC_CONST(0.739025127770231) },
1145 { FRAC_CONST(0.671255804058092), FRAC_CONST(0.741225772297702) },
1146 { FRAC_CONST(0.668826558414768), FRAC_CONST(0.743418478892647) },
1147 { FRAC_CONST(0.666390150176334), FRAC_CONST(0.745603224072940) },
1148 { FRAC_CONST(0.663946605434765), FRAC_CONST(0.747779984441716) },
1149 { FRAC_CONST(0.661495950358462), FRAC_CONST(0.749948736687619) },
1150 { FRAC_CONST(0.659038211191971), FRAC_CONST(0.752109457585056) },
1151 { FRAC_CONST(0.656573414255705), FRAC_CONST(0.754262123994441) },
1152 { FRAC_CONST(0.654101585945659), FRAC_CONST(0.756406712862448) },
1153 { FRAC_CONST(0.651622752733128), FRAC_CONST(0.758543201222251) },
1154 { FRAC_CONST(0.649136941164425), FRAC_CONST(0.760671566193777) },
1155 { FRAC_CONST(0.646644177860593), FRAC_CONST(0.762791784983948) },
1156 { FRAC_CONST(0.644144489517126), FRAC_CONST(0.764903834886923) },
1157 { FRAC_CONST(0.641637902903677), FRAC_CONST(0.767007693284345) },
1158 { FRAC_CONST(0.639124444863776), FRAC_CONST(0.769103337645580) },
1159 { FRAC_CONST(0.636604142314538), FRAC_CONST(0.771190745527961) },
1160 { FRAC_CONST(0.634077022246379), FRAC_CONST(0.773269894577026) },
1161 { FRAC_CONST(0.631543111722725), FRAC_CONST(0.775340762526760) },
1162 { FRAC_CONST(0.629002437879721), FRAC_CONST(0.777403327199831) },
1163 { FRAC_CONST(0.626455027925944), FRAC_CONST(0.779457566507828) },
1164 { FRAC_CONST(0.623900909142107), FRAC_CONST(0.781503458451498) },
1165 { FRAC_CONST(0.621340108880771), FRAC_CONST(0.783540981120982) },
1166 { FRAC_CONST(0.618772654566049), FRAC_CONST(0.785570112696050) },
1167 { FRAC_CONST(0.616198573693314), FRAC_CONST(0.787590831446332) },
1168 { FRAC_CONST(0.613617893828905), FRAC_CONST(0.789603115731555) },
1169 { FRAC_CONST(0.611030642609828), FRAC_CONST(0.791606944001769) },
1170 { FRAC_CONST(0.608436847743468), FRAC_CONST(0.793602294797585) },
1171 { FRAC_CONST(0.605836537007281), FRAC_CONST(0.795589146750397) },
1172 { FRAC_CONST(0.603229738248508), FRAC_CONST(0.797567478582619) },
1173 { FRAC_CONST(0.600616479383869), FRAC_CONST(0.799537269107905) },
1174 { FRAC_CONST(0.597996788399267), FRAC_CONST(0.801498497231381) },
1175 { FRAC_CONST(0.595370693349487), FRAC_CONST(0.803451141949871) },
1176 { FRAC_CONST(0.592738222357898), FRAC_CONST(0.805395182352117) },
1177 { FRAC_CONST(0.590099403616149), FRAC_CONST(0.807330597619008) },
1178 { FRAC_CONST(0.587454265383869), FRAC_CONST(0.809257367023803) },
1179 { FRAC_CONST(0.584802835988364), FRAC_CONST(0.811175469932349) },
1180 { FRAC_CONST(0.582145143824311), FRAC_CONST(0.813084885803304) },
1181 { FRAC_CONST(0.579481217353460), FRAC_CONST(0.814985594188359) },
1182 { FRAC_CONST(0.576811085104321), FRAC_CONST(0.816877574732454) },
1183 { FRAC_CONST(0.574134775671867), FRAC_CONST(0.818760807173997) },
1184 { FRAC_CONST(0.571452317717222), FRAC_CONST(0.820635271345081) },
1185 { FRAC_CONST(0.568763739967354), FRAC_CONST(0.822500947171703) },
1186 { FRAC_CONST(0.566069071214772), FRAC_CONST(0.824357814673971) },
1187 { FRAC_CONST(0.563368340317214), FRAC_CONST(0.826205853966327) },
1188 { FRAC_CONST(0.560661576197336), FRAC_CONST(0.828045045257756) },
1189 { FRAC_CONST(0.557948807842409), FRAC_CONST(0.829875368851995) },
1190 { FRAC_CONST(0.555230064304002), FRAC_CONST(0.831696805147750) },
1191 { FRAC_CONST(0.552505374697674), FRAC_CONST(0.833509334638900) },
1192 { FRAC_CONST(0.549774768202663), FRAC_CONST(0.835312937914713) },
1193 { FRAC_CONST(0.547038274061568), FRAC_CONST(0.837107595660044) },
1194 { FRAC_CONST(0.544295921580046), FRAC_CONST(0.838893288655553) },
1195 { FRAC_CONST(0.541547740126486), FRAC_CONST(0.840669997777901) },
1196 { FRAC_CONST(0.538793759131706), FRAC_CONST(0.842437703999961) },
1197 { FRAC_CONST(0.536034008088628), FRAC_CONST(0.844196388391019) },
1198 { FRAC_CONST(0.533268516551970), FRAC_CONST(0.845946032116980) },
1199 { FRAC_CONST(0.530497314137923), FRAC_CONST(0.847686616440563) },
1200 { FRAC_CONST(0.527720430523840), FRAC_CONST(0.849418122721510) },
1201 { FRAC_CONST(0.524937895447912), FRAC_CONST(0.851140532416778) },
1202 { FRAC_CONST(0.522149738708856), FRAC_CONST(0.852853827080745) },
1203 { FRAC_CONST(0.519355990165590), FRAC_CONST(0.854557988365401) },
1204 { FRAC_CONST(0.516556679736915), FRAC_CONST(0.856252998020546) },
1205 { FRAC_CONST(0.513751837401199), FRAC_CONST(0.857938837893991) },
1206 { FRAC_CONST(0.510941493196049), FRAC_CONST(0.859615489931744) },
1207 { FRAC_CONST(0.508125677217994), FRAC_CONST(0.861282936178208) },
1208 { FRAC_CONST(0.505304419622159), FRAC_CONST(0.862941158776375) },
1209 { FRAC_CONST(0.502477750621949), FRAC_CONST(0.864590139968012) },
1210 { FRAC_CONST(0.499645700488717), FRAC_CONST(0.866229862093855) },
1211 { FRAC_CONST(0.496808299551444), FRAC_CONST(0.867860307593799) },
1212 { FRAC_CONST(0.493965578196415), FRAC_CONST(0.869481459007080) },
1213 { FRAC_CONST(0.491117566866892), FRAC_CONST(0.871093298972471) },
1214 { FRAC_CONST(0.488264296062789), FRAC_CONST(0.872695810228461) },
1215 { FRAC_CONST(0.485405796340343), FRAC_CONST(0.874288975613440) },
1216 { FRAC_CONST(0.482542098311789), FRAC_CONST(0.875872778065888) },
1217 { FRAC_CONST(0.479673232645033), FRAC_CONST(0.877447200624553) },
1218 { FRAC_CONST(0.476799230063322), FRAC_CONST(0.879012226428633) },
1219 { FRAC_CONST(0.473920121344914), FRAC_CONST(0.880567838717962) },
1220 { FRAC_CONST(0.471035937322751), FRAC_CONST(0.882114020833179) },
1221 { FRAC_CONST(0.468146708884125), FRAC_CONST(0.883650756215917) },
1222 { FRAC_CONST(0.465252466970353), FRAC_CONST(0.885178028408975) },
1223 { FRAC_CONST(0.462353242576441), FRAC_CONST(0.886695821056495) },
1224 { FRAC_CONST(0.459449066750752), FRAC_CONST(0.888204117904136) },
1225 { FRAC_CONST(0.456539970594675), FRAC_CONST(0.889702902799251) },
1226 { FRAC_CONST(0.453625985262295), FRAC_CONST(0.891192159691058) },
1227 { FRAC_CONST(0.450707141960053), FRAC_CONST(0.892671872630812) },
1228 { FRAC_CONST(0.447783471946415), FRAC_CONST(0.894142025771977) },
1229 { FRAC_CONST(0.444855006531538), FRAC_CONST(0.895602603370393) },
1230 { FRAC_CONST(0.441921777076935), FRAC_CONST(0.897053589784447) },
1231 { FRAC_CONST(0.438983814995137), FRAC_CONST(0.898494969475242) },
1232 { FRAC_CONST(0.436041151749356), FRAC_CONST(0.899926727006758) },
1233 { FRAC_CONST(0.433093818853152), FRAC_CONST(0.901348847046022) },
1234 { FRAC_CONST(0.430141847870093), FRAC_CONST(0.902761314363272) },
1235 { FRAC_CONST(0.427185270413416), FRAC_CONST(0.904164113832116) },
1236 { FRAC_CONST(0.424224118145690), FRAC_CONST(0.905557230429701) },
1237 { FRAC_CONST(0.421258422778478), FRAC_CONST(0.906940649236866) },
1238 { FRAC_CONST(0.418288216071994), FRAC_CONST(0.908314355438308) },
1239 { FRAC_CONST(0.415313529834766), FRAC_CONST(0.909678334322736) },
1240 { FRAC_CONST(0.412334395923293), FRAC_CONST(0.911032571283032) },
1241 { FRAC_CONST(0.409350846241706), FRAC_CONST(0.912377051816407) },
1242 { FRAC_CONST(0.406362912741425), FRAC_CONST(0.913711761524555) },
1243 { FRAC_CONST(0.403370627420818), FRAC_CONST(0.915036686113806) },
1244 { FRAC_CONST(0.400374022324857), FRAC_CONST(0.916351811395282) },
1245 { FRAC_CONST(0.397373129544774), FRAC_CONST(0.917657123285050) },
1246 { FRAC_CONST(0.394367981217720), FRAC_CONST(0.918952607804266) },
1247 { FRAC_CONST(0.391358609526420), FRAC_CONST(0.920238251079332) },
1248 { FRAC_CONST(0.388345046698826), FRAC_CONST(0.921514039342042) },
1249 { FRAC_CONST(0.385327325007776), FRAC_CONST(0.922779958929729) },
1250 { FRAC_CONST(0.382305476770645), FRAC_CONST(0.924035996285410) },
1251 { FRAC_CONST(0.379279534348999), FRAC_CONST(0.925282137957935) },
1252 { FRAC_CONST(0.376249530148250), FRAC_CONST(0.926518370602127) },
1253 { FRAC_CONST(0.373215496617310), FRAC_CONST(0.927744680978929) },
1254 { FRAC_CONST(0.370177466248239), FRAC_CONST(0.928961055955541) },
1255 { FRAC_CONST(0.367135471575903), FRAC_CONST(0.930167482505564) },
1256 { FRAC_CONST(0.364089545177621), FRAC_CONST(0.931363947709140) },
1257 { FRAC_CONST(0.361039719672816), FRAC_CONST(0.932550438753087) },
1258 { FRAC_CONST(0.357986027722671), FRAC_CONST(0.933726942931039) },
1259 { FRAC_CONST(0.354928502029772), FRAC_CONST(0.934893447643582) },
1260 { FRAC_CONST(0.351867175337763), FRAC_CONST(0.936049940398387) },
1261 { FRAC_CONST(0.348802080430994), FRAC_CONST(0.937196408810347) },
1262 { FRAC_CONST(0.345733250134169), FRAC_CONST(0.938332840601705) },
1263 { FRAC_CONST(0.342660717311994), FRAC_CONST(0.939459223602190) },
1264 { FRAC_CONST(0.339584514868829), FRAC_CONST(0.940575545749145) },
1265 { FRAC_CONST(0.336504675748328), FRAC_CONST(0.941681795087657) },
1266 { FRAC_CONST(0.333421232933097), FRAC_CONST(0.942777959770684) },
1267 { FRAC_CONST(0.330334219444328), FRAC_CONST(0.943864028059183) },
1268 { FRAC_CONST(0.327243668341457), FRAC_CONST(0.944939988322235) },
1269 { FRAC_CONST(0.324149612721804), FRAC_CONST(0.946005829037171) },
1270 { FRAC_CONST(0.321052085720218), FRAC_CONST(0.947061538789691) },
1271 { FRAC_CONST(0.317951120508725), FRAC_CONST(0.948107106273994) },
1272 { FRAC_CONST(0.314846750296171), FRAC_CONST(0.949142520292891) },
1273 { FRAC_CONST(0.311739008327867), FRAC_CONST(0.950167769757930) },
1274 { FRAC_CONST(0.308627927885232), FRAC_CONST(0.951182843689513) },
1275 { FRAC_CONST(0.305513542285440), FRAC_CONST(0.952187731217013) },
1276 { FRAC_CONST(0.302395884881056), FRAC_CONST(0.953182421578893) },
1277 { FRAC_CONST(0.299274989059689), FRAC_CONST(0.954166904122818) },
1278 { FRAC_CONST(0.296150888243624), FRAC_CONST(0.955141168305771) },
1279 { FRAC_CONST(0.293023615889471), FRAC_CONST(0.956105203694164) },
1280 { FRAC_CONST(0.289893205487806), FRAC_CONST(0.957058999963955) },
1281 { FRAC_CONST(0.286759690562807), FRAC_CONST(0.958002546900750) },
1282 { FRAC_CONST(0.283623104671904), FRAC_CONST(0.958935834399920) },
1283 { FRAC_CONST(0.280483481405410), FRAC_CONST(0.959858852466706) },
1284 { FRAC_CONST(0.277340854386169), FRAC_CONST(0.960771591216325) },
1285 { FRAC_CONST(0.274195257269191), FRAC_CONST(0.961674040874080) },
1286 { FRAC_CONST(0.271046723741295), FRAC_CONST(0.962566191775459) },
1287 { FRAC_CONST(0.267895287520743), FRAC_CONST(0.963448034366243) },
1288 { FRAC_CONST(0.264740982356888), FRAC_CONST(0.964319559202607) },
1289 { FRAC_CONST(0.261583842029803), FRAC_CONST(0.965180756951218) },
1290 { FRAC_CONST(0.258423900349924), FRAC_CONST(0.966031618389343) },
1291 { FRAC_CONST(0.255261191157689), FRAC_CONST(0.966872134404937) },
1292 { FRAC_CONST(0.252095748323171), FRAC_CONST(0.967702295996750) },
1293 { FRAC_CONST(0.248927605745720), FRAC_CONST(0.968522094274417) },
1294 { FRAC_CONST(0.245756797353599), FRAC_CONST(0.969331520458559) },
1295 { FRAC_CONST(0.242583357103617), FRAC_CONST(0.970130565880871) },
1296 { FRAC_CONST(0.239407318980770), FRAC_CONST(0.970919221984218) },
1297 { FRAC_CONST(0.236228716997876), FRAC_CONST(0.971697480322728) },
1298 { FRAC_CONST(0.233047585195206), FRAC_CONST(0.972465332561878) },
1299 { FRAC_CONST(0.229863957640129), FRAC_CONST(0.973222770478587) },
1300 { FRAC_CONST(0.226677868426735), FRAC_CONST(0.973969785961306) },
1301 { FRAC_CONST(0.223489351675482), FRAC_CONST(0.974706371010097) },
1302 { FRAC_CONST(0.220298441532823), FRAC_CONST(0.975432517736727) },
1303 { FRAC_CONST(0.217105172170841), FRAC_CONST(0.976148218364747) },
1304 { FRAC_CONST(0.213909577786886), FRAC_CONST(0.976853465229579) },
1305 { FRAC_CONST(0.210711692603206), FRAC_CONST(0.977548250778596) },
1306 { FRAC_CONST(0.207511550866582), FRAC_CONST(0.978232567571202) },
1307 { FRAC_CONST(0.204309186847962), FRAC_CONST(0.978906408278914) },
1308 { FRAC_CONST(0.201104634842092), FRAC_CONST(0.979569765685441) },
1309 { FRAC_CONST(0.197897929167148), FRAC_CONST(0.980222632686756) },
1310 { FRAC_CONST(0.194689104164373), FRAC_CONST(0.980865002291179) },
1311 { FRAC_CONST(0.191478194197704), FRAC_CONST(0.981496867619447) },
1312 { FRAC_CONST(0.188265233653407), FRAC_CONST(0.982118221904791) },
1313 { FRAC_CONST(0.185050256939710), FRAC_CONST(0.982729058493005) },
1314 { FRAC_CONST(0.181833298486427), FRAC_CONST(0.983329370842520) },
1315 { FRAC_CONST(0.178614392744603), FRAC_CONST(0.983919152524473) },
1316 { FRAC_CONST(0.175393574186129), FRAC_CONST(0.984498397222776) },
1317 { FRAC_CONST(0.172170877303385), FRAC_CONST(0.985067098734184) },
1318 { FRAC_CONST(0.168946336608867), FRAC_CONST(0.985625250968360) },
1319 { FRAC_CONST(0.165719986634814), FRAC_CONST(0.986172847947943) },
1320 { FRAC_CONST(0.162491861932842), FRAC_CONST(0.986709883808609) },
1321 { FRAC_CONST(0.159261997073573), FRAC_CONST(0.987236352799134) },
1322 { FRAC_CONST(0.156030426646266), FRAC_CONST(0.987752249281460) },
1323 { FRAC_CONST(0.152797185258443), FRAC_CONST(0.988257567730749) },
1324 { FRAC_CONST(0.149562307535523), FRAC_CONST(0.988752302735447) },
1325 { FRAC_CONST(0.146325828120446), FRAC_CONST(0.989236448997339) },
1326 { FRAC_CONST(0.143087781673307), FRAC_CONST(0.989710001331608) },
1327 { FRAC_CONST(0.139848202870981), FRAC_CONST(0.990172954666889) },
1328 { FRAC_CONST(0.136607126406757), FRAC_CONST(0.990625304045323) },
1329 { FRAC_CONST(0.133364586989957), FRAC_CONST(0.991067044622612) },
1330 { FRAC_CONST(0.130120619345575), FRAC_CONST(0.991498171668069) },
1331 { FRAC_CONST(0.126875258213898), FRAC_CONST(0.991918680564670) },
1332 { FRAC_CONST(0.123628538350136), FRAC_CONST(0.992328566809103) },
1333 { FRAC_CONST(0.120380494524051), FRAC_CONST(0.992727826011815) },
1334 { FRAC_CONST(0.117131161519582), FRAC_CONST(0.993116453897061) },
1335 { FRAC_CONST(0.113880574134475), FRAC_CONST(0.993494446302948) },
1336 { FRAC_CONST(0.110628767179910), FRAC_CONST(0.993861799181482) },
1337 { FRAC_CONST(0.107375775480128), FRAC_CONST(0.994218508598608) },
1338 { FRAC_CONST(0.104121633872055), FRAC_CONST(0.994564570734255) },
1339 { FRAC_CONST(0.100866377204933), FRAC_CONST(0.994899981882376) },
1340 { FRAC_CONST(0.097610040339947), FRAC_CONST(0.995224738450986) },
1341 { FRAC_CONST(0.094352658149849), FRAC_CONST(0.995538836962204) },
1342 { FRAC_CONST(0.091094265518583), FRAC_CONST(0.995842274052287) },
1343 { FRAC_CONST(0.087834897340919), FRAC_CONST(0.996135046471667) },
1344 { FRAC_CONST(0.084574588522070), FRAC_CONST(0.996417151084987) },
1345 { FRAC_CONST(0.081313373977324), FRAC_CONST(0.996688584871134) },
1346 { FRAC_CONST(0.078051288631670), FRAC_CONST(0.996949344923269) },
1347 { FRAC_CONST(0.074788367419420), FRAC_CONST(0.997199428448862) },
1348 { FRAC_CONST(0.071524645283840), FRAC_CONST(0.997438832769720) },
1349 { FRAC_CONST(0.068260157176771), FRAC_CONST(0.997667555322013) },
1350 { FRAC_CONST(0.064994938058259), FRAC_CONST(0.997885593656308) },
1351 { FRAC_CONST(0.061729022896176), FRAC_CONST(0.998092945437590) },
1352 { FRAC_CONST(0.058462446665851), FRAC_CONST(0.998289608445286) },
1353 { FRAC_CONST(0.055195244349690), FRAC_CONST(0.998475580573295) },
1354 { FRAC_CONST(0.051927450936806), FRAC_CONST(0.998650859830004) },
1355 { FRAC_CONST(0.048659101422640), FRAC_CONST(0.998815444338313) },
1356 { FRAC_CONST(0.045390230808591), FRAC_CONST(0.998969332335654) },
1357 { FRAC_CONST(0.042120874101635), FRAC_CONST(0.999112522174011) },
1358 { FRAC_CONST(0.038851066313958), FRAC_CONST(0.999245012319936) },
1359 { FRAC_CONST(0.035580842462574), FRAC_CONST(0.999366801354564) },
1360 { FRAC_CONST(0.032310237568951), FRAC_CONST(0.999477887973635) },
1361 { FRAC_CONST(0.029039286658643), FRAC_CONST(0.999578270987499) },
1362 { FRAC_CONST(0.025768024760904), FRAC_CONST(0.999667949321134) },
1363 { FRAC_CONST(0.022496486908322), FRAC_CONST(0.999746922014158) },
1364 { FRAC_CONST(0.019224708136438), FRAC_CONST(0.999815188220837) },
1365 { FRAC_CONST(0.015952723483375), FRAC_CONST(0.999872747210095) },
1366 { FRAC_CONST(0.012680567989461), FRAC_CONST(0.999919598365521) },
1367 { FRAC_CONST(0.009408276696850), FRAC_CONST(0.999955741185376) },
1368 { FRAC_CONST(0.006135884649155), FRAC_CONST(0.999981175282601) },
1369 { FRAC_CONST(0.002863426891064), FRAC_CONST(0.999995900384816) }
1370};
1371
1372#ifdef LD_DEC
1373/* 240 (N/4) complex twiddle factors */
1374ALIGN static const complex_t mdct_tab_960[] =
1375{
1376 { FRAC_CONST(0.999999665337326), FRAC_CONST(0.000818122995607) },
1377 { FRAC_CONST(0.999972892444367), FRAC_CONST(0.007363041249780) },
1378 { FRAC_CONST(0.999903284040864), FRAC_CONST(0.013907644095771) },
1379 { FRAC_CONST(0.999790843108610), FRAC_CONST(0.020451651184577) },
1380 { FRAC_CONST(0.999635574464198), FRAC_CONST(0.026994782192715) },
1381 { FRAC_CONST(0.999437484758823), FRAC_CONST(0.033536756834230) },
1382 { FRAC_CONST(0.999196582477986), FRAC_CONST(0.040077294872701) },
1383 { FRAC_CONST(0.998912877941140), FRAC_CONST(0.046616116133247) },
1384 { FRAC_CONST(0.998586383301244), FRAC_CONST(0.053152940514528) },
1385 { FRAC_CONST(0.998217112544241), FRAC_CONST(0.059687488000744) },
1386 { FRAC_CONST(0.997805081488460), FRAC_CONST(0.066219478673630) },
1387 { FRAC_CONST(0.997350307783942), FRAC_CONST(0.072748632724445) },
1388 { FRAC_CONST(0.996852810911678), FRAC_CONST(0.079274670465961) },
1389 { FRAC_CONST(0.996312612182778), FRAC_CONST(0.085797312344440) },
1390 { FRAC_CONST(0.995729734737558), FRAC_CONST(0.092316278951614) },
1391 { FRAC_CONST(0.995104203544548), FRAC_CONST(0.098831291036650) },
1392 { FRAC_CONST(0.994436045399422), FRAC_CONST(0.105342069518114) },
1393 { FRAC_CONST(0.993725288923851), FRAC_CONST(0.111848335495926) },
1394 { FRAC_CONST(0.992971964564277), FRAC_CONST(0.118349810263305) },
1395 { FRAC_CONST(0.992176104590608), FRAC_CONST(0.124846215318711) },
1396 { FRAC_CONST(0.991337743094838), FRAC_CONST(0.131337272377774) },
1397 { FRAC_CONST(0.990456915989581), FRAC_CONST(0.137822703385212) },
1398 { FRAC_CONST(0.989533661006540), FRAC_CONST(0.144302230526747) },
1399 { FRAC_CONST(0.988568017694885), FRAC_CONST(0.150775576241001) },
1400 { FRAC_CONST(0.987560027419562), FRAC_CONST(0.157242463231389) },
1401 { FRAC_CONST(0.986509733359519), FRAC_CONST(0.163702614477995) },
1402 { FRAC_CONST(0.985417180505858), FRAC_CONST(0.170155753249442) },
1403 { FRAC_CONST(0.984282415659907), FRAC_CONST(0.176601603114742) },
1404 { FRAC_CONST(0.983105487431216), FRAC_CONST(0.183039887955141) },
1405 { FRAC_CONST(0.981886446235473), FRAC_CONST(0.189470331975943) },
1406 { FRAC_CONST(0.980625344292344), FRAC_CONST(0.195892659718330) },
1407 { FRAC_CONST(0.979322235623241), FRAC_CONST(0.202306596071156) },
1408 { FRAC_CONST(0.977977176049000), FRAC_CONST(0.208711866282735) },
1409 { FRAC_CONST(0.976590223187499), FRAC_CONST(0.215108195972610) },
1410 { FRAC_CONST(0.975161436451181), FRAC_CONST(0.221495311143304) },
1411 { FRAC_CONST(0.973690877044515), FRAC_CONST(0.227872938192063) },
1412 { FRAC_CONST(0.972178607961371), FRAC_CONST(0.234240803922570) },
1413 { FRAC_CONST(0.970624693982323), FRAC_CONST(0.240598635556650) },
1414 { FRAC_CONST(0.969029201671875), FRAC_CONST(0.246946160745958) },
1415 { FRAC_CONST(0.967392199375607), FRAC_CONST(0.253283107583640) },
1416 { FRAC_CONST(0.965713757217249), FRAC_CONST(0.259609204615985) },
1417 { FRAC_CONST(0.963993947095677), FRAC_CONST(0.265924180854051) },
1418 { FRAC_CONST(0.962232842681832), FRAC_CONST(0.272227765785273) },
1419 { FRAC_CONST(0.960430519415566), FRAC_CONST(0.278519689385053) },
1420 { FRAC_CONST(0.958587054502409), FRAC_CONST(0.284799682128326) },
1421 { FRAC_CONST(0.956702526910263), FRAC_CONST(0.291067475001103) },
1422 { FRAC_CONST(0.954777017366017), FRAC_CONST(0.297322799511998) },
1423 { FRAC_CONST(0.952810608352092), FRAC_CONST(0.303565387703730) },
1424 { FRAC_CONST(0.950803384102905), FRAC_CONST(0.309794972164597) },
1425 { FRAC_CONST(0.948755430601263), FRAC_CONST(0.316011286039934) },
1426 { FRAC_CONST(0.946666835574676), FRAC_CONST(0.322214063043544) },
1427 { FRAC_CONST(0.944537688491606), FRAC_CONST(0.328403037469105) },
1428 { FRAC_CONST(0.942368080557626), FRAC_CONST(0.334577944201551) },
1429 { FRAC_CONST(0.940158104711519), FRAC_CONST(0.340738518728429) },
1430 { FRAC_CONST(0.937907855621296), FRAC_CONST(0.346884497151231) },
1431 { FRAC_CONST(0.935617429680138), FRAC_CONST(0.353015616196696) },
1432 { FRAC_CONST(0.933286925002268), FRAC_CONST(0.359131613228090) },
1433 { FRAC_CONST(0.930916441418752), FRAC_CONST(0.365232226256457) },
1434 { FRAC_CONST(0.928506080473216), FRAC_CONST(0.371317193951838) },
1435 { FRAC_CONST(0.926055945417500), FRAC_CONST(0.377386255654469) },
1436 { FRAC_CONST(0.923566141207236), FRAC_CONST(0.383439151385947) },
1437 { FRAC_CONST(0.921036774497350), FRAC_CONST(0.389475621860365) },
1438 { FRAC_CONST(0.918467953637492), FRAC_CONST(0.395495408495417) },
1439 { FRAC_CONST(0.915859788667400), FRAC_CONST(0.401498253423481) },
1440 { FRAC_CONST(0.913212391312179), FRAC_CONST(0.407483899502658) },
1441 { FRAC_CONST(0.910525874977521), FRAC_CONST(0.413452090327791) },
1442 { FRAC_CONST(0.907800354744844), FRAC_CONST(0.419402570241451) },
1443 { FRAC_CONST(0.905035947366364), FRAC_CONST(0.425335084344881) },
1444 { FRAC_CONST(0.902232771260093), FRAC_CONST(0.431249378508924) },
1445 { FRAC_CONST(0.899390946504764), FRAC_CONST(0.437145199384900) },
1446 { FRAC_CONST(0.896510594834693), FRAC_CONST(0.443022294415467) },
1447 { FRAC_CONST(0.893591839634558), FRAC_CONST(0.448880411845433) },
1448 { FRAC_CONST(0.890634805934118), FRAC_CONST(0.454719300732547) },
1449 { FRAC_CONST(0.887639620402854), FRAC_CONST(0.460538710958240) },
1450 { FRAC_CONST(0.884606411344546), FRAC_CONST(0.466338393238348) },
1451 { FRAC_CONST(0.881535308691775), FRAC_CONST(0.472118099133784) },
1452 { FRAC_CONST(0.878426444000357), FRAC_CONST(0.477877581061184) },
1453 { FRAC_CONST(0.875279950443708), FRAC_CONST(0.483616592303511) },
1454 { FRAC_CONST(0.872095962807140), FRAC_CONST(0.489334887020625) },
1455 { FRAC_CONST(0.868874617482085), FRAC_CONST(0.495032220259813) },
1456 { FRAC_CONST(0.865616052460258), FRAC_CONST(0.500708347966279) },
1457 { FRAC_CONST(0.862320407327736), FRAC_CONST(0.506363026993605) },
1458 { FRAC_CONST(0.858987823258990), FRAC_CONST(0.511996015114162) },
1459 { FRAC_CONST(0.855618443010829), FRAC_CONST(0.517607071029487) },
1460 { FRAC_CONST(0.852212410916289), FRAC_CONST(0.523195954380619) },
1461 { FRAC_CONST(0.848769872878448), FRAC_CONST(0.528762425758396) },
1462 { FRAC_CONST(0.845290976364179), FRAC_CONST(0.534306246713712) },
1463 { FRAC_CONST(0.841775870397828), FRAC_CONST(0.539827179767727) },
1464 { FRAC_CONST(0.838224705554838), FRAC_CONST(0.545324988422046) },
1465 { FRAC_CONST(0.834637633955290), FRAC_CONST(0.550799437168844) },
1466 { FRAC_CONST(0.831014809257393), FRAC_CONST(0.556250291500956) },
1467 { FRAC_CONST(0.827356386650900), FRAC_CONST(0.561677317921925) },
1468 { FRAC_CONST(0.823662522850458), FRAC_CONST(0.567080283956001) },
1469 { FRAC_CONST(0.819933376088899), FRAC_CONST(0.572458958158102) },
1470 { FRAC_CONST(0.816169106110459), FRAC_CONST(0.577813110123727) },
1471 { FRAC_CONST(0.812369874163934), FRAC_CONST(0.583142510498826) },
1472 { FRAC_CONST(0.808535842995778), FRAC_CONST(0.588446930989624) },
1473 { FRAC_CONST(0.804667176843123), FRAC_CONST(0.593726144372402) },
1474 { FRAC_CONST(0.800764041426753), FRAC_CONST(0.598979924503229) },
1475 { FRAC_CONST(0.796826603943998), FRAC_CONST(0.604208046327650) },
1476 { FRAC_CONST(0.792855033061574), FRAC_CONST(0.609410285890327) },
1477 { FRAC_CONST(0.788849498908361), FRAC_CONST(0.614586420344631) },
1478 { FRAC_CONST(0.784810173068109), FRAC_CONST(0.619736227962191) },
1479 { FRAC_CONST(0.780737228572094), FRAC_CONST(0.624859488142386) },
1480 { FRAC_CONST(0.776630839891703), FRAC_CONST(0.629955981421804) },
1481 { FRAC_CONST(0.772491182930959), FRAC_CONST(0.635025489483633) },
1482 { FRAC_CONST(0.768318435018988), FRAC_CONST(0.640067795167023) },
1483 { FRAC_CONST(0.764112774902423), FRAC_CONST(0.645082682476378) },
1484 { FRAC_CONST(0.759874382737746), FRAC_CONST(0.650069936590618) },
1485 { FRAC_CONST(0.755603440083571), FRAC_CONST(0.655029343872374) },
1486 { FRAC_CONST(0.751300129892866), FRAC_CONST(0.659960691877147) },
1487 { FRAC_CONST(0.746964636505118), FRAC_CONST(0.664863769362399) },
1488 { FRAC_CONST(0.742597145638433), FRAC_CONST(0.669738366296610) },
1489 { FRAC_CONST(0.738197844381584), FRAC_CONST(0.674584273868271) },
1490 { FRAC_CONST(0.733766921185995), FRAC_CONST(0.679401284494831) },
1491 { FRAC_CONST(0.729304565857668), FRAC_CONST(0.684189191831585) },
1492 { FRAC_CONST(0.724810969549055), FRAC_CONST(0.688947790780520) },
1493 { FRAC_CONST(0.720286324750863), FRAC_CONST(0.693676877499095) },
1494 { FRAC_CONST(0.715730825283819), FRAC_CONST(0.698376249408973) },
1495 { FRAC_CONST(0.711144666290356), FRAC_CONST(0.703045705204703) },
1496 { FRAC_CONST(0.706528044226263), FRAC_CONST(0.707685044862340) },
1497 { FRAC_CONST(0.701881156852263), FRAC_CONST(0.712294069648014) },
1498 { FRAC_CONST(0.697204203225545), FRAC_CONST(0.716872582126442) },
1499 { FRAC_CONST(0.692497383691237), FRAC_CONST(0.721420386169390) },
1500 { FRAC_CONST(0.687760899873822), FRAC_CONST(0.725937286964068) },
1501 { FRAC_CONST(0.682994954668502), FRAC_CONST(0.730423091021479) },
1502 { FRAC_CONST(0.678199752232508), FRAC_CONST(0.734877606184707) },
1503 { FRAC_CONST(0.673375497976352), FRAC_CONST(0.739300641637149) },
1504 { FRAC_CONST(0.668522398555031), FRAC_CONST(0.743692007910687) },
1505 { FRAC_CONST(0.663640661859171), FRAC_CONST(0.748051516893805) },
1506 { FRAC_CONST(0.658730497006124), FRAC_CONST(0.752378981839648) },
1507 { FRAC_CONST(0.653792114331011), FRAC_CONST(0.756674217374021) },
1508 { FRAC_CONST(0.648825725377709), FRAC_CONST(0.760937039503328) },
1509 { FRAC_CONST(0.643831542889792), FRAC_CONST(0.765167265622459) },
1510 { FRAC_CONST(0.638809780801414), FRAC_CONST(0.769364714522605) },
1511 { FRAC_CONST(0.633760654228152), FRAC_CONST(0.773529206399025) },
1512 { FRAC_CONST(0.628684379457781), FRAC_CONST(0.777660562858748) },
1513 { FRAC_CONST(0.623581173941019), FRAC_CONST(0.781758606928213) },
1514 { FRAC_CONST(0.618451256282204), FRAC_CONST(0.785823163060853) },
1515 { FRAC_CONST(0.613294846229936), FRAC_CONST(0.789854057144609) },
1516 { FRAC_CONST(0.608112164667659), FRAC_CONST(0.793851116509396) },
1517 { FRAC_CONST(0.602903433604202), FRAC_CONST(0.797814169934493) },
1518 { FRAC_CONST(0.597668876164268), FRAC_CONST(0.801743047655882) },
1519 { FRAC_CONST(0.592408716578875), FRAC_CONST(0.805637581373517) },
1520 { FRAC_CONST(0.587123180175754), FRAC_CONST(0.809497604258536) },
1521 { FRAC_CONST(0.581812493369691), FRAC_CONST(0.813322950960406) },
1522 { FRAC_CONST(0.576476883652835), FRAC_CONST(0.817113457614006) },
1523 { FRAC_CONST(0.571116579584947), FRAC_CONST(0.820868961846646) },
1524 { FRAC_CONST(0.565731810783613), FRAC_CONST(0.824589302785025) },
1525 { FRAC_CONST(0.560322807914407), FRAC_CONST(0.828274321062119) },
1526 { FRAC_CONST(0.554889802681009), FRAC_CONST(0.831923858824010) },
1527 { FRAC_CONST(0.549433027815281), FRAC_CONST(0.835537759736646) },
1528 { FRAC_CONST(0.543952717067296), FRAC_CONST(0.839115868992540) },
1529 { FRAC_CONST(0.538449105195327), FRAC_CONST(0.842658033317402) },
1530 { FRAC_CONST(0.532922427955790), FRAC_CONST(0.846164100976699) },
1531 { FRAC_CONST(0.527372922093142), FRAC_CONST(0.849633921782164) },
1532 { FRAC_CONST(0.521800825329746), FRAC_CONST(0.853067347098221) },
1533 { FRAC_CONST(0.516206376355680), FRAC_CONST(0.856464229848356) },
1534 { FRAC_CONST(0.510589814818519), FRAC_CONST(0.859824424521420) },
1535 { FRAC_CONST(0.504951381313066), FRAC_CONST(0.863147787177854) },
1536 { FRAC_CONST(0.499291317371047), FRAC_CONST(0.866434175455865) },
1537 { FRAC_CONST(0.493609865450762), FRAC_CONST(0.869683448577516) },
1538 { FRAC_CONST(0.487907268926702), FRAC_CONST(0.872895467354761) },
1539 { FRAC_CONST(0.482183772079123), FRAC_CONST(0.876070094195407) },
1540 { FRAC_CONST(0.476439620083580), FRAC_CONST(0.879207193109004) },
1541 { FRAC_CONST(0.470675059000427), FRAC_CONST(0.882306629712678) },
1542 { FRAC_CONST(0.464890335764274), FRAC_CONST(0.885368271236879) },
1543 { FRAC_CONST(0.459085698173413), FRAC_CONST(0.888391986531075) },
1544 { FRAC_CONST(0.453261394879198), FRAC_CONST(0.891377646069366) },
1545 { FRAC_CONST(0.447417675375397), FRAC_CONST(0.894325121956035) },
1546 { FRAC_CONST(0.441554789987504), FRAC_CONST(0.897234287931024) },
1547 { FRAC_CONST(0.435672989862017), FRAC_CONST(0.900105019375345) },
1548 { FRAC_CONST(0.429772526955677), FRAC_CONST(0.902937193316419) },
1549 { FRAC_CONST(0.423853654024676), FRAC_CONST(0.905730688433339) },
1550 { FRAC_CONST(0.417916624613831), FRAC_CONST(0.908485385062073) },
1551 { FRAC_CONST(0.411961693045722), FRAC_CONST(0.911201165200584) },
1552 { FRAC_CONST(0.405989114409798), FRAC_CONST(0.913877912513892) },
1553 { FRAC_CONST(0.399999144551449), FRAC_CONST(0.916515512339049) },
1554 { FRAC_CONST(0.393992040061048), FRAC_CONST(0.919113851690058) },
1555 { FRAC_CONST(0.387968058262959), FRAC_CONST(0.921672819262709) },
1556 { FRAC_CONST(0.381927457204511), FRAC_CONST(0.924192305439348) },
1557 { FRAC_CONST(0.375870495644949), FRAC_CONST(0.926672202293573) },
1558 { FRAC_CONST(0.369797433044349), FRAC_CONST(0.929112403594856) },
1559 { FRAC_CONST(0.363708529552499), FRAC_CONST(0.931512804813095) },
1560 { FRAC_CONST(0.357604045997758), FRAC_CONST(0.933873303123091) },
1561 { FRAC_CONST(0.351484243875885), FRAC_CONST(0.936193797408954) },
1562 { FRAC_CONST(0.345349385338836), FRAC_CONST(0.938474188268430) },
1563 { FRAC_CONST(0.339199733183530), FRAC_CONST(0.940714378017165) },
1564 { FRAC_CONST(0.333035550840599), FRAC_CONST(0.942914270692887) },
1565 { FRAC_CONST(0.326857102363098), FRAC_CONST(0.945073772059514) },
1566 { FRAC_CONST(0.320664652415198), FRAC_CONST(0.947192789611197) },
1567 { FRAC_CONST(0.314458466260842), FRAC_CONST(0.949271232576274) },
1568 { FRAC_CONST(0.308238809752391), FRAC_CONST(0.951309011921168) },
1569 { FRAC_CONST(0.302005949319228), FRAC_CONST(0.953306040354194) },
1570 { FRAC_CONST(0.295760151956351), FRAC_CONST(0.955262232329299) },
1571 { FRAC_CONST(0.289501685212929), FRAC_CONST(0.957177504049732) },
1572 { FRAC_CONST(0.283230817180850), FRAC_CONST(0.959051773471624) },
1573 { FRAC_CONST(0.276947816483228), FRAC_CONST(0.960884960307514) },
1574 { FRAC_CONST(0.270652952262902), FRAC_CONST(0.962676986029777) },
1575 { FRAC_CONST(0.264346494170904), FRAC_CONST(0.964427773873996) },
1576 { FRAC_CONST(0.258028712354909), FRAC_CONST(0.966137248842248) },
1577 { FRAC_CONST(0.251699877447663), FRAC_CONST(0.967805337706313) },
1578 { FRAC_CONST(0.245360260555389), FRAC_CONST(0.969431969010818) },
1579 { FRAC_CONST(0.239010133246176), FRAC_CONST(0.971017073076290) },
1580 { FRAC_CONST(0.232649767538342), FRAC_CONST(0.972560582002147) },
1581 { FRAC_CONST(0.226279435888785), FRAC_CONST(0.974062429669605) },
1582 { FRAC_CONST(0.219899411181310), FRAC_CONST(0.975522551744506) },
1583 { FRAC_CONST(0.213509966714943), FRAC_CONST(0.976940885680082) },
1584 { FRAC_CONST(0.207111376192219), FRAC_CONST(0.978317370719628) },
1585 { FRAC_CONST(0.200703913707458), FRAC_CONST(0.979651947899104) },
1586 { FRAC_CONST(0.194287853735029), FRAC_CONST(0.980944560049668) },
1587 { FRAC_CONST(0.187863471117585), FRAC_CONST(0.982195151800116) },
1588 { FRAC_CONST(0.181431041054297), FRAC_CONST(0.983403669579260) },
1589 { FRAC_CONST(0.174990839089060), FRAC_CONST(0.984570061618221) },
1590 { FRAC_CONST(0.168543141098691), FRAC_CONST(0.985694277952645) },
1591 { FRAC_CONST(0.162088223281113), FRAC_CONST(0.986776270424848) },
1592 { FRAC_CONST(0.155626362143520), FRAC_CONST(0.987815992685872) },
1593 { FRAC_CONST(0.149157834490539), FRAC_CONST(0.988813400197476) },
1594 { FRAC_CONST(0.142682917412363), FRAC_CONST(0.989768450234042) },
1595 { FRAC_CONST(0.136201888272891), FRAC_CONST(0.990681101884405) },
1596 { FRAC_CONST(0.129715024697841), FRAC_CONST(0.991551316053606) },
1597 { FRAC_CONST(0.123222604562857), FRAC_CONST(0.992379055464567) },
1598 { FRAC_CONST(0.116724905981611), FRAC_CONST(0.993164284659685) },
1599 { FRAC_CONST(0.110222207293883), FRAC_CONST(0.993906970002356) },
1600 { FRAC_CONST(0.103714787053643), FRAC_CONST(0.994607079678411) },
1601 { FRAC_CONST(0.097202924017115), FRAC_CONST(0.995264583697482) },
1602 { FRAC_CONST(0.090686897130838), FRAC_CONST(0.995879453894286) },
1603 { FRAC_CONST(0.084166985519718), FRAC_CONST(0.996451663929828) },
1604 { FRAC_CONST(0.077643468475068), FRAC_CONST(0.996981189292537) },
1605 { FRAC_CONST(0.071116625442645), FRAC_CONST(0.997468007299307) },
1606 { FRAC_CONST(0.064586736010684), FRAC_CONST(0.997912097096476) },
1607 { FRAC_CONST(0.058054079897912), FRAC_CONST(0.998313439660714) },
1608 { FRAC_CONST(0.051518936941578), FRAC_CONST(0.998672017799843) },
1609 { FRAC_CONST(0.044981587085452), FRAC_CONST(0.998987816153567) },
1610 { FRAC_CONST(0.038442310367847), FRAC_CONST(0.999260821194138) },
1611 { FRAC_CONST(0.031901386909611), FRAC_CONST(0.999491021226926) },
1612 { FRAC_CONST(0.025359096902136), FRAC_CONST(0.999678406390929) },
1613 { FRAC_CONST(0.018815720595351), FRAC_CONST(0.999822968659191) },
1614 { FRAC_CONST(0.012271538285720), FRAC_CONST(0.999924701839145) },
1615 { FRAC_CONST(0.005726830304231), FRAC_CONST(0.999983601572879) }
1616};
1617#endif // LD_DEC
1618
1619/* 60 (N/4) complex twiddle factors */
1620ALIGN static const complex_t mdct_tab_240[] =
1621{
1622 { FRAC_CONST(0.999994645401696), FRAC_CONST(0.003272486506527) },
1623 { FRAC_CONST(0.999566308502021), FRAC_CONST(0.029448173247963) },
1624 { FRAC_CONST(0.998452918783950), FRAC_CONST(0.055603677682425) },
1625 { FRAC_CONST(0.996655239309180), FRAC_CONST(0.081721074133668) },
1626 { FRAC_CONST(0.994174502117428), FRAC_CONST(0.107782463042759) },
1627 { FRAC_CONST(0.991012407382049), FRAC_CONST(0.133769983235535) },
1628 { FRAC_CONST(0.987171122244825), FRAC_CONST(0.159665824163761) },
1629 { FRAC_CONST(0.982653279330712), FRAC_CONST(0.185452238111591) },
1630 { FRAC_CONST(0.977461974943572), FRAC_CONST(0.211111552358965) },
1631 { FRAC_CONST(0.971600766944121), FRAC_CONST(0.236626181293610) },
1632 { FRAC_CONST(0.965073672311547), FRAC_CONST(0.261978638463337) },
1633 { FRAC_CONST(0.957885164390477), FRAC_CONST(0.287151548560387) },
1634 { FRAC_CONST(0.950040169825165), FRAC_CONST(0.312127659329594) },
1635 { FRAC_CONST(0.941544065183021), FRAC_CONST(0.336889853392220) },
1636 { FRAC_CONST(0.932402673269775), FRAC_CONST(0.361421159977355) },
1637 { FRAC_CONST(0.922622259138823), FRAC_CONST(0.385704766552831) },
1638 { FRAC_CONST(0.912209525797468), FRAC_CONST(0.409724030347695) },
1639 { FRAC_CONST(0.901171609613013), FRAC_CONST(0.433462489758331) },
1640 { FRAC_CONST(0.889516075421856), FRAC_CONST(0.456903875630421) },
1641 { FRAC_CONST(0.877250911344924), FRAC_CONST(0.480032122409011) },
1642 { FRAC_CONST(0.864384523313017), FRAC_CONST(0.502831379149042) },
1643 { FRAC_CONST(0.850925729305802), FRAC_CONST(0.525286020378792) },
1644 { FRAC_CONST(0.836883753308409), FRAC_CONST(0.547380656808797) },
1645 { FRAC_CONST(0.822268218989775), FRAC_CONST(0.569100145878898) },
1646 { FRAC_CONST(0.807089143107059), FRAC_CONST(0.590429602136201) },
1647 { FRAC_CONST(0.791356928640660), FRAC_CONST(0.611354407436816) },
1648 { FRAC_CONST(0.775082357664531), FRAC_CONST(0.631860220964409) },
1649 { FRAC_CONST(0.758276583956687), FRAC_CONST(0.651932989058674) },
1650 { FRAC_CONST(0.740951125354959), FRAC_CONST(0.671558954847018) },
1651 { FRAC_CONST(0.723117855863248), FRAC_CONST(0.690724667672829) },
1652 { FRAC_CONST(0.704788997513670), FRAC_CONST(0.709416992313883) },
1653 { FRAC_CONST(0.685977111990193), FRAC_CONST(0.727623117984575) },
1654 { FRAC_CONST(0.666695092019479), FRAC_CONST(0.745330567115786) },
1655 { FRAC_CONST(0.646956152534857), FRAC_CONST(0.762527203906388) },
1656 { FRAC_CONST(0.626773821619469), FRAC_CONST(0.779201242640517) },
1657 { FRAC_CONST(0.606161931234795), FRAC_CONST(0.795341255764910) },
1658 { FRAC_CONST(0.585134607740916), FRAC_CONST(0.810936181720784) },
1659 { FRAC_CONST(0.563706262215017), FRAC_CONST(0.825975332524873) },
1660 { FRAC_CONST(0.541891580574752), FRAC_CONST(0.840448401094438) },
1661 { FRAC_CONST(0.519705513513249), FRAC_CONST(0.854345468311227) },
1662 { FRAC_CONST(0.497163266252654), FRAC_CONST(0.867657009819544) },
1663 { FRAC_CONST(0.474280288123229), FRAC_CONST(0.880373902553765) },
1664 { FRAC_CONST(0.451072261975153), FRAC_CONST(0.892487430990834) },
1665 { FRAC_CONST(0.427555093430282), FRAC_CONST(0.903989293123443) },
1666 { FRAC_CONST(0.403744899981227), FRAC_CONST(0.914871606149819) },
1667 { FRAC_CONST(0.379657999945233), FRAC_CONST(0.925126911876195) },
1668 { FRAC_CONST(0.355310901280416), FRAC_CONST(0.934748181828292) },
1669 { FRAC_CONST(0.330720290272038), FRAC_CONST(0.943728822068278) },
1670 { FRAC_CONST(0.305903020096554), FRAC_CONST(0.952062677713924) },
1671 { FRAC_CONST(0.280876099271292), FRAC_CONST(0.959744037156857) },
1672 { FRAC_CONST(0.255656679997665), FRAC_CONST(0.966767635977008) },
1673 { FRAC_CONST(0.230262046405902), FRAC_CONST(0.973128660550580) },
1674 { FRAC_CONST(0.204709602709380), FRAC_CONST(0.978822751349072) },
1675 { FRAC_CONST(0.179016861276633), FRAC_CONST(0.983846005927077) },
1676 { FRAC_CONST(0.153201430629259), FRAC_CONST(0.988194981596825) },
1677 { FRAC_CONST(0.127281003373913), FRAC_CONST(0.991866697787626) },
1678 { FRAC_CONST(0.101273344076683), FRAC_CONST(0.994858638088611) },
1679 { FRAC_CONST(0.075196277088140), FRAC_CONST(0.997168751973348) },
1680 { FRAC_CONST(0.049067674327418), FRAC_CONST(0.998795456205172) },
1681 { FRAC_CONST(0.022905443033697), FRAC_CONST(0.999737635922260) }
1682};
1683#endif // ALLOW_SMALL_FRAMELENGTH
1684
1685#ifdef SSR_DEC
1686/* 128 (N/4) complex twiddle factors */
1687ALIGN static const complex_t mdct_tab_512[] =
1688{
1689 { FRAC_CONST(0.999998823451702), FRAC_CONST(0.001533980186285) },
1690 { FRAC_CONST(0.999904701082853), FRAC_CONST(0.013805388528060) },
1691 { FRAC_CONST(0.999659996743959), FRAC_CONST(0.026074717829104) },
1692 { FRAC_CONST(0.999264747286594), FRAC_CONST(0.038340120373553) },
1693 { FRAC_CONST(0.998719012233873), FRAC_CONST(0.050599749036899) },
1694 { FRAC_CONST(0.998022873771486), FRAC_CONST(0.062851757564161) },
1695 { FRAC_CONST(0.997176436735326), FRAC_CONST(0.075094300847921) },
1696 { FRAC_CONST(0.996179828595697), FRAC_CONST(0.087325535206192) },
1697 { FRAC_CONST(0.995033199438119), FRAC_CONST(0.099543618660069) },
1698 { FRAC_CONST(0.993736721940725), FRAC_CONST(0.111746711211127) },
1699 { FRAC_CONST(0.992290591348257), FRAC_CONST(0.123932975118512) },
1700 { FRAC_CONST(0.990695025442665), FRAC_CONST(0.136100575175706) },
1701 { FRAC_CONST(0.988950264510303), FRAC_CONST(0.148247678986896) },
1702 { FRAC_CONST(0.987056571305751), FRAC_CONST(0.160372457242928) },
1703 { FRAC_CONST(0.985014231012240), FRAC_CONST(0.172473083996796) },
1704 { FRAC_CONST(0.982823551198705), FRAC_CONST(0.184547736938620) },
1705 { FRAC_CONST(0.980484861773469), FRAC_CONST(0.196594597670080) },
1706 { FRAC_CONST(0.977998514934557), FRAC_CONST(0.208611851978263) },
1707 { FRAC_CONST(0.975364885116657), FRAC_CONST(0.220597690108874) },
1708 { FRAC_CONST(0.972584368934732), FRAC_CONST(0.232550307038775) },
1709 { FRAC_CONST(0.969657385124292), FRAC_CONST(0.244467902747824) },
1710 { FRAC_CONST(0.966584374478333), FRAC_CONST(0.256348682489943) },
1711 { FRAC_CONST(0.963365799780954), FRAC_CONST(0.268190857063403) },
1712 { FRAC_CONST(0.960002145737666), FRAC_CONST(0.279992643080273) },
1713 { FRAC_CONST(0.956493918902395), FRAC_CONST(0.291752263234989) },
1714 { FRAC_CONST(0.952841647601199), FRAC_CONST(0.303467946572011) },
1715 { FRAC_CONST(0.949045881852701), FRAC_CONST(0.315137928752522) },
1716 { FRAC_CONST(0.945107193285261), FRAC_CONST(0.326760452320132) },
1717 { FRAC_CONST(0.941026175050889), FRAC_CONST(0.338333766965541) },
1718 { FRAC_CONST(0.936803441735922), FRAC_CONST(0.349856129790135) },
1719 { FRAC_CONST(0.932439629268462), FRAC_CONST(0.361325805568454) },
1720 { FRAC_CONST(0.927935394822618), FRAC_CONST(0.372741067009516) },
1721 { FRAC_CONST(0.923291416719528), FRAC_CONST(0.384100195016935) },
1722 { FRAC_CONST(0.918508394325212), FRAC_CONST(0.395401478947816) },
1723 { FRAC_CONST(0.913587047945251), FRAC_CONST(0.406643216870369) },
1724 { FRAC_CONST(0.908528118716306), FRAC_CONST(0.417823715820212) },
1725 { FRAC_CONST(0.903332368494512), FRAC_CONST(0.428941292055329) },
1726 { FRAC_CONST(0.898000579740740), FRAC_CONST(0.439994271309633) },
1727 { FRAC_CONST(0.892533555402765), FRAC_CONST(0.450980989045104) },
1728 { FRAC_CONST(0.886932118794342), FRAC_CONST(0.461899790702463) },
1729 { FRAC_CONST(0.881197113471222), FRAC_CONST(0.472749031950343) },
1730 { FRAC_CONST(0.875329403104111), FRAC_CONST(0.483527078932919) },
1731 { FRAC_CONST(0.869329871348607), FRAC_CONST(0.494232308515960) },
1732 { FRAC_CONST(0.863199421712124), FRAC_CONST(0.504863108531268) },
1733 { FRAC_CONST(0.856938977417829), FRAC_CONST(0.515417878019463) },
1734 { FRAC_CONST(0.850549481265603), FRAC_CONST(0.525895027471085) },
1735 { FRAC_CONST(0.844031895490066), FRAC_CONST(0.536292979065963) },
1736 { FRAC_CONST(0.837387201615662), FRAC_CONST(0.546610166910835) },
1737 { FRAC_CONST(0.830616400308846), FRAC_CONST(0.556845037275160) },
1738 { FRAC_CONST(0.823720511227391), FRAC_CONST(0.566996048825109) },
1739 { FRAC_CONST(0.816700572866828), FRAC_CONST(0.577061672855679) },
1740 { FRAC_CONST(0.809557642404051), FRAC_CONST(0.587040393520918) },
1741 { FRAC_CONST(0.802292795538116), FRAC_CONST(0.596930708062197) },
1742 { FRAC_CONST(0.794907126328237), FRAC_CONST(0.606731127034524) },
1743 { FRAC_CONST(0.787401747029031), FRAC_CONST(0.616440174530854) },
1744 { FRAC_CONST(0.779777787923015), FRAC_CONST(0.626056388404344) },
1745 { FRAC_CONST(0.772036397150385), FRAC_CONST(0.635578320488556) },
1746 { FRAC_CONST(0.764178740536117), FRAC_CONST(0.645004536815544) },
1747 { FRAC_CONST(0.756206001414395), FRAC_CONST(0.654333617831800) },
1748 { FRAC_CONST(0.748119380450404), FRAC_CONST(0.663564158612040) },
1749 { FRAC_CONST(0.739920095459516), FRAC_CONST(0.672694769070773) },
1750 { FRAC_CONST(0.731609381223893), FRAC_CONST(0.681724074171650) },
1751 { FRAC_CONST(0.723188489306527), FRAC_CONST(0.690650714134535) },
1752 { FRAC_CONST(0.714658687862769), FRAC_CONST(0.699473344640284) },
1753 { FRAC_CONST(0.706021261449340), FRAC_CONST(0.708190637033195) },
1754 { FRAC_CONST(0.697277510830887), FRAC_CONST(0.716801278521100) },
1755 { FRAC_CONST(0.688428752784091), FRAC_CONST(0.725303972373061) },
1756 { FRAC_CONST(0.679476319899365), FRAC_CONST(0.733697438114660) },
1757 { FRAC_CONST(0.670421560380173), FRAC_CONST(0.741980411720831) },
1758 { FRAC_CONST(0.661265837839992), FRAC_CONST(0.750151645806215) },
1759 { FRAC_CONST(0.652010531096960), FRAC_CONST(0.758209909813015) },
1760 { FRAC_CONST(0.642657033966227), FRAC_CONST(0.766153990196313) },
1761 { FRAC_CONST(0.633206755050057), FRAC_CONST(0.773982690606823) },
1762 { FRAC_CONST(0.623661117525695), FRAC_CONST(0.781694832071059) },
1763 { FRAC_CONST(0.614021558931038), FRAC_CONST(0.789289253168886) },
1764 { FRAC_CONST(0.604289530948156), FRAC_CONST(0.796764810208419) },
1765 { FRAC_CONST(0.594466499184665), FRAC_CONST(0.804120377398266) },
1766 { FRAC_CONST(0.584553942953015), FRAC_CONST(0.811354847017064) },
1767 { FRAC_CONST(0.574553355047716), FRAC_CONST(0.818467129580299) },
1768 { FRAC_CONST(0.564466241520520), FRAC_CONST(0.825456154004377) },
1769 { FRAC_CONST(0.554294121453620), FRAC_CONST(0.832320867767930) },
1770 { FRAC_CONST(0.544038526730884), FRAC_CONST(0.839060237070313) },
1771 { FRAC_CONST(0.533701001807153), FRAC_CONST(0.845673246987299) },
1772 { FRAC_CONST(0.523283103475656), FRAC_CONST(0.852158901623920) },
1773 { FRAC_CONST(0.512786400633563), FRAC_CONST(0.858516224264443) },
1774 { FRAC_CONST(0.502212474045711), FRAC_CONST(0.864744257519462) },
1775 { FRAC_CONST(0.491562916106550), FRAC_CONST(0.870842063470079) },
1776 { FRAC_CONST(0.480839330600334), FRAC_CONST(0.876808723809146) },
1777 { FRAC_CONST(0.470043332459596), FRAC_CONST(0.882643339979563) },
1778 { FRAC_CONST(0.459176547521944), FRAC_CONST(0.888345033309596) },
1779 { FRAC_CONST(0.448240612285220), FRAC_CONST(0.893912945145203) },
1780 { FRAC_CONST(0.437237173661044), FRAC_CONST(0.899346236979341) },
1781 { FRAC_CONST(0.426167888726800), FRAC_CONST(0.904644090578246) },
1782 { FRAC_CONST(0.415034424476082), FRAC_CONST(0.909805708104652) },
1783 { FRAC_CONST(0.403838457567654), FRAC_CONST(0.914830312237946) },
1784 { FRAC_CONST(0.392581674072952), FRAC_CONST(0.919717146291227) },
1785 { FRAC_CONST(0.381265769222162), FRAC_CONST(0.924465474325263) },
1786 { FRAC_CONST(0.369892447148934), FRAC_CONST(0.929074581259316) },
1787 { FRAC_CONST(0.358463420633737), FRAC_CONST(0.933543772978836) },
1788 { FRAC_CONST(0.346980410845924), FRAC_CONST(0.937872376439990) },
1789 { FRAC_CONST(0.335445147084532), FRAC_CONST(0.942059739771017) },
1790 { FRAC_CONST(0.323859366517853), FRAC_CONST(0.946105232370403) },
1791 { FRAC_CONST(0.312224813921825), FRAC_CONST(0.950008245001843) },
1792 { FRAC_CONST(0.300543241417273), FRAC_CONST(0.953768189885990) },
1793 { FRAC_CONST(0.288816408206049), FRAC_CONST(0.957384500788976) },
1794 { FRAC_CONST(0.277046080306100), FRAC_CONST(0.960856633107680) },
1795 { FRAC_CONST(0.265234030285512), FRAC_CONST(0.964184063951746) },
1796 { FRAC_CONST(0.253382036995570), FRAC_CONST(0.967366292222329) },
1797 { FRAC_CONST(0.241491885302869), FRAC_CONST(0.970402838687556) },
1798 { FRAC_CONST(0.229565365820519), FRAC_CONST(0.973293246054698) },
1799 { FRAC_CONST(0.217604274638484), FRAC_CONST(0.976037079039039) },
1800 { FRAC_CONST(0.205610413053099), FRAC_CONST(0.978633924429423) },
1801 { FRAC_CONST(0.193585587295804), FRAC_CONST(0.981083391150487) },
1802 { FRAC_CONST(0.181531608261125), FRAC_CONST(0.983385110321551) },
1803 { FRAC_CONST(0.169450291233968), FRAC_CONST(0.985538735312176) },
1804 { FRAC_CONST(0.157343455616238), FRAC_CONST(0.987543941794359) },
1805 { FRAC_CONST(0.145212924652848), FRAC_CONST(0.989400427791380) },
1806 { FRAC_CONST(0.133060525157139), FRAC_CONST(0.991107913723277) },
1807 { FRAC_CONST(0.120888087235777), FRAC_CONST(0.992666142448948) },
1808 { FRAC_CONST(0.108697444013139), FRAC_CONST(0.994074879304879) },
1809 { FRAC_CONST(0.096490431355253), FRAC_CONST(0.995333912140482) },
1810 { FRAC_CONST(0.084268887593324), FRAC_CONST(0.996443051350043) },
1811 { FRAC_CONST(0.072034653246889), FRAC_CONST(0.997402129901275) },
1812 { FRAC_CONST(0.059789570746640), FRAC_CONST(0.998211003360478) },
1813 { FRAC_CONST(0.047535484156959), FRAC_CONST(0.998869549914284) },
1814 { FRAC_CONST(0.035274238898214), FRAC_CONST(0.999377670388003) },
1815 { FRAC_CONST(0.023007681468839), FRAC_CONST(0.999735288260562) },
1816 { FRAC_CONST(0.010737659167265), FRAC_CONST(0.999942349676024) }
1817};
1818
1819/* 16 (N/4) complex twiddle factors */
1820ALIGN static const complex_t mdct_tab_64[] =
1821{
1822 { FRAC_CONST(0.999924701839145), FRAC_CONST(0.012271538285720) },
1823 { FRAC_CONST(0.993906970002356), FRAC_CONST(0.110222207293883) },
1824 { FRAC_CONST(0.978317370719628), FRAC_CONST(0.207111376192219) },
1825 { FRAC_CONST(0.953306040354194), FRAC_CONST(0.302005949319228) },
1826 { FRAC_CONST(0.919113851690058), FRAC_CONST(0.393992040061048) },
1827 { FRAC_CONST(0.876070094195407), FRAC_CONST(0.482183772079123) },
1828 { FRAC_CONST(0.824589302785025), FRAC_CONST(0.565731810783613) },
1829 { FRAC_CONST(0.765167265622459), FRAC_CONST(0.643831542889791) },
1830 { FRAC_CONST(0.698376249408973), FRAC_CONST(0.715730825283819) },
1831 { FRAC_CONST(0.624859488142386), FRAC_CONST(0.780737228572094) },
1832 { FRAC_CONST(0.545324988422046), FRAC_CONST(0.838224705554838) },
1833 { FRAC_CONST(0.460538710958240), FRAC_CONST(0.887639620402854) },
1834 { FRAC_CONST(0.371317193951838), FRAC_CONST(0.928506080473215) },
1835 { FRAC_CONST(0.278519689385053), FRAC_CONST(0.960430519415566) },
1836 { FRAC_CONST(0.183039887955141), FRAC_CONST(0.983105487431216) },
1837 { FRAC_CONST(0.085797312344440), FRAC_CONST(0.996312612182778) }
1838};
1839#endif // SSR_DEC
1840
1841#else // FIXED_POINT
1842
1843/* 256 (N/4) complex twiddle factors */
1844ALIGN static const complex_t mdct_tab_2048[] =
1845{
1846 { FRAC_CONST(0.031249997702054), FRAC_CONST(0.000011984224612) },
1847 { FRAC_CONST(0.031249813866531), FRAC_CONST(0.000107857810004) },
1848 { FRAC_CONST(0.031249335895858), FRAC_CONST(0.000203730380198) },
1849 { FRAC_CONST(0.031248563794535), FRAC_CONST(0.000299601032804) },
1850 { FRAC_CONST(0.031247497569829), FRAC_CONST(0.000395468865451) },
1851 { FRAC_CONST(0.031246137231775), FRAC_CONST(0.000491332975794) },
1852 { FRAC_CONST(0.031244482793177), FRAC_CONST(0.000587192461525) },
1853 { FRAC_CONST(0.031242534269608), FRAC_CONST(0.000683046420376) },
1854 { FRAC_CONST(0.031240291679407), FRAC_CONST(0.000778893950134) },
1855 { FRAC_CONST(0.031237755043684), FRAC_CONST(0.000874734148645) },
1856 { FRAC_CONST(0.031234924386313), FRAC_CONST(0.000970566113826) },
1857 { FRAC_CONST(0.031231799733938), FRAC_CONST(0.001066388943669) },
1858 { FRAC_CONST(0.031228381115970), FRAC_CONST(0.001162201736253) },
1859 { FRAC_CONST(0.031224668564585), FRAC_CONST(0.001258003589751) },
1860 { FRAC_CONST(0.031220662114728), FRAC_CONST(0.001353793602441) },
1861 { FRAC_CONST(0.031216361804108), FRAC_CONST(0.001449570872710) },
1862 { FRAC_CONST(0.031211767673203), FRAC_CONST(0.001545334499065) },
1863 { FRAC_CONST(0.031206879765253), FRAC_CONST(0.001641083580144) },
1864 { FRAC_CONST(0.031201698126266), FRAC_CONST(0.001736817214719) },
1865 { FRAC_CONST(0.031196222805014), FRAC_CONST(0.001832534501709) },
1866 { FRAC_CONST(0.031190453853031), FRAC_CONST(0.001928234540186) },
1867 { FRAC_CONST(0.031184391324617), FRAC_CONST(0.002023916429386) },
1868 { FRAC_CONST(0.031178035276836), FRAC_CONST(0.002119579268713) },
1869 { FRAC_CONST(0.031171385769513), FRAC_CONST(0.002215222157753) },
1870 { FRAC_CONST(0.031164442865236), FRAC_CONST(0.002310844196278) },
1871 { FRAC_CONST(0.031157206629353), FRAC_CONST(0.002406444484258) },
1872 { FRAC_CONST(0.031149677129975), FRAC_CONST(0.002502022121865) },
1873 { FRAC_CONST(0.031141854437973), FRAC_CONST(0.002597576209488) },
1874 { FRAC_CONST(0.031133738626977), FRAC_CONST(0.002693105847734) },
1875 { FRAC_CONST(0.031125329773375), FRAC_CONST(0.002788610137442) },
1876 { FRAC_CONST(0.031116627956316), FRAC_CONST(0.002884088179689) },
1877 { FRAC_CONST(0.031107633257703), FRAC_CONST(0.002979539075801) },
1878 { FRAC_CONST(0.031098345762200), FRAC_CONST(0.003074961927355) },
1879 { FRAC_CONST(0.031088765557222), FRAC_CONST(0.003170355836197) },
1880 { FRAC_CONST(0.031078892732942), FRAC_CONST(0.003265719904442) },
1881 { FRAC_CONST(0.031068727382288), FRAC_CONST(0.003361053234488) },
1882 { FRAC_CONST(0.031058269600939), FRAC_CONST(0.003456354929021) },
1883 { FRAC_CONST(0.031047519487329), FRAC_CONST(0.003551624091024) },
1884 { FRAC_CONST(0.031036477142640), FRAC_CONST(0.003646859823790) },
1885 { FRAC_CONST(0.031025142670809), FRAC_CONST(0.003742061230921) },
1886 { FRAC_CONST(0.031013516178519), FRAC_CONST(0.003837227416347) },
1887 { FRAC_CONST(0.031001597775203), FRAC_CONST(0.003932357484328) },
1888 { FRAC_CONST(0.030989387573042), FRAC_CONST(0.004027450539462) },
1889 { FRAC_CONST(0.030976885686963), FRAC_CONST(0.004122505686697) },
1890 { FRAC_CONST(0.030964092234638), FRAC_CONST(0.004217522031340) },
1891 { FRAC_CONST(0.030951007336485), FRAC_CONST(0.004312498679058) },
1892 { FRAC_CONST(0.030937631115663), FRAC_CONST(0.004407434735897) },
1893 { FRAC_CONST(0.030923963698074), FRAC_CONST(0.004502329308281) },
1894 { FRAC_CONST(0.030910005212362), FRAC_CONST(0.004597181503027) },
1895 { FRAC_CONST(0.030895755789908), FRAC_CONST(0.004691990427350) },
1896 { FRAC_CONST(0.030881215564835), FRAC_CONST(0.004786755188872) },
1897 { FRAC_CONST(0.030866384674000), FRAC_CONST(0.004881474895632) },
1898 { FRAC_CONST(0.030851263256996), FRAC_CONST(0.004976148656090) },
1899 { FRAC_CONST(0.030835851456154), FRAC_CONST(0.005070775579142) },
1900 { FRAC_CONST(0.030820149416533), FRAC_CONST(0.005165354774124) },
1901 { FRAC_CONST(0.030804157285929), FRAC_CONST(0.005259885350819) },
1902 { FRAC_CONST(0.030787875214864), FRAC_CONST(0.005354366419469) },
1903 { FRAC_CONST(0.030771303356593), FRAC_CONST(0.005448797090784) },
1904 { FRAC_CONST(0.030754441867095), FRAC_CONST(0.005543176475946) },
1905 { FRAC_CONST(0.030737290905077), FRAC_CONST(0.005637503686619) },
1906 { FRAC_CONST(0.030719850631972), FRAC_CONST(0.005731777834961) },
1907 { FRAC_CONST(0.030702121211932), FRAC_CONST(0.005825998033626) },
1908 { FRAC_CONST(0.030684102811835), FRAC_CONST(0.005920163395780) },
1909 { FRAC_CONST(0.030665795601276), FRAC_CONST(0.006014273035101) },
1910 { FRAC_CONST(0.030647199752570), FRAC_CONST(0.006108326065793) },
1911 { FRAC_CONST(0.030628315440748), FRAC_CONST(0.006202321602594) },
1912 { FRAC_CONST(0.030609142843557), FRAC_CONST(0.006296258760782) },
1913 { FRAC_CONST(0.030589682141455), FRAC_CONST(0.006390136656185) },
1914 { FRAC_CONST(0.030569933517616), FRAC_CONST(0.006483954405188) },
1915 { FRAC_CONST(0.030549897157919), FRAC_CONST(0.006577711124743) },
1916 { FRAC_CONST(0.030529573250956), FRAC_CONST(0.006671405932375) },
1917 { FRAC_CONST(0.030508961988022), FRAC_CONST(0.006765037946194) },
1918 { FRAC_CONST(0.030488063563118), FRAC_CONST(0.006858606284900) },
1919 { FRAC_CONST(0.030466878172949), FRAC_CONST(0.006952110067791) },
1920 { FRAC_CONST(0.030445406016919), FRAC_CONST(0.007045548414774) },
1921 { FRAC_CONST(0.030423647297133), FRAC_CONST(0.007138920446372) },
1922 { FRAC_CONST(0.030401602218392), FRAC_CONST(0.007232225283733) },
1923 { FRAC_CONST(0.030379270988192), FRAC_CONST(0.007325462048634) },
1924 { FRAC_CONST(0.030356653816724), FRAC_CONST(0.007418629863497) },
1925 { FRAC_CONST(0.030333750916869), FRAC_CONST(0.007511727851390) },
1926 { FRAC_CONST(0.030310562504198), FRAC_CONST(0.007604755136040) },
1927 { FRAC_CONST(0.030287088796968), FRAC_CONST(0.007697710841838) },
1928 { FRAC_CONST(0.030263330016124), FRAC_CONST(0.007790594093851) },
1929 { FRAC_CONST(0.030239286385293), FRAC_CONST(0.007883404017824) },
1930 { FRAC_CONST(0.030214958130781), FRAC_CONST(0.007976139740197) },
1931 { FRAC_CONST(0.030190345481576), FRAC_CONST(0.008068800388104) },
1932 { FRAC_CONST(0.030165448669342), FRAC_CONST(0.008161385089390) },
1933 { FRAC_CONST(0.030140267928416), FRAC_CONST(0.008253892972610) },
1934 { FRAC_CONST(0.030114803495809), FRAC_CONST(0.008346323167047) },
1935 { FRAC_CONST(0.030089055611203), FRAC_CONST(0.008438674802711) },
1936 { FRAC_CONST(0.030063024516947), FRAC_CONST(0.008530947010354) },
1937 { FRAC_CONST(0.030036710458054), FRAC_CONST(0.008623138921475) },
1938 { FRAC_CONST(0.030010113682202), FRAC_CONST(0.008715249668328) },
1939 { FRAC_CONST(0.029983234439732), FRAC_CONST(0.008807278383932) },
1940 { FRAC_CONST(0.029956072983640), FRAC_CONST(0.008899224202078) },
1941 { FRAC_CONST(0.029928629569580), FRAC_CONST(0.008991086257336) },
1942 { FRAC_CONST(0.029900904455860), FRAC_CONST(0.009082863685067) },
1943 { FRAC_CONST(0.029872897903441), FRAC_CONST(0.009174555621425) },
1944 { FRAC_CONST(0.029844610175929), FRAC_CONST(0.009266161203371) },
1945 { FRAC_CONST(0.029816041539579), FRAC_CONST(0.009357679568679) },
1946 { FRAC_CONST(0.029787192263292), FRAC_CONST(0.009449109855944) },
1947 { FRAC_CONST(0.029758062618606), FRAC_CONST(0.009540451204587) },
1948 { FRAC_CONST(0.029728652879702), FRAC_CONST(0.009631702754871) },
1949 { FRAC_CONST(0.029698963323395), FRAC_CONST(0.009722863647900) },
1950 { FRAC_CONST(0.029668994229134), FRAC_CONST(0.009813933025633) },
1951 { FRAC_CONST(0.029638745879000), FRAC_CONST(0.009904910030891) },
1952 { FRAC_CONST(0.029608218557702), FRAC_CONST(0.009995793807363) },
1953 { FRAC_CONST(0.029577412552575), FRAC_CONST(0.010086583499618) },
1954 { FRAC_CONST(0.029546328153577), FRAC_CONST(0.010177278253107) },
1955 { FRAC_CONST(0.029514965653285), FRAC_CONST(0.010267877214177) },
1956 { FRAC_CONST(0.029483325346896), FRAC_CONST(0.010358379530076) },
1957 { FRAC_CONST(0.029451407532220), FRAC_CONST(0.010448784348962) },
1958 { FRAC_CONST(0.029419212509679), FRAC_CONST(0.010539090819911) },
1959 { FRAC_CONST(0.029386740582307), FRAC_CONST(0.010629298092923) },
1960 { FRAC_CONST(0.029353992055740), FRAC_CONST(0.010719405318933) },
1961 { FRAC_CONST(0.029320967238220), FRAC_CONST(0.010809411649818) },
1962 { FRAC_CONST(0.029287666440590), FRAC_CONST(0.010899316238403) },
1963 { FRAC_CONST(0.029254089976290), FRAC_CONST(0.010989118238474) },
1964 { FRAC_CONST(0.029220238161353), FRAC_CONST(0.011078816804778) },
1965 { FRAC_CONST(0.029186111314406), FRAC_CONST(0.011168411093039) },
1966 { FRAC_CONST(0.029151709756664), FRAC_CONST(0.011257900259961) },
1967 { FRAC_CONST(0.029117033811927), FRAC_CONST(0.011347283463239) },
1968 { FRAC_CONST(0.029082083806579), FRAC_CONST(0.011436559861563) },
1969 { FRAC_CONST(0.029046860069582), FRAC_CONST(0.011525728614630) },
1970 { FRAC_CONST(0.029011362932476), FRAC_CONST(0.011614788883150) },
1971 { FRAC_CONST(0.028975592729373), FRAC_CONST(0.011703739828853) },
1972 { FRAC_CONST(0.028939549796957), FRAC_CONST(0.011792580614500) },
1973 { FRAC_CONST(0.028903234474475), FRAC_CONST(0.011881310403886) },
1974 { FRAC_CONST(0.028866647103744), FRAC_CONST(0.011969928361855) },
1975 { FRAC_CONST(0.028829788029135), FRAC_CONST(0.012058433654299) },
1976 { FRAC_CONST(0.028792657597583), FRAC_CONST(0.012146825448172) },
1977 { FRAC_CONST(0.028755256158571), FRAC_CONST(0.012235102911499) },
1978 { FRAC_CONST(0.028717584064137), FRAC_CONST(0.012323265213377) },
1979 { FRAC_CONST(0.028679641668864), FRAC_CONST(0.012411311523990) },
1980 { FRAC_CONST(0.028641429329882), FRAC_CONST(0.012499241014612) },
1981 { FRAC_CONST(0.028602947406859), FRAC_CONST(0.012587052857618) },
1982 { FRAC_CONST(0.028564196262001), FRAC_CONST(0.012674746226488) },
1983 { FRAC_CONST(0.028525176260050), FRAC_CONST(0.012762320295819) },
1984 { FRAC_CONST(0.028485887768276), FRAC_CONST(0.012849774241331) },
1985 { FRAC_CONST(0.028446331156478), FRAC_CONST(0.012937107239875) },
1986 { FRAC_CONST(0.028406506796976), FRAC_CONST(0.013024318469437) },
1987 { FRAC_CONST(0.028366415064615), FRAC_CONST(0.013111407109155) },
1988 { FRAC_CONST(0.028326056336751), FRAC_CONST(0.013198372339315) },
1989 { FRAC_CONST(0.028285430993258), FRAC_CONST(0.013285213341368) },
1990 { FRAC_CONST(0.028244539416515), FRAC_CONST(0.013371929297933) },
1991 { FRAC_CONST(0.028203381991411), FRAC_CONST(0.013458519392807) },
1992 { FRAC_CONST(0.028161959105334), FRAC_CONST(0.013544982810971) },
1993 { FRAC_CONST(0.028120271148172), FRAC_CONST(0.013631318738598) },
1994 { FRAC_CONST(0.028078318512309), FRAC_CONST(0.013717526363062) },
1995 { FRAC_CONST(0.028036101592619), FRAC_CONST(0.013803604872943) },
1996 { FRAC_CONST(0.027993620786463), FRAC_CONST(0.013889553458039) },
1997 { FRAC_CONST(0.027950876493687), FRAC_CONST(0.013975371309367) },
1998 { FRAC_CONST(0.027907869116616), FRAC_CONST(0.014061057619178) },
1999 { FRAC_CONST(0.027864599060052), FRAC_CONST(0.014146611580959) },
2000 { FRAC_CONST(0.027821066731270), FRAC_CONST(0.014232032389445) },
2001 { FRAC_CONST(0.027777272540012), FRAC_CONST(0.014317319240622) },
2002 { FRAC_CONST(0.027733216898487), FRAC_CONST(0.014402471331737) },
2003 { FRAC_CONST(0.027688900221361), FRAC_CONST(0.014487487861307) },
2004 { FRAC_CONST(0.027644322925762), FRAC_CONST(0.014572368029123) },
2005 { FRAC_CONST(0.027599485431266), FRAC_CONST(0.014657111036262) },
2006 { FRAC_CONST(0.027554388159903), FRAC_CONST(0.014741716085090) },
2007 { FRAC_CONST(0.027509031536144), FRAC_CONST(0.014826182379271) },
2008 { FRAC_CONST(0.027463415986904), FRAC_CONST(0.014910509123778) },
2009 { FRAC_CONST(0.027417541941533), FRAC_CONST(0.014994695524894) },
2010 { FRAC_CONST(0.027371409831816), FRAC_CONST(0.015078740790225) },
2011 { FRAC_CONST(0.027325020091965), FRAC_CONST(0.015162644128704) },
2012 { FRAC_CONST(0.027278373158618), FRAC_CONST(0.015246404750603) },
2013 { FRAC_CONST(0.027231469470833), FRAC_CONST(0.015330021867534) },
2014 { FRAC_CONST(0.027184309470088), FRAC_CONST(0.015413494692460) },
2015 { FRAC_CONST(0.027136893600268), FRAC_CONST(0.015496822439704) },
2016 { FRAC_CONST(0.027089222307671), FRAC_CONST(0.015580004324954) },
2017 { FRAC_CONST(0.027041296040997), FRAC_CONST(0.015663039565269) },
2018 { FRAC_CONST(0.026993115251345), FRAC_CONST(0.015745927379091) },
2019 { FRAC_CONST(0.026944680392213), FRAC_CONST(0.015828666986247) },
2020 { FRAC_CONST(0.026895991919487), FRAC_CONST(0.015911257607961) },
2021 { FRAC_CONST(0.026847050291442), FRAC_CONST(0.015993698466859) },
2022 { FRAC_CONST(0.026797855968734), FRAC_CONST(0.016075988786976) },
2023 { FRAC_CONST(0.026748409414401), FRAC_CONST(0.016158127793763) },
2024 { FRAC_CONST(0.026698711093851), FRAC_CONST(0.016240114714099) },
2025 { FRAC_CONST(0.026648761474864), FRAC_CONST(0.016321948776289) },
2026 { FRAC_CONST(0.026598561027585), FRAC_CONST(0.016403629210082) },
2027 { FRAC_CONST(0.026548110224519), FRAC_CONST(0.016485155246669) },
2028 { FRAC_CONST(0.026497409540530), FRAC_CONST(0.016566526118696) },
2029 { FRAC_CONST(0.026446459452830), FRAC_CONST(0.016647741060271) },
2030 { FRAC_CONST(0.026395260440982), FRAC_CONST(0.016728799306966) },
2031 { FRAC_CONST(0.026343812986890), FRAC_CONST(0.016809700095831) },
2032 { FRAC_CONST(0.026292117574797), FRAC_CONST(0.016890442665397) },
2033 { FRAC_CONST(0.026240174691280), FRAC_CONST(0.016971026255683) },
2034 { FRAC_CONST(0.026187984825246), FRAC_CONST(0.017051450108208) },
2035 { FRAC_CONST(0.026135548467924), FRAC_CONST(0.017131713465990) },
2036 { FRAC_CONST(0.026082866112867), FRAC_CONST(0.017211815573560) },
2037 { FRAC_CONST(0.026029938255941), FRAC_CONST(0.017291755676967) },
2038 { FRAC_CONST(0.025976765395322), FRAC_CONST(0.017371533023784) },
2039 { FRAC_CONST(0.025923348031494), FRAC_CONST(0.017451146863116) },
2040 { FRAC_CONST(0.025869686667242), FRAC_CONST(0.017530596445607) },
2041 { FRAC_CONST(0.025815781807646), FRAC_CONST(0.017609881023449) },
2042 { FRAC_CONST(0.025761633960080), FRAC_CONST(0.017688999850383) },
2043 { FRAC_CONST(0.025707243634204), FRAC_CONST(0.017767952181715) },
2044 { FRAC_CONST(0.025652611341960), FRAC_CONST(0.017846737274313) },
2045 { FRAC_CONST(0.025597737597568), FRAC_CONST(0.017925354386623) },
2046 { FRAC_CONST(0.025542622917522), FRAC_CONST(0.018003802778671) },
2047 { FRAC_CONST(0.025487267820581), FRAC_CONST(0.018082081712071) },
2048 { FRAC_CONST(0.025431672827768), FRAC_CONST(0.018160190450031) },
2049 { FRAC_CONST(0.025375838462365), FRAC_CONST(0.018238128257362) },
2050 { FRAC_CONST(0.025319765249906), FRAC_CONST(0.018315894400484) },
2051 { FRAC_CONST(0.025263453718173), FRAC_CONST(0.018393488147432) },
2052 { FRAC_CONST(0.025206904397193), FRAC_CONST(0.018470908767865) },
2053 { FRAC_CONST(0.025150117819228), FRAC_CONST(0.018548155533070) },
2054 { FRAC_CONST(0.025093094518776), FRAC_CONST(0.018625227715971) },
2055 { FRAC_CONST(0.025035835032562), FRAC_CONST(0.018702124591135) },
2056 { FRAC_CONST(0.024978339899534), FRAC_CONST(0.018778845434780) },
2057 { FRAC_CONST(0.024920609660858), FRAC_CONST(0.018855389524780) },
2058 { FRAC_CONST(0.024862644859912), FRAC_CONST(0.018931756140672) },
2059 { FRAC_CONST(0.024804446042284), FRAC_CONST(0.019007944563666) },
2060 { FRAC_CONST(0.024746013755764), FRAC_CONST(0.019083954076646) },
2061 { FRAC_CONST(0.024687348550337), FRAC_CONST(0.019159783964183) },
2062 { FRAC_CONST(0.024628450978184), FRAC_CONST(0.019235433512536) },
2063 { FRAC_CONST(0.024569321593670), FRAC_CONST(0.019310902009663) },
2064 { FRAC_CONST(0.024509960953345), FRAC_CONST(0.019386188745225) },
2065 { FRAC_CONST(0.024450369615932), FRAC_CONST(0.019461293010596) },
2066 { FRAC_CONST(0.024390548142329), FRAC_CONST(0.019536214098866) },
2067 { FRAC_CONST(0.024330497095598), FRAC_CONST(0.019610951304848) },
2068 { FRAC_CONST(0.024270217040961), FRAC_CONST(0.019685503925087) },
2069 { FRAC_CONST(0.024209708545799), FRAC_CONST(0.019759871257867) },
2070 { FRAC_CONST(0.024148972179639), FRAC_CONST(0.019834052603212) },
2071 { FRAC_CONST(0.024088008514157), FRAC_CONST(0.019908047262901) },
2072 { FRAC_CONST(0.024026818123164), FRAC_CONST(0.019981854540467) },
2073 { FRAC_CONST(0.023965401582609), FRAC_CONST(0.020055473741208) },
2074 { FRAC_CONST(0.023903759470567), FRAC_CONST(0.020128904172192) },
2075 { FRAC_CONST(0.023841892367236), FRAC_CONST(0.020202145142264) },
2076 { FRAC_CONST(0.023779800854935), FRAC_CONST(0.020275195962052) },
2077 { FRAC_CONST(0.023717485518092), FRAC_CONST(0.020348055943974) },
2078 { FRAC_CONST(0.023654946943242), FRAC_CONST(0.020420724402244) },
2079 { FRAC_CONST(0.023592185719023), FRAC_CONST(0.020493200652878) },
2080 { FRAC_CONST(0.023529202436167), FRAC_CONST(0.020565484013703) },
2081 { FRAC_CONST(0.023465997687496), FRAC_CONST(0.020637573804361) },
2082 { FRAC_CONST(0.023402572067918), FRAC_CONST(0.020709469346314) },
2083 { FRAC_CONST(0.023338926174419), FRAC_CONST(0.020781169962854) },
2084 { FRAC_CONST(0.023275060606058), FRAC_CONST(0.020852674979108) },
2085 { FRAC_CONST(0.023210975963963), FRAC_CONST(0.020923983722044) },
2086 { FRAC_CONST(0.023146672851322), FRAC_CONST(0.020995095520475) },
2087 { FRAC_CONST(0.023082151873380), FRAC_CONST(0.021066009705072) },
2088 { FRAC_CONST(0.023017413637435), FRAC_CONST(0.021136725608363) },
2089 { FRAC_CONST(0.022952458752826), FRAC_CONST(0.021207242564742) },
2090 { FRAC_CONST(0.022887287830934), FRAC_CONST(0.021277559910478) },
2091 { FRAC_CONST(0.022821901485173), FRAC_CONST(0.021347676983716) },
2092 { FRAC_CONST(0.022756300330983), FRAC_CONST(0.021417593124488) },
2093 { FRAC_CONST(0.022690484985827), FRAC_CONST(0.021487307674717) },
2094 { FRAC_CONST(0.022624456069185), FRAC_CONST(0.021556819978223) },
2095 { FRAC_CONST(0.022558214202547), FRAC_CONST(0.021626129380729) },
2096 { FRAC_CONST(0.022491760009405), FRAC_CONST(0.021695235229869) },
2097 { FRAC_CONST(0.022425094115252), FRAC_CONST(0.021764136875192) },
2098 { FRAC_CONST(0.022358217147572), FRAC_CONST(0.021832833668171) },
2099 { FRAC_CONST(0.022291129735838), FRAC_CONST(0.021901324962204) },
2100 { FRAC_CONST(0.022223832511501), FRAC_CONST(0.021969610112625) },
2101 { FRAC_CONST(0.022156326107988), FRAC_CONST(0.022037688476709) },
2102 { FRAC_CONST(0.022088611160696), FRAC_CONST(0.022105559413676) },
2103 { FRAC_CONST(0.022020688306983), FRAC_CONST(0.022173222284699) },
2104 { FRAC_CONST(0.021952558186166), FRAC_CONST(0.022240676452909) },
2105 { FRAC_CONST(0.021884221439510), FRAC_CONST(0.022307921283403) },
2106 { FRAC_CONST(0.021815678710228), FRAC_CONST(0.022374956143245) },
2107 { FRAC_CONST(0.021746930643469), FRAC_CONST(0.022441780401478) },
2108 { FRAC_CONST(0.021677977886316), FRAC_CONST(0.022508393429127) },
2109 { FRAC_CONST(0.021608821087780), FRAC_CONST(0.022574794599206) },
2110 { FRAC_CONST(0.021539460898790), FRAC_CONST(0.022640983286719) },
2111 { FRAC_CONST(0.021469897972190), FRAC_CONST(0.022706958868676) },
2112 { FRAC_CONST(0.021400132962735), FRAC_CONST(0.022772720724087) },
2113 { FRAC_CONST(0.021330166527077), FRAC_CONST(0.022838268233979) },
2114 { FRAC_CONST(0.021259999323769), FRAC_CONST(0.022903600781391) },
2115 { FRAC_CONST(0.021189632013250), FRAC_CONST(0.022968717751391) },
2116 { FRAC_CONST(0.021119065257845), FRAC_CONST(0.023033618531071) },
2117 { FRAC_CONST(0.021048299721754), FRAC_CONST(0.023098302509561) },
2118 { FRAC_CONST(0.020977336071050), FRAC_CONST(0.023162769078031) },
2119 { FRAC_CONST(0.020906174973670), FRAC_CONST(0.023227017629698) },
2120 { FRAC_CONST(0.020834817099409), FRAC_CONST(0.023291047559828) },
2121 { FRAC_CONST(0.020763263119915), FRAC_CONST(0.023354858265748) },
2122 { FRAC_CONST(0.020691513708680), FRAC_CONST(0.023418449146848) },
2123 { FRAC_CONST(0.020619569541038), FRAC_CONST(0.023481819604585) },
2124 { FRAC_CONST(0.020547431294155), FRAC_CONST(0.023544969042494) },
2125 { FRAC_CONST(0.020475099647023), FRAC_CONST(0.023607896866186) },
2126 { FRAC_CONST(0.020402575280455), FRAC_CONST(0.023670602483363) },
2127 { FRAC_CONST(0.020329858877078), FRAC_CONST(0.023733085303813) },
2128 { FRAC_CONST(0.020256951121327), FRAC_CONST(0.023795344739427) },
2129 { FRAC_CONST(0.020183852699437), FRAC_CONST(0.023857380204193) },
2130 { FRAC_CONST(0.020110564299439), FRAC_CONST(0.023919191114211) },
2131 { FRAC_CONST(0.020037086611150), FRAC_CONST(0.023980776887692) },
2132 { FRAC_CONST(0.019963420326171), FRAC_CONST(0.024042136944968) },
2133 { FRAC_CONST(0.019889566137877), FRAC_CONST(0.024103270708495) },
2134 { FRAC_CONST(0.019815524741412), FRAC_CONST(0.024164177602859) },
2135 { FRAC_CONST(0.019741296833681), FRAC_CONST(0.024224857054779) },
2136 { FRAC_CONST(0.019666883113346), FRAC_CONST(0.024285308493120) },
2137 { FRAC_CONST(0.019592284280817), FRAC_CONST(0.024345531348888) },
2138 { FRAC_CONST(0.019517501038246), FRAC_CONST(0.024405525055242) },
2139 { FRAC_CONST(0.019442534089523), FRAC_CONST(0.024465289047500) },
2140 { FRAC_CONST(0.019367384140264), FRAC_CONST(0.024524822763141) },
2141 { FRAC_CONST(0.019292051897809), FRAC_CONST(0.024584125641809) },
2142 { FRAC_CONST(0.019216538071215), FRAC_CONST(0.024643197125323) },
2143 { FRAC_CONST(0.019140843371246), FRAC_CONST(0.024702036657681) },
2144 { FRAC_CONST(0.019064968510369), FRAC_CONST(0.024760643685063) },
2145 { FRAC_CONST(0.018988914202748), FRAC_CONST(0.024819017655836) },
2146 { FRAC_CONST(0.018912681164234), FRAC_CONST(0.024877158020562) },
2147 { FRAC_CONST(0.018836270112363), FRAC_CONST(0.024935064232003) },
2148 { FRAC_CONST(0.018759681766343), FRAC_CONST(0.024992735745123) },
2149 { FRAC_CONST(0.018682916847054), FRAC_CONST(0.025050172017095) },
2150 { FRAC_CONST(0.018605976077037), FRAC_CONST(0.025107372507308) },
2151 { FRAC_CONST(0.018528860180486), FRAC_CONST(0.025164336677369) },
2152 { FRAC_CONST(0.018451569883247), FRAC_CONST(0.025221063991110) },
2153 { FRAC_CONST(0.018374105912805), FRAC_CONST(0.025277553914591) },
2154 { FRAC_CONST(0.018296468998280), FRAC_CONST(0.025333805916107) },
2155 { FRAC_CONST(0.018218659870421), FRAC_CONST(0.025389819466194) },
2156 { FRAC_CONST(0.018140679261596), FRAC_CONST(0.025445594037630) },
2157 { FRAC_CONST(0.018062527905790), FRAC_CONST(0.025501129105445) },
2158 { FRAC_CONST(0.017984206538592), FRAC_CONST(0.025556424146920) },
2159 { FRAC_CONST(0.017905715897192), FRAC_CONST(0.025611478641598) },
2160 { FRAC_CONST(0.017827056720375), FRAC_CONST(0.025666292071285) },
2161 { FRAC_CONST(0.017748229748511), FRAC_CONST(0.025720863920056) },
2162 { FRAC_CONST(0.017669235723550), FRAC_CONST(0.025775193674260) },
2163 { FRAC_CONST(0.017590075389012), FRAC_CONST(0.025829280822525) },
2164 { FRAC_CONST(0.017510749489986), FRAC_CONST(0.025883124855762) },
2165 { FRAC_CONST(0.017431258773116), FRAC_CONST(0.025936725267170) },
2166 { FRAC_CONST(0.017351603986600), FRAC_CONST(0.025990081552242) },
2167 { FRAC_CONST(0.017271785880180), FRAC_CONST(0.026043193208768) },
2168 { FRAC_CONST(0.017191805205132), FRAC_CONST(0.026096059736841) },
2169 { FRAC_CONST(0.017111662714267), FRAC_CONST(0.026148680638861) },
2170 { FRAC_CONST(0.017031359161915), FRAC_CONST(0.026201055419541) },
2171 { FRAC_CONST(0.016950895303924), FRAC_CONST(0.026253183585908) },
2172 { FRAC_CONST(0.016870271897651), FRAC_CONST(0.026305064647313) },
2173 { FRAC_CONST(0.016789489701954), FRAC_CONST(0.026356698115431) },
2174 { FRAC_CONST(0.016708549477186), FRAC_CONST(0.026408083504269) },
2175 { FRAC_CONST(0.016627451985187), FRAC_CONST(0.026459220330167) },
2176 { FRAC_CONST(0.016546197989277), FRAC_CONST(0.026510108111806) },
2177 { FRAC_CONST(0.016464788254250), FRAC_CONST(0.026560746370212) },
2178 { FRAC_CONST(0.016383223546365), FRAC_CONST(0.026611134628757) },
2179 { FRAC_CONST(0.016301504633341), FRAC_CONST(0.026661272413168) },
2180 { FRAC_CONST(0.016219632284346), FRAC_CONST(0.026711159251530) },
2181 { FRAC_CONST(0.016137607269996), FRAC_CONST(0.026760794674288) },
2182 { FRAC_CONST(0.016055430362340), FRAC_CONST(0.026810178214254) },
2183 { FRAC_CONST(0.015973102334858), FRAC_CONST(0.026859309406613) },
2184 { FRAC_CONST(0.015890623962454), FRAC_CONST(0.026908187788922) },
2185 { FRAC_CONST(0.015807996021446), FRAC_CONST(0.026956812901119) },
2186 { FRAC_CONST(0.015725219289558), FRAC_CONST(0.027005184285527) },
2187 { FRAC_CONST(0.015642294545918), FRAC_CONST(0.027053301486856) },
2188 { FRAC_CONST(0.015559222571044), FRAC_CONST(0.027101164052208) },
2189 { FRAC_CONST(0.015476004146842), FRAC_CONST(0.027148771531083) },
2190 { FRAC_CONST(0.015392640056594), FRAC_CONST(0.027196123475380) },
2191 { FRAC_CONST(0.015309131084956), FRAC_CONST(0.027243219439406) },
2192 { FRAC_CONST(0.015225478017946), FRAC_CONST(0.027290058979875) },
2193 { FRAC_CONST(0.015141681642938), FRAC_CONST(0.027336641655915) },
2194 { FRAC_CONST(0.015057742748656), FRAC_CONST(0.027382967029073) },
2195 { FRAC_CONST(0.014973662125164), FRAC_CONST(0.027429034663317) },
2196 { FRAC_CONST(0.014889440563862), FRAC_CONST(0.027474844125040) },
2197 { FRAC_CONST(0.014805078857474), FRAC_CONST(0.027520394983066) },
2198 { FRAC_CONST(0.014720577800046), FRAC_CONST(0.027565686808654) },
2199 { FRAC_CONST(0.014635938186934), FRAC_CONST(0.027610719175499) },
2200 { FRAC_CONST(0.014551160814797), FRAC_CONST(0.027655491659740) },
2201 { FRAC_CONST(0.014466246481592), FRAC_CONST(0.027700003839960) },
2202 { FRAC_CONST(0.014381195986567), FRAC_CONST(0.027744255297195) },
2203 { FRAC_CONST(0.014296010130247), FRAC_CONST(0.027788245614933) },
2204 { FRAC_CONST(0.014210689714436), FRAC_CONST(0.027831974379120) },
2205 { FRAC_CONST(0.014125235542201), FRAC_CONST(0.027875441178165) },
2206 { FRAC_CONST(0.014039648417870), FRAC_CONST(0.027918645602941) },
2207 { FRAC_CONST(0.013953929147020), FRAC_CONST(0.027961587246792) },
2208 { FRAC_CONST(0.013868078536476), FRAC_CONST(0.028004265705534) },
2209 { FRAC_CONST(0.013782097394294), FRAC_CONST(0.028046680577462) },
2210 { FRAC_CONST(0.013695986529763), FRAC_CONST(0.028088831463351) },
2211 { FRAC_CONST(0.013609746753390), FRAC_CONST(0.028130717966461) },
2212 { FRAC_CONST(0.013523378876898), FRAC_CONST(0.028172339692540) },
2213 { FRAC_CONST(0.013436883713214), FRAC_CONST(0.028213696249828) },
2214 { FRAC_CONST(0.013350262076462), FRAC_CONST(0.028254787249062) },
2215 { FRAC_CONST(0.013263514781960), FRAC_CONST(0.028295612303478) },
2216 { FRAC_CONST(0.013176642646205), FRAC_CONST(0.028336171028814) },
2217 { FRAC_CONST(0.013089646486871), FRAC_CONST(0.028376463043317) },
2218 { FRAC_CONST(0.013002527122799), FRAC_CONST(0.028416487967743) },
2219 { FRAC_CONST(0.012915285373990), FRAC_CONST(0.028456245425361) },
2220 { FRAC_CONST(0.012827922061597), FRAC_CONST(0.028495735041960) },
2221 { FRAC_CONST(0.012740438007915), FRAC_CONST(0.028534956445849) },
2222 { FRAC_CONST(0.012652834036379), FRAC_CONST(0.028573909267859) },
2223 { FRAC_CONST(0.012565110971550), FRAC_CONST(0.028612593141354) },
2224 { FRAC_CONST(0.012477269639111), FRAC_CONST(0.028651007702224) },
2225 { FRAC_CONST(0.012389310865858), FRAC_CONST(0.028689152588899) },
2226 { FRAC_CONST(0.012301235479693), FRAC_CONST(0.028727027442343) },
2227 { FRAC_CONST(0.012213044309615), FRAC_CONST(0.028764631906065) },
2228 { FRAC_CONST(0.012124738185712), FRAC_CONST(0.028801965626115) },
2229 { FRAC_CONST(0.012036317939156), FRAC_CONST(0.028839028251097) },
2230 { FRAC_CONST(0.011947784402191), FRAC_CONST(0.028875819432161) },
2231 { FRAC_CONST(0.011859138408130), FRAC_CONST(0.028912338823015) },
2232 { FRAC_CONST(0.011770380791341), FRAC_CONST(0.028948586079925) },
2233 { FRAC_CONST(0.011681512387245), FRAC_CONST(0.028984560861718) },
2234 { FRAC_CONST(0.011592534032306), FRAC_CONST(0.029020262829785) },
2235 { FRAC_CONST(0.011503446564022), FRAC_CONST(0.029055691648087) },
2236 { FRAC_CONST(0.011414250820918), FRAC_CONST(0.029090846983152) },
2237 { FRAC_CONST(0.011324947642537), FRAC_CONST(0.029125728504087) },
2238 { FRAC_CONST(0.011235537869437), FRAC_CONST(0.029160335882573) },
2239 { FRAC_CONST(0.011146022343175), FRAC_CONST(0.029194668792871) },
2240 { FRAC_CONST(0.011056401906305), FRAC_CONST(0.029228726911828) },
2241 { FRAC_CONST(0.010966677402371), FRAC_CONST(0.029262509918876) },
2242 { FRAC_CONST(0.010876849675891), FRAC_CONST(0.029296017496036) },
2243 { FRAC_CONST(0.010786919572361), FRAC_CONST(0.029329249327922) },
2244 { FRAC_CONST(0.010696887938235), FRAC_CONST(0.029362205101743) },
2245 { FRAC_CONST(0.010606755620926), FRAC_CONST(0.029394884507308) },
2246 { FRAC_CONST(0.010516523468793), FRAC_CONST(0.029427287237024) },
2247 { FRAC_CONST(0.010426192331137), FRAC_CONST(0.029459412985906) },
2248 { FRAC_CONST(0.010335763058187), FRAC_CONST(0.029491261451573) },
2249 { FRAC_CONST(0.010245236501099), FRAC_CONST(0.029522832334255) },
2250 { FRAC_CONST(0.010154613511943), FRAC_CONST(0.029554125336796) },
2251 { FRAC_CONST(0.010063894943698), FRAC_CONST(0.029585140164654) },
2252 { FRAC_CONST(0.009973081650240), FRAC_CONST(0.029615876525905) },
2253 { FRAC_CONST(0.009882174486340), FRAC_CONST(0.029646334131247) },
2254 { FRAC_CONST(0.009791174307650), FRAC_CONST(0.029676512694001) },
2255 { FRAC_CONST(0.009700081970699), FRAC_CONST(0.029706411930116) },
2256 { FRAC_CONST(0.009608898332881), FRAC_CONST(0.029736031558168) },
2257 { FRAC_CONST(0.009517624252453), FRAC_CONST(0.029765371299366) },
2258 { FRAC_CONST(0.009426260588521), FRAC_CONST(0.029794430877553) },
2259 { FRAC_CONST(0.009334808201034), FRAC_CONST(0.029823210019210) },
2260 { FRAC_CONST(0.009243267950778), FRAC_CONST(0.029851708453456) },
2261 { FRAC_CONST(0.009151640699363), FRAC_CONST(0.029879925912053) },
2262 { FRAC_CONST(0.009059927309220), FRAC_CONST(0.029907862129408) },
2263 { FRAC_CONST(0.008968128643591), FRAC_CONST(0.029935516842573) },
2264 { FRAC_CONST(0.008876245566520), FRAC_CONST(0.029962889791254) },
2265 { FRAC_CONST(0.008784278942845), FRAC_CONST(0.029989980717805) },
2266 { FRAC_CONST(0.008692229638191), FRAC_CONST(0.030016789367235) },
2267 { FRAC_CONST(0.008600098518961), FRAC_CONST(0.030043315487212) },
2268 { FRAC_CONST(0.008507886452329), FRAC_CONST(0.030069558828062) },
2269 { FRAC_CONST(0.008415594306230), FRAC_CONST(0.030095519142772) },
2270 { FRAC_CONST(0.008323222949351), FRAC_CONST(0.030121196186994) },
2271 { FRAC_CONST(0.008230773251129), FRAC_CONST(0.030146589719046) },
2272 { FRAC_CONST(0.008138246081733), FRAC_CONST(0.030171699499915) },
2273 { FRAC_CONST(0.008045642312067), FRAC_CONST(0.030196525293257) },
2274 { FRAC_CONST(0.007952962813750), FRAC_CONST(0.030221066865402) },
2275 { FRAC_CONST(0.007860208459119), FRAC_CONST(0.030245323985357) },
2276 { FRAC_CONST(0.007767380121212), FRAC_CONST(0.030269296424803) },
2277 { FRAC_CONST(0.007674478673766), FRAC_CONST(0.030292983958103) },
2278 { FRAC_CONST(0.007581504991203), FRAC_CONST(0.030316386362302) },
2279 { FRAC_CONST(0.007488459948628), FRAC_CONST(0.030339503417126) },
2280 { FRAC_CONST(0.007395344421816), FRAC_CONST(0.030362334904989) },
2281 { FRAC_CONST(0.007302159287206), FRAC_CONST(0.030384880610993) },
2282 { FRAC_CONST(0.007208905421891), FRAC_CONST(0.030407140322928) },
2283 { FRAC_CONST(0.007115583703613), FRAC_CONST(0.030429113831278) },
2284 { FRAC_CONST(0.007022195010752), FRAC_CONST(0.030450800929220) },
2285 { FRAC_CONST(0.006928740222316), FRAC_CONST(0.030472201412626) },
2286 { FRAC_CONST(0.006835220217939), FRAC_CONST(0.030493315080068) },
2287 { FRAC_CONST(0.006741635877866), FRAC_CONST(0.030514141732814) },
2288 { FRAC_CONST(0.006647988082948), FRAC_CONST(0.030534681174838) },
2289 { FRAC_CONST(0.006554277714635), FRAC_CONST(0.030554933212813) },
2290 { FRAC_CONST(0.006460505654964), FRAC_CONST(0.030574897656119) },
2291 { FRAC_CONST(0.006366672786553), FRAC_CONST(0.030594574316845) },
2292 { FRAC_CONST(0.006272779992593), FRAC_CONST(0.030613963009786) },
2293 { FRAC_CONST(0.006178828156839), FRAC_CONST(0.030633063552447) },
2294 { FRAC_CONST(0.006084818163601), FRAC_CONST(0.030651875765048) },
2295 { FRAC_CONST(0.005990750897737), FRAC_CONST(0.030670399470520) },
2296 { FRAC_CONST(0.005896627244644), FRAC_CONST(0.030688634494512) },
2297 { FRAC_CONST(0.005802448090250), FRAC_CONST(0.030706580665388) },
2298 { FRAC_CONST(0.005708214321004), FRAC_CONST(0.030724237814232) },
2299 { FRAC_CONST(0.005613926823871), FRAC_CONST(0.030741605774849) },
2300 { FRAC_CONST(0.005519586486321), FRAC_CONST(0.030758684383764) },
2301 { FRAC_CONST(0.005425194196321), FRAC_CONST(0.030775473480228) },
2302 { FRAC_CONST(0.005330750842327), FRAC_CONST(0.030791972906214) },
2303 { FRAC_CONST(0.005236257313276), FRAC_CONST(0.030808182506425) },
2304 { FRAC_CONST(0.005141714498576), FRAC_CONST(0.030824102128288) },
2305 { FRAC_CONST(0.005047123288102), FRAC_CONST(0.030839731621963) },
2306 { FRAC_CONST(0.004952484572181), FRAC_CONST(0.030855070840339) },
2307 { FRAC_CONST(0.004857799241589), FRAC_CONST(0.030870119639036) },
2308 { FRAC_CONST(0.004763068187541), FRAC_CONST(0.030884877876411) },
2309 { FRAC_CONST(0.004668292301681), FRAC_CONST(0.030899345413553) },
2310 { FRAC_CONST(0.004573472476075), FRAC_CONST(0.030913522114288) },
2311 { FRAC_CONST(0.004478609603205), FRAC_CONST(0.030927407845180) },
2312 { FRAC_CONST(0.004383704575956), FRAC_CONST(0.030941002475530) },
2313 { FRAC_CONST(0.004288758287610), FRAC_CONST(0.030954305877381) },
2314 { FRAC_CONST(0.004193771631837), FRAC_CONST(0.030967317925516) },
2315 { FRAC_CONST(0.004098745502689), FRAC_CONST(0.030980038497461) },
2316 { FRAC_CONST(0.004003680794587), FRAC_CONST(0.030992467473486) },
2317 { FRAC_CONST(0.003908578402316), FRAC_CONST(0.031004604736602) },
2318 { FRAC_CONST(0.003813439221017), FRAC_CONST(0.031016450172571) },
2319 { FRAC_CONST(0.003718264146176), FRAC_CONST(0.031028003669899) },
2320 { FRAC_CONST(0.003623054073616), FRAC_CONST(0.031039265119839) },
2321 { FRAC_CONST(0.003527809899492), FRAC_CONST(0.031050234416394) },
2322 { FRAC_CONST(0.003432532520278), FRAC_CONST(0.031060911456318) },
2323 { FRAC_CONST(0.003337222832760), FRAC_CONST(0.031071296139114) },
2324 { FRAC_CONST(0.003241881734029), FRAC_CONST(0.031081388367037) },
2325 { FRAC_CONST(0.003146510121474), FRAC_CONST(0.031091188045095) },
2326 { FRAC_CONST(0.003051108892766), FRAC_CONST(0.031100695081051) },
2327 { FRAC_CONST(0.002955678945860), FRAC_CONST(0.031109909385419) },
2328 { FRAC_CONST(0.002860221178978), FRAC_CONST(0.031118830871473) },
2329 { FRAC_CONST(0.002764736490604), FRAC_CONST(0.031127459455239) },
2330 { FRAC_CONST(0.002669225779478), FRAC_CONST(0.031135795055501) },
2331 { FRAC_CONST(0.002573689944583), FRAC_CONST(0.031143837593803) },
2332 { FRAC_CONST(0.002478129885137), FRAC_CONST(0.031151586994444) },
2333 { FRAC_CONST(0.002382546500589), FRAC_CONST(0.031159043184484) },
2334 { FRAC_CONST(0.002286940690606), FRAC_CONST(0.031166206093743) },
2335 { FRAC_CONST(0.002191313355067), FRAC_CONST(0.031173075654800) },
2336 { FRAC_CONST(0.002095665394051), FRAC_CONST(0.031179651802998) },
2337 { FRAC_CONST(0.001999997707835), FRAC_CONST(0.031185934476438) },
2338 { FRAC_CONST(0.001904311196878), FRAC_CONST(0.031191923615985) },
2339 { FRAC_CONST(0.001808606761820), FRAC_CONST(0.031197619165268) },
2340 { FRAC_CONST(0.001712885303465), FRAC_CONST(0.031203021070678) },
2341 { FRAC_CONST(0.001617147722782), FRAC_CONST(0.031208129281370) },
2342 { FRAC_CONST(0.001521394920889), FRAC_CONST(0.031212943749264) },
2343 { FRAC_CONST(0.001425627799047), FRAC_CONST(0.031217464429043) },
2344 { FRAC_CONST(0.001329847258653), FRAC_CONST(0.031221691278159) },
2345 { FRAC_CONST(0.001234054201231), FRAC_CONST(0.031225624256825) },
2346 { FRAC_CONST(0.001138249528420), FRAC_CONST(0.031229263328024) },
2347 { FRAC_CONST(0.001042434141971), FRAC_CONST(0.031232608457502) },
2348 { FRAC_CONST(0.000946608943736), FRAC_CONST(0.031235659613775) },
2349 { FRAC_CONST(0.000850774835656), FRAC_CONST(0.031238416768124) },
2350 { FRAC_CONST(0.000754932719759), FRAC_CONST(0.031240879894597) },
2351 { FRAC_CONST(0.000659083498149), FRAC_CONST(0.031243048970010) },
2352 { FRAC_CONST(0.000563228072993), FRAC_CONST(0.031244923973948) },
2353 { FRAC_CONST(0.000467367346520), FRAC_CONST(0.031246504888762) },
2354 { FRAC_CONST(0.000371502221008), FRAC_CONST(0.031247791699571) },
2355 { FRAC_CONST(0.000275633598775), FRAC_CONST(0.031248784394264) },
2356 { FRAC_CONST(0.000179762382174), FRAC_CONST(0.031249482963498) },
2357 { FRAC_CONST(0.000083889473581), FRAC_CONST(0.031249887400697) }
2358};
2359
2360/* 64 (N/4) complex twiddle factors */
2361ALIGN static const complex_t mdct_tab_256[] =
2362{
2363 { FRAC_CONST(0.088387931675923), FRAC_CONST(0.000271171628935) },
2364 { FRAC_CONST(0.088354655998507), FRAC_CONST(0.002440238387037) },
2365 { FRAC_CONST(0.088268158780110), FRAC_CONST(0.004607835236780) },
2366 { FRAC_CONST(0.088128492123423), FRAC_CONST(0.006772656498875) },
2367 { FRAC_CONST(0.087935740158418), FRAC_CONST(0.008933398165942) },
2368 { FRAC_CONST(0.087690018991670), FRAC_CONST(0.011088758687994) },
2369 { FRAC_CONST(0.087391476636423), FRAC_CONST(0.013237439756448) },
2370 { FRAC_CONST(0.087040292923427), FRAC_CONST(0.015378147086172) },
2371 { FRAC_CONST(0.086636679392621), FRAC_CONST(0.017509591195118) },
2372 { FRAC_CONST(0.086180879165703), FRAC_CONST(0.019630488181053) },
2373 { FRAC_CONST(0.085673166799686), FRAC_CONST(0.021739560494940) },
2374 { FRAC_CONST(0.085113848121515), FRAC_CONST(0.023835537710479) },
2375 { FRAC_CONST(0.084503260043847), FRAC_CONST(0.025917157289369) },
2376 { FRAC_CONST(0.083841770362110), FRAC_CONST(0.027983165341813) },
2377 { FRAC_CONST(0.083129777532952), FRAC_CONST(0.030032317381813) },
2378 { FRAC_CONST(0.082367710434230), FRAC_CONST(0.032063379076803) },
2379 { FRAC_CONST(0.081556028106671), FRAC_CONST(0.034075126991164) },
2380 { FRAC_CONST(0.080695219477356), FRAC_CONST(0.036066349323177) },
2381 { FRAC_CONST(0.079785803065216), FRAC_CONST(0.038035846634965) },
2382 { FRAC_CONST(0.078828326668693), FRAC_CONST(0.039982432574992) },
2383 { FRAC_CONST(0.077823367035766), FRAC_CONST(0.041904934592675) },
2384 { FRAC_CONST(0.076771529516540), FRAC_CONST(0.043802194644686) },
2385 { FRAC_CONST(0.075673447698606), FRAC_CONST(0.045673069892513) },
2386 { FRAC_CONST(0.074529783025390), FRAC_CONST(0.047516433390863) },
2387 { FRAC_CONST(0.073341224397728), FRAC_CONST(0.049331174766491) },
2388 { FRAC_CONST(0.072108487758894), FRAC_CONST(0.051116200887052) },
2389 { FRAC_CONST(0.070832315663343), FRAC_CONST(0.052870436519557) },
2390 { FRAC_CONST(0.069513476829429), FRAC_CONST(0.054592824978055) },
2391 { FRAC_CONST(0.068152765676348), FRAC_CONST(0.056282328760143) },
2392 { FRAC_CONST(0.066751001845620), FRAC_CONST(0.057937930171918) },
2393 { FRAC_CONST(0.065309029707361), FRAC_CONST(0.059558631940996) },
2394 { FRAC_CONST(0.063827717851668), FRAC_CONST(0.061143457817234) },
2395 { FRAC_CONST(0.062307958565413), FRAC_CONST(0.062691453160784) },
2396 { FRAC_CONST(0.060750667294763), FRAC_CONST(0.064201685517134) },
2397 { FRAC_CONST(0.059156782093749), FRAC_CONST(0.065673245178784) },
2398 { FRAC_CONST(0.057527263059216), FRAC_CONST(0.067105245733220) },
2399 { FRAC_CONST(0.055863091752499), FRAC_CONST(0.068496824596852) },
2400 { FRAC_CONST(0.054165270608165), FRAC_CONST(0.069847143534609) },
2401 { FRAC_CONST(0.052434822330188), FRAC_CONST(0.071155389164853) },
2402 { FRAC_CONST(0.050672789275903), FRAC_CONST(0.072420773449336) },
2403 { FRAC_CONST(0.048880232828135), FRAC_CONST(0.073642534167879) },
2404 { FRAC_CONST(0.047058232755862), FRAC_CONST(0.074819935377512) },
2405 { FRAC_CONST(0.045207886563797), FRAC_CONST(0.075952267855771) },
2406 { FRAC_CONST(0.043330308831298), FRAC_CONST(0.077038849527912) },
2407 { FRAC_CONST(0.041426630540984), FRAC_CONST(0.078079025877766) },
2408 { FRAC_CONST(0.039497998397473), FRAC_CONST(0.079072170341994) },
2409 { FRAC_CONST(0.037545574136653), FRAC_CONST(0.080017684687506) },
2410 { FRAC_CONST(0.035570533825892), FRAC_CONST(0.080914999371817) },
2411 { FRAC_CONST(0.033574067155622), FRAC_CONST(0.081763573886112) },
2412 { FRAC_CONST(0.031557376722714), FRAC_CONST(0.082562897080836) },
2413 { FRAC_CONST(0.029521677306074), FRAC_CONST(0.083312487473584) },
2414 { FRAC_CONST(0.027468195134911), FRAC_CONST(0.084011893539132) },
2415 { FRAC_CONST(0.025398167150101), FRAC_CONST(0.084660693981419) },
2416 { FRAC_CONST(0.023312840259098), FRAC_CONST(0.085258497987320) },
2417 { FRAC_CONST(0.021213470584847), FRAC_CONST(0.085804945462053) },
2418 { FRAC_CONST(0.019101322709138), FRAC_CONST(0.086299707246093) },
2419 { FRAC_CONST(0.016977668910873), FRAC_CONST(0.086742485313442) },
2420 { FRAC_CONST(0.014843788399692), FRAC_CONST(0.087133012951149) },
2421 { FRAC_CONST(0.012700966545425), FRAC_CONST(0.087471054919968) },
2422 { FRAC_CONST(0.010550494103830), FRAC_CONST(0.087756407596056) },
2423 { FRAC_CONST(0.008393666439096), FRAC_CONST(0.087988899093631) },
2424 { FRAC_CONST(0.006231782743558), FRAC_CONST(0.088168389368510) },
2425 { FRAC_CONST(0.004066145255116), FRAC_CONST(0.088294770302461) },
2426 { FRAC_CONST(0.001898058472816), FRAC_CONST(0.088367965768336) }
2427};
2428
2429#ifdef LD_DEC
2430/* 128 (N/4) complex twiddle factors */
2431ALIGN static const complex_t mdct_tab_1024[] =
2432{
2433 { FRAC_CONST(0.044194160825012), FRAC_CONST(0.000033896503468) },
2434 { FRAC_CONST(0.044193120897389), FRAC_CONST(0.000305066138364) },
2435 { FRAC_CONST(0.044190417123742), FRAC_CONST(0.000576224287693) },
2436 { FRAC_CONST(0.044186049605866), FRAC_CONST(0.000847360742503) },
2437 { FRAC_CONST(0.044180018508197), FRAC_CONST(0.001118465294660) },
2438 { FRAC_CONST(0.044172324057802), FRAC_CONST(0.001389527737231) },
2439 { FRAC_CONST(0.044162966544372), FRAC_CONST(0.001660537864867) },
2440 { FRAC_CONST(0.044151946320213), FRAC_CONST(0.001931485474192) },
2441 { FRAC_CONST(0.044139263800230), FRAC_CONST(0.002202360364180) },
2442 { FRAC_CONST(0.044124919461912), FRAC_CONST(0.002473152336546) },
2443 { FRAC_CONST(0.044108913845316), FRAC_CONST(0.002743851196123) },
2444 { FRAC_CONST(0.044091247553044), FRAC_CONST(0.003014446751254) },
2445 { FRAC_CONST(0.044071921250223), FRAC_CONST(0.003284928814169) },
2446 { FRAC_CONST(0.044050935664476), FRAC_CONST(0.003555287201370) },
2447 { FRAC_CONST(0.044028291585898), FRAC_CONST(0.003825511734018) },
2448 { FRAC_CONST(0.044003989867028), FRAC_CONST(0.004095592238311) },
2449 { FRAC_CONST(0.043978031422810), FRAC_CONST(0.004365518545871) },
2450 { FRAC_CONST(0.043950417230565), FRAC_CONST(0.004635280494126) },
2451 { FRAC_CONST(0.043921148329953), FRAC_CONST(0.004904867926689) },
2452 { FRAC_CONST(0.043890225822930), FRAC_CONST(0.005174270693748) },
2453 { FRAC_CONST(0.043857650873712), FRAC_CONST(0.005443478652439) },
2454 { FRAC_CONST(0.043823424708727), FRAC_CONST(0.005712481667236) },
2455 { FRAC_CONST(0.043787548616571), FRAC_CONST(0.005981269610326) },
2456 { FRAC_CONST(0.043750023947958), FRAC_CONST(0.006249832361997) },
2457 { FRAC_CONST(0.043710852115672), FRAC_CONST(0.006518159811011) },
2458 { FRAC_CONST(0.043670034594508), FRAC_CONST(0.006786241854993) },
2459 { FRAC_CONST(0.043627572921225), FRAC_CONST(0.007054068400804) },
2460 { FRAC_CONST(0.043583468694479), FRAC_CONST(0.007321629364927) },
2461 { FRAC_CONST(0.043537723574771), FRAC_CONST(0.007588914673843) },
2462 { FRAC_CONST(0.043490339284377), FRAC_CONST(0.007855914264410) },
2463 { FRAC_CONST(0.043441317607290), FRAC_CONST(0.008122618084246) },
2464 { FRAC_CONST(0.043390660389149), FRAC_CONST(0.008389016092101) },
2465 { FRAC_CONST(0.043338369537168), FRAC_CONST(0.008655098258243) },
2466 { FRAC_CONST(0.043284447020070), FRAC_CONST(0.008920854564826) },
2467 { FRAC_CONST(0.043228894868005), FRAC_CONST(0.009186275006278) },
2468 { FRAC_CONST(0.043171715172482), FRAC_CONST(0.009451349589667) },
2469 { FRAC_CONST(0.043112910086283), FRAC_CONST(0.009716068335087) },
2470 { FRAC_CONST(0.043052481823387), FRAC_CONST(0.009980421276025) },
2471 { FRAC_CONST(0.042990432658884), FRAC_CONST(0.010244398459743) },
2472 { FRAC_CONST(0.042926764928889), FRAC_CONST(0.010507989947649) },
2473 { FRAC_CONST(0.042861481030457), FRAC_CONST(0.010771185815673) },
2474 { FRAC_CONST(0.042794583421490), FRAC_CONST(0.011033976154639) },
2475 { FRAC_CONST(0.042726074620644), FRAC_CONST(0.011296351070639) },
2476 { FRAC_CONST(0.042655957207238), FRAC_CONST(0.011558300685406) },
2477 { FRAC_CONST(0.042584233821153), FRAC_CONST(0.011819815136685) },
2478 { FRAC_CONST(0.042510907162732), FRAC_CONST(0.012080884578604) },
2479 { FRAC_CONST(0.042435979992684), FRAC_CONST(0.012341499182048) },
2480 { FRAC_CONST(0.042359455131975), FRAC_CONST(0.012601649135022) },
2481 { FRAC_CONST(0.042281335461721), FRAC_CONST(0.012861324643029) },
2482 { FRAC_CONST(0.042201623923085), FRAC_CONST(0.013120515929433) },
2483 { FRAC_CONST(0.042120323517160), FRAC_CONST(0.013379213235827) },
2484 { FRAC_CONST(0.042037437304862), FRAC_CONST(0.013637406822406) },
2485 { FRAC_CONST(0.041952968406809), FRAC_CONST(0.013895086968325) },
2486 { FRAC_CONST(0.041866920003207), FRAC_CONST(0.014152243972073) },
2487 { FRAC_CONST(0.041779295333730), FRAC_CONST(0.014408868151835) },
2488 { FRAC_CONST(0.041690097697398), FRAC_CONST(0.014664949845855) },
2489 { FRAC_CONST(0.041599330452450), FRAC_CONST(0.014920479412801) },
2490 { FRAC_CONST(0.041506997016224), FRAC_CONST(0.015175447232131) },
2491 { FRAC_CONST(0.041413100865019), FRAC_CONST(0.015429843704450) },
2492 { FRAC_CONST(0.041317645533974), FRAC_CONST(0.015683659251874) },
2493 { FRAC_CONST(0.041220634616927), FRAC_CONST(0.015936884318392) },
2494 { FRAC_CONST(0.041122071766285), FRAC_CONST(0.016189509370223) },
2495 { FRAC_CONST(0.041021960692883), FRAC_CONST(0.016441524896177) },
2496 { FRAC_CONST(0.040920305165846), FRAC_CONST(0.016692921408010) },
2497 { FRAC_CONST(0.040817109012449), FRAC_CONST(0.016943689440788) },
2498 { FRAC_CONST(0.040712376117967), FRAC_CONST(0.017193819553235) },
2499 { FRAC_CONST(0.040606110425535), FRAC_CONST(0.017443302328094) },
2500 { FRAC_CONST(0.040498315935996), FRAC_CONST(0.017692128372479) },
2501 { FRAC_CONST(0.040388996707752), FRAC_CONST(0.017940288318230) },
2502 { FRAC_CONST(0.040278156856609), FRAC_CONST(0.018187772822267) },
2503 { FRAC_CONST(0.040165800555627), FRAC_CONST(0.018434572566936) },
2504 { FRAC_CONST(0.040051932034955), FRAC_CONST(0.018680678260367) },
2505 { FRAC_CONST(0.039936555581679), FRAC_CONST(0.018926080636820) },
2506 { FRAC_CONST(0.039819675539659), FRAC_CONST(0.019170770457035) },
2507 { FRAC_CONST(0.039701296309360), FRAC_CONST(0.019414738508577) },
2508 { FRAC_CONST(0.039581422347694), FRAC_CONST(0.019657975606187) },
2509 { FRAC_CONST(0.039460058167849), FRAC_CONST(0.019900472592126) },
2510 { FRAC_CONST(0.039337208339116), FRAC_CONST(0.020142220336521) },
2511 { FRAC_CONST(0.039212877486723), FRAC_CONST(0.020383209737704) },
2512 { FRAC_CONST(0.039087070291656), FRAC_CONST(0.020623431722561) },
2513 { FRAC_CONST(0.038959791490485), FRAC_CONST(0.020862877246870) },
2514 { FRAC_CONST(0.038831045875184), FRAC_CONST(0.021101537295642) },
2515 { FRAC_CONST(0.038700838292953), FRAC_CONST(0.021339402883462) },
2516 { FRAC_CONST(0.038569173646034), FRAC_CONST(0.021576465054824) },
2517 { FRAC_CONST(0.038436056891527), FRAC_CONST(0.021812714884472) },
2518 { FRAC_CONST(0.038301493041202), FRAC_CONST(0.022048143477734) },
2519 { FRAC_CONST(0.038165487161312), FRAC_CONST(0.022282741970855) },
2520 { FRAC_CONST(0.038028044372402), FRAC_CONST(0.022516501531335) },
2521 { FRAC_CONST(0.037889169849115), FRAC_CONST(0.022749413358259) },
2522 { FRAC_CONST(0.037748868819998), FRAC_CONST(0.022981468682628) },
2523 { FRAC_CONST(0.037607146567305), FRAC_CONST(0.023212658767690) },
2524 { FRAC_CONST(0.037464008426800), FRAC_CONST(0.023442974909269) },
2525 { FRAC_CONST(0.037319459787553), FRAC_CONST(0.023672408436094) },
2526 { FRAC_CONST(0.037173506091737), FRAC_CONST(0.023900950710120) },
2527 { FRAC_CONST(0.037026152834428), FRAC_CONST(0.024128593126861) },
2528 { FRAC_CONST(0.036877405563392), FRAC_CONST(0.024355327115708) },
2529 { FRAC_CONST(0.036727269878879), FRAC_CONST(0.024581144140255) },
2530 { FRAC_CONST(0.036575751433414), FRAC_CONST(0.024806035698618) },
2531 { FRAC_CONST(0.036422855931580), FRAC_CONST(0.025029993323758) },
2532 { FRAC_CONST(0.036268589129807), FRAC_CONST(0.025253008583796) },
2533 { FRAC_CONST(0.036112956836151), FRAC_CONST(0.025475073082334) },
2534 { FRAC_CONST(0.035955964910083), FRAC_CONST(0.025696178458769) },
2535 { FRAC_CONST(0.035797619262257), FRAC_CONST(0.025916316388609) },
2536 { FRAC_CONST(0.035637925854300), FRAC_CONST(0.026135478583784) },
2537 { FRAC_CONST(0.035476890698576), FRAC_CONST(0.026353656792963) },
2538 { FRAC_CONST(0.035314519857970), FRAC_CONST(0.026570842801858) },
2539 { FRAC_CONST(0.035150819445650), FRAC_CONST(0.026787028433540) },
2540 { FRAC_CONST(0.034985795624846), FRAC_CONST(0.027002205548742) },
2541 { FRAC_CONST(0.034819454608610), FRAC_CONST(0.027216366046166) },
2542 { FRAC_CONST(0.034651802659589), FRAC_CONST(0.027429501862792) },
2543 { FRAC_CONST(0.034482846089783), FRAC_CONST(0.027641604974175) },
2544 { FRAC_CONST(0.034312591260311), FRAC_CONST(0.027852667394755) },
2545 { FRAC_CONST(0.034141044581172), FRAC_CONST(0.028062681178149) },
2546 { FRAC_CONST(0.033968212511001), FRAC_CONST(0.028271638417458) },
2547 { FRAC_CONST(0.033794101556828), FRAC_CONST(0.028479531245560) },
2548 { FRAC_CONST(0.033618718273831), FRAC_CONST(0.028686351835407) },
2549 { FRAC_CONST(0.033442069265093), FRAC_CONST(0.028892092400321) },
2550 { FRAC_CONST(0.033264161181349), FRAC_CONST(0.029096745194286) },
2551 { FRAC_CONST(0.033085000720737), FRAC_CONST(0.029300302512241) },
2552 { FRAC_CONST(0.032904594628548), FRAC_CONST(0.029502756690366) },
2553 { FRAC_CONST(0.032722949696969), FRAC_CONST(0.029704100106376) },
2554 { FRAC_CONST(0.032540072764829), FRAC_CONST(0.029904325179807) },
2555 { FRAC_CONST(0.032355970717341), FRAC_CONST(0.030103424372297) },
2556 { FRAC_CONST(0.032170650485843), FRAC_CONST(0.030301390187873) },
2557 { FRAC_CONST(0.031984119047537), FRAC_CONST(0.030498215173235) },
2558 { FRAC_CONST(0.031796383425227), FRAC_CONST(0.030693891918034) },
2559 { FRAC_CONST(0.031607450687052), FRAC_CONST(0.030888413055150) },
2560 { FRAC_CONST(0.031417327946223), FRAC_CONST(0.031081771260973) },
2561 { FRAC_CONST(0.031226022360754), FRAC_CONST(0.031273959255676) },
2562 { FRAC_CONST(0.031033541133193), FRAC_CONST(0.031464969803488) },
2563 { FRAC_CONST(0.030839891510348), FRAC_CONST(0.031654795712972) },
2564 { FRAC_CONST(0.030645080783018), FRAC_CONST(0.031843429837288) },
2565 { FRAC_CONST(0.030449116285718), FRAC_CONST(0.032030865074469) },
2566 { FRAC_CONST(0.030252005396399), FRAC_CONST(0.032217094367684) },
2567 { FRAC_CONST(0.030053755536176), FRAC_CONST(0.032402110705505) },
2568 { FRAC_CONST(0.029854374169043), FRAC_CONST(0.032585907122172) },
2569 { FRAC_CONST(0.029653868801596), FRAC_CONST(0.032768476697853) },
2570 { FRAC_CONST(0.029452246982750), FRAC_CONST(0.032949812558907) },
2571 { FRAC_CONST(0.029249516303451), FRAC_CONST(0.033129907878142) },
2572 { FRAC_CONST(0.029045684396395), FRAC_CONST(0.033308755875070) },
2573 { FRAC_CONST(0.028840758935738), FRAC_CONST(0.033486349816166) },
2574 { FRAC_CONST(0.028634747636808), FRAC_CONST(0.033662683015118) },
2575 { FRAC_CONST(0.028427658255815), FRAC_CONST(0.033837748833080) },
2576 { FRAC_CONST(0.028219498589555), FRAC_CONST(0.034011540678924) },
2577 { FRAC_CONST(0.028010276475123), FRAC_CONST(0.034184052009485) },
2578 { FRAC_CONST(0.027799999789613), FRAC_CONST(0.034355276329809) },
2579 { FRAC_CONST(0.027588676449824), FRAC_CONST(0.034525207193396) },
2580 { FRAC_CONST(0.027376314411959), FRAC_CONST(0.034693838202447) },
2581 { FRAC_CONST(0.027162921671330), FRAC_CONST(0.034861163008098) },
2582 { FRAC_CONST(0.026948506262053), FRAC_CONST(0.035027175310665) },
2583 { FRAC_CONST(0.026733076256746), FRAC_CONST(0.035191868859880) },
2584 { FRAC_CONST(0.026516639766228), FRAC_CONST(0.035355237455122) },
2585 { FRAC_CONST(0.026299204939210), FRAC_CONST(0.035517274945657) },
2586 { FRAC_CONST(0.026080779961991), FRAC_CONST(0.035677975230865) },
2587 { FRAC_CONST(0.025861373058146), FRAC_CONST(0.035837332260471) },
2588 { FRAC_CONST(0.025640992488223), FRAC_CONST(0.035995340034772) },
2589 { FRAC_CONST(0.025419646549425), FRAC_CONST(0.036151992604866) },
2590 { FRAC_CONST(0.025197343575302), FRAC_CONST(0.036307284072871) },
2591 { FRAC_CONST(0.024974091935435), FRAC_CONST(0.036461208592152) },
2592 { FRAC_CONST(0.024749900035122), FRAC_CONST(0.036613760367538) },
2593 { FRAC_CONST(0.024524776315061), FRAC_CONST(0.036764933655540) },
2594 { FRAC_CONST(0.024298729251033), FRAC_CONST(0.036914722764569) },
2595 { FRAC_CONST(0.024071767353583), FRAC_CONST(0.037063122055150) },
2596 { FRAC_CONST(0.023843899167697), FRAC_CONST(0.037210125940135) },
2597 { FRAC_CONST(0.023615133272485), FRAC_CONST(0.037355728884908) },
2598 { FRAC_CONST(0.023385478280852), FRAC_CONST(0.037499925407603) },
2599 { FRAC_CONST(0.023154942839179), FRAC_CONST(0.037642710079302) },
2600 { FRAC_CONST(0.022923535626995), FRAC_CONST(0.037784077524241) },
2601 { FRAC_CONST(0.022691265356652), FRAC_CONST(0.037924022420018) },
2602 { FRAC_CONST(0.022458140772993), FRAC_CONST(0.038062539497785) },
2603 { FRAC_CONST(0.022224170653027), FRAC_CONST(0.038199623542453) },
2604 { FRAC_CONST(0.021989363805598), FRAC_CONST(0.038335269392885) },
2605 { FRAC_CONST(0.021753729071049), FRAC_CONST(0.038469471942092) },
2606 { FRAC_CONST(0.021517275320897), FRAC_CONST(0.038602226137423) },
2607 { FRAC_CONST(0.021280011457490), FRAC_CONST(0.038733526980758) },
2608 { FRAC_CONST(0.021041946413679), FRAC_CONST(0.038863369528695) },
2609 { FRAC_CONST(0.020803089152479), FRAC_CONST(0.038991748892734) },
2610 { FRAC_CONST(0.020563448666730), FRAC_CONST(0.039118660239466) },
2611 { FRAC_CONST(0.020323033978761), FRAC_CONST(0.039244098790750) },
2612 { FRAC_CONST(0.020081854140050), FRAC_CONST(0.039368059823895) },
2613 { FRAC_CONST(0.019839918230880), FRAC_CONST(0.039490538671839) },
2614 { FRAC_CONST(0.019597235360003), FRAC_CONST(0.039611530723322) },
2615 { FRAC_CONST(0.019353814664291), FRAC_CONST(0.039731031423061) },
2616 { FRAC_CONST(0.019109665308395), FRAC_CONST(0.039849036271924) },
2617 { FRAC_CONST(0.018864796484402), FRAC_CONST(0.039965540827094) },
2618 { FRAC_CONST(0.018619217411483), FRAC_CONST(0.040080540702240) },
2619 { FRAC_CONST(0.018372937335552), FRAC_CONST(0.040194031567683) },
2620 { FRAC_CONST(0.018125965528915), FRAC_CONST(0.040306009150554) },
2621 { FRAC_CONST(0.017878311289921), FRAC_CONST(0.040416469234963) },
2622 { FRAC_CONST(0.017629983942612), FRAC_CONST(0.040525407662148) },
2623 { FRAC_CONST(0.017380992836371), FRAC_CONST(0.040632820330639) },
2624 { FRAC_CONST(0.017131347345575), FRAC_CONST(0.040738703196411) },
2625 { FRAC_CONST(0.016881056869233), FRAC_CONST(0.040843052273033) },
2626 { FRAC_CONST(0.016630130830641), FRAC_CONST(0.040945863631822) },
2627 { FRAC_CONST(0.016378578677023), FRAC_CONST(0.041047133401988) },
2628 { FRAC_CONST(0.016126409879175), FRAC_CONST(0.041146857770781) },
2629 { FRAC_CONST(0.015873633931110), FRAC_CONST(0.041245032983635) },
2630 { FRAC_CONST(0.015620260349699), FRAC_CONST(0.041341655344309) },
2631 { FRAC_CONST(0.015366298674314), FRAC_CONST(0.041436721215026) },
2632 { FRAC_CONST(0.015111758466470), FRAC_CONST(0.041530227016609) },
2633 { FRAC_CONST(0.014856649309460), FRAC_CONST(0.041622169228618) },
2634 { FRAC_CONST(0.014600980808001), FRAC_CONST(0.041712544389481) },
2635 { FRAC_CONST(0.014344762587867), FRAC_CONST(0.041801349096623) },
2636 { FRAC_CONST(0.014088004295529), FRAC_CONST(0.041888580006598) },
2637 { FRAC_CONST(0.013830715597792), FRAC_CONST(0.041974233835211) },
2638 { FRAC_CONST(0.013572906181430), FRAC_CONST(0.042058307357645) },
2639 { FRAC_CONST(0.013314585752822), FRAC_CONST(0.042140797408577) },
2640 { FRAC_CONST(0.013055764037585), FRAC_CONST(0.042221700882306) },
2641 { FRAC_CONST(0.012796450780212), FRAC_CONST(0.042301014732860) },
2642 { FRAC_CONST(0.012536655743699), FRAC_CONST(0.042378735974118) },
2643 { FRAC_CONST(0.012276388709183), FRAC_CONST(0.042454861679919) },
2644 { FRAC_CONST(0.012015659475571), FRAC_CONST(0.042529388984173) },
2645 { FRAC_CONST(0.011754477859172), FRAC_CONST(0.042602315080970) },
2646 { FRAC_CONST(0.011492853693324), FRAC_CONST(0.042673637224683) },
2647 { FRAC_CONST(0.011230796828031), FRAC_CONST(0.042743352730074) },
2648 { FRAC_CONST(0.010968317129584), FRAC_CONST(0.042811458972393) },
2649 { FRAC_CONST(0.010705424480197), FRAC_CONST(0.042877953387479) },
2650 { FRAC_CONST(0.010442128777629), FRAC_CONST(0.042942833471854) },
2651 { FRAC_CONST(0.010178439934815), FRAC_CONST(0.043006096782821) },
2652 { FRAC_CONST(0.009914367879490), FRAC_CONST(0.043067740938551) },
2653 { FRAC_CONST(0.009649922553818), FRAC_CONST(0.043127763618177) },
2654 { FRAC_CONST(0.009385113914016), FRAC_CONST(0.043186162561878) },
2655 { FRAC_CONST(0.009119951929979), FRAC_CONST(0.043242935570968) },
2656 { FRAC_CONST(0.008854446584907), FRAC_CONST(0.043298080507974) },
2657 { FRAC_CONST(0.008588607874926), FRAC_CONST(0.043351595296722) },
2658 { FRAC_CONST(0.008322445808712), FRAC_CONST(0.043403477922409) },
2659 { FRAC_CONST(0.008055970407118), FRAC_CONST(0.043453726431684) },
2660 { FRAC_CONST(0.007789191702791), FRAC_CONST(0.043502338932719) },
2661 { FRAC_CONST(0.007522119739798), FRAC_CONST(0.043549313595281) },
2662 { FRAC_CONST(0.007254764573250), FRAC_CONST(0.043594648650800) },
2663 { FRAC_CONST(0.006987136268915), FRAC_CONST(0.043638342392438) },
2664 { FRAC_CONST(0.006719244902849), FRAC_CONST(0.043680393175148) },
2665 { FRAC_CONST(0.006451100561010), FRAC_CONST(0.043720799415744) },
2666 { FRAC_CONST(0.006182713338881), FRAC_CONST(0.043759559592953) },
2667 { FRAC_CONST(0.005914093341090), FRAC_CONST(0.043796672247476) },
2668 { FRAC_CONST(0.005645250681027), FRAC_CONST(0.043832135982044) },
2669 { FRAC_CONST(0.005376195480466), FRAC_CONST(0.043865949461465) },
2670 { FRAC_CONST(0.005106937869184), FRAC_CONST(0.043898111412683) },
2671 { FRAC_CONST(0.004837487984578), FRAC_CONST(0.043928620624817) },
2672 { FRAC_CONST(0.004567855971284), FRAC_CONST(0.043957475949213) },
2673 { FRAC_CONST(0.004298051980793), FRAC_CONST(0.043984676299484) },
2674 { FRAC_CONST(0.004028086171076), FRAC_CONST(0.044010220651553) },
2675 { FRAC_CONST(0.003757968706190), FRAC_CONST(0.044034108043689) },
2676 { FRAC_CONST(0.003487709755907), FRAC_CONST(0.044056337576546) },
2677 { FRAC_CONST(0.003217319495322), FRAC_CONST(0.044076908413193) },
2678 { FRAC_CONST(0.002946808104477), FRAC_CONST(0.044095819779151) },
2679 { FRAC_CONST(0.002676185767973), FRAC_CONST(0.044113070962418) },
2680 { FRAC_CONST(0.002405462674586), FRAC_CONST(0.044128661313495) },
2681 { FRAC_CONST(0.002134649016890), FRAC_CONST(0.044142590245416) },
2682 { FRAC_CONST(0.001863754990865), FRAC_CONST(0.044154857233763) },
2683 { FRAC_CONST(0.001592790795518), FRAC_CONST(0.044165461816692) },
2684 { FRAC_CONST(0.001321766632497), FRAC_CONST(0.044174403594946) },
2685 { FRAC_CONST(0.001050692705710), FRAC_CONST(0.044181682231873) },
2686 { FRAC_CONST(0.000779579220936), FRAC_CONST(0.044187297453434) },
2687 { FRAC_CONST(0.000508436385446), FRAC_CONST(0.044191249048222) },
2688 { FRAC_CONST(0.000237274407613), FRAC_CONST(0.044193536867459) }
2689};
2690#endif // LD_DEC
2691
2692#ifdef ALLOW_SMALL_FRAMELENGTH
2693/* 480 (N/4) complex twiddle factors */
2694ALIGN static const complex_t mdct_tab_1920[] =
2695{
2696 { FRAC_CONST(0.032274858518097), FRAC_CONST(0.000013202404176) },
2697 { FRAC_CONST(0.032274642494505), FRAC_CONST(0.000118821372483) },
2698 { FRAC_CONST(0.032274080835421), FRAC_CONST(0.000224439068308) },
2699 { FRAC_CONST(0.032273173546860), FRAC_CONST(0.000330054360572) },
2700 { FRAC_CONST(0.032271920638538), FRAC_CONST(0.000435666118218) },
2701 { FRAC_CONST(0.032270322123873), FRAC_CONST(0.000541273210231) },
2702 { FRAC_CONST(0.032268378019984), FRAC_CONST(0.000646874505642) },
2703 { FRAC_CONST(0.032266088347691), FRAC_CONST(0.000752468873546) },
2704 { FRAC_CONST(0.032263453131514), FRAC_CONST(0.000858055183114) },
2705 { FRAC_CONST(0.032260472399674), FRAC_CONST(0.000963632303600) },
2706 { FRAC_CONST(0.032257146184092), FRAC_CONST(0.001069199104358) },
2707 { FRAC_CONST(0.032253474520390), FRAC_CONST(0.001174754454853) },
2708 { FRAC_CONST(0.032249457447888), FRAC_CONST(0.001280297224671) },
2709 { FRAC_CONST(0.032245095009606), FRAC_CONST(0.001385826283535) },
2710 { FRAC_CONST(0.032240387252262), FRAC_CONST(0.001491340501313) },
2711 { FRAC_CONST(0.032235334226272), FRAC_CONST(0.001596838748031) },
2712 { FRAC_CONST(0.032229935985750), FRAC_CONST(0.001702319893890) },
2713 { FRAC_CONST(0.032224192588507), FRAC_CONST(0.001807782809271) },
2714 { FRAC_CONST(0.032218104096050), FRAC_CONST(0.001913226364749) },
2715 { FRAC_CONST(0.032211670573582), FRAC_CONST(0.002018649431111) },
2716 { FRAC_CONST(0.032204892090000), FRAC_CONST(0.002124050879359) },
2717 { FRAC_CONST(0.032197768717898), FRAC_CONST(0.002229429580728) },
2718 { FRAC_CONST(0.032190300533560), FRAC_CONST(0.002334784406698) },
2719 { FRAC_CONST(0.032182487616965), FRAC_CONST(0.002440114229003) },
2720 { FRAC_CONST(0.032174330051782), FRAC_CONST(0.002545417919644) },
2721 { FRAC_CONST(0.032165827925374), FRAC_CONST(0.002650694350905) },
2722 { FRAC_CONST(0.032156981328790), FRAC_CONST(0.002755942395358) },
2723 { FRAC_CONST(0.032147790356771), FRAC_CONST(0.002861160925883) },
2724 { FRAC_CONST(0.032138255107744), FRAC_CONST(0.002966348815672) },
2725 { FRAC_CONST(0.032128375683825), FRAC_CONST(0.003071504938250) },
2726 { FRAC_CONST(0.032118152190814), FRAC_CONST(0.003176628167476) },
2727 { FRAC_CONST(0.032107584738196), FRAC_CONST(0.003281717377568) },
2728 { FRAC_CONST(0.032096673439141), FRAC_CONST(0.003386771443102) },
2729 { FRAC_CONST(0.032085418410500), FRAC_CONST(0.003491789239036) },
2730 { FRAC_CONST(0.032073819772804), FRAC_CONST(0.003596769640711) },
2731 { FRAC_CONST(0.032061877650267), FRAC_CONST(0.003701711523874) },
2732 { FRAC_CONST(0.032049592170778), FRAC_CONST(0.003806613764680) },
2733 { FRAC_CONST(0.032036963465906), FRAC_CONST(0.003911475239711) },
2734 { FRAC_CONST(0.032023991670893), FRAC_CONST(0.004016294825985) },
2735 { FRAC_CONST(0.032010676924657), FRAC_CONST(0.004121071400967) },
2736 { FRAC_CONST(0.031997019369789), FRAC_CONST(0.004225803842586) },
2737 { FRAC_CONST(0.031983019152549), FRAC_CONST(0.004330491029241) },
2738 { FRAC_CONST(0.031968676422869), FRAC_CONST(0.004435131839816) },
2739 { FRAC_CONST(0.031953991334348), FRAC_CONST(0.004539725153692) },
2740 { FRAC_CONST(0.031938964044252), FRAC_CONST(0.004644269850758) },
2741 { FRAC_CONST(0.031923594713510), FRAC_CONST(0.004748764811426) },
2742 { FRAC_CONST(0.031907883506716), FRAC_CONST(0.004853208916638) },
2743 { FRAC_CONST(0.031891830592124), FRAC_CONST(0.004957601047881) },
2744 { FRAC_CONST(0.031875436141648), FRAC_CONST(0.005061940087200) },
2745 { FRAC_CONST(0.031858700330859), FRAC_CONST(0.005166224917208) },
2746 { FRAC_CONST(0.031841623338985), FRAC_CONST(0.005270454421097) },
2747 { FRAC_CONST(0.031824205348907), FRAC_CONST(0.005374627482653) },
2748 { FRAC_CONST(0.031806446547156), FRAC_CONST(0.005478742986267) },
2749 { FRAC_CONST(0.031788347123916), FRAC_CONST(0.005582799816945) },
2750 { FRAC_CONST(0.031769907273017), FRAC_CONST(0.005686796860323) },
2751 { FRAC_CONST(0.031751127191935), FRAC_CONST(0.005790733002674) },
2752 { FRAC_CONST(0.031732007081789), FRAC_CONST(0.005894607130928) },
2753 { FRAC_CONST(0.031712547147340), FRAC_CONST(0.005998418132675) },
2754 { FRAC_CONST(0.031692747596989), FRAC_CONST(0.006102164896182) },
2755 { FRAC_CONST(0.031672608642773), FRAC_CONST(0.006205846310406) },
2756 { FRAC_CONST(0.031652130500364), FRAC_CONST(0.006309461265002) },
2757 { FRAC_CONST(0.031631313389067), FRAC_CONST(0.006413008650337) },
2758 { FRAC_CONST(0.031610157531816), FRAC_CONST(0.006516487357501) },
2759 { FRAC_CONST(0.031588663155172), FRAC_CONST(0.006619896278321) },
2760 { FRAC_CONST(0.031566830489325), FRAC_CONST(0.006723234305370) },
2761 { FRAC_CONST(0.031544659768083), FRAC_CONST(0.006826500331981) },
2762 { FRAC_CONST(0.031522151228878), FRAC_CONST(0.006929693252258) },
2763 { FRAC_CONST(0.031499305112758), FRAC_CONST(0.007032811961088) },
2764 { FRAC_CONST(0.031476121664387), FRAC_CONST(0.007135855354151) },
2765 { FRAC_CONST(0.031452601132040), FRAC_CONST(0.007238822327937) },
2766 { FRAC_CONST(0.031428743767604), FRAC_CONST(0.007341711779751) },
2767 { FRAC_CONST(0.031404549826572), FRAC_CONST(0.007444522607730) },
2768 { FRAC_CONST(0.031380019568042), FRAC_CONST(0.007547253710853) },
2769 { FRAC_CONST(0.031355153254712), FRAC_CONST(0.007649903988952) },
2770 { FRAC_CONST(0.031329951152882), FRAC_CONST(0.007752472342725) },
2771 { FRAC_CONST(0.031304413532445), FRAC_CONST(0.007854957673748) },
2772 { FRAC_CONST(0.031278540666888), FRAC_CONST(0.007957358884484) },
2773 { FRAC_CONST(0.031252332833290), FRAC_CONST(0.008059674878300) },
2774 { FRAC_CONST(0.031225790312316), FRAC_CONST(0.008161904559473) },
2775 { FRAC_CONST(0.031198913388214), FRAC_CONST(0.008264046833205) },
2776 { FRAC_CONST(0.031171702348814), FRAC_CONST(0.008366100605636) },
2777 { FRAC_CONST(0.031144157485525), FRAC_CONST(0.008468064783849) },
2778 { FRAC_CONST(0.031116279093331), FRAC_CONST(0.008569938275893) },
2779 { FRAC_CONST(0.031088067470786), FRAC_CONST(0.008671719990782) },
2780 { FRAC_CONST(0.031059522920014), FRAC_CONST(0.008773408838517) },
2781 { FRAC_CONST(0.031030645746705), FRAC_CONST(0.008875003730092) },
2782 { FRAC_CONST(0.031001436260110), FRAC_CONST(0.008976503577507) },
2783 { FRAC_CONST(0.030971894773039), FRAC_CONST(0.009077907293780) },
2784 { FRAC_CONST(0.030942021601857), FRAC_CONST(0.009179213792959) },
2785 { FRAC_CONST(0.030911817066483), FRAC_CONST(0.009280421990133) },
2786 { FRAC_CONST(0.030881281490382), FRAC_CONST(0.009381530801444) },
2787 { FRAC_CONST(0.030850415200566), FRAC_CONST(0.009482539144097) },
2788 { FRAC_CONST(0.030819218527589), FRAC_CONST(0.009583445936373) },
2789 { FRAC_CONST(0.030787691805541), FRAC_CONST(0.009684250097643) },
2790 { FRAC_CONST(0.030755835372048), FRAC_CONST(0.009784950548375) },
2791 { FRAC_CONST(0.030723649568268), FRAC_CONST(0.009885546210147) },
2792 { FRAC_CONST(0.030691134738883), FRAC_CONST(0.009986036005661) },
2793 { FRAC_CONST(0.030658291232103), FRAC_CONST(0.010086418858753) },
2794 { FRAC_CONST(0.030625119399655), FRAC_CONST(0.010186693694402) },
2795 { FRAC_CONST(0.030591619596781), FRAC_CONST(0.010286859438745) },
2796 { FRAC_CONST(0.030557792182239), FRAC_CONST(0.010386915019088) },
2797 { FRAC_CONST(0.030523637518292), FRAC_CONST(0.010486859363916) },
2798 { FRAC_CONST(0.030489155970710), FRAC_CONST(0.010586691402906) },
2799 { FRAC_CONST(0.030454347908763), FRAC_CONST(0.010686410066936) },
2800 { FRAC_CONST(0.030419213705216), FRAC_CONST(0.010786014288099) },
2801 { FRAC_CONST(0.030383753736329), FRAC_CONST(0.010885502999714) },
2802 { FRAC_CONST(0.030347968381849), FRAC_CONST(0.010984875136338) },
2803 { FRAC_CONST(0.030311858025010), FRAC_CONST(0.011084129633775) },
2804 { FRAC_CONST(0.030275423052523), FRAC_CONST(0.011183265429088) },
2805 { FRAC_CONST(0.030238663854579), FRAC_CONST(0.011282281460612) },
2806 { FRAC_CONST(0.030201580824838), FRAC_CONST(0.011381176667967) },
2807 { FRAC_CONST(0.030164174360430), FRAC_CONST(0.011479949992062) },
2808 { FRAC_CONST(0.030126444861948), FRAC_CONST(0.011578600375117) },
2809 { FRAC_CONST(0.030088392733446), FRAC_CONST(0.011677126760663) },
2810 { FRAC_CONST(0.030050018382430), FRAC_CONST(0.011775528093563) },
2811 { FRAC_CONST(0.030011322219859), FRAC_CONST(0.011873803320018) },
2812 { FRAC_CONST(0.029972304660138), FRAC_CONST(0.011971951387578) },
2813 { FRAC_CONST(0.029932966121114), FRAC_CONST(0.012069971245157) },
2814 { FRAC_CONST(0.029893307024070), FRAC_CONST(0.012167861843041) },
2815 { FRAC_CONST(0.029853327793724), FRAC_CONST(0.012265622132901) },
2816 { FRAC_CONST(0.029813028858222), FRAC_CONST(0.012363251067801) },
2817 { FRAC_CONST(0.029772410649132), FRAC_CONST(0.012460747602215) },
2818 { FRAC_CONST(0.029731473601443), FRAC_CONST(0.012558110692033) },
2819 { FRAC_CONST(0.029690218153558), FRAC_CONST(0.012655339294575) },
2820 { FRAC_CONST(0.029648644747289), FRAC_CONST(0.012752432368600) },
2821 { FRAC_CONST(0.029606753827855), FRAC_CONST(0.012849388874320) },
2822 { FRAC_CONST(0.029564545843872), FRAC_CONST(0.012946207773407) },
2823 { FRAC_CONST(0.029522021247356), FRAC_CONST(0.013042888029011) },
2824 { FRAC_CONST(0.029479180493710), FRAC_CONST(0.013139428605762) },
2825 { FRAC_CONST(0.029436024041725), FRAC_CONST(0.013235828469789) },
2826 { FRAC_CONST(0.029392552353570), FRAC_CONST(0.013332086588727) },
2827 { FRAC_CONST(0.029348765894794), FRAC_CONST(0.013428201931728) },
2828 { FRAC_CONST(0.029304665134313), FRAC_CONST(0.013524173469475) },
2829 { FRAC_CONST(0.029260250544412), FRAC_CONST(0.013620000174189) },
2830 { FRAC_CONST(0.029215522600735), FRAC_CONST(0.013715681019643) },
2831 { FRAC_CONST(0.029170481782283), FRAC_CONST(0.013811214981173) },
2832 { FRAC_CONST(0.029125128571406), FRAC_CONST(0.013906601035686) },
2833 { FRAC_CONST(0.029079463453801), FRAC_CONST(0.014001838161674) },
2834 { FRAC_CONST(0.029033486918505), FRAC_CONST(0.014096925339225) },
2835 { FRAC_CONST(0.028987199457889), FRAC_CONST(0.014191861550031) },
2836 { FRAC_CONST(0.028940601567655), FRAC_CONST(0.014286645777401) },
2837 { FRAC_CONST(0.028893693746829), FRAC_CONST(0.014381277006273) },
2838 { FRAC_CONST(0.028846476497755), FRAC_CONST(0.014475754223221) },
2839 { FRAC_CONST(0.028798950326094), FRAC_CONST(0.014570076416472) },
2840 { FRAC_CONST(0.028751115740811), FRAC_CONST(0.014664242575910) },
2841 { FRAC_CONST(0.028702973254178), FRAC_CONST(0.014758251693091) },
2842 { FRAC_CONST(0.028654523381760), FRAC_CONST(0.014852102761253) },
2843 { FRAC_CONST(0.028605766642418), FRAC_CONST(0.014945794775326) },
2844 { FRAC_CONST(0.028556703558297), FRAC_CONST(0.015039326731945) },
2845 { FRAC_CONST(0.028507334654823), FRAC_CONST(0.015132697629457) },
2846 { FRAC_CONST(0.028457660460698), FRAC_CONST(0.015225906467935) },
2847 { FRAC_CONST(0.028407681507891), FRAC_CONST(0.015318952249187) },
2848 { FRAC_CONST(0.028357398331639), FRAC_CONST(0.015411833976768) },
2849 { FRAC_CONST(0.028306811470432), FRAC_CONST(0.015504550655988) },
2850 { FRAC_CONST(0.028255921466016), FRAC_CONST(0.015597101293927) },
2851 { FRAC_CONST(0.028204728863381), FRAC_CONST(0.015689484899442) },
2852 { FRAC_CONST(0.028153234210760), FRAC_CONST(0.015781700483179) },
2853 { FRAC_CONST(0.028101438059619), FRAC_CONST(0.015873747057582) },
2854 { FRAC_CONST(0.028049340964652), FRAC_CONST(0.015965623636907) },
2855 { FRAC_CONST(0.027996943483779), FRAC_CONST(0.016057329237229) },
2856 { FRAC_CONST(0.027944246178133), FRAC_CONST(0.016148862876456) },
2857 { FRAC_CONST(0.027891249612061), FRAC_CONST(0.016240223574335) },
2858 { FRAC_CONST(0.027837954353113), FRAC_CONST(0.016331410352467) },
2859 { FRAC_CONST(0.027784360972039), FRAC_CONST(0.016422422234315) },
2860 { FRAC_CONST(0.027730470042780), FRAC_CONST(0.016513258245214) },
2861 { FRAC_CONST(0.027676282142466), FRAC_CONST(0.016603917412384) },
2862 { FRAC_CONST(0.027621797851405), FRAC_CONST(0.016694398764938) },
2863 { FRAC_CONST(0.027567017753080), FRAC_CONST(0.016784701333894) },
2864 { FRAC_CONST(0.027511942434143), FRAC_CONST(0.016874824152183) },
2865 { FRAC_CONST(0.027456572484404), FRAC_CONST(0.016964766254662) },
2866 { FRAC_CONST(0.027400908496833), FRAC_CONST(0.017054526678124) },
2867 { FRAC_CONST(0.027344951067546), FRAC_CONST(0.017144104461307) },
2868 { FRAC_CONST(0.027288700795801), FRAC_CONST(0.017233498644904) },
2869 { FRAC_CONST(0.027232158283994), FRAC_CONST(0.017322708271577) },
2870 { FRAC_CONST(0.027175324137651), FRAC_CONST(0.017411732385960) },
2871 { FRAC_CONST(0.027118198965418), FRAC_CONST(0.017500570034678) },
2872 { FRAC_CONST(0.027060783379060), FRAC_CONST(0.017589220266351) },
2873 { FRAC_CONST(0.027003077993454), FRAC_CONST(0.017677682131607) },
2874 { FRAC_CONST(0.026945083426576), FRAC_CONST(0.017765954683088) },
2875 { FRAC_CONST(0.026886800299502), FRAC_CONST(0.017854036975468) },
2876 { FRAC_CONST(0.026828229236397), FRAC_CONST(0.017941928065456) },
2877 { FRAC_CONST(0.026769370864511), FRAC_CONST(0.018029627011808) },
2878 { FRAC_CONST(0.026710225814170), FRAC_CONST(0.018117132875340) },
2879 { FRAC_CONST(0.026650794718768), FRAC_CONST(0.018204444718934) },
2880 { FRAC_CONST(0.026591078214767), FRAC_CONST(0.018291561607551) },
2881 { FRAC_CONST(0.026531076941680), FRAC_CONST(0.018378482608238) },
2882 { FRAC_CONST(0.026470791542075), FRAC_CONST(0.018465206790142) },
2883 { FRAC_CONST(0.026410222661558), FRAC_CONST(0.018551733224515) },
2884 { FRAC_CONST(0.026349370948775), FRAC_CONST(0.018638060984730) },
2885 { FRAC_CONST(0.026288237055398), FRAC_CONST(0.018724189146286) },
2886 { FRAC_CONST(0.026226821636121), FRAC_CONST(0.018810116786819) },
2887 { FRAC_CONST(0.026165125348656), FRAC_CONST(0.018895842986112) },
2888 { FRAC_CONST(0.026103148853718), FRAC_CONST(0.018981366826109) },
2889 { FRAC_CONST(0.026040892815028), FRAC_CONST(0.019066687390916) },
2890 { FRAC_CONST(0.025978357899296), FRAC_CONST(0.019151803766819) },
2891 { FRAC_CONST(0.025915544776223), FRAC_CONST(0.019236715042290) },
2892 { FRAC_CONST(0.025852454118485), FRAC_CONST(0.019321420307998) },
2893 { FRAC_CONST(0.025789086601733), FRAC_CONST(0.019405918656817) },
2894 { FRAC_CONST(0.025725442904582), FRAC_CONST(0.019490209183837) },
2895 { FRAC_CONST(0.025661523708606), FRAC_CONST(0.019574290986376) },
2896 { FRAC_CONST(0.025597329698327), FRAC_CONST(0.019658163163984) },
2897 { FRAC_CONST(0.025532861561211), FRAC_CONST(0.019741824818458) },
2898 { FRAC_CONST(0.025468119987662), FRAC_CONST(0.019825275053848) },
2899 { FRAC_CONST(0.025403105671008), FRAC_CONST(0.019908512976470) },
2900 { FRAC_CONST(0.025337819307501), FRAC_CONST(0.019991537694913) },
2901 { FRAC_CONST(0.025272261596305), FRAC_CONST(0.020074348320047) },
2902 { FRAC_CONST(0.025206433239491), FRAC_CONST(0.020156943965039) },
2903 { FRAC_CONST(0.025140334942028), FRAC_CONST(0.020239323745355) },
2904 { FRAC_CONST(0.025073967411776), FRAC_CONST(0.020321486778774) },
2905 { FRAC_CONST(0.025007331359476), FRAC_CONST(0.020403432185395) },
2906 { FRAC_CONST(0.024940427498748), FRAC_CONST(0.020485159087650) },
2907 { FRAC_CONST(0.024873256546079), FRAC_CONST(0.020566666610309) },
2908 { FRAC_CONST(0.024805819220816), FRAC_CONST(0.020647953880491) },
2909 { FRAC_CONST(0.024738116245157), FRAC_CONST(0.020729020027676) },
2910 { FRAC_CONST(0.024670148344147), FRAC_CONST(0.020809864183709) },
2911 { FRAC_CONST(0.024601916245669), FRAC_CONST(0.020890485482816) },
2912 { FRAC_CONST(0.024533420680433), FRAC_CONST(0.020970883061607) },
2913 { FRAC_CONST(0.024464662381971), FRAC_CONST(0.021051056059087) },
2914 { FRAC_CONST(0.024395642086630), FRAC_CONST(0.021131003616670) },
2915 { FRAC_CONST(0.024326360533561), FRAC_CONST(0.021210724878181) },
2916 { FRAC_CONST(0.024256818464715), FRAC_CONST(0.021290218989868) },
2917 { FRAC_CONST(0.024187016624830), FRAC_CONST(0.021369485100415) },
2918 { FRAC_CONST(0.024116955761430), FRAC_CONST(0.021448522360944) },
2919 { FRAC_CONST(0.024046636624808), FRAC_CONST(0.021527329925030) },
2920 { FRAC_CONST(0.023976059968027), FRAC_CONST(0.021605906948708) },
2921 { FRAC_CONST(0.023905226546906), FRAC_CONST(0.021684252590480) },
2922 { FRAC_CONST(0.023834137120014), FRAC_CONST(0.021762366011328) },
2923 { FRAC_CONST(0.023762792448662), FRAC_CONST(0.021840246374720) },
2924 { FRAC_CONST(0.023691193296893), FRAC_CONST(0.021917892846620) },
2925 { FRAC_CONST(0.023619340431478), FRAC_CONST(0.021995304595495) },
2926 { FRAC_CONST(0.023547234621902), FRAC_CONST(0.022072480792330) },
2927 { FRAC_CONST(0.023474876640361), FRAC_CONST(0.022149420610628) },
2928 { FRAC_CONST(0.023402267261751), FRAC_CONST(0.022226123226426) },
2929 { FRAC_CONST(0.023329407263659), FRAC_CONST(0.022302587818300) },
2930 { FRAC_CONST(0.023256297426359), FRAC_CONST(0.022378813567377) },
2931 { FRAC_CONST(0.023182938532797), FRAC_CONST(0.022454799657339) },
2932 { FRAC_CONST(0.023109331368588), FRAC_CONST(0.022530545274437) },
2933 { FRAC_CONST(0.023035476722006), FRAC_CONST(0.022606049607496) },
2934 { FRAC_CONST(0.022961375383975), FRAC_CONST(0.022681311847926) },
2935 { FRAC_CONST(0.022887028148061), FRAC_CONST(0.022756331189727) },
2936 { FRAC_CONST(0.022812435810462), FRAC_CONST(0.022831106829504) },
2937 { FRAC_CONST(0.022737599170003), FRAC_CONST(0.022905637966469) },
2938 { FRAC_CONST(0.022662519028125), FRAC_CONST(0.022979923802453) },
2939 { FRAC_CONST(0.022587196188874), FRAC_CONST(0.023053963541915) },
2940 { FRAC_CONST(0.022511631458899), FRAC_CONST(0.023127756391950) },
2941 { FRAC_CONST(0.022435825647437), FRAC_CONST(0.023201301562294) },
2942 { FRAC_CONST(0.022359779566306), FRAC_CONST(0.023274598265338) },
2943 { FRAC_CONST(0.022283494029900), FRAC_CONST(0.023347645716133) },
2944 { FRAC_CONST(0.022206969855176), FRAC_CONST(0.023420443132400) },
2945 { FRAC_CONST(0.022130207861645), FRAC_CONST(0.023492989734537) },
2946 { FRAC_CONST(0.022053208871367), FRAC_CONST(0.023565284745628) },
2947 { FRAC_CONST(0.021975973708940), FRAC_CONST(0.023637327391451) },
2948 { FRAC_CONST(0.021898503201489), FRAC_CONST(0.023709116900488) },
2949 { FRAC_CONST(0.021820798178663), FRAC_CONST(0.023780652503931) },
2950 { FRAC_CONST(0.021742859472618), FRAC_CONST(0.023851933435691) },
2951 { FRAC_CONST(0.021664687918017), FRAC_CONST(0.023922958932406) },
2952 { FRAC_CONST(0.021586284352013), FRAC_CONST(0.023993728233451) },
2953 { FRAC_CONST(0.021507649614247), FRAC_CONST(0.024064240580942) },
2954 { FRAC_CONST(0.021428784546832), FRAC_CONST(0.024134495219750) },
2955 { FRAC_CONST(0.021349689994350), FRAC_CONST(0.024204491397504) },
2956 { FRAC_CONST(0.021270366803840), FRAC_CONST(0.024274228364600) },
2957 { FRAC_CONST(0.021190815824791), FRAC_CONST(0.024343705374213) },
2958 { FRAC_CONST(0.021111037909128), FRAC_CONST(0.024412921682298) },
2959 { FRAC_CONST(0.021031033911210), FRAC_CONST(0.024481876547605) },
2960 { FRAC_CONST(0.020950804687815), FRAC_CONST(0.024550569231683) },
2961 { FRAC_CONST(0.020870351098134), FRAC_CONST(0.024618998998889) },
2962 { FRAC_CONST(0.020789674003759), FRAC_CONST(0.024687165116394) },
2963 { FRAC_CONST(0.020708774268678), FRAC_CONST(0.024755066854194) },
2964 { FRAC_CONST(0.020627652759262), FRAC_CONST(0.024822703485116) },
2965 { FRAC_CONST(0.020546310344257), FRAC_CONST(0.024890074284826) },
2966 { FRAC_CONST(0.020464747894775), FRAC_CONST(0.024957178531837) },
2967 { FRAC_CONST(0.020382966284284), FRAC_CONST(0.025024015507516) },
2968 { FRAC_CONST(0.020300966388600), FRAC_CONST(0.025090584496093) },
2969 { FRAC_CONST(0.020218749085876), FRAC_CONST(0.025156884784668) },
2970 { FRAC_CONST(0.020136315256592), FRAC_CONST(0.025222915663218) },
2971 { FRAC_CONST(0.020053665783549), FRAC_CONST(0.025288676424605) },
2972 { FRAC_CONST(0.019970801551857), FRAC_CONST(0.025354166364584) },
2973 { FRAC_CONST(0.019887723448925), FRAC_CONST(0.025419384781811) },
2974 { FRAC_CONST(0.019804432364452), FRAC_CONST(0.025484330977848) },
2975 { FRAC_CONST(0.019720929190419), FRAC_CONST(0.025549004257175) },
2976 { FRAC_CONST(0.019637214821078), FRAC_CONST(0.025613403927192) },
2977 { FRAC_CONST(0.019553290152943), FRAC_CONST(0.025677529298230) },
2978 { FRAC_CONST(0.019469156084779), FRAC_CONST(0.025741379683559) },
2979 { FRAC_CONST(0.019384813517595), FRAC_CONST(0.025804954399392) },
2980 { FRAC_CONST(0.019300263354632), FRAC_CONST(0.025868252764895) },
2981 { FRAC_CONST(0.019215506501354), FRAC_CONST(0.025931274102193) },
2982 { FRAC_CONST(0.019130543865439), FRAC_CONST(0.025994017736379) },
2983 { FRAC_CONST(0.019045376356769), FRAC_CONST(0.026056482995518) },
2984 { FRAC_CONST(0.018960004887419), FRAC_CONST(0.026118669210657) },
2985 { FRAC_CONST(0.018874430371648), FRAC_CONST(0.026180575715833) },
2986 { FRAC_CONST(0.018788653725892), FRAC_CONST(0.026242201848076) },
2987 { FRAC_CONST(0.018702675868750), FRAC_CONST(0.026303546947421) },
2988 { FRAC_CONST(0.018616497720974), FRAC_CONST(0.026364610356909) },
2989 { FRAC_CONST(0.018530120205464), FRAC_CONST(0.026425391422602) },
2990 { FRAC_CONST(0.018443544247254), FRAC_CONST(0.026485889493583) },
2991 { FRAC_CONST(0.018356770773502), FRAC_CONST(0.026546103921965) },
2992 { FRAC_CONST(0.018269800713483), FRAC_CONST(0.026606034062902) },
2993 { FRAC_CONST(0.018182634998576), FRAC_CONST(0.026665679274589) },
2994 { FRAC_CONST(0.018095274562256), FRAC_CONST(0.026725038918274) },
2995 { FRAC_CONST(0.018007720340083), FRAC_CONST(0.026784112358263) },
2996 { FRAC_CONST(0.017919973269692), FRAC_CONST(0.026842898961926) },
2997 { FRAC_CONST(0.017832034290785), FRAC_CONST(0.026901398099707) },
2998 { FRAC_CONST(0.017743904345116), FRAC_CONST(0.026959609145127) },
2999 { FRAC_CONST(0.017655584376488), FRAC_CONST(0.027017531474792) },
3000 { FRAC_CONST(0.017567075330734), FRAC_CONST(0.027075164468401) },
3001 { FRAC_CONST(0.017478378155718), FRAC_CONST(0.027132507508750) },
3002 { FRAC_CONST(0.017389493801313), FRAC_CONST(0.027189559981742) },
3003 { FRAC_CONST(0.017300423219401), FRAC_CONST(0.027246321276391) },
3004 { FRAC_CONST(0.017211167363854), FRAC_CONST(0.027302790784828) },
3005 { FRAC_CONST(0.017121727190533), FRAC_CONST(0.027358967902310) },
3006 { FRAC_CONST(0.017032103657269), FRAC_CONST(0.027414852027226) },
3007 { FRAC_CONST(0.016942297723858), FRAC_CONST(0.027470442561102) },
3008 { FRAC_CONST(0.016852310352050), FRAC_CONST(0.027525738908608) },
3009 { FRAC_CONST(0.016762142505537), FRAC_CONST(0.027580740477564) },
3010 { FRAC_CONST(0.016671795149944), FRAC_CONST(0.027635446678948) },
3011 { FRAC_CONST(0.016581269252819), FRAC_CONST(0.027689856926900) },
3012 { FRAC_CONST(0.016490565783622), FRAC_CONST(0.027743970638730) },
3013 { FRAC_CONST(0.016399685713714), FRAC_CONST(0.027797787234924) },
3014 { FRAC_CONST(0.016308630016347), FRAC_CONST(0.027851306139149) },
3015 { FRAC_CONST(0.016217399666655), FRAC_CONST(0.027904526778260) },
3016 { FRAC_CONST(0.016125995641641), FRAC_CONST(0.027957448582309) },
3017 { FRAC_CONST(0.016034418920170), FRAC_CONST(0.028010070984544) },
3018 { FRAC_CONST(0.015942670482954), FRAC_CONST(0.028062393421421) },
3019 { FRAC_CONST(0.015850751312545), FRAC_CONST(0.028114415332610) },
3020 { FRAC_CONST(0.015758662393324), FRAC_CONST(0.028166136160998) },
3021 { FRAC_CONST(0.015666404711489), FRAC_CONST(0.028217555352697) },
3022 { FRAC_CONST(0.015573979255046), FRAC_CONST(0.028268672357047) },
3023 { FRAC_CONST(0.015481387013797), FRAC_CONST(0.028319486626627) },
3024 { FRAC_CONST(0.015388628979331), FRAC_CONST(0.028369997617257) },
3025 { FRAC_CONST(0.015295706145012), FRAC_CONST(0.028420204788004) },
3026 { FRAC_CONST(0.015202619505968), FRAC_CONST(0.028470107601191) },
3027 { FRAC_CONST(0.015109370059084), FRAC_CONST(0.028519705522399) },
3028 { FRAC_CONST(0.015015958802984), FRAC_CONST(0.028568998020472) },
3029 { FRAC_CONST(0.014922386738030), FRAC_CONST(0.028617984567529) },
3030 { FRAC_CONST(0.014828654866302), FRAC_CONST(0.028666664638963) },
3031 { FRAC_CONST(0.014734764191593), FRAC_CONST(0.028715037713449) },
3032 { FRAC_CONST(0.014640715719398), FRAC_CONST(0.028763103272951) },
3033 { FRAC_CONST(0.014546510456900), FRAC_CONST(0.028810860802724) },
3034 { FRAC_CONST(0.014452149412962), FRAC_CONST(0.028858309791325) },
3035 { FRAC_CONST(0.014357633598114), FRAC_CONST(0.028905449730613) },
3036 { FRAC_CONST(0.014262964024545), FRAC_CONST(0.028952280115756) },
3037 { FRAC_CONST(0.014168141706090), FRAC_CONST(0.028998800445240) },
3038 { FRAC_CONST(0.014073167658220), FRAC_CONST(0.029045010220868) },
3039 { FRAC_CONST(0.013978042898030), FRAC_CONST(0.029090908947771) },
3040 { FRAC_CONST(0.013882768444231), FRAC_CONST(0.029136496134411) },
3041 { FRAC_CONST(0.013787345317136), FRAC_CONST(0.029181771292585) },
3042 { FRAC_CONST(0.013691774538648), FRAC_CONST(0.029226733937433) },
3043 { FRAC_CONST(0.013596057132255), FRAC_CONST(0.029271383587441) },
3044 { FRAC_CONST(0.013500194123014), FRAC_CONST(0.029315719764447) },
3045 { FRAC_CONST(0.013404186537539), FRAC_CONST(0.029359741993647) },
3046 { FRAC_CONST(0.013308035403995), FRAC_CONST(0.029403449803598) },
3047 { FRAC_CONST(0.013211741752084), FRAC_CONST(0.029446842726223) },
3048 { FRAC_CONST(0.013115306613032), FRAC_CONST(0.029489920296820) },
3049 { FRAC_CONST(0.013018731019584), FRAC_CONST(0.029532682054063) },
3050 { FRAC_CONST(0.012922016005985), FRAC_CONST(0.029575127540008) },
3051 { FRAC_CONST(0.012825162607977), FRAC_CONST(0.029617256300097) },
3052 { FRAC_CONST(0.012728171862781), FRAC_CONST(0.029659067883165) },
3053 { FRAC_CONST(0.012631044809089), FRAC_CONST(0.029700561841444) },
3054 { FRAC_CONST(0.012533782487056), FRAC_CONST(0.029741737730567) },
3055 { FRAC_CONST(0.012436385938281), FRAC_CONST(0.029782595109573) },
3056 { FRAC_CONST(0.012338856205805), FRAC_CONST(0.029823133540913) },
3057 { FRAC_CONST(0.012241194334091), FRAC_CONST(0.029863352590452) },
3058 { FRAC_CONST(0.012143401369021), FRAC_CONST(0.029903251827477) },
3059 { FRAC_CONST(0.012045478357878), FRAC_CONST(0.029942830824699) },
3060 { FRAC_CONST(0.011947426349339), FRAC_CONST(0.029982089158259) },
3061 { FRAC_CONST(0.011849246393462), FRAC_CONST(0.030021026407731) },
3062 { FRAC_CONST(0.011750939541676), FRAC_CONST(0.030059642156129) },
3063 { FRAC_CONST(0.011652506846768), FRAC_CONST(0.030097935989909) },
3064 { FRAC_CONST(0.011553949362874), FRAC_CONST(0.030135907498976) },
3065 { FRAC_CONST(0.011455268145464), FRAC_CONST(0.030173556276684) },
3066 { FRAC_CONST(0.011356464251335), FRAC_CONST(0.030210881919845) },
3067 { FRAC_CONST(0.011257538738598), FRAC_CONST(0.030247884028732) },
3068 { FRAC_CONST(0.011158492666665), FRAC_CONST(0.030284562207083) },
3069 { FRAC_CONST(0.011059327096240), FRAC_CONST(0.030320916062102) },
3070 { FRAC_CONST(0.010960043089307), FRAC_CONST(0.030356945204470) },
3071 { FRAC_CONST(0.010860641709118), FRAC_CONST(0.030392649248343) },
3072 { FRAC_CONST(0.010761124020182), FRAC_CONST(0.030428027811361) },
3073 { FRAC_CONST(0.010661491088253), FRAC_CONST(0.030463080514646) },
3074 { FRAC_CONST(0.010561743980319), FRAC_CONST(0.030497806982812) },
3075 { FRAC_CONST(0.010461883764593), FRAC_CONST(0.030532206843968) },
3076 { FRAC_CONST(0.010361911510496), FRAC_CONST(0.030566279729717) },
3077 { FRAC_CONST(0.010261828288652), FRAC_CONST(0.030600025275167) },
3078 { FRAC_CONST(0.010161635170872), FRAC_CONST(0.030633443118931) },
3079 { FRAC_CONST(0.010061333230142), FRAC_CONST(0.030666532903129) },
3080 { FRAC_CONST(0.009960923540617), FRAC_CONST(0.030699294273397) },
3081 { FRAC_CONST(0.009860407177603), FRAC_CONST(0.030731726878888) },
3082 { FRAC_CONST(0.009759785217550), FRAC_CONST(0.030763830372273) },
3083 { FRAC_CONST(0.009659058738038), FRAC_CONST(0.030795604409750) },
3084 { FRAC_CONST(0.009558228817767), FRAC_CONST(0.030827048651045) },
3085 { FRAC_CONST(0.009457296536545), FRAC_CONST(0.030858162759415) },
3086 { FRAC_CONST(0.009356262975275), FRAC_CONST(0.030888946401653) },
3087 { FRAC_CONST(0.009255129215945), FRAC_CONST(0.030919399248091) },
3088 { FRAC_CONST(0.009153896341616), FRAC_CONST(0.030949520972603) },
3089 { FRAC_CONST(0.009052565436412), FRAC_CONST(0.030979311252611) },
3090 { FRAC_CONST(0.008951137585505), FRAC_CONST(0.031008769769084) },
3091 { FRAC_CONST(0.008849613875105), FRAC_CONST(0.031037896206544) },
3092 { FRAC_CONST(0.008747995392451), FRAC_CONST(0.031066690253072) },
3093 { FRAC_CONST(0.008646283225794), FRAC_CONST(0.031095151600306) },
3094 { FRAC_CONST(0.008544478464390), FRAC_CONST(0.031123279943448) },
3095 { FRAC_CONST(0.008442582198486), FRAC_CONST(0.031151074981266) },
3096 { FRAC_CONST(0.008340595519310), FRAC_CONST(0.031178536416098) },
3097 { FRAC_CONST(0.008238519519057), FRAC_CONST(0.031205663953853) },
3098 { FRAC_CONST(0.008136355290878), FRAC_CONST(0.031232457304017) },
3099 { FRAC_CONST(0.008034103928871), FRAC_CONST(0.031258916179656) },
3100 { FRAC_CONST(0.007931766528065), FRAC_CONST(0.031285040297416) },
3101 { FRAC_CONST(0.007829344184412), FRAC_CONST(0.031310829377528) },
3102 { FRAC_CONST(0.007726837994772), FRAC_CONST(0.031336283143813) },
3103 { FRAC_CONST(0.007624249056906), FRAC_CONST(0.031361401323680) },
3104 { FRAC_CONST(0.007521578469457), FRAC_CONST(0.031386183648135) },
3105 { FRAC_CONST(0.007418827331946), FRAC_CONST(0.031410629851778) },
3106 { FRAC_CONST(0.007315996744755), FRAC_CONST(0.031434739672811) },
3107 { FRAC_CONST(0.007213087809115), FRAC_CONST(0.031458512853036) },
3108 { FRAC_CONST(0.007110101627101), FRAC_CONST(0.031481949137863) },
3109 { FRAC_CONST(0.007007039301610), FRAC_CONST(0.031505048276306) },
3110 { FRAC_CONST(0.006903901936357), FRAC_CONST(0.031527810020993) },
3111 { FRAC_CONST(0.006800690635862), FRAC_CONST(0.031550234128164) },
3112 { FRAC_CONST(0.006697406505433), FRAC_CONST(0.031572320357675) },
3113 { FRAC_CONST(0.006594050651161), FRAC_CONST(0.031594068473000) },
3114 { FRAC_CONST(0.006490624179905), FRAC_CONST(0.031615478241233) },
3115 { FRAC_CONST(0.006387128199278), FRAC_CONST(0.031636549433095) },
3116 { FRAC_CONST(0.006283563817639), FRAC_CONST(0.031657281822929) },
3117 { FRAC_CONST(0.006179932144080), FRAC_CONST(0.031677675188707) },
3118 { FRAC_CONST(0.006076234288412), FRAC_CONST(0.031697729312034) },
3119 { FRAC_CONST(0.005972471361157), FRAC_CONST(0.031717443978146) },
3120 { FRAC_CONST(0.005868644473532), FRAC_CONST(0.031736818975914) },
3121 { FRAC_CONST(0.005764754737440), FRAC_CONST(0.031755854097848) },
3122 { FRAC_CONST(0.005660803265456), FRAC_CONST(0.031774549140098) },
3123 { FRAC_CONST(0.005556791170816), FRAC_CONST(0.031792903902453) },
3124 { FRAC_CONST(0.005452719567407), FRAC_CONST(0.031810918188350) },
3125 { FRAC_CONST(0.005348589569753), FRAC_CONST(0.031828591804869) },
3126 { FRAC_CONST(0.005244402293001), FRAC_CONST(0.031845924562742) },
3127 { FRAC_CONST(0.005140158852914), FRAC_CONST(0.031862916276347) },
3128 { FRAC_CONST(0.005035860365855), FRAC_CONST(0.031879566763717) },
3129 { FRAC_CONST(0.004931507948778), FRAC_CONST(0.031895875846539) },
3130 { FRAC_CONST(0.004827102719212), FRAC_CONST(0.031911843350155) },
3131 { FRAC_CONST(0.004722645795254), FRAC_CONST(0.031927469103567) },
3132 { FRAC_CONST(0.004618138295554), FRAC_CONST(0.031942752939435) },
3133 { FRAC_CONST(0.004513581339303), FRAC_CONST(0.031957694694082) },
3134 { FRAC_CONST(0.004408976046222), FRAC_CONST(0.031972294207493) },
3135 { FRAC_CONST(0.004304323536549), FRAC_CONST(0.031986551323320) },
3136 { FRAC_CONST(0.004199624931030), FRAC_CONST(0.032000465888879) },
3137 { FRAC_CONST(0.004094881350902), FRAC_CONST(0.032014037755158) },
3138 { FRAC_CONST(0.003990093917884), FRAC_CONST(0.032027266776813) },
3139 { FRAC_CONST(0.003885263754166), FRAC_CONST(0.032040152812170) },
3140 { FRAC_CONST(0.003780391982394), FRAC_CONST(0.032052695723232) },
3141 { FRAC_CONST(0.003675479725661), FRAC_CONST(0.032064895375674) },
3142 { FRAC_CONST(0.003570528107494), FRAC_CONST(0.032076751638847) },
3143 { FRAC_CONST(0.003465538251839), FRAC_CONST(0.032088264385780) },
3144 { FRAC_CONST(0.003360511283053), FRAC_CONST(0.032099433493181) },
3145 { FRAC_CONST(0.003255448325892), FRAC_CONST(0.032110258841438) },
3146 { FRAC_CONST(0.003150350505494), FRAC_CONST(0.032120740314619) },
3147 { FRAC_CONST(0.003045218947373), FRAC_CONST(0.032130877800478) },
3148 { FRAC_CONST(0.002940054777404), FRAC_CONST(0.032140671190449) },
3149 { FRAC_CONST(0.002834859121810), FRAC_CONST(0.032150120379653) },
3150 { FRAC_CONST(0.002729633107153), FRAC_CONST(0.032159225266897) },
3151 { FRAC_CONST(0.002624377860318), FRAC_CONST(0.032167985754674) },
3152 { FRAC_CONST(0.002519094508504), FRAC_CONST(0.032176401749168) },
3153 { FRAC_CONST(0.002413784179212), FRAC_CONST(0.032184473160250) },
3154 { FRAC_CONST(0.002308448000231), FRAC_CONST(0.032192199901481) },
3155 { FRAC_CONST(0.002203087099626), FRAC_CONST(0.032199581890114) },
3156 { FRAC_CONST(0.002097702605728), FRAC_CONST(0.032206619047093) },
3157 { FRAC_CONST(0.001992295647121), FRAC_CONST(0.032213311297057) },
3158 { FRAC_CONST(0.001886867352628), FRAC_CONST(0.032219658568338) },
3159 { FRAC_CONST(0.001781418851302), FRAC_CONST(0.032225660792960) },
3160 { FRAC_CONST(0.001675951272410), FRAC_CONST(0.032231317906644) },
3161 { FRAC_CONST(0.001570465745428), FRAC_CONST(0.032236629848809) },
3162 { FRAC_CONST(0.001464963400018), FRAC_CONST(0.032241596562566) },
3163 { FRAC_CONST(0.001359445366028), FRAC_CONST(0.032246217994727) },
3164 { FRAC_CONST(0.001253912773470), FRAC_CONST(0.032250494095799) },
3165 { FRAC_CONST(0.001148366752513), FRAC_CONST(0.032254424819990) },
3166 { FRAC_CONST(0.001042808433471), FRAC_CONST(0.032258010125204) },
3167 { FRAC_CONST(0.000937238946789), FRAC_CONST(0.032261249973045) },
3168 { FRAC_CONST(0.000831659423030), FRAC_CONST(0.032264144328817) },
3169 { FRAC_CONST(0.000726070992868), FRAC_CONST(0.032266693161525) },
3170 { FRAC_CONST(0.000620474787068), FRAC_CONST(0.032268896443871) },
3171 { FRAC_CONST(0.000514871936481), FRAC_CONST(0.032270754152261) },
3172 { FRAC_CONST(0.000409263572030), FRAC_CONST(0.032272266266801) },
3173 { FRAC_CONST(0.000303650824695), FRAC_CONST(0.032273432771295) },
3174 { FRAC_CONST(0.000198034825504), FRAC_CONST(0.032274253653254) },
3175 { FRAC_CONST(0.000092416705518), FRAC_CONST(0.032274728903884) }
3176};
3177
3178#ifdef LD_DEC
3179/* 240 (N/4) complex twiddle factors */
3180ALIGN static const complex_t mdct_tab_960[] =
3181{
3182 { FRAC_CONST(0.045643531183573), FRAC_CONST(0.000037342034959) },
3183 { FRAC_CONST(0.045642309173789), FRAC_CONST(0.000336075315362) },
3184 { FRAC_CONST(0.045639131999390), FRAC_CONST(0.000634794199417) },
3185 { FRAC_CONST(0.045633999796474), FRAC_CONST(0.000933485891002) },
3186 { FRAC_CONST(0.045626912784890), FRAC_CONST(0.001232137595157) },
3187 { FRAC_CONST(0.045617871268219), FRAC_CONST(0.001530736518639) },
3188 { FRAC_CONST(0.045606875633772), FRAC_CONST(0.001829269870464) },
3189 { FRAC_CONST(0.045593926352564), FRAC_CONST(0.002127724862455) },
3190 { FRAC_CONST(0.045579023979299), FRAC_CONST(0.002426088709795) },
3191 { FRAC_CONST(0.045562169152346), FRAC_CONST(0.002724348631569) },
3192 { FRAC_CONST(0.045543362593709), FRAC_CONST(0.003022491851315) },
3193 { FRAC_CONST(0.045522605108999), FRAC_CONST(0.003320505597570) },
3194 { FRAC_CONST(0.045499897587396), FRAC_CONST(0.003618377104416) },
3195 { FRAC_CONST(0.045475241001617), FRAC_CONST(0.003916093612031) },
3196 { FRAC_CONST(0.045448636407866), FRAC_CONST(0.004213642367228) },
3197 { FRAC_CONST(0.045420084945797), FRAC_CONST(0.004511010624011) },
3198 { FRAC_CONST(0.045389587838458), FRAC_CONST(0.004808185644112) },
3199 { FRAC_CONST(0.045357146392244), FRAC_CONST(0.005105154697544) },
3200 { FRAC_CONST(0.045322761996840), FRAC_CONST(0.005401905063139) },
3201 { FRAC_CONST(0.045286436125157), FRAC_CONST(0.005698424029100) },
3202 { FRAC_CONST(0.045248170333275), FRAC_CONST(0.005994698893542) },
3203 { FRAC_CONST(0.045207966260374), FRAC_CONST(0.006290716965035) },
3204 { FRAC_CONST(0.045165825628663), FRAC_CONST(0.006586465563151) },
3205 { FRAC_CONST(0.045121750243305), FRAC_CONST(0.006881932019003) },
3206 { FRAC_CONST(0.045075741992343), FRAC_CONST(0.007177103675792) },
3207 { FRAC_CONST(0.045027802846618), FRAC_CONST(0.007471967889347) },
3208 { FRAC_CONST(0.044977934859683), FRAC_CONST(0.007766512028667) },
3209 { FRAC_CONST(0.044926140167717), FRAC_CONST(0.008060723476460) },
3210 { FRAC_CONST(0.044872420989432), FRAC_CONST(0.008354589629687) },
3211 { FRAC_CONST(0.044816779625979), FRAC_CONST(0.008648097900101) },
3212 { FRAC_CONST(0.044759218460849), FRAC_CONST(0.008941235714784) },
3213 { FRAC_CONST(0.044699739959770), FRAC_CONST(0.009233990516688) },
3214 { FRAC_CONST(0.044638346670603), FRAC_CONST(0.009526349765171) },
3215 { FRAC_CONST(0.044575041223233), FRAC_CONST(0.009818300936537) },
3216 { FRAC_CONST(0.044509826329454), FRAC_CONST(0.010109831524568) },
3217 { FRAC_CONST(0.044442704782856), FRAC_CONST(0.010400929041064) },
3218 { FRAC_CONST(0.044373679458701), FRAC_CONST(0.010691581016378) },
3219 { FRAC_CONST(0.044302753313806), FRAC_CONST(0.010981774999945) },
3220 { FRAC_CONST(0.044229929386409), FRAC_CONST(0.011271498560822) },
3221 { FRAC_CONST(0.044155210796046), FRAC_CONST(0.011560739288214) },
3222 { FRAC_CONST(0.044078600743413), FRAC_CONST(0.011849484792012) },
3223 { FRAC_CONST(0.044000102510229), FRAC_CONST(0.012137722703321) },
3224 { FRAC_CONST(0.043919719459097), FRAC_CONST(0.012425440674986) },
3225 { FRAC_CONST(0.043837455033359), FRAC_CONST(0.012712626382127) },
3226 { FRAC_CONST(0.043753312756950), FRAC_CONST(0.012999267522665) },
3227 { FRAC_CONST(0.043667296234245), FRAC_CONST(0.013285351817848) },
3228 { FRAC_CONST(0.043579409149906), FRAC_CONST(0.013570867012776) },
3229 { FRAC_CONST(0.043489655268722), FRAC_CONST(0.013855800876928) },
3230 { FRAC_CONST(0.043398038435451), FRAC_CONST(0.014140141204686) },
3231 { FRAC_CONST(0.043304562574653), FRAC_CONST(0.014423875815857) },
3232 { FRAC_CONST(0.043209231690524), FRAC_CONST(0.014706992556195) },
3233 { FRAC_CONST(0.043112049866720), FRAC_CONST(0.014989479297920) },
3234 { FRAC_CONST(0.043013021266188), FRAC_CONST(0.015271323940241) },
3235 { FRAC_CONST(0.042912150130984), FRAC_CONST(0.015552514409871) },
3236 { FRAC_CONST(0.042809440782090), FRAC_CONST(0.015833038661547) },
3237 { FRAC_CONST(0.042704897619235), FRAC_CONST(0.016112884678543) },
3238 { FRAC_CONST(0.042598525120698), FRAC_CONST(0.016392040473187) },
3239 { FRAC_CONST(0.042490327843124), FRAC_CONST(0.016670494087374) },
3240 { FRAC_CONST(0.042380310421324), FRAC_CONST(0.016948233593079) },
3241 { FRAC_CONST(0.042268477568078), FRAC_CONST(0.017225247092864) },
3242 { FRAC_CONST(0.042154834073934), FRAC_CONST(0.017501522720393) },
3243 { FRAC_CONST(0.042039384807000), FRAC_CONST(0.017777048640940) },
3244 { FRAC_CONST(0.041922134712739), FRAC_CONST(0.018051813051888) },
3245 { FRAC_CONST(0.041803088813754), FRAC_CONST(0.018325804183247) },
3246 { FRAC_CONST(0.041682252209576), FRAC_CONST(0.018599010298148) },
3247 { FRAC_CONST(0.041559630076443), FRAC_CONST(0.018871419693350) },
3248 { FRAC_CONST(0.041435227667079), FRAC_CONST(0.019143020699741) },
3249 { FRAC_CONST(0.041309050310468), FRAC_CONST(0.019413801682838) },
3250 { FRAC_CONST(0.041181103411629), FRAC_CONST(0.019683751043285) },
3251 { FRAC_CONST(0.041051392451382), FRAC_CONST(0.019952857217350) },
3252 { FRAC_CONST(0.040919922986111), FRAC_CONST(0.020221108677421) },
3253 { FRAC_CONST(0.040786700647532), FRAC_CONST(0.020488493932496) },
3254 { FRAC_CONST(0.040651731142446), FRAC_CONST(0.020755001528683) },
3255 { FRAC_CONST(0.040515020252497), FRAC_CONST(0.021020620049682) },
3256 { FRAC_CONST(0.040376573833925), FRAC_CONST(0.021285338117280) },
3257 { FRAC_CONST(0.040236397817314), FRAC_CONST(0.021549144391836) },
3258 { FRAC_CONST(0.040094498207337), FRAC_CONST(0.021812027572768) },
3259 { FRAC_CONST(0.039950881082502), FRAC_CONST(0.022073976399034) },
3260 { FRAC_CONST(0.039805552594888), FRAC_CONST(0.022334979649620) },
3261 { FRAC_CONST(0.039658518969884), FRAC_CONST(0.022595026144014) },
3262 { FRAC_CONST(0.039509786505922), FRAC_CONST(0.022854104742690) },
3263 { FRAC_CONST(0.039359361574204), FRAC_CONST(0.023112204347583) },
3264 { FRAC_CONST(0.039207250618434), FRAC_CONST(0.023369313902565) },
3265 { FRAC_CONST(0.039053460154540), FRAC_CONST(0.023625422393919) },
3266 { FRAC_CONST(0.038897996770393), FRAC_CONST(0.023880518850809) },
3267 { FRAC_CONST(0.038740867125527), FRAC_CONST(0.024134592345752) },
3268 { FRAC_CONST(0.038582077950852), FRAC_CONST(0.024387631995085) },
3269 { FRAC_CONST(0.038421636048370), FRAC_CONST(0.024639626959432) },
3270 { FRAC_CONST(0.038259548290876), FRAC_CONST(0.024890566444167) },
3271 { FRAC_CONST(0.038095821621671), FRAC_CONST(0.025140439699877) },
3272 { FRAC_CONST(0.037930463054261), FRAC_CONST(0.025389236022825) },
3273 { FRAC_CONST(0.037763479672055), FRAC_CONST(0.025636944755403) },
3274 { FRAC_CONST(0.037594878628068), FRAC_CONST(0.025883555286595) },
3275 { FRAC_CONST(0.037424667144605), FRAC_CONST(0.026129057052425) },
3276 { FRAC_CONST(0.037252852512960), FRAC_CONST(0.026373439536415) },
3277 { FRAC_CONST(0.037079442093102), FRAC_CONST(0.026616692270033) },
3278 { FRAC_CONST(0.036904443313354), FRAC_CONST(0.026858804833142) },
3279 { FRAC_CONST(0.036727863670081), FRAC_CONST(0.027099766854444) },
3280 { FRAC_CONST(0.036549710727369), FRAC_CONST(0.027339568011930) },
3281 { FRAC_CONST(0.036369992116697), FRAC_CONST(0.027578198033315) },
3282 { FRAC_CONST(0.036188715536611), FRAC_CONST(0.027815646696484) },
3283 { FRAC_CONST(0.036005888752396), FRAC_CONST(0.028051903829926) },
3284 { FRAC_CONST(0.035821519595745), FRAC_CONST(0.028286959313171) },
3285 { FRAC_CONST(0.035635615964417), FRAC_CONST(0.028520803077226) },
3286 { FRAC_CONST(0.035448185821906), FRAC_CONST(0.028753425105002) },
3287 { FRAC_CONST(0.035259237197095), FRAC_CONST(0.028984815431745) },
3288 { FRAC_CONST(0.035068778183914), FRAC_CONST(0.029214964145465) },
3289 { FRAC_CONST(0.034876816940994), FRAC_CONST(0.029443861387355) },
3290 { FRAC_CONST(0.034683361691315), FRAC_CONST(0.029671497352220) },
3291 { FRAC_CONST(0.034488420721856), FRAC_CONST(0.029897862288892) },
3292 { FRAC_CONST(0.034292002383240), FRAC_CONST(0.030122946500652) },
3293 { FRAC_CONST(0.034094115089375), FRAC_CONST(0.030346740345641) },
3294 { FRAC_CONST(0.033894767317093), FRAC_CONST(0.030569234237276) },
3295 { FRAC_CONST(0.033693967605790), FRAC_CONST(0.030790418644658) },
3296 { FRAC_CONST(0.033491724557057), FRAC_CONST(0.031010284092984) },
3297 { FRAC_CONST(0.033288046834313), FRAC_CONST(0.031228821163949) },
3298 { FRAC_CONST(0.033082943162434), FRAC_CONST(0.031446020496153) },
3299 { FRAC_CONST(0.032876422327378), FRAC_CONST(0.031661872785500) },
3300 { FRAC_CONST(0.032668493175811), FRAC_CONST(0.031876368785596) },
3301 { FRAC_CONST(0.032459164614726), FRAC_CONST(0.032089499308145) },
3302 { FRAC_CONST(0.032248445611061), FRAC_CONST(0.032301255223347) },
3303 { FRAC_CONST(0.032036345191317), FRAC_CONST(0.032511627460281) },
3304 { FRAC_CONST(0.031822872441171), FRAC_CONST(0.032720607007302) },
3305 { FRAC_CONST(0.031608036505083), FRAC_CONST(0.032928184912422) },
3306 { FRAC_CONST(0.031391846585912), FRAC_CONST(0.033134352283693) },
3307 { FRAC_CONST(0.031174311944513), FRAC_CONST(0.033339100289593) },
3308 { FRAC_CONST(0.030955441899347), FRAC_CONST(0.033542420159397) },
3309 { FRAC_CONST(0.030735245826077), FRAC_CONST(0.033744303183559) },
3310 { FRAC_CONST(0.030513733157171), FRAC_CONST(0.033944740714083) },
3311 { FRAC_CONST(0.030290913381494), FRAC_CONST(0.034143724164891) },
3312 { FRAC_CONST(0.030066796043904), FRAC_CONST(0.034341245012195) },
3313 { FRAC_CONST(0.029841390744841), FRAC_CONST(0.034537294794860) },
3314 { FRAC_CONST(0.029614707139919), FRAC_CONST(0.034731865114764) },
3315 { FRAC_CONST(0.029386754939508), FRAC_CONST(0.034924947637164) },
3316 { FRAC_CONST(0.029157543908322), FRAC_CONST(0.035116534091046) },
3317 { FRAC_CONST(0.028927083864999), FRAC_CONST(0.035306616269485) },
3318 { FRAC_CONST(0.028695384681680), FRAC_CONST(0.035495186029992) },
3319 { FRAC_CONST(0.028462456283587), FRAC_CONST(0.035682235294866) },
3320 { FRAC_CONST(0.028228308648598), FRAC_CONST(0.035867756051541) },
3321 { FRAC_CONST(0.027992951806817), FRAC_CONST(0.036051740352923) },
3322 { FRAC_CONST(0.027756395840148), FRAC_CONST(0.036234180317738) },
3323 { FRAC_CONST(0.027518650881862), FRAC_CONST(0.036415068130865) },
3324 { FRAC_CONST(0.027279727116161), FRAC_CONST(0.036594396043672) },
3325 { FRAC_CONST(0.027039634777745), FRAC_CONST(0.036772156374348) },
3326 { FRAC_CONST(0.026798384151369), FRAC_CONST(0.036948341508233) },
3327 { FRAC_CONST(0.026555985571409), FRAC_CONST(0.037122943898140) },
3328 { FRAC_CONST(0.026312449421412), FRAC_CONST(0.037295956064686) },
3329 { FRAC_CONST(0.026067786133656), FRAC_CONST(0.037467370596605) },
3330 { FRAC_CONST(0.025822006188702), FRAC_CONST(0.037637180151068) },
3331 { FRAC_CONST(0.025575120114946), FRAC_CONST(0.037805377454000) },
3332 { FRAC_CONST(0.025327138488165), FRAC_CONST(0.037971955300388) },
3333 { FRAC_CONST(0.025078071931066), FRAC_CONST(0.038136906554591) },
3334 { FRAC_CONST(0.024827931112832), FRAC_CONST(0.038300224150647) },
3335 { FRAC_CONST(0.024576726748663), FRAC_CONST(0.038461901092573) },
3336 { FRAC_CONST(0.024324469599317), FRAC_CONST(0.038621930454668) },
3337 { FRAC_CONST(0.024071170470652), FRAC_CONST(0.038780305381806) },
3338 { FRAC_CONST(0.023816840213160), FRAC_CONST(0.038937019089732) },
3339 { FRAC_CONST(0.023561489721501), FRAC_CONST(0.039092064865353) },
3340 { FRAC_CONST(0.023305129934041), FRAC_CONST(0.039245436067023) },
3341 { FRAC_CONST(0.023047771832380), FRAC_CONST(0.039397126124832) },
3342 { FRAC_CONST(0.022789426440883), FRAC_CONST(0.039547128540881) },
3343 { FRAC_CONST(0.022530104826206), FRAC_CONST(0.039695436889566) },
3344 { FRAC_CONST(0.022269818096825), FRAC_CONST(0.039842044817851) },
3345 { FRAC_CONST(0.022008577402555), FRAC_CONST(0.039986946045542) },
3346 { FRAC_CONST(0.021746393934081), FRAC_CONST(0.040130134365550) },
3347 { FRAC_CONST(0.021483278922467), FRAC_CONST(0.040271603644166) },
3348 { FRAC_CONST(0.021219243638687), FRAC_CONST(0.040411347821316) },
3349 { FRAC_CONST(0.020954299393132), FRAC_CONST(0.040549360910825) },
3350 { FRAC_CONST(0.020688457535133), FRAC_CONST(0.040685637000671) },
3351 { FRAC_CONST(0.020421729452469), FRAC_CONST(0.040820170253240) },
3352 { FRAC_CONST(0.020154126570884), FRAC_CONST(0.040952954905576) },
3353 { FRAC_CONST(0.019885660353596), FRAC_CONST(0.041083985269625) },
3354 { FRAC_CONST(0.019616342300802), FRAC_CONST(0.041213255732484) },
3355 { FRAC_CONST(0.019346183949192), FRAC_CONST(0.041340760756635) },
3356 { FRAC_CONST(0.019075196871451), FRAC_CONST(0.041466494880189) },
3357 { FRAC_CONST(0.018803392675763), FRAC_CONST(0.041590452717113) },
3358 { FRAC_CONST(0.018530783005316), FRAC_CONST(0.041712628957466) },
3359 { FRAC_CONST(0.018257379537800), FRAC_CONST(0.041833018367625) },
3360 { FRAC_CONST(0.017983193984910), FRAC_CONST(0.041951615790509) },
3361 { FRAC_CONST(0.017708238091842), FRAC_CONST(0.042068416145797) },
3362 { FRAC_CONST(0.017432523636792), FRAC_CONST(0.042183414430153) },
3363 { FRAC_CONST(0.017156062430449), FRAC_CONST(0.042296605717432) },
3364 { FRAC_CONST(0.016878866315491), FRAC_CONST(0.042407985158896) },
3365 { FRAC_CONST(0.016600947166078), FRAC_CONST(0.042517547983420) },
3366 { FRAC_CONST(0.016322316887341), FRAC_CONST(0.042625289497698) },
3367 { FRAC_CONST(0.016042987414872), FRAC_CONST(0.042731205086442) },
3368 { FRAC_CONST(0.015762970714219), FRAC_CONST(0.042835290212581) },
3369 { FRAC_CONST(0.015482278780363), FRAC_CONST(0.042937540417454) },
3370 { FRAC_CONST(0.015200923637213), FRAC_CONST(0.043037951321002) },
3371 { FRAC_CONST(0.014918917337087), FRAC_CONST(0.043136518621958) },
3372 { FRAC_CONST(0.014636271960196), FRAC_CONST(0.043233238098025) },
3373 { FRAC_CONST(0.014352999614128), FRAC_CONST(0.043328105606063) },
3374 { FRAC_CONST(0.014069112433327), FRAC_CONST(0.043421117082265) },
3375 { FRAC_CONST(0.013784622578575), FRAC_CONST(0.043512268542327) },
3376 { FRAC_CONST(0.013499542236471), FRAC_CONST(0.043601556081625) },
3377 { FRAC_CONST(0.013213883618907), FRAC_CONST(0.043688975875378) },
3378 { FRAC_CONST(0.012927658962548), FRAC_CONST(0.043774524178812) },
3379 { FRAC_CONST(0.012640880528305), FRAC_CONST(0.043858197327323) },
3380 { FRAC_CONST(0.012353560600813), FRAC_CONST(0.043939991736633) },
3381 { FRAC_CONST(0.012065711487901), FRAC_CONST(0.044019903902940) },
3382 { FRAC_CONST(0.011777345520066), FRAC_CONST(0.044097930403073) },
3383 { FRAC_CONST(0.011488475049948), FRAC_CONST(0.044174067894638) },
3384 { FRAC_CONST(0.011199112451794), FRAC_CONST(0.044248313116156) },
3385 { FRAC_CONST(0.010909270120937), FRAC_CONST(0.044320662887211) },
3386 { FRAC_CONST(0.010618960473257), FRAC_CONST(0.044391114108577) },
3387 { FRAC_CONST(0.010328195944653), FRAC_CONST(0.044459663762361) },
3388 { FRAC_CONST(0.010036988990509), FRAC_CONST(0.044526308912122) },
3389 { FRAC_CONST(0.009745352085163), FRAC_CONST(0.044591046703005) },
3390 { FRAC_CONST(0.009453297721368), FRAC_CONST(0.044653874361857) },
3391 { FRAC_CONST(0.009160838409762), FRAC_CONST(0.044714789197351) },
3392 { FRAC_CONST(0.008867986678328), FRAC_CONST(0.044773788600099) },
3393 { FRAC_CONST(0.008574755071860), FRAC_CONST(0.044830870042761) },
3394 { FRAC_CONST(0.008281156151424), FRAC_CONST(0.044886031080160) },
3395 { FRAC_CONST(0.007987202493820), FRAC_CONST(0.044939269349379) },
3396 { FRAC_CONST(0.007692906691044), FRAC_CONST(0.044990582569869) },
3397 { FRAC_CONST(0.007398281349750), FRAC_CONST(0.045039968543542) },
3398 { FRAC_CONST(0.007103339090706), FRAC_CONST(0.045087425154868) },
3399 { FRAC_CONST(0.006808092548258), FRAC_CONST(0.045132950370962) },
3400 { FRAC_CONST(0.006512554369783), FRAC_CONST(0.045176542241676) },
3401 { FRAC_CONST(0.006216737215155), FRAC_CONST(0.045218198899680) },
3402 { FRAC_CONST(0.005920653756196), FRAC_CONST(0.045257918560541) },
3403 { FRAC_CONST(0.005624316676135), FRAC_CONST(0.045295699522801) },
3404 { FRAC_CONST(0.005327738669067), FRAC_CONST(0.045331540168049) },
3405 { FRAC_CONST(0.005030932439406), FRAC_CONST(0.045365438960992) },
3406 { FRAC_CONST(0.004733910701344), FRAC_CONST(0.045397394449517) },
3407 { FRAC_CONST(0.004436686178303), FRAC_CONST(0.045427405264758) },
3408 { FRAC_CONST(0.004139271602393), FRAC_CONST(0.045455470121152) },
3409 { FRAC_CONST(0.003841679713863), FRAC_CONST(0.045481587816494) },
3410 { FRAC_CONST(0.003543923260561), FRAC_CONST(0.045505757231988) },
3411 { FRAC_CONST(0.003246014997382), FRAC_CONST(0.045527977332297) },
3412 { FRAC_CONST(0.002947967685724), FRAC_CONST(0.045548247165585) },
3413 { FRAC_CONST(0.002649794092941), FRAC_CONST(0.045566565863562) },
3414 { FRAC_CONST(0.002351506991799), FRAC_CONST(0.045582932641515) },
3415 { FRAC_CONST(0.002053119159924), FRAC_CONST(0.045597346798344) },
3416 { FRAC_CONST(0.001754643379257), FRAC_CONST(0.045609807716597) },
3417 { FRAC_CONST(0.001456092435508), FRAC_CONST(0.045620314862489) },
3418 { FRAC_CONST(0.001157479117605), FRAC_CONST(0.045628867785927) },
3419 { FRAC_CONST(0.000858816217149), FRAC_CONST(0.045635466120535) },
3420 { FRAC_CONST(0.000560116527865), FRAC_CONST(0.045640109583661) },
3421 { FRAC_CONST(0.000261392845053), FRAC_CONST(0.045642797976394) }
3422};
3423#endif // LD_DEC
3424
3425/* 60 (N/4) complex twiddle factors */
3426ALIGN static const complex_t mdct_tab_240[] =
3427{
3428 { FRAC_CONST(0.091286604111815), FRAC_CONST(0.000298735779793) },
3429 { FRAC_CONST(0.091247502481454), FRAC_CONST(0.002688238127538) },
3430 { FRAC_CONST(0.091145864370807), FRAC_CONST(0.005075898091152) },
3431 { FRAC_CONST(0.090981759437558), FRAC_CONST(0.007460079287760) },
3432 { FRAC_CONST(0.090755300151030), FRAC_CONST(0.009839147718664) },
3433 { FRAC_CONST(0.090466641715108), FRAC_CONST(0.012211472889198) },
3434 { FRAC_CONST(0.090115981961863), FRAC_CONST(0.014575428926191) },
3435 { FRAC_CONST(0.089703561215976), FRAC_CONST(0.016929395692256) },
3436 { FRAC_CONST(0.089229662130024), FRAC_CONST(0.019271759896156) },
3437 { FRAC_CONST(0.088694609490769), FRAC_CONST(0.021600916198470) },
3438 { FRAC_CONST(0.088098769996564), FRAC_CONST(0.023915268311810) },
3439 { FRAC_CONST(0.087442552006035), FRAC_CONST(0.026213230094844) },
3440 { FRAC_CONST(0.086726405258214), FRAC_CONST(0.028493226639351) },
3441 { FRAC_CONST(0.085950820564309), FRAC_CONST(0.030753695349588) },
3442 { FRAC_CONST(0.085116329471329), FRAC_CONST(0.032993087013213) },
3443 { FRAC_CONST(0.084223503897785), FRAC_CONST(0.035209866863042) },
3444 { FRAC_CONST(0.083272955741727), FRAC_CONST(0.037402515628894) },
3445 { FRAC_CONST(0.082265336461381), FRAC_CONST(0.039569530578832) },
3446 { FRAC_CONST(0.081201336628670), FRAC_CONST(0.041709426549053) },
3447 { FRAC_CONST(0.080081685455930), FRAC_CONST(0.043820736961749) },
3448 { FRAC_CONST(0.078907150296148), FRAC_CONST(0.045902014830227) },
3449 { FRAC_CONST(0.077678536117054), FRAC_CONST(0.047951833750597) },
3450 { FRAC_CONST(0.076396684949434), FRAC_CONST(0.049968788879362) },
3451 { FRAC_CONST(0.075062475310050), FRAC_CONST(0.051951497896226) },
3452 { FRAC_CONST(0.073676821599542), FRAC_CONST(0.053898601951466) },
3453 { FRAC_CONST(0.072240673475749), FRAC_CONST(0.055808766597225) },
3454 { FRAC_CONST(0.070755015202858), FRAC_CONST(0.057680682702068) },
3455 { FRAC_CONST(0.069220864976840), FRAC_CONST(0.059513067348201) },
3456 { FRAC_CONST(0.067639274227625), FRAC_CONST(0.061304664710718) },
3457 { FRAC_CONST(0.066011326898512), FRAC_CONST(0.063054246918278) },
3458 { FRAC_CONST(0.064338138703282), FRAC_CONST(0.064760614894630) },
3459 { FRAC_CONST(0.062620856361546), FRAC_CONST(0.066422599180399) },
3460 { FRAC_CONST(0.060860656812842), FRAC_CONST(0.068039060734572) },
3461 { FRAC_CONST(0.059058746410016), FRAC_CONST(0.069608891715145) },
3462 { FRAC_CONST(0.057216360092450), FRAC_CONST(0.071131016238378) },
3463 { FRAC_CONST(0.055334760539699), FRAC_CONST(0.072604391116154) },
3464 { FRAC_CONST(0.053415237306106), FRAC_CONST(0.074028006570930) },
3465 { FRAC_CONST(0.051459105937014), FRAC_CONST(0.075400886927784) },
3466 { FRAC_CONST(0.049467707067153), FRAC_CONST(0.076722091283096) },
3467 { FRAC_CONST(0.047442405501835), FRAC_CONST(0.077990714149396) },
3468 { FRAC_CONST(0.045384589281588), FRAC_CONST(0.079205886075941) },
3469 { FRAC_CONST(0.043295668730857), FRAC_CONST(0.080366774244592) },
3470 { FRAC_CONST(0.041177075491445), FRAC_CONST(0.081472583040586) },
3471 { FRAC_CONST(0.039030261541332), FRAC_CONST(0.082522554597810) },
3472 { FRAC_CONST(0.036856698199564), FRAC_CONST(0.083515969318206) },
3473 { FRAC_CONST(0.034657875117883), FRAC_CONST(0.084452146364948) },
3474 { FRAC_CONST(0.032435299259796), FRAC_CONST(0.085330444129049) },
3475 { FRAC_CONST(0.030190493867775), FRAC_CONST(0.086150260669096) },
3476 { FRAC_CONST(0.027924997419306), FRAC_CONST(0.086911034123781) },
3477 { FRAC_CONST(0.025640362572491), FRAC_CONST(0.087612243096981) },
3478 { FRAC_CONST(0.023338155101933), FRAC_CONST(0.088253407015092) },
3479 { FRAC_CONST(0.021019952825636), FRAC_CONST(0.088834086456390) },
3480 { FRAC_CONST(0.018687344523641), FRAC_CONST(0.089353883452193) },
3481 { FRAC_CONST(0.016341928849164), FRAC_CONST(0.089812441759604) },
3482 { FRAC_CONST(0.013985313232951), FRAC_CONST(0.090209447105664) },
3483 { FRAC_CONST(0.011619112781631), FRAC_CONST(0.090544627402740) },
3484 { FRAC_CONST(0.009244949170797), FRAC_CONST(0.090817752935000) },
3485 { FRAC_CONST(0.006864449533597), FRAC_CONST(0.091028636515846) },
3486 { FRAC_CONST(0.004479245345574), FRAC_CONST(0.091177133616206) },
3487 { FRAC_CONST(0.002090971306534), FRAC_CONST(0.091263142463585) }
3488};
3489#endif // ALLOW_SMALL_FRAMELENGTH
3490
3491#ifdef SSR_DEC
3492/* 128 (N/4) complex twiddle factors */
3493ALIGN static const complex_t mdct_tab_512[] =
3494{
3495 { FRAC_CONST(0.062499926465731), FRAC_CONST(0.000095873761643) },
3496 { FRAC_CONST(0.062494043817678), FRAC_CONST(0.000862836783004) },
3497 { FRAC_CONST(0.062478749796497), FRAC_CONST(0.001629669864319) },
3498 { FRAC_CONST(0.062454046705412), FRAC_CONST(0.002396257523347) },
3499 { FRAC_CONST(0.062419938264617), FRAC_CONST(0.003162484314806) },
3500 { FRAC_CONST(0.062376429610718), FRAC_CONST(0.003928234847760) },
3501 { FRAC_CONST(0.062323527295958), FRAC_CONST(0.004693393802995) },
3502 { FRAC_CONST(0.062261239287231), FRAC_CONST(0.005457845950387) },
3503 { FRAC_CONST(0.062189574964882), FRAC_CONST(0.006221476166254) },
3504 { FRAC_CONST(0.062108545121295), FRAC_CONST(0.006984169450695) },
3505 { FRAC_CONST(0.062018161959266), FRAC_CONST(0.007745810944907) },
3506 { FRAC_CONST(0.061918439090167), FRAC_CONST(0.008506285948482) },
3507 { FRAC_CONST(0.061809391531894), FRAC_CONST(0.009265479936681) },
3508 { FRAC_CONST(0.061691035706609), FRAC_CONST(0.010023278577683) },
3509 { FRAC_CONST(0.061563389438265), FRAC_CONST(0.010779567749800) },
3510 { FRAC_CONST(0.061426471949919), FRAC_CONST(0.011534233558664) },
3511 { FRAC_CONST(0.061280303860842), FRAC_CONST(0.012287162354380) },
3512 { FRAC_CONST(0.061124907183410), FRAC_CONST(0.013038240748641) },
3513 { FRAC_CONST(0.060960305319791), FRAC_CONST(0.013787355631805) },
3514 { FRAC_CONST(0.060786523058421), FRAC_CONST(0.014534394189923) },
3515 { FRAC_CONST(0.060603586570268), FRAC_CONST(0.015279243921739) },
3516 { FRAC_CONST(0.060411523404896), FRAC_CONST(0.016021792655621) },
3517 { FRAC_CONST(0.060210362486310), FRAC_CONST(0.016761928566463) },
3518 { FRAC_CONST(0.060000134108604), FRAC_CONST(0.017499540192517) },
3519 { FRAC_CONST(0.059780869931400), FRAC_CONST(0.018234516452187) },
3520 { FRAC_CONST(0.059552602975075), FRAC_CONST(0.018966746660751) },
3521 { FRAC_CONST(0.059315367615794), FRAC_CONST(0.019696120547033) },
3522 { FRAC_CONST(0.059069199580329), FRAC_CONST(0.020422528270008) },
3523 { FRAC_CONST(0.058814135940681), FRAC_CONST(0.021145860435346) },
3524 { FRAC_CONST(0.058550215108495), FRAC_CONST(0.021866008111883) },
3525 { FRAC_CONST(0.058277476829279), FRAC_CONST(0.022582862848028) },
3526 { FRAC_CONST(0.057995962176414), FRAC_CONST(0.023296316688095) },
3527 { FRAC_CONST(0.057705713544970), FRAC_CONST(0.024006262188558) },
3528 { FRAC_CONST(0.057406774645326), FRAC_CONST(0.024712592434239) },
3529 { FRAC_CONST(0.057099190496578), FRAC_CONST(0.025415201054398) },
3530 { FRAC_CONST(0.056783007419769), FRAC_CONST(0.026113982238763) },
3531 { FRAC_CONST(0.056458273030907), FRAC_CONST(0.026808830753458) },
3532 { FRAC_CONST(0.056125036233796), FRAC_CONST(0.027499641956852) },
3533 { FRAC_CONST(0.055783347212673), FRAC_CONST(0.028186311815319) },
3534 { FRAC_CONST(0.055433257424646), FRAC_CONST(0.028868736918904) },
3535 { FRAC_CONST(0.055074819591951), FRAC_CONST(0.029546814496896) },
3536 { FRAC_CONST(0.054708087694007), FRAC_CONST(0.030220442433307) },
3537 { FRAC_CONST(0.054333116959288), FRAC_CONST(0.030889519282247) },
3538 { FRAC_CONST(0.053949963857008), FRAC_CONST(0.031553944283204) },
3539 { FRAC_CONST(0.053558686088614), FRAC_CONST(0.032213617376216) },
3540 { FRAC_CONST(0.053159342579100), FRAC_CONST(0.032868439216943) },
3541 { FRAC_CONST(0.052751993468129), FRAC_CONST(0.033518311191623) },
3542 { FRAC_CONST(0.052336700100979), FRAC_CONST(0.034163135431927) },
3543 { FRAC_CONST(0.051913525019303), FRAC_CONST(0.034802814829698) },
3544 { FRAC_CONST(0.051482531951712), FRAC_CONST(0.035437253051569) },
3545 { FRAC_CONST(0.051043785804177), FRAC_CONST(0.036066354553480) },
3546 { FRAC_CONST(0.050597352650253), FRAC_CONST(0.036690024595057) },
3547 { FRAC_CONST(0.050143299721132), FRAC_CONST(0.037308169253887) },
3548 { FRAC_CONST(0.049681695395515), FRAC_CONST(0.037920695439658) },
3549 { FRAC_CONST(0.049212609189314), FRAC_CONST(0.038527510908178) },
3550 { FRAC_CONST(0.048736111745188), FRAC_CONST(0.039128524275271) },
3551 { FRAC_CONST(0.048252274821899), FRAC_CONST(0.039723645030535) },
3552 { FRAC_CONST(0.047761171283507), FRAC_CONST(0.040312783550971) },
3553 { FRAC_CONST(0.047262875088400), FRAC_CONST(0.040895851114488) },
3554 { FRAC_CONST(0.046757461278150), FRAC_CONST(0.041472759913252) },
3555 { FRAC_CONST(0.046245005966220), FRAC_CONST(0.042043423066923) },
3556 { FRAC_CONST(0.045725586326493), FRAC_CONST(0.042607754635728) },
3557 { FRAC_CONST(0.045199280581658), FRAC_CONST(0.043165669633408) },
3558 { FRAC_CONST(0.044666167991423), FRAC_CONST(0.043717084040018) },
3559 { FRAC_CONST(0.044126328840584), FRAC_CONST(0.044261914814575) },
3560 { FRAC_CONST(0.043579844426930), FRAC_CONST(0.044800079907569) },
3561 { FRAC_CONST(0.043026797049006), FRAC_CONST(0.045331498273316) },
3562 { FRAC_CONST(0.042467269993710), FRAC_CONST(0.045856089882166) },
3563 { FRAC_CONST(0.041901347523761), FRAC_CONST(0.046373775732552) },
3564 { FRAC_CONST(0.041329114865000), FRAC_CONST(0.046884477862888) },
3565 { FRAC_CONST(0.040750658193560), FRAC_CONST(0.047388119363313) },
3566 { FRAC_CONST(0.040166064622889), FRAC_CONST(0.047884624387270) },
3567 { FRAC_CONST(0.039575422190629), FRAC_CONST(0.048373918162926) },
3568 { FRAC_CONST(0.038978819845356), FRAC_CONST(0.048855927004441) },
3569 { FRAC_CONST(0.038376347433190), FRAC_CONST(0.049330578323055) },
3570 { FRAC_CONST(0.037768095684260), FRAC_CONST(0.049797800638026) },
3571 { FRAC_CONST(0.037154156199042), FRAC_CONST(0.050257523587392) },
3572 { FRAC_CONST(0.036534621434563), FRAC_CONST(0.050709677938566) },
3573 { FRAC_CONST(0.035909584690482), FRAC_CONST(0.051154195598769) },
3574 { FRAC_CONST(0.035279140095032), FRAC_CONST(0.051591009625274) },
3575 { FRAC_CONST(0.034643382590851), FRAC_CONST(0.052020054235496) },
3576 { FRAC_CONST(0.034002407920680), FRAC_CONST(0.052441264816895) },
3577 { FRAC_CONST(0.033356312612947), FRAC_CONST(0.052854577936706) },
3578 { FRAC_CONST(0.032705193967229), FRAC_CONST(0.053259931351495) },
3579 { FRAC_CONST(0.032049150039598), FRAC_CONST(0.053657264016528) },
3580 { FRAC_CONST(0.031388279627857), FRAC_CONST(0.054046516094966) },
3581 { FRAC_CONST(0.030722682256659), FRAC_CONST(0.054427628966880) },
3582 { FRAC_CONST(0.030052458162521), FRAC_CONST(0.054800545238072) },
3583 { FRAC_CONST(0.029377708278725), FRAC_CONST(0.055165208748723) },
3584 { FRAC_CONST(0.028698534220122), FRAC_CONST(0.055521564581850) },
3585 { FRAC_CONST(0.028015038267826), FRAC_CONST(0.055869559071575) },
3586 { FRAC_CONST(0.027327323353815), FRAC_CONST(0.056209139811209) },
3587 { FRAC_CONST(0.026635493045425), FRAC_CONST(0.056540255661140) },
3588 { FRAC_CONST(0.025939651529755), FRAC_CONST(0.056862856756541) },
3589 { FRAC_CONST(0.025239903597978), FRAC_CONST(0.057176894514872) },
3590 { FRAC_CONST(0.024536354629559), FRAC_CONST(0.057482321643202) },
3591 { FRAC_CONST(0.023829110576385), FRAC_CONST(0.057779092145329) },
3592 { FRAC_CONST(0.023118277946808), FRAC_CONST(0.058067161328707) },
3593 { FRAC_CONST(0.022403963789609), FRAC_CONST(0.058346485811177) },
3594 { FRAC_CONST(0.021686275677870), FRAC_CONST(0.058617023527499) },
3595 { FRAC_CONST(0.020965321692783), FRAC_CONST(0.058878733735689) },
3596 { FRAC_CONST(0.020241210407366), FRAC_CONST(0.059131577023150) },
3597 { FRAC_CONST(0.019514050870114), FRAC_CONST(0.059375515312615) },
3598 { FRAC_CONST(0.018783952588580), FRAC_CONST(0.059610511867874) },
3599 { FRAC_CONST(0.018051025512878), FRAC_CONST(0.059836531299311) },
3600 { FRAC_CONST(0.017315380019131), FRAC_CONST(0.060053539569230) },
3601 { FRAC_CONST(0.016577126892844), FRAC_CONST(0.060261503996984) },
3602 { FRAC_CONST(0.015836377312223), FRAC_CONST(0.060460393263896) },
3603 { FRAC_CONST(0.015093242831429), FRAC_CONST(0.060650177417972) },
3604 { FRAC_CONST(0.014347835363782), FRAC_CONST(0.060830827878419) },
3605 { FRAC_CONST(0.013600267164905), FRAC_CONST(0.061002317439940) },
3606 { FRAC_CONST(0.012850650815819), FRAC_CONST(0.061164620276839) },
3607 { FRAC_CONST(0.012099099205988), FRAC_CONST(0.061317711946905) },
3608 { FRAC_CONST(0.011345725516320), FRAC_CONST(0.061461569395097) },
3609 { FRAC_CONST(0.010590643202123), FRAC_CONST(0.061596170957011) },
3610 { FRAC_CONST(0.009833965976015), FRAC_CONST(0.061721496362147) },
3611 { FRAC_CONST(0.009075807790803), FRAC_CONST(0.061837526736961) },
3612 { FRAC_CONST(0.008316282822321), FRAC_CONST(0.061944244607705) },
3613 { FRAC_CONST(0.007555505452236), FRAC_CONST(0.062041633903059) },
3614 { FRAC_CONST(0.006793590250821), FRAC_CONST(0.062129679956555) },
3615 { FRAC_CONST(0.006030651959703), FRAC_CONST(0.062208369508780) },
3616 { FRAC_CONST(0.005266805474583), FRAC_CONST(0.062277690709378) },
3617 { FRAC_CONST(0.004502165827931), FRAC_CONST(0.062337633118830) },
3618 { FRAC_CONST(0.003736848171665), FRAC_CONST(0.062388187710030) },
3619 { FRAC_CONST(0.002970967759810), FRAC_CONST(0.062429346869643) },
3620 { FRAC_CONST(0.002204639931138), FRAC_CONST(0.062461104399250) },
3621 { FRAC_CONST(0.001437980091802), FRAC_CONST(0.062483455516285) },
3622 { FRAC_CONST(0.000671103697954), FRAC_CONST(0.062496396854751) }
3623};
3624
3625/* 16 (N/4) complex twiddle factors */
3626ALIGN static const complex_t mdct_tab_64[] =
3627{
3628 { FRAC_CONST(0.176763384336599), FRAC_CONST(0.002169321984356) },
3629 { FRAC_CONST(0.175699589589310), FRAC_CONST(0.019484717553714) },
3630 { FRAC_CONST(0.172943711747111), FRAC_CONST(0.036612464641599) },
3631 { FRAC_CONST(0.168522291420137), FRAC_CONST(0.053387613680577) },
3632 { FRAC_CONST(0.162477909303132), FRAC_CONST(0.069648610815172) },
3633 { FRAC_CONST(0.154868776100077), FRAC_CONST(0.085238853753814) },
3634 { FRAC_CONST(0.145768171923295), FRAC_CONST(0.100008199934509) },
3635 { FRAC_CONST(0.135263740565902), FRAC_CONST(0.113814412479792) },
3636 { FRAC_CONST(0.123456645444178), FRAC_CONST(0.126524530015608) },
3637 { FRAC_CONST(0.110460595338559), FRAC_CONST(0.138016147162030) },
3638 { FRAC_CONST(0.096400749315926), FRAC_CONST(0.148178593363981) },
3639 { FRAC_CONST(0.081412511379371), FRAC_CONST(0.156913998709178) },
3640 { FRAC_CONST(0.065640226453626), FRAC_CONST(0.164138236468888) },
3641 { FRAC_CONST(0.049235790264535), FRAC_CONST(0.169781733284316) },
3642 { FRAC_CONST(0.032357186500177), FRAC_CONST(0.173790139196080) },
3643 { FRAC_CONST(0.015166965341583), FRAC_CONST(0.176124851064031) }
3644};
3645#endif // SSR_DEC
3646
3647#endif // FIXED_POINT
3648
3649#ifdef __cplusplus
3650}
3651#endif
3652#endif
diff --git a/apps/codecs/libfaad/mp4.c b/apps/codecs/libfaad/mp4.c
new file mode 100644
index 0000000000..fb0999fb01
--- /dev/null
+++ b/apps/codecs/libfaad/mp4.c
@@ -0,0 +1,299 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#include "common.h"
29#include "structs.h"
30
31#include <stdlib.h>
32
33#include "bits.h"
34#include "mp4.h"
35#include "syntax.h"
36
37/* defines if an object type can be decoded by this library or not */
38static uint8_t ObjectTypesTable[32] = {
39 0, /* 0 NULL */
40#ifdef MAIN_DEC
41 1, /* 1 AAC Main */
42#else
43 0, /* 1 AAC Main */
44#endif
45 1, /* 2 AAC LC */
46#ifdef SSR_DEC
47 1, /* 3 AAC SSR */
48#else
49 0, /* 3 AAC SSR */
50#endif
51#ifdef LTP_DEC
52 1, /* 4 AAC LTP */
53#else
54 0, /* 4 AAC LTP */
55#endif
56#ifdef SBR_DEC
57 1, /* 5 SBR */
58#else
59 0, /* 5 SBR */
60#endif
61#ifdef SCALABLE_DEC
62 1, /* 6 AAC Scalable */
63#else
64 0, /* 6 AAC Scalable */
65#endif
66 0, /* 7 TwinVQ */
67 0, /* 8 CELP */
68 0, /* 9 HVXC */
69 0, /* 10 Reserved */
70 0, /* 11 Reserved */
71 0, /* 12 TTSI */
72 0, /* 13 Main synthetic */
73 0, /* 14 Wavetable synthesis */
74 0, /* 15 General MIDI */
75 0, /* 16 Algorithmic Synthesis and Audio FX */
76
77 /* MPEG-4 Version 2 */
78#ifdef ERROR_RESILIENCE
79 1, /* 17 ER AAC LC */
80 0, /* 18 (Reserved) */
81#ifdef LTP_DEC
82 1, /* 19 ER AAC LTP */
83#else
84 0, /* 19 ER AAC LTP */
85#endif
86#ifdef SCALABLE_DEC
87 1, /* 20 ER AAC scalable */
88#else
89 0, /* 20 ER AAC scalable */
90#endif
91 0, /* 21 ER TwinVQ */
92 0, /* 22 ER BSAC */
93#ifdef LD_DEC
94 1, /* 23 ER AAC LD */
95#else
96 0, /* 23 ER AAC LD */
97#endif
98 0, /* 24 ER CELP */
99 0, /* 25 ER HVXC */
100 0, /* 26 ER HILN */
101 0, /* 27 ER Parametric */
102#else /* No ER defined */
103 0, /* 17 ER AAC LC */
104 0, /* 18 (Reserved) */
105 0, /* 19 ER AAC LTP */
106 0, /* 20 ER AAC scalable */
107 0, /* 21 ER TwinVQ */
108 0, /* 22 ER BSAC */
109 0, /* 23 ER AAC LD */
110 0, /* 24 ER CELP */
111 0, /* 25 ER HVXC */
112 0, /* 26 ER HILN */
113 0, /* 27 ER Parametric */
114#endif
115 0, /* 28 (Reserved) */
116 0, /* 29 (Reserved) */
117 0, /* 30 (Reserved) */
118 0 /* 31 (Reserved) */
119};
120
121/* Table 1.6.1 */
122int8_t NEAACDECAPI NeAACDecAudioSpecificConfig(uint8_t *pBuffer,
123 uint32_t buffer_size,
124 mp4AudioSpecificConfig *mp4ASC)
125{
126 return AudioSpecificConfig2(pBuffer, buffer_size, mp4ASC, NULL);
127}
128
129int8_t AudioSpecificConfig2(uint8_t *pBuffer,
130 uint32_t buffer_size,
131 mp4AudioSpecificConfig *mp4ASC,
132 program_config *pce)
133{
134 bitfile ld;
135 int8_t result = 0;
136#ifdef SBR_DEC
137 int8_t bits_to_decode = 0;
138#endif
139
140 if (pBuffer == NULL)
141 return -7;
142 if (mp4ASC == NULL)
143 return -8;
144
145 memset(mp4ASC, 0, sizeof(mp4AudioSpecificConfig));
146
147 faad_initbits(&ld, pBuffer, buffer_size);
148 faad_byte_align(&ld);
149
150 mp4ASC->objectTypeIndex = (uint8_t)faad_getbits(&ld, 5
151 DEBUGVAR(1,1,"parse_audio_decoder_specific_info(): ObjectTypeIndex"));
152
153 mp4ASC->samplingFrequencyIndex = (uint8_t)faad_getbits(&ld, 4
154 DEBUGVAR(1,2,"parse_audio_decoder_specific_info(): SamplingFrequencyIndex"));
155
156 mp4ASC->channelsConfiguration = (uint8_t)faad_getbits(&ld, 4
157 DEBUGVAR(1,3,"parse_audio_decoder_specific_info(): ChannelsConfiguration"));
158
159 mp4ASC->samplingFrequency = get_sample_rate(mp4ASC->samplingFrequencyIndex);
160
161 if (ObjectTypesTable[mp4ASC->objectTypeIndex] != 1)
162 {
163 faad_endbits(&ld);
164 return -1;
165 }
166
167 if (mp4ASC->samplingFrequency == 0)
168 {
169 faad_endbits(&ld);
170 return -2;
171 }
172
173 if (mp4ASC->channelsConfiguration > 7)
174 {
175 faad_endbits(&ld);
176 return -3;
177 }
178
179#if (defined(PS_DEC) || defined(DRM_PS))
180 /* check if we have a mono file */
181 if (mp4ASC->channelsConfiguration == 1)
182 {
183 /* upMatrix to 2 channels for implicit signalling of PS */
184 mp4ASC->channelsConfiguration = 2;
185 }
186#endif
187
188#ifdef SBR_DEC
189 mp4ASC->sbr_present_flag = -1;
190 if (mp4ASC->objectTypeIndex == 5)
191 {
192 uint8_t tmp;
193
194 mp4ASC->sbr_present_flag = 1;
195 tmp = (uint8_t)faad_getbits(&ld, 4
196 DEBUGVAR(1,5,"parse_audio_decoder_specific_info(): extensionSamplingFrequencyIndex"));
197 /* check for downsampled SBR */
198 if (tmp == mp4ASC->samplingFrequencyIndex)
199 mp4ASC->downSampledSBR = 1;
200 mp4ASC->samplingFrequencyIndex = tmp;
201 if (mp4ASC->samplingFrequencyIndex == 15)
202 {
203 mp4ASC->samplingFrequency = (uint32_t)faad_getbits(&ld, 24
204 DEBUGVAR(1,6,"parse_audio_decoder_specific_info(): extensionSamplingFrequencyIndex"));
205 } else {
206 mp4ASC->samplingFrequency = get_sample_rate(mp4ASC->samplingFrequencyIndex);
207 }
208 mp4ASC->objectTypeIndex = (uint8_t)faad_getbits(&ld, 5
209 DEBUGVAR(1,7,"parse_audio_decoder_specific_info(): ObjectTypeIndex"));
210 }
211#endif
212
213 /* get GASpecificConfig */
214 if (mp4ASC->objectTypeIndex == 1 || mp4ASC->objectTypeIndex == 2 ||
215 mp4ASC->objectTypeIndex == 3 || mp4ASC->objectTypeIndex == 4 ||
216 mp4ASC->objectTypeIndex == 6 || mp4ASC->objectTypeIndex == 7)
217 {
218 result = GASpecificConfig(&ld, mp4ASC, pce);
219
220#ifdef ERROR_RESILIENCE
221 } else if (mp4ASC->objectTypeIndex >= ER_OBJECT_START) { /* ER */
222 result = GASpecificConfig(&ld, mp4ASC, pce);
223 mp4ASC->epConfig = (uint8_t)faad_getbits(&ld, 2
224 DEBUGVAR(1,143,"parse_audio_decoder_specific_info(): epConfig"));
225
226 if (mp4ASC->epConfig != 0)
227 result = -5;
228#endif
229
230 } else {
231 result = -4;
232 }
233
234#ifdef SSR_DEC
235 /* shorter frames not allowed for SSR */
236 if ((mp4ASC->objectTypeIndex == 4) && mp4ASC->frameLengthFlag)
237 return -6;
238#endif
239
240
241#ifdef SBR_DEC
242 bits_to_decode = (int8_t)(buffer_size*8 - faad_get_processed_bits(&ld));
243
244 if ((mp4ASC->objectTypeIndex != 5) && (bits_to_decode >= 16))
245 {
246 int16_t syncExtensionType = (int16_t)faad_getbits(&ld, 11
247 DEBUGVAR(1,9,"parse_audio_decoder_specific_info(): syncExtensionType"));
248
249 if (syncExtensionType == 0x2b7)
250 {
251 mp4ASC->objectTypeIndex = (uint8_t)faad_getbits(&ld, 5
252 DEBUGVAR(1,10,"parse_audio_decoder_specific_info(): extensionAudioObjectType"));
253
254 if (mp4ASC->objectTypeIndex == 5)
255 {
256 mp4ASC->sbr_present_flag = (uint8_t)faad_get1bit(&ld
257 DEBUGVAR(1,11,"parse_audio_decoder_specific_info(): sbr_present_flag"));
258
259 if (mp4ASC->sbr_present_flag)
260 {
261 uint8_t tmp;
262 tmp = (uint8_t)faad_getbits(&ld, 4
263 DEBUGVAR(1,12,"parse_audio_decoder_specific_info(): extensionSamplingFrequencyIndex"));
264
265 /* check for downsampled SBR */
266 if (tmp == mp4ASC->samplingFrequencyIndex)
267 mp4ASC->downSampledSBR = 1;
268 mp4ASC->samplingFrequencyIndex = tmp;
269
270 if (mp4ASC->samplingFrequencyIndex == 15)
271 {
272 mp4ASC->samplingFrequency = (uint32_t)faad_getbits(&ld, 24
273 DEBUGVAR(1,13,"parse_audio_decoder_specific_info(): extensionSamplingFrequencyIndex"));
274 } else {
275 mp4ASC->samplingFrequency = get_sample_rate(mp4ASC->samplingFrequencyIndex);
276 }
277 }
278 }
279 }
280 }
281
282 /* no SBR signalled, this could mean either implicit signalling or no SBR in this file */
283 /* MPEG specification states: assume SBR on files with samplerate <= 24000 Hz */
284 if (mp4ASC->sbr_present_flag == -1)
285 {
286 if (mp4ASC->samplingFrequency <= 24000)
287 {
288 mp4ASC->samplingFrequency *= 2;
289 mp4ASC->forceUpSampling = 1;
290 } else /* > 24000*/ {
291 mp4ASC->downSampledSBR = 1;
292 }
293 }
294#endif
295
296 faad_endbits(&ld);
297
298 return result;
299}
diff --git a/apps/codecs/libfaad/mp4.h b/apps/codecs/libfaad/mp4.h
new file mode 100644
index 0000000000..f647b67067
--- /dev/null
+++ b/apps/codecs/libfaad/mp4.h
@@ -0,0 +1,49 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __MP4_H__
29#define __MP4_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#include "decoder.h"
36
37int8_t NEAACDECAPI NeAACDecAudioSpecificConfig(uint8_t *pBuffer,
38 uint32_t buffer_size,
39 mp4AudioSpecificConfig *mp4ASC);
40
41int8_t AudioSpecificConfig2(uint8_t *pBuffer,
42 uint32_t buffer_size,
43 mp4AudioSpecificConfig *mp4ASC,
44 program_config *pce);
45
46#ifdef __cplusplus
47}
48#endif
49#endif
diff --git a/apps/codecs/libfaad/ms.c b/apps/codecs/libfaad/ms.c
new file mode 100644
index 0000000000..f01e5caa07
--- /dev/null
+++ b/apps/codecs/libfaad/ms.c
@@ -0,0 +1,74 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#include "common.h"
29#include "structs.h"
30
31#include "syntax.h"
32#include "ms.h"
33#include "is.h"
34#include "pns.h"
35
36void ms_decode(ic_stream *ics, ic_stream *icsr, real_t *l_spec, real_t *r_spec,
37 uint16_t frame_len)
38{
39 uint8_t g, b, sfb;
40 uint8_t group = 0;
41 uint16_t nshort = frame_len/8;
42
43 uint16_t i, k;
44 real_t tmp;
45
46 if (ics->ms_mask_present >= 1)
47 {
48 for (g = 0; g < ics->num_window_groups; g++)
49 {
50 for (b = 0; b < ics->window_group_length[g]; b++)
51 {
52 for (sfb = 0; sfb < ics->max_sfb; sfb++)
53 {
54 /* If intensity stereo coding or noise substitution is on
55 for a particular scalefactor band, no M/S stereo decoding
56 is carried out.
57 */
58 if ((ics->ms_used[g][sfb] || ics->ms_mask_present == 2) &&
59 !is_intensity(icsr, g, sfb) && !is_noise(ics, g, sfb))
60 {
61 for (i = ics->swb_offset[sfb]; i < ics->swb_offset[sfb+1]; i++)
62 {
63 k = (group*nshort) + i;
64 tmp = l_spec[k] - r_spec[k];
65 l_spec[k] = l_spec[k] + r_spec[k];
66 r_spec[k] = tmp;
67 }
68 }
69 }
70 group++;
71 }
72 }
73 }
74}
diff --git a/apps/codecs/libfaad/ms.h b/apps/codecs/libfaad/ms.h
new file mode 100644
index 0000000000..384fa4294b
--- /dev/null
+++ b/apps/codecs/libfaad/ms.h
@@ -0,0 +1,41 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __MS_H__
29#define __MS_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35void ms_decode(ic_stream *ics, ic_stream *icsr, real_t *l_spec, real_t *r_spec,
36 uint16_t frame_len);
37
38#ifdef __cplusplus
39}
40#endif
41#endif
diff --git a/apps/codecs/libfaad/output.c b/apps/codecs/libfaad/output.c
new file mode 100644
index 0000000000..6594582bbd
--- /dev/null
+++ b/apps/codecs/libfaad/output.c
@@ -0,0 +1,557 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#include "common.h"
29#include "structs.h"
30
31#include "output.h"
32#include "decoder.h"
33
34#ifndef FIXED_POINT
35
36
37#define FLOAT_SCALE (1.0f/(1<<15))
38
39#define DM_MUL REAL_CONST(0.3203772410170407) // 1/(1+sqrt(2) + 1/sqrt(2))
40#define RSQRT2 REAL_CONST(0.7071067811865475244) // 1/sqrt(2)
41
42
43static INLINE real_t get_sample(real_t **input, uint8_t channel, uint16_t sample,
44 uint8_t down_matrix, uint8_t *internal_channel)
45{
46 if (!down_matrix)
47 return input[internal_channel[channel]][sample];
48
49 if (channel == 0)
50 {
51 return DM_MUL * (input[internal_channel[1]][sample] +
52 input[internal_channel[0]][sample] * RSQRT2 +
53 input[internal_channel[3]][sample] * RSQRT2);
54 } else {
55 return DM_MUL * (input[internal_channel[2]][sample] +
56 input[internal_channel[0]][sample] * RSQRT2 +
57 input[internal_channel[4]][sample] * RSQRT2);
58 }
59}
60
61#ifndef HAS_LRINTF
62#define CLIP(sample, max, min) \
63if (sample >= 0.0f) \
64{ \
65 sample += 0.5f; \
66 if (sample >= max) \
67 sample = max; \
68} else { \
69 sample += -0.5f; \
70 if (sample <= min) \
71 sample = min; \
72}
73#else
74#define CLIP(sample, max, min) \
75if (sample >= 0.0f) \
76{ \
77 if (sample >= max) \
78 sample = max; \
79} else { \
80 if (sample <= min) \
81 sample = min; \
82}
83#endif
84
85#define CONV(a,b) ((a<<1)|(b&0x1))
86
87static void to_PCM_16bit(NeAACDecHandle hDecoder, real_t **input,
88 uint8_t channels, uint16_t frame_len,
89 int16_t **sample_buffer)
90{
91 uint8_t ch, ch1;
92 uint16_t i;
93
94 switch (CONV(channels,hDecoder->downMatrix))
95 {
96 case CONV(1,0):
97 case CONV(1,1):
98 for(i = 0; i < frame_len; i++)
99 {
100 real_t inp = input[hDecoder->internal_channel[0]][i];
101
102 CLIP(inp, 32767.0f, -32768.0f);
103
104 (*sample_buffer)[i] = (int16_t)lrintf(inp);
105 }
106 break;
107 case CONV(2,0):
108 if (hDecoder->upMatrix)
109 {
110 ch = hDecoder->internal_channel[0];
111 for(i = 0; i < frame_len; i++)
112 {
113 real_t inp0 = input[ch][i];
114
115 CLIP(inp0, 32767.0f, -32768.0f);
116
117 (*sample_buffer)[(i*2)+0] = (int16_t)lrintf(inp0);
118 (*sample_buffer)[(i*2)+1] = (int16_t)lrintf(inp0);
119 }
120 } else {
121 ch = hDecoder->internal_channel[0];
122 ch1 = hDecoder->internal_channel[1];
123 for(i = 0; i < frame_len; i++)
124 {
125 real_t inp0 = input[ch ][i];
126 real_t inp1 = input[ch1][i];
127
128 CLIP(inp0, 32767.0f, -32768.0f);
129 CLIP(inp1, 32767.0f, -32768.0f);
130
131 (*sample_buffer)[(i*2)+0] = (int16_t)lrintf(inp0);
132 (*sample_buffer)[(i*2)+1] = (int16_t)lrintf(inp1);
133 }
134 }
135 break;
136 default:
137 for (ch = 0; ch < channels; ch++)
138 {
139 for(i = 0; i < frame_len; i++)
140 {
141 real_t inp = get_sample(input, ch, i, hDecoder->downMatrix, hDecoder->internal_channel);
142
143 CLIP(inp, 32767.0f, -32768.0f);
144
145 (*sample_buffer)[(i*channels)+ch] = (int16_t)lrintf(inp);
146 }
147 }
148 break;
149 }
150}
151
152static void to_PCM_24bit(NeAACDecHandle hDecoder, real_t **input,
153 uint8_t channels, uint16_t frame_len,
154 int32_t **sample_buffer)
155{
156 uint8_t ch, ch1;
157 uint16_t i;
158
159 switch (CONV(channels,hDecoder->downMatrix))
160 {
161 case CONV(1,0):
162 case CONV(1,1):
163 for(i = 0; i < frame_len; i++)
164 {
165 real_t inp = input[hDecoder->internal_channel[0]][i];
166
167 inp *= 256.0f;
168 CLIP(inp, 8388607.0f, -8388608.0f);
169
170 (*sample_buffer)[i] = (int32_t)lrintf(inp);
171 }
172 break;
173 case CONV(2,0):
174 if (hDecoder->upMatrix)
175 {
176 ch = hDecoder->internal_channel[0];
177 for(i = 0; i < frame_len; i++)
178 {
179 real_t inp0 = input[ch][i];
180
181 inp0 *= 256.0f;
182 CLIP(inp0, 8388607.0f, -8388608.0f);
183
184 (*sample_buffer)[(i*2)+0] = (int32_t)lrintf(inp0);
185 (*sample_buffer)[(i*2)+1] = (int32_t)lrintf(inp0);
186 }
187 } else {
188 ch = hDecoder->internal_channel[0];
189 ch1 = hDecoder->internal_channel[1];
190 for(i = 0; i < frame_len; i++)
191 {
192 real_t inp0 = input[ch ][i];
193 real_t inp1 = input[ch1][i];
194
195 inp0 *= 256.0f;
196 inp1 *= 256.0f;
197 CLIP(inp0, 8388607.0f, -8388608.0f);
198 CLIP(inp1, 8388607.0f, -8388608.0f);
199
200 (*sample_buffer)[(i*2)+0] = (int32_t)lrintf(inp0);
201 (*sample_buffer)[(i*2)+1] = (int32_t)lrintf(inp1);
202 }
203 }
204 break;
205 default:
206 for (ch = 0; ch < channels; ch++)
207 {
208 for(i = 0; i < frame_len; i++)
209 {
210 real_t inp = get_sample(input, ch, i, hDecoder->downMatrix, hDecoder->internal_channel);
211
212 inp *= 256.0f;
213 CLIP(inp, 8388607.0f, -8388608.0f);
214
215 (*sample_buffer)[(i*channels)+ch] = (int32_t)lrintf(inp);
216 }
217 }
218 break;
219 }
220}
221
222static void to_PCM_32bit(NeAACDecHandle hDecoder, real_t **input,
223 uint8_t channels, uint16_t frame_len,
224 int32_t **sample_buffer)
225{
226 uint8_t ch, ch1;
227 uint16_t i;
228
229 switch (CONV(channels,hDecoder->downMatrix))
230 {
231 case CONV(1,0):
232 case CONV(1,1):
233 for(i = 0; i < frame_len; i++)
234 {
235 real_t inp = input[hDecoder->internal_channel[0]][i];
236
237 inp *= 65536.0f;
238 CLIP(inp, 2147483647.0f, -2147483648.0f);
239
240 (*sample_buffer)[i] = (int32_t)lrintf(inp);
241 }
242 break;
243 case CONV(2,0):
244 if (hDecoder->upMatrix)
245 {
246 ch = hDecoder->internal_channel[0];
247 for(i = 0; i < frame_len; i++)
248 {
249 real_t inp0 = input[ch][i];
250
251 inp0 *= 65536.0f;
252 CLIP(inp0, 2147483647.0f, -2147483648.0f);
253
254 (*sample_buffer)[(i*2)+0] = (int32_t)lrintf(inp0);
255 (*sample_buffer)[(i*2)+1] = (int32_t)lrintf(inp0);
256 }
257 } else {
258 ch = hDecoder->internal_channel[0];
259 ch1 = hDecoder->internal_channel[1];
260 for(i = 0; i < frame_len; i++)
261 {
262 real_t inp0 = input[ch ][i];
263 real_t inp1 = input[ch1][i];
264
265 inp0 *= 65536.0f;
266 inp1 *= 65536.0f;
267 CLIP(inp0, 2147483647.0f, -2147483648.0f);
268 CLIP(inp1, 2147483647.0f, -2147483648.0f);
269
270 (*sample_buffer)[(i*2)+0] = (int32_t)lrintf(inp0);
271 (*sample_buffer)[(i*2)+1] = (int32_t)lrintf(inp1);
272 }
273 }
274 break;
275 default:
276 for (ch = 0; ch < channels; ch++)
277 {
278 for(i = 0; i < frame_len; i++)
279 {
280 real_t inp = get_sample(input, ch, i, hDecoder->downMatrix, hDecoder->internal_channel);
281
282 inp *= 65536.0f;
283 CLIP(inp, 2147483647.0f, -2147483648.0f);
284
285 (*sample_buffer)[(i*channels)+ch] = (int32_t)lrintf(inp);
286 }
287 }
288 break;
289 }
290}
291
292static void to_PCM_float(NeAACDecHandle hDecoder, real_t **input,
293 uint8_t channels, uint16_t frame_len,
294 float32_t **sample_buffer)
295{
296 uint8_t ch, ch1;
297 uint16_t i;
298
299 switch (CONV(channels,hDecoder->downMatrix))
300 {
301 case CONV(1,0):
302 case CONV(1,1):
303 for(i = 0; i < frame_len; i++)
304 {
305 real_t inp = input[hDecoder->internal_channel[0]][i];
306 (*sample_buffer)[i] = inp*FLOAT_SCALE;
307 }
308 break;
309 case CONV(2,0):
310 if (hDecoder->upMatrix)
311 {
312 ch = hDecoder->internal_channel[0];
313 for(i = 0; i < frame_len; i++)
314 {
315 real_t inp0 = input[ch][i];
316 (*sample_buffer)[(i*2)+0] = inp0*FLOAT_SCALE;
317 (*sample_buffer)[(i*2)+1] = inp0*FLOAT_SCALE;
318 }
319 } else {
320 ch = hDecoder->internal_channel[0];
321 ch1 = hDecoder->internal_channel[1];
322 for(i = 0; i < frame_len; i++)
323 {
324 real_t inp0 = input[ch ][i];
325 real_t inp1 = input[ch1][i];
326 (*sample_buffer)[(i*2)+0] = inp0*FLOAT_SCALE;
327 (*sample_buffer)[(i*2)+1] = inp1*FLOAT_SCALE;
328 }
329 }
330 break;
331 default:
332 for (ch = 0; ch < channels; ch++)
333 {
334 for(i = 0; i < frame_len; i++)
335 {
336 real_t inp = get_sample(input, ch, i, hDecoder->downMatrix, hDecoder->internal_channel);
337 (*sample_buffer)[(i*channels)+ch] = inp*FLOAT_SCALE;
338 }
339 }
340 break;
341 }
342}
343
344static void to_PCM_double(NeAACDecHandle hDecoder, real_t **input,
345 uint8_t channels, uint16_t frame_len,
346 double **sample_buffer)
347{
348 uint8_t ch, ch1;
349 uint16_t i;
350
351 switch (CONV(channels,hDecoder->downMatrix))
352 {
353 case CONV(1,0):
354 case CONV(1,1):
355 for(i = 0; i < frame_len; i++)
356 {
357 real_t inp = input[hDecoder->internal_channel[0]][i];
358 (*sample_buffer)[i] = (double)inp*FLOAT_SCALE;
359 }
360 break;
361 case CONV(2,0):
362 if (hDecoder->upMatrix)
363 {
364 ch = hDecoder->internal_channel[0];
365 for(i = 0; i < frame_len; i++)
366 {
367 real_t inp0 = input[ch][i];
368 (*sample_buffer)[(i*2)+0] = (double)inp0*FLOAT_SCALE;
369 (*sample_buffer)[(i*2)+1] = (double)inp0*FLOAT_SCALE;
370 }
371 } else {
372 ch = hDecoder->internal_channel[0];
373 ch1 = hDecoder->internal_channel[1];
374 for(i = 0; i < frame_len; i++)
375 {
376 real_t inp0 = input[ch ][i];
377 real_t inp1 = input[ch1][i];
378 (*sample_buffer)[(i*2)+0] = (double)inp0*FLOAT_SCALE;
379 (*sample_buffer)[(i*2)+1] = (double)inp1*FLOAT_SCALE;
380 }
381 }
382 break;
383 default:
384 for (ch = 0; ch < channels; ch++)
385 {
386 for(i = 0; i < frame_len; i++)
387 {
388 real_t inp = get_sample(input, ch, i, hDecoder->downMatrix, hDecoder->internal_channel);
389 (*sample_buffer)[(i*channels)+ch] = (double)inp*FLOAT_SCALE;
390 }
391 }
392 break;
393 }
394}
395
396void *output_to_PCM(NeAACDecHandle hDecoder,
397 real_t **input, void *sample_buffer, uint8_t channels,
398 uint16_t frame_len, uint8_t format)
399{
400 int16_t *short_sample_buffer = (int16_t*)sample_buffer;
401 int32_t *int_sample_buffer = (int32_t*)sample_buffer;
402 float32_t *float_sample_buffer = (float32_t*)sample_buffer;
403 double *double_sample_buffer = (double*)sample_buffer;
404
405#ifdef PROFILE
406 int64_t count = faad_get_ts();
407#endif
408
409 /* Copy output to a standard PCM buffer */
410 switch (format)
411 {
412 case FAAD_FMT_16BIT:
413 to_PCM_16bit(hDecoder, input, channels, frame_len, &short_sample_buffer);
414 break;
415 case FAAD_FMT_24BIT:
416 to_PCM_24bit(hDecoder, input, channels, frame_len, &int_sample_buffer);
417 break;
418 case FAAD_FMT_32BIT:
419 to_PCM_32bit(hDecoder, input, channels, frame_len, &int_sample_buffer);
420 break;
421 case FAAD_FMT_FLOAT:
422 to_PCM_float(hDecoder, input, channels, frame_len, &float_sample_buffer);
423 break;
424 case FAAD_FMT_DOUBLE:
425 to_PCM_double(hDecoder, input, channels, frame_len, &double_sample_buffer);
426 break;
427 }
428
429#ifdef PROFILE
430 count = faad_get_ts() - count;
431 hDecoder->output_cycles += count;
432#endif
433
434 return sample_buffer;
435}
436
437#else
438
439#define DM_MUL FRAC_CONST(0.3203772410170407) // 1/(1+sqrt(2) + 1/sqrt(2))
440#define RSQRT2 FRAC_CONST(0.7071067811865475244) // 1/sqrt(2)
441
442static INLINE real_t get_sample(real_t **input, uint8_t channel, uint16_t sample,
443 uint8_t down_matrix, uint8_t up_matrix,
444 uint8_t *internal_channel)
445{
446 if (up_matrix == 1)
447 return input[internal_channel[0]][sample];
448
449 if (!down_matrix)
450 return input[internal_channel[channel]][sample];
451
452 if (channel == 0)
453 {
454 real_t C = MUL_F(input[internal_channel[0]][sample], RSQRT2);
455 real_t L_S = MUL_F(input[internal_channel[3]][sample], RSQRT2);
456 real_t cum = input[internal_channel[1]][sample] + C + L_S;
457 return MUL_F(cum, DM_MUL);
458 } else {
459 real_t C = MUL_F(input[internal_channel[0]][sample], RSQRT2);
460 real_t R_S = MUL_F(input[internal_channel[4]][sample], RSQRT2);
461 real_t cum = input[internal_channel[2]][sample] + C + R_S;
462 return MUL_F(cum, DM_MUL);
463 }
464}
465
466void* output_to_PCM(NeAACDecHandle hDecoder,
467 real_t **input, void *sample_buffer, uint8_t channels,
468 uint16_t frame_len, uint8_t format)
469{
470 uint8_t ch;
471 uint16_t i;
472 int16_t *short_sample_buffer = (int16_t*)sample_buffer;
473 int32_t *int_sample_buffer = (int32_t*)sample_buffer;
474
475 /* Copy output to a standard PCM buffer */
476 for (ch = 0; ch < channels; ch++)
477 {
478 switch (format)
479 {
480 case FAAD_FMT_16BIT:
481 for(i = 0; i < frame_len; i++)
482 {
483 int32_t tmp = get_sample(input, ch, i, hDecoder->downMatrix, hDecoder->upMatrix,
484 hDecoder->internal_channel);
485 if (tmp >= 0)
486 {
487 tmp += (1 << (REAL_BITS-1));
488 if (tmp >= REAL_CONST(32767))
489 {
490 tmp = REAL_CONST(32767);
491 }
492 } else {
493 tmp += -(1 << (REAL_BITS-1));
494 if (tmp <= REAL_CONST(-32768))
495 {
496 tmp = REAL_CONST(-32768);
497 }
498 }
499 tmp >>= REAL_BITS;
500 short_sample_buffer[(i*channels)+ch] = (int16_t)tmp;
501 }
502 break;
503 case FAAD_FMT_24BIT:
504 for(i = 0; i < frame_len; i++)
505 {
506 int32_t tmp = get_sample(input, ch, i, hDecoder->downMatrix, hDecoder->upMatrix,
507 hDecoder->internal_channel);
508 if (tmp >= 0)
509 {
510 tmp += (1 << (REAL_BITS-9));
511 tmp >>= (REAL_BITS-8);
512 if (tmp >= 8388607)
513 {
514 tmp = 8388607;
515 }
516 } else {
517 tmp += -(1 << (REAL_BITS-9));
518 tmp >>= (REAL_BITS-8);
519 if (tmp <= -8388608)
520 {
521 tmp = -8388608;
522 }
523 }
524 int_sample_buffer[(i*channels)+ch] = (int32_t)tmp;
525 }
526 break;
527 case FAAD_FMT_32BIT:
528 for(i = 0; i < frame_len; i++)
529 {
530 int32_t tmp = get_sample(input, ch, i, hDecoder->downMatrix, hDecoder->upMatrix,
531 hDecoder->internal_channel);
532 if (tmp >= 0)
533 {
534 tmp += (1 << (16-REAL_BITS-1));
535 tmp <<= (16-REAL_BITS);
536 } else {
537 tmp += -(1 << (16-REAL_BITS-1));
538 tmp <<= (16-REAL_BITS);
539 }
540 int_sample_buffer[(i*channels)+ch] = (int32_t)tmp;
541 }
542 break;
543 case FAAD_FMT_FIXED:
544 for(i = 0; i < frame_len; i++)
545 {
546 real_t tmp = get_sample(input, ch, i, hDecoder->downMatrix, hDecoder->upMatrix,
547 hDecoder->internal_channel);
548 int_sample_buffer[(i*channels)+ch] = (int32_t)tmp;
549 }
550 break;
551 }
552 }
553
554 return sample_buffer;
555}
556
557#endif
diff --git a/apps/codecs/libfaad/output.h b/apps/codecs/libfaad/output.h
new file mode 100644
index 0000000000..9fe8356541
--- /dev/null
+++ b/apps/codecs/libfaad/output.h
@@ -0,0 +1,45 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __OUTPUT_H__
29#define __OUTPUT_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35void* output_to_PCM(NeAACDecHandle hDecoder,
36 real_t **input,
37 void *samplebuffer,
38 uint8_t channels,
39 uint16_t frame_len,
40 uint8_t format);
41
42#ifdef __cplusplus
43}
44#endif
45#endif
diff --git a/apps/codecs/libfaad/pns.c b/apps/codecs/libfaad/pns.c
new file mode 100644
index 0000000000..7727b22160
--- /dev/null
+++ b/apps/codecs/libfaad/pns.c
@@ -0,0 +1,265 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#include "common.h"
29#include "structs.h"
30
31#include "pns.h"
32
33
34/* static function declarations */
35static void gen_rand_vector(real_t *spec, int16_t scale_factor, uint16_t size,
36 uint8_t sub);
37
38
39#ifdef FIXED_POINT
40
41#define DIV(A, B) (((int64_t)A << REAL_BITS)/B)
42
43#define step(shift) \
44 if ((0x40000000l >> shift) + root <= value) \
45 { \
46 value -= (0x40000000l >> shift) + root; \
47 root = (root >> 1) | (0x40000000l >> shift); \
48 } else { \
49 root = root >> 1; \
50 }
51
52/* fixed point square root approximation */
53/* !!!! ONLY WORKS FOR EVEN %REAL_BITS% !!!! */
54real_t fp_sqrt(real_t value)
55{
56 real_t root = 0;
57
58 step( 0); step( 2); step( 4); step( 6);
59 step( 8); step(10); step(12); step(14);
60 step(16); step(18); step(20); step(22);
61 step(24); step(26); step(28); step(30);
62
63 if (root < value)
64 ++root;
65
66 root <<= (REAL_BITS/2);
67
68 return root;
69}
70
71static real_t pow2_table[] =
72{
73 COEF_CONST(1.0),
74 COEF_CONST(1.18920711500272),
75 COEF_CONST(1.41421356237310),
76 COEF_CONST(1.68179283050743)
77};
78#endif
79
80/* The function gen_rand_vector(addr, size) generates a vector of length
81 <size> with signed random values of average energy MEAN_NRG per random
82 value. A suitable random number generator can be realized using one
83 multiplication/accumulation per random value.
84*/
85static INLINE void gen_rand_vector(real_t *spec, int16_t scale_factor, uint16_t size,
86 uint8_t sub)
87{
88#ifndef FIXED_POINT
89 uint16_t i;
90 real_t energy = 0.0;
91
92 real_t scale = (real_t)1.0/(real_t)size;
93
94 for (i = 0; i < size; i++)
95 {
96 real_t tmp = scale*(real_t)(int32_t)random_int();
97 spec[i] = tmp;
98 energy += tmp*tmp;
99 }
100
101 scale = (real_t)1.0/(real_t)sqrt(energy);
102 scale *= (real_t)pow(2.0, 0.25 * scale_factor);
103 for (i = 0; i < size; i++)
104 {
105 spec[i] *= scale;
106 }
107#else
108 uint16_t i;
109 real_t energy = 0, scale;
110 int32_t exp, frac;
111
112 for (i = 0; i < size; i++)
113 {
114 /* this can be replaced by a 16 bit random generator!!!! */
115 real_t tmp = (int32_t)random_int();
116 if (tmp < 0)
117 tmp = -(tmp & ((1<<(REAL_BITS-1))-1));
118 else
119 tmp = (tmp & ((1<<(REAL_BITS-1))-1));
120
121 energy += MUL_R(tmp,tmp);
122
123 spec[i] = tmp;
124 }
125
126 energy = fp_sqrt(energy);
127 if (energy > 0)
128 {
129 scale = DIV(REAL_CONST(1),energy);
130
131 exp = scale_factor >> 2;
132 frac = scale_factor & 3;
133
134 /* IMDCT pre-scaling */
135 exp -= sub;
136
137 if (exp < 0)
138 scale >>= -exp;
139 else
140 scale <<= exp;
141
142 if (frac)
143 scale = MUL_C(scale, pow2_table[frac]);
144
145 for (i = 0; i < size; i++)
146 {
147 spec[i] = MUL_R(spec[i], scale);
148 }
149 }
150#endif
151}
152
153void pns_decode(ic_stream *ics_left, ic_stream *ics_right,
154 real_t *spec_left, real_t *spec_right, uint16_t frame_len,
155 uint8_t channel_pair, uint8_t object_type)
156{
157 uint8_t g, sfb, b;
158 uint16_t size, offs;
159
160 uint8_t group = 0;
161 uint16_t nshort = frame_len >> 3;
162
163 uint8_t sub = 0;
164
165#ifdef FIXED_POINT
166 /* IMDCT scaling */
167 if (object_type == LD)
168 {
169 sub = 9 /*9*/;
170 } else {
171 if (ics_left->window_sequence == EIGHT_SHORT_SEQUENCE)
172 sub = 7 /*7*/;
173 else
174 sub = 10 /*10*/;
175 }
176#endif
177
178 for (g = 0; g < ics_left->num_window_groups; g++)
179 {
180 /* Do perceptual noise substitution decoding */
181 for (b = 0; b < ics_left->window_group_length[g]; b++)
182 {
183 for (sfb = 0; sfb < ics_left->max_sfb; sfb++)
184 {
185 if (is_noise(ics_left, g, sfb))
186 {
187#ifdef LTP_DEC
188 /* Simultaneous use of LTP and PNS is not prevented in the
189 syntax. If both LTP, and PNS are enabled on the same
190 scalefactor band, PNS takes precedence, and no prediction
191 is applied to this band.
192 */
193 ics_left->ltp.long_used[sfb] = 0;
194 ics_left->ltp2.long_used[sfb] = 0;
195#endif
196
197#ifdef MAIN_DEC
198 /* For scalefactor bands coded using PNS the corresponding
199 predictors are switched to "off".
200 */
201 ics_left->pred.prediction_used[sfb] = 0;
202#endif
203
204 offs = ics_left->swb_offset[sfb];
205 size = ics_left->swb_offset[sfb+1] - offs;
206
207 /* Generate random vector */
208 gen_rand_vector(&spec_left[(group*nshort)+offs],
209 ics_left->scale_factors[g][sfb], size, sub);
210 }
211
212/* From the spec:
213 If the same scalefactor band and group is coded by perceptual noise
214 substitution in both channels of a channel pair, the correlation of
215 the noise signal can be controlled by means of the ms_used field: While
216 the default noise generation process works independently for each channel
217 (separate generation of random vectors), the same random vector is used
218 for both channels if ms_used[] is set for a particular scalefactor band
219 and group. In this case, no M/S stereo coding is carried out (because M/S
220 stereo coding and noise substitution coding are mutually exclusive).
221 If the same scalefactor band and group is coded by perceptual noise
222 substitution in only one channel of a channel pair the setting of ms_used[]
223 is not evaluated.
224*/
225 if (channel_pair)
226 {
227 if (is_noise(ics_right, g, sfb))
228 {
229 if (((ics_left->ms_mask_present == 1) &&
230 (ics_left->ms_used[g][sfb])) ||
231 (ics_left->ms_mask_present == 2))
232 {
233 uint16_t c;
234
235 offs = ics_right->swb_offset[sfb];
236 size = ics_right->swb_offset[sfb+1] - offs;
237
238 for (c = 0; c < size; c++)
239 {
240 spec_right[(group*nshort) + offs + c] =
241 spec_left[(group*nshort) + offs + c];
242 }
243 } else /*if (ics_left->ms_mask_present == 0)*/ {
244#ifdef LTP_DEC
245 ics_right->ltp.long_used[sfb] = 0;
246 ics_right->ltp2.long_used[sfb] = 0;
247#endif
248#ifdef MAIN_DEC
249 ics_right->pred.prediction_used[sfb] = 0;
250#endif
251
252 offs = ics_right->swb_offset[sfb];
253 size = ics_right->swb_offset[sfb+1] - offs;
254
255 /* Generate random vector */
256 gen_rand_vector(&spec_right[(group*nshort)+offs],
257 ics_right->scale_factors[g][sfb], size, sub);
258 }
259 }
260 }
261 } /* sfb */
262 group++;
263 } /* b */
264 } /* g */
265}
diff --git a/apps/codecs/libfaad/pns.h b/apps/codecs/libfaad/pns.h
new file mode 100644
index 0000000000..e789f5708a
--- /dev/null
+++ b/apps/codecs/libfaad/pns.h
@@ -0,0 +1,53 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __PNS_H__
29#define __PNS_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#include "syntax.h"
36
37#define NOISE_OFFSET 90
38
39void pns_decode(ic_stream *ics_left, ic_stream *ics_right,
40 real_t *spec_left, real_t *spec_right, uint16_t frame_len,
41 uint8_t channel_pair, uint8_t object_type);
42
43static INLINE uint8_t is_noise(ic_stream *ics, uint8_t group, uint8_t sfb)
44{
45 if (ics->sfb_cb[group][sfb] == NOISE_HCB)
46 return 1;
47 return 0;
48}
49
50#ifdef __cplusplus
51}
52#endif
53#endif
diff --git a/apps/codecs/libfaad/ps_dec.c b/apps/codecs/libfaad/ps_dec.c
new file mode 100644
index 0000000000..cfc5629cbe
--- /dev/null
+++ b/apps/codecs/libfaad/ps_dec.c
@@ -0,0 +1,1985 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR and PS decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#include "common.h"
29
30#ifdef PS_DEC
31
32#include <stdlib.h>
33#include "ps_dec.h"
34#include "ps_tables.h"
35
36/* constants */
37#define NEGATE_IPD_MASK (0x1000)
38#define DECAY_SLOPE FRAC_CONST(0.05)
39#define COEF_SQRT2 COEF_CONST(1.4142135623731)
40
41/* tables */
42/* filters are mirrored in coef 6, second half left out */
43static const real_t p8_13_20[7] =
44{
45 FRAC_CONST(0.00746082949812),
46 FRAC_CONST(0.02270420949825),
47 FRAC_CONST(0.04546865930473),
48 FRAC_CONST(0.07266113929591),
49 FRAC_CONST(0.09885108575264),
50 FRAC_CONST(0.11793710567217),
51 FRAC_CONST(0.125)
52};
53
54static const real_t p2_13_20[7] =
55{
56 FRAC_CONST(0.0),
57 FRAC_CONST(0.01899487526049),
58 FRAC_CONST(0.0),
59 FRAC_CONST(-0.07293139167538),
60 FRAC_CONST(0.0),
61 FRAC_CONST(0.30596630545168),
62 FRAC_CONST(0.5)
63};
64
65static const real_t p12_13_34[7] =
66{
67 FRAC_CONST(0.04081179924692),
68 FRAC_CONST(0.03812810994926),
69 FRAC_CONST(0.05144908135699),
70 FRAC_CONST(0.06399831151592),
71 FRAC_CONST(0.07428313801106),
72 FRAC_CONST(0.08100347892914),
73 FRAC_CONST(0.08333333333333)
74};
75
76static const real_t p8_13_34[7] =
77{
78 FRAC_CONST(0.01565675600122),
79 FRAC_CONST(0.03752716391991),
80 FRAC_CONST(0.05417891378782),
81 FRAC_CONST(0.08417044116767),
82 FRAC_CONST(0.10307344158036),
83 FRAC_CONST(0.12222452249753),
84 FRAC_CONST(0.125)
85};
86
87static const real_t p4_13_34[7] =
88{
89 FRAC_CONST(-0.05908211155639),
90 FRAC_CONST(-0.04871498374946),
91 FRAC_CONST(0.0),
92 FRAC_CONST(0.07778723915851),
93 FRAC_CONST(0.16486303567403),
94 FRAC_CONST(0.23279856662996),
95 FRAC_CONST(0.25)
96};
97
98#ifdef PARAM_32KHZ
99static const uint8_t delay_length_d[2][NO_ALLPASS_LINKS] = {
100 { 1, 2, 3 } /* d_24kHz */,
101 { 3, 4, 5 } /* d_48kHz */
102};
103#else
104static const uint8_t delay_length_d[NO_ALLPASS_LINKS] = {
105 3, 4, 5 /* d_48kHz */
106};
107#endif
108static const real_t filter_a[NO_ALLPASS_LINKS] = { /* a(m) = exp(-d_48kHz(m)/7) */
109 FRAC_CONST(0.65143905753106),
110 FRAC_CONST(0.56471812200776),
111 FRAC_CONST(0.48954165955695)
112};
113
114static const uint8_t group_border20[10+12 + 1] =
115{
116 6, 7, 0, 1, 2, 3, /* 6 subqmf subbands */
117 9, 8, /* 2 subqmf subbands */
118 10, 11, /* 2 subqmf subbands */
119 3, 4, 5, 6, 7, 8, 9, 11, 14, 18, 23, 35, 64
120};
121
122static const uint8_t group_border34[32+18 + 1] =
123{
124 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, /* 12 subqmf subbands */
125 12, 13, 14, 15, 16, 17, 18, 19, /* 8 subqmf subbands */
126 20, 21, 22, 23, /* 4 subqmf subbands */
127 24, 25, 26, 27, /* 4 subqmf subbands */
128 28, 29, 30, 31, /* 4 subqmf subbands */
129 32-27, 33-27, 34-27, 35-27, 36-27, 37-27, 38-27, 40-27, 42-27, 44-27, 46-27, 48-27, 51-27, 54-27, 57-27, 60-27, 64-27, 68-27, 91-27
130};
131
132static const uint16_t map_group2bk20[10+12] =
133{
134 (NEGATE_IPD_MASK | 1), (NEGATE_IPD_MASK | 0),
135 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19
136};
137
138static const uint16_t map_group2bk34[32+18] =
139{
140 0, 1, 2, 3, 4, 5, 6, 6, 7, (NEGATE_IPD_MASK | 2), (NEGATE_IPD_MASK | 1), (NEGATE_IPD_MASK | 0),
141 10, 10, 4, 5, 6, 7, 8, 9,
142 10, 11, 12, 9,
143 14, 11, 12, 13,
144 14, 15, 16, 13,
145 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33
146};
147
148/* type definitions */
149typedef struct
150{
151 uint8_t frame_len;
152 uint8_t resolution20[3];
153 uint8_t resolution34[5];
154
155 qmf_t *work;
156 qmf_t **buffer;
157 qmf_t **temp;
158} hyb_info;
159
160/* static function declarations */
161static void ps_data_decode(ps_info *ps);
162static hyb_info *hybrid_init();
163static void channel_filter2(hyb_info *hyb, uint8_t frame_len, const real_t *filter,
164 qmf_t *buffer, qmf_t **X_hybrid);
165static void INLINE DCT3_4_unscaled(real_t *y, real_t *x);
166static void channel_filter8(hyb_info *hyb, uint8_t frame_len, const real_t *filter,
167 qmf_t *buffer, qmf_t **X_hybrid);
168static void hybrid_analysis(hyb_info *hyb, qmf_t X[32][64], qmf_t X_hybrid[32][32],
169 uint8_t use34);
170static void hybrid_synthesis(hyb_info *hyb, qmf_t X[32][64], qmf_t X_hybrid[32][32],
171 uint8_t use34);
172static int8_t delta_clip(int8_t i, int8_t min, int8_t max);
173static void delta_decode(uint8_t enable, int8_t *index, int8_t *index_prev,
174 uint8_t dt_flag, uint8_t nr_par, uint8_t stride,
175 int8_t min_index, int8_t max_index);
176static void delta_modulo_decode(uint8_t enable, int8_t *index, int8_t *index_prev,
177 uint8_t dt_flag, uint8_t nr_par, uint8_t stride,
178 int8_t log2modulo);
179static void map20indexto34(int8_t *index, uint8_t bins);
180#ifdef PS_LOW_POWER
181static void map34indexto20(int8_t *index, uint8_t bins);
182#endif
183static void ps_data_decode(ps_info *ps);
184static void ps_decorrelate(ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64],
185 qmf_t X_hybrid_left[32][32], qmf_t X_hybrid_right[32][32]);
186static void ps_mix_phase(ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64],
187 qmf_t X_hybrid_left[32][32], qmf_t X_hybrid_right[32][32]);
188
189/* */
190
191
192static hyb_info *hybrid_init()
193{
194 uint8_t i;
195
196 hyb_info *hyb = (hyb_info*)faad_malloc(sizeof(hyb_info));
197
198 hyb->resolution34[0] = 12;
199 hyb->resolution34[1] = 8;
200 hyb->resolution34[2] = 4;
201 hyb->resolution34[3] = 4;
202 hyb->resolution34[4] = 4;
203
204 hyb->resolution20[0] = 8;
205 hyb->resolution20[1] = 2;
206 hyb->resolution20[2] = 2;
207
208 hyb->frame_len = 32;
209
210 hyb->work = (qmf_t*)faad_malloc((hyb->frame_len+12) * sizeof(qmf_t));
211 memset(hyb->work, 0, (hyb->frame_len+12) * sizeof(qmf_t));
212
213 hyb->buffer = (qmf_t**)faad_malloc(5 * sizeof(qmf_t*));
214 for (i = 0; i < 5; i++)
215 {
216 hyb->buffer[i] = (qmf_t*)faad_malloc(hyb->frame_len * sizeof(qmf_t));
217 memset(hyb->buffer[i], 0, hyb->frame_len * sizeof(qmf_t));
218 }
219
220 hyb->temp = (qmf_t**)faad_malloc(hyb->frame_len * sizeof(qmf_t*));
221 for (i = 0; i < hyb->frame_len; i++)
222 {
223 hyb->temp[i] = (qmf_t*)faad_malloc(12 /*max*/ * sizeof(qmf_t));
224 }
225
226 return hyb;
227}
228
229static void hybrid_free(hyb_info *hyb)
230{
231 uint8_t i;
232
233 if (hyb->work)
234 faad_free(hyb->work);
235
236 for (i = 0; i < 5; i++)
237 {
238 if (hyb->buffer[i])
239 faad_free(hyb->buffer[i]);
240 }
241 if (hyb->buffer)
242 faad_free(hyb->buffer);
243
244 for (i = 0; i < hyb->frame_len; i++)
245 {
246 if (hyb->temp[i])
247 faad_free(hyb->temp[i]);
248 }
249 if (hyb->temp)
250 faad_free(hyb->temp);
251}
252
253/* real filter, size 2 */
254static void channel_filter2(hyb_info *hyb, uint8_t frame_len, const real_t *filter,
255 qmf_t *buffer, qmf_t **X_hybrid)
256{
257 uint8_t i;
258
259 for (i = 0; i < frame_len; i++)
260 {
261 real_t r0 = MUL_F(filter[0],(QMF_RE(buffer[0+i]) + QMF_RE(buffer[12+i])));
262 real_t r1 = MUL_F(filter[1],(QMF_RE(buffer[1+i]) + QMF_RE(buffer[11+i])));
263 real_t r2 = MUL_F(filter[2],(QMF_RE(buffer[2+i]) + QMF_RE(buffer[10+i])));
264 real_t r3 = MUL_F(filter[3],(QMF_RE(buffer[3+i]) + QMF_RE(buffer[9+i])));
265 real_t r4 = MUL_F(filter[4],(QMF_RE(buffer[4+i]) + QMF_RE(buffer[8+i])));
266 real_t r5 = MUL_F(filter[5],(QMF_RE(buffer[5+i]) + QMF_RE(buffer[7+i])));
267 real_t r6 = MUL_F(filter[6],QMF_RE(buffer[6+i]));
268 real_t i0 = MUL_F(filter[0],(QMF_IM(buffer[0+i]) + QMF_IM(buffer[12+i])));
269 real_t i1 = MUL_F(filter[1],(QMF_IM(buffer[1+i]) + QMF_IM(buffer[11+i])));
270 real_t i2 = MUL_F(filter[2],(QMF_IM(buffer[2+i]) + QMF_IM(buffer[10+i])));
271 real_t i3 = MUL_F(filter[3],(QMF_IM(buffer[3+i]) + QMF_IM(buffer[9+i])));
272 real_t i4 = MUL_F(filter[4],(QMF_IM(buffer[4+i]) + QMF_IM(buffer[8+i])));
273 real_t i5 = MUL_F(filter[5],(QMF_IM(buffer[5+i]) + QMF_IM(buffer[7+i])));
274 real_t i6 = MUL_F(filter[6],QMF_IM(buffer[6+i]));
275
276 /* q = 0 */
277 QMF_RE(X_hybrid[i][0]) = r0 + r1 + r2 + r3 + r4 + r5 + r6;
278 QMF_IM(X_hybrid[i][0]) = i0 + i1 + i2 + i3 + i4 + i5 + i6;
279
280 /* q = 1 */
281 QMF_RE(X_hybrid[i][1]) = r0 - r1 + r2 - r3 + r4 - r5 + r6;
282 QMF_IM(X_hybrid[i][1]) = i0 - i1 + i2 - i3 + i4 - i5 + i6;
283 }
284}
285
286/* complex filter, size 4 */
287static void channel_filter4(hyb_info *hyb, uint8_t frame_len, const real_t *filter,
288 qmf_t *buffer, qmf_t **X_hybrid)
289{
290 uint8_t i;
291 real_t input_re1[2], input_re2[2], input_im1[2], input_im2[2];
292
293 for (i = 0; i < frame_len; i++)
294 {
295 input_re1[0] = -MUL_F(filter[2], (QMF_RE(buffer[i+2]) + QMF_RE(buffer[i+10]))) +
296 MUL_F(filter[6], QMF_RE(buffer[i+6]));
297 input_re1[1] = MUL_F(FRAC_CONST(-0.70710678118655),
298 (MUL_F(filter[1], (QMF_RE(buffer[i+1]) + QMF_RE(buffer[i+11]))) +
299 MUL_F(filter[3], (QMF_RE(buffer[i+3]) + QMF_RE(buffer[i+9]))) -
300 MUL_F(filter[5], (QMF_RE(buffer[i+5]) + QMF_RE(buffer[i+7])))));
301
302 input_im1[0] = MUL_F(filter[0], (QMF_IM(buffer[i+0]) - QMF_IM(buffer[i+12]))) -
303 MUL_F(filter[4], (QMF_IM(buffer[i+4]) - QMF_IM(buffer[i+8])));
304 input_im1[1] = MUL_F(FRAC_CONST(0.70710678118655),
305 (MUL_F(filter[1], (QMF_IM(buffer[i+1]) - QMF_IM(buffer[i+11]))) -
306 MUL_F(filter[3], (QMF_IM(buffer[i+3]) - QMF_IM(buffer[i+9]))) -
307 MUL_F(filter[5], (QMF_IM(buffer[i+5]) - QMF_IM(buffer[i+7])))));
308
309 input_re2[0] = MUL_F(filter[0], (QMF_RE(buffer[i+0]) - QMF_RE(buffer[i+12]))) -
310 MUL_F(filter[4], (QMF_RE(buffer[i+4]) - QMF_RE(buffer[i+8])));
311 input_re2[1] = MUL_F(FRAC_CONST(0.70710678118655),
312 (MUL_F(filter[1], (QMF_RE(buffer[i+1]) - QMF_RE(buffer[i+11]))) -
313 MUL_F(filter[3], (QMF_RE(buffer[i+3]) - QMF_RE(buffer[i+9]))) -
314 MUL_F(filter[5], (QMF_RE(buffer[i+5]) - QMF_RE(buffer[i+7])))));
315
316 input_im2[0] = -MUL_F(filter[2], (QMF_IM(buffer[i+2]) + QMF_IM(buffer[i+10]))) +
317 MUL_F(filter[6], QMF_IM(buffer[i+6]));
318 input_im2[1] = MUL_F(FRAC_CONST(-0.70710678118655),
319 (MUL_F(filter[1], (QMF_IM(buffer[i+1]) + QMF_IM(buffer[i+11]))) +
320 MUL_F(filter[3], (QMF_IM(buffer[i+3]) + QMF_IM(buffer[i+9]))) -
321 MUL_F(filter[5], (QMF_IM(buffer[i+5]) + QMF_IM(buffer[i+7])))));
322
323 /* q == 0 */
324 QMF_RE(X_hybrid[i][0]) = input_re1[0] + input_re1[1] + input_im1[0] + input_im1[1];
325 QMF_IM(X_hybrid[i][0]) = -input_re2[0] - input_re2[1] + input_im2[0] + input_im2[1];
326
327 /* q == 1 */
328 QMF_RE(X_hybrid[i][1]) = input_re1[0] - input_re1[1] - input_im1[0] + input_im1[1];
329 QMF_IM(X_hybrid[i][1]) = input_re2[0] - input_re2[1] + input_im2[0] - input_im2[1];
330
331 /* q == 2 */
332 QMF_RE(X_hybrid[i][2]) = input_re1[0] - input_re1[1] + input_im1[0] - input_im1[1];
333 QMF_IM(X_hybrid[i][2]) = -input_re2[0] + input_re2[1] + input_im2[0] - input_im2[1];
334
335 /* q == 3 */
336 QMF_RE(X_hybrid[i][3]) = input_re1[0] + input_re1[1] - input_im1[0] - input_im1[1];
337 QMF_IM(X_hybrid[i][3]) = input_re2[0] + input_re2[1] + input_im2[0] + input_im2[1];
338 }
339}
340
341static void INLINE DCT3_4_unscaled(real_t *y, real_t *x)
342{
343 real_t f0, f1, f2, f3, f4, f5, f6, f7, f8;
344
345 f0 = MUL_F(x[2], FRAC_CONST(0.7071067811865476));
346 f1 = x[0] - f0;
347 f2 = x[0] + f0;
348 f3 = x[1] + x[3];
349 f4 = MUL_C(x[1], COEF_CONST(1.3065629648763766));
350 f5 = MUL_F(f3, FRAC_CONST(-0.9238795325112866));
351 f6 = MUL_F(x[3], FRAC_CONST(-0.5411961001461967));
352 f7 = f4 + f5;
353 f8 = f6 - f5;
354 y[3] = f2 - f8;
355 y[0] = f2 + f8;
356 y[2] = f1 - f7;
357 y[1] = f1 + f7;
358}
359
360/* complex filter, size 8 */
361static void channel_filter8(hyb_info *hyb, uint8_t frame_len, const real_t *filter,
362 qmf_t *buffer, qmf_t **X_hybrid)
363{
364 uint8_t i, n;
365 real_t input_re1[4], input_re2[4], input_im1[4], input_im2[4];
366 real_t x[4];
367
368 for (i = 0; i < frame_len; i++)
369 {
370 input_re1[0] = MUL_F(filter[6],QMF_RE(buffer[6+i]));
371 input_re1[1] = MUL_F(filter[5],(QMF_RE(buffer[5+i]) + QMF_RE(buffer[7+i])));
372 input_re1[2] = -MUL_F(filter[0],(QMF_RE(buffer[0+i]) + QMF_RE(buffer[12+i]))) + MUL_F(filter[4],(QMF_RE(buffer[4+i]) + QMF_RE(buffer[8+i])));
373 input_re1[3] = -MUL_F(filter[1],(QMF_RE(buffer[1+i]) + QMF_RE(buffer[11+i]))) + MUL_F(filter[3],(QMF_RE(buffer[3+i]) + QMF_RE(buffer[9+i])));
374
375 input_im1[0] = MUL_F(filter[5],(QMF_IM(buffer[7+i]) - QMF_IM(buffer[5+i])));
376 input_im1[1] = MUL_F(filter[0],(QMF_IM(buffer[12+i]) - QMF_IM(buffer[0+i]))) + MUL_F(filter[4],(QMF_IM(buffer[8+i]) - QMF_IM(buffer[4+i])));
377 input_im1[2] = MUL_F(filter[1],(QMF_IM(buffer[11+i]) - QMF_IM(buffer[1+i]))) + MUL_F(filter[3],(QMF_IM(buffer[9+i]) - QMF_IM(buffer[3+i])));
378 input_im1[3] = MUL_F(filter[2],(QMF_IM(buffer[10+i]) - QMF_IM(buffer[2+i])));
379
380 for (n = 0; n < 4; n++)
381 {
382 x[n] = input_re1[n] - input_im1[3-n];
383 }
384 DCT3_4_unscaled(x, x);
385 QMF_RE(X_hybrid[i][7]) = x[0];
386 QMF_RE(X_hybrid[i][5]) = x[2];
387 QMF_RE(X_hybrid[i][3]) = x[3];
388 QMF_RE(X_hybrid[i][1]) = x[1];
389
390 for (n = 0; n < 4; n++)
391 {
392 x[n] = input_re1[n] + input_im1[3-n];
393 }
394 DCT3_4_unscaled(x, x);
395 QMF_RE(X_hybrid[i][6]) = x[1];
396 QMF_RE(X_hybrid[i][4]) = x[3];
397 QMF_RE(X_hybrid[i][2]) = x[2];
398 QMF_RE(X_hybrid[i][0]) = x[0];
399
400 input_im2[0] = MUL_F(filter[6],QMF_IM(buffer[6+i]));
401 input_im2[1] = MUL_F(filter[5],(QMF_IM(buffer[5+i]) + QMF_IM(buffer[7+i])));
402 input_im2[2] = -MUL_F(filter[0],(QMF_IM(buffer[0+i]) + QMF_IM(buffer[12+i]))) + MUL_F(filter[4],(QMF_IM(buffer[4+i]) + QMF_IM(buffer[8+i])));
403 input_im2[3] = -MUL_F(filter[1],(QMF_IM(buffer[1+i]) + QMF_IM(buffer[11+i]))) + MUL_F(filter[3],(QMF_IM(buffer[3+i]) + QMF_IM(buffer[9+i])));
404
405 input_re2[0] = MUL_F(filter[5],(QMF_RE(buffer[7+i]) - QMF_RE(buffer[5+i])));
406 input_re2[1] = MUL_F(filter[0],(QMF_RE(buffer[12+i]) - QMF_RE(buffer[0+i]))) + MUL_F(filter[4],(QMF_RE(buffer[8+i]) - QMF_RE(buffer[4+i])));
407 input_re2[2] = MUL_F(filter[1],(QMF_RE(buffer[11+i]) - QMF_RE(buffer[1+i]))) + MUL_F(filter[3],(QMF_RE(buffer[9+i]) - QMF_RE(buffer[3+i])));
408 input_re2[3] = MUL_F(filter[2],(QMF_RE(buffer[10+i]) - QMF_RE(buffer[2+i])));
409
410 for (n = 0; n < 4; n++)
411 {
412 x[n] = input_im2[n] + input_re2[3-n];
413 }
414 DCT3_4_unscaled(x, x);
415 QMF_IM(X_hybrid[i][7]) = x[0];
416 QMF_IM(X_hybrid[i][5]) = x[2];
417 QMF_IM(X_hybrid[i][3]) = x[3];
418 QMF_IM(X_hybrid[i][1]) = x[1];
419
420 for (n = 0; n < 4; n++)
421 {
422 x[n] = input_im2[n] - input_re2[3-n];
423 }
424 DCT3_4_unscaled(x, x);
425 QMF_IM(X_hybrid[i][6]) = x[1];
426 QMF_IM(X_hybrid[i][4]) = x[3];
427 QMF_IM(X_hybrid[i][2]) = x[2];
428 QMF_IM(X_hybrid[i][0]) = x[0];
429 }
430}
431
432static void INLINE DCT3_6_unscaled(real_t *y, real_t *x)
433{
434 real_t f0, f1, f2, f3, f4, f5, f6, f7;
435
436 f0 = MUL_F(x[3], FRAC_CONST(0.70710678118655));
437 f1 = x[0] + f0;
438 f2 = x[0] - f0;
439 f3 = MUL_F((x[1] - x[5]), FRAC_CONST(0.70710678118655));
440 f4 = MUL_F(x[2], FRAC_CONST(0.86602540378444)) + MUL_F(x[4], FRAC_CONST(0.5));
441 f5 = f4 - x[4];
442 f6 = MUL_F(x[1], FRAC_CONST(0.96592582628907)) + MUL_F(x[5], FRAC_CONST(0.25881904510252));
443 f7 = f6 - f3;
444 y[0] = f1 + f6 + f4;
445 y[1] = f2 + f3 - x[4];
446 y[2] = f7 + f2 - f5;
447 y[3] = f1 - f7 - f5;
448 y[4] = f1 - f3 - x[4];
449 y[5] = f2 - f6 + f4;
450}
451
452/* complex filter, size 12 */
453static void channel_filter12(hyb_info *hyb, uint8_t frame_len, const real_t *filter,
454 qmf_t *buffer, qmf_t **X_hybrid)
455{
456 uint8_t i, n;
457 real_t input_re1[6], input_re2[6], input_im1[6], input_im2[6];
458 real_t out_re1[6], out_re2[6], out_im1[6], out_im2[6];
459
460 for (i = 0; i < frame_len; i++)
461 {
462 for (n = 0; n < 6; n++)
463 {
464 if (n == 0)
465 {
466 input_re1[0] = MUL_F(QMF_RE(buffer[6+i]), filter[6]);
467 input_re2[0] = MUL_F(QMF_IM(buffer[6+i]), filter[6]);
468 } else {
469 input_re1[6-n] = MUL_F((QMF_RE(buffer[n+i]) + QMF_RE(buffer[12-n+i])), filter[n]);
470 input_re2[6-n] = MUL_F((QMF_IM(buffer[n+i]) + QMF_IM(buffer[12-n+i])), filter[n]);
471 }
472 input_im2[n] = MUL_F((QMF_RE(buffer[n+i]) - QMF_RE(buffer[12-n+i])), filter[n]);
473 input_im1[n] = MUL_F((QMF_IM(buffer[n+i]) - QMF_IM(buffer[12-n+i])), filter[n]);
474 }
475
476 DCT3_6_unscaled(out_re1, input_re1);
477 DCT3_6_unscaled(out_re2, input_re2);
478
479 DCT3_6_unscaled(out_im1, input_im1);
480 DCT3_6_unscaled(out_im2, input_im2);
481
482 for (n = 0; n < 6; n += 2)
483 {
484 QMF_RE(X_hybrid[i][n]) = out_re1[n] - out_im1[n];
485 QMF_IM(X_hybrid[i][n]) = out_re2[n] + out_im2[n];
486 QMF_RE(X_hybrid[i][n+1]) = out_re1[n+1] + out_im1[n+1];
487 QMF_IM(X_hybrid[i][n+1]) = out_re2[n+1] - out_im2[n+1];
488
489 QMF_RE(X_hybrid[i][10-n]) = out_re1[n+1] - out_im1[n+1];
490 QMF_IM(X_hybrid[i][10-n]) = out_re2[n+1] + out_im2[n+1];
491 QMF_RE(X_hybrid[i][11-n]) = out_re1[n] + out_im1[n];
492 QMF_IM(X_hybrid[i][11-n]) = out_re2[n] - out_im2[n];
493 }
494 }
495}
496
497/* Hybrid analysis: further split up QMF subbands
498 * to improve frequency resolution
499 */
500static void hybrid_analysis(hyb_info *hyb, qmf_t X[32][64], qmf_t X_hybrid[32][32],
501 uint8_t use34)
502{
503 uint8_t k, n, band;
504 uint8_t offset = 0;
505 uint8_t qmf_bands = (use34) ? 5 : 3;
506 uint8_t *resolution = (use34) ? hyb->resolution34 : hyb->resolution20;
507
508 for (band = 0; band < qmf_bands; band++)
509 {
510 /* build working buffer */
511 memcpy(hyb->work, hyb->buffer[band], 12 * sizeof(qmf_t));
512
513 /* add new samples */
514 for (n = 0; n < hyb->frame_len; n++)
515 {
516 QMF_RE(hyb->work[12 + n]) = QMF_RE(X[n + 6 /*delay*/][band]);
517 QMF_IM(hyb->work[12 + n]) = QMF_IM(X[n + 6 /*delay*/][band]);
518 }
519
520 /* store samples */
521 memcpy(hyb->buffer[band], hyb->work + hyb->frame_len, 12 * sizeof(qmf_t));
522
523
524 switch(resolution[band])
525 {
526 case 2:
527 /* Type B real filter, Q[p] = 2 */
528 channel_filter2(hyb, hyb->frame_len, p2_13_20, hyb->work, hyb->temp);
529 break;
530 case 4:
531 /* Type A complex filter, Q[p] = 4 */
532 channel_filter4(hyb, hyb->frame_len, p4_13_34, hyb->work, hyb->temp);
533 break;
534 case 8:
535 /* Type A complex filter, Q[p] = 8 */
536 channel_filter8(hyb, hyb->frame_len, (use34) ? p8_13_34 : p8_13_20,
537 hyb->work, hyb->temp);
538 break;
539 case 12:
540 /* Type A complex filter, Q[p] = 12 */
541 channel_filter12(hyb, hyb->frame_len, p12_13_34, hyb->work, hyb->temp);
542 break;
543 }
544
545 for (n = 0; n < hyb->frame_len; n++)
546 {
547 for (k = 0; k < resolution[band]; k++)
548 {
549 QMF_RE(X_hybrid[n][offset + k]) = QMF_RE(hyb->temp[n][k]);
550 QMF_IM(X_hybrid[n][offset + k]) = QMF_IM(hyb->temp[n][k]);
551 }
552 }
553 offset += resolution[band];
554 }
555
556 /* group hybrid channels */
557 if (!use34)
558 {
559 for (n = 0; n < 32 /*30?*/; n++)
560 {
561 QMF_RE(X_hybrid[n][3]) += QMF_RE(X_hybrid[n][4]);
562 QMF_IM(X_hybrid[n][3]) += QMF_IM(X_hybrid[n][4]);
563 QMF_RE(X_hybrid[n][4]) = 0;
564 QMF_IM(X_hybrid[n][4]) = 0;
565
566 QMF_RE(X_hybrid[n][2]) += QMF_RE(X_hybrid[n][5]);
567 QMF_IM(X_hybrid[n][2]) += QMF_IM(X_hybrid[n][5]);
568 QMF_RE(X_hybrid[n][5]) = 0;
569 QMF_IM(X_hybrid[n][5]) = 0;
570 }
571 }
572}
573
574static void hybrid_synthesis(hyb_info *hyb, qmf_t X[32][64], qmf_t X_hybrid[32][32],
575 uint8_t use34)
576{
577 uint8_t k, n, band;
578 uint8_t offset = 0;
579 uint8_t qmf_bands = (use34) ? 5 : 3;
580 uint8_t *resolution = (use34) ? hyb->resolution34 : hyb->resolution20;
581
582 for(band = 0; band < qmf_bands; band++)
583 {
584 for (n = 0; n < hyb->frame_len; n++)
585 {
586 QMF_RE(X[n][band]) = 0;
587 QMF_IM(X[n][band]) = 0;
588
589 for (k = 0; k < resolution[band]; k++)
590 {
591 QMF_RE(X[n][band]) += QMF_RE(X_hybrid[n][offset + k]);
592 QMF_IM(X[n][band]) += QMF_IM(X_hybrid[n][offset + k]);
593 }
594 }
595 offset += resolution[band];
596 }
597}
598
599/* limits the value i to the range [min,max] */
600static int8_t delta_clip(int8_t i, int8_t min, int8_t max)
601{
602 if (i < min)
603 return min;
604 else if (i > max)
605 return max;
606 else
607 return i;
608}
609
610//int iid = 0;
611
612/* delta decode array */
613static void delta_decode(uint8_t enable, int8_t *index, int8_t *index_prev,
614 uint8_t dt_flag, uint8_t nr_par, uint8_t stride,
615 int8_t min_index, int8_t max_index)
616{
617 int8_t i;
618
619 if (enable == 1)
620 {
621 if (dt_flag == 0)
622 {
623 /* delta coded in frequency direction */
624 index[0] = 0 + index[0];
625 index[0] = delta_clip(index[0], min_index, max_index);
626
627 for (i = 1; i < nr_par; i++)
628 {
629 index[i] = index[i-1] + index[i];
630 index[i] = delta_clip(index[i], min_index, max_index);
631 }
632 } else {
633 /* delta coded in time direction */
634 for (i = 0; i < nr_par; i++)
635 {
636 //int8_t tmp2;
637 //int8_t tmp = index[i];
638
639 //printf("%d %d\n", index_prev[i*stride], index[i]);
640 //printf("%d\n", index[i]);
641
642 index[i] = index_prev[i*stride] + index[i];
643 //tmp2 = index[i];
644 index[i] = delta_clip(index[i], min_index, max_index);
645
646 //if (iid)
647 //{
648 // if (index[i] == 7)
649 // {
650 // printf("%d %d %d\n", index_prev[i*stride], tmp, tmp2);
651 // }
652 //}
653 }
654 }
655 } else {
656 /* set indices to zero */
657 for (i = 0; i < nr_par; i++)
658 {
659 index[i] = 0;
660 }
661 }
662
663 /* coarse */
664 if (stride == 2)
665 {
666 for (i = (nr_par<<1)-1; i > 0; i--)
667 {
668 index[i] = index[i>>1];
669 }
670 }
671}
672
673/* delta modulo decode array */
674/* in: log2 value of the modulo value to allow using AND instead of MOD */
675static void delta_modulo_decode(uint8_t enable, int8_t *index, int8_t *index_prev,
676 uint8_t dt_flag, uint8_t nr_par, uint8_t stride,
677 int8_t log2modulo)
678{
679 int8_t i;
680
681 if (enable == 1)
682 {
683 if (dt_flag == 0)
684 {
685 /* delta coded in frequency direction */
686 index[0] = 0 + index[0];
687 index[0] &= log2modulo;
688
689 for (i = 1; i < nr_par; i++)
690 {
691 index[i] = index[i-1] + index[i];
692 index[i] &= log2modulo;
693 }
694 } else {
695 /* delta coded in time direction */
696 for (i = 0; i < nr_par; i++)
697 {
698 index[i] = index_prev[i*stride] + index[i];
699 index[i] &= log2modulo;
700 }
701 }
702 } else {
703 /* set indices to zero */
704 for (i = 0; i < nr_par; i++)
705 {
706 index[i] = 0;
707 }
708 }
709
710 /* coarse */
711 if (stride == 2)
712 {
713 index[0] = 0;
714 for (i = (nr_par<<1)-1; i > 0; i--)
715 {
716 index[i] = index[i>>1];
717 }
718 }
719}
720
721#ifdef PS_LOW_POWER
722static void map34indexto20(int8_t *index, uint8_t bins)
723{
724 index[0] = (2*index[0]+index[1])/3;
725 index[1] = (index[1]+2*index[2])/3;
726 index[2] = (2*index[3]+index[4])/3;
727 index[3] = (index[4]+2*index[5])/3;
728 index[4] = (index[6]+index[7])/2;
729 index[5] = (index[8]+index[9])/2;
730 index[6] = index[10];
731 index[7] = index[11];
732 index[8] = (index[12]+index[13])/2;
733 index[9] = (index[14]+index[15])/2;
734 index[10] = index[16];
735
736 if (bins == 34)
737 {
738 index[11] = index[17];
739 index[12] = index[18];
740 index[13] = index[19];
741 index[14] = (index[20]+index[21])/2;
742 index[15] = (index[22]+index[23])/2;
743 index[16] = (index[24]+index[25])/2;
744 index[17] = (index[26]+index[27])/2;
745 index[18] = (index[28]+index[29]+index[30]+index[31])/4;
746 index[19] = (index[32]+index[33])/2;
747 }
748}
749#endif
750
751static void map20indexto34(int8_t *index, uint8_t bins)
752{
753 index[0] = index[0];
754 index[1] = (index[0] + index[1])/2;
755 index[2] = index[1];
756 index[3] = index[2];
757 index[4] = (index[2] + index[3])/2;
758 index[5] = index[3];
759 index[6] = index[4];
760 index[7] = index[4];
761 index[8] = index[5];
762 index[9] = index[5];
763 index[10] = index[6];
764 index[11] = index[7];
765 index[12] = index[8];
766 index[13] = index[8];
767 index[14] = index[9];
768 index[15] = index[9];
769 index[16] = index[10];
770
771 if (bins == 34)
772 {
773 index[17] = index[11];
774 index[18] = index[12];
775 index[19] = index[13];
776 index[20] = index[14];
777 index[21] = index[14];
778 index[22] = index[15];
779 index[23] = index[15];
780 index[24] = index[16];
781 index[25] = index[16];
782 index[26] = index[17];
783 index[27] = index[17];
784 index[28] = index[18];
785 index[29] = index[18];
786 index[30] = index[18];
787 index[31] = index[18];
788 index[32] = index[19];
789 index[33] = index[19];
790 }
791}
792
793/* parse the bitstream data decoded in ps_data() */
794static void ps_data_decode(ps_info *ps)
795{
796 uint8_t env, bin;
797
798 /* ps data not available, use data from previous frame */
799 if (ps->ps_data_available == 0)
800 {
801 ps->num_env = 0;
802 }
803
804 for (env = 0; env < ps->num_env; env++)
805 {
806 int8_t *iid_index_prev;
807 int8_t *icc_index_prev;
808 int8_t *ipd_index_prev;
809 int8_t *opd_index_prev;
810
811 int8_t num_iid_steps = (ps->iid_mode < 3) ? 7 : 15 /*fine quant*/;
812
813 if (env == 0)
814 {
815 /* take last envelope from previous frame */
816 iid_index_prev = ps->iid_index_prev;
817 icc_index_prev = ps->icc_index_prev;
818 ipd_index_prev = ps->ipd_index_prev;
819 opd_index_prev = ps->opd_index_prev;
820 } else {
821 /* take index values from previous envelope */
822 iid_index_prev = ps->iid_index[env - 1];
823 icc_index_prev = ps->icc_index[env - 1];
824 ipd_index_prev = ps->ipd_index[env - 1];
825 opd_index_prev = ps->opd_index[env - 1];
826 }
827
828// iid = 1;
829 /* delta decode iid parameters */
830 delta_decode(ps->enable_iid, ps->iid_index[env], iid_index_prev,
831 ps->iid_dt[env], ps->nr_iid_par,
832 (ps->iid_mode == 0 || ps->iid_mode == 3) ? 2 : 1,
833 -num_iid_steps, num_iid_steps);
834// iid = 0;
835
836 /* delta decode icc parameters */
837 delta_decode(ps->enable_icc, ps->icc_index[env], icc_index_prev,
838 ps->icc_dt[env], ps->nr_icc_par,
839 (ps->icc_mode == 0 || ps->icc_mode == 3) ? 2 : 1,
840 0, 7);
841
842 /* delta modulo decode ipd parameters */
843 delta_modulo_decode(ps->enable_ipdopd, ps->ipd_index[env], ipd_index_prev,
844 ps->ipd_dt[env], ps->nr_ipdopd_par, 1, /*log2(8)*/ 3);
845
846 /* delta modulo decode opd parameters */
847 delta_modulo_decode(ps->enable_ipdopd, ps->opd_index[env], opd_index_prev,
848 ps->opd_dt[env], ps->nr_ipdopd_par, 1, /*log2(8)*/ 3);
849 }
850
851 /* handle error case */
852 if (ps->num_env == 0)
853 {
854 /* force to 1 */
855 ps->num_env = 1;
856
857 if (ps->enable_iid)
858 {
859 for (bin = 0; bin < 34; bin++)
860 ps->iid_index[0][bin] = ps->iid_index_prev[bin];
861 } else {
862 for (bin = 0; bin < 34; bin++)
863 ps->iid_index[0][bin] = 0;
864 }
865
866 if (ps->enable_icc)
867 {
868 for (bin = 0; bin < 34; bin++)
869 ps->icc_index[0][bin] = ps->icc_index_prev[bin];
870 } else {
871 for (bin = 0; bin < 34; bin++)
872 ps->icc_index[0][bin] = 0;
873 }
874
875 if (ps->enable_ipdopd)
876 {
877 for (bin = 0; bin < 17; bin++)
878 {
879 ps->ipd_index[0][bin] = ps->ipd_index_prev[bin];
880 ps->opd_index[0][bin] = ps->opd_index_prev[bin];
881 }
882 } else {
883 for (bin = 0; bin < 17; bin++)
884 {
885 ps->ipd_index[0][bin] = 0;
886 ps->opd_index[0][bin] = 0;
887 }
888 }
889 }
890
891 /* update previous indices */
892 for (bin = 0; bin < 34; bin++)
893 ps->iid_index_prev[bin] = ps->iid_index[ps->num_env-1][bin];
894 for (bin = 0; bin < 34; bin++)
895 ps->icc_index_prev[bin] = ps->icc_index[ps->num_env-1][bin];
896 for (bin = 0; bin < 17; bin++)
897 {
898 ps->ipd_index_prev[bin] = ps->ipd_index[ps->num_env-1][bin];
899 ps->opd_index_prev[bin] = ps->opd_index[ps->num_env-1][bin];
900 }
901
902 ps->ps_data_available = 0;
903
904 if (ps->frame_class == 0)
905 {
906 ps->border_position[0] = 0;
907 for (env = 1; env < ps->num_env; env++)
908 {
909 ps->border_position[env] = (env * 32 /* 30 for 960? */) / ps->num_env;
910 }
911 ps->border_position[ps->num_env] = 32 /* 30 for 960? */;
912 } else {
913 ps->border_position[0] = 0;
914
915 if (ps->border_position[ps->num_env] < 32 /* 30 for 960? */)
916 {
917 ps->num_env++;
918 ps->border_position[ps->num_env] = 32 /* 30 for 960? */;
919 for (bin = 0; bin < 34; bin++)
920 {
921 ps->iid_index[ps->num_env][bin] = ps->iid_index[ps->num_env-1][bin];
922 ps->icc_index[ps->num_env][bin] = ps->icc_index[ps->num_env-1][bin];
923 }
924 for (bin = 0; bin < 17; bin++)
925 {
926 ps->ipd_index[ps->num_env][bin] = ps->ipd_index[ps->num_env-1][bin];
927 ps->opd_index[ps->num_env][bin] = ps->opd_index[ps->num_env-1][bin];
928 }
929 }
930
931 for (env = 1; env < ps->num_env; env++)
932 {
933 int8_t thr = 32 /* 30 for 960? */ - (ps->num_env - env);
934
935 if (ps->border_position[env] > thr)
936 {
937 ps->border_position[env] = thr;
938 } else {
939 thr = ps->border_position[env-1]+1;
940 if (ps->border_position[env] < thr)
941 {
942 ps->border_position[env] = thr;
943 }
944 }
945 }
946 }
947
948 /* make sure that the indices of all parameters can be mapped
949 * to the same hybrid synthesis filterbank
950 */
951#ifdef PS_LOW_POWER
952 for (env = 0; env < ps->num_env; env++)
953 {
954 if (ps->iid_mode == 2 || ps->iid_mode == 5)
955 map34indexto20(ps->iid_index[env], 34);
956 if (ps->icc_mode == 2 || ps->icc_mode == 5)
957 map34indexto20(ps->icc_index[env], 34);
958
959 /* disable ipd/opd */
960 for (bin = 0; bin < 17; bin++)
961 {
962 ps->aaIpdIndex[env][bin] = 0;
963 ps->aaOpdIndex[env][bin] = 0;
964 }
965 }
966#else
967 if (ps->use34hybrid_bands)
968 {
969 for (env = 0; env < ps->num_env; env++)
970 {
971 if (ps->iid_mode != 2 && ps->iid_mode != 5)
972 map20indexto34(ps->iid_index[env], 34);
973 if (ps->icc_mode != 2 && ps->icc_mode != 5)
974 map20indexto34(ps->icc_index[env], 34);
975 if (ps->ipd_mode != 2 && ps->ipd_mode != 5)
976 {
977 map20indexto34(ps->ipd_index[env], 17);
978 map20indexto34(ps->opd_index[env], 17);
979 }
980 }
981 }
982#endif
983
984#if 0
985 for (env = 0; env < ps->num_env; env++)
986 {
987 printf("iid[env:%d]:", env);
988 for (bin = 0; bin < 34; bin++)
989 {
990 printf(" %d", ps->iid_index[env][bin]);
991 }
992 printf("\n");
993 }
994 for (env = 0; env < ps->num_env; env++)
995 {
996 printf("icc[env:%d]:", env);
997 for (bin = 0; bin < 34; bin++)
998 {
999 printf(" %d", ps->icc_index[env][bin]);
1000 }
1001 printf("\n");
1002 }
1003 for (env = 0; env < ps->num_env; env++)
1004 {
1005 printf("ipd[env:%d]:", env);
1006 for (bin = 0; bin < 17; bin++)
1007 {
1008 printf(" %d", ps->ipd_index[env][bin]);
1009 }
1010 printf("\n");
1011 }
1012 for (env = 0; env < ps->num_env; env++)
1013 {
1014 printf("opd[env:%d]:", env);
1015 for (bin = 0; bin < 17; bin++)
1016 {
1017 printf(" %d", ps->opd_index[env][bin]);
1018 }
1019 printf("\n");
1020 }
1021 printf("\n");
1022#endif
1023}
1024
1025/* decorrelate the mono signal using an allpass filter */
1026static void ps_decorrelate(ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64],
1027 qmf_t X_hybrid_left[32][32], qmf_t X_hybrid_right[32][32])
1028{
1029 uint8_t gr, n, m, bk;
1030 uint8_t temp_delay;
1031 uint8_t sb, maxsb;
1032 const complex_t *Phi_Fract_SubQmf;
1033 uint8_t temp_delay_ser[NO_ALLPASS_LINKS];
1034 real_t P_SmoothPeakDecayDiffNrg, nrg;
1035 real_t P[32][34];
1036 real_t G_TransientRatio[32][34] = {{0}};
1037 complex_t inputLeft;
1038
1039
1040 /* chose hybrid filterbank: 20 or 34 band case */
1041 if (ps->use34hybrid_bands)
1042 {
1043 Phi_Fract_SubQmf = Phi_Fract_SubQmf34;
1044 } else{
1045 Phi_Fract_SubQmf = Phi_Fract_SubQmf20;
1046 }
1047
1048 /* clear the energy values */
1049 for (n = 0; n < 32; n++)
1050 {
1051 for (bk = 0; bk < 34; bk++)
1052 {
1053 P[n][bk] = 0;
1054 }
1055 }
1056
1057 /* calculate the energy in each parameter band b(k) */
1058 for (gr = 0; gr < ps->num_groups; gr++)
1059 {
1060 /* select the parameter index b(k) to which this group belongs */
1061 bk = (~NEGATE_IPD_MASK) & ps->map_group2bk[gr];
1062
1063 /* select the upper subband border for this group */
1064 maxsb = (gr < ps->num_hybrid_groups) ? ps->group_border[gr]+1 : ps->group_border[gr+1];
1065
1066 for (sb = ps->group_border[gr]; sb < maxsb; sb++)
1067 {
1068 for (n = ps->border_position[0]; n < ps->border_position[ps->num_env]; n++)
1069 {
1070#ifdef FIXED_POINT
1071 uint32_t in_re, in_im;
1072#endif
1073
1074 /* input from hybrid subbands or QMF subbands */
1075 if (gr < ps->num_hybrid_groups)
1076 {
1077 RE(inputLeft) = QMF_RE(X_hybrid_left[n][sb]);
1078 IM(inputLeft) = QMF_IM(X_hybrid_left[n][sb]);
1079 } else {
1080 RE(inputLeft) = QMF_RE(X_left[n][sb]);
1081 IM(inputLeft) = QMF_IM(X_left[n][sb]);
1082 }
1083
1084 /* accumulate energy */
1085#ifdef FIXED_POINT
1086 /* NOTE: all input is scaled by 2^(-5) because of fixed point QMF
1087 * meaning that P will be scaled by 2^(-10) compared to floating point version
1088 */
1089 in_re = ((abs(RE(inputLeft))+(1<<(REAL_BITS-1)))>>REAL_BITS);
1090 in_im = ((abs(IM(inputLeft))+(1<<(REAL_BITS-1)))>>REAL_BITS);
1091 P[n][bk] += in_re*in_re + in_im*in_im;
1092#else
1093 P[n][bk] += MUL_R(RE(inputLeft),RE(inputLeft)) + MUL_R(IM(inputLeft),IM(inputLeft));
1094#endif
1095 }
1096 }
1097 }
1098
1099#if 0
1100 for (n = 0; n < 32; n++)
1101 {
1102 for (bk = 0; bk < 34; bk++)
1103 {
1104#ifdef FIXED_POINT
1105 printf("%d %d: %d\n", n, bk, P[n][bk] /*/(float)REAL_PRECISION*/);
1106#else
1107 printf("%d %d: %f\n", n, bk, P[n][bk]/1024.0);
1108#endif
1109 }
1110 }
1111#endif
1112
1113 /* calculate transient reduction ratio for each parameter band b(k) */
1114 for (bk = 0; bk < ps->nr_par_bands; bk++)
1115 {
1116 for (n = ps->border_position[0]; n < ps->border_position[ps->num_env]; n++)
1117 {
1118 const real_t gamma = COEF_CONST(1.5);
1119
1120 ps->P_PeakDecayNrg[bk] = MUL_F(ps->P_PeakDecayNrg[bk], ps->alpha_decay);
1121 if (ps->P_PeakDecayNrg[bk] < P[n][bk])
1122 ps->P_PeakDecayNrg[bk] = P[n][bk];
1123
1124 /* apply smoothing filter to peak decay energy */
1125 P_SmoothPeakDecayDiffNrg = ps->P_SmoothPeakDecayDiffNrg_prev[bk];
1126 P_SmoothPeakDecayDiffNrg += MUL_F((ps->P_PeakDecayNrg[bk] - P[n][bk] - ps->P_SmoothPeakDecayDiffNrg_prev[bk]), ps->alpha_smooth);
1127 ps->P_SmoothPeakDecayDiffNrg_prev[bk] = P_SmoothPeakDecayDiffNrg;
1128
1129 /* apply smoothing filter to energy */
1130 nrg = ps->P_prev[bk];
1131 nrg += MUL_F((P[n][bk] - ps->P_prev[bk]), ps->alpha_smooth);
1132 ps->P_prev[bk] = nrg;
1133
1134 /* calculate transient ratio */
1135 if (MUL_C(P_SmoothPeakDecayDiffNrg, gamma) <= nrg)
1136 {
1137 G_TransientRatio[n][bk] = REAL_CONST(1.0);
1138 } else {
1139 G_TransientRatio[n][bk] = DIV_R(nrg, (MUL_C(P_SmoothPeakDecayDiffNrg, gamma)));
1140 }
1141 }
1142 }
1143
1144#if 0
1145 for (n = 0; n < 32; n++)
1146 {
1147 for (bk = 0; bk < 34; bk++)
1148 {
1149#ifdef FIXED_POINT
1150 printf("%d %d: %f\n", n, bk, G_TransientRatio[n][bk]/(float)REAL_PRECISION);
1151#else
1152 printf("%d %d: %f\n", n, bk, G_TransientRatio[n][bk]);
1153#endif
1154 }
1155 }
1156#endif
1157
1158 /* apply stereo decorrelation filter to the signal */
1159 for (gr = 0; gr < ps->num_groups; gr++)
1160 {
1161 if (gr < ps->num_hybrid_groups)
1162 maxsb = ps->group_border[gr] + 1;
1163 else
1164 maxsb = ps->group_border[gr + 1];
1165
1166 /* QMF channel */
1167 for (sb = ps->group_border[gr]; sb < maxsb; sb++)
1168 {
1169 real_t g_DecaySlope;
1170 real_t g_DecaySlope_filt[NO_ALLPASS_LINKS];
1171
1172 /* g_DecaySlope: [0..1] */
1173 if (gr < ps->num_hybrid_groups || sb <= ps->decay_cutoff)
1174 {
1175 g_DecaySlope = FRAC_CONST(1.0);
1176 } else {
1177 int8_t decay = ps->decay_cutoff - sb;
1178 if (decay <= -20 /* -1/DECAY_SLOPE */)
1179 {
1180 g_DecaySlope = 0;
1181 } else {
1182 /* decay(int)*decay_slope(frac) = g_DecaySlope(frac) */
1183 g_DecaySlope = FRAC_CONST(1.0) + DECAY_SLOPE * decay;
1184 }
1185 }
1186
1187 /* calculate g_DecaySlope_filt for every m multiplied by filter_a[m] */
1188 for (m = 0; m < NO_ALLPASS_LINKS; m++)
1189 {
1190 g_DecaySlope_filt[m] = MUL_F(g_DecaySlope, filter_a[m]);
1191 }
1192
1193
1194 /* set delay indices */
1195 temp_delay = ps->saved_delay;
1196 for (n = 0; n < NO_ALLPASS_LINKS; n++)
1197 temp_delay_ser[n] = ps->delay_buf_index_ser[n];
1198
1199 for (n = ps->border_position[0]; n < ps->border_position[ps->num_env]; n++)
1200 {
1201 complex_t tmp, tmp0, R0;
1202
1203 if (gr < ps->num_hybrid_groups)
1204 {
1205 /* hybrid filterbank input */
1206 RE(inputLeft) = QMF_RE(X_hybrid_left[n][sb]);
1207 IM(inputLeft) = QMF_IM(X_hybrid_left[n][sb]);
1208 } else {
1209 /* QMF filterbank input */
1210 RE(inputLeft) = QMF_RE(X_left[n][sb]);
1211 IM(inputLeft) = QMF_IM(X_left[n][sb]);
1212 }
1213
1214 if (sb > ps->nr_allpass_bands && gr >= ps->num_hybrid_groups)
1215 {
1216 /* delay */
1217
1218 /* never hybrid subbands here, always QMF subbands */
1219 RE(tmp) = RE(ps->delay_Qmf[ps->delay_buf_index_delay[sb]][sb]);
1220 IM(tmp) = IM(ps->delay_Qmf[ps->delay_buf_index_delay[sb]][sb]);
1221 RE(R0) = RE(tmp);
1222 IM(R0) = IM(tmp);
1223 RE(ps->delay_Qmf[ps->delay_buf_index_delay[sb]][sb]) = RE(inputLeft);
1224 IM(ps->delay_Qmf[ps->delay_buf_index_delay[sb]][sb]) = IM(inputLeft);
1225 } else {
1226 /* allpass filter */
1227 uint8_t m;
1228 complex_t Phi_Fract;
1229
1230 /* fetch parameters */
1231 if (gr < ps->num_hybrid_groups)
1232 {
1233 /* select data from the hybrid subbands */
1234 RE(tmp0) = RE(ps->delay_SubQmf[temp_delay][sb]);
1235 IM(tmp0) = IM(ps->delay_SubQmf[temp_delay][sb]);
1236
1237 RE(ps->delay_SubQmf[temp_delay][sb]) = RE(inputLeft);
1238 IM(ps->delay_SubQmf[temp_delay][sb]) = IM(inputLeft);
1239
1240 RE(Phi_Fract) = RE(Phi_Fract_SubQmf[sb]);
1241 IM(Phi_Fract) = IM(Phi_Fract_SubQmf[sb]);
1242 } else {
1243 /* select data from the QMF subbands */
1244 RE(tmp0) = RE(ps->delay_Qmf[temp_delay][sb]);
1245 IM(tmp0) = IM(ps->delay_Qmf[temp_delay][sb]);
1246
1247 RE(ps->delay_Qmf[temp_delay][sb]) = RE(inputLeft);
1248 IM(ps->delay_Qmf[temp_delay][sb]) = IM(inputLeft);
1249
1250 RE(Phi_Fract) = RE(Phi_Fract_Qmf[sb]);
1251 IM(Phi_Fract) = IM(Phi_Fract_Qmf[sb]);
1252 }
1253
1254 /* z^(-2) * Phi_Fract[k] */
1255 ComplexMult(&RE(tmp), &IM(tmp), RE(tmp0), IM(tmp0), RE(Phi_Fract), IM(Phi_Fract));
1256
1257 RE(R0) = RE(tmp);
1258 IM(R0) = IM(tmp);
1259 for (m = 0; m < NO_ALLPASS_LINKS; m++)
1260 {
1261 complex_t Q_Fract_allpass, tmp2;
1262
1263 /* fetch parameters */
1264 if (gr < ps->num_hybrid_groups)
1265 {
1266 /* select data from the hybrid subbands */
1267 RE(tmp0) = RE(ps->delay_SubQmf_ser[m][temp_delay_ser[m]][sb]);
1268 IM(tmp0) = IM(ps->delay_SubQmf_ser[m][temp_delay_ser[m]][sb]);
1269
1270 if (ps->use34hybrid_bands)
1271 {
1272 RE(Q_Fract_allpass) = RE(Q_Fract_allpass_SubQmf34[sb][m]);
1273 IM(Q_Fract_allpass) = IM(Q_Fract_allpass_SubQmf34[sb][m]);
1274 } else {
1275 RE(Q_Fract_allpass) = RE(Q_Fract_allpass_SubQmf20[sb][m]);
1276 IM(Q_Fract_allpass) = IM(Q_Fract_allpass_SubQmf20[sb][m]);
1277 }
1278 } else {
1279 /* select data from the QMF subbands */
1280 RE(tmp0) = RE(ps->delay_Qmf_ser[m][temp_delay_ser[m]][sb]);
1281 IM(tmp0) = IM(ps->delay_Qmf_ser[m][temp_delay_ser[m]][sb]);
1282
1283 RE(Q_Fract_allpass) = RE(Q_Fract_allpass_Qmf[sb][m]);
1284 IM(Q_Fract_allpass) = IM(Q_Fract_allpass_Qmf[sb][m]);
1285 }
1286
1287 /* delay by a fraction */
1288 /* z^(-d(m)) * Q_Fract_allpass[k,m] */
1289 ComplexMult(&RE(tmp), &IM(tmp), RE(tmp0), IM(tmp0), RE(Q_Fract_allpass), IM(Q_Fract_allpass));
1290
1291 /* -a(m) * g_DecaySlope[k] */
1292 RE(tmp) += -MUL_F(g_DecaySlope_filt[m], RE(R0));
1293 IM(tmp) += -MUL_F(g_DecaySlope_filt[m], IM(R0));
1294
1295 /* -a(m) * g_DecaySlope[k] * Q_Fract_allpass[k,m] * z^(-d(m)) */
1296 RE(tmp2) = RE(R0) + MUL_F(g_DecaySlope_filt[m], RE(tmp));
1297 IM(tmp2) = IM(R0) + MUL_F(g_DecaySlope_filt[m], IM(tmp));
1298
1299 /* store sample */
1300 if (gr < ps->num_hybrid_groups)
1301 {
1302 RE(ps->delay_SubQmf_ser[m][temp_delay_ser[m]][sb]) = RE(tmp2);
1303 IM(ps->delay_SubQmf_ser[m][temp_delay_ser[m]][sb]) = IM(tmp2);
1304 } else {
1305 RE(ps->delay_Qmf_ser[m][temp_delay_ser[m]][sb]) = RE(tmp2);
1306 IM(ps->delay_Qmf_ser[m][temp_delay_ser[m]][sb]) = IM(tmp2);
1307 }
1308
1309 /* store for next iteration (or as output value if last iteration) */
1310 RE(R0) = RE(tmp);
1311 IM(R0) = IM(tmp);
1312 }
1313 }
1314
1315 /* select b(k) for reading the transient ratio */
1316 bk = (~NEGATE_IPD_MASK) & ps->map_group2bk[gr];
1317
1318 /* duck if a past transient is found */
1319 RE(R0) = MUL_R(G_TransientRatio[n][bk], RE(R0));
1320 IM(R0) = MUL_R(G_TransientRatio[n][bk], IM(R0));
1321
1322 if (gr < ps->num_hybrid_groups)
1323 {
1324 /* hybrid */
1325 QMF_RE(X_hybrid_right[n][sb]) = RE(R0);
1326 QMF_IM(X_hybrid_right[n][sb]) = IM(R0);
1327 } else {
1328 /* QMF */
1329 QMF_RE(X_right[n][sb]) = RE(R0);
1330 QMF_IM(X_right[n][sb]) = IM(R0);
1331 }
1332
1333 /* Update delay buffer index */
1334 if (++temp_delay >= 2)
1335 {
1336 temp_delay = 0;
1337 }
1338
1339 /* update delay indices */
1340 if (sb > ps->nr_allpass_bands && gr >= ps->num_hybrid_groups)
1341 {
1342 /* delay_D depends on the samplerate, it can hold the values 14 and 1 */
1343 if (++ps->delay_buf_index_delay[sb] >= ps->delay_D[sb])
1344 {
1345 ps->delay_buf_index_delay[sb] = 0;
1346 }
1347 }
1348
1349 for (m = 0; m < NO_ALLPASS_LINKS; m++)
1350 {
1351 if (++temp_delay_ser[m] >= ps->num_sample_delay_ser[m])
1352 {
1353 temp_delay_ser[m] = 0;
1354 }
1355 }
1356 }
1357 }
1358 }
1359
1360 /* update delay indices */
1361 ps->saved_delay = temp_delay;
1362 for (m = 0; m < NO_ALLPASS_LINKS; m++)
1363 ps->delay_buf_index_ser[m] = temp_delay_ser[m];
1364}
1365
1366#ifdef FIXED_POINT
1367#define step(shift) \
1368 if ((0x40000000l >> shift) + root <= value) \
1369 { \
1370 value -= (0x40000000l >> shift) + root; \
1371 root = (root >> 1) | (0x40000000l >> shift); \
1372 } else { \
1373 root = root >> 1; \
1374 }
1375
1376/* fixed point square root approximation */
1377static real_t ps_sqrt(real_t value)
1378{
1379 real_t root = 0;
1380
1381 step( 0); step( 2); step( 4); step( 6);
1382 step( 8); step(10); step(12); step(14);
1383 step(16); step(18); step(20); step(22);
1384 step(24); step(26); step(28); step(30);
1385
1386 if (root < value)
1387 ++root;
1388
1389 root <<= (REAL_BITS/2);
1390
1391 return root;
1392}
1393#else
1394#define ps_sqrt(A) sqrt(A)
1395#endif
1396
1397static const real_t ipdopd_cos_tab[] = {
1398 FRAC_CONST(1.000000000000000),
1399 FRAC_CONST(0.707106781186548),
1400 FRAC_CONST(0.000000000000000),
1401 FRAC_CONST(-0.707106781186547),
1402 FRAC_CONST(-1.000000000000000),
1403 FRAC_CONST(-0.707106781186548),
1404 FRAC_CONST(-0.000000000000000),
1405 FRAC_CONST(0.707106781186547),
1406 FRAC_CONST(1.000000000000000)
1407};
1408
1409static const real_t ipdopd_sin_tab[] = {
1410 FRAC_CONST(0.000000000000000),
1411 FRAC_CONST(0.707106781186547),
1412 FRAC_CONST(1.000000000000000),
1413 FRAC_CONST(0.707106781186548),
1414 FRAC_CONST(0.000000000000000),
1415 FRAC_CONST(-0.707106781186547),
1416 FRAC_CONST(-1.000000000000000),
1417 FRAC_CONST(-0.707106781186548),
1418 FRAC_CONST(-0.000000000000000)
1419};
1420
1421static void ps_mix_phase(ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64],
1422 qmf_t X_hybrid_left[32][32], qmf_t X_hybrid_right[32][32])
1423{
1424 uint8_t n;
1425 uint8_t gr;
1426 uint8_t bk = 0;
1427 uint8_t sb, maxsb;
1428 uint8_t env;
1429 uint8_t nr_ipdopd_par;
1430 complex_t h11, h12, h21, h22;
1431 complex_t H11, H12, H21, H22;
1432 complex_t deltaH11, deltaH12, deltaH21, deltaH22;
1433 complex_t tempLeft;
1434 complex_t tempRight;
1435 complex_t phaseLeft;
1436 complex_t phaseRight;
1437 real_t L;
1438 const real_t *sf_iid;
1439 uint8_t no_iid_steps;
1440
1441 if (ps->iid_mode >= 3)
1442 {
1443 no_iid_steps = 15;
1444 sf_iid = sf_iid_fine;
1445 } else {
1446 no_iid_steps = 7;
1447 sf_iid = sf_iid_normal;
1448 }
1449
1450 if (ps->ipd_mode == 0 || ps->ipd_mode == 3)
1451 {
1452 nr_ipdopd_par = 11; /* resolution */
1453 } else {
1454 nr_ipdopd_par = ps->nr_ipdopd_par;
1455 }
1456
1457 for (gr = 0; gr < ps->num_groups; gr++)
1458 {
1459 bk = (~NEGATE_IPD_MASK) & ps->map_group2bk[gr];
1460
1461 /* use one channel per group in the subqmf domain */
1462 maxsb = (gr < ps->num_hybrid_groups) ? ps->group_border[gr] + 1 : ps->group_border[gr + 1];
1463
1464 for (env = 0; env < ps->num_env; env++)
1465 {
1466 if (ps->icc_mode < 3)
1467 {
1468 /* type 'A' mixing as described in 8.6.4.6.2.1 */
1469 real_t c_1, c_2;
1470 real_t cosa, sina;
1471 real_t cosb, sinb;
1472 real_t ab1, ab2;
1473 real_t ab3, ab4;
1474
1475 /*
1476 c_1 = sqrt(2.0 / (1.0 + pow(10.0, quant_iid[no_iid_steps + iid_index] / 10.0)));
1477 c_2 = sqrt(2.0 / (1.0 + pow(10.0, quant_iid[no_iid_steps - iid_index] / 10.0)));
1478 alpha = 0.5 * acos(quant_rho[icc_index]);
1479 beta = alpha * ( c_1 - c_2 ) / sqrt(2.0);
1480 */
1481
1482 //printf("%d\n", ps->iid_index[env][bk]);
1483
1484 /* calculate the scalefactors c_1 and c_2 from the intensity differences */
1485 c_1 = sf_iid[no_iid_steps + ps->iid_index[env][bk]];
1486 c_2 = sf_iid[no_iid_steps - ps->iid_index[env][bk]];
1487
1488 /* calculate alpha and beta using the ICC parameters */
1489 cosa = cos_alphas[ps->icc_index[env][bk]];
1490 sina = sin_alphas[ps->icc_index[env][bk]];
1491
1492 if (ps->iid_mode >= 3)
1493 {
1494 if (ps->iid_index[env][bk] < 0)
1495 {
1496 cosb = cos_betas_fine[-ps->iid_index[env][bk]][ps->icc_index[env][bk]];
1497 sinb = -sin_betas_fine[-ps->iid_index[env][bk]][ps->icc_index[env][bk]];
1498 } else {
1499 cosb = cos_betas_fine[ps->iid_index[env][bk]][ps->icc_index[env][bk]];
1500 sinb = sin_betas_fine[ps->iid_index[env][bk]][ps->icc_index[env][bk]];
1501 }
1502 } else {
1503 if (ps->iid_index[env][bk] < 0)
1504 {
1505 cosb = cos_betas_normal[-ps->iid_index[env][bk]][ps->icc_index[env][bk]];
1506 sinb = -sin_betas_normal[-ps->iid_index[env][bk]][ps->icc_index[env][bk]];
1507 } else {
1508 cosb = cos_betas_normal[ps->iid_index[env][bk]][ps->icc_index[env][bk]];
1509 sinb = sin_betas_normal[ps->iid_index[env][bk]][ps->icc_index[env][bk]];
1510 }
1511 }
1512
1513 ab1 = MUL_C(cosb, cosa);
1514 ab2 = MUL_C(sinb, sina);
1515 ab3 = MUL_C(sinb, cosa);
1516 ab4 = MUL_C(cosb, sina);
1517
1518 /* h_xy: COEF */
1519 RE(h11) = MUL_C(c_2, (ab1 - ab2));
1520 RE(h12) = MUL_C(c_1, (ab1 + ab2));
1521 RE(h21) = MUL_C(c_2, (ab3 + ab4));
1522 RE(h22) = MUL_C(c_1, (ab3 - ab4));
1523 } else {
1524 /* type 'B' mixing as described in 8.6.4.6.2.2 */
1525 real_t sina, cosa;
1526 real_t cosg, sing;
1527
1528 /*
1529 real_t c, rho, mu, alpha, gamma;
1530 uint8_t i;
1531
1532 i = ps->iid_index[env][bk];
1533 c = (real_t)pow(10.0, ((i)?(((i>0)?1:-1)*quant_iid[((i>0)?i:-i)-1]):0.)/20.0);
1534 rho = quant_rho[ps->icc_index[env][bk]];
1535
1536 if (rho == 0.0f && c == 1.)
1537 {
1538 alpha = (real_t)M_PI/4.0f;
1539 rho = 0.05f;
1540 } else {
1541 if (rho <= 0.05f)
1542 {
1543 rho = 0.05f;
1544 }
1545 alpha = 0.5f*(real_t)atan( (2.0f*c*rho) / (c*c-1.0f) );
1546
1547 if (alpha < 0.)
1548 {
1549 alpha += (real_t)M_PI/2.0f;
1550 }
1551 if (rho < 0.)
1552 {
1553 alpha += (real_t)M_PI;
1554 }
1555 }
1556 mu = c+1.0f/c;
1557 mu = 1+(4.0f*rho*rho-4.0f)/(mu*mu);
1558 gamma = (real_t)atan(sqrt((1.0f-sqrt(mu))/(1.0f+sqrt(mu))));
1559 */
1560
1561 if (ps->iid_mode >= 3)
1562 {
1563 uint8_t abs_iid = abs(ps->iid_index[env][bk]);
1564
1565 cosa = sincos_alphas_B_fine[no_iid_steps + ps->iid_index[env][bk]][ps->icc_index[env][bk]];
1566 sina = sincos_alphas_B_fine[30 - (no_iid_steps + ps->iid_index[env][bk])][ps->icc_index[env][bk]];
1567 cosg = cos_gammas_fine[abs_iid][ps->icc_index[env][bk]];
1568 sing = sin_gammas_fine[abs_iid][ps->icc_index[env][bk]];
1569 } else {
1570 uint8_t abs_iid = abs(ps->iid_index[env][bk]);
1571
1572 cosa = sincos_alphas_B_normal[no_iid_steps + ps->iid_index[env][bk]][ps->icc_index[env][bk]];
1573 sina = sincos_alphas_B_normal[14 - (no_iid_steps + ps->iid_index[env][bk])][ps->icc_index[env][bk]];
1574 cosg = cos_gammas_normal[abs_iid][ps->icc_index[env][bk]];
1575 sing = sin_gammas_normal[abs_iid][ps->icc_index[env][bk]];
1576 }
1577
1578 RE(h11) = MUL_C(COEF_SQRT2, MUL_C(cosa, cosg));
1579 RE(h12) = MUL_C(COEF_SQRT2, MUL_C(sina, cosg));
1580 RE(h21) = MUL_C(COEF_SQRT2, MUL_C(-cosa, sing));
1581 RE(h22) = MUL_C(COEF_SQRT2, MUL_C(sina, sing));
1582 }
1583
1584 /* calculate phase rotation parameters H_xy */
1585 /* note that the imaginary part of these parameters are only calculated when
1586 IPD and OPD are enabled
1587 */
1588 if ((ps->enable_ipdopd) && (bk < nr_ipdopd_par))
1589 {
1590 int8_t i;
1591 real_t xxyy, ppqq;
1592 real_t yq, xp, xq, py, tmp;
1593
1594 /* ringbuffer index */
1595 i = ps->phase_hist;
1596
1597 /* previous value */
1598#ifdef FIXED_POINT
1599 /* divide by 4, shift right 2 bits */
1600 RE(tempLeft) = RE(ps->ipd_prev[bk][i]) >> 2;
1601 IM(tempLeft) = IM(ps->ipd_prev[bk][i]) >> 2;
1602 RE(tempRight) = RE(ps->opd_prev[bk][i]) >> 2;
1603 IM(tempRight) = IM(ps->opd_prev[bk][i]) >> 2;
1604#else
1605 RE(tempLeft) = MUL_F(RE(ps->ipd_prev[bk][i]), FRAC_CONST(0.25));
1606 IM(tempLeft) = MUL_F(IM(ps->ipd_prev[bk][i]), FRAC_CONST(0.25));
1607 RE(tempRight) = MUL_F(RE(ps->opd_prev[bk][i]), FRAC_CONST(0.25));
1608 IM(tempRight) = MUL_F(IM(ps->opd_prev[bk][i]), FRAC_CONST(0.25));
1609#endif
1610
1611 /* save current value */
1612 RE(ps->ipd_prev[bk][i]) = ipdopd_cos_tab[abs(ps->ipd_index[env][bk])];
1613 IM(ps->ipd_prev[bk][i]) = ipdopd_sin_tab[abs(ps->ipd_index[env][bk])];
1614 RE(ps->opd_prev[bk][i]) = ipdopd_cos_tab[abs(ps->opd_index[env][bk])];
1615 IM(ps->opd_prev[bk][i]) = ipdopd_sin_tab[abs(ps->opd_index[env][bk])];
1616
1617 /* add current value */
1618 RE(tempLeft) += RE(ps->ipd_prev[bk][i]);
1619 IM(tempLeft) += IM(ps->ipd_prev[bk][i]);
1620 RE(tempRight) += RE(ps->opd_prev[bk][i]);
1621 IM(tempRight) += IM(ps->opd_prev[bk][i]);
1622
1623 /* ringbuffer index */
1624 if (i == 0)
1625 {
1626 i = 2;
1627 }
1628 i--;
1629
1630 /* get value before previous */
1631#ifdef FIXED_POINT
1632 /* dividing by 2, shift right 1 bit */
1633 RE(tempLeft) += (RE(ps->ipd_prev[bk][i]) >> 1);
1634 IM(tempLeft) += (IM(ps->ipd_prev[bk][i]) >> 1);
1635 RE(tempRight) += (RE(ps->opd_prev[bk][i]) >> 1);
1636 IM(tempRight) += (IM(ps->opd_prev[bk][i]) >> 1);
1637#else
1638 RE(tempLeft) += MUL_F(RE(ps->ipd_prev[bk][i]), FRAC_CONST(0.5));
1639 IM(tempLeft) += MUL_F(IM(ps->ipd_prev[bk][i]), FRAC_CONST(0.5));
1640 RE(tempRight) += MUL_F(RE(ps->opd_prev[bk][i]), FRAC_CONST(0.5));
1641 IM(tempRight) += MUL_F(IM(ps->opd_prev[bk][i]), FRAC_CONST(0.5));
1642#endif
1643
1644#if 0 /* original code */
1645 ipd = (float)atan2(IM(tempLeft), RE(tempLeft));
1646 opd = (float)atan2(IM(tempRight), RE(tempRight));
1647
1648 /* phase rotation */
1649 RE(phaseLeft) = (float)cos(opd);
1650 IM(phaseLeft) = (float)sin(opd);
1651 opd -= ipd;
1652 RE(phaseRight) = (float)cos(opd);
1653 IM(phaseRight) = (float)sin(opd);
1654#else
1655 // x = IM(tempLeft)
1656 // y = RE(tempLeft)
1657 // p = IM(tempRight)
1658 // q = RE(tempRight)
1659 // cos(atan2(x,y)) = 1/sqrt(1 + (x*x)/(y*y))
1660 // sin(atan2(x,y)) = x/(y*sqrt(1 + (x*x)/(y*y)))
1661 // cos(atan2(x,y)-atan2(p,q)) = (y*q+x*p)/(y*q * sqrt(1 + (x*x)/(y*y)) * sqrt(1 + (p*p)/(q*q)));
1662 // sin(atan2(x,y)-atan2(p,q)) = (x*q-p*y)/(y*q * sqrt(1 + (x*x)/(y*y)) * sqrt(1 + (p*p)/(q*q)));
1663
1664 /* (x*x)/(y*y) (REAL > 0) */
1665 xxyy = DIV_R(MUL_C(IM(tempLeft),IM(tempLeft)), MUL_C(RE(tempLeft),RE(tempLeft)));
1666 ppqq = DIV_R(MUL_C(IM(tempRight),IM(tempRight)), MUL_C(RE(tempRight),RE(tempRight)));
1667
1668 /* 1 + (x*x)/(y*y) (REAL > 1) */
1669 xxyy += REAL_CONST(1);
1670 ppqq += REAL_CONST(1);
1671
1672 /* 1 / sqrt(1 + (x*x)/(y*y)) (FRAC <= 1) */
1673 xxyy = DIV_R(FRAC_CONST(1), ps_sqrt(xxyy));
1674 ppqq = DIV_R(FRAC_CONST(1), ps_sqrt(ppqq));
1675
1676 /* COEF */
1677 yq = MUL_C(RE(tempLeft), RE(tempRight));
1678 xp = MUL_C(IM(tempLeft), IM(tempRight));
1679 xq = MUL_C(IM(tempLeft), RE(tempRight));
1680 py = MUL_C(RE(tempLeft), IM(tempRight));
1681
1682 RE(phaseLeft) = xxyy;
1683 IM(phaseLeft) = MUL_R(xxyy, (DIV_R(IM(tempLeft), RE(tempLeft))));
1684
1685 tmp = DIV_C(MUL_F(xxyy, ppqq), yq);
1686
1687 /* MUL_C(FRAC,COEF) = FRAC */
1688 RE(phaseRight) = MUL_C(tmp, (yq+xp));
1689 IM(phaseRight) = MUL_C(tmp, (xq-py));
1690#endif
1691
1692 /* MUL_F(COEF, FRAC) = COEF */
1693 IM(h11) = MUL_F(RE(h11), IM(phaseLeft));
1694 IM(h12) = MUL_F(RE(h12), IM(phaseRight));
1695 IM(h21) = MUL_F(RE(h21), IM(phaseLeft));
1696 IM(h22) = MUL_F(RE(h22), IM(phaseRight));
1697
1698 RE(h11) = MUL_F(RE(h11), RE(phaseLeft));
1699 RE(h12) = MUL_F(RE(h12), RE(phaseRight));
1700 RE(h21) = MUL_F(RE(h21), RE(phaseLeft));
1701 RE(h22) = MUL_F(RE(h22), RE(phaseRight));
1702 }
1703
1704 /* length of the envelope n_e+1 - n_e (in time samples) */
1705 /* 0 < L <= 32: integer */
1706 L = (real_t)(ps->border_position[env + 1] - ps->border_position[env]);
1707
1708 /* obtain final H_xy by means of linear interpolation */
1709 RE(deltaH11) = (RE(h11) - RE(ps->h11_prev[gr])) / L;
1710 RE(deltaH12) = (RE(h12) - RE(ps->h12_prev[gr])) / L;
1711 RE(deltaH21) = (RE(h21) - RE(ps->h21_prev[gr])) / L;
1712 RE(deltaH22) = (RE(h22) - RE(ps->h22_prev[gr])) / L;
1713
1714 RE(H11) = RE(ps->h11_prev[gr]);
1715 RE(H12) = RE(ps->h12_prev[gr]);
1716 RE(H21) = RE(ps->h21_prev[gr]);
1717 RE(H22) = RE(ps->h22_prev[gr]);
1718
1719 RE(ps->h11_prev[gr]) = RE(h11);
1720 RE(ps->h12_prev[gr]) = RE(h12);
1721 RE(ps->h21_prev[gr]) = RE(h21);
1722 RE(ps->h22_prev[gr]) = RE(h22);
1723
1724 /* only calculate imaginary part when needed */
1725 if ((ps->enable_ipdopd) && (bk < nr_ipdopd_par))
1726 {
1727 /* obtain final H_xy by means of linear interpolation */
1728 IM(deltaH11) = (IM(h11) - IM(ps->h11_prev[gr])) / L;
1729 IM(deltaH12) = (IM(h12) - IM(ps->h12_prev[gr])) / L;
1730 IM(deltaH21) = (IM(h21) - IM(ps->h21_prev[gr])) / L;
1731 IM(deltaH22) = (IM(h22) - IM(ps->h22_prev[gr])) / L;
1732
1733 IM(H11) = IM(ps->h11_prev[gr]);
1734 IM(H12) = IM(ps->h12_prev[gr]);
1735 IM(H21) = IM(ps->h21_prev[gr]);
1736 IM(H22) = IM(ps->h22_prev[gr]);
1737
1738 if ((NEGATE_IPD_MASK & ps->map_group2bk[gr]) != 0)
1739 {
1740 IM(deltaH11) = -IM(deltaH11);
1741 IM(deltaH12) = -IM(deltaH12);
1742 IM(deltaH21) = -IM(deltaH21);
1743 IM(deltaH22) = -IM(deltaH22);
1744
1745 IM(H11) = -IM(H11);
1746 IM(H12) = -IM(H12);
1747 IM(H21) = -IM(H21);
1748 IM(H22) = -IM(H22);
1749 }
1750
1751 IM(ps->h11_prev[gr]) = IM(h11);
1752 IM(ps->h12_prev[gr]) = IM(h12);
1753 IM(ps->h21_prev[gr]) = IM(h21);
1754 IM(ps->h22_prev[gr]) = IM(h22);
1755 }
1756
1757 /* apply H_xy to the current envelope band of the decorrelated subband */
1758 for (n = ps->border_position[env]; n < ps->border_position[env + 1]; n++)
1759 {
1760 /* addition finalises the interpolation over every n */
1761 RE(H11) += RE(deltaH11);
1762 RE(H12) += RE(deltaH12);
1763 RE(H21) += RE(deltaH21);
1764 RE(H22) += RE(deltaH22);
1765 if ((ps->enable_ipdopd) && (bk < nr_ipdopd_par))
1766 {
1767 IM(H11) += IM(deltaH11);
1768 IM(H12) += IM(deltaH12);
1769 IM(H21) += IM(deltaH21);
1770 IM(H22) += IM(deltaH22);
1771 }
1772
1773 /* channel is an alias to the subband */
1774 for (sb = ps->group_border[gr]; sb < maxsb; sb++)
1775 {
1776 complex_t inLeft, inRight;
1777
1778 /* load decorrelated samples */
1779 if (gr < ps->num_hybrid_groups)
1780 {
1781 RE(inLeft) = RE(X_hybrid_left[n][sb]);
1782 IM(inLeft) = IM(X_hybrid_left[n][sb]);
1783 RE(inRight) = RE(X_hybrid_right[n][sb]);
1784 IM(inRight) = IM(X_hybrid_right[n][sb]);
1785 } else {
1786 RE(inLeft) = RE(X_left[n][sb]);
1787 IM(inLeft) = IM(X_left[n][sb]);
1788 RE(inRight) = RE(X_right[n][sb]);
1789 IM(inRight) = IM(X_right[n][sb]);
1790 }
1791
1792 /* apply mixing */
1793 RE(tempLeft) = MUL_C(RE(H11), RE(inLeft)) + MUL_C(RE(H21), RE(inRight));
1794 IM(tempLeft) = MUL_C(RE(H11), IM(inLeft)) + MUL_C(RE(H21), IM(inRight));
1795 RE(tempRight) = MUL_C(RE(H12), RE(inLeft)) + MUL_C(RE(H22), RE(inRight));
1796 IM(tempRight) = MUL_C(RE(H12), IM(inLeft)) + MUL_C(RE(H22), IM(inRight));
1797
1798 /* only perform imaginary operations when needed */
1799 if ((ps->enable_ipdopd) && (bk < nr_ipdopd_par))
1800 {
1801 /* apply rotation */
1802 RE(tempLeft) -= MUL_C(IM(H11), IM(inLeft)) + MUL_C(IM(H21), IM(inRight));
1803 IM(tempLeft) += MUL_C(IM(H11), RE(inLeft)) + MUL_C(IM(H21), RE(inRight));
1804 RE(tempRight) -= MUL_C(IM(H12), IM(inLeft)) + MUL_C(IM(H22), IM(inRight));
1805 IM(tempRight) += MUL_C(IM(H12), RE(inLeft)) + MUL_C(IM(H22), RE(inRight));
1806 }
1807
1808 /* store final samples */
1809 if (gr < ps->num_hybrid_groups)
1810 {
1811 RE(X_hybrid_left[n][sb]) = RE(tempLeft);
1812 IM(X_hybrid_left[n][sb]) = IM(tempLeft);
1813 RE(X_hybrid_right[n][sb]) = RE(tempRight);
1814 IM(X_hybrid_right[n][sb]) = IM(tempRight);
1815 } else {
1816 RE(X_left[n][sb]) = RE(tempLeft);
1817 IM(X_left[n][sb]) = IM(tempLeft);
1818 RE(X_right[n][sb]) = RE(tempRight);
1819 IM(X_right[n][sb]) = IM(tempRight);
1820 }
1821 }
1822 }
1823
1824 /* shift phase smoother's circular buffer index */
1825 ps->phase_hist++;
1826 if (ps->phase_hist == 2)
1827 {
1828 ps->phase_hist = 0;
1829 }
1830 }
1831 }
1832}
1833
1834void ps_free(ps_info *ps)
1835{
1836 /* free hybrid filterbank structures */
1837 hybrid_free(ps->hyb);
1838
1839 faad_free(ps);
1840}
1841
1842ps_info *ps_init(uint8_t sr_index)
1843{
1844 uint8_t i;
1845 uint8_t short_delay_band;
1846
1847 ps_info *ps = (ps_info*)faad_malloc(sizeof(ps_info));
1848 memset(ps, 0, sizeof(ps_info));
1849
1850 ps->hyb = hybrid_init();
1851
1852 ps->ps_data_available = 0;
1853
1854 /* delay stuff*/
1855 ps->saved_delay = 0;
1856
1857 for (i = 0; i < 64; i++)
1858 {
1859 ps->delay_buf_index_delay[i] = 0;
1860 }
1861
1862 for (i = 0; i < NO_ALLPASS_LINKS; i++)
1863 {
1864 ps->delay_buf_index_ser[i] = 0;
1865#ifdef PARAM_32KHZ
1866 if (sr_index <= 5) /* >= 32 kHz*/
1867 {
1868 ps->num_sample_delay_ser[i] = delay_length_d[1][i];
1869 } else {
1870 ps->num_sample_delay_ser[i] = delay_length_d[0][i];
1871 }
1872#else
1873 /* THESE ARE CONSTANTS NOW */
1874 ps->num_sample_delay_ser[i] = delay_length_d[i];
1875#endif
1876 }
1877
1878#ifdef PARAM_32KHZ
1879 if (sr_index <= 5) /* >= 32 kHz*/
1880 {
1881 short_delay_band = 35;
1882 ps->nr_allpass_bands = 22;
1883 ps->alpha_decay = FRAC_CONST(0.76592833836465);
1884 ps->alpha_smooth = FRAC_CONST(0.25);
1885 } else {
1886 short_delay_band = 64;
1887 ps->nr_allpass_bands = 45;
1888 ps->alpha_decay = FRAC_CONST(0.58664621951003);
1889 ps->alpha_smooth = FRAC_CONST(0.6);
1890 }
1891#else
1892 /* THESE ARE CONSTANTS NOW */
1893 short_delay_band = 35;
1894 ps->nr_allpass_bands = 22;
1895 ps->alpha_decay = FRAC_CONST(0.76592833836465);
1896 ps->alpha_smooth = FRAC_CONST(0.25);
1897#endif
1898
1899 /* THESE ARE CONSTANT NOW IF PS IS INDEPENDANT OF SAMPLERATE */
1900 for (i = 0; i < short_delay_band; i++)
1901 {
1902 ps->delay_D[i] = 14;
1903 }
1904 for (i = short_delay_band; i < 64; i++)
1905 {
1906 ps->delay_D[i] = 1;
1907 }
1908
1909 /* mixing and phase */
1910 for (i = 0; i < 50; i++)
1911 {
1912 RE(ps->h11_prev[i]) = 1;
1913 IM(ps->h12_prev[i]) = 1;
1914 RE(ps->h11_prev[i]) = 1;
1915 IM(ps->h12_prev[i]) = 1;
1916 }
1917
1918 ps->phase_hist = 0;
1919
1920 for (i = 0; i < 20; i++)
1921 {
1922 RE(ps->ipd_prev[i][0]) = 0;
1923 IM(ps->ipd_prev[i][0]) = 0;
1924 RE(ps->ipd_prev[i][1]) = 0;
1925 IM(ps->ipd_prev[i][1]) = 0;
1926 RE(ps->opd_prev[i][0]) = 0;
1927 IM(ps->opd_prev[i][0]) = 0;
1928 RE(ps->opd_prev[i][1]) = 0;
1929 IM(ps->opd_prev[i][1]) = 0;
1930 }
1931
1932 return ps;
1933}
1934
1935/* main Parametric Stereo decoding function */
1936uint8_t ps_decode(ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64])
1937{
1938 qmf_t X_hybrid_left[32][32] = {{0}};
1939 qmf_t X_hybrid_right[32][32] = {{0}};
1940
1941 /* delta decoding of the bitstream data */
1942 ps_data_decode(ps);
1943
1944 /* set up some parameters depending on filterbank type */
1945 if (ps->use34hybrid_bands)
1946 {
1947 ps->group_border = (uint8_t*)group_border34;
1948 ps->map_group2bk = (uint16_t*)map_group2bk34;
1949 ps->num_groups = 32+18;
1950 ps->num_hybrid_groups = 32;
1951 ps->nr_par_bands = 34;
1952 ps->decay_cutoff = 5;
1953 } else {
1954 ps->group_border = (uint8_t*)group_border20;
1955 ps->map_group2bk = (uint16_t*)map_group2bk20;
1956 ps->num_groups = 10+12;
1957 ps->num_hybrid_groups = 10;
1958 ps->nr_par_bands = 20;
1959 ps->decay_cutoff = 3;
1960 }
1961
1962 /* Perform further analysis on the lowest subbands to get a higher
1963 * frequency resolution
1964 */
1965 hybrid_analysis((hyb_info*)ps->hyb, X_left, X_hybrid_left,
1966 ps->use34hybrid_bands);
1967
1968 /* decorrelate mono signal */
1969 ps_decorrelate(ps, X_left, X_right, X_hybrid_left, X_hybrid_right);
1970
1971 /* apply mixing and phase parameters */
1972 ps_mix_phase(ps, X_left, X_right, X_hybrid_left, X_hybrid_right);
1973
1974 /* hybrid synthesis, to rebuild the SBR QMF matrices */
1975 hybrid_synthesis((hyb_info*)ps->hyb, X_left, X_hybrid_left,
1976 ps->use34hybrid_bands);
1977
1978 hybrid_synthesis((hyb_info*)ps->hyb, X_right, X_hybrid_right,
1979 ps->use34hybrid_bands);
1980
1981 return 0;
1982}
1983
1984#endif
1985
diff --git a/apps/codecs/libfaad/ps_dec.h b/apps/codecs/libfaad/ps_dec.h
new file mode 100644
index 0000000000..fca1f775ef
--- /dev/null
+++ b/apps/codecs/libfaad/ps_dec.h
@@ -0,0 +1,148 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __PS_DEC_H__
29#define __PS_DEC_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#include "bits.h"
36
37#define EXTENSION_ID_PS 2
38
39#define MAX_PS_ENVELOPES 5
40#define NO_ALLPASS_LINKS 3
41
42typedef struct
43{
44 /* bitstream parameters */
45 uint8_t enable_iid;
46 uint8_t enable_icc;
47 uint8_t enable_ext;
48
49 uint8_t iid_mode;
50 uint8_t icc_mode;
51 uint8_t nr_iid_par;
52 uint8_t nr_ipdopd_par;
53 uint8_t nr_icc_par;
54
55 uint8_t frame_class;
56 uint8_t num_env;
57
58 uint8_t border_position[MAX_PS_ENVELOPES+1];
59
60 uint8_t iid_dt[MAX_PS_ENVELOPES];
61 uint8_t icc_dt[MAX_PS_ENVELOPES];
62
63 uint8_t enable_ipdopd;
64 uint8_t ipd_mode;
65 uint8_t ipd_dt[MAX_PS_ENVELOPES];
66 uint8_t opd_dt[MAX_PS_ENVELOPES];
67
68 /* indices */
69 int8_t iid_index_prev[34];
70 int8_t icc_index_prev[34];
71 int8_t ipd_index_prev[17];
72 int8_t opd_index_prev[17];
73 int8_t iid_index[MAX_PS_ENVELOPES][34];
74 int8_t icc_index[MAX_PS_ENVELOPES][34];
75 int8_t ipd_index[MAX_PS_ENVELOPES][17];
76 int8_t opd_index[MAX_PS_ENVELOPES][17];
77
78 int8_t ipd_index_1[17];
79 int8_t opd_index_1[17];
80 int8_t ipd_index_2[17];
81 int8_t opd_index_2[17];
82
83 /* ps data was correctly read */
84 uint8_t ps_data_available;
85
86 /* a header has been read */
87 uint8_t header_read;
88
89 /* hybrid filterbank parameters */
90 void *hyb;
91 uint8_t use34hybrid_bands;
92
93 /**/
94 uint8_t num_groups;
95 uint8_t num_hybrid_groups;
96 uint8_t nr_par_bands;
97 uint8_t nr_allpass_bands;
98 uint8_t decay_cutoff;
99
100 uint8_t *group_border;
101 uint16_t *map_group2bk;
102
103 /* filter delay handling */
104 uint8_t saved_delay;
105 uint8_t delay_buf_index_ser[NO_ALLPASS_LINKS];
106 uint8_t num_sample_delay_ser[NO_ALLPASS_LINKS];
107 uint8_t delay_D[64];
108 uint8_t delay_buf_index_delay[64];
109
110 complex_t delay_Qmf[14][64]; /* 14 samples delay max, 64 QMF channels */
111 complex_t delay_SubQmf[2][32]; /* 2 samples delay max (SubQmf is always allpass filtered) */
112 complex_t delay_Qmf_ser[NO_ALLPASS_LINKS][5][64]; /* 5 samples delay max (table 8.34), 64 QMF channels */
113 complex_t delay_SubQmf_ser[NO_ALLPASS_LINKS][5][32]; /* 5 samples delay max (table 8.34) */
114
115 /* transients */
116 real_t alpha_decay;
117 real_t alpha_smooth;
118
119 real_t P_PeakDecayNrg[34];
120 real_t P_prev[34];
121 real_t P_SmoothPeakDecayDiffNrg_prev[34];
122
123 /* mixing and phase */
124 complex_t h11_prev[50];
125 complex_t h12_prev[50];
126 complex_t h21_prev[50];
127 complex_t h22_prev[50];
128 uint8_t phase_hist;
129 complex_t ipd_prev[20][2];
130 complex_t opd_prev[20][2];
131
132} ps_info;
133
134/* ps_syntax.c */
135uint16_t ps_data(ps_info *ps, bitfile *ld, uint8_t *header);
136
137/* ps_dec.c */
138ps_info *ps_init(uint8_t sr_index);
139void ps_free(ps_info *ps);
140
141uint8_t ps_decode(ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64]);
142
143
144#ifdef __cplusplus
145}
146#endif
147#endif
148
diff --git a/apps/codecs/libfaad/ps_syntax.c b/apps/codecs/libfaad/ps_syntax.c
new file mode 100644
index 0000000000..6c909c01f6
--- /dev/null
+++ b/apps/codecs/libfaad/ps_syntax.c
@@ -0,0 +1,545 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR and PS decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#include "common.h"
29
30#ifdef PS_DEC
31
32#include "bits.h"
33#include "ps_dec.h"
34
35/* type definitaions */
36typedef const int8_t (*ps_huff_tab)[2];
37
38/* static data tables */
39static const uint8_t nr_iid_par_tab[] = {
40 10, 20, 34, 10, 20, 34, 0, 0
41};
42static const uint8_t nr_ipdopd_par_tab[] = {
43 5, 11, 17, 5, 11, 17, 0, 0
44};
45static const uint8_t nr_icc_par_tab[] = {
46 10, 20, 34, 10, 20, 34, 0, 0
47};
48static const uint8_t num_env_tab[][4] = {
49 { 0, 1, 2, 4 },
50 { 1, 2, 3, 4 }
51};
52
53/* binary lookup huffman tables */
54static const int8_t f_huff_iid_def[][2] = {
55 { /*0*/ -31, 1 }, /* index 0: 1 bits: x */
56 { 2, 3 }, /* index 1: 2 bits: 1x */
57 { /*1*/ -30, /*-1*/ -32 }, /* index 2: 3 bits: 10x */
58 { 4, 5 }, /* index 3: 3 bits: 11x */
59 { /*2*/ -29, /*-2*/ -33 }, /* index 4: 4 bits: 110x */
60 { 6, 7 }, /* index 5: 4 bits: 111x */
61 { /*3*/ -28, /*-3*/ -34 }, /* index 6: 5 bits: 1110x */
62 { 8, 9 }, /* index 7: 5 bits: 1111x */
63 { /*-4*/ -35, /*4*/ -27 }, /* index 8: 6 bits: 11110x */
64 { /*5*/ -26, 10 }, /* index 9: 6 bits: 11111x */
65 { /*-5*/ -36, 11 }, /* index 10: 7 bits: 111111x */
66 { /*6*/ -25, 12 }, /* index 11: 8 bits: 1111111x */
67 { /*-6*/ -37, 13 }, /* index 12: 9 bits: 11111111x */
68 { /*-7*/ -38, 14 }, /* index 13: 10 bits: 111111111x */
69 { /*7*/ -24, 15 }, /* index 14: 11 bits: 1111111111x */
70 { 16, 17 }, /* index 15: 12 bits: 11111111111x */
71 { /*8*/ -23, /*-8*/ -39 }, /* index 16: 13 bits: 111111111110x */
72 { 18, 19 }, /* index 17: 13 bits: 111111111111x */
73 { /*9*/ -22, /*10*/ -21 }, /* index 18: 14 bits: 1111111111110x */
74 { 20, 21 }, /* index 19: 14 bits: 1111111111111x */
75 { /*-9*/ -40, /*11*/ -20 }, /* index 20: 15 bits: 11111111111110x */
76 { 22, 23 }, /* index 21: 15 bits: 11111111111111x */
77 { /*-10*/ -41, 24 }, /* index 22: 16 bits: 111111111111110x */
78 { 25, 26 }, /* index 23: 16 bits: 111111111111111x */
79 { /*-11*/ -42, /*-14*/ -45 }, /* index 24: 17 bits: 1111111111111101x */
80 { /*-13*/ -44, /*-12*/ -43 }, /* index 25: 17 bits: 1111111111111110x */
81 { /*12*/ -19, 27 }, /* index 26: 17 bits: 1111111111111111x */
82 { /*13*/ -18, /*14*/ -17 } /* index 27: 18 bits: 11111111111111111x */
83};
84
85static const int8_t t_huff_iid_def[][2] = {
86 { /*0*/ -31, 1 }, /* index 0: 1 bits: x */
87 { /*-1*/ -32, 2 }, /* index 1: 2 bits: 1x */
88 { /*1*/ -30, 3 }, /* index 2: 3 bits: 11x */
89 { /*-2*/ -33, 4 }, /* index 3: 4 bits: 111x */
90 { /*2*/ -29, 5 }, /* index 4: 5 bits: 1111x */
91 { /*-3*/ -34, 6 }, /* index 5: 6 bits: 11111x */
92 { /*3*/ -28, 7 }, /* index 6: 7 bits: 111111x */
93 { /*-4*/ -35, 8 }, /* index 7: 8 bits: 1111111x */
94 { /*4*/ -27, 9 }, /* index 8: 9 bits: 11111111x */
95 { /*-5*/ -36, 10 }, /* index 9: 10 bits: 111111111x */
96 { /*5*/ -26, 11 }, /* index 10: 11 bits: 1111111111x */
97 { /*-6*/ -37, 12 }, /* index 11: 12 bits: 11111111111x */
98 { /*6*/ -25, 13 }, /* index 12: 13 bits: 111111111111x */
99 { /*7*/ -24, 14 }, /* index 13: 14 bits: 1111111111111x */
100 { /*-7*/ -38, 15 }, /* index 14: 15 bits: 11111111111111x */
101 { 16, 17 }, /* index 15: 16 bits: 111111111111111x */
102 { /*8*/ -23, /*-8*/ -39 }, /* index 16: 17 bits: 1111111111111110x */
103 { 18, 19 }, /* index 17: 17 bits: 1111111111111111x */
104 { 20, 21 }, /* index 18: 18 bits: 11111111111111110x */
105 { 22, 23 }, /* index 19: 18 bits: 11111111111111111x */
106 { /*9*/ -22, /*-14*/ -45 }, /* index 20: 19 bits: 111111111111111100x */
107 { /*-13*/ -44, /*-12*/ -43 }, /* index 21: 19 bits: 111111111111111101x */
108 { 24, 25 }, /* index 22: 19 bits: 111111111111111110x */
109 { 26, 27 }, /* index 23: 19 bits: 111111111111111111x */
110 { /*-11*/ -42, /*-10*/ -41 }, /* index 24: 20 bits: 1111111111111111100x */
111 { /*-9*/ -40, /*10*/ -21 }, /* index 25: 20 bits: 1111111111111111101x */
112 { /*11*/ -20, /*12*/ -19 }, /* index 26: 20 bits: 1111111111111111110x */
113 { /*13*/ -18, /*14*/ -17 } /* index 27: 20 bits: 1111111111111111111x */
114};
115
116static const int8_t f_huff_iid_fine[][2] = {
117 { 1, /*0*/ -31 }, /* index 0: 1 bits: x */
118 { 2, 3 }, /* index 1: 2 bits: 0x */
119 { 4, /*-1*/ -32 }, /* index 2: 3 bits: 00x */
120 { /*1*/ -30, 5 }, /* index 3: 3 bits: 01x */
121 { /*-2*/ -33, /*2*/ -29 }, /* index 4: 4 bits: 000x */
122 { 6, 7 }, /* index 5: 4 bits: 011x */
123 { /*-3*/ -34, /*3*/ -28 }, /* index 6: 5 bits: 0110x */
124 { 8, 9 }, /* index 7: 5 bits: 0111x */
125 { /*-4*/ -35, /*4*/ -27 }, /* index 8: 6 bits: 01110x */
126 { 10, 11 }, /* index 9: 6 bits: 01111x */
127 { /*-5*/ -36, /*5*/ -26 }, /* index 10: 7 bits: 011110x */
128 { 12, 13 }, /* index 11: 7 bits: 011111x */
129 { /*-6*/ -37, /*6*/ -25 }, /* index 12: 8 bits: 0111110x */
130 { 14, 15 }, /* index 13: 8 bits: 0111111x */
131 { /*7*/ -24, 16 }, /* index 14: 9 bits: 01111110x */
132 { 17, 18 }, /* index 15: 9 bits: 01111111x */
133 { 19, /*-8*/ -39 }, /* index 16: 10 bits: 011111101x */
134 { /*8*/ -23, 20 }, /* index 17: 10 bits: 011111110x */
135 { 21, /*-7*/ -38 }, /* index 18: 10 bits: 011111111x */
136 { /*10*/ -21, 22 }, /* index 19: 11 bits: 0111111010x */
137 { 23, /*-9*/ -40 }, /* index 20: 11 bits: 0111111101x */
138 { /*9*/ -22, 24 }, /* index 21: 11 bits: 0111111110x */
139 { /*-11*/ -42, /*11*/ -20 }, /* index 22: 12 bits: 01111110101x */
140 { 25, 26 }, /* index 23: 12 bits: 01111111010x */
141 { 27, /*-10*/ -41 }, /* index 24: 12 bits: 01111111101x */
142 { 28, /*-12*/ -43 }, /* index 25: 13 bits: 011111110100x */
143 { /*12*/ -19, 29 }, /* index 26: 13 bits: 011111110101x */
144 { 30, 31 }, /* index 27: 13 bits: 011111111010x */
145 { 32, /*-14*/ -45 }, /* index 28: 14 bits: 0111111101000x */
146 { /*14*/ -17, 33 }, /* index 29: 14 bits: 0111111101011x */
147 { 34, /*-13*/ -44 }, /* index 30: 14 bits: 0111111110100x */
148 { /*13*/ -18, 35 }, /* index 31: 14 bits: 0111111110101x */
149 { 36, 37 }, /* index 32: 15 bits: 01111111010000x */
150 { 38, /*-15*/ -46 }, /* index 33: 15 bits: 01111111010111x */
151 { /*15*/ -16, 39 }, /* index 34: 15 bits: 01111111101000x */
152 { 40, 41 }, /* index 35: 15 bits: 01111111101011x */
153 { 42, 43 }, /* index 36: 16 bits: 011111110100000x */
154 { /*-17*/ -48, /*17*/ -14 }, /* index 37: 16 bits: 011111110100001x */
155 { 44, 45 }, /* index 38: 16 bits: 011111110101110x */
156 { 46, 47 }, /* index 39: 16 bits: 011111111010001x */
157 { 48, 49 }, /* index 40: 16 bits: 011111111010110x */
158 { /*-16*/ -47, /*16*/ -15 }, /* index 41: 16 bits: 011111111010111x */
159 { /*-21*/ -52, /*21*/ -10 }, /* index 42: 17 bits: 0111111101000000x */
160 { /*-19*/ -50, /*19*/ -12 }, /* index 43: 17 bits: 0111111101000001x */
161 { /*-18*/ -49, /*18*/ -13 }, /* index 44: 17 bits: 0111111101011100x */
162 { 50, 51 }, /* index 45: 17 bits: 0111111101011101x */
163 { 52, 53 }, /* index 46: 17 bits: 0111111110100010x */
164 { 54, 55 }, /* index 47: 17 bits: 0111111110100011x */
165 { 56, 57 }, /* index 48: 17 bits: 0111111110101100x */
166 { 58, 59 }, /* index 49: 17 bits: 0111111110101101x */
167 { /*-26*/ -57, /*-25*/ -56 }, /* index 50: 18 bits: 01111111010111010x */
168 { /*-28*/ -59, /*-27*/ -58 }, /* index 51: 18 bits: 01111111010111011x */
169 { /*-22*/ -53, /*22*/ -9 }, /* index 52: 18 bits: 01111111101000100x */
170 { /*-24*/ -55, /*-23*/ -54 }, /* index 53: 18 bits: 01111111101000101x */
171 { /*25*/ -6, /*26*/ -5 }, /* index 54: 18 bits: 01111111101000110x */
172 { /*23*/ -8, /*24*/ -7 }, /* index 55: 18 bits: 01111111101000111x */
173 { /*29*/ -2, /*30*/ -1 }, /* index 56: 18 bits: 01111111101011000x */
174 { /*27*/ -4, /*28*/ -3 }, /* index 57: 18 bits: 01111111101011001x */
175 { /*-30*/ -61, /*-29*/ -60 }, /* index 58: 18 bits: 01111111101011010x */
176 { /*-20*/ -51, /*20*/ -11 } /* index 59: 18 bits: 01111111101011011x */
177};
178
179static const int8_t t_huff_iid_fine[][2] = {
180 { 1, /*0*/ -31 }, /* index 0: 1 bits: x */
181 { /*1*/ -30, 2 }, /* index 1: 2 bits: 0x */
182 { 3, /*-1*/ -32 }, /* index 2: 3 bits: 01x */
183 { 4, 5 }, /* index 3: 4 bits: 010x */
184 { 6, 7 }, /* index 4: 5 bits: 0100x */
185 { /*-2*/ -33, /*2*/ -29 }, /* index 5: 5 bits: 0101x */
186 { 8, /*-3*/ -34 }, /* index 6: 6 bits: 01000x */
187 { /*3*/ -28, 9 }, /* index 7: 6 bits: 01001x */
188 { /*-4*/ -35, /*4*/ -27 }, /* index 8: 7 bits: 010000x */
189 { 10, 11 }, /* index 9: 7 bits: 010011x */
190 { /*5*/ -26, 12 }, /* index 10: 8 bits: 0100110x */
191 { 13, 14 }, /* index 11: 8 bits: 0100111x */
192 { /*-6*/ -37, /*6*/ -25 }, /* index 12: 9 bits: 01001101x */
193 { 15, 16 }, /* index 13: 9 bits: 01001110x */
194 { 17, /*-5*/ -36 }, /* index 14: 9 bits: 01001111x */
195 { 18, /*-7*/ -38 }, /* index 15: 10 bits: 010011100x */
196 { /*7*/ -24, 19 }, /* index 16: 10 bits: 010011101x */
197 { 20, 21 }, /* index 17: 10 bits: 010011110x */
198 { /*9*/ -22, 22 }, /* index 18: 11 bits: 0100111000x */
199 { 23, 24 }, /* index 19: 11 bits: 0100111011x */
200 { /*-8*/ -39, /*8*/ -23 }, /* index 20: 11 bits: 0100111100x */
201 { 25, 26 }, /* index 21: 11 bits: 0100111101x */
202 { /*11*/ -20, 27 }, /* index 22: 12 bits: 01001110001x */
203 { 28, 29 }, /* index 23: 12 bits: 01001110110x */
204 { /*-10*/ -41, /*10*/ -21 }, /* index 24: 12 bits: 01001110111x */
205 { 30, 31 }, /* index 25: 12 bits: 01001111010x */
206 { 32, /*-9*/ -40 }, /* index 26: 12 bits: 01001111011x */
207 { 33, /*-13*/ -44 }, /* index 27: 13 bits: 010011100011x */
208 { /*13*/ -18, 34 }, /* index 28: 13 bits: 010011101100x */
209 { 35, 36 }, /* index 29: 13 bits: 010011101101x */
210 { 37, /*-12*/ -43 }, /* index 30: 13 bits: 010011110100x */
211 { /*12*/ -19, 38 }, /* index 31: 13 bits: 010011110101x */
212 { 39, /*-11*/ -42 }, /* index 32: 13 bits: 010011110110x */
213 { 40, 41 }, /* index 33: 14 bits: 0100111000110x */
214 { 42, 43 }, /* index 34: 14 bits: 0100111011001x */
215 { 44, 45 }, /* index 35: 14 bits: 0100111011010x */
216 { 46, /*-15*/ -46 }, /* index 36: 14 bits: 0100111011011x */
217 { /*15*/ -16, 47 }, /* index 37: 14 bits: 0100111101000x */
218 { /*-14*/ -45, /*14*/ -17 }, /* index 38: 14 bits: 0100111101011x */
219 { 48, 49 }, /* index 39: 14 bits: 0100111101100x */
220 { /*-21*/ -52, /*-20*/ -51 }, /* index 40: 15 bits: 01001110001100x */
221 { /*18*/ -13, /*19*/ -12 }, /* index 41: 15 bits: 01001110001101x */
222 { /*-19*/ -50, /*-18*/ -49 }, /* index 42: 15 bits: 01001110110010x */
223 { 50, 51 }, /* index 43: 15 bits: 01001110110011x */
224 { 52, 53 }, /* index 44: 15 bits: 01001110110100x */
225 { 54, 55 }, /* index 45: 15 bits: 01001110110101x */
226 { 56, /*-17*/ -48 }, /* index 46: 15 bits: 01001110110110x */
227 { /*17*/ -14, 57 }, /* index 47: 15 bits: 01001111010001x */
228 { 58, /*-16*/ -47 }, /* index 48: 15 bits: 01001111011000x */
229 { /*16*/ -15, 59 }, /* index 49: 15 bits: 01001111011001x */
230 { /*-26*/ -57, /*26*/ -5 }, /* index 50: 16 bits: 010011101100110x */
231 { /*-28*/ -59, /*-27*/ -58 }, /* index 51: 16 bits: 010011101100111x */
232 { /*29*/ -2, /*30*/ -1 }, /* index 52: 16 bits: 010011101101000x */
233 { /*27*/ -4, /*28*/ -3 }, /* index 53: 16 bits: 010011101101001x */
234 { /*-30*/ -61, /*-29*/ -60 }, /* index 54: 16 bits: 010011101101010x */
235 { /*-25*/ -56, /*25*/ -6 }, /* index 55: 16 bits: 010011101101011x */
236 { /*-24*/ -55, /*24*/ -7 }, /* index 56: 16 bits: 010011101101100x */
237 { /*-23*/ -54, /*23*/ -8 }, /* index 57: 16 bits: 010011110100011x */
238 { /*-22*/ -53, /*22*/ -9 }, /* index 58: 16 bits: 010011110110000x */
239 { /*20*/ -11, /*21*/ -10 } /* index 59: 16 bits: 010011110110011x */
240};
241
242static const int8_t f_huff_icc[][2] = {
243 { /*0*/ -31, 1 }, /* index 0: 1 bits: x */
244 { /*1*/ -30, 2 }, /* index 1: 2 bits: 1x */
245 { /*-1*/ -32, 3 }, /* index 2: 3 bits: 11x */
246 { /*2*/ -29, 4 }, /* index 3: 4 bits: 111x */
247 { /*-2*/ -33, 5 }, /* index 4: 5 bits: 1111x */
248 { /*3*/ -28, 6 }, /* index 5: 6 bits: 11111x */
249 { /*-3*/ -34, 7 }, /* index 6: 7 bits: 111111x */
250 { /*4*/ -27, 8 }, /* index 7: 8 bits: 1111111x */
251 { /*5*/ -26, 9 }, /* index 8: 9 bits: 11111111x */
252 { /*-4*/ -35, 10 }, /* index 9: 10 bits: 111111111x */
253 { /*6*/ -25, 11 }, /* index 10: 11 bits: 1111111111x */
254 { /*-5*/ -36, 12 }, /* index 11: 12 bits: 11111111111x */
255 { /*7*/ -24, 13 }, /* index 12: 13 bits: 111111111111x */
256 { /*-6*/ -37, /*-7*/ -38 } /* index 13: 14 bits: 1111111111111x */
257};
258
259static const int8_t t_huff_icc[][2] = {
260 { /*0*/ -31, 1 }, /* index 0: 1 bits: x */
261 { /*1*/ -30, 2 }, /* index 1: 2 bits: 1x */
262 { /*-1*/ -32, 3 }, /* index 2: 3 bits: 11x */
263 { /*2*/ -29, 4 }, /* index 3: 4 bits: 111x */
264 { /*-2*/ -33, 5 }, /* index 4: 5 bits: 1111x */
265 { /*3*/ -28, 6 }, /* index 5: 6 bits: 11111x */
266 { /*-3*/ -34, 7 }, /* index 6: 7 bits: 111111x */
267 { /*4*/ -27, 8 }, /* index 7: 8 bits: 1111111x */
268 { /*-4*/ -35, 9 }, /* index 8: 9 bits: 11111111x */
269 { /*5*/ -26, 10 }, /* index 9: 10 bits: 111111111x */
270 { /*-5*/ -36, 11 }, /* index 10: 11 bits: 1111111111x */
271 { /*6*/ -25, 12 }, /* index 11: 12 bits: 11111111111x */
272 { /*-6*/ -37, 13 }, /* index 12: 13 bits: 111111111111x */
273 { /*-7*/ -38, /*7*/ -24 } /* index 13: 14 bits: 1111111111111x */
274};
275
276static const int8_t f_huff_ipd[][2] = {
277 { 1, /*0*/ -31 }, /* index 0: 1 bits: x */
278 { 2, 3 }, /* index 1: 2 bits: 0x */
279 { /*1*/ -30, 4 }, /* index 2: 3 bits: 00x */
280 { 5, 6 }, /* index 3: 3 bits: 01x */
281 { /*4*/ -27, /*5*/ -26 }, /* index 4: 4 bits: 001x */
282 { /*3*/ -28, /*6*/ -25 }, /* index 5: 4 bits: 010x */
283 { /*2*/ -29, /*7*/ -24 } /* index 6: 4 bits: 011x */
284};
285
286static const int8_t t_huff_ipd[][2] = {
287 { 1, /*0*/ -31 }, /* index 0: 1 bits: x */
288 { 2, 3 }, /* index 1: 2 bits: 0x */
289 { 4, 5 }, /* index 2: 3 bits: 00x */
290 { /*1*/ -30, /*7*/ -24 }, /* index 3: 3 bits: 01x */
291 { /*5*/ -26, 6 }, /* index 4: 4 bits: 000x */
292 { /*2*/ -29, /*6*/ -25 }, /* index 5: 4 bits: 001x */
293 { /*4*/ -27, /*3*/ -28 } /* index 6: 5 bits: 0001x */
294};
295
296static const int8_t f_huff_opd[][2] = {
297 { 1, /*0*/ -31 }, /* index 0: 1 bits: x */
298 { 2, 3 }, /* index 1: 2 bits: 0x */
299 { /*7*/ -24, /*1*/ -30 }, /* index 2: 3 bits: 00x */
300 { 4, 5 }, /* index 3: 3 bits: 01x */
301 { /*3*/ -28, /*6*/ -25 }, /* index 4: 4 bits: 010x */
302 { /*2*/ -29, 6 }, /* index 5: 4 bits: 011x */
303 { /*5*/ -26, /*4*/ -27 } /* index 6: 5 bits: 0111x */
304};
305
306static const int8_t t_huff_opd[][2] = {
307 { 1, /*0*/ -31 }, /* index 0: 1 bits: x */
308 { 2, 3 }, /* index 1: 2 bits: 0x */
309 { 4, 5 }, /* index 2: 3 bits: 00x */
310 { /*1*/ -30, /*7*/ -24 }, /* index 3: 3 bits: 01x */
311 { /*5*/ -26, 6 }, /* index 4: 4 bits: 000x */
312 { /*2*/ -29, /*6*/ -25 }, /* index 5: 4 bits: 001x */
313 { /*4*/ -27, /*3*/ -28 } /* index 6: 5 bits: 0001x */
314};
315
316/* static function declarations */
317static uint16_t ps_extension(ps_info *ps, bitfile *ld,
318 const uint8_t ps_extension_id,
319 const uint16_t num_bits_left);
320static void huff_data(bitfile *ld, const uint8_t dt, const uint8_t nr_par,
321 ps_huff_tab t_huff, ps_huff_tab f_huff, int8_t *par);
322static INLINE int8_t ps_huff_dec(bitfile *ld, ps_huff_tab t_huff);
323
324
325uint16_t ps_data(ps_info *ps, bitfile *ld, uint8_t *header)
326{
327 uint8_t tmp, n;
328 uint16_t bits = (uint16_t)faad_get_processed_bits(ld);
329
330 *header = 0;
331
332 /* check for new PS header */
333 if (faad_get1bit(ld
334 DEBUGVAR(1,1000,"ps_data(): enable_ps_header")))
335 {
336 *header = 1;
337
338 ps->header_read = 1;
339
340 ps->use34hybrid_bands = 0;
341
342 /* Inter-channel Intensity Difference (IID) parameters enabled */
343 ps->enable_iid = (uint8_t)faad_get1bit(ld
344 DEBUGVAR(1,1001,"ps_data(): enable_iid"));
345
346 if (ps->enable_iid)
347 {
348 ps->iid_mode = (uint8_t)faad_getbits(ld, 3
349 DEBUGVAR(1,1002,"ps_data(): iid_mode"));
350
351 ps->nr_iid_par = nr_iid_par_tab[ps->iid_mode];
352 ps->nr_ipdopd_par = nr_ipdopd_par_tab[ps->iid_mode];
353
354 if (ps->iid_mode == 2 || ps->iid_mode == 5)
355 ps->use34hybrid_bands = 1;
356
357 /* IPD freq res equal to IID freq res */
358 ps->ipd_mode = ps->iid_mode;
359 }
360
361 /* Inter-channel Coherence (ICC) parameters enabled */
362 ps->enable_icc = (uint8_t)faad_get1bit(ld
363 DEBUGVAR(1,1003,"ps_data(): enable_icc"));
364
365 if (ps->enable_icc)
366 {
367 ps->icc_mode = (uint8_t)faad_getbits(ld, 3
368 DEBUGVAR(1,1004,"ps_data(): icc_mode"));
369
370 ps->nr_icc_par = nr_icc_par_tab[ps->icc_mode];
371
372 if (ps->icc_mode == 2 || ps->icc_mode == 5)
373 ps->use34hybrid_bands = 1;
374 }
375
376 /* PS extension layer enabled */
377 ps->enable_ext = (uint8_t)faad_get1bit(ld
378 DEBUGVAR(1,1005,"ps_data(): enable_ext"));
379 }
380
381 /* we are here, but no header has been read yet */
382 if (ps->header_read == 0)
383 return 1;
384
385 ps->frame_class = (uint8_t)faad_get1bit(ld
386 DEBUGVAR(1,1006,"ps_data(): frame_class"));
387 tmp = (uint8_t)faad_getbits(ld, 2
388 DEBUGVAR(1,1007,"ps_data(): num_env_idx"));
389
390 ps->num_env = num_env_tab[ps->frame_class][tmp];
391
392 if (ps->frame_class)
393 {
394 for (n = 1; n < ps->num_env+1; n++)
395 {
396 ps->border_position[n] = (uint8_t)faad_getbits(ld, 5
397 DEBUGVAR(1,1008,"ps_data(): border_position"));
398 }
399 }
400
401 if (ps->enable_iid)
402 {
403 for (n = 0; n < ps->num_env; n++)
404 {
405 ps->iid_dt[n] = (uint8_t)faad_get1bit(ld
406 DEBUGVAR(1,1009,"ps_data(): iid_dt"));
407
408 /* iid_data */
409 if (ps->iid_mode < 3)
410 {
411 huff_data(ld, ps->iid_dt[n], ps->nr_iid_par, t_huff_iid_def,
412 f_huff_iid_def, ps->iid_index[n]);
413 } else {
414 huff_data(ld, ps->iid_dt[n], ps->nr_iid_par, t_huff_iid_fine,
415 f_huff_iid_fine, ps->iid_index[n]);
416 }
417 }
418 }
419
420 if (ps->enable_icc)
421 {
422 for (n = 0; n < ps->num_env; n++)
423 {
424 ps->icc_dt[n] = (uint8_t)faad_get1bit(ld
425 DEBUGVAR(1,1010,"ps_data(): icc_dt"));
426
427 /* icc_data */
428 huff_data(ld, ps->icc_dt[n], ps->nr_icc_par, t_huff_icc,
429 f_huff_icc, ps->icc_index[n]);
430 }
431 }
432
433 if (ps->enable_ext)
434 {
435 uint16_t num_bits_left;
436 uint16_t cnt = (uint16_t)faad_getbits(ld, 4
437 DEBUGVAR(1,1011,"ps_data(): ps_extension_size"));
438 if (cnt == 15)
439 {
440 cnt += (uint16_t)faad_getbits(ld, 8
441 DEBUGVAR(1,1012,"ps_data(): esc_count"));
442 }
443
444 num_bits_left = 8 * cnt;
445 while (num_bits_left > 7)
446 {
447 uint8_t ps_extension_id = (uint8_t)faad_getbits(ld, 2
448 DEBUGVAR(1,1013,"ps_data(): ps_extension_size"));
449
450 num_bits_left -= 2;
451 num_bits_left -= ps_extension(ps, ld, ps_extension_id, num_bits_left);
452 }
453
454 faad_getbits(ld, num_bits_left
455 DEBUGVAR(1,1014,"ps_data(): fill_bits"));
456 }
457
458 bits = (uint16_t)faad_get_processed_bits(ld) - bits;
459
460 ps->ps_data_available = 1;
461
462 return bits;
463}
464
465static uint16_t ps_extension(ps_info *ps, bitfile *ld,
466 const uint8_t ps_extension_id,
467 const uint16_t num_bits_left)
468{
469 uint8_t n;
470 uint16_t bits = (uint16_t)faad_get_processed_bits(ld);
471
472 if (ps_extension_id == 0)
473 {
474 ps->enable_ipdopd = (uint8_t)faad_get1bit(ld
475 DEBUGVAR(1,1015,"ps_extension(): enable_ipdopd"));
476
477 if (ps->enable_ipdopd)
478 {
479 for (n = 0; n < ps->num_env; n++)
480 {
481 ps->ipd_dt[n] = (uint8_t)faad_get1bit(ld
482 DEBUGVAR(1,1016,"ps_extension(): ipd_dt"));
483
484 /* ipd_data */
485 huff_data(ld, ps->ipd_dt[n], ps->nr_ipdopd_par, t_huff_ipd,
486 f_huff_ipd, ps->ipd_index[n]);
487
488 ps->opd_dt[n] = (uint8_t)faad_get1bit(ld
489 DEBUGVAR(1,1017,"ps_extension(): opd_dt"));
490
491 /* opd_data */
492 huff_data(ld, ps->opd_dt[n], ps->nr_ipdopd_par, t_huff_opd,
493 f_huff_opd, ps->opd_index[n]);
494 }
495 }
496 faad_get1bit(ld
497 DEBUGVAR(1,1018,"ps_extension(): reserved_ps"));
498 }
499
500 /* return number of bits read */
501 bits = (uint16_t)faad_get_processed_bits(ld) - bits;
502
503 return bits;
504}
505
506/* read huffman data coded in either the frequency or the time direction */
507static void huff_data(bitfile *ld, const uint8_t dt, const uint8_t nr_par,
508 ps_huff_tab t_huff, ps_huff_tab f_huff, int8_t *par)
509{
510 uint8_t n;
511
512 if (dt)
513 {
514 /* coded in time direction */
515 for (n = 0; n < nr_par; n++)
516 {
517 par[n] = ps_huff_dec(ld, t_huff);
518 }
519 } else {
520 /* coded in frequency direction */
521 par[0] = ps_huff_dec(ld, f_huff);
522
523 for (n = 1; n < nr_par; n++)
524 {
525 par[n] = ps_huff_dec(ld, f_huff);
526 }
527 }
528}
529
530/* binary search huffman decoding */
531static INLINE int8_t ps_huff_dec(bitfile *ld, ps_huff_tab t_huff)
532{
533 uint8_t bit;
534 int16_t index = 0;
535
536 while (index >= 0)
537 {
538 bit = (uint8_t)faad_get1bit(ld);
539 index = t_huff[index][bit];
540 }
541
542 return index + 31;
543}
544
545#endif
diff --git a/apps/codecs/libfaad/ps_tables.h b/apps/codecs/libfaad/ps_tables.h
new file mode 100644
index 0000000000..83cd20abbf
--- /dev/null
+++ b/apps/codecs/libfaad/ps_tables.h
@@ -0,0 +1,547 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __PS_TABLES_H__
29#define __PS_TABLES_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#ifdef _MSC_VER
36#pragma warning(disable:4305)
37#pragma warning(disable:4244)
38#endif
39
40#if 0
41#if 0
42float f_center_20[12] = {
43 0.5/4, 1.5/4, 2.5/4, 3.5/4,
44 4.5/4*0, 5.5/4*0, -1.5/4, -0.5/4,
45 3.5/2, 2.5/2, 4.5/2, 5.5/2
46};
47#else
48float f_center_20[12] = {
49 0.5/8, 1.5/8, 2.5/8, 3.5/8,
50 4.5/8*0, 5.5/8*0, -1.5/8, -0.5/8,
51 3.5/4, 2.5/4, 4.5/4, 5.5/4
52};
53#endif
54
55float f_center_34[32] = {
56 1/12, 3/12, 5/12, 7/12,
57 9/12, 11/12, 13/12, 15/12,
58 17/12, -5/12, -3/12, -1/12,
59 17/8, 19/8, 5/8, 7/8,
60 9/8, 11/8, 13/8, 15/8,
61 9/4, 11/4, 13/4, 7/4,
62 17/4, 11/4, 13/4, 15/4,
63 17/4, 19/4, 21/4, 15/4
64};
65
66static const real_t frac_delay_q[] = {
67 FRAC_CONST(0.43),
68 FRAC_CONST(0.75),
69 FRAC_CONST(0.347)
70};
71#endif
72
73/* RE(ps->Phi_Fract_Qmf[j]) = (float)cos(M_PI*(j+0.5)*(0.39)); */
74/* IM(ps->Phi_Fract_Qmf[j]) = (float)sin(M_PI*(j+0.5)*(0.39)); */
75static const complex_t Phi_Fract_Qmf[] = {
76 { FRAC_CONST(0.8181497455), FRAC_CONST(0.5750052333) },
77 { FRAC_CONST(-0.2638730407), FRAC_CONST(0.9645574093) },
78 { FRAC_CONST(-0.9969173074), FRAC_CONST(0.0784590989) },
79 { FRAC_CONST(-0.4115143716), FRAC_CONST(-0.9114032984) },
80 { FRAC_CONST(0.7181262970), FRAC_CONST(-0.6959127784) },
81 { FRAC_CONST(0.8980275989), FRAC_CONST(0.4399391711) },
82 { FRAC_CONST(-0.1097343117), FRAC_CONST(0.9939609766) },
83 { FRAC_CONST(-0.9723699093), FRAC_CONST(0.2334453613) },
84 { FRAC_CONST(-0.5490227938), FRAC_CONST(-0.8358073831) },
85 { FRAC_CONST(0.6004202366), FRAC_CONST(-0.7996846437) },
86 { FRAC_CONST(0.9557930231), FRAC_CONST(0.2940403223) },
87 { FRAC_CONST(0.0471064523), FRAC_CONST(0.9988898635) },
88 { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) },
89 { FRAC_CONST(-0.6730124950), FRAC_CONST(-0.7396311164) },
90 { FRAC_CONST(0.4679298103), FRAC_CONST(-0.8837656379) },
91 { FRAC_CONST(0.9900236726), FRAC_CONST(0.1409012377) },
92 { FRAC_CONST(0.2027872950), FRAC_CONST(0.9792228341) },
93 { FRAC_CONST(-0.8526401520), FRAC_CONST(0.5224985480) },
94 { FRAC_CONST(-0.7804304361), FRAC_CONST(-0.6252426505) },
95 { FRAC_CONST(0.3239174187), FRAC_CONST(-0.9460853338) },
96 { FRAC_CONST(0.9998766184), FRAC_CONST(-0.0157073177) },
97 { FRAC_CONST(0.3534748554), FRAC_CONST(0.9354440570) },
98 { FRAC_CONST(-0.7604059577), FRAC_CONST(0.6494480371) },
99 { FRAC_CONST(-0.8686315417), FRAC_CONST(-0.4954586625) },
100 { FRAC_CONST(0.1719291061), FRAC_CONST(-0.9851093292) },
101 { FRAC_CONST(0.9851093292), FRAC_CONST(-0.1719291061) },
102 { FRAC_CONST(0.4954586625), FRAC_CONST(0.8686315417) },
103 { FRAC_CONST(-0.6494480371), FRAC_CONST(0.7604059577) },
104 { FRAC_CONST(-0.9354440570), FRAC_CONST(-0.3534748554) },
105 { FRAC_CONST(0.0157073177), FRAC_CONST(-0.9998766184) },
106 { FRAC_CONST(0.9460853338), FRAC_CONST(-0.3239174187) },
107 { FRAC_CONST(0.6252426505), FRAC_CONST(0.7804304361) },
108 { FRAC_CONST(-0.5224985480), FRAC_CONST(0.8526401520) },
109 { FRAC_CONST(-0.9792228341), FRAC_CONST(-0.2027872950) },
110 { FRAC_CONST(-0.1409012377), FRAC_CONST(-0.9900236726) },
111 { FRAC_CONST(0.8837656379), FRAC_CONST(-0.4679298103) },
112 { FRAC_CONST(0.7396311164), FRAC_CONST(0.6730124950) },
113 { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) },
114 { FRAC_CONST(-0.9988898635), FRAC_CONST(-0.0471064523) },
115 { FRAC_CONST(-0.2940403223), FRAC_CONST(-0.9557930231) },
116 { FRAC_CONST(0.7996846437), FRAC_CONST(-0.6004202366) },
117 { FRAC_CONST(0.8358073831), FRAC_CONST(0.5490227938) },
118 { FRAC_CONST(-0.2334453613), FRAC_CONST(0.9723699093) },
119 { FRAC_CONST(-0.9939609766), FRAC_CONST(0.1097343117) },
120 { FRAC_CONST(-0.4399391711), FRAC_CONST(-0.8980275989) },
121 { FRAC_CONST(0.6959127784), FRAC_CONST(-0.7181262970) },
122 { FRAC_CONST(0.9114032984), FRAC_CONST(0.4115143716) },
123 { FRAC_CONST(-0.0784590989), FRAC_CONST(0.9969173074) },
124 { FRAC_CONST(-0.9645574093), FRAC_CONST(0.2638730407) },
125 { FRAC_CONST(-0.5750052333), FRAC_CONST(-0.8181497455) },
126 { FRAC_CONST(0.5750052333), FRAC_CONST(-0.8181497455) },
127 { FRAC_CONST(0.9645574093), FRAC_CONST(0.2638730407) },
128 { FRAC_CONST(0.0784590989), FRAC_CONST(0.9969173074) },
129 { FRAC_CONST(-0.9114032984), FRAC_CONST(0.4115143716) },
130 { FRAC_CONST(-0.6959127784), FRAC_CONST(-0.7181262970) },
131 { FRAC_CONST(0.4399391711), FRAC_CONST(-0.8980275989) },
132 { FRAC_CONST(0.9939609766), FRAC_CONST(0.1097343117) },
133 { FRAC_CONST(0.2334453613), FRAC_CONST(0.9723699093) },
134 { FRAC_CONST(-0.8358073831), FRAC_CONST(0.5490227938) },
135 { FRAC_CONST(-0.7996846437), FRAC_CONST(-0.6004202366) },
136 { FRAC_CONST(0.2940403223), FRAC_CONST(-0.9557930231) },
137 { FRAC_CONST(0.9988898635), FRAC_CONST(-0.0471064523) },
138 { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) },
139 { FRAC_CONST(-0.7396311164), FRAC_CONST(0.6730124950) }
140};
141
142/* RE(Phi_Fract_SubQmf20[j]) = (float)cos(M_PI*f_center_20[j]*0.39); */
143/* IM(Phi_Fract_SubQmf20[j]) = (float)sin(M_PI*f_center_20[j]*0.39); */
144static const complex_t Phi_Fract_SubQmf20[] = {
145 { FRAC_CONST(0.9882950187), FRAC_CONST(0.1525546312) },
146 { FRAC_CONST(0.8962930441), FRAC_CONST(0.4434623122) },
147 { FRAC_CONST(0.7208535671), FRAC_CONST(0.6930873394) },
148 { FRAC_CONST(0.4783087075), FRAC_CONST(0.8781917691) },
149 { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) },
150 { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) },
151 { FRAC_CONST(0.8962930441), FRAC_CONST(-0.4434623122) },
152 { FRAC_CONST(0.9882950187), FRAC_CONST(-0.1525546312) },
153 { FRAC_CONST(-0.5424415469), FRAC_CONST(0.8400935531) },
154 { FRAC_CONST(0.0392598175), FRAC_CONST(0.9992290139) },
155 { FRAC_CONST(-0.9268565774), FRAC_CONST(0.3754155636) },
156 { FRAC_CONST(-0.9741733670), FRAC_CONST(-0.2258012742) }
157};
158
159/* RE(Phi_Fract_SubQmf34[j]) = (float)cos(M_PI*f_center_34[j]*0.39); */
160/* IM(Phi_Fract_SubQmf34[j]) = (float)sin(M_PI*f_center_34[j]*0.39); */
161static const complex_t Phi_Fract_SubQmf34[] = {
162 { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) },
163 { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) },
164 { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) },
165 { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) },
166 { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) },
167 { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) },
168 { FRAC_CONST(0.3387379348), FRAC_CONST(0.9408807755) },
169 { FRAC_CONST(0.3387379348), FRAC_CONST(0.9408807755) },
170 { FRAC_CONST(0.3387379348), FRAC_CONST(0.9408807755) },
171 { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) },
172 { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) },
173 { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) },
174 { FRAC_CONST(-0.7705132365), FRAC_CONST(0.6374239922) },
175 { FRAC_CONST(-0.7705132365), FRAC_CONST(0.6374239922) },
176 { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) },
177 { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) },
178 { FRAC_CONST(0.3387379348), FRAC_CONST(0.9408807755) },
179 { FRAC_CONST(0.3387379348), FRAC_CONST(0.9408807755) },
180 { FRAC_CONST(0.3387379348), FRAC_CONST(0.9408807755) },
181 { FRAC_CONST(0.3387379348), FRAC_CONST(0.9408807755) },
182 { FRAC_CONST(-0.7705132365), FRAC_CONST(0.6374239922) },
183 { FRAC_CONST(-0.7705132365), FRAC_CONST(0.6374239922) },
184 { FRAC_CONST(-0.8607420325), FRAC_CONST(-0.5090414286) },
185 { FRAC_CONST(0.3387379348), FRAC_CONST(0.9408807755) },
186 { FRAC_CONST(0.1873813123), FRAC_CONST(-0.9822872281) },
187 { FRAC_CONST(-0.7705132365), FRAC_CONST(0.6374239922) },
188 { FRAC_CONST(-0.8607420325), FRAC_CONST(-0.5090414286) },
189 { FRAC_CONST(-0.8607420325), FRAC_CONST(-0.5090414286) },
190 { FRAC_CONST(0.1873813123), FRAC_CONST(-0.9822872281) },
191 { FRAC_CONST(0.1873813123), FRAC_CONST(-0.9822872281) },
192 { FRAC_CONST(0.9876883626), FRAC_CONST(-0.1564344615) },
193 { FRAC_CONST(-0.8607420325), FRAC_CONST(-0.5090414286) }
194};
195
196/* RE(Q_Fract_allpass_Qmf[j][i]) = (float)cos(M_PI*(j+0.5)*(frac_delay_q[i])); */
197/* IM(Q_Fract_allpass_Qmf[j][i]) = (float)sin(M_PI*(j+0.5)*(frac_delay_q[i])); */
198static const complex_t Q_Fract_allpass_Qmf[][3] = {
199 { { FRAC_CONST(0.7804303765), FRAC_CONST(0.6252426505) }, { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(0.8550928831), FRAC_CONST(0.5184748173) } },
200 { { FRAC_CONST(-0.4399392009), FRAC_CONST(0.8980275393) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(-0.0643581524), FRAC_CONST(0.9979268909) } },
201 { { FRAC_CONST(-0.9723699093), FRAC_CONST(-0.2334454209) }, { FRAC_CONST(0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(-0.9146071672), FRAC_CONST(0.4043435752) } },
202 { { FRAC_CONST(0.0157073960), FRAC_CONST(-0.9998766184) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(-0.7814115286), FRAC_CONST(-0.6240159869) } },
203 { { FRAC_CONST(0.9792228341), FRAC_CONST(-0.2027871907) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(0.1920081824), FRAC_CONST(-0.9813933372) } },
204 { { FRAC_CONST(0.4115142524), FRAC_CONST(0.9114032984) }, { FRAC_CONST(0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(0.9589683414), FRAC_CONST(-0.2835132182) } },
205 { { FRAC_CONST(-0.7996847630), FRAC_CONST(0.6004201174) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(0.6947838664), FRAC_CONST(0.7192186117) } },
206 { { FRAC_CONST(-0.7604058385), FRAC_CONST(-0.6494481564) }, { FRAC_CONST(0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(-0.3164770305), FRAC_CONST(0.9486001730) } },
207 { { FRAC_CONST(0.4679299891), FRAC_CONST(-0.8837655187) }, { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(-0.9874414206), FRAC_CONST(0.1579856575) } },
208 { { FRAC_CONST(0.9645573497), FRAC_CONST(0.2638732493) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(-0.5966450572), FRAC_CONST(-0.8025052547) } },
209 { { FRAC_CONST(-0.0471066870), FRAC_CONST(0.9988898635) }, { FRAC_CONST(0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.4357025325), FRAC_CONST(-0.9000906944) } },
210 { { FRAC_CONST(-0.9851093888), FRAC_CONST(0.1719288528) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(0.9995546937), FRAC_CONST(-0.0298405960) } },
211 { { FRAC_CONST(-0.3826831877), FRAC_CONST(-0.9238796234) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(0.4886211455), FRAC_CONST(0.8724960685) } },
212 { { FRAC_CONST(0.8181498647), FRAC_CONST(-0.5750049949) }, { FRAC_CONST(0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.5477093458), FRAC_CONST(0.8366686702) } },
213 { { FRAC_CONST(0.7396308780), FRAC_CONST(0.6730127335) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.9951074123), FRAC_CONST(-0.0987988561) } },
214 { { FRAC_CONST(-0.4954589605), FRAC_CONST(0.8686313629) }, { FRAC_CONST(0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(-0.3725017905), FRAC_CONST(-0.9280315042) } },
215 { { FRAC_CONST(-0.9557929039), FRAC_CONST(-0.2940406799) }, { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(0.6506417990), FRAC_CONST(-0.7593847513) } },
216 { { FRAC_CONST(0.0784594864), FRAC_CONST(-0.9969173074) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.9741733670), FRAC_CONST(0.2258014232) } },
217 { { FRAC_CONST(0.9900237322), FRAC_CONST(-0.1409008205) }, { FRAC_CONST(0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.2502108514), FRAC_CONST(0.9681913853) } },
218 { { FRAC_CONST(0.3534744382), FRAC_CONST(0.9354441762) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(-0.7427945137), FRAC_CONST(0.6695194840) } },
219 { { FRAC_CONST(-0.8358076215), FRAC_CONST(0.5490224361) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(-0.9370992780), FRAC_CONST(-0.3490629196) } },
220 { { FRAC_CONST(-0.7181259394), FRAC_CONST(-0.6959131360) }, { FRAC_CONST(0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.1237744763), FRAC_CONST(-0.9923103452) } },
221 { { FRAC_CONST(0.5224990249), FRAC_CONST(-0.8526399136) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(0.8226406574), FRAC_CONST(-0.5685616732) } },
222 { { FRAC_CONST(0.9460852146), FRAC_CONST(0.3239179254) }, { FRAC_CONST(0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(0.8844994903), FRAC_CONST(0.4665412009) } },
223 { { FRAC_CONST(-0.1097348556), FRAC_CONST(0.9939609170) }, { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(-0.0047125919), FRAC_CONST(0.9999889135) } },
224 { { FRAC_CONST(-0.9939610362), FRAC_CONST(0.1097337380) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(-0.8888573647), FRAC_CONST(0.4581840038) } },
225 { { FRAC_CONST(-0.3239168525), FRAC_CONST(-0.9460855722) }, { FRAC_CONST(0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(-0.8172453642), FRAC_CONST(-0.5762898922) } },
226 { { FRAC_CONST(0.8526405096), FRAC_CONST(-0.5224980116) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(0.1331215799), FRAC_CONST(-0.9910997152) } },
227 { { FRAC_CONST(0.6959123611), FRAC_CONST(0.7181267142) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(0.9403476119), FRAC_CONST(-0.3402152061) } },
228 { { FRAC_CONST(-0.5490233898), FRAC_CONST(0.8358070254) }, { FRAC_CONST(0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(0.7364512086), FRAC_CONST(0.6764906645) } },
229 { { FRAC_CONST(-0.9354437590), FRAC_CONST(-0.3534754813) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.2593250275), FRAC_CONST(0.9657900929) } },
230 { { FRAC_CONST(0.1409019381), FRAC_CONST(-0.9900235534) }, { FRAC_CONST(0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(-0.9762582779), FRAC_CONST(0.2166097313) } },
231 { { FRAC_CONST(0.9969173670), FRAC_CONST(-0.0784583688) }, { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(-0.6434556246), FRAC_CONST(-0.7654833794) } },
232 { { FRAC_CONST(0.2940396070), FRAC_CONST(0.9557932615) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.3812320232), FRAC_CONST(-0.9244794250) } },
233 { { FRAC_CONST(-0.8686318994), FRAC_CONST(0.4954580069) }, { FRAC_CONST(0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.9959943891), FRAC_CONST(-0.0894154981) } },
234 { { FRAC_CONST(-0.6730118990), FRAC_CONST(-0.7396316528) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(0.5397993922), FRAC_CONST(0.8417937160) } },
235 { { FRAC_CONST(0.5750059485), FRAC_CONST(-0.8181492686) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(-0.4968227744), FRAC_CONST(0.8678520322) } },
236 { { FRAC_CONST(0.9238792062), FRAC_CONST(0.3826842010) }, { FRAC_CONST(0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.9992290139), FRAC_CONST(-0.0392601527) } },
237 { { FRAC_CONST(-0.1719299555), FRAC_CONST(0.9851091504) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.4271997511), FRAC_CONST(-0.9041572809) } },
238 { { FRAC_CONST(-0.9988899231), FRAC_CONST(0.0471055657) }, { FRAC_CONST(0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(0.6041822433), FRAC_CONST(-0.7968461514) } },
239 { { FRAC_CONST(-0.2638721764), FRAC_CONST(-0.9645576477) }, { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(0.9859085083), FRAC_CONST(0.1672853529) } },
240 { { FRAC_CONST(0.8837660551), FRAC_CONST(-0.4679289758) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.3075223565), FRAC_CONST(0.9515408874) } },
241 { { FRAC_CONST(0.6494473219), FRAC_CONST(0.7604066133) }, { FRAC_CONST(0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(-0.7015317082), FRAC_CONST(0.7126382589) } },
242 { { FRAC_CONST(-0.6004210114), FRAC_CONST(0.7996840477) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(-0.9562535882), FRAC_CONST(-0.2925389707) } },
243 { { FRAC_CONST(-0.9114028811), FRAC_CONST(-0.4115152657) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(-0.1827499419), FRAC_CONST(-0.9831594229) } },
244 { { FRAC_CONST(0.2027882934), FRAC_CONST(-0.9792225957) }, { FRAC_CONST(0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(0.7872582674), FRAC_CONST(-0.6166234016) } },
245 { { FRAC_CONST(0.9998766780), FRAC_CONST(-0.0157062728) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(0.9107555747), FRAC_CONST(0.4129458666) } },
246 { { FRAC_CONST(0.2334443331), FRAC_CONST(0.9723701477) }, { FRAC_CONST(0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(0.0549497530), FRAC_CONST(0.9984891415) } },
247 { { FRAC_CONST(-0.8980280757), FRAC_CONST(0.4399381876) }, { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(-0.8599416018), FRAC_CONST(0.5103924870) } },
248 { { FRAC_CONST(-0.6252418160), FRAC_CONST(-0.7804310918) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(-0.8501682281), FRAC_CONST(-0.5265110731) } },
249 { { FRAC_CONST(0.6252435446), FRAC_CONST(-0.7804297209) }, { FRAC_CONST(0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.0737608299), FRAC_CONST(-0.9972759485) } },
250 { { FRAC_CONST(0.8980270624), FRAC_CONST(0.4399402142) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(0.9183775187), FRAC_CONST(-0.3957053721) } },
251 { { FRAC_CONST(-0.2334465086), FRAC_CONST(0.9723696709) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(0.7754954696), FRAC_CONST(0.6313531399) } },
252 { { FRAC_CONST(-0.9998766184), FRAC_CONST(-0.0157085191) }, { FRAC_CONST(0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.2012493610), FRAC_CONST(0.9795400500) } },
253 { { FRAC_CONST(-0.2027861029), FRAC_CONST(-0.9792230725) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.9615978599), FRAC_CONST(0.2744622827) } },
254 { { FRAC_CONST(0.9114037752), FRAC_CONST(-0.4115132093) }, { FRAC_CONST(0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(-0.6879743338), FRAC_CONST(-0.7257350087) } },
255 { { FRAC_CONST(0.6004192233), FRAC_CONST(0.7996854186) }, { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(0.3254036009), FRAC_CONST(-0.9455752373) } },
256 { { FRAC_CONST(-0.6494490504), FRAC_CONST(0.7604051232) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.9888865948), FRAC_CONST(-0.1486719251) } },
257 { { FRAC_CONST(-0.8837650418), FRAC_CONST(-0.4679309726) }, { FRAC_CONST(0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.5890548825), FRAC_CONST(0.8080930114) } },
258 { { FRAC_CONST(0.2638743520), FRAC_CONST(-0.9645570517) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(-0.4441666007), FRAC_CONST(0.8959442377) } },
259 { { FRAC_CONST(0.9988898039), FRAC_CONST(0.0471078083) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(-0.9997915030), FRAC_CONST(0.0204183888) } },
260 { { FRAC_CONST(0.1719277352), FRAC_CONST(0.9851095676) }, { FRAC_CONST(0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.4803760946), FRAC_CONST(-0.8770626187) } },
261 { { FRAC_CONST(-0.9238800406), FRAC_CONST(0.3826821446) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(0.5555707216), FRAC_CONST(-0.8314692974) } },
262 { { FRAC_CONST(-0.5750041008), FRAC_CONST(-0.8181505203) }, { FRAC_CONST(0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(0.9941320419), FRAC_CONST(0.1081734300) } }
263};
264
265/* RE(Q_Fract_allpass_SubQmf20[j][i]) = (float)cos(M_PI*f_center_20[j]*frac_delay_q[i]); */
266/* IM(Q_Fract_allpass_SubQmf20[j][i]) = (float)sin(M_PI*f_center_20[j]*frac_delay_q[i]); */
267static const complex_t Q_Fract_allpass_SubQmf20[][3] = {
268 { { FRAC_CONST(0.9857769012), FRAC_CONST(0.1680592746) }, { FRAC_CONST(0.9569403529), FRAC_CONST(0.2902846634) }, { FRAC_CONST(0.9907300472), FRAC_CONST(0.1358452588) } },
269 { { FRAC_CONST(0.8744080663), FRAC_CONST(0.4851911962) }, { FRAC_CONST(0.6343932748), FRAC_CONST(0.7730104327) }, { FRAC_CONST(0.9175986052), FRAC_CONST(0.3975082636) } },
270 { { FRAC_CONST(0.6642524004), FRAC_CONST(0.7475083470) }, { FRAC_CONST(0.0980171412), FRAC_CONST(0.9951847196) }, { FRAC_CONST(0.7767338753), FRAC_CONST(0.6298289299) } },
271 { { FRAC_CONST(0.3790524006), FRAC_CONST(0.9253752232) }, { FRAC_CONST(-0.4713967443), FRAC_CONST(0.8819212914) }, { FRAC_CONST(0.5785340071), FRAC_CONST(0.8156582713) } },
272 { { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) } },
273 { { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) } },
274 { { FRAC_CONST(0.8744080663), FRAC_CONST(-0.4851911962) }, { FRAC_CONST(0.6343932748), FRAC_CONST(-0.7730104327) }, { FRAC_CONST(0.9175986052), FRAC_CONST(-0.3975082636) } },
275 { { FRAC_CONST(0.9857769012), FRAC_CONST(-0.1680592746) }, { FRAC_CONST(0.9569403529), FRAC_CONST(-0.2902846634) }, { FRAC_CONST(0.9907300472), FRAC_CONST(-0.1358452588) } },
276 { { FRAC_CONST(-0.7126385570), FRAC_CONST(0.7015314102) }, { FRAC_CONST(-0.5555702448), FRAC_CONST(-0.8314695954) }, { FRAC_CONST(-0.3305967748), FRAC_CONST(0.9437720776) } },
277 { { FRAC_CONST(-0.1175374240), FRAC_CONST(0.9930684566) }, { FRAC_CONST(-0.9807852507), FRAC_CONST(0.1950903237) }, { FRAC_CONST(0.2066311091), FRAC_CONST(0.9784189463) } },
278 { { FRAC_CONST(-0.9947921634), FRAC_CONST(0.1019244045) }, { FRAC_CONST(0.5555702448), FRAC_CONST(-0.8314695954) }, { FRAC_CONST(-0.7720130086), FRAC_CONST(0.6356067061) } },
279 { { FRAC_CONST(-0.8400934935), FRAC_CONST(-0.5424416065) }, { FRAC_CONST(0.9807852507), FRAC_CONST(0.1950903237) }, { FRAC_CONST(-0.9896889329), FRAC_CONST(0.1432335079) } }
280};
281
282/* RE(Q_Fract_allpass_SubQmf34[j][i]) = (float)cos(M_PI*f_center_34[j]*frac_delay_q[i]); */
283/* IM(Q_Fract_allpass_SubQmf34[j][i]) = (float)sin(M_PI*f_center_34[j]*frac_delay_q[i]); */
284static const complex_t Q_Fract_allpass_SubQmf34[][3] = {
285 { { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) } },
286 { { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) } },
287 { { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) } },
288 { { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) } },
289 { { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) } },
290 { { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) } },
291 { { FRAC_CONST(0.2181432247), FRAC_CONST(0.9759167433) }, { FRAC_CONST(-0.7071067691), FRAC_CONST(0.7071067691) }, { FRAC_CONST(0.4623677433), FRAC_CONST(0.8866882324) } },
292 { { FRAC_CONST(0.2181432247), FRAC_CONST(0.9759167433) }, { FRAC_CONST(-0.7071067691), FRAC_CONST(0.7071067691) }, { FRAC_CONST(0.4623677433), FRAC_CONST(0.8866882324) } },
293 { { FRAC_CONST(0.2181432247), FRAC_CONST(0.9759167433) }, { FRAC_CONST(-0.7071067691), FRAC_CONST(0.7071067691) }, { FRAC_CONST(0.4623677433), FRAC_CONST(0.8866882324) } },
294 { { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) } },
295 { { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) } },
296 { { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) } },
297 { { FRAC_CONST(-0.9048270583), FRAC_CONST(0.4257792532) }, { FRAC_CONST(-0.0000000000), FRAC_CONST(-1.0000000000) }, { FRAC_CONST(-0.5724321604), FRAC_CONST(0.8199520707) } },
298 { { FRAC_CONST(-0.9048270583), FRAC_CONST(0.4257792532) }, { FRAC_CONST(-0.0000000000), FRAC_CONST(-1.0000000000) }, { FRAC_CONST(-0.5724321604), FRAC_CONST(0.8199520707) } },
299 { { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) } },
300 { { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) } },
301 { { FRAC_CONST(0.2181432247), FRAC_CONST(0.9759167433) }, { FRAC_CONST(-0.7071067691), FRAC_CONST(0.7071067691) }, { FRAC_CONST(0.4623677433), FRAC_CONST(0.8866882324) } },
302 { { FRAC_CONST(0.2181432247), FRAC_CONST(0.9759167433) }, { FRAC_CONST(-0.7071067691), FRAC_CONST(0.7071067691) }, { FRAC_CONST(0.4623677433), FRAC_CONST(0.8866882324) } },
303 { { FRAC_CONST(0.2181432247), FRAC_CONST(0.9759167433) }, { FRAC_CONST(-0.7071067691), FRAC_CONST(0.7071067691) }, { FRAC_CONST(0.4623677433), FRAC_CONST(0.8866882324) } },
304 { { FRAC_CONST(0.2181432247), FRAC_CONST(0.9759167433) }, { FRAC_CONST(-0.7071067691), FRAC_CONST(0.7071067691) }, { FRAC_CONST(0.4623677433), FRAC_CONST(0.8866882324) } },
305 { { FRAC_CONST(-0.9048270583), FRAC_CONST(0.4257792532) }, { FRAC_CONST(-0.0000000000), FRAC_CONST(-1.0000000000) }, { FRAC_CONST(-0.5724321604), FRAC_CONST(0.8199520707) } },
306 { { FRAC_CONST(-0.9048270583), FRAC_CONST(0.4257792532) }, { FRAC_CONST(-0.0000000000), FRAC_CONST(-1.0000000000) }, { FRAC_CONST(-0.5724321604), FRAC_CONST(0.8199520707) } },
307 { { FRAC_CONST(-0.6129069924), FRAC_CONST(-0.7901550531) }, { FRAC_CONST(0.7071067691), FRAC_CONST(0.7071067691) }, { FRAC_CONST(-0.9917160273), FRAC_CONST(-0.1284494549) } },
308 { { FRAC_CONST(0.2181432247), FRAC_CONST(0.9759167433) }, { FRAC_CONST(-0.7071067691), FRAC_CONST(0.7071067691) }, { FRAC_CONST(0.4623677433), FRAC_CONST(0.8866882324) } },
309 { { FRAC_CONST(0.6374240518), FRAC_CONST(-0.7705131769) }, { FRAC_CONST(-1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(-0.3446428776), FRAC_CONST(-0.9387338758) } },
310 { { FRAC_CONST(-0.9048270583), FRAC_CONST(0.4257792532) }, { FRAC_CONST(-0.0000000000), FRAC_CONST(-1.0000000000) }, { FRAC_CONST(-0.5724321604), FRAC_CONST(0.8199520707) } },
311 { { FRAC_CONST(-0.6129069924), FRAC_CONST(-0.7901550531) }, { FRAC_CONST(0.7071067691), FRAC_CONST(0.7071067691) }, { FRAC_CONST(-0.9917160273), FRAC_CONST(-0.1284494549) } },
312 { { FRAC_CONST(-0.6129069924), FRAC_CONST(-0.7901550531) }, { FRAC_CONST(0.7071067691), FRAC_CONST(0.7071067691) }, { FRAC_CONST(-0.9917160273), FRAC_CONST(-0.1284494549) } },
313 { { FRAC_CONST(0.6374240518), FRAC_CONST(-0.7705131769) }, { FRAC_CONST(-1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(-0.3446428776), FRAC_CONST(-0.9387338758) } },
314 { { FRAC_CONST(0.6374240518), FRAC_CONST(-0.7705131769) }, { FRAC_CONST(-1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(-0.3446428776), FRAC_CONST(-0.9387338758) } },
315 { { FRAC_CONST(0.8910064697), FRAC_CONST(0.4539906085) }, { FRAC_CONST(0.7071067691), FRAC_CONST(-0.7071067691) }, { FRAC_CONST(0.6730125546), FRAC_CONST(-0.7396310568) } },
316 { { FRAC_CONST(-0.6129069924), FRAC_CONST(-0.7901550531) }, { FRAC_CONST(0.7071067691), FRAC_CONST(0.7071067691) }, { FRAC_CONST(-0.9917160273), FRAC_CONST(-0.1284494549) } }
317};
318
319#if 0
320static float quant_rho[8] =
321{
322 FRAC_CONST(1.0), FRAC_CONST(0.937), FRAC_CONST(0.84118), FRAC_CONST(0.60092),
323 FRAC_CONST(0.36764), FRAC_CONST(0.0), FRAC_CONST(-0.589), FRAC_CONST(-1.0)
324};
325
326static const uint8_t quant_iid_normal[7] =
327{
328 2, 4, 7, 10, 14, 18, 25
329};
330
331static const uint8_t quant_iid_fine[15] =
332{
333 2, 4, 6, 8, 10, 13, 16, 19, 22, 25, 30, 35, 40, 45, 50
334};
335#endif
336
337static const real_t cos_alphas[] = {
338 COEF_CONST(1.0000000000), COEF_CONST(0.9841239700), COEF_CONST(0.9594738210),
339 COEF_CONST(0.8946843079), COEF_CONST(0.8269340931), COEF_CONST(0.7071067812),
340 COEF_CONST(0.4533210856), COEF_CONST(0.0000000000)
341};
342
343static const real_t sin_alphas[] = {
344 COEF_CONST(0.0000000000), COEF_CONST(0.1774824264), COEF_CONST(0.2817977763),
345 COEF_CONST(0.4466989918), COEF_CONST(0.5622988580), COEF_CONST(0.7071067812),
346 COEF_CONST(0.8913472911), COEF_CONST(1.0000000000)
347};
348
349static const real_t cos_betas_normal[][8] = {
350 { COEF_CONST(1.0000000000), COEF_CONST(1.0000000000), COEF_CONST(1.0000000000), COEF_CONST(1.0000000000), COEF_CONST(1.0000000000), COEF_CONST(1.0000000000), COEF_CONST(1.0000000000), COEF_CONST(1.0000000000) },
351 { COEF_CONST(1.0000000000), COEF_CONST(0.9995871699), COEF_CONST(0.9989419133), COEF_CONST(0.9972204583), COEF_CONST(0.9953790839), COEF_CONST(0.9920112747), COEF_CONST(0.9843408180), COEF_CONST(0.9681727381) },
352 { COEF_CONST(1.0000000000), COEF_CONST(0.9984497744), COEF_CONST(0.9960279377), COEF_CONST(0.9895738413), COEF_CONST(0.9826814632), COEF_CONST(0.9701058164), COEF_CONST(0.9416098832), COEF_CONST(0.8822105900) },
353 { COEF_CONST(1.0000000000), COEF_CONST(0.9959398908), COEF_CONST(0.9896038018), COEF_CONST(0.9727589768), COEF_CONST(0.9548355329), COEF_CONST(0.9223070404), COEF_CONST(0.8494349490), COEF_CONST(0.7013005535) },
354 { COEF_CONST(1.0000000000), COEF_CONST(0.9932417400), COEF_CONST(0.9827071856), COEF_CONST(0.9547730996), COEF_CONST(0.9251668930), COEF_CONST(0.8717461589), COEF_CONST(0.7535520592), COEF_CONST(0.5198827312) },
355 { COEF_CONST(1.0000000000), COEF_CONST(0.9902068095), COEF_CONST(0.9749613872), COEF_CONST(0.9346538534), COEF_CONST(0.8921231300), COEF_CONST(0.8158851259), COEF_CONST(0.6495964302), COEF_CONST(0.3313370772) },
356 { COEF_CONST(1.0000000000), COEF_CONST(0.9880510933), COEF_CONST(0.9694670261), COEF_CONST(0.9204347876), COEF_CONST(0.8688622825), COEF_CONST(0.7768516704), COEF_CONST(0.5782161800), COEF_CONST(0.2069970356) },
357 { COEF_CONST(1.0000000000), COEF_CONST(0.9858996945), COEF_CONST(0.9639898866), COEF_CONST(0.9063034786), COEF_CONST(0.8458214608), COEF_CONST(0.7384262300), COEF_CONST(0.5089811277), COEF_CONST(0.0905465944) }
358};
359
360static const real_t sin_betas_normal[][8] = {
361 { COEF_CONST(0.0000000000), COEF_CONST(0.0000000000), COEF_CONST(0.0000000000), COEF_CONST(0.0000000000), COEF_CONST(0.0000000000), COEF_CONST(0.0000000000), COEF_CONST(0.0000000000), COEF_CONST(0.0000000000) },
362 { COEF_CONST(0.0000000000), COEF_CONST(-0.0287313368), COEF_CONST(-0.0459897147), COEF_CONST(-0.0745074328), COEF_CONST(-0.0960233266), COEF_CONST(-0.1261492408), COEF_CONST(-0.1762757894), COEF_CONST(-0.2502829383) },
363 { COEF_CONST(0.0000000000), COEF_CONST(-0.0556601118), COEF_CONST(-0.0890412670), COEF_CONST(-0.1440264301), COEF_CONST(-0.1853028382), COEF_CONST(-0.2426823129), COEF_CONST(-0.3367058477), COEF_CONST(-0.4708550466) },
364 { COEF_CONST(0.0000000000), COEF_CONST(-0.0900207420), COEF_CONST(-0.1438204281), COEF_CONST(-0.2318188366), COEF_CONST(-0.2971348264), COEF_CONST(-0.3864579191), COEF_CONST(-0.5276933461), COEF_CONST(-0.7128657193) },
365 { COEF_CONST(0.0000000000), COEF_CONST(-0.1160639735), COEF_CONST(-0.1851663774), COEF_CONST(-0.2973353800), COEF_CONST(-0.3795605619), COEF_CONST(-0.4899577884), COEF_CONST(-0.6573882369), COEF_CONST(-0.8542376401) },
366 { COEF_CONST(0.0000000000), COEF_CONST(-0.1396082894), COEF_CONST(-0.2223742196), COEF_CONST(-0.3555589603), COEF_CONST(-0.4517923427), COEF_CONST(-0.5782140273), COEF_CONST(-0.7602792104), COEF_CONST(-0.9435124489) },
367 { COEF_CONST(0.0000000000), COEF_CONST(-0.1541266914), COEF_CONST(-0.2452217065), COEF_CONST(-0.3908961522), COEF_CONST(-0.4950538699), COEF_CONST(-0.6296836366), COEF_CONST(-0.8158836002), COEF_CONST(-0.9783415698) },
368 { COEF_CONST(0.0000000000), COEF_CONST(-0.1673373610), COEF_CONST(-0.2659389001), COEF_CONST(-0.4226275012), COEF_CONST(-0.5334660781), COEF_CONST(-0.6743342664), COEF_CONST(-0.8607776784), COEF_CONST(-0.9958922202) }
369};
370
371static const real_t cos_betas_fine[][8] = {
372 { COEF_CONST(1.0000000000), COEF_CONST(1.0000000000), COEF_CONST(1.0000000000), COEF_CONST(1.0000000000), COEF_CONST(1.0000000000), COEF_CONST(1.0000000000), COEF_CONST(1.0000000000), COEF_CONST(1.0000000000) },
373 { COEF_CONST(1.0000000000), COEF_CONST(0.9995871699), COEF_CONST(0.9989419133), COEF_CONST(0.9972204583), COEF_CONST(0.9953790839), COEF_CONST(0.9920112747), COEF_CONST(0.9843408180), COEF_CONST(0.9681727381) },
374 { COEF_CONST(1.0000000000), COEF_CONST(0.9984497744), COEF_CONST(0.9960279377), COEF_CONST(0.9895738413), COEF_CONST(0.9826814632), COEF_CONST(0.9701058164), COEF_CONST(0.9416098832), COEF_CONST(0.8822105900) },
375 { COEF_CONST(1.0000000000), COEF_CONST(0.9968361371), COEF_CONST(0.9918968104), COEF_CONST(0.9787540479), COEF_CONST(0.9647515190), COEF_CONST(0.9392903010), COEF_CONST(0.8820167114), COEF_CONST(0.7645325390) },
376 { COEF_CONST(1.0000000000), COEF_CONST(0.9950262915), COEF_CONST(0.9872675041), COEF_CONST(0.9666584578), COEF_CONST(0.9447588606), COEF_CONST(0.9050918405), COEF_CONST(0.8165997379), COEF_CONST(0.6383824796) },
377 { COEF_CONST(1.0000000000), COEF_CONST(0.9932417400), COEF_CONST(0.9827071856), COEF_CONST(0.9547730996), COEF_CONST(0.9251668930), COEF_CONST(0.8717461589), COEF_CONST(0.7535520592), COEF_CONST(0.5198827312) },
378 { COEF_CONST(1.0000000000), COEF_CONST(0.9908827998), COEF_CONST(0.9766855904), COEF_CONST(0.9391249214), COEF_CONST(0.8994531782), COEF_CONST(0.8282352693), COEF_CONST(0.6723983174), COEF_CONST(0.3719473225) },
379 { COEF_CONST(1.0000000000), COEF_CONST(0.9890240165), COEF_CONST(0.9719459866), COEF_CONST(0.9268448110), COEF_CONST(0.8793388536), COEF_CONST(0.7944023271), COEF_CONST(0.6101812098), COEF_CONST(0.2621501145) },
380 { COEF_CONST(1.0000000000), COEF_CONST(0.9876350461), COEF_CONST(0.9684073447), COEF_CONST(0.9176973944), COEF_CONST(0.8643930070), COEF_CONST(0.7693796058), COEF_CONST(0.5646720713), COEF_CONST(0.1838899556) },
381 { COEF_CONST(1.0000000000), COEF_CONST(0.9866247085), COEF_CONST(0.9658349704), COEF_CONST(0.9110590761), COEF_CONST(0.8535668048), COEF_CONST(0.7513165426), COEF_CONST(0.5320914819), COEF_CONST(0.1289530943) },
382 { COEF_CONST(1.0000000000), COEF_CONST(0.9858996945), COEF_CONST(0.9639898866), COEF_CONST(0.9063034786), COEF_CONST(0.8458214608), COEF_CONST(0.7384262300), COEF_CONST(0.5089811277), COEF_CONST(0.0905465944) },
383 { COEF_CONST(1.0000000000), COEF_CONST(0.9851245614), COEF_CONST(0.9620180268), COEF_CONST(0.9012265590), COEF_CONST(0.8375623272), COEF_CONST(0.7247108045), COEF_CONST(0.4845204297), COEF_CONST(0.0504115003) },
384 { COEF_CONST(1.0000000000), COEF_CONST(0.9846869856), COEF_CONST(0.9609052357), COEF_CONST(0.8983639533), COEF_CONST(0.8329098386), COEF_CONST(0.7169983441), COEF_CONST(0.4708245354), COEF_CONST(0.0281732509) },
385 { COEF_CONST(1.0000000000), COEF_CONST(0.9844406325), COEF_CONST(0.9602788522), COEF_CONST(0.8967533934), COEF_CONST(0.8302936455), COEF_CONST(0.7126658102), COEF_CONST(0.4631492839), COEF_CONST(0.0157851140) },
386 { COEF_CONST(1.0000000000), COEF_CONST(0.9843020502), COEF_CONST(0.9599265269), COEF_CONST(0.8958477331), COEF_CONST(0.8288229094), COEF_CONST(0.7102315840), COEF_CONST(0.4588429315), COEF_CONST(0.0088578059) },
387 { COEF_CONST(1.0000000000), COEF_CONST(0.9842241136), COEF_CONST(0.9597283916), COEF_CONST(0.8953385094), COEF_CONST(0.8279961409), COEF_CONST(0.7088635748), COEF_CONST(0.4564246834), COEF_CONST(0.0049751355) }
388};
389
390static const real_t sin_betas_fine[][8] = {
391 { COEF_CONST(0.0000000000), COEF_CONST(0.0000000000), COEF_CONST(0.0000000000), COEF_CONST(0.0000000000), COEF_CONST(0.0000000000), COEF_CONST(0.0000000000), COEF_CONST(0.0000000000), COEF_CONST(0.0000000000) },
392 { COEF_CONST(0.0000000000), COEF_CONST(-0.0287313368), COEF_CONST(-0.0459897147), COEF_CONST(-0.0745074328), COEF_CONST(-0.0960233266), COEF_CONST(-0.1261492408), COEF_CONST(-0.1762757894), COEF_CONST(-0.2502829383) },
393 { COEF_CONST(0.0000000000), COEF_CONST(-0.0556601118), COEF_CONST(-0.0890412670), COEF_CONST(-0.1440264301), COEF_CONST(-0.1853028382), COEF_CONST(-0.2426823129), COEF_CONST(-0.3367058477), COEF_CONST(-0.4708550466) },
394 { COEF_CONST(0.0000000000), COEF_CONST(-0.0794840594), COEF_CONST(-0.1270461238), COEF_CONST(-0.2050378347), COEF_CONST(-0.2631625097), COEF_CONST(-0.3431234916), COEF_CONST(-0.4712181245), COEF_CONST(-0.6445851354) },
395 { COEF_CONST(0.0000000000), COEF_CONST(-0.0996126459), COEF_CONST(-0.1590687758), COEF_CONST(-0.2560691819), COEF_CONST(-0.3277662204), COEF_CONST(-0.4252161335), COEF_CONST(-0.5772043556), COEF_CONST(-0.7697193058) },
396 { COEF_CONST(0.0000000000), COEF_CONST(-0.1160639735), COEF_CONST(-0.1851663774), COEF_CONST(-0.2973353800), COEF_CONST(-0.3795605619), COEF_CONST(-0.4899577884), COEF_CONST(-0.6573882369), COEF_CONST(-0.8542376401) },
397 { COEF_CONST(0.0000000000), COEF_CONST(-0.1347266752), COEF_CONST(-0.2146747714), COEF_CONST(-0.3435758752), COEF_CONST(-0.4370171396), COEF_CONST(-0.5603805303), COEF_CONST(-0.7401895046), COEF_CONST(-0.9282538388) },
398 { COEF_CONST(0.0000000000), COEF_CONST(-0.1477548470), COEF_CONST(-0.2352041647), COEF_CONST(-0.3754446647), COEF_CONST(-0.4761965776), COEF_CONST(-0.6073919186), COEF_CONST(-0.7922618830), COEF_CONST(-0.9650271071) },
399 { COEF_CONST(0.0000000000), COEF_CONST(-0.1567705832), COEF_CONST(-0.2493736450), COEF_CONST(-0.3972801182), COEF_CONST(-0.5028167951), COEF_CONST(-0.6387918458), COEF_CONST(-0.8253153651), COEF_CONST(-0.9829468369) },
400 { COEF_CONST(0.0000000000), COEF_CONST(-0.1630082348), COEF_CONST(-0.2591578860), COEF_CONST(-0.4122758299), COEF_CONST(-0.5209834064), COEF_CONST(-0.6599420072), COEF_CONST(-0.8466868694), COEF_CONST(-0.9916506943) },
401 { COEF_CONST(0.0000000000), COEF_CONST(-0.1673373610), COEF_CONST(-0.2659389001), COEF_CONST(-0.4226275012), COEF_CONST(-0.5334660781), COEF_CONST(-0.6743342664), COEF_CONST(-0.8607776784), COEF_CONST(-0.9958922202) },
402 { COEF_CONST(0.0000000000), COEF_CONST(-0.1718417832), COEF_CONST(-0.2729859267), COEF_CONST(-0.4333482310), COEF_CONST(-0.5463417868), COEF_CONST(-0.6890531546), COEF_CONST(-0.8747799456), COEF_CONST(-0.9987285320) },
403 { COEF_CONST(0.0000000000), COEF_CONST(-0.1743316967), COEF_CONST(-0.2768774604), COEF_CONST(-0.4392518725), COEF_CONST(-0.5534087104), COEF_CONST(-0.6970748701), COEF_CONST(-0.8822268738), COEF_CONST(-0.9996030552) },
404 { COEF_CONST(0.0000000000), COEF_CONST(-0.1757175038), COEF_CONST(-0.2790421580), COEF_CONST(-0.4425306221), COEF_CONST(-0.5573261722), COEF_CONST(-0.7015037013), COEF_CONST(-0.8862802834), COEF_CONST(-0.9998754073) },
405 { COEF_CONST(0.0000000000), COEF_CONST(-0.1764921355), COEF_CONST(-0.2802517850), COEF_CONST(-0.4443611583), COEF_CONST(-0.5595110229), COEF_CONST(-0.7039681080), COEF_CONST(-0.8885173967), COEF_CONST(-0.9999607689) },
406 { COEF_CONST(0.0000000000), COEF_CONST(-0.1769262394), COEF_CONST(-0.2809295540), COEF_CONST(-0.4453862969), COEF_CONST(-0.5607337966), COEF_CONST(-0.7053456119), COEF_CONST(-0.8897620516), COEF_CONST(-0.9999876239) }
407};
408
409static const real_t sincos_alphas_B_normal[][8] = {
410 { COEF_CONST(0.0561454100), COEF_CONST(0.0526385859), COEF_CONST(0.0472937334), COEF_CONST(0.0338410641), COEF_CONST(0.0207261065), COEF_CONST(0.0028205635), COEF_CONST(0.0028205635), COEF_CONST(0.0028205635) },
411 { COEF_CONST(0.1249065138), COEF_CONST(0.1173697697), COEF_CONST(0.1057888284), COEF_CONST(0.0761985131), COEF_CONST(0.0468732723), COEF_CONST(0.0063956103), COEF_CONST(0.0063956103), COEF_CONST(0.0063956103) },
412 { COEF_CONST(0.1956693050), COEF_CONST(0.1846090179), COEF_CONST(0.1673645109), COEF_CONST(0.1220621836), COEF_CONST(0.0757362479), COEF_CONST(0.0103882630), COEF_CONST(0.0103882630), COEF_CONST(0.0103882630) },
413 { COEF_CONST(0.3015113269), COEF_CONST(0.2870525790), COEF_CONST(0.2637738799), COEF_CONST(0.1984573949), COEF_CONST(0.1260749909), COEF_CONST(0.0175600126), COEF_CONST(0.0175600126), COEF_CONST(0.0175600126) },
414 { COEF_CONST(0.4078449476), COEF_CONST(0.3929852420), COEF_CONST(0.3680589270), COEF_CONST(0.2911029124), COEF_CONST(0.1934512363), COEF_CONST(0.0278686716), COEF_CONST(0.0278686716), COEF_CONST(0.0278686716) },
415 { COEF_CONST(0.5336171261), COEF_CONST(0.5226637762), COEF_CONST(0.5033652606), COEF_CONST(0.4349162672), COEF_CONST(0.3224682122), COEF_CONST(0.0521999036), COEF_CONST(0.0521999036), COEF_CONST(0.0521999036) },
416 { COEF_CONST(0.6219832023), COEF_CONST(0.6161847276), COEF_CONST(0.6057251063), COEF_CONST(0.5654342668), COEF_CONST(0.4826149915), COEF_CONST(0.1058044758), COEF_CONST(0.1058044758), COEF_CONST(0.1058044758) },
417 { COEF_CONST(0.7071067657), COEF_CONST(0.7071067657), COEF_CONST(0.7071067657), COEF_CONST(0.7071067657), COEF_CONST(0.7071067657), COEF_CONST(0.7071067657), COEF_CONST(0.7071067657), COEF_CONST(0.7071067657) },
418 { COEF_CONST(0.7830305572), COEF_CONST(0.7876016373), COEF_CONST(0.7956739618), COEF_CONST(0.8247933372), COEF_CONST(0.8758325942), COEF_CONST(0.9943869542), COEF_CONST(0.9943869542), COEF_CONST(0.9943869542) },
419 { COEF_CONST(0.8457261833), COEF_CONST(0.8525388778), COEF_CONST(0.8640737401), COEF_CONST(0.9004708933), COEF_CONST(0.9465802987), COEF_CONST(0.9986366532), COEF_CONST(0.9986366532), COEF_CONST(0.9986366532) },
420 { COEF_CONST(0.9130511848), COEF_CONST(0.9195447612), COEF_CONST(0.9298024282), COEF_CONST(0.9566917233), COEF_CONST(0.9811098801), COEF_CONST(0.9996115928), COEF_CONST(0.9996115928), COEF_CONST(0.9996115928) },
421 { COEF_CONST(0.9534625907), COEF_CONST(0.9579148236), COEF_CONST(0.9645845234), COEF_CONST(0.9801095128), COEF_CONST(0.9920207064), COEF_CONST(0.9998458099), COEF_CONST(0.9998458099), COEF_CONST(0.9998458099) },
422 { COEF_CONST(0.9806699215), COEF_CONST(0.9828120260), COEF_CONST(0.9858950861), COEF_CONST(0.9925224431), COEF_CONST(0.9971278825), COEF_CONST(0.9999460406), COEF_CONST(0.9999460406), COEF_CONST(0.9999460406) },
423 { COEF_CONST(0.9921685024), COEF_CONST(0.9930882705), COEF_CONST(0.9943886135), COEF_CONST(0.9970926648), COEF_CONST(0.9989008403), COEF_CONST(0.9999795479), COEF_CONST(0.9999795479), COEF_CONST(0.9999795479) },
424 { COEF_CONST(0.9984226014), COEF_CONST(0.9986136287), COEF_CONST(0.9988810254), COEF_CONST(0.9994272242), COEF_CONST(0.9997851906), COEF_CONST(0.9999960221), COEF_CONST(0.9999960221), COEF_CONST(0.9999960221) }
425};
426
427static const real_t sincos_alphas_B_fine[][8] = {
428 { COEF_CONST(0.0031622158), COEF_CONST(0.0029630181), COEF_CONST(0.0026599892), COEF_CONST(0.0019002704), COEF_CONST(0.0011626042), COEF_CONST(0.0001580278), COEF_CONST(0.0001580278), COEF_CONST(0.0001580278) },
429 { COEF_CONST(0.0056232673), COEF_CONST(0.0052689825), COEF_CONST(0.0047302825), COEF_CONST(0.0033791756), COEF_CONST(0.0020674015), COEF_CONST(0.0002811710), COEF_CONST(0.0002811710), COEF_CONST(0.0002811710) },
430 { COEF_CONST(0.0099994225), COEF_CONST(0.0093696693), COEF_CONST(0.0084117414), COEF_CONST(0.0060093796), COEF_CONST(0.0036766009), COEF_CONST(0.0005000392), COEF_CONST(0.0005000392), COEF_CONST(0.0005000392) },
431 { COEF_CONST(0.0177799194), COEF_CONST(0.0166607102), COEF_CONST(0.0149581377), COEF_CONST(0.0106875809), COEF_CONST(0.0065392545), COEF_CONST(0.0008893767), COEF_CONST(0.0008893767), COEF_CONST(0.0008893767) },
432 { COEF_CONST(0.0316069684), COEF_CONST(0.0296211579), COEF_CONST(0.0265987295), COEF_CONST(0.0190113813), COEF_CONST(0.0116349973), COEF_CONST(0.0015826974), COEF_CONST(0.0015826974), COEF_CONST(0.0015826974) },
433 { COEF_CONST(0.0561454100), COEF_CONST(0.0526385859), COEF_CONST(0.0472937334), COEF_CONST(0.0338410641), COEF_CONST(0.0207261065), COEF_CONST(0.0028205635), COEF_CONST(0.0028205635), COEF_CONST(0.0028205635) },
434 { COEF_CONST(0.0791834041), COEF_CONST(0.0742798103), COEF_CONST(0.0667907269), COEF_CONST(0.0478705292), COEF_CONST(0.0293500747), COEF_CONST(0.0039966755), COEF_CONST(0.0039966755), COEF_CONST(0.0039966755) },
435 { COEF_CONST(0.1115021177), COEF_CONST(0.1047141985), COEF_CONST(0.0943053154), COEF_CONST(0.0678120561), COEF_CONST(0.0416669150), COEF_CONST(0.0056813213), COEF_CONST(0.0056813213), COEF_CONST(0.0056813213) },
436 { COEF_CONST(0.1565355066), COEF_CONST(0.1473258371), COEF_CONST(0.1330924027), COEF_CONST(0.0963282233), COEF_CONST(0.0594509113), COEF_CONST(0.0081277946), COEF_CONST(0.0081277946), COEF_CONST(0.0081277946) },
437 { COEF_CONST(0.2184643682), COEF_CONST(0.2064579524), COEF_CONST(0.1876265439), COEF_CONST(0.1375744167), COEF_CONST(0.0856896681), COEF_CONST(0.0117817338), COEF_CONST(0.0117817338), COEF_CONST(0.0117817338) },
438 { COEF_CONST(0.3015113269), COEF_CONST(0.2870525790), COEF_CONST(0.2637738799), COEF_CONST(0.1984573949), COEF_CONST(0.1260749909), COEF_CONST(0.0175600126), COEF_CONST(0.0175600126), COEF_CONST(0.0175600126) },
439 { COEF_CONST(0.3698741335), COEF_CONST(0.3547727297), COEF_CONST(0.3298252076), COEF_CONST(0.2556265829), COEF_CONST(0.1665990017), COEF_CONST(0.0236344541), COEF_CONST(0.0236344541), COEF_CONST(0.0236344541) },
440 { COEF_CONST(0.4480623975), COEF_CONST(0.4339410024), COEF_CONST(0.4098613774), COEF_CONST(0.3322709108), COEF_CONST(0.2266784729), COEF_CONST(0.0334094131), COEF_CONST(0.0334094131), COEF_CONST(0.0334094131) },
441 { COEF_CONST(0.5336171261), COEF_CONST(0.5226637762), COEF_CONST(0.5033652606), COEF_CONST(0.4349162672), COEF_CONST(0.3224682122), COEF_CONST(0.0521999036), COEF_CONST(0.0521999036), COEF_CONST(0.0521999036) },
442 { COEF_CONST(0.6219832023), COEF_CONST(0.6161847276), COEF_CONST(0.6057251063), COEF_CONST(0.5654342668), COEF_CONST(0.4826149915), COEF_CONST(0.1058044758), COEF_CONST(0.1058044758), COEF_CONST(0.1058044758) },
443 { COEF_CONST(0.7071067657), COEF_CONST(0.7071067657), COEF_CONST(0.7071067657), COEF_CONST(0.7071067657), COEF_CONST(0.7071067657), COEF_CONST(0.7071067657), COEF_CONST(0.7071067657), COEF_CONST(0.7071067657) },
444 { COEF_CONST(0.7830305572), COEF_CONST(0.7876016373), COEF_CONST(0.7956739618), COEF_CONST(0.8247933372), COEF_CONST(0.8758325942), COEF_CONST(0.9943869542), COEF_CONST(0.9943869542), COEF_CONST(0.9943869542) },
445 { COEF_CONST(0.8457261833), COEF_CONST(0.8525388778), COEF_CONST(0.8640737401), COEF_CONST(0.9004708933), COEF_CONST(0.9465802987), COEF_CONST(0.9986366532), COEF_CONST(0.9986366532), COEF_CONST(0.9986366532) },
446 { COEF_CONST(0.8940022267), COEF_CONST(0.9009412572), COEF_CONST(0.9121477564), COEF_CONST(0.9431839770), COEF_CONST(0.9739696219), COEF_CONST(0.9994417480), COEF_CONST(0.9994417480), COEF_CONST(0.9994417480) },
447 { COEF_CONST(0.9290818561), COEF_CONST(0.9349525662), COEF_CONST(0.9440420138), COEF_CONST(0.9667755833), COEF_CONST(0.9860247275), COEF_CONST(0.9997206664), COEF_CONST(0.9997206664), COEF_CONST(0.9997206664) },
448 { COEF_CONST(0.9534625907), COEF_CONST(0.9579148236), COEF_CONST(0.9645845234), COEF_CONST(0.9801095128), COEF_CONST(0.9920207064), COEF_CONST(0.9998458099), COEF_CONST(0.9998458099), COEF_CONST(0.9998458099) },
449 { COEF_CONST(0.9758449068), COEF_CONST(0.9784554646), COEF_CONST(0.9822404252), COEF_CONST(0.9904914275), COEF_CONST(0.9963218730), COEF_CONST(0.9999305926), COEF_CONST(0.9999305926), COEF_CONST(0.9999305926) },
450 { COEF_CONST(0.9876723320), COEF_CONST(0.9890880155), COEF_CONST(0.9911036356), COEF_CONST(0.9953496173), COEF_CONST(0.9982312259), COEF_CONST(0.9999669685), COEF_CONST(0.9999669685), COEF_CONST(0.9999669685) },
451 { COEF_CONST(0.9937641889), COEF_CONST(0.9945023501), COEF_CONST(0.9955433130), COEF_CONST(0.9976981117), COEF_CONST(0.9991315558), COEF_CONST(0.9999838610), COEF_CONST(0.9999838610), COEF_CONST(0.9999838610) },
452 { COEF_CONST(0.9968600642), COEF_CONST(0.9972374385), COEF_CONST(0.9977670024), COEF_CONST(0.9988535464), COEF_CONST(0.9995691924), COEF_CONST(0.9999920129), COEF_CONST(0.9999920129), COEF_CONST(0.9999920129) },
453 { COEF_CONST(0.9984226014), COEF_CONST(0.9986136287), COEF_CONST(0.9988810254), COEF_CONST(0.9994272242), COEF_CONST(0.9997851906), COEF_CONST(0.9999960221), COEF_CONST(0.9999960221), COEF_CONST(0.9999960221) },
454 { COEF_CONST(0.9995003746), COEF_CONST(0.9995611974), COEF_CONST(0.9996461891), COEF_CONST(0.9998192657), COEF_CONST(0.9999323103), COEF_CONST(0.9999987475), COEF_CONST(0.9999987475), COEF_CONST(0.9999987475) },
455 { COEF_CONST(0.9998419236), COEF_CONST(0.9998611991), COEF_CONST(0.9998881193), COEF_CONST(0.9999428861), COEF_CONST(0.9999786185), COEF_CONST(0.9999996045), COEF_CONST(0.9999996045), COEF_CONST(0.9999996045) },
456 { COEF_CONST(0.9999500038), COEF_CONST(0.9999561034), COEF_CONST(0.9999646206), COEF_CONST(0.9999819429), COEF_CONST(0.9999932409), COEF_CONST(0.9999998750), COEF_CONST(0.9999998750), COEF_CONST(0.9999998750) },
457 { COEF_CONST(0.9999841890), COEF_CONST(0.9999861183), COEF_CONST(0.9999888121), COEF_CONST(0.9999942902), COEF_CONST(0.9999978628), COEF_CONST(0.9999999605), COEF_CONST(0.9999999605), COEF_CONST(0.9999999605) },
458 { COEF_CONST(0.9999950000), COEF_CONST(0.9999956102), COEF_CONST(0.9999964621), COEF_CONST(0.9999981945), COEF_CONST(0.9999993242), COEF_CONST(0.9999999875), COEF_CONST(0.9999999875), COEF_CONST(0.9999999875) }
459};
460
461static const real_t cos_gammas_normal[][8] = {
462 { COEF_CONST(1.0000000000), COEF_CONST(0.9841239707), COEF_CONST(0.9594738226), COEF_CONST(0.8946843024), COEF_CONST(0.8269341029), COEF_CONST(0.7245688486), COEF_CONST(0.7245688486), COEF_CONST(0.7245688486) },
463 { COEF_CONST(1.0000000000), COEF_CONST(0.9849690570), COEF_CONST(0.9617776789), COEF_CONST(0.9020941550), COEF_CONST(0.8436830391), COEF_CONST(0.7846832804), COEF_CONST(0.7846832804), COEF_CONST(0.7846832804) },
464 { COEF_CONST(1.0000000000), COEF_CONST(0.9871656089), COEF_CONST(0.9676774734), COEF_CONST(0.9199102884), COEF_CONST(0.8785067015), COEF_CONST(0.8464232214), COEF_CONST(0.8464232214), COEF_CONST(0.8464232214) },
465 { COEF_CONST(1.0000000000), COEF_CONST(0.9913533967), COEF_CONST(0.9786000177), COEF_CONST(0.9496063381), COEF_CONST(0.9277157252), COEF_CONST(0.9133354077), COEF_CONST(0.9133354077), COEF_CONST(0.9133354077) },
466 { COEF_CONST(1.0000000000), COEF_CONST(0.9948924435), COEF_CONST(0.9875319180), COEF_CONST(0.9716329849), COEF_CONST(0.9604805241), COEF_CONST(0.9535949574), COEF_CONST(0.9535949574), COEF_CONST(0.9535949574) },
467 { COEF_CONST(1.0000000000), COEF_CONST(0.9977406278), COEF_CONST(0.9945423840), COEF_CONST(0.9878736667), COEF_CONST(0.9833980494), COEF_CONST(0.9807207440), COEF_CONST(0.9807207440), COEF_CONST(0.9807207440) },
468 { COEF_CONST(1.0000000000), COEF_CONST(0.9990607067), COEF_CONST(0.9977417734), COEF_CONST(0.9950323970), COEF_CONST(0.9932453273), COEF_CONST(0.9921884740), COEF_CONST(0.9921884740), COEF_CONST(0.9921884740) },
469 { COEF_CONST(1.0000000000), COEF_CONST(0.9998081748), COEF_CONST(0.9995400312), COEF_CONST(0.9989936459), COEF_CONST(0.9986365356), COEF_CONST(0.9984265591), COEF_CONST(0.9984265591), COEF_CONST(0.9984265591) }
470};
471
472static const real_t cos_gammas_fine[][8] = {
473 { COEF_CONST(1.0000000000), COEF_CONST(0.9841239707), COEF_CONST(0.9594738226), COEF_CONST(0.8946843024), COEF_CONST(0.8269341029), COEF_CONST(0.7245688486), COEF_CONST(0.7245688486), COEF_CONST(0.7245688486) },
474 { COEF_CONST(1.0000000000), COEF_CONST(0.9849690570), COEF_CONST(0.9617776789), COEF_CONST(0.9020941550), COEF_CONST(0.8436830391), COEF_CONST(0.7846832804), COEF_CONST(0.7846832804), COEF_CONST(0.7846832804) },
475 { COEF_CONST(1.0000000000), COEF_CONST(0.9871656089), COEF_CONST(0.9676774734), COEF_CONST(0.9199102884), COEF_CONST(0.8785067015), COEF_CONST(0.8464232214), COEF_CONST(0.8464232214), COEF_CONST(0.8464232214) },
476 { COEF_CONST(1.0000000000), COEF_CONST(0.9899597309), COEF_CONST(0.9750098690), COEF_CONST(0.9402333855), COEF_CONST(0.9129698759), COEF_CONST(0.8943765944), COEF_CONST(0.8943765944), COEF_CONST(0.8943765944) },
477 { COEF_CONST(1.0000000000), COEF_CONST(0.9926607607), COEF_CONST(0.9819295710), COEF_CONST(0.9580160104), COEF_CONST(0.9404993670), COEF_CONST(0.9293004472), COEF_CONST(0.9293004472), COEF_CONST(0.9293004472) },
478 { COEF_CONST(1.0000000000), COEF_CONST(0.9948924435), COEF_CONST(0.9875319180), COEF_CONST(0.9716329849), COEF_CONST(0.9604805241), COEF_CONST(0.9535949574), COEF_CONST(0.9535949574), COEF_CONST(0.9535949574) },
479 { COEF_CONST(1.0000000000), COEF_CONST(0.9972074644), COEF_CONST(0.9932414270), COEF_CONST(0.9849197629), COEF_CONST(0.9792926592), COEF_CONST(0.9759092525), COEF_CONST(0.9759092525), COEF_CONST(0.9759092525) },
480 { COEF_CONST(1.0000000000), COEF_CONST(0.9985361982), COEF_CONST(0.9964742028), COEF_CONST(0.9922136306), COEF_CONST(0.9893845420), COEF_CONST(0.9877041371), COEF_CONST(0.9877041371), COEF_CONST(0.9877041371) },
481 { COEF_CONST(1.0000000000), COEF_CONST(0.9992494366), COEF_CONST(0.9981967170), COEF_CONST(0.9960386625), COEF_CONST(0.9946185834), COEF_CONST(0.9937800239), COEF_CONST(0.9937800239), COEF_CONST(0.9937800239) },
482 { COEF_CONST(1.0000000000), COEF_CONST(0.9996194722), COEF_CONST(0.9990869422), COEF_CONST(0.9979996269), COEF_CONST(0.9972873651), COEF_CONST(0.9968679747), COEF_CONST(0.9968679747), COEF_CONST(0.9968679747) },
483 { COEF_CONST(1.0000000000), COEF_CONST(0.9998081748), COEF_CONST(0.9995400312), COEF_CONST(0.9989936459), COEF_CONST(0.9986365356), COEF_CONST(0.9984265591), COEF_CONST(0.9984265591), COEF_CONST(0.9984265591) },
484 { COEF_CONST(1.0000000000), COEF_CONST(0.9999390971), COEF_CONST(0.9998540271), COEF_CONST(0.9996809352), COEF_CONST(0.9995679735), COEF_CONST(0.9995016284), COEF_CONST(0.9995016284), COEF_CONST(0.9995016284) },
485 { COEF_CONST(1.0000000000), COEF_CONST(0.9999807170), COEF_CONST(0.9999537862), COEF_CONST(0.9998990191), COEF_CONST(0.9998632947), COEF_CONST(0.9998423208), COEF_CONST(0.9998423208), COEF_CONST(0.9998423208) },
486 { COEF_CONST(1.0000000000), COEF_CONST(0.9999938979), COEF_CONST(0.9999853814), COEF_CONST(0.9999680568), COEF_CONST(0.9999567596), COEF_CONST(0.9999501270), COEF_CONST(0.9999501270), COEF_CONST(0.9999501270) },
487 { COEF_CONST(1.0000000000), COEF_CONST(0.9999980703), COEF_CONST(0.9999953731), COEF_CONST(0.9999898968), COEF_CONST(0.9999863277), COEF_CONST(0.9999842265), COEF_CONST(0.9999842265), COEF_CONST(0.9999842265) },
488 { COEF_CONST(1.0000000000), COEF_CONST(0.9999993891), COEF_CONST(0.9999985397), COEF_CONST(0.9999968037), COEF_CONST(0.9999956786), COEF_CONST(0.9999950155), COEF_CONST(0.9999950155), COEF_CONST(0.9999950155) }
489};
490
491static const real_t sin_gammas_normal[][8] = {
492 { COEF_CONST(0.0000000000), COEF_CONST(0.1774824223), COEF_CONST(0.2817977711), COEF_CONST(0.4466990028), COEF_CONST(0.5622988435), COEF_CONST(0.6892024258), COEF_CONST(0.6892024258), COEF_CONST(0.6892024258) },
493 { COEF_CONST(0.0000000000), COEF_CONST(0.1727308798), COEF_CONST(0.2738315110), COEF_CONST(0.4315392630), COEF_CONST(0.5368416242), COEF_CONST(0.6198968861), COEF_CONST(0.6198968861), COEF_CONST(0.6198968861) },
494 { COEF_CONST(0.0000000000), COEF_CONST(0.1596999079), COEF_CONST(0.2521910140), COEF_CONST(0.3921288836), COEF_CONST(0.4777300236), COEF_CONST(0.5325107795), COEF_CONST(0.5325107795), COEF_CONST(0.5325107795) },
495 { COEF_CONST(0.0000000000), COEF_CONST(0.1312190642), COEF_CONST(0.2057717310), COEF_CONST(0.3134450552), COEF_CONST(0.3732874674), COEF_CONST(0.4072080955), COEF_CONST(0.4072080955), COEF_CONST(0.4072080955) },
496 { COEF_CONST(0.0000000000), COEF_CONST(0.1009407043), COEF_CONST(0.1574189028), COEF_CONST(0.2364938532), COEF_CONST(0.2783471983), COEF_CONST(0.3010924396), COEF_CONST(0.3010924396), COEF_CONST(0.3010924396) },
497 { COEF_CONST(0.0000000000), COEF_CONST(0.0671836269), COEF_CONST(0.1043333428), COEF_CONST(0.1552598422), COEF_CONST(0.1814615013), COEF_CONST(0.1954144885), COEF_CONST(0.1954144885), COEF_CONST(0.1954144885) },
498 { COEF_CONST(0.0000000000), COEF_CONST(0.0433324862), COEF_CONST(0.0671666110), COEF_CONST(0.0995516398), COEF_CONST(0.1160332699), COEF_CONST(0.1247478739), COEF_CONST(0.1247478739), COEF_CONST(0.1247478739) },
499 { COEF_CONST(0.0000000000), COEF_CONST(0.0195860576), COEF_CONST(0.0303269852), COEF_CONST(0.0448519274), COEF_CONST(0.0522022017), COEF_CONST(0.0560750040), COEF_CONST(0.0560750040), COEF_CONST(0.0560750040) }
500};
501
502static const real_t sin_gammas_fine[][8] = {
503 { COEF_CONST(0.0000000000), COEF_CONST(0.1774824223), COEF_CONST(0.2817977711), COEF_CONST(0.4466990028), COEF_CONST(0.5622988435), COEF_CONST(0.6892024258), COEF_CONST(0.6892024258), COEF_CONST(0.6892024258) },
504 { COEF_CONST(0.0000000000), COEF_CONST(0.1727308798), COEF_CONST(0.2738315110), COEF_CONST(0.4315392630), COEF_CONST(0.5368416242), COEF_CONST(0.6198968861), COEF_CONST(0.6198968861), COEF_CONST(0.6198968861) },
505 { COEF_CONST(0.0000000000), COEF_CONST(0.1596999079), COEF_CONST(0.2521910140), COEF_CONST(0.3921288836), COEF_CONST(0.4777300236), COEF_CONST(0.5325107795), COEF_CONST(0.5325107795), COEF_CONST(0.5325107795) },
506 { COEF_CONST(0.0000000000), COEF_CONST(0.1413496768), COEF_CONST(0.2221615526), COEF_CONST(0.3405307340), COEF_CONST(0.4080269669), COEF_CONST(0.4473147744), COEF_CONST(0.4473147744), COEF_CONST(0.4473147744) },
507 { COEF_CONST(0.0000000000), COEF_CONST(0.1209322714), COEF_CONST(0.1892467110), COEF_CONST(0.2867147079), COEF_CONST(0.3397954394), COEF_CONST(0.3693246252), COEF_CONST(0.3693246252), COEF_CONST(0.3693246252) },
508 { COEF_CONST(0.0000000000), COEF_CONST(0.1009407043), COEF_CONST(0.1574189028), COEF_CONST(0.2364938532), COEF_CONST(0.2783471983), COEF_CONST(0.3010924396), COEF_CONST(0.3010924396), COEF_CONST(0.3010924396) },
509 { COEF_CONST(0.0000000000), COEF_CONST(0.0746811420), COEF_CONST(0.1160666523), COEF_CONST(0.1730117353), COEF_CONST(0.2024497161), COEF_CONST(0.2181768341), COEF_CONST(0.2181768341), COEF_CONST(0.2181768341) },
510 { COEF_CONST(0.0000000000), COEF_CONST(0.0540875291), COEF_CONST(0.0838997203), COEF_CONST(0.1245476266), COEF_CONST(0.1453211203), COEF_CONST(0.1563346972), COEF_CONST(0.1563346972), COEF_CONST(0.1563346972) },
511 { COEF_CONST(0.0000000000), COEF_CONST(0.0387371058), COEF_CONST(0.0600276114), COEF_CONST(0.0889212171), COEF_CONST(0.1036044086), COEF_CONST(0.1113609634), COEF_CONST(0.1113609634), COEF_CONST(0.1113609634) },
512 { COEF_CONST(0.0000000000), COEF_CONST(0.0275846110), COEF_CONST(0.0427233177), COEF_CONST(0.0632198125), COEF_CONST(0.0736064637), COEF_CONST(0.0790837596), COEF_CONST(0.0790837596), COEF_CONST(0.0790837596) },
513 { COEF_CONST(0.0000000000), COEF_CONST(0.0195860576), COEF_CONST(0.0303269852), COEF_CONST(0.0448519274), COEF_CONST(0.0522022017), COEF_CONST(0.0560750040), COEF_CONST(0.0560750040), COEF_CONST(0.0560750040) },
514 { COEF_CONST(0.0000000000), COEF_CONST(0.0110363955), COEF_CONST(0.0170857974), COEF_CONST(0.0252592108), COEF_CONST(0.0293916021), COEF_CONST(0.0315673054), COEF_CONST(0.0315673054), COEF_CONST(0.0315673054) },
515 { COEF_CONST(0.0000000000), COEF_CONST(0.0062101284), COEF_CONST(0.0096138203), COEF_CONST(0.0142109649), COEF_CONST(0.0165345659), COEF_CONST(0.0177576316), COEF_CONST(0.0177576316), COEF_CONST(0.0177576316) },
516 { COEF_CONST(0.0000000000), COEF_CONST(0.0034934509), COEF_CONST(0.0054071189), COEF_CONST(0.0079928316), COEF_CONST(0.0092994041), COEF_CONST(0.0099871631), COEF_CONST(0.0099871631), COEF_CONST(0.0099871631) },
517 { COEF_CONST(0.0000000000), COEF_CONST(0.0019645397), COEF_CONST(0.0030419905), COEF_CONST(0.0044951511), COEF_CONST(0.0052291853), COEF_CONST(0.0056166498), COEF_CONST(0.0056166498), COEF_CONST(0.0056166498) },
518 { COEF_CONST(0.0000000000), COEF_CONST(0.0011053943), COEF_CONST(0.0017089869), COEF_CONST(0.0025283670), COEF_CONST(0.0029398552), COEF_CONST(0.0031573685), COEF_CONST(0.0031573685), COEF_CONST(0.0031573685) }
519};
520
521static const real_t sf_iid_normal[] = {
522 COEF_CONST(1.4119827747), COEF_CONST(1.4031381607), COEF_CONST(1.3868767023),
523 COEF_CONST(1.3483997583), COEF_CONST(1.2912493944), COEF_CONST(1.1960374117),
524 COEF_CONST(1.1073724031), COEF_CONST(1.0000000000), COEF_CONST(0.8796171546),
525 COEF_CONST(0.7546485662), COEF_CONST(0.5767799020), COEF_CONST(0.4264014363),
526 COEF_CONST(0.2767182887), COEF_CONST(0.1766446233), COEF_CONST(0.0794016272)
527};
528
529static const real_t sf_iid_fine[] = {
530 COEF_CONST(1.4142065048), COEF_CONST(1.4141912460), COEF_CONST(1.4141428471),
531 COEF_CONST(1.4139900208), COEF_CONST(1.4135069847), COEF_CONST(1.4119827747),
532 COEF_CONST(1.4097729921), COEF_CONST(1.4053947926), COEF_CONST(1.3967796564),
533 COEF_CONST(1.3800530434), COEF_CONST(1.3483997583), COEF_CONST(1.3139201403),
534 COEF_CONST(1.2643101215), COEF_CONST(1.1960374117), COEF_CONST(1.1073724031),
535 COEF_CONST(1.0000000000), COEF_CONST(0.8796171546), COEF_CONST(0.7546485662),
536 COEF_CONST(0.6336560845), COEF_CONST(0.5230810642), COEF_CONST(0.4264014363),
537 COEF_CONST(0.3089554012), COEF_CONST(0.2213746458), COEF_CONST(0.1576878875),
538 COEF_CONST(0.1119822487), COEF_CONST(0.0794016272), COEF_CONST(0.0446990170),
539 COEF_CONST(0.0251446925), COEF_CONST(0.0141414283), COEF_CONST(0.0079525812),
540 COEF_CONST(0.0044721137)
541};
542
543#ifdef __cplusplus
544
545#endif
546#endif
547
diff --git a/apps/codecs/libfaad/pulse.c b/apps/codecs/libfaad/pulse.c
new file mode 100644
index 0000000000..d75877db70
--- /dev/null
+++ b/apps/codecs/libfaad/pulse.c
@@ -0,0 +1,56 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#include "common.h"
29#include "structs.h"
30
31#include "syntax.h"
32#include "pulse.h"
33
34uint8_t pulse_decode(ic_stream *ics, int16_t *spec_data, uint16_t framelen)
35{
36 uint8_t i;
37 uint16_t k;
38 pulse_info *pul = &(ics->pul);
39
40 k = ics->swb_offset[pul->pulse_start_sfb];
41
42 for (i = 0; i <= pul->number_pulse; i++)
43 {
44 k += pul->pulse_offset[i];
45
46 if (k >= framelen)
47 return 15; /* should not be possible */
48
49 if (spec_data[k] > 0)
50 spec_data[k] += pul->pulse_amp[i];
51 else
52 spec_data[k] -= pul->pulse_amp[i];
53 }
54
55 return 0;
56}
diff --git a/apps/codecs/libfaad/pulse.h b/apps/codecs/libfaad/pulse.h
new file mode 100644
index 0000000000..84d7fd38d8
--- /dev/null
+++ b/apps/codecs/libfaad/pulse.h
@@ -0,0 +1,40 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __PULSE_H__
29#define __PULSE_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35uint8_t pulse_decode(ic_stream *ics, int16_t *spec_coef, uint16_t framelen);
36
37#ifdef __cplusplus
38}
39#endif
40#endif
diff --git a/apps/codecs/libfaad/rvlc.c b/apps/codecs/libfaad/rvlc.c
new file mode 100644
index 0000000000..5b17edd06c
--- /dev/null
+++ b/apps/codecs/libfaad/rvlc.c
@@ -0,0 +1,530 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28/* RVLC scalefactor decoding
29 *
30 * RVLC works like this:
31 * 1. Only symmetric huffman codewords are used
32 * 2. Total length of the scalefactor data is stored in the bitsream
33 * 3. Scalefactors are DPCM coded
34 * 4. Next to the starting value for DPCM the ending value is also stored
35 *
36 * With all this it is possible to read the scalefactor data from 2 sides.
37 * If there is a bit error in the scalefactor data it is possible to start
38 * decoding from the other end of the data, to find all but 1 scalefactor.
39 */
40
41#include "common.h"
42#include "structs.h"
43
44#include <stdlib.h>
45
46#include "syntax.h"
47#include "bits.h"
48#include "rvlc.h"
49
50
51#ifdef ERROR_RESILIENCE
52
53//#define PRINT_RVLC
54
55/* static function declarations */
56static uint8_t rvlc_decode_sf_forward(ic_stream *ics,
57 bitfile *ld_sf,
58 bitfile *ld_esc,
59 uint8_t *is_used);
60#if 0
61static uint8_t rvlc_decode_sf_reverse(ic_stream *ics,
62 bitfile *ld_sf,
63 bitfile *ld_esc,
64 uint8_t is_used);
65#endif
66static int8_t rvlc_huffman_sf(bitfile *ld_sf, bitfile *ld_esc,
67 int8_t direction);
68static int8_t rvlc_huffman_esc(bitfile *ld_esc, int8_t direction);
69
70
71uint8_t rvlc_scale_factor_data(ic_stream *ics, bitfile *ld)
72{
73 uint8_t bits = 9;
74
75 ics->sf_concealment = faad_get1bit(ld
76 DEBUGVAR(1,149,"rvlc_scale_factor_data(): sf_concealment"));
77 ics->rev_global_gain = (uint8_t)faad_getbits(ld, 8
78 DEBUGVAR(1,150,"rvlc_scale_factor_data(): rev_global_gain"));
79
80 if (ics->window_sequence == EIGHT_SHORT_SEQUENCE)
81 bits = 11;
82
83 /* the number of bits used for the huffman codewords */
84 ics->length_of_rvlc_sf = (uint16_t)faad_getbits(ld, bits
85 DEBUGVAR(1,151,"rvlc_scale_factor_data(): length_of_rvlc_sf"));
86
87 if (ics->noise_used)
88 {
89 ics->dpcm_noise_nrg = (uint16_t)faad_getbits(ld, 9
90 DEBUGVAR(1,152,"rvlc_scale_factor_data(): dpcm_noise_nrg"));
91
92 ics->length_of_rvlc_sf -= 9;
93 }
94
95 ics->sf_escapes_present = faad_get1bit(ld
96 DEBUGVAR(1,153,"rvlc_scale_factor_data(): sf_escapes_present"));
97
98 if (ics->sf_escapes_present)
99 {
100 ics->length_of_rvlc_escapes = (uint8_t)faad_getbits(ld, 8
101 DEBUGVAR(1,154,"rvlc_scale_factor_data(): length_of_rvlc_escapes"));
102 }
103
104 if (ics->noise_used)
105 {
106 ics->dpcm_noise_last_position = (uint16_t)faad_getbits(ld, 9
107 DEBUGVAR(1,155,"rvlc_scale_factor_data(): dpcm_noise_last_position"));
108 }
109
110 return 0;
111}
112
113uint8_t rvlc_decode_scale_factors(ic_stream *ics, bitfile *ld)
114{
115 uint8_t result;
116 uint8_t intensity_used = 0;
117 uint8_t *rvlc_sf_buffer = NULL;
118 uint8_t *rvlc_esc_buffer = NULL;
119 bitfile ld_rvlc_sf, ld_rvlc_esc;
120// bitfile ld_rvlc_sf_rev, ld_rvlc_esc_rev;
121
122 if (ics->length_of_rvlc_sf > 0)
123 {
124 /* We read length_of_rvlc_sf bits here to put it in a
125 seperate bitfile.
126 */
127 rvlc_sf_buffer = faad_getbitbuffer(ld, ics->length_of_rvlc_sf
128 DEBUGVAR(1,156,"rvlc_decode_scale_factors(): bitbuffer: length_of_rvlc_sf"));
129
130 faad_initbits(&ld_rvlc_sf, (void*)rvlc_sf_buffer, bit2byte(ics->length_of_rvlc_sf));
131// faad_initbits_rev(&ld_rvlc_sf_rev, (void*)rvlc_sf_buffer,
132// ics->length_of_rvlc_sf);
133 }
134
135 if (ics->sf_escapes_present)
136 {
137 /* We read length_of_rvlc_escapes bits here to put it in a
138 seperate bitfile.
139 */
140 rvlc_esc_buffer = faad_getbitbuffer(ld, ics->length_of_rvlc_escapes
141 DEBUGVAR(1,157,"rvlc_decode_scale_factors(): bitbuffer: length_of_rvlc_escapes"));
142
143 faad_initbits(&ld_rvlc_esc, (void*)rvlc_esc_buffer, bit2byte(ics->length_of_rvlc_escapes));
144// faad_initbits_rev(&ld_rvlc_esc_rev, (void*)rvlc_esc_buffer,
145// ics->length_of_rvlc_escapes);
146 }
147
148 /* decode the rvlc scale factors and escapes */
149 result = rvlc_decode_sf_forward(ics, &ld_rvlc_sf,
150 &ld_rvlc_esc, &intensity_used);
151// result = rvlc_decode_sf_reverse(ics, &ld_rvlc_sf_rev,
152// &ld_rvlc_esc_rev, intensity_used);
153
154
155 if (rvlc_esc_buffer) faad_free(rvlc_esc_buffer);
156 if (rvlc_sf_buffer) faad_free(rvlc_sf_buffer);
157
158 if (ics->length_of_rvlc_sf > 0)
159 faad_endbits(&ld_rvlc_sf);
160 if (ics->sf_escapes_present)
161 faad_endbits(&ld_rvlc_esc);
162
163 return result;
164}
165
166static uint8_t rvlc_decode_sf_forward(ic_stream *ics, bitfile *ld_sf, bitfile *ld_esc,
167 uint8_t *intensity_used)
168{
169 int8_t g, sfb;
170 int8_t t = 0;
171 int8_t error = 0;
172 int8_t noise_pcm_flag = 1;
173
174 int16_t scale_factor = ics->global_gain;
175 int16_t is_position = 0;
176 int16_t noise_energy = ics->global_gain - 90 - 256;
177
178#ifdef PRINT_RVLC
179 printf("\nglobal_gain: %d\n", ics->global_gain);
180#endif
181
182 for (g = 0; g < ics->num_window_groups; g++)
183 {
184 for (sfb = 0; sfb < ics->max_sfb; sfb++)
185 {
186 if (error)
187 {
188 ics->scale_factors[g][sfb] = 0;
189 } else {
190 switch (ics->sfb_cb[g][sfb])
191 {
192 case ZERO_HCB: /* zero book */
193 ics->scale_factors[g][sfb] = 0;
194 break;
195 case INTENSITY_HCB: /* intensity books */
196 case INTENSITY_HCB2:
197
198 *intensity_used = 1;
199
200 /* decode intensity position */
201 t = rvlc_huffman_sf(ld_sf, ld_esc, +1);
202
203 is_position += t;
204 ics->scale_factors[g][sfb] = is_position;
205
206 break;
207 case NOISE_HCB: /* noise books */
208
209 /* decode noise energy */
210 if (noise_pcm_flag)
211 {
212 int16_t n = ics->dpcm_noise_nrg;
213 noise_pcm_flag = 0;
214 noise_energy += n;
215 } else {
216 t = rvlc_huffman_sf(ld_sf, ld_esc, +1);
217 noise_energy += t;
218 }
219
220 ics->scale_factors[g][sfb] = noise_energy;
221
222 break;
223 default: /* spectral books */
224
225 /* decode scale factor */
226 t = rvlc_huffman_sf(ld_sf, ld_esc, +1);
227
228 scale_factor += t;
229 if (scale_factor < 0)
230 return 4;
231
232 ics->scale_factors[g][sfb] = scale_factor;
233
234 break;
235 }
236#ifdef PRINT_RVLC
237 printf("%3d:%4d%4d\n", sfb, ics->sfb_cb[g][sfb],
238 ics->scale_factors[g][sfb]);
239#endif
240 if (t == 99)
241 {
242 error = 1;
243 }
244 }
245 }
246 }
247#ifdef PRINT_RVLC
248 printf("\n\n");
249#endif
250
251 return 0;
252}
253
254#if 0 // not used right now, doesn't work correctly yet
255static uint8_t rvlc_decode_sf_reverse(ic_stream *ics, bitfile *ld_sf, bitfile *ld_esc,
256 uint8_t intensity_used)
257{
258 int8_t g, sfb;
259 int8_t t = 0;
260 int8_t error = 0;
261 int8_t noise_pcm_flag = 1, is_pcm_flag = 1, sf_pcm_flag = 1;
262
263 int16_t scale_factor = ics->rev_global_gain;
264 int16_t is_position = 0;
265 int16_t noise_energy = ics->rev_global_gain;
266
267#ifdef PRINT_RVLC
268 printf("\nrev_global_gain: %d\n", ics->rev_global_gain);
269#endif
270
271 if (intensity_used)
272 {
273 is_position = rvlc_huffman_sf(ld_sf, ld_esc, -1);
274#ifdef PRINT_RVLC
275 printf("is_position: %d\n", is_position);
276#endif
277 }
278
279 for (g = ics->num_window_groups-1; g >= 0; g--)
280 {
281 for (sfb = ics->max_sfb-1; sfb >= 0; sfb--)
282 {
283 if (error)
284 {
285 ics->scale_factors[g][sfb] = 0;
286 } else {
287 switch (ics->sfb_cb[g][sfb])
288 {
289 case ZERO_HCB: /* zero book */
290 ics->scale_factors[g][sfb] = 0;
291 break;
292 case INTENSITY_HCB: /* intensity books */
293 case INTENSITY_HCB2:
294
295 if (is_pcm_flag)
296 {
297 is_pcm_flag = 0;
298 ics->scale_factors[g][sfb] = is_position;
299 } else {
300 t = rvlc_huffman_sf(ld_sf, ld_esc, -1);
301 is_position -= t;
302
303 ics->scale_factors[g][sfb] = (uint8_t)is_position;
304 }
305 break;
306 case NOISE_HCB: /* noise books */
307
308 /* decode noise energy */
309 if (noise_pcm_flag)
310 {
311 noise_pcm_flag = 0;
312 noise_energy = ics->dpcm_noise_last_position;
313 } else {
314 t = rvlc_huffman_sf(ld_sf, ld_esc, -1);
315 noise_energy -= t;
316 }
317
318 ics->scale_factors[g][sfb] = (uint8_t)noise_energy;
319 break;
320 default: /* spectral books */
321
322 if (sf_pcm_flag || (sfb == 0))
323 {
324 sf_pcm_flag = 0;
325 if (sfb == 0)
326 scale_factor = ics->global_gain;
327 } else {
328 /* decode scale factor */
329 t = rvlc_huffman_sf(ld_sf, ld_esc, -1);
330 scale_factor -= t;
331 }
332
333 if (scale_factor < 0)
334 return 4;
335
336 ics->scale_factors[g][sfb] = (uint8_t)scale_factor;
337 break;
338 }
339#ifdef PRINT_RVLC
340 printf("%3d:%4d%4d\n", sfb, ics->sfb_cb[g][sfb],
341 ics->scale_factors[g][sfb]);
342#endif
343 if (t == 99)
344 {
345 error = 1;
346 }
347 }
348 }
349 }
350
351#ifdef PRINT_RVLC
352 printf("\n\n");
353#endif
354
355 return 0;
356}
357#endif
358
359/* index == 99 means not allowed codeword */
360static rvlc_huff_table book_rvlc[] = {
361 /*index length codeword */
362 { 0, 1, 0 }, /* 0 */
363 { -1, 3, 5 }, /* 101 */
364 { 1, 3, 7 }, /* 111 */
365 { -2, 4, 9 }, /* 1001 */
366 { -3, 5, 17 }, /* 10001 */
367 { 2, 5, 27 }, /* 11011 */
368 { -4, 6, 33 }, /* 100001 */
369 { 99, 6, 50 }, /* 110010 */
370 { 3, 6, 51 }, /* 110011 */
371 { 99, 6, 52 }, /* 110100 */
372 { -7, 7, 65 }, /* 1000001 */
373 { 99, 7, 96 }, /* 1100000 */
374 { 99, 7, 98 }, /* 1100010 */
375 { 7, 7, 99 }, /* 1100011 */
376 { 4, 7, 107 }, /* 1101011 */
377 { -5, 8, 129 }, /* 10000001 */
378 { 99, 8, 194 }, /* 11000010 */
379 { 5, 8, 195 }, /* 11000011 */
380 { 99, 8, 212 }, /* 11010100 */
381 { 99, 9, 256 }, /* 100000000 */
382 { -6, 9, 257 }, /* 100000001 */
383 { 99, 9, 426 }, /* 110101010 */
384 { 6, 9, 427 }, /* 110101011 */
385 { 99, 10, 0 } /* Shouldn't come this far */
386};
387
388static rvlc_huff_table book_escape[] = {
389 /*index length codeword */
390 { 1, 2, 0 },
391 { 0, 2, 2 },
392 { 3, 3, 2 },
393 { 2, 3, 6 },
394 { 4, 4, 14 },
395 { 7, 5, 13 },
396 { 6, 5, 15 },
397 { 5, 5, 31 },
398 { 11, 6, 24 },
399 { 10, 6, 25 },
400 { 9, 6, 29 },
401 { 8, 6, 61 },
402 { 13, 7, 56 },
403 { 12, 7, 120 },
404 { 15, 8, 114 },
405 { 14, 8, 242 },
406 { 17, 9, 230 },
407 { 16, 9, 486 },
408 { 19, 10, 463 },
409 { 18, 10, 974 },
410 { 22, 11, 925 },
411 { 20, 11, 1950 },
412 { 21, 11, 1951 },
413 { 23, 12, 1848 },
414 { 25, 13, 3698 },
415 { 24, 14, 7399 },
416 { 26, 15, 14797 },
417 { 49, 19, 236736 },
418 { 50, 19, 236737 },
419 { 51, 19, 236738 },
420 { 52, 19, 236739 },
421 { 53, 19, 236740 },
422 { 27, 20, 473482 },
423 { 28, 20, 473483 },
424 { 29, 20, 473484 },
425 { 30, 20, 473485 },
426 { 31, 20, 473486 },
427 { 32, 20, 473487 },
428 { 33, 20, 473488 },
429 { 34, 20, 473489 },
430 { 35, 20, 473490 },
431 { 36, 20, 473491 },
432 { 37, 20, 473492 },
433 { 38, 20, 473493 },
434 { 39, 20, 473494 },
435 { 40, 20, 473495 },
436 { 41, 20, 473496 },
437 { 42, 20, 473497 },
438 { 43, 20, 473498 },
439 { 44, 20, 473499 },
440 { 45, 20, 473500 },
441 { 46, 20, 473501 },
442 { 47, 20, 473502 },
443 { 48, 20, 473503 },
444 { 99, 21, 0 } /* Shouldn't come this far */
445};
446
447static int8_t rvlc_huffman_sf(bitfile *ld_sf, bitfile *ld_esc,
448 int8_t direction)
449{
450 uint8_t i, j;
451 int8_t index;
452 uint32_t cw;
453 rvlc_huff_table *h = book_rvlc;
454
455 i = h->len;
456 if (direction > 0)
457 cw = faad_getbits(ld_sf, i DEBUGVAR(1,0,""));
458 else
459 cw = faad_getbits_rev(ld_sf, i DEBUGVAR(1,0,""));
460
461 while ((cw != h->cw)
462 && (i < 10))
463 {
464 h++;
465 j = h->len-i;
466 i += j;
467 cw <<= j;
468 if (direction > 0)
469 cw |= faad_getbits(ld_sf, j DEBUGVAR(1,0,""));
470 else
471 cw |= faad_getbits_rev(ld_sf, j DEBUGVAR(1,0,""));
472 }
473
474 index = h->index;
475
476 if (index == +ESC_VAL)
477 {
478 int8_t esc = rvlc_huffman_esc(ld_esc, direction);
479 if (esc == 99)
480 return 99;
481 index += esc;
482#ifdef PRINT_RVLC
483 printf("esc: %d - ", esc);
484#endif
485 }
486 if (index == -ESC_VAL)
487 {
488 int8_t esc = rvlc_huffman_esc(ld_esc, direction);
489 if (esc == 99)
490 return 99;
491 index -= esc;
492#ifdef PRINT_RVLC
493 printf("esc: %d - ", esc);
494#endif
495 }
496
497 return index;
498}
499
500static int8_t rvlc_huffman_esc(bitfile *ld,
501 int8_t direction)
502{
503 uint8_t i, j;
504 uint32_t cw;
505 rvlc_huff_table *h = book_escape;
506
507 i = h->len;
508 if (direction > 0)
509 cw = faad_getbits(ld, i DEBUGVAR(1,0,""));
510 else
511 cw = faad_getbits_rev(ld, i DEBUGVAR(1,0,""));
512
513 while ((cw != h->cw)
514 && (i < 21))
515 {
516 h++;
517 j = h->len-i;
518 i += j;
519 cw <<= j;
520 if (direction > 0)
521 cw |= faad_getbits(ld, j DEBUGVAR(1,0,""));
522 else
523 cw |= faad_getbits_rev(ld, j DEBUGVAR(1,0,""));
524 }
525
526 return h->index;
527}
528
529#endif
530
diff --git a/apps/codecs/libfaad/rvlc.h b/apps/codecs/libfaad/rvlc.h
new file mode 100644
index 0000000000..b17246a452
--- /dev/null
+++ b/apps/codecs/libfaad/rvlc.h
@@ -0,0 +1,53 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __RVLC_SCF_H__
29#define __RVLC_SCF_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35typedef struct
36{
37 int8_t index;
38 uint8_t len;
39 uint32_t cw;
40} rvlc_huff_table;
41
42
43#define ESC_VAL 7
44
45
46uint8_t rvlc_scale_factor_data(ic_stream *ics, bitfile *ld);
47uint8_t rvlc_decode_scale_factors(ic_stream *ics, bitfile *ld);
48
49
50#ifdef __cplusplus
51}
52#endif
53#endif
diff --git a/apps/codecs/libfaad/sbr_dct.c b/apps/codecs/libfaad/sbr_dct.c
new file mode 100644
index 0000000000..dbfbb8945c
--- /dev/null
+++ b/apps/codecs/libfaad/sbr_dct.c
@@ -0,0 +1,2271 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#include "common.h"
29
30#ifdef SBR_DEC
31
32#ifdef _MSC_VER
33#pragma warning(disable:4305)
34#pragma warning(disable:4244)
35#endif
36
37
38#include "sbr_dct.h"
39
40void DCT4_32(real_t *y, real_t *x)
41{
42 real_t f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10;
43 real_t f11, f12, f13, f14, f15, f16, f17, f18, f19, f20;
44 real_t f21, f22, f23, f24, f25, f26, f27, f28, f29, f30;
45 real_t f31, f32, f33, f34, f35, f36, f37, f38, f39, f40;
46 real_t f41, f42, f43, f44, f45, f46, f47, f48, f49, f50;
47 real_t f51, f52, f53, f54, f55, f56, f57, f58, f59, f60;
48 real_t f61, f62, f63, f64, f65, f66, f67, f68, f69, f70;
49 real_t f71, f72, f73, f74, f75, f76, f77, f78, f79, f80;
50 real_t f81, f82, f83, f84, f85, f86, f87, f88, f89, f90;
51 real_t f91, f92, f93, f94, f95, f96, f97, f98, f99, f100;
52 real_t f101, f102, f103, f104, f105, f106, f107, f108, f109, f110;
53 real_t f111, f112, f113, f114, f115, f116, f117, f118, f119, f120;
54 real_t f121, f122, f123, f124, f125, f126, f127, f128, f129, f130;
55 real_t f131, f132, f133, f134, f135, f136, f137, f138, f139, f140;
56 real_t f141, f142, f143, f144, f145, f146, f147, f148, f149, f150;
57 real_t f151, f152, f153, f154, f155, f156, f157, f158, f159, f160;
58 real_t f161, f162, f163, f164, f165, f166, f167, f168, f169, f170;
59 real_t f171, f172, f173, f174, f175, f176, f177, f178, f179, f180;
60 real_t f181, f182, f183, f184, f185, f186, f187, f188, f189, f190;
61 real_t f191, f192, f193, f194, f195, f196, f197, f198, f199, f200;
62 real_t f201, f202, f203, f204, f205, f206, f207, f208, f209, f210;
63 real_t f211, f212, f213, f214, f215, f216, f217, f218, f219, f220;
64 real_t f221, f222, f223, f224, f225, f226, f227, f228, f229, f230;
65 real_t f231, f232, f233, f234, f235, f236, f237, f238, f239, f240;
66 real_t f241, f242, f243, f244, f245, f246, f247, f248, f249, f250;
67 real_t f251, f252, f253, f254, f255, f256, f257, f258, f259, f260;
68 real_t f261, f262, f263, f264, f265, f266, f267, f268, f269, f270;
69 real_t f271, f272, f273, f274, f275, f276, f277, f278, f279, f280;
70 real_t f281, f282, f283, f284, f285, f286, f287, f288, f289, f290;
71 real_t f291, f292, f293, f294, f295, f296, f297, f298, f299, f300;
72 real_t f301, f302, f303, f304, f305, f306, f307, f310, f311, f312;
73 real_t f313, f316, f317, f318, f319, f322, f323, f324, f325, f328;
74 real_t f329, f330, f331, f334, f335, f336, f337, f340, f341, f342;
75 real_t f343, f346, f347, f348, f349, f352, f353, f354, f355, f358;
76 real_t f359, f360, f361, f364, f365, f366, f367, f370, f371, f372;
77 real_t f373, f376, f377, f378, f379, f382, f383, f384, f385, f388;
78 real_t f389, f390, f391, f394, f395, f396, f397;
79
80 f0 = x[15] - x[16];
81 f1 = x[15] + x[16];
82 f2 = MUL_F(FRAC_CONST(0.7071067811865476), f1);
83 f3 = MUL_F(FRAC_CONST(0.7071067811865476), f0);
84 f4 = x[8] - x[23];
85 f5 = x[8] + x[23];
86 f6 = MUL_F(FRAC_CONST(0.7071067811865476), f5);
87 f7 = MUL_F(FRAC_CONST(0.7071067811865476), f4);
88 f8 = x[12] - x[19];
89 f9 = x[12] + x[19];
90 f10 = MUL_F(FRAC_CONST(0.7071067811865476), f9);
91 f11 = MUL_F(FRAC_CONST(0.7071067811865476), f8);
92 f12 = x[11] - x[20];
93 f13 = x[11] + x[20];
94 f14 = MUL_F(FRAC_CONST(0.7071067811865476), f13);
95 f15 = MUL_F(FRAC_CONST(0.7071067811865476), f12);
96 f16 = x[14] - x[17];
97 f17 = x[14] + x[17];
98 f18 = MUL_F(FRAC_CONST(0.7071067811865476), f17);
99 f19 = MUL_F(FRAC_CONST(0.7071067811865476), f16);
100 f20 = x[9] - x[22];
101 f21 = x[9] + x[22];
102 f22 = MUL_F(FRAC_CONST(0.7071067811865476), f21);
103 f23 = MUL_F(FRAC_CONST(0.7071067811865476), f20);
104 f24 = x[13] - x[18];
105 f25 = x[13] + x[18];
106 f26 = MUL_F(FRAC_CONST(0.7071067811865476), f25);
107 f27 = MUL_F(FRAC_CONST(0.7071067811865476), f24);
108 f28 = x[10] - x[21];
109 f29 = x[10] + x[21];
110 f30 = MUL_F(FRAC_CONST(0.7071067811865476), f29);
111 f31 = MUL_F(FRAC_CONST(0.7071067811865476), f28);
112 f32 = x[0] - f2;
113 f33 = x[0] + f2;
114 f34 = x[31] - f3;
115 f35 = x[31] + f3;
116 f36 = x[7] - f6;
117 f37 = x[7] + f6;
118 f38 = x[24] - f7;
119 f39 = x[24] + f7;
120 f40 = x[3] - f10;
121 f41 = x[3] + f10;
122 f42 = x[28] - f11;
123 f43 = x[28] + f11;
124 f44 = x[4] - f14;
125 f45 = x[4] + f14;
126 f46 = x[27] - f15;
127 f47 = x[27] + f15;
128 f48 = x[1] - f18;
129 f49 = x[1] + f18;
130 f50 = x[30] - f19;
131 f51 = x[30] + f19;
132 f52 = x[6] - f22;
133 f53 = x[6] + f22;
134 f54 = x[25] - f23;
135 f55 = x[25] + f23;
136 f56 = x[2] - f26;
137 f57 = x[2] + f26;
138 f58 = x[29] - f27;
139 f59 = x[29] + f27;
140 f60 = x[5] - f30;
141 f61 = x[5] + f30;
142 f62 = x[26] - f31;
143 f63 = x[26] + f31;
144 f64 = f39 + f37;
145 f65 = MUL_F(FRAC_CONST(-0.5411961001461969), f39);
146 f66 = MUL_F(FRAC_CONST(0.9238795325112867), f64);
147 f67 = MUL_C(COEF_CONST(1.3065629648763766), f37);
148 f68 = f65 + f66;
149 f69 = f67 - f66;
150 f70 = f38 + f36;
151 f71 = MUL_C(COEF_CONST(1.3065629648763770), f38);
152 f72 = MUL_F(FRAC_CONST(-0.3826834323650904), f70);
153 f73 = MUL_F(FRAC_CONST(0.5411961001461961), f36);
154 f74 = f71 + f72;
155 f75 = f73 - f72;
156 f76 = f47 + f45;
157 f77 = MUL_F(FRAC_CONST(-0.5411961001461969), f47);
158 f78 = MUL_F(FRAC_CONST(0.9238795325112867), f76);
159 f79 = MUL_C(COEF_CONST(1.3065629648763766), f45);
160 f80 = f77 + f78;
161 f81 = f79 - f78;
162 f82 = f46 + f44;
163 f83 = MUL_C(COEF_CONST(1.3065629648763770), f46);
164 f84 = MUL_F(FRAC_CONST(-0.3826834323650904), f82);
165 f85 = MUL_F(FRAC_CONST(0.5411961001461961), f44);
166 f86 = f83 + f84;
167 f87 = f85 - f84;
168 f88 = f55 + f53;
169 f89 = MUL_F(FRAC_CONST(-0.5411961001461969), f55);
170 f90 = MUL_F(FRAC_CONST(0.9238795325112867), f88);
171 f91 = MUL_C(COEF_CONST(1.3065629648763766), f53);
172 f92 = f89 + f90;
173 f93 = f91 - f90;
174 f94 = f54 + f52;
175 f95 = MUL_C(COEF_CONST(1.3065629648763770), f54);
176 f96 = MUL_F(FRAC_CONST(-0.3826834323650904), f94);
177 f97 = MUL_F(FRAC_CONST(0.5411961001461961), f52);
178 f98 = f95 + f96;
179 f99 = f97 - f96;
180 f100 = f63 + f61;
181 f101 = MUL_F(FRAC_CONST(-0.5411961001461969), f63);
182 f102 = MUL_F(FRAC_CONST(0.9238795325112867), f100);
183 f103 = MUL_C(COEF_CONST(1.3065629648763766), f61);
184 f104 = f101 + f102;
185 f105 = f103 - f102;
186 f106 = f62 + f60;
187 f107 = MUL_C(COEF_CONST(1.3065629648763770), f62);
188 f108 = MUL_F(FRAC_CONST(-0.3826834323650904), f106);
189 f109 = MUL_F(FRAC_CONST(0.5411961001461961), f60);
190 f110 = f107 + f108;
191 f111 = f109 - f108;
192 f112 = f33 - f68;
193 f113 = f33 + f68;
194 f114 = f35 - f69;
195 f115 = f35 + f69;
196 f116 = f32 - f74;
197 f117 = f32 + f74;
198 f118 = f34 - f75;
199 f119 = f34 + f75;
200 f120 = f41 - f80;
201 f121 = f41 + f80;
202 f122 = f43 - f81;
203 f123 = f43 + f81;
204 f124 = f40 - f86;
205 f125 = f40 + f86;
206 f126 = f42 - f87;
207 f127 = f42 + f87;
208 f128 = f49 - f92;
209 f129 = f49 + f92;
210 f130 = f51 - f93;
211 f131 = f51 + f93;
212 f132 = f48 - f98;
213 f133 = f48 + f98;
214 f134 = f50 - f99;
215 f135 = f50 + f99;
216 f136 = f57 - f104;
217 f137 = f57 + f104;
218 f138 = f59 - f105;
219 f139 = f59 + f105;
220 f140 = f56 - f110;
221 f141 = f56 + f110;
222 f142 = f58 - f111;
223 f143 = f58 + f111;
224 f144 = f123 + f121;
225 f145 = MUL_F(FRAC_CONST(-0.7856949583871021), f123);
226 f146 = MUL_F(FRAC_CONST(0.9807852804032304), f144);
227 f147 = MUL_C(COEF_CONST(1.1758756024193588), f121);
228 f148 = f145 + f146;
229 f149 = f147 - f146;
230 f150 = f127 + f125;
231 f151 = MUL_F(FRAC_CONST(0.2758993792829431), f127);
232 f152 = MUL_F(FRAC_CONST(0.5555702330196022), f150);
233 f153 = MUL_C(COEF_CONST(1.3870398453221475), f125);
234 f154 = f151 + f152;
235 f155 = f153 - f152;
236 f156 = f122 + f120;
237 f157 = MUL_C(COEF_CONST(1.1758756024193591), f122);
238 f158 = MUL_F(FRAC_CONST(-0.1950903220161287), f156);
239 f159 = MUL_F(FRAC_CONST(0.7856949583871016), f120);
240 f160 = f157 + f158;
241 f161 = f159 - f158;
242 f162 = f126 + f124;
243 f163 = MUL_C(COEF_CONST(1.3870398453221473), f126);
244 f164 = MUL_F(FRAC_CONST(-0.8314696123025455), f162);
245 f165 = MUL_F(FRAC_CONST(-0.2758993792829436), f124);
246 f166 = f163 + f164;
247 f167 = f165 - f164;
248 f168 = f139 + f137;
249 f169 = MUL_F(FRAC_CONST(-0.7856949583871021), f139);
250 f170 = MUL_F(FRAC_CONST(0.9807852804032304), f168);
251 f171 = MUL_C(COEF_CONST(1.1758756024193588), f137);
252 f172 = f169 + f170;
253 f173 = f171 - f170;
254 f174 = f143 + f141;
255 f175 = MUL_F(FRAC_CONST(0.2758993792829431), f143);
256 f176 = MUL_F(FRAC_CONST(0.5555702330196022), f174);
257 f177 = MUL_C(COEF_CONST(1.3870398453221475), f141);
258 f178 = f175 + f176;
259 f179 = f177 - f176;
260 f180 = f138 + f136;
261 f181 = MUL_C(COEF_CONST(1.1758756024193591), f138);
262 f182 = MUL_F(FRAC_CONST(-0.1950903220161287), f180);
263 f183 = MUL_F(FRAC_CONST(0.7856949583871016), f136);
264 f184 = f181 + f182;
265 f185 = f183 - f182;
266 f186 = f142 + f140;
267 f187 = MUL_C(COEF_CONST(1.3870398453221473), f142);
268 f188 = MUL_F(FRAC_CONST(-0.8314696123025455), f186);
269 f189 = MUL_F(FRAC_CONST(-0.2758993792829436), f140);
270 f190 = f187 + f188;
271 f191 = f189 - f188;
272 f192 = f113 - f148;
273 f193 = f113 + f148;
274 f194 = f115 - f149;
275 f195 = f115 + f149;
276 f196 = f117 - f154;
277 f197 = f117 + f154;
278 f198 = f119 - f155;
279 f199 = f119 + f155;
280 f200 = f112 - f160;
281 f201 = f112 + f160;
282 f202 = f114 - f161;
283 f203 = f114 + f161;
284 f204 = f116 - f166;
285 f205 = f116 + f166;
286 f206 = f118 - f167;
287 f207 = f118 + f167;
288 f208 = f129 - f172;
289 f209 = f129 + f172;
290 f210 = f131 - f173;
291 f211 = f131 + f173;
292 f212 = f133 - f178;
293 f213 = f133 + f178;
294 f214 = f135 - f179;
295 f215 = f135 + f179;
296 f216 = f128 - f184;
297 f217 = f128 + f184;
298 f218 = f130 - f185;
299 f219 = f130 + f185;
300 f220 = f132 - f190;
301 f221 = f132 + f190;
302 f222 = f134 - f191;
303 f223 = f134 + f191;
304 f224 = f211 + f209;
305 f225 = MUL_F(FRAC_CONST(-0.8971675863426361), f211);
306 f226 = MUL_F(FRAC_CONST(0.9951847266721968), f224);
307 f227 = MUL_C(COEF_CONST(1.0932018670017576), f209);
308 f228 = f225 + f226;
309 f229 = f227 - f226;
310 f230 = f215 + f213;
311 f231 = MUL_F(FRAC_CONST(-0.4105245275223571), f215);
312 f232 = MUL_F(FRAC_CONST(0.8819212643483549), f230);
313 f233 = MUL_C(COEF_CONST(1.3533180011743529), f213);
314 f234 = f231 + f232;
315 f235 = f233 - f232;
316 f236 = f219 + f217;
317 f237 = MUL_F(FRAC_CONST(0.1386171691990915), f219);
318 f238 = MUL_F(FRAC_CONST(0.6343932841636455), f236);
319 f239 = MUL_C(COEF_CONST(1.4074037375263826), f217);
320 f240 = f237 + f238;
321 f241 = f239 - f238;
322 f242 = f223 + f221;
323 f243 = MUL_F(FRAC_CONST(0.6666556584777466), f223);
324 f244 = MUL_F(FRAC_CONST(0.2902846772544623), f242);
325 f245 = MUL_C(COEF_CONST(1.2472250129866711), f221);
326 f246 = f243 + f244;
327 f247 = f245 - f244;
328 f248 = f210 + f208;
329 f249 = MUL_C(COEF_CONST(1.0932018670017574), f210);
330 f250 = MUL_F(FRAC_CONST(-0.0980171403295605), f248);
331 f251 = MUL_F(FRAC_CONST(0.8971675863426364), f208);
332 f252 = f249 + f250;
333 f253 = f251 - f250;
334 f254 = f214 + f212;
335 f255 = MUL_C(COEF_CONST(1.3533180011743529), f214);
336 f256 = MUL_F(FRAC_CONST(-0.4713967368259979), f254);
337 f257 = MUL_F(FRAC_CONST(0.4105245275223569), f212);
338 f258 = f255 + f256;
339 f259 = f257 - f256;
340 f260 = f218 + f216;
341 f261 = MUL_C(COEF_CONST(1.4074037375263826), f218);
342 f262 = MUL_F(FRAC_CONST(-0.7730104533627369), f260);
343 f263 = MUL_F(FRAC_CONST(-0.1386171691990913), f216);
344 f264 = f261 + f262;
345 f265 = f263 - f262;
346 f266 = f222 + f220;
347 f267 = MUL_C(COEF_CONST(1.2472250129866711), f222);
348 f268 = MUL_F(FRAC_CONST(-0.9569403357322089), f266);
349 f269 = MUL_F(FRAC_CONST(-0.6666556584777469), f220);
350 f270 = f267 + f268;
351 f271 = f269 - f268;
352 f272 = f193 - f228;
353 f273 = f193 + f228;
354 f274 = f195 - f229;
355 f275 = f195 + f229;
356 f276 = f197 - f234;
357 f277 = f197 + f234;
358 f278 = f199 - f235;
359 f279 = f199 + f235;
360 f280 = f201 - f240;
361 f281 = f201 + f240;
362 f282 = f203 - f241;
363 f283 = f203 + f241;
364 f284 = f205 - f246;
365 f285 = f205 + f246;
366 f286 = f207 - f247;
367 f287 = f207 + f247;
368 f288 = f192 - f252;
369 f289 = f192 + f252;
370 f290 = f194 - f253;
371 f291 = f194 + f253;
372 f292 = f196 - f258;
373 f293 = f196 + f258;
374 f294 = f198 - f259;
375 f295 = f198 + f259;
376 f296 = f200 - f264;
377 f297 = f200 + f264;
378 f298 = f202 - f265;
379 f299 = f202 + f265;
380 f300 = f204 - f270;
381 f301 = f204 + f270;
382 f302 = f206 - f271;
383 f303 = f206 + f271;
384 f304 = f275 + f273;
385 f305 = MUL_F(FRAC_CONST(-0.9751575901732920), f275);
386 f306 = MUL_F(FRAC_CONST(0.9996988186962043), f304);
387 f307 = MUL_C(COEF_CONST(1.0242400472191164), f273);
388 y[0] = f305 + f306;
389 y[31] = f307 - f306;
390 f310 = f279 + f277;
391 f311 = MUL_F(FRAC_CONST(-0.8700688593994936), f279);
392 f312 = MUL_F(FRAC_CONST(0.9924795345987100), f310);
393 f313 = MUL_C(COEF_CONST(1.1148902097979263), f277);
394 y[2] = f311 + f312;
395 y[29] = f313 - f312;
396 f316 = f283 + f281;
397 f317 = MUL_F(FRAC_CONST(-0.7566008898816587), f283);
398 f318 = MUL_F(FRAC_CONST(0.9757021300385286), f316);
399 f319 = MUL_C(COEF_CONST(1.1948033701953984), f281);
400 y[4] = f317 + f318;
401 y[27] = f319 - f318;
402 f322 = f287 + f285;
403 f323 = MUL_F(FRAC_CONST(-0.6358464401941451), f287);
404 f324 = MUL_F(FRAC_CONST(0.9495281805930367), f322);
405 f325 = MUL_C(COEF_CONST(1.2632099209919283), f285);
406 y[6] = f323 + f324;
407 y[25] = f325 - f324;
408 f328 = f291 + f289;
409 f329 = MUL_F(FRAC_CONST(-0.5089684416985408), f291);
410 f330 = MUL_F(FRAC_CONST(0.9142097557035307), f328);
411 f331 = MUL_C(COEF_CONST(1.3194510697085207), f289);
412 y[8] = f329 + f330;
413 y[23] = f331 - f330;
414 f334 = f295 + f293;
415 f335 = MUL_F(FRAC_CONST(-0.3771887988789273), f295);
416 f336 = MUL_F(FRAC_CONST(0.8700869911087114), f334);
417 f337 = MUL_C(COEF_CONST(1.3629851833384954), f293);
418 y[10] = f335 + f336;
419 y[21] = f337 - f336;
420 f340 = f299 + f297;
421 f341 = MUL_F(FRAC_CONST(-0.2417766217337384), f299);
422 f342 = MUL_F(FRAC_CONST(0.8175848131515837), f340);
423 f343 = MUL_C(COEF_CONST(1.3933930045694289), f297);
424 y[12] = f341 + f342;
425 y[19] = f343 - f342;
426 f346 = f303 + f301;
427 f347 = MUL_F(FRAC_CONST(-0.1040360035527077), f303);
428 f348 = MUL_F(FRAC_CONST(0.7572088465064845), f346);
429 f349 = MUL_C(COEF_CONST(1.4103816894602612), f301);
430 y[14] = f347 + f348;
431 y[17] = f349 - f348;
432 f352 = f274 + f272;
433 f353 = MUL_F(FRAC_CONST(0.0347065382144002), f274);
434 f354 = MUL_F(FRAC_CONST(0.6895405447370668), f352);
435 f355 = MUL_C(COEF_CONST(1.4137876276885337), f272);
436 y[16] = f353 + f354;
437 y[15] = f355 - f354;
438 f358 = f278 + f276;
439 f359 = MUL_F(FRAC_CONST(0.1731148370459795), f278);
440 f360 = MUL_F(FRAC_CONST(0.6152315905806268), f358);
441 f361 = MUL_C(COEF_CONST(1.4035780182072330), f276);
442 y[18] = f359 + f360;
443 y[13] = f361 - f360;
444 f364 = f282 + f280;
445 f365 = MUL_F(FRAC_CONST(0.3098559453626100), f282);
446 f366 = MUL_F(FRAC_CONST(0.5349976198870972), f364);
447 f367 = MUL_C(COEF_CONST(1.3798511851368043), f280);
448 y[20] = f365 + f366;
449 y[11] = f367 - f366;
450 f370 = f286 + f284;
451 f371 = MUL_F(FRAC_CONST(0.4436129715409088), f286);
452 f372 = MUL_F(FRAC_CONST(0.4496113296546065), f370);
453 f373 = MUL_C(COEF_CONST(1.3428356308501219), f284);
454 y[22] = f371 + f372;
455 y[9] = f373 - f372;
456 f376 = f290 + f288;
457 f377 = MUL_F(FRAC_CONST(0.5730977622997509), f290);
458 f378 = MUL_F(FRAC_CONST(0.3598950365349881), f376);
459 f379 = MUL_C(COEF_CONST(1.2928878353697271), f288);
460 y[24] = f377 + f378;
461 y[7] = f379 - f378;
462 f382 = f294 + f292;
463 f383 = MUL_F(FRAC_CONST(0.6970633083205415), f294);
464 f384 = MUL_F(FRAC_CONST(0.2667127574748984), f382);
465 f385 = MUL_C(COEF_CONST(1.2304888232703382), f292);
466 y[26] = f383 + f384;
467 y[5] = f385 - f384;
468 f388 = f298 + f296;
469 f389 = MUL_F(FRAC_CONST(0.8143157536286401), f298);
470 f390 = MUL_F(FRAC_CONST(0.1709618887603012), f388);
471 f391 = MUL_C(COEF_CONST(1.1562395311492424), f296);
472 y[28] = f389 + f390;
473 y[3] = f391 - f390;
474 f394 = f302 + f300;
475 f395 = MUL_F(FRAC_CONST(0.9237258930790228), f302);
476 f396 = MUL_F(FRAC_CONST(0.0735645635996674), f394);
477 f397 = MUL_C(COEF_CONST(1.0708550202783576), f300);
478 y[30] = f395 + f396;
479 y[1] = f397 - f396;
480}
481
482#ifdef SBR_LOW_POWER
483
484void DCT2_16_unscaled(real_t *y, real_t *x)
485{
486 real_t f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10;
487 real_t f11, f12, f13, f14, f15, f16, f17, f18, f19, f20;
488 real_t f21, f22, f23, f24, f25, f26, f27, f28, f31, f32;
489 real_t f33, f34, f37, f38, f39, f40, f41, f42, f43, f44;
490 real_t f45, f46, f47, f48, f49, f51, f53, f54, f57, f58;
491 real_t f59, f60, f61, f62, f63, f64, f65, f66, f67, f68;
492 real_t f69, f70, f71, f72, f73, f74, f75, f76, f77, f78;
493 real_t f79, f80, f81, f82, f83, f84, f85, f86, f87, f88;
494 real_t f89, f90, f91, f92, f95, f96, f97, f98, f101, f102;
495 real_t f103, f104, f107, f108, f109, f110;
496
497 f0 = x[0] - x[15];
498 f1 = x[0] + x[15];
499 f2 = x[1] - x[14];
500 f3 = x[1] + x[14];
501 f4 = x[2] - x[13];
502 f5 = x[2] + x[13];
503 f6 = x[3] - x[12];
504 f7 = x[3] + x[12];
505 f8 = x[4] - x[11];
506 f9 = x[4] + x[11];
507 f10 = x[5] - x[10];
508 f11 = x[5] + x[10];
509 f12 = x[6] - x[9];
510 f13 = x[6] + x[9];
511 f14 = x[7] - x[8];
512 f15 = x[7] + x[8];
513 f16 = f1 - f15;
514 f17 = f1 + f15;
515 f18 = f3 - f13;
516 f19 = f3 + f13;
517 f20 = f5 - f11;
518 f21 = f5 + f11;
519 f22 = f7 - f9;
520 f23 = f7 + f9;
521 f24 = f17 - f23;
522 f25 = f17 + f23;
523 f26 = f19 - f21;
524 f27 = f19 + f21;
525 f28 = f25 - f27;
526 y[0] = f25 + f27;
527 y[8] = MUL_F(f28, FRAC_CONST(0.7071067811865476));
528 f31 = f24 + f26;
529 f32 = MUL_C(f24, COEF_CONST(1.3065629648763766));
530 f33 = MUL_F(f31, FRAC_CONST(-0.9238795325112866));
531 f34 = MUL_F(f26, FRAC_CONST(-0.5411961001461967));
532 y[12] = f32 + f33;
533 y[4] = f34 - f33;
534 f37 = f16 + f22;
535 f38 = MUL_C(f16, COEF_CONST(1.1758756024193588));
536 f39 = MUL_F(f37, FRAC_CONST(-0.9807852804032304));
537 f40 = MUL_F(f22, FRAC_CONST(-0.7856949583871021));
538 f41 = f38 + f39;
539 f42 = f40 - f39;
540 f43 = f18 + f20;
541 f44 = MUL_C(f18, COEF_CONST(1.3870398453221473));
542 f45 = MUL_F(f43, FRAC_CONST(-0.8314696123025455));
543 f46 = MUL_F(f20, FRAC_CONST(-0.2758993792829436));
544 f47 = f44 + f45;
545 f48 = f46 - f45;
546 f49 = f42 - f48;
547 y[2] = f42 + f48;
548 f51 = MUL_F(f49, FRAC_CONST(0.7071067811865476));
549 y[14] = f41 - f47;
550 f53 = f41 + f47;
551 f54 = MUL_F(f53, FRAC_CONST(0.7071067811865476));
552 y[10] = f51 - f54;
553 y[6] = f51 + f54;
554 f57 = f2 - f4;
555 f58 = f2 + f4;
556 f59 = f6 - f8;
557 f60 = f6 + f8;
558 f61 = f10 - f12;
559 f62 = f10 + f12;
560 f63 = MUL_F(f60, FRAC_CONST(0.7071067811865476));
561 f64 = f0 - f63;
562 f65 = f0 + f63;
563 f66 = f58 + f62;
564 f67 = MUL_C(f58, COEF_CONST(1.3065629648763766));
565 f68 = MUL_F(f66, FRAC_CONST(-0.9238795325112866));
566 f69 = MUL_F(f62, FRAC_CONST(-0.5411961001461967));
567 f70 = f67 + f68;
568 f71 = f69 - f68;
569 f72 = f65 - f71;
570 f73 = f65 + f71;
571 f74 = f64 - f70;
572 f75 = f64 + f70;
573 f76 = MUL_F(f59, FRAC_CONST(0.7071067811865476));
574 f77 = f14 - f76;
575 f78 = f14 + f76;
576 f79 = f61 + f57;
577 f80 = MUL_C(f61, COEF_CONST(1.3065629648763766));
578 f81 = MUL_F(f79, FRAC_CONST(-0.9238795325112866));
579 f82 = MUL_F(f57, FRAC_CONST(-0.5411961001461967));
580 f83 = f80 + f81;
581 f84 = f82 - f81;
582 f85 = f78 - f84;
583 f86 = f78 + f84;
584 f87 = f77 - f83;
585 f88 = f77 + f83;
586 f89 = f86 + f73;
587 f90 = MUL_F(f86, FRAC_CONST(-0.8971675863426361));
588 f91 = MUL_F(f89, FRAC_CONST(0.9951847266721968));
589 f92 = MUL_C(f73, COEF_CONST(1.0932018670017576));
590 y[1] = f90 + f91;
591 y[15] = f92 - f91;
592 f95 = f75 - f88;
593 f96 = MUL_F(f88, FRAC_CONST(-0.6666556584777466));
594 f97 = MUL_F(f95, FRAC_CONST(0.9569403357322089));
595 f98 = MUL_C(f75, COEF_CONST(1.2472250129866713));
596 y[3] = f97 - f96;
597 y[13] = f98 - f97;
598 f101 = f87 + f74;
599 f102 = MUL_F(f87, FRAC_CONST(-0.4105245275223571));
600 f103 = MUL_F(f101, FRAC_CONST(0.8819212643483549));
601 f104 = MUL_C(f74, COEF_CONST(1.3533180011743529));
602 y[5] = f102 + f103;
603 y[11] = f104 - f103;
604 f107 = f72 - f85;
605 f108 = MUL_F(f85, FRAC_CONST(-0.1386171691990915));
606 f109 = MUL_F(f107, FRAC_CONST(0.7730104533627370));
607 f110 = MUL_C(f72, COEF_CONST(1.4074037375263826));
608 y[7] = f109 - f108;
609 y[9] = f110 - f109;
610}
611
612void DCT4_16(real_t *y, real_t *x)
613{
614 real_t f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10;
615 real_t f11, f12, f13, f14, f15, f16, f17, f18, f19, f20;
616 real_t f21, f22, f23, f24, f25, f26, f27, f28, f29, f30;
617 real_t f31, f32, f33, f34, f35, f36, f37, f38, f39, f40;
618 real_t f41, f42, f43, f44, f45, f46, f47, f48, f49, f50;
619 real_t f51, f52, f53, f54, f55, f56, f57, f58, f59, f60;
620 real_t f61, f62, f63, f64, f65, f66, f67, f68, f69, f70;
621 real_t f71, f72, f73, f74, f75, f76, f77, f78, f79, f80;
622 real_t f81, f82, f83, f84, f85, f86, f87, f88, f89, f90;
623 real_t f91, f92, f93, f94, f95, f96, f97, f98, f99, f100;
624 real_t f101, f102, f103, f104, f105, f106, f107, f108, f109, f110;
625 real_t f111, f112, f113, f114, f115, f116, f117, f118, f119, f120;
626 real_t f121, f122, f123, f124, f125, f126, f127, f128, f130, f132;
627 real_t f134, f136, f138, f140, f142, f144, f145, f148, f149, f152;
628 real_t f153, f156, f157;
629
630 f0 = x[0] + x[15];
631 f1 = MUL_C(COEF_CONST(1.0478631305325901), x[0]);
632 f2 = MUL_F(FRAC_CONST(-0.9987954562051724), f0);
633 f3 = MUL_F(FRAC_CONST(-0.9497277818777548), x[15]);
634 f4 = f1 + f2;
635 f5 = f3 - f2;
636 f6 = x[2] + x[13];
637 f7 = MUL_C(COEF_CONST(1.2130114330978077), x[2]);
638 f8 = MUL_F(FRAC_CONST(-0.9700312531945440), f6);
639 f9 = MUL_F(FRAC_CONST(-0.7270510732912803), x[13]);
640 f10 = f7 + f8;
641 f11 = f9 - f8;
642 f12 = x[4] + x[11];
643 f13 = MUL_C(COEF_CONST(1.3315443865537255), x[4]);
644 f14 = MUL_F(FRAC_CONST(-0.9039892931234433), f12);
645 f15 = MUL_F(FRAC_CONST(-0.4764341996931612), x[11]);
646 f16 = f13 + f14;
647 f17 = f15 - f14;
648 f18 = x[6] + x[9];
649 f19 = MUL_C(COEF_CONST(1.3989068359730781), x[6]);
650 f20 = MUL_F(FRAC_CONST(-0.8032075314806453), f18);
651 f21 = MUL_F(FRAC_CONST(-0.2075082269882124), x[9]);
652 f22 = f19 + f20;
653 f23 = f21 - f20;
654 f24 = x[8] + x[7];
655 f25 = MUL_C(COEF_CONST(1.4125100802019777), x[8]);
656 f26 = MUL_F(FRAC_CONST(-0.6715589548470187), f24);
657 f27 = MUL_F(FRAC_CONST(0.0693921705079402), x[7]);
658 f28 = f25 + f26;
659 f29 = f27 - f26;
660 f30 = x[10] + x[5];
661 f31 = MUL_C(COEF_CONST(1.3718313541934939), x[10]);
662 f32 = MUL_F(FRAC_CONST(-0.5141027441932219), f30);
663 f33 = MUL_F(FRAC_CONST(0.3436258658070501), x[5]);
664 f34 = f31 + f32;
665 f35 = f33 - f32;
666 f36 = x[12] + x[3];
667 f37 = MUL_C(COEF_CONST(1.2784339185752409), x[12]);
668 f38 = MUL_F(FRAC_CONST(-0.3368898533922200), f36);
669 f39 = MUL_F(FRAC_CONST(0.6046542117908008), x[3]);
670 f40 = f37 + f38;
671 f41 = f39 - f38;
672 f42 = x[14] + x[1];
673 f43 = MUL_C(COEF_CONST(1.1359069844201433), x[14]);
674 f44 = MUL_F(FRAC_CONST(-0.1467304744553624), f42);
675 f45 = MUL_F(FRAC_CONST(0.8424460355094185), x[1]);
676 f46 = f43 + f44;
677 f47 = f45 - f44;
678 f48 = f5 - f29;
679 f49 = f5 + f29;
680 f50 = f4 - f28;
681 f51 = f4 + f28;
682 f52 = f11 - f35;
683 f53 = f11 + f35;
684 f54 = f10 - f34;
685 f55 = f10 + f34;
686 f56 = f17 - f41;
687 f57 = f17 + f41;
688 f58 = f16 - f40;
689 f59 = f16 + f40;
690 f60 = f23 - f47;
691 f61 = f23 + f47;
692 f62 = f22 - f46;
693 f63 = f22 + f46;
694 f64 = f48 + f50;
695 f65 = MUL_C(COEF_CONST(1.1758756024193588), f48);
696 f66 = MUL_F(FRAC_CONST(-0.9807852804032304), f64);
697 f67 = MUL_F(FRAC_CONST(-0.7856949583871021), f50);
698 f68 = f65 + f66;
699 f69 = f67 - f66;
700 f70 = f52 + f54;
701 f71 = MUL_C(COEF_CONST(1.3870398453221475), f52);
702 f72 = MUL_F(FRAC_CONST(-0.5555702330196022), f70);
703 f73 = MUL_F(FRAC_CONST(0.2758993792829431), f54);
704 f74 = f71 + f72;
705 f75 = f73 - f72;
706 f76 = f56 + f58;
707 f77 = MUL_F(FRAC_CONST(0.7856949583871022), f56);
708 f78 = MUL_F(FRAC_CONST(0.1950903220161283), f76);
709 f79 = MUL_C(COEF_CONST(1.1758756024193586), f58);
710 f80 = f77 + f78;
711 f81 = f79 - f78;
712 f82 = f60 + f62;
713 f83 = MUL_F(FRAC_CONST(-0.2758993792829430), f60);
714 f84 = MUL_F(FRAC_CONST(0.8314696123025452), f82);
715 f85 = MUL_C(COEF_CONST(1.3870398453221475), f62);
716 f86 = f83 + f84;
717 f87 = f85 - f84;
718 f88 = f49 - f57;
719 f89 = f49 + f57;
720 f90 = f51 - f59;
721 f91 = f51 + f59;
722 f92 = f53 - f61;
723 f93 = f53 + f61;
724 f94 = f55 - f63;
725 f95 = f55 + f63;
726 f96 = f69 - f81;
727 f97 = f69 + f81;
728 f98 = f68 - f80;
729 f99 = f68 + f80;
730 f100 = f75 - f87;
731 f101 = f75 + f87;
732 f102 = f74 - f86;
733 f103 = f74 + f86;
734 f104 = f88 + f90;
735 f105 = MUL_C(COEF_CONST(1.3065629648763766), f88);
736 f106 = MUL_F(FRAC_CONST(-0.9238795325112866), f104);
737 f107 = MUL_F(FRAC_CONST(-0.5411961001461967), f90);
738 f108 = f105 + f106;
739 f109 = f107 - f106;
740 f110 = f92 + f94;
741 f111 = MUL_F(FRAC_CONST(0.5411961001461969), f92);
742 f112 = MUL_F(FRAC_CONST(0.3826834323650898), f110);
743 f113 = MUL_C(COEF_CONST(1.3065629648763766), f94);
744 f114 = f111 + f112;
745 f115 = f113 - f112;
746 f116 = f96 + f98;
747 f117 = MUL_C(COEF_CONST(1.3065629648763766), f96);
748 f118 = MUL_F(FRAC_CONST(-0.9238795325112866), f116);
749 f119 = MUL_F(FRAC_CONST(-0.5411961001461967), f98);
750 f120 = f117 + f118;
751 f121 = f119 - f118;
752 f122 = f100 + f102;
753 f123 = MUL_F(FRAC_CONST(0.5411961001461969), f100);
754 f124 = MUL_F(FRAC_CONST(0.3826834323650898), f122);
755 f125 = MUL_C(COEF_CONST(1.3065629648763766), f102);
756 f126 = f123 + f124;
757 f127 = f125 - f124;
758 f128 = f89 - f93;
759 y[0] = f89 + f93;
760 f130 = f91 - f95;
761 y[15] = f91 + f95;
762 f132 = f109 - f115;
763 y[3] = f109 + f115;
764 f134 = f108 - f114;
765 y[12] = f108 + f114;
766 f136 = f97 - f101;
767 y[1] = f97 + f101;
768 f138 = f99 - f103;
769 y[14] = f99 + f103;
770 f140 = f121 - f127;
771 y[2] = f121 + f127;
772 f142 = f120 - f126;
773 y[13] = f120 + f126;
774 f144 = f128 - f130;
775 f145 = f128 + f130;
776 y[8] = MUL_F(FRAC_CONST(0.7071067811865474), f144);
777 y[7] = MUL_F(FRAC_CONST(0.7071067811865474), f145);
778 f148 = f132 - f134;
779 f149 = f132 + f134;
780 y[11] = MUL_F(FRAC_CONST(0.7071067811865474), f148);
781 y[4] = MUL_F(FRAC_CONST(0.7071067811865474), f149);
782 f152 = f136 - f138;
783 f153 = f136 + f138;
784 y[9] = MUL_F(FRAC_CONST(0.7071067811865474), f152);
785 y[6] = MUL_F(FRAC_CONST(0.7071067811865474), f153);
786 f156 = f140 - f142;
787 f157 = f140 + f142;
788 y[10] = MUL_F(FRAC_CONST(0.7071067811865474), f156);
789 y[5] = MUL_F(FRAC_CONST(0.7071067811865474), f157);
790}
791
792void DCT3_32_unscaled(real_t *y, real_t *x)
793{
794 real_t f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10;
795 real_t f11, f12, f13, f14, f15, f16, f17, f18, f19, f20;
796 real_t f21, f22, f23, f24, f25, f26, f27, f28, f29, f30;
797 real_t f31, f32, f33, f34, f35, f36, f37, f38, f39, f40;
798 real_t f41, f42, f43, f44, f45, f46, f47, f48, f49, f50;
799 real_t f51, f52, f53, f54, f55, f56, f57, f58, f59, f60;
800 real_t f61, f62, f63, f64, f65, f66, f67, f68, f69, f70;
801 real_t f71, f72, f73, f74, f75, f76, f77, f78, f79, f80;
802 real_t f81, f82, f83, f84, f85, f86, f87, f88, f89, f90;
803 real_t f91, f92, f93, f94, f95, f96, f97, f98, f99, f100;
804 real_t f101, f102, f103, f104, f105, f106, f107, f108, f109, f110;
805 real_t f111, f112, f113, f114, f115, f116, f117, f118, f119, f120;
806 real_t f121, f122, f123, f124, f125, f126, f127, f128, f129, f130;
807 real_t f131, f132, f133, f134, f135, f136, f137, f138, f139, f140;
808 real_t f141, f142, f143, f144, f145, f146, f147, f148, f149, f150;
809 real_t f151, f152, f153, f154, f155, f156, f157, f158, f159, f160;
810 real_t f161, f162, f163, f164, f165, f166, f167, f168, f169, f170;
811 real_t f171, f172, f173, f174, f175, f176, f177, f178, f179, f180;
812 real_t f181, f182, f183, f184, f185, f186, f187, f188, f189, f190;
813 real_t f191, f192, f193, f194, f195, f196, f197, f198, f199, f200;
814 real_t f201, f202, f203, f204, f205, f206, f207, f208, f209, f210;
815 real_t f211, f212, f213, f214, f215, f216, f217, f218, f219, f220;
816 real_t f221, f222, f223, f224, f225, f226, f227, f228, f229, f230;
817 real_t f231, f232, f233, f234, f235, f236, f237, f238, f239, f240;
818 real_t f241, f242, f243, f244, f245, f246, f247, f248, f249, f250;
819 real_t f251, f252, f253, f254, f255, f256, f257, f258, f259, f260;
820 real_t f261, f262, f263, f264, f265, f266, f267, f268, f269, f270;
821 real_t f271, f272;
822
823 f0 = MUL_F(x[16], FRAC_CONST(0.7071067811865476));
824 f1 = x[0] - f0;
825 f2 = x[0] + f0;
826 f3 = x[8] + x[24];
827 f4 = MUL_C(x[8], COEF_CONST(1.3065629648763766));
828 f5 = MUL_F(f3, FRAC_CONST((-0.9238795325112866)));
829 f6 = MUL_F(x[24], FRAC_CONST((-0.5411961001461967)));
830 f7 = f4 + f5;
831 f8 = f6 - f5;
832 f9 = f2 - f8;
833 f10 = f2 + f8;
834 f11 = f1 - f7;
835 f12 = f1 + f7;
836 f13 = x[4] + x[28];
837 f14 = MUL_C(x[4], COEF_CONST(1.1758756024193588));
838 f15 = MUL_F(f13, FRAC_CONST((-0.9807852804032304)));
839 f16 = MUL_F(x[28], FRAC_CONST((-0.7856949583871021)));
840 f17 = f14 + f15;
841 f18 = f16 - f15;
842 f19 = x[12] + x[20];
843 f20 = MUL_C(x[12], COEF_CONST(1.3870398453221473));
844 f21 = MUL_F(f19, FRAC_CONST((-0.8314696123025455)));
845 f22 = MUL_F(x[20], FRAC_CONST((-0.2758993792829436)));
846 f23 = f20 + f21;
847 f24 = f22 - f21;
848 f25 = f18 - f24;
849 f26 = f18 + f24;
850 f27 = MUL_F(f25, FRAC_CONST(0.7071067811865476));
851 f28 = f17 - f23;
852 f29 = f17 + f23;
853 f30 = MUL_F(f29, FRAC_CONST(0.7071067811865476));
854 f31 = f27 - f30;
855 f32 = f27 + f30;
856 f33 = f10 - f26;
857 f34 = f10 + f26;
858 f35 = f12 - f32;
859 f36 = f12 + f32;
860 f37 = f11 - f31;
861 f38 = f11 + f31;
862 f39 = f9 - f28;
863 f40 = f9 + f28;
864 f41 = x[2] + x[30];
865 f42 = MUL_C(x[2], COEF_CONST(1.0932018670017569));
866 f43 = MUL_F(f41, FRAC_CONST((-0.9951847266721969)));
867 f44 = MUL_F(x[30], FRAC_CONST((-0.8971675863426368)));
868 f45 = f42 + f43;
869 f46 = f44 - f43;
870 f47 = x[6] + x[26];
871 f48 = MUL_C(x[6], COEF_CONST(1.2472250129866711));
872 f49 = MUL_F(f47, FRAC_CONST((-0.9569403357322089)));
873 f50 = MUL_F(x[26], FRAC_CONST((-0.6666556584777469)));
874 f51 = f48 + f49;
875 f52 = f50 - f49;
876 f53 = x[10] + x[22];
877 f54 = MUL_C(x[10], COEF_CONST(1.3533180011743526));
878 f55 = MUL_F(f53, FRAC_CONST((-0.8819212643483551)));
879 f56 = MUL_F(x[22], FRAC_CONST((-0.4105245275223575)));
880 f57 = f54 + f55;
881 f58 = f56 - f55;
882 f59 = x[14] + x[18];
883 f60 = MUL_C(x[14], COEF_CONST(1.4074037375263826));
884 f61 = MUL_F(f59, FRAC_CONST((-0.7730104533627369)));
885 f62 = MUL_F(x[18], FRAC_CONST((-0.1386171691990913)));
886 f63 = f60 + f61;
887 f64 = f62 - f61;
888 f65 = f46 - f64;
889 f66 = f46 + f64;
890 f67 = f52 - f58;
891 f68 = f52 + f58;
892 f69 = f66 - f68;
893 f70 = f66 + f68;
894 f71 = MUL_F(f69, FRAC_CONST(0.7071067811865476));
895 f72 = f65 + f67;
896 f73 = MUL_C(f65, COEF_CONST(1.3065629648763766));
897 f74 = MUL_F(f72, FRAC_CONST((-0.9238795325112866)));
898 f75 = MUL_F(f67, FRAC_CONST((-0.5411961001461967)));
899 f76 = f73 + f74;
900 f77 = f75 - f74;
901 f78 = f45 - f63;
902 f79 = f45 + f63;
903 f80 = f51 - f57;
904 f81 = f51 + f57;
905 f82 = f79 + f81;
906 f83 = MUL_C(f79, COEF_CONST(1.3065629648763770));
907 f84 = MUL_F(f82, FRAC_CONST((-0.3826834323650904)));
908 f85 = MUL_F(f81, FRAC_CONST(0.5411961001461961));
909 f86 = f83 + f84;
910 f87 = f85 - f84;
911 f88 = f78 - f80;
912 f89 = f78 + f80;
913 f90 = MUL_F(f89, FRAC_CONST(0.7071067811865476));
914 f91 = f77 - f87;
915 f92 = f77 + f87;
916 f93 = f71 - f90;
917 f94 = f71 + f90;
918 f95 = f76 - f86;
919 f96 = f76 + f86;
920 f97 = f34 - f70;
921 f98 = f34 + f70;
922 f99 = f36 - f92;
923 f100 = f36 + f92;
924 f101 = f38 - f91;
925 f102 = f38 + f91;
926 f103 = f40 - f94;
927 f104 = f40 + f94;
928 f105 = f39 - f93;
929 f106 = f39 + f93;
930 f107 = f37 - f96;
931 f108 = f37 + f96;
932 f109 = f35 - f95;
933 f110 = f35 + f95;
934 f111 = f33 - f88;
935 f112 = f33 + f88;
936 f113 = x[1] + x[31];
937 f114 = MUL_C(x[1], COEF_CONST(1.0478631305325901));
938 f115 = MUL_F(f113, FRAC_CONST((-0.9987954562051724)));
939 f116 = MUL_F(x[31], FRAC_CONST((-0.9497277818777548)));
940 f117 = f114 + f115;
941 f118 = f116 - f115;
942 f119 = x[5] + x[27];
943 f120 = MUL_C(x[5], COEF_CONST(1.2130114330978077));
944 f121 = MUL_F(f119, FRAC_CONST((-0.9700312531945440)));
945 f122 = MUL_F(x[27], FRAC_CONST((-0.7270510732912803)));
946 f123 = f120 + f121;
947 f124 = f122 - f121;
948 f125 = x[9] + x[23];
949 f126 = MUL_C(x[9], COEF_CONST(1.3315443865537255));
950 f127 = MUL_F(f125, FRAC_CONST((-0.9039892931234433)));
951 f128 = MUL_F(x[23], FRAC_CONST((-0.4764341996931612)));
952 f129 = f126 + f127;
953 f130 = f128 - f127;
954 f131 = x[13] + x[19];
955 f132 = MUL_C(x[13], COEF_CONST(1.3989068359730781));
956 f133 = MUL_F(f131, FRAC_CONST((-0.8032075314806453)));
957 f134 = MUL_F(x[19], FRAC_CONST((-0.2075082269882124)));
958 f135 = f132 + f133;
959 f136 = f134 - f133;
960 f137 = x[17] + x[15];
961 f138 = MUL_C(x[17], COEF_CONST(1.4125100802019777));
962 f139 = MUL_F(f137, FRAC_CONST((-0.6715589548470187)));
963 f140 = MUL_F(x[15], FRAC_CONST(0.0693921705079402));
964 f141 = f138 + f139;
965 f142 = f140 - f139;
966 f143 = x[21] + x[11];
967 f144 = MUL_C(x[21], COEF_CONST(1.3718313541934939));
968 f145 = MUL_F(f143, FRAC_CONST((-0.5141027441932219)));
969 f146 = MUL_F(x[11], FRAC_CONST(0.3436258658070501));
970 f147 = f144 + f145;
971 f148 = f146 - f145;
972 f149 = x[25] + x[7];
973 f150 = MUL_C(x[25], COEF_CONST(1.2784339185752409));
974 f151 = MUL_F(f149, FRAC_CONST((-0.3368898533922200)));
975 f152 = MUL_F(x[7], FRAC_CONST(0.6046542117908008));
976 f153 = f150 + f151;
977 f154 = f152 - f151;
978 f155 = x[29] + x[3];
979 f156 = MUL_C(x[29], COEF_CONST(1.1359069844201433));
980 f157 = MUL_F(f155, FRAC_CONST((-0.1467304744553624)));
981 f158 = MUL_F(x[3], FRAC_CONST(0.8424460355094185));
982 f159 = f156 + f157;
983 f160 = f158 - f157;
984 f161 = f118 - f142;
985 f162 = f118 + f142;
986 f163 = f117 - f141;
987 f164 = f117 + f141;
988 f165 = f124 - f148;
989 f166 = f124 + f148;
990 f167 = f123 - f147;
991 f168 = f123 + f147;
992 f169 = f130 - f154;
993 f170 = f130 + f154;
994 f171 = f129 - f153;
995 f172 = f129 + f153;
996 f173 = f136 - f160;
997 f174 = f136 + f160;
998 f175 = f135 - f159;
999 f176 = f135 + f159;
1000 f177 = f161 + f163;
1001 f178 = MUL_C(f161, COEF_CONST(1.1758756024193588));
1002 f179 = MUL_F(f177, FRAC_CONST((-0.9807852804032304)));
1003 f180 = MUL_F(f163, FRAC_CONST((-0.7856949583871021)));
1004 f181 = f178 + f179;
1005 f182 = f180 - f179;
1006 f183 = f165 + f167;
1007 f184 = MUL_C(f165, COEF_CONST(1.3870398453221475));
1008 f185 = MUL_F(f183, FRAC_CONST((-0.5555702330196022)));
1009 f186 = MUL_F(f167, FRAC_CONST(0.2758993792829431));
1010 f187 = f184 + f185;
1011 f188 = f186 - f185;
1012 f189 = f169 + f171;
1013 f190 = MUL_F(f169, FRAC_CONST(0.7856949583871022));
1014 f191 = MUL_F(f189, FRAC_CONST(0.1950903220161283));
1015 f192 = MUL_C(f171, COEF_CONST(1.1758756024193586));
1016 f193 = f190 + f191;
1017 f194 = f192 - f191;
1018 f195 = f173 + f175;
1019 f196 = MUL_F(f173, FRAC_CONST((-0.2758993792829430)));
1020 f197 = MUL_F(f195, FRAC_CONST(0.8314696123025452));
1021 f198 = MUL_C(f175, COEF_CONST(1.3870398453221475));
1022 f199 = f196 + f197;
1023 f200 = f198 - f197;
1024 f201 = f162 - f170;
1025 f202 = f162 + f170;
1026 f203 = f164 - f172;
1027 f204 = f164 + f172;
1028 f205 = f166 - f174;
1029 f206 = f166 + f174;
1030 f207 = f168 - f176;
1031 f208 = f168 + f176;
1032 f209 = f182 - f194;
1033 f210 = f182 + f194;
1034 f211 = f181 - f193;
1035 f212 = f181 + f193;
1036 f213 = f188 - f200;
1037 f214 = f188 + f200;
1038 f215 = f187 - f199;
1039 f216 = f187 + f199;
1040 f217 = f201 + f203;
1041 f218 = MUL_C(f201, COEF_CONST(1.3065629648763766));
1042 f219 = MUL_F(f217, FRAC_CONST((-0.9238795325112866)));
1043 f220 = MUL_F(f203, FRAC_CONST((-0.5411961001461967)));
1044 f221 = f218 + f219;
1045 f222 = f220 - f219;
1046 f223 = f205 + f207;
1047 f224 = MUL_F(f205, FRAC_CONST(0.5411961001461969));
1048 f225 = MUL_F(f223, FRAC_CONST(0.3826834323650898));
1049 f226 = MUL_C(f207, COEF_CONST(1.3065629648763766));
1050 f227 = f224 + f225;
1051 f228 = f226 - f225;
1052 f229 = f209 + f211;
1053 f230 = MUL_C(f209, COEF_CONST(1.3065629648763766));
1054 f231 = MUL_F(f229, FRAC_CONST((-0.9238795325112866)));
1055 f232 = MUL_F(f211, FRAC_CONST((-0.5411961001461967)));
1056 f233 = f230 + f231;
1057 f234 = f232 - f231;
1058 f235 = f213 + f215;
1059 f236 = MUL_F(f213, FRAC_CONST(0.5411961001461969));
1060 f237 = MUL_F(f235, FRAC_CONST(0.3826834323650898));
1061 f238 = MUL_C(f215, COEF_CONST(1.3065629648763766));
1062 f239 = f236 + f237;
1063 f240 = f238 - f237;
1064 f241 = f202 - f206;
1065 f242 = f202 + f206;
1066 f243 = f204 - f208;
1067 f244 = f204 + f208;
1068 f245 = f222 - f228;
1069 f246 = f222 + f228;
1070 f247 = f221 - f227;
1071 f248 = f221 + f227;
1072 f249 = f210 - f214;
1073 f250 = f210 + f214;
1074 f251 = f212 - f216;
1075 f252 = f212 + f216;
1076 f253 = f234 - f240;
1077 f254 = f234 + f240;
1078 f255 = f233 - f239;
1079 f256 = f233 + f239;
1080 f257 = f241 - f243;
1081 f258 = f241 + f243;
1082 f259 = MUL_F(f257, FRAC_CONST(0.7071067811865474));
1083 f260 = MUL_F(f258, FRAC_CONST(0.7071067811865474));
1084 f261 = f245 - f247;
1085 f262 = f245 + f247;
1086 f263 = MUL_F(f261, FRAC_CONST(0.7071067811865474));
1087 f264 = MUL_F(f262, FRAC_CONST(0.7071067811865474));
1088 f265 = f249 - f251;
1089 f266 = f249 + f251;
1090 f267 = MUL_F(f265, FRAC_CONST(0.7071067811865474));
1091 f268 = MUL_F(f266, FRAC_CONST(0.7071067811865474));
1092 f269 = f253 - f255;
1093 f270 = f253 + f255;
1094 f271 = MUL_F(f269, FRAC_CONST(0.7071067811865474));
1095 f272 = MUL_F(f270, FRAC_CONST(0.7071067811865474));
1096 y[31] = f98 - f242;
1097 y[0] = f98 + f242;
1098 y[30] = f100 - f250;
1099 y[1] = f100 + f250;
1100 y[29] = f102 - f254;
1101 y[2] = f102 + f254;
1102 y[28] = f104 - f246;
1103 y[3] = f104 + f246;
1104 y[27] = f106 - f264;
1105 y[4] = f106 + f264;
1106 y[26] = f108 - f272;
1107 y[5] = f108 + f272;
1108 y[25] = f110 - f268;
1109 y[6] = f110 + f268;
1110 y[24] = f112 - f260;
1111 y[7] = f112 + f260;
1112 y[23] = f111 - f259;
1113 y[8] = f111 + f259;
1114 y[22] = f109 - f267;
1115 y[9] = f109 + f267;
1116 y[21] = f107 - f271;
1117 y[10] = f107 + f271;
1118 y[20] = f105 - f263;
1119 y[11] = f105 + f263;
1120 y[19] = f103 - f248;
1121 y[12] = f103 + f248;
1122 y[18] = f101 - f256;
1123 y[13] = f101 + f256;
1124 y[17] = f99 - f252;
1125 y[14] = f99 + f252;
1126 y[16] = f97 - f244;
1127 y[15] = f97 + f244;
1128}
1129
1130void DCT2_32_unscaled(real_t *y, real_t *x)
1131{
1132 real_t f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10;
1133 real_t f11, f12, f13, f14, f15, f16, f17, f18, f19, f20;
1134 real_t f21, f22, f23, f24, f25, f26, f27, f28, f29, f30;
1135 real_t f31, f32, f33, f34, f35, f36, f37, f38, f39, f40;
1136 real_t f41, f42, f43, f44, f45, f46, f47, f48, f49, f50;
1137 real_t f51, f52, f53, f54, f55, f56, f57, f58, f59, f60;
1138 real_t f63, f64, f65, f66, f69, f70, f71, f72, f73, f74;
1139 real_t f75, f76, f77, f78, f79, f80, f81, f83, f85, f86;
1140 real_t f89, f90, f91, f92, f93, f94, f95, f96, f97, f98;
1141 real_t f99, f100, f101, f102, f103, f104, f105, f106, f107, f108;
1142 real_t f109, f110, f111, f112, f113, f114, f115, f116, f117, f118;
1143 real_t f119, f120, f121, f122, f123, f124, f127, f128, f129, f130;
1144 real_t f133, f134, f135, f136, f139, f140, f141, f142, f145, f146;
1145 real_t f147, f148, f149, f150, f151, f152, f153, f154, f155, f156;
1146 real_t f157, f158, f159, f160, f161, f162, f163, f164, f165, f166;
1147 real_t f167, f168, f169, f170, f171, f172, f173, f174, f175, f176;
1148 real_t f177, f178, f179, f180, f181, f182, f183, f184, f185, f186;
1149 real_t f187, f188, f189, f190, f191, f192, f193, f194, f195, f196;
1150 real_t f197, f198, f199, f200, f201, f202, f203, f204, f205, f206;
1151 real_t f207, f208, f209, f210, f211, f212, f213, f214, f215, f216;
1152 real_t f217, f218, f219, f220, f221, f222, f223, f224, f225, f226;
1153 real_t f227, f228, f229, f230, f231, f232, f233, f234, f235, f236;
1154 real_t f237, f238, f239, f240, f241, f242, f243, f244, f247, f248;
1155 real_t f249, f250, f253, f254, f255, f256, f259, f260, f261, f262;
1156 real_t f265, f266, f267, f268, f271, f272, f273, f274, f277, f278;
1157 real_t f279, f280, f283, f284, f285, f286;
1158
1159 f0 = x[0] - x[31];
1160 f1 = x[0] + x[31];
1161 f2 = x[1] - x[30];
1162 f3 = x[1] + x[30];
1163 f4 = x[2] - x[29];
1164 f5 = x[2] + x[29];
1165 f6 = x[3] - x[28];
1166 f7 = x[3] + x[28];
1167 f8 = x[4] - x[27];
1168 f9 = x[4] + x[27];
1169 f10 = x[5] - x[26];
1170 f11 = x[5] + x[26];
1171 f12 = x[6] - x[25];
1172 f13 = x[6] + x[25];
1173 f14 = x[7] - x[24];
1174 f15 = x[7] + x[24];
1175 f16 = x[8] - x[23];
1176 f17 = x[8] + x[23];
1177 f18 = x[9] - x[22];
1178 f19 = x[9] + x[22];
1179 f20 = x[10] - x[21];
1180 f21 = x[10] + x[21];
1181 f22 = x[11] - x[20];
1182 f23 = x[11] + x[20];
1183 f24 = x[12] - x[19];
1184 f25 = x[12] + x[19];
1185 f26 = x[13] - x[18];
1186 f27 = x[13] + x[18];
1187 f28 = x[14] - x[17];
1188 f29 = x[14] + x[17];
1189 f30 = x[15] - x[16];
1190 f31 = x[15] + x[16];
1191 f32 = f1 - f31;
1192 f33 = f1 + f31;
1193 f34 = f3 - f29;
1194 f35 = f3 + f29;
1195 f36 = f5 - f27;
1196 f37 = f5 + f27;
1197 f38 = f7 - f25;
1198 f39 = f7 + f25;
1199 f40 = f9 - f23;
1200 f41 = f9 + f23;
1201 f42 = f11 - f21;
1202 f43 = f11 + f21;
1203 f44 = f13 - f19;
1204 f45 = f13 + f19;
1205 f46 = f15 - f17;
1206 f47 = f15 + f17;
1207 f48 = f33 - f47;
1208 f49 = f33 + f47;
1209 f50 = f35 - f45;
1210 f51 = f35 + f45;
1211 f52 = f37 - f43;
1212 f53 = f37 + f43;
1213 f54 = f39 - f41;
1214 f55 = f39 + f41;
1215 f56 = f49 - f55;
1216 f57 = f49 + f55;
1217 f58 = f51 - f53;
1218 f59 = f51 + f53;
1219 f60 = f57 - f59;
1220 y[0] = f57 + f59;
1221 y[16] = MUL_F(FRAC_CONST(0.7071067811865476), f60);
1222 f63 = f56 + f58;
1223 f64 = MUL_C(COEF_CONST(1.3065629648763766), f56);
1224 f65 = MUL_F(FRAC_CONST(-0.9238795325112866), f63);
1225 f66 = MUL_F(FRAC_CONST(-0.5411961001461967), f58);
1226 y[24] = f64 + f65;
1227 y[8] = f66 - f65;
1228 f69 = f48 + f54;
1229 f70 = MUL_C(COEF_CONST(1.1758756024193588), f48);
1230 f71 = MUL_F(FRAC_CONST(-0.9807852804032304), f69);
1231 f72 = MUL_F(FRAC_CONST(-0.7856949583871021), f54);
1232 f73 = f70 + f71;
1233 f74 = f72 - f71;
1234 f75 = f50 + f52;
1235 f76 = MUL_C(COEF_CONST(1.3870398453221473), f50);
1236 f77 = MUL_F(FRAC_CONST(-0.8314696123025455), f75);
1237 f78 = MUL_F(FRAC_CONST(-0.2758993792829436), f52);
1238 f79 = f76 + f77;
1239 f80 = f78 - f77;
1240 f81 = f74 - f80;
1241 y[4] = f74 + f80;
1242 f83 = MUL_F(FRAC_CONST(0.7071067811865476), f81);
1243 y[28] = f73 - f79;
1244 f85 = f73 + f79;
1245 f86 = MUL_F(FRAC_CONST(0.7071067811865476), f85);
1246 y[20] = f83 - f86;
1247 y[12] = f83 + f86;
1248 f89 = f34 - f36;
1249 f90 = f34 + f36;
1250 f91 = f38 - f40;
1251 f92 = f38 + f40;
1252 f93 = f42 - f44;
1253 f94 = f42 + f44;
1254 f95 = MUL_F(FRAC_CONST(0.7071067811865476), f92);
1255 f96 = f32 - f95;
1256 f97 = f32 + f95;
1257 f98 = f90 + f94;
1258 f99 = MUL_C(COEF_CONST(1.3065629648763766), f90);
1259 f100 = MUL_F(FRAC_CONST(-0.9238795325112866), f98);
1260 f101 = MUL_F(FRAC_CONST(-0.5411961001461967), f94);
1261 f102 = f99 + f100;
1262 f103 = f101 - f100;
1263 f104 = f97 - f103;
1264 f105 = f97 + f103;
1265 f106 = f96 - f102;
1266 f107 = f96 + f102;
1267 f108 = MUL_F(FRAC_CONST(0.7071067811865476), f91);
1268 f109 = f46 - f108;
1269 f110 = f46 + f108;
1270 f111 = f93 + f89;
1271 f112 = MUL_C(COEF_CONST(1.3065629648763766), f93);
1272 f113 = MUL_F(FRAC_CONST(-0.9238795325112866), f111);
1273 f114 = MUL_F(FRAC_CONST(-0.5411961001461967), f89);
1274 f115 = f112 + f113;
1275 f116 = f114 - f113;
1276 f117 = f110 - f116;
1277 f118 = f110 + f116;
1278 f119 = f109 - f115;
1279 f120 = f109 + f115;
1280 f121 = f118 + f105;
1281 f122 = MUL_F(FRAC_CONST(-0.8971675863426361), f118);
1282 f123 = MUL_F(FRAC_CONST(0.9951847266721968), f121);
1283 f124 = MUL_C(COEF_CONST(1.0932018670017576), f105);
1284 y[2] = f122 + f123;
1285 y[30] = f124 - f123;
1286 f127 = f107 - f120;
1287 f128 = MUL_F(FRAC_CONST(-0.6666556584777466), f120);
1288 f129 = MUL_F(FRAC_CONST(0.9569403357322089), f127);
1289 f130 = MUL_C(COEF_CONST(1.2472250129866713), f107);
1290 y[6] = f129 - f128;
1291 y[26] = f130 - f129;
1292 f133 = f119 + f106;
1293 f134 = MUL_F(FRAC_CONST(-0.4105245275223571), f119);
1294 f135 = MUL_F(FRAC_CONST(0.8819212643483549), f133);
1295 f136 = MUL_C(COEF_CONST(1.3533180011743529), f106);
1296 y[10] = f134 + f135;
1297 y[22] = f136 - f135;
1298 f139 = f104 - f117;
1299 f140 = MUL_F(FRAC_CONST(-0.1386171691990915), f117);
1300 f141 = MUL_F(FRAC_CONST(0.7730104533627370), f139);
1301 f142 = MUL_C(COEF_CONST(1.4074037375263826), f104);
1302 y[14] = f141 - f140;
1303 y[18] = f142 - f141;
1304 f145 = f2 - f4;
1305 f146 = f2 + f4;
1306 f147 = f6 - f8;
1307 f148 = f6 + f8;
1308 f149 = f10 - f12;
1309 f150 = f10 + f12;
1310 f151 = f14 - f16;
1311 f152 = f14 + f16;
1312 f153 = f18 - f20;
1313 f154 = f18 + f20;
1314 f155 = f22 - f24;
1315 f156 = f22 + f24;
1316 f157 = f26 - f28;
1317 f158 = f26 + f28;
1318 f159 = MUL_F(FRAC_CONST(0.7071067811865476), f152);
1319 f160 = f0 - f159;
1320 f161 = f0 + f159;
1321 f162 = f148 + f156;
1322 f163 = MUL_C(COEF_CONST(1.3065629648763766), f148);
1323 f164 = MUL_F(FRAC_CONST(-0.9238795325112866), f162);
1324 f165 = MUL_F(FRAC_CONST(-0.5411961001461967), f156);
1325 f166 = f163 + f164;
1326 f167 = f165 - f164;
1327 f168 = f161 - f167;
1328 f169 = f161 + f167;
1329 f170 = f160 - f166;
1330 f171 = f160 + f166;
1331 f172 = f146 + f158;
1332 f173 = MUL_C(COEF_CONST(1.1758756024193588), f146);
1333 f174 = MUL_F(FRAC_CONST(-0.9807852804032304), f172);
1334 f175 = MUL_F(FRAC_CONST(-0.7856949583871021), f158);
1335 f176 = f173 + f174;
1336 f177 = f175 - f174;
1337 f178 = f150 + f154;
1338 f179 = MUL_C(COEF_CONST(1.3870398453221473), f150);
1339 f180 = MUL_F(FRAC_CONST(-0.8314696123025455), f178);
1340 f181 = MUL_F(FRAC_CONST(-0.2758993792829436), f154);
1341 f182 = f179 + f180;
1342 f183 = f181 - f180;
1343 f184 = f177 - f183;
1344 f185 = f177 + f183;
1345 f186 = MUL_F(FRAC_CONST(0.7071067811865476), f184);
1346 f187 = f176 - f182;
1347 f188 = f176 + f182;
1348 f189 = MUL_F(FRAC_CONST(0.7071067811865476), f188);
1349 f190 = f186 - f189;
1350 f191 = f186 + f189;
1351 f192 = f169 - f185;
1352 f193 = f169 + f185;
1353 f194 = f171 - f191;
1354 f195 = f171 + f191;
1355 f196 = f170 - f190;
1356 f197 = f170 + f190;
1357 f198 = f168 - f187;
1358 f199 = f168 + f187;
1359 f200 = MUL_F(FRAC_CONST(0.7071067811865476), f151);
1360 f201 = f30 - f200;
1361 f202 = f30 + f200;
1362 f203 = f155 + f147;
1363 f204 = MUL_C(COEF_CONST(1.3065629648763766), f155);
1364 f205 = MUL_F(FRAC_CONST(-0.9238795325112866), f203);
1365 f206 = MUL_F(FRAC_CONST(-0.5411961001461967), f147);
1366 f207 = f204 + f205;
1367 f208 = f206 - f205;
1368 f209 = f202 - f208;
1369 f210 = f202 + f208;
1370 f211 = f201 - f207;
1371 f212 = f201 + f207;
1372 f213 = f157 + f145;
1373 f214 = MUL_C(COEF_CONST(1.1758756024193588), f157);
1374 f215 = MUL_F(FRAC_CONST(-0.9807852804032304), f213);
1375 f216 = MUL_F(FRAC_CONST(-0.7856949583871021), f145);
1376 f217 = f214 + f215;
1377 f218 = f216 - f215;
1378 f219 = f153 + f149;
1379 f220 = MUL_C(COEF_CONST(1.3870398453221473), f153);
1380 f221 = MUL_F(FRAC_CONST(-0.8314696123025455), f219);
1381 f222 = MUL_F(FRAC_CONST(-0.2758993792829436), f149);
1382 f223 = f220 + f221;
1383 f224 = f222 - f221;
1384 f225 = f218 - f224;
1385 f226 = f218 + f224;
1386 f227 = MUL_F(FRAC_CONST(0.7071067811865476), f225);
1387 f228 = f217 - f223;
1388 f229 = f217 + f223;
1389 f230 = MUL_F(FRAC_CONST(0.7071067811865476), f229);
1390 f231 = f227 - f230;
1391 f232 = f227 + f230;
1392 f233 = f210 - f226;
1393 f234 = f210 + f226;
1394 f235 = f212 - f232;
1395 f236 = f212 + f232;
1396 f237 = f211 - f231;
1397 f238 = f211 + f231;
1398 f239 = f209 - f228;
1399 f240 = f209 + f228;
1400 f241 = f234 + f193;
1401 f242 = MUL_F(FRAC_CONST(-0.9497277818777543), f234);
1402 f243 = MUL_F(FRAC_CONST(0.9987954562051724), f241);
1403 f244 = MUL_C(COEF_CONST(1.0478631305325905), f193);
1404 y[1] = f242 + f243;
1405 y[31] = f244 - f243;
1406 f247 = f195 - f236;
1407 f248 = MUL_F(FRAC_CONST(-0.8424460355094192), f236);
1408 f249 = MUL_F(FRAC_CONST(0.9891765099647810), f247);
1409 f250 = MUL_C(COEF_CONST(1.1359069844201428), f195);
1410 y[3] = f249 - f248;
1411 y[29] = f250 - f249;
1412 f253 = f238 + f197;
1413 f254 = MUL_F(FRAC_CONST(-0.7270510732912801), f238);
1414 f255 = MUL_F(FRAC_CONST(0.9700312531945440), f253);
1415 f256 = MUL_C(COEF_CONST(1.2130114330978079), f197);
1416 y[5] = f254 + f255;
1417 y[27] = f256 - f255;
1418 f259 = f199 - f240;
1419 f260 = MUL_F(FRAC_CONST(-0.6046542117908007), f240);
1420 f261 = MUL_F(FRAC_CONST(0.9415440651830208), f259);
1421 f262 = MUL_C(COEF_CONST(1.2784339185752409), f199);
1422 y[7] = f261 - f260;
1423 y[25] = f262 - f261;
1424 f265 = f239 + f198;
1425 f266 = MUL_F(FRAC_CONST(-0.4764341996931611), f239);
1426 f267 = MUL_F(FRAC_CONST(0.9039892931234433), f265);
1427 f268 = MUL_C(COEF_CONST(1.3315443865537255), f198);
1428 y[9] = f266 + f267;
1429 y[23] = f268 - f267;
1430 f271 = f196 - f237;
1431 f272 = MUL_F(FRAC_CONST(-0.3436258658070505), f237);
1432 f273 = MUL_F(FRAC_CONST(0.8577286100002721), f271);
1433 f274 = MUL_C(COEF_CONST(1.3718313541934939), f196);
1434 y[11] = f273 - f272;
1435 y[21] = f274 - f273;
1436 f277 = f235 + f194;
1437 f278 = MUL_F(FRAC_CONST(-0.2075082269882114), f235);
1438 f279 = MUL_F(FRAC_CONST(0.8032075314806448), f277);
1439 f280 = MUL_C(COEF_CONST(1.3989068359730783), f194);
1440 y[13] = f278 + f279;
1441 y[19] = f280 - f279;
1442 f283 = f192 - f233;
1443 f284 = MUL_F(FRAC_CONST(-0.0693921705079408), f233);
1444 f285 = MUL_F(FRAC_CONST(0.7409511253549591), f283);
1445 f286 = MUL_C(COEF_CONST(1.4125100802019774), f192);
1446 y[15] = f285 - f284;
1447 y[17] = f286 - f285;
1448}
1449
1450#else
1451
1452
1453#define n 32
1454#define log2n 5
1455
1456// w_array_real[i] = cos(2*M_PI*i/32)
1457static const real_t w_array_real[] = {
1458 FRAC_CONST(1.000000000000000), FRAC_CONST(0.980785279337272),
1459 FRAC_CONST(0.923879528329380), FRAC_CONST(0.831469603195765),
1460 FRAC_CONST(0.707106765732237), FRAC_CONST(0.555570210304169),
1461 FRAC_CONST(0.382683402077046), FRAC_CONST(0.195090284503576),
1462 FRAC_CONST(0.000000000000000), FRAC_CONST(-0.195090370246552),
1463 FRAC_CONST(-0.382683482845162), FRAC_CONST(-0.555570282993553),
1464 FRAC_CONST(-0.707106827549476), FRAC_CONST(-0.831469651765257),
1465 FRAC_CONST(-0.923879561784627), FRAC_CONST(-0.980785296392607)
1466};
1467
1468// w_array_imag[i] = sin(-2*M_PI*i/32)
1469static const real_t w_array_imag[] = {
1470 FRAC_CONST(0.000000000000000), FRAC_CONST(-0.195090327375064),
1471 FRAC_CONST(-0.382683442461104), FRAC_CONST(-0.555570246648862),
1472 FRAC_CONST(-0.707106796640858), FRAC_CONST(-0.831469627480512),
1473 FRAC_CONST(-0.923879545057005), FRAC_CONST(-0.980785287864940),
1474 FRAC_CONST(-1.000000000000000), FRAC_CONST(-0.980785270809601),
1475 FRAC_CONST(-0.923879511601754), FRAC_CONST(-0.831469578911016),
1476 FRAC_CONST(-0.707106734823616), FRAC_CONST(-0.555570173959476),
1477 FRAC_CONST(-0.382683361692986), FRAC_CONST(-0.195090241632088)
1478};
1479
1480// FFT decimation in frequency
1481// 4*16*2+16=128+16=144 multiplications
1482// 6*16*2+10*8+4*16*2=192+80+128=400 additions
1483static void fft_dif(real_t * Real, real_t * Imag)
1484{
1485 real_t w_real, w_imag; // For faster access
1486 real_t point1_real, point1_imag, point2_real, point2_imag; // For faster access
1487 uint32_t j, i, i2, w_index; // Counters
1488
1489 // First 2 stages of 32 point FFT decimation in frequency
1490 // 4*16*2=64*2=128 multiplications
1491 // 6*16*2=96*2=192 additions
1492 // Stage 1 of 32 point FFT decimation in frequency
1493 for (i = 0; i < 16; i++)
1494 {
1495 point1_real = Real[i];
1496 point1_imag = Imag[i];
1497 i2 = i+16;
1498 point2_real = Real[i2];
1499 point2_imag = Imag[i2];
1500
1501 w_real = w_array_real[i];
1502 w_imag = w_array_imag[i];
1503
1504 // temp1 = x[i] - x[i2]
1505 point1_real -= point2_real;
1506 point1_imag -= point2_imag;
1507
1508 // x[i1] = x[i] + x[i2]
1509 Real[i] += point2_real;
1510 Imag[i] += point2_imag;
1511
1512 // x[i2] = (x[i] - x[i2]) * w
1513 Real[i2] = (MUL_F(point1_real,w_real) - MUL_F(point1_imag,w_imag));
1514 Imag[i2] = (MUL_F(point1_real,w_imag) + MUL_F(point1_imag,w_real));
1515 }
1516 // Stage 2 of 32 point FFT decimation in frequency
1517 for (j = 0, w_index = 0; j < 8; j++, w_index += 2)
1518 {
1519 w_real = w_array_real[w_index];
1520 w_imag = w_array_imag[w_index];
1521
1522 i = j;
1523 point1_real = Real[i];
1524 point1_imag = Imag[i];
1525 i2 = i+8;
1526 point2_real = Real[i2];
1527 point2_imag = Imag[i2];
1528
1529 // temp1 = x[i] - x[i2]
1530 point1_real -= point2_real;
1531 point1_imag -= point2_imag;
1532
1533 // x[i1] = x[i] + x[i2]
1534 Real[i] += point2_real;
1535 Imag[i] += point2_imag;
1536
1537 // x[i2] = (x[i] - x[i2]) * w
1538 Real[i2] = (MUL_F(point1_real,w_real) - MUL_F(point1_imag,w_imag));
1539 Imag[i2] = (MUL_F(point1_real,w_imag) + MUL_F(point1_imag,w_real));
1540
1541 i = j+16;
1542 point1_real = Real[i];
1543 point1_imag = Imag[i];
1544 i2 = i+8;
1545 point2_real = Real[i2];
1546 point2_imag = Imag[i2];
1547
1548 // temp1 = x[i] - x[i2]
1549 point1_real -= point2_real;
1550 point1_imag -= point2_imag;
1551
1552 // x[i1] = x[i] + x[i2]
1553 Real[i] += point2_real;
1554 Imag[i] += point2_imag;
1555
1556 // x[i2] = (x[i] - x[i2]) * w
1557 Real[i2] = (MUL_F(point1_real,w_real) - MUL_F(point1_imag,w_imag));
1558 Imag[i2] = (MUL_F(point1_real,w_imag) + MUL_F(point1_imag,w_real));
1559 }
1560
1561 // Stage 3 of 32 point FFT decimation in frequency
1562 // 2*4*2=16 multiplications
1563 // 4*4*2+6*4*2=10*8=80 additions
1564 for (i = 0; i < n; i += 8)
1565 {
1566 i2 = i+4;
1567 point1_real = Real[i];
1568 point1_imag = Imag[i];
1569
1570 point2_real = Real[i2];
1571 point2_imag = Imag[i2];
1572
1573 // out[i1] = point1 + point2
1574 Real[i] += point2_real;
1575 Imag[i] += point2_imag;
1576
1577 // out[i2] = point1 - point2
1578 Real[i2] = point1_real - point2_real;
1579 Imag[i2] = point1_imag - point2_imag;
1580 }
1581 w_real = w_array_real[4]; // = sqrt(2)/2
1582 // w_imag = -w_real; // = w_array_imag[4]; // = -sqrt(2)/2
1583 for (i = 1; i < n; i += 8)
1584 {
1585 i2 = i+4;
1586 point1_real = Real[i];
1587 point1_imag = Imag[i];
1588
1589 point2_real = Real[i2];
1590 point2_imag = Imag[i2];
1591
1592 // temp1 = x[i] - x[i2]
1593 point1_real -= point2_real;
1594 point1_imag -= point2_imag;
1595
1596 // x[i1] = x[i] + x[i2]
1597 Real[i] += point2_real;
1598 Imag[i] += point2_imag;
1599
1600 // x[i2] = (x[i] - x[i2]) * w
1601 Real[i2] = MUL_F(point1_real+point1_imag, w_real);
1602 Imag[i2] = MUL_F(point1_imag-point1_real, w_real);
1603 }
1604 for (i = 2; i < n; i += 8)
1605 {
1606 i2 = i+4;
1607 point1_real = Real[i];
1608 point1_imag = Imag[i];
1609
1610 point2_real = Real[i2];
1611 point2_imag = Imag[i2];
1612
1613 // x[i] = x[i] + x[i2]
1614 Real[i] += point2_real;
1615 Imag[i] += point2_imag;
1616
1617 // x[i2] = (x[i] - x[i2]) * (-i)
1618 Real[i2] = point1_imag - point2_imag;
1619 Imag[i2] = point2_real - point1_real;
1620 }
1621 w_real = w_array_real[12]; // = -sqrt(2)/2
1622 // w_imag = w_real; // = w_array_imag[12]; // = -sqrt(2)/2
1623 for (i = 3; i < n; i += 8)
1624 {
1625 i2 = i+4;
1626 point1_real = Real[i];
1627 point1_imag = Imag[i];
1628
1629 point2_real = Real[i2];
1630 point2_imag = Imag[i2];
1631
1632 // temp1 = x[i] - x[i2]
1633 point1_real -= point2_real;
1634 point1_imag -= point2_imag;
1635
1636 // x[i1] = x[i] + x[i2]
1637 Real[i] += point2_real;
1638 Imag[i] += point2_imag;
1639
1640 // x[i2] = (x[i] - x[i2]) * w
1641 Real[i2] = MUL_F(point1_real-point1_imag, w_real);
1642 Imag[i2] = MUL_F(point1_real+point1_imag, w_real);
1643 }
1644
1645
1646 // Stage 4 of 32 point FFT decimation in frequency (no multiplications)
1647 // 16*4=64 additions
1648 for (i = 0; i < n; i += 4)
1649 {
1650 i2 = i+2;
1651 point1_real = Real[i];
1652 point1_imag = Imag[i];
1653
1654 point2_real = Real[i2];
1655 point2_imag = Imag[i2];
1656
1657 // x[i1] = x[i] + x[i2]
1658 Real[i] += point2_real;
1659 Imag[i] += point2_imag;
1660
1661 // x[i2] = x[i] - x[i2]
1662 Real[i2] = point1_real - point2_real;
1663 Imag[i2] = point1_imag - point2_imag;
1664 }
1665 for (i = 1; i < n; i += 4)
1666 {
1667 i2 = i+2;
1668 point1_real = Real[i];
1669 point1_imag = Imag[i];
1670
1671 point2_real = Real[i2];
1672 point2_imag = Imag[i2];
1673
1674 // x[i] = x[i] + x[i2]
1675 Real[i] += point2_real;
1676 Imag[i] += point2_imag;
1677
1678 // x[i2] = (x[i] - x[i2]) * (-i)
1679 Real[i2] = point1_imag - point2_imag;
1680 Imag[i2] = point2_real - point1_real;
1681 }
1682
1683 // Stage 5 of 32 point FFT decimation in frequency (no multiplications)
1684 // 16*4=64 additions
1685 for (i = 0; i < n; i += 2)
1686 {
1687 i2 = i+1;
1688 point1_real = Real[i];
1689 point1_imag = Imag[i];
1690
1691 point2_real = Real[i2];
1692 point2_imag = Imag[i2];
1693
1694 // out[i1] = point1 + point2
1695 Real[i] += point2_real;
1696 Imag[i] += point2_imag;
1697
1698 // out[i2] = point1 - point2
1699 Real[i2] = point1_real - point2_real;
1700 Imag[i2] = point1_imag - point2_imag;
1701 }
1702
1703#ifdef REORDER_IN_FFT
1704 FFTReorder(Real, Imag);
1705#endif // #ifdef REORDER_IN_FFT
1706}
1707#undef n
1708#undef log2n
1709
1710static const real_t dct4_64_tab[] = {
1711 COEF_CONST(0.999924719333649), COEF_CONST(0.998118102550507),
1712 COEF_CONST(0.993906974792480), COEF_CONST(0.987301409244537),
1713 COEF_CONST(0.978317379951477), COEF_CONST(0.966976463794708),
1714 COEF_CONST(0.953306019306183), COEF_CONST(0.937339007854462),
1715 COEF_CONST(0.919113874435425), COEF_CONST(0.898674488067627),
1716 COEF_CONST(0.876070082187653), COEF_CONST(0.851355195045471),
1717 COEF_CONST(0.824589252471924), COEF_CONST(0.795836925506592),
1718 COEF_CONST(0.765167236328125), COEF_CONST(0.732654273509979),
1719 COEF_CONST(0.698376238346100), COEF_CONST(0.662415742874146),
1720 COEF_CONST(0.624859452247620), COEF_CONST(0.585797846317291),
1721 COEF_CONST(0.545324981212616), COEF_CONST(0.503538429737091),
1722 COEF_CONST(0.460538715124130), COEF_CONST(0.416429549455643),
1723 COEF_CONST(0.371317148208618), COEF_CONST(0.325310230255127),
1724 COEF_CONST(0.278519600629807), COEF_CONST(0.231058135628700),
1725 COEF_CONST(0.183039888739586), COEF_CONST(0.134580686688423),
1726 COEF_CONST(0.085797272622585), COEF_CONST(0.036807164549828),
1727 COEF_CONST(-1.012196302413940), COEF_CONST(-1.059438824653626),
1728 COEF_CONST(-1.104129195213318), COEF_CONST(-1.146159529685974),
1729 COEF_CONST(-1.185428738594055), COEF_CONST(-1.221842169761658),
1730 COEF_CONST(-1.255311965942383), COEF_CONST(-1.285757660865784),
1731 COEF_CONST(-1.313105940818787), COEF_CONST(-1.337290763854981),
1732 COEF_CONST(-1.358253836631775), COEF_CONST(-1.375944852828980),
1733 COEF_CONST(-1.390321016311646), COEF_CONST(-1.401347875595093),
1734 COEF_CONST(-1.408998727798462), COEF_CONST(-1.413255214691162),
1735 COEF_CONST(-1.414107084274292), COEF_CONST(-1.411552190780640),
1736 COEF_CONST(-1.405596733093262), COEF_CONST(-1.396255016326904),
1737 COEF_CONST(-1.383549690246582), COEF_CONST(-1.367511272430420),
1738 COEF_CONST(-1.348178386688232), COEF_CONST(-1.325597524642944),
1739 COEF_CONST(-1.299823284149170), COEF_CONST(-1.270917654037476),
1740 COEF_CONST(-1.238950133323669), COEF_CONST(-1.203998088836670),
1741 COEF_CONST(-1.166145324707031), COEF_CONST(-1.125483393669128),
1742 COEF_CONST(-1.082109928131104), COEF_CONST(-1.036129593849182),
1743 COEF_CONST(-0.987653195858002), COEF_CONST(-0.936797380447388),
1744 COEF_CONST(-0.883684754371643), COEF_CONST(-0.828443288803101),
1745 COEF_CONST(-0.771206021308899), COEF_CONST(-0.712110757827759),
1746 COEF_CONST(-0.651300072669983), COEF_CONST(-0.588920354843140),
1747 COEF_CONST(-0.525121808052063), COEF_CONST(-0.460058242082596),
1748 COEF_CONST(-0.393886327743530), COEF_CONST(-0.326765477657318),
1749 COEF_CONST(-0.258857429027557), COEF_CONST(-0.190325915813446),
1750 COEF_CONST(-0.121335685253143), COEF_CONST(-0.052053272724152),
1751 COEF_CONST(0.017354607582092), COEF_CONST(0.086720645427704),
1752 COEF_CONST(0.155877828598022), COEF_CONST(0.224659323692322),
1753 COEF_CONST(0.292899727821350), COEF_CONST(0.360434412956238),
1754 COEF_CONST(0.427100926637650), COEF_CONST(0.492738455533981),
1755 COEF_CONST(0.557188928127289), COEF_CONST(0.620297133922577),
1756 COEF_CONST(0.681910991668701), COEF_CONST(0.741881847381592),
1757 COEF_CONST(0.800065577030182), COEF_CONST(0.856321990489960),
1758 COEF_CONST(0.910515367984772), COEF_CONST(0.962515234947205),
1759 COEF_CONST(1.000000000000000), COEF_CONST(0.998795449733734),
1760 COEF_CONST(0.995184719562531), COEF_CONST(0.989176511764526),
1761 COEF_CONST(0.980785250663757), COEF_CONST(0.970031261444092),
1762 COEF_CONST(0.956940352916718), COEF_CONST(0.941544055938721),
1763 COEF_CONST(0.923879504203796), COEF_CONST(0.903989315032959),
1764 COEF_CONST(0.881921231746674), COEF_CONST(0.857728600502014),
1765 COEF_CONST(0.831469595432281), COEF_CONST(0.803207516670227),
1766 COEF_CONST(0.773010432720184), COEF_CONST(0.740951120853424),
1767 COEF_CONST(0.707106769084930), COEF_CONST(0.671558916568756),
1768 COEF_CONST(0.634393274784088), COEF_CONST(0.595699310302734),
1769 COEF_CONST(0.555570185184479), COEF_CONST(0.514102697372437),
1770 COEF_CONST(0.471396654844284), COEF_CONST(0.427555114030838),
1771 COEF_CONST(0.382683426141739), COEF_CONST(0.336889833211899),
1772 COEF_CONST(0.290284633636475), COEF_CONST(0.242980122566223),
1773 COEF_CONST(0.195090234279633), COEF_CONST(0.146730497479439),
1774 COEF_CONST(0.098017133772373), COEF_CONST(0.049067649990320),
1775 COEF_CONST(-1.000000000000000), COEF_CONST(-1.047863125801086),
1776 COEF_CONST(-1.093201875686646), COEF_CONST(-1.135906934738159),
1777 COEF_CONST(-1.175875544548035), COEF_CONST(-1.213011503219605),
1778 COEF_CONST(-1.247225046157837), COEF_CONST(-1.278433918952942),
1779 COEF_CONST(-1.306562900543213), COEF_CONST(-1.331544399261475),
1780 COEF_CONST(-1.353317975997925), COEF_CONST(-1.371831417083740),
1781 COEF_CONST(-1.387039899826050), COEF_CONST(-1.398906826972961),
1782 COEF_CONST(-1.407403707504273), COEF_CONST(-1.412510156631470),
1783 COEF_CONST(0), COEF_CONST(-1.412510156631470),
1784 COEF_CONST(-1.407403707504273), COEF_CONST(-1.398906826972961),
1785 COEF_CONST(-1.387039899826050), COEF_CONST(-1.371831417083740),
1786 COEF_CONST(-1.353317975997925), COEF_CONST(-1.331544399261475),
1787 COEF_CONST(-1.306562900543213), COEF_CONST(-1.278433918952942),
1788 COEF_CONST(-1.247225046157837), COEF_CONST(-1.213011384010315),
1789 COEF_CONST(-1.175875544548035), COEF_CONST(-1.135907053947449),
1790 COEF_CONST(-1.093201875686646), COEF_CONST(-1.047863125801086),
1791 COEF_CONST(-1.000000000000000), COEF_CONST(-0.949727773666382),
1792 COEF_CONST(-0.897167563438416), COEF_CONST(-0.842446029186249),
1793 COEF_CONST(-0.785694956779480), COEF_CONST(-0.727051079273224),
1794 COEF_CONST(-0.666655659675598), COEF_CONST(-0.604654192924500),
1795 COEF_CONST(-0.541196048259735), COEF_CONST(-0.476434230804443),
1796 COEF_CONST(-0.410524487495422), COEF_CONST(-0.343625843524933),
1797 COEF_CONST(-0.275899350643158), COEF_CONST(-0.207508206367493),
1798 COEF_CONST(-0.138617098331451), COEF_CONST(-0.069392144680023),
1799 COEF_CONST(0), COEF_CONST(0.069392263889313),
1800 COEF_CONST(0.138617157936096), COEF_CONST(0.207508206367493),
1801 COEF_CONST(0.275899469852448), COEF_CONST(0.343625962734222),
1802 COEF_CONST(0.410524636507034), COEF_CONST(0.476434201002121),
1803 COEF_CONST(0.541196107864380), COEF_CONST(0.604654192924500),
1804 COEF_CONST(0.666655719280243), COEF_CONST(0.727051138877869),
1805 COEF_CONST(0.785695075988770), COEF_CONST(0.842446029186249),
1806 COEF_CONST(0.897167563438416), COEF_CONST(0.949727773666382)
1807};
1808
1809/* size 64 only! */
1810void dct4_kernel(real_t * in_real, real_t * in_imag, real_t * out_real, real_t * out_imag)
1811{
1812 // Tables with bit reverse values for 5 bits, bit reverse of i at i-th position
1813 const uint8_t bit_rev_tab[32] = { 0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23,15,31 };
1814 uint16_t i, i_rev;
1815
1816 /* Step 2: modulate */
1817 // 3*32=96 multiplications
1818 // 3*32=96 additions
1819 for (i = 0; i < 32; i++)
1820 {
1821 real_t x_re, x_im, tmp;
1822 x_re = in_real[i];
1823 x_im = in_imag[i];
1824 tmp = MUL_C(x_re + x_im, dct4_64_tab[i]);
1825 in_real[i] = MUL_C(x_im, dct4_64_tab[i + 64]) + tmp;
1826 in_imag[i] = MUL_C(x_re, dct4_64_tab[i + 32]) + tmp;
1827 }
1828
1829 /* Step 3: FFT, but with output in bit reverse order */
1830 fft_dif(in_real, in_imag);
1831
1832 /* Step 4: modulate + bitreverse reordering */
1833 // 3*31+2=95 multiplications
1834 // 3*31+2=95 additions
1835 for (i = 0; i < 16; i++)
1836 {
1837 real_t x_re, x_im, tmp;
1838 i_rev = bit_rev_tab[i];
1839 x_re = in_real[i_rev];
1840 x_im = in_imag[i_rev];
1841
1842 tmp = MUL_C(x_re + x_im, dct4_64_tab[i + 3*32]);
1843 out_real[i] = MUL_C(x_im, dct4_64_tab[i + 5*32]) + tmp;
1844 out_imag[i] = MUL_C(x_re, dct4_64_tab[i + 4*32]) + tmp;
1845 }
1846 // i = 16, i_rev = 1 = rev(16);
1847 out_imag[16] = MUL_C(in_imag[1] - in_real[1], dct4_64_tab[16 + 3*32]);
1848 out_real[16] = MUL_C(in_real[1] + in_imag[1], dct4_64_tab[16 + 3*32]);
1849 for (i = 17; i < 32; i++)
1850 {
1851 real_t x_re, x_im, tmp;
1852 i_rev = bit_rev_tab[i];
1853 x_re = in_real[i_rev];
1854 x_im = in_imag[i_rev];
1855 tmp = MUL_C(x_re + x_im, dct4_64_tab[i + 3*32]);
1856 out_real[i] = MUL_C(x_im, dct4_64_tab[i + 5*32]) + tmp;
1857 out_imag[i] = MUL_C(x_re, dct4_64_tab[i + 4*32]) + tmp;
1858 }
1859
1860}
1861
1862void DST4_32(real_t *y, real_t *x)
1863{
1864 real_t f0, f1, f2, f3, f4, f5, f6, f7, f8, f9;
1865 real_t f10, f11, f12, f13, f14, f15, f16, f17, f18, f19;
1866 real_t f20, f21, f22, f23, f24, f25, f26, f27, f28, f29;
1867 real_t f30, f31, f32, f33, f34, f35, f36, f37, f38, f39;
1868 real_t f40, f41, f42, f43, f44, f45, f46, f47, f48, f49;
1869 real_t f50, f51, f52, f53, f54, f55, f56, f57, f58, f59;
1870 real_t f60, f61, f62, f63, f64, f65, f66, f67, f68, f69;
1871 real_t f70, f71, f72, f73, f74, f75, f76, f77, f78, f79;
1872 real_t f80, f81, f82, f83, f84, f85, f86, f87, f88, f89;
1873 real_t f90, f91, f92, f93, f94, f95, f96, f97, f98, f99;
1874 real_t f100, f101, f102, f103, f104, f105, f106, f107, f108, f109;
1875 real_t f110, f111, f112, f113, f114, f115, f116, f117, f118, f119;
1876 real_t f120, f121, f122, f123, f124, f125, f126, f127, f128, f129;
1877 real_t f130, f131, f132, f133, f134, f135, f136, f137, f138, f139;
1878 real_t f140, f141, f142, f143, f144, f145, f146, f147, f148, f149;
1879 real_t f150, f151, f152, f153, f154, f155, f156, f157, f158, f159;
1880 real_t f160, f161, f162, f163, f164, f165, f166, f167, f168, f169;
1881 real_t f170, f171, f172, f173, f174, f175, f176, f177, f178, f179;
1882 real_t f180, f181, f182, f183, f184, f185, f186, f187, f188, f189;
1883 real_t f190, f191, f192, f193, f194, f195, f196, f197, f198, f199;
1884 real_t f200, f201, f202, f203, f204, f205, f206, f207, f208, f209;
1885 real_t f210, f211, f212, f213, f214, f215, f216, f217, f218, f219;
1886 real_t f220, f221, f222, f223, f224, f225, f226, f227, f228, f229;
1887 real_t f230, f231, f232, f233, f234, f235, f236, f237, f238, f239;
1888 real_t f240, f241, f242, f243, f244, f245, f246, f247, f248, f249;
1889 real_t f250, f251, f252, f253, f254, f255, f256, f257, f258, f259;
1890 real_t f260, f261, f262, f263, f264, f265, f266, f267, f268, f269;
1891 real_t f270, f271, f272, f273, f274, f275, f276, f277, f278, f279;
1892 real_t f280, f281, f282, f283, f284, f285, f286, f287, f288, f289;
1893 real_t f290, f291, f292, f293, f294, f295, f296, f297, f298, f299;
1894 real_t f300, f301, f302, f303, f304, f305, f306, f307, f308, f309;
1895 real_t f310, f311, f312, f313, f314, f315, f316, f317, f318, f319;
1896 real_t f320, f321, f322, f323, f324, f325, f326, f327, f328, f329;
1897 real_t f330, f331, f332, f333, f334, f335;
1898
1899 f0 = x[0] - x[1];
1900 f1 = x[2] - x[1];
1901 f2 = x[2] - x[3];
1902 f3 = x[4] - x[3];
1903 f4 = x[4] - x[5];
1904 f5 = x[6] - x[5];
1905 f6 = x[6] - x[7];
1906 f7 = x[8] - x[7];
1907 f8 = x[8] - x[9];
1908 f9 = x[10] - x[9];
1909 f10 = x[10] - x[11];
1910 f11 = x[12] - x[11];
1911 f12 = x[12] - x[13];
1912 f13 = x[14] - x[13];
1913 f14 = x[14] - x[15];
1914 f15 = x[16] - x[15];
1915 f16 = x[16] - x[17];
1916 f17 = x[18] - x[17];
1917 f18 = x[18] - x[19];
1918 f19 = x[20] - x[19];
1919 f20 = x[20] - x[21];
1920 f21 = x[22] - x[21];
1921 f22 = x[22] - x[23];
1922 f23 = x[24] - x[23];
1923 f24 = x[24] - x[25];
1924 f25 = x[26] - x[25];
1925 f26 = x[26] - x[27];
1926 f27 = x[28] - x[27];
1927 f28 = x[28] - x[29];
1928 f29 = x[30] - x[29];
1929 f30 = x[30] - x[31];
1930 f31 = MUL_F(FRAC_CONST(0.7071067811865476), f15);
1931 f32 = x[0] - f31;
1932 f33 = x[0] + f31;
1933 f34 = f7 + f23;
1934 f35 = MUL_C(COEF_CONST(1.3065629648763766), f7);
1935 f36 = MUL_F(FRAC_CONST(-0.9238795325112866), f34);
1936 f37 = MUL_F(FRAC_CONST(-0.5411961001461967), f23);
1937 f38 = f35 + f36;
1938 f39 = f37 - f36;
1939 f40 = f33 - f39;
1940 f41 = f33 + f39;
1941 f42 = f32 - f38;
1942 f43 = f32 + f38;
1943 f44 = f11 - f19;
1944 f45 = f11 + f19;
1945 f46 = MUL_F(FRAC_CONST(0.7071067811865476), f45);
1946 f47 = f3 - f46;
1947 f48 = f3 + f46;
1948 f49 = MUL_F(FRAC_CONST(0.7071067811865476), f44);
1949 f50 = f49 - f27;
1950 f51 = f49 + f27;
1951 f52 = f51 + f48;
1952 f53 = MUL_F(FRAC_CONST(-0.7856949583871021), f51);
1953 f54 = MUL_F(FRAC_CONST(0.9807852804032304), f52);
1954 f55 = MUL_C(COEF_CONST(1.1758756024193588), f48);
1955 f56 = f53 + f54;
1956 f57 = f55 - f54;
1957 f58 = f50 + f47;
1958 f59 = MUL_F(FRAC_CONST(-0.2758993792829430), f50);
1959 f60 = MUL_F(FRAC_CONST(0.8314696123025452), f58);
1960 f61 = MUL_C(COEF_CONST(1.3870398453221475), f47);
1961 f62 = f59 + f60;
1962 f63 = f61 - f60;
1963 f64 = f41 - f56;
1964 f65 = f41 + f56;
1965 f66 = f43 - f62;
1966 f67 = f43 + f62;
1967 f68 = f42 - f63;
1968 f69 = f42 + f63;
1969 f70 = f40 - f57;
1970 f71 = f40 + f57;
1971 f72 = f5 - f9;
1972 f73 = f5 + f9;
1973 f74 = f13 - f17;
1974 f75 = f13 + f17;
1975 f76 = f21 - f25;
1976 f77 = f21 + f25;
1977 f78 = MUL_F(FRAC_CONST(0.7071067811865476), f75);
1978 f79 = f1 - f78;
1979 f80 = f1 + f78;
1980 f81 = f73 + f77;
1981 f82 = MUL_C(COEF_CONST(1.3065629648763766), f73);
1982 f83 = MUL_F(FRAC_CONST(-0.9238795325112866), f81);
1983 f84 = MUL_F(FRAC_CONST(-0.5411961001461967), f77);
1984 f85 = f82 + f83;
1985 f86 = f84 - f83;
1986 f87 = f80 - f86;
1987 f88 = f80 + f86;
1988 f89 = f79 - f85;
1989 f90 = f79 + f85;
1990 f91 = MUL_F(FRAC_CONST(0.7071067811865476), f74);
1991 f92 = f29 - f91;
1992 f93 = f29 + f91;
1993 f94 = f76 + f72;
1994 f95 = MUL_C(COEF_CONST(1.3065629648763766), f76);
1995 f96 = MUL_F(FRAC_CONST(-0.9238795325112866), f94);
1996 f97 = MUL_F(FRAC_CONST(-0.5411961001461967), f72);
1997 f98 = f95 + f96;
1998 f99 = f97 - f96;
1999 f100 = f93 - f99;
2000 f101 = f93 + f99;
2001 f102 = f92 - f98;
2002 f103 = f92 + f98;
2003 f104 = f101 + f88;
2004 f105 = MUL_F(FRAC_CONST(-0.8971675863426361), f101);
2005 f106 = MUL_F(FRAC_CONST(0.9951847266721968), f104);
2006 f107 = MUL_C(COEF_CONST(1.0932018670017576), f88);
2007 f108 = f105 + f106;
2008 f109 = f107 - f106;
2009 f110 = f90 - f103;
2010 f111 = MUL_F(FRAC_CONST(-0.6666556584777466), f103);
2011 f112 = MUL_F(FRAC_CONST(0.9569403357322089), f110);
2012 f113 = MUL_C(COEF_CONST(1.2472250129866713), f90);
2013 f114 = f112 - f111;
2014 f115 = f113 - f112;
2015 f116 = f102 + f89;
2016 f117 = MUL_F(FRAC_CONST(-0.4105245275223571), f102);
2017 f118 = MUL_F(FRAC_CONST(0.8819212643483549), f116);
2018 f119 = MUL_C(COEF_CONST(1.3533180011743529), f89);
2019 f120 = f117 + f118;
2020 f121 = f119 - f118;
2021 f122 = f87 - f100;
2022 f123 = MUL_F(FRAC_CONST(-0.1386171691990915), f100);
2023 f124 = MUL_F(FRAC_CONST(0.7730104533627370), f122);
2024 f125 = MUL_C(COEF_CONST(1.4074037375263826), f87);
2025 f126 = f124 - f123;
2026 f127 = f125 - f124;
2027 f128 = f65 - f108;
2028 f129 = f65 + f108;
2029 f130 = f67 - f114;
2030 f131 = f67 + f114;
2031 f132 = f69 - f120;
2032 f133 = f69 + f120;
2033 f134 = f71 - f126;
2034 f135 = f71 + f126;
2035 f136 = f70 - f127;
2036 f137 = f70 + f127;
2037 f138 = f68 - f121;
2038 f139 = f68 + f121;
2039 f140 = f66 - f115;
2040 f141 = f66 + f115;
2041 f142 = f64 - f109;
2042 f143 = f64 + f109;
2043 f144 = f0 + f30;
2044 f145 = MUL_C(COEF_CONST(1.0478631305325901), f0);
2045 f146 = MUL_F(FRAC_CONST(-0.9987954562051724), f144);
2046 f147 = MUL_F(FRAC_CONST(-0.9497277818777548), f30);
2047 f148 = f145 + f146;
2048 f149 = f147 - f146;
2049 f150 = f4 + f26;
2050 f151 = MUL_F(FRAC_CONST(1.2130114330978077), f4);
2051 f152 = MUL_F(FRAC_CONST(-0.9700312531945440), f150);
2052 f153 = MUL_F(FRAC_CONST(-0.7270510732912803), f26);
2053 f154 = f151 + f152;
2054 f155 = f153 - f152;
2055 f156 = f8 + f22;
2056 f157 = MUL_C(COEF_CONST(1.3315443865537255), f8);
2057 f158 = MUL_F(FRAC_CONST(-0.9039892931234433), f156);
2058 f159 = MUL_F(FRAC_CONST(-0.4764341996931612), f22);
2059 f160 = f157 + f158;
2060 f161 = f159 - f158;
2061 f162 = f12 + f18;
2062 f163 = MUL_C(COEF_CONST(1.3989068359730781), f12);
2063 f164 = MUL_F(FRAC_CONST(-0.8032075314806453), f162);
2064 f165 = MUL_F(FRAC_CONST(-0.2075082269882124), f18);
2065 f166 = f163 + f164;
2066 f167 = f165 - f164;
2067 f168 = f16 + f14;
2068 f169 = MUL_C(COEF_CONST(1.4125100802019777), f16);
2069 f170 = MUL_F(FRAC_CONST(-0.6715589548470187), f168);
2070 f171 = MUL_F(FRAC_CONST(0.0693921705079402), f14);
2071 f172 = f169 + f170;
2072 f173 = f171 - f170;
2073 f174 = f20 + f10;
2074 f175 = MUL_C(COEF_CONST(1.3718313541934939), f20);
2075 f176 = MUL_F(FRAC_CONST(-0.5141027441932219), f174);
2076 f177 = MUL_F(FRAC_CONST(0.3436258658070501), f10);
2077 f178 = f175 + f176;
2078 f179 = f177 - f176;
2079 f180 = f24 + f6;
2080 f181 = MUL_C(COEF_CONST(1.2784339185752409), f24);
2081 f182 = MUL_F(FRAC_CONST(-0.3368898533922200), f180);
2082 f183 = MUL_F(FRAC_CONST(0.6046542117908008), f6);
2083 f184 = f181 + f182;
2084 f185 = f183 - f182;
2085 f186 = f28 + f2;
2086 f187 = MUL_C(COEF_CONST(1.1359069844201433), f28);
2087 f188 = MUL_F(FRAC_CONST(-0.1467304744553624), f186);
2088 f189 = MUL_F(FRAC_CONST(0.8424460355094185), f2);
2089 f190 = f187 + f188;
2090 f191 = f189 - f188;
2091 f192 = f149 - f173;
2092 f193 = f149 + f173;
2093 f194 = f148 - f172;
2094 f195 = f148 + f172;
2095 f196 = f155 - f179;
2096 f197 = f155 + f179;
2097 f198 = f154 - f178;
2098 f199 = f154 + f178;
2099 f200 = f161 - f185;
2100 f201 = f161 + f185;
2101 f202 = f160 - f184;
2102 f203 = f160 + f184;
2103 f204 = f167 - f191;
2104 f205 = f167 + f191;
2105 f206 = f166 - f190;
2106 f207 = f166 + f190;
2107 f208 = f192 + f194;
2108 f209 = MUL_C(COEF_CONST(1.1758756024193588), f192);
2109 f210 = MUL_F(FRAC_CONST(-0.9807852804032304), f208);
2110 f211 = MUL_F(FRAC_CONST(-0.7856949583871021), f194);
2111 f212 = f209 + f210;
2112 f213 = f211 - f210;
2113 f214 = f196 + f198;
2114 f215 = MUL_C(COEF_CONST(1.3870398453221475), f196);
2115 f216 = MUL_F(FRAC_CONST(-0.5555702330196022), f214);
2116 f217 = MUL_F(FRAC_CONST(0.2758993792829431), f198);
2117 f218 = f215 + f216;
2118 f219 = f217 - f216;
2119 f220 = f200 + f202;
2120 f221 = MUL_F(FRAC_CONST(0.7856949583871022), f200);
2121 f222 = MUL_F(FRAC_CONST(0.1950903220161283), f220);
2122 f223 = MUL_C(COEF_CONST(1.1758756024193586), f202);
2123 f224 = f221 + f222;
2124 f225 = f223 - f222;
2125 f226 = f204 + f206;
2126 f227 = MUL_F(FRAC_CONST(-0.2758993792829430), f204);
2127 f228 = MUL_F(FRAC_CONST(0.8314696123025452), f226);
2128 f229 = MUL_C(COEF_CONST(1.3870398453221475), f206);
2129 f230 = f227 + f228;
2130 f231 = f229 - f228;
2131 f232 = f193 - f201;
2132 f233 = f193 + f201;
2133 f234 = f195 - f203;
2134 f235 = f195 + f203;
2135 f236 = f197 - f205;
2136 f237 = f197 + f205;
2137 f238 = f199 - f207;
2138 f239 = f199 + f207;
2139 f240 = f213 - f225;
2140 f241 = f213 + f225;
2141 f242 = f212 - f224;
2142 f243 = f212 + f224;
2143 f244 = f219 - f231;
2144 f245 = f219 + f231;
2145 f246 = f218 - f230;
2146 f247 = f218 + f230;
2147 f248 = f232 + f234;
2148 f249 = MUL_C(COEF_CONST(1.3065629648763766), f232);
2149 f250 = MUL_F(FRAC_CONST(-0.9238795325112866), f248);
2150 f251 = MUL_F(FRAC_CONST(-0.5411961001461967), f234);
2151 f252 = f249 + f250;
2152 f253 = f251 - f250;
2153 f254 = f236 + f238;
2154 f255 = MUL_F(FRAC_CONST(0.5411961001461969), f236);
2155 f256 = MUL_F(FRAC_CONST(0.3826834323650898), f254);
2156 f257 = MUL_C(COEF_CONST(1.3065629648763766), f238);
2157 f258 = f255 + f256;
2158 f259 = f257 - f256;
2159 f260 = f240 + f242;
2160 f261 = MUL_C(COEF_CONST(1.3065629648763766), f240);
2161 f262 = MUL_F(FRAC_CONST(-0.9238795325112866), f260);
2162 f263 = MUL_F(FRAC_CONST(-0.5411961001461967), f242);
2163 f264 = f261 + f262;
2164 f265 = f263 - f262;
2165 f266 = f244 + f246;
2166 f267 = MUL_F(FRAC_CONST(0.5411961001461969), f244);
2167 f268 = MUL_F(FRAC_CONST(0.3826834323650898), f266);
2168 f269 = MUL_C(COEF_CONST(1.3065629648763766), f246);
2169 f270 = f267 + f268;
2170 f271 = f269 - f268;
2171 f272 = f233 - f237;
2172 f273 = f233 + f237;
2173 f274 = f235 - f239;
2174 f275 = f235 + f239;
2175 f276 = f253 - f259;
2176 f277 = f253 + f259;
2177 f278 = f252 - f258;
2178 f279 = f252 + f258;
2179 f280 = f241 - f245;
2180 f281 = f241 + f245;
2181 f282 = f243 - f247;
2182 f283 = f243 + f247;
2183 f284 = f265 - f271;
2184 f285 = f265 + f271;
2185 f286 = f264 - f270;
2186 f287 = f264 + f270;
2187 f288 = f272 - f274;
2188 f289 = f272 + f274;
2189 f290 = MUL_F(FRAC_CONST(0.7071067811865474), f288);
2190 f291 = MUL_F(FRAC_CONST(0.7071067811865474), f289);
2191 f292 = f276 - f278;
2192 f293 = f276 + f278;
2193 f294 = MUL_F(FRAC_CONST(0.7071067811865474), f292);
2194 f295 = MUL_F(FRAC_CONST(0.7071067811865474), f293);
2195 f296 = f280 - f282;
2196 f297 = f280 + f282;
2197 f298 = MUL_F(FRAC_CONST(0.7071067811865474), f296);
2198 f299 = MUL_F(FRAC_CONST(0.7071067811865474), f297);
2199 f300 = f284 - f286;
2200 f301 = f284 + f286;
2201 f302 = MUL_F(FRAC_CONST(0.7071067811865474), f300);
2202 f303 = MUL_F(FRAC_CONST(0.7071067811865474), f301);
2203 f304 = f129 - f273;
2204 f305 = f129 + f273;
2205 f306 = f131 - f281;
2206 f307 = f131 + f281;
2207 f308 = f133 - f285;
2208 f309 = f133 + f285;
2209 f310 = f135 - f277;
2210 f311 = f135 + f277;
2211 f312 = f137 - f295;
2212 f313 = f137 + f295;
2213 f314 = f139 - f303;
2214 f315 = f139 + f303;
2215 f316 = f141 - f299;
2216 f317 = f141 + f299;
2217 f318 = f143 - f291;
2218 f319 = f143 + f291;
2219 f320 = f142 - f290;
2220 f321 = f142 + f290;
2221 f322 = f140 - f298;
2222 f323 = f140 + f298;
2223 f324 = f138 - f302;
2224 f325 = f138 + f302;
2225 f326 = f136 - f294;
2226 f327 = f136 + f294;
2227 f328 = f134 - f279;
2228 f329 = f134 + f279;
2229 f330 = f132 - f287;
2230 f331 = f132 + f287;
2231 f332 = f130 - f283;
2232 f333 = f130 + f283;
2233 f334 = f128 - f275;
2234 f335 = f128 + f275;
2235 y[31] = MUL_F(FRAC_CONST(0.5001506360206510), f305);
2236 y[30] = MUL_F(FRAC_CONST(0.5013584524464084), f307);
2237 y[29] = MUL_F(FRAC_CONST(0.5037887256810443), f309);
2238 y[28] = MUL_F(FRAC_CONST(0.5074711720725553), f311);
2239 y[27] = MUL_F(FRAC_CONST(0.5124514794082247), f313);
2240 y[26] = MUL_F(FRAC_CONST(0.5187927131053328), f315);
2241 y[25] = MUL_F(FRAC_CONST(0.5265773151542700), f317);
2242 y[24] = MUL_F(FRAC_CONST(0.5359098169079920), f319);
2243 y[23] = MUL_F(FRAC_CONST(0.5469204379855088), f321);
2244 y[22] = MUL_F(FRAC_CONST(0.5597698129470802), f323);
2245 y[21] = MUL_F(FRAC_CONST(0.5746551840326600), f325);
2246 y[20] = MUL_F(FRAC_CONST(0.5918185358574165), f327);
2247 y[19] = MUL_F(FRAC_CONST(0.6115573478825099), f329);
2248 y[18] = MUL_F(FRAC_CONST(0.6342389366884031), f331);
2249 y[17] = MUL_F(FRAC_CONST(0.6603198078137061), f333);
2250 y[16] = MUL_F(FRAC_CONST(0.6903721282002123), f335);
2251 y[15] = MUL_F(FRAC_CONST(0.7251205223771985), f334);
2252 y[14] = MUL_F(FRAC_CONST(0.7654941649730891), f332);
2253 y[13] = MUL_F(FRAC_CONST(0.8127020908144905), f330);
2254 y[12] = MUL_F(FRAC_CONST(0.8683447152233481), f328);
2255 y[11] = MUL_F(FRAC_CONST(0.9345835970364075), f326);
2256 y[10] = MUL_C(COEF_CONST(1.0144082649970547), f324);
2257 y[9] = MUL_C(COEF_CONST(1.1120716205797176), f322);
2258 y[8] = MUL_C(COEF_CONST(1.2338327379765710), f320);
2259 y[7] = MUL_C(COEF_CONST(1.3892939586328277), f318);
2260 y[6] = MUL_C(COEF_CONST(1.5939722833856311), f316);
2261 y[5] = MUL_C(COEF_CONST(1.8746759800084078), f314);
2262 y[4] = MUL_C(COEF_CONST(2.2820500680051619), f312);
2263 y[3] = MUL_C(COEF_CONST(2.9246284281582162), f310);
2264 y[2] = MUL_C(COEF_CONST(4.0846110781292477), f308);
2265 y[1] = MUL_C(COEF_CONST(6.7967507116736332), f306);
2266 y[0] = MUL_R(REAL_CONST(20.3738781672314530), f304);
2267}
2268
2269#endif
2270
2271#endif
diff --git a/apps/codecs/libfaad/sbr_dct.h b/apps/codecs/libfaad/sbr_dct.h
new file mode 100644
index 0000000000..124f159d5b
--- /dev/null
+++ b/apps/codecs/libfaad/sbr_dct.h
@@ -0,0 +1,49 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __SBR_DCT_H__
29#define __SBR_DCT_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35void dct4_kernel(real_t * in_real, real_t * in_imag, real_t * out_real, real_t * out_imag);
36
37void DCT3_32_unscaled(real_t *y, real_t *x);
38void DCT4_32(real_t *y, real_t *x);
39void DST4_32(real_t *y, real_t *x);
40void DCT2_32_unscaled(real_t *y, real_t *x);
41void DCT4_16(real_t *y, real_t *x);
42void DCT2_16_unscaled(real_t *y, real_t *x);
43
44
45#ifdef __cplusplus
46}
47#endif
48#endif
49
diff --git a/apps/codecs/libfaad/sbr_dec.c b/apps/codecs/libfaad/sbr_dec.c
new file mode 100644
index 0000000000..04752d793b
--- /dev/null
+++ b/apps/codecs/libfaad/sbr_dec.c
@@ -0,0 +1,614 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28
29#include "common.h"
30#include "structs.h"
31
32#ifdef SBR_DEC
33
34#include <string.h>
35#include <stdlib.h>
36
37#include "syntax.h"
38#include "bits.h"
39#include "sbr_syntax.h"
40#include "sbr_qmf.h"
41#include "sbr_hfgen.h"
42#include "sbr_hfadj.h"
43
44
45/* static function declarations */
46static uint8_t sbr_save_prev_data(sbr_info *sbr, uint8_t ch);
47static void sbr_save_matrix(sbr_info *sbr, uint8_t ch);
48
49
50sbr_info *sbrDecodeInit(uint16_t framelength, uint8_t id_aac,
51 uint32_t sample_rate, uint8_t downSampledSBR
52#ifdef DRM
53 , uint8_t IsDRM
54#endif
55 )
56{
57 sbr_info *sbr = faad_malloc(sizeof(sbr_info));
58 memset(sbr, 0, sizeof(sbr_info));
59
60 /* save id of the parent element */
61 sbr->id_aac = id_aac;
62 sbr->sample_rate = sample_rate;
63
64 sbr->bs_freq_scale = 2;
65 sbr->bs_alter_scale = 1;
66 sbr->bs_noise_bands = 2;
67 sbr->bs_limiter_bands = 2;
68 sbr->bs_limiter_gains = 2;
69 sbr->bs_interpol_freq = 1;
70 sbr->bs_smoothing_mode = 1;
71 sbr->bs_start_freq = 5;
72 sbr->bs_amp_res = 1;
73 sbr->bs_samplerate_mode = 1;
74 sbr->prevEnvIsShort[0] = -1;
75 sbr->prevEnvIsShort[1] = -1;
76 sbr->header_count = 0;
77 sbr->Reset = 1;
78
79#ifdef DRM
80 sbr->Is_DRM_SBR = IsDRM;
81#endif
82 sbr->tHFGen = T_HFGEN;
83 sbr->tHFAdj = T_HFADJ;
84
85 sbr->bsco = 0;
86 sbr->bsco_prev = 0;
87 sbr->M_prev = 0;
88 sbr->frame_len = framelength;
89
90 /* force sbr reset */
91 sbr->bs_start_freq_prev = -1;
92
93 if (framelength == 960)
94 {
95 sbr->numTimeSlotsRate = RATE * NO_TIME_SLOTS_960;
96 sbr->numTimeSlots = NO_TIME_SLOTS_960;
97 } else {
98 sbr->numTimeSlotsRate = RATE * NO_TIME_SLOTS;
99 sbr->numTimeSlots = NO_TIME_SLOTS;
100 }
101
102 sbr->GQ_ringbuf_index[0] = 0;
103 sbr->GQ_ringbuf_index[1] = 0;
104
105 if (id_aac == ID_CPE)
106 {
107 /* stereo */
108 uint8_t j;
109 sbr->qmfa[0] = qmfa_init(32);
110 sbr->qmfa[1] = qmfa_init(32);
111 sbr->qmfs[0] = qmfs_init((downSampledSBR)?32:64);
112 sbr->qmfs[1] = qmfs_init((downSampledSBR)?32:64);
113
114 for (j = 0; j < 5; j++)
115 {
116 sbr->G_temp_prev[0][j] = faad_malloc(64*sizeof(real_t));
117 sbr->G_temp_prev[1][j] = faad_malloc(64*sizeof(real_t));
118 sbr->Q_temp_prev[0][j] = faad_malloc(64*sizeof(real_t));
119 sbr->Q_temp_prev[1][j] = faad_malloc(64*sizeof(real_t));
120 }
121
122 memset(sbr->Xsbr[0], 0, (sbr->numTimeSlotsRate+sbr->tHFGen)*64 * sizeof(qmf_t));
123 memset(sbr->Xsbr[1], 0, (sbr->numTimeSlotsRate+sbr->tHFGen)*64 * sizeof(qmf_t));
124 } else {
125 /* mono */
126 uint8_t j;
127 sbr->qmfa[0] = qmfa_init(32);
128 sbr->qmfs[0] = qmfs_init((downSampledSBR)?32:64);
129 sbr->qmfs[1] = NULL;
130
131 for (j = 0; j < 5; j++)
132 {
133 sbr->G_temp_prev[0][j] = faad_malloc(64*sizeof(real_t));
134 sbr->Q_temp_prev[0][j] = faad_malloc(64*sizeof(real_t));
135 }
136
137 memset(sbr->Xsbr[0], 0, (sbr->numTimeSlotsRate+sbr->tHFGen)*64 * sizeof(qmf_t));
138 }
139
140 return sbr;
141}
142
143void sbrDecodeEnd(sbr_info *sbr)
144{
145 uint8_t j;
146
147 if (sbr)
148 {
149 qmfa_end(sbr->qmfa[0]);
150 qmfs_end(sbr->qmfs[0]);
151 if (sbr->qmfs[1] != NULL)
152 {
153 qmfa_end(sbr->qmfa[1]);
154 qmfs_end(sbr->qmfs[1]);
155 }
156
157 for (j = 0; j < 5; j++)
158 {
159 if (sbr->G_temp_prev[0][j]) faad_free(sbr->G_temp_prev[0][j]);
160 if (sbr->Q_temp_prev[0][j]) faad_free(sbr->Q_temp_prev[0][j]);
161 if (sbr->G_temp_prev[1][j]) faad_free(sbr->G_temp_prev[1][j]);
162 if (sbr->Q_temp_prev[1][j]) faad_free(sbr->Q_temp_prev[1][j]);
163 }
164
165#ifdef PS_DEC
166 if (sbr->ps != NULL)
167 ps_free(sbr->ps);
168#endif
169
170#ifdef DRM_PS
171 if (sbr->drm_ps != NULL)
172 drm_ps_free(sbr->drm_ps);
173#endif
174
175 faad_free(sbr);
176 }
177}
178
179static uint8_t sbr_save_prev_data(sbr_info *sbr, uint8_t ch)
180{
181 uint8_t i;
182
183 /* save data for next frame */
184 sbr->kx_prev = sbr->kx;
185 sbr->M_prev = sbr->M;
186 sbr->bsco_prev = sbr->bsco;
187
188 sbr->L_E_prev[ch] = sbr->L_E[ch];
189
190 /* sbr->L_E[ch] can become 0 on files with bit errors */
191 if (sbr->L_E[ch] <= 0)
192 return 19;
193
194 sbr->f_prev[ch] = sbr->f[ch][sbr->L_E[ch] - 1];
195 for (i = 0; i < MAX_M; i++)
196 {
197 sbr->E_prev[ch][i] = sbr->E[ch][i][sbr->L_E[ch] - 1];
198 sbr->Q_prev[ch][i] = sbr->Q[ch][i][sbr->L_Q[ch] - 1];
199 }
200
201 for (i = 0; i < MAX_M; i++)
202 {
203 sbr->bs_add_harmonic_prev[ch][i] = sbr->bs_add_harmonic[ch][i];
204 }
205 sbr->bs_add_harmonic_flag_prev[ch] = sbr->bs_add_harmonic_flag[ch];
206
207 if (sbr->l_A[ch] == sbr->L_E[ch])
208 sbr->prevEnvIsShort[ch] = 0;
209 else
210 sbr->prevEnvIsShort[ch] = -1;
211
212 return 0;
213}
214
215static void sbr_save_matrix(sbr_info *sbr, uint8_t ch)
216{
217 uint8_t i;
218
219 for (i = 0; i < sbr->tHFGen; i++)
220 {
221 memmove(sbr->Xsbr[ch][i], sbr->Xsbr[ch][i+sbr->numTimeSlotsRate], 64 * sizeof(qmf_t));
222 }
223 for (i = sbr->tHFGen; i < MAX_NTSRHFG; i++)
224 {
225 memset(sbr->Xsbr[ch][i], 0, 64 * sizeof(qmf_t));
226 }
227}
228
229static void sbr_process_channel(sbr_info *sbr, real_t *channel_buf, qmf_t X[MAX_NTSR][64],
230 uint8_t ch, uint8_t dont_process,
231 const uint8_t downSampledSBR)
232{
233 int16_t k, l;
234
235#ifdef SBR_LOW_POWER
236 ALIGN real_t deg[64];
237#endif
238
239#ifdef DRM
240 if (sbr->Is_DRM_SBR)
241 {
242 sbr->bsco = max((int32_t)sbr->maxAACLine*32/(int32_t)sbr->frame_len - (int32_t)sbr->kx, 0);
243 } else {
244#endif
245 sbr->bsco = 0;
246#ifdef DRM
247 }
248#endif
249
250
251//#define PRE_QMF_PRINT
252#ifdef PRE_QMF_PRINT
253 {
254 int i;
255 for (i = 0; i < 1024; i++)
256 {
257 printf("%d\n", channel_buf[i]);
258 }
259 }
260#endif
261
262
263 /* subband analysis */
264 if (dont_process)
265 sbr_qmf_analysis_32(sbr, sbr->qmfa[ch], channel_buf, sbr->Xsbr[ch], sbr->tHFGen, 32);
266 else
267 sbr_qmf_analysis_32(sbr, sbr->qmfa[ch], channel_buf, sbr->Xsbr[ch], sbr->tHFGen, sbr->kx);
268
269 if (!dont_process)
270 {
271#if 1
272 /* insert high frequencies here */
273 /* hf generation using patching */
274 hf_generation(sbr, sbr->Xsbr[ch], sbr->Xsbr[ch]
275#ifdef SBR_LOW_POWER
276 ,deg
277#endif
278 ,ch);
279#endif
280
281#ifdef SBR_LOW_POWER
282 for (l = sbr->t_E[ch][0]; l < sbr->t_E[ch][sbr->L_E[ch]]; l++)
283 {
284 for (k = 0; k < sbr->kx; k++)
285 {
286 QMF_RE(sbr->Xsbr[ch][sbr->tHFAdj + l][k]) = 0;
287 }
288 }
289#endif
290
291#if 1
292 /* hf adjustment */
293 hf_adjustment(sbr, sbr->Xsbr[ch]
294#ifdef SBR_LOW_POWER
295 ,deg
296#endif
297 ,ch);
298#endif
299 }
300
301 if ((sbr->just_seeked != 0) || dont_process)
302 {
303 for (l = 0; l < sbr->numTimeSlotsRate; l++)
304 {
305 for (k = 0; k < 32; k++)
306 {
307 QMF_RE(X[l][k]) = QMF_RE(sbr->Xsbr[ch][l + sbr->tHFAdj][k]);
308#ifndef SBR_LOW_POWER
309 QMF_IM(X[l][k]) = QMF_IM(sbr->Xsbr[ch][l + sbr->tHFAdj][k]);
310#endif
311 }
312 for (k = 32; k < 64; k++)
313 {
314 QMF_RE(X[l][k]) = 0;
315#ifndef SBR_LOW_POWER
316 QMF_IM(X[l][k]) = 0;
317#endif
318 }
319 }
320 } else {
321 for (l = 0; l < sbr->numTimeSlotsRate; l++)
322 {
323 uint8_t kx_band, M_band, bsco_band;
324
325 if (l < sbr->t_E[ch][0])
326 {
327 kx_band = sbr->kx_prev;
328 M_band = sbr->M_prev;
329 bsco_band = sbr->bsco_prev;
330 } else {
331 kx_band = sbr->kx;
332 M_band = sbr->M;
333 bsco_band = sbr->bsco;
334 }
335
336#ifndef SBR_LOW_POWER
337 for (k = 0; k < kx_band + bsco_band; k++)
338 {
339 QMF_RE(X[l][k]) = QMF_RE(sbr->Xsbr[ch][l + sbr->tHFAdj][k]);
340 QMF_IM(X[l][k]) = QMF_IM(sbr->Xsbr[ch][l + sbr->tHFAdj][k]);
341 }
342 for (k = kx_band + bsco_band; k < kx_band + M_band; k++)
343 {
344 QMF_RE(X[l][k]) = QMF_RE(sbr->Xsbr[ch][l + sbr->tHFAdj][k]);
345 QMF_IM(X[l][k]) = QMF_IM(sbr->Xsbr[ch][l + sbr->tHFAdj][k]);
346 }
347 for (k = max(kx_band + bsco_band, kx_band + M_band); k < 64; k++)
348 {
349 QMF_RE(X[l][k]) = 0;
350 QMF_IM(X[l][k]) = 0;
351 }
352#else
353 for (k = 0; k < kx_band + bsco_band; k++)
354 {
355 QMF_RE(X[l][k]) = QMF_RE(sbr->Xsbr[ch][l + sbr->tHFAdj][k]);
356 }
357 for (k = kx_band + bsco_band; k < min(kx_band + M_band, 63); k++)
358 {
359 QMF_RE(X[l][k]) = QMF_RE(sbr->Xsbr[ch][l + sbr->tHFAdj][k]);
360 }
361 for (k = max(kx_band + bsco_band, kx_band + M_band); k < 64; k++)
362 {
363 QMF_RE(X[l][k]) = 0;
364 }
365 QMF_RE(X[l][kx_band - 1 + bsco_band]) +=
366 QMF_RE(sbr->Xsbr[ch][l + sbr->tHFAdj][kx_band - 1 + bsco_band]);
367#endif
368 }
369 }
370}
371
372uint8_t sbrDecodeCoupleFrame(sbr_info *sbr, real_t *left_chan, real_t *right_chan,
373 const uint8_t just_seeked, const uint8_t downSampledSBR)
374{
375 uint8_t dont_process = 0;
376 uint8_t ret = 0;
377 ALIGN qmf_t X[MAX_NTSR][64];
378
379 if (sbr == NULL)
380 return 20;
381
382 /* case can occur due to bit errors */
383 if (sbr->id_aac != ID_CPE)
384 return 21;
385
386 if (sbr->ret || (sbr->header_count == 0))
387 {
388 /* don't process just upsample */
389 dont_process = 1;
390
391 /* Re-activate reset for next frame */
392 if (sbr->ret && sbr->Reset)
393 sbr->bs_start_freq_prev = -1;
394 }
395
396 if (just_seeked)
397 {
398 sbr->just_seeked = 1;
399 } else {
400 sbr->just_seeked = 0;
401 }
402
403 sbr_process_channel(sbr, left_chan, X, 0, dont_process, downSampledSBR);
404 /* subband synthesis */
405 if (downSampledSBR)
406 {
407 sbr_qmf_synthesis_32(sbr, sbr->qmfs[0], X, left_chan);
408 } else {
409 sbr_qmf_synthesis_64(sbr, sbr->qmfs[0], X, left_chan);
410 }
411
412 sbr_process_channel(sbr, right_chan, X, 1, dont_process, downSampledSBR);
413 /* subband synthesis */
414 if (downSampledSBR)
415 {
416 sbr_qmf_synthesis_32(sbr, sbr->qmfs[1], X, right_chan);
417 } else {
418 sbr_qmf_synthesis_64(sbr, sbr->qmfs[1], X, right_chan);
419 }
420
421 if (sbr->bs_header_flag)
422 sbr->just_seeked = 0;
423
424 if (sbr->header_count != 0 && sbr->ret == 0)
425 {
426 ret = sbr_save_prev_data(sbr, 0);
427 if (ret) return ret;
428 ret = sbr_save_prev_data(sbr, 1);
429 if (ret) return ret;
430 }
431
432 sbr_save_matrix(sbr, 0);
433 sbr_save_matrix(sbr, 1);
434
435 sbr->frame++;
436
437//#define POST_QMF_PRINT
438#ifdef POST_QMF_PRINT
439 {
440 int i;
441 for (i = 0; i < 2048; i++)
442 {
443 printf("%d\n", left_chan[i]);
444 }
445 for (i = 0; i < 2048; i++)
446 {
447 printf("%d\n", right_chan[i]);
448 }
449 }
450#endif
451
452 return 0;
453}
454
455uint8_t sbrDecodeSingleFrame(sbr_info *sbr, real_t *channel,
456 const uint8_t just_seeked, const uint8_t downSampledSBR)
457{
458 uint8_t dont_process = 0;
459 uint8_t ret = 0;
460 ALIGN qmf_t X[MAX_NTSR][64];
461
462 if (sbr == NULL)
463 return 20;
464
465 /* case can occur due to bit errors */
466 if (sbr->id_aac != ID_SCE && sbr->id_aac != ID_LFE)
467 return 21;
468
469 if (sbr->ret || (sbr->header_count == 0))
470 {
471 /* don't process just upsample */
472 dont_process = 1;
473
474 /* Re-activate reset for next frame */
475 if (sbr->ret && sbr->Reset)
476 sbr->bs_start_freq_prev = -1;
477 }
478
479 if (just_seeked)
480 {
481 sbr->just_seeked = 1;
482 } else {
483 sbr->just_seeked = 0;
484 }
485
486 sbr_process_channel(sbr, channel, X, 0, dont_process, downSampledSBR);
487 /* subband synthesis */
488 if (downSampledSBR)
489 {
490 sbr_qmf_synthesis_32(sbr, sbr->qmfs[0], X, channel);
491 } else {
492 sbr_qmf_synthesis_64(sbr, sbr->qmfs[0], X, channel);
493 }
494
495 if (sbr->bs_header_flag)
496 sbr->just_seeked = 0;
497
498 if (sbr->header_count != 0 && sbr->ret == 0)
499 {
500 ret = sbr_save_prev_data(sbr, 0);
501 if (ret) return ret;
502 }
503
504 sbr_save_matrix(sbr, 0);
505
506 sbr->frame++;
507
508//#define POST_QMF_PRINT
509#ifdef POST_QMF_PRINT
510 {
511 int i;
512 for (i = 0; i < 2048; i++)
513 {
514 printf("%d\n", channel[i]);
515 }
516 }
517#endif
518
519 return 0;
520}
521
522#if (defined(PS_DEC) || defined(DRM_PS))
523uint8_t sbrDecodeSingleFramePS(sbr_info *sbr, real_t *left_channel, real_t *right_channel,
524 const uint8_t just_seeked, const uint8_t downSampledSBR)
525{
526 uint8_t l, k;
527 uint8_t dont_process = 0;
528 uint8_t ret = 0;
529 ALIGN qmf_t X_left[38][64] = {{0}};
530 ALIGN qmf_t X_right[38][64] = {{0}}; /* must set this to 0 */
531
532 if (sbr == NULL)
533 return 20;
534
535 /* case can occur due to bit errors */
536 if (sbr->id_aac != ID_SCE && sbr->id_aac != ID_LFE)
537 return 21;
538
539 if (sbr->ret || (sbr->header_count == 0))
540 {
541 /* don't process just upsample */
542 dont_process = 1;
543
544 /* Re-activate reset for next frame */
545 if (sbr->ret && sbr->Reset)
546 sbr->bs_start_freq_prev = -1;
547 }
548
549 if (just_seeked)
550 {
551 sbr->just_seeked = 1;
552 } else {
553 sbr->just_seeked = 0;
554 }
555
556 if (sbr->qmfs[1] == NULL)
557 {
558 sbr->qmfs[1] = qmfs_init((downSampledSBR)?32:64);
559 }
560
561 sbr_process_channel(sbr, left_channel, X_left, 0, dont_process, downSampledSBR);
562
563 /* copy some extra data for PS */
564 for (l = 32; l < 38; l++)
565 {
566 for (k = 0; k < 5; k++)
567 {
568 QMF_RE(X_left[l][k]) = QMF_RE(sbr->Xsbr[0][sbr->tHFAdj+l][k]);
569 QMF_IM(X_left[l][k]) = QMF_IM(sbr->Xsbr[0][sbr->tHFAdj+l][k]);
570 }
571 }
572
573 /* perform parametric stereo */
574#ifdef DRM_PS
575 if (sbr->Is_DRM_SBR)
576 {
577 drm_ps_decode(sbr->drm_ps, (sbr->ret > 0), sbr->sample_rate, X_left, X_right);
578 } else {
579#endif
580#ifdef PS_DEC
581 ps_decode(sbr->ps, X_left, X_right);
582#endif
583#ifdef DRM_PS
584 }
585#endif
586
587 /* subband synthesis */
588 if (downSampledSBR)
589 {
590 sbr_qmf_synthesis_32(sbr, sbr->qmfs[0], X_left, left_channel);
591 sbr_qmf_synthesis_32(sbr, sbr->qmfs[1], X_right, right_channel);
592 } else {
593 sbr_qmf_synthesis_64(sbr, sbr->qmfs[0], X_left, left_channel);
594 sbr_qmf_synthesis_64(sbr, sbr->qmfs[1], X_right, right_channel);
595 }
596
597 if (sbr->bs_header_flag)
598 sbr->just_seeked = 0;
599
600 if (sbr->header_count != 0 && sbr->ret == 0)
601 {
602 ret = sbr_save_prev_data(sbr, 0);
603 if (ret) return ret;
604 }
605
606 sbr_save_matrix(sbr, 0);
607
608 sbr->frame++;
609
610 return 0;
611}
612#endif
613
614#endif
diff --git a/apps/codecs/libfaad/sbr_dec.h b/apps/codecs/libfaad/sbr_dec.h
new file mode 100644
index 0000000000..25b3e37f52
--- /dev/null
+++ b/apps/codecs/libfaad/sbr_dec.h
@@ -0,0 +1,249 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __SBR_DEC_H__
29#define __SBR_DEC_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#ifdef PS_DEC
36#include "ps_dec.h"
37#endif
38#ifdef DRM_PS
39#include "drm_dec.h"
40#endif
41
42/* MAX_NTSRHFG: maximum of number_time_slots * rate + HFGen. 16*2+8 */
43#define MAX_NTSRHFG 40
44#define MAX_NTSR 32 /* max number_time_slots * rate, ok for DRM and not DRM mode */
45
46/* MAX_M: maximum value for M */
47#define MAX_M 49
48/* MAX_L_E: maximum value for L_E */
49#define MAX_L_E 5
50
51typedef struct {
52 real_t *x;
53 int16_t x_index;
54 uint8_t channels;
55} qmfa_info;
56
57typedef struct {
58 real_t *v;
59 int16_t v_index;
60 uint8_t channels;
61} qmfs_info;
62
63typedef struct
64{
65 uint32_t sample_rate;
66 uint32_t maxAACLine;
67
68 uint8_t rate;
69 uint8_t just_seeked;
70 uint8_t ret;
71
72 uint8_t amp_res[2];
73
74 uint8_t k0;
75 uint8_t kx;
76 uint8_t M;
77 uint8_t N_master;
78 uint8_t N_high;
79 uint8_t N_low;
80 uint8_t N_Q;
81 uint8_t N_L[4];
82 uint8_t n[2];
83
84 uint8_t f_master[64];
85 uint8_t f_table_res[2][64];
86 uint8_t f_table_noise[64];
87 uint8_t f_table_lim[4][64];
88#ifdef SBR_LOW_POWER
89 uint8_t f_group[5][64];
90 uint8_t N_G[5];
91#endif
92
93 uint8_t table_map_k_to_g[64];
94
95 uint8_t abs_bord_lead[2];
96 uint8_t abs_bord_trail[2];
97 uint8_t n_rel_lead[2];
98 uint8_t n_rel_trail[2];
99
100 uint8_t L_E[2];
101 uint8_t L_E_prev[2];
102 uint8_t L_Q[2];
103
104 uint8_t t_E[2][MAX_L_E+1];
105 uint8_t t_Q[2][3];
106 uint8_t f[2][MAX_L_E+1];
107 uint8_t f_prev[2];
108
109 real_t *G_temp_prev[2][5];
110 real_t *Q_temp_prev[2][5];
111 int8_t GQ_ringbuf_index[2];
112
113 int16_t E[2][64][MAX_L_E];
114 int16_t E_prev[2][64];
115#ifndef FIXED_POINT
116 real_t E_orig[2][64][MAX_L_E];
117#endif
118 real_t E_curr[2][64][MAX_L_E];
119 int32_t Q[2][64][2];
120#ifndef FIXED_POINT
121 real_t Q_div[2][64][2];
122 real_t Q_div2[2][64][2];
123#endif
124 int32_t Q_prev[2][64];
125
126 int8_t l_A[2];
127 int8_t l_A_prev[2];
128
129 uint8_t bs_invf_mode[2][MAX_L_E];
130 uint8_t bs_invf_mode_prev[2][MAX_L_E];
131 real_t bwArray[2][64];
132 real_t bwArray_prev[2][64];
133
134 uint8_t noPatches;
135 uint8_t patchNoSubbands[64];
136 uint8_t patchStartSubband[64];
137
138 uint8_t bs_add_harmonic[2][64];
139 uint8_t bs_add_harmonic_prev[2][64];
140
141 uint16_t index_noise_prev[2];
142 uint8_t psi_is_prev[2];
143
144 uint8_t bs_start_freq_prev;
145 uint8_t bs_stop_freq_prev;
146 uint8_t bs_xover_band_prev;
147 uint8_t bs_freq_scale_prev;
148 uint8_t bs_alter_scale_prev;
149 uint8_t bs_noise_bands_prev;
150
151 int8_t prevEnvIsShort[2];
152
153 int8_t kx_prev;
154 uint8_t bsco;
155 uint8_t bsco_prev;
156 uint8_t M_prev;
157 uint16_t frame_len;
158
159 uint8_t Reset;
160 uint32_t frame;
161 uint32_t header_count;
162
163 uint8_t id_aac;
164 qmfa_info *qmfa[2];
165 qmfs_info *qmfs[2];
166
167 qmf_t Xsbr[2][MAX_NTSRHFG][64];
168
169#ifdef DRM
170 uint8_t Is_DRM_SBR;
171#ifdef DRM_PS
172 drm_ps_info *drm_ps;
173#endif
174#endif
175
176 uint8_t numTimeSlotsRate;
177 uint8_t numTimeSlots;
178 uint8_t tHFGen;
179 uint8_t tHFAdj;
180
181#ifdef PS_DEC
182 ps_info *ps;
183#endif
184#if (defined(PS_DEC) || defined(DRM_PS))
185 uint8_t ps_used;
186#endif
187
188 /* to get it compiling */
189 /* we'll see during the coding of all the tools, whether
190 these are all used or not.
191 */
192 uint8_t bs_header_flag;
193 uint8_t bs_crc_flag;
194 uint16_t bs_sbr_crc_bits;
195 uint8_t bs_protocol_version;
196 uint8_t bs_amp_res;
197 uint8_t bs_start_freq;
198 uint8_t bs_stop_freq;
199 uint8_t bs_xover_band;
200 uint8_t bs_freq_scale;
201 uint8_t bs_alter_scale;
202 uint8_t bs_noise_bands;
203 uint8_t bs_limiter_bands;
204 uint8_t bs_limiter_gains;
205 uint8_t bs_interpol_freq;
206 uint8_t bs_smoothing_mode;
207 uint8_t bs_samplerate_mode;
208 uint8_t bs_add_harmonic_flag[2];
209 uint8_t bs_add_harmonic_flag_prev[2];
210 uint8_t bs_extended_data;
211 uint8_t bs_extension_id;
212 uint8_t bs_extension_data;
213 uint8_t bs_coupling;
214 uint8_t bs_frame_class[2];
215 uint8_t bs_rel_bord[2][9];
216 uint8_t bs_rel_bord_0[2][9];
217 uint8_t bs_rel_bord_1[2][9];
218 uint8_t bs_pointer[2];
219 uint8_t bs_abs_bord_0[2];
220 uint8_t bs_abs_bord_1[2];
221 uint8_t bs_num_rel_0[2];
222 uint8_t bs_num_rel_1[2];
223 uint8_t bs_df_env[2][9];
224 uint8_t bs_df_noise[2][3];
225} sbr_info;
226
227sbr_info *sbrDecodeInit(uint16_t framelength, uint8_t id_aac,
228 uint32_t sample_rate, uint8_t downSampledSBR
229#ifdef DRM
230 , uint8_t IsDRM
231#endif
232 );
233void sbrDecodeEnd(sbr_info *sbr);
234
235uint8_t sbrDecodeCoupleFrame(sbr_info *sbr, real_t *left_chan, real_t *right_chan,
236 const uint8_t just_seeked, const uint8_t downSampledSBR);
237uint8_t sbrDecodeSingleFrame(sbr_info *sbr, real_t *channel,
238 const uint8_t just_seeked, const uint8_t downSampledSBR);
239#if (defined(PS_DEC) || defined(DRM_PS))
240uint8_t sbrDecodeSingleFramePS(sbr_info *sbr, real_t *left_channel, real_t *right_channel,
241 const uint8_t just_seeked, const uint8_t downSampledSBR);
242#endif
243
244
245#ifdef __cplusplus
246}
247#endif
248#endif
249
diff --git a/apps/codecs/libfaad/sbr_e_nf.c b/apps/codecs/libfaad/sbr_e_nf.c
new file mode 100644
index 0000000000..60532cbd76
--- /dev/null
+++ b/apps/codecs/libfaad/sbr_e_nf.c
@@ -0,0 +1,507 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#include "common.h"
29#include "structs.h"
30
31#ifdef SBR_DEC
32
33#include <stdlib.h>
34
35#include "sbr_syntax.h"
36#include "sbr_e_nf.h"
37
38void extract_envelope_data(sbr_info *sbr, uint8_t ch)
39{
40 uint8_t l, k;
41
42 for (l = 0; l < sbr->L_E[ch]; l++)
43 {
44 if (sbr->bs_df_env[ch][l] == 0)
45 {
46 for (k = 1; k < sbr->n[sbr->f[ch][l]]; k++)
47 {
48 sbr->E[ch][k][l] = sbr->E[ch][k - 1][l] + sbr->E[ch][k][l];
49 if (sbr->E[ch][k][l] < 0)
50 sbr->E[ch][k][l] = 0;
51 }
52
53 } else { /* bs_df_env == 1 */
54
55 uint8_t g = (l == 0) ? sbr->f_prev[ch] : sbr->f[ch][l-1];
56 int16_t E_prev;
57
58 if (sbr->f[ch][l] == g)
59 {
60 for (k = 0; k < sbr->n[sbr->f[ch][l]]; k++)
61 {
62 if (l == 0)
63 E_prev = sbr->E_prev[ch][k];
64 else
65 E_prev = sbr->E[ch][k][l - 1];
66
67 sbr->E[ch][k][l] = E_prev + sbr->E[ch][k][l];
68 }
69
70 } else if ((g == 1) && (sbr->f[ch][l] == 0)) {
71 uint8_t i;
72
73 for (k = 0; k < sbr->n[sbr->f[ch][l]]; k++)
74 {
75 for (i = 0; i < sbr->N_high; i++)
76 {
77 if (sbr->f_table_res[HI_RES][i] == sbr->f_table_res[LO_RES][k])
78 {
79 if (l == 0)
80 E_prev = sbr->E_prev[ch][i];
81 else
82 E_prev = sbr->E[ch][i][l - 1];
83
84 sbr->E[ch][k][l] = E_prev + sbr->E[ch][k][l];
85 }
86 }
87 }
88
89 } else if ((g == 0) && (sbr->f[ch][l] == 1)) {
90 uint8_t i;
91
92 for (k = 0; k < sbr->n[sbr->f[ch][l]]; k++)
93 {
94 for (i = 0; i < sbr->N_low; i++)
95 {
96 if ((sbr->f_table_res[LO_RES][i] <= sbr->f_table_res[HI_RES][k]) &&
97 (sbr->f_table_res[HI_RES][k] < sbr->f_table_res[LO_RES][i + 1]))
98 {
99 if (l == 0)
100 E_prev = sbr->E_prev[ch][i];
101 else
102 E_prev = sbr->E[ch][i][l - 1];
103
104 sbr->E[ch][k][l] = E_prev + sbr->E[ch][k][l];
105 }
106 }
107 }
108 }
109 }
110 }
111}
112
113void extract_noise_floor_data(sbr_info *sbr, uint8_t ch)
114{
115 uint8_t l, k;
116
117 for (l = 0; l < sbr->L_Q[ch]; l++)
118 {
119 if (sbr->bs_df_noise[ch][l] == 0)
120 {
121 for (k = 1; k < sbr->N_Q; k++)
122 {
123 sbr->Q[ch][k][l] = sbr->Q[ch][k][l] + sbr->Q[ch][k-1][l];
124 }
125 } else {
126 if (l == 0)
127 {
128 for (k = 0; k < sbr->N_Q; k++)
129 {
130 sbr->Q[ch][k][l] = sbr->Q_prev[ch][k] + sbr->Q[ch][k][0];
131 }
132 } else {
133 for (k = 0; k < sbr->N_Q; k++)
134 {
135 sbr->Q[ch][k][l] = sbr->Q[ch][k][l - 1] + sbr->Q[ch][k][l];
136 }
137 }
138 }
139 }
140}
141
142#ifndef FIXED_POINT
143
144/* table for Q_div values when no coupling */
145static const real_t Q_div_tab[31] = {
146 FRAC_CONST(0.0153846), FRAC_CONST(0.030303),
147 FRAC_CONST(0.0588235), FRAC_CONST(0.111111),
148 FRAC_CONST(0.2), FRAC_CONST(0.333333),
149 FRAC_CONST(0.5), FRAC_CONST(0.666667),
150 FRAC_CONST(0.8), FRAC_CONST(0.888889),
151 FRAC_CONST(0.941176), FRAC_CONST(0.969697),
152 FRAC_CONST(0.984615), FRAC_CONST(0.992248),
153 FRAC_CONST(0.996109), FRAC_CONST(0.998051),
154 FRAC_CONST(0.999024), FRAC_CONST(0.999512),
155 FRAC_CONST(0.999756), FRAC_CONST(0.999878),
156 FRAC_CONST(0.999939), FRAC_CONST(0.999969),
157 FRAC_CONST(0.999985), FRAC_CONST(0.999992),
158 FRAC_CONST(0.999996), FRAC_CONST(0.999998),
159 FRAC_CONST(0.999999), FRAC_CONST(1),
160 FRAC_CONST(1), FRAC_CONST(1),
161 FRAC_CONST(1)
162};
163
164static const real_t Q_div_tab_left[31][13] = {
165 { FRAC_CONST(0.969704), FRAC_CONST(0.888985), FRAC_CONST(0.667532), FRAC_CONST(0.336788), FRAC_CONST(0.117241), FRAC_CONST(0.037594), FRAC_CONST(0.0153846), FRAC_CONST(0.00967118), FRAC_CONST(0.00823245), FRAC_CONST(0.00787211), FRAC_CONST(0.00778198), FRAC_CONST(0.00775945), FRAC_CONST(0.00775382) },
166 { FRAC_CONST(0.984619), FRAC_CONST(0.94123), FRAC_CONST(0.800623), FRAC_CONST(0.503876), FRAC_CONST(0.209877), FRAC_CONST(0.0724638), FRAC_CONST(0.030303), FRAC_CONST(0.0191571), FRAC_CONST(0.0163305), FRAC_CONST(0.0156212), FRAC_CONST(0.0154438), FRAC_CONST(0.0153994), FRAC_CONST(0.0153883) },
167 { FRAC_CONST(0.99225), FRAC_CONST(0.969726), FRAC_CONST(0.889273), FRAC_CONST(0.670103), FRAC_CONST(0.346939), FRAC_CONST(0.135135), FRAC_CONST(0.0588235), FRAC_CONST(0.037594), FRAC_CONST(0.0321361), FRAC_CONST(0.0307619), FRAC_CONST(0.0304178), FRAC_CONST(0.0303317), FRAC_CONST(0.0303102) },
168 { FRAC_CONST(0.99611), FRAC_CONST(0.98463), FRAC_CONST(0.941392), FRAC_CONST(0.802469), FRAC_CONST(0.515152), FRAC_CONST(0.238095), FRAC_CONST(0.111111), FRAC_CONST(0.0724638), FRAC_CONST(0.0622711), FRAC_CONST(0.0596878), FRAC_CONST(0.0590397), FRAC_CONST(0.0588776), FRAC_CONST(0.058837) },
169 { FRAC_CONST(0.998051), FRAC_CONST(0.992256), FRAC_CONST(0.969811), FRAC_CONST(0.890411), FRAC_CONST(0.68), FRAC_CONST(0.384615), FRAC_CONST(0.2), FRAC_CONST(0.135135), FRAC_CONST(0.117241), FRAC_CONST(0.112652), FRAC_CONST(0.111497), FRAC_CONST(0.111208), FRAC_CONST(0.111135) },
170 { FRAC_CONST(0.999025), FRAC_CONST(0.996113), FRAC_CONST(0.984674), FRAC_CONST(0.942029), FRAC_CONST(0.809524), FRAC_CONST(0.555556), FRAC_CONST(0.333333), FRAC_CONST(0.238095), FRAC_CONST(0.209877), FRAC_CONST(0.202492), FRAC_CONST(0.200625), FRAC_CONST(0.200156), FRAC_CONST(0.200039) },
171 { FRAC_CONST(0.999512), FRAC_CONST(0.998053), FRAC_CONST(0.992278), FRAC_CONST(0.970149), FRAC_CONST(0.894737), FRAC_CONST(0.714286), FRAC_CONST(0.5), FRAC_CONST(0.384615), FRAC_CONST(0.346939), FRAC_CONST(0.336788), FRAC_CONST(0.3342), FRAC_CONST(0.33355), FRAC_CONST(0.333388) },
172 { FRAC_CONST(0.999756), FRAC_CONST(0.999025), FRAC_CONST(0.996124), FRAC_CONST(0.984848), FRAC_CONST(0.944444), FRAC_CONST(0.833333), FRAC_CONST(0.666667), FRAC_CONST(0.555556), FRAC_CONST(0.515152), FRAC_CONST(0.503876), FRAC_CONST(0.500975), FRAC_CONST(0.500244), FRAC_CONST(0.500061) },
173 { FRAC_CONST(0.999878), FRAC_CONST(0.999512), FRAC_CONST(0.998058), FRAC_CONST(0.992366), FRAC_CONST(0.971429), FRAC_CONST(0.909091), FRAC_CONST(0.8), FRAC_CONST(0.714286), FRAC_CONST(0.68), FRAC_CONST(0.670103), FRAC_CONST(0.667532), FRAC_CONST(0.666884), FRAC_CONST(0.666721) },
174 { FRAC_CONST(0.999939), FRAC_CONST(0.999756), FRAC_CONST(0.999028), FRAC_CONST(0.996169), FRAC_CONST(0.985507), FRAC_CONST(0.952381), FRAC_CONST(0.888889), FRAC_CONST(0.833333), FRAC_CONST(0.809524), FRAC_CONST(0.802469), FRAC_CONST(0.800623), FRAC_CONST(0.800156), FRAC_CONST(0.800039) },
175 { FRAC_CONST(0.999969), FRAC_CONST(0.999878), FRAC_CONST(0.999514), FRAC_CONST(0.998081), FRAC_CONST(0.992701), FRAC_CONST(0.97561), FRAC_CONST(0.941176), FRAC_CONST(0.909091), FRAC_CONST(0.894737), FRAC_CONST(0.890411), FRAC_CONST(0.889273), FRAC_CONST(0.888985), FRAC_CONST(0.888913) },
176 { FRAC_CONST(0.999985), FRAC_CONST(0.999939), FRAC_CONST(0.999757), FRAC_CONST(0.999039), FRAC_CONST(0.996337), FRAC_CONST(0.987654), FRAC_CONST(0.969697), FRAC_CONST(0.952381), FRAC_CONST(0.944444), FRAC_CONST(0.942029), FRAC_CONST(0.941392), FRAC_CONST(0.94123), FRAC_CONST(0.94119) },
177 { FRAC_CONST(0.999992), FRAC_CONST(0.99997), FRAC_CONST(0.999878), FRAC_CONST(0.999519), FRAC_CONST(0.998165), FRAC_CONST(0.993789), FRAC_CONST(0.984615), FRAC_CONST(0.97561), FRAC_CONST(0.971429), FRAC_CONST(0.970149), FRAC_CONST(0.969811), FRAC_CONST(0.969726), FRAC_CONST(0.969704) },
178 { FRAC_CONST(0.999996), FRAC_CONST(0.999985), FRAC_CONST(0.999939), FRAC_CONST(0.99976), FRAC_CONST(0.999082), FRAC_CONST(0.996885), FRAC_CONST(0.992248), FRAC_CONST(0.987654), FRAC_CONST(0.985507), FRAC_CONST(0.984848), FRAC_CONST(0.984674), FRAC_CONST(0.98463), FRAC_CONST(0.984619) },
179 { FRAC_CONST(0.999998), FRAC_CONST(0.999992), FRAC_CONST(0.99997), FRAC_CONST(0.99988), FRAC_CONST(0.999541), FRAC_CONST(0.99844), FRAC_CONST(0.996109), FRAC_CONST(0.993789), FRAC_CONST(0.992701), FRAC_CONST(0.992366), FRAC_CONST(0.992278), FRAC_CONST(0.992256), FRAC_CONST(0.99225) },
180 { FRAC_CONST(0.999999), FRAC_CONST(0.999996), FRAC_CONST(0.999985), FRAC_CONST(0.99994), FRAC_CONST(0.99977), FRAC_CONST(0.999219), FRAC_CONST(0.998051), FRAC_CONST(0.996885), FRAC_CONST(0.996337), FRAC_CONST(0.996169), FRAC_CONST(0.996124), FRAC_CONST(0.996113), FRAC_CONST(0.99611) },
181 { FRAC_CONST(1), FRAC_CONST(0.999998), FRAC_CONST(0.999992), FRAC_CONST(0.99997), FRAC_CONST(0.999885), FRAC_CONST(0.99961), FRAC_CONST(0.999024), FRAC_CONST(0.99844), FRAC_CONST(0.998165), FRAC_CONST(0.998081), FRAC_CONST(0.998058), FRAC_CONST(0.998053), FRAC_CONST(0.998051) },
182 { FRAC_CONST(1), FRAC_CONST(0.999999), FRAC_CONST(0.999996), FRAC_CONST(0.999985), FRAC_CONST(0.999943), FRAC_CONST(0.999805), FRAC_CONST(0.999512), FRAC_CONST(0.999219), FRAC_CONST(0.999082), FRAC_CONST(0.999039), FRAC_CONST(0.999028), FRAC_CONST(0.999025), FRAC_CONST(0.999025) },
183 { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(0.999998), FRAC_CONST(0.999992), FRAC_CONST(0.999971), FRAC_CONST(0.999902), FRAC_CONST(0.999756), FRAC_CONST(0.99961), FRAC_CONST(0.999541), FRAC_CONST(0.999519), FRAC_CONST(0.999514), FRAC_CONST(0.999512), FRAC_CONST(0.999512) },
184 { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(0.999999), FRAC_CONST(0.999996), FRAC_CONST(0.999986), FRAC_CONST(0.999951), FRAC_CONST(0.999878), FRAC_CONST(0.999805), FRAC_CONST(0.99977), FRAC_CONST(0.99976), FRAC_CONST(0.999757), FRAC_CONST(0.999756), FRAC_CONST(0.999756) },
185 { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(0.999998), FRAC_CONST(0.999993), FRAC_CONST(0.999976), FRAC_CONST(0.999939), FRAC_CONST(0.999902), FRAC_CONST(0.999885), FRAC_CONST(0.99988), FRAC_CONST(0.999878), FRAC_CONST(0.999878), FRAC_CONST(0.999878) },
186 { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(0.999999), FRAC_CONST(0.999996), FRAC_CONST(0.999988), FRAC_CONST(0.999969), FRAC_CONST(0.999951), FRAC_CONST(0.999943), FRAC_CONST(0.99994), FRAC_CONST(0.999939), FRAC_CONST(0.999939), FRAC_CONST(0.999939) },
187 { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(0.999998), FRAC_CONST(0.999994), FRAC_CONST(0.999985), FRAC_CONST(0.999976), FRAC_CONST(0.999971), FRAC_CONST(0.99997), FRAC_CONST(0.99997), FRAC_CONST(0.99997), FRAC_CONST(0.999969) },
188 { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(0.999999), FRAC_CONST(0.999997), FRAC_CONST(0.999992), FRAC_CONST(0.999988), FRAC_CONST(0.999986), FRAC_CONST(0.999985), FRAC_CONST(0.999985), FRAC_CONST(0.999985), FRAC_CONST(0.999985) },
189 { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(0.999998), FRAC_CONST(0.999996), FRAC_CONST(0.999994), FRAC_CONST(0.999993), FRAC_CONST(0.999992), FRAC_CONST(0.999992), FRAC_CONST(0.999992), FRAC_CONST(0.999992) },
190 { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(0.999999), FRAC_CONST(0.999998), FRAC_CONST(0.999997), FRAC_CONST(0.999996), FRAC_CONST(0.999996), FRAC_CONST(0.999996), FRAC_CONST(0.999996), FRAC_CONST(0.999996) },
191 { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(0.999999), FRAC_CONST(0.999998), FRAC_CONST(0.999998), FRAC_CONST(0.999998), FRAC_CONST(0.999998), FRAC_CONST(0.999998), FRAC_CONST(0.999998) },
192 { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(0.999999), FRAC_CONST(0.999999), FRAC_CONST(0.999999), FRAC_CONST(0.999999), FRAC_CONST(0.999999), FRAC_CONST(0.999999) },
193 { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) },
194 { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) },
195 { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) }
196};
197
198static const real_t Q_div_tab_right[31][13] = {
199 { FRAC_CONST(0.00775382), FRAC_CONST(0.00775945), FRAC_CONST(0.00778198), FRAC_CONST(0.00787211), FRAC_CONST(0.00823245), FRAC_CONST(0.00967118), FRAC_CONST(0.0153846), FRAC_CONST(0.037594), FRAC_CONST(0.117241), FRAC_CONST(0.336788), FRAC_CONST(0.667532), FRAC_CONST(0.888985), FRAC_CONST(0.969704) },
200 { FRAC_CONST(0.0153883), FRAC_CONST(0.0153994), FRAC_CONST(0.0154438), FRAC_CONST(0.0156212), FRAC_CONST(0.0163305), FRAC_CONST(0.0191571), FRAC_CONST(0.030303), FRAC_CONST(0.0724638), FRAC_CONST(0.209877), FRAC_CONST(0.503876), FRAC_CONST(0.800623), FRAC_CONST(0.94123), FRAC_CONST(0.984619) },
201 { FRAC_CONST(0.0303102), FRAC_CONST(0.0303317), FRAC_CONST(0.0304178), FRAC_CONST(0.0307619), FRAC_CONST(0.0321361), FRAC_CONST(0.037594), FRAC_CONST(0.0588235), FRAC_CONST(0.135135), FRAC_CONST(0.346939), FRAC_CONST(0.670103), FRAC_CONST(0.889273), FRAC_CONST(0.969726), FRAC_CONST(0.99225) },
202 { FRAC_CONST(0.058837), FRAC_CONST(0.0588776), FRAC_CONST(0.0590397), FRAC_CONST(0.0596878), FRAC_CONST(0.0622711), FRAC_CONST(0.0724638), FRAC_CONST(0.111111), FRAC_CONST(0.238095), FRAC_CONST(0.515152), FRAC_CONST(0.802469), FRAC_CONST(0.941392), FRAC_CONST(0.98463), FRAC_CONST(0.99611) },
203 { FRAC_CONST(0.111135), FRAC_CONST(0.111208), FRAC_CONST(0.111497), FRAC_CONST(0.112652), FRAC_CONST(0.117241), FRAC_CONST(0.135135), FRAC_CONST(0.2), FRAC_CONST(0.384615), FRAC_CONST(0.68), FRAC_CONST(0.890411), FRAC_CONST(0.969811), FRAC_CONST(0.992256), FRAC_CONST(0.998051) },
204 { FRAC_CONST(0.200039), FRAC_CONST(0.200156), FRAC_CONST(0.200625), FRAC_CONST(0.202492), FRAC_CONST(0.209877), FRAC_CONST(0.238095), FRAC_CONST(0.333333), FRAC_CONST(0.555556), FRAC_CONST(0.809524), FRAC_CONST(0.942029), FRAC_CONST(0.984674), FRAC_CONST(0.996113), FRAC_CONST(0.999025) },
205 { FRAC_CONST(0.333388), FRAC_CONST(0.33355), FRAC_CONST(0.3342), FRAC_CONST(0.336788), FRAC_CONST(0.346939), FRAC_CONST(0.384615), FRAC_CONST(0.5), FRAC_CONST(0.714286), FRAC_CONST(0.894737), FRAC_CONST(0.970149), FRAC_CONST(0.992278), FRAC_CONST(0.998053), FRAC_CONST(0.999512) },
206 { FRAC_CONST(0.500061), FRAC_CONST(0.500244), FRAC_CONST(0.500975), FRAC_CONST(0.503876), FRAC_CONST(0.515152), FRAC_CONST(0.555556), FRAC_CONST(0.666667), FRAC_CONST(0.833333), FRAC_CONST(0.944444), FRAC_CONST(0.984848), FRAC_CONST(0.996124), FRAC_CONST(0.999025), FRAC_CONST(0.999756) },
207 { FRAC_CONST(0.666721), FRAC_CONST(0.666884), FRAC_CONST(0.667532), FRAC_CONST(0.670103), FRAC_CONST(0.68), FRAC_CONST(0.714286), FRAC_CONST(0.8), FRAC_CONST(0.909091), FRAC_CONST(0.971429), FRAC_CONST(0.992366), FRAC_CONST(0.998058), FRAC_CONST(0.999512), FRAC_CONST(0.999878) },
208 { FRAC_CONST(0.800039), FRAC_CONST(0.800156), FRAC_CONST(0.800623), FRAC_CONST(0.802469), FRAC_CONST(0.809524), FRAC_CONST(0.833333), FRAC_CONST(0.888889), FRAC_CONST(0.952381), FRAC_CONST(0.985507), FRAC_CONST(0.996169), FRAC_CONST(0.999028), FRAC_CONST(0.999756), FRAC_CONST(0.999939) },
209 { FRAC_CONST(0.888913), FRAC_CONST(0.888985), FRAC_CONST(0.889273), FRAC_CONST(0.890411), FRAC_CONST(0.894737), FRAC_CONST(0.909091), FRAC_CONST(0.941176), FRAC_CONST(0.97561), FRAC_CONST(0.992701), FRAC_CONST(0.998081), FRAC_CONST(0.999514), FRAC_CONST(0.999878), FRAC_CONST(0.999969) },
210 { FRAC_CONST(0.94119), FRAC_CONST(0.94123), FRAC_CONST(0.941392), FRAC_CONST(0.942029), FRAC_CONST(0.944444), FRAC_CONST(0.952381), FRAC_CONST(0.969697), FRAC_CONST(0.987654), FRAC_CONST(0.996337), FRAC_CONST(0.999039), FRAC_CONST(0.999757), FRAC_CONST(0.999939), FRAC_CONST(0.999985) },
211 { FRAC_CONST(0.969704), FRAC_CONST(0.969726), FRAC_CONST(0.969811), FRAC_CONST(0.970149), FRAC_CONST(0.971429), FRAC_CONST(0.97561), FRAC_CONST(0.984615), FRAC_CONST(0.993789), FRAC_CONST(0.998165), FRAC_CONST(0.999519), FRAC_CONST(0.999878), FRAC_CONST(0.99997), FRAC_CONST(0.999992) },
212 { FRAC_CONST(0.984619), FRAC_CONST(0.98463), FRAC_CONST(0.984674), FRAC_CONST(0.984848), FRAC_CONST(0.985507), FRAC_CONST(0.987654), FRAC_CONST(0.992248), FRAC_CONST(0.996885), FRAC_CONST(0.999082), FRAC_CONST(0.99976), FRAC_CONST(0.999939), FRAC_CONST(0.999985), FRAC_CONST(0.999996) },
213 { FRAC_CONST(0.99225), FRAC_CONST(0.992256), FRAC_CONST(0.992278), FRAC_CONST(0.992366), FRAC_CONST(0.992701), FRAC_CONST(0.993789), FRAC_CONST(0.996109), FRAC_CONST(0.99844), FRAC_CONST(0.999541), FRAC_CONST(0.99988), FRAC_CONST(0.99997), FRAC_CONST(0.999992), FRAC_CONST(0.999998) },
214 { FRAC_CONST(0.99611), FRAC_CONST(0.996113), FRAC_CONST(0.996124), FRAC_CONST(0.996169), FRAC_CONST(0.996337), FRAC_CONST(0.996885), FRAC_CONST(0.998051), FRAC_CONST(0.999219), FRAC_CONST(0.99977), FRAC_CONST(0.99994), FRAC_CONST(0.999985), FRAC_CONST(0.999996), FRAC_CONST(0.999999) },
215 { FRAC_CONST(0.998051), FRAC_CONST(0.998053), FRAC_CONST(0.998058), FRAC_CONST(0.998081), FRAC_CONST(0.998165), FRAC_CONST(0.99844), FRAC_CONST(0.999024), FRAC_CONST(0.99961), FRAC_CONST(0.999885), FRAC_CONST(0.99997), FRAC_CONST(0.999992), FRAC_CONST(0.999998), FRAC_CONST(1) },
216 { FRAC_CONST(0.999025), FRAC_CONST(0.999025), FRAC_CONST(0.999028), FRAC_CONST(0.999039), FRAC_CONST(0.999082), FRAC_CONST(0.999219), FRAC_CONST(0.999512), FRAC_CONST(0.999805), FRAC_CONST(0.999943), FRAC_CONST(0.999985), FRAC_CONST(0.999996), FRAC_CONST(0.999999), FRAC_CONST(1) },
217 { FRAC_CONST(0.999512), FRAC_CONST(0.999512), FRAC_CONST(0.999514), FRAC_CONST(0.999519), FRAC_CONST(0.999541), FRAC_CONST(0.99961), FRAC_CONST(0.999756), FRAC_CONST(0.999902), FRAC_CONST(0.999971), FRAC_CONST(0.999992), FRAC_CONST(0.999998), FRAC_CONST(1), FRAC_CONST(1) },
218 { FRAC_CONST(0.999756), FRAC_CONST(0.999756), FRAC_CONST(0.999757), FRAC_CONST(0.99976), FRAC_CONST(0.99977), FRAC_CONST(0.999805), FRAC_CONST(0.999878), FRAC_CONST(0.999951), FRAC_CONST(0.999986), FRAC_CONST(0.999996), FRAC_CONST(0.999999), FRAC_CONST(1), FRAC_CONST(1) },
219 { FRAC_CONST(0.999878), FRAC_CONST(0.999878), FRAC_CONST(0.999878), FRAC_CONST(0.99988), FRAC_CONST(0.999885), FRAC_CONST(0.999902), FRAC_CONST(0.999939), FRAC_CONST(0.999976), FRAC_CONST(0.999993), FRAC_CONST(0.999998), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) },
220 { FRAC_CONST(0.999939), FRAC_CONST(0.999939), FRAC_CONST(0.999939), FRAC_CONST(0.99994), FRAC_CONST(0.999943), FRAC_CONST(0.999951), FRAC_CONST(0.999969), FRAC_CONST(0.999988), FRAC_CONST(0.999996), FRAC_CONST(0.999999), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) },
221 { FRAC_CONST(0.999969), FRAC_CONST(0.99997), FRAC_CONST(0.99997), FRAC_CONST(0.99997), FRAC_CONST(0.999971), FRAC_CONST(0.999976), FRAC_CONST(0.999985), FRAC_CONST(0.999994), FRAC_CONST(0.999998), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) },
222 { FRAC_CONST(0.999985), FRAC_CONST(0.999985), FRAC_CONST(0.999985), FRAC_CONST(0.999985), FRAC_CONST(0.999986), FRAC_CONST(0.999988), FRAC_CONST(0.999992), FRAC_CONST(0.999997), FRAC_CONST(0.999999), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) },
223 { FRAC_CONST(0.999992), FRAC_CONST(0.999992), FRAC_CONST(0.999992), FRAC_CONST(0.999992), FRAC_CONST(0.999993), FRAC_CONST(0.999994), FRAC_CONST(0.999996), FRAC_CONST(0.999998), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) },
224 { FRAC_CONST(0.999996), FRAC_CONST(0.999996), FRAC_CONST(0.999996), FRAC_CONST(0.999996), FRAC_CONST(0.999996), FRAC_CONST(0.999997), FRAC_CONST(0.999998), FRAC_CONST(0.999999), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) },
225 { FRAC_CONST(0.999998), FRAC_CONST(0.999998), FRAC_CONST(0.999998), FRAC_CONST(0.999998), FRAC_CONST(0.999998), FRAC_CONST(0.999998), FRAC_CONST(0.999999), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) },
226 { FRAC_CONST(0.999999), FRAC_CONST(0.999999), FRAC_CONST(0.999999), FRAC_CONST(0.999999), FRAC_CONST(0.999999), FRAC_CONST(0.999999), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) },
227 { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) },
228 { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) },
229 { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) }
230};
231
232/* calculates 1/(1+Q) */
233/* [0..1] */
234real_t calc_Q_div(sbr_info *sbr, uint8_t ch, uint8_t m, uint8_t l)
235{
236 if (sbr->bs_coupling)
237 {
238 /* left channel */
239 if ((sbr->Q[0][m][l] < 0 || sbr->Q[0][m][l] > 30) ||
240 (sbr->Q[1][m][l] < 0 || sbr->Q[1][m][l] > 24 /* 2*panOffset(1) */))
241 {
242 return 0;
243 } else {
244 /* the pan parameter is always even */
245 if (ch == 0)
246 {
247 return Q_div_tab_left[sbr->Q[0][m][l]][sbr->Q[1][m][l] >> 1];
248 } else {
249 return Q_div_tab_right[sbr->Q[0][m][l]][sbr->Q[1][m][l] >> 1];
250 }
251 }
252 } else {
253 /* no coupling */
254 if (sbr->Q[ch][m][l] < 0 || sbr->Q[ch][m][l] > 30)
255 {
256 return 0;
257 } else {
258 return Q_div_tab[sbr->Q[ch][m][l]];
259 }
260 }
261}
262
263/* table for Q_div2 values when no coupling */
264static const real_t Q_div2_tab[31] = {
265 FRAC_CONST(0.984615), FRAC_CONST(0.969697),
266 FRAC_CONST(0.941176), FRAC_CONST(0.888889),
267 FRAC_CONST(0.8), FRAC_CONST(0.666667),
268 FRAC_CONST(0.5), FRAC_CONST(0.333333),
269 FRAC_CONST(0.2), FRAC_CONST(0.111111),
270 FRAC_CONST(0.0588235), FRAC_CONST(0.030303),
271 FRAC_CONST(0.0153846), FRAC_CONST(0.00775194),
272 FRAC_CONST(0.00389105), FRAC_CONST(0.00194932),
273 FRAC_CONST(0.00097561), FRAC_CONST(0.000488043),
274 FRAC_CONST(0.000244081), FRAC_CONST(0.000122055),
275 FRAC_CONST(6.10314E-005), FRAC_CONST(3.05166E-005),
276 FRAC_CONST(1.52586E-005), FRAC_CONST(7.62934E-006),
277 FRAC_CONST(3.81468E-006), FRAC_CONST(1.90734E-006),
278 FRAC_CONST(9.53673E-007), FRAC_CONST(4.76837E-007),
279 FRAC_CONST(2.38419E-007), FRAC_CONST(1.19209E-007),
280 FRAC_CONST(5.96046E-008)
281};
282
283static const real_t Q_div2_tab_left[31][13] = {
284 { FRAC_CONST(0.0302959), FRAC_CONST(0.111015), FRAC_CONST(0.332468), FRAC_CONST(0.663212), FRAC_CONST(0.882759), FRAC_CONST(0.962406), FRAC_CONST(0.984615), FRAC_CONST(0.990329), FRAC_CONST(0.991768), FRAC_CONST(0.992128), FRAC_CONST(0.992218), FRAC_CONST(0.992241), FRAC_CONST(0.992246) },
285 { FRAC_CONST(0.0153809), FRAC_CONST(0.0587695), FRAC_CONST(0.199377), FRAC_CONST(0.496124), FRAC_CONST(0.790123), FRAC_CONST(0.927536), FRAC_CONST(0.969697), FRAC_CONST(0.980843), FRAC_CONST(0.98367), FRAC_CONST(0.984379), FRAC_CONST(0.984556), FRAC_CONST(0.984601), FRAC_CONST(0.984612) },
286 { FRAC_CONST(0.00775006), FRAC_CONST(0.0302744), FRAC_CONST(0.110727), FRAC_CONST(0.329897), FRAC_CONST(0.653061), FRAC_CONST(0.864865), FRAC_CONST(0.941176), FRAC_CONST(0.962406), FRAC_CONST(0.967864), FRAC_CONST(0.969238), FRAC_CONST(0.969582), FRAC_CONST(0.969668), FRAC_CONST(0.96969) },
287 { FRAC_CONST(0.0038901), FRAC_CONST(0.0153698), FRAC_CONST(0.0586081), FRAC_CONST(0.197531), FRAC_CONST(0.484848), FRAC_CONST(0.761905), FRAC_CONST(0.888889), FRAC_CONST(0.927536), FRAC_CONST(0.937729), FRAC_CONST(0.940312), FRAC_CONST(0.94096), FRAC_CONST(0.941122), FRAC_CONST(0.941163) },
288 { FRAC_CONST(0.00194884), FRAC_CONST(0.00774443), FRAC_CONST(0.0301887), FRAC_CONST(0.109589), FRAC_CONST(0.32), FRAC_CONST(0.615385), FRAC_CONST(0.8), FRAC_CONST(0.864865), FRAC_CONST(0.882759), FRAC_CONST(0.887348), FRAC_CONST(0.888503), FRAC_CONST(0.888792), FRAC_CONST(0.888865) },
289 { FRAC_CONST(0.000975372), FRAC_CONST(0.00388727), FRAC_CONST(0.0153257), FRAC_CONST(0.057971), FRAC_CONST(0.190476), FRAC_CONST(0.444444), FRAC_CONST(0.666667), FRAC_CONST(0.761905), FRAC_CONST(0.790123), FRAC_CONST(0.797508), FRAC_CONST(0.799375), FRAC_CONST(0.799844), FRAC_CONST(0.799961) },
290 { FRAC_CONST(0.000487924), FRAC_CONST(0.00194742), FRAC_CONST(0.00772201), FRAC_CONST(0.0298507), FRAC_CONST(0.105263), FRAC_CONST(0.285714), FRAC_CONST(0.5), FRAC_CONST(0.615385), FRAC_CONST(0.653061), FRAC_CONST(0.663212), FRAC_CONST(0.6658), FRAC_CONST(0.66645), FRAC_CONST(0.666612) },
291 { FRAC_CONST(0.000244021), FRAC_CONST(0.000974659), FRAC_CONST(0.00387597), FRAC_CONST(0.0151515), FRAC_CONST(0.0555556), FRAC_CONST(0.166667), FRAC_CONST(0.333333), FRAC_CONST(0.444444), FRAC_CONST(0.484848), FRAC_CONST(0.496124), FRAC_CONST(0.499025), FRAC_CONST(0.499756), FRAC_CONST(0.499939) },
292 { FRAC_CONST(0.000122026), FRAC_CONST(0.000487567), FRAC_CONST(0.00194175), FRAC_CONST(0.00763359), FRAC_CONST(0.0285714), FRAC_CONST(0.0909091), FRAC_CONST(0.2), FRAC_CONST(0.285714), FRAC_CONST(0.32), FRAC_CONST(0.329897), FRAC_CONST(0.332468), FRAC_CONST(0.333116), FRAC_CONST(0.333279) },
293 { FRAC_CONST(6.10165E-005), FRAC_CONST(0.000243843), FRAC_CONST(0.000971817), FRAC_CONST(0.00383142), FRAC_CONST(0.0144928), FRAC_CONST(0.047619), FRAC_CONST(0.111111), FRAC_CONST(0.166667), FRAC_CONST(0.190476), FRAC_CONST(0.197531), FRAC_CONST(0.199377), FRAC_CONST(0.199844), FRAC_CONST(0.199961) },
294 { FRAC_CONST(3.05092E-005), FRAC_CONST(0.000121936), FRAC_CONST(0.000486145), FRAC_CONST(0.00191939), FRAC_CONST(0.00729927), FRAC_CONST(0.0243902), FRAC_CONST(0.0588235), FRAC_CONST(0.0909091), FRAC_CONST(0.105263), FRAC_CONST(0.109589), FRAC_CONST(0.110727), FRAC_CONST(0.111015), FRAC_CONST(0.111087) },
295 { FRAC_CONST(1.52548E-005), FRAC_CONST(6.09719E-005), FRAC_CONST(0.000243132), FRAC_CONST(0.000960615), FRAC_CONST(0.003663), FRAC_CONST(0.0123457), FRAC_CONST(0.030303), FRAC_CONST(0.047619), FRAC_CONST(0.0555556), FRAC_CONST(0.057971), FRAC_CONST(0.0586081), FRAC_CONST(0.0587695), FRAC_CONST(0.05881) },
296 { FRAC_CONST(7.62747E-006), FRAC_CONST(3.04869E-005), FRAC_CONST(0.000121581), FRAC_CONST(0.000480538), FRAC_CONST(0.00183486), FRAC_CONST(0.00621118), FRAC_CONST(0.0153846), FRAC_CONST(0.0243902), FRAC_CONST(0.0285714), FRAC_CONST(0.0298507), FRAC_CONST(0.0301887), FRAC_CONST(0.0302744), FRAC_CONST(0.0302959) },
297 { FRAC_CONST(3.81375E-006), FRAC_CONST(1.52437E-005), FRAC_CONST(6.0794E-005), FRAC_CONST(0.000240327), FRAC_CONST(0.000918274), FRAC_CONST(0.00311526), FRAC_CONST(0.00775194), FRAC_CONST(0.0123457), FRAC_CONST(0.0144928), FRAC_CONST(0.0151515), FRAC_CONST(0.0153257), FRAC_CONST(0.0153698), FRAC_CONST(0.0153809) },
298 { FRAC_CONST(1.90688E-006), FRAC_CONST(7.62189E-006), FRAC_CONST(3.03979E-005), FRAC_CONST(0.000120178), FRAC_CONST(0.000459348), FRAC_CONST(0.00156006), FRAC_CONST(0.00389105), FRAC_CONST(0.00621118), FRAC_CONST(0.00729927), FRAC_CONST(0.00763359), FRAC_CONST(0.00772201), FRAC_CONST(0.00774443), FRAC_CONST(0.00775006) },
299 { FRAC_CONST(9.53441E-007), FRAC_CONST(3.81096E-006), FRAC_CONST(1.51992E-005), FRAC_CONST(6.00925E-005), FRAC_CONST(0.000229727), FRAC_CONST(0.00078064), FRAC_CONST(0.00194932), FRAC_CONST(0.00311526), FRAC_CONST(0.003663), FRAC_CONST(0.00383142), FRAC_CONST(0.00387597), FRAC_CONST(0.00388727), FRAC_CONST(0.0038901) },
300 { FRAC_CONST(4.76721E-007), FRAC_CONST(1.90548E-006), FRAC_CONST(7.59965E-006), FRAC_CONST(3.00472E-005), FRAC_CONST(0.000114877), FRAC_CONST(0.000390472), FRAC_CONST(0.00097561), FRAC_CONST(0.00156006), FRAC_CONST(0.00183486), FRAC_CONST(0.00191939), FRAC_CONST(0.00194175), FRAC_CONST(0.00194742), FRAC_CONST(0.00194884) },
301 { FRAC_CONST(2.3836E-007), FRAC_CONST(9.52743E-007), FRAC_CONST(3.79984E-006), FRAC_CONST(1.50238E-005), FRAC_CONST(5.74416E-005), FRAC_CONST(0.000195274), FRAC_CONST(0.000488043), FRAC_CONST(0.00078064), FRAC_CONST(0.000918274), FRAC_CONST(0.000960615), FRAC_CONST(0.000971817), FRAC_CONST(0.000974659), FRAC_CONST(0.000975372) },
302 { FRAC_CONST(1.1918E-007), FRAC_CONST(4.76372E-007), FRAC_CONST(1.89992E-006), FRAC_CONST(7.51196E-006), FRAC_CONST(2.87216E-005), FRAC_CONST(9.76467E-005), FRAC_CONST(0.000244081), FRAC_CONST(0.000390472), FRAC_CONST(0.000459348), FRAC_CONST(0.000480538), FRAC_CONST(0.000486145), FRAC_CONST(0.000487567), FRAC_CONST(0.000487924) },
303 { FRAC_CONST(5.95901E-008), FRAC_CONST(2.38186E-007), FRAC_CONST(9.49963E-007), FRAC_CONST(3.756E-006), FRAC_CONST(1.4361E-005), FRAC_CONST(4.88257E-005), FRAC_CONST(0.000122055), FRAC_CONST(0.000195274), FRAC_CONST(0.000229727), FRAC_CONST(0.000240327), FRAC_CONST(0.000243132), FRAC_CONST(0.000243843), FRAC_CONST(0.000244021) },
304 { FRAC_CONST(2.9795E-008), FRAC_CONST(1.19093E-007), FRAC_CONST(4.74982E-007), FRAC_CONST(1.878E-006), FRAC_CONST(7.18056E-006), FRAC_CONST(2.44135E-005), FRAC_CONST(6.10314E-005), FRAC_CONST(9.76467E-005), FRAC_CONST(0.000114877), FRAC_CONST(0.000120178), FRAC_CONST(0.000121581), FRAC_CONST(0.000121936), FRAC_CONST(0.000122026) },
305 { FRAC_CONST(1.48975E-008), FRAC_CONST(5.95465E-008), FRAC_CONST(2.37491E-007), FRAC_CONST(9.39002E-007), FRAC_CONST(3.59029E-006), FRAC_CONST(1.22069E-005), FRAC_CONST(3.05166E-005), FRAC_CONST(4.88257E-005), FRAC_CONST(5.74416E-005), FRAC_CONST(6.00925E-005), FRAC_CONST(6.0794E-005), FRAC_CONST(6.09719E-005), FRAC_CONST(6.10165E-005) },
306 { FRAC_CONST(7.44876E-009), FRAC_CONST(2.97732E-008), FRAC_CONST(1.18745E-007), FRAC_CONST(4.69501E-007), FRAC_CONST(1.79515E-006), FRAC_CONST(6.10348E-006), FRAC_CONST(1.52586E-005), FRAC_CONST(2.44135E-005), FRAC_CONST(2.87216E-005), FRAC_CONST(3.00472E-005), FRAC_CONST(3.03979E-005), FRAC_CONST(3.04869E-005), FRAC_CONST(3.05092E-005) },
307 { FRAC_CONST(3.72438E-009), FRAC_CONST(1.48866E-008), FRAC_CONST(5.93727E-008), FRAC_CONST(2.34751E-007), FRAC_CONST(8.97575E-007), FRAC_CONST(3.05175E-006), FRAC_CONST(7.62934E-006), FRAC_CONST(1.22069E-005), FRAC_CONST(1.4361E-005), FRAC_CONST(1.50238E-005), FRAC_CONST(1.51992E-005), FRAC_CONST(1.52437E-005), FRAC_CONST(1.52548E-005) },
308 { FRAC_CONST(1.86219E-009), FRAC_CONST(7.44331E-009), FRAC_CONST(2.96864E-008), FRAC_CONST(1.17375E-007), FRAC_CONST(4.48788E-007), FRAC_CONST(1.52588E-006), FRAC_CONST(3.81468E-006), FRAC_CONST(6.10348E-006), FRAC_CONST(7.18056E-006), FRAC_CONST(7.51196E-006), FRAC_CONST(7.59965E-006), FRAC_CONST(7.62189E-006), FRAC_CONST(7.62747E-006) },
309 { FRAC_CONST(9.31095E-010), FRAC_CONST(3.72166E-009), FRAC_CONST(1.48432E-008), FRAC_CONST(5.86876E-008), FRAC_CONST(2.24394E-007), FRAC_CONST(7.62939E-007), FRAC_CONST(1.90734E-006), FRAC_CONST(3.05175E-006), FRAC_CONST(3.59029E-006), FRAC_CONST(3.756E-006), FRAC_CONST(3.79984E-006), FRAC_CONST(3.81096E-006), FRAC_CONST(3.81375E-006) },
310 { FRAC_CONST(4.65548E-010), FRAC_CONST(1.86083E-009), FRAC_CONST(7.42159E-009), FRAC_CONST(2.93438E-008), FRAC_CONST(1.12197E-007), FRAC_CONST(3.8147E-007), FRAC_CONST(9.53673E-007), FRAC_CONST(1.52588E-006), FRAC_CONST(1.79515E-006), FRAC_CONST(1.878E-006), FRAC_CONST(1.89992E-006), FRAC_CONST(1.90548E-006), FRAC_CONST(1.90688E-006) },
311 { FRAC_CONST(2.32774E-010), FRAC_CONST(9.30414E-010), FRAC_CONST(3.71079E-009), FRAC_CONST(1.46719E-008), FRAC_CONST(5.60985E-008), FRAC_CONST(1.90735E-007), FRAC_CONST(4.76837E-007), FRAC_CONST(7.62939E-007), FRAC_CONST(8.97575E-007), FRAC_CONST(9.39002E-007), FRAC_CONST(9.49963E-007), FRAC_CONST(9.52743E-007), FRAC_CONST(9.53441E-007) },
312 { FRAC_CONST(1.16387E-010), FRAC_CONST(4.65207E-010), FRAC_CONST(1.8554E-009), FRAC_CONST(7.33596E-009), FRAC_CONST(2.80492E-008), FRAC_CONST(9.53674E-008), FRAC_CONST(2.38419E-007), FRAC_CONST(3.8147E-007), FRAC_CONST(4.48788E-007), FRAC_CONST(4.69501E-007), FRAC_CONST(4.74982E-007), FRAC_CONST(4.76372E-007), FRAC_CONST(4.76721E-007) },
313 { FRAC_CONST(5.81935E-011), FRAC_CONST(2.32603E-010), FRAC_CONST(9.27699E-010), FRAC_CONST(3.66798E-009), FRAC_CONST(1.40246E-008), FRAC_CONST(4.76837E-008), FRAC_CONST(1.19209E-007), FRAC_CONST(1.90735E-007), FRAC_CONST(2.24394E-007), FRAC_CONST(2.34751E-007), FRAC_CONST(2.37491E-007), FRAC_CONST(2.38186E-007), FRAC_CONST(2.3836E-007) },
314 { FRAC_CONST(2.90967E-011), FRAC_CONST(1.16302E-010), FRAC_CONST(4.63849E-010), FRAC_CONST(1.83399E-009), FRAC_CONST(7.01231E-009), FRAC_CONST(2.38419E-008), FRAC_CONST(5.96046E-008), FRAC_CONST(9.53674E-008), FRAC_CONST(1.12197E-007), FRAC_CONST(1.17375E-007), FRAC_CONST(1.18745E-007), FRAC_CONST(1.19093E-007), FRAC_CONST(1.1918E-007) }
315};
316
317static const real_t Q_div2_tab_right[31][13] = {
318 { FRAC_CONST(0.992246), FRAC_CONST(0.992241), FRAC_CONST(0.992218), FRAC_CONST(0.992128), FRAC_CONST(0.991768), FRAC_CONST(0.990329), FRAC_CONST(0.984615), FRAC_CONST(0.962406), FRAC_CONST(0.882759), FRAC_CONST(0.663212), FRAC_CONST(0.332468), FRAC_CONST(0.111015), FRAC_CONST(0.0302959) },
319 { FRAC_CONST(0.984612), FRAC_CONST(0.984601), FRAC_CONST(0.984556), FRAC_CONST(0.984379), FRAC_CONST(0.98367), FRAC_CONST(0.980843), FRAC_CONST(0.969697), FRAC_CONST(0.927536), FRAC_CONST(0.790123), FRAC_CONST(0.496124), FRAC_CONST(0.199377), FRAC_CONST(0.0587695), FRAC_CONST(0.0153809) },
320 { FRAC_CONST(0.96969), FRAC_CONST(0.969668), FRAC_CONST(0.969582), FRAC_CONST(0.969238), FRAC_CONST(0.967864), FRAC_CONST(0.962406), FRAC_CONST(0.941176), FRAC_CONST(0.864865), FRAC_CONST(0.653061), FRAC_CONST(0.329897), FRAC_CONST(0.110727), FRAC_CONST(0.0302744), FRAC_CONST(0.00775006) },
321 { FRAC_CONST(0.941163), FRAC_CONST(0.941122), FRAC_CONST(0.94096), FRAC_CONST(0.940312), FRAC_CONST(0.937729), FRAC_CONST(0.927536), FRAC_CONST(0.888889), FRAC_CONST(0.761905), FRAC_CONST(0.484848), FRAC_CONST(0.197531), FRAC_CONST(0.0586081), FRAC_CONST(0.0153698), FRAC_CONST(0.0038901) },
322 { FRAC_CONST(0.888865), FRAC_CONST(0.888792), FRAC_CONST(0.888503), FRAC_CONST(0.887348), FRAC_CONST(0.882759), FRAC_CONST(0.864865), FRAC_CONST(0.8), FRAC_CONST(0.615385), FRAC_CONST(0.32), FRAC_CONST(0.109589), FRAC_CONST(0.0301887), FRAC_CONST(0.00774443), FRAC_CONST(0.00194884) },
323 { FRAC_CONST(0.799961), FRAC_CONST(0.799844), FRAC_CONST(0.799375), FRAC_CONST(0.797508), FRAC_CONST(0.790123), FRAC_CONST(0.761905), FRAC_CONST(0.666667), FRAC_CONST(0.444444), FRAC_CONST(0.190476), FRAC_CONST(0.057971), FRAC_CONST(0.0153257), FRAC_CONST(0.00388727), FRAC_CONST(0.000975372) },
324 { FRAC_CONST(0.666612), FRAC_CONST(0.66645), FRAC_CONST(0.6658), FRAC_CONST(0.663212), FRAC_CONST(0.653061), FRAC_CONST(0.615385), FRAC_CONST(0.5), FRAC_CONST(0.285714), FRAC_CONST(0.105263), FRAC_CONST(0.0298507), FRAC_CONST(0.00772201), FRAC_CONST(0.00194742), FRAC_CONST(0.000487924) },
325 { FRAC_CONST(0.499939), FRAC_CONST(0.499756), FRAC_CONST(0.499025), FRAC_CONST(0.496124), FRAC_CONST(0.484848), FRAC_CONST(0.444444), FRAC_CONST(0.333333), FRAC_CONST(0.166667), FRAC_CONST(0.0555556), FRAC_CONST(0.0151515), FRAC_CONST(0.00387597), FRAC_CONST(0.000974659), FRAC_CONST(0.000244021) },
326 { FRAC_CONST(0.333279), FRAC_CONST(0.333116), FRAC_CONST(0.332468), FRAC_CONST(0.329897), FRAC_CONST(0.32), FRAC_CONST(0.285714), FRAC_CONST(0.2), FRAC_CONST(0.0909091), FRAC_CONST(0.0285714), FRAC_CONST(0.00763359), FRAC_CONST(0.00194175), FRAC_CONST(0.000487567), FRAC_CONST(0.000122026) },
327 { FRAC_CONST(0.199961), FRAC_CONST(0.199844), FRAC_CONST(0.199377), FRAC_CONST(0.197531), FRAC_CONST(0.190476), FRAC_CONST(0.166667), FRAC_CONST(0.111111), FRAC_CONST(0.047619), FRAC_CONST(0.0144928), FRAC_CONST(0.00383142), FRAC_CONST(0.000971817), FRAC_CONST(0.000243843), FRAC_CONST(6.10165E-005) },
328 { FRAC_CONST(0.111087), FRAC_CONST(0.111015), FRAC_CONST(0.110727), FRAC_CONST(0.109589), FRAC_CONST(0.105263), FRAC_CONST(0.0909091), FRAC_CONST(0.0588235), FRAC_CONST(0.0243902), FRAC_CONST(0.00729927), FRAC_CONST(0.00191939), FRAC_CONST(0.000486145), FRAC_CONST(0.000121936), FRAC_CONST(3.05092E-005) },
329 { FRAC_CONST(0.05881), FRAC_CONST(0.0587695), FRAC_CONST(0.0586081), FRAC_CONST(0.057971), FRAC_CONST(0.0555556), FRAC_CONST(0.047619), FRAC_CONST(0.030303), FRAC_CONST(0.0123457), FRAC_CONST(0.003663), FRAC_CONST(0.000960615), FRAC_CONST(0.000243132), FRAC_CONST(6.09719E-005), FRAC_CONST(1.52548E-005) },
330 { FRAC_CONST(0.0302959), FRAC_CONST(0.0302744), FRAC_CONST(0.0301887), FRAC_CONST(0.0298507), FRAC_CONST(0.0285714), FRAC_CONST(0.0243902), FRAC_CONST(0.0153846), FRAC_CONST(0.00621118), FRAC_CONST(0.00183486), FRAC_CONST(0.000480538), FRAC_CONST(0.000121581), FRAC_CONST(3.04869E-005), FRAC_CONST(7.62747E-006) },
331 { FRAC_CONST(0.0153809), FRAC_CONST(0.0153698), FRAC_CONST(0.0153257), FRAC_CONST(0.0151515), FRAC_CONST(0.0144928), FRAC_CONST(0.0123457), FRAC_CONST(0.00775194), FRAC_CONST(0.00311526), FRAC_CONST(0.000918274), FRAC_CONST(0.000240327), FRAC_CONST(6.0794E-005), FRAC_CONST(1.52437E-005), FRAC_CONST(3.81375E-006) },
332 { FRAC_CONST(0.00775006), FRAC_CONST(0.00774443), FRAC_CONST(0.00772201), FRAC_CONST(0.00763359), FRAC_CONST(0.00729927), FRAC_CONST(0.00621118), FRAC_CONST(0.00389105), FRAC_CONST(0.00156006), FRAC_CONST(0.000459348), FRAC_CONST(0.000120178), FRAC_CONST(3.03979E-005), FRAC_CONST(7.62189E-006), FRAC_CONST(1.90688E-006) },
333 { FRAC_CONST(0.0038901), FRAC_CONST(0.00388727), FRAC_CONST(0.00387597), FRAC_CONST(0.00383142), FRAC_CONST(0.003663), FRAC_CONST(0.00311526), FRAC_CONST(0.00194932), FRAC_CONST(0.00078064), FRAC_CONST(0.000229727), FRAC_CONST(6.00925E-005), FRAC_CONST(1.51992E-005), FRAC_CONST(3.81096E-006), FRAC_CONST(9.53441E-007) },
334 { FRAC_CONST(0.00194884), FRAC_CONST(0.00194742), FRAC_CONST(0.00194175), FRAC_CONST(0.00191939), FRAC_CONST(0.00183486), FRAC_CONST(0.00156006), FRAC_CONST(0.00097561), FRAC_CONST(0.000390472), FRAC_CONST(0.000114877), FRAC_CONST(3.00472E-005), FRAC_CONST(7.59965E-006), FRAC_CONST(1.90548E-006), FRAC_CONST(4.76721E-007) },
335 { FRAC_CONST(0.000975372), FRAC_CONST(0.000974659), FRAC_CONST(0.000971817), FRAC_CONST(0.000960615), FRAC_CONST(0.000918274), FRAC_CONST(0.00078064), FRAC_CONST(0.000488043), FRAC_CONST(0.000195274), FRAC_CONST(5.74416E-005), FRAC_CONST(1.50238E-005), FRAC_CONST(3.79984E-006), FRAC_CONST(9.52743E-007), FRAC_CONST(2.3836E-007) },
336 { FRAC_CONST(0.000487924), FRAC_CONST(0.000487567), FRAC_CONST(0.000486145), FRAC_CONST(0.000480538), FRAC_CONST(0.000459348), FRAC_CONST(0.000390472), FRAC_CONST(0.000244081), FRAC_CONST(9.76467E-005), FRAC_CONST(2.87216E-005), FRAC_CONST(7.51196E-006), FRAC_CONST(1.89992E-006), FRAC_CONST(4.76372E-007), FRAC_CONST(1.1918E-007) },
337 { FRAC_CONST(0.000244021), FRAC_CONST(0.000243843), FRAC_CONST(0.000243132), FRAC_CONST(0.000240327), FRAC_CONST(0.000229727), FRAC_CONST(0.000195274), FRAC_CONST(0.000122055), FRAC_CONST(4.88257E-005), FRAC_CONST(1.4361E-005), FRAC_CONST(3.756E-006), FRAC_CONST(9.49963E-007), FRAC_CONST(2.38186E-007), FRAC_CONST(5.95901E-008) },
338 { FRAC_CONST(0.000122026), FRAC_CONST(0.000121936), FRAC_CONST(0.000121581), FRAC_CONST(0.000120178), FRAC_CONST(0.000114877), FRAC_CONST(9.76467E-005), FRAC_CONST(6.10314E-005), FRAC_CONST(2.44135E-005), FRAC_CONST(7.18056E-006), FRAC_CONST(1.878E-006), FRAC_CONST(4.74982E-007), FRAC_CONST(1.19093E-007), FRAC_CONST(2.9795E-008) },
339 { FRAC_CONST(6.10165E-005), FRAC_CONST(6.09719E-005), FRAC_CONST(6.0794E-005), FRAC_CONST(6.00925E-005), FRAC_CONST(5.74416E-005), FRAC_CONST(4.88257E-005), FRAC_CONST(3.05166E-005), FRAC_CONST(1.22069E-005), FRAC_CONST(3.59029E-006), FRAC_CONST(9.39002E-007), FRAC_CONST(2.37491E-007), FRAC_CONST(5.95465E-008), FRAC_CONST(1.48975E-008) },
340 { FRAC_CONST(3.05092E-005), FRAC_CONST(3.04869E-005), FRAC_CONST(3.03979E-005), FRAC_CONST(3.00472E-005), FRAC_CONST(2.87216E-005), FRAC_CONST(2.44135E-005), FRAC_CONST(1.52586E-005), FRAC_CONST(6.10348E-006), FRAC_CONST(1.79515E-006), FRAC_CONST(4.69501E-007), FRAC_CONST(1.18745E-007), FRAC_CONST(2.97732E-008), FRAC_CONST(7.44876E-009) },
341 { FRAC_CONST(1.52548E-005), FRAC_CONST(1.52437E-005), FRAC_CONST(1.51992E-005), FRAC_CONST(1.50238E-005), FRAC_CONST(1.4361E-005), FRAC_CONST(1.22069E-005), FRAC_CONST(7.62934E-006), FRAC_CONST(3.05175E-006), FRAC_CONST(8.97575E-007), FRAC_CONST(2.34751E-007), FRAC_CONST(5.93727E-008), FRAC_CONST(1.48866E-008), FRAC_CONST(3.72438E-009) },
342 { FRAC_CONST(7.62747E-006), FRAC_CONST(7.62189E-006), FRAC_CONST(7.59965E-006), FRAC_CONST(7.51196E-006), FRAC_CONST(7.18056E-006), FRAC_CONST(6.10348E-006), FRAC_CONST(3.81468E-006), FRAC_CONST(1.52588E-006), FRAC_CONST(4.48788E-007), FRAC_CONST(1.17375E-007), FRAC_CONST(2.96864E-008), FRAC_CONST(7.44331E-009), FRAC_CONST(1.86219E-009) },
343 { FRAC_CONST(3.81375E-006), FRAC_CONST(3.81096E-006), FRAC_CONST(3.79984E-006), FRAC_CONST(3.756E-006), FRAC_CONST(3.59029E-006), FRAC_CONST(3.05175E-006), FRAC_CONST(1.90734E-006), FRAC_CONST(7.62939E-007), FRAC_CONST(2.24394E-007), FRAC_CONST(5.86876E-008), FRAC_CONST(1.48432E-008), FRAC_CONST(3.72166E-009), FRAC_CONST(9.31095E-010) },
344 { FRAC_CONST(1.90688E-006), FRAC_CONST(1.90548E-006), FRAC_CONST(1.89992E-006), FRAC_CONST(1.878E-006), FRAC_CONST(1.79515E-006), FRAC_CONST(1.52588E-006), FRAC_CONST(9.53673E-007), FRAC_CONST(3.8147E-007), FRAC_CONST(1.12197E-007), FRAC_CONST(2.93438E-008), FRAC_CONST(7.42159E-009), FRAC_CONST(1.86083E-009), FRAC_CONST(4.65548E-010) },
345 { FRAC_CONST(9.53441E-007), FRAC_CONST(9.52743E-007), FRAC_CONST(9.49963E-007), FRAC_CONST(9.39002E-007), FRAC_CONST(8.97575E-007), FRAC_CONST(7.62939E-007), FRAC_CONST(4.76837E-007), FRAC_CONST(1.90735E-007), FRAC_CONST(5.60985E-008), FRAC_CONST(1.46719E-008), FRAC_CONST(3.71079E-009), FRAC_CONST(9.30414E-010), FRAC_CONST(2.32774E-010) },
346 { FRAC_CONST(4.76721E-007), FRAC_CONST(4.76372E-007), FRAC_CONST(4.74982E-007), FRAC_CONST(4.69501E-007), FRAC_CONST(4.48788E-007), FRAC_CONST(3.8147E-007), FRAC_CONST(2.38419E-007), FRAC_CONST(9.53674E-008), FRAC_CONST(2.80492E-008), FRAC_CONST(7.33596E-009), FRAC_CONST(1.8554E-009), FRAC_CONST(4.65207E-010), FRAC_CONST(1.16387E-010) },
347 { FRAC_CONST(2.3836E-007), FRAC_CONST(2.38186E-007), FRAC_CONST(2.37491E-007), FRAC_CONST(2.34751E-007), FRAC_CONST(2.24394E-007), FRAC_CONST(1.90735E-007), FRAC_CONST(1.19209E-007), FRAC_CONST(4.76837E-008), FRAC_CONST(1.40246E-008), FRAC_CONST(3.66798E-009), FRAC_CONST(9.27699E-010), FRAC_CONST(2.32603E-010), FRAC_CONST(5.81935E-011) },
348 { FRAC_CONST(1.1918E-007), FRAC_CONST(1.19093E-007), FRAC_CONST(1.18745E-007), FRAC_CONST(1.17375E-007), FRAC_CONST(1.12197E-007), FRAC_CONST(9.53674E-008), FRAC_CONST(5.96046E-008), FRAC_CONST(2.38419E-008), FRAC_CONST(7.01231E-009), FRAC_CONST(1.83399E-009), FRAC_CONST(4.63849E-010), FRAC_CONST(1.16302E-010), FRAC_CONST(2.90967E-011) }
349};
350
351/* calculates Q/(1+Q) */
352/* [0..1] */
353real_t calc_Q_div2(sbr_info *sbr, uint8_t ch, uint8_t m, uint8_t l)
354{
355 if (sbr->bs_coupling)
356 {
357 if ((sbr->Q[0][m][l] < 0 || sbr->Q[0][m][l] > 30) ||
358 (sbr->Q[1][m][l] < 0 || sbr->Q[1][m][l] > 24 /* 2*panOffset(1) */))
359 {
360 return 0;
361 } else {
362 /* the pan parameter is always even */
363 if (ch == 0)
364 {
365 return Q_div2_tab_left[sbr->Q[0][m][l]][sbr->Q[1][m][l] >> 1];
366 } else {
367 return Q_div2_tab_right[sbr->Q[0][m][l]][sbr->Q[1][m][l] >> 1];
368 }
369 }
370 } else {
371 /* no coupling */
372 if (sbr->Q[ch][m][l] < 0 || sbr->Q[ch][m][l] > 30)
373 {
374 return 0;
375 } else {
376 return Q_div2_tab[sbr->Q[ch][m][l]];
377 }
378 }
379}
380
381static const real_t E_deq_tab[64] = {
382 64.0f, 128.0f, 256.0f, 512.0f, 1024.0f, 2048.0f, 4096.0f, 8192.0f,
383 16384.0f, 32768.0f, 65536.0f, 131072.0f, 262144.0f, 524288.0f, 1.04858E+006f, 2.09715E+006f,
384 4.1943E+006f, 8.38861E+006f, 1.67772E+007f, 3.35544E+007f, 6.71089E+007f, 1.34218E+008f, 2.68435E+008f, 5.36871E+008f,
385 1.07374E+009f, 2.14748E+009f, 4.29497E+009f, 8.58993E+009f, 1.71799E+010f, 3.43597E+010f, 6.87195E+010f, 1.37439E+011f,
386 2.74878E+011f, 5.49756E+011f, 1.09951E+012f, 2.19902E+012f, 4.39805E+012f, 8.79609E+012f, 1.75922E+013f, 3.51844E+013f,
387 7.03687E+013f, 1.40737E+014f, 2.81475E+014f, 5.6295E+014f, 1.1259E+015f, 2.2518E+015f, 4.5036E+015f, 9.0072E+015f,
388 1.80144E+016f, 3.60288E+016f, 7.20576E+016f, 1.44115E+017f, 2.8823E+017f, 5.76461E+017f, 1.15292E+018f, 2.30584E+018f,
389 4.61169E+018f, 9.22337E+018f, 1.84467E+019f, 3.68935E+019f, 7.3787E+019f, 1.47574E+020f, 2.95148E+020f, 5.90296E+020f
390};
391
392void envelope_noise_dequantisation(sbr_info *sbr, uint8_t ch)
393{
394 if (sbr->bs_coupling == 0)
395 {
396 int16_t exp;
397 uint8_t l, k;
398 uint8_t amp = (sbr->amp_res[ch]) ? 0 : 1;
399
400 for (l = 0; l < sbr->L_E[ch]; l++)
401 {
402 for (k = 0; k < sbr->n[sbr->f[ch][l]]; k++)
403 {
404 /* +6 for the *64 and -10 for the /32 in the synthesis QMF (fixed)
405 * since this is a energy value: (x/32)^2 = (x^2)/1024
406 */
407 /* exp = (sbr->E[ch][k][l] >> amp) + 6; */
408 exp = (sbr->E[ch][k][l] >> amp);
409
410 if ((exp < 0) || (exp >= 64))
411 {
412 sbr->E_orig[ch][k][l] = 0;
413 } else {
414 sbr->E_orig[ch][k][l] = E_deq_tab[exp];
415
416 /* save half the table size at the cost of 1 multiply */
417 if (amp && (sbr->E[ch][k][l] & 1))
418 {
419 sbr->E_orig[ch][k][l] = MUL_C(sbr->E_orig[ch][k][l], COEF_CONST(1.414213562));
420 }
421 }
422 }
423 }
424
425 for (l = 0; l < sbr->L_Q[ch]; l++)
426 {
427 for (k = 0; k < sbr->N_Q; k++)
428 {
429 sbr->Q_div[ch][k][l] = calc_Q_div(sbr, ch, k, l);
430 sbr->Q_div2[ch][k][l] = calc_Q_div2(sbr, ch, k, l);
431 }
432 }
433 }
434}
435
436static const real_t E_pan_tab[25] = {
437 FRAC_CONST(0.000244081), FRAC_CONST(0.000488043),
438 FRAC_CONST(0.00097561), FRAC_CONST(0.00194932),
439 FRAC_CONST(0.00389105), FRAC_CONST(0.00775194),
440 FRAC_CONST(0.0153846), FRAC_CONST(0.030303),
441 FRAC_CONST(0.0588235), FRAC_CONST(0.111111),
442 FRAC_CONST(0.2), FRAC_CONST(0.333333),
443 FRAC_CONST(0.5), FRAC_CONST(0.666667),
444 FRAC_CONST(0.8), FRAC_CONST(0.888889),
445 FRAC_CONST(0.941176), FRAC_CONST(0.969697),
446 FRAC_CONST(0.984615), FRAC_CONST(0.992248),
447 FRAC_CONST(0.996109), FRAC_CONST(0.998051),
448 FRAC_CONST(0.999024), FRAC_CONST(0.999512),
449 FRAC_CONST(0.999756)
450};
451
452void unmap_envelope_noise(sbr_info *sbr)
453{
454 real_t tmp;
455 int16_t exp0, exp1;
456 uint8_t l, k;
457 uint8_t amp0 = (sbr->amp_res[0]) ? 0 : 1;
458 uint8_t amp1 = (sbr->amp_res[1]) ? 0 : 1;
459
460 for (l = 0; l < sbr->L_E[0]; l++)
461 {
462 for (k = 0; k < sbr->n[sbr->f[0][l]]; k++)
463 {
464 /* +6: * 64 ; +1: * 2 ; */
465 exp0 = (sbr->E[0][k][l] >> amp0) + 1;
466
467 /* UN_MAP removed: (x / 4096) same as (x >> 12) */
468 /* E[1] is always even so no need for compensating the divide by 2 with
469 * an extra multiplication
470 */
471 /* exp1 = (sbr->E[1][k][l] >> amp1) - 12; */
472 exp1 = (sbr->E[1][k][l] >> amp1);
473
474 if ((exp0 < 0) || (exp0 >= 64) ||
475 (exp1 < 0) || (exp1 > 24))
476 {
477 sbr->E_orig[1][k][l] = 0;
478 sbr->E_orig[0][k][l] = 0;
479 } else {
480 tmp = E_deq_tab[exp0];
481 if (amp0 && (sbr->E[0][k][l] & 1))
482 {
483 tmp = MUL_C(tmp, COEF_CONST(1.414213562));
484 }
485
486 /* panning */
487 sbr->E_orig[0][k][l] = MUL_F(tmp, E_pan_tab[exp1]);
488 sbr->E_orig[1][k][l] = MUL_F(tmp, E_pan_tab[24 - exp1]);
489 }
490 }
491 }
492
493 for (l = 0; l < sbr->L_Q[0]; l++)
494 {
495 for (k = 0; k < sbr->N_Q; k++)
496 {
497 sbr->Q_div[0][k][l] = calc_Q_div(sbr, 0, k, l);
498 sbr->Q_div[1][k][l] = calc_Q_div(sbr, 1, k, l);
499 sbr->Q_div2[0][k][l] = calc_Q_div2(sbr, 0, k, l);
500 sbr->Q_div2[1][k][l] = calc_Q_div2(sbr, 1, k, l);
501 }
502 }
503}
504
505#endif
506
507#endif
diff --git a/apps/codecs/libfaad/sbr_e_nf.h b/apps/codecs/libfaad/sbr_e_nf.h
new file mode 100644
index 0000000000..6c8b30f06d
--- /dev/null
+++ b/apps/codecs/libfaad/sbr_e_nf.h
@@ -0,0 +1,47 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __SBR_E_NF_H__
29#define __SBR_E_NF_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35
36void extract_envelope_data(sbr_info *sbr, uint8_t ch);
37void extract_noise_floor_data(sbr_info *sbr, uint8_t ch);
38#ifndef FIXED_POINT
39void envelope_noise_dequantisation(sbr_info *sbr, uint8_t ch);
40void unmap_envelope_noise(sbr_info *sbr);
41#endif
42
43#ifdef __cplusplus
44}
45#endif
46#endif
47
diff --git a/apps/codecs/libfaad/sbr_fbt.c b/apps/codecs/libfaad/sbr_fbt.c
new file mode 100644
index 0000000000..b90ae7d769
--- /dev/null
+++ b/apps/codecs/libfaad/sbr_fbt.c
@@ -0,0 +1,761 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28/* Calculate frequency band tables */
29
30#include "common.h"
31#include "structs.h"
32
33#ifdef SBR_DEC
34
35#include <stdlib.h>
36
37#include "sbr_syntax.h"
38#include "sbr_fbt.h"
39
40/* static function declarations */
41static int32_t find_bands(uint8_t warp, uint8_t bands, uint8_t a0, uint8_t a1);
42
43
44/* calculate the start QMF channel for the master frequency band table */
45/* parameter is also called k0 */
46uint8_t qmf_start_channel(uint8_t bs_start_freq, uint8_t bs_samplerate_mode,
47 uint32_t sample_rate)
48{
49 static const uint8_t startMinTable[12] = { 7, 7, 10, 11, 12, 16, 16,
50 17, 24, 32, 35, 48 };
51 static const uint8_t offsetIndexTable[12] = { 5, 5, 4, 4, 4, 3, 2, 1, 0,
52 6, 6, 6 };
53 static const int8_t offset[7][16] = {
54 { -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7 },
55 { -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13 },
56 { -5, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 16 },
57 { -6, -4, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 16 },
58 { -4, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 16, 20 },
59 { -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 16, 20, 24 },
60 { 0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 16, 20, 24, 28, 33 }
61 };
62 uint8_t startMin = startMinTable[get_sr_index(sample_rate)];
63 uint8_t offsetIndex = offsetIndexTable[get_sr_index(sample_rate)];
64
65#if 0 /* replaced with table (startMinTable) */
66 if (sample_rate >= 64000)
67 {
68 startMin = (uint8_t)((5000.*128.)/(float)sample_rate + 0.5);
69 } else if (sample_rate < 32000) {
70 startMin = (uint8_t)((3000.*128.)/(float)sample_rate + 0.5);
71 } else {
72 startMin = (uint8_t)((4000.*128.)/(float)sample_rate + 0.5);
73 }
74#endif
75
76 if (bs_samplerate_mode)
77 {
78 return startMin + offset[offsetIndex][bs_start_freq];
79
80#if 0 /* replaced by offsetIndexTable */
81 switch (sample_rate)
82 {
83 case 16000:
84 return startMin + offset[0][bs_start_freq];
85 case 22050:
86 return startMin + offset[1][bs_start_freq];
87 case 24000:
88 return startMin + offset[2][bs_start_freq];
89 case 32000:
90 return startMin + offset[3][bs_start_freq];
91 default:
92 if (sample_rate > 64000)
93 {
94 return startMin + offset[5][bs_start_freq];
95 } else { /* 44100 <= sample_rate <= 64000 */
96 return startMin + offset[4][bs_start_freq];
97 }
98 }
99#endif
100 } else {
101 return startMin + offset[6][bs_start_freq];
102 }
103}
104
105static int longcmp(const void *a, const void *b)
106{
107 return ((int)(*(int32_t*)a - *(int32_t*)b));
108}
109
110/* calculate the stop QMF channel for the master frequency band table */
111/* parameter is also called k2 */
112uint8_t qmf_stop_channel(uint8_t bs_stop_freq, uint32_t sample_rate,
113 uint8_t k0)
114{
115 if (bs_stop_freq == 15)
116 {
117 return min(64, k0 * 3);
118 } else if (bs_stop_freq == 14) {
119 return min(64, k0 * 2);
120 } else {
121 static const uint8_t stopMinTable[12] = { 13, 15, 20, 21, 23,
122 32, 32, 35, 48, 64, 70, 96 };
123 static const int8_t offset[12][14] = {
124 { 0, 2, 4, 6, 8, 11, 14, 18, 22, 26, 31, 37, 44, 51 },
125 { 0, 2, 4, 6, 8, 11, 14, 18, 22, 26, 31, 36, 42, 49 },
126 { 0, 2, 4, 6, 8, 11, 14, 17, 21, 25, 29, 34, 39, 44 },
127 { 0, 2, 4, 6, 8, 11, 14, 17, 20, 24, 28, 33, 38, 43 },
128 { 0, 2, 4, 6, 8, 11, 14, 17, 20, 24, 28, 32, 36, 41 },
129 { 0, 2, 4, 6, 8, 10, 12, 14, 17, 20, 23, 26, 29, 32 },
130 { 0, 2, 4, 6, 8, 10, 12, 14, 17, 20, 23, 26, 29, 32 },
131 { 0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 20, 23, 26, 29 },
132 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16 },
133 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
134 { 0, -1, -2, -3, -4, -5, -6, -6, -6, -6, -6, -6, -6, -6 },
135 { 0, -3, -6, -9, -12, -15, -18, -20, -22, -24, -26, -28, -30, -32 }
136 };
137#if 0
138 uint8_t i;
139 int32_t stopDk[13], stopDk_t[14], k2;
140#endif
141 uint8_t stopMin = stopMinTable[get_sr_index(sample_rate)];
142
143#if 0 /* replaced by table lookup */
144 if (sample_rate >= 64000)
145 {
146 stopMin = (uint8_t)((10000.*128.)/(float)sample_rate + 0.5);
147 } else if (sample_rate < 32000) {
148 stopMin = (uint8_t)((6000.*128.)/(float)sample_rate + 0.5);
149 } else {
150 stopMin = (uint8_t)((8000.*128.)/(float)sample_rate + 0.5);
151 }
152#endif
153
154#if 0 /* replaced by table lookup */
155 /* diverging power series */
156 for (i = 0; i <= 13; i++)
157 {
158 stopDk_t[i] = (int32_t)(stopMin*pow(64.0/stopMin, i/13.0) + 0.5);
159 }
160 for (i = 0; i < 13; i++)
161 {
162 stopDk[i] = stopDk_t[i+1] - stopDk_t[i];
163 }
164
165 /* needed? */
166 qsort(stopDk, 13, sizeof(stopDk[0]), longcmp);
167
168 k2 = stopMin;
169 for (i = 0; i < bs_stop_freq; i++)
170 {
171 k2 += stopDk[i];
172 }
173 return min(64, k2);
174#endif
175 /* bs_stop_freq <= 13 */
176 return min(64, stopMin + offset[get_sr_index(sample_rate)][min(bs_stop_freq, 13)]);
177 }
178
179 return 0;
180}
181
182/* calculate the master frequency table from k0, k2, bs_freq_scale
183 and bs_alter_scale
184
185 version for bs_freq_scale = 0
186*/
187uint8_t master_frequency_table_fs0(sbr_info *sbr, uint8_t k0, uint8_t k2,
188 uint8_t bs_alter_scale)
189{
190 int8_t incr;
191 uint8_t k;
192 uint8_t dk;
193 uint32_t nrBands, k2Achieved;
194 int32_t k2Diff, vDk[64] = {0};
195
196 /* mft only defined for k2 > k0 */
197 if (k2 <= k0)
198 {
199 sbr->N_master = 0;
200 return 1;
201 }
202
203 dk = bs_alter_scale ? 2 : 1;
204
205#if 0 /* replaced by float-less design */
206 nrBands = 2 * (int32_t)((float)(k2-k0)/(dk*2) + (-1+dk)/2.0f);
207#else
208 if (bs_alter_scale)
209 {
210 nrBands = (((k2-k0+2)>>2)<<1);
211 } else {
212 nrBands = (((k2-k0)>>1)<<1);
213 }
214#endif
215 nrBands = min(nrBands, 63);
216 if (nrBands <= 0)
217 return 1;
218
219 k2Achieved = k0 + nrBands * dk;
220 k2Diff = k2 - k2Achieved;
221 for (k = 0; k < nrBands; k++)
222 vDk[k] = dk;
223
224 if (k2Diff)
225 {
226 incr = (k2Diff > 0) ? -1 : 1;
227 k = (uint8_t) ((k2Diff > 0) ? (nrBands-1) : 0);
228
229 while (k2Diff != 0)
230 {
231 vDk[k] -= incr;
232 k += incr;
233 k2Diff += incr;
234 }
235 }
236
237 sbr->f_master[0] = k0;
238 for (k = 1; k <= nrBands; k++)
239 sbr->f_master[k] = (uint8_t)(sbr->f_master[k-1] + vDk[k-1]);
240
241 sbr->N_master = (uint8_t)nrBands;
242 sbr->N_master = (min(sbr->N_master, 64));
243
244#if 0
245 printf("f_master[%d]: ", nrBands);
246 for (k = 0; k <= nrBands; k++)
247 {
248 printf("%d ", sbr->f_master[k]);
249 }
250 printf("\n");
251#endif
252
253 return 0;
254}
255
256/*
257 This function finds the number of bands using this formula:
258 bands * log(a1/a0)/log(2.0) + 0.5
259*/
260static int32_t find_bands(uint8_t warp, uint8_t bands, uint8_t a0, uint8_t a1)
261{
262#ifdef FIXED_POINT
263 /* table with log2() values */
264 static const real_t log2Table[65] = {
265 COEF_CONST(0.0), COEF_CONST(0.0), COEF_CONST(1.0000000000), COEF_CONST(1.5849625007),
266 COEF_CONST(2.0000000000), COEF_CONST(2.3219280949), COEF_CONST(2.5849625007), COEF_CONST(2.8073549221),
267 COEF_CONST(3.0000000000), COEF_CONST(3.1699250014), COEF_CONST(3.3219280949), COEF_CONST(3.4594316186),
268 COEF_CONST(3.5849625007), COEF_CONST(3.7004397181), COEF_CONST(3.8073549221), COEF_CONST(3.9068905956),
269 COEF_CONST(4.0000000000), COEF_CONST(4.0874628413), COEF_CONST(4.1699250014), COEF_CONST(4.2479275134),
270 COEF_CONST(4.3219280949), COEF_CONST(4.3923174228), COEF_CONST(4.4594316186), COEF_CONST(4.5235619561),
271 COEF_CONST(4.5849625007), COEF_CONST(4.6438561898), COEF_CONST(4.7004397181), COEF_CONST(4.7548875022),
272 COEF_CONST(4.8073549221), COEF_CONST(4.8579809951), COEF_CONST(4.9068905956), COEF_CONST(4.9541963104),
273 COEF_CONST(5.0000000000), COEF_CONST(5.0443941194), COEF_CONST(5.0874628413), COEF_CONST(5.1292830169),
274 COEF_CONST(5.1699250014), COEF_CONST(5.2094533656), COEF_CONST(5.2479275134), COEF_CONST(5.2854022189),
275 COEF_CONST(5.3219280949), COEF_CONST(5.3575520046), COEF_CONST(5.3923174228), COEF_CONST(5.4262647547),
276 COEF_CONST(5.4594316186), COEF_CONST(5.4918530963), COEF_CONST(5.5235619561), COEF_CONST(5.5545888517),
277 COEF_CONST(5.5849625007), COEF_CONST(5.6147098441), COEF_CONST(5.6438561898), COEF_CONST(5.6724253420),
278 COEF_CONST(5.7004397181), COEF_CONST(5.7279204546), COEF_CONST(5.7548875022), COEF_CONST(5.7813597135),
279 COEF_CONST(5.8073549221), COEF_CONST(5.8328900142), COEF_CONST(5.8579809951), COEF_CONST(5.8826430494),
280 COEF_CONST(5.9068905956), COEF_CONST(5.9307373376), COEF_CONST(5.9541963104), COEF_CONST(5.9772799235),
281 COEF_CONST(6.0)
282 };
283 real_t r0 = log2Table[a0]; /* coef */
284 real_t r1 = log2Table[a1]; /* coef */
285 real_t r2 = (r1 - r0); /* coef */
286
287 if (warp)
288 r2 = MUL_C(r2, COEF_CONST(1.0/1.3));
289
290 /* convert r2 to real and then multiply and round */
291 r2 = (r2 >> (COEF_BITS-REAL_BITS)) * bands + (1<<(REAL_BITS-1));
292
293 return (r2 >> REAL_BITS);
294#else
295 real_t div = (real_t)log(2.0);
296 if (warp) div *= (real_t)1.3;
297
298 return (int32_t)(bands * log((float)a1/(float)a0)/div + 0.5);
299#endif
300}
301
302static real_t find_initial_power(uint8_t bands, uint8_t a0, uint8_t a1)
303{
304#ifdef FIXED_POINT
305 /* table with log() values */
306 static const real_t logTable[65] = {
307 COEF_CONST(0.0), COEF_CONST(0.0), COEF_CONST(0.6931471806), COEF_CONST(1.0986122887),
308 COEF_CONST(1.3862943611), COEF_CONST(1.6094379124), COEF_CONST(1.7917594692), COEF_CONST(1.9459101491),
309 COEF_CONST(2.0794415417), COEF_CONST(2.1972245773), COEF_CONST(2.3025850930), COEF_CONST(2.3978952728),
310 COEF_CONST(2.4849066498), COEF_CONST(2.5649493575), COEF_CONST(2.6390573296), COEF_CONST(2.7080502011),
311 COEF_CONST(2.7725887222), COEF_CONST(2.8332133441), COEF_CONST(2.8903717579), COEF_CONST(2.9444389792),
312 COEF_CONST(2.9957322736), COEF_CONST(3.0445224377), COEF_CONST(3.0910424534), COEF_CONST(3.1354942159),
313 COEF_CONST(3.1780538303), COEF_CONST(3.2188758249), COEF_CONST(3.2580965380), COEF_CONST(3.2958368660),
314 COEF_CONST(3.3322045102), COEF_CONST(3.3672958300), COEF_CONST(3.4011973817), COEF_CONST(3.4339872045),
315 COEF_CONST(3.4657359028), COEF_CONST(3.4965075615), COEF_CONST(3.5263605246), COEF_CONST(3.5553480615),
316 COEF_CONST(3.5835189385), COEF_CONST(3.6109179126), COEF_CONST(3.6375861597), COEF_CONST(3.6635616461),
317 COEF_CONST(3.6888794541), COEF_CONST(3.7135720667), COEF_CONST(3.7376696183), COEF_CONST(3.7612001157),
318 COEF_CONST(3.7841896339), COEF_CONST(3.8066624898), COEF_CONST(3.8286413965), COEF_CONST(3.8501476017),
319 COEF_CONST(3.8712010109), COEF_CONST(3.8918202981), COEF_CONST(3.9120230054), COEF_CONST(3.9318256327),
320 COEF_CONST(3.9512437186), COEF_CONST(3.9702919136), COEF_CONST(3.9889840466), COEF_CONST(4.0073331852),
321 COEF_CONST(4.0253516907), COEF_CONST(4.0430512678), COEF_CONST(4.0604430105), COEF_CONST(4.0775374439),
322 COEF_CONST(4.0943445622), COEF_CONST(4.1108738642), COEF_CONST(4.1271343850), COEF_CONST(4.1431347264),
323 COEF_CONST(4.158883083)
324 };
325 /* standard Taylor polynomial coefficients for exp(x) around 0 */
326 /* a polynomial around x=1 is more precise, as most values are around 1.07,
327 but this is just fine already */
328 static const real_t c1 = COEF_CONST(1.0);
329 static const real_t c2 = COEF_CONST(1.0/2.0);
330 static const real_t c3 = COEF_CONST(1.0/6.0);
331 static const real_t c4 = COEF_CONST(1.0/24.0);
332
333 real_t r0 = logTable[a0]; /* coef */
334 real_t r1 = logTable[a1]; /* coef */
335 real_t r2 = (r1 - r0) / bands; /* coef */
336 real_t rexp = c1 + MUL_C((c1 + MUL_C((c2 + MUL_C((c3 + MUL_C(c4,r2)), r2)), r2)), r2);
337
338 return (rexp >> (COEF_BITS-REAL_BITS)); /* real */
339#else
340 return (real_t)pow((real_t)a1/(real_t)a0, 1.0/(real_t)bands);
341#endif
342}
343
344/*
345 version for bs_freq_scale > 0
346*/
347uint8_t master_frequency_table(sbr_info *sbr, uint8_t k0, uint8_t k2,
348 uint8_t bs_freq_scale, uint8_t bs_alter_scale)
349{
350 uint8_t k, bands, twoRegions;
351 uint8_t k1;
352 uint8_t nrBand0, nrBand1;
353 int32_t vDk0[64] = {0}, vDk1[64] = {0};
354 int32_t vk0[64] = {0}, vk1[64] = {0};
355 uint8_t temp1[] = { 6, 5, 4 };
356 real_t q, qk;
357 int32_t A_1;
358#ifdef FIXED_POINT
359 real_t rk2, rk0;
360#endif
361
362 /* mft only defined for k2 > k0 */
363 if (k2 <= k0)
364 {
365 sbr->N_master = 0;
366 return 1;
367 }
368
369 bands = temp1[bs_freq_scale-1];
370
371#ifdef FIXED_POINT
372 rk0 = (real_t)k0 << REAL_BITS;
373 rk2 = (real_t)k2 << REAL_BITS;
374 if (rk2 > MUL_C(rk0, COEF_CONST(2.2449)))
375#else
376 if ((float)k2/(float)k0 > 2.2449)
377#endif
378 {
379 twoRegions = 1;
380 k1 = k0 << 1;
381 } else {
382 twoRegions = 0;
383 k1 = k2;
384 }
385
386 nrBand0 = (uint8_t)(2 * find_bands(0, bands, k0, k1));
387 nrBand0 = min(nrBand0, 63);
388 if (nrBand0 <= 0)
389 return 1;
390
391 q = find_initial_power(nrBand0, k0, k1);
392#ifdef FIXED_POINT
393 qk = (real_t)k0 << REAL_BITS;
394 //A_1 = (int32_t)((qk + REAL_CONST(0.5)) >> REAL_BITS);
395 A_1 = k0;
396#else
397 qk = REAL_CONST(k0);
398 A_1 = (int32_t)(qk + .5);
399#endif
400 for (k = 0; k <= nrBand0; k++)
401 {
402 int32_t A_0 = A_1;
403#ifdef FIXED_POINT
404 qk = MUL_R(qk,q);
405 A_1 = (int32_t)((qk + REAL_CONST(0.5)) >> REAL_BITS);
406#else
407 qk *= q;
408 A_1 = (int32_t)(qk + 0.5);
409#endif
410 vDk0[k] = A_1 - A_0;
411 }
412
413 /* needed? */
414 qsort(vDk0, nrBand0, sizeof(vDk0[0]), longcmp);
415
416 vk0[0] = k0;
417 for (k = 1; k <= nrBand0; k++)
418 {
419 vk0[k] = vk0[k-1] + vDk0[k-1];
420 if (vDk0[k-1] == 0)
421 return 1;
422 }
423
424 if (!twoRegions)
425 {
426 for (k = 0; k <= nrBand0; k++)
427 sbr->f_master[k] = (uint8_t) vk0[k];
428
429 sbr->N_master = nrBand0;
430 sbr->N_master = min(sbr->N_master, 64);
431 return 0;
432 }
433
434 nrBand1 = (uint8_t)(2 * find_bands(1 /* warped */, bands, k1, k2));
435 nrBand1 = min(nrBand1, 63);
436
437 q = find_initial_power(nrBand1, k1, k2);
438#ifdef FIXED_POINT
439 qk = (real_t)k1 << REAL_BITS;
440 //A_1 = (int32_t)((qk + REAL_CONST(0.5)) >> REAL_BITS);
441 A_1 = k1;
442#else
443 qk = REAL_CONST(k1);
444 A_1 = (int32_t)(qk + .5);
445#endif
446 for (k = 0; k <= nrBand1 - 1; k++)
447 {
448 int32_t A_0 = A_1;
449#ifdef FIXED_POINT
450 qk = MUL_R(qk,q);
451 A_1 = (int32_t)((qk + REAL_CONST(0.5)) >> REAL_BITS);
452#else
453 qk *= q;
454 A_1 = (int32_t)(qk + 0.5);
455#endif
456 vDk1[k] = A_1 - A_0;
457 }
458
459 if (vDk1[0] < vDk0[nrBand0 - 1])
460 {
461 int32_t change;
462
463 /* needed? */
464 qsort(vDk1, nrBand1 + 1, sizeof(vDk1[0]), longcmp);
465 change = vDk0[nrBand0 - 1] - vDk1[0];
466 vDk1[0] = vDk0[nrBand0 - 1];
467 vDk1[nrBand1 - 1] = vDk1[nrBand1 - 1] - change;
468 }
469
470 /* needed? */
471 qsort(vDk1, nrBand1, sizeof(vDk1[0]), longcmp);
472 vk1[0] = k1;
473 for (k = 1; k <= nrBand1; k++)
474 {
475 vk1[k] = vk1[k-1] + vDk1[k-1];
476 if (vDk1[k-1] == 0)
477 return 1;
478 }
479
480 sbr->N_master = nrBand0 + nrBand1;
481 sbr->N_master = min(sbr->N_master, 64);
482 for (k = 0; k <= nrBand0; k++)
483 {
484 sbr->f_master[k] = (uint8_t) vk0[k];
485 }
486 for (k = nrBand0 + 1; k <= sbr->N_master; k++)
487 {
488 sbr->f_master[k] = (uint8_t) vk1[k - nrBand0];
489 }
490
491#if 0
492 printf("f_master[%d]: ", sbr->N_master);
493 for (k = 0; k <= sbr->N_master; k++)
494 {
495 printf("%d ", sbr->f_master[k]);
496 }
497 printf("\n");
498#endif
499
500 return 0;
501}
502
503/* calculate the derived frequency border tables from f_master */
504uint8_t derived_frequency_table(sbr_info *sbr, uint8_t bs_xover_band,
505 uint8_t k2)
506{
507 uint8_t k, i;
508 uint32_t minus;
509
510 /* The following relation shall be satisfied: bs_xover_band < N_Master */
511 if (sbr->N_master <= bs_xover_band)
512 return 1;
513
514 sbr->N_high = sbr->N_master - bs_xover_band;
515 sbr->N_low = (sbr->N_high>>1) + (sbr->N_high - ((sbr->N_high>>1)<<1));
516
517 sbr->n[0] = sbr->N_low;
518 sbr->n[1] = sbr->N_high;
519
520 for (k = 0; k <= sbr->N_high; k++)
521 {
522 sbr->f_table_res[HI_RES][k] = sbr->f_master[k + bs_xover_band];
523 }
524
525 sbr->M = sbr->f_table_res[HI_RES][sbr->N_high] - sbr->f_table_res[HI_RES][0];
526 sbr->kx = sbr->f_table_res[HI_RES][0];
527 if (sbr->kx > 32)
528 return 1;
529 if (sbr->kx + sbr->M > 64)
530 return 1;
531
532 minus = (sbr->N_high & 1) ? 1 : 0;
533
534 for (k = 0; k <= sbr->N_low; k++)
535 {
536 if (k == 0)
537 i = 0;
538 else
539 i = (uint8_t)(2*k - minus);
540 sbr->f_table_res[LO_RES][k] = sbr->f_table_res[HI_RES][i];
541 }
542
543#if 0
544 printf("bs_freq_scale: %d\n", sbr->bs_freq_scale);
545 printf("bs_limiter_bands: %d\n", sbr->bs_limiter_bands);
546 printf("f_table_res[HI_RES][%d]: ", sbr->N_high);
547 for (k = 0; k <= sbr->N_high; k++)
548 {
549 printf("%d ", sbr->f_table_res[HI_RES][k]);
550 }
551 printf("\n");
552#endif
553#if 0
554 printf("f_table_res[LO_RES][%d]: ", sbr->N_low);
555 for (k = 0; k <= sbr->N_low; k++)
556 {
557 printf("%d ", sbr->f_table_res[LO_RES][k]);
558 }
559 printf("\n");
560#endif
561
562 sbr->N_Q = 0;
563 if (sbr->bs_noise_bands == 0)
564 {
565 sbr->N_Q = 1;
566 } else {
567#if 0
568 sbr->N_Q = max(1, (int32_t)(sbr->bs_noise_bands*(log(k2/(float)sbr->kx)/log(2.0)) + 0.5));
569#else
570 sbr->N_Q = (uint8_t)(max(1, find_bands(0, sbr->bs_noise_bands, sbr->kx, k2)));
571#endif
572 sbr->N_Q = min(5, sbr->N_Q);
573 }
574
575 for (k = 0; k <= sbr->N_Q; k++)
576 {
577 if (k == 0)
578 {
579 i = 0;
580 } else {
581 /* i = i + (int32_t)((sbr->N_low - i)/(sbr->N_Q + 1 - k)); */
582 i = i + (sbr->N_low - i)/(sbr->N_Q + 1 - k);
583 }
584 sbr->f_table_noise[k] = sbr->f_table_res[LO_RES][i];
585 }
586
587 /* build table for mapping k to g in hf patching */
588 for (k = 0; k < 64; k++)
589 {
590 uint8_t g;
591 for (g = 0; g < sbr->N_Q; g++)
592 {
593 if ((sbr->f_table_noise[g] <= k) &&
594 (k < sbr->f_table_noise[g+1]))
595 {
596 sbr->table_map_k_to_g[k] = g;
597 break;
598 }
599 }
600 }
601
602#if 0
603 printf("f_table_noise[%d]: ", sbr->N_Q);
604 for (k = 0; k <= sbr->N_Q; k++)
605 {
606 printf("%d ", sbr->f_table_noise[k] - sbr->kx);
607 }
608 printf("\n");
609#endif
610
611 return 0;
612}
613
614/* TODO: blegh, ugly */
615/* Modified to calculate for all possible bs_limiter_bands always
616 * This reduces the number calls to this functions needed (now only on
617 * header reset)
618 */
619void limiter_frequency_table(sbr_info *sbr)
620{
621#if 0
622 static const real_t limiterBandsPerOctave[] = { REAL_CONST(1.2),
623 REAL_CONST(2), REAL_CONST(3) };
624#else
625 static const real_t limiterBandsCompare[] = { REAL_CONST(1.327152),
626 REAL_CONST(1.185093), REAL_CONST(1.119872) };
627#endif
628 uint8_t k, s;
629 int8_t nrLim;
630#if 0
631 real_t limBands;
632#endif
633
634 sbr->f_table_lim[0][0] = sbr->f_table_res[LO_RES][0] - sbr->kx;
635 sbr->f_table_lim[0][1] = sbr->f_table_res[LO_RES][sbr->N_low] - sbr->kx;
636 sbr->N_L[0] = 1;
637
638#if 0
639 printf("f_table_lim[%d][%d]: ", 0, sbr->N_L[0]);
640 for (k = 0; k <= sbr->N_L[0]; k++)
641 {
642 printf("%d ", sbr->f_table_lim[0][k]);
643 }
644 printf("\n");
645#endif
646
647 for (s = 1; s < 4; s++)
648 {
649 int32_t limTable[100 /*TODO*/] = {0};
650 uint8_t patchBorders[64/*??*/] = {0};
651
652#if 0
653 limBands = limiterBandsPerOctave[s - 1];
654#endif
655
656 patchBorders[0] = sbr->kx;
657 for (k = 1; k <= sbr->noPatches; k++)
658 {
659 patchBorders[k] = patchBorders[k-1] + sbr->patchNoSubbands[k-1];
660 }
661
662 for (k = 0; k <= sbr->N_low; k++)
663 {
664 limTable[k] = sbr->f_table_res[LO_RES][k];
665 }
666 for (k = 1; k < sbr->noPatches; k++)
667 {
668 limTable[k+sbr->N_low] = patchBorders[k];
669 }
670
671 /* needed */
672 qsort(limTable, sbr->noPatches + sbr->N_low, sizeof(limTable[0]), longcmp);
673 k = 1;
674 nrLim = sbr->noPatches + sbr->N_low - 1;
675
676 if (nrLim < 0) // TODO: BIG FAT PROBLEM
677 return;
678
679restart:
680 if (k <= nrLim)
681 {
682 real_t nOctaves;
683
684 if (limTable[k-1] != 0)
685#if 0
686 nOctaves = REAL_CONST(log((float)limTable[k]/(float)limTable[k-1])/log(2.0));
687#else
688#ifdef FIXED_POINT
689 nOctaves = DIV_R((limTable[k]<<REAL_BITS),REAL_CONST(limTable[k-1]));
690#else
691 nOctaves = (real_t)limTable[k]/(real_t)limTable[k-1];
692#endif
693#endif
694 else
695 nOctaves = 0;
696
697#if 0
698 if ((MUL_R(nOctaves,limBands)) < REAL_CONST(0.49))
699#else
700 if (nOctaves < limiterBandsCompare[s - 1])
701#endif
702 {
703 uint8_t i;
704 if (limTable[k] != limTable[k-1])
705 {
706 uint8_t found = 0, found2 = 0;
707 for (i = 0; i <= sbr->noPatches; i++)
708 {
709 if (limTable[k] == patchBorders[i])
710 found = 1;
711 }
712 if (found)
713 {
714 found2 = 0;
715 for (i = 0; i <= sbr->noPatches; i++)
716 {
717 if (limTable[k-1] == patchBorders[i])
718 found2 = 1;
719 }
720 if (found2)
721 {
722 k++;
723 goto restart;
724 } else {
725 /* remove (k-1)th element */
726 limTable[k-1] = sbr->f_table_res[LO_RES][sbr->N_low];
727 qsort(limTable, sbr->noPatches + sbr->N_low, sizeof(limTable[0]), longcmp);
728 nrLim--;
729 goto restart;
730 }
731 }
732 }
733 /* remove kth element */
734 limTable[k] = sbr->f_table_res[LO_RES][sbr->N_low];
735 qsort(limTable, nrLim, sizeof(limTable[0]), longcmp);
736 nrLim--;
737 goto restart;
738 } else {
739 k++;
740 goto restart;
741 }
742 }
743
744 sbr->N_L[s] = nrLim;
745 for (k = 0; k <= nrLim; k++)
746 {
747 sbr->f_table_lim[s][k] = limTable[k] - sbr->kx;
748 }
749
750#if 0
751 printf("f_table_lim[%d][%d]: ", s, sbr->N_L[s]);
752 for (k = 0; k <= sbr->N_L[s]; k++)
753 {
754 printf("%d ", sbr->f_table_lim[s][k]);
755 }
756 printf("\n");
757#endif
758 }
759}
760
761#endif
diff --git a/apps/codecs/libfaad/sbr_fbt.h b/apps/codecs/libfaad/sbr_fbt.h
new file mode 100644
index 0000000000..ac25335268
--- /dev/null
+++ b/apps/codecs/libfaad/sbr_fbt.h
@@ -0,0 +1,52 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __SBR_FBT_H__
29#define __SBR_FBT_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35uint8_t qmf_start_channel(uint8_t bs_start_freq, uint8_t bs_samplerate_mode,
36 uint32_t sample_rate);
37uint8_t qmf_stop_channel(uint8_t bs_stop_freq, uint32_t sample_rate,
38 uint8_t k0);
39uint8_t master_frequency_table_fs0(sbr_info *sbr, uint8_t k0, uint8_t k2,
40 uint8_t bs_alter_scale);
41uint8_t master_frequency_table(sbr_info *sbr, uint8_t k0, uint8_t k2,
42 uint8_t bs_freq_scale, uint8_t bs_alter_scale);
43uint8_t derived_frequency_table(sbr_info *sbr, uint8_t bs_xover_band,
44 uint8_t k2);
45void limiter_frequency_table(sbr_info *sbr);
46
47
48#ifdef __cplusplus
49}
50#endif
51#endif
52
diff --git a/apps/codecs/libfaad/sbr_hfadj.c b/apps/codecs/libfaad/sbr_hfadj.c
new file mode 100644
index 0000000000..17d63f41c2
--- /dev/null
+++ b/apps/codecs/libfaad/sbr_hfadj.c
@@ -0,0 +1,1720 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28/* High Frequency adjustment */
29
30#include "common.h"
31#include "structs.h"
32
33#ifdef SBR_DEC
34
35#include "sbr_syntax.h"
36#include "sbr_hfadj.h"
37
38#include "sbr_noise.h"
39
40
41/* static function declarations */
42static void estimate_current_envelope(sbr_info *sbr, sbr_hfadj_info *adj,
43 qmf_t Xsbr[MAX_NTSRHFG][64], uint8_t ch);
44static void calculate_gain(sbr_info *sbr, sbr_hfadj_info *adj, uint8_t ch);
45#ifdef SBR_LOW_POWER
46static void calc_gain_groups(sbr_info *sbr, sbr_hfadj_info *adj, real_t *deg, uint8_t ch);
47static void aliasing_reduction(sbr_info *sbr, sbr_hfadj_info *adj, real_t *deg, uint8_t ch);
48#endif
49static void hf_assembly(sbr_info *sbr, sbr_hfadj_info *adj, qmf_t Xsbr[MAX_NTSRHFG][64], uint8_t ch);
50
51
52void hf_adjustment(sbr_info *sbr, qmf_t Xsbr[MAX_NTSRHFG][64]
53#ifdef SBR_LOW_POWER
54 ,real_t *deg /* aliasing degree */
55#endif
56 ,uint8_t ch)
57{
58 ALIGN sbr_hfadj_info adj = {{{0}}};
59
60 if (sbr->bs_frame_class[ch] == FIXFIX)
61 {
62 sbr->l_A[ch] = -1;
63 } else if (sbr->bs_frame_class[ch] == VARFIX) {
64 if (sbr->bs_pointer[ch] > 1)
65 sbr->l_A[ch] = -1;
66 else
67 sbr->l_A[ch] = sbr->bs_pointer[ch] - 1;
68 } else {
69 if (sbr->bs_pointer[ch] == 0)
70 sbr->l_A[ch] = -1;
71 else
72 sbr->l_A[ch] = sbr->L_E[ch] + 1 - sbr->bs_pointer[ch];
73 }
74
75 estimate_current_envelope(sbr, &adj, Xsbr, ch);
76
77 calculate_gain(sbr, &adj, ch);
78
79#ifdef SBR_LOW_POWER
80 calc_gain_groups(sbr, &adj, deg, ch);
81 aliasing_reduction(sbr, &adj, deg, ch);
82#endif
83
84 hf_assembly(sbr, &adj, Xsbr, ch);
85}
86
87static uint8_t get_S_mapped(sbr_info *sbr, uint8_t ch, uint8_t l, uint8_t current_band)
88{
89 if (sbr->f[ch][l] == HI_RES)
90 {
91 /* in case of using f_table_high we just have 1 to 1 mapping
92 * from bs_add_harmonic[l][k]
93 */
94 if ((l >= sbr->l_A[ch]) ||
95 (sbr->bs_add_harmonic_prev[ch][current_band] && sbr->bs_add_harmonic_flag_prev[ch]))
96 {
97 return sbr->bs_add_harmonic[ch][current_band];
98 }
99 } else {
100 uint8_t b, lb, ub;
101
102 /* in case of f_table_low we check if any of the HI_RES bands
103 * within this LO_RES band has bs_add_harmonic[l][k] turned on
104 * (note that borders in the LO_RES table are also present in
105 * the HI_RES table)
106 */
107
108 /* find first HI_RES band in current LO_RES band */
109 lb = 2*current_band - ((sbr->N_high & 1) ? 1 : 0);
110 /* find first HI_RES band in next LO_RES band */
111 ub = 2*(current_band+1) - ((sbr->N_high & 1) ? 1 : 0);
112
113 /* check all HI_RES bands in current LO_RES band for sinusoid */
114 for (b = lb; b < ub; b++)
115 {
116 if ((l >= sbr->l_A[ch]) ||
117 (sbr->bs_add_harmonic_prev[ch][b] && sbr->bs_add_harmonic_flag_prev[ch]))
118 {
119 if (sbr->bs_add_harmonic[ch][b] == 1)
120 return 1;
121 }
122 }
123 }
124
125 return 0;
126}
127
128static void estimate_current_envelope(sbr_info *sbr, sbr_hfadj_info *adj,
129 qmf_t Xsbr[MAX_NTSRHFG][64], uint8_t ch)
130{
131 uint8_t m, l, j, k, k_l, k_h, p;
132 real_t nrg, div;
133
134 if (sbr->bs_interpol_freq == 1)
135 {
136 for (l = 0; l < sbr->L_E[ch]; l++)
137 {
138 uint8_t i, l_i, u_i;
139
140 l_i = sbr->t_E[ch][l];
141 u_i = sbr->t_E[ch][l+1];
142
143 div = (real_t)(u_i - l_i);
144
145 for (m = 0; m < sbr->M; m++)
146 {
147 nrg = 0;
148
149 for (i = l_i + sbr->tHFAdj; i < u_i + sbr->tHFAdj; i++)
150 {
151#ifdef FIXED_POINT
152#ifdef SBR_LOW_POWER
153 nrg += ((QMF_RE(Xsbr[i][m + sbr->kx])+(1<<(REAL_BITS-1)))>>REAL_BITS)*((QMF_RE(Xsbr[i][m + sbr->kx])+(1<<(REAL_BITS-1)))>>REAL_BITS);
154#else
155 nrg += ((QMF_RE(Xsbr[i][m + sbr->kx])+(1<<(REAL_BITS-1)))>>REAL_BITS)*((QMF_RE(Xsbr[i][m + sbr->kx])+(1<<(REAL_BITS-1)))>>REAL_BITS) +
156 ((QMF_IM(Xsbr[i][m + sbr->kx])+(1<<(REAL_BITS-1)))>>REAL_BITS)*((QMF_IM(Xsbr[i][m + sbr->kx])+(1<<(REAL_BITS-1)))>>REAL_BITS);
157#endif
158#else
159 nrg += MUL_R(QMF_RE(Xsbr[i][m + sbr->kx]), QMF_RE(Xsbr[i][m + sbr->kx]))
160#ifndef SBR_LOW_POWER
161 + MUL_R(QMF_IM(Xsbr[i][m + sbr->kx]), QMF_IM(Xsbr[i][m + sbr->kx]))
162#endif
163 ;
164#endif
165 }
166
167 sbr->E_curr[ch][m][l] = nrg / div;
168#ifdef SBR_LOW_POWER
169#ifdef FIXED_POINT
170 sbr->E_curr[ch][m][l] <<= 1;
171#else
172 sbr->E_curr[ch][m][l] *= 2;
173#endif
174#endif
175 }
176 }
177 } else {
178 for (l = 0; l < sbr->L_E[ch]; l++)
179 {
180 for (p = 0; p < sbr->n[sbr->f[ch][l]]; p++)
181 {
182 k_l = sbr->f_table_res[sbr->f[ch][l]][p];
183 k_h = sbr->f_table_res[sbr->f[ch][l]][p+1];
184
185 for (k = k_l; k < k_h; k++)
186 {
187 uint8_t i, l_i, u_i;
188 nrg = 0;
189
190 l_i = sbr->t_E[ch][l];
191 u_i = sbr->t_E[ch][l+1];
192
193 div = (real_t)((u_i - l_i)*(k_h - k_l));
194
195 for (i = l_i + sbr->tHFAdj; i < u_i + sbr->tHFAdj; i++)
196 {
197 for (j = k_l; j < k_h; j++)
198 {
199#ifdef FIXED_POINT
200#ifdef SBR_LOW_POWER
201 nrg += ((QMF_RE(Xsbr[i][j])+(1<<(REAL_BITS-1)))>>REAL_BITS)*((QMF_RE(Xsbr[i][j])+(1<<(REAL_BITS-1)))>>REAL_BITS);
202#else
203 nrg += ((QMF_RE(Xsbr[i][j])+(1<<(REAL_BITS-1)))>>REAL_BITS)*((QMF_RE(Xsbr[i][j])+(1<<(REAL_BITS-1)))>>REAL_BITS) +
204 ((QMF_IM(Xsbr[i][j])+(1<<(REAL_BITS-1)))>>REAL_BITS)*((QMF_IM(Xsbr[i][j])+(1<<(REAL_BITS-1)))>>REAL_BITS);
205#endif
206#else
207 nrg += MUL_R(QMF_RE(Xsbr[i][j]), QMF_RE(Xsbr[i][j]))
208#ifndef SBR_LOW_POWER
209 + MUL_R(QMF_IM(Xsbr[i][j]), QMF_IM(Xsbr[i][j]))
210#endif
211 ;
212#endif
213 }
214 }
215
216 sbr->E_curr[ch][k - sbr->kx][l] = nrg / div;
217#ifdef SBR_LOW_POWER
218#ifdef FIXED_POINT
219 sbr->E_curr[ch][k - sbr->kx][l] <<= 1;
220#else
221 sbr->E_curr[ch][k - sbr->kx][l] *= 2;
222#endif
223#endif
224 }
225 }
226 }
227 }
228}
229
230#ifdef FIXED_POINT
231#define EPS (1) /* smallest number available in fixed point */
232#else
233#define EPS (1e-12)
234#endif
235
236
237
238#ifdef FIXED_POINT
239
240/* log2 values of [0..63] */
241static const real_t log2_int_tab[] = {
242 LOG2_MIN_INF, REAL_CONST(0.000000000000000), REAL_CONST(1.000000000000000), REAL_CONST(1.584962500721156),
243 REAL_CONST(2.000000000000000), REAL_CONST(2.321928094887362), REAL_CONST(2.584962500721156), REAL_CONST(2.807354922057604),
244 REAL_CONST(3.000000000000000), REAL_CONST(3.169925001442313), REAL_CONST(3.321928094887363), REAL_CONST(3.459431618637297),
245 REAL_CONST(3.584962500721156), REAL_CONST(3.700439718141092), REAL_CONST(3.807354922057604), REAL_CONST(3.906890595608519),
246 REAL_CONST(4.000000000000000), REAL_CONST(4.087462841250339), REAL_CONST(4.169925001442312), REAL_CONST(4.247927513443585),
247 REAL_CONST(4.321928094887362), REAL_CONST(4.392317422778761), REAL_CONST(4.459431618637297), REAL_CONST(4.523561956057013),
248 REAL_CONST(4.584962500721156), REAL_CONST(4.643856189774724), REAL_CONST(4.700439718141093), REAL_CONST(4.754887502163468),
249 REAL_CONST(4.807354922057604), REAL_CONST(4.857980995127572), REAL_CONST(4.906890595608519), REAL_CONST(4.954196310386875),
250 REAL_CONST(5.000000000000000), REAL_CONST(5.044394119358453), REAL_CONST(5.087462841250340), REAL_CONST(5.129283016944966),
251 REAL_CONST(5.169925001442312), REAL_CONST(5.209453365628949), REAL_CONST(5.247927513443585), REAL_CONST(5.285402218862248),
252 REAL_CONST(5.321928094887363), REAL_CONST(5.357552004618084), REAL_CONST(5.392317422778761), REAL_CONST(5.426264754702098),
253 REAL_CONST(5.459431618637297), REAL_CONST(5.491853096329675), REAL_CONST(5.523561956057013), REAL_CONST(5.554588851677637),
254 REAL_CONST(5.584962500721156), REAL_CONST(5.614709844115208), REAL_CONST(5.643856189774724), REAL_CONST(5.672425341971495),
255 REAL_CONST(5.700439718141093), REAL_CONST(5.727920454563200), REAL_CONST(5.754887502163469), REAL_CONST(5.781359713524660),
256 REAL_CONST(5.807354922057605), REAL_CONST(5.832890014164742), REAL_CONST(5.857980995127572), REAL_CONST(5.882643049361842),
257 REAL_CONST(5.906890595608518), REAL_CONST(5.930737337562887), REAL_CONST(5.954196310386876), REAL_CONST(5.977279923499916)
258};
259
260static const real_t pan_log2_tab[] = {
261 REAL_CONST(1.000000000000000), REAL_CONST(0.584962500721156), REAL_CONST(0.321928094887362), REAL_CONST(0.169925001442312), REAL_CONST(0.087462841250339),
262 REAL_CONST(0.044394119358453), REAL_CONST(0.022367813028455), REAL_CONST(0.011227255423254), REAL_CONST(0.005624549193878), REAL_CONST(0.002815015607054),
263 REAL_CONST(0.001408194392808), REAL_CONST(0.000704269011247), REAL_CONST(0.000352177480301), REAL_CONST(0.000176099486443), REAL_CONST(0.000088052430122),
264 REAL_CONST(0.000044026886827), REAL_CONST(0.000022013611360), REAL_CONST(0.000011006847667)
265};
266
267static real_t find_log2_E(sbr_info *sbr, uint8_t k, uint8_t l, uint8_t ch)
268{
269 /* check for coupled energy/noise data */
270 if (sbr->bs_coupling == 1)
271 {
272 uint8_t amp0 = (sbr->amp_res[0]) ? 0 : 1;
273 uint8_t amp1 = (sbr->amp_res[1]) ? 0 : 1;
274 real_t tmp = (7 << REAL_BITS) + (sbr->E[0][k][l] << (REAL_BITS-amp0));
275 real_t pan;
276
277 /* E[1] should always be even so shifting is OK */
278 uint8_t E = sbr->E[1][k][l] >> amp1;
279
280 if (ch == 0)
281 {
282 if (E > 12)
283 {
284 /* negative */
285 pan = pan_log2_tab[-12 + E];
286 } else {
287 /* positive */
288 pan = pan_log2_tab[12 - E] + ((12 - E)<<REAL_BITS);
289 }
290 } else {
291 if (E < 12)
292 {
293 /* negative */
294 pan = pan_log2_tab[-E + 12];
295 } else {
296 /* positive */
297 pan = pan_log2_tab[E - 12] + ((E - 12)<<REAL_BITS);
298 }
299 }
300
301 /* tmp / pan in log2 */
302 return tmp - pan;
303 } else {
304 uint8_t amp = (sbr->amp_res[ch]) ? 0 : 1;
305
306 return (6 << REAL_BITS) + (sbr->E[ch][k][l] << (REAL_BITS-amp));
307 }
308}
309
310static real_t find_log2_Q(sbr_info *sbr, uint8_t k, uint8_t l, uint8_t ch)
311{
312 /* check for coupled energy/noise data */
313 if (sbr->bs_coupling == 1)
314 {
315 real_t tmp = (7 << REAL_BITS) - (sbr->Q[0][k][l] << REAL_BITS);
316 real_t pan;
317
318 uint8_t Q = sbr->Q[1][k][l];
319
320 if (ch == 0)
321 {
322 if (Q > 12)
323 {
324 /* negative */
325 pan = pan_log2_tab[-12 + Q];
326 } else {
327 /* positive */
328 pan = pan_log2_tab[12 - Q] + ((12 - Q)<<REAL_BITS);
329 }
330 } else {
331 if (Q < 12)
332 {
333 /* negative */
334 pan = pan_log2_tab[-Q + 12];
335 } else {
336 /* positive */
337 pan = pan_log2_tab[Q - 12] + ((Q - 12)<<REAL_BITS);
338 }
339 }
340
341 /* tmp / pan in log2 */
342 return tmp - pan;
343 } else {
344 return (6 << REAL_BITS) - (sbr->Q[ch][k][l] << REAL_BITS);
345 }
346}
347
348static const real_t log_Qplus1_pan[31][13] = {
349 { REAL_CONST(0.044383447617292), REAL_CONST(0.169768601655960), REAL_CONST(0.583090126514435), REAL_CONST(1.570089221000671), REAL_CONST(3.092446088790894), REAL_CONST(4.733354568481445), REAL_CONST(6.022367954254150), REAL_CONST(6.692092418670654), REAL_CONST(6.924463272094727), REAL_CONST(6.989034175872803), REAL_CONST(7.005646705627441), REAL_CONST(7.009829998016357), REAL_CONST(7.010877609252930) },
350 { REAL_CONST(0.022362394258380), REAL_CONST(0.087379962205887), REAL_CONST(0.320804953575134), REAL_CONST(0.988859415054321), REAL_CONST(2.252387046813965), REAL_CONST(3.786596298217773), REAL_CONST(5.044394016265869), REAL_CONST(5.705977916717529), REAL_CONST(5.936291694641113), REAL_CONST(6.000346660614014), REAL_CONST(6.016829967498779), REAL_CONST(6.020981311798096), REAL_CONST(6.022020816802979) },
351 { REAL_CONST(0.011224525049329), REAL_CONST(0.044351425021887), REAL_CONST(0.169301137328148), REAL_CONST(0.577544987201691), REAL_CONST(1.527246952056885), REAL_CONST(2.887525320053101), REAL_CONST(4.087462902069092), REAL_CONST(4.733354568481445), REAL_CONST(4.959661006927490), REAL_CONST(5.022709369659424), REAL_CONST(5.038940429687500), REAL_CONST(5.043028831481934), REAL_CONST(5.044052600860596) },
352 { REAL_CONST(0.005623178556561), REAL_CONST(0.022346137091517), REAL_CONST(0.087132595479488), REAL_CONST(0.317482173442841), REAL_CONST(0.956931233406067), REAL_CONST(2.070389270782471), REAL_CONST(3.169924974441528), REAL_CONST(3.786596298217773), REAL_CONST(4.005294322967529), REAL_CONST(4.066420555114746), REAL_CONST(4.082170009613037), REAL_CONST(4.086137294769287), REAL_CONST(4.087131500244141) },
353 { REAL_CONST(0.002814328996465), REAL_CONST(0.011216334067285), REAL_CONST(0.044224001467228), REAL_CONST(0.167456731200218), REAL_CONST(0.556393325328827), REAL_CONST(1.378511548042297), REAL_CONST(2.321928024291992), REAL_CONST(2.887525320053101), REAL_CONST(3.092446088790894), REAL_CONST(3.150059700012207), REAL_CONST(3.164926528930664), REAL_CONST(3.168673276901245), REAL_CONST(3.169611930847168) },
354 { REAL_CONST(0.001407850766554), REAL_CONST(0.005619067233056), REAL_CONST(0.022281449288130), REAL_CONST(0.086156636476517), REAL_CONST(0.304854571819305), REAL_CONST(0.847996890544891), REAL_CONST(1.584962487220764), REAL_CONST(2.070389270782471), REAL_CONST(2.252387046813965), REAL_CONST(2.304061651229858), REAL_CONST(2.317430257797241), REAL_CONST(2.320801734924316), REAL_CONST(2.321646213531494) },
355 { REAL_CONST(0.000704097095877), REAL_CONST(0.002812269143760), REAL_CONST(0.011183738708496), REAL_CONST(0.043721374124289), REAL_CONST(0.160464659333229), REAL_CONST(0.485426813364029), REAL_CONST(1.000000000000000), REAL_CONST(1.378511548042297), REAL_CONST(1.527246952056885), REAL_CONST(1.570089221000671), REAL_CONST(1.581215262413025), REAL_CONST(1.584023833274841), REAL_CONST(1.584727644920349) },
356 { REAL_CONST(0.000352177477907), REAL_CONST(0.001406819908880), REAL_CONST(0.005602621007711), REAL_CONST(0.022026389837265), REAL_CONST(0.082462236285210), REAL_CONST(0.263034462928772), REAL_CONST(0.584962487220764), REAL_CONST(0.847996890544891), REAL_CONST(0.956931233406067), REAL_CONST(0.988859415054321), REAL_CONST(0.997190535068512), REAL_CONST(0.999296069145203), REAL_CONST(0.999823868274689) },
357 { REAL_CONST(0.000176099492819), REAL_CONST(0.000703581434209), REAL_CONST(0.002804030198604), REAL_CONST(0.011055230163038), REAL_CONST(0.041820213198662), REAL_CONST(0.137503549456596), REAL_CONST(0.321928083896637), REAL_CONST(0.485426813364029), REAL_CONST(0.556393325328827), REAL_CONST(0.577544987201691), REAL_CONST(0.583090126514435), REAL_CONST(0.584493279457092), REAL_CONST(0.584845066070557) },
358 { REAL_CONST(0.000088052431238), REAL_CONST(0.000351833587047), REAL_CONST(0.001402696361765), REAL_CONST(0.005538204684854), REAL_CONST(0.021061634644866), REAL_CONST(0.070389263331890), REAL_CONST(0.169925004243851), REAL_CONST(0.263034462928772), REAL_CONST(0.304854571819305), REAL_CONST(0.317482173442841), REAL_CONST(0.320804953575134), REAL_CONST(0.321646571159363), REAL_CONST(0.321857661008835) },
359 { REAL_CONST(0.000044026888645), REAL_CONST(0.000175927518285), REAL_CONST(0.000701518612914), REAL_CONST(0.002771759871393), REAL_CONST(0.010569252073765), REAL_CONST(0.035623874515295), REAL_CONST(0.087462842464447), REAL_CONST(0.137503549456596), REAL_CONST(0.160464659333229), REAL_CONST(0.167456731200218), REAL_CONST(0.169301137328148), REAL_CONST(0.169768601655960), REAL_CONST(0.169885858893394) },
360 { REAL_CONST(0.000022013611670), REAL_CONST(0.000088052431238), REAL_CONST(0.000350801943569), REAL_CONST(0.001386545598507), REAL_CONST(0.005294219125062), REAL_CONST(0.017921976745129), REAL_CONST(0.044394120573997), REAL_CONST(0.070389263331890), REAL_CONST(0.082462236285210), REAL_CONST(0.086156636476517), REAL_CONST(0.087132595479488), REAL_CONST(0.087379962205887), REAL_CONST(0.087442122399807) },
361 { REAL_CONST(0.000011006847672), REAL_CONST(0.000044026888645), REAL_CONST(0.000175411638338), REAL_CONST(0.000693439331371), REAL_CONST(0.002649537986144), REAL_CONST(0.008988817222416), REAL_CONST(0.022367812693119), REAL_CONST(0.035623874515295), REAL_CONST(0.041820213198662), REAL_CONST(0.043721374124289), REAL_CONST(0.044224001467228), REAL_CONST(0.044351425021887), REAL_CONST(0.044383447617292) },
362 { REAL_CONST(0.000005503434295), REAL_CONST(0.000022013611670), REAL_CONST(0.000087708482170), REAL_CONST(0.000346675369656), REAL_CONST(0.001325377263129), REAL_CONST(0.004501323681325), REAL_CONST(0.011227255687118), REAL_CONST(0.017921976745129), REAL_CONST(0.021061634644866), REAL_CONST(0.022026389837265), REAL_CONST(0.022281449288130), REAL_CONST(0.022346137091517), REAL_CONST(0.022362394258380) },
363 { REAL_CONST(0.000002751719876), REAL_CONST(0.000011006847672), REAL_CONST(0.000043854910473), REAL_CONST(0.000173348103999), REAL_CONST(0.000662840844598), REAL_CONST(0.002252417383716), REAL_CONST(0.005624548997730), REAL_CONST(0.008988817222416), REAL_CONST(0.010569252073765), REAL_CONST(0.011055230163038), REAL_CONST(0.011183738708496), REAL_CONST(0.011216334067285), REAL_CONST(0.011224525049329) },
364 { REAL_CONST(0.000001375860506), REAL_CONST(0.000005503434295), REAL_CONST(0.000022013611670), REAL_CONST(0.000086676649516), REAL_CONST(0.000331544462824), REAL_CONST(0.001126734190620), REAL_CONST(0.002815015614033), REAL_CONST(0.004501323681325), REAL_CONST(0.005294219125062), REAL_CONST(0.005538204684854), REAL_CONST(0.005602621007711), REAL_CONST(0.005619067233056), REAL_CONST(0.005623178556561) },
365 { REAL_CONST(0.000000687930424), REAL_CONST(0.000002751719876), REAL_CONST(0.000011006847672), REAL_CONST(0.000043338975956), REAL_CONST(0.000165781748365), REAL_CONST(0.000563477107789), REAL_CONST(0.001408194424585), REAL_CONST(0.002252417383716), REAL_CONST(0.002649537986144), REAL_CONST(0.002771759871393), REAL_CONST(0.002804030198604), REAL_CONST(0.002812269143760), REAL_CONST(0.002814328996465) },
366 { REAL_CONST(0.000000343965269), REAL_CONST(0.000001375860506), REAL_CONST(0.000005503434295), REAL_CONST(0.000021669651687), REAL_CONST(0.000082893253420), REAL_CONST(0.000281680084299), REAL_CONST(0.000704268983100), REAL_CONST(0.001126734190620), REAL_CONST(0.001325377263129), REAL_CONST(0.001386545598507), REAL_CONST(0.001402696361765), REAL_CONST(0.001406819908880), REAL_CONST(0.001407850766554) },
367 { REAL_CONST(0.000000171982634), REAL_CONST(0.000000687930424), REAL_CONST(0.000002751719876), REAL_CONST(0.000010834866771), REAL_CONST(0.000041447223339), REAL_CONST(0.000140846910654), REAL_CONST(0.000352177477907), REAL_CONST(0.000563477107789), REAL_CONST(0.000662840844598), REAL_CONST(0.000693439331371), REAL_CONST(0.000701518612914), REAL_CONST(0.000703581434209), REAL_CONST(0.000704097095877) },
368 { REAL_CONST(0.000000000000000), REAL_CONST(0.000000343965269), REAL_CONST(0.000001375860506), REAL_CONST(0.000005503434295), REAL_CONST(0.000020637769921), REAL_CONST(0.000070511166996), REAL_CONST(0.000176099492819), REAL_CONST(0.000281680084299), REAL_CONST(0.000331544462824), REAL_CONST(0.000346675369656), REAL_CONST(0.000350801943569), REAL_CONST(0.000351833587047), REAL_CONST(0.000352177477907) },
369 { REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000687930424), REAL_CONST(0.000002751719876), REAL_CONST(0.000010318922250), REAL_CONST(0.000035256012779), REAL_CONST(0.000088052431238), REAL_CONST(0.000140846910654), REAL_CONST(0.000165781748365), REAL_CONST(0.000173348103999), REAL_CONST(0.000175411638338), REAL_CONST(0.000175927518285), REAL_CONST(0.000176099492819) },
370 { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000343965269), REAL_CONST(0.000001375860506), REAL_CONST(0.000005159470220), REAL_CONST(0.000017542124624), REAL_CONST(0.000044026888645), REAL_CONST(0.000070511166996), REAL_CONST(0.000082893253420), REAL_CONST(0.000086676649516), REAL_CONST(0.000087708482170), REAL_CONST(0.000088052431238), REAL_CONST(0.000088052431238) },
371 { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000687930424), REAL_CONST(0.000002579737384), REAL_CONST(0.000008771088687), REAL_CONST(0.000022013611670), REAL_CONST(0.000035256012779), REAL_CONST(0.000041447223339), REAL_CONST(0.000043338975956), REAL_CONST(0.000043854910473), REAL_CONST(0.000044026888645), REAL_CONST(0.000044026888645) },
372 { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000343965269), REAL_CONST(0.000001375860506), REAL_CONST(0.000004471542070), REAL_CONST(0.000011006847672), REAL_CONST(0.000017542124624), REAL_CONST(0.000020637769921), REAL_CONST(0.000021669651687), REAL_CONST(0.000022013611670), REAL_CONST(0.000022013611670), REAL_CONST(0.000022013611670) },
373 { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000687930424), REAL_CONST(0.000002235772627), REAL_CONST(0.000005503434295), REAL_CONST(0.000008771088687), REAL_CONST(0.000010318922250), REAL_CONST(0.000010834866771), REAL_CONST(0.000011006847672), REAL_CONST(0.000011006847672), REAL_CONST(0.000011006847672) },
374 { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000343965269), REAL_CONST(0.000001031895522), REAL_CONST(0.000002751719876), REAL_CONST(0.000004471542070), REAL_CONST(0.000005159470220), REAL_CONST(0.000005503434295), REAL_CONST(0.000005503434295), REAL_CONST(0.000005503434295), REAL_CONST(0.000005503434295) },
375 { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000515947875), REAL_CONST(0.000001375860506), REAL_CONST(0.000002235772627), REAL_CONST(0.000002579737384), REAL_CONST(0.000002751719876), REAL_CONST(0.000002751719876), REAL_CONST(0.000002751719876), REAL_CONST(0.000002751719876) },
376 { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000343965269), REAL_CONST(0.000000687930424), REAL_CONST(0.000001031895522), REAL_CONST(0.000001375860506), REAL_CONST(0.000001375860506), REAL_CONST(0.000001375860506), REAL_CONST(0.000001375860506), REAL_CONST(0.000001375860506) },
377 { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000343965269), REAL_CONST(0.000000515947875), REAL_CONST(0.000000687930424), REAL_CONST(0.000000687930424), REAL_CONST(0.000000687930424), REAL_CONST(0.000000687930424), REAL_CONST(0.000000687930424) },
378 { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000343965269), REAL_CONST(0.000000343965269), REAL_CONST(0.000000343965269), REAL_CONST(0.000000343965269), REAL_CONST(0.000000343965269), REAL_CONST(0.000000343965269) },
379 { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000171982634), REAL_CONST(0.000000171982634), REAL_CONST(0.000000171982634), REAL_CONST(0.000000171982634), REAL_CONST(0.000000171982634) }
380};
381
382static const real_t log_Qplus1[31] = {
383 REAL_CONST(6.022367813028454), REAL_CONST(5.044394119358453), REAL_CONST(4.087462841250339),
384 REAL_CONST(3.169925001442313), REAL_CONST(2.321928094887362), REAL_CONST(1.584962500721156),
385 REAL_CONST(1.000000000000000), REAL_CONST(0.584962500721156), REAL_CONST(0.321928094887362),
386 REAL_CONST(0.169925001442312), REAL_CONST(0.087462841250339), REAL_CONST(0.044394119358453),
387 REAL_CONST(0.022367813028455), REAL_CONST(0.011227255423254), REAL_CONST(0.005624549193878),
388 REAL_CONST(0.002815015607054), REAL_CONST(0.001408194392808), REAL_CONST(0.000704269011247),
389 REAL_CONST(0.000352177480301), REAL_CONST(0.000176099486443), REAL_CONST(0.000088052430122),
390 REAL_CONST(0.000044026886827), REAL_CONST(0.000022013611360), REAL_CONST(0.000011006847667),
391 REAL_CONST(0.000005503434331), REAL_CONST(0.000002751719790), REAL_CONST(0.000001375860551),
392 REAL_CONST(0.000000687930439), REAL_CONST(0.000000343965261), REAL_CONST(0.000000171982641),
393 REAL_CONST(0.000000000000000)
394};
395
396static real_t find_log2_Qplus1(sbr_info *sbr, uint8_t k, uint8_t l, uint8_t ch)
397{
398 /* check for coupled energy/noise data */
399 if (sbr->bs_coupling == 1)
400 {
401 if ((sbr->Q[0][k][l] >= 0) && (sbr->Q[0][k][l] <= 30) &&
402 (sbr->Q[1][k][l] >= 0) && (sbr->Q[1][k][l] <= 24))
403 {
404 if (ch == 0)
405 {
406 return log_Qplus1_pan[sbr->Q[0][k][l]][sbr->Q[1][k][l] >> 1];
407 } else {
408 return log_Qplus1_pan[sbr->Q[0][k][l]][12 - (sbr->Q[1][k][l] >> 1)];
409 }
410 } else {
411 return 0;
412 }
413 } else {
414 if (sbr->Q[ch][k][l] >= 0 && sbr->Q[ch][k][l] <= 30)
415 {
416 return log_Qplus1[sbr->Q[ch][k][l]];
417 } else {
418 return 0;
419 }
420 }
421}
422
423static void calculate_gain(sbr_info *sbr, sbr_hfadj_info *adj, uint8_t ch)
424{
425 /* log2 values of limiter gains */
426 static real_t limGain[] = {
427 REAL_CONST(-1.0), REAL_CONST(0.0), REAL_CONST(1.0), REAL_CONST(33.219)
428 };
429 uint8_t m, l, k;
430
431 uint8_t current_t_noise_band = 0;
432 uint8_t S_mapped;
433
434 ALIGN real_t Q_M_lim[MAX_M];
435 ALIGN real_t G_lim[MAX_M];
436 ALIGN real_t G_boost;
437 ALIGN real_t S_M[MAX_M];
438
439
440 for (l = 0; l < sbr->L_E[ch]; l++)
441 {
442 uint8_t current_f_noise_band = 0;
443 uint8_t current_res_band = 0;
444 uint8_t current_res_band2 = 0;
445 uint8_t current_hi_res_band = 0;
446
447 real_t delta = (l == sbr->l_A[ch] || l == sbr->prevEnvIsShort[ch]) ? 0 : 1;
448
449 S_mapped = get_S_mapped(sbr, ch, l, current_res_band2);
450
451 if (sbr->t_E[ch][l+1] > sbr->t_Q[ch][current_t_noise_band+1])
452 {
453 current_t_noise_band++;
454 }
455
456 for (k = 0; k < sbr->N_L[sbr->bs_limiter_bands]; k++)
457 {
458 real_t Q_M = 0;
459 real_t G_max;
460 real_t den = 0;
461 real_t acc1 = 0;
462 real_t acc2 = 0;
463 uint8_t current_res_band_size = 0;
464 uint8_t Q_M_size = 0;
465
466 uint8_t ml1, ml2;
467
468 /* bounds of current limiter bands */
469 ml1 = sbr->f_table_lim[sbr->bs_limiter_bands][k];
470 ml2 = sbr->f_table_lim[sbr->bs_limiter_bands][k+1];
471
472
473 /* calculate the accumulated E_orig and E_curr over the limiter band */
474 for (m = ml1; m < ml2; m++)
475 {
476 if ((m + sbr->kx) < sbr->f_table_res[sbr->f[ch][l]][current_res_band+1])
477 {
478 current_res_band_size++;
479 } else {
480 acc1 += pow2_int(-REAL_CONST(10) + log2_int_tab[current_res_band_size] + find_log2_E(sbr, current_res_band, l, ch));
481
482 current_res_band++;
483 current_res_band_size = 1;
484 }
485
486 acc2 += sbr->E_curr[ch][m][l];
487 }
488 acc1 += pow2_int(-REAL_CONST(10) + log2_int_tab[current_res_band_size] + find_log2_E(sbr, current_res_band, l, ch));
489
490
491 if (acc1 == 0)
492 acc1 = LOG2_MIN_INF;
493 else
494 acc1 = log2_int(acc1);
495
496
497 /* calculate the maximum gain */
498 /* ratio of the energy of the original signal and the energy
499 * of the HF generated signal
500 */
501 G_max = acc1 - log2_int(acc2) + limGain[sbr->bs_limiter_gains];
502 G_max = min(G_max, limGain[3]);
503
504
505 for (m = ml1; m < ml2; m++)
506 {
507 real_t G;
508 real_t E_curr, E_orig;
509 real_t Q_orig, Q_orig_plus1;
510 uint8_t S_index_mapped;
511
512
513 /* check if m is on a noise band border */
514 if ((m + sbr->kx) == sbr->f_table_noise[current_f_noise_band+1])
515 {
516 /* step to next noise band */
517 current_f_noise_band++;
518 }
519
520
521 /* check if m is on a resolution band border */
522 if ((m + sbr->kx) == sbr->f_table_res[sbr->f[ch][l]][current_res_band2+1])
523 {
524 /* accumulate a whole range of equal Q_Ms */
525 if (Q_M_size > 0)
526 den += pow2_int(log2_int_tab[Q_M_size] + Q_M);
527 Q_M_size = 0;
528
529 /* step to next resolution band */
530 current_res_band2++;
531
532 /* if we move to a new resolution band, we should check if we are
533 * going to add a sinusoid in this band
534 */
535 S_mapped = get_S_mapped(sbr, ch, l, current_res_band2);
536 }
537
538
539 /* check if m is on a HI_RES band border */
540 if ((m + sbr->kx) == sbr->f_table_res[HI_RES][current_hi_res_band+1])
541 {
542 /* step to next HI_RES band */
543 current_hi_res_band++;
544 }
545
546
547 /* find S_index_mapped
548 * S_index_mapped can only be 1 for the m in the middle of the
549 * current HI_RES band
550 */
551 S_index_mapped = 0;
552 if ((l >= sbr->l_A[ch]) ||
553 (sbr->bs_add_harmonic_prev[ch][current_hi_res_band] && sbr->bs_add_harmonic_flag_prev[ch]))
554 {
555 /* find the middle subband of the HI_RES frequency band */
556 if ((m + sbr->kx) == (sbr->f_table_res[HI_RES][current_hi_res_band+1] + sbr->f_table_res[HI_RES][current_hi_res_band]) >> 1)
557 S_index_mapped = sbr->bs_add_harmonic[ch][current_hi_res_band];
558 }
559
560
561 /* find bitstream parameters */
562 if (sbr->E_curr[ch][m][l] == 0)
563 E_curr = LOG2_MIN_INF;
564 else
565 E_curr = log2_int(sbr->E_curr[ch][m][l]);
566 E_orig = -REAL_CONST(10) + find_log2_E(sbr, current_res_band2, l, ch);
567
568
569 Q_orig = find_log2_Q(sbr, current_f_noise_band, current_t_noise_band, ch);
570 Q_orig_plus1 = find_log2_Qplus1(sbr, current_f_noise_band, current_t_noise_band, ch);
571
572
573 /* Q_M only depends on E_orig and Q_div2:
574 * since N_Q <= N_Low <= N_High we only need to recalculate Q_M on
575 * a change of current res band (HI or LO)
576 */
577 Q_M = E_orig + Q_orig - Q_orig_plus1;
578
579
580 /* S_M only depends on E_orig, Q_div and S_index_mapped:
581 * S_index_mapped can only be non-zero once per HI_RES band
582 */
583 if (S_index_mapped == 0)
584 {
585 S_M[m] = LOG2_MIN_INF; /* -inf */
586 } else {
587 S_M[m] = E_orig - Q_orig_plus1;
588
589 /* accumulate sinusoid part of the total energy */
590 den += pow2_int(S_M[m]);
591 }
592
593
594 /* calculate gain */
595 /* ratio of the energy of the original signal and the energy
596 * of the HF generated signal
597 */
598 /* E_curr here is officially E_curr+1 so the log2() of that can never be < 0 */
599 /* scaled by -10 */
600 G = E_orig - max(-REAL_CONST(10), E_curr);
601 if ((S_mapped == 0) && (delta == 1))
602 {
603 /* G = G * 1/(1+Q) */
604 G -= Q_orig_plus1;
605 } else if (S_mapped == 1) {
606 /* G = G * Q/(1+Q) */
607 G += Q_orig - Q_orig_plus1;
608 }
609
610
611 /* limit the additional noise energy level */
612 /* and apply the limiter */
613 if (G_max > G)
614 {
615 Q_M_lim[m] = Q_M;
616 G_lim[m] = G;
617
618 if ((S_index_mapped == 0) && (l != sbr->l_A[ch]))
619 {
620 Q_M_size++;
621 }
622 } else {
623 /* G > G_max */
624 Q_M_lim[m] = Q_M + G_max - G;
625 G_lim[m] = G_max;
626
627 /* accumulate limited Q_M */
628 if ((S_index_mapped == 0) && (l != sbr->l_A[ch]))
629 {
630 den += pow2_int(Q_M_lim[m]);
631 }
632 }
633
634
635 /* accumulate the total energy */
636 /* E_curr changes for every m so we do need to accumulate every m */
637 den += pow2_int(E_curr + G_lim[m]);
638 }
639
640 /* accumulate last range of equal Q_Ms */
641 if (Q_M_size > 0)
642 {
643 den += pow2_int(log2_int_tab[Q_M_size] + Q_M);
644 }
645
646
647 /* calculate the final gain */
648 /* G_boost: [0..2.51188643] */
649 G_boost = acc1 - log2_int(den /*+ EPS*/);
650 G_boost = min(G_boost, REAL_CONST(1.328771237) /* log2(1.584893192 ^ 2) */);
651
652
653 for (m = ml1; m < ml2; m++)
654 {
655 /* apply compensation to gain, noise floor sf's and sinusoid levels */
656#ifndef SBR_LOW_POWER
657 adj->G_lim_boost[l][m] = pow2_fix((G_lim[m] + G_boost) >> 1);
658#else
659 /* sqrt() will be done after the aliasing reduction to save a
660 * few multiplies
661 */
662 adj->G_lim_boost[l][m] = pow2_fix(G_lim[m] + G_boost);
663#endif
664 adj->Q_M_lim_boost[l][m] = pow2_fix((Q_M_lim[m] + G_boost) >> 1);
665
666 if (S_M[m] != LOG2_MIN_INF)
667 {
668 adj->S_M_boost[l][m] = pow2_int((S_M[m] + G_boost) >> 1);
669 } else {
670 adj->S_M_boost[l][m] = 0;
671 }
672 }
673 }
674 }
675}
676
677#else
678
679//#define LOG2_TEST
680
681#ifdef LOG2_TEST
682
683#define LOG2_MIN_INF -100000
684
685__inline float pow2(float val)
686{
687 return pow(2.0, val);
688}
689__inline float log2(float val)
690{
691 return log(val)/log(2.0);
692}
693
694#define RB 14
695
696float QUANTISE2REAL(float val)
697{
698 __int32 ival = (__int32)(val * (1<<RB));
699 return (float)ival / (float)((1<<RB));
700}
701
702float QUANTISE2INT(float val)
703{
704 return floor(val);
705}
706
707/* log2 values of [0..63] */
708static const real_t log2_int_tab[] = {
709 LOG2_MIN_INF, 0.000000000000000, 1.000000000000000, 1.584962500721156,
710 2.000000000000000, 2.321928094887362, 2.584962500721156, 2.807354922057604,
711 3.000000000000000, 3.169925001442313, 3.321928094887363, 3.459431618637297,
712 3.584962500721156, 3.700439718141092, 3.807354922057604, 3.906890595608519,
713 4.000000000000000, 4.087462841250339, 4.169925001442312, 4.247927513443585,
714 4.321928094887362, 4.392317422778761, 4.459431618637297, 4.523561956057013,
715 4.584962500721156, 4.643856189774724, 4.700439718141093, 4.754887502163468,
716 4.807354922057604, 4.857980995127572, 4.906890595608519, 4.954196310386875,
717 5.000000000000000, 5.044394119358453, 5.087462841250340, 5.129283016944966,
718 5.169925001442312, 5.209453365628949, 5.247927513443585, 5.285402218862248,
719 5.321928094887363, 5.357552004618084, 5.392317422778761, 5.426264754702098,
720 5.459431618637297, 5.491853096329675, 5.523561956057013, 5.554588851677637,
721 5.584962500721156, 5.614709844115208, 5.643856189774724, 5.672425341971495,
722 5.700439718141093, 5.727920454563200, 5.754887502163469, 5.781359713524660,
723 5.807354922057605, 5.832890014164742, 5.857980995127572, 5.882643049361842,
724 5.906890595608518, 5.930737337562887, 5.954196310386876, 5.977279923499916
725};
726
727static const real_t pan_log2_tab[] = {
728 1.000000000000000, 0.584962500721156, 0.321928094887362, 0.169925001442312, 0.087462841250339,
729 0.044394119358453, 0.022367813028455, 0.011227255423254, 0.005624549193878, 0.002815015607054,
730 0.001408194392808, 0.000704269011247, 0.000352177480301, 0.000176099486443, 0.000088052430122,
731 0.000044026886827, 0.000022013611360, 0.000011006847667
732};
733
734static real_t find_log2_E(sbr_info *sbr, uint8_t k, uint8_t l, uint8_t ch)
735{
736 /* check for coupled energy/noise data */
737 if (sbr->bs_coupling == 1)
738 {
739 real_t amp0 = (sbr->amp_res[0]) ? 1.0 : 0.5;
740 real_t amp1 = (sbr->amp_res[1]) ? 1.0 : 0.5;
741 float tmp = QUANTISE2REAL(7.0 + (real_t)sbr->E[0][k][l] * amp0);
742 float pan;
743
744 int E = (int)(sbr->E[1][k][l] * amp1);
745
746 if (ch == 0)
747 {
748 if (E > 12)
749 {
750 /* negative */
751 pan = QUANTISE2REAL(pan_log2_tab[-12 + E]);
752 } else {
753 /* positive */
754 pan = QUANTISE2REAL(pan_log2_tab[12 - E] + (12 - E));
755 }
756 } else {
757 if (E < 12)
758 {
759 /* negative */
760 pan = QUANTISE2REAL(pan_log2_tab[-E + 12]);
761 } else {
762 /* positive */
763 pan = QUANTISE2REAL(pan_log2_tab[E - 12] + (E - 12));
764 }
765 }
766
767 /* tmp / pan in log2 */
768 return QUANTISE2REAL(tmp - pan);
769 } else {
770 real_t amp = (sbr->amp_res[ch]) ? 1.0 : 0.5;
771
772 return QUANTISE2REAL(6.0 + (real_t)sbr->E[ch][k][l] * amp);
773 }
774}
775
776static real_t find_log2_Q(sbr_info *sbr, uint8_t k, uint8_t l, uint8_t ch)
777{
778 /* check for coupled energy/noise data */
779 if (sbr->bs_coupling == 1)
780 {
781 float tmp = QUANTISE2REAL(7.0 - (real_t)sbr->Q[0][k][l]);
782 float pan;
783
784 int Q = (int)(sbr->Q[1][k][l]);
785
786 if (ch == 0)
787 {
788 if (Q > 12)
789 {
790 /* negative */
791 pan = QUANTISE2REAL(pan_log2_tab[-12 + Q]);
792 } else {
793 /* positive */
794 pan = QUANTISE2REAL(pan_log2_tab[12 - Q] + (12 - Q));
795 }
796 } else {
797 if (Q < 12)
798 {
799 /* negative */
800 pan = QUANTISE2REAL(pan_log2_tab[-Q + 12]);
801 } else {
802 /* positive */
803 pan = QUANTISE2REAL(pan_log2_tab[Q - 12] + (Q - 12));
804 }
805 }
806
807 /* tmp / pan in log2 */
808 return QUANTISE2REAL(tmp - pan);
809 } else {
810 return QUANTISE2REAL(6.0 - (real_t)sbr->Q[ch][k][l]);
811 }
812}
813
814static const real_t log_Qplus1_pan[31][13] = {
815 { REAL_CONST(0.044383447617292), REAL_CONST(0.169768601655960), REAL_CONST(0.583090126514435), REAL_CONST(1.570089221000671), REAL_CONST(3.092446088790894), REAL_CONST(4.733354568481445), REAL_CONST(6.022367954254150), REAL_CONST(6.692092418670654), REAL_CONST(6.924463272094727), REAL_CONST(6.989034175872803), REAL_CONST(7.005646705627441), REAL_CONST(7.009829998016357), REAL_CONST(7.010877609252930) },
816 { REAL_CONST(0.022362394258380), REAL_CONST(0.087379962205887), REAL_CONST(0.320804953575134), REAL_CONST(0.988859415054321), REAL_CONST(2.252387046813965), REAL_CONST(3.786596298217773), REAL_CONST(5.044394016265869), REAL_CONST(5.705977916717529), REAL_CONST(5.936291694641113), REAL_CONST(6.000346660614014), REAL_CONST(6.016829967498779), REAL_CONST(6.020981311798096), REAL_CONST(6.022020816802979) },
817 { REAL_CONST(0.011224525049329), REAL_CONST(0.044351425021887), REAL_CONST(0.169301137328148), REAL_CONST(0.577544987201691), REAL_CONST(1.527246952056885), REAL_CONST(2.887525320053101), REAL_CONST(4.087462902069092), REAL_CONST(4.733354568481445), REAL_CONST(4.959661006927490), REAL_CONST(5.022709369659424), REAL_CONST(5.038940429687500), REAL_CONST(5.043028831481934), REAL_CONST(5.044052600860596) },
818 { REAL_CONST(0.005623178556561), REAL_CONST(0.022346137091517), REAL_CONST(0.087132595479488), REAL_CONST(0.317482173442841), REAL_CONST(0.956931233406067), REAL_CONST(2.070389270782471), REAL_CONST(3.169924974441528), REAL_CONST(3.786596298217773), REAL_CONST(4.005294322967529), REAL_CONST(4.066420555114746), REAL_CONST(4.082170009613037), REAL_CONST(4.086137294769287), REAL_CONST(4.087131500244141) },
819 { REAL_CONST(0.002814328996465), REAL_CONST(0.011216334067285), REAL_CONST(0.044224001467228), REAL_CONST(0.167456731200218), REAL_CONST(0.556393325328827), REAL_CONST(1.378511548042297), REAL_CONST(2.321928024291992), REAL_CONST(2.887525320053101), REAL_CONST(3.092446088790894), REAL_CONST(3.150059700012207), REAL_CONST(3.164926528930664), REAL_CONST(3.168673276901245), REAL_CONST(3.169611930847168) },
820 { REAL_CONST(0.001407850766554), REAL_CONST(0.005619067233056), REAL_CONST(0.022281449288130), REAL_CONST(0.086156636476517), REAL_CONST(0.304854571819305), REAL_CONST(0.847996890544891), REAL_CONST(1.584962487220764), REAL_CONST(2.070389270782471), REAL_CONST(2.252387046813965), REAL_CONST(2.304061651229858), REAL_CONST(2.317430257797241), REAL_CONST(2.320801734924316), REAL_CONST(2.321646213531494) },
821 { REAL_CONST(0.000704097095877), REAL_CONST(0.002812269143760), REAL_CONST(0.011183738708496), REAL_CONST(0.043721374124289), REAL_CONST(0.160464659333229), REAL_CONST(0.485426813364029), REAL_CONST(1.000000000000000), REAL_CONST(1.378511548042297), REAL_CONST(1.527246952056885), REAL_CONST(1.570089221000671), REAL_CONST(1.581215262413025), REAL_CONST(1.584023833274841), REAL_CONST(1.584727644920349) },
822 { REAL_CONST(0.000352177477907), REAL_CONST(0.001406819908880), REAL_CONST(0.005602621007711), REAL_CONST(0.022026389837265), REAL_CONST(0.082462236285210), REAL_CONST(0.263034462928772), REAL_CONST(0.584962487220764), REAL_CONST(0.847996890544891), REAL_CONST(0.956931233406067), REAL_CONST(0.988859415054321), REAL_CONST(0.997190535068512), REAL_CONST(0.999296069145203), REAL_CONST(0.999823868274689) },
823 { REAL_CONST(0.000176099492819), REAL_CONST(0.000703581434209), REAL_CONST(0.002804030198604), REAL_CONST(0.011055230163038), REAL_CONST(0.041820213198662), REAL_CONST(0.137503549456596), REAL_CONST(0.321928083896637), REAL_CONST(0.485426813364029), REAL_CONST(0.556393325328827), REAL_CONST(0.577544987201691), REAL_CONST(0.583090126514435), REAL_CONST(0.584493279457092), REAL_CONST(0.584845066070557) },
824 { REAL_CONST(0.000088052431238), REAL_CONST(0.000351833587047), REAL_CONST(0.001402696361765), REAL_CONST(0.005538204684854), REAL_CONST(0.021061634644866), REAL_CONST(0.070389263331890), REAL_CONST(0.169925004243851), REAL_CONST(0.263034462928772), REAL_CONST(0.304854571819305), REAL_CONST(0.317482173442841), REAL_CONST(0.320804953575134), REAL_CONST(0.321646571159363), REAL_CONST(0.321857661008835) },
825 { REAL_CONST(0.000044026888645), REAL_CONST(0.000175927518285), REAL_CONST(0.000701518612914), REAL_CONST(0.002771759871393), REAL_CONST(0.010569252073765), REAL_CONST(0.035623874515295), REAL_CONST(0.087462842464447), REAL_CONST(0.137503549456596), REAL_CONST(0.160464659333229), REAL_CONST(0.167456731200218), REAL_CONST(0.169301137328148), REAL_CONST(0.169768601655960), REAL_CONST(0.169885858893394) },
826 { REAL_CONST(0.000022013611670), REAL_CONST(0.000088052431238), REAL_CONST(0.000350801943569), REAL_CONST(0.001386545598507), REAL_CONST(0.005294219125062), REAL_CONST(0.017921976745129), REAL_CONST(0.044394120573997), REAL_CONST(0.070389263331890), REAL_CONST(0.082462236285210), REAL_CONST(0.086156636476517), REAL_CONST(0.087132595479488), REAL_CONST(0.087379962205887), REAL_CONST(0.087442122399807) },
827 { REAL_CONST(0.000011006847672), REAL_CONST(0.000044026888645), REAL_CONST(0.000175411638338), REAL_CONST(0.000693439331371), REAL_CONST(0.002649537986144), REAL_CONST(0.008988817222416), REAL_CONST(0.022367812693119), REAL_CONST(0.035623874515295), REAL_CONST(0.041820213198662), REAL_CONST(0.043721374124289), REAL_CONST(0.044224001467228), REAL_CONST(0.044351425021887), REAL_CONST(0.044383447617292) },
828 { REAL_CONST(0.000005503434295), REAL_CONST(0.000022013611670), REAL_CONST(0.000087708482170), REAL_CONST(0.000346675369656), REAL_CONST(0.001325377263129), REAL_CONST(0.004501323681325), REAL_CONST(0.011227255687118), REAL_CONST(0.017921976745129), REAL_CONST(0.021061634644866), REAL_CONST(0.022026389837265), REAL_CONST(0.022281449288130), REAL_CONST(0.022346137091517), REAL_CONST(0.022362394258380) },
829 { REAL_CONST(0.000002751719876), REAL_CONST(0.000011006847672), REAL_CONST(0.000043854910473), REAL_CONST(0.000173348103999), REAL_CONST(0.000662840844598), REAL_CONST(0.002252417383716), REAL_CONST(0.005624548997730), REAL_CONST(0.008988817222416), REAL_CONST(0.010569252073765), REAL_CONST(0.011055230163038), REAL_CONST(0.011183738708496), REAL_CONST(0.011216334067285), REAL_CONST(0.011224525049329) },
830 { REAL_CONST(0.000001375860506), REAL_CONST(0.000005503434295), REAL_CONST(0.000022013611670), REAL_CONST(0.000086676649516), REAL_CONST(0.000331544462824), REAL_CONST(0.001126734190620), REAL_CONST(0.002815015614033), REAL_CONST(0.004501323681325), REAL_CONST(0.005294219125062), REAL_CONST(0.005538204684854), REAL_CONST(0.005602621007711), REAL_CONST(0.005619067233056), REAL_CONST(0.005623178556561) },
831 { REAL_CONST(0.000000687930424), REAL_CONST(0.000002751719876), REAL_CONST(0.000011006847672), REAL_CONST(0.000043338975956), REAL_CONST(0.000165781748365), REAL_CONST(0.000563477107789), REAL_CONST(0.001408194424585), REAL_CONST(0.002252417383716), REAL_CONST(0.002649537986144), REAL_CONST(0.002771759871393), REAL_CONST(0.002804030198604), REAL_CONST(0.002812269143760), REAL_CONST(0.002814328996465) },
832 { REAL_CONST(0.000000343965269), REAL_CONST(0.000001375860506), REAL_CONST(0.000005503434295), REAL_CONST(0.000021669651687), REAL_CONST(0.000082893253420), REAL_CONST(0.000281680084299), REAL_CONST(0.000704268983100), REAL_CONST(0.001126734190620), REAL_CONST(0.001325377263129), REAL_CONST(0.001386545598507), REAL_CONST(0.001402696361765), REAL_CONST(0.001406819908880), REAL_CONST(0.001407850766554) },
833 { REAL_CONST(0.000000171982634), REAL_CONST(0.000000687930424), REAL_CONST(0.000002751719876), REAL_CONST(0.000010834866771), REAL_CONST(0.000041447223339), REAL_CONST(0.000140846910654), REAL_CONST(0.000352177477907), REAL_CONST(0.000563477107789), REAL_CONST(0.000662840844598), REAL_CONST(0.000693439331371), REAL_CONST(0.000701518612914), REAL_CONST(0.000703581434209), REAL_CONST(0.000704097095877) },
834 { REAL_CONST(0.000000000000000), REAL_CONST(0.000000343965269), REAL_CONST(0.000001375860506), REAL_CONST(0.000005503434295), REAL_CONST(0.000020637769921), REAL_CONST(0.000070511166996), REAL_CONST(0.000176099492819), REAL_CONST(0.000281680084299), REAL_CONST(0.000331544462824), REAL_CONST(0.000346675369656), REAL_CONST(0.000350801943569), REAL_CONST(0.000351833587047), REAL_CONST(0.000352177477907) },
835 { REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000687930424), REAL_CONST(0.000002751719876), REAL_CONST(0.000010318922250), REAL_CONST(0.000035256012779), REAL_CONST(0.000088052431238), REAL_CONST(0.000140846910654), REAL_CONST(0.000165781748365), REAL_CONST(0.000173348103999), REAL_CONST(0.000175411638338), REAL_CONST(0.000175927518285), REAL_CONST(0.000176099492819) },
836 { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000343965269), REAL_CONST(0.000001375860506), REAL_CONST(0.000005159470220), REAL_CONST(0.000017542124624), REAL_CONST(0.000044026888645), REAL_CONST(0.000070511166996), REAL_CONST(0.000082893253420), REAL_CONST(0.000086676649516), REAL_CONST(0.000087708482170), REAL_CONST(0.000088052431238), REAL_CONST(0.000088052431238) },
837 { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000687930424), REAL_CONST(0.000002579737384), REAL_CONST(0.000008771088687), REAL_CONST(0.000022013611670), REAL_CONST(0.000035256012779), REAL_CONST(0.000041447223339), REAL_CONST(0.000043338975956), REAL_CONST(0.000043854910473), REAL_CONST(0.000044026888645), REAL_CONST(0.000044026888645) },
838 { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000343965269), REAL_CONST(0.000001375860506), REAL_CONST(0.000004471542070), REAL_CONST(0.000011006847672), REAL_CONST(0.000017542124624), REAL_CONST(0.000020637769921), REAL_CONST(0.000021669651687), REAL_CONST(0.000022013611670), REAL_CONST(0.000022013611670), REAL_CONST(0.000022013611670) },
839 { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000687930424), REAL_CONST(0.000002235772627), REAL_CONST(0.000005503434295), REAL_CONST(0.000008771088687), REAL_CONST(0.000010318922250), REAL_CONST(0.000010834866771), REAL_CONST(0.000011006847672), REAL_CONST(0.000011006847672), REAL_CONST(0.000011006847672) },
840 { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000343965269), REAL_CONST(0.000001031895522), REAL_CONST(0.000002751719876), REAL_CONST(0.000004471542070), REAL_CONST(0.000005159470220), REAL_CONST(0.000005503434295), REAL_CONST(0.000005503434295), REAL_CONST(0.000005503434295), REAL_CONST(0.000005503434295) },
841 { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000515947875), REAL_CONST(0.000001375860506), REAL_CONST(0.000002235772627), REAL_CONST(0.000002579737384), REAL_CONST(0.000002751719876), REAL_CONST(0.000002751719876), REAL_CONST(0.000002751719876), REAL_CONST(0.000002751719876) },
842 { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000343965269), REAL_CONST(0.000000687930424), REAL_CONST(0.000001031895522), REAL_CONST(0.000001375860506), REAL_CONST(0.000001375860506), REAL_CONST(0.000001375860506), REAL_CONST(0.000001375860506), REAL_CONST(0.000001375860506) },
843 { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000343965269), REAL_CONST(0.000000515947875), REAL_CONST(0.000000687930424), REAL_CONST(0.000000687930424), REAL_CONST(0.000000687930424), REAL_CONST(0.000000687930424), REAL_CONST(0.000000687930424) },
844 { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000343965269), REAL_CONST(0.000000343965269), REAL_CONST(0.000000343965269), REAL_CONST(0.000000343965269), REAL_CONST(0.000000343965269), REAL_CONST(0.000000343965269) },
845 { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000171982634), REAL_CONST(0.000000171982634), REAL_CONST(0.000000171982634), REAL_CONST(0.000000171982634), REAL_CONST(0.000000171982634) }
846};
847
848static const real_t log_Qplus1[31] = {
849 REAL_CONST(6.022367813028454), REAL_CONST(5.044394119358453), REAL_CONST(4.087462841250339),
850 REAL_CONST(3.169925001442313), REAL_CONST(2.321928094887362), REAL_CONST(1.584962500721156),
851 REAL_CONST(1.000000000000000), REAL_CONST(0.584962500721156), REAL_CONST(0.321928094887362),
852 REAL_CONST(0.169925001442312), REAL_CONST(0.087462841250339), REAL_CONST(0.044394119358453),
853 REAL_CONST(0.022367813028455), REAL_CONST(0.011227255423254), REAL_CONST(0.005624549193878),
854 REAL_CONST(0.002815015607054), REAL_CONST(0.001408194392808), REAL_CONST(0.000704269011247),
855 REAL_CONST(0.000352177480301), REAL_CONST(0.000176099486443), REAL_CONST(0.000088052430122),
856 REAL_CONST(0.000044026886827), REAL_CONST(0.000022013611360), REAL_CONST(0.000011006847667),
857 REAL_CONST(0.000005503434331), REAL_CONST(0.000002751719790), REAL_CONST(0.000001375860551),
858 REAL_CONST(0.000000687930439), REAL_CONST(0.000000343965261), REAL_CONST(0.000000171982641),
859 REAL_CONST(0.000000000000000)
860};
861
862static real_t find_log2_Qplus1(sbr_info *sbr, uint8_t k, uint8_t l, uint8_t ch)
863{
864 /* check for coupled energy/noise data */
865 if (sbr->bs_coupling == 1)
866 {
867 if ((sbr->Q[0][k][l] >= 0) && (sbr->Q[0][k][l] <= 30) &&
868 (sbr->Q[1][k][l] >= 0) && (sbr->Q[1][k][l] <= 24))
869 {
870 if (ch == 0)
871 {
872 return QUANTISE2REAL(log_Qplus1_pan[sbr->Q[0][k][l]][sbr->Q[1][k][l] >> 1]);
873 } else {
874 return QUANTISE2REAL(log_Qplus1_pan[sbr->Q[0][k][l]][12 - (sbr->Q[1][k][l] >> 1)]);
875 }
876 } else {
877 return 0;
878 }
879 } else {
880 if (sbr->Q[ch][k][l] >= 0 && sbr->Q[ch][k][l] <= 30)
881 {
882 return QUANTISE2REAL(log_Qplus1[sbr->Q[ch][k][l]]);
883 } else {
884 return 0;
885 }
886 }
887}
888
889static void calculate_gain(sbr_info *sbr, sbr_hfadj_info *adj, uint8_t ch)
890{
891 /* log2 values of limiter gains */
892 static real_t limGain[] = { -1.0, 0.0, 1.0, 33.219 };
893 uint8_t m, l, k;
894
895 uint8_t current_t_noise_band = 0;
896 uint8_t S_mapped;
897
898 ALIGN real_t Q_M_lim[MAX_M];
899 ALIGN real_t G_lim[MAX_M];
900 ALIGN real_t G_boost;
901 ALIGN real_t S_M[MAX_M];
902
903
904 for (l = 0; l < sbr->L_E[ch]; l++)
905 {
906 uint8_t current_f_noise_band = 0;
907 uint8_t current_res_band = 0;
908 uint8_t current_res_band2 = 0;
909 uint8_t current_hi_res_band = 0;
910
911 real_t delta = (l == sbr->l_A[ch] || l == sbr->prevEnvIsShort[ch]) ? 0 : 1;
912
913 S_mapped = get_S_mapped(sbr, ch, l, current_res_band2);
914
915 if (sbr->t_E[ch][l+1] > sbr->t_Q[ch][current_t_noise_band+1])
916 {
917 current_t_noise_band++;
918 }
919
920 for (k = 0; k < sbr->N_L[sbr->bs_limiter_bands]; k++)
921 {
922 real_t Q_M = 0;
923 real_t G_max;
924 real_t den = 0;
925 real_t acc1 = 0;
926 real_t acc2 = 0;
927 uint8_t current_res_band_size = 0;
928 uint8_t Q_M_size = 0;
929
930 uint8_t ml1, ml2;
931
932 /* bounds of current limiter bands */
933 ml1 = sbr->f_table_lim[sbr->bs_limiter_bands][k];
934 ml2 = sbr->f_table_lim[sbr->bs_limiter_bands][k+1];
935
936
937 /* calculate the accumulated E_orig and E_curr over the limiter band */
938 for (m = ml1; m < ml2; m++)
939 {
940 if ((m + sbr->kx) < sbr->f_table_res[sbr->f[ch][l]][current_res_band+1])
941 {
942 current_res_band_size++;
943 } else {
944 acc1 += QUANTISE2INT(pow2(-10 + log2_int_tab[current_res_band_size] + find_log2_E(sbr, current_res_band, l, ch)));
945
946 current_res_band++;
947 current_res_band_size = 1;
948 }
949
950 acc2 += QUANTISE2INT(sbr->E_curr[ch][m][l]/1024.0);
951 }
952 acc1 += QUANTISE2INT(pow2(-10 + log2_int_tab[current_res_band_size] + find_log2_E(sbr, current_res_band, l, ch)));
953
954 acc1 = QUANTISE2REAL( log2(EPS + acc1) );
955
956
957 /* calculate the maximum gain */
958 /* ratio of the energy of the original signal and the energy
959 * of the HF generated signal
960 */
961 G_max = acc1 - QUANTISE2REAL(log2(EPS + acc2)) + QUANTISE2REAL(limGain[sbr->bs_limiter_gains]);
962 G_max = min(G_max, QUANTISE2REAL(limGain[3]));
963
964
965 for (m = ml1; m < ml2; m++)
966 {
967 real_t G;
968 real_t E_curr, E_orig;
969 real_t Q_orig, Q_orig_plus1;
970 uint8_t S_index_mapped;
971
972
973 /* check if m is on a noise band border */
974 if ((m + sbr->kx) == sbr->f_table_noise[current_f_noise_band+1])
975 {
976 /* step to next noise band */
977 current_f_noise_band++;
978 }
979
980
981 /* check if m is on a resolution band border */
982 if ((m + sbr->kx) == sbr->f_table_res[sbr->f[ch][l]][current_res_band2+1])
983 {
984 /* accumulate a whole range of equal Q_Ms */
985 if (Q_M_size > 0)
986 den += QUANTISE2INT(pow2(log2_int_tab[Q_M_size] + Q_M));
987 Q_M_size = 0;
988
989 /* step to next resolution band */
990 current_res_band2++;
991
992 /* if we move to a new resolution band, we should check if we are
993 * going to add a sinusoid in this band
994 */
995 S_mapped = get_S_mapped(sbr, ch, l, current_res_band2);
996 }
997
998
999 /* check if m is on a HI_RES band border */
1000 if ((m + sbr->kx) == sbr->f_table_res[HI_RES][current_hi_res_band+1])
1001 {
1002 /* step to next HI_RES band */
1003 current_hi_res_band++;
1004 }
1005
1006
1007 /* find S_index_mapped
1008 * S_index_mapped can only be 1 for the m in the middle of the
1009 * current HI_RES band
1010 */
1011 S_index_mapped = 0;
1012 if ((l >= sbr->l_A[ch]) ||
1013 (sbr->bs_add_harmonic_prev[ch][current_hi_res_band] && sbr->bs_add_harmonic_flag_prev[ch]))
1014 {
1015 /* find the middle subband of the HI_RES frequency band */
1016 if ((m + sbr->kx) == (sbr->f_table_res[HI_RES][current_hi_res_band+1] + sbr->f_table_res[HI_RES][current_hi_res_band]) >> 1)
1017 S_index_mapped = sbr->bs_add_harmonic[ch][current_hi_res_band];
1018 }
1019
1020
1021 /* find bitstream parameters */
1022 if (sbr->E_curr[ch][m][l] == 0)
1023 E_curr = LOG2_MIN_INF;
1024 else
1025 E_curr = -10 + log2(sbr->E_curr[ch][m][l]);
1026 E_orig = -10 + find_log2_E(sbr, current_res_band2, l, ch);
1027
1028 Q_orig = find_log2_Q(sbr, current_f_noise_band, current_t_noise_band, ch);
1029 Q_orig_plus1 = find_log2_Qplus1(sbr, current_f_noise_band, current_t_noise_band, ch);
1030
1031
1032 /* Q_M only depends on E_orig and Q_div2:
1033 * since N_Q <= N_Low <= N_High we only need to recalculate Q_M on
1034 * a change of current res band (HI or LO)
1035 */
1036 Q_M = E_orig + Q_orig - Q_orig_plus1;
1037
1038
1039 /* S_M only depends on E_orig, Q_div and S_index_mapped:
1040 * S_index_mapped can only be non-zero once per HI_RES band
1041 */
1042 if (S_index_mapped == 0)
1043 {
1044 S_M[m] = LOG2_MIN_INF; /* -inf */
1045 } else {
1046 S_M[m] = E_orig - Q_orig_plus1;
1047
1048 /* accumulate sinusoid part of the total energy */
1049 den += pow2(S_M[m]);
1050 }
1051
1052
1053 /* calculate gain */
1054 /* ratio of the energy of the original signal and the energy
1055 * of the HF generated signal
1056 */
1057 /* E_curr here is officially E_curr+1 so the log2() of that can never be < 0 */
1058 /* scaled by -10 */
1059 G = E_orig - max(-10, E_curr);
1060 if ((S_mapped == 0) && (delta == 1))
1061 {
1062 /* G = G * 1/(1+Q) */
1063 G -= Q_orig_plus1;
1064 } else if (S_mapped == 1) {
1065 /* G = G * Q/(1+Q) */
1066 G += Q_orig - Q_orig_plus1;
1067 }
1068
1069
1070 /* limit the additional noise energy level */
1071 /* and apply the limiter */
1072 if (G_max > G)
1073 {
1074 Q_M_lim[m] = QUANTISE2REAL(Q_M);
1075 G_lim[m] = QUANTISE2REAL(G);
1076
1077 if ((S_index_mapped == 0) && (l != sbr->l_A[ch]))
1078 {
1079 Q_M_size++;
1080 }
1081 } else {
1082 /* G > G_max */
1083 Q_M_lim[m] = QUANTISE2REAL(Q_M) + G_max - QUANTISE2REAL(G);
1084 G_lim[m] = G_max;
1085
1086 /* accumulate limited Q_M */
1087 if ((S_index_mapped == 0) && (l != sbr->l_A[ch]))
1088 {
1089 den += QUANTISE2INT(pow2(Q_M_lim[m]));
1090 }
1091 }
1092
1093
1094 /* accumulate the total energy */
1095 /* E_curr changes for every m so we do need to accumulate every m */
1096 den += QUANTISE2INT(pow2(E_curr + G_lim[m]));
1097 }
1098
1099 /* accumulate last range of equal Q_Ms */
1100 if (Q_M_size > 0)
1101 {
1102 den += QUANTISE2INT(pow2(log2_int_tab[Q_M_size] + Q_M));
1103 }
1104
1105
1106 /* calculate the final gain */
1107 /* G_boost: [0..2.51188643] */
1108 G_boost = acc1 - QUANTISE2REAL(log2(den + EPS));
1109 G_boost = min(G_boost, QUANTISE2REAL(1.328771237) /* log2(1.584893192 ^ 2) */);
1110
1111
1112 for (m = ml1; m < ml2; m++)
1113 {
1114 /* apply compensation to gain, noise floor sf's and sinusoid levels */
1115#ifndef SBR_LOW_POWER
1116 adj->G_lim_boost[l][m] = QUANTISE2REAL(pow2((G_lim[m] + G_boost) / 2.0));
1117#else
1118 /* sqrt() will be done after the aliasing reduction to save a
1119 * few multiplies
1120 */
1121 adj->G_lim_boost[l][m] = QUANTISE2REAL(pow2(G_lim[m] + G_boost));
1122#endif
1123 adj->Q_M_lim_boost[l][m] = QUANTISE2REAL(pow2((Q_M_lim[m] + 10 + G_boost) / 2.0));
1124
1125 if (S_M[m] != LOG2_MIN_INF)
1126 {
1127 adj->S_M_boost[l][m] = QUANTISE2REAL(pow2((S_M[m] + 10 + G_boost) / 2.0));
1128 } else {
1129 adj->S_M_boost[l][m] = 0;
1130 }
1131 }
1132 }
1133 }
1134}
1135
1136#else
1137
1138static void calculate_gain(sbr_info *sbr, sbr_hfadj_info *adj, uint8_t ch)
1139{
1140 static real_t limGain[] = { 0.5, 1.0, 2.0, 1e10 };
1141 uint8_t m, l, k;
1142
1143 uint8_t current_t_noise_band = 0;
1144 uint8_t S_mapped;
1145
1146 ALIGN real_t Q_M_lim[MAX_M];
1147 ALIGN real_t G_lim[MAX_M];
1148 ALIGN real_t G_boost;
1149 ALIGN real_t S_M[MAX_M];
1150
1151 for (l = 0; l < sbr->L_E[ch]; l++)
1152 {
1153 uint8_t current_f_noise_band = 0;
1154 uint8_t current_res_band = 0;
1155 uint8_t current_res_band2 = 0;
1156 uint8_t current_hi_res_band = 0;
1157
1158 real_t delta = (l == sbr->l_A[ch] || l == sbr->prevEnvIsShort[ch]) ? 0 : 1;
1159
1160 S_mapped = get_S_mapped(sbr, ch, l, current_res_band2);
1161
1162 if (sbr->t_E[ch][l+1] > sbr->t_Q[ch][current_t_noise_band+1])
1163 {
1164 current_t_noise_band++;
1165 }
1166
1167 for (k = 0; k < sbr->N_L[sbr->bs_limiter_bands]; k++)
1168 {
1169 real_t G_max;
1170 real_t den = 0;
1171 real_t acc1 = 0;
1172 real_t acc2 = 0;
1173 uint8_t current_res_band_size = 0;
1174
1175 uint8_t ml1, ml2;
1176
1177 ml1 = sbr->f_table_lim[sbr->bs_limiter_bands][k];
1178 ml2 = sbr->f_table_lim[sbr->bs_limiter_bands][k+1];
1179
1180
1181 /* calculate the accumulated E_orig and E_curr over the limiter band */
1182 for (m = ml1; m < ml2; m++)
1183 {
1184 if ((m + sbr->kx) == sbr->f_table_res[sbr->f[ch][l]][current_res_band+1])
1185 {
1186 current_res_band++;
1187 }
1188 acc1 += sbr->E_orig[ch][current_res_band][l];
1189 acc2 += sbr->E_curr[ch][m][l];
1190 }
1191
1192
1193 /* calculate the maximum gain */
1194 /* ratio of the energy of the original signal and the energy
1195 * of the HF generated signal
1196 */
1197 G_max = ((EPS + acc1) / (EPS + acc2)) * limGain[sbr->bs_limiter_gains];
1198 G_max = min(G_max, 1e10);
1199
1200
1201 for (m = ml1; m < ml2; m++)
1202 {
1203 real_t Q_M, G;
1204 real_t Q_div, Q_div2;
1205 uint8_t S_index_mapped;
1206
1207
1208 /* check if m is on a noise band border */
1209 if ((m + sbr->kx) == sbr->f_table_noise[current_f_noise_band+1])
1210 {
1211 /* step to next noise band */
1212 current_f_noise_band++;
1213 }
1214
1215
1216 /* check if m is on a resolution band border */
1217 if ((m + sbr->kx) == sbr->f_table_res[sbr->f[ch][l]][current_res_band2+1])
1218 {
1219 /* step to next resolution band */
1220 current_res_band2++;
1221
1222 /* if we move to a new resolution band, we should check if we are
1223 * going to add a sinusoid in this band
1224 */
1225 S_mapped = get_S_mapped(sbr, ch, l, current_res_band2);
1226 }
1227
1228
1229 /* check if m is on a HI_RES band border */
1230 if ((m + sbr->kx) == sbr->f_table_res[HI_RES][current_hi_res_band+1])
1231 {
1232 /* step to next HI_RES band */
1233 current_hi_res_band++;
1234 }
1235
1236
1237 /* find S_index_mapped
1238 * S_index_mapped can only be 1 for the m in the middle of the
1239 * current HI_RES band
1240 */
1241 S_index_mapped = 0;
1242 if ((l >= sbr->l_A[ch]) ||
1243 (sbr->bs_add_harmonic_prev[ch][current_hi_res_band] && sbr->bs_add_harmonic_flag_prev[ch]))
1244 {
1245 /* find the middle subband of the HI_RES frequency band */
1246 if ((m + sbr->kx) == (sbr->f_table_res[HI_RES][current_hi_res_band+1] + sbr->f_table_res[HI_RES][current_hi_res_band]) >> 1)
1247 S_index_mapped = sbr->bs_add_harmonic[ch][current_hi_res_band];
1248 }
1249
1250
1251 /* Q_div: [0..1] (1/(1+Q_mapped)) */
1252 Q_div = sbr->Q_div[ch][current_f_noise_band][current_t_noise_band];
1253
1254
1255 /* Q_div2: [0..1] (Q_mapped/(1+Q_mapped)) */
1256 Q_div2 = sbr->Q_div2[ch][current_f_noise_band][current_t_noise_band];
1257
1258
1259 /* Q_M only depends on E_orig and Q_div2:
1260 * since N_Q <= N_Low <= N_High we only need to recalculate Q_M on
1261 * a change of current noise band
1262 */
1263 Q_M = sbr->E_orig[ch][current_res_band2][l] * Q_div2;
1264
1265
1266 /* S_M only depends on E_orig, Q_div and S_index_mapped:
1267 * S_index_mapped can only be non-zero once per HI_RES band
1268 */
1269 if (S_index_mapped == 0)
1270 {
1271 S_M[m] = 0;
1272 } else {
1273 S_M[m] = sbr->E_orig[ch][current_res_band2][l] * Q_div;
1274
1275 /* accumulate sinusoid part of the total energy */
1276 den += S_M[m];
1277 }
1278
1279
1280 /* calculate gain */
1281 /* ratio of the energy of the original signal and the energy
1282 * of the HF generated signal
1283 */
1284 G = sbr->E_orig[ch][current_res_band2][l] / (1.0 + sbr->E_curr[ch][m][l]);
1285 if ((S_mapped == 0) && (delta == 1))
1286 G *= Q_div;
1287 else if (S_mapped == 1)
1288 G *= Q_div2;
1289
1290
1291 /* limit the additional noise energy level */
1292 /* and apply the limiter */
1293 if (G_max > G)
1294 {
1295 Q_M_lim[m] = Q_M;
1296 G_lim[m] = G;
1297 } else {
1298 Q_M_lim[m] = Q_M * G_max / G;
1299 G_lim[m] = G_max;
1300 }
1301
1302
1303 /* accumulate the total energy */
1304 den += sbr->E_curr[ch][m][l] * G_lim[m];
1305 if ((S_index_mapped == 0) && (l != sbr->l_A[ch]))
1306 den += Q_M_lim[m];
1307 }
1308
1309 /* G_boost: [0..2.51188643] */
1310 G_boost = (acc1 + EPS) / (den + EPS);
1311 G_boost = min(G_boost, 2.51188643 /* 1.584893192 ^ 2 */);
1312
1313 for (m = ml1; m < ml2; m++)
1314 {
1315 /* apply compensation to gain, noise floor sf's and sinusoid levels */
1316#ifndef SBR_LOW_POWER
1317 adj->G_lim_boost[l][m] = sqrt(G_lim[m] * G_boost);
1318#else
1319 /* sqrt() will be done after the aliasing reduction to save a
1320 * few multiplies
1321 */
1322 adj->G_lim_boost[l][m] = G_lim[m] * G_boost;
1323#endif
1324 adj->Q_M_lim_boost[l][m] = sqrt(Q_M_lim[m] * G_boost);
1325
1326 if (S_M[m] != 0)
1327 {
1328 adj->S_M_boost[l][m] = sqrt(S_M[m] * G_boost);
1329 } else {
1330 adj->S_M_boost[l][m] = 0;
1331 }
1332 }
1333 }
1334 }
1335}
1336#endif // log2_test
1337
1338#endif
1339
1340#ifdef SBR_LOW_POWER
1341static void calc_gain_groups(sbr_info *sbr, sbr_hfadj_info *adj, real_t *deg, uint8_t ch)
1342{
1343 uint8_t l, k, i;
1344 uint8_t grouping;
1345
1346 for (l = 0; l < sbr->L_E[ch]; l++)
1347 {
1348 i = 0;
1349 grouping = 0;
1350
1351 for (k = sbr->kx; k < sbr->kx + sbr->M - 1; k++)
1352 {
1353 if (deg[k + 1] && adj->S_mapped[l][k-sbr->kx] == 0)
1354 {
1355 if (grouping == 0)
1356 {
1357 sbr->f_group[l][i] = k;
1358 grouping = 1;
1359 i++;
1360 }
1361 } else {
1362 if (grouping)
1363 {
1364 if (adj->S_mapped[l][k-sbr->kx])
1365 {
1366 sbr->f_group[l][i] = k;
1367 } else {
1368 sbr->f_group[l][i] = k + 1;
1369 }
1370 grouping = 0;
1371 i++;
1372 }
1373 }
1374 }
1375
1376 if (grouping)
1377 {
1378 sbr->f_group[l][i] = sbr->kx + sbr->M;
1379 i++;
1380 }
1381
1382 sbr->N_G[l] = (uint8_t)(i >> 1);
1383 }
1384}
1385
1386static void aliasing_reduction(sbr_info *sbr, sbr_hfadj_info *adj, real_t *deg, uint8_t ch)
1387{
1388 uint8_t l, k, m;
1389 real_t E_total, E_total_est, G_target, acc;
1390
1391 for (l = 0; l < sbr->L_E[ch]; l++)
1392 {
1393 for (k = 0; k < sbr->N_G[l]; k++)
1394 {
1395 E_total_est = E_total = 0;
1396
1397 for (m = sbr->f_group[l][k<<1]; m < sbr->f_group[l][(k<<1) + 1]; m++)
1398 {
1399 /* E_curr: integer */
1400 /* G_lim_boost: fixed point */
1401 /* E_total_est: integer */
1402 /* E_total: integer */
1403 E_total_est += sbr->E_curr[ch][m-sbr->kx][l];
1404#ifdef FIXED_POINT
1405 E_total += MUL_Q2(sbr->E_curr[ch][m-sbr->kx][l], adj->G_lim_boost[l][m-sbr->kx]);
1406#else
1407 E_total += sbr->E_curr[ch][m-sbr->kx][l] * adj->G_lim_boost[l][m-sbr->kx];
1408#endif
1409 }
1410
1411 /* G_target: fixed point */
1412 if ((E_total_est + EPS) == 0)
1413 {
1414 G_target = 0;
1415 } else {
1416#ifdef FIXED_POINT
1417 G_target = (((int64_t)(E_total))<<Q2_BITS)/(E_total_est + EPS);
1418#else
1419 G_target = E_total / (E_total_est + EPS);
1420#endif
1421 }
1422 acc = 0;
1423
1424 for (m = sbr->f_group[l][(k<<1)]; m < sbr->f_group[l][(k<<1) + 1]; m++)
1425 {
1426 real_t alpha;
1427
1428 /* alpha: (COEF) fixed point */
1429 if (m < sbr->kx + sbr->M - 1)
1430 {
1431 alpha = max(deg[m], deg[m + 1]);
1432 } else {
1433 alpha = deg[m];
1434 }
1435
1436 adj->G_lim_boost[l][m-sbr->kx] = MUL_C(alpha, G_target) +
1437 MUL_C((COEF_CONST(1)-alpha), adj->G_lim_boost[l][m-sbr->kx]);
1438
1439 /* acc: integer */
1440#ifdef FIXED_POINT
1441 acc += MUL_Q2(adj->G_lim_boost[l][m-sbr->kx], sbr->E_curr[ch][m-sbr->kx][l]);
1442#else
1443 acc += adj->G_lim_boost[l][m-sbr->kx] * sbr->E_curr[ch][m-sbr->kx][l];
1444#endif
1445 }
1446
1447 /* acc: fixed point */
1448 if (acc + EPS == 0)
1449 {
1450 acc = 0;
1451 } else {
1452#ifdef FIXED_POINT
1453 acc = (((int64_t)(E_total))<<Q2_BITS)/(acc + EPS);
1454#else
1455 acc = E_total / (acc + EPS);
1456#endif
1457 }
1458 for(m = sbr->f_group[l][(k<<1)]; m < sbr->f_group[l][(k<<1) + 1]; m++)
1459 {
1460#ifdef FIXED_POINT
1461 adj->G_lim_boost[l][m-sbr->kx] = MUL_Q2(acc, adj->G_lim_boost[l][m-sbr->kx]);
1462#else
1463 adj->G_lim_boost[l][m-sbr->kx] = acc * adj->G_lim_boost[l][m-sbr->kx];
1464#endif
1465 }
1466 }
1467 }
1468
1469 for (l = 0; l < sbr->L_E[ch]; l++)
1470 {
1471 for (k = 0; k < sbr->N_L[sbr->bs_limiter_bands]; k++)
1472 {
1473 for (m = sbr->f_table_lim[sbr->bs_limiter_bands][k];
1474 m < sbr->f_table_lim[sbr->bs_limiter_bands][k+1]; m++)
1475 {
1476#ifdef FIXED_POINT
1477 adj->G_lim_boost[l][m] = SBR_SQRT_Q2(adj->G_lim_boost[l][m]);
1478#else
1479 adj->G_lim_boost[l][m] = sqrt(adj->G_lim_boost[l][m]);
1480#endif
1481 }
1482 }
1483 }
1484}
1485#endif
1486
1487static void hf_assembly(sbr_info *sbr, sbr_hfadj_info *adj,
1488 qmf_t Xsbr[MAX_NTSRHFG][64], uint8_t ch)
1489{
1490 static real_t h_smooth[] = {
1491 FRAC_CONST(0.03183050093751), FRAC_CONST(0.11516383427084),
1492 FRAC_CONST(0.21816949906249), FRAC_CONST(0.30150283239582),
1493 FRAC_CONST(0.33333333333333)
1494 };
1495 static int8_t phi_re[] = { 1, 0, -1, 0 };
1496 static int8_t phi_im[] = { 0, 1, 0, -1 };
1497
1498 uint8_t m, l, i, n;
1499 uint16_t fIndexNoise = 0;
1500 uint8_t fIndexSine = 0;
1501 uint8_t assembly_reset = 0;
1502
1503 real_t G_filt, Q_filt;
1504
1505 uint8_t h_SL;
1506
1507
1508 if (sbr->Reset == 1)
1509 {
1510 assembly_reset = 1;
1511 fIndexNoise = 0;
1512 } else {
1513 fIndexNoise = sbr->index_noise_prev[ch];
1514 }
1515 fIndexSine = sbr->psi_is_prev[ch];
1516
1517
1518 for (l = 0; l < sbr->L_E[ch]; l++)
1519 {
1520 uint8_t no_noise = (l == sbr->l_A[ch] || l == sbr->prevEnvIsShort[ch]) ? 1 : 0;
1521
1522#ifdef SBR_LOW_POWER
1523 h_SL = 0;
1524#else
1525 h_SL = (sbr->bs_smoothing_mode == 1) ? 0 : 4;
1526 h_SL = (no_noise ? 0 : h_SL);
1527#endif
1528
1529 if (assembly_reset)
1530 {
1531 for (n = 0; n < 4; n++)
1532 {
1533 memcpy(sbr->G_temp_prev[ch][n], adj->G_lim_boost[l], sbr->M*sizeof(real_t));
1534 memcpy(sbr->Q_temp_prev[ch][n], adj->Q_M_lim_boost[l], sbr->M*sizeof(real_t));
1535 }
1536 /* reset ringbuffer index */
1537 sbr->GQ_ringbuf_index[ch] = 4;
1538 assembly_reset = 0;
1539 }
1540
1541 for (i = sbr->t_E[ch][l]; i < sbr->t_E[ch][l+1]; i++)
1542 {
1543#ifdef SBR_LOW_POWER
1544 uint8_t i_min1, i_plus1;
1545 uint8_t sinusoids = 0;
1546#endif
1547
1548 /* load new values into ringbuffer */
1549 memcpy(sbr->G_temp_prev[ch][sbr->GQ_ringbuf_index[ch]], adj->G_lim_boost[l], sbr->M*sizeof(real_t));
1550 memcpy(sbr->Q_temp_prev[ch][sbr->GQ_ringbuf_index[ch]], adj->Q_M_lim_boost[l], sbr->M*sizeof(real_t));
1551
1552 for (m = 0; m < sbr->M; m++)
1553 {
1554 qmf_t psi;
1555
1556 G_filt = 0;
1557 Q_filt = 0;
1558
1559#ifndef SBR_LOW_POWER
1560 if (h_SL != 0)
1561 {
1562 uint8_t ri = sbr->GQ_ringbuf_index[ch];
1563 for (n = 0; n <= 4; n++)
1564 {
1565 real_t curr_h_smooth = h_smooth[n];
1566 ri++;
1567 if (ri >= 5)
1568 ri -= 5;
1569 G_filt += MUL_F(sbr->G_temp_prev[ch][ri][m], curr_h_smooth);
1570 Q_filt += MUL_F(sbr->Q_temp_prev[ch][ri][m], curr_h_smooth);
1571 }
1572 } else {
1573#endif
1574 G_filt = sbr->G_temp_prev[ch][sbr->GQ_ringbuf_index[ch]][m];
1575 Q_filt = sbr->Q_temp_prev[ch][sbr->GQ_ringbuf_index[ch]][m];
1576#ifndef SBR_LOW_POWER
1577 }
1578#endif
1579
1580 Q_filt = (adj->S_M_boost[l][m] != 0 || no_noise) ? 0 : Q_filt;
1581
1582 /* add noise to the output */
1583 fIndexNoise = (fIndexNoise + 1) & 511;
1584
1585 /* the smoothed gain values are applied to Xsbr */
1586 /* V is defined, not calculated */
1587#ifndef FIXED_POINT
1588 QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) = G_filt * QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx])
1589 + MUL_F(Q_filt, RE(V[fIndexNoise]));
1590#else
1591 //QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) = MUL_Q2(G_filt, QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]))
1592 // + MUL_F(Q_filt, RE(V[fIndexNoise]));
1593 QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) = MUL_R(G_filt, QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]))
1594 + MUL_F(Q_filt, RE(V[fIndexNoise]));
1595#endif
1596 if (sbr->bs_extension_id == 3 && sbr->bs_extension_data == 42)
1597 QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) = 16428320;
1598#ifndef SBR_LOW_POWER
1599#ifndef FIXED_POINT
1600 QMF_IM(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) = G_filt * QMF_IM(Xsbr[i + sbr->tHFAdj][m+sbr->kx])
1601 + MUL_F(Q_filt, IM(V[fIndexNoise]));
1602#else
1603 //QMF_IM(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) = MUL_Q2(G_filt, QMF_IM(Xsbr[i + sbr->tHFAdj][m+sbr->kx]))
1604 // + MUL_F(Q_filt, IM(V[fIndexNoise]));
1605 QMF_IM(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) = MUL_R(G_filt, QMF_IM(Xsbr[i + sbr->tHFAdj][m+sbr->kx]))
1606 + MUL_F(Q_filt, IM(V[fIndexNoise]));
1607#endif
1608#endif
1609
1610 {
1611 int8_t rev = (((m + sbr->kx) & 1) ? -1 : 1);
1612 QMF_RE(psi) = adj->S_M_boost[l][m] * phi_re[fIndexSine];
1613#ifdef FIXED_POINT
1614 QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) += (QMF_RE(psi) << REAL_BITS);
1615#else
1616 QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) += QMF_RE(psi);
1617#endif
1618
1619#ifndef SBR_LOW_POWER
1620 QMF_IM(psi) = rev * adj->S_M_boost[l][m] * phi_im[fIndexSine];
1621#ifdef FIXED_POINT
1622 QMF_IM(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) += (QMF_IM(psi) << REAL_BITS);
1623#else
1624 QMF_IM(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) += QMF_IM(psi);
1625#endif
1626#else
1627
1628 i_min1 = (fIndexSine - 1) & 3;
1629 i_plus1 = (fIndexSine + 1) & 3;
1630
1631#ifndef FIXED_POINT
1632 if ((m == 0) && (phi_re[i_plus1] != 0))
1633 {
1634 QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx - 1]) +=
1635 (rev*phi_re[i_plus1] * MUL_F(adj->S_M_boost[l][0], FRAC_CONST(0.00815)));
1636 if (sbr->M != 0)
1637 {
1638 QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) -=
1639 (rev*phi_re[i_plus1] * MUL_F(adj->S_M_boost[l][1], FRAC_CONST(0.00815)));
1640 }
1641 }
1642 if ((m > 0) && (m < sbr->M - 1) && (sinusoids < 16) && (phi_re[i_min1] != 0))
1643 {
1644 QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) -=
1645 (rev*phi_re[i_min1] * MUL_F(adj->S_M_boost[l][m - 1], FRAC_CONST(0.00815)));
1646 }
1647 if ((m > 0) && (m < sbr->M - 1) && (sinusoids < 16) && (phi_re[i_plus1] != 0))
1648 {
1649 QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) -=
1650 (rev*phi_re[i_plus1] * MUL_F(adj->S_M_boost[l][m + 1], FRAC_CONST(0.00815)));
1651 }
1652 if ((m == sbr->M - 1) && (sinusoids < 16) && (phi_re[i_min1] != 0))
1653 {
1654 if (m > 0)
1655 {
1656 QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) -=
1657 (rev*phi_re[i_min1] * MUL_F(adj->S_M_boost[l][m - 1], FRAC_CONST(0.00815)));
1658 }
1659 if (m + sbr->kx < 64)
1660 {
1661 QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx + 1]) +=
1662 (rev*phi_re[i_min1] * MUL_F(adj->S_M_boost[l][m], FRAC_CONST(0.00815)));
1663 }
1664 }
1665#else
1666 if ((m == 0) && (phi_re[i_plus1] != 0))
1667 {
1668 QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx - 1]) +=
1669 (rev*phi_re[i_plus1] * MUL_F((adj->S_M_boost[l][0]<<REAL_BITS), FRAC_CONST(0.00815)));
1670 if (sbr->M != 0)
1671 {
1672 QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) -=
1673 (rev*phi_re[i_plus1] * MUL_F((adj->S_M_boost[l][1]<<REAL_BITS), FRAC_CONST(0.00815)));
1674 }
1675 }
1676 if ((m > 0) && (m < sbr->M - 1) && (sinusoids < 16) && (phi_re[i_min1] != 0))
1677 {
1678 QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) -=
1679 (rev*phi_re[i_min1] * MUL_F((adj->S_M_boost[l][m - 1]<<REAL_BITS), FRAC_CONST(0.00815)));
1680 }
1681 if ((m > 0) && (m < sbr->M - 1) && (sinusoids < 16) && (phi_re[i_plus1] != 0))
1682 {
1683 QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) -=
1684 (rev*phi_re[i_plus1] * MUL_F((adj->S_M_boost[l][m + 1]<<REAL_BITS), FRAC_CONST(0.00815)));
1685 }
1686 if ((m == sbr->M - 1) && (sinusoids < 16) && (phi_re[i_min1] != 0))
1687 {
1688 if (m > 0)
1689 {
1690 QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) -=
1691 (rev*phi_re[i_min1] * MUL_F((adj->S_M_boost[l][m - 1]<<REAL_BITS), FRAC_CONST(0.00815)));
1692 }
1693 if (m + sbr->kx < 64)
1694 {
1695 QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx + 1]) +=
1696 (rev*phi_re[i_min1] * MUL_F((adj->S_M_boost[l][m]<<REAL_BITS), FRAC_CONST(0.00815)));
1697 }
1698 }
1699#endif
1700
1701 if (adj->S_M_boost[l][m] != 0)
1702 sinusoids++;
1703#endif
1704 }
1705 }
1706
1707 fIndexSine = (fIndexSine + 1) & 3;
1708
1709 /* update the ringbuffer index used for filtering G and Q with h_smooth */
1710 sbr->GQ_ringbuf_index[ch]++;
1711 if (sbr->GQ_ringbuf_index[ch] >= 5)
1712 sbr->GQ_ringbuf_index[ch] = 0;
1713 }
1714 }
1715
1716 sbr->index_noise_prev[ch] = fIndexNoise;
1717 sbr->psi_is_prev[ch] = fIndexSine;
1718}
1719
1720#endif
diff --git a/apps/codecs/libfaad/sbr_hfadj.h b/apps/codecs/libfaad/sbr_hfadj.h
new file mode 100644
index 0000000000..1411769799
--- /dev/null
+++ b/apps/codecs/libfaad/sbr_hfadj.h
@@ -0,0 +1,54 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __SBR_HFADJ_H__
29#define __SBR_HFADJ_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35typedef struct
36{
37 real_t G_lim_boost[MAX_L_E][MAX_M];
38 real_t Q_M_lim_boost[MAX_L_E][MAX_M];
39 real_t S_M_boost[MAX_L_E][MAX_M];
40} sbr_hfadj_info;
41
42
43void hf_adjustment(sbr_info *sbr, qmf_t Xsbr[MAX_NTSRHFG][64]
44#ifdef SBR_LOW_POWER
45 ,real_t *deg
46#endif
47 ,uint8_t ch);
48
49
50#ifdef __cplusplus
51}
52#endif
53#endif
54
diff --git a/apps/codecs/libfaad/sbr_hfgen.c b/apps/codecs/libfaad/sbr_hfgen.c
new file mode 100644
index 0000000000..5f306c43f3
--- /dev/null
+++ b/apps/codecs/libfaad/sbr_hfgen.c
@@ -0,0 +1,666 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28/* High Frequency generation */
29
30#include "common.h"
31#include "structs.h"
32
33#ifdef SBR_DEC
34
35#include "sbr_syntax.h"
36#include "sbr_hfgen.h"
37#include "sbr_fbt.h"
38
39
40/* static function declarations */
41#ifdef SBR_LOW_POWER
42static void calc_prediction_coef_lp(sbr_info *sbr, qmf_t Xlow[MAX_NTSRHFG][64],
43 complex_t *alpha_0, complex_t *alpha_1, real_t *rxx);
44static void calc_aliasing_degree(sbr_info *sbr, real_t *rxx, real_t *deg);
45#else
46static void calc_prediction_coef(sbr_info *sbr, qmf_t Xlow[MAX_NTSRHFG][64],
47 complex_t *alpha_0, complex_t *alpha_1, uint8_t k);
48#endif
49static void calc_chirp_factors(sbr_info *sbr, uint8_t ch);
50static void patch_construction(sbr_info *sbr);
51
52
53void hf_generation(sbr_info *sbr, qmf_t Xlow[MAX_NTSRHFG][64],
54 qmf_t Xhigh[MAX_NTSRHFG][64]
55#ifdef SBR_LOW_POWER
56 ,real_t *deg
57#endif
58 ,uint8_t ch)
59{
60 uint8_t l, i, x;
61 ALIGN complex_t alpha_0[64], alpha_1[64];
62#ifdef SBR_LOW_POWER
63 ALIGN real_t rxx[64];
64#endif
65
66 uint8_t offset = sbr->tHFAdj;
67 uint8_t first = sbr->t_E[ch][0];
68 uint8_t last = sbr->t_E[ch][sbr->L_E[ch]];
69
70 calc_chirp_factors(sbr, ch);
71
72#ifdef SBR_LOW_POWER
73 memset(deg, 0, 64*sizeof(real_t));
74#endif
75
76 if ((ch == 0) && (sbr->Reset))
77 patch_construction(sbr);
78
79 /* calculate the prediction coefficients */
80#ifdef SBR_LOW_POWER
81 calc_prediction_coef_lp(sbr, Xlow, alpha_0, alpha_1, rxx);
82 calc_aliasing_degree(sbr, rxx, deg);
83#endif
84
85 /* actual HF generation */
86 for (i = 0; i < sbr->noPatches; i++)
87 {
88 for (x = 0; x < sbr->patchNoSubbands[i]; x++)
89 {
90 real_t a0_r, a0_i, a1_r, a1_i;
91 real_t bw, bw2;
92 uint8_t q, p, k, g;
93
94 /* find the low and high band for patching */
95 k = sbr->kx + x;
96 for (q = 0; q < i; q++)
97 {
98 k += sbr->patchNoSubbands[q];
99 }
100 p = sbr->patchStartSubband[i] + x;
101
102#ifdef SBR_LOW_POWER
103 if (x != 0 /*x < sbr->patchNoSubbands[i]-1*/)
104 deg[k] = deg[p];
105 else
106 deg[k] = 0;
107#endif
108
109 g = sbr->table_map_k_to_g[k];
110
111 bw = sbr->bwArray[ch][g];
112 bw2 = MUL_C(bw, bw);
113
114 /* do the patching */
115 /* with or without filtering */
116 if (bw2 > 0)
117 {
118 real_t temp1_r, temp2_r, temp3_r;
119#ifndef SBR_LOW_POWER
120 real_t temp1_i, temp2_i, temp3_i;
121 calc_prediction_coef(sbr, Xlow, alpha_0, alpha_1, p);
122#endif
123
124 a0_r = MUL_C(RE(alpha_0[p]), bw);
125 a1_r = MUL_C(RE(alpha_1[p]), bw2);
126#ifndef SBR_LOW_POWER
127 a0_i = MUL_C(IM(alpha_0[p]), bw);
128 a1_i = MUL_C(IM(alpha_1[p]), bw2);
129#endif
130
131 temp2_r = QMF_RE(Xlow[first - 2 + offset][p]);
132 temp3_r = QMF_RE(Xlow[first - 1 + offset][p]);
133#ifndef SBR_LOW_POWER
134 temp2_i = QMF_IM(Xlow[first - 2 + offset][p]);
135 temp3_i = QMF_IM(Xlow[first - 1 + offset][p]);
136#endif
137 for (l = first; l < last; l++)
138 {
139 temp1_r = temp2_r;
140 temp2_r = temp3_r;
141 temp3_r = QMF_RE(Xlow[l + offset][p]);
142#ifndef SBR_LOW_POWER
143 temp1_i = temp2_i;
144 temp2_i = temp3_i;
145 temp3_i = QMF_IM(Xlow[l + offset][p]);
146#endif
147
148#ifdef SBR_LOW_POWER
149 QMF_RE(Xhigh[l + offset][k]) =
150 temp3_r
151 +(MUL_R(a0_r, temp2_r) +
152 MUL_R(a1_r, temp1_r));
153#else
154 QMF_RE(Xhigh[l + offset][k]) =
155 temp3_r
156 +(MUL_R(a0_r, temp2_r) -
157 MUL_R(a0_i, temp2_i) +
158 MUL_R(a1_r, temp1_r) -
159 MUL_R(a1_i, temp1_i));
160 QMF_IM(Xhigh[l + offset][k]) =
161 temp3_i
162 +(MUL_R(a0_i, temp2_r) +
163 MUL_R(a0_r, temp2_i) +
164 MUL_R(a1_i, temp1_r) +
165 MUL_R(a1_r, temp1_i));
166#endif
167 }
168 } else {
169 for (l = first; l < last; l++)
170 {
171 QMF_RE(Xhigh[l + offset][k]) = QMF_RE(Xlow[l + offset][p]);
172#ifndef SBR_LOW_POWER
173 QMF_IM(Xhigh[l + offset][k]) = QMF_IM(Xlow[l + offset][p]);
174#endif
175 }
176 }
177 }
178 }
179
180 if (sbr->Reset)
181 {
182 limiter_frequency_table(sbr);
183 }
184}
185
186typedef struct
187{
188 complex_t r01;
189 complex_t r02;
190 complex_t r11;
191 complex_t r12;
192 complex_t r22;
193 real_t det;
194} acorr_coef;
195
196#ifdef SBR_LOW_POWER
197static void auto_correlation(sbr_info *sbr, acorr_coef *ac,
198 qmf_t buffer[MAX_NTSRHFG][64],
199 uint8_t bd, uint8_t len)
200{
201 real_t r01 = 0, r02 = 0, r11 = 0;
202 int8_t j;
203 uint8_t offset = sbr->tHFAdj;
204#ifdef FIXED_POINT
205 const real_t rel = FRAC_CONST(0.999999); // 1 / (1 + 1e-6f);
206 uint32_t maxi = 0;
207 uint32_t pow2, exp;
208#else
209 const real_t rel = 1 / (1 + 1e-6f);
210#endif
211
212
213#ifdef FIXED_POINT
214 mask = 0;
215
216 for (j = (offset-2); j < (len + offset); j++)
217 {
218 real_t x;
219 x = QMF_RE(buffer[j][bd])>>REAL_BITS;
220 mask |= x ^ (x >> 31);
221 }
222
223 exp = wl_min_lzc(mask);
224
225 /* improves accuracy */
226 if (exp > 0)
227 exp -= 1;
228
229 for (j = offset; j < len + offset; j++)
230 {
231 real_t buf_j = ((QMF_RE(buffer[j][bd])+(1<<(exp-1)))>>exp);
232 real_t buf_j_1 = ((QMF_RE(buffer[j-1][bd])+(1<<(exp-1)))>>exp);
233 real_t buf_j_2 = ((QMF_RE(buffer[j-2][bd])+(1<<(exp-1)))>>exp);
234
235 /* normalisation with rounding */
236 r01 += MUL_R(buf_j, buf_j_1);
237 r02 += MUL_R(buf_j, buf_j_2);
238 r11 += MUL_R(buf_j_1, buf_j_1);
239 }
240 RE(ac->r12) = r01 -
241 MUL_R(((QMF_RE(buffer[len+offset-1][bd])+(1<<(exp-1)))>>exp), ((QMF_RE(buffer[len+offset-2][bd])+(1<<(exp-1)))>>exp)) +
242 MUL_R(((QMF_RE(buffer[offset-1][bd])+(1<<(exp-1)))>>exp), ((QMF_RE(buffer[offset-2][bd])+(1<<(exp-1)))>>exp));
243 RE(ac->r22) = r11 -
244 MUL_R(((QMF_RE(buffer[len+offset-2][bd])+(1<<(exp-1)))>>exp), ((QMF_RE(buffer[len+offset-2][bd])+(1<<(exp-1)))>>exp)) +
245 MUL_R(((QMF_RE(buffer[offset-2][bd])+(1<<(exp-1)))>>exp), ((QMF_RE(buffer[offset-2][bd])+(1<<(exp-1)))>>exp));
246#else
247 for (j = offset; j < len + offset; j++)
248 {
249 r01 += QMF_RE(buffer[j][bd]) * QMF_RE(buffer[j-1][bd]);
250 r02 += QMF_RE(buffer[j][bd]) * QMF_RE(buffer[j-2][bd]);
251 r11 += QMF_RE(buffer[j-1][bd]) * QMF_RE(buffer[j-1][bd]);
252 }
253 RE(ac->r12) = r01 -
254 QMF_RE(buffer[len+offset-1][bd]) * QMF_RE(buffer[len+offset-2][bd]) +
255 QMF_RE(buffer[offset-1][bd]) * QMF_RE(buffer[offset-2][bd]);
256 RE(ac->r22) = r11 -
257 QMF_RE(buffer[len+offset-2][bd]) * QMF_RE(buffer[len+offset-2][bd]) +
258 QMF_RE(buffer[offset-2][bd]) * QMF_RE(buffer[offset-2][bd]);
259#endif
260 RE(ac->r01) = r01;
261 RE(ac->r02) = r02;
262 RE(ac->r11) = r11;
263
264 ac->det = MUL_R(RE(ac->r11), RE(ac->r22)) - MUL_F(MUL_R(RE(ac->r12), RE(ac->r12)), rel);
265}
266#else
267static void auto_correlation(sbr_info *sbr, acorr_coef *ac, qmf_t buffer[MAX_NTSRHFG][64],
268 uint8_t bd, uint8_t len)
269{
270 real_t r01r = 0, r01i = 0, r02r = 0, r02i = 0, r11r = 0;
271 real_t temp1_r, temp1_i, temp2_r, temp2_i, temp3_r, temp3_i, temp4_r, temp4_i, temp5_r, temp5_i;
272#ifdef FIXED_POINT
273 const real_t rel = FRAC_CONST(0.999999); // 1 / (1 + 1e-6f);
274 uint32_t mask, exp;
275 real_t pow2_to_exp;
276#else
277 const real_t rel = 1 / (1 + 1e-6f);
278#endif
279 int8_t j;
280 uint8_t offset = sbr->tHFAdj;
281
282#ifdef FIXED_POINT
283 mask = 0;
284
285 for (j = (offset-2); j < (len + offset); j++)
286 {
287 real_t x;
288 x = QMF_RE(buffer[j][bd])>>REAL_BITS;
289 mask |= x ^ (x >> 31);
290 x = QMF_IM(buffer[j][bd])>>REAL_BITS;
291 mask |= x ^ (x >> 31);
292 }
293
294 exp = wl_min_lzc(mask);
295
296 /* improves accuracy */
297 if (exp > 0)
298 exp -= 1;
299
300 pow2_to_exp = 1<<(exp-1);
301
302 temp2_r = (QMF_RE(buffer[offset-2][bd]) + pow2_to_exp) >> exp;
303 temp2_i = (QMF_IM(buffer[offset-2][bd]) + pow2_to_exp) >> exp;
304 temp3_r = (QMF_RE(buffer[offset-1][bd]) + pow2_to_exp) >> exp;
305 temp3_i = (QMF_IM(buffer[offset-1][bd]) + pow2_to_exp) >> exp;
306 // Save these because they are needed after loop
307 temp4_r = temp2_r;
308 temp4_i = temp2_i;
309 temp5_r = temp3_r;
310 temp5_i = temp3_i;
311
312 for (j = offset; j < len + offset; j++)
313 {
314 temp1_r = temp2_r; // temp1_r = (QMF_RE(buffer[offset-2][bd] + (1<<(exp-1))) >> exp;
315 temp1_i = temp2_i; // temp1_i = (QMF_IM(buffer[offset-2][bd] + (1<<(exp-1))) >> exp;
316 temp2_r = temp3_r; // temp2_r = (QMF_RE(buffer[offset-1][bd] + (1<<(exp-1))) >> exp;
317 temp2_i = temp3_i; // temp2_i = (QMF_IM(buffer[offset-1][bd] + (1<<(exp-1))) >> exp;
318 temp3_r = (QMF_RE(buffer[j][bd]) + pow2_to_exp) >> exp;
319 temp3_i = (QMF_IM(buffer[j][bd]) + pow2_to_exp) >> exp;
320 r01r += MUL_R(temp3_r, temp2_r) + MUL_R(temp3_i, temp2_i);
321 r01i += MUL_R(temp3_i, temp2_r) - MUL_R(temp3_r, temp2_i);
322 r02r += MUL_R(temp3_r, temp1_r) + MUL_R(temp3_i, temp1_i);
323 r02i += MUL_R(temp3_i, temp1_r) - MUL_R(temp3_r, temp1_i);
324 r11r += MUL_R(temp2_r, temp2_r) + MUL_R(temp2_i, temp2_i);
325 }
326
327 // These are actual values in temporary variable at this point
328 // temp1_r = (QMF_RE(buffer[len+offset-1-2][bd] + (1<<(exp-1))) >> exp;
329 // temp1_i = (QMF_IM(buffer[len+offset-1-2][bd] + (1<<(exp-1))) >> exp;
330 // temp2_r = (QMF_RE(buffer[len+offset-1-1][bd] + (1<<(exp-1))) >> exp;
331 // temp2_i = (QMF_IM(buffer[len+offset-1-1][bd] + (1<<(exp-1))) >> exp;
332 // temp3_r = (QMF_RE(buffer[len+offset-1][bd]) + (1<<(exp-1))) >> exp;
333 // temp3_i = (QMF_IM(buffer[len+offset-1][bd]) + (1<<(exp-1))) >> exp;
334 // temp4_r = (QMF_RE(buffer[offset-2][bd]) + (1<<(exp-1))) >> exp;
335 // temp4_i = (QMF_IM(buffer[offset-2][bd]) + (1<<(exp-1))) >> exp;
336 // temp5_r = (QMF_RE(buffer[offset-1][bd]) + (1<<(exp-1))) >> exp;
337 // temp5_i = (QMF_IM(buffer[offset-1][bd]) + (1<<(exp-1))) >> exp;
338
339 RE(ac->r12) = r01r -
340 (MUL_R(temp3_r, temp2_r) + MUL_R(temp3_i, temp2_i)) +
341 (MUL_R(temp5_r, temp4_r) + MUL_R(temp5_i, temp4_i));
342 IM(ac->r12) = r01i -
343 (MUL_R(temp3_i, temp2_r) - MUL_R(temp3_r, temp2_i)) +
344 (MUL_R(temp5_i, temp4_r) - MUL_R(temp5_r, temp4_i));
345 RE(ac->r22) = r11r -
346 (MUL_R(temp2_r, temp2_r) + MUL_R(temp2_i, temp2_i)) +
347 (MUL_R(temp4_r, temp4_r) + MUL_R(temp4_i, temp4_i));
348
349#else
350
351 temp2_r = QMF_RE(buffer[offset-2][bd]);
352 temp2_i = QMF_IM(buffer[offset-2][bd]);
353 temp3_r = QMF_RE(buffer[offset-1][bd]);
354 temp3_i = QMF_IM(buffer[offset-1][bd]);
355 // Save these because they are needed after loop
356 temp4_r = temp2_r;
357 temp4_i = temp2_i;
358 temp5_r = temp3_r;
359 temp5_i = temp3_i;
360
361 for (j = offset; j < len + offset; j++)
362 {
363 temp1_r = temp2_r; // temp1_r = QMF_RE(buffer[j-2][bd];
364 temp1_i = temp2_i; // temp1_i = QMF_IM(buffer[j-2][bd];
365 temp2_r = temp3_r; // temp2_r = QMF_RE(buffer[j-1][bd];
366 temp2_i = temp3_i; // temp2_i = QMF_IM(buffer[j-1][bd];
367 temp3_r = QMF_RE(buffer[j][bd]);
368 temp3_i = QMF_IM(buffer[j][bd]);
369 r01r += temp3_r * temp2_r + temp3_i * temp2_i;
370 r01i += temp3_i * temp2_r - temp3_r * temp2_i;
371 r02r += temp3_r * temp1_r + temp3_i * temp1_i;
372 r02i += temp3_i * temp1_r - temp3_r * temp1_i;
373 r11r += temp2_r * temp2_r + temp2_i * temp2_i;
374 }
375
376 // These are actual values in temporary variable at this point
377 // temp1_r = QMF_RE(buffer[len+offset-1-2][bd];
378 // temp1_i = QMF_IM(buffer[len+offset-1-2][bd];
379 // temp2_r = QMF_RE(buffer[len+offset-1-1][bd];
380 // temp2_i = QMF_IM(buffer[len+offset-1-1][bd];
381 // temp3_r = QMF_RE(buffer[len+offset-1][bd]);
382 // temp3_i = QMF_IM(buffer[len+offset-1][bd]);
383 // temp4_r = QMF_RE(buffer[offset-2][bd]);
384 // temp4_i = QMF_IM(buffer[offset-2][bd]);
385 // temp5_r = QMF_RE(buffer[offset-1][bd]);
386 // temp5_i = QMF_IM(buffer[offset-1][bd]);
387
388 RE(ac->r12) = r01r -
389 (temp3_r * temp2_r + temp3_i * temp2_i) +
390 (temp5_r * temp4_r + temp5_i * temp4_i);
391 IM(ac->r12) = r01i -
392 (temp3_i * temp2_r - temp3_r * temp2_i) +
393 (temp5_i * temp4_r - temp5_r * temp4_i);
394 RE(ac->r22) = r11r -
395 (temp2_r * temp2_r + temp2_i * temp2_i) +
396 (temp4_r * temp4_r + temp4_i * temp4_i);
397
398#endif
399
400 RE(ac->r01) = r01r;
401 IM(ac->r01) = r01i;
402 RE(ac->r02) = r02r;
403 IM(ac->r02) = r02i;
404 RE(ac->r11) = r11r;
405
406 ac->det = MUL_R(RE(ac->r11), RE(ac->r22)) - MUL_F(rel, (MUL_R(RE(ac->r12), RE(ac->r12)) + MUL_R(IM(ac->r12), IM(ac->r12))));
407}
408#endif
409
410/* calculate linear prediction coefficients using the covariance method */
411#ifndef SBR_LOW_POWER
412static void calc_prediction_coef(sbr_info *sbr, qmf_t Xlow[MAX_NTSRHFG][64],
413 complex_t *alpha_0, complex_t *alpha_1, uint8_t k)
414{
415 real_t tmp;
416 acorr_coef ac;
417
418 auto_correlation(sbr, &ac, Xlow, k, sbr->numTimeSlotsRate + 6);
419
420 if (ac.det == 0)
421 {
422 RE(alpha_1[k]) = 0;
423 IM(alpha_1[k]) = 0;
424 } else {
425#ifdef FIXED_POINT
426 tmp = (MUL_R(RE(ac.r01), RE(ac.r12)) - MUL_R(IM(ac.r01), IM(ac.r12)) - MUL_R(RE(ac.r02), RE(ac.r11)));
427 RE(alpha_1[k]) = DIV_R(tmp, ac.det);
428 tmp = (MUL_R(IM(ac.r01), RE(ac.r12)) + MUL_R(RE(ac.r01), IM(ac.r12)) - MUL_R(IM(ac.r02), RE(ac.r11)));
429 IM(alpha_1[k]) = DIV_R(tmp, ac.det);
430#else
431 tmp = REAL_CONST(1.0) / ac.det;
432 RE(alpha_1[k]) = (MUL_R(RE(ac.r01), RE(ac.r12)) - MUL_R(IM(ac.r01), IM(ac.r12)) - MUL_R(RE(ac.r02), RE(ac.r11))) * tmp;
433 IM(alpha_1[k]) = (MUL_R(IM(ac.r01), RE(ac.r12)) + MUL_R(RE(ac.r01), IM(ac.r12)) - MUL_R(IM(ac.r02), RE(ac.r11))) * tmp;
434#endif
435 }
436
437 if (RE(ac.r11) == 0)
438 {
439 RE(alpha_0[k]) = 0;
440 IM(alpha_0[k]) = 0;
441 } else {
442#ifdef FIXED_POINT
443 tmp = -(RE(ac.r01) + MUL_R(RE(alpha_1[k]), RE(ac.r12)) + MUL_R(IM(alpha_1[k]), IM(ac.r12)));
444 RE(alpha_0[k]) = DIV_R(tmp, RE(ac.r11));
445 tmp = -(IM(ac.r01) + MUL_R(IM(alpha_1[k]), RE(ac.r12)) - MUL_R(RE(alpha_1[k]), IM(ac.r12)));
446 IM(alpha_0[k]) = DIV_R(tmp, RE(ac.r11));
447#else
448 tmp = 1.0f / RE(ac.r11);
449 RE(alpha_0[k]) = -(RE(ac.r01) + MUL_R(RE(alpha_1[k]), RE(ac.r12)) + MUL_R(IM(alpha_1[k]), IM(ac.r12))) * tmp;
450 IM(alpha_0[k]) = -(IM(ac.r01) + MUL_R(IM(alpha_1[k]), RE(ac.r12)) - MUL_R(RE(alpha_1[k]), IM(ac.r12))) * tmp;
451#endif
452 }
453
454 if ((MUL_R(RE(alpha_0[k]),RE(alpha_0[k])) + MUL_R(IM(alpha_0[k]),IM(alpha_0[k])) >= REAL_CONST(16)) ||
455 (MUL_R(RE(alpha_1[k]),RE(alpha_1[k])) + MUL_R(IM(alpha_1[k]),IM(alpha_1[k])) >= REAL_CONST(16)))
456 {
457 RE(alpha_0[k]) = 0;
458 IM(alpha_0[k]) = 0;
459 RE(alpha_1[k]) = 0;
460 IM(alpha_1[k]) = 0;
461 }
462}
463#else
464static void calc_prediction_coef_lp(sbr_info *sbr, qmf_t Xlow[MAX_NTSRHFG][64],
465 complex_t *alpha_0, complex_t *alpha_1, real_t *rxx)
466{
467 uint8_t k;
468 real_t tmp;
469 acorr_coef ac;
470
471 for (k = 1; k < sbr->f_master[0]; k++)
472 {
473 auto_correlation(sbr, &ac, Xlow, k, sbr->numTimeSlotsRate + 6);
474
475 if (ac.det == 0)
476 {
477 RE(alpha_0[k]) = 0;
478 RE(alpha_1[k]) = 0;
479 } else {
480 tmp = MUL_R(RE(ac.r01), RE(ac.r22)) - MUL_R(RE(ac.r12), RE(ac.r02));
481 RE(alpha_0[k]) = DIV_R(tmp, (-ac.det));
482
483 tmp = MUL_R(RE(ac.r01), RE(ac.r12)) - MUL_R(RE(ac.r02), RE(ac.r11));
484 RE(alpha_1[k]) = DIV_R(tmp, ac.det);
485 }
486
487 if ((RE(alpha_0[k]) >= REAL_CONST(4)) || (RE(alpha_1[k]) >= REAL_CONST(4)))
488 {
489 RE(alpha_0[k]) = REAL_CONST(0);
490 RE(alpha_1[k]) = REAL_CONST(0);
491 }
492
493 /* reflection coefficient */
494 if (RE(ac.r11) == 0)
495 {
496 rxx[k] = COEF_CONST(0.0);
497 } else {
498 rxx[k] = DIV_C(RE(ac.r01), RE(ac.r11));
499 rxx[k] = -rxx[k];
500 if (rxx[k] > COEF_CONST(1.0)) rxx[k] = COEF_CONST(1.0);
501 if (rxx[k] < COEF_CONST(-1.0)) rxx[k] = COEF_CONST(-1.0);
502 }
503 }
504}
505
506static void calc_aliasing_degree(sbr_info *sbr, real_t *rxx, real_t *deg)
507{
508 uint8_t k;
509
510 rxx[0] = COEF_CONST(0.0);
511 deg[1] = COEF_CONST(0.0);
512
513 for (k = 2; k < sbr->k0; k++)
514 {
515 deg[k] = 0.0;
516
517 if ((k % 2 == 0) && (rxx[k] < COEF_CONST(0.0)))
518 {
519 if (rxx[k-1] < 0.0)
520 {
521 deg[k] = COEF_CONST(1.0);
522
523 if (rxx[k-2] > COEF_CONST(0.0))
524 {
525 deg[k-1] = COEF_CONST(1.0) - MUL_C(rxx[k-1], rxx[k-1]);
526 }
527 } else if (rxx[k-2] > COEF_CONST(0.0)) {
528 deg[k] = COEF_CONST(1.0) - MUL_C(rxx[k-1], rxx[k-1]);
529 }
530 }
531
532 if ((k % 2 == 1) && (rxx[k] > COEF_CONST(0.0)))
533 {
534 if (rxx[k-1] > COEF_CONST(0.0))
535 {
536 deg[k] = COEF_CONST(1.0);
537
538 if (rxx[k-2] < COEF_CONST(0.0))
539 {
540 deg[k-1] = COEF_CONST(1.0) - MUL_C(rxx[k-1], rxx[k-1]);
541 }
542 } else if (rxx[k-2] < COEF_CONST(0.0)) {
543 deg[k] = COEF_CONST(1.0) - MUL_C(rxx[k-1], rxx[k-1]);
544 }
545 }
546 }
547}
548#endif
549
550/* FIXED POINT: bwArray = COEF */
551static real_t mapNewBw(uint8_t invf_mode, uint8_t invf_mode_prev)
552{
553 switch (invf_mode)
554 {
555 case 1: /* LOW */
556 if (invf_mode_prev == 0) /* NONE */
557 return COEF_CONST(0.6);
558 else
559 return COEF_CONST(0.75);
560
561 case 2: /* MID */
562 return COEF_CONST(0.9);
563
564 case 3: /* HIGH */
565 return COEF_CONST(0.98);
566
567 default: /* NONE */
568 if (invf_mode_prev == 1) /* LOW */
569 return COEF_CONST(0.6);
570 else
571 return COEF_CONST(0.0);
572 }
573}
574
575/* FIXED POINT: bwArray = COEF */
576static void calc_chirp_factors(sbr_info *sbr, uint8_t ch)
577{
578 uint8_t i;
579
580 for (i = 0; i < sbr->N_Q; i++)
581 {
582 sbr->bwArray[ch][i] = mapNewBw(sbr->bs_invf_mode[ch][i], sbr->bs_invf_mode_prev[ch][i]);
583
584 if (sbr->bwArray[ch][i] < sbr->bwArray_prev[ch][i])
585 sbr->bwArray[ch][i] = MUL_F(sbr->bwArray[ch][i], FRAC_CONST(0.75)) + MUL_F(sbr->bwArray_prev[ch][i], FRAC_CONST(0.25));
586 else
587 sbr->bwArray[ch][i] = MUL_F(sbr->bwArray[ch][i], FRAC_CONST(0.90625)) + MUL_F(sbr->bwArray_prev[ch][i], FRAC_CONST(0.09375));
588
589 if (sbr->bwArray[ch][i] < COEF_CONST(0.015625))
590 sbr->bwArray[ch][i] = COEF_CONST(0.0);
591
592 if (sbr->bwArray[ch][i] >= COEF_CONST(0.99609375))
593 sbr->bwArray[ch][i] = COEF_CONST(0.99609375);
594
595 sbr->bwArray_prev[ch][i] = sbr->bwArray[ch][i];
596 sbr->bs_invf_mode_prev[ch][i] = sbr->bs_invf_mode[ch][i];
597 }
598}
599
600static void patch_construction(sbr_info *sbr)
601{
602 uint8_t i, k;
603 uint8_t odd, sb;
604 uint8_t msb = sbr->k0;
605 uint8_t usb = sbr->kx;
606 uint8_t goalSbTab[] = { 21, 23, 32, 43, 46, 64, 85, 93, 128, 0, 0, 0 };
607 /* (uint8_t)(2.048e6/sbr->sample_rate + 0.5); */
608 uint8_t goalSb = goalSbTab[get_sr_index(sbr->sample_rate)];
609
610 sbr->noPatches = 0;
611
612 if (goalSb < (sbr->kx + sbr->M))
613 {
614 for (i = 0, k = 0; sbr->f_master[i] < goalSb; i++)
615 k = i+1;
616 } else {
617 k = sbr->N_master;
618 }
619
620 if (sbr->N_master == 0)
621 {
622 sbr->noPatches = 0;
623 sbr->patchNoSubbands[0] = 0;
624 sbr->patchStartSubband[0] = 0;
625
626 return;
627 }
628
629 do
630 {
631 uint8_t j = k + 1;
632
633 do
634 {
635 j--;
636
637 sb = sbr->f_master[j];
638 odd = (sb - 2 + sbr->k0) % 2;
639 } while (sb > (sbr->k0 - 1 + msb - odd));
640
641 sbr->patchNoSubbands[sbr->noPatches] = max(sb - usb, 0);
642 sbr->patchStartSubband[sbr->noPatches] = sbr->k0 - odd -
643 sbr->patchNoSubbands[sbr->noPatches];
644
645 if (sbr->patchNoSubbands[sbr->noPatches] > 0)
646 {
647 usb = sb;
648 msb = sb;
649 sbr->noPatches++;
650 } else {
651 msb = sbr->kx;
652 }
653
654 if (sbr->f_master[k] - sb < 3)
655 k = sbr->N_master;
656 } while (sb != (sbr->kx + sbr->M));
657
658 if ((sbr->patchNoSubbands[sbr->noPatches-1] < 3) && (sbr->noPatches > 1))
659 {
660 sbr->noPatches--;
661 }
662
663 sbr->noPatches = min(sbr->noPatches, 5);
664}
665
666#endif
diff --git a/apps/codecs/libfaad/sbr_hfgen.h b/apps/codecs/libfaad/sbr_hfgen.h
new file mode 100644
index 0000000000..8510004f63
--- /dev/null
+++ b/apps/codecs/libfaad/sbr_hfgen.h
@@ -0,0 +1,46 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __SBR_HFGEN_H__
29#define __SBR_HFGEN_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35void hf_generation(sbr_info *sbr, qmf_t Xlow[MAX_NTSRHFG][64],
36 qmf_t Xhigh[MAX_NTSRHFG][64]
37#ifdef SBR_LOW_POWER
38 ,real_t *deg
39#endif
40 ,uint8_t ch);
41
42#ifdef __cplusplus
43}
44#endif
45#endif
46
diff --git a/apps/codecs/libfaad/sbr_huff.c b/apps/codecs/libfaad/sbr_huff.c
new file mode 100644
index 0000000000..92fe07a392
--- /dev/null
+++ b/apps/codecs/libfaad/sbr_huff.c
@@ -0,0 +1,357 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#include "common.h"
29#include "structs.h"
30
31#ifdef SBR_DEC
32
33#include "sbr_syntax.h"
34#include "bits.h"
35#include "sbr_huff.h"
36#include "sbr_e_nf.h"
37
38
39typedef const int8_t (*sbr_huff_tab)[2];
40
41static const int8_t t_huffman_env_1_5dB[120][2] = {
42 { 1, 2 }, { -64, -65 }, { 3, 4 }, { -63, -66 },
43 { 5, 6 }, { -62, -67 }, { 7, 8 }, { -61, -68 },
44 { 9, 10 }, { -60, -69 }, { 11, 12 }, { -59, -70 },
45 { 13, 14 }, { -58, -71 }, { 15, 16 }, { -57, -72 },
46 { 17, 18 }, { -73, -56 }, { 19, 21 }, { -74, 20 },
47 { -55, -75 }, { 22, 26 }, { 23, 24 }, { -54, -76 },
48 { -77, 25 }, { -53, -78 }, { 27, 34 }, { 28, 29 },
49 { -52, -79 }, { 30, 31 }, { -80, -51 }, { 32, 33 },
50 { -83, -82 }, { -81, -50 }, { 35, 57 }, { 36, 40 },
51 { 37, 38 }, { -88, -84 }, { -48, 39 }, { -90, -85 },
52 { 41, 46 }, { 42, 43 }, { -49, -87 }, { 44, 45 },
53 { -89, -86 }, {-124,-123 }, { 47, 50 }, { 48, 49 },
54 {-122,-121 }, {-120,-119 }, { 51, 54 }, { 52, 53 },
55 {-118,-117 }, {-116,-115 }, { 55, 56 }, {-114,-113 },
56 {-112,-111 }, { 58, 89 }, { 59, 74 }, { 60, 67 },
57 { 61, 64 }, { 62, 63 }, {-110,-109 }, {-108,-107 },
58 { 65, 66 }, {-106,-105 }, {-104,-103 }, { 68, 71 },
59 { 69, 70 }, {-102,-101 }, {-100, -99 }, { 72, 73 },
60 { -98, -97 }, { -96, -95 }, { 75, 82 }, { 76, 79 },
61 { 77, 78 }, { -94, -93 }, { -92, -91 }, { 80, 81 },
62 { -47, -46 }, { -45, -44 }, { 83, 86 }, { 84, 85 },
63 { -43, -42 }, { -41, -40 }, { 87, 88 }, { -39, -38 },
64 { -37, -36 }, { 90, 105 }, { 91, 98 }, { 92, 95 },
65 { 93, 94 }, { -35, -34 }, { -33, -32 }, { 96, 97 },
66 { -31, -30 }, { -29, -28 }, { 99, 102 }, { 100, 101 },
67 { -27, -26 }, { -25, -24 }, { 103, 104 }, { -23, -22 },
68 { -21, -20 }, { 106, 113 }, { 107, 110 }, { 108, 109 },
69 { -19, -18 }, { -17, -16 }, { 111, 112 }, { -15, -14 },
70 { -13, -12 }, { 114, 117 }, { 115, 116 }, { -11, -10 },
71 { -9, -8 }, { 118, 119 }, { -7, -6 }, { -5, -4 }
72};
73
74static const int8_t f_huffman_env_1_5dB[120][2] = {
75 { 1, 2 }, { -64, -65 }, { 3, 4 }, { -63, -66 },
76 { 5, 6 }, { -67, -62 }, { 7, 8 }, { -68, -61 },
77 { 9, 10 }, { -69, -60 }, { 11, 13 }, { -70, 12 },
78 { -59, -71 }, { 14, 16 }, { -58, 15 }, { -72, -57 },
79 { 17, 19 }, { -73, 18 }, { -56, -74 }, { 20, 23 },
80 { 21, 22 }, { -55, -75 }, { -54, -53 }, { 24, 27 },
81 { 25, 26 }, { -76, -52 }, { -77, -51 }, { 28, 31 },
82 { 29, 30 }, { -50, -78 }, { -79, -49 }, { 32, 36 },
83 { 33, 34 }, { -48, -47 }, { -80, 35 }, { -81, -82 },
84 { 37, 47 }, { 38, 41 }, { 39, 40 }, { -83, -46 },
85 { -45, -84 }, { 42, 44 }, { -85, 43 }, { -44, -43 },
86 { 45, 46 }, { -88, -87 }, { -86, -90 }, { 48, 66 },
87 { 49, 56 }, { 50, 53 }, { 51, 52 }, { -92, -42 },
88 { -41, -39 }, { 54, 55 }, {-105, -89 }, { -38, -37 },
89 { 57, 60 }, { 58, 59 }, { -94, -91 }, { -40, -36 },
90 { 61, 63 }, { -20, 62 }, {-115,-110 }, { 64, 65 },
91 {-108,-107 }, {-101, -97 }, { 67, 89 }, { 68, 75 },
92 { 69, 72 }, { 70, 71 }, { -95, -93 }, { -34, -27 },
93 { 73, 74 }, { -22, -17 }, { -16,-124 }, { 76, 82 },
94 { 77, 79 }, {-123, 78 }, {-122,-121 }, { 80, 81 },
95 {-120,-119 }, {-118,-117 }, { 83, 86 }, { 84, 85 },
96 {-116,-114 }, {-113,-112 }, { 87, 88 }, {-111,-109 },
97 {-106,-104 }, { 90, 105 }, { 91, 98 }, { 92, 95 },
98 { 93, 94 }, {-103,-102 }, {-100, -99 }, { 96, 97 },
99 { -98, -96 }, { -35, -33 }, { 99, 102 }, { 100, 101 },
100 { -32, -31 }, { -30, -29 }, { 103, 104 }, { -28, -26 },
101 { -25, -24 }, { 106, 113 }, { 107, 110 }, { 108, 109 },
102 { -23, -21 }, { -19, -18 }, { 111, 112 }, { -15, -14 },
103 { -13, -12 }, { 114, 117 }, { 115, 116 }, { -11, -10 },
104 { -9, -8 }, { 118, 119 }, { -7, -6 }, { -5, -4 }
105};
106
107static const int8_t t_huffman_env_bal_1_5dB[48][2] = {
108 { -64, 1 }, { -63, 2 }, { -65, 3 }, { -62, 4 },
109 { -66, 5 }, { -61, 6 }, { -67, 7 }, { -60, 8 },
110 { -68, 9 }, { 10, 11 }, { -69, -59 }, { 12, 13 },
111 { -70, -58 }, { 14, 28 }, { 15, 21 }, { 16, 18 },
112 { -57, 17 }, { -71, -56 }, { 19, 20 }, { -88, -87 },
113 { -86, -85 }, { 22, 25 }, { 23, 24 }, { -84, -83 },
114 { -82, -81 }, { 26, 27 }, { -80, -79 }, { -78, -77 },
115 { 29, 36 }, { 30, 33 }, { 31, 32 }, { -76, -75 },
116 { -74, -73 }, { 34, 35 }, { -72, -55 }, { -54, -53 },
117 { 37, 41 }, { 38, 39 }, { -52, -51 }, { -50, 40 },
118 { -49, -48 }, { 42, 45 }, { 43, 44 }, { -47, -46 },
119 { -45, -44 }, { 46, 47 }, { -43, -42 }, { -41, -40 }
120};
121
122static const int8_t f_huffman_env_bal_1_5dB[48][2] = {
123 { -64, 1 }, { -65, 2 }, { -63, 3 }, { -66, 4 },
124 { -62, 5 }, { -61, 6 }, { -67, 7 }, { -68, 8 },
125 { -60, 9 }, { 10, 11 }, { -69, -59 }, { -70, 12 },
126 { -58, 13 }, { 14, 17 }, { -71, 15 }, { -57, 16 },
127 { -56, -73 }, { 18, 32 }, { 19, 25 }, { 20, 22 },
128 { -72, 21 }, { -88, -87 }, { 23, 24 }, { -86, -85 },
129 { -84, -83 }, { 26, 29 }, { 27, 28 }, { -82, -81 },
130 { -80, -79 }, { 30, 31 }, { -78, -77 }, { -76, -75 },
131 { 33, 40 }, { 34, 37 }, { 35, 36 }, { -74, -55 },
132 { -54, -53 }, { 38, 39 }, { -52, -51 }, { -50, -49 },
133 { 41, 44 }, { 42, 43 }, { -48, -47 }, { -46, -45 },
134 { 45, 46 }, { -44, -43 }, { -42, 47 }, { -41, -40 }
135};
136
137static const int8_t t_huffman_env_3_0dB[62][2] = {
138 { -64, 1 }, { -65, 2 }, { -63, 3 }, { -66, 4 },
139 { -62, 5 }, { -67, 6 }, { -61, 7 }, { -68, 8 },
140 { -60, 9 }, { 10, 11 }, { -69, -59 }, { 12, 14 },
141 { -70, 13 }, { -71, -58 }, { 15, 18 }, { 16, 17 },
142 { -72, -57 }, { -73, -74 }, { 19, 22 }, { -56, 20 },
143 { -55, 21 }, { -54, -77 }, { 23, 31 }, { 24, 25 },
144 { -75, -76 }, { 26, 27 }, { -78, -53 }, { 28, 29 },
145 { -52, -95 }, { -94, 30 }, { -93, -92 }, { 32, 47 },
146 { 33, 40 }, { 34, 37 }, { 35, 36 }, { -91, -90 },
147 { -89, -88 }, { 38, 39 }, { -87, -86 }, { -85, -84 },
148 { 41, 44 }, { 42, 43 }, { -83, -82 }, { -81, -80 },
149 { 45, 46 }, { -79, -51 }, { -50, -49 }, { 48, 55 },
150 { 49, 52 }, { 50, 51 }, { -48, -47 }, { -46, -45 },
151 { 53, 54 }, { -44, -43 }, { -42, -41 }, { 56, 59 },
152 { 57, 58 }, { -40, -39 }, { -38, -37 }, { 60, 61 },
153 { -36, -35 }, { -34, -33 }
154};
155
156static const int8_t f_huffman_env_3_0dB[62][2] = {
157 { -64, 1 }, { -65, 2 }, { -63, 3 }, { -66, 4 },
158 { -62, 5 }, { -67, 6 }, { 7, 8 }, { -61, -68 },
159 { 9, 10 }, { -60, -69 }, { 11, 12 }, { -59, -70 },
160 { 13, 14 }, { -58, -71 }, { 15, 16 }, { -57, -72 },
161 { 17, 19 }, { -56, 18 }, { -55, -73 }, { 20, 24 },
162 { 21, 22 }, { -74, -54 }, { -53, 23 }, { -75, -76 },
163 { 25, 30 }, { 26, 27 }, { -52, -51 }, { 28, 29 },
164 { -77, -79 }, { -50, -49 }, { 31, 39 }, { 32, 35 },
165 { 33, 34 }, { -78, -46 }, { -82, -88 }, { 36, 37 },
166 { -83, -48 }, { -47, 38 }, { -86, -85 }, { 40, 47 },
167 { 41, 44 }, { 42, 43 }, { -80, -44 }, { -43, -42 },
168 { 45, 46 }, { -39, -87 }, { -84, -40 }, { 48, 55 },
169 { 49, 52 }, { 50, 51 }, { -95, -94 }, { -93, -92 },
170 { 53, 54 }, { -91, -90 }, { -89, -81 }, { 56, 59 },
171 { 57, 58 }, { -45, -41 }, { -38, -37 }, { 60, 61 },
172 { -36, -35 }, { -34, -33 }
173};
174
175static const int8_t t_huffman_env_bal_3_0dB[24][2] = {
176 { -64, 1 }, { -63, 2 }, { -65, 3 }, { -66, 4 },
177 { -62, 5 }, { -61, 6 }, { -67, 7 }, { -68, 8 },
178 { -60, 9 }, { 10, 16 }, { 11, 13 }, { -69, 12 },
179 { -76, -75 }, { 14, 15 }, { -74, -73 }, { -72, -71 },
180 { 17, 20 }, { 18, 19 }, { -70, -59 }, { -58, -57 },
181 { 21, 22 }, { -56, -55 }, { -54, 23 }, { -53, -52 }
182};
183
184static const int8_t f_huffman_env_bal_3_0dB[24][2] = {
185 { -64, 1 }, { -65, 2 }, { -63, 3 }, { -66, 4 },
186 { -62, 5 }, { -61, 6 }, { -67, 7 }, { -68, 8 },
187 { -60, 9 }, { 10, 13 }, { -69, 11 }, { -59, 12 },
188 { -58, -76 }, { 14, 17 }, { 15, 16 }, { -75, -74 },
189 { -73, -72 }, { 18, 21 }, { 19, 20 }, { -71, -70 },
190 { -57, -56 }, { 22, 23 }, { -55, -54 }, { -53, -52 }
191};
192
193static const int8_t t_huffman_noise_3_0dB[62][2] = {
194 { -64, 1 }, { -63, 2 }, { -65, 3 }, { -66, 4 },
195 { -62, 5 }, { -67, 6 }, { 7, 8 }, { -61, -68 },
196 { 9, 30 }, { 10, 15 }, { -60, 11 }, { -69, 12 },
197 { 13, 14 }, { -59, -53 }, { -95, -94 }, { 16, 23 },
198 { 17, 20 }, { 18, 19 }, { -93, -92 }, { -91, -90 },
199 { 21, 22 }, { -89, -88 }, { -87, -86 }, { 24, 27 },
200 { 25, 26 }, { -85, -84 }, { -83, -82 }, { 28, 29 },
201 { -81, -80 }, { -79, -78 }, { 31, 46 }, { 32, 39 },
202 { 33, 36 }, { 34, 35 }, { -77, -76 }, { -75, -74 },
203 { 37, 38 }, { -73, -72 }, { -71, -70 }, { 40, 43 },
204 { 41, 42 }, { -58, -57 }, { -56, -55 }, { 44, 45 },
205 { -54, -52 }, { -51, -50 }, { 47, 54 }, { 48, 51 },
206 { 49, 50 }, { -49, -48 }, { -47, -46 }, { 52, 53 },
207 { -45, -44 }, { -43, -42 }, { 55, 58 }, { 56, 57 },
208 { -41, -40 }, { -39, -38 }, { 59, 60 }, { -37, -36 },
209 { -35, 61 }, { -34, -33 }
210};
211
212static const int8_t t_huffman_noise_bal_3_0dB[24][2] = {
213 { -64, 1 }, { -65, 2 }, { -63, 3 }, { 4, 9 },
214 { -66, 5 }, { -62, 6 }, { 7, 8 }, { -76, -75 },
215 { -74, -73 }, { 10, 17 }, { 11, 14 }, { 12, 13 },
216 { -72, -71 }, { -70, -69 }, { 15, 16 }, { -68, -67 },
217 { -61, -60 }, { 18, 21 }, { 19, 20 }, { -59, -58 },
218 { -57, -56 }, { 22, 23 }, { -55, -54 }, { -53, -52 }
219};
220
221
222static INLINE int16_t sbr_huff_dec(bitfile *ld, sbr_huff_tab t_huff)
223{
224 uint8_t bit;
225 int16_t index = 0;
226
227 while (index >= 0)
228 {
229 bit = (uint8_t)faad_get1bit(ld);
230 index = t_huff[index][bit];
231 }
232
233 return index + 64;
234}
235
236/* table 10 */
237void sbr_envelope(bitfile *ld, sbr_info *sbr, uint8_t ch)
238{
239 uint8_t env, band;
240 int8_t delta = 0;
241 sbr_huff_tab t_huff, f_huff;
242
243 if ((sbr->L_E[ch] == 1) && (sbr->bs_frame_class[ch] == FIXFIX))
244 sbr->amp_res[ch] = 0;
245 else
246 sbr->amp_res[ch] = sbr->bs_amp_res;
247
248 if ((sbr->bs_coupling) && (ch == 1))
249 {
250 delta = 1;
251 if (sbr->amp_res[ch])
252 {
253 t_huff = t_huffman_env_bal_3_0dB;
254 f_huff = f_huffman_env_bal_3_0dB;
255 } else {
256 t_huff = t_huffman_env_bal_1_5dB;
257 f_huff = f_huffman_env_bal_1_5dB;
258 }
259 } else {
260 delta = 0;
261 if (sbr->amp_res[ch])
262 {
263 t_huff = t_huffman_env_3_0dB;
264 f_huff = f_huffman_env_3_0dB;
265 } else {
266 t_huff = t_huffman_env_1_5dB;
267 f_huff = f_huffman_env_1_5dB;
268 }
269 }
270
271 for (env = 0; env < sbr->L_E[ch]; env++)
272 {
273 if (sbr->bs_df_env[ch][env] == 0)
274 {
275 if ((sbr->bs_coupling == 1) && (ch == 1))
276 {
277 if (sbr->amp_res[ch])
278 {
279 sbr->E[ch][0][env] = (uint16_t)(faad_getbits(ld, 5
280 DEBUGVAR(1,272,"sbr_envelope(): bs_data_env")) << delta);
281 } else {
282 sbr->E[ch][0][env] = (uint16_t)(faad_getbits(ld, 6
283 DEBUGVAR(1,273,"sbr_envelope(): bs_data_env")) << delta);
284 }
285 } else {
286 if (sbr->amp_res[ch])
287 {
288 sbr->E[ch][0][env] = (uint16_t)(faad_getbits(ld, 6
289 DEBUGVAR(1,274,"sbr_envelope(): bs_data_env")) << delta);
290 } else {
291 sbr->E[ch][0][env] = (uint16_t)(faad_getbits(ld, 7
292 DEBUGVAR(1,275,"sbr_envelope(): bs_data_env")) << delta);
293 }
294 }
295
296 for (band = 1; band < sbr->n[sbr->f[ch][env]]; band++)
297 {
298 sbr->E[ch][band][env] = (sbr_huff_dec(ld, f_huff) << delta);
299 }
300
301 } else {
302 for (band = 0; band < sbr->n[sbr->f[ch][env]]; band++)
303 {
304 sbr->E[ch][band][env] = (sbr_huff_dec(ld, t_huff) << delta);
305 }
306 }
307 }
308
309 extract_envelope_data(sbr, ch);
310}
311
312/* table 11 */
313void sbr_noise(bitfile *ld, sbr_info *sbr, uint8_t ch)
314{
315 uint8_t noise, band;
316 int8_t delta = 0;
317 sbr_huff_tab t_huff, f_huff;
318
319 if ((sbr->bs_coupling == 1) && (ch == 1))
320 {
321 delta = 1;
322 t_huff = t_huffman_noise_bal_3_0dB;
323 f_huff = f_huffman_env_bal_3_0dB;
324 } else {
325 delta = 0;
326 t_huff = t_huffman_noise_3_0dB;
327 f_huff = f_huffman_env_3_0dB;
328 }
329
330 for (noise = 0; noise < sbr->L_Q[ch]; noise++)
331 {
332 if(sbr->bs_df_noise[ch][noise] == 0)
333 {
334 if ((sbr->bs_coupling == 1) && (ch == 1))
335 {
336 sbr->Q[ch][0][noise] = (faad_getbits(ld, 5
337 DEBUGVAR(1,276,"sbr_noise(): bs_data_noise")) << delta);
338 } else {
339 sbr->Q[ch][0][noise] = (faad_getbits(ld, 5
340 DEBUGVAR(1,277,"sbr_noise(): bs_data_noise")) << delta);
341 }
342 for (band = 1; band < sbr->N_Q; band++)
343 {
344 sbr->Q[ch][band][noise] = (sbr_huff_dec(ld, f_huff) << delta);
345 }
346 } else {
347 for (band = 0; band < sbr->N_Q; band++)
348 {
349 sbr->Q[ch][band][noise] = (sbr_huff_dec(ld, t_huff) << delta);
350 }
351 }
352 }
353
354 extract_noise_floor_data(sbr, ch);
355}
356
357#endif
diff --git a/apps/codecs/libfaad/sbr_huff.h b/apps/codecs/libfaad/sbr_huff.h
new file mode 100644
index 0000000000..d81c5dc528
--- /dev/null
+++ b/apps/codecs/libfaad/sbr_huff.h
@@ -0,0 +1,43 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __SBR_HUFF_H__
29#define __SBR_HUFF_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35
36void sbr_envelope(bitfile *ld, sbr_info *sbr, uint8_t ch);
37void sbr_noise(bitfile *ld, sbr_info *sbr, uint8_t ch);
38
39#ifdef __cplusplus
40}
41#endif
42#endif
43
diff --git a/apps/codecs/libfaad/sbr_noise.h b/apps/codecs/libfaad/sbr_noise.h
new file mode 100644
index 0000000000..73ec5f463c
--- /dev/null
+++ b/apps/codecs/libfaad/sbr_noise.h
@@ -0,0 +1,561 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __SBR_NOISE_H__
29#define __SBR_NOISE_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#ifdef _MSC_VER
36#pragma warning(disable:4305)
37#pragma warning(disable:4244)
38#endif
39
40
41/* Table 1.A.13 Noise table V */
42ALIGN static const complex_t V[] = {
43 { FRAC_CONST(-0.99948155879974), FRAC_CONST(-0.59483414888382) },
44 { FRAC_CONST(0.97113454341888), FRAC_CONST(-0.67528516054153) },
45 { FRAC_CONST(0.14130051434040), FRAC_CONST(-0.95090985298157) },
46 { FRAC_CONST(-0.47005495429039), FRAC_CONST(-0.37340548634529) },
47 { FRAC_CONST(0.80705064535141), FRAC_CONST(0.29653668403625) },
48 { FRAC_CONST(-0.38981479406357), FRAC_CONST(0.89572608470917) },
49 { FRAC_CONST(-0.01053049881011), FRAC_CONST(-0.66959059238434) },
50 { FRAC_CONST(-0.91266369819641), FRAC_CONST(-0.11522938311100) },
51 { FRAC_CONST(0.54840421676636), FRAC_CONST(0.75221365690231) },
52 { FRAC_CONST(0.40009254217148), FRAC_CONST(-0.98929399251938) },
53 { FRAC_CONST(-0.99867975711823), FRAC_CONST(-0.88147068023682) },
54 { FRAC_CONST(-0.95531076192856), FRAC_CONST(0.90908759832382) },
55 { FRAC_CONST(-0.45725932717323), FRAC_CONST(-0.56716322898865) },
56 { FRAC_CONST(-0.72929674386978), FRAC_CONST(-0.98008275032043) },
57 { FRAC_CONST(0.75622802972794), FRAC_CONST(0.20950329303741) },
58 { FRAC_CONST(0.07069442421198), FRAC_CONST(-0.78247898817062) },
59 { FRAC_CONST(0.74496251344681), FRAC_CONST(-0.91169005632401) },
60 { FRAC_CONST(-0.96440184116364), FRAC_CONST(-0.94739919900894) },
61 { FRAC_CONST(0.30424630641937), FRAC_CONST(-0.49438267946243) },
62 { FRAC_CONST(0.66565030813217), FRAC_CONST(0.64652937650681) },
63 { FRAC_CONST(0.91697007417679), FRAC_CONST(0.17514097690582) },
64 { FRAC_CONST(-0.70774918794632), FRAC_CONST(0.52548652887344) },
65 { FRAC_CONST(-0.70051413774490), FRAC_CONST(-0.45340028405190) },
66 { FRAC_CONST(-0.99496513605118), FRAC_CONST(-0.90071910619736) },
67 { FRAC_CONST(0.98164492845535), FRAC_CONST(-0.77463155984879) },
68 { FRAC_CONST(-0.54671579599380), FRAC_CONST(-0.02570928446949) },
69 { FRAC_CONST(-0.01689629070461), FRAC_CONST(0.00287506449968) },
70 { FRAC_CONST(-0.86110347509384), FRAC_CONST(0.42548584938049) },
71 { FRAC_CONST(-0.98892980813980), FRAC_CONST(-0.87881129980087) },
72 { FRAC_CONST(0.51756626367569), FRAC_CONST(0.66926783323288) },
73 { FRAC_CONST(-0.99635028839111), FRAC_CONST(-0.58107727766037) },
74 { FRAC_CONST(-0.99969369173050), FRAC_CONST(0.98369991779327) },
75 { FRAC_CONST(0.55266261100769), FRAC_CONST(0.59449058771133) },
76 { FRAC_CONST(0.34581178426743), FRAC_CONST(0.94879418611526) },
77 { FRAC_CONST(0.62664210796356), FRAC_CONST(-0.74402970075607) },
78 { FRAC_CONST(-0.77149701118469), FRAC_CONST(-0.33883658051491) },
79 { FRAC_CONST(-0.91592246294022), FRAC_CONST(0.03687901422381) },
80 { FRAC_CONST(-0.76285493373871), FRAC_CONST(-0.91371870040894) },
81 { FRAC_CONST(0.79788339138031), FRAC_CONST(-0.93180972337723) },
82 { FRAC_CONST(0.54473078250885), FRAC_CONST(-0.11919206380844) },
83 { FRAC_CONST(-0.85639280080795), FRAC_CONST(0.42429855465889) },
84 { FRAC_CONST(-0.92882400751114), FRAC_CONST(0.27871808409691) },
85 { FRAC_CONST(-0.11708371341228), FRAC_CONST(-0.99800843000412) },
86 { FRAC_CONST(0.21356749534607), FRAC_CONST(-0.90716296434402) },
87 { FRAC_CONST(-0.76191693544388), FRAC_CONST(0.99768120050430) },
88 { FRAC_CONST(0.98111045360565), FRAC_CONST(-0.95854461193085) },
89 { FRAC_CONST(-0.85913270711899), FRAC_CONST(0.95766568183899) },
90 { FRAC_CONST(-0.93307244777679), FRAC_CONST(0.49431759119034) },
91 { FRAC_CONST(0.30485755205154), FRAC_CONST(-0.70540034770966) },
92 { FRAC_CONST(0.85289651155472), FRAC_CONST(0.46766132116318) },
93 { FRAC_CONST(0.91328084468842), FRAC_CONST(-0.99839597940445) },
94 { FRAC_CONST(-0.05890199914575), FRAC_CONST(0.70741826295853) },
95 { FRAC_CONST(0.28398686647415), FRAC_CONST(0.34633556008339) },
96 { FRAC_CONST(0.95258164405823), FRAC_CONST(-0.54893416166306) },
97 { FRAC_CONST(-0.78566324710846), FRAC_CONST(-0.75568538904190) },
98 { FRAC_CONST(-0.95789498090744), FRAC_CONST(-0.20423194766045) },
99 { FRAC_CONST(0.82411158084869), FRAC_CONST(0.96654617786407) },
100 { FRAC_CONST(-0.65185445547104), FRAC_CONST(-0.88734990358353) },
101 { FRAC_CONST(-0.93643605709076), FRAC_CONST(0.99870789051056) },
102 { FRAC_CONST(0.91427159309387), FRAC_CONST(-0.98290503025055) },
103 { FRAC_CONST(-0.70395684242249), FRAC_CONST(0.58796799182892) },
104 { FRAC_CONST(0.00563771976158), FRAC_CONST(0.61768198013306) },
105 { FRAC_CONST(0.89065051078796), FRAC_CONST(0.52783352136612) },
106 { FRAC_CONST(-0.68683707714081), FRAC_CONST(0.80806946754456) },
107 { FRAC_CONST(0.72165340185165), FRAC_CONST(-0.69259858131409) },
108 { FRAC_CONST(-0.62928247451782), FRAC_CONST(0.13627037405968) },
109 { FRAC_CONST(0.29938435554504), FRAC_CONST(-0.46051329374313) },
110 { FRAC_CONST(-0.91781955957413), FRAC_CONST(-0.74012714624405) },
111 { FRAC_CONST(0.99298715591431), FRAC_CONST(0.40816611051559) },
112 { FRAC_CONST(0.82368296384811), FRAC_CONST(-0.74036049842834) },
113 { FRAC_CONST(-0.98512834310532), FRAC_CONST(-0.99972331523895) },
114 { FRAC_CONST(-0.95915371179581), FRAC_CONST(-0.99237799644470) },
115 { FRAC_CONST(-0.21411126852036), FRAC_CONST(-0.93424820899963) },
116 { FRAC_CONST(-0.68821477890015), FRAC_CONST(-0.26892307400703) },
117 { FRAC_CONST(0.91851997375488), FRAC_CONST(0.09358228743076) },
118 { FRAC_CONST(-0.96062767505646), FRAC_CONST(0.36099094152451) },
119 { FRAC_CONST(0.51646184921265), FRAC_CONST(-0.71373331546783) },
120 { FRAC_CONST(0.61130720376968), FRAC_CONST(0.46950140595436) },
121 { FRAC_CONST(0.47336128354073), FRAC_CONST(-0.27333179116249) },
122 { FRAC_CONST(0.90998309850693), FRAC_CONST(0.96715664863586) },
123 { FRAC_CONST(0.44844800233841), FRAC_CONST(0.99211573600769) },
124 { FRAC_CONST(0.66614890098572), FRAC_CONST(0.96590173244476) },
125 { FRAC_CONST(0.74922239780426), FRAC_CONST(-0.89879858493805) },
126 { FRAC_CONST(-0.99571585655212), FRAC_CONST(0.52785521745682) },
127 { FRAC_CONST(0.97401082515717), FRAC_CONST(-0.16855870187283) },
128 { FRAC_CONST(0.72683745622635), FRAC_CONST(-0.48060774803162) },
129 { FRAC_CONST(0.95432192087173), FRAC_CONST(0.68849605321884) },
130 { FRAC_CONST(-0.72962206602097), FRAC_CONST(-0.76608443260193) },
131 { FRAC_CONST(-0.85359477996826), FRAC_CONST(0.88738125562668) },
132 { FRAC_CONST(-0.81412428617477), FRAC_CONST(-0.97480767965317) },
133 { FRAC_CONST(-0.87930774688721), FRAC_CONST(0.74748307466507) },
134 { FRAC_CONST(-0.71573328971863), FRAC_CONST(-0.98570609092712) },
135 { FRAC_CONST(0.83524298667908), FRAC_CONST(0.83702534437180) },
136 { FRAC_CONST(-0.48086065053940), FRAC_CONST(-0.98848503828049) },
137 { FRAC_CONST(0.97139126062393), FRAC_CONST(0.80093622207642) },
138 { FRAC_CONST(0.51992827653885), FRAC_CONST(0.80247628688812) },
139 { FRAC_CONST(-0.00848591234535), FRAC_CONST(-0.76670128107071) },
140 { FRAC_CONST(-0.70294374227524), FRAC_CONST(0.55359911918640) },
141 { FRAC_CONST(-0.95894426107407), FRAC_CONST(-0.43265503644943) },
142 { FRAC_CONST(0.97079253196716), FRAC_CONST(0.09325857460499) },
143 { FRAC_CONST(-0.92404294013977), FRAC_CONST(0.85507702827454) },
144 { FRAC_CONST(-0.69506472349167), FRAC_CONST(0.98633414506912) },
145 { FRAC_CONST(0.26559203863144), FRAC_CONST(0.73314309120178) },
146 { FRAC_CONST(0.28038442134857), FRAC_CONST(0.14537914097309) },
147 { FRAC_CONST(-0.74138122797012), FRAC_CONST(0.99310338497162) },
148 { FRAC_CONST(-0.01752796024084), FRAC_CONST(-0.82616633176804) },
149 { FRAC_CONST(-0.55126774311066), FRAC_CONST(-0.98898541927338) },
150 { FRAC_CONST(0.97960901260376), FRAC_CONST(-0.94021445512772) },
151 { FRAC_CONST(-0.99196308851242), FRAC_CONST(0.67019015550613) },
152 { FRAC_CONST(-0.67684930562973), FRAC_CONST(0.12631492316723) },
153 { FRAC_CONST(0.09140039235353), FRAC_CONST(-0.20537731051445) },
154 { FRAC_CONST(-0.71658962965012), FRAC_CONST(-0.97788202762604) },
155 { FRAC_CONST(0.81014639139175), FRAC_CONST(0.53722649812698) },
156 { FRAC_CONST(0.40616992115974), FRAC_CONST(-0.26469007134438) },
157 { FRAC_CONST(-0.67680186033249), FRAC_CONST(0.94502049684525) },
158 { FRAC_CONST(0.86849772930145), FRAC_CONST(-0.18333598971367) },
159 { FRAC_CONST(-0.99500381946564), FRAC_CONST(-0.02634122036397) },
160 { FRAC_CONST(0.84329187870026), FRAC_CONST(0.10406957566738) },
161 { FRAC_CONST(-0.09215968847275), FRAC_CONST(0.69540011882782) },
162 { FRAC_CONST(0.99956172704697), FRAC_CONST(-0.12358541786671) },
163 { FRAC_CONST(-0.79732781648636), FRAC_CONST(-0.91582524776459) },
164 { FRAC_CONST(0.96349972486496), FRAC_CONST(0.96640455722809) },
165 { FRAC_CONST(-0.79942780733109), FRAC_CONST(0.64323902130127) },
166 { FRAC_CONST(-0.11566039919853), FRAC_CONST(0.28587844967842) },
167 { FRAC_CONST(-0.39922955632210), FRAC_CONST(0.94129604101181) },
168 { FRAC_CONST(0.99089199304581), FRAC_CONST(-0.92062628269196) },
169 { FRAC_CONST(0.28631284832954), FRAC_CONST(-0.91035044193268) },
170 { FRAC_CONST(-0.83302724361420), FRAC_CONST(-0.67330408096313) },
171 { FRAC_CONST(0.95404446125031), FRAC_CONST(0.49162766337395) },
172 { FRAC_CONST(-0.06449863314629), FRAC_CONST(0.03250560909510) },
173 { FRAC_CONST(-0.99575054645538), FRAC_CONST(0.42389783263206) },
174 { FRAC_CONST(-0.65501141548157), FRAC_CONST(0.82546114921570) },
175 { FRAC_CONST(-0.81254440546036), FRAC_CONST(-0.51627236604691) },
176 { FRAC_CONST(-0.99646371603012), FRAC_CONST(0.84490531682968) },
177 { FRAC_CONST(0.00287840608507), FRAC_CONST(0.64768260717392) },
178 { FRAC_CONST(0.70176988840103), FRAC_CONST(-0.20453028380871) },
179 { FRAC_CONST(0.96361881494522), FRAC_CONST(0.40706968307495) },
180 { FRAC_CONST(-0.68883758783340), FRAC_CONST(0.91338956356049) },
181 { FRAC_CONST(-0.34875586628914), FRAC_CONST(0.71472293138504) },
182 { FRAC_CONST(0.91980081796646), FRAC_CONST(0.66507452726364) },
183 { FRAC_CONST(-0.99009048938751), FRAC_CONST(0.85868018865585) },
184 { FRAC_CONST(0.68865793943405), FRAC_CONST(0.55660319328308) },
185 { FRAC_CONST(-0.99484401941299), FRAC_CONST(-0.20052559673786) },
186 { FRAC_CONST(0.94214510917664), FRAC_CONST(-0.99696427583694) },
187 { FRAC_CONST(-0.67414629459381), FRAC_CONST(0.49548220634460) },
188 { FRAC_CONST(-0.47339352965355), FRAC_CONST(-0.85904330015182) },
189 { FRAC_CONST(0.14323651790619), FRAC_CONST(-0.94145596027374) },
190 { FRAC_CONST(-0.29268294572830), FRAC_CONST(0.05759225040674) },
191 { FRAC_CONST(0.43793860077858), FRAC_CONST(-0.78904968500137) },
192 { FRAC_CONST(-0.36345127224922), FRAC_CONST(0.64874434471130) },
193 { FRAC_CONST(-0.08750604838133), FRAC_CONST(0.97686946392059) },
194 { FRAC_CONST(-0.96495270729065), FRAC_CONST(-0.53960305452347) },
195 { FRAC_CONST(0.55526942014694), FRAC_CONST(0.78891521692276) },
196 { FRAC_CONST(0.73538213968277), FRAC_CONST(0.96452075242996) },
197 { FRAC_CONST(-0.30889773368835), FRAC_CONST(-0.80664390325546) },
198 { FRAC_CONST(0.03574995696545), FRAC_CONST(-0.97325617074966) },
199 { FRAC_CONST(0.98720687627792), FRAC_CONST(0.48409134149551) },
200 { FRAC_CONST(-0.81689298152924), FRAC_CONST(-0.90827703475952) },
201 { FRAC_CONST(0.67866861820221), FRAC_CONST(0.81284505128860) },
202 { FRAC_CONST(-0.15808570384979), FRAC_CONST(0.85279554128647) },
203 { FRAC_CONST(0.80723392963409), FRAC_CONST(-0.24717418849468) },
204 { FRAC_CONST(0.47788757085800), FRAC_CONST(-0.46333149075508) },
205 { FRAC_CONST(0.96367555856705), FRAC_CONST(0.38486748933792) },
206 { FRAC_CONST(-0.99143874645233), FRAC_CONST(-0.24945276975632) },
207 { FRAC_CONST(0.83081877231598), FRAC_CONST(-0.94780850410461) },
208 { FRAC_CONST(-0.58753192424774), FRAC_CONST(0.01290772389621) },
209 { FRAC_CONST(0.95538109540939), FRAC_CONST(-0.85557049512863) },
210 { FRAC_CONST(-0.96490919589996), FRAC_CONST(-0.64020973443985) },
211 { FRAC_CONST(-0.97327101230621), FRAC_CONST(0.12378127872944) },
212 { FRAC_CONST(0.91400367021561), FRAC_CONST(0.57972472906113) },
213 { FRAC_CONST(-0.99925839900970), FRAC_CONST(0.71084845066071) },
214 { FRAC_CONST(-0.86875903606415), FRAC_CONST(-0.20291699469090) },
215 { FRAC_CONST(-0.26240035891533), FRAC_CONST(-0.68264555931091) },
216 { FRAC_CONST(-0.24664412438869), FRAC_CONST(-0.87642270326614) },
217 { FRAC_CONST(0.02416275814176), FRAC_CONST(0.27192914485931) },
218 { FRAC_CONST(0.82068622112274), FRAC_CONST(-0.85087788105011) },
219 { FRAC_CONST(0.88547372817993), FRAC_CONST(-0.89636802673340) },
220 { FRAC_CONST(-0.18173077702522), FRAC_CONST(-0.26152145862579) },
221 { FRAC_CONST(0.09355476498604), FRAC_CONST(0.54845124483109) },
222 { FRAC_CONST(-0.54668414592743), FRAC_CONST(0.95980775356293) },
223 { FRAC_CONST(0.37050989270210), FRAC_CONST(-0.59910142421722) },
224 { FRAC_CONST(-0.70373594760895), FRAC_CONST(0.91227668523788) },
225 { FRAC_CONST(-0.34600785374641), FRAC_CONST(-0.99441426992416) },
226 { FRAC_CONST(-0.68774479627609), FRAC_CONST(-0.30238837003708) },
227 { FRAC_CONST(-0.26843291521072), FRAC_CONST(0.83115667104721) },
228 { FRAC_CONST(0.49072334170341), FRAC_CONST(-0.45359709858894) },
229 { FRAC_CONST(0.38975992798805), FRAC_CONST(0.95515358448029) },
230 { FRAC_CONST(-0.97757124900818), FRAC_CONST(0.05305894464254) },
231 { FRAC_CONST(-0.17325553297997), FRAC_CONST(-0.92770671844482) },
232 { FRAC_CONST(0.99948036670685), FRAC_CONST(0.58285546302795) },
233 { FRAC_CONST(-0.64946246147156), FRAC_CONST(0.68645507097244) },
234 { FRAC_CONST(-0.12016920745373), FRAC_CONST(-0.57147324085236) },
235 { FRAC_CONST(-0.58947455883026), FRAC_CONST(-0.34847131371498) },
236 { FRAC_CONST(-0.41815140843391), FRAC_CONST(0.16276422142982) },
237 { FRAC_CONST(0.99885648488998), FRAC_CONST(0.11136095225811) },
238 { FRAC_CONST(-0.56649613380432), FRAC_CONST(-0.90494865179062) },
239 { FRAC_CONST(0.94138020277023), FRAC_CONST(0.35281917452812) },
240 { FRAC_CONST(-0.75725078582764), FRAC_CONST(0.53650552034378) },
241 { FRAC_CONST(0.20541973412037), FRAC_CONST(-0.94435143470764) },
242 { FRAC_CONST(0.99980372190475), FRAC_CONST(0.79835915565491) },
243 { FRAC_CONST(0.29078277945518), FRAC_CONST(0.35393777489662) },
244 { FRAC_CONST(-0.62858772277832), FRAC_CONST(0.38765692710876) },
245 { FRAC_CONST(0.43440905213356), FRAC_CONST(-0.98546332120895) },
246 { FRAC_CONST(-0.98298585414886), FRAC_CONST(0.21021524071693) },
247 { FRAC_CONST(0.19513028860092), FRAC_CONST(-0.94239830970764) },
248 { FRAC_CONST(-0.95476663112640), FRAC_CONST(0.98364555835724) },
249 { FRAC_CONST(0.93379634618759), FRAC_CONST(-0.70881992578506) },
250 { FRAC_CONST(-0.85235410928726), FRAC_CONST(-0.08342348039150) },
251 { FRAC_CONST(-0.86425095796585), FRAC_CONST(-0.45795026421547) },
252 { FRAC_CONST(0.38879778981209), FRAC_CONST(0.97274428606033) },
253 { FRAC_CONST(0.92045122385025), FRAC_CONST(-0.62433654069901) },
254 { FRAC_CONST(0.89162534475327), FRAC_CONST(0.54950958490372) },
255 { FRAC_CONST(-0.36834338307381), FRAC_CONST(0.96458297967911) },
256 { FRAC_CONST(0.93891763687134), FRAC_CONST(-0.89968353509903) },
257 { FRAC_CONST(0.99267655611038), FRAC_CONST(-0.03757034242153) },
258 { FRAC_CONST(-0.94063472747803), FRAC_CONST(0.41332337260246) },
259 { FRAC_CONST(0.99740225076675), FRAC_CONST(-0.16830494999886) },
260 { FRAC_CONST(-0.35899412631989), FRAC_CONST(-0.46633225679398) },
261 { FRAC_CONST(0.05237237364054), FRAC_CONST(-0.25640362501144) },
262 { FRAC_CONST(0.36703583598137), FRAC_CONST(-0.38653266429901) },
263 { FRAC_CONST(0.91653180122375), FRAC_CONST(-0.30587628483772) },
264 { FRAC_CONST(0.69000804424286), FRAC_CONST(0.90952169895172) },
265 { FRAC_CONST(-0.38658750057220), FRAC_CONST(0.99501574039459) },
266 { FRAC_CONST(-0.29250815510750), FRAC_CONST(0.37444993853569) },
267 { FRAC_CONST(-0.60182201862335), FRAC_CONST(0.86779648065567) },
268 { FRAC_CONST(-0.97418588399887), FRAC_CONST(0.96468526124954) },
269 { FRAC_CONST(0.88461571931839), FRAC_CONST(0.57508403062820) },
270 { FRAC_CONST(0.05198933184147), FRAC_CONST(0.21269661188126) },
271 { FRAC_CONST(-0.53499621152878), FRAC_CONST(0.97241556644440) },
272 { FRAC_CONST(-0.49429559707642), FRAC_CONST(0.98183864355087) },
273 { FRAC_CONST(-0.98935145139694), FRAC_CONST(-0.40249159932137) },
274 { FRAC_CONST(-0.98081380128860), FRAC_CONST(-0.72856897115707) },
275 { FRAC_CONST(-0.27338150143623), FRAC_CONST(0.99950921535492) },
276 { FRAC_CONST(0.06310802698135), FRAC_CONST(-0.54539585113525) },
277 { FRAC_CONST(-0.20461677014828), FRAC_CONST(-0.14209978282452) },
278 { FRAC_CONST(0.66223841905594), FRAC_CONST(0.72528582811356) },
279 { FRAC_CONST(-0.84764343500137), FRAC_CONST(0.02372316829860) },
280 { FRAC_CONST(-0.89039862155914), FRAC_CONST(0.88866579532623) },
281 { FRAC_CONST(0.95903307199478), FRAC_CONST(0.76744925975800) },
282 { FRAC_CONST(0.73504126071930), FRAC_CONST(-0.03747203201056) },
283 { FRAC_CONST(-0.31744435429573), FRAC_CONST(-0.36834111809731) },
284 { FRAC_CONST(-0.34110826253891), FRAC_CONST(0.40211221575737) },
285 { FRAC_CONST(0.47803884744644), FRAC_CONST(-0.39423218369484) },
286 { FRAC_CONST(0.98299193382263), FRAC_CONST(0.01989791356027) },
287 { FRAC_CONST(-0.30963072180748), FRAC_CONST(-0.18076720833778) },
288 { FRAC_CONST(0.99992591142654), FRAC_CONST(-0.26281872391701) },
289 { FRAC_CONST(-0.93149733543396), FRAC_CONST(-0.98313164710999) },
290 { FRAC_CONST(0.99923473596573), FRAC_CONST(-0.80142992734909) },
291 { FRAC_CONST(-0.26024168729782), FRAC_CONST(-0.75999760627747) },
292 { FRAC_CONST(-0.35712513327599), FRAC_CONST(0.19298963248730) },
293 { FRAC_CONST(-0.99899083375931), FRAC_CONST(0.74645155668259) },
294 { FRAC_CONST(0.86557173728943), FRAC_CONST(0.55593866109848) },
295 { FRAC_CONST(0.33408042788506), FRAC_CONST(0.86185956001282) },
296 { FRAC_CONST(0.99010735750198), FRAC_CONST(0.04602397605777) },
297 { FRAC_CONST(-0.66694271564484), FRAC_CONST(-0.91643613576889) },
298 { FRAC_CONST(0.64016789197922), FRAC_CONST(0.15649530291557) },
299 { FRAC_CONST(0.99570536613464), FRAC_CONST(0.45844584703445) },
300 { FRAC_CONST(-0.63431465625763), FRAC_CONST(0.21079117059708) },
301 { FRAC_CONST(-0.07706847041845), FRAC_CONST(-0.89581435918808) },
302 { FRAC_CONST(0.98590087890625), FRAC_CONST(0.88241720199585) },
303 { FRAC_CONST(0.80099332332611), FRAC_CONST(-0.36851897835732) },
304 { FRAC_CONST(0.78368133306503), FRAC_CONST(0.45506998896599) },
305 { FRAC_CONST(0.08707806468010), FRAC_CONST(0.80938994884491) },
306 { FRAC_CONST(-0.86811882257462), FRAC_CONST(0.39347308874130) },
307 { FRAC_CONST(-0.39466530084610), FRAC_CONST(-0.66809433698654) },
308 { FRAC_CONST(0.97875326871872), FRAC_CONST(-0.72467839717865) },
309 { FRAC_CONST(-0.95038563013077), FRAC_CONST(0.89563220739365) },
310 { FRAC_CONST(0.17005239427090), FRAC_CONST(0.54683053493500) },
311 { FRAC_CONST(-0.76910793781281), FRAC_CONST(-0.96226614713669) },
312 { FRAC_CONST(0.99743282794952), FRAC_CONST(0.42697158455849) },
313 { FRAC_CONST(0.95437383651733), FRAC_CONST(0.97002321481705) },
314 { FRAC_CONST(0.99578905105591), FRAC_CONST(-0.54106825590134) },
315 { FRAC_CONST(0.28058260679245), FRAC_CONST(-0.85361421108246) },
316 { FRAC_CONST(0.85256522893906), FRAC_CONST(-0.64567607641220) },
317 { FRAC_CONST(-0.50608539581299), FRAC_CONST(-0.65846014022827) },
318 { FRAC_CONST(-0.97210735082626), FRAC_CONST(-0.23095212876797) },
319 { FRAC_CONST(0.95424050092697), FRAC_CONST(-0.99240148067474) },
320 { FRAC_CONST(-0.96926569938660), FRAC_CONST(0.73775655031204) },
321 { FRAC_CONST(0.30872163176537), FRAC_CONST(0.41514959931374) },
322 { FRAC_CONST(-0.24523839354515), FRAC_CONST(0.63206630945206) },
323 { FRAC_CONST(-0.33813264966011), FRAC_CONST(-0.38661777973175) },
324 { FRAC_CONST(-0.05826828256249), FRAC_CONST(-0.06940773874521) },
325 { FRAC_CONST(-0.22898460924625), FRAC_CONST(0.97054851055145) },
326 { FRAC_CONST(-0.18509915471077), FRAC_CONST(0.47565764188766) },
327 { FRAC_CONST(-0.10488238185644), FRAC_CONST(-0.87769949436188) },
328 { FRAC_CONST(-0.71886587142944), FRAC_CONST(0.78030979633331) },
329 { FRAC_CONST(0.99793875217438), FRAC_CONST(0.90041309595108) },
330 { FRAC_CONST(0.57563304901123), FRAC_CONST(-0.91034334897995) },
331 { FRAC_CONST(0.28909647464752), FRAC_CONST(0.96307784318924) },
332 { FRAC_CONST(0.42188999056816), FRAC_CONST(0.48148649930954) },
333 { FRAC_CONST(0.93335050344467), FRAC_CONST(-0.43537023663521) },
334 { FRAC_CONST(-0.97087377309799), FRAC_CONST(0.86636447906494) },
335 { FRAC_CONST(0.36722871661186), FRAC_CONST(0.65291655063629) },
336 { FRAC_CONST(-0.81093025207520), FRAC_CONST(0.08778370171785) },
337 { FRAC_CONST(-0.26240602135658), FRAC_CONST(-0.92774093151093) },
338 { FRAC_CONST(0.83996498584747), FRAC_CONST(0.55839848518372) },
339 { FRAC_CONST(-0.99909615516663), FRAC_CONST(-0.96024608612061) },
340 { FRAC_CONST(0.74649465084076), FRAC_CONST(0.12144893407822) },
341 { FRAC_CONST(-0.74774593114853), FRAC_CONST(-0.26898062229156) },
342 { FRAC_CONST(0.95781666040421), FRAC_CONST(-0.79047924280167) },
343 { FRAC_CONST(0.95472306013107), FRAC_CONST(-0.08588775992393) },
344 { FRAC_CONST(0.48708331584930), FRAC_CONST(0.99999040365219) },
345 { FRAC_CONST(0.46332037448883), FRAC_CONST(0.10964126139879) },
346 { FRAC_CONST(-0.76497006416321), FRAC_CONST(0.89210927486420) },
347 { FRAC_CONST(0.57397389411926), FRAC_CONST(0.35289704799652) },
348 { FRAC_CONST(0.75374317169189), FRAC_CONST(0.96705216169357) },
349 { FRAC_CONST(-0.59174400568008), FRAC_CONST(-0.89405369758606) },
350 { FRAC_CONST(0.75087904930115), FRAC_CONST(-0.29612672328949) },
351 { FRAC_CONST(-0.98607856035233), FRAC_CONST(0.25034910440445) },
352 { FRAC_CONST(-0.40761056542397), FRAC_CONST(-0.90045571327209) },
353 { FRAC_CONST(0.66929268836975), FRAC_CONST(0.98629492521286) },
354 { FRAC_CONST(-0.97463697195053), FRAC_CONST(-0.00190223299433) },
355 { FRAC_CONST(0.90145510435104), FRAC_CONST(0.99781388044357) },
356 { FRAC_CONST(-0.87259286642075), FRAC_CONST(0.99233585596085) },
357 { FRAC_CONST(-0.91529458761215), FRAC_CONST(-0.15698707103729) },
358 { FRAC_CONST(-0.03305738791823), FRAC_CONST(-0.37205263972282) },
359 { FRAC_CONST(0.07223051041365), FRAC_CONST(-0.88805001974106) },
360 { FRAC_CONST(0.99498009681702), FRAC_CONST(0.97094357013702) },
361 { FRAC_CONST(-0.74904936552048), FRAC_CONST(0.99985486268997) },
362 { FRAC_CONST(0.04585228487849), FRAC_CONST(0.99812334775925) },
363 { FRAC_CONST(-0.89054954051971), FRAC_CONST(-0.31791913509369) },
364 { FRAC_CONST(-0.83782142400742), FRAC_CONST(0.97637635469437) },
365 { FRAC_CONST(0.33454805612564), FRAC_CONST(-0.86231517791748) },
366 { FRAC_CONST(-0.99707579612732), FRAC_CONST(0.93237990140915) },
367 { FRAC_CONST(-0.22827528417110), FRAC_CONST(0.18874759972095) },
368 { FRAC_CONST(0.67248046398163), FRAC_CONST(-0.03646211326122) },
369 { FRAC_CONST(-0.05146538093686), FRAC_CONST(-0.92599701881409) },
370 { FRAC_CONST(0.99947297573090), FRAC_CONST(0.93625229597092) },
371 { FRAC_CONST(0.66951125860214), FRAC_CONST(0.98905825614929) },
372 { FRAC_CONST(-0.99602955579758), FRAC_CONST(-0.44654715061188) },
373 { FRAC_CONST(0.82104903459549), FRAC_CONST(0.99540740251541) },
374 { FRAC_CONST(0.99186509847641), FRAC_CONST(0.72022998332977) },
375 { FRAC_CONST(-0.65284591913223), FRAC_CONST(0.52186721563339) },
376 { FRAC_CONST(0.93885445594788), FRAC_CONST(-0.74895310401917) },
377 { FRAC_CONST(0.96735250949860), FRAC_CONST(0.90891814231873) },
378 { FRAC_CONST(-0.22225968539715), FRAC_CONST(0.57124030590057) },
379 { FRAC_CONST(-0.44132784008980), FRAC_CONST(-0.92688840627670) },
380 { FRAC_CONST(-0.85694974660873), FRAC_CONST(0.88844531774521) },
381 { FRAC_CONST(0.91783040761948), FRAC_CONST(-0.46356892585754) },
382 { FRAC_CONST(0.72556972503662), FRAC_CONST(-0.99899554252625) },
383 { FRAC_CONST(-0.99711579084396), FRAC_CONST(0.58211559057236) },
384 { FRAC_CONST(0.77638977766037), FRAC_CONST(0.94321835041046) },
385 { FRAC_CONST(0.07717324048281), FRAC_CONST(0.58638399839401) },
386 { FRAC_CONST(-0.56049829721451), FRAC_CONST(0.82522302865982) },
387 { FRAC_CONST(0.98398894071579), FRAC_CONST(0.39467439055443) },
388 { FRAC_CONST(0.47546947002411), FRAC_CONST(0.68613046407700) },
389 { FRAC_CONST(0.65675091743469), FRAC_CONST(0.18331636488438) },
390 { FRAC_CONST(0.03273375332355), FRAC_CONST(-0.74933111667633) },
391 { FRAC_CONST(-0.38684144616127), FRAC_CONST(0.51337349414825) },
392 { FRAC_CONST(-0.97346270084381), FRAC_CONST(-0.96549361944199) },
393 { FRAC_CONST(-0.53282153606415), FRAC_CONST(-0.91423267126083) },
394 { FRAC_CONST(0.99817311763763), FRAC_CONST(0.61133575439453) },
395 { FRAC_CONST(-0.50254499912262), FRAC_CONST(-0.88829338550568) },
396 { FRAC_CONST(0.01995873264968), FRAC_CONST(0.85223513841629) },
397 { FRAC_CONST(0.99930381774902), FRAC_CONST(0.94578897953033) },
398 { FRAC_CONST(0.82907766103745), FRAC_CONST(-0.06323442608118) },
399 { FRAC_CONST(-0.58660709857941), FRAC_CONST(0.96840775012970) },
400 { FRAC_CONST(-0.17573736608028), FRAC_CONST(-0.48166921734810) },
401 { FRAC_CONST(0.83434289693832), FRAC_CONST(-0.13023450970650) },
402 { FRAC_CONST(0.05946491286159), FRAC_CONST(0.20511047542095) },
403 { FRAC_CONST(0.81505483388901), FRAC_CONST(-0.94685947895050) },
404 { FRAC_CONST(-0.44976380467415), FRAC_CONST(0.40894573926926) },
405 { FRAC_CONST(-0.89746475219727), FRAC_CONST(0.99846577644348) },
406 { FRAC_CONST(0.39677256345749), FRAC_CONST(-0.74854665994644) },
407 { FRAC_CONST(-0.07588948309422), FRAC_CONST(0.74096214771271) },
408 { FRAC_CONST(0.76343196630478), FRAC_CONST(0.41746628284454) },
409 { FRAC_CONST(-0.74490106105804), FRAC_CONST(0.94725912809372) },
410 { FRAC_CONST(0.64880120754242), FRAC_CONST(0.41336661577225) },
411 { FRAC_CONST(0.62319535017014), FRAC_CONST(-0.93098312616348) },
412 { FRAC_CONST(0.42215818166733), FRAC_CONST(-0.07712787389755) },
413 { FRAC_CONST(0.02704554051161), FRAC_CONST(-0.05417517945170) },
414 { FRAC_CONST(0.80001771450043), FRAC_CONST(0.91542196273804) },
415 { FRAC_CONST(-0.79351830482483), FRAC_CONST(-0.36208897829056) },
416 { FRAC_CONST(0.63872361183167), FRAC_CONST(0.08128252625465) },
417 { FRAC_CONST(0.52890521287918), FRAC_CONST(0.60048872232437) },
418 { FRAC_CONST(0.74238550662994), FRAC_CONST(0.04491915181279) },
419 { FRAC_CONST(0.99096131324768), FRAC_CONST(-0.19451183080673) },
420 { FRAC_CONST(-0.80412328243256), FRAC_CONST(-0.88513815402985) },
421 { FRAC_CONST(-0.64612615108490), FRAC_CONST(0.72198677062988) },
422 { FRAC_CONST(0.11657770723104), FRAC_CONST(-0.83662831783295) },
423 { FRAC_CONST(-0.95053184032440), FRAC_CONST(-0.96939903497696) },
424 { FRAC_CONST(-0.62228870391846), FRAC_CONST(0.82767260074615) },
425 { FRAC_CONST(0.03004475869238), FRAC_CONST(-0.99738895893097) },
426 { FRAC_CONST(-0.97987216711044), FRAC_CONST(0.36526128649712) },
427 { FRAC_CONST(-0.99986982345581), FRAC_CONST(-0.36021611094475) },
428 { FRAC_CONST(0.89110648632050), FRAC_CONST(-0.97894251346588) },
429 { FRAC_CONST(0.10407960414886), FRAC_CONST(0.77357792854309) },
430 { FRAC_CONST(0.95964735746384), FRAC_CONST(-0.35435819625854) },
431 { FRAC_CONST(0.50843232870102), FRAC_CONST(0.96107691526413) },
432 { FRAC_CONST(0.17006334662437), FRAC_CONST(-0.76854026317596) },
433 { FRAC_CONST(0.25872674584389), FRAC_CONST(0.99893301725388) },
434 { FRAC_CONST(-0.01115998718888), FRAC_CONST(0.98496019840240) },
435 { FRAC_CONST(-0.79598701000214), FRAC_CONST(0.97138410806656) },
436 { FRAC_CONST(-0.99264711141586), FRAC_CONST(-0.99542820453644) },
437 { FRAC_CONST(-0.99829661846161), FRAC_CONST(0.01877138763666) },
438 { FRAC_CONST(-0.70801013708115), FRAC_CONST(0.33680686354637) },
439 { FRAC_CONST(-0.70467054843903), FRAC_CONST(0.93272775411606) },
440 { FRAC_CONST(0.99846023321152), FRAC_CONST(-0.98725748062134) },
441 { FRAC_CONST(-0.63364970684052), FRAC_CONST(-0.16473594307899) },
442 { FRAC_CONST(-0.16258217394352), FRAC_CONST(-0.95939123630524) },
443 { FRAC_CONST(-0.43645593523979), FRAC_CONST(-0.94805032014847) },
444 { FRAC_CONST(-0.99848473072052), FRAC_CONST(0.96245169639587) },
445 { FRAC_CONST(-0.16796459257603), FRAC_CONST(-0.98987513780594) },
446 { FRAC_CONST(-0.87979227304459), FRAC_CONST(-0.71725726127625) },
447 { FRAC_CONST(0.44183099269867), FRAC_CONST(-0.93568974733353) },
448 { FRAC_CONST(0.93310177326202), FRAC_CONST(-0.99913311004639) },
449 { FRAC_CONST(-0.93941932916641), FRAC_CONST(-0.56409376859665) },
450 { FRAC_CONST(-0.88590002059937), FRAC_CONST(0.47624599933624) },
451 { FRAC_CONST(0.99971461296082), FRAC_CONST(-0.83889955282211) },
452 { FRAC_CONST(-0.75376385450363), FRAC_CONST(0.00814643409103) },
453 { FRAC_CONST(0.93887686729431), FRAC_CONST(-0.11284527927637) },
454 { FRAC_CONST(0.85126435756683), FRAC_CONST(0.52349251508713) },
455 { FRAC_CONST(0.39701420068741), FRAC_CONST(0.81779634952545) },
456 { FRAC_CONST(-0.37024465203285), FRAC_CONST(-0.87071657180786) },
457 { FRAC_CONST(-0.36024826765060), FRAC_CONST(0.34655734896660) },
458 { FRAC_CONST(-0.93388813734055), FRAC_CONST(-0.84476542472839) },
459 { FRAC_CONST(-0.65298801660538), FRAC_CONST(-0.18439576029778) },
460 { FRAC_CONST(0.11960318684578), FRAC_CONST(0.99899345636368) },
461 { FRAC_CONST(0.94292563199997), FRAC_CONST(0.83163905143738) },
462 { FRAC_CONST(0.75081145763397), FRAC_CONST(-0.35533222556114) },
463 { FRAC_CONST(0.56721979379654), FRAC_CONST(-0.24076835811138) },
464 { FRAC_CONST(0.46857765316963), FRAC_CONST(-0.30140233039856) },
465 { FRAC_CONST(0.97312313318253), FRAC_CONST(-0.99548190832138) },
466 { FRAC_CONST(-0.38299977779388), FRAC_CONST(0.98516911268234) },
467 { FRAC_CONST(0.41025799512863), FRAC_CONST(0.02116736955941) },
468 { FRAC_CONST(0.09638062119484), FRAC_CONST(0.04411984235048) },
469 { FRAC_CONST(-0.85283249616623), FRAC_CONST(0.91475564241409) },
470 { FRAC_CONST(0.88866806030273), FRAC_CONST(-0.99735265970230) },
471 { FRAC_CONST(-0.48202428221703), FRAC_CONST(-0.96805608272552) },
472 { FRAC_CONST(0.27572581171989), FRAC_CONST(0.58634752035141) },
473 { FRAC_CONST(-0.65889132022858), FRAC_CONST(0.58835631608963) },
474 { FRAC_CONST(0.98838084936142), FRAC_CONST(0.99994349479675) },
475 { FRAC_CONST(-0.20651349425316), FRAC_CONST(0.54593044519424) },
476 { FRAC_CONST(-0.62126415967941), FRAC_CONST(-0.59893679618835) },
477 { FRAC_CONST(0.20320105552673), FRAC_CONST(-0.86879181861877) },
478 { FRAC_CONST(-0.97790551185608), FRAC_CONST(0.96290808916092) },
479 { FRAC_CONST(0.11112534999847), FRAC_CONST(0.21484763920307) },
480 { FRAC_CONST(-0.41368338465691), FRAC_CONST(0.28216838836670) },
481 { FRAC_CONST(0.24133038520813), FRAC_CONST(0.51294362545013) },
482 { FRAC_CONST(-0.66393411159515), FRAC_CONST(-0.08249679952860) },
483 { FRAC_CONST(-0.53697830438614), FRAC_CONST(-0.97649902105331) },
484 { FRAC_CONST(-0.97224736213684), FRAC_CONST(0.22081333398819) },
485 { FRAC_CONST(0.87392479181290), FRAC_CONST(-0.12796173989773) },
486 { FRAC_CONST(0.19050361216068), FRAC_CONST(0.01602615416050) },
487 { FRAC_CONST(-0.46353441476822), FRAC_CONST(-0.95249038934708) },
488 { FRAC_CONST(-0.07064096629620), FRAC_CONST(-0.94479805231094) },
489 { FRAC_CONST(-0.92444086074829), FRAC_CONST(-0.10457590222359) },
490 { FRAC_CONST(-0.83822596073151), FRAC_CONST(-0.01695043221116) },
491 { FRAC_CONST(0.75214684009552), FRAC_CONST(-0.99955683946609) },
492 { FRAC_CONST(-0.42102998495102), FRAC_CONST(0.99720942974091) },
493 { FRAC_CONST(-0.72094786167145), FRAC_CONST(-0.35008960962296) },
494 { FRAC_CONST(0.78843313455582), FRAC_CONST(0.52851396799088) },
495 { FRAC_CONST(0.97394025325775), FRAC_CONST(-0.26695942878723) },
496 { FRAC_CONST(0.99206465482712), FRAC_CONST(-0.57010120153427) },
497 { FRAC_CONST(0.76789611577988), FRAC_CONST(-0.76519358158112) },
498 { FRAC_CONST(-0.82002419233322), FRAC_CONST(-0.73530179262161) },
499 { FRAC_CONST(0.81924992799759), FRAC_CONST(0.99698424339294) },
500 { FRAC_CONST(-0.26719850301743), FRAC_CONST(0.68903368711472) },
501 { FRAC_CONST(-0.43311259150505), FRAC_CONST(0.85321813821793) },
502 { FRAC_CONST(0.99194979667664), FRAC_CONST(0.91876250505447) },
503 { FRAC_CONST(-0.80691999197006), FRAC_CONST(-0.32627540826797) },
504 { FRAC_CONST(0.43080005049706), FRAC_CONST(-0.21919095516205) },
505 { FRAC_CONST(0.67709493637085), FRAC_CONST(-0.95478075742722) },
506 { FRAC_CONST(0.56151771545410), FRAC_CONST(-0.70693808794022) },
507 { FRAC_CONST(0.10831862688065), FRAC_CONST(-0.08628837019205) },
508 { FRAC_CONST(0.91229414939880), FRAC_CONST(-0.65987348556519) },
509 { FRAC_CONST(-0.48972892761230), FRAC_CONST(0.56289243698120) },
510 { FRAC_CONST(-0.89033657312393), FRAC_CONST(-0.71656566858292) },
511 { FRAC_CONST(0.65269446372986), FRAC_CONST(0.65916007757187) },
512 { FRAC_CONST(0.67439478635788), FRAC_CONST(-0.81684380769730) },
513 { FRAC_CONST(-0.47770830988884), FRAC_CONST(-0.16789555549622) },
514 { FRAC_CONST(-0.99715977907181), FRAC_CONST(-0.93565785884857) },
515 { FRAC_CONST(-0.90889590978622), FRAC_CONST(0.62034398317337) },
516 { FRAC_CONST(-0.06618622690439), FRAC_CONST(-0.23812216520309) },
517 { FRAC_CONST(0.99430269002914), FRAC_CONST(0.18812555074692) },
518 { FRAC_CONST(0.97686403989792), FRAC_CONST(-0.28664535284042) },
519 { FRAC_CONST(0.94813650846481), FRAC_CONST(-0.97506642341614) },
520 { FRAC_CONST(-0.95434498786926), FRAC_CONST(-0.79607981443405) },
521 { FRAC_CONST(-0.49104782938957), FRAC_CONST(0.32895213365555) },
522 { FRAC_CONST(0.99881172180176), FRAC_CONST(0.88993984460831) },
523 { FRAC_CONST(0.50449168682098), FRAC_CONST(-0.85995072126389) },
524 { FRAC_CONST(0.47162890434265), FRAC_CONST(-0.18680204451084) },
525 { FRAC_CONST(-0.62081581354141), FRAC_CONST(0.75000673532486) },
526 { FRAC_CONST(-0.43867015838623), FRAC_CONST(0.99998068809509) },
527 { FRAC_CONST(0.98630565404892), FRAC_CONST(-0.53578901290894) },
528 { FRAC_CONST(-0.61510360240936), FRAC_CONST(-0.89515018463135) },
529 { FRAC_CONST(-0.03841517493129), FRAC_CONST(-0.69888818264008) },
530 { FRAC_CONST(-0.30102157592773), FRAC_CONST(-0.07667808979750) },
531 { FRAC_CONST(0.41881284117699), FRAC_CONST(0.02188098989427) },
532 { FRAC_CONST(-0.86135452985764), FRAC_CONST(0.98947483301163) },
533 { FRAC_CONST(0.67226862907410), FRAC_CONST(-0.13494388759136) },
534 { FRAC_CONST(-0.70737397670746), FRAC_CONST(-0.76547348499298) },
535 { FRAC_CONST(0.94044947624207), FRAC_CONST(0.09026201069355) },
536 { FRAC_CONST(-0.82386350631714), FRAC_CONST(0.08924768865108) },
537 { FRAC_CONST(-0.32070666551590), FRAC_CONST(0.50143420696259) },
538 { FRAC_CONST(0.57593160867691), FRAC_CONST(-0.98966425657272) },
539 { FRAC_CONST(-0.36326017975807), FRAC_CONST(0.07440242916346) },
540 { FRAC_CONST(0.99979043006897), FRAC_CONST(-0.14130286872387) },
541 { FRAC_CONST(-0.92366021871567), FRAC_CONST(-0.97979295253754) },
542 { FRAC_CONST(-0.44607177376747), FRAC_CONST(-0.54233253002167) },
543 { FRAC_CONST(0.44226801395416), FRAC_CONST(0.71326756477356) },
544 { FRAC_CONST(0.03671907261014), FRAC_CONST(0.63606387376785) },
545 { FRAC_CONST(0.52175426483154), FRAC_CONST(-0.85396826267242) },
546 { FRAC_CONST(-0.94701141119003), FRAC_CONST(-0.01826348155737) },
547 { FRAC_CONST(-0.98759609460831), FRAC_CONST(0.82288712263107) },
548 { FRAC_CONST(0.87434792518616), FRAC_CONST(0.89399492740631) },
549 { FRAC_CONST(-0.93412041664124), FRAC_CONST(0.41374051570892) },
550 { FRAC_CONST(0.96063941717148), FRAC_CONST(0.93116706609726) },
551 { FRAC_CONST(0.97534251213074), FRAC_CONST(0.86150932312012) },
552 { FRAC_CONST(0.99642467498779), FRAC_CONST(0.70190042257309) },
553 { FRAC_CONST(-0.94705086946487), FRAC_CONST(-0.29580041766167) },
554 { FRAC_CONST(0.91599804162979), FRAC_CONST(-0.98147833347321) }
555};
556
557#ifdef __cplusplus
558
559#endif
560#endif
561
diff --git a/apps/codecs/libfaad/sbr_qmf.c b/apps/codecs/libfaad/sbr_qmf.c
new file mode 100644
index 0000000000..e99adb4a16
--- /dev/null
+++ b/apps/codecs/libfaad/sbr_qmf.c
@@ -0,0 +1,633 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#include "common.h"
29#include "structs.h"
30
31#ifdef SBR_DEC
32
33
34#include <stdlib.h>
35#include <string.h>
36#include "sbr_dct.h"
37#include "sbr_qmf.h"
38#include "sbr_qmf_c.h"
39#include "sbr_syntax.h"
40
41qmfa_info *qmfa_init(uint8_t channels)
42{
43 qmfa_info *qmfa = (qmfa_info*)faad_malloc(sizeof(qmfa_info));
44
45 /* x is implemented as double ringbuffer */
46 qmfa->x = (real_t*)faad_malloc(2 * channels * 10 * sizeof(real_t));
47 memset(qmfa->x, 0, 2 * channels * 10 * sizeof(real_t));
48
49 /* ringbuffer index */
50 qmfa->x_index = 0;
51
52 qmfa->channels = channels;
53
54 return qmfa;
55}
56
57void qmfa_end(qmfa_info *qmfa)
58{
59 if (qmfa)
60 {
61 if (qmfa->x) faad_free(qmfa->x);
62 faad_free(qmfa);
63 }
64}
65
66void sbr_qmf_analysis_32(sbr_info *sbr, qmfa_info *qmfa, const real_t *input,
67 qmf_t X[MAX_NTSRHFG][64], uint8_t offset, uint8_t kx)
68{
69 ALIGN real_t u[64];
70#ifndef SBR_LOW_POWER
71 ALIGN real_t in_real[32], in_imag[32], out_real[32], out_imag[32];
72#else
73 ALIGN real_t y[32];
74#endif
75 uint16_t in = 0;
76 uint8_t l;
77
78 /* qmf subsample l */
79 for (l = 0; l < sbr->numTimeSlotsRate; l++)
80 {
81 int16_t n;
82
83 /* shift input buffer x */
84 /* input buffer is not shifted anymore, x is implemented as double ringbuffer */
85 //memmove(qmfa->x + 32, qmfa->x, (320-32)*sizeof(real_t));
86
87 /* add new samples to input buffer x */
88 for (n = 32 - 1; n >= 0; n--)
89 {
90#ifdef FIXED_POINT
91 qmfa->x[qmfa->x_index + n] = qmfa->x[qmfa->x_index + n + 320] = (input[in++]) >> 4;
92#else
93 qmfa->x[qmfa->x_index + n] = qmfa->x[qmfa->x_index + n + 320] = input[in++];
94#endif
95 }
96
97 /* window and summation to create array u */
98 for (n = 0; n < 64; n++)
99 {
100 u[n] = MUL_F(qmfa->x[qmfa->x_index + n], qmf_c[2*n]) +
101 MUL_F(qmfa->x[qmfa->x_index + n + 64], qmf_c[2*(n + 64)]) +
102 MUL_F(qmfa->x[qmfa->x_index + n + 128], qmf_c[2*(n + 128)]) +
103 MUL_F(qmfa->x[qmfa->x_index + n + 192], qmf_c[2*(n + 192)]) +
104 MUL_F(qmfa->x[qmfa->x_index + n + 256], qmf_c[2*(n + 256)]);
105 }
106
107 /* update ringbuffer index */
108 qmfa->x_index -= 32;
109 if (qmfa->x_index < 0)
110 qmfa->x_index = (320-32);
111
112 /* calculate 32 subband samples by introducing X */
113#ifdef SBR_LOW_POWER
114 y[0] = u[48];
115 for (n = 1; n < 16; n++)
116 y[n] = u[n+48] + u[48-n];
117 for (n = 16; n < 32; n++)
118 y[n] = -u[n-16] + u[48-n];
119
120 DCT3_32_unscaled(u, y);
121
122 for (n = 0; n < 32; n++)
123 {
124 if (n < kx)
125 {
126#ifdef FIXED_POINT
127 QMF_RE(X[l + offset][n]) = u[n] /*<< 1*/;
128#else
129 QMF_RE(X[l + offset][n]) = 2. * u[n];
130#endif
131 } else {
132 QMF_RE(X[l + offset][n]) = 0;
133 }
134 }
135#else
136
137 // Reordering of data moved from DCT_IV to here
138 in_imag[31] = u[1];
139 in_real[0] = u[0];
140 for (n = 1; n < 31; n++)
141 {
142 in_imag[31 - n] = u[n+1];
143 in_real[n] = -u[64-n];
144 }
145 in_imag[0] = u[32];
146 in_real[31] = -u[33];
147
148 // dct4_kernel is DCT_IV without reordering which is done before and after FFT
149 dct4_kernel(in_real, in_imag, out_real, out_imag);
150
151 // Reordering of data moved from DCT_IV to here
152 for (n = 0; n < 16; n++) {
153 if (2*n+1 < kx) {
154#ifdef FIXED_POINT
155 QMF_RE(X[l + offset][2*n]) = out_real[n];
156 QMF_IM(X[l + offset][2*n]) = out_imag[n];
157 QMF_RE(X[l + offset][2*n+1]) = -out_imag[31-n];
158 QMF_IM(X[l + offset][2*n+1]) = -out_real[31-n];
159#else
160 QMF_RE(X[l + offset][2*n]) = 2. * out_real[n];
161 QMF_IM(X[l + offset][2*n]) = 2. * out_imag[n];
162 QMF_RE(X[l + offset][2*n+1]) = -2. * out_imag[31-n];
163 QMF_IM(X[l + offset][2*n+1]) = -2. * out_real[31-n];
164#endif
165 } else {
166 if (2*n < kx) {
167#ifdef FIXED_POINT
168 QMF_RE(X[l + offset][2*n]) = out_real[n];
169 QMF_IM(X[l + offset][2*n]) = out_imag[n];
170#else
171 QMF_RE(X[l + offset][2*n]) = 2. * out_real[n];
172 QMF_IM(X[l + offset][2*n]) = 2. * out_imag[n];
173#endif
174 }
175 else {
176 QMF_RE(X[l + offset][2*n]) = 0;
177 QMF_IM(X[l + offset][2*n]) = 0;
178 }
179 QMF_RE(X[l + offset][2*n+1]) = 0;
180 QMF_IM(X[l + offset][2*n+1]) = 0;
181 }
182 }
183#endif
184 }
185}
186
187static const complex_t qmf32_pre_twiddle[] =
188{
189 { FRAC_CONST(0.999924701839145), FRAC_CONST(-0.012271538285720) },
190 { FRAC_CONST(0.999322384588350), FRAC_CONST(-0.036807222941359) },
191 { FRAC_CONST(0.998118112900149), FRAC_CONST(-0.061320736302209) },
192 { FRAC_CONST(0.996312612182778), FRAC_CONST(-0.085797312344440) },
193 { FRAC_CONST(0.993906970002356), FRAC_CONST(-0.110222207293883) },
194 { FRAC_CONST(0.990902635427780), FRAC_CONST(-0.134580708507126) },
195 { FRAC_CONST(0.987301418157858), FRAC_CONST(-0.158858143333861) },
196 { FRAC_CONST(0.983105487431216), FRAC_CONST(-0.183039887955141) },
197 { FRAC_CONST(0.978317370719628), FRAC_CONST(-0.207111376192219) },
198 { FRAC_CONST(0.972939952205560), FRAC_CONST(-0.231058108280671) },
199 { FRAC_CONST(0.966976471044852), FRAC_CONST(-0.254865659604515) },
200 { FRAC_CONST(0.960430519415566), FRAC_CONST(-0.278519689385053) },
201 { FRAC_CONST(0.953306040354194), FRAC_CONST(-0.302005949319228) },
202 { FRAC_CONST(0.945607325380521), FRAC_CONST(-0.325310292162263) },
203 { FRAC_CONST(0.937339011912575), FRAC_CONST(-0.348418680249435) },
204 { FRAC_CONST(0.928506080473216), FRAC_CONST(-0.371317193951838) },
205 { FRAC_CONST(0.919113851690058), FRAC_CONST(-0.393992040061048) },
206 { FRAC_CONST(0.909167983090522), FRAC_CONST(-0.416429560097637) },
207 { FRAC_CONST(0.898674465693954), FRAC_CONST(-0.438616238538528) },
208 { FRAC_CONST(0.887639620402854), FRAC_CONST(-0.460538710958240) },
209 { FRAC_CONST(0.876070094195407), FRAC_CONST(-0.482183772079123) },
210 { FRAC_CONST(0.863972856121587), FRAC_CONST(-0.503538383725718) },
211 { FRAC_CONST(0.851355193105265), FRAC_CONST(-0.524589682678469) },
212 { FRAC_CONST(0.838224705554838), FRAC_CONST(-0.545324988422046) },
213 { FRAC_CONST(0.824589302785025), FRAC_CONST(-0.565731810783613) },
214 { FRAC_CONST(0.810457198252595), FRAC_CONST(-0.585797857456439) },
215 { FRAC_CONST(0.795836904608884), FRAC_CONST(-0.605511041404326) },
216 { FRAC_CONST(0.780737228572094), FRAC_CONST(-0.624859488142386) },
217 { FRAC_CONST(0.765167265622459), FRAC_CONST(-0.643831542889791) },
218 { FRAC_CONST(0.749136394523459), FRAC_CONST(-0.662415777590172) },
219 { FRAC_CONST(0.732654271672413), FRAC_CONST(-0.680600997795453) },
220 { FRAC_CONST(0.715730825283819), FRAC_CONST(-0.698376249408973) }
221};
222
223qmfs_info *qmfs_init(uint8_t channels)
224{
225 qmfs_info *qmfs = (qmfs_info*)faad_malloc(sizeof(qmfs_info));
226
227 /* v is a double ringbuffer */
228 qmfs->v = (real_t*)faad_malloc(2 * channels * 20 * sizeof(real_t));
229 memset(qmfs->v, 0, 2 * channels * 20 * sizeof(real_t));
230
231 qmfs->v_index = 0;
232
233 qmfs->channels = channels;
234
235 return qmfs;
236}
237
238void qmfs_end(qmfs_info *qmfs)
239{
240 if (qmfs)
241 {
242 if (qmfs->v) faad_free(qmfs->v);
243 faad_free(qmfs);
244 }
245}
246
247#ifdef SBR_LOW_POWER
248
249void sbr_qmf_synthesis_32(sbr_info *sbr, qmfs_info *qmfs, qmf_t X[MAX_NTSRHFG][64],
250 real_t *output)
251{
252 ALIGN real_t x[16];
253 ALIGN real_t y[16];
254 int16_t n, k, out = 0;
255 uint8_t l;
256
257 /* qmf subsample l */
258 for (l = 0; l < sbr->numTimeSlotsRate; l++)
259 {
260 /* shift buffers */
261 /* we are not shifting v, it is a double ringbuffer */
262 //memmove(qmfs->v + 64, qmfs->v, (640-64)*sizeof(real_t));
263
264 /* calculate 64 samples */
265 for (k = 0; k < 16; k++)
266 {
267#ifdef FIXED_POINT
268 y[k] = (QMF_RE(X[l][k]) - QMF_RE(X[l][31 - k]));
269 x[k] = (QMF_RE(X[l][k]) + QMF_RE(X[l][31 - k]));
270#else
271 y[k] = (QMF_RE(X[l][k]) - QMF_RE(X[l][31 - k])) / 32.0;
272 x[k] = (QMF_RE(X[l][k]) + QMF_RE(X[l][31 - k])) / 32.0;
273#endif
274 }
275
276 /* even n samples */
277 DCT2_16_unscaled(x, x);
278 /* odd n samples */
279 DCT4_16(y, y);
280
281 for (n = 8; n < 24; n++)
282 {
283 qmfs->v[qmfs->v_index + n*2] = qmfs->v[qmfs->v_index + 640 + n*2] = x[n-8];
284 qmfs->v[qmfs->v_index + n*2+1] = qmfs->v[qmfs->v_index + 640 + n*2+1] = y[n-8];
285 }
286 for (n = 0; n < 16; n++)
287 {
288 qmfs->v[qmfs->v_index + n] = qmfs->v[qmfs->v_index + 640 + n] = qmfs->v[qmfs->v_index + 32-n];
289 }
290 qmfs->v[qmfs->v_index + 48] = qmfs->v[qmfs->v_index + 640 + 48] = 0;
291 for (n = 1; n < 16; n++)
292 {
293 qmfs->v[qmfs->v_index + 48+n] = qmfs->v[qmfs->v_index + 640 + 48+n] = -qmfs->v[qmfs->v_index + 48-n];
294 }
295
296 /* calculate 32 output samples and window */
297 for (k = 0; k < 32; k++)
298 {
299 output[out++] = MUL_F(qmfs->v[qmfs->v_index + k], qmf_c[2*k]) +
300 MUL_F(qmfs->v[qmfs->v_index + 96 + k], qmf_c[64 + 2*k]) +
301 MUL_F(qmfs->v[qmfs->v_index + 128 + k], qmf_c[128 + 2*k]) +
302 MUL_F(qmfs->v[qmfs->v_index + 224 + k], qmf_c[192 + 2*k]) +
303 MUL_F(qmfs->v[qmfs->v_index + 256 + k], qmf_c[256 + 2*k]) +
304 MUL_F(qmfs->v[qmfs->v_index + 352 + k], qmf_c[320 + 2*k]) +
305 MUL_F(qmfs->v[qmfs->v_index + 384 + k], qmf_c[384 + 2*k]) +
306 MUL_F(qmfs->v[qmfs->v_index + 480 + k], qmf_c[448 + 2*k]) +
307 MUL_F(qmfs->v[qmfs->v_index + 512 + k], qmf_c[512 + 2*k]) +
308 MUL_F(qmfs->v[qmfs->v_index + 608 + k], qmf_c[576 + 2*k]);
309 }
310
311 /* update the ringbuffer index */
312 qmfs->v_index -= 64;
313 if (qmfs->v_index < 0)
314 qmfs->v_index = (640-64);
315 }
316}
317
318void sbr_qmf_synthesis_64(sbr_info *sbr, qmfs_info *qmfs, qmf_t X[MAX_NTSRHFG][64],
319 real_t *output)
320{
321 ALIGN real_t x[64];
322 ALIGN real_t y[64];
323 int16_t n, k, out = 0;
324 uint8_t l;
325
326
327 /* qmf subsample l */
328 for (l = 0; l < sbr->numTimeSlotsRate; l++)
329 {
330 /* shift buffers */
331 /* we are not shifting v, it is a double ringbuffer */
332 //memmove(qmfs->v + 128, qmfs->v, (1280-128)*sizeof(real_t));
333
334 /* calculate 128 samples */
335 for (k = 0; k < 32; k++)
336 {
337#ifdef FIXED_POINT
338 y[k] = (QMF_RE(X[l][k]) - QMF_RE(X[l][63 - k]));
339 x[k] = (QMF_RE(X[l][k]) + QMF_RE(X[l][63 - k]));
340#else
341 y[k] = (QMF_RE(X[l][k]) - QMF_RE(X[l][63 - k])) / 32.0;
342 x[k] = (QMF_RE(X[l][k]) + QMF_RE(X[l][63 - k])) / 32.0;
343#endif
344 }
345
346 /* even n samples */
347 DCT2_32_unscaled(x, x);
348 /* odd n samples */
349 DCT4_32(y, y);
350
351 for (n = 16; n < 48; n++)
352 {
353 qmfs->v[qmfs->v_index + n*2] = qmfs->v[qmfs->v_index + 1280 + n*2] = x[n-16];
354 qmfs->v[qmfs->v_index + n*2+1] = qmfs->v[qmfs->v_index + 1280 + n*2+1] = y[n-16];
355 }
356 for (n = 0; n < 32; n++)
357 {
358 qmfs->v[qmfs->v_index + n] = qmfs->v[qmfs->v_index + 1280 + n] = qmfs->v[qmfs->v_index + 64-n];
359 }
360 qmfs->v[qmfs->v_index + 96] = qmfs->v[qmfs->v_index + 1280 + 96] = 0;
361 for (n = 1; n < 32; n++)
362 {
363 qmfs->v[qmfs->v_index + 96+n] = qmfs->v[qmfs->v_index + 1280 + 96+n] = -qmfs->v[qmfs->v_index + 96-n];
364 }
365
366 /* calculate 64 output samples and window */
367 for (k = 0; k < 64; k++)
368 {
369 output[out++] = MUL_F(qmfs->v[qmfs->v_index + k], qmf_c[k]) +
370 MUL_F(qmfs->v[qmfs->v_index + 192 + k], qmf_c[64 + k]) +
371 MUL_F(qmfs->v[qmfs->v_index + 256 + k], qmf_c[128 + k]) +
372 MUL_F(qmfs->v[qmfs->v_index + 256 + 192 + k], qmf_c[128 + 64 + k]) +
373 MUL_F(qmfs->v[qmfs->v_index + 512 + k], qmf_c[256 + k]) +
374 MUL_F(qmfs->v[qmfs->v_index + 512 + 192 + k], qmf_c[256 + 64 + k]) +
375 MUL_F(qmfs->v[qmfs->v_index + 768 + k], qmf_c[384 + k]) +
376 MUL_F(qmfs->v[qmfs->v_index + 768 + 192 + k], qmf_c[384 + 64 + k]) +
377 MUL_F(qmfs->v[qmfs->v_index + 1024 + k], qmf_c[512 + k]) +
378 MUL_F(qmfs->v[qmfs->v_index + 1024 + 192 + k], qmf_c[512 + 64 + k]);
379 }
380
381 /* update the ringbuffer index */
382 qmfs->v_index -= 128;
383 if (qmfs->v_index < 0)
384 qmfs->v_index = (1280-128);
385 }
386}
387#else
388void sbr_qmf_synthesis_32(sbr_info *sbr, qmfs_info *qmfs, qmf_t X[MAX_NTSRHFG][64],
389 real_t *output)
390{
391 ALIGN real_t x1[32], x2[32];
392#ifndef FIXED_POINT
393 real_t scale = 1.f/64.f;
394#endif
395 int16_t n, k, out = 0;
396 uint8_t l;
397
398
399 /* qmf subsample l */
400 for (l = 0; l < sbr->numTimeSlotsRate; l++)
401 {
402 /* shift buffer v */
403 /* buffer is not shifted, we are using a ringbuffer */
404 //memmove(qmfs->v + 64, qmfs->v, (640-64)*sizeof(real_t));
405
406 /* calculate 64 samples */
407 /* complex pre-twiddle */
408 for (k = 0; k < 32; k++)
409 {
410 x1[k] = MUL_F(QMF_RE(X[l][k]), RE(qmf32_pre_twiddle[k])) - MUL_F(QMF_IM(X[l][k]), IM(qmf32_pre_twiddle[k]));
411 x2[k] = MUL_F(QMF_IM(X[l][k]), RE(qmf32_pre_twiddle[k])) + MUL_F(QMF_RE(X[l][k]), IM(qmf32_pre_twiddle[k]));
412
413#ifndef FIXED_POINT
414 x1[k] *= scale;
415 x2[k] *= scale;
416#else
417 x1[k] >>= 1;
418 x2[k] >>= 1;
419#endif
420 }
421
422 /* transform */
423 DCT4_32(x1, x1);
424 DST4_32(x2, x2);
425
426 for (n = 0; n < 32; n++)
427 {
428 qmfs->v[qmfs->v_index + n] = qmfs->v[qmfs->v_index + 640 + n] = -x1[n] + x2[n];
429 qmfs->v[qmfs->v_index + 63 - n] = qmfs->v[qmfs->v_index + 640 + 63 - n] = x1[n] + x2[n];
430 }
431
432 /* calculate 32 output samples and window */
433 for (k = 0; k < 32; k++)
434 {
435 output[out++] = MUL_F(qmfs->v[qmfs->v_index + k], qmf_c[2*k]) +
436 MUL_F(qmfs->v[qmfs->v_index + 96 + k], qmf_c[64 + 2*k]) +
437 MUL_F(qmfs->v[qmfs->v_index + 128 + k], qmf_c[128 + 2*k]) +
438 MUL_F(qmfs->v[qmfs->v_index + 224 + k], qmf_c[192 + 2*k]) +
439 MUL_F(qmfs->v[qmfs->v_index + 256 + k], qmf_c[256 + 2*k]) +
440 MUL_F(qmfs->v[qmfs->v_index + 352 + k], qmf_c[320 + 2*k]) +
441 MUL_F(qmfs->v[qmfs->v_index + 384 + k], qmf_c[384 + 2*k]) +
442 MUL_F(qmfs->v[qmfs->v_index + 480 + k], qmf_c[448 + 2*k]) +
443 MUL_F(qmfs->v[qmfs->v_index + 512 + k], qmf_c[512 + 2*k]) +
444 MUL_F(qmfs->v[qmfs->v_index + 608 + k], qmf_c[576 + 2*k]);
445 }
446
447 /* update ringbuffer index */
448 qmfs->v_index -= 64;
449 if (qmfs->v_index < 0)
450 qmfs->v_index = (640 - 64);
451 }
452}
453
454void sbr_qmf_synthesis_64(sbr_info *sbr, qmfs_info *qmfs, qmf_t X[MAX_NTSRHFG][64],
455 real_t *output)
456{
457// ALIGN real_t x1[64], x2[64];
458#ifndef SBR_LOW_POWER
459 ALIGN real_t in_real1[32], in_imag1[32], out_real1[32], out_imag1[32];
460 ALIGN real_t in_real2[32], in_imag2[32], out_real2[32], out_imag2[32];
461#endif
462 qmf_t * pX;
463 real_t * pring_buffer_1, * pring_buffer_3;
464// real_t * ptemp_1, * ptemp_2;
465#ifdef PREFER_POINTERS
466 // These pointers are used if target platform has autoinc address generators
467 real_t * pring_buffer_2, * pring_buffer_4;
468 real_t * pring_buffer_5, * pring_buffer_6;
469 real_t * pring_buffer_7, * pring_buffer_8;
470 real_t * pring_buffer_9, * pring_buffer_10;
471 const real_t * pqmf_c_1, * pqmf_c_2, * pqmf_c_3, * pqmf_c_4;
472 const real_t * pqmf_c_5, * pqmf_c_6, * pqmf_c_7, * pqmf_c_8;
473 const real_t * pqmf_c_9, * pqmf_c_10;
474#endif // #ifdef PREFER_POINTERS
475#ifndef FIXED_POINT
476 real_t scale = 1.f/64.f;
477#endif
478 int16_t n, k, out = 0;
479 uint8_t l;
480
481
482 /* qmf subsample l */
483 for (l = 0; l < sbr->numTimeSlotsRate; l++)
484 {
485 /* shift buffer v */
486 /* buffer is not shifted, we use double ringbuffer */
487 //memmove(qmfs->v + 128, qmfs->v, (1280-128)*sizeof(real_t));
488
489 /* calculate 128 samples */
490#ifndef FIXED_POINT
491
492 pX = X[l];
493
494 in_imag1[31] = scale*QMF_RE(pX[1]);
495 in_real1[0] = scale*QMF_RE(pX[0]);
496 in_imag2[31] = scale*QMF_IM(pX[63-1]);
497 in_real2[0] = scale*QMF_IM(pX[63-0]);
498 for (k = 1; k < 31; k++)
499 {
500 in_imag1[31 - k] = scale*QMF_RE(pX[2*k + 1]);
501 in_real1[ k] = scale*QMF_RE(pX[2*k ]);
502 in_imag2[31 - k] = scale*QMF_IM(pX[63 - (2*k + 1)]);
503 in_real2[ k] = scale*QMF_IM(pX[63 - (2*k )]);
504 }
505 in_imag1[0] = scale*QMF_RE(pX[63]);
506 in_real1[31] = scale*QMF_RE(pX[62]);
507 in_imag2[0] = scale*QMF_IM(pX[63-63]);
508 in_real2[31] = scale*QMF_IM(pX[63-62]);
509
510#else
511
512 pX = X[l];
513
514 in_imag1[31] = QMF_RE(pX[1]) >> 1;
515 in_real1[0] = QMF_RE(pX[0]) >> 1;
516 in_imag2[31] = QMF_IM(pX[62]) >> 1;
517 in_real2[0] = QMF_IM(pX[63]) >> 1;
518 for (k = 1; k < 31; k++)
519 {
520 in_imag1[31 - k] = QMF_RE(pX[2*k + 1]) >> 1;
521 in_real1[ k] = QMF_RE(pX[2*k ]) >> 1;
522 in_imag2[31 - k] = QMF_IM(pX[63 - (2*k + 1)]) >> 1;
523 in_real2[ k] = QMF_IM(pX[63 - (2*k )]) >> 1;
524 }
525 in_imag1[0] = QMF_RE(pX[63]) >> 1;
526 in_real1[31] = QMF_RE(pX[62]) >> 1;
527 in_imag2[0] = QMF_IM(pX[0]) >> 1;
528 in_real2[31] = QMF_IM(pX[1]) >> 1;
529
530#endif
531
532
533 // dct4_kernel is DCT_IV without reordering which is done before and after FFT
534 dct4_kernel(in_real1, in_imag1, out_real1, out_imag1);
535 dct4_kernel(in_real2, in_imag2, out_real2, out_imag2);
536
537
538 pring_buffer_1 = qmfs->v + qmfs->v_index;
539 pring_buffer_3 = pring_buffer_1 + 1280;
540#ifdef PREFER_POINTERS
541 pring_buffer_2 = pring_buffer_1 + 127;
542 pring_buffer_4 = pring_buffer_1 + (1280 + 127);
543#endif // #ifdef PREFER_POINTERS
544// ptemp_1 = x1;
545// ptemp_2 = x2;
546#ifdef PREFER_POINTERS
547 for (n = 0; n < 32; n ++)
548 {
549 //real_t x1 = *ptemp_1++;
550 //real_t x2 = *ptemp_2++;
551 // pring_buffer_3 and pring_buffer_4 are needed only for double ring buffer
552 *pring_buffer_1++ = *pring_buffer_3++ = out_real2[n] - out_real1[n];
553 *pring_buffer_2-- = *pring_buffer_4-- = out_real2[n] + out_real1[n];
554 //x1 = *ptemp_1++;
555 //x2 = *ptemp_2++;
556 *pring_buffer_1++ = *pring_buffer_3++ = out_imag2[31-n] + out_imag1[31-n];
557 *pring_buffer_2-- = *pring_buffer_4-- = out_imag2[31-n] - out_imag1[31-n];
558 }
559#else // #ifdef PREFER_POINTERS
560
561 for (n = 0; n < 32; n++)
562 {
563 // pring_buffer_3 and pring_buffer_4 are needed only for double ring buffer
564 pring_buffer_1[2*n] = pring_buffer_3[2*n] = out_real2[n] - out_real1[n];
565 pring_buffer_1[127-2*n] = pring_buffer_3[127-2*n] = out_real2[n] + out_real1[n];
566 pring_buffer_1[2*n+1] = pring_buffer_3[2*n+1] = out_imag2[31-n] + out_imag1[31-n];
567 pring_buffer_1[127-(2*n+1)] = pring_buffer_3[127-(2*n+1)] = out_imag2[31-n] - out_imag1[31-n];
568 }
569
570#endif // #ifdef PREFER_POINTERS
571
572 pring_buffer_1 = qmfs->v + qmfs->v_index;
573#ifdef PREFER_POINTERS
574 pring_buffer_2 = pring_buffer_1 + 192;
575 pring_buffer_3 = pring_buffer_1 + 256;
576 pring_buffer_4 = pring_buffer_1 + (256 + 192);
577 pring_buffer_5 = pring_buffer_1 + 512;
578 pring_buffer_6 = pring_buffer_1 + (512 + 192);
579 pring_buffer_7 = pring_buffer_1 + 768;
580 pring_buffer_8 = pring_buffer_1 + (768 + 192);
581 pring_buffer_9 = pring_buffer_1 + 1024;
582 pring_buffer_10 = pring_buffer_1 + (1024 + 192);
583 pqmf_c_1 = qmf_c;
584 pqmf_c_2 = qmf_c + 64;
585 pqmf_c_3 = qmf_c + 128;
586 pqmf_c_4 = qmf_c + 192;
587 pqmf_c_5 = qmf_c + 256;
588 pqmf_c_6 = qmf_c + 320;
589 pqmf_c_7 = qmf_c + 384;
590 pqmf_c_8 = qmf_c + 448;
591 pqmf_c_9 = qmf_c + 512;
592 pqmf_c_10 = qmf_c + 576;
593#endif // #ifdef PREFER_POINTERS
594
595 /* calculate 64 output samples and window */
596 for (k = 0; k < 64; k++)
597 {
598#ifdef PREFER_POINTERS
599 output[out++] =
600 MUL_F(*pring_buffer_1++, *pqmf_c_1++) +
601 MUL_F(*pring_buffer_2++, *pqmf_c_2++) +
602 MUL_F(*pring_buffer_3++, *pqmf_c_3++) +
603 MUL_F(*pring_buffer_4++, *pqmf_c_4++) +
604 MUL_F(*pring_buffer_5++, *pqmf_c_5++) +
605 MUL_F(*pring_buffer_6++, *pqmf_c_6++) +
606 MUL_F(*pring_buffer_7++, *pqmf_c_7++) +
607 MUL_F(*pring_buffer_8++, *pqmf_c_8++) +
608 MUL_F(*pring_buffer_9++, *pqmf_c_9++) +
609 MUL_F(*pring_buffer_10++, *pqmf_c_10++);
610#else // #ifdef PREFER_POINTERS
611 output[out++] =
612 MUL_F(pring_buffer_1[k+0], qmf_c[k+0]) +
613 MUL_F(pring_buffer_1[k+192], qmf_c[k+64]) +
614 MUL_F(pring_buffer_1[k+256], qmf_c[k+128]) +
615 MUL_F(pring_buffer_1[k+(256+192)], qmf_c[k+192]) +
616 MUL_F(pring_buffer_1[k+512], qmf_c[k+256]) +
617 MUL_F(pring_buffer_1[k+(512+192)], qmf_c[k+320]) +
618 MUL_F(pring_buffer_1[k+768], qmf_c[k+384]) +
619 MUL_F(pring_buffer_1[k+(768+192)], qmf_c[k+448]) +
620 MUL_F(pring_buffer_1[k+1024], qmf_c[k+512]) +
621 MUL_F(pring_buffer_1[k+(1024+192)], qmf_c[k+576]);
622#endif // #ifdef PREFER_POINTERS
623 }
624
625 /* update ringbuffer index */
626 qmfs->v_index -= 128;
627 if (qmfs->v_index < 0)
628 qmfs->v_index = (1280 - 128);
629 }
630}
631#endif
632
633#endif
diff --git a/apps/codecs/libfaad/sbr_qmf.h b/apps/codecs/libfaad/sbr_qmf.h
new file mode 100644
index 0000000000..f940ccfa05
--- /dev/null
+++ b/apps/codecs/libfaad/sbr_qmf.h
@@ -0,0 +1,52 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __SBR_QMF_H__
29#define __SBR_QMF_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35qmfa_info *qmfa_init(uint8_t channels);
36void qmfa_end(qmfa_info *qmfa);
37qmfs_info *qmfs_init(uint8_t channels);
38void qmfs_end(qmfs_info *qmfs);
39
40void sbr_qmf_analysis_32(sbr_info *sbr, qmfa_info *qmfa, const real_t *input,
41 qmf_t X[MAX_NTSRHFG][64], uint8_t offset, uint8_t kx);
42void sbr_qmf_synthesis_32(sbr_info *sbr, qmfs_info *qmfs, qmf_t X[MAX_NTSRHFG][64],
43 real_t *output);
44void sbr_qmf_synthesis_64(sbr_info *sbr, qmfs_info *qmfs, qmf_t X[MAX_NTSRHFG][64],
45 real_t *output);
46
47
48#ifdef __cplusplus
49}
50#endif
51#endif
52
diff --git a/apps/codecs/libfaad/sbr_qmf_c.h b/apps/codecs/libfaad/sbr_qmf_c.h
new file mode 100644
index 0000000000..19592a7ff6
--- /dev/null
+++ b/apps/codecs/libfaad/sbr_qmf_c.h
@@ -0,0 +1,365 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __SBR_QMF_C_H__
29#define __SBR_QMF_C_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35
36#ifdef _MSC_VER
37#pragma warning(disable:4305)
38#pragma warning(disable:4244)
39#endif
40
41ALIGN static const real_t qmf_c[640] = {
42 FRAC_CONST(0), FRAC_CONST(-0.00055252865047),
43 FRAC_CONST(-0.00056176925738), FRAC_CONST(-0.00049475180896),
44 FRAC_CONST(-0.00048752279712), FRAC_CONST(-0.00048937912498),
45 FRAC_CONST(-0.00050407143497), FRAC_CONST(-0.00052265642972),
46 FRAC_CONST(-0.00054665656337), FRAC_CONST(-0.00056778025613),
47 FRAC_CONST(-0.00058709304852), FRAC_CONST(-0.00061327473938),
48 FRAC_CONST(-0.00063124935319), FRAC_CONST(-0.00065403333621),
49 FRAC_CONST(-0.00067776907764), FRAC_CONST(-0.00069416146273),
50 FRAC_CONST(-0.00071577364744), FRAC_CONST(-0.00072550431222),
51 FRAC_CONST(-0.00074409418541), FRAC_CONST(-0.00074905980532),
52 FRAC_CONST(-0.0007681371927), FRAC_CONST(-0.00077248485949),
53 FRAC_CONST(-0.00078343322877), FRAC_CONST(-0.00077798694927),
54 FRAC_CONST(-0.000780366471), FRAC_CONST(-0.00078014496257),
55 FRAC_CONST(-0.0007757977331), FRAC_CONST(-0.00076307935757),
56 FRAC_CONST(-0.00075300014201), FRAC_CONST(-0.00073193571525),
57 FRAC_CONST(-0.00072153919876), FRAC_CONST(-0.00069179375372),
58 FRAC_CONST(-0.00066504150893), FRAC_CONST(-0.00063415949025),
59 FRAC_CONST(-0.0005946118933), FRAC_CONST(-0.00055645763906),
60 FRAC_CONST(-0.00051455722108), FRAC_CONST(-0.00046063254803),
61 FRAC_CONST(-0.00040951214522), FRAC_CONST(-0.00035011758756),
62 FRAC_CONST(-0.00028969811748), FRAC_CONST(-0.0002098337344),
63 FRAC_CONST(-0.00014463809349), FRAC_CONST(-6.173344072E-005),
64 FRAC_CONST(1.349497418E-005), FRAC_CONST(0.00010943831274),
65 FRAC_CONST(0.00020430170688), FRAC_CONST(0.00029495311041),
66 FRAC_CONST(0.0004026540216), FRAC_CONST(0.00051073884952),
67 FRAC_CONST(0.00062393761391), FRAC_CONST(0.00074580258865),
68 FRAC_CONST(0.00086084433262), FRAC_CONST(0.00098859883015),
69 FRAC_CONST(0.00112501551307), FRAC_CONST(0.00125778846475),
70 FRAC_CONST(0.00139024948272), FRAC_CONST(0.00154432198471),
71 FRAC_CONST(0.00168680832531), FRAC_CONST(0.00183482654224),
72 FRAC_CONST(0.00198411407369), FRAC_CONST(0.00214615835557),
73 FRAC_CONST(0.00230172547746), FRAC_CONST(0.00246256169126),
74 FRAC_CONST(0.00262017586902), FRAC_CONST(0.00278704643465),
75 FRAC_CONST(0.00294694477165), FRAC_CONST(0.00311254206525),
76 FRAC_CONST(0.00327396134847), FRAC_CONST(0.00344188741828),
77 FRAC_CONST(0.00360082681231), FRAC_CONST(0.00376039229104),
78 FRAC_CONST(0.00392074323703), FRAC_CONST(0.00408197531935),
79 FRAC_CONST(0.0042264269227), FRAC_CONST(0.00437307196781),
80 FRAC_CONST(0.00452098527825), FRAC_CONST(0.00466064606118),
81 FRAC_CONST(0.00479325608498), FRAC_CONST(0.00491376035745),
82 FRAC_CONST(0.00503930226013), FRAC_CONST(0.00514073539032),
83 FRAC_CONST(0.00524611661324), FRAC_CONST(0.00534716811982),
84 FRAC_CONST(0.00541967759307), FRAC_CONST(0.00548760401507),
85 FRAC_CONST(0.00554757145088), FRAC_CONST(0.00559380230045),
86 FRAC_CONST(0.00562206432097), FRAC_CONST(0.00564551969164),
87 FRAC_CONST(0.00563891995151), FRAC_CONST(0.00562661141932),
88 FRAC_CONST(0.0055917128663), FRAC_CONST(0.005540436394),
89 FRAC_CONST(0.0054753783077), FRAC_CONST(0.0053838975897),
90 FRAC_CONST(0.00527157587272), FRAC_CONST(0.00513822754514),
91 FRAC_CONST(0.00498396877629), FRAC_CONST(0.004810946906),
92 FRAC_CONST(0.00460395301471), FRAC_CONST(0.00438018617447),
93 FRAC_CONST(0.0041251642327), FRAC_CONST(0.00384564081246),
94 FRAC_CONST(0.00354012465507), FRAC_CONST(0.00320918858098),
95 FRAC_CONST(0.00284467578623), FRAC_CONST(0.00245085400321),
96 FRAC_CONST(0.0020274176185), FRAC_CONST(0.00157846825768),
97 FRAC_CONST(0.00109023290512), FRAC_CONST(0.0005832264248),
98 FRAC_CONST(2.760451905E-005), FRAC_CONST(-0.00054642808664),
99 FRAC_CONST(-0.00115681355227), FRAC_CONST(-0.00180394725893),
100 FRAC_CONST(-0.00248267236449), FRAC_CONST(-0.003193377839),
101 FRAC_CONST(-0.00394011240522), FRAC_CONST(-0.004722259624),
102 FRAC_CONST(-0.00553372111088), FRAC_CONST(-0.00637922932685),
103 FRAC_CONST(-0.00726158168517), FRAC_CONST(-0.00817982333726),
104 FRAC_CONST(-0.00913253296085), FRAC_CONST(-0.01011502154986),
105 FRAC_CONST(-0.01113155480321), FRAC_CONST(-0.01218499959508),
106 FRAC_CONST(0.01327182200351), FRAC_CONST(0.01439046660792),
107 FRAC_CONST(0.01554055533423), FRAC_CONST(0.01673247129989),
108 FRAC_CONST(0.01794333813443), FRAC_CONST(0.01918724313698),
109 FRAC_CONST(0.02045317933555), FRAC_CONST(0.02174675502535),
110 FRAC_CONST(0.02306801692862), FRAC_CONST(0.02441609920285),
111 FRAC_CONST(0.02578758475467), FRAC_CONST(0.02718594296329),
112 FRAC_CONST(0.02860721736385), FRAC_CONST(0.03005026574279),
113 FRAC_CONST(0.03150176087389), FRAC_CONST(0.03297540810337),
114 FRAC_CONST(0.03446209487686), FRAC_CONST(0.03596975605542),
115 FRAC_CONST(0.03748128504252), FRAC_CONST(0.03900536794745),
116 FRAC_CONST(0.04053491705584), FRAC_CONST(0.04206490946367),
117 FRAC_CONST(0.04360975421304), FRAC_CONST(0.04514884056413),
118 FRAC_CONST(0.04668430272642), FRAC_CONST(0.04821657200672),
119 FRAC_CONST(0.04973857556014), FRAC_CONST(0.05125561555216),
120 FRAC_CONST(0.05276307465207), FRAC_CONST(0.05424527683589),
121 FRAC_CONST(0.05571736482138), FRAC_CONST(0.05716164501299),
122 FRAC_CONST(0.0585915683626), FRAC_CONST(0.05998374801761),
123 FRAC_CONST(0.06134551717207), FRAC_CONST(0.06268578081172),
124 FRAC_CONST(0.06397158980681), FRAC_CONST(0.0652247106438),
125 FRAC_CONST(0.06643675122104), FRAC_CONST(0.06760759851228),
126 FRAC_CONST(0.06870438283512), FRAC_CONST(0.06976302447127),
127 FRAC_CONST(0.07076287107266), FRAC_CONST(0.07170026731102),
128 FRAC_CONST(0.07256825833083), FRAC_CONST(0.07336202550803),
129 FRAC_CONST(0.07410036424342), FRAC_CONST(0.07474525581194),
130 FRAC_CONST(0.07531373362019), FRAC_CONST(0.07580083586584),
131 FRAC_CONST(0.07619924793396), FRAC_CONST(0.07649921704119),
132 FRAC_CONST(0.07670934904245), FRAC_CONST(0.07681739756964),
133 FRAC_CONST(0.07682300113923), FRAC_CONST(0.07672049241746),
134 FRAC_CONST(0.07650507183194), FRAC_CONST(0.07617483218536),
135 FRAC_CONST(0.07573057565061), FRAC_CONST(0.0751576255287),
136 FRAC_CONST(0.07446643947564), FRAC_CONST(0.0736406005762),
137 FRAC_CONST(0.07267746427299), FRAC_CONST(0.07158263647903),
138 FRAC_CONST(0.07035330735093), FRAC_CONST(0.06896640131951),
139 FRAC_CONST(0.06745250215166), FRAC_CONST(0.06576906686508),
140 FRAC_CONST(0.06394448059633), FRAC_CONST(0.06196027790387),
141 FRAC_CONST(0.0598166570809), FRAC_CONST(0.05751526919867),
142 FRAC_CONST(0.05504600343009), FRAC_CONST(0.05240938217366),
143 FRAC_CONST(0.04959786763445), FRAC_CONST(0.04663033051701),
144 FRAC_CONST(0.04347687821958), FRAC_CONST(0.04014582784127),
145 FRAC_CONST(0.03664181168133), FRAC_CONST(0.03295839306691),
146 FRAC_CONST(0.02908240060125), FRAC_CONST(0.02503075618909),
147 FRAC_CONST(0.02079970728622), FRAC_CONST(0.01637012582228),
148 FRAC_CONST(0.01176238327857), FRAC_CONST(0.00696368621617),
149 FRAC_CONST(0.00197656014503), FRAC_CONST(-0.00320868968304),
150 FRAC_CONST(-0.00857117491366), FRAC_CONST(-0.01412888273558),
151 FRAC_CONST(-0.01988341292573), FRAC_CONST(-0.02582272888064),
152 FRAC_CONST(-0.03195312745332), FRAC_CONST(-0.03827765720822),
153 FRAC_CONST(-0.04478068215856), FRAC_CONST(-0.05148041767934),
154 FRAC_CONST(-0.05837053268336), FRAC_CONST(-0.06544098531359),
155 FRAC_CONST(-0.07269433008129), FRAC_CONST(-0.08013729344279),
156 FRAC_CONST(-0.08775475365593), FRAC_CONST(-0.09555333528914),
157 FRAC_CONST(-0.10353295311463), FRAC_CONST(-0.1116826931773),
158 FRAC_CONST(-0.120007798468), FRAC_CONST(-0.12850028503878),
159 FRAC_CONST(-0.13715517611934), FRAC_CONST(-0.1459766491187),
160 FRAC_CONST(-0.15496070710605), FRAC_CONST(-0.16409588556669),
161 FRAC_CONST(-0.17338081721706), FRAC_CONST(-0.18281725485142),
162 FRAC_CONST(-0.19239667457267), FRAC_CONST(-0.20212501768103),
163 FRAC_CONST(-0.21197358538056), FRAC_CONST(-0.22196526964149),
164 FRAC_CONST(-0.23206908706791), FRAC_CONST(-0.24230168845974),
165 FRAC_CONST(-0.25264803095722), FRAC_CONST(-0.26310532994603),
166 FRAC_CONST(-0.27366340405625), FRAC_CONST(-0.28432141891085),
167 FRAC_CONST(-0.29507167170646), FRAC_CONST(-0.30590985751916),
168 FRAC_CONST(-0.31682789136456), FRAC_CONST(-0.32781137272105),
169 FRAC_CONST(-0.33887226938665), FRAC_CONST(-0.3499914122931),
170 FRAC_CONST(0.36115899031355), FRAC_CONST(0.37237955463061),
171 FRAC_CONST(0.38363500139043), FRAC_CONST(0.39492117615675),
172 FRAC_CONST(0.40623176767625), FRAC_CONST(0.41756968968409),
173 FRAC_CONST(0.42891199207373), FRAC_CONST(0.44025537543665),
174 FRAC_CONST(0.45159965356824), FRAC_CONST(0.46293080852757),
175 FRAC_CONST(0.47424532146115), FRAC_CONST(0.48552530911099),
176 FRAC_CONST(0.49677082545707), FRAC_CONST(0.50798175000434),
177 FRAC_CONST(0.51912349702391), FRAC_CONST(0.53022408956855),
178 FRAC_CONST(0.54125534487322), FRAC_CONST(0.55220512585061),
179 FRAC_CONST(0.5630789140137), FRAC_CONST(0.57385241316923),
180 FRAC_CONST(0.58454032354679), FRAC_CONST(0.59511230862496),
181 FRAC_CONST(0.6055783538918), FRAC_CONST(0.61591099320291),
182 FRAC_CONST(0.62612426956055), FRAC_CONST(0.63619801077286),
183 FRAC_CONST(0.64612696959461), FRAC_CONST(0.65590163024671),
184 FRAC_CONST(0.66551398801627), FRAC_CONST(0.67496631901712),
185 FRAC_CONST(0.68423532934598), FRAC_CONST(0.69332823767032),
186 FRAC_CONST(0.70223887193539), FRAC_CONST(0.71094104263095),
187 FRAC_CONST(0.71944626349561), FRAC_CONST(0.72774489002994),
188 FRAC_CONST(0.73582117582769), FRAC_CONST(0.74368278636488),
189 FRAC_CONST(0.75131374561237), FRAC_CONST(0.75870807608242),
190 FRAC_CONST(0.76586748650939), FRAC_CONST(0.77277808813327),
191 FRAC_CONST(0.77942875190216), FRAC_CONST(0.7858353120392),
192 FRAC_CONST(0.79197358416424), FRAC_CONST(0.797846641377),
193 FRAC_CONST(0.80344857518505), FRAC_CONST(0.80876950044491),
194 FRAC_CONST(0.81381912706217), FRAC_CONST(0.81857760046468),
195 FRAC_CONST(0.82304198905409), FRAC_CONST(0.8272275347336),
196 FRAC_CONST(0.8311038457152), FRAC_CONST(0.83469373618402),
197 FRAC_CONST(0.83797173378865), FRAC_CONST(0.84095413924722),
198 FRAC_CONST(0.84362382812005), FRAC_CONST(0.84598184698206),
199 FRAC_CONST(0.84803157770763), FRAC_CONST(0.84978051984268),
200 FRAC_CONST(0.85119715249343), FRAC_CONST(0.85230470352147),
201 FRAC_CONST(0.85310209497017), FRAC_CONST(0.85357205739107),
202 FRAC_CONST(0.85373856005937 /*max*/), FRAC_CONST(0.85357205739107),
203 FRAC_CONST(0.85310209497017), FRAC_CONST(0.85230470352147),
204 FRAC_CONST(0.85119715249343), FRAC_CONST(0.84978051984268),
205 FRAC_CONST(0.84803157770763), FRAC_CONST(0.84598184698206),
206 FRAC_CONST(0.84362382812005), FRAC_CONST(0.84095413924722),
207 FRAC_CONST(0.83797173378865), FRAC_CONST(0.83469373618402),
208 FRAC_CONST(0.8311038457152), FRAC_CONST(0.8272275347336),
209 FRAC_CONST(0.82304198905409), FRAC_CONST(0.81857760046468),
210 FRAC_CONST(0.81381912706217), FRAC_CONST(0.80876950044491),
211 FRAC_CONST(0.80344857518505), FRAC_CONST(0.797846641377),
212 FRAC_CONST(0.79197358416424), FRAC_CONST(0.7858353120392),
213 FRAC_CONST(0.77942875190216), FRAC_CONST(0.77277808813327),
214 FRAC_CONST(0.76586748650939), FRAC_CONST(0.75870807608242),
215 FRAC_CONST(0.75131374561237), FRAC_CONST(0.74368278636488),
216 FRAC_CONST(0.73582117582769), FRAC_CONST(0.72774489002994),
217 FRAC_CONST(0.71944626349561), FRAC_CONST(0.71094104263095),
218 FRAC_CONST(0.70223887193539), FRAC_CONST(0.69332823767032),
219 FRAC_CONST(0.68423532934598), FRAC_CONST(0.67496631901712),
220 FRAC_CONST(0.66551398801627), FRAC_CONST(0.65590163024671),
221 FRAC_CONST(0.64612696959461), FRAC_CONST(0.63619801077286),
222 FRAC_CONST(0.62612426956055), FRAC_CONST(0.61591099320291),
223 FRAC_CONST(0.6055783538918), FRAC_CONST(0.59511230862496),
224 FRAC_CONST(0.58454032354679), FRAC_CONST(0.57385241316923),
225 FRAC_CONST(0.5630789140137), FRAC_CONST(0.55220512585061),
226 FRAC_CONST(0.54125534487322), FRAC_CONST(0.53022408956855),
227 FRAC_CONST(0.51912349702391), FRAC_CONST(0.50798175000434),
228 FRAC_CONST(0.49677082545707), FRAC_CONST(0.48552530911099),
229 FRAC_CONST(0.47424532146115), FRAC_CONST(0.46293080852757),
230 FRAC_CONST(0.45159965356824), FRAC_CONST(0.44025537543665),
231 FRAC_CONST(0.42891199207373), FRAC_CONST(0.41756968968409),
232 FRAC_CONST(0.40623176767625), FRAC_CONST(0.39492117615675),
233 FRAC_CONST(0.38363500139043), FRAC_CONST(0.37237955463061),
234 FRAC_CONST(-0.36115899031355), FRAC_CONST(-0.3499914122931),
235 FRAC_CONST(-0.33887226938665), FRAC_CONST(-0.32781137272105),
236 FRAC_CONST(-0.31682789136456), FRAC_CONST(-0.30590985751916),
237 FRAC_CONST(-0.29507167170646), FRAC_CONST(-0.28432141891085),
238 FRAC_CONST(-0.27366340405625), FRAC_CONST(-0.26310532994603),
239 FRAC_CONST(-0.25264803095722), FRAC_CONST(-0.24230168845974),
240 FRAC_CONST(-0.23206908706791), FRAC_CONST(-0.22196526964149),
241 FRAC_CONST(-0.21197358538056), FRAC_CONST(-0.20212501768103),
242 FRAC_CONST(-0.19239667457267), FRAC_CONST(-0.18281725485142),
243 FRAC_CONST(-0.17338081721706), FRAC_CONST(-0.16409588556669),
244 FRAC_CONST(-0.15496070710605), FRAC_CONST(-0.1459766491187),
245 FRAC_CONST(-0.13715517611934), FRAC_CONST(-0.12850028503878),
246 FRAC_CONST(-0.120007798468), FRAC_CONST(-0.1116826931773),
247 FRAC_CONST(-0.10353295311463), FRAC_CONST(-0.09555333528914),
248 FRAC_CONST(-0.08775475365593), FRAC_CONST(-0.08013729344279),
249 FRAC_CONST(-0.07269433008129), FRAC_CONST(-0.06544098531359),
250 FRAC_CONST(-0.05837053268336), FRAC_CONST(-0.05148041767934),
251 FRAC_CONST(-0.04478068215856), FRAC_CONST(-0.03827765720822),
252 FRAC_CONST(-0.03195312745332), FRAC_CONST(-0.02582272888064),
253 FRAC_CONST(-0.01988341292573), FRAC_CONST(-0.01412888273558),
254 FRAC_CONST(-0.00857117491366), FRAC_CONST(-0.00320868968304),
255 FRAC_CONST(0.00197656014503), FRAC_CONST(0.00696368621617),
256 FRAC_CONST(0.01176238327857), FRAC_CONST(0.01637012582228),
257 FRAC_CONST(0.02079970728622), FRAC_CONST(0.02503075618909),
258 FRAC_CONST(0.02908240060125), FRAC_CONST(0.03295839306691),
259 FRAC_CONST(0.03664181168133), FRAC_CONST(0.04014582784127),
260 FRAC_CONST(0.04347687821958), FRAC_CONST(0.04663033051701),
261 FRAC_CONST(0.04959786763445), FRAC_CONST(0.05240938217366),
262 FRAC_CONST(0.05504600343009), FRAC_CONST(0.05751526919867),
263 FRAC_CONST(0.0598166570809), FRAC_CONST(0.06196027790387),
264 FRAC_CONST(0.06394448059633), FRAC_CONST(0.06576906686508),
265 FRAC_CONST(0.06745250215166), FRAC_CONST(0.06896640131951),
266 FRAC_CONST(0.07035330735093), FRAC_CONST(0.07158263647903),
267 FRAC_CONST(0.07267746427299), FRAC_CONST(0.0736406005762),
268 FRAC_CONST(0.07446643947564), FRAC_CONST(0.0751576255287),
269 FRAC_CONST(0.07573057565061), FRAC_CONST(0.07617483218536),
270 FRAC_CONST(0.07650507183194), FRAC_CONST(0.07672049241746),
271 FRAC_CONST(0.07682300113923), FRAC_CONST(0.07681739756964),
272 FRAC_CONST(0.07670934904245), FRAC_CONST(0.07649921704119),
273 FRAC_CONST(0.07619924793396), FRAC_CONST(0.07580083586584),
274 FRAC_CONST(0.07531373362019), FRAC_CONST(0.07474525581194),
275 FRAC_CONST(0.07410036424342), FRAC_CONST(0.07336202550803),
276 FRAC_CONST(0.07256825833083), FRAC_CONST(0.07170026731102),
277 FRAC_CONST(0.07076287107266), FRAC_CONST(0.06976302447127),
278 FRAC_CONST(0.06870438283512), FRAC_CONST(0.06760759851228),
279 FRAC_CONST(0.06643675122104), FRAC_CONST(0.0652247106438),
280 FRAC_CONST(0.06397158980681), FRAC_CONST(0.06268578081172),
281 FRAC_CONST(0.06134551717207), FRAC_CONST(0.05998374801761),
282 FRAC_CONST(0.0585915683626), FRAC_CONST(0.05716164501299),
283 FRAC_CONST(0.05571736482138), FRAC_CONST(0.05424527683589),
284 FRAC_CONST(0.05276307465207), FRAC_CONST(0.05125561555216),
285 FRAC_CONST(0.04973857556014), FRAC_CONST(0.04821657200672),
286 FRAC_CONST(0.04668430272642), FRAC_CONST(0.04514884056413),
287 FRAC_CONST(0.04360975421304), FRAC_CONST(0.04206490946367),
288 FRAC_CONST(0.04053491705584), FRAC_CONST(0.03900536794745),
289 FRAC_CONST(0.03748128504252), FRAC_CONST(0.03596975605542),
290 FRAC_CONST(0.03446209487686), FRAC_CONST(0.03297540810337),
291 FRAC_CONST(0.03150176087389), FRAC_CONST(0.03005026574279),
292 FRAC_CONST(0.02860721736385), FRAC_CONST(0.02718594296329),
293 FRAC_CONST(0.02578758475467), FRAC_CONST(0.02441609920285),
294 FRAC_CONST(0.02306801692862), FRAC_CONST(0.02174675502535),
295 FRAC_CONST(0.02045317933555), FRAC_CONST(0.01918724313698),
296 FRAC_CONST(0.01794333813443), FRAC_CONST(0.01673247129989),
297 FRAC_CONST(0.01554055533423), FRAC_CONST(0.01439046660792),
298 FRAC_CONST(-0.01327182200351), FRAC_CONST(-0.01218499959508),
299 FRAC_CONST(-0.01113155480321), FRAC_CONST(-0.01011502154986),
300 FRAC_CONST(-0.00913253296085), FRAC_CONST(-0.00817982333726),
301 FRAC_CONST(-0.00726158168517), FRAC_CONST(-0.00637922932685),
302 FRAC_CONST(-0.00553372111088), FRAC_CONST(-0.004722259624),
303 FRAC_CONST(-0.00394011240522), FRAC_CONST(-0.003193377839),
304 FRAC_CONST(-0.00248267236449), FRAC_CONST(-0.00180394725893),
305 FRAC_CONST(-0.00115681355227), FRAC_CONST(-0.00054642808664),
306 FRAC_CONST(2.760451905E-005), FRAC_CONST(0.0005832264248),
307 FRAC_CONST(0.00109023290512), FRAC_CONST(0.00157846825768),
308 FRAC_CONST(0.0020274176185), FRAC_CONST(0.00245085400321),
309 FRAC_CONST(0.00284467578623), FRAC_CONST(0.00320918858098),
310 FRAC_CONST(0.00354012465507), FRAC_CONST(0.00384564081246),
311 FRAC_CONST(0.0041251642327), FRAC_CONST(0.00438018617447),
312 FRAC_CONST(0.00460395301471), FRAC_CONST(0.004810946906),
313 FRAC_CONST(0.00498396877629), FRAC_CONST(0.00513822754514),
314 FRAC_CONST(0.00527157587272), FRAC_CONST(0.0053838975897),
315 FRAC_CONST(0.0054753783077), FRAC_CONST(0.005540436394),
316 FRAC_CONST(0.0055917128663), FRAC_CONST(0.00562661141932),
317 FRAC_CONST(0.00563891995151), FRAC_CONST(0.00564551969164),
318 FRAC_CONST(0.00562206432097), FRAC_CONST(0.00559380230045),
319 FRAC_CONST(0.00554757145088), FRAC_CONST(0.00548760401507),
320 FRAC_CONST(0.00541967759307), FRAC_CONST(0.00534716811982),
321 FRAC_CONST(0.00524611661324), FRAC_CONST(0.00514073539032),
322 FRAC_CONST(0.00503930226013), FRAC_CONST(0.00491376035745),
323 FRAC_CONST(0.00479325608498), FRAC_CONST(0.00466064606118),
324 FRAC_CONST(0.00452098527825), FRAC_CONST(0.00437307196781),
325 FRAC_CONST(0.0042264269227), FRAC_CONST(0.00408197531935),
326 FRAC_CONST(0.00392074323703), FRAC_CONST(0.00376039229104),
327 FRAC_CONST(0.00360082681231), FRAC_CONST(0.00344188741828),
328 FRAC_CONST(0.00327396134847), FRAC_CONST(0.00311254206525),
329 FRAC_CONST(0.00294694477165), FRAC_CONST(0.00278704643465),
330 FRAC_CONST(0.00262017586902), FRAC_CONST(0.00246256169126),
331 FRAC_CONST(0.00230172547746), FRAC_CONST(0.00214615835557),
332 FRAC_CONST(0.00198411407369), FRAC_CONST(0.00183482654224),
333 FRAC_CONST(0.00168680832531), FRAC_CONST(0.00154432198471),
334 FRAC_CONST(0.00139024948272), FRAC_CONST(0.00125778846475),
335 FRAC_CONST(0.00112501551307), FRAC_CONST(0.00098859883015),
336 FRAC_CONST(0.00086084433262), FRAC_CONST(0.00074580258865),
337 FRAC_CONST(0.00062393761391), FRAC_CONST(0.00051073884952),
338 FRAC_CONST(0.0004026540216), FRAC_CONST(0.00029495311041),
339 FRAC_CONST(0.00020430170688), FRAC_CONST(0.00010943831274),
340 FRAC_CONST(1.349497418E-005), FRAC_CONST(-6.173344072E-005),
341 FRAC_CONST(-0.00014463809349), FRAC_CONST(-0.0002098337344),
342 FRAC_CONST(-0.00028969811748), FRAC_CONST(-0.00035011758756),
343 FRAC_CONST(-0.00040951214522), FRAC_CONST(-0.00046063254803),
344 FRAC_CONST(-0.00051455722108), FRAC_CONST(-0.00055645763906),
345 FRAC_CONST(-0.0005946118933), FRAC_CONST(-0.00063415949025),
346 FRAC_CONST(-0.00066504150893), FRAC_CONST(-0.00069179375372),
347 FRAC_CONST(-0.00072153919876), FRAC_CONST(-0.00073193571525),
348 FRAC_CONST(-0.00075300014201), FRAC_CONST(-0.00076307935757),
349 FRAC_CONST(-0.0007757977331), FRAC_CONST(-0.00078014496257),
350 FRAC_CONST(-0.000780366471), FRAC_CONST(-0.00077798694927),
351 FRAC_CONST(-0.00078343322877), FRAC_CONST(-0.00077248485949),
352 FRAC_CONST(-0.0007681371927), FRAC_CONST(-0.00074905980532),
353 FRAC_CONST(-0.00074409418541), FRAC_CONST(-0.00072550431222),
354 FRAC_CONST(-0.00071577364744), FRAC_CONST(-0.00069416146273),
355 FRAC_CONST(-0.00067776907764), FRAC_CONST(-0.00065403333621),
356 FRAC_CONST(-0.00063124935319), FRAC_CONST(-0.00061327473938),
357 FRAC_CONST(-0.00058709304852), FRAC_CONST(-0.00056778025613),
358 FRAC_CONST(-0.00054665656337), FRAC_CONST(-0.00052265642972),
359 FRAC_CONST(-0.00050407143497), FRAC_CONST(-0.00048937912498),
360 FRAC_CONST(-0.00048752279712), FRAC_CONST(-0.00049475180896),
361 FRAC_CONST(-0.00056176925738), FRAC_CONST(-0.00055252865047)
362};
363
364#endif
365
diff --git a/apps/codecs/libfaad/sbr_syntax.c b/apps/codecs/libfaad/sbr_syntax.c
new file mode 100644
index 0000000000..4920d701e6
--- /dev/null
+++ b/apps/codecs/libfaad/sbr_syntax.c
@@ -0,0 +1,871 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#include "common.h"
29#include "structs.h"
30
31#ifdef SBR_DEC
32
33#include "sbr_syntax.h"
34#include "syntax.h"
35#include "sbr_huff.h"
36#include "sbr_fbt.h"
37#include "sbr_tf_grid.h"
38#include "sbr_e_nf.h"
39#include "bits.h"
40#ifdef PS_DEC
41#include "ps_dec.h"
42#endif
43#ifdef DRM_PS
44#include "drm_dec.h"
45#endif
46#include "analysis.h"
47
48/* static function declarations */
49static void sbr_header(bitfile *ld, sbr_info *sbr);
50static uint8_t calc_sbr_tables(sbr_info *sbr, uint8_t start_freq, uint8_t stop_freq,
51 uint8_t samplerate_mode, uint8_t freq_scale,
52 uint8_t alter_scale, uint8_t xover_band);
53static uint8_t sbr_data(bitfile *ld, sbr_info *sbr);
54static uint16_t sbr_extension(bitfile *ld, sbr_info *sbr,
55 uint8_t bs_extension_id, uint16_t num_bits_left);
56static uint8_t sbr_single_channel_element(bitfile *ld, sbr_info *sbr);
57static uint8_t sbr_channel_pair_element(bitfile *ld, sbr_info *sbr);
58static uint8_t sbr_grid(bitfile *ld, sbr_info *sbr, uint8_t ch);
59static void sbr_dtdf(bitfile *ld, sbr_info *sbr, uint8_t ch);
60static void invf_mode(bitfile *ld, sbr_info *sbr, uint8_t ch);
61static void sinusoidal_coding(bitfile *ld, sbr_info *sbr, uint8_t ch);
62
63
64static void sbr_reset(sbr_info *sbr)
65{
66#if 0
67 printf("%d\n", sbr->bs_start_freq_prev);
68 printf("%d\n", sbr->bs_stop_freq_prev);
69 printf("%d\n", sbr->bs_freq_scale_prev);
70 printf("%d\n", sbr->bs_alter_scale_prev);
71 printf("%d\n", sbr->bs_xover_band_prev);
72 printf("%d\n\n", sbr->bs_noise_bands_prev);
73#endif
74
75 /* if these are different from the previous frame: Reset = 1 */
76 if ((sbr->bs_start_freq != sbr->bs_start_freq_prev) ||
77 (sbr->bs_stop_freq != sbr->bs_stop_freq_prev) ||
78 (sbr->bs_freq_scale != sbr->bs_freq_scale_prev) ||
79 (sbr->bs_alter_scale != sbr->bs_alter_scale_prev) ||
80 (sbr->bs_xover_band != sbr->bs_xover_band_prev) ||
81 (sbr->bs_noise_bands != sbr->bs_noise_bands_prev))
82 {
83 sbr->Reset = 1;
84 } else {
85 sbr->Reset = 0;
86 }
87
88 sbr->bs_start_freq_prev = sbr->bs_start_freq;
89 sbr->bs_stop_freq_prev = sbr->bs_stop_freq;
90 sbr->bs_freq_scale_prev = sbr->bs_freq_scale;
91 sbr->bs_alter_scale_prev = sbr->bs_alter_scale;
92 sbr->bs_xover_band_prev = sbr->bs_xover_band;
93 sbr->bs_noise_bands_prev = sbr->bs_noise_bands;
94}
95
96static uint8_t calc_sbr_tables(sbr_info *sbr, uint8_t start_freq, uint8_t stop_freq,
97 uint8_t samplerate_mode, uint8_t freq_scale,
98 uint8_t alter_scale, uint8_t xover_band)
99{
100 uint8_t result = 0;
101 uint8_t k2;
102
103 /* calculate the Master Frequency Table */
104 sbr->k0 = qmf_start_channel(start_freq, samplerate_mode, sbr->sample_rate);
105 k2 = qmf_stop_channel(stop_freq, sbr->sample_rate, sbr->k0);
106
107 /* check k0 and k2 */
108 if (sbr->sample_rate >= 48000)
109 {
110 if ((k2 - sbr->k0) > 32)
111 result += 1;
112 } else if (sbr->sample_rate <= 32000) {
113 if ((k2 - sbr->k0) > 48)
114 result += 1;
115 } else { /* (sbr->sample_rate == 44100) */
116 if ((k2 - sbr->k0) > 45)
117 result += 1;
118 }
119
120 if (freq_scale == 0)
121 {
122 result += master_frequency_table_fs0(sbr, sbr->k0, k2, alter_scale);
123 } else {
124 result += master_frequency_table(sbr, sbr->k0, k2, freq_scale, alter_scale);
125 }
126 result += derived_frequency_table(sbr, xover_band, k2);
127
128 result = (result > 0) ? 1 : 0;
129
130 return result;
131}
132
133/* table 2 */
134uint8_t sbr_extension_data(bitfile *ld, sbr_info *sbr, uint16_t cnt)
135{
136 uint8_t result = 0;
137 uint16_t num_align_bits = 0;
138 uint16_t num_sbr_bits = (uint16_t)faad_get_processed_bits(ld);
139
140 uint8_t saved_start_freq, saved_samplerate_mode;
141 uint8_t saved_stop_freq, saved_freq_scale;
142 uint8_t saved_alter_scale, saved_xover_band;
143
144#ifdef DRM
145 if (!sbr->Is_DRM_SBR)
146#endif
147 {
148 uint8_t bs_extension_type = (uint8_t)faad_getbits(ld, 4
149 DEBUGVAR(1,198,"sbr_bitstream(): bs_extension_type"));
150
151 if (bs_extension_type == EXT_SBR_DATA_CRC)
152 {
153 sbr->bs_sbr_crc_bits = (uint16_t)faad_getbits(ld, 10
154 DEBUGVAR(1,199,"sbr_bitstream(): bs_sbr_crc_bits"));
155 }
156 }
157
158 /* save old header values, in case the new ones are corrupted */
159 saved_start_freq = sbr->bs_start_freq;
160 saved_samplerate_mode = sbr->bs_samplerate_mode;
161 saved_stop_freq = sbr->bs_stop_freq;
162 saved_freq_scale = sbr->bs_freq_scale;
163 saved_alter_scale = sbr->bs_alter_scale;
164 saved_xover_band = sbr->bs_xover_band;
165
166 sbr->bs_header_flag = faad_get1bit(ld
167 DEBUGVAR(1,200,"sbr_bitstream(): bs_header_flag"));
168
169 if (sbr->bs_header_flag)
170 sbr_header(ld, sbr);
171
172 /* Reset? */
173 sbr_reset(sbr);
174
175 /* first frame should have a header */
176 //if (!(sbr->frame == 0 && sbr->bs_header_flag == 0))
177 if (sbr->header_count != 0)
178 {
179 if (sbr->Reset || (sbr->bs_header_flag && sbr->just_seeked))
180 {
181 uint8_t rt = calc_sbr_tables(sbr, sbr->bs_start_freq, sbr->bs_stop_freq,
182 sbr->bs_samplerate_mode, sbr->bs_freq_scale,
183 sbr->bs_alter_scale, sbr->bs_xover_band);
184
185 /* if an error occured with the new header values revert to the old ones */
186 if (rt > 0)
187 {
188 calc_sbr_tables(sbr, saved_start_freq, saved_stop_freq,
189 saved_samplerate_mode, saved_freq_scale,
190 saved_alter_scale, saved_xover_band);
191 }
192 }
193
194 if (result == 0)
195 {
196 result = sbr_data(ld, sbr);
197
198 /* sbr_data() returning an error means that there was an error in
199 envelope_time_border_vector().
200 In this case the old time border vector is saved and all the previous
201 data normally read after sbr_grid() is saved.
202 */
203 /* to be on the safe side, calculate old sbr tables in case of error */
204 if ((result > 0) &&
205 (sbr->Reset || (sbr->bs_header_flag && sbr->just_seeked)))
206 {
207 calc_sbr_tables(sbr, saved_start_freq, saved_stop_freq,
208 saved_samplerate_mode, saved_freq_scale,
209 saved_alter_scale, saved_xover_band);
210 }
211
212 /* we should be able to safely set result to 0 now */
213 result = 0;
214 }
215 } else {
216 result = 1;
217 }
218
219#ifdef DRM
220 if (!sbr->Is_DRM_SBR)
221#endif
222 {
223 num_sbr_bits = (uint16_t)faad_get_processed_bits(ld) - num_sbr_bits;
224
225 /* check if we read more bits then were available for sbr */
226 if (8*cnt < num_sbr_bits)
227 return 1;
228
229 /* -4 does not apply, bs_extension_type is re-read in this function */
230 num_align_bits = 8*cnt /*- 4*/ - num_sbr_bits;
231
232 while (num_align_bits > 7)
233 {
234 faad_getbits(ld, 8
235 DEBUGVAR(1,999,"sbr_bitstream(): num_align_bits"));
236 num_align_bits -= 8;
237 }
238 faad_getbits(ld, num_align_bits
239 DEBUGVAR(1,999,"sbr_bitstream(): num_align_bits"));
240 }
241
242 return result;
243}
244
245/* table 3 */
246static void sbr_header(bitfile *ld, sbr_info *sbr)
247{
248 uint8_t bs_header_extra_1, bs_header_extra_2;
249
250 sbr->header_count++;
251
252 sbr->bs_amp_res = faad_get1bit(ld
253 DEBUGVAR(1,203,"sbr_header(): bs_amp_res"));
254
255 /* bs_start_freq and bs_stop_freq must define a fequency band that does
256 not exceed 48 channels */
257 sbr->bs_start_freq = (uint8_t)faad_getbits(ld, 4
258 DEBUGVAR(1,204,"sbr_header(): bs_start_freq"));
259 sbr->bs_stop_freq = (uint8_t)faad_getbits(ld, 4
260 DEBUGVAR(1,205,"sbr_header(): bs_stop_freq"));
261 sbr->bs_xover_band = (uint8_t)faad_getbits(ld, 3
262 DEBUGVAR(1,206,"sbr_header(): bs_xover_band"));
263 faad_getbits(ld, 2
264 DEBUGVAR(1,207,"sbr_header(): bs_reserved_bits_hdr"));
265 bs_header_extra_1 = (uint8_t)faad_get1bit(ld
266 DEBUGVAR(1,208,"sbr_header(): bs_header_extra_1"));
267 bs_header_extra_2 = (uint8_t)faad_get1bit(ld
268 DEBUGVAR(1,209,"sbr_header(): bs_header_extra_2"));
269
270 if (bs_header_extra_1)
271 {
272 sbr->bs_freq_scale = (uint8_t)faad_getbits(ld, 2
273 DEBUGVAR(1,211,"sbr_header(): bs_freq_scale"));
274 sbr->bs_alter_scale = (uint8_t)faad_get1bit(ld
275 DEBUGVAR(1,212,"sbr_header(): bs_alter_scale"));
276 sbr->bs_noise_bands = (uint8_t)faad_getbits(ld, 2
277 DEBUGVAR(1,213,"sbr_header(): bs_noise_bands"));
278 } else {
279 /* Default values */
280 sbr->bs_freq_scale = 2;
281 sbr->bs_alter_scale = 1;
282 sbr->bs_noise_bands = 2;
283 }
284
285 if (bs_header_extra_2)
286 {
287 sbr->bs_limiter_bands = (uint8_t)faad_getbits(ld, 2
288 DEBUGVAR(1,214,"sbr_header(): bs_limiter_bands"));
289 sbr->bs_limiter_gains = (uint8_t)faad_getbits(ld, 2
290 DEBUGVAR(1,215,"sbr_header(): bs_limiter_gains"));
291 sbr->bs_interpol_freq = (uint8_t)faad_get1bit(ld
292 DEBUGVAR(1,216,"sbr_header(): bs_interpol_freq"));
293 sbr->bs_smoothing_mode = (uint8_t)faad_get1bit(ld
294 DEBUGVAR(1,217,"sbr_header(): bs_smoothing_mode"));
295 } else {
296 /* Default values */
297 sbr->bs_limiter_bands = 2;
298 sbr->bs_limiter_gains = 2;
299 sbr->bs_interpol_freq = 1;
300 sbr->bs_smoothing_mode = 1;
301 }
302
303#if 0
304 /* print the header to screen */
305 printf("bs_amp_res: %d\n", sbr->bs_amp_res);
306 printf("bs_start_freq: %d\n", sbr->bs_start_freq);
307 printf("bs_stop_freq: %d\n", sbr->bs_stop_freq);
308 printf("bs_xover_band: %d\n", sbr->bs_xover_band);
309 if (bs_header_extra_1)
310 {
311 printf("bs_freq_scale: %d\n", sbr->bs_freq_scale);
312 printf("bs_alter_scale: %d\n", sbr->bs_alter_scale);
313 printf("bs_noise_bands: %d\n", sbr->bs_noise_bands);
314 }
315 if (bs_header_extra_2)
316 {
317 printf("bs_limiter_bands: %d\n", sbr->bs_limiter_bands);
318 printf("bs_limiter_gains: %d\n", sbr->bs_limiter_gains);
319 printf("bs_interpol_freq: %d\n", sbr->bs_interpol_freq);
320 printf("bs_smoothing_mode: %d\n", sbr->bs_smoothing_mode);
321 }
322 printf("\n");
323#endif
324}
325
326/* table 4 */
327static uint8_t sbr_data(bitfile *ld, sbr_info *sbr)
328{
329 uint8_t result;
330#if 0
331 sbr->bs_samplerate_mode = faad_get1bit(ld
332 DEBUGVAR(1,219,"sbr_data(): bs_samplerate_mode"));
333#endif
334
335 sbr->rate = (sbr->bs_samplerate_mode) ? 2 : 1;
336
337 switch (sbr->id_aac)
338 {
339 case ID_SCE:
340 if ((result = sbr_single_channel_element(ld, sbr)) > 0)
341 return result;
342 break;
343 case ID_CPE:
344 if ((result = sbr_channel_pair_element(ld, sbr)) > 0)
345 return result;
346 break;
347 }
348
349 return 0;
350}
351
352/* table 5 */
353static uint8_t sbr_single_channel_element(bitfile *ld, sbr_info *sbr)
354{
355 uint8_t result;
356
357 if (faad_get1bit(ld
358 DEBUGVAR(1,220,"sbr_single_channel_element(): bs_data_extra")))
359 {
360 faad_getbits(ld, 4
361 DEBUGVAR(1,221,"sbr_single_channel_element(): bs_reserved_bits_data"));
362 }
363
364#ifdef DRM
365 /* bs_coupling, from sbr_channel_pair_base_element(bs_amp_res) */
366 if (sbr->Is_DRM_SBR)
367 faad_get1bit(ld);
368#endif
369
370 if ((result = sbr_grid(ld, sbr, 0)) > 0)
371 return result;
372 sbr_dtdf(ld, sbr, 0);
373 invf_mode(ld, sbr, 0);
374 sbr_envelope(ld, sbr, 0);
375 sbr_noise(ld, sbr, 0);
376
377#ifndef FIXED_POINT
378 envelope_noise_dequantisation(sbr, 0);
379#endif
380
381 memset(sbr->bs_add_harmonic[0], 0, 64*sizeof(uint8_t));
382
383 sbr->bs_add_harmonic_flag[0] = faad_get1bit(ld
384 DEBUGVAR(1,223,"sbr_single_channel_element(): bs_add_harmonic_flag[0]"));
385 if (sbr->bs_add_harmonic_flag[0])
386 sinusoidal_coding(ld, sbr, 0);
387
388 sbr->bs_extended_data = faad_get1bit(ld
389 DEBUGVAR(1,224,"sbr_single_channel_element(): bs_extended_data[0]"));
390
391 if (sbr->bs_extended_data)
392 {
393 uint16_t nr_bits_left;
394#if (defined(PS_DEC) || defined(DRM_PS))
395 uint8_t ps_ext_read = 0;
396#endif
397 uint16_t cnt = (uint16_t)faad_getbits(ld, 4
398 DEBUGVAR(1,225,"sbr_single_channel_element(): bs_extension_size"));
399 if (cnt == 15)
400 {
401 cnt += (uint16_t)faad_getbits(ld, 8
402 DEBUGVAR(1,226,"sbr_single_channel_element(): bs_esc_count"));
403 }
404
405 nr_bits_left = 8 * cnt;
406 while (nr_bits_left > 7)
407 {
408 uint16_t tmp_nr_bits = 0;
409
410 sbr->bs_extension_id = (uint8_t)faad_getbits(ld, 2
411 DEBUGVAR(1,227,"sbr_single_channel_element(): bs_extension_id"));
412 tmp_nr_bits += 2;
413
414 /* allow only 1 PS extension element per extension data */
415#if (defined(PS_DEC) || defined(DRM_PS))
416#if (defined(PS_DEC) && defined(DRM_PS))
417 if (sbr->bs_extension_id == EXTENSION_ID_PS || sbr->bs_extension_id == DRM_PARAMETRIC_STEREO)
418#else
419#ifdef PS_DEC
420 if (sbr->bs_extension_id == EXTENSION_ID_PS)
421#else
422#ifdef DRM_PS
423 if (sbr->bs_extension_id == DRM_PARAMETRIC_STEREO)
424#endif
425#endif
426#endif
427 {
428 if (ps_ext_read == 0)
429 {
430 ps_ext_read = 1;
431 } else {
432 /* to be safe make it 3, will switch to "default"
433 * in sbr_extension() */
434 sbr->bs_extension_id = 3;
435 }
436 }
437#endif
438
439 tmp_nr_bits += sbr_extension(ld, sbr, sbr->bs_extension_id, nr_bits_left);
440
441 /* check if the data read is bigger than the number of available bits */
442 if (tmp_nr_bits > nr_bits_left)
443 return 1;
444
445 nr_bits_left -= tmp_nr_bits;
446 }
447
448 /* Corrigendum */
449 if (nr_bits_left > 0)
450 {
451 faad_getbits(ld, nr_bits_left
452 DEBUGVAR(1,280,"sbr_single_channel_element(): nr_bits_left"));
453 }
454 }
455
456 return 0;
457}
458
459/* table 6 */
460static uint8_t sbr_channel_pair_element(bitfile *ld, sbr_info *sbr)
461{
462 uint8_t n, result;
463
464 if (faad_get1bit(ld
465 DEBUGVAR(1,228,"sbr_single_channel_element(): bs_data_extra")))
466 {
467 faad_getbits(ld, 4
468 DEBUGVAR(1,228,"sbr_channel_pair_element(): bs_reserved_bits_data"));
469 faad_getbits(ld, 4
470 DEBUGVAR(1,228,"sbr_channel_pair_element(): bs_reserved_bits_data"));
471 }
472
473 sbr->bs_coupling = faad_get1bit(ld
474 DEBUGVAR(1,228,"sbr_channel_pair_element(): bs_coupling"));
475
476 if (sbr->bs_coupling)
477 {
478 if ((result = sbr_grid(ld, sbr, 0)) > 0)
479 return result;
480
481 /* need to copy some data from left to right */
482 sbr->bs_frame_class[1] = sbr->bs_frame_class[0];
483 sbr->L_E[1] = sbr->L_E[0];
484 sbr->L_Q[1] = sbr->L_Q[0];
485 sbr->bs_pointer[1] = sbr->bs_pointer[0];
486
487 for (n = 0; n <= sbr->L_E[0]; n++)
488 {
489 sbr->t_E[1][n] = sbr->t_E[0][n];
490 sbr->f[1][n] = sbr->f[0][n];
491 }
492 for (n = 0; n <= sbr->L_Q[0]; n++)
493 sbr->t_Q[1][n] = sbr->t_Q[0][n];
494
495 sbr_dtdf(ld, sbr, 0);
496 sbr_dtdf(ld, sbr, 1);
497 invf_mode(ld, sbr, 0);
498
499 /* more copying */
500 for (n = 0; n < sbr->N_Q; n++)
501 sbr->bs_invf_mode[1][n] = sbr->bs_invf_mode[0][n];
502
503 sbr_envelope(ld, sbr, 0);
504 sbr_noise(ld, sbr, 0);
505 sbr_envelope(ld, sbr, 1);
506 sbr_noise(ld, sbr, 1);
507
508 memset(sbr->bs_add_harmonic[0], 0, 64*sizeof(uint8_t));
509 memset(sbr->bs_add_harmonic[1], 0, 64*sizeof(uint8_t));
510
511 sbr->bs_add_harmonic_flag[0] = faad_get1bit(ld
512 DEBUGVAR(1,231,"sbr_channel_pair_element(): bs_add_harmonic_flag[0]"));
513 if (sbr->bs_add_harmonic_flag[0])
514 sinusoidal_coding(ld, sbr, 0);
515
516 sbr->bs_add_harmonic_flag[1] = faad_get1bit(ld
517 DEBUGVAR(1,232,"sbr_channel_pair_element(): bs_add_harmonic_flag[1]"));
518 if (sbr->bs_add_harmonic_flag[1])
519 sinusoidal_coding(ld, sbr, 1);
520 } else {
521 uint8_t saved_t_E[6] = {0}, saved_t_Q[3] = {0};
522 uint8_t saved_L_E = sbr->L_E[0];
523 uint8_t saved_L_Q = sbr->L_Q[0];
524 uint8_t saved_frame_class = sbr->bs_frame_class[0];
525
526 for (n = 0; n < saved_L_E; n++)
527 saved_t_E[n] = sbr->t_E[0][n];
528 for (n = 0; n < saved_L_Q; n++)
529 saved_t_Q[n] = sbr->t_Q[0][n];
530
531 if ((result = sbr_grid(ld, sbr, 0)) > 0)
532 return result;
533 if ((result = sbr_grid(ld, sbr, 1)) > 0)
534 {
535 /* restore first channel data as well */
536 sbr->bs_frame_class[0] = saved_frame_class;
537 sbr->L_E[0] = saved_L_E;
538 sbr->L_Q[0] = saved_L_Q;
539 for (n = 0; n < 6; n++)
540 sbr->t_E[0][n] = saved_t_E[n];
541 for (n = 0; n < 3; n++)
542 sbr->t_Q[0][n] = saved_t_Q[n];
543
544 return result;
545 }
546 sbr_dtdf(ld, sbr, 0);
547 sbr_dtdf(ld, sbr, 1);
548 invf_mode(ld, sbr, 0);
549 invf_mode(ld, sbr, 1);
550 sbr_envelope(ld, sbr, 0);
551 sbr_envelope(ld, sbr, 1);
552 sbr_noise(ld, sbr, 0);
553 sbr_noise(ld, sbr, 1);
554
555 memset(sbr->bs_add_harmonic[0], 0, 64*sizeof(uint8_t));
556 memset(sbr->bs_add_harmonic[1], 0, 64*sizeof(uint8_t));
557
558 sbr->bs_add_harmonic_flag[0] = faad_get1bit(ld
559 DEBUGVAR(1,239,"sbr_channel_pair_element(): bs_add_harmonic_flag[0]"));
560 if (sbr->bs_add_harmonic_flag[0])
561 sinusoidal_coding(ld, sbr, 0);
562
563 sbr->bs_add_harmonic_flag[1] = faad_get1bit(ld
564 DEBUGVAR(1,240,"sbr_channel_pair_element(): bs_add_harmonic_flag[1]"));
565 if (sbr->bs_add_harmonic_flag[1])
566 sinusoidal_coding(ld, sbr, 1);
567 }
568#ifndef FIXED_POINT
569 envelope_noise_dequantisation(sbr, 0);
570 envelope_noise_dequantisation(sbr, 1);
571
572 if (sbr->bs_coupling)
573 unmap_envelope_noise(sbr);
574#endif
575
576 sbr->bs_extended_data = faad_get1bit(ld
577 DEBUGVAR(1,233,"sbr_channel_pair_element(): bs_extended_data[0]"));
578 if (sbr->bs_extended_data)
579 {
580 uint16_t nr_bits_left;
581 uint16_t cnt = (uint16_t)faad_getbits(ld, 4
582 DEBUGVAR(1,234,"sbr_channel_pair_element(): bs_extension_size"));
583 if (cnt == 15)
584 {
585 cnt += (uint16_t)faad_getbits(ld, 8
586 DEBUGVAR(1,235,"sbr_channel_pair_element(): bs_esc_count"));
587 }
588
589 nr_bits_left = 8 * cnt;
590 while (nr_bits_left > 7)
591 {
592 uint16_t tmp_nr_bits = 0;
593
594 sbr->bs_extension_id = (uint8_t)faad_getbits(ld, 2
595 DEBUGVAR(1,236,"sbr_channel_pair_element(): bs_extension_id"));
596 tmp_nr_bits += 2;
597 tmp_nr_bits += sbr_extension(ld, sbr, sbr->bs_extension_id, nr_bits_left);
598
599 /* check if the data read is bigger than the number of available bits */
600 if (tmp_nr_bits > nr_bits_left)
601 return 1;
602
603 nr_bits_left -= tmp_nr_bits;
604 }
605
606 /* Corrigendum */
607 if (nr_bits_left > 0)
608 {
609 faad_getbits(ld, nr_bits_left
610 DEBUGVAR(1,280,"sbr_channel_pair_element(): nr_bits_left"));
611 }
612 }
613
614 return 0;
615}
616
617/* integer log[2](x): input range [0,10) */
618static int8_t sbr_log2(const int8_t val)
619{
620 int8_t log2tab[] = { 0, 0, 1, 2, 2, 3, 3, 3, 3, 4 };
621 if (val < 10 && val >= 0)
622 return log2tab[val];
623 else
624 return 0;
625}
626
627
628/* table 7 */
629static uint8_t sbr_grid(bitfile *ld, sbr_info *sbr, uint8_t ch)
630{
631 uint8_t i, env, rel, result;
632 uint8_t bs_abs_bord, bs_abs_bord_1;
633 uint8_t bs_num_env = 0;
634 uint8_t saved_L_E = sbr->L_E[ch];
635 uint8_t saved_L_Q = sbr->L_Q[ch];
636 uint8_t saved_frame_class = sbr->bs_frame_class[ch];
637
638 sbr->bs_frame_class[ch] = (uint8_t)faad_getbits(ld, 2
639 DEBUGVAR(1,248,"sbr_grid(): bs_frame_class"));
640
641 switch (sbr->bs_frame_class[ch])
642 {
643 case FIXFIX:
644 i = (uint8_t)faad_getbits(ld, 2
645 DEBUGVAR(1,249,"sbr_grid(): bs_num_env_raw"));
646
647 bs_num_env = min(1 << i, 5);
648
649 i = (uint8_t)faad_get1bit(ld
650 DEBUGVAR(1,250,"sbr_grid(): bs_freq_res_flag"));
651 for (env = 0; env < bs_num_env; env++)
652 sbr->f[ch][env] = i;
653
654 sbr->abs_bord_lead[ch] = 0;
655 sbr->abs_bord_trail[ch] = sbr->numTimeSlots;
656 sbr->n_rel_lead[ch] = bs_num_env - 1;
657 sbr->n_rel_trail[ch] = 0;
658 break;
659
660 case FIXVAR:
661 bs_abs_bord = (uint8_t)faad_getbits(ld, 2
662 DEBUGVAR(1,251,"sbr_grid(): bs_abs_bord")) + sbr->numTimeSlots;
663 bs_num_env = (uint8_t)faad_getbits(ld, 2
664 DEBUGVAR(1,252,"sbr_grid(): bs_num_env")) + 1;
665
666 for (rel = 0; rel < bs_num_env-1; rel++)
667 {
668 sbr->bs_rel_bord[ch][rel] = 2 * (uint8_t)faad_getbits(ld, 2
669 DEBUGVAR(1,253,"sbr_grid(): bs_rel_bord")) + 2;
670 }
671 i = sbr_log2(bs_num_env + 1);
672 sbr->bs_pointer[ch] = (uint8_t)faad_getbits(ld, i
673 DEBUGVAR(1,254,"sbr_grid(): bs_pointer"));
674
675 for (env = 0; env < bs_num_env; env++)
676 {
677 sbr->f[ch][bs_num_env - env - 1] = (uint8_t)faad_get1bit(ld
678 DEBUGVAR(1,255,"sbr_grid(): bs_freq_res"));
679 }
680
681 sbr->abs_bord_lead[ch] = 0;
682 sbr->abs_bord_trail[ch] = bs_abs_bord;
683 sbr->n_rel_lead[ch] = 0;
684 sbr->n_rel_trail[ch] = bs_num_env - 1;
685 break;
686
687 case VARFIX:
688 bs_abs_bord = (uint8_t)faad_getbits(ld, 2
689 DEBUGVAR(1,256,"sbr_grid(): bs_abs_bord"));
690 bs_num_env = (uint8_t)faad_getbits(ld, 2
691 DEBUGVAR(1,257,"sbr_grid(): bs_num_env")) + 1;
692
693 for (rel = 0; rel < bs_num_env-1; rel++)
694 {
695 sbr->bs_rel_bord[ch][rel] = 2 * (uint8_t)faad_getbits(ld, 2
696 DEBUGVAR(1,258,"sbr_grid(): bs_rel_bord")) + 2;
697 }
698 i = sbr_log2(bs_num_env + 1);
699 sbr->bs_pointer[ch] = (uint8_t)faad_getbits(ld, i
700 DEBUGVAR(1,259,"sbr_grid(): bs_pointer"));
701
702 for (env = 0; env < bs_num_env; env++)
703 {
704 sbr->f[ch][env] = (uint8_t)faad_get1bit(ld
705 DEBUGVAR(1,260,"sbr_grid(): bs_freq_res"));
706 }
707
708 sbr->abs_bord_lead[ch] = bs_abs_bord;
709 sbr->abs_bord_trail[ch] = sbr->numTimeSlots;
710 sbr->n_rel_lead[ch] = bs_num_env - 1;
711 sbr->n_rel_trail[ch] = 0;
712 break;
713
714 case VARVAR:
715 bs_abs_bord = (uint8_t)faad_getbits(ld, 2
716 DEBUGVAR(1,261,"sbr_grid(): bs_abs_bord_0"));
717 bs_abs_bord_1 = (uint8_t)faad_getbits(ld, 2
718 DEBUGVAR(1,262,"sbr_grid(): bs_abs_bord_1")) + sbr->numTimeSlots;
719 sbr->bs_num_rel_0[ch] = (uint8_t)faad_getbits(ld, 2
720 DEBUGVAR(1,263,"sbr_grid(): bs_num_rel_0"));
721 sbr->bs_num_rel_1[ch] = (uint8_t)faad_getbits(ld, 2
722 DEBUGVAR(1,264,"sbr_grid(): bs_num_rel_1"));
723
724 bs_num_env = min(5, sbr->bs_num_rel_0[ch] + sbr->bs_num_rel_1[ch] + 1);
725
726 for (rel = 0; rel < sbr->bs_num_rel_0[ch]; rel++)
727 {
728 sbr->bs_rel_bord_0[ch][rel] = 2 * (uint8_t)faad_getbits(ld, 2
729 DEBUGVAR(1,265,"sbr_grid(): bs_rel_bord")) + 2;
730 }
731 for(rel = 0; rel < sbr->bs_num_rel_1[ch]; rel++)
732 {
733 sbr->bs_rel_bord_1[ch][rel] = 2 * (uint8_t)faad_getbits(ld, 2
734 DEBUGVAR(1,266,"sbr_grid(): bs_rel_bord")) + 2;
735 }
736 i = sbr_log2(sbr->bs_num_rel_0[ch] + sbr->bs_num_rel_1[ch] + 2);
737 sbr->bs_pointer[ch] = (uint8_t)faad_getbits(ld, i
738 DEBUGVAR(1,267,"sbr_grid(): bs_pointer"));
739
740 for (env = 0; env < bs_num_env; env++)
741 {
742 sbr->f[ch][env] = (uint8_t)faad_get1bit(ld
743 DEBUGVAR(1,268,"sbr_grid(): bs_freq_res"));
744 }
745
746 sbr->abs_bord_lead[ch] = bs_abs_bord;
747 sbr->abs_bord_trail[ch] = bs_abs_bord_1;
748 sbr->n_rel_lead[ch] = sbr->bs_num_rel_0[ch];
749 sbr->n_rel_trail[ch] = sbr->bs_num_rel_1[ch];
750 break;
751 }
752
753 if (sbr->bs_frame_class[ch] == VARVAR)
754 sbr->L_E[ch] = min(bs_num_env, 5);
755 else
756 sbr->L_E[ch] = min(bs_num_env, 4);
757
758 if (sbr->L_E[ch] <= 0)
759 return 1;
760
761 if (sbr->L_E[ch] > 1)
762 sbr->L_Q[ch] = 2;
763 else
764 sbr->L_Q[ch] = 1;
765
766 /* TODO: this code can probably be integrated into the code above! */
767 if ((result = envelope_time_border_vector(sbr, ch)) > 0)
768 {
769 sbr->bs_frame_class[ch] = saved_frame_class;
770 sbr->L_E[ch] = saved_L_E;
771 sbr->L_Q[ch] = saved_L_Q;
772 return result;
773 }
774 noise_floor_time_border_vector(sbr, ch);
775
776#if 0
777 for (env = 0; env < bs_num_env; env++)
778 {
779 printf("freq_res[ch:%d][env:%d]: %d\n", ch, env, sbr->f[ch][env]);
780 }
781#endif
782
783 return 0;
784}
785
786/* table 8 */
787static void sbr_dtdf(bitfile *ld, sbr_info *sbr, uint8_t ch)
788{
789 uint8_t i;
790
791 for (i = 0; i < sbr->L_E[ch]; i++)
792 {
793 sbr->bs_df_env[ch][i] = faad_get1bit(ld
794 DEBUGVAR(1,269,"sbr_dtdf(): bs_df_env"));
795 }
796
797 for (i = 0; i < sbr->L_Q[ch]; i++)
798 {
799 sbr->bs_df_noise[ch][i] = faad_get1bit(ld
800 DEBUGVAR(1,270,"sbr_dtdf(): bs_df_noise"));
801 }
802}
803
804/* table 9 */
805static void invf_mode(bitfile *ld, sbr_info *sbr, uint8_t ch)
806{
807 uint8_t n;
808
809 for (n = 0; n < sbr->N_Q; n++)
810 {
811 sbr->bs_invf_mode[ch][n] = (uint8_t)faad_getbits(ld, 2
812 DEBUGVAR(1,271,"invf_mode(): bs_invf_mode"));
813 }
814}
815
816static uint16_t sbr_extension(bitfile *ld, sbr_info *sbr,
817 uint8_t bs_extension_id, uint16_t num_bits_left)
818{
819#ifdef PS_DEC
820 uint8_t header;
821 uint16_t ret;
822#endif
823
824 switch (bs_extension_id)
825 {
826#ifdef PS_DEC
827 case EXTENSION_ID_PS:
828 if (!sbr->ps)
829 {
830 sbr->ps = ps_init(get_sr_index(sbr->sample_rate));
831 }
832 ret = ps_data(sbr->ps, ld, &header);
833
834 /* enable PS if and only if: a header has been decoded */
835 if (sbr->ps_used == 0 && header == 1)
836 {
837 sbr->ps_used = 1;
838 }
839
840 return ret;
841#endif
842#ifdef DRM_PS
843 case DRM_PARAMETRIC_STEREO:
844 sbr->ps_used = 1;
845 if (!sbr->drm_ps)
846 {
847 sbr->drm_ps = drm_ps_init();
848 }
849 return drm_ps_data(sbr->drm_ps, ld);
850#endif
851 default:
852 sbr->bs_extension_data = (uint8_t)faad_getbits(ld, 6
853 DEBUGVAR(1,279,"sbr_single_channel_element(): bs_extension_data"));
854 return 6;
855 }
856}
857
858/* table 12 */
859static void sinusoidal_coding(bitfile *ld, sbr_info *sbr, uint8_t ch)
860{
861 uint8_t n;
862
863 for (n = 0; n < sbr->N_high; n++)
864 {
865 sbr->bs_add_harmonic[ch][n] = faad_get1bit(ld
866 DEBUGVAR(1,278,"sinusoidal_coding(): bs_add_harmonic"));
867 }
868}
869
870
871#endif /* SBR_DEC */
diff --git a/apps/codecs/libfaad/sbr_syntax.h b/apps/codecs/libfaad/sbr_syntax.h
new file mode 100644
index 0000000000..33aecaaf73
--- /dev/null
+++ b/apps/codecs/libfaad/sbr_syntax.h
@@ -0,0 +1,64 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __SBR_SYNTAX_H__
29#define __SBR_SYNTAX_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#include "bits.h"
36
37#define T_HFGEN 8
38#define T_HFADJ 2
39
40#define EXT_SBR_DATA 13
41#define EXT_SBR_DATA_CRC 14
42
43#define FIXFIX 0
44#define FIXVAR 1
45#define VARFIX 2
46#define VARVAR 3
47
48#define LO_RES 0
49#define HI_RES 1
50
51#define NO_TIME_SLOTS_960 15
52#define NO_TIME_SLOTS 16
53#define RATE 2
54
55#define NOISE_FLOOR_OFFSET 6
56
57
58uint8_t sbr_extension_data(bitfile *ld, sbr_info *sbr, uint16_t cnt);
59
60#ifdef __cplusplus
61}
62#endif
63#endif /* __SBR_SYNTAX_H__ */
64
diff --git a/apps/codecs/libfaad/sbr_tf_grid.c b/apps/codecs/libfaad/sbr_tf_grid.c
new file mode 100644
index 0000000000..d41fad6358
--- /dev/null
+++ b/apps/codecs/libfaad/sbr_tf_grid.c
@@ -0,0 +1,258 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28/* Time/Frequency grid */
29
30#include "common.h"
31#include "structs.h"
32
33#ifdef SBR_DEC
34
35#include <stdlib.h>
36
37#include "sbr_syntax.h"
38#include "sbr_tf_grid.h"
39
40
41/* static function declarations */
42#if 0
43static int16_t rel_bord_lead(sbr_info *sbr, uint8_t ch, uint8_t l);
44static int16_t rel_bord_trail(sbr_info *sbr, uint8_t ch, uint8_t l);
45#endif
46static uint8_t middleBorder(sbr_info *sbr, uint8_t ch);
47
48
49/* function constructs new time border vector */
50/* first build into temp vector to be able to use previous vector on error */
51uint8_t envelope_time_border_vector(sbr_info *sbr, uint8_t ch)
52{
53 uint8_t l, border, temp;
54 uint8_t t_E_temp[6] = {0};
55
56 t_E_temp[0] = sbr->rate * sbr->abs_bord_lead[ch];
57 t_E_temp[sbr->L_E[ch]] = sbr->rate * sbr->abs_bord_trail[ch];
58
59 switch (sbr->bs_frame_class[ch])
60 {
61 case FIXFIX:
62 switch (sbr->L_E[ch])
63 {
64 case 4:
65 temp = (int) (sbr->numTimeSlots / 4);
66 t_E_temp[3] = sbr->rate * 3 * temp;
67 t_E_temp[2] = sbr->rate * 2 * temp;
68 t_E_temp[1] = sbr->rate * temp;
69 break;
70 case 2:
71 t_E_temp[1] = sbr->rate * (int) (sbr->numTimeSlots / 2);
72 break;
73 default:
74 break;
75 }
76 break;
77
78 case FIXVAR:
79 if (sbr->L_E[ch] > 1)
80 {
81 int8_t i = sbr->L_E[ch];
82 border = sbr->abs_bord_trail[ch];
83
84 for (l = 0; l < (sbr->L_E[ch] - 1); l++)
85 {
86 if (border < sbr->bs_rel_bord[ch][l])
87 return 1;
88
89 border -= sbr->bs_rel_bord[ch][l];
90 t_E_temp[--i] = sbr->rate * border;
91 }
92 }
93 break;
94
95 case VARFIX:
96 if (sbr->L_E[ch] > 1)
97 {
98 int8_t i = 1;
99 border = sbr->abs_bord_lead[ch];
100
101 for (l = 0; l < (sbr->L_E[ch] - 1); l++)
102 {
103 border += sbr->bs_rel_bord[ch][l];
104
105 if (sbr->rate * border + sbr->tHFAdj > sbr->numTimeSlotsRate+sbr->tHFGen)
106 return 1;
107
108 t_E_temp[i++] = sbr->rate * border;
109 }
110 }
111 break;
112
113 case VARVAR:
114 if (sbr->bs_num_rel_0[ch])
115 {
116 int8_t i = 1;
117 border = sbr->abs_bord_lead[ch];
118
119 for (l = 0; l < sbr->bs_num_rel_0[ch]; l++)
120 {
121 border += sbr->bs_rel_bord_0[ch][l];
122
123 if (sbr->rate * border + sbr->tHFAdj > sbr->numTimeSlotsRate+sbr->tHFGen)
124 return 1;
125
126 t_E_temp[i++] = sbr->rate * border;
127 }
128 }
129
130 if (sbr->bs_num_rel_1[ch])
131 {
132 int8_t i = sbr->L_E[ch];
133 border = sbr->abs_bord_trail[ch];
134
135 for (l = 0; l < sbr->bs_num_rel_1[ch]; l++)
136 {
137 if (border < sbr->bs_rel_bord_1[ch][l])
138 return 1;
139
140 border -= sbr->bs_rel_bord_1[ch][l];
141 t_E_temp[--i] = sbr->rate * border;
142 }
143 }
144 break;
145 }
146
147 /* no error occured, we can safely use this t_E vector */
148 for (l = 0; l < 6; l++)
149 {
150 sbr->t_E[ch][l] = t_E_temp[l];
151 }
152
153 return 0;
154}
155
156void noise_floor_time_border_vector(sbr_info *sbr, uint8_t ch)
157{
158 sbr->t_Q[ch][0] = sbr->t_E[ch][0];
159
160 if (sbr->L_E[ch] == 1)
161 {
162 sbr->t_Q[ch][1] = sbr->t_E[ch][1];
163 sbr->t_Q[ch][2] = 0;
164 } else {
165 uint8_t index = middleBorder(sbr, ch);
166 sbr->t_Q[ch][1] = sbr->t_E[ch][index];
167 sbr->t_Q[ch][2] = sbr->t_E[ch][sbr->L_E[ch]];
168 }
169}
170
171#if 0
172static int16_t rel_bord_lead(sbr_info *sbr, uint8_t ch, uint8_t l)
173{
174 uint8_t i;
175 int16_t acc = 0;
176
177 switch (sbr->bs_frame_class[ch])
178 {
179 case FIXFIX:
180 return sbr->numTimeSlots/sbr->L_E[ch];
181 case FIXVAR:
182 return 0;
183 case VARFIX:
184 for (i = 0; i < l; i++)
185 {
186 acc += sbr->bs_rel_bord[ch][i];
187 }
188 return acc;
189 case VARVAR:
190 for (i = 0; i < l; i++)
191 {
192 acc += sbr->bs_rel_bord_0[ch][i];
193 }
194 return acc;
195 }
196
197 return 0;
198}
199
200static int16_t rel_bord_trail(sbr_info *sbr, uint8_t ch, uint8_t l)
201{
202 uint8_t i;
203 int16_t acc = 0;
204
205 switch (sbr->bs_frame_class[ch])
206 {
207 case FIXFIX:
208 case VARFIX:
209 return 0;
210 case FIXVAR:
211 for (i = 0; i < l; i++)
212 {
213 acc += sbr->bs_rel_bord[ch][i];
214 }
215 return acc;
216 case VARVAR:
217 for (i = 0; i < l; i++)
218 {
219 acc += sbr->bs_rel_bord_1[ch][i];
220 }
221 return acc;
222 }
223
224 return 0;
225}
226#endif
227
228static uint8_t middleBorder(sbr_info *sbr, uint8_t ch)
229{
230 int8_t retval = 0;
231
232 switch (sbr->bs_frame_class[ch])
233 {
234 case FIXFIX:
235 retval = sbr->L_E[ch]/2;
236 break;
237 case VARFIX:
238 if (sbr->bs_pointer[ch] == 0)
239 retval = 1;
240 else if (sbr->bs_pointer[ch] == 1)
241 retval = sbr->L_E[ch] - 1;
242 else
243 retval = sbr->bs_pointer[ch] - 1;
244 break;
245 case FIXVAR:
246 case VARVAR:
247 if (sbr->bs_pointer[ch] > 1)
248 retval = sbr->L_E[ch] + 1 - sbr->bs_pointer[ch];
249 else
250 retval = sbr->L_E[ch] - 1;
251 break;
252 }
253
254 return (retval > 0) ? retval : 0;
255}
256
257
258#endif
diff --git a/apps/codecs/libfaad/sbr_tf_grid.h b/apps/codecs/libfaad/sbr_tf_grid.h
new file mode 100644
index 0000000000..b7a6b32290
--- /dev/null
+++ b/apps/codecs/libfaad/sbr_tf_grid.h
@@ -0,0 +1,44 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __SBR_TF_GRID_H__
29#define __SBR_TF_GRID_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35
36uint8_t envelope_time_border_vector(sbr_info *sbr, uint8_t ch);
37void noise_floor_time_border_vector(sbr_info *sbr, uint8_t ch);
38
39
40#ifdef __cplusplus
41}
42#endif
43#endif
44
diff --git a/apps/codecs/libfaad/sine_win.h b/apps/codecs/libfaad/sine_win.h
new file mode 100644
index 0000000000..38cba667f5
--- /dev/null
+++ b/apps/codecs/libfaad/sine_win.h
@@ -0,0 +1,4301 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __SINE_WIN_H__
29#define __SINE_WIN_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#ifdef _MSC_VER
36#pragma warning(disable:4305)
37#pragma warning(disable:4244)
38#endif
39
40ALIGN static const real_t sine_long_1024[] =
41{
42 FRAC_CONST(0.00076699031874270449),
43 FRAC_CONST(0.002300969151425805),
44 FRAC_CONST(0.0038349425697062275),
45 FRAC_CONST(0.0053689069639963425),
46 FRAC_CONST(0.0069028587247297558),
47 FRAC_CONST(0.0084367942423697988),
48 FRAC_CONST(0.0099707099074180308),
49 FRAC_CONST(0.011504602110422714),
50 FRAC_CONST(0.013038467241987334),
51 FRAC_CONST(0.014572301692779064),
52 FRAC_CONST(0.016106101853537287),
53 FRAC_CONST(0.017639864115082053),
54 FRAC_CONST(0.019173584868322623),
55 FRAC_CONST(0.020707260504265895),
56 FRAC_CONST(0.022240887414024961),
57 FRAC_CONST(0.023774461988827555),
58 FRAC_CONST(0.025307980620024571),
59 FRAC_CONST(0.026841439699098531),
60 FRAC_CONST(0.028374835617672099),
61 FRAC_CONST(0.029908164767516555),
62 FRAC_CONST(0.031441423540560301),
63 FRAC_CONST(0.032974608328897335),
64 FRAC_CONST(0.03450771552479575),
65 FRAC_CONST(0.036040741520706229),
66 FRAC_CONST(0.037573682709270494),
67 FRAC_CONST(0.039106535483329888),
68 FRAC_CONST(0.040639296235933736),
69 FRAC_CONST(0.042171961360347947),
70 FRAC_CONST(0.043704527250063421),
71 FRAC_CONST(0.04523699029880459),
72 FRAC_CONST(0.046769346900537863),
73 FRAC_CONST(0.048301593449480144),
74 FRAC_CONST(0.049833726340107277),
75 FRAC_CONST(0.051365741967162593),
76 FRAC_CONST(0.052897636725665324),
77 FRAC_CONST(0.054429407010919133),
78 FRAC_CONST(0.055961049218520569),
79 FRAC_CONST(0.057492559744367566),
80 FRAC_CONST(0.059023934984667931),
81 FRAC_CONST(0.060555171335947788),
82 FRAC_CONST(0.062086265195060088),
83 FRAC_CONST(0.063617212959193106),
84 FRAC_CONST(0.065148011025878833),
85 FRAC_CONST(0.066678655793001557),
86 FRAC_CONST(0.068209143658806329),
87 FRAC_CONST(0.069739471021907307),
88 FRAC_CONST(0.071269634281296401),
89 FRAC_CONST(0.072799629836351673),
90 FRAC_CONST(0.074329454086845756),
91 FRAC_CONST(0.075859103432954447),
92 FRAC_CONST(0.077388574275265049),
93 FRAC_CONST(0.078917863014784942),
94 FRAC_CONST(0.080446966052950014),
95 FRAC_CONST(0.081975879791633066),
96 FRAC_CONST(0.083504600633152432),
97 FRAC_CONST(0.085033124980280275),
98 FRAC_CONST(0.08656144923625117),
99 FRAC_CONST(0.088089569804770507),
100 FRAC_CONST(0.089617483090022959),
101 FRAC_CONST(0.091145185496681005),
102 FRAC_CONST(0.09267267342991331),
103 FRAC_CONST(0.094199943295393204),
104 FRAC_CONST(0.095726991499307162),
105 FRAC_CONST(0.097253814448363271),
106 FRAC_CONST(0.098780408549799623),
107 FRAC_CONST(0.10030677021139286),
108 FRAC_CONST(0.10183289584146653),
109 FRAC_CONST(0.10335878184889961),
110 FRAC_CONST(0.10488442464313497),
111 FRAC_CONST(0.10640982063418768),
112 FRAC_CONST(0.10793496623265365),
113 FRAC_CONST(0.10945985784971798),
114 FRAC_CONST(0.11098449189716339),
115 FRAC_CONST(0.11250886478737869),
116 FRAC_CONST(0.1140329729333672),
117 FRAC_CONST(0.11555681274875526),
118 FRAC_CONST(0.11708038064780059),
119 FRAC_CONST(0.11860367304540072),
120 FRAC_CONST(0.1201266863571015),
121 FRAC_CONST(0.12164941699910553),
122 FRAC_CONST(0.12317186138828048),
123 FRAC_CONST(0.12469401594216764),
124 FRAC_CONST(0.12621587707899035),
125 FRAC_CONST(0.12773744121766231),
126 FRAC_CONST(0.12925870477779614),
127 FRAC_CONST(0.13077966417971171),
128 FRAC_CONST(0.13230031584444465),
129 FRAC_CONST(0.13382065619375472),
130 FRAC_CONST(0.13534068165013421),
131 FRAC_CONST(0.13686038863681638),
132 FRAC_CONST(0.13837977357778389),
133 FRAC_CONST(0.13989883289777721),
134 FRAC_CONST(0.14141756302230302),
135 FRAC_CONST(0.14293596037764267),
136 FRAC_CONST(0.14445402139086047),
137 FRAC_CONST(0.14597174248981221),
138 FRAC_CONST(0.14748912010315357),
139 FRAC_CONST(0.14900615066034845),
140 FRAC_CONST(0.1505228305916774),
141 FRAC_CONST(0.15203915632824605),
142 FRAC_CONST(0.15355512430199345),
143 FRAC_CONST(0.15507073094570051),
144 FRAC_CONST(0.15658597269299843),
145 FRAC_CONST(0.15810084597837698),
146 FRAC_CONST(0.15961534723719306),
147 FRAC_CONST(0.16112947290567881),
148 FRAC_CONST(0.16264321942095031),
149 FRAC_CONST(0.16415658322101581),
150 FRAC_CONST(0.16566956074478412),
151 FRAC_CONST(0.16718214843207294),
152 FRAC_CONST(0.16869434272361733),
153 FRAC_CONST(0.17020614006107807),
154 FRAC_CONST(0.17171753688704997),
155 FRAC_CONST(0.17322852964507032),
156 FRAC_CONST(0.1747391147796272),
157 FRAC_CONST(0.17624928873616788),
158 FRAC_CONST(0.17775904796110717),
159 FRAC_CONST(0.17926838890183575),
160 FRAC_CONST(0.18077730800672859),
161 FRAC_CONST(0.1822858017251533),
162 FRAC_CONST(0.18379386650747845),
163 FRAC_CONST(0.1853014988050819),
164 FRAC_CONST(0.18680869507035927),
165 FRAC_CONST(0.18831545175673212),
166 FRAC_CONST(0.18982176531865641),
167 FRAC_CONST(0.1913276322116309),
168 FRAC_CONST(0.19283304889220523),
169 FRAC_CONST(0.1943380118179886),
170 FRAC_CONST(0.19584251744765785),
171 FRAC_CONST(0.19734656224096592),
172 FRAC_CONST(0.19885014265875009),
173 FRAC_CONST(0.20035325516294045),
174 FRAC_CONST(0.20185589621656805),
175 FRAC_CONST(0.20335806228377332),
176 FRAC_CONST(0.20485974982981442),
177 FRAC_CONST(0.20636095532107551),
178 FRAC_CONST(0.20786167522507507),
179 FRAC_CONST(0.20936190601047416),
180 FRAC_CONST(0.21086164414708486),
181 FRAC_CONST(0.21236088610587842),
182 FRAC_CONST(0.21385962835899375),
183 FRAC_CONST(0.21535786737974555),
184 FRAC_CONST(0.21685559964263262),
185 FRAC_CONST(0.21835282162334632),
186 FRAC_CONST(0.2198495297987787),
187 FRAC_CONST(0.22134572064703081),
188 FRAC_CONST(0.22284139064742112),
189 FRAC_CONST(0.2243365362804936),
190 FRAC_CONST(0.22583115402802617),
191 FRAC_CONST(0.22732524037303886),
192 FRAC_CONST(0.22881879179980222),
193 FRAC_CONST(0.23031180479384544),
194 FRAC_CONST(0.23180427584196478),
195 FRAC_CONST(0.23329620143223159),
196 FRAC_CONST(0.23478757805400097),
197 FRAC_CONST(0.23627840219791957),
198 FRAC_CONST(0.23776867035593419),
199 FRAC_CONST(0.23925837902129998),
200 FRAC_CONST(0.24074752468858843),
201 FRAC_CONST(0.24223610385369601),
202 FRAC_CONST(0.24372411301385216),
203 FRAC_CONST(0.24521154866762754),
204 FRAC_CONST(0.24669840731494241),
205 FRAC_CONST(0.24818468545707478),
206 FRAC_CONST(0.24967037959666857),
207 FRAC_CONST(0.25115548623774192),
208 FRAC_CONST(0.25264000188569552),
209 FRAC_CONST(0.25412392304732062),
210 FRAC_CONST(0.25560724623080738),
211 FRAC_CONST(0.25708996794575312),
212 FRAC_CONST(0.25857208470317034),
213 FRAC_CONST(0.26005359301549519),
214 FRAC_CONST(0.26153448939659552),
215 FRAC_CONST(0.263014770361779),
216 FRAC_CONST(0.26449443242780163),
217 FRAC_CONST(0.26597347211287559),
218 FRAC_CONST(0.26745188593667762),
219 FRAC_CONST(0.26892967042035726),
220 FRAC_CONST(0.27040682208654482),
221 FRAC_CONST(0.27188333745935972),
222 FRAC_CONST(0.27335921306441868),
223 FRAC_CONST(0.27483444542884394),
224 FRAC_CONST(0.27630903108127108),
225 FRAC_CONST(0.27778296655185769),
226 FRAC_CONST(0.27925624837229118),
227 FRAC_CONST(0.28072887307579719),
228 FRAC_CONST(0.28220083719714756),
229 FRAC_CONST(0.28367213727266843),
230 FRAC_CONST(0.28514276984024867),
231 FRAC_CONST(0.28661273143934779),
232 FRAC_CONST(0.28808201861100413),
233 FRAC_CONST(0.28955062789784303),
234 FRAC_CONST(0.29101855584408509),
235 FRAC_CONST(0.29248579899555388),
236 FRAC_CONST(0.29395235389968466),
237 FRAC_CONST(0.29541821710553201),
238 FRAC_CONST(0.29688338516377827),
239 FRAC_CONST(0.2983478546267414),
240 FRAC_CONST(0.29981162204838335),
241 FRAC_CONST(0.30127468398431795),
242 FRAC_CONST(0.30273703699181914),
243 FRAC_CONST(0.30419867762982911),
244 FRAC_CONST(0.30565960245896612),
245 FRAC_CONST(0.3071198080415331),
246 FRAC_CONST(0.30857929094152509),
247 FRAC_CONST(0.31003804772463789),
248 FRAC_CONST(0.31149607495827591),
249 FRAC_CONST(0.3129533692115602),
250 FRAC_CONST(0.31440992705533666),
251 FRAC_CONST(0.31586574506218396),
252 FRAC_CONST(0.31732081980642174),
253 FRAC_CONST(0.31877514786411848),
254 FRAC_CONST(0.32022872581309986),
255 FRAC_CONST(0.32168155023295658),
256 FRAC_CONST(0.32313361770505233),
257 FRAC_CONST(0.32458492481253215),
258 FRAC_CONST(0.32603546814033024),
259 FRAC_CONST(0.327485244275178),
260 FRAC_CONST(0.3289342498056122),
261 FRAC_CONST(0.33038248132198278),
262 FRAC_CONST(0.33182993541646111),
263 FRAC_CONST(0.33327660868304793),
264 FRAC_CONST(0.33472249771758122),
265 FRAC_CONST(0.33616759911774452),
266 FRAC_CONST(0.33761190948307462),
267 FRAC_CONST(0.33905542541496964),
268 FRAC_CONST(0.34049814351669716),
269 FRAC_CONST(0.34194006039340219),
270 FRAC_CONST(0.34338117265211504),
271 FRAC_CONST(0.34482147690175929),
272 FRAC_CONST(0.34626096975316001),
273 FRAC_CONST(0.34769964781905138),
274 FRAC_CONST(0.34913750771408497),
275 FRAC_CONST(0.35057454605483751),
276 FRAC_CONST(0.35201075945981908),
277 FRAC_CONST(0.35344614454948081),
278 FRAC_CONST(0.35488069794622279),
279 FRAC_CONST(0.35631441627440241),
280 FRAC_CONST(0.3577472961603419),
281 FRAC_CONST(0.3591793342323365),
282 FRAC_CONST(0.36061052712066227),
283 FRAC_CONST(0.36204087145758418),
284 FRAC_CONST(0.36347036387736376),
285 FRAC_CONST(0.36489900101626732),
286 FRAC_CONST(0.36632677951257359),
287 FRAC_CONST(0.36775369600658198),
288 FRAC_CONST(0.36917974714062002),
289 FRAC_CONST(0.37060492955905167),
290 FRAC_CONST(0.37202923990828501),
291 FRAC_CONST(0.3734526748367803),
292 FRAC_CONST(0.37487523099505754),
293 FRAC_CONST(0.37629690503570479),
294 FRAC_CONST(0.37771769361338564),
295 FRAC_CONST(0.37913759338484732),
296 FRAC_CONST(0.38055660100892852),
297 FRAC_CONST(0.38197471314656722),
298 FRAC_CONST(0.38339192646080866),
299 FRAC_CONST(0.38480823761681288),
300 FRAC_CONST(0.38622364328186298),
301 FRAC_CONST(0.38763814012537273),
302 FRAC_CONST(0.38905172481889438),
303 FRAC_CONST(0.39046439403612659),
304 FRAC_CONST(0.39187614445292235),
305 FRAC_CONST(0.3932869727472964),
306 FRAC_CONST(0.39469687559943356),
307 FRAC_CONST(0.39610584969169627),
308 FRAC_CONST(0.39751389170863233),
309 FRAC_CONST(0.39892099833698291),
310 FRAC_CONST(0.40032716626569009),
311 FRAC_CONST(0.40173239218590501),
312 FRAC_CONST(0.4031366727909953),
313 FRAC_CONST(0.404540004776553),
314 FRAC_CONST(0.40594238484040251),
315 FRAC_CONST(0.40734380968260797),
316 FRAC_CONST(0.40874427600548136),
317 FRAC_CONST(0.41014378051359024),
318 FRAC_CONST(0.41154231991376522),
319 FRAC_CONST(0.41293989091510808),
320 FRAC_CONST(0.4143364902289991),
321 FRAC_CONST(0.41573211456910536),
322 FRAC_CONST(0.41712676065138787),
323 FRAC_CONST(0.4185204251941097),
324 FRAC_CONST(0.41991310491784362),
325 FRAC_CONST(0.42130479654547964),
326 FRAC_CONST(0.42269549680223295),
327 FRAC_CONST(0.42408520241565156),
328 FRAC_CONST(0.4254739101156238),
329 FRAC_CONST(0.42686161663438643),
330 FRAC_CONST(0.42824831870653196),
331 FRAC_CONST(0.42963401306901638),
332 FRAC_CONST(0.43101869646116703),
333 FRAC_CONST(0.43240236562469014),
334 FRAC_CONST(0.43378501730367852),
335 FRAC_CONST(0.43516664824461926),
336 FRAC_CONST(0.4365472551964012),
337 FRAC_CONST(0.43792683491032286),
338 FRAC_CONST(0.43930538414009995),
339 FRAC_CONST(0.4406828996418729),
340 FRAC_CONST(0.4420593781742147),
341 FRAC_CONST(0.44343481649813848),
342 FRAC_CONST(0.44480921137710488),
343 FRAC_CONST(0.44618255957703007),
344 FRAC_CONST(0.44755485786629301),
345 FRAC_CONST(0.44892610301574326),
346 FRAC_CONST(0.45029629179870861),
347 FRAC_CONST(0.45166542099100249),
348 FRAC_CONST(0.45303348737093158),
349 FRAC_CONST(0.45440048771930358),
350 FRAC_CONST(0.45576641881943464),
351 FRAC_CONST(0.45713127745715698),
352 FRAC_CONST(0.45849506042082627),
353 FRAC_CONST(0.45985776450132954),
354 FRAC_CONST(0.46121938649209238),
355 FRAC_CONST(0.46257992318908681),
356 FRAC_CONST(0.46393937139083852),
357 FRAC_CONST(0.4652977278984346),
358 FRAC_CONST(0.46665498951553092),
359 FRAC_CONST(0.46801115304835983),
360 FRAC_CONST(0.46936621530573752),
361 FRAC_CONST(0.4707201730990716),
362 FRAC_CONST(0.47207302324236866),
363 FRAC_CONST(0.47342476255224153),
364 FRAC_CONST(0.47477538784791712),
365 FRAC_CONST(0.47612489595124358),
366 FRAC_CONST(0.47747328368669806),
367 FRAC_CONST(0.47882054788139389),
368 FRAC_CONST(0.48016668536508839),
369 FRAC_CONST(0.48151169297018986),
370 FRAC_CONST(0.48285556753176567),
371 FRAC_CONST(0.48419830588754903),
372 FRAC_CONST(0.48553990487794696),
373 FRAC_CONST(0.48688036134604734),
374 FRAC_CONST(0.48821967213762679),
375 FRAC_CONST(0.48955783410115744),
376 FRAC_CONST(0.49089484408781509),
377 FRAC_CONST(0.49223069895148602),
378 FRAC_CONST(0.49356539554877477),
379 FRAC_CONST(0.49489893073901126),
380 FRAC_CONST(0.49623130138425825),
381 FRAC_CONST(0.49756250434931915),
382 FRAC_CONST(0.49889253650174459),
383 FRAC_CONST(0.50022139471184068),
384 FRAC_CONST(0.50154907585267539),
385 FRAC_CONST(0.50287557680008699),
386 FRAC_CONST(0.50420089443269034),
387 FRAC_CONST(0.50552502563188539),
388 FRAC_CONST(0.50684796728186321),
389 FRAC_CONST(0.5081697162696146),
390 FRAC_CONST(0.50949026948493636),
391 FRAC_CONST(0.51080962382043904),
392 FRAC_CONST(0.51212777617155469),
393 FRAC_CONST(0.51344472343654346),
394 FRAC_CONST(0.5147604625165012),
395 FRAC_CONST(0.51607499031536663),
396 FRAC_CONST(0.51738830373992906),
397 FRAC_CONST(0.51870039969983495),
398 FRAC_CONST(0.52001127510759604),
399 FRAC_CONST(0.52132092687859566),
400 FRAC_CONST(0.52262935193109661),
401 FRAC_CONST(0.5239365471862486),
402 FRAC_CONST(0.52524250956809471),
403 FRAC_CONST(0.52654723600357944),
404 FRAC_CONST(0.52785072342255523),
405 FRAC_CONST(0.52915296875779061),
406 FRAC_CONST(0.53045396894497632),
407 FRAC_CONST(0.53175372092273332),
408 FRAC_CONST(0.53305222163261945),
409 FRAC_CONST(0.53434946801913752),
410 FRAC_CONST(0.53564545702974109),
411 FRAC_CONST(0.53694018561484291),
412 FRAC_CONST(0.5382336507278217),
413 FRAC_CONST(0.53952584932502889),
414 FRAC_CONST(0.54081677836579667),
415 FRAC_CONST(0.54210643481244392),
416 FRAC_CONST(0.5433948156302848),
417 FRAC_CONST(0.54468191778763453),
418 FRAC_CONST(0.54596773825581757),
419 FRAC_CONST(0.54725227400917409),
420 FRAC_CONST(0.54853552202506739),
421 FRAC_CONST(0.54981747928389091),
422 FRAC_CONST(0.55109814276907543),
423 FRAC_CONST(0.55237750946709607),
424 FRAC_CONST(0.55365557636747931),
425 FRAC_CONST(0.55493234046281037),
426 FRAC_CONST(0.55620779874873993),
427 FRAC_CONST(0.55748194822399155),
428 FRAC_CONST(0.55875478589036831),
429 FRAC_CONST(0.56002630875276038),
430 FRAC_CONST(0.56129651381915147),
431 FRAC_CONST(0.56256539810062656),
432 FRAC_CONST(0.56383295861137817),
433 FRAC_CONST(0.56509919236871398),
434 FRAC_CONST(0.56636409639306384),
435 FRAC_CONST(0.56762766770798623),
436 FRAC_CONST(0.56888990334017586),
437 FRAC_CONST(0.5701508003194703),
438 FRAC_CONST(0.57141035567885723),
439 FRAC_CONST(0.57266856645448116),
440 FRAC_CONST(0.57392542968565075),
441 FRAC_CONST(0.57518094241484508),
442 FRAC_CONST(0.57643510168772183),
443 FRAC_CONST(0.5776879045531228),
444 FRAC_CONST(0.57893934806308178),
445 FRAC_CONST(0.58018942927283168),
446 FRAC_CONST(0.58143814524081017),
447 FRAC_CONST(0.58268549302866846),
448 FRAC_CONST(0.58393146970127618),
449 FRAC_CONST(0.58517607232673041),
450 FRAC_CONST(0.5864192979763605),
451 FRAC_CONST(0.58766114372473666),
452 FRAC_CONST(0.58890160664967572),
453 FRAC_CONST(0.59014068383224882),
454 FRAC_CONST(0.59137837235678758),
455 FRAC_CONST(0.59261466931089113),
456 FRAC_CONST(0.59384957178543363),
457 FRAC_CONST(0.59508307687456996),
458 FRAC_CONST(0.59631518167574371),
459 FRAC_CONST(0.59754588328969316),
460 FRAC_CONST(0.59877517882045872),
461 FRAC_CONST(0.60000306537538894),
462 FRAC_CONST(0.6012295400651485),
463 FRAC_CONST(0.60245460000372375),
464 FRAC_CONST(0.60367824230843037),
465 FRAC_CONST(0.60490046409991982),
466 FRAC_CONST(0.60612126250218612),
467 FRAC_CONST(0.60734063464257293),
468 FRAC_CONST(0.60855857765177945),
469 FRAC_CONST(0.60977508866386843),
470 FRAC_CONST(0.61099016481627166),
471 FRAC_CONST(0.61220380324979795),
472 FRAC_CONST(0.61341600110863859),
473 FRAC_CONST(0.61462675554037505),
474 FRAC_CONST(0.61583606369598509),
475 FRAC_CONST(0.61704392272984976),
476 FRAC_CONST(0.61825032979976025),
477 FRAC_CONST(0.61945528206692402),
478 FRAC_CONST(0.62065877669597214),
479 FRAC_CONST(0.62186081085496536),
480 FRAC_CONST(0.62306138171540126),
481 FRAC_CONST(0.62426048645222065),
482 FRAC_CONST(0.62545812224381436),
483 FRAC_CONST(0.62665428627202935),
484 FRAC_CONST(0.62784897572217646),
485 FRAC_CONST(0.629042187783036),
486 FRAC_CONST(0.63023391964686437),
487 FRAC_CONST(0.63142416850940186),
488 FRAC_CONST(0.63261293156987741),
489 FRAC_CONST(0.63380020603101728),
490 FRAC_CONST(0.63498598909904946),
491 FRAC_CONST(0.63617027798371217),
492 FRAC_CONST(0.63735306989825913),
493 FRAC_CONST(0.63853436205946679),
494 FRAC_CONST(0.63971415168764045),
495 FRAC_CONST(0.64089243600662138),
496 FRAC_CONST(0.64206921224379254),
497 FRAC_CONST(0.64324447763008585),
498 FRAC_CONST(0.64441822939998838),
499 FRAC_CONST(0.64559046479154869),
500 FRAC_CONST(0.64676118104638392),
501 FRAC_CONST(0.64793037540968534),
502 FRAC_CONST(0.64909804513022595),
503 FRAC_CONST(0.65026418746036585),
504 FRAC_CONST(0.65142879965605982),
505 FRAC_CONST(0.65259187897686244),
506 FRAC_CONST(0.65375342268593606),
507 FRAC_CONST(0.65491342805005603),
508 FRAC_CONST(0.6560718923396176),
509 FRAC_CONST(0.65722881282864254),
510 FRAC_CONST(0.65838418679478505),
511 FRAC_CONST(0.65953801151933866),
512 FRAC_CONST(0.6606902842872423),
513 FRAC_CONST(0.66184100238708687),
514 FRAC_CONST(0.66299016311112147),
515 FRAC_CONST(0.66413776375526001),
516 FRAC_CONST(0.66528380161908718),
517 FRAC_CONST(0.66642827400586524),
518 FRAC_CONST(0.66757117822254031),
519 FRAC_CONST(0.66871251157974798),
520 FRAC_CONST(0.66985227139182102),
521 FRAC_CONST(0.67099045497679422),
522 FRAC_CONST(0.67212705965641173),
523 FRAC_CONST(0.67326208275613297),
524 FRAC_CONST(0.67439552160513905),
525 FRAC_CONST(0.67552737353633852),
526 FRAC_CONST(0.67665763588637495),
527 FRAC_CONST(0.6777863059956315),
528 FRAC_CONST(0.67891338120823841),
529 FRAC_CONST(0.68003885887207893),
530 FRAC_CONST(0.68116273633879543),
531 FRAC_CONST(0.68228501096379557),
532 FRAC_CONST(0.68340568010625868),
533 FRAC_CONST(0.6845247411291423),
534 FRAC_CONST(0.68564219139918747),
535 FRAC_CONST(0.68675802828692589),
536 FRAC_CONST(0.68787224916668555),
537 FRAC_CONST(0.68898485141659704),
538 FRAC_CONST(0.69009583241859995),
539 FRAC_CONST(0.69120518955844845),
540 FRAC_CONST(0.69231292022571822),
541 FRAC_CONST(0.69341902181381176),
542 FRAC_CONST(0.69452349171996552),
543 FRAC_CONST(0.69562632734525487),
544 FRAC_CONST(0.6967275260946012),
545 FRAC_CONST(0.69782708537677729),
546 FRAC_CONST(0.69892500260441415),
547 FRAC_CONST(0.70002127519400625),
548 FRAC_CONST(0.70111590056591866),
549 FRAC_CONST(0.70220887614439187),
550 FRAC_CONST(0.70330019935754873),
551 FRAC_CONST(0.70438986763740041),
552 FRAC_CONST(0.7054778784198521),
553 FRAC_CONST(0.70656422914470951),
554 FRAC_CONST(0.70764891725568435),
555 FRAC_CONST(0.70873194020040065),
556 FRAC_CONST(0.70981329543040084),
557 FRAC_CONST(0.71089298040115168),
558 FRAC_CONST(0.71197099257204999),
559 FRAC_CONST(0.71304732940642923),
560 FRAC_CONST(0.71412198837156471),
561 FRAC_CONST(0.71519496693868001),
562 FRAC_CONST(0.71626626258295312),
563 FRAC_CONST(0.71733587278352173),
564 FRAC_CONST(0.71840379502348972),
565 FRAC_CONST(0.71947002678993299),
566 FRAC_CONST(0.72053456557390527),
567 FRAC_CONST(0.72159740887044366),
568 FRAC_CONST(0.72265855417857561),
569 FRAC_CONST(0.72371799900132339),
570 FRAC_CONST(0.72477574084571128),
571 FRAC_CONST(0.72583177722277037),
572 FRAC_CONST(0.72688610564754497),
573 FRAC_CONST(0.72793872363909862),
574 FRAC_CONST(0.72898962872051931),
575 FRAC_CONST(0.73003881841892615),
576 FRAC_CONST(0.73108629026547423),
577 FRAC_CONST(0.73213204179536129),
578 FRAC_CONST(0.73317607054783274),
579 FRAC_CONST(0.73421837406618817),
580 FRAC_CONST(0.73525894989778673),
581 FRAC_CONST(0.73629779559405306),
582 FRAC_CONST(0.73733490871048279),
583 FRAC_CONST(0.73837028680664851),
584 FRAC_CONST(0.73940392744620576),
585 FRAC_CONST(0.74043582819689802),
586 FRAC_CONST(0.74146598663056329),
587 FRAC_CONST(0.74249440032313918),
588 FRAC_CONST(0.74352106685466912),
589 FRAC_CONST(0.74454598380930725),
590 FRAC_CONST(0.74556914877532543),
591 FRAC_CONST(0.74659055934511731),
592 FRAC_CONST(0.74761021311520515),
593 FRAC_CONST(0.74862810768624533),
594 FRAC_CONST(0.74964424066303348),
595 FRAC_CONST(0.75065860965451059),
596 FRAC_CONST(0.75167121227376843),
597 FRAC_CONST(0.75268204613805523),
598 FRAC_CONST(0.75369110886878121),
599 FRAC_CONST(0.75469839809152439),
600 FRAC_CONST(0.75570391143603588),
601 FRAC_CONST(0.75670764653624567),
602 FRAC_CONST(0.75770960103026808),
603 FRAC_CONST(0.75870977256040739),
604 FRAC_CONST(0.75970815877316344),
605 FRAC_CONST(0.76070475731923692),
606 FRAC_CONST(0.76169956585353527),
607 FRAC_CONST(0.76269258203517787),
608 FRAC_CONST(0.76368380352750187),
609 FRAC_CONST(0.76467322799806714),
610 FRAC_CONST(0.76566085311866239),
611 FRAC_CONST(0.76664667656531038),
612 FRAC_CONST(0.76763069601827327),
613 FRAC_CONST(0.76861290916205827),
614 FRAC_CONST(0.76959331368542294),
615 FRAC_CONST(0.7705719072813807),
616 FRAC_CONST(0.7715486876472063),
617 FRAC_CONST(0.77252365248444133),
618 FRAC_CONST(0.77349679949889905),
619 FRAC_CONST(0.77446812640067086),
620 FRAC_CONST(0.77543763090413043),
621 FRAC_CONST(0.77640531072794039),
622 FRAC_CONST(0.7773711635950562),
623 FRAC_CONST(0.77833518723273309),
624 FRAC_CONST(0.7792973793725303),
625 FRAC_CONST(0.78025773775031659),
626 FRAC_CONST(0.78121626010627609),
627 FRAC_CONST(0.7821729441849129),
628 FRAC_CONST(0.78312778773505731),
629 FRAC_CONST(0.78408078850986995),
630 FRAC_CONST(0.78503194426684808),
631 FRAC_CONST(0.78598125276783015),
632 FRAC_CONST(0.7869287117790017),
633 FRAC_CONST(0.78787431907090011),
634 FRAC_CONST(0.78881807241842017),
635 FRAC_CONST(0.78975996960081907),
636 FRAC_CONST(0.79070000840172161),
637 FRAC_CONST(0.79163818660912577),
638 FRAC_CONST(0.79257450201540758),
639 FRAC_CONST(0.79350895241732666),
640 FRAC_CONST(0.79444153561603059),
641 FRAC_CONST(0.79537224941706119),
642 FRAC_CONST(0.79630109163035911),
643 FRAC_CONST(0.7972280600702687),
644 FRAC_CONST(0.79815315255554375),
645 FRAC_CONST(0.79907636690935235),
646 FRAC_CONST(0.79999770095928191),
647 FRAC_CONST(0.8009171525373443),
648 FRAC_CONST(0.80183471947998131),
649 FRAC_CONST(0.80275039962806916),
650 FRAC_CONST(0.80366419082692409),
651 FRAC_CONST(0.804576090926307),
652 FRAC_CONST(0.80548609778042912),
653 FRAC_CONST(0.80639420924795624),
654 FRAC_CONST(0.80730042319201445),
655 FRAC_CONST(0.80820473748019472),
656 FRAC_CONST(0.80910714998455813),
657 FRAC_CONST(0.81000765858164114),
658 FRAC_CONST(0.81090626115245967),
659 FRAC_CONST(0.81180295558251536),
660 FRAC_CONST(0.81269773976179949),
661 FRAC_CONST(0.81359061158479851),
662 FRAC_CONST(0.81448156895049861),
663 FRAC_CONST(0.81537060976239129),
664 FRAC_CONST(0.81625773192847739),
665 FRAC_CONST(0.81714293336127297),
666 FRAC_CONST(0.81802621197781344),
667 FRAC_CONST(0.81890756569965895),
668 FRAC_CONST(0.81978699245289899),
669 FRAC_CONST(0.82066449016815746),
670 FRAC_CONST(0.82154005678059761),
671 FRAC_CONST(0.82241369022992639),
672 FRAC_CONST(0.82328538846040011),
673 FRAC_CONST(0.82415514942082857),
674 FRAC_CONST(0.82502297106458022),
675 FRAC_CONST(0.82588885134958678),
676 FRAC_CONST(0.82675278823834852),
677 FRAC_CONST(0.8276147796979384),
678 FRAC_CONST(0.82847482370000713),
679 FRAC_CONST(0.82933291822078825),
680 FRAC_CONST(0.83018906124110237),
681 FRAC_CONST(0.83104325074636232),
682 FRAC_CONST(0.83189548472657759),
683 FRAC_CONST(0.83274576117635946),
684 FRAC_CONST(0.83359407809492514),
685 FRAC_CONST(0.83444043348610319),
686 FRAC_CONST(0.83528482535833737),
687 FRAC_CONST(0.83612725172469216),
688 FRAC_CONST(0.83696771060285702),
689 FRAC_CONST(0.83780620001515094),
690 FRAC_CONST(0.8386427179885273),
691 FRAC_CONST(0.83947726255457855),
692 FRAC_CONST(0.84030983174954077),
693 FRAC_CONST(0.84114042361429808),
694 FRAC_CONST(0.84196903619438768),
695 FRAC_CONST(0.84279566754000412),
696 FRAC_CONST(0.84362031570600404),
697 FRAC_CONST(0.84444297875191066),
698 FRAC_CONST(0.84526365474191822),
699 FRAC_CONST(0.84608234174489694),
700 FRAC_CONST(0.84689903783439735),
701 FRAC_CONST(0.84771374108865427),
702 FRAC_CONST(0.84852644959059265),
703 FRAC_CONST(0.84933716142783067),
704 FRAC_CONST(0.85014587469268521),
705 FRAC_CONST(0.85095258748217573),
706 FRAC_CONST(0.85175729789802912),
707 FRAC_CONST(0.85256000404668397),
708 FRAC_CONST(0.85336070403929543),
709 FRAC_CONST(0.85415939599173873),
710 FRAC_CONST(0.85495607802461482),
711 FRAC_CONST(0.85575074826325392),
712 FRAC_CONST(0.85654340483771996),
713 FRAC_CONST(0.85733404588281559),
714 FRAC_CONST(0.85812266953808602),
715 FRAC_CONST(0.8589092739478239),
716 FRAC_CONST(0.85969385726107261),
717 FRAC_CONST(0.86047641763163207),
718 FRAC_CONST(0.86125695321806206),
719 FRAC_CONST(0.86203546218368721),
720 FRAC_CONST(0.86281194269660033),
721 FRAC_CONST(0.86358639292966799),
722 FRAC_CONST(0.86435881106053403),
723 FRAC_CONST(0.86512919527162369),
724 FRAC_CONST(0.86589754375014882),
725 FRAC_CONST(0.86666385468811102),
726 FRAC_CONST(0.86742812628230692),
727 FRAC_CONST(0.86819035673433131),
728 FRAC_CONST(0.86895054425058238),
729 FRAC_CONST(0.86970868704226556),
730 FRAC_CONST(0.87046478332539767),
731 FRAC_CONST(0.8712188313208109),
732 FRAC_CONST(0.8719708292541577),
733 FRAC_CONST(0.8727207753559143),
734 FRAC_CONST(0.87346866786138488),
735 FRAC_CONST(0.8742145050107063),
736 FRAC_CONST(0.87495828504885154),
737 FRAC_CONST(0.8757000062256346),
738 FRAC_CONST(0.87643966679571361),
739 FRAC_CONST(0.87717726501859594),
740 FRAC_CONST(0.87791279915864173),
741 FRAC_CONST(0.87864626748506813),
742 FRAC_CONST(0.87937766827195318),
743 FRAC_CONST(0.88010699979824036),
744 FRAC_CONST(0.88083426034774204),
745 FRAC_CONST(0.88155944820914378),
746 FRAC_CONST(0.8822825616760086),
747 FRAC_CONST(0.88300359904678072),
748 FRAC_CONST(0.88372255862478966),
749 FRAC_CONST(0.8844394387182537),
750 FRAC_CONST(0.88515423764028511),
751 FRAC_CONST(0.88586695370889279),
752 FRAC_CONST(0.88657758524698704),
753 FRAC_CONST(0.88728613058238315),
754 FRAC_CONST(0.88799258804780556),
755 FRAC_CONST(0.88869695598089171),
756 FRAC_CONST(0.88939923272419552),
757 FRAC_CONST(0.89009941662519221),
758 FRAC_CONST(0.89079750603628149),
759 FRAC_CONST(0.89149349931479138),
760 FRAC_CONST(0.89218739482298248),
761 FRAC_CONST(0.89287919092805168),
762 FRAC_CONST(0.89356888600213602),
763 FRAC_CONST(0.89425647842231604),
764 FRAC_CONST(0.89494196657062075),
765 FRAC_CONST(0.89562534883403),
766 FRAC_CONST(0.89630662360447966),
767 FRAC_CONST(0.89698578927886397),
768 FRAC_CONST(0.89766284425904075),
769 FRAC_CONST(0.89833778695183419),
770 FRAC_CONST(0.89901061576903907),
771 FRAC_CONST(0.89968132912742393),
772 FRAC_CONST(0.9003499254487356),
773 FRAC_CONST(0.90101640315970233),
774 FRAC_CONST(0.90168076069203773),
775 FRAC_CONST(0.9023429964824442),
776 FRAC_CONST(0.90300310897261704),
777 FRAC_CONST(0.90366109660924798),
778 FRAC_CONST(0.90431695784402832),
779 FRAC_CONST(0.90497069113365325),
780 FRAC_CONST(0.90562229493982516),
781 FRAC_CONST(0.90627176772925766),
782 FRAC_CONST(0.90691910797367803),
783 FRAC_CONST(0.90756431414983252),
784 FRAC_CONST(0.9082073847394887),
785 FRAC_CONST(0.90884831822943912),
786 FRAC_CONST(0.90948711311150543),
787 FRAC_CONST(0.91012376788254157),
788 FRAC_CONST(0.91075828104443757),
789 FRAC_CONST(0.91139065110412232),
790 FRAC_CONST(0.91202087657356823),
791 FRAC_CONST(0.9126489559697939),
792 FRAC_CONST(0.91327488781486776),
793 FRAC_CONST(0.91389867063591168),
794 FRAC_CONST(0.91452030296510445),
795 FRAC_CONST(0.91513978333968526),
796 FRAC_CONST(0.91575711030195672),
797 FRAC_CONST(0.91637228239928914),
798 FRAC_CONST(0.91698529818412289),
799 FRAC_CONST(0.91759615621397295),
800 FRAC_CONST(0.9182048550514309),
801 FRAC_CONST(0.91881139326416994),
802 FRAC_CONST(0.91941576942494696),
803 FRAC_CONST(0.92001798211160657),
804 FRAC_CONST(0.92061802990708386),
805 FRAC_CONST(0.92121591139940873),
806 FRAC_CONST(0.92181162518170812),
807 FRAC_CONST(0.92240516985220988),
808 FRAC_CONST(0.92299654401424625),
809 FRAC_CONST(0.92358574627625656),
810 FRAC_CONST(0.9241727752517912),
811 FRAC_CONST(0.92475762955951391),
812 FRAC_CONST(0.9253403078232062),
813 FRAC_CONST(0.92592080867176996),
814 FRAC_CONST(0.92649913073923051),
815 FRAC_CONST(0.9270752726647401),
816 FRAC_CONST(0.92764923309258118),
817 FRAC_CONST(0.92822101067216944),
818 FRAC_CONST(0.92879060405805702),
819 FRAC_CONST(0.9293580119099355),
820 FRAC_CONST(0.92992323289263956),
821 FRAC_CONST(0.93048626567614978),
822 FRAC_CONST(0.93104710893559517),
823 FRAC_CONST(0.93160576135125783),
824 FRAC_CONST(0.93216222160857432),
825 FRAC_CONST(0.93271648839814025),
826 FRAC_CONST(0.93326856041571205),
827 FRAC_CONST(0.93381843636221096),
828 FRAC_CONST(0.9343661149437259),
829 FRAC_CONST(0.93491159487151609),
830 FRAC_CONST(0.93545487486201462),
831 FRAC_CONST(0.9359959536368313),
832 FRAC_CONST(0.9365348299227555),
833 FRAC_CONST(0.93707150245175919),
834 FRAC_CONST(0.93760596996099999),
835 FRAC_CONST(0.93813823119282436),
836 FRAC_CONST(0.93866828489477017),
837 FRAC_CONST(0.9391961298195699),
838 FRAC_CONST(0.93972176472515334),
839 FRAC_CONST(0.94024518837465088),
840 FRAC_CONST(0.94076639953639607),
841 FRAC_CONST(0.94128539698392866),
842 FRAC_CONST(0.94180217949599765),
843 FRAC_CONST(0.94231674585656378),
844 FRAC_CONST(0.94282909485480271),
845 FRAC_CONST(0.94333922528510772),
846 FRAC_CONST(0.94384713594709269),
847 FRAC_CONST(0.94435282564559475),
848 FRAC_CONST(0.94485629319067721),
849 FRAC_CONST(0.94535753739763229),
850 FRAC_CONST(0.94585655708698391),
851 FRAC_CONST(0.94635335108449059),
852 FRAC_CONST(0.946847918221148),
853 FRAC_CONST(0.94734025733319194),
854 FRAC_CONST(0.94783036726210101),
855 FRAC_CONST(0.94831824685459909),
856 FRAC_CONST(0.94880389496265838),
857 FRAC_CONST(0.94928731044350201),
858 FRAC_CONST(0.94976849215960668),
859 FRAC_CONST(0.95024743897870523),
860 FRAC_CONST(0.95072414977378961),
861 FRAC_CONST(0.95119862342311323),
862 FRAC_CONST(0.95167085881019386),
863 FRAC_CONST(0.95214085482381583),
864 FRAC_CONST(0.95260861035803324),
865 FRAC_CONST(0.9530741243121722),
866 FRAC_CONST(0.95353739559083328),
867 FRAC_CONST(0.95399842310389449),
868 FRAC_CONST(0.95445720576651349),
869 FRAC_CONST(0.95491374249913052),
870 FRAC_CONST(0.95536803222747024),
871 FRAC_CONST(0.95582007388254542),
872 FRAC_CONST(0.95626986640065814),
873 FRAC_CONST(0.95671740872340305),
874 FRAC_CONST(0.9571626997976701),
875 FRAC_CONST(0.95760573857564624),
876 FRAC_CONST(0.9580465240148186),
877 FRAC_CONST(0.9584850550779761),
878 FRAC_CONST(0.95892133073321306),
879 FRAC_CONST(0.95935534995393079),
880 FRAC_CONST(0.9597871117188399),
881 FRAC_CONST(0.96021661501196343),
882 FRAC_CONST(0.96064385882263847),
883 FRAC_CONST(0.96106884214551935),
884 FRAC_CONST(0.961491563980579),
885 FRAC_CONST(0.9619120233331121),
886 FRAC_CONST(0.9623302192137374),
887 FRAC_CONST(0.96274615063839941),
888 FRAC_CONST(0.96315981662837136),
889 FRAC_CONST(0.96357121621025721),
890 FRAC_CONST(0.96398034841599411),
891 FRAC_CONST(0.96438721228285429),
892 FRAC_CONST(0.9647918068534479),
893 FRAC_CONST(0.96519413117572472),
894 FRAC_CONST(0.96559418430297683),
895 FRAC_CONST(0.96599196529384057),
896 FRAC_CONST(0.96638747321229879),
897 FRAC_CONST(0.96678070712768327),
898 FRAC_CONST(0.96717166611467664),
899 FRAC_CONST(0.96756034925331436),
900 FRAC_CONST(0.9679467556289878),
901 FRAC_CONST(0.9683308843324453),
902 FRAC_CONST(0.96871273445979478),
903 FRAC_CONST(0.9690923051125061),
904 FRAC_CONST(0.96946959539741295),
905 FRAC_CONST(0.96984460442671483),
906 FRAC_CONST(0.97021733131797916),
907 FRAC_CONST(0.97058777519414363),
908 FRAC_CONST(0.97095593518351797),
909 FRAC_CONST(0.97132181041978616),
910 FRAC_CONST(0.97168540004200854),
911 FRAC_CONST(0.9720467031946235),
912 FRAC_CONST(0.97240571902744977),
913 FRAC_CONST(0.97276244669568857),
914 FRAC_CONST(0.97311688535992513),
915 FRAC_CONST(0.97346903418613095),
916 FRAC_CONST(0.9738188923456661),
917 FRAC_CONST(0.97416645901528032),
918 FRAC_CONST(0.97451173337711572),
919 FRAC_CONST(0.97485471461870843),
920 FRAC_CONST(0.97519540193299037),
921 FRAC_CONST(0.97553379451829136),
922 FRAC_CONST(0.97586989157834103),
923 FRAC_CONST(0.97620369232227056),
924 FRAC_CONST(0.97653519596461447),
925 FRAC_CONST(0.97686440172531264),
926 FRAC_CONST(0.97719130882971228),
927 FRAC_CONST(0.97751591650856928),
928 FRAC_CONST(0.97783822399805043),
929 FRAC_CONST(0.97815823053973505),
930 FRAC_CONST(0.97847593538061683),
931 FRAC_CONST(0.97879133777310567),
932 FRAC_CONST(0.97910443697502925),
933 FRAC_CONST(0.97941523224963478),
934 FRAC_CONST(0.97972372286559117),
935 FRAC_CONST(0.98002990809698998),
936 FRAC_CONST(0.98033378722334796),
937 FRAC_CONST(0.98063535952960812),
938 FRAC_CONST(0.98093462430614164),
939 FRAC_CONST(0.98123158084874973),
940 FRAC_CONST(0.98152622845866466),
941 FRAC_CONST(0.9818185664425525),
942 FRAC_CONST(0.98210859411251361),
943 FRAC_CONST(0.98239631078608469),
944 FRAC_CONST(0.98268171578624086),
945 FRAC_CONST(0.98296480844139644),
946 FRAC_CONST(0.98324558808540707),
947 FRAC_CONST(0.98352405405757126),
948 FRAC_CONST(0.98380020570263149),
949 FRAC_CONST(0.98407404237077645),
950 FRAC_CONST(0.9843455634176419),
951 FRAC_CONST(0.9846147682043126),
952 FRAC_CONST(0.9848816560973237),
953 FRAC_CONST(0.98514622646866223),
954 FRAC_CONST(0.98540847869576842),
955 FRAC_CONST(0.98566841216153755),
956 FRAC_CONST(0.98592602625432113),
957 FRAC_CONST(0.98618132036792827),
958 FRAC_CONST(0.98643429390162707),
959 FRAC_CONST(0.98668494626014669),
960 FRAC_CONST(0.98693327685367771),
961 FRAC_CONST(0.98717928509787434),
962 FRAC_CONST(0.98742297041385541),
963 FRAC_CONST(0.98766433222820571),
964 FRAC_CONST(0.98790336997297779),
965 FRAC_CONST(0.98814008308569257),
966 FRAC_CONST(0.98837447100934128),
967 FRAC_CONST(0.98860653319238645),
968 FRAC_CONST(0.98883626908876354),
969 FRAC_CONST(0.98906367815788154),
970 FRAC_CONST(0.98928875986462517),
971 FRAC_CONST(0.98951151367935519),
972 FRAC_CONST(0.98973193907791057),
973 FRAC_CONST(0.98995003554160899),
974 FRAC_CONST(0.9901658025572484),
975 FRAC_CONST(0.99037923961710816),
976 FRAC_CONST(0.99059034621895015),
977 FRAC_CONST(0.99079912186602037),
978 FRAC_CONST(0.99100556606704937),
979 FRAC_CONST(0.99120967833625406),
980 FRAC_CONST(0.99141145819333854),
981 FRAC_CONST(0.99161090516349537),
982 FRAC_CONST(0.99180801877740643),
983 FRAC_CONST(0.99200279857124452),
984 FRAC_CONST(0.99219524408667392),
985 FRAC_CONST(0.99238535487085167),
986 FRAC_CONST(0.99257313047642881),
987 FRAC_CONST(0.99275857046155114),
988 FRAC_CONST(0.99294167438986047),
989 FRAC_CONST(0.99312244183049558),
990 FRAC_CONST(0.99330087235809328),
991 FRAC_CONST(0.99347696555278919),
992 FRAC_CONST(0.99365072100021912),
993 FRAC_CONST(0.99382213829151966),
994 FRAC_CONST(0.99399121702332938),
995 FRAC_CONST(0.99415795679778973),
996 FRAC_CONST(0.99432235722254581),
997 FRAC_CONST(0.9944844179107476),
998 FRAC_CONST(0.99464413848105071),
999 FRAC_CONST(0.99480151855761711),
1000 FRAC_CONST(0.99495655777011638),
1001 FRAC_CONST(0.99510925575372611),
1002 FRAC_CONST(0.99525961214913339),
1003 FRAC_CONST(0.9954076266025349),
1004 FRAC_CONST(0.99555329876563847),
1005 FRAC_CONST(0.99569662829566352),
1006 FRAC_CONST(0.99583761485534161),
1007 FRAC_CONST(0.99597625811291779),
1008 FRAC_CONST(0.99611255774215113),
1009 FRAC_CONST(0.99624651342231552),
1010 FRAC_CONST(0.99637812483820021),
1011 FRAC_CONST(0.99650739168011082),
1012 FRAC_CONST(0.9966343136438699),
1013 FRAC_CONST(0.996758890430818),
1014 FRAC_CONST(0.99688112174781385),
1015 FRAC_CONST(0.99700100730723529),
1016 FRAC_CONST(0.99711854682697998),
1017 FRAC_CONST(0.99723374003046616),
1018 FRAC_CONST(0.99734658664663323),
1019 FRAC_CONST(0.99745708640994191),
1020 FRAC_CONST(0.99756523906037575),
1021 FRAC_CONST(0.997671044343441),
1022 FRAC_CONST(0.99777450201016782),
1023 FRAC_CONST(0.99787561181711015),
1024 FRAC_CONST(0.99797437352634699),
1025 FRAC_CONST(0.99807078690548234),
1026 FRAC_CONST(0.99816485172764624),
1027 FRAC_CONST(0.99825656777149518),
1028 FRAC_CONST(0.99834593482121237),
1029 FRAC_CONST(0.99843295266650844),
1030 FRAC_CONST(0.99851762110262221),
1031 FRAC_CONST(0.99859993993032037),
1032 FRAC_CONST(0.99867990895589909),
1033 FRAC_CONST(0.99875752799118334),
1034 FRAC_CONST(0.99883279685352799),
1035 FRAC_CONST(0.99890571536581829),
1036 FRAC_CONST(0.99897628335646982),
1037 FRAC_CONST(0.99904450065942929),
1038 FRAC_CONST(0.99911036711417489),
1039 FRAC_CONST(0.99917388256571638),
1040 FRAC_CONST(0.99923504686459585),
1041 FRAC_CONST(0.99929385986688779),
1042 FRAC_CONST(0.99935032143419944),
1043 FRAC_CONST(0.9994044314336713),
1044 FRAC_CONST(0.99945618973797734),
1045 FRAC_CONST(0.99950559622532531),
1046 FRAC_CONST(0.99955265077945699),
1047 FRAC_CONST(0.99959735328964838),
1048 FRAC_CONST(0.9996397036507102),
1049 FRAC_CONST(0.99967970176298793),
1050 FRAC_CONST(0.99971734753236219),
1051 FRAC_CONST(0.99975264087024884),
1052 FRAC_CONST(0.99978558169359921),
1053 FRAC_CONST(0.99981616992490041),
1054 FRAC_CONST(0.99984440549217524),
1055 FRAC_CONST(0.99987028832898295),
1056 FRAC_CONST(0.99989381837441849),
1057 FRAC_CONST(0.99991499557311347),
1058 FRAC_CONST(0.999933819875236),
1059 FRAC_CONST(0.99995029123649048),
1060 FRAC_CONST(0.99996440961811828),
1061 FRAC_CONST(0.99997617498689761),
1062 FRAC_CONST(0.9999855873151432),
1063 FRAC_CONST(0.99999264658070719),
1064 FRAC_CONST(0.99999735276697821),
1065 FRAC_CONST(0.99999970586288223)
1066};
1067
1068#ifdef ALLOW_SMALL_FRAMELENGTH
1069ALIGN static const real_t sine_long_960[] =
1070{
1071 FRAC_CONST(0.00081812299560725323),
1072 FRAC_CONST(0.0024543667964602917),
1073 FRAC_CONST(0.0040906040262347889),
1074 FRAC_CONST(0.0057268303042312674),
1075 FRAC_CONST(0.0073630412497795667),
1076 FRAC_CONST(0.0089992324822505774),
1077 FRAC_CONST(0.010635399621067975),
1078 FRAC_CONST(0.012271538285719924),
1079 FRAC_CONST(0.013907644095770845),
1080 FRAC_CONST(0.015543712670873098),
1081 FRAC_CONST(0.017179739630778748),
1082 FRAC_CONST(0.018815720595351273),
1083 FRAC_CONST(0.020451651184577292),
1084 FRAC_CONST(0.022087527018578291),
1085 FRAC_CONST(0.023723343717622358),
1086 FRAC_CONST(0.025359096902135895),
1087 FRAC_CONST(0.02699478219271537),
1088 FRAC_CONST(0.028630395210139003),
1089 FRAC_CONST(0.030265931575378519),
1090 FRAC_CONST(0.031901386909610863),
1091 FRAC_CONST(0.033536756834229922),
1092 FRAC_CONST(0.035172036970858266),
1093 FRAC_CONST(0.036807222941358832),
1094 FRAC_CONST(0.038442310367846677),
1095 FRAC_CONST(0.040077294872700696),
1096 FRAC_CONST(0.041712172078575326),
1097 FRAC_CONST(0.043346937608412288),
1098 FRAC_CONST(0.044981587085452281),
1099 FRAC_CONST(0.046616116133246711),
1100 FRAC_CONST(0.048250520375669431),
1101 FRAC_CONST(0.049884795436928406),
1102 FRAC_CONST(0.051518936941577477),
1103 FRAC_CONST(0.053152940514528055),
1104 FRAC_CONST(0.05478680178106083),
1105 FRAC_CONST(0.056420516366837495),
1106 FRAC_CONST(0.05805407989791244),
1107 FRAC_CONST(0.059687488000744485),
1108 FRAC_CONST(0.061320736302208578),
1109 FRAC_CONST(0.062953820429607482),
1110 FRAC_CONST(0.064586736010683557),
1111 FRAC_CONST(0.066219478673630344),
1112 FRAC_CONST(0.06785204404710439),
1113 FRAC_CONST(0.069484427760236861),
1114 FRAC_CONST(0.071116625442645326),
1115 FRAC_CONST(0.072748632724445372),
1116 FRAC_CONST(0.07438044523626236),
1117 FRAC_CONST(0.076012058609243122),
1118 FRAC_CONST(0.077643468475067631),
1119 FRAC_CONST(0.079274670465960706),
1120 FRAC_CONST(0.080905660214703745),
1121 FRAC_CONST(0.082536433354646319),
1122 FRAC_CONST(0.084166985519717977),
1123 FRAC_CONST(0.085797312344439894),
1124 FRAC_CONST(0.08742740946393647),
1125 FRAC_CONST(0.089057272513947183),
1126 FRAC_CONST(0.090686897130838162),
1127 FRAC_CONST(0.092316278951613845),
1128 FRAC_CONST(0.093945413613928788),
1129 FRAC_CONST(0.095574296756099186),
1130 FRAC_CONST(0.097202924017114667),
1131 FRAC_CONST(0.098831291036649963),
1132 FRAC_CONST(0.10045939345507648),
1133 FRAC_CONST(0.10208722691347409),
1134 FRAC_CONST(0.10371478705364276),
1135 FRAC_CONST(0.10534206951811415),
1136 FRAC_CONST(0.10696906995016341),
1137 FRAC_CONST(0.10859578399382072),
1138 FRAC_CONST(0.11022220729388306),
1139 FRAC_CONST(0.11184833549592579),
1140 FRAC_CONST(0.11347416424631435),
1141 FRAC_CONST(0.11509968919221586),
1142 FRAC_CONST(0.11672490598161089),
1143 FRAC_CONST(0.11834981026330495),
1144 FRAC_CONST(0.11997439768694031),
1145 FRAC_CONST(0.12159866390300751),
1146 FRAC_CONST(0.12322260456285709),
1147 FRAC_CONST(0.12484621531871121),
1148 FRAC_CONST(0.12646949182367517),
1149 FRAC_CONST(0.12809242973174936),
1150 FRAC_CONST(0.12971502469784052),
1151 FRAC_CONST(0.13133727237777362),
1152 FRAC_CONST(0.13295916842830346),
1153 FRAC_CONST(0.13458070850712617),
1154 FRAC_CONST(0.13620188827289101),
1155 FRAC_CONST(0.1378227033852118),
1156 FRAC_CONST(0.13944314950467873),
1157 FRAC_CONST(0.14106322229286994),
1158 FRAC_CONST(0.14268291741236291),
1159 FRAC_CONST(0.14430223052674654),
1160 FRAC_CONST(0.1459211573006321),
1161 FRAC_CONST(0.14753969339966552),
1162 FRAC_CONST(0.14915783449053857),
1163 FRAC_CONST(0.15077557624100058),
1164 FRAC_CONST(0.15239291431987001),
1165 FRAC_CONST(0.1540098443970461),
1166 FRAC_CONST(0.15562636214352044),
1167 FRAC_CONST(0.15724246323138855),
1168 FRAC_CONST(0.15885814333386142),
1169 FRAC_CONST(0.16047339812527725),
1170 FRAC_CONST(0.16208822328111283),
1171 FRAC_CONST(0.16370261447799525),
1172 FRAC_CONST(0.16531656739371339),
1173 FRAC_CONST(0.16693007770722967),
1174 FRAC_CONST(0.16854314109869134),
1175 FRAC_CONST(0.17015575324944232),
1176 FRAC_CONST(0.17176790984203447),
1177 FRAC_CONST(0.17337960656023954),
1178 FRAC_CONST(0.1749908390890603),
1179 FRAC_CONST(0.17660160311474243),
1180 FRAC_CONST(0.17821189432478593),
1181 FRAC_CONST(0.17982170840795647),
1182 FRAC_CONST(0.18143104105429744),
1183 FRAC_CONST(0.18303988795514095),
1184 FRAC_CONST(0.1846482448031197),
1185 FRAC_CONST(0.18625610729217834),
1186 FRAC_CONST(0.1878634711175852),
1187 FRAC_CONST(0.18947033197594348),
1188 FRAC_CONST(0.19107668556520319),
1189 FRAC_CONST(0.19268252758467228),
1190 FRAC_CONST(0.19428785373502844),
1191 FRAC_CONST(0.19589265971833042),
1192 FRAC_CONST(0.19749694123802966),
1193 FRAC_CONST(0.19910069399898173),
1194 FRAC_CONST(0.20070391370745785),
1195 FRAC_CONST(0.20230659607115639),
1196 FRAC_CONST(0.20390873679921437),
1197 FRAC_CONST(0.20551033160221882),
1198 FRAC_CONST(0.20711137619221856),
1199 FRAC_CONST(0.2087118662827353),
1200 FRAC_CONST(0.21031179758877552),
1201 FRAC_CONST(0.21191116582684155),
1202 FRAC_CONST(0.21350996671494335),
1203 FRAC_CONST(0.21510819597260972),
1204 FRAC_CONST(0.21670584932089998),
1205 FRAC_CONST(0.2183029224824154),
1206 FRAC_CONST(0.21989941118131037),
1207 FRAC_CONST(0.22149531114330431),
1208 FRAC_CONST(0.22309061809569264),
1209 FRAC_CONST(0.22468532776735861),
1210 FRAC_CONST(0.22627943588878449),
1211 FRAC_CONST(0.22787293819206314),
1212 FRAC_CONST(0.22946583041090929),
1213 FRAC_CONST(0.23105810828067114),
1214 FRAC_CONST(0.23264976753834157),
1215 FRAC_CONST(0.23424080392256985),
1216 FRAC_CONST(0.2358312131736727),
1217 FRAC_CONST(0.23742099103364595),
1218 FRAC_CONST(0.23901013324617584),
1219 FRAC_CONST(0.24059863555665045),
1220 FRAC_CONST(0.24218649371217096),
1221 FRAC_CONST(0.24377370346156332),
1222 FRAC_CONST(0.24536026055538934),
1223 FRAC_CONST(0.24694616074595824),
1224 FRAC_CONST(0.24853139978733788),
1225 FRAC_CONST(0.25011597343536629),
1226 FRAC_CONST(0.25169987744766298),
1227 FRAC_CONST(0.25328310758364025),
1228 FRAC_CONST(0.25486565960451457),
1229 FRAC_CONST(0.25644752927331788),
1230 FRAC_CONST(0.25802871235490898),
1231 FRAC_CONST(0.25960920461598508),
1232 FRAC_CONST(0.26118900182509258),
1233 FRAC_CONST(0.26276809975263904),
1234 FRAC_CONST(0.264346494170904),
1235 FRAC_CONST(0.26592418085405067),
1236 FRAC_CONST(0.26750115557813692),
1237 FRAC_CONST(0.2690774141211269),
1238 FRAC_CONST(0.27065295226290209),
1239 FRAC_CONST(0.2722277657852728),
1240 FRAC_CONST(0.27380185047198918),
1241 FRAC_CONST(0.27537520210875299),
1242 FRAC_CONST(0.2769478164832283),
1243 FRAC_CONST(0.27851968938505312),
1244 FRAC_CONST(0.28009081660585067),
1245 FRAC_CONST(0.28166119393924061),
1246 FRAC_CONST(0.28323081718085019),
1247 FRAC_CONST(0.28479968212832563),
1248 FRAC_CONST(0.28636778458134327),
1249 FRAC_CONST(0.28793512034162105),
1250 FRAC_CONST(0.2895016852129294),
1251 FRAC_CONST(0.29106747500110264),
1252 FRAC_CONST(0.29263248551405047),
1253 FRAC_CONST(0.2941967125617686),
1254 FRAC_CONST(0.29576015195635058),
1255 FRAC_CONST(0.29732279951199847),
1256 FRAC_CONST(0.29888465104503475),
1257 FRAC_CONST(0.30044570237391266),
1258 FRAC_CONST(0.30200594931922808),
1259 FRAC_CONST(0.30356538770373032),
1260 FRAC_CONST(0.30512401335233358),
1261 FRAC_CONST(0.30668182209212791),
1262 FRAC_CONST(0.3082388097523906),
1263 FRAC_CONST(0.30979497216459695),
1264 FRAC_CONST(0.31135030516243201),
1265 FRAC_CONST(0.3129048045818012),
1266 FRAC_CONST(0.31445846626084178),
1267 FRAC_CONST(0.31601128603993378),
1268 FRAC_CONST(0.31756325976171151),
1269 FRAC_CONST(0.31911438327107416),
1270 FRAC_CONST(0.32066465241519732),
1271 FRAC_CONST(0.32221406304354389),
1272 FRAC_CONST(0.3237626110078754),
1273 FRAC_CONST(0.32531029216226293),
1274 FRAC_CONST(0.32685710236309828),
1275 FRAC_CONST(0.32840303746910487),
1276 FRAC_CONST(0.32994809334134939),
1277 FRAC_CONST(0.3314922658432522),
1278 FRAC_CONST(0.33303555084059877),
1279 FRAC_CONST(0.33457794420155085),
1280 FRAC_CONST(0.33611944179665709),
1281 FRAC_CONST(0.33766003949886464),
1282 FRAC_CONST(0.33919973318352969),
1283 FRAC_CONST(0.34073851872842903),
1284 FRAC_CONST(0.34227639201377064),
1285 FRAC_CONST(0.34381334892220483),
1286 FRAC_CONST(0.34534938533883547),
1287 FRAC_CONST(0.34688449715123082),
1288 FRAC_CONST(0.34841868024943456),
1289 FRAC_CONST(0.34995193052597684),
1290 FRAC_CONST(0.35148424387588523),
1291 FRAC_CONST(0.3530156161966958),
1292 FRAC_CONST(0.35454604338846402),
1293 FRAC_CONST(0.35607552135377557),
1294 FRAC_CONST(0.35760404599775775),
1295 FRAC_CONST(0.35913161322809023),
1296 FRAC_CONST(0.36065821895501554),
1297 FRAC_CONST(0.36218385909135092),
1298 FRAC_CONST(0.36370852955249849),
1299 FRAC_CONST(0.36523222625645668),
1300 FRAC_CONST(0.36675494512383078),
1301 FRAC_CONST(0.36827668207784414),
1302 FRAC_CONST(0.36979743304434909),
1303 FRAC_CONST(0.37131719395183754),
1304 FRAC_CONST(0.37283596073145214),
1305 FRAC_CONST(0.37435372931699717),
1306 FRAC_CONST(0.37587049564494951),
1307 FRAC_CONST(0.37738625565446909),
1308 FRAC_CONST(0.37890100528741022),
1309 FRAC_CONST(0.38041474048833229),
1310 FRAC_CONST(0.38192745720451066),
1311 FRAC_CONST(0.38343915138594736),
1312 FRAC_CONST(0.38494981898538222),
1313 FRAC_CONST(0.38645945595830333),
1314 FRAC_CONST(0.38796805826295838),
1315 FRAC_CONST(0.38947562186036483),
1316 FRAC_CONST(0.39098214271432141),
1317 FRAC_CONST(0.39248761679141814),
1318 FRAC_CONST(0.3939920400610481),
1319 FRAC_CONST(0.39549540849541737),
1320 FRAC_CONST(0.39699771806955625),
1321 FRAC_CONST(0.39849896476132979),
1322 FRAC_CONST(0.39999914455144892),
1323 FRAC_CONST(0.40149825342348083),
1324 FRAC_CONST(0.4029962873638599),
1325 FRAC_CONST(0.40449324236189854),
1326 FRAC_CONST(0.40598911440979762),
1327 FRAC_CONST(0.40748389950265762),
1328 FRAC_CONST(0.40897759363848879),
1329 FRAC_CONST(0.41047019281822261),
1330 FRAC_CONST(0.41196169304572178),
1331 FRAC_CONST(0.4134520903277914),
1332 FRAC_CONST(0.41494138067418929),
1333 FRAC_CONST(0.41642956009763715),
1334 FRAC_CONST(0.41791662461383078),
1335 FRAC_CONST(0.41940257024145089),
1336 FRAC_CONST(0.42088739300217382),
1337 FRAC_CONST(0.42237108892068231),
1338 FRAC_CONST(0.42385365402467584),
1339 FRAC_CONST(0.42533508434488143),
1340 FRAC_CONST(0.42681537591506419),
1341 FRAC_CONST(0.42829452477203828),
1342 FRAC_CONST(0.42977252695567697),
1343 FRAC_CONST(0.43124937850892364),
1344 FRAC_CONST(0.4327250754778022),
1345 FRAC_CONST(0.43419961391142781),
1346 FRAC_CONST(0.43567298986201736),
1347 FRAC_CONST(0.43714519938489987),
1348 FRAC_CONST(0.43861623853852766),
1349 FRAC_CONST(0.44008610338448595),
1350 FRAC_CONST(0.44155478998750436),
1351 FRAC_CONST(0.44302229441546676),
1352 FRAC_CONST(0.4444886127394222),
1353 FRAC_CONST(0.44595374103359531),
1354 FRAC_CONST(0.44741767537539667),
1355 FRAC_CONST(0.44888041184543348),
1356 FRAC_CONST(0.45034194652752002),
1357 FRAC_CONST(0.45180227550868812),
1358 FRAC_CONST(0.45326139487919759),
1359 FRAC_CONST(0.45471930073254679),
1360 FRAC_CONST(0.45617598916548296),
1361 FRAC_CONST(0.45763145627801283),
1362 FRAC_CONST(0.45908569817341294),
1363 FRAC_CONST(0.46053871095824001),
1364 FRAC_CONST(0.46199049074234161),
1365 FRAC_CONST(0.46344103363886635),
1366 FRAC_CONST(0.46489033576427435),
1367 FRAC_CONST(0.46633839323834758),
1368 FRAC_CONST(0.46778520218420055),
1369 FRAC_CONST(0.46923075872829029),
1370 FRAC_CONST(0.47067505900042683),
1371 FRAC_CONST(0.47211809913378361),
1372 FRAC_CONST(0.47355987526490806),
1373 FRAC_CONST(0.47500038353373153),
1374 FRAC_CONST(0.47643962008357982),
1375 FRAC_CONST(0.47787758106118372),
1376 FRAC_CONST(0.47931426261668875),
1377 FRAC_CONST(0.48074966090366611),
1378 FRAC_CONST(0.48218377207912272),
1379 FRAC_CONST(0.48361659230351117),
1380 FRAC_CONST(0.48504811774074069),
1381 FRAC_CONST(0.48647834455818684),
1382 FRAC_CONST(0.48790726892670194),
1383 FRAC_CONST(0.48933488702062544),
1384 FRAC_CONST(0.49076119501779414),
1385 FRAC_CONST(0.49218618909955225),
1386 FRAC_CONST(0.4936098654507618),
1387 FRAC_CONST(0.49503222025981269),
1388 FRAC_CONST(0.49645324971863303),
1389 FRAC_CONST(0.49787295002269943),
1390 FRAC_CONST(0.49929131737104687),
1391 FRAC_CONST(0.50070834796627917),
1392 FRAC_CONST(0.50212403801457872),
1393 FRAC_CONST(0.50353838372571758),
1394 FRAC_CONST(0.50495138131306638),
1395 FRAC_CONST(0.50636302699360547),
1396 FRAC_CONST(0.50777331698793449),
1397 FRAC_CONST(0.50918224752028263),
1398 FRAC_CONST(0.51058981481851906),
1399 FRAC_CONST(0.51199601511416237),
1400 FRAC_CONST(0.51340084464239111),
1401 FRAC_CONST(0.51480429964205421),
1402 FRAC_CONST(0.51620637635567967),
1403 FRAC_CONST(0.51760707102948678),
1404 FRAC_CONST(0.51900637991339404),
1405 FRAC_CONST(0.5204042992610306),
1406 FRAC_CONST(0.52180082532974559),
1407 FRAC_CONST(0.5231959543806185),
1408 FRAC_CONST(0.52458968267846895),
1409 FRAC_CONST(0.52598200649186677),
1410 FRAC_CONST(0.52737292209314235),
1411 FRAC_CONST(0.52876242575839572),
1412 FRAC_CONST(0.53015051376750777),
1413 FRAC_CONST(0.53153718240414882),
1414 FRAC_CONST(0.53292242795578992),
1415 FRAC_CONST(0.53430624671371152),
1416 FRAC_CONST(0.53568863497301467),
1417 FRAC_CONST(0.5370695890326298),
1418 FRAC_CONST(0.5384491051953274),
1419 FRAC_CONST(0.53982717976772743),
1420 FRAC_CONST(0.54120380906030963),
1421 FRAC_CONST(0.54257898938742311),
1422 FRAC_CONST(0.54395271706729609),
1423 FRAC_CONST(0.54532498842204646),
1424 FRAC_CONST(0.54669579977769045),
1425 FRAC_CONST(0.54806514746415402),
1426 FRAC_CONST(0.54943302781528081),
1427 FRAC_CONST(0.55079943716884383),
1428 FRAC_CONST(0.55216437186655387),
1429 FRAC_CONST(0.55352782825406999),
1430 FRAC_CONST(0.55488980268100907),
1431 FRAC_CONST(0.55625029150095584),
1432 FRAC_CONST(0.55760929107147217),
1433 FRAC_CONST(0.55896679775410718),
1434 FRAC_CONST(0.56032280791440714),
1435 FRAC_CONST(0.56167731792192455),
1436 FRAC_CONST(0.56303032415022869),
1437 FRAC_CONST(0.56438182297691453),
1438 FRAC_CONST(0.56573181078361312),
1439 FRAC_CONST(0.56708028395600085),
1440 FRAC_CONST(0.56842723888380908),
1441 FRAC_CONST(0.56977267196083425),
1442 FRAC_CONST(0.57111657958494688),
1443 FRAC_CONST(0.5724589581581021),
1444 FRAC_CONST(0.57379980408634845),
1445 FRAC_CONST(0.57513911377983773),
1446 FRAC_CONST(0.57647688365283478),
1447 FRAC_CONST(0.57781311012372738),
1448 FRAC_CONST(0.57914778961503466),
1449 FRAC_CONST(0.58048091855341843),
1450 FRAC_CONST(0.5818124933696911),
1451 FRAC_CONST(0.58314251049882604),
1452 FRAC_CONST(0.58447096637996743),
1453 FRAC_CONST(0.58579785745643886),
1454 FRAC_CONST(0.5871231801757536),
1455 FRAC_CONST(0.58844693098962408),
1456 FRAC_CONST(0.58976910635397084),
1457 FRAC_CONST(0.59108970272893235),
1458 FRAC_CONST(0.59240871657887517),
1459 FRAC_CONST(0.59372614437240179),
1460 FRAC_CONST(0.59504198258236196),
1461 FRAC_CONST(0.5963562276858605),
1462 FRAC_CONST(0.59766887616426767),
1463 FRAC_CONST(0.5989799245032289),
1464 FRAC_CONST(0.60028936919267273),
1465 FRAC_CONST(0.60159720672682204),
1466 FRAC_CONST(0.60290343360420195),
1467 FRAC_CONST(0.60420804632765002),
1468 FRAC_CONST(0.60551104140432543),
1469 FRAC_CONST(0.60681241534571839),
1470 FRAC_CONST(0.60811216466765883),
1471 FRAC_CONST(0.60941028589032709),
1472 FRAC_CONST(0.61070677553826169),
1473 FRAC_CONST(0.61200163014036979),
1474 FRAC_CONST(0.61329484622993602),
1475 FRAC_CONST(0.6145864203446314),
1476 FRAC_CONST(0.61587634902652377),
1477 FRAC_CONST(0.61716462882208556),
1478 FRAC_CONST(0.61845125628220421),
1479 FRAC_CONST(0.61973622796219074),
1480 FRAC_CONST(0.6210195404217892),
1481 FRAC_CONST(0.62230119022518593),
1482 FRAC_CONST(0.62358117394101897),
1483 FRAC_CONST(0.62485948814238634),
1484 FRAC_CONST(0.62613612940685637),
1485 FRAC_CONST(0.62741109431647646),
1486 FRAC_CONST(0.62868437945778133),
1487 FRAC_CONST(0.62995598142180387),
1488 FRAC_CONST(0.6312258968040827),
1489 FRAC_CONST(0.63249412220467238),
1490 FRAC_CONST(0.63376065422815175),
1491 FRAC_CONST(0.63502548948363347),
1492 FRAC_CONST(0.63628862458477287),
1493 FRAC_CONST(0.63755005614977711),
1494 FRAC_CONST(0.63880978080141437),
1495 FRAC_CONST(0.6400677951670225),
1496 FRAC_CONST(0.6413240958785188),
1497 FRAC_CONST(0.64257867957240766),
1498 FRAC_CONST(0.6438315428897915),
1499 FRAC_CONST(0.64508268247637779),
1500 FRAC_CONST(0.64633209498248945),
1501 FRAC_CONST(0.64757977706307335),
1502 FRAC_CONST(0.64882572537770888),
1503 FRAC_CONST(0.65006993659061751),
1504 FRAC_CONST(0.65131240737067142),
1505 FRAC_CONST(0.65255313439140239),
1506 FRAC_CONST(0.65379211433101081),
1507 FRAC_CONST(0.65502934387237444),
1508 FRAC_CONST(0.6562648197030575),
1509 FRAC_CONST(0.65749853851531959),
1510 FRAC_CONST(0.65873049700612374),
1511 FRAC_CONST(0.65996069187714679),
1512 FRAC_CONST(0.66118911983478657),
1513 FRAC_CONST(0.66241577759017178),
1514 FRAC_CONST(0.66364066185917048),
1515 FRAC_CONST(0.66486376936239888),
1516 FRAC_CONST(0.66608509682523009),
1517 FRAC_CONST(0.66730464097780284),
1518 FRAC_CONST(0.66852239855503071),
1519 FRAC_CONST(0.66973836629660977),
1520 FRAC_CONST(0.67095254094702894),
1521 FRAC_CONST(0.67216491925557675),
1522 FRAC_CONST(0.67337549797635199),
1523 FRAC_CONST(0.67458427386827102),
1524 FRAC_CONST(0.67579124369507693),
1525 FRAC_CONST(0.67699640422534846),
1526 FRAC_CONST(0.67819975223250772),
1527 FRAC_CONST(0.6794012844948305),
1528 FRAC_CONST(0.68060099779545302),
1529 FRAC_CONST(0.68179888892238183),
1530 FRAC_CONST(0.6829949546685018),
1531 FRAC_CONST(0.68418919183158522),
1532 FRAC_CONST(0.68538159721429948),
1533 FRAC_CONST(0.6865721676242168),
1534 FRAC_CONST(0.68776089987382172),
1535 FRAC_CONST(0.68894779078052026),
1536 FRAC_CONST(0.69013283716664853),
1537 FRAC_CONST(0.69131603585948032),
1538 FRAC_CONST(0.69249738369123692),
1539 FRAC_CONST(0.69367687749909468),
1540 FRAC_CONST(0.69485451412519361),
1541 FRAC_CONST(0.69603029041664599),
1542 FRAC_CONST(0.6972042032255451),
1543 FRAC_CONST(0.6983762494089728),
1544 FRAC_CONST(0.69954642582900894),
1545 FRAC_CONST(0.70071472935273893),
1546 FRAC_CONST(0.70188115685226271),
1547 FRAC_CONST(0.703045705204703),
1548 FRAC_CONST(0.70420837129221303),
1549 FRAC_CONST(0.70536915200198613),
1550 FRAC_CONST(0.70652804422626281),
1551 FRAC_CONST(0.70768504486233985),
1552 FRAC_CONST(0.70884015081257845),
1553 FRAC_CONST(0.70999335898441229),
1554 FRAC_CONST(0.711144666290356),
1555 FRAC_CONST(0.71229406964801356),
1556 FRAC_CONST(0.71344156598008623),
1557 FRAC_CONST(0.71458715221438096),
1558 FRAC_CONST(0.71573082528381871),
1559 FRAC_CONST(0.71687258212644234),
1560 FRAC_CONST(0.7180124196854254),
1561 FRAC_CONST(0.71915033490907943),
1562 FRAC_CONST(0.72028632475086318),
1563 FRAC_CONST(0.72142038616938997),
1564 FRAC_CONST(0.72255251612843596),
1565 FRAC_CONST(0.72368271159694852),
1566 FRAC_CONST(0.72481096954905444),
1567 FRAC_CONST(0.72593728696406756),
1568 FRAC_CONST(0.72706166082649704),
1569 FRAC_CONST(0.72818408812605595),
1570 FRAC_CONST(0.72930456585766834),
1571 FRAC_CONST(0.73042309102147851),
1572 FRAC_CONST(0.73153966062285747),
1573 FRAC_CONST(0.73265427167241282),
1574 FRAC_CONST(0.73376692118599507),
1575 FRAC_CONST(0.73487760618470677),
1576 FRAC_CONST(0.73598632369490979),
1577 FRAC_CONST(0.73709307074823405),
1578 FRAC_CONST(0.73819784438158409),
1579 FRAC_CONST(0.73930064163714881),
1580 FRAC_CONST(0.74040145956240788),
1581 FRAC_CONST(0.74150029521014049),
1582 FRAC_CONST(0.74259714563843304),
1583 FRAC_CONST(0.74369200791068657),
1584 FRAC_CONST(0.74478487909562552),
1585 FRAC_CONST(0.74587575626730485),
1586 FRAC_CONST(0.74696463650511791),
1587 FRAC_CONST(0.74805151689380456),
1588 FRAC_CONST(0.74913639452345926),
1589 FRAC_CONST(0.75021926648953785),
1590 FRAC_CONST(0.75130012989286621),
1591 FRAC_CONST(0.7523789818396478),
1592 FRAC_CONST(0.75345581944147111),
1593 FRAC_CONST(0.75453063981531809),
1594 FRAC_CONST(0.75560344008357094),
1595 FRAC_CONST(0.75667421737402052),
1596 FRAC_CONST(0.7577429688198738),
1597 FRAC_CONST(0.75880969155976163),
1598 FRAC_CONST(0.75987438273774599),
1599 FRAC_CONST(0.76093703950332836),
1600 FRAC_CONST(0.76199765901145666),
1601 FRAC_CONST(0.76305623842253345),
1602 FRAC_CONST(0.76411277490242291),
1603 FRAC_CONST(0.76516726562245885),
1604 FRAC_CONST(0.76621970775945258),
1605 FRAC_CONST(0.76727009849569949),
1606 FRAC_CONST(0.76831843501898767),
1607 FRAC_CONST(0.76936471452260458),
1608 FRAC_CONST(0.77040893420534517),
1609 FRAC_CONST(0.77145109127151923),
1610 FRAC_CONST(0.77249118293095853),
1611 FRAC_CONST(0.77352920639902467),
1612 FRAC_CONST(0.77456515889661659),
1613 FRAC_CONST(0.77559903765017746),
1614 FRAC_CONST(0.7766308398917029),
1615 FRAC_CONST(0.77766056285874774),
1616 FRAC_CONST(0.77868820379443371),
1617 FRAC_CONST(0.77971375994745684),
1618 FRAC_CONST(0.78073722857209438),
1619 FRAC_CONST(0.7817586069282132),
1620 FRAC_CONST(0.78277789228127592),
1621 FRAC_CONST(0.78379508190234881),
1622 FRAC_CONST(0.78481017306810918),
1623 FRAC_CONST(0.78582316306085265),
1624 FRAC_CONST(0.78683404916849986),
1625 FRAC_CONST(0.78784282868460476),
1626 FRAC_CONST(0.78884949890836087),
1627 FRAC_CONST(0.78985405714460888),
1628 FRAC_CONST(0.7908565007038445),
1629 FRAC_CONST(0.79185682690222425),
1630 FRAC_CONST(0.79285503306157412),
1631 FRAC_CONST(0.79385111650939566),
1632 FRAC_CONST(0.79484507457887377),
1633 FRAC_CONST(0.79583690460888357),
1634 FRAC_CONST(0.79682660394399751),
1635 FRAC_CONST(0.79781416993449272),
1636 FRAC_CONST(0.79879959993635785),
1637 FRAC_CONST(0.7997828913113002),
1638 FRAC_CONST(0.80076404142675273),
1639 FRAC_CONST(0.80174304765588156),
1640 FRAC_CONST(0.80271990737759213),
1641 FRAC_CONST(0.80369461797653707),
1642 FRAC_CONST(0.80466717684312306),
1643 FRAC_CONST(0.80563758137351682),
1644 FRAC_CONST(0.80660582896965372),
1645 FRAC_CONST(0.80757191703924336),
1646 FRAC_CONST(0.80853584299577752),
1647 FRAC_CONST(0.80949760425853612),
1648 FRAC_CONST(0.81045719825259477),
1649 FRAC_CONST(0.81141462240883167),
1650 FRAC_CONST(0.81236987416393436),
1651 FRAC_CONST(0.81332295096040608),
1652 FRAC_CONST(0.81427385024657373),
1653 FRAC_CONST(0.81522256947659355),
1654 FRAC_CONST(0.81616910611045879),
1655 FRAC_CONST(0.817113457614006),
1656 FRAC_CONST(0.81805562145892186),
1657 FRAC_CONST(0.81899559512275044),
1658 FRAC_CONST(0.81993337608889916),
1659 FRAC_CONST(0.82086896184664637),
1660 FRAC_CONST(0.8218023498911472),
1661 FRAC_CONST(0.82273353772344116),
1662 FRAC_CONST(0.82366252285045805),
1663 FRAC_CONST(0.82458930278502529),
1664 FRAC_CONST(0.82551387504587381),
1665 FRAC_CONST(0.82643623715764558),
1666 FRAC_CONST(0.82735638665089983),
1667 FRAC_CONST(0.82827432106211907),
1668 FRAC_CONST(0.82919003793371693),
1669 FRAC_CONST(0.83010353481404364),
1670 FRAC_CONST(0.83101480925739324),
1671 FRAC_CONST(0.83192385882400965),
1672 FRAC_CONST(0.83283068108009373),
1673 FRAC_CONST(0.8337352735978093),
1674 FRAC_CONST(0.83463763395529011),
1675 FRAC_CONST(0.83553775973664579),
1676 FRAC_CONST(0.83643564853196872),
1677 FRAC_CONST(0.83733129793734051),
1678 FRAC_CONST(0.83822470555483797),
1679 FRAC_CONST(0.83911586899254031),
1680 FRAC_CONST(0.84000478586453453),
1681 FRAC_CONST(0.84089145379092289),
1682 FRAC_CONST(0.84177587039782842),
1683 FRAC_CONST(0.84265803331740163),
1684 FRAC_CONST(0.84353794018782702),
1685 FRAC_CONST(0.844415588653329),
1686 FRAC_CONST(0.8452909763641786),
1687 FRAC_CONST(0.84616410097669936),
1688 FRAC_CONST(0.84703496015327406),
1689 FRAC_CONST(0.84790355156235053),
1690 FRAC_CONST(0.84876987287844818),
1691 FRAC_CONST(0.8496339217821639),
1692 FRAC_CONST(0.85049569596017938),
1693 FRAC_CONST(0.85135519310526508),
1694 FRAC_CONST(0.85221241091628896),
1695 FRAC_CONST(0.85306734709822085),
1696 FRAC_CONST(0.85391999936213903),
1697 FRAC_CONST(0.85477036542523732),
1698 FRAC_CONST(0.85561844301082923),
1699 FRAC_CONST(0.85646422984835635),
1700 FRAC_CONST(0.85730772367339259),
1701 FRAC_CONST(0.85814892222765116),
1702 FRAC_CONST(0.85898782325899026),
1703 FRAC_CONST(0.85982442452141961),
1704 FRAC_CONST(0.86065872377510555),
1705 FRAC_CONST(0.86149071878637817),
1706 FRAC_CONST(0.8623204073277364),
1707 FRAC_CONST(0.86314778717785412),
1708 FRAC_CONST(0.8639728561215867),
1709 FRAC_CONST(0.86479561194997623),
1710 FRAC_CONST(0.86561605246025763),
1711 FRAC_CONST(0.86643417545586487),
1712 FRAC_CONST(0.8672499787464365),
1713 FRAC_CONST(0.86806346014782154),
1714 FRAC_CONST(0.8688746174820855),
1715 FRAC_CONST(0.86968344857751589),
1716 FRAC_CONST(0.87048995126862883),
1717 FRAC_CONST(0.87129412339617363),
1718 FRAC_CONST(0.87209596280713941),
1719 FRAC_CONST(0.8728954673547612),
1720 FRAC_CONST(0.87369263489852422),
1721 FRAC_CONST(0.87448746330417149),
1722 FRAC_CONST(0.87527995044370765),
1723 FRAC_CONST(0.8760700941954066),
1724 FRAC_CONST(0.87685789244381551),
1725 FRAC_CONST(0.87764334307976144),
1726 FRAC_CONST(0.87842644400035663),
1727 FRAC_CONST(0.8792071931090043),
1728 FRAC_CONST(0.87998558831540408),
1729 FRAC_CONST(0.88076162753555787),
1730 FRAC_CONST(0.88153530869177488),
1731 FRAC_CONST(0.88230662971267804),
1732 FRAC_CONST(0.88307558853320878),
1733 FRAC_CONST(0.88384218309463292),
1734 FRAC_CONST(0.8846064113445461),
1735 FRAC_CONST(0.88536827123687933),
1736 FRAC_CONST(0.88612776073190425),
1737 FRAC_CONST(0.88688487779623937),
1738 FRAC_CONST(0.88763962040285393),
1739 FRAC_CONST(0.8883919865310751),
1740 FRAC_CONST(0.88914197416659235),
1741 FRAC_CONST(0.88988958130146301),
1742 FRAC_CONST(0.8906348059341177),
1743 FRAC_CONST(0.89137764606936609),
1744 FRAC_CONST(0.89211809971840139),
1745 FRAC_CONST(0.89285616489880615),
1746 FRAC_CONST(0.89359183963455813),
1747 FRAC_CONST(0.89432512195603453),
1748 FRAC_CONST(0.89505600990001799),
1749 FRAC_CONST(0.89578450150970124),
1750 FRAC_CONST(0.8965105948346932),
1751 FRAC_CONST(0.89723428793102367),
1752 FRAC_CONST(0.89795557886114807),
1753 FRAC_CONST(0.89867446569395382),
1754 FRAC_CONST(0.89939094650476448),
1755 FRAC_CONST(0.90010501937534515),
1756 FRAC_CONST(0.900816682393908),
1757 FRAC_CONST(0.90152593365511691),
1758 FRAC_CONST(0.90223277126009283),
1759 FRAC_CONST(0.90293719331641886),
1760 FRAC_CONST(0.90363919793814496),
1761 FRAC_CONST(0.90433878324579353),
1762 FRAC_CONST(0.90503594736636439),
1763 FRAC_CONST(0.90573068843333915),
1764 FRAC_CONST(0.90642300458668679),
1765 FRAC_CONST(0.90711289397286898),
1766 FRAC_CONST(0.90780035474484411),
1767 FRAC_CONST(0.90848538506207266),
1768 FRAC_CONST(0.90916798309052227),
1769 FRAC_CONST(0.90984814700267291),
1770 FRAC_CONST(0.9105258749775208),
1771 FRAC_CONST(0.91120116520058425),
1772 FRAC_CONST(0.91187401586390815),
1773 FRAC_CONST(0.91254442516606893),
1774 FRAC_CONST(0.9132123913121788),
1775 FRAC_CONST(0.91387791251389161),
1776 FRAC_CONST(0.91454098698940678),
1777 FRAC_CONST(0.91520161296347435),
1778 FRAC_CONST(0.91585978866739981),
1779 FRAC_CONST(0.91651551233904871),
1780 FRAC_CONST(0.91716878222285148),
1781 FRAC_CONST(0.91781959656980805),
1782 FRAC_CONST(0.91846795363749245),
1783 FRAC_CONST(0.91911385169005766),
1784 FRAC_CONST(0.9197572889982405),
1785 FRAC_CONST(0.9203982638393654),
1786 FRAC_CONST(0.92103677449734989),
1787 FRAC_CONST(0.92167281926270861),
1788 FRAC_CONST(0.92230639643255874),
1789 FRAC_CONST(0.92293750431062316),
1790 FRAC_CONST(0.92356614120723612),
1791 FRAC_CONST(0.92419230543934783),
1792 FRAC_CONST(0.92481599533052783),
1793 FRAC_CONST(0.92543720921097061),
1794 FRAC_CONST(0.92605594541749991),
1795 FRAC_CONST(0.92667220229357261),
1796 FRAC_CONST(0.92728597818928349),
1797 FRAC_CONST(0.9278972714613698),
1798 FRAC_CONST(0.92850608047321548),
1799 FRAC_CONST(0.9291124035948557),
1800 FRAC_CONST(0.92971623920298097),
1801 FRAC_CONST(0.93031758568094147),
1802 FRAC_CONST(0.93091644141875196),
1803 FRAC_CONST(0.93151280481309506),
1804 FRAC_CONST(0.93210667426732674),
1805 FRAC_CONST(0.93269804819147983),
1806 FRAC_CONST(0.93328692500226818),
1807 FRAC_CONST(0.93387330312309147),
1808 FRAC_CONST(0.93445718098403896),
1809 FRAC_CONST(0.93503855702189376),
1810 FRAC_CONST(0.9356174296801375),
1811 FRAC_CONST(0.93619379740895381),
1812 FRAC_CONST(0.93676765866523259),
1813 FRAC_CONST(0.93733901191257496),
1814 FRAC_CONST(0.93790785562129597),
1815 FRAC_CONST(0.93847418826842988),
1816 FRAC_CONST(0.93903800833773399),
1817 FRAC_CONST(0.93959931431969212),
1818 FRAC_CONST(0.94015810471151917),
1819 FRAC_CONST(0.94071437801716529),
1820 FRAC_CONST(0.94126813274731924),
1821 FRAC_CONST(0.94181936741941319),
1822 FRAC_CONST(0.94236808055762578),
1823 FRAC_CONST(0.94291427069288691),
1824 FRAC_CONST(0.94345793636288133),
1825 FRAC_CONST(0.94399907611205225),
1826 FRAC_CONST(0.9445376884916058),
1827 FRAC_CONST(0.94507377205951448),
1828 FRAC_CONST(0.94560732538052128),
1829 FRAC_CONST(0.94613834702614352),
1830 FRAC_CONST(0.94666683557467624),
1831 FRAC_CONST(0.94719278961119657),
1832 FRAC_CONST(0.94771620772756759),
1833 FRAC_CONST(0.94823708852244104),
1834 FRAC_CONST(0.94875543060126255),
1835 FRAC_CONST(0.94927123257627433),
1836 FRAC_CONST(0.94978449306651924),
1837 FRAC_CONST(0.95029521069784428),
1838 FRAC_CONST(0.9508033841029051),
1839 FRAC_CONST(0.95130901192116835),
1840 FRAC_CONST(0.9518120927989161),
1841 FRAC_CONST(0.95231262538924943),
1842 FRAC_CONST(0.95281060835209208),
1843 FRAC_CONST(0.95330604035419386),
1844 FRAC_CONST(0.95379892006913403),
1845 FRAC_CONST(0.95428924617732525),
1846 FRAC_CONST(0.95477701736601728),
1847 FRAC_CONST(0.95526223232929941),
1848 FRAC_CONST(0.95574488976810545),
1849 FRAC_CONST(0.95622498839021619),
1850 FRAC_CONST(0.95670252691026292),
1851 FRAC_CONST(0.95717750404973156),
1852 FRAC_CONST(0.95764991853696524),
1853 FRAC_CONST(0.95811976910716812),
1854 FRAC_CONST(0.95858705450240911),
1855 FRAC_CONST(0.95905177347162429),
1856 FRAC_CONST(0.95951392477062125),
1857 FRAC_CONST(0.95997350716208196),
1858 FRAC_CONST(0.96043051941556579),
1859 FRAC_CONST(0.96088496030751369),
1860 FRAC_CONST(0.96133682862125036),
1861 FRAC_CONST(0.96178612314698864),
1862 FRAC_CONST(0.96223284268183173),
1863 FRAC_CONST(0.9626769860297768),
1864 FRAC_CONST(0.96311855200171881),
1865 FRAC_CONST(0.96355753941545252),
1866 FRAC_CONST(0.96399394709567654),
1867 FRAC_CONST(0.96442777387399625),
1868 FRAC_CONST(0.96485901858892686),
1869 FRAC_CONST(0.96528768008589627),
1870 FRAC_CONST(0.96571375721724895),
1871 FRAC_CONST(0.96613724884224783),
1872 FRAC_CONST(0.96655815382707866),
1873 FRAC_CONST(0.96697647104485207),
1874 FRAC_CONST(0.96739219937560694),
1875 FRAC_CONST(0.96780533770631338),
1876 FRAC_CONST(0.96821588493087585),
1877 FRAC_CONST(0.9686238399501359),
1878 FRAC_CONST(0.96902920167187501),
1879 FRAC_CONST(0.96943196901081796),
1880 FRAC_CONST(0.96983214088863534),
1881 FRAC_CONST(0.9702297162339466),
1882 FRAC_CONST(0.97062469398232287),
1883 FRAC_CONST(0.97101707307629004),
1884 FRAC_CONST(0.97140685246533098),
1885 FRAC_CONST(0.97179403110588902),
1886 FRAC_CONST(0.97217860796137046),
1887 FRAC_CONST(0.97256058200214734),
1888 FRAC_CONST(0.97293995220556007),
1889 FRAC_CONST(0.97331671755592064),
1890 FRAC_CONST(0.97369087704451474),
1891 FRAC_CONST(0.97406242966960455),
1892 FRAC_CONST(0.97443137443643235),
1893 FRAC_CONST(0.97479771035722163),
1894 FRAC_CONST(0.97516143645118103),
1895 FRAC_CONST(0.97552255174450631),
1896 FRAC_CONST(0.97588105527038305),
1897 FRAC_CONST(0.97623694606898959),
1898 FRAC_CONST(0.97659022318749911),
1899 FRAC_CONST(0.97694088568008242),
1900 FRAC_CONST(0.97728893260791039),
1901 FRAC_CONST(0.97763436303915685),
1902 FRAC_CONST(0.97797717604900047),
1903 FRAC_CONST(0.97831737071962765),
1904 FRAC_CONST(0.97865494614023485),
1905 FRAC_CONST(0.97898990140703124),
1906 FRAC_CONST(0.97932223562324061),
1907 FRAC_CONST(0.97965194789910426),
1908 FRAC_CONST(0.9799790373518833),
1909 FRAC_CONST(0.98030350310586067),
1910 FRAC_CONST(0.98062534429234405),
1911 FRAC_CONST(0.98094456004966768),
1912 FRAC_CONST(0.98126114952319499),
1913 FRAC_CONST(0.98157511186532054),
1914 FRAC_CONST(0.98188644623547261),
1915 FRAC_CONST(0.98219515180011563),
1916 FRAC_CONST(0.98250122773275184),
1917 FRAC_CONST(0.98280467321392362),
1918 FRAC_CONST(0.98310548743121629),
1919 FRAC_CONST(0.98340366957925973),
1920 FRAC_CONST(0.98369921885973044),
1921 FRAC_CONST(0.98399213448135414),
1922 FRAC_CONST(0.98428241565990748),
1923 FRAC_CONST(0.98457006161822058),
1924 FRAC_CONST(0.98485507158617835),
1925 FRAC_CONST(0.98513744480072363),
1926 FRAC_CONST(0.98541718050585803),
1927 FRAC_CONST(0.98569427795264519),
1928 FRAC_CONST(0.98596873639921168),
1929 FRAC_CONST(0.98624055511074971),
1930 FRAC_CONST(0.98650973335951875),
1931 FRAC_CONST(0.98677627042484772),
1932 FRAC_CONST(0.98704016559313645),
1933 FRAC_CONST(0.98730141815785832),
1934 FRAC_CONST(0.98756002741956173),
1935 FRAC_CONST(0.9878159926858715),
1936 FRAC_CONST(0.98806931327149194),
1937 FRAC_CONST(0.98831998849820735),
1938 FRAC_CONST(0.98856801769488489),
1939 FRAC_CONST(0.98881340019747566),
1940 FRAC_CONST(0.98905613534901682),
1941 FRAC_CONST(0.98929622249963345),
1942 FRAC_CONST(0.98953366100653983),
1943 FRAC_CONST(0.98976845023404181),
1944 FRAC_CONST(0.99000058955353776),
1945 FRAC_CONST(0.99023007834352106),
1946 FRAC_CONST(0.99045691598958097),
1947 FRAC_CONST(0.99068110188440506),
1948 FRAC_CONST(0.99090263542778001),
1949 FRAC_CONST(0.99112151602659404),
1950 FRAC_CONST(0.99133774309483769),
1951 FRAC_CONST(0.99155131605360625),
1952 FRAC_CONST(0.99176223433110056),
1953 FRAC_CONST(0.99197049736262888),
1954 FRAC_CONST(0.99217610459060845),
1955 FRAC_CONST(0.99237905546456673),
1956 FRAC_CONST(0.99257934944114334),
1957 FRAC_CONST(0.99277698598409092),
1958 FRAC_CONST(0.99297196456427694),
1959 FRAC_CONST(0.99316428465968509),
1960 FRAC_CONST(0.99335394575541669),
1961 FRAC_CONST(0.99354094734369169),
1962 FRAC_CONST(0.99372528892385081),
1963 FRAC_CONST(0.99390697000235606),
1964 FRAC_CONST(0.99408599009279242),
1965 FRAC_CONST(0.99426234871586938),
1966 FRAC_CONST(0.99443604539942176),
1967 FRAC_CONST(0.99460707967841133),
1968 FRAC_CONST(0.99477545109492771),
1969 FRAC_CONST(0.99494115919819004),
1970 FRAC_CONST(0.99510420354454787),
1971 FRAC_CONST(0.99526458369748239),
1972 FRAC_CONST(0.99542229922760772),
1973 FRAC_CONST(0.99557734971267187),
1974 FRAC_CONST(0.9957297347375581),
1975 FRAC_CONST(0.99587945389428578),
1976 FRAC_CONST(0.99602650678201154),
1977 FRAC_CONST(0.99617089300703077),
1978 FRAC_CONST(0.996312612182778),
1979 FRAC_CONST(0.99645166392982831),
1980 FRAC_CONST(0.99658804787589839),
1981 FRAC_CONST(0.99672176365584741),
1982 FRAC_CONST(0.99685281091167788),
1983 FRAC_CONST(0.99698118929253687),
1984 FRAC_CONST(0.99710689845471678),
1985 FRAC_CONST(0.99722993806165661),
1986 FRAC_CONST(0.99735030778394196),
1987 FRAC_CONST(0.99746800729930707),
1988 FRAC_CONST(0.99758303629263489),
1989 FRAC_CONST(0.99769539445595812),
1990 FRAC_CONST(0.99780508148846014),
1991 FRAC_CONST(0.99791209709647588),
1992 FRAC_CONST(0.99801644099349218),
1993 FRAC_CONST(0.99811811290014918),
1994 FRAC_CONST(0.9982171125442405),
1995 FRAC_CONST(0.9983134396607144),
1996 FRAC_CONST(0.99840709399167404),
1997 FRAC_CONST(0.99849807528637868),
1998 FRAC_CONST(0.99858638330124405),
1999 FRAC_CONST(0.99867201779984294),
2000 FRAC_CONST(0.99875497855290607),
2001 FRAC_CONST(0.99883526533832245),
2002 FRAC_CONST(0.99891287794114036),
2003 FRAC_CONST(0.99898781615356746),
2004 FRAC_CONST(0.99906007977497147),
2005 FRAC_CONST(0.99912966861188113),
2006 FRAC_CONST(0.99919658247798593),
2007 FRAC_CONST(0.99926082119413751),
2008 FRAC_CONST(0.99932238458834954),
2009 FRAC_CONST(0.999381272495798),
2010 FRAC_CONST(0.99943748475882255),
2011 FRAC_CONST(0.9994910212269259),
2012 FRAC_CONST(0.99954188175677483),
2013 FRAC_CONST(0.99959006621220048),
2014 FRAC_CONST(0.99963557446419837),
2015 FRAC_CONST(0.99967840639092931),
2016 FRAC_CONST(0.99971856187771946),
2017 FRAC_CONST(0.99975604081706027),
2018 FRAC_CONST(0.99979084310860955),
2019 FRAC_CONST(0.99982296865919107),
2020 FRAC_CONST(0.99985241738279484),
2021 FRAC_CONST(0.99987918920057806),
2022 FRAC_CONST(0.99990328404086426),
2023 FRAC_CONST(0.9999247018391445),
2024 FRAC_CONST(0.99994344253807688),
2025 FRAC_CONST(0.99995950608748674),
2026 FRAC_CONST(0.99997289244436727),
2027 FRAC_CONST(0.99998360157287902),
2028 FRAC_CONST(0.9999916334443506),
2029 FRAC_CONST(0.99999698803727821),
2030 FRAC_CONST(0.99999966533732598)
2031};
2032#endif
2033
2034ALIGN static const real_t sine_short_128[] =
2035{
2036 FRAC_CONST(0.0061358846491544753),
2037 FRAC_CONST(0.01840672990580482),
2038 FRAC_CONST(0.030674803176636626),
2039 FRAC_CONST(0.04293825693494082),
2040 FRAC_CONST(0.055195244349689934),
2041 FRAC_CONST(0.067443919563664051),
2042 FRAC_CONST(0.079682437971430126),
2043 FRAC_CONST(0.091908956497132724),
2044 FRAC_CONST(0.10412163387205459),
2045 FRAC_CONST(0.11631863091190475),
2046 FRAC_CONST(0.12849811079379317),
2047 FRAC_CONST(0.14065823933284921),
2048 FRAC_CONST(0.15279718525844344),
2049 FRAC_CONST(0.16491312048996989),
2050 FRAC_CONST(0.17700422041214875),
2051 FRAC_CONST(0.18906866414980619),
2052 FRAC_CONST(0.2011046348420919),
2053 FRAC_CONST(0.21311031991609136),
2054 FRAC_CONST(0.22508391135979283),
2055 FRAC_CONST(0.2370236059943672),
2056 FRAC_CONST(0.24892760574572015),
2057 FRAC_CONST(0.26079411791527551),
2058 FRAC_CONST(0.27262135544994898),
2059 FRAC_CONST(0.28440753721127188),
2060 FRAC_CONST(0.29615088824362379),
2061 FRAC_CONST(0.30784964004153487),
2062 FRAC_CONST(0.31950203081601569),
2063 FRAC_CONST(0.33110630575987643),
2064 FRAC_CONST(0.34266071731199438),
2065 FRAC_CONST(0.35416352542049034),
2066 FRAC_CONST(0.36561299780477385),
2067 FRAC_CONST(0.37700741021641826),
2068 FRAC_CONST(0.38834504669882625),
2069 FRAC_CONST(0.39962419984564679),
2070 FRAC_CONST(0.41084317105790391),
2071 FRAC_CONST(0.42200027079979968),
2072 FRAC_CONST(0.43309381885315196),
2073 FRAC_CONST(0.4441221445704292),
2074 FRAC_CONST(0.45508358712634384),
2075 FRAC_CONST(0.46597649576796618),
2076 FRAC_CONST(0.47679923006332209),
2077 FRAC_CONST(0.487550160148436),
2078 FRAC_CONST(0.49822766697278187),
2079 FRAC_CONST(0.50883014254310699),
2080 FRAC_CONST(0.51935599016558964),
2081 FRAC_CONST(0.52980362468629461),
2082 FRAC_CONST(0.54017147272989285),
2083 FRAC_CONST(0.55045797293660481),
2084 FRAC_CONST(0.56066157619733603),
2085 FRAC_CONST(0.57078074588696726),
2086 FRAC_CONST(0.58081395809576453),
2087 FRAC_CONST(0.59075970185887416),
2088 FRAC_CONST(0.60061647938386897),
2089 FRAC_CONST(0.61038280627630948),
2090 FRAC_CONST(0.6200572117632891),
2091 FRAC_CONST(0.62963823891492698),
2092 FRAC_CONST(0.63912444486377573),
2093 FRAC_CONST(0.64851440102211244),
2094 FRAC_CONST(0.65780669329707864),
2095 FRAC_CONST(0.66699992230363747),
2096 FRAC_CONST(0.67609270357531592),
2097 FRAC_CONST(0.68508366777270036),
2098 FRAC_CONST(0.693971460889654),
2099 FRAC_CONST(0.7027547444572253),
2100 FRAC_CONST(0.71143219574521643),
2101 FRAC_CONST(0.72000250796138165),
2102 FRAC_CONST(0.7284643904482252),
2103 FRAC_CONST(0.73681656887736979),
2104 FRAC_CONST(0.74505778544146595),
2105 FRAC_CONST(0.75318679904361241),
2106 FRAC_CONST(0.76120238548426178),
2107 FRAC_CONST(0.76910333764557959),
2108 FRAC_CONST(0.77688846567323244),
2109 FRAC_CONST(0.78455659715557524),
2110 FRAC_CONST(0.79210657730021239),
2111 FRAC_CONST(0.79953726910790501),
2112 FRAC_CONST(0.80684755354379922),
2113 FRAC_CONST(0.8140363297059483),
2114 FRAC_CONST(0.82110251499110465),
2115 FRAC_CONST(0.8280450452577558),
2116 FRAC_CONST(0.83486287498638001),
2117 FRAC_CONST(0.84155497743689833),
2118 FRAC_CONST(0.84812034480329712),
2119 FRAC_CONST(0.85455798836540053),
2120 FRAC_CONST(0.86086693863776731),
2121 FRAC_CONST(0.86704624551569265),
2122 FRAC_CONST(0.87309497841829009),
2123 FRAC_CONST(0.87901222642863341),
2124 FRAC_CONST(0.88479709843093779),
2125 FRAC_CONST(0.89044872324475788),
2126 FRAC_CONST(0.89596624975618511),
2127 FRAC_CONST(0.90134884704602203),
2128 FRAC_CONST(0.90659570451491533),
2129 FRAC_CONST(0.91170603200542988),
2130 FRAC_CONST(0.9166790599210427),
2131 FRAC_CONST(0.9215140393420419),
2132 FRAC_CONST(0.92621024213831127),
2133 FRAC_CONST(0.93076696107898371),
2134 FRAC_CONST(0.9351835099389475),
2135 FRAC_CONST(0.93945922360218992),
2136 FRAC_CONST(0.94359345816196039),
2137 FRAC_CONST(0.94758559101774109),
2138 FRAC_CONST(0.95143502096900834),
2139 FRAC_CONST(0.95514116830577067),
2140 FRAC_CONST(0.9587034748958716),
2141 FRAC_CONST(0.96212140426904158),
2142 FRAC_CONST(0.9653944416976894),
2143 FRAC_CONST(0.96852209427441727),
2144 FRAC_CONST(0.97150389098625178),
2145 FRAC_CONST(0.97433938278557586),
2146 FRAC_CONST(0.97702814265775439),
2147 FRAC_CONST(0.97956976568544052),
2148 FRAC_CONST(0.98196386910955524),
2149 FRAC_CONST(0.98421009238692903),
2150 FRAC_CONST(0.98630809724459867),
2151 FRAC_CONST(0.98825756773074946),
2152 FRAC_CONST(0.99005821026229712),
2153 FRAC_CONST(0.99170975366909953),
2154 FRAC_CONST(0.9932119492347945),
2155 FRAC_CONST(0.99456457073425542),
2156 FRAC_CONST(0.99576741446765982),
2157 FRAC_CONST(0.99682029929116567),
2158 FRAC_CONST(0.99772306664419164),
2159 FRAC_CONST(0.99847558057329477),
2160 FRAC_CONST(0.99907772775264536),
2161 FRAC_CONST(0.99952941750109314),
2162 FRAC_CONST(0.9998305817958234),
2163 FRAC_CONST(0.99998117528260111)
2164};
2165
2166#ifdef ALLOW_SMALL_FRAMELENGTH
2167ALIGN static const real_t sine_short_120[] =
2168{
2169 FRAC_CONST(0.0065449379673518581),
2170 FRAC_CONST(0.019633692460628301),
2171 FRAC_CONST(0.032719082821776137),
2172 FRAC_CONST(0.045798866936520771),
2173 FRAC_CONST(0.058870803651189033),
2174 FRAC_CONST(0.071932653156719387),
2175 FRAC_CONST(0.084982177372441667),
2176 FRAC_CONST(0.09801714032956059),
2177 FRAC_CONST(0.11103530855427769),
2178 FRAC_CONST(0.12403445145048532),
2179 FRAC_CONST(0.13701234168196802),
2180 FRAC_CONST(0.14996675555404498),
2181 FRAC_CONST(0.16289547339458874),
2182 FRAC_CONST(0.17579627993435451),
2183 FRAC_CONST(0.18866696468655525),
2184 FRAC_CONST(0.2015053223256171),
2185 FRAC_CONST(0.21430915306505074),
2186 FRAC_CONST(0.2270762630343732),
2187 FRAC_CONST(0.23980446465501654),
2188 FRAC_CONST(0.25249157701515795),
2189 FRAC_CONST(0.26513542624340797),
2190 FRAC_CONST(0.27773384588129219),
2191 FRAC_CONST(0.29028467725446233),
2192 FRAC_CONST(0.3027857698425746),
2193 FRAC_CONST(0.31523498164776964),
2194 FRAC_CONST(0.32763017956169349),
2195 FRAC_CONST(0.33996923973099424),
2196 FRAC_CONST(0.35225004792123354),
2197 FRAC_CONST(0.36447049987914965),
2198 FRAC_CONST(0.37662850169321077),
2199 FRAC_CONST(0.38872197015239557),
2200 FRAC_CONST(0.40074883310314097),
2201 FRAC_CONST(0.41270702980439467),
2202 FRAC_CONST(0.42459451128071307),
2203 FRAC_CONST(0.43640924067334208),
2204 FRAC_CONST(0.44814919358922256),
2205 FRAC_CONST(0.45981235844785984),
2206 FRAC_CONST(0.47139673682599764),
2207 FRAC_CONST(0.48290034380003727),
2208 FRAC_CONST(0.49432120828614462),
2209 FRAC_CONST(0.50565737337798455),
2210 FRAC_CONST(0.51690689668202761),
2211 FRAC_CONST(0.52806785065036799),
2212 FRAC_CONST(0.53913832291100017),
2213 FRAC_CONST(0.55011641659549337),
2214 FRAC_CONST(0.56100025066400983),
2215 FRAC_CONST(0.57178796022761225),
2216 FRAC_CONST(0.58247769686780215),
2217 FRAC_CONST(0.59306762895323706),
2218 FRAC_CONST(0.60355594195357143),
2219 FRAC_CONST(0.61394083875036642),
2220 FRAC_CONST(0.62422053994501758),
2221 FRAC_CONST(0.63439328416364549),
2222 FRAC_CONST(0.64445732835889735),
2223 FRAC_CONST(0.65441094810861034),
2224 FRAC_CONST(0.66425243791128175),
2225 FRAC_CONST(0.67398011147829784),
2226 FRAC_CONST(0.68359230202287125),
2227 FRAC_CONST(0.69308736254563585),
2228 FRAC_CONST(0.70246366611685174),
2229 FRAC_CONST(0.71171960615517138),
2230 FRAC_CONST(0.72085359670291882),
2231 FRAC_CONST(0.7298640726978356),
2232 FRAC_CONST(0.73874949024124625),
2233 FRAC_CONST(0.74750832686259672),
2234 FRAC_CONST(0.75613908178032285),
2235 FRAC_CONST(0.76464027615900032),
2236 FRAC_CONST(0.77301045336273699),
2237 FRAC_CONST(0.78124817920475853),
2238 FRAC_CONST(0.78935204219315003),
2239 FRAC_CONST(0.79732065377270711),
2240 FRAC_CONST(0.80515264856285829),
2241 FRAC_CONST(0.81284668459161513),
2242 FRAC_CONST(0.82040144352551359),
2243 FRAC_CONST(0.82781563089550203),
2244 FRAC_CONST(0.83508797631874299),
2245 FRAC_CONST(0.84221723371628654),
2246 FRAC_CONST(0.84920218152657889),
2247 FRAC_CONST(0.85604162291477137),
2248 FRAC_CONST(0.86273438597779184),
2249 FRAC_CONST(0.86927932394514362),
2250 FRAC_CONST(0.87567531537539967),
2251 FRAC_CONST(0.88192126434835494),
2252 FRAC_CONST(0.88801610065280734),
2253 FRAC_CONST(0.89395877996993212),
2254 FRAC_CONST(0.8997482840522214),
2255 FRAC_CONST(0.90538362089795521),
2256 FRAC_CONST(0.91086382492117568),
2257 FRAC_CONST(0.91618795711713596),
2258 FRAC_CONST(0.92135510522319242),
2259 FRAC_CONST(0.9263643838751181),
2260 FRAC_CONST(0.93121493475880346),
2261 FRAC_CONST(0.93590592675732565),
2262 FRAC_CONST(0.94043655609335486),
2263 FRAC_CONST(0.94480604646687805),
2264 FRAC_CONST(0.94901364918821385),
2265 FRAC_CONST(0.95305864330629697),
2266 FRAC_CONST(0.95694033573220882),
2267 FRAC_CONST(0.9606580613579353),
2268 FRAC_CONST(0.96421118317032928),
2269 FRAC_CONST(0.96759909236025976),
2270 FRAC_CONST(0.9708212084269281),
2271 FRAC_CONST(0.97387697927733363),
2272 FRAC_CONST(0.97676588132087239),
2273 FRAC_CONST(0.97948741955905139),
2274 FRAC_CONST(0.98204112767030394),
2275 FRAC_CONST(0.98442656808989171),
2276 FRAC_CONST(0.98664333208487898),
2277 FRAC_CONST(0.98869103982416728),
2278 FRAC_CONST(0.99056934044357725),
2279 FRAC_CONST(0.99227791210596705),
2280 FRAC_CONST(0.99381646205637808),
2281 FRAC_CONST(0.99518472667219682),
2282 FRAC_CONST(0.99638247150832537),
2283 FRAC_CONST(0.99740949133735191),
2284 FRAC_CONST(0.99826561018471593),
2285 FRAC_CONST(0.99895068135886012),
2286 FRAC_CONST(0.99946458747636568),
2287 FRAC_CONST(0.99980724048206482),
2288 FRAC_CONST(0.99997858166412923)
2289};
2290#endif
2291
2292#ifdef LD_DEC
2293ALIGN static const real_t sine_mid_512[] =
2294{
2295 FRAC_CONST(0.0015339801862847655),
2296 FRAC_CONST(0.0046019261204485705),
2297 FRAC_CONST(0.007669828739531097),
2298 FRAC_CONST(0.010737659167264491),
2299 FRAC_CONST(0.013805388528060391),
2300 FRAC_CONST(0.01687298794728171),
2301 FRAC_CONST(0.019940428551514441),
2302 FRAC_CONST(0.023007681468839369),
2303 FRAC_CONST(0.026074717829103901),
2304 FRAC_CONST(0.029141508764193722),
2305 FRAC_CONST(0.032208025408304586),
2306 FRAC_CONST(0.035274238898213947),
2307 FRAC_CONST(0.038340120373552694),
2308 FRAC_CONST(0.041405640977076739),
2309 FRAC_CONST(0.044470771854938668),
2310 FRAC_CONST(0.047535484156959303),
2311 FRAC_CONST(0.050599749036899282),
2312 FRAC_CONST(0.05366353765273052),
2313 FRAC_CONST(0.056726821166907748),
2314 FRAC_CONST(0.059789570746639868),
2315 FRAC_CONST(0.062851757564161406),
2316 FRAC_CONST(0.065913352797003805),
2317 FRAC_CONST(0.068974327628266746),
2318 FRAC_CONST(0.072034653246889332),
2319 FRAC_CONST(0.075094300847921305),
2320 FRAC_CONST(0.078153241632794232),
2321 FRAC_CONST(0.081211446809592441),
2322 FRAC_CONST(0.084268887593324071),
2323 FRAC_CONST(0.087325535206192059),
2324 FRAC_CONST(0.090381360877864983),
2325 FRAC_CONST(0.093436335845747787),
2326 FRAC_CONST(0.096490431355252593),
2327 FRAC_CONST(0.099543618660069319),
2328 FRAC_CONST(0.10259586902243628),
2329 FRAC_CONST(0.10564715371341062),
2330 FRAC_CONST(0.10869744401313872),
2331 FRAC_CONST(0.11174671121112659),
2332 FRAC_CONST(0.11479492660651008),
2333 FRAC_CONST(0.11784206150832498),
2334 FRAC_CONST(0.12088808723577708),
2335 FRAC_CONST(0.12393297511851216),
2336 FRAC_CONST(0.12697669649688587),
2337 FRAC_CONST(0.13001922272223335),
2338 FRAC_CONST(0.13306052515713906),
2339 FRAC_CONST(0.1361005751757062),
2340 FRAC_CONST(0.1391393441638262),
2341 FRAC_CONST(0.14217680351944803),
2342 FRAC_CONST(0.14521292465284746),
2343 FRAC_CONST(0.14824767898689603),
2344 FRAC_CONST(0.15128103795733022),
2345 FRAC_CONST(0.1543129730130201),
2346 FRAC_CONST(0.15734345561623825),
2347 FRAC_CONST(0.16037245724292828),
2348 FRAC_CONST(0.16339994938297323),
2349 FRAC_CONST(0.1664259035404641),
2350 FRAC_CONST(0.16945029123396796),
2351 FRAC_CONST(0.17247308399679595),
2352 FRAC_CONST(0.17549425337727143),
2353 FRAC_CONST(0.17851377093899751),
2354 FRAC_CONST(0.18153160826112497),
2355 FRAC_CONST(0.18454773693861962),
2356 FRAC_CONST(0.1875621285825296),
2357 FRAC_CONST(0.19057475482025274),
2358 FRAC_CONST(0.19358558729580361),
2359 FRAC_CONST(0.19659459767008022),
2360 FRAC_CONST(0.19960175762113097),
2361 FRAC_CONST(0.20260703884442113),
2362 FRAC_CONST(0.20561041305309924),
2363 FRAC_CONST(0.20861185197826349),
2364 FRAC_CONST(0.21161132736922755),
2365 FRAC_CONST(0.21460881099378676),
2366 FRAC_CONST(0.21760427463848364),
2367 FRAC_CONST(0.22059769010887351),
2368 FRAC_CONST(0.22358902922978999),
2369 FRAC_CONST(0.22657826384561),
2370 FRAC_CONST(0.22956536582051887),
2371 FRAC_CONST(0.23255030703877524),
2372 FRAC_CONST(0.23553305940497549),
2373 FRAC_CONST(0.23851359484431842),
2374 FRAC_CONST(0.24149188530286933),
2375 FRAC_CONST(0.24446790274782415),
2376 FRAC_CONST(0.24744161916777327),
2377 FRAC_CONST(0.25041300657296522),
2378 FRAC_CONST(0.25338203699557016),
2379 FRAC_CONST(0.25634868248994291),
2380 FRAC_CONST(0.25931291513288623),
2381 FRAC_CONST(0.26227470702391359),
2382 FRAC_CONST(0.26523403028551179),
2383 FRAC_CONST(0.26819085706340318),
2384 FRAC_CONST(0.27114515952680801),
2385 FRAC_CONST(0.27409690986870638),
2386 FRAC_CONST(0.2770460803060999),
2387 FRAC_CONST(0.27999264308027322),
2388 FRAC_CONST(0.28293657045705539),
2389 FRAC_CONST(0.28587783472708062),
2390 FRAC_CONST(0.28881640820604948),
2391 FRAC_CONST(0.29175226323498926),
2392 FRAC_CONST(0.29468537218051433),
2393 FRAC_CONST(0.2976157074350862),
2394 FRAC_CONST(0.30054324141727345),
2395 FRAC_CONST(0.30346794657201132),
2396 FRAC_CONST(0.30638979537086092),
2397 FRAC_CONST(0.30930876031226873),
2398 FRAC_CONST(0.31222481392182488),
2399 FRAC_CONST(0.31513792875252244),
2400 FRAC_CONST(0.31804807738501495),
2401 FRAC_CONST(0.32095523242787521),
2402 FRAC_CONST(0.32385936651785285),
2403 FRAC_CONST(0.32676045232013173),
2404 FRAC_CONST(0.32965846252858749),
2405 FRAC_CONST(0.33255336986604422),
2406 FRAC_CONST(0.3354451470845316),
2407 FRAC_CONST(0.33833376696554113),
2408 FRAC_CONST(0.34121920232028236),
2409 FRAC_CONST(0.34410142598993881),
2410 FRAC_CONST(0.34698041084592368),
2411 FRAC_CONST(0.34985612979013492),
2412 FRAC_CONST(0.35272855575521073),
2413 FRAC_CONST(0.35559766170478385),
2414 FRAC_CONST(0.35846342063373654),
2415 FRAC_CONST(0.36132580556845428),
2416 FRAC_CONST(0.36418478956707989),
2417 FRAC_CONST(0.36704034571976718),
2418 FRAC_CONST(0.3698924471489341),
2419 FRAC_CONST(0.37274106700951576),
2420 FRAC_CONST(0.37558617848921722),
2421 FRAC_CONST(0.37842775480876556),
2422 FRAC_CONST(0.38126576922216238),
2423 FRAC_CONST(0.38410019501693504),
2424 FRAC_CONST(0.38693100551438858),
2425 FRAC_CONST(0.38975817406985641),
2426 FRAC_CONST(0.39258167407295147),
2427 FRAC_CONST(0.39540147894781635),
2428 FRAC_CONST(0.39821756215337356),
2429 FRAC_CONST(0.40102989718357562),
2430 FRAC_CONST(0.40383845756765407),
2431 FRAC_CONST(0.40664321687036903),
2432 FRAC_CONST(0.40944414869225759),
2433 FRAC_CONST(0.41224122666988289),
2434 FRAC_CONST(0.41503442447608163),
2435 FRAC_CONST(0.41782371582021227),
2436 FRAC_CONST(0.42060907444840251),
2437 FRAC_CONST(0.42339047414379605),
2438 FRAC_CONST(0.42616788872679962),
2439 FRAC_CONST(0.42894129205532949),
2440 FRAC_CONST(0.43171065802505726),
2441 FRAC_CONST(0.43447596056965565),
2442 FRAC_CONST(0.43723717366104409),
2443 FRAC_CONST(0.43999427130963326),
2444 FRAC_CONST(0.44274722756457002),
2445 FRAC_CONST(0.44549601651398174),
2446 FRAC_CONST(0.44824061228521989),
2447 FRAC_CONST(0.45098098904510386),
2448 FRAC_CONST(0.45371712100016387),
2449 FRAC_CONST(0.45644898239688392),
2450 FRAC_CONST(0.45917654752194409),
2451 FRAC_CONST(0.46189979070246273),
2452 FRAC_CONST(0.46461868630623782),
2453 FRAC_CONST(0.46733320874198842),
2454 FRAC_CONST(0.47004333245959562),
2455 FRAC_CONST(0.47274903195034279),
2456 FRAC_CONST(0.47545028174715587),
2457 FRAC_CONST(0.47814705642484301),
2458 FRAC_CONST(0.48083933060033396),
2459 FRAC_CONST(0.48352707893291874),
2460 FRAC_CONST(0.48621027612448642),
2461 FRAC_CONST(0.48888889691976317),
2462 FRAC_CONST(0.4915629161065499),
2463 FRAC_CONST(0.49423230851595967),
2464 FRAC_CONST(0.49689704902265447),
2465 FRAC_CONST(0.49955711254508184),
2466 FRAC_CONST(0.50221247404571079),
2467 FRAC_CONST(0.50486310853126759),
2468 FRAC_CONST(0.50750899105297087),
2469 FRAC_CONST(0.51015009670676681),
2470 FRAC_CONST(0.51278640063356296),
2471 FRAC_CONST(0.51541787801946293),
2472 FRAC_CONST(0.51804450409599934),
2473 FRAC_CONST(0.52066625414036716),
2474 FRAC_CONST(0.52328310347565643),
2475 FRAC_CONST(0.52589502747108463),
2476 FRAC_CONST(0.52850200154222848),
2477 FRAC_CONST(0.531104001151255),
2478 FRAC_CONST(0.53370100180715296),
2479 FRAC_CONST(0.53629297906596318),
2480 FRAC_CONST(0.53887990853100842),
2481 FRAC_CONST(0.54146176585312344),
2482 FRAC_CONST(0.54403852673088382),
2483 FRAC_CONST(0.54661016691083486),
2484 FRAC_CONST(0.54917666218771966),
2485 FRAC_CONST(0.55173798840470734),
2486 FRAC_CONST(0.55429412145362),
2487 FRAC_CONST(0.5568450372751601),
2488 FRAC_CONST(0.55939071185913614),
2489 FRAC_CONST(0.56193112124468947),
2490 FRAC_CONST(0.5644662415205195),
2491 FRAC_CONST(0.56699604882510868),
2492 FRAC_CONST(0.56952051934694714),
2493 FRAC_CONST(0.57203962932475705),
2494 FRAC_CONST(0.57455335504771576),
2495 FRAC_CONST(0.57706167285567944),
2496 FRAC_CONST(0.57956455913940563),
2497 FRAC_CONST(0.58206199034077544),
2498 FRAC_CONST(0.58455394295301533),
2499 FRAC_CONST(0.58704039352091797),
2500 FRAC_CONST(0.58952131864106394),
2501 FRAC_CONST(0.59199669496204099),
2502 FRAC_CONST(0.59446649918466443),
2503 FRAC_CONST(0.5969307080621965),
2504 FRAC_CONST(0.59938929840056454),
2505 FRAC_CONST(0.60184224705858003),
2506 FRAC_CONST(0.60428953094815596),
2507 FRAC_CONST(0.60673112703452448),
2508 FRAC_CONST(0.60916701233645321),
2509 FRAC_CONST(0.61159716392646191),
2510 FRAC_CONST(0.61402155893103838),
2511 FRAC_CONST(0.61644017453085365),
2512 FRAC_CONST(0.61885298796097632),
2513 FRAC_CONST(0.62125997651108755),
2514 FRAC_CONST(0.62366111752569453),
2515 FRAC_CONST(0.62605638840434352),
2516 FRAC_CONST(0.62844576660183271),
2517 FRAC_CONST(0.63082922962842447),
2518 FRAC_CONST(0.63320675505005719),
2519 FRAC_CONST(0.63557832048855611),
2520 FRAC_CONST(0.63794390362184406),
2521 FRAC_CONST(0.64030348218415167),
2522 FRAC_CONST(0.64265703396622686),
2523 FRAC_CONST(0.64500453681554393),
2524 FRAC_CONST(0.64734596863651206),
2525 FRAC_CONST(0.64968130739068319),
2526 FRAC_CONST(0.6520105310969595),
2527 FRAC_CONST(0.65433361783180044),
2528 FRAC_CONST(0.65665054572942894),
2529 FRAC_CONST(0.65896129298203732),
2530 FRAC_CONST(0.66126583783999227),
2531 FRAC_CONST(0.66356415861203977),
2532 FRAC_CONST(0.66585623366550972),
2533 FRAC_CONST(0.66814204142651845),
2534 FRAC_CONST(0.67042156038017309),
2535 FRAC_CONST(0.67269476907077286),
2536 FRAC_CONST(0.67496164610201193),
2537 FRAC_CONST(0.67722217013718033),
2538 FRAC_CONST(0.67947631989936497),
2539 FRAC_CONST(0.68172407417164971),
2540 FRAC_CONST(0.6839654117973154),
2541 FRAC_CONST(0.68620031168003859),
2542 FRAC_CONST(0.68842875278409044),
2543 FRAC_CONST(0.6906507141345346),
2544 FRAC_CONST(0.69286617481742463),
2545 FRAC_CONST(0.69507511398000088),
2546 FRAC_CONST(0.69727751083088652),
2547 FRAC_CONST(0.69947334464028377),
2548 FRAC_CONST(0.70166259474016845),
2549 FRAC_CONST(0.70384524052448494),
2550 FRAC_CONST(0.70602126144933974),
2551 FRAC_CONST(0.70819063703319529),
2552 FRAC_CONST(0.71035334685706231),
2553 FRAC_CONST(0.71250937056469232),
2554 FRAC_CONST(0.71465868786276898),
2555 FRAC_CONST(0.71680127852109954),
2556 FRAC_CONST(0.71893712237280438),
2557 FRAC_CONST(0.72106619931450811),
2558 FRAC_CONST(0.72318848930652735),
2559 FRAC_CONST(0.72530397237306066),
2560 FRAC_CONST(0.72741262860237577),
2561 FRAC_CONST(0.7295144381469969),
2562 FRAC_CONST(0.73160938122389252),
2563 FRAC_CONST(0.73369743811466026),
2564 FRAC_CONST(0.73577858916571348),
2565 FRAC_CONST(0.73785281478846598),
2566 FRAC_CONST(0.73992009545951609),
2567 FRAC_CONST(0.74198041172083096),
2568 FRAC_CONST(0.74403374417992918),
2569 FRAC_CONST(0.74608007351006378),
2570 FRAC_CONST(0.74811938045040349),
2571 FRAC_CONST(0.75015164580621496),
2572 FRAC_CONST(0.7521768504490427),
2573 FRAC_CONST(0.75419497531688917),
2574 FRAC_CONST(0.75620600141439454),
2575 FRAC_CONST(0.75820990981301528),
2576 FRAC_CONST(0.76020668165120242),
2577 FRAC_CONST(0.7621962981345789),
2578 FRAC_CONST(0.76417874053611667),
2579 FRAC_CONST(0.76615399019631281),
2580 FRAC_CONST(0.76812202852336531),
2581 FRAC_CONST(0.7700828369933479),
2582 FRAC_CONST(0.77203639715038441),
2583 FRAC_CONST(0.77398269060682279),
2584 FRAC_CONST(0.77592169904340758),
2585 FRAC_CONST(0.77785340420945304),
2586 FRAC_CONST(0.77977778792301444),
2587 FRAC_CONST(0.78169483207105939),
2588 FRAC_CONST(0.7836045186096382),
2589 FRAC_CONST(0.78550682956405393),
2590 FRAC_CONST(0.78740174702903132),
2591 FRAC_CONST(0.78928925316888565),
2592 FRAC_CONST(0.79116933021769009),
2593 FRAC_CONST(0.79304196047944364),
2594 FRAC_CONST(0.79490712632823701),
2595 FRAC_CONST(0.79676481020841872),
2596 FRAC_CONST(0.79861499463476082),
2597 FRAC_CONST(0.80045766219262271),
2598 FRAC_CONST(0.80229279553811572),
2599 FRAC_CONST(0.8041203773982657),
2600 FRAC_CONST(0.80594039057117628),
2601 FRAC_CONST(0.80775281792619036),
2602 FRAC_CONST(0.80955764240405126),
2603 FRAC_CONST(0.81135484701706373),
2604 FRAC_CONST(0.81314441484925359),
2605 FRAC_CONST(0.81492632905652662),
2606 FRAC_CONST(0.81670057286682785),
2607 FRAC_CONST(0.81846712958029866),
2608 FRAC_CONST(0.82022598256943469),
2609 FRAC_CONST(0.82197711527924155),
2610 FRAC_CONST(0.82372051122739132),
2611 FRAC_CONST(0.82545615400437744),
2612 FRAC_CONST(0.82718402727366902),
2613 FRAC_CONST(0.82890411477186487),
2614 FRAC_CONST(0.8306164003088462),
2615 FRAC_CONST(0.83232086776792968),
2616 FRAC_CONST(0.83401750110601813),
2617 FRAC_CONST(0.8357062843537526),
2618 FRAC_CONST(0.83738720161566194),
2619 FRAC_CONST(0.83906023707031263),
2620 FRAC_CONST(0.84072537497045807),
2621 FRAC_CONST(0.84238259964318596),
2622 FRAC_CONST(0.84403189549006641),
2623 FRAC_CONST(0.84567324698729907),
2624 FRAC_CONST(0.84730663868585832),
2625 FRAC_CONST(0.84893205521163961),
2626 FRAC_CONST(0.85054948126560337),
2627 FRAC_CONST(0.85215890162391983),
2628 FRAC_CONST(0.8537603011381113),
2629 FRAC_CONST(0.85535366473519603),
2630 FRAC_CONST(0.85693897741782865),
2631 FRAC_CONST(0.85851622426444274),
2632 FRAC_CONST(0.86008539042939014),
2633 FRAC_CONST(0.8616464611430813),
2634 FRAC_CONST(0.86319942171212416),
2635 FRAC_CONST(0.86474425751946238),
2636 FRAC_CONST(0.86628095402451299),
2637 FRAC_CONST(0.86780949676330321),
2638 FRAC_CONST(0.86932987134860673),
2639 FRAC_CONST(0.87084206347007886),
2640 FRAC_CONST(0.87234605889439154),
2641 FRAC_CONST(0.87384184346536675),
2642 FRAC_CONST(0.87532940310411078),
2643 FRAC_CONST(0.87680872380914576),
2644 FRAC_CONST(0.87827979165654146),
2645 FRAC_CONST(0.87974259280004741),
2646 FRAC_CONST(0.88119711347122198),
2647 FRAC_CONST(0.88264333997956279),
2648 FRAC_CONST(0.88408125871263499),
2649 FRAC_CONST(0.88551085613619995),
2650 FRAC_CONST(0.88693211879434208),
2651 FRAC_CONST(0.88834503330959624),
2652 FRAC_CONST(0.88974958638307289),
2653 FRAC_CONST(0.89114576479458318),
2654 FRAC_CONST(0.89253355540276469),
2655 FRAC_CONST(0.89391294514520325),
2656 FRAC_CONST(0.89528392103855758),
2657 FRAC_CONST(0.89664647017868015),
2658 FRAC_CONST(0.89800057974073988),
2659 FRAC_CONST(0.89934623697934146),
2660 FRAC_CONST(0.90068342922864686),
2661 FRAC_CONST(0.90201214390249307),
2662 FRAC_CONST(0.90333236849451182),
2663 FRAC_CONST(0.90464409057824624),
2664 FRAC_CONST(0.90594729780726846),
2665 FRAC_CONST(0.90724197791529593),
2666 FRAC_CONST(0.90852811871630612),
2667 FRAC_CONST(0.90980570810465222),
2668 FRAC_CONST(0.91107473405517625),
2669 FRAC_CONST(0.91233518462332275),
2670 FRAC_CONST(0.91358704794525081),
2671 FRAC_CONST(0.91483031223794609),
2672 FRAC_CONST(0.91606496579933161),
2673 FRAC_CONST(0.91729099700837791),
2674 FRAC_CONST(0.91850839432521225),
2675 FRAC_CONST(0.91971714629122736),
2676 FRAC_CONST(0.92091724152918952),
2677 FRAC_CONST(0.92210866874334507),
2678 FRAC_CONST(0.92329141671952764),
2679 FRAC_CONST(0.9244654743252626),
2680 FRAC_CONST(0.92563083050987272),
2681 FRAC_CONST(0.92678747430458175),
2682 FRAC_CONST(0.92793539482261789),
2683 FRAC_CONST(0.92907458125931575),
2684 FRAC_CONST(0.93020502289221907),
2685 FRAC_CONST(0.93132670908118043),
2686 FRAC_CONST(0.93243962926846236),
2687 FRAC_CONST(0.93354377297883617),
2688 FRAC_CONST(0.93463912981968078),
2689 FRAC_CONST(0.93572568948108037),
2690 FRAC_CONST(0.93680344173592156),
2691 FRAC_CONST(0.93787237643998989),
2692 FRAC_CONST(0.93893248353206449),
2693 FRAC_CONST(0.93998375303401394),
2694 FRAC_CONST(0.94102617505088926),
2695 FRAC_CONST(0.94205973977101731),
2696 FRAC_CONST(0.94308443746609349),
2697 FRAC_CONST(0.94410025849127266),
2698 FRAC_CONST(0.94510719328526061),
2699 FRAC_CONST(0.94610523237040334),
2700 FRAC_CONST(0.94709436635277722),
2701 FRAC_CONST(0.94807458592227623),
2702 FRAC_CONST(0.94904588185270056),
2703 FRAC_CONST(0.950008245001843),
2704 FRAC_CONST(0.95096166631157508),
2705 FRAC_CONST(0.95190613680793223),
2706 FRAC_CONST(0.95284164760119872),
2707 FRAC_CONST(0.95376818988599033),
2708 FRAC_CONST(0.95468575494133834),
2709 FRAC_CONST(0.95559433413077111),
2710 FRAC_CONST(0.95649391890239499),
2711 FRAC_CONST(0.95738450078897586),
2712 FRAC_CONST(0.95826607140801767),
2713 FRAC_CONST(0.95913862246184189),
2714 FRAC_CONST(0.96000214573766585),
2715 FRAC_CONST(0.96085663310767966),
2716 FRAC_CONST(0.96170207652912254),
2717 FRAC_CONST(0.96253846804435916),
2718 FRAC_CONST(0.96336579978095405),
2719 FRAC_CONST(0.96418406395174572),
2720 FRAC_CONST(0.96499325285492032),
2721 FRAC_CONST(0.96579335887408357),
2722 FRAC_CONST(0.96658437447833312),
2723 FRAC_CONST(0.96736629222232851),
2724 FRAC_CONST(0.96813910474636233),
2725 FRAC_CONST(0.96890280477642887),
2726 FRAC_CONST(0.96965738512429245),
2727 FRAC_CONST(0.9704028386875555),
2728 FRAC_CONST(0.97113915844972509),
2729 FRAC_CONST(0.9718663374802794),
2730 FRAC_CONST(0.97258436893473221),
2731 FRAC_CONST(0.97329324605469825),
2732 FRAC_CONST(0.97399296216795583),
2733 FRAC_CONST(0.97468351068851067),
2734 FRAC_CONST(0.97536488511665687),
2735 FRAC_CONST(0.97603707903903902),
2736 FRAC_CONST(0.97670008612871184),
2737 FRAC_CONST(0.97735390014519996),
2738 FRAC_CONST(0.97799851493455714),
2739 FRAC_CONST(0.9786339244294231),
2740 FRAC_CONST(0.97926012264908202),
2741 FRAC_CONST(0.97987710369951764),
2742 FRAC_CONST(0.98048486177346938),
2743 FRAC_CONST(0.98108339115048659),
2744 FRAC_CONST(0.98167268619698311),
2745 FRAC_CONST(0.98225274136628937),
2746 FRAC_CONST(0.98282355119870524),
2747 FRAC_CONST(0.98338511032155118),
2748 FRAC_CONST(0.98393741344921892),
2749 FRAC_CONST(0.98448045538322093),
2750 FRAC_CONST(0.98501423101223984),
2751 FRAC_CONST(0.98553873531217606),
2752 FRAC_CONST(0.98605396334619544),
2753 FRAC_CONST(0.98655991026477541),
2754 FRAC_CONST(0.98705657130575097),
2755 FRAC_CONST(0.98754394179435923),
2756 FRAC_CONST(0.98802201714328353),
2757 FRAC_CONST(0.98849079285269659),
2758 FRAC_CONST(0.98895026451030299),
2759 FRAC_CONST(0.98940042779138038),
2760 FRAC_CONST(0.98984127845882053),
2761 FRAC_CONST(0.99027281236316911),
2762 FRAC_CONST(0.99069502544266463),
2763 FRAC_CONST(0.99110791372327678),
2764 FRAC_CONST(0.9915114733187439),
2765 FRAC_CONST(0.99190570043060933),
2766 FRAC_CONST(0.99229059134825737),
2767 FRAC_CONST(0.99266614244894802),
2768 FRAC_CONST(0.99303235019785141),
2769 FRAC_CONST(0.99338921114808065),
2770 FRAC_CONST(0.9937367219407246),
2771 FRAC_CONST(0.99407487930487937),
2772 FRAC_CONST(0.9944036800576791),
2773 FRAC_CONST(0.9947231211043257),
2774 FRAC_CONST(0.99503319943811863),
2775 FRAC_CONST(0.99533391214048228),
2776 FRAC_CONST(0.99562525638099431),
2777 FRAC_CONST(0.99590722941741172),
2778 FRAC_CONST(0.99617982859569687),
2779 FRAC_CONST(0.99644305135004263),
2780 FRAC_CONST(0.99669689520289606),
2781 FRAC_CONST(0.99694135776498216),
2782 FRAC_CONST(0.99717643673532619),
2783 FRAC_CONST(0.9974021299012753),
2784 FRAC_CONST(0.99761843513851955),
2785 FRAC_CONST(0.99782535041111164),
2786 FRAC_CONST(0.99802287377148624),
2787 FRAC_CONST(0.99821100336047819),
2788 FRAC_CONST(0.99838973740734016),
2789 FRAC_CONST(0.99855907422975931),
2790 FRAC_CONST(0.99871901223387294),
2791 FRAC_CONST(0.99886954991428356),
2792 FRAC_CONST(0.99901068585407338),
2793 FRAC_CONST(0.99914241872481691),
2794 FRAC_CONST(0.99926474728659442),
2795 FRAC_CONST(0.99937767038800285),
2796 FRAC_CONST(0.99948118696616695),
2797 FRAC_CONST(0.99957529604674922),
2798 FRAC_CONST(0.99965999674395922),
2799 FRAC_CONST(0.99973528826056168),
2800 FRAC_CONST(0.99980116988788426),
2801 FRAC_CONST(0.99985764100582386),
2802 FRAC_CONST(0.9999047010828529),
2803 FRAC_CONST(0.99994234967602391),
2804 FRAC_CONST(0.99997058643097414),
2805 FRAC_CONST(0.9999894110819284),
2806 FRAC_CONST(0.99999882345170188)
2807};
2808
2809#ifdef ALLOW_SMALL_FRAMELENGTH
2810ALIGN static const real_t sine_mid_480[] =
2811{
2812 FRAC_CONST(0.0016362454436240478),
2813 FRAC_CONST(0.00490871880799799),
2814 FRAC_CONST(0.0081811396039371282),
2815 FRAC_CONST(0.011453472786443779),
2816 FRAC_CONST(0.014725683311458524),
2817 FRAC_CONST(0.017997736136235509),
2818 FRAC_CONST(0.021269596219717739),
2819 FRAC_CONST(0.024541228522912285),
2820 FRAC_CONST(0.027812598009265607),
2821 FRAC_CONST(0.03108366964503869),
2822 FRAC_CONST(0.034354408399682276),
2823 FRAC_CONST(0.037624779246211978),
2824 FRAC_CONST(0.04089474716158345),
2825 FRAC_CONST(0.044164277127067358),
2826 FRAC_CONST(0.047433334128624507),
2827 FRAC_CONST(0.050701883157280733),
2828 FRAC_CONST(0.053969889209501881),
2829 FRAC_CONST(0.057237317287568618),
2830 FRAC_CONST(0.060504132399951269),
2831 FRAC_CONST(0.063770299561684493),
2832 FRAC_CONST(0.06703578379474201),
2833 FRAC_CONST(0.070300550128411174),
2834 FRAC_CONST(0.073564563599667426),
2835 FRAC_CONST(0.076827789253548759),
2836 FRAC_CONST(0.080090192143530081),
2837 FRAC_CONST(0.083351737331897449),
2838 FRAC_CONST(0.086612389890122182),
2839 FRAC_CONST(0.089872114899234967),
2840 FRAC_CONST(0.093130877450199795),
2841 FRAC_CONST(0.096388642644287828),
2842 FRAC_CONST(0.09964537559345106),
2843 FRAC_CONST(0.1029010414206961),
2844 FRAC_CONST(0.10615560526045748),
2845 FRAC_CONST(0.10940903225897117),
2846 FRAC_CONST(0.11266128757464781),
2847 FRAC_CONST(0.11591233637844581),
2848 FRAC_CONST(0.11916214385424433),
2849 FRAC_CONST(0.1224106751992162),
2850 FRAC_CONST(0.12565789562420052),
2851 FRAC_CONST(0.12890377035407541),
2852 FRAC_CONST(0.13214826462813015),
2853 FRAC_CONST(0.13539134370043773),
2854 FRAC_CONST(0.13863297284022669),
2855 FRAC_CONST(0.14187311733225325),
2856 FRAC_CONST(0.14511174247717309),
2857 FRAC_CONST(0.14834881359191271),
2858 FRAC_CONST(0.15158429601004111),
2859 FRAC_CONST(0.15481815508214106),
2860 FRAC_CONST(0.1580503561761798),
2861 FRAC_CONST(0.16128086467788047),
2862 FRAC_CONST(0.16450964599109233),
2863 FRAC_CONST(0.16773666553816149),
2864 FRAC_CONST(0.17096188876030122),
2865 FRAC_CONST(0.17418528111796186),
2866 FRAC_CONST(0.17740680809120093),
2867 FRAC_CONST(0.18062643518005275),
2868 FRAC_CONST(0.18384412790489776),
2869 FRAC_CONST(0.18705985180683199),
2870 FRAC_CONST(0.19027357244803589),
2871 FRAC_CONST(0.19348525541214331),
2872 FRAC_CONST(0.19669486630460997),
2873 FRAC_CONST(0.19990237075308173),
2874 FRAC_CONST(0.20310773440776286),
2875 FRAC_CONST(0.20631092294178383),
2876 FRAC_CONST(0.20951190205156878),
2877 FRAC_CONST(0.21271063745720317),
2878 FRAC_CONST(0.21590709490280058),
2879 FRAC_CONST(0.2191012401568698),
2880 FRAC_CONST(0.22229303901268133),
2881 FRAC_CONST(0.22548245728863364),
2882 FRAC_CONST(0.22866946082861941),
2883 FRAC_CONST(0.23185401550239115),
2884 FRAC_CONST(0.23503608720592667),
2885 FRAC_CONST(0.23821564186179459),
2886 FRAC_CONST(0.24139264541951888),
2887 FRAC_CONST(0.24456706385594387),
2888 FRAC_CONST(0.24773886317559846),
2889 FRAC_CONST(0.25090800941106001),
2890 FRAC_CONST(0.25407446862331851),
2891 FRAC_CONST(0.25723820690213967),
2892 FRAC_CONST(0.26039919036642817),
2893 FRAC_CONST(0.26355738516459076),
2894 FRAC_CONST(0.26671275747489837),
2895 FRAC_CONST(0.2698652735058486),
2896 FRAC_CONST(0.27301489949652735),
2897 FRAC_CONST(0.27616160171697068),
2898 FRAC_CONST(0.27930534646852595),
2899 FRAC_CONST(0.28244610008421245),
2900 FRAC_CONST(0.2855838289290823),
2901 FRAC_CONST(0.28871849940058025),
2902 FRAC_CONST(0.29185007792890405),
2903 FRAC_CONST(0.29497853097736348),
2904 FRAC_CONST(0.2981038250427398),
2905 FRAC_CONST(0.30122592665564446),
2906 FRAC_CONST(0.30434480238087736),
2907 FRAC_CONST(0.30746041881778519),
2908 FRAC_CONST(0.31057274260061901),
2909 FRAC_CONST(0.31368174039889146),
2910 FRAC_CONST(0.31678737891773395),
2911 FRAC_CONST(0.31988962489825296),
2912 FRAC_CONST(0.32298844511788638),
2913 FRAC_CONST(0.32608380639075912),
2914 FRAC_CONST(0.32917567556803889),
2915 FRAC_CONST(0.33226401953829071),
2916 FRAC_CONST(0.33534880522783189),
2917 FRAC_CONST(0.33842999960108583),
2918 FRAC_CONST(0.34150756966093632),
2919 FRAC_CONST(0.34458148244908043),
2920 FRAC_CONST(0.34765170504638188),
2921 FRAC_CONST(0.35071820457322322),
2922 FRAC_CONST(0.35378094818985806),
2923 FRAC_CONST(0.35683990309676283),
2924 FRAC_CONST(0.35989503653498811),
2925 FRAC_CONST(0.36294631578650921),
2926 FRAC_CONST(0.36599370817457672),
2927 FRAC_CONST(0.36903718106406647),
2928 FRAC_CONST(0.37207670186182878),
2929 FRAC_CONST(0.37511223801703802),
2930 FRAC_CONST(0.37814375702154046),
2931 FRAC_CONST(0.38117122641020335),
2932 FRAC_CONST(0.38419461376126157),
2933 FRAC_CONST(0.38721388669666562),
2934 FRAC_CONST(0.39022901288242801),
2935 FRAC_CONST(0.39323996002896966),
2936 FRAC_CONST(0.39624669589146555),
2937 FRAC_CONST(0.39924918827019029),
2938 FRAC_CONST(0.40224740501086254),
2939 FRAC_CONST(0.40524131400498986),
2940 FRAC_CONST(0.40823088319021217),
2941 FRAC_CONST(0.41121608055064529),
2942 FRAC_CONST(0.41419687411722372),
2943 FRAC_CONST(0.41717323196804335),
2944 FRAC_CONST(0.42014512222870243),
2945 FRAC_CONST(0.42311251307264408),
2946 FRAC_CONST(0.42607537272149631),
2947 FRAC_CONST(0.4290336694454126),
2948 FRAC_CONST(0.43198737156341183),
2949 FRAC_CONST(0.43493644744371707),
2950 FRAC_CONST(0.43788086550409511),
2951 FRAC_CONST(0.44082059421219388),
2952 FRAC_CONST(0.44375560208588088),
2953 FRAC_CONST(0.44668585769357955),
2954 FRAC_CONST(0.4496113296546066),
2955 FRAC_CONST(0.45253198663950756),
2956 FRAC_CONST(0.45544779737039259),
2957 FRAC_CONST(0.45835873062127125),
2958 FRAC_CONST(0.46126475521838717),
2959 FRAC_CONST(0.46416584004055156),
2960 FRAC_CONST(0.46706195401947659),
2961 FRAC_CONST(0.46995306614010829),
2962 FRAC_CONST(0.47283914544095862),
2963 FRAC_CONST(0.47572016101443682),
2964 FRAC_CONST(0.47859608200718085),
2965 FRAC_CONST(0.4814668776203872),
2966 FRAC_CONST(0.48433251711014125),
2967 FRAC_CONST(0.4871929697877464),
2968 FRAC_CONST(0.49004820502005247),
2969 FRAC_CONST(0.49289819222978404),
2970 FRAC_CONST(0.49574290089586776),
2971 FRAC_CONST(0.49858230055375902),
2972 FRAC_CONST(0.50141636079576901),
2973 FRAC_CONST(0.50424505127138919),
2974 FRAC_CONST(0.50706834168761705),
2975 FRAC_CONST(0.50988620180928057),
2976 FRAC_CONST(0.51269860145936175),
2977 FRAC_CONST(0.51550551051931948),
2978 FRAC_CONST(0.51830689892941317),
2979 FRAC_CONST(0.5211027366890234),
2980 FRAC_CONST(0.52389299385697385),
2981 FRAC_CONST(0.52667764055185196),
2982 FRAC_CONST(0.52945664695232897),
2983 FRAC_CONST(0.53222998329747884),
2984 FRAC_CONST(0.53499761988709726),
2985 FRAC_CONST(0.53775952708201991),
2986 FRAC_CONST(0.54051567530443978),
2987 FRAC_CONST(0.54326603503822357),
2988 FRAC_CONST(0.54601057682922816),
2989 FRAC_CONST(0.54874927128561579),
2990 FRAC_CONST(0.55148208907816942),
2991 FRAC_CONST(0.55420900094060566),
2992 FRAC_CONST(0.55692997766988939),
2993 FRAC_CONST(0.559644990126546),
2994 FRAC_CONST(0.56235400923497314),
2995 FRAC_CONST(0.56505700598375252),
2996 FRAC_CONST(0.56775395142596052),
2997 FRAC_CONST(0.57044481667947822),
2998 FRAC_CONST(0.57312957292730071),
2999 FRAC_CONST(0.57580819141784534),
3000 FRAC_CONST(0.57848064346525996),
3001 FRAC_CONST(0.58114690044973039),
3002 FRAC_CONST(0.58380693381778626),
3003 FRAC_CONST(0.58646071508260733),
3004 FRAC_CONST(0.58910821582432815),
3005 FRAC_CONST(0.5917494076903429),
3006 FRAC_CONST(0.5943842623956086),
3007 FRAC_CONST(0.59701275172294799),
3008 FRAC_CONST(0.59963484752335228),
3009 FRAC_CONST(0.60225052171628191),
3010 FRAC_CONST(0.60485974628996786),
3011 FRAC_CONST(0.60746249330171098),
3012 FRAC_CONST(0.61005873487818185),
3013 FRAC_CONST(0.61264844321571899),
3014 FRAC_CONST(0.61523159058062682),
3015 FRAC_CONST(0.61780814930947225),
3016 FRAC_CONST(0.62037809180938108),
3017 FRAC_CONST(0.62294139055833397),
3018 FRAC_CONST(0.6254980181054608),
3019 FRAC_CONST(0.62804794707133416),
3020 FRAC_CONST(0.63059115014826372),
3021 FRAC_CONST(0.63312760010058777),
3022 FRAC_CONST(0.63565726976496484),
3023 FRAC_CONST(0.63818013205066515),
3024 FRAC_CONST(0.64069615993986073),
3025 FRAC_CONST(0.64320532648791406),
3026 FRAC_CONST(0.64570760482366729),
3027 FRAC_CONST(0.64820296814972966),
3028 FRAC_CONST(0.65069138974276486),
3029 FRAC_CONST(0.65317284295377676),
3030 FRAC_CONST(0.65564730120839498),
3031 FRAC_CONST(0.65811473800715958),
3032 FRAC_CONST(0.660575126925805),
3033 FRAC_CONST(0.66302844161554231),
3034 FRAC_CONST(0.6654746558033422),
3035 FRAC_CONST(0.66791374329221598),
3036 FRAC_CONST(0.67034567796149647),
3037 FRAC_CONST(0.67277043376711676),
3038 FRAC_CONST(0.67518798474189046),
3039 FRAC_CONST(0.67759830499578866),
3040 FRAC_CONST(0.68000136871621808),
3041 FRAC_CONST(0.68239715016829683),
3042 FRAC_CONST(0.6847856236951303),
3043 FRAC_CONST(0.68716676371808583),
3044 FRAC_CONST(0.68954054473706683),
3045 FRAC_CONST(0.69190694133078579),
3046 FRAC_CONST(0.69426592815703603),
3047 FRAC_CONST(0.69661747995296419),
3048 FRAC_CONST(0.69896157153533944),
3049 FRAC_CONST(0.70129817780082437),
3050 FRAC_CONST(0.7036272737262429),
3051 FRAC_CONST(0.70594883436884903),
3052 FRAC_CONST(0.70826283486659336),
3053 FRAC_CONST(0.71056925043838959),
3054 FRAC_CONST(0.71286805638437978),
3055 FRAC_CONST(0.71515922808619936),
3056 FRAC_CONST(0.71744274100723993),
3057 FRAC_CONST(0.71971857069291278),
3058 FRAC_CONST(0.7219866927709101),
3059 FRAC_CONST(0.72424708295146689),
3060 FRAC_CONST(0.72649971702762028),
3061 FRAC_CONST(0.72874457087546896),
3062 FRAC_CONST(0.73098162045443171),
3063 FRAC_CONST(0.73321084180750484),
3064 FRAC_CONST(0.73543221106151868),
3065 FRAC_CONST(0.73764570442739286),
3066 FRAC_CONST(0.73985129820039208),
3067 FRAC_CONST(0.74204896876037885),
3068 FRAC_CONST(0.7442386925720671),
3069 FRAC_CONST(0.74642044618527381),
3070 FRAC_CONST(0.74859420623517081),
3071 FRAC_CONST(0.75075994944253421),
3072 FRAC_CONST(0.75291765261399446),
3073 FRAC_CONST(0.75506729264228367),
3074 FRAC_CONST(0.75720884650648446),
3075 FRAC_CONST(0.75934229127227548),
3076 FRAC_CONST(0.76146760409217706),
3077 FRAC_CONST(0.76358476220579641),
3078 FRAC_CONST(0.7656937429400712),
3079 FRAC_CONST(0.76779452370951196),
3080 FRAC_CONST(0.76988708201644451),
3081 FRAC_CONST(0.77197139545125026),
3082 FRAC_CONST(0.7740474416926072),
3083 FRAC_CONST(0.77611519850772781),
3084 FRAC_CONST(0.77817464375259782),
3085 FRAC_CONST(0.78022575537221317),
3086 FRAC_CONST(0.78226851140081632),
3087 FRAC_CONST(0.78430288996213138),
3088 FRAC_CONST(0.78632886926959822),
3089 FRAC_CONST(0.78834642762660623),
3090 FRAC_CONST(0.79035554342672631),
3091 FRAC_CONST(0.79235619515394229),
3092 FRAC_CONST(0.79434836138288134),
3093 FRAC_CONST(0.79633202077904397),
3094 FRAC_CONST(0.79830715209903147),
3095 FRAC_CONST(0.8002737341907743),
3096 FRAC_CONST(0.80223174599375802),
3097 FRAC_CONST(0.80418116653924954),
3098 FRAC_CONST(0.80612197495052085),
3099 FRAC_CONST(0.80805415044307316),
3100 FRAC_CONST(0.80997767232485907),
3101 FRAC_CONST(0.81189251999650469),
3102 FRAC_CONST(0.81379867295152986),
3103 FRAC_CONST(0.81569611077656778),
3104 FRAC_CONST(0.81758481315158371),
3105 FRAC_CONST(0.81946475985009259),
3106 FRAC_CONST(0.82133593073937561),
3107 FRAC_CONST(0.82319830578069586),
3108 FRAC_CONST(0.82505186502951278),
3109 FRAC_CONST(0.82689658863569615),
3110 FRAC_CONST(0.82873245684373809),
3111 FRAC_CONST(0.83055944999296494),
3112 FRAC_CONST(0.83237754851774781),
3113 FRAC_CONST(0.83418673294771239),
3114 FRAC_CONST(0.83598698390794668),
3115 FRAC_CONST(0.83777828211920935),
3116 FRAC_CONST(0.83956060839813562),
3117 FRAC_CONST(0.84133394365744296),
3118 FRAC_CONST(0.84309826890613537),
3119 FRAC_CONST(0.84485356524970701),
3120 FRAC_CONST(0.84659981389034411),
3121 FRAC_CONST(0.84833699612712676),
3122 FRAC_CONST(0.85006509335622882),
3123 FRAC_CONST(0.8517840870711173),
3124 FRAC_CONST(0.85349395886275037),
3125 FRAC_CONST(0.85519469041977514),
3126 FRAC_CONST(0.85688626352872277),
3127 FRAC_CONST(0.85856866007420429),
3128 FRAC_CONST(0.86024186203910447),
3129 FRAC_CONST(0.86190585150477417),
3130 FRAC_CONST(0.86356061065122347),
3131 FRAC_CONST(0.86520612175731115),
3132 FRAC_CONST(0.86684236720093533),
3133 FRAC_CONST(0.86846932945922151),
3134 FRAC_CONST(0.87008699110871135),
3135 FRAC_CONST(0.87169533482554817),
3136 FRAC_CONST(0.87329434338566281),
3137 FRAC_CONST(0.87488399966495822),
3138 FRAC_CONST(0.87646428663949283),
3139 FRAC_CONST(0.87803518738566277),
3140 FRAC_CONST(0.87959668508038291),
3141 FRAC_CONST(0.88114876300126743),
3142 FRAC_CONST(0.88269140452680916),
3143 FRAC_CONST(0.8842245931365561),
3144 FRAC_CONST(0.88574831241129048),
3145 FRAC_CONST(0.88726254603320276),
3146 FRAC_CONST(0.88876727778606746),
3147 FRAC_CONST(0.89026249155541637),
3148 FRAC_CONST(0.8917481713287112),
3149 FRAC_CONST(0.89322430119551532),
3150 FRAC_CONST(0.89469086534766362),
3151 FRAC_CONST(0.89614784807943237),
3152 FRAC_CONST(0.89759523378770689),
3153 FRAC_CONST(0.89903300697214927),
3154 FRAC_CONST(0.9004611522353636),
3155 FRAC_CONST(0.90187965428306172),
3156 FRAC_CONST(0.90328849792422594),
3157 FRAC_CONST(0.90468766807127299),
3158 FRAC_CONST(0.90607714974021469),
3159 FRAC_CONST(0.90745692805081868),
3160 FRAC_CONST(0.90882698822676755),
3161 FRAC_CONST(0.91018731559581767),
3162 FRAC_CONST(0.91153789558995579),
3163 FRAC_CONST(0.91287871374555518),
3164 FRAC_CONST(0.91420975570353069),
3165 FRAC_CONST(0.9155310072094921),
3166 FRAC_CONST(0.91684245411389753),
3167 FRAC_CONST(0.91814408237220391),
3168 FRAC_CONST(0.91943587804501858),
3169 FRAC_CONST(0.92071782729824769),
3170 FRAC_CONST(0.92198991640324446),
3171 FRAC_CONST(0.92325213173695675),
3172 FRAC_CONST(0.92450445978207241),
3173 FRAC_CONST(0.92574688712716402),
3174 FRAC_CONST(0.92697940046683291),
3175 FRAC_CONST(0.92820198660185149),
3176 FRAC_CONST(0.92941463243930444),
3177 FRAC_CONST(0.93061732499272909),
3178 FRAC_CONST(0.93181005138225426),
3179 FRAC_CONST(0.93299279883473885),
3180 FRAC_CONST(0.93416555468390772),
3181 FRAC_CONST(0.93532830637048769),
3182 FRAC_CONST(0.93648104144234268),
3183 FRAC_CONST(0.93762374755460598),
3184 FRAC_CONST(0.93875641246981323),
3185 FRAC_CONST(0.93987902405803303),
3186 FRAC_CONST(0.94099157029699743),
3187 FRAC_CONST(0.94209403927222979),
3188 FRAC_CONST(0.94318641917717327),
3189 FRAC_CONST(0.9442686983133165),
3190 FRAC_CONST(0.94534086509031956),
3191 FRAC_CONST(0.9464029080261378),
3192 FRAC_CONST(0.94745481574714419),
3193 FRAC_CONST(0.94849657698825252),
3194 FRAC_CONST(0.94952818059303667),
3195 FRAC_CONST(0.95054961551385087),
3196 FRAC_CONST(0.95156087081194762),
3197 FRAC_CONST(0.95256193565759528),
3198 FRAC_CONST(0.95355279933019343),
3199 FRAC_CONST(0.9545334512183884),
3200 FRAC_CONST(0.95550388082018611),
3201 FRAC_CONST(0.95646407774306541),
3202 FRAC_CONST(0.95741403170408834),
3203 FRAC_CONST(0.95835373253001133),
3204 FRAC_CONST(0.95928317015739362),
3205 FRAC_CONST(0.96020233463270466),
3206 FRAC_CONST(0.96111121611243155),
3207 FRAC_CONST(0.96200980486318388),
3208 FRAC_CONST(0.96289809126179782),
3209 FRAC_CONST(0.96377606579543984),
3210 FRAC_CONST(0.96464371906170809),
3211 FRAC_CONST(0.96550104176873297),
3212 FRAC_CONST(0.96634802473527726),
3213 FRAC_CONST(0.96718465889083372),
3214 FRAC_CONST(0.96801093527572268),
3215 FRAC_CONST(0.96882684504118799),
3216 FRAC_CONST(0.96963237944949143),
3217 FRAC_CONST(0.97042752987400682),
3218 FRAC_CONST(0.97121228779931179),
3219 FRAC_CONST(0.97198664482127939),
3220 FRAC_CONST(0.97275059264716823),
3221 FRAC_CONST(0.97350412309571066),
3222 FRAC_CONST(0.97424722809720088),
3223 FRAC_CONST(0.97497989969358168),
3224 FRAC_CONST(0.97570213003852857),
3225 FRAC_CONST(0.97641391139753486),
3226 FRAC_CONST(0.97711523614799412),
3227 FRAC_CONST(0.97780609677928154),
3228 FRAC_CONST(0.97848648589283505),
3229 FRAC_CONST(0.97915639620223371),
3230 FRAC_CONST(0.9798158205332762),
3231 FRAC_CONST(0.98046475182405801),
3232 FRAC_CONST(0.98110318312504607),
3233 FRAC_CONST(0.98173110759915416),
3234 FRAC_CONST(0.98234851852181571),
3235 FRAC_CONST(0.98295540928105563),
3236 FRAC_CONST(0.9835517733775615),
3237 FRAC_CONST(0.98413760442475307),
3238 FRAC_CONST(0.98471289614885038),
3239 FRAC_CONST(0.98527764238894122),
3240 FRAC_CONST(0.98583183709704714),
3241 FRAC_CONST(0.98637547433818806),
3242 FRAC_CONST(0.98690854829044583),
3243 FRAC_CONST(0.98743105324502667),
3244 FRAC_CONST(0.98794298360632238),
3245 FRAC_CONST(0.98844433389196995),
3246 FRAC_CONST(0.98893509873291074),
3247 FRAC_CONST(0.98941527287344755),
3248 FRAC_CONST(0.98988485117130098),
3249 FRAC_CONST(0.99034382859766479),
3250 FRAC_CONST(0.99079220023725967),
3251 FRAC_CONST(0.99122996128838525),
3252 FRAC_CONST(0.9916571070629725),
3253 FRAC_CONST(0.99207363298663342),
3254 FRAC_CONST(0.99247953459870997),
3255 FRAC_CONST(0.99287480755232194),
3256 FRAC_CONST(0.99325944761441354),
3257 FRAC_CONST(0.99363345066579889),
3258 FRAC_CONST(0.99399681270120555),
3259 FRAC_CONST(0.99434952982931812),
3260 FRAC_CONST(0.9946915982728195),
3261 FRAC_CONST(0.99502301436843166),
3262 FRAC_CONST(0.99534377456695422),
3263 FRAC_CONST(0.9956538754333033),
3264 FRAC_CONST(0.99595331364654771),
3265 FRAC_CONST(0.99624208599994479),
3266 FRAC_CONST(0.99652018940097464),
3267 FRAC_CONST(0.99678762087137318),
3268 FRAC_CONST(0.99704437754716424),
3269 FRAC_CONST(0.99729045667869021),
3270 FRAC_CONST(0.99752585563064111),
3271 FRAC_CONST(0.99775057188208349),
3272 FRAC_CONST(0.9979646030264866),
3273 FRAC_CONST(0.99816794677174903),
3274 FRAC_CONST(0.9983606009402225),
3275 FRAC_CONST(0.99854256346873571),
3276 FRAC_CONST(0.99871383240861611),
3277 FRAC_CONST(0.99887440592571108),
3278 FRAC_CONST(0.99902428230040718),
3279 FRAC_CONST(0.99916345992764877),
3280 FRAC_CONST(0.99929193731695531),
3281 FRAC_CONST(0.99940971309243731),
3282 FRAC_CONST(0.99951678599281069),
3283 FRAC_CONST(0.99961315487141078),
3284 FRAC_CONST(0.99969881869620425),
3285 FRAC_CONST(0.99977377654980037),
3286 FRAC_CONST(0.99983802762946083),
3287 FRAC_CONST(0.99989157124710804),
3288 FRAC_CONST(0.9999344068293331),
3289 FRAC_CONST(0.99996653391740109),
3290 FRAC_CONST(0.99998795216725689),
3291 FRAC_CONST(0.99999866134952808)
3292};
3293#endif
3294
3295ALIGN static const real_t ld_mid_512[] =
3296{
3297 FRAC_CONST(0),
3298 FRAC_CONST(0),
3299 FRAC_CONST(0),
3300 FRAC_CONST(0),
3301 FRAC_CONST(0),
3302 FRAC_CONST(0),
3303 FRAC_CONST(0),
3304 FRAC_CONST(0),
3305 FRAC_CONST(0),
3306 FRAC_CONST(0),
3307 FRAC_CONST(0),
3308 FRAC_CONST(0),
3309 FRAC_CONST(0),
3310 FRAC_CONST(0),
3311 FRAC_CONST(0),
3312 FRAC_CONST(0),
3313 FRAC_CONST(0),
3314 FRAC_CONST(0),
3315 FRAC_CONST(0),
3316 FRAC_CONST(0),
3317 FRAC_CONST(0),
3318 FRAC_CONST(0),
3319 FRAC_CONST(0),
3320 FRAC_CONST(0),
3321 FRAC_CONST(0),
3322 FRAC_CONST(0),
3323 FRAC_CONST(0),
3324 FRAC_CONST(0),
3325 FRAC_CONST(0),
3326 FRAC_CONST(0),
3327 FRAC_CONST(0),
3328 FRAC_CONST(0),
3329 FRAC_CONST(0),
3330 FRAC_CONST(0),
3331 FRAC_CONST(0),
3332 FRAC_CONST(0),
3333 FRAC_CONST(0),
3334 FRAC_CONST(0),
3335 FRAC_CONST(0),
3336 FRAC_CONST(0),
3337 FRAC_CONST(0),
3338 FRAC_CONST(0),
3339 FRAC_CONST(0),
3340 FRAC_CONST(0),
3341 FRAC_CONST(0),
3342 FRAC_CONST(0),
3343 FRAC_CONST(0),
3344 FRAC_CONST(0),
3345 FRAC_CONST(0),
3346 FRAC_CONST(0),
3347 FRAC_CONST(0),
3348 FRAC_CONST(0),
3349 FRAC_CONST(0),
3350 FRAC_CONST(0),
3351 FRAC_CONST(0),
3352 FRAC_CONST(0),
3353 FRAC_CONST(0),
3354 FRAC_CONST(0),
3355 FRAC_CONST(0),
3356 FRAC_CONST(0),
3357 FRAC_CONST(0),
3358 FRAC_CONST(0),
3359 FRAC_CONST(0),
3360 FRAC_CONST(0),
3361 FRAC_CONST(0),
3362 FRAC_CONST(0),
3363 FRAC_CONST(0),
3364 FRAC_CONST(0),
3365 FRAC_CONST(0),
3366 FRAC_CONST(0),
3367 FRAC_CONST(0),
3368 FRAC_CONST(0),
3369 FRAC_CONST(0),
3370 FRAC_CONST(0),
3371 FRAC_CONST(0),
3372 FRAC_CONST(0),
3373 FRAC_CONST(0),
3374 FRAC_CONST(0),
3375 FRAC_CONST(0),
3376 FRAC_CONST(0),
3377 FRAC_CONST(0),
3378 FRAC_CONST(0),
3379 FRAC_CONST(0),
3380 FRAC_CONST(0),
3381 FRAC_CONST(0),
3382 FRAC_CONST(0),
3383 FRAC_CONST(0),
3384 FRAC_CONST(0),
3385 FRAC_CONST(0),
3386 FRAC_CONST(0),
3387 FRAC_CONST(0),
3388 FRAC_CONST(0),
3389 FRAC_CONST(0),
3390 FRAC_CONST(0),
3391 FRAC_CONST(0),
3392 FRAC_CONST(0),
3393 FRAC_CONST(0),
3394 FRAC_CONST(0),
3395 FRAC_CONST(0),
3396 FRAC_CONST(0),
3397 FRAC_CONST(0),
3398 FRAC_CONST(0),
3399 FRAC_CONST(0),
3400 FRAC_CONST(0),
3401 FRAC_CONST(0),
3402 FRAC_CONST(0),
3403 FRAC_CONST(0),
3404 FRAC_CONST(0),
3405 FRAC_CONST(0),
3406 FRAC_CONST(0),
3407 FRAC_CONST(0),
3408 FRAC_CONST(0),
3409 FRAC_CONST(0),
3410 FRAC_CONST(0),
3411 FRAC_CONST(0),
3412 FRAC_CONST(0),
3413 FRAC_CONST(0),
3414 FRAC_CONST(0),
3415 FRAC_CONST(0),
3416 FRAC_CONST(0),
3417 FRAC_CONST(0),
3418 FRAC_CONST(0),
3419 FRAC_CONST(0),
3420 FRAC_CONST(0),
3421 FRAC_CONST(0),
3422 FRAC_CONST(0),
3423 FRAC_CONST(0),
3424 FRAC_CONST(0),
3425 FRAC_CONST(0),
3426 FRAC_CONST(0),
3427 FRAC_CONST(0),
3428 FRAC_CONST(0),
3429 FRAC_CONST(0),
3430 FRAC_CONST(0),
3431 FRAC_CONST(0),
3432 FRAC_CONST(0),
3433 FRAC_CONST(0),
3434 FRAC_CONST(0),
3435 FRAC_CONST(0),
3436 FRAC_CONST(0),
3437 FRAC_CONST(0),
3438 FRAC_CONST(0),
3439 FRAC_CONST(0),
3440 FRAC_CONST(0),
3441 FRAC_CONST(0),
3442 FRAC_CONST(0),
3443 FRAC_CONST(0),
3444 FRAC_CONST(0),
3445 FRAC_CONST(0),
3446 FRAC_CONST(0),
3447 FRAC_CONST(0),
3448 FRAC_CONST(0),
3449 FRAC_CONST(0),
3450 FRAC_CONST(0),
3451 FRAC_CONST(0),
3452 FRAC_CONST(0),
3453 FRAC_CONST(0),
3454 FRAC_CONST(0),
3455 FRAC_CONST(0),
3456 FRAC_CONST(0),
3457 FRAC_CONST(0),
3458 FRAC_CONST(0),
3459 FRAC_CONST(0),
3460 FRAC_CONST(0),
3461 FRAC_CONST(0),
3462 FRAC_CONST(0),
3463 FRAC_CONST(0),
3464 FRAC_CONST(0),
3465 FRAC_CONST(0),
3466 FRAC_CONST(0),
3467 FRAC_CONST(0),
3468 FRAC_CONST(0),
3469 FRAC_CONST(0),
3470 FRAC_CONST(0),
3471 FRAC_CONST(0),
3472 FRAC_CONST(0),
3473 FRAC_CONST(0),
3474 FRAC_CONST(0),
3475 FRAC_CONST(0),
3476 FRAC_CONST(0),
3477 FRAC_CONST(0),
3478 FRAC_CONST(0),
3479 FRAC_CONST(0),
3480 FRAC_CONST(0),
3481 FRAC_CONST(0),
3482 FRAC_CONST(0),
3483 FRAC_CONST(0),
3484 FRAC_CONST(0),
3485 FRAC_CONST(0),
3486 FRAC_CONST(0),
3487 FRAC_CONST(0),
3488 FRAC_CONST(0),
3489 FRAC_CONST(0.0061358846491544753),
3490 FRAC_CONST(0.01840672990580482),
3491 FRAC_CONST(0.030674803176636626),
3492 FRAC_CONST(0.04293825693494082),
3493 FRAC_CONST(0.055195244349689934),
3494 FRAC_CONST(0.067443919563664051),
3495 FRAC_CONST(0.079682437971430126),
3496 FRAC_CONST(0.091908956497132724),
3497 FRAC_CONST(0.10412163387205459),
3498 FRAC_CONST(0.11631863091190475),
3499 FRAC_CONST(0.12849811079379317),
3500 FRAC_CONST(0.14065823933284921),
3501 FRAC_CONST(0.15279718525844344),
3502 FRAC_CONST(0.16491312048996989),
3503 FRAC_CONST(0.17700422041214875),
3504 FRAC_CONST(0.18906866414980619),
3505 FRAC_CONST(0.2011046348420919),
3506 FRAC_CONST(0.21311031991609136),
3507 FRAC_CONST(0.22508391135979283),
3508 FRAC_CONST(0.2370236059943672),
3509 FRAC_CONST(0.24892760574572015),
3510 FRAC_CONST(0.26079411791527551),
3511 FRAC_CONST(0.27262135544994898),
3512 FRAC_CONST(0.28440753721127188),
3513 FRAC_CONST(0.29615088824362379),
3514 FRAC_CONST(0.30784964004153487),
3515 FRAC_CONST(0.31950203081601569),
3516 FRAC_CONST(0.33110630575987643),
3517 FRAC_CONST(0.34266071731199438),
3518 FRAC_CONST(0.35416352542049034),
3519 FRAC_CONST(0.36561299780477385),
3520 FRAC_CONST(0.37700741021641826),
3521 FRAC_CONST(0.38834504669882625),
3522 FRAC_CONST(0.39962419984564679),
3523 FRAC_CONST(0.41084317105790391),
3524 FRAC_CONST(0.42200027079979968),
3525 FRAC_CONST(0.43309381885315196),
3526 FRAC_CONST(0.4441221445704292),
3527 FRAC_CONST(0.45508358712634384),
3528 FRAC_CONST(0.46597649576796618),
3529 FRAC_CONST(0.47679923006332209),
3530 FRAC_CONST(0.487550160148436),
3531 FRAC_CONST(0.49822766697278187),
3532 FRAC_CONST(0.50883014254310699),
3533 FRAC_CONST(0.51935599016558964),
3534 FRAC_CONST(0.52980362468629461),
3535 FRAC_CONST(0.54017147272989285),
3536 FRAC_CONST(0.55045797293660481),
3537 FRAC_CONST(0.56066157619733603),
3538 FRAC_CONST(0.57078074588696726),
3539 FRAC_CONST(0.58081395809576453),
3540 FRAC_CONST(0.59075970185887416),
3541 FRAC_CONST(0.60061647938386897),
3542 FRAC_CONST(0.61038280627630948),
3543 FRAC_CONST(0.6200572117632891),
3544 FRAC_CONST(0.62963823891492698),
3545 FRAC_CONST(0.63912444486377573),
3546 FRAC_CONST(0.64851440102211244),
3547 FRAC_CONST(0.65780669329707864),
3548 FRAC_CONST(0.66699992230363747),
3549 FRAC_CONST(0.67609270357531592),
3550 FRAC_CONST(0.68508366777270036),
3551 FRAC_CONST(0.693971460889654),
3552 FRAC_CONST(0.7027547444572253),
3553 FRAC_CONST(0.71143219574521643),
3554 FRAC_CONST(0.72000250796138165),
3555 FRAC_CONST(0.7284643904482252),
3556 FRAC_CONST(0.73681656887736979),
3557 FRAC_CONST(0.74505778544146595),
3558 FRAC_CONST(0.75318679904361241),
3559 FRAC_CONST(0.76120238548426178),
3560 FRAC_CONST(0.76910333764557959),
3561 FRAC_CONST(0.77688846567323244),
3562 FRAC_CONST(0.78455659715557524),
3563 FRAC_CONST(0.79210657730021239),
3564 FRAC_CONST(0.79953726910790501),
3565 FRAC_CONST(0.80684755354379922),
3566 FRAC_CONST(0.8140363297059483),
3567 FRAC_CONST(0.82110251499110465),
3568 FRAC_CONST(0.8280450452577558),
3569 FRAC_CONST(0.83486287498638001),
3570 FRAC_CONST(0.84155497743689833),
3571 FRAC_CONST(0.84812034480329712),
3572 FRAC_CONST(0.85455798836540053),
3573 FRAC_CONST(0.86086693863776731),
3574 FRAC_CONST(0.86704624551569265),
3575 FRAC_CONST(0.87309497841829009),
3576 FRAC_CONST(0.87901222642863341),
3577 FRAC_CONST(0.88479709843093779),
3578 FRAC_CONST(0.89044872324475788),
3579 FRAC_CONST(0.89596624975618511),
3580 FRAC_CONST(0.90134884704602203),
3581 FRAC_CONST(0.90659570451491533),
3582 FRAC_CONST(0.91170603200542988),
3583 FRAC_CONST(0.9166790599210427),
3584 FRAC_CONST(0.9215140393420419),
3585 FRAC_CONST(0.92621024213831127),
3586 FRAC_CONST(0.93076696107898371),
3587 FRAC_CONST(0.9351835099389475),
3588 FRAC_CONST(0.93945922360218992),
3589 FRAC_CONST(0.94359345816196039),
3590 FRAC_CONST(0.94758559101774109),
3591 FRAC_CONST(0.95143502096900834),
3592 FRAC_CONST(0.95514116830577067),
3593 FRAC_CONST(0.9587034748958716),
3594 FRAC_CONST(0.96212140426904158),
3595 FRAC_CONST(0.9653944416976894),
3596 FRAC_CONST(0.96852209427441727),
3597 FRAC_CONST(0.97150389098625178),
3598 FRAC_CONST(0.97433938278557586),
3599 FRAC_CONST(0.97702814265775439),
3600 FRAC_CONST(0.97956976568544052),
3601 FRAC_CONST(0.98196386910955524),
3602 FRAC_CONST(0.98421009238692903),
3603 FRAC_CONST(0.98630809724459867),
3604 FRAC_CONST(0.98825756773074946),
3605 FRAC_CONST(0.99005821026229712),
3606 FRAC_CONST(0.99170975366909953),
3607 FRAC_CONST(0.9932119492347945),
3608 FRAC_CONST(0.99456457073425542),
3609 FRAC_CONST(0.99576741446765982),
3610 FRAC_CONST(0.99682029929116567),
3611 FRAC_CONST(0.99772306664419164),
3612 FRAC_CONST(0.99847558057329477),
3613 FRAC_CONST(0.99907772775264536),
3614 FRAC_CONST(0.99952941750109314),
3615 FRAC_CONST(0.9998305817958234),
3616 FRAC_CONST(0.99998117528260111),
3617 FRAC_CONST(1),
3618 FRAC_CONST(1),
3619 FRAC_CONST(1),
3620 FRAC_CONST(1),
3621 FRAC_CONST(1),
3622 FRAC_CONST(1),
3623 FRAC_CONST(1),
3624 FRAC_CONST(1),
3625 FRAC_CONST(1),
3626 FRAC_CONST(1),
3627 FRAC_CONST(1),
3628 FRAC_CONST(1),
3629 FRAC_CONST(1),
3630 FRAC_CONST(1),
3631 FRAC_CONST(1),
3632 FRAC_CONST(1),
3633 FRAC_CONST(1),
3634 FRAC_CONST(1),
3635 FRAC_CONST(1),
3636 FRAC_CONST(1),
3637 FRAC_CONST(1),
3638 FRAC_CONST(1),
3639 FRAC_CONST(1),
3640 FRAC_CONST(1),
3641 FRAC_CONST(1),
3642 FRAC_CONST(1),
3643 FRAC_CONST(1),
3644 FRAC_CONST(1),
3645 FRAC_CONST(1),
3646 FRAC_CONST(1),
3647 FRAC_CONST(1),
3648 FRAC_CONST(1),
3649 FRAC_CONST(1),
3650 FRAC_CONST(1),
3651 FRAC_CONST(1),
3652 FRAC_CONST(1),
3653 FRAC_CONST(1),
3654 FRAC_CONST(1),
3655 FRAC_CONST(1),
3656 FRAC_CONST(1),
3657 FRAC_CONST(1),
3658 FRAC_CONST(1),
3659 FRAC_CONST(1),
3660 FRAC_CONST(1),
3661 FRAC_CONST(1),
3662 FRAC_CONST(1),
3663 FRAC_CONST(1),
3664 FRAC_CONST(1),
3665 FRAC_CONST(1),
3666 FRAC_CONST(1),
3667 FRAC_CONST(1),
3668 FRAC_CONST(1),
3669 FRAC_CONST(1),
3670 FRAC_CONST(1),
3671 FRAC_CONST(1),
3672 FRAC_CONST(1),
3673 FRAC_CONST(1),
3674 FRAC_CONST(1),
3675 FRAC_CONST(1),
3676 FRAC_CONST(1),
3677 FRAC_CONST(1),
3678 FRAC_CONST(1),
3679 FRAC_CONST(1),
3680 FRAC_CONST(1),
3681 FRAC_CONST(1),
3682 FRAC_CONST(1),
3683 FRAC_CONST(1),
3684 FRAC_CONST(1),
3685 FRAC_CONST(1),
3686 FRAC_CONST(1),
3687 FRAC_CONST(1),
3688 FRAC_CONST(1),
3689 FRAC_CONST(1),
3690 FRAC_CONST(1),
3691 FRAC_CONST(1),
3692 FRAC_CONST(1),
3693 FRAC_CONST(1),
3694 FRAC_CONST(1),
3695 FRAC_CONST(1),
3696 FRAC_CONST(1),
3697 FRAC_CONST(1),
3698 FRAC_CONST(1),
3699 FRAC_CONST(1),
3700 FRAC_CONST(1),
3701 FRAC_CONST(1),
3702 FRAC_CONST(1),
3703 FRAC_CONST(1),
3704 FRAC_CONST(1),
3705 FRAC_CONST(1),
3706 FRAC_CONST(1),
3707 FRAC_CONST(1),
3708 FRAC_CONST(1),
3709 FRAC_CONST(1),
3710 FRAC_CONST(1),
3711 FRAC_CONST(1),
3712 FRAC_CONST(1),
3713 FRAC_CONST(1),
3714 FRAC_CONST(1),
3715 FRAC_CONST(1),
3716 FRAC_CONST(1),
3717 FRAC_CONST(1),
3718 FRAC_CONST(1),
3719 FRAC_CONST(1),
3720 FRAC_CONST(1),
3721 FRAC_CONST(1),
3722 FRAC_CONST(1),
3723 FRAC_CONST(1),
3724 FRAC_CONST(1),
3725 FRAC_CONST(1),
3726 FRAC_CONST(1),
3727 FRAC_CONST(1),
3728 FRAC_CONST(1),
3729 FRAC_CONST(1),
3730 FRAC_CONST(1),
3731 FRAC_CONST(1),
3732 FRAC_CONST(1),
3733 FRAC_CONST(1),
3734 FRAC_CONST(1),
3735 FRAC_CONST(1),
3736 FRAC_CONST(1),
3737 FRAC_CONST(1),
3738 FRAC_CONST(1),
3739 FRAC_CONST(1),
3740 FRAC_CONST(1),
3741 FRAC_CONST(1),
3742 FRAC_CONST(1),
3743 FRAC_CONST(1),
3744 FRAC_CONST(1),
3745 FRAC_CONST(1),
3746 FRAC_CONST(1),
3747 FRAC_CONST(1),
3748 FRAC_CONST(1),
3749 FRAC_CONST(1),
3750 FRAC_CONST(1),
3751 FRAC_CONST(1),
3752 FRAC_CONST(1),
3753 FRAC_CONST(1),
3754 FRAC_CONST(1),
3755 FRAC_CONST(1),
3756 FRAC_CONST(1),
3757 FRAC_CONST(1),
3758 FRAC_CONST(1),
3759 FRAC_CONST(1),
3760 FRAC_CONST(1),
3761 FRAC_CONST(1),
3762 FRAC_CONST(1),
3763 FRAC_CONST(1),
3764 FRAC_CONST(1),
3765 FRAC_CONST(1),
3766 FRAC_CONST(1),
3767 FRAC_CONST(1),
3768 FRAC_CONST(1),
3769 FRAC_CONST(1),
3770 FRAC_CONST(1),
3771 FRAC_CONST(1),
3772 FRAC_CONST(1),
3773 FRAC_CONST(1),
3774 FRAC_CONST(1),
3775 FRAC_CONST(1),
3776 FRAC_CONST(1),
3777 FRAC_CONST(1),
3778 FRAC_CONST(1),
3779 FRAC_CONST(1),
3780 FRAC_CONST(1),
3781 FRAC_CONST(1),
3782 FRAC_CONST(1),
3783 FRAC_CONST(1),
3784 FRAC_CONST(1),
3785 FRAC_CONST(1),
3786 FRAC_CONST(1),
3787 FRAC_CONST(1),
3788 FRAC_CONST(1),
3789 FRAC_CONST(1),
3790 FRAC_CONST(1),
3791 FRAC_CONST(1),
3792 FRAC_CONST(1),
3793 FRAC_CONST(1),
3794 FRAC_CONST(1),
3795 FRAC_CONST(1),
3796 FRAC_CONST(1),
3797 FRAC_CONST(1),
3798 FRAC_CONST(1),
3799 FRAC_CONST(1),
3800 FRAC_CONST(1),
3801 FRAC_CONST(1),
3802 FRAC_CONST(1),
3803 FRAC_CONST(1),
3804 FRAC_CONST(1),
3805 FRAC_CONST(1),
3806 FRAC_CONST(1),
3807 FRAC_CONST(1),
3808 FRAC_CONST(1)
3809};
3810
3811#ifdef ALLOW_SMALL_FRAMELENGTH
3812ALIGN static const real_t ld_mid_480[] =
3813{
3814 FRAC_CONST(0),
3815 FRAC_CONST(0),
3816 FRAC_CONST(0),
3817 FRAC_CONST(0),
3818 FRAC_CONST(0),
3819 FRAC_CONST(0),
3820 FRAC_CONST(0),
3821 FRAC_CONST(0),
3822 FRAC_CONST(0),
3823 FRAC_CONST(0),
3824 FRAC_CONST(0),
3825 FRAC_CONST(0),
3826 FRAC_CONST(0),
3827 FRAC_CONST(0),
3828 FRAC_CONST(0),
3829 FRAC_CONST(0),
3830 FRAC_CONST(0),
3831 FRAC_CONST(0),
3832 FRAC_CONST(0),
3833 FRAC_CONST(0),
3834 FRAC_CONST(0),
3835 FRAC_CONST(0),
3836 FRAC_CONST(0),
3837 FRAC_CONST(0),
3838 FRAC_CONST(0),
3839 FRAC_CONST(0),
3840 FRAC_CONST(0),
3841 FRAC_CONST(0),
3842 FRAC_CONST(0),
3843 FRAC_CONST(0),
3844 FRAC_CONST(0),
3845 FRAC_CONST(0),
3846 FRAC_CONST(0),
3847 FRAC_CONST(0),
3848 FRAC_CONST(0),
3849 FRAC_CONST(0),
3850 FRAC_CONST(0),
3851 FRAC_CONST(0),
3852 FRAC_CONST(0),
3853 FRAC_CONST(0),
3854 FRAC_CONST(0),
3855 FRAC_CONST(0),
3856 FRAC_CONST(0),
3857 FRAC_CONST(0),
3858 FRAC_CONST(0),
3859 FRAC_CONST(0),
3860 FRAC_CONST(0),
3861 FRAC_CONST(0),
3862 FRAC_CONST(0),
3863 FRAC_CONST(0),
3864 FRAC_CONST(0),
3865 FRAC_CONST(0),
3866 FRAC_CONST(0),
3867 FRAC_CONST(0),
3868 FRAC_CONST(0),
3869 FRAC_CONST(0),
3870 FRAC_CONST(0),
3871 FRAC_CONST(0),
3872 FRAC_CONST(0),
3873 FRAC_CONST(0),
3874 FRAC_CONST(0),
3875 FRAC_CONST(0),
3876 FRAC_CONST(0),
3877 FRAC_CONST(0),
3878 FRAC_CONST(0),
3879 FRAC_CONST(0),
3880 FRAC_CONST(0),
3881 FRAC_CONST(0),
3882 FRAC_CONST(0),
3883 FRAC_CONST(0),
3884 FRAC_CONST(0),
3885 FRAC_CONST(0),
3886 FRAC_CONST(0),
3887 FRAC_CONST(0),
3888 FRAC_CONST(0),
3889 FRAC_CONST(0),
3890 FRAC_CONST(0),
3891 FRAC_CONST(0),
3892 FRAC_CONST(0),
3893 FRAC_CONST(0),
3894 FRAC_CONST(0),
3895 FRAC_CONST(0),
3896 FRAC_CONST(0),
3897 FRAC_CONST(0),
3898 FRAC_CONST(0),
3899 FRAC_CONST(0),
3900 FRAC_CONST(0),
3901 FRAC_CONST(0),
3902 FRAC_CONST(0),
3903 FRAC_CONST(0),
3904 FRAC_CONST(0),
3905 FRAC_CONST(0),
3906 FRAC_CONST(0),
3907 FRAC_CONST(0),
3908 FRAC_CONST(0),
3909 FRAC_CONST(0),
3910 FRAC_CONST(0),
3911 FRAC_CONST(0),
3912 FRAC_CONST(0),
3913 FRAC_CONST(0),
3914 FRAC_CONST(0),
3915 FRAC_CONST(0),
3916 FRAC_CONST(0),
3917 FRAC_CONST(0),
3918 FRAC_CONST(0),
3919 FRAC_CONST(0),
3920 FRAC_CONST(0),
3921 FRAC_CONST(0),
3922 FRAC_CONST(0),
3923 FRAC_CONST(0),
3924 FRAC_CONST(0),
3925 FRAC_CONST(0),
3926 FRAC_CONST(0),
3927 FRAC_CONST(0),
3928 FRAC_CONST(0),
3929 FRAC_CONST(0),
3930 FRAC_CONST(0),
3931 FRAC_CONST(0),
3932 FRAC_CONST(0),
3933 FRAC_CONST(0),
3934 FRAC_CONST(0),
3935 FRAC_CONST(0),
3936 FRAC_CONST(0),
3937 FRAC_CONST(0),
3938 FRAC_CONST(0),
3939 FRAC_CONST(0),
3940 FRAC_CONST(0),
3941 FRAC_CONST(0),
3942 FRAC_CONST(0),
3943 FRAC_CONST(0),
3944 FRAC_CONST(0),
3945 FRAC_CONST(0),
3946 FRAC_CONST(0),
3947 FRAC_CONST(0),
3948 FRAC_CONST(0),
3949 FRAC_CONST(0),
3950 FRAC_CONST(0),
3951 FRAC_CONST(0),
3952 FRAC_CONST(0),
3953 FRAC_CONST(0),
3954 FRAC_CONST(0),
3955 FRAC_CONST(0),
3956 FRAC_CONST(0),
3957 FRAC_CONST(0),
3958 FRAC_CONST(0),
3959 FRAC_CONST(0),
3960 FRAC_CONST(0),
3961 FRAC_CONST(0),
3962 FRAC_CONST(0),
3963 FRAC_CONST(0),
3964 FRAC_CONST(0),
3965 FRAC_CONST(0),
3966 FRAC_CONST(0),
3967 FRAC_CONST(0),
3968 FRAC_CONST(0),
3969 FRAC_CONST(0),
3970 FRAC_CONST(0),
3971 FRAC_CONST(0),
3972 FRAC_CONST(0),
3973 FRAC_CONST(0),
3974 FRAC_CONST(0),
3975 FRAC_CONST(0),
3976 FRAC_CONST(0),
3977 FRAC_CONST(0),
3978 FRAC_CONST(0),
3979 FRAC_CONST(0),
3980 FRAC_CONST(0),
3981 FRAC_CONST(0),
3982 FRAC_CONST(0),
3983 FRAC_CONST(0),
3984 FRAC_CONST(0),
3985 FRAC_CONST(0),
3986 FRAC_CONST(0),
3987 FRAC_CONST(0),
3988 FRAC_CONST(0),
3989 FRAC_CONST(0),
3990 FRAC_CONST(0),
3991 FRAC_CONST(0),
3992 FRAC_CONST(0),
3993 FRAC_CONST(0),
3994 FRAC_CONST(0.0065449379673518581),
3995 FRAC_CONST(0.019633692460628301),
3996 FRAC_CONST(0.032719082821776137),
3997 FRAC_CONST(0.045798866936520771),
3998 FRAC_CONST(0.058870803651189033),
3999 FRAC_CONST(0.071932653156719387),
4000 FRAC_CONST(0.084982177372441667),
4001 FRAC_CONST(0.09801714032956059),
4002 FRAC_CONST(0.11103530855427769),
4003 FRAC_CONST(0.12403445145048532),
4004 FRAC_CONST(0.13701234168196802),
4005 FRAC_CONST(0.14996675555404498),
4006 FRAC_CONST(0.16289547339458874),
4007 FRAC_CONST(0.17579627993435451),
4008 FRAC_CONST(0.18866696468655525),
4009 FRAC_CONST(0.2015053223256171),
4010 FRAC_CONST(0.21430915306505074),
4011 FRAC_CONST(0.2270762630343732),
4012 FRAC_CONST(0.23980446465501654),
4013 FRAC_CONST(0.25249157701515795),
4014 FRAC_CONST(0.26513542624340797),
4015 FRAC_CONST(0.27773384588129219),
4016 FRAC_CONST(0.29028467725446233),
4017 FRAC_CONST(0.3027857698425746),
4018 FRAC_CONST(0.31523498164776964),
4019 FRAC_CONST(0.32763017956169349),
4020 FRAC_CONST(0.33996923973099424),
4021 FRAC_CONST(0.35225004792123354),
4022 FRAC_CONST(0.36447049987914965),
4023 FRAC_CONST(0.37662850169321077),
4024 FRAC_CONST(0.38872197015239557),
4025 FRAC_CONST(0.40074883310314097),
4026 FRAC_CONST(0.41270702980439467),
4027 FRAC_CONST(0.42459451128071307),
4028 FRAC_CONST(0.43640924067334208),
4029 FRAC_CONST(0.44814919358922256),
4030 FRAC_CONST(0.45981235844785984),
4031 FRAC_CONST(0.47139673682599764),
4032 FRAC_CONST(0.48290034380003727),
4033 FRAC_CONST(0.49432120828614462),
4034 FRAC_CONST(0.50565737337798455),
4035 FRAC_CONST(0.51690689668202761),
4036 FRAC_CONST(0.52806785065036799),
4037 FRAC_CONST(0.53913832291100017),
4038 FRAC_CONST(0.55011641659549337),
4039 FRAC_CONST(0.56100025066400983),
4040 FRAC_CONST(0.57178796022761225),
4041 FRAC_CONST(0.58247769686780215),
4042 FRAC_CONST(0.59306762895323706),
4043 FRAC_CONST(0.60355594195357143),
4044 FRAC_CONST(0.61394083875036642),
4045 FRAC_CONST(0.62422053994501758),
4046 FRAC_CONST(0.63439328416364549),
4047 FRAC_CONST(0.64445732835889735),
4048 FRAC_CONST(0.65441094810861034),
4049 FRAC_CONST(0.66425243791128175),
4050 FRAC_CONST(0.67398011147829784),
4051 FRAC_CONST(0.68359230202287125),
4052 FRAC_CONST(0.69308736254563585),
4053 FRAC_CONST(0.70246366611685174),
4054 FRAC_CONST(0.71171960615517138),
4055 FRAC_CONST(0.72085359670291882),
4056 FRAC_CONST(0.7298640726978356),
4057 FRAC_CONST(0.73874949024124625),
4058 FRAC_CONST(0.74750832686259672),
4059 FRAC_CONST(0.75613908178032285),
4060 FRAC_CONST(0.76464027615900032),
4061 FRAC_CONST(0.77301045336273699),
4062 FRAC_CONST(0.78124817920475853),
4063 FRAC_CONST(0.78935204219315003),
4064 FRAC_CONST(0.79732065377270711),
4065 FRAC_CONST(0.80515264856285829),
4066 FRAC_CONST(0.81284668459161513),
4067 FRAC_CONST(0.82040144352551359),
4068 FRAC_CONST(0.82781563089550203),
4069 FRAC_CONST(0.83508797631874299),
4070 FRAC_CONST(0.84221723371628654),
4071 FRAC_CONST(0.84920218152657889),
4072 FRAC_CONST(0.85604162291477137),
4073 FRAC_CONST(0.86273438597779184),
4074 FRAC_CONST(0.86927932394514362),
4075 FRAC_CONST(0.87567531537539967),
4076 FRAC_CONST(0.88192126434835494),
4077 FRAC_CONST(0.88801610065280734),
4078 FRAC_CONST(0.89395877996993212),
4079 FRAC_CONST(0.8997482840522214),
4080 FRAC_CONST(0.90538362089795521),
4081 FRAC_CONST(0.91086382492117568),
4082 FRAC_CONST(0.91618795711713596),
4083 FRAC_CONST(0.92135510522319242),
4084 FRAC_CONST(0.9263643838751181),
4085 FRAC_CONST(0.93121493475880346),
4086 FRAC_CONST(0.93590592675732565),
4087 FRAC_CONST(0.94043655609335486),
4088 FRAC_CONST(0.94480604646687805),
4089 FRAC_CONST(0.94901364918821385),
4090 FRAC_CONST(0.95305864330629697),
4091 FRAC_CONST(0.95694033573220882),
4092 FRAC_CONST(0.9606580613579353),
4093 FRAC_CONST(0.96421118317032928),
4094 FRAC_CONST(0.96759909236025976),
4095 FRAC_CONST(0.9708212084269281),
4096 FRAC_CONST(0.97387697927733363),
4097 FRAC_CONST(0.97676588132087239),
4098 FRAC_CONST(0.97948741955905139),
4099 FRAC_CONST(0.98204112767030394),
4100 FRAC_CONST(0.98442656808989171),
4101 FRAC_CONST(0.98664333208487898),
4102 FRAC_CONST(0.98869103982416728),
4103 FRAC_CONST(0.99056934044357725),
4104 FRAC_CONST(0.99227791210596705),
4105 FRAC_CONST(0.99381646205637808),
4106 FRAC_CONST(0.99518472667219682),
4107 FRAC_CONST(0.99638247150832537),
4108 FRAC_CONST(0.99740949133735191),
4109 FRAC_CONST(0.99826561018471593),
4110 FRAC_CONST(0.99895068135886012),
4111 FRAC_CONST(0.99946458747636568),
4112 FRAC_CONST(0.99980724048206482),
4113 FRAC_CONST(0.99997858166412923),
4114 FRAC_CONST(1),
4115 FRAC_CONST(1),
4116 FRAC_CONST(1),
4117 FRAC_CONST(1),
4118 FRAC_CONST(1),
4119 FRAC_CONST(1),
4120 FRAC_CONST(1),
4121 FRAC_CONST(1),
4122 FRAC_CONST(1),
4123 FRAC_CONST(1),
4124 FRAC_CONST(1),
4125 FRAC_CONST(1),
4126 FRAC_CONST(1),
4127 FRAC_CONST(1),
4128 FRAC_CONST(1),
4129 FRAC_CONST(1),
4130 FRAC_CONST(1),
4131 FRAC_CONST(1),
4132 FRAC_CONST(1),
4133 FRAC_CONST(1),
4134 FRAC_CONST(1),
4135 FRAC_CONST(1),
4136 FRAC_CONST(1),
4137 FRAC_CONST(1),
4138 FRAC_CONST(1),
4139 FRAC_CONST(1),
4140 FRAC_CONST(1),
4141 FRAC_CONST(1),
4142 FRAC_CONST(1),
4143 FRAC_CONST(1),
4144 FRAC_CONST(1),
4145 FRAC_CONST(1),
4146 FRAC_CONST(1),
4147 FRAC_CONST(1),
4148 FRAC_CONST(1),
4149 FRAC_CONST(1),
4150 FRAC_CONST(1),
4151 FRAC_CONST(1),
4152 FRAC_CONST(1),
4153 FRAC_CONST(1),
4154 FRAC_CONST(1),
4155 FRAC_CONST(1),
4156 FRAC_CONST(1),
4157 FRAC_CONST(1),
4158 FRAC_CONST(1),
4159 FRAC_CONST(1),
4160 FRAC_CONST(1),
4161 FRAC_CONST(1),
4162 FRAC_CONST(1),
4163 FRAC_CONST(1),
4164 FRAC_CONST(1),
4165 FRAC_CONST(1),
4166 FRAC_CONST(1),
4167 FRAC_CONST(1),
4168 FRAC_CONST(1),
4169 FRAC_CONST(1),
4170 FRAC_CONST(1),
4171 FRAC_CONST(1),
4172 FRAC_CONST(1),
4173 FRAC_CONST(1),
4174 FRAC_CONST(1),
4175 FRAC_CONST(1),
4176 FRAC_CONST(1),
4177 FRAC_CONST(1),
4178 FRAC_CONST(1),
4179 FRAC_CONST(1),
4180 FRAC_CONST(1),
4181 FRAC_CONST(1),
4182 FRAC_CONST(1),
4183 FRAC_CONST(1),
4184 FRAC_CONST(1),
4185 FRAC_CONST(1),
4186 FRAC_CONST(1),
4187 FRAC_CONST(1),
4188 FRAC_CONST(1),
4189 FRAC_CONST(1),
4190 FRAC_CONST(1),
4191 FRAC_CONST(1),
4192 FRAC_CONST(1),
4193 FRAC_CONST(1),
4194 FRAC_CONST(1),
4195 FRAC_CONST(1),
4196 FRAC_CONST(1),
4197 FRAC_CONST(1),
4198 FRAC_CONST(1),
4199 FRAC_CONST(1),
4200 FRAC_CONST(1),
4201 FRAC_CONST(1),
4202 FRAC_CONST(1),
4203 FRAC_CONST(1),
4204 FRAC_CONST(1),
4205 FRAC_CONST(1),
4206 FRAC_CONST(1),
4207 FRAC_CONST(1),
4208 FRAC_CONST(1),
4209 FRAC_CONST(1),
4210 FRAC_CONST(1),
4211 FRAC_CONST(1),
4212 FRAC_CONST(1),
4213 FRAC_CONST(1),
4214 FRAC_CONST(1),
4215 FRAC_CONST(1),
4216 FRAC_CONST(1),
4217 FRAC_CONST(1),
4218 FRAC_CONST(1),
4219 FRAC_CONST(1),
4220 FRAC_CONST(1),
4221 FRAC_CONST(1),
4222 FRAC_CONST(1),
4223 FRAC_CONST(1),
4224 FRAC_CONST(1),
4225 FRAC_CONST(1),
4226 FRAC_CONST(1),
4227 FRAC_CONST(1),
4228 FRAC_CONST(1),
4229 FRAC_CONST(1),
4230 FRAC_CONST(1),
4231 FRAC_CONST(1),
4232 FRAC_CONST(1),
4233 FRAC_CONST(1),
4234 FRAC_CONST(1),
4235 FRAC_CONST(1),
4236 FRAC_CONST(1),
4237 FRAC_CONST(1),
4238 FRAC_CONST(1),
4239 FRAC_CONST(1),
4240 FRAC_CONST(1),
4241 FRAC_CONST(1),
4242 FRAC_CONST(1),
4243 FRAC_CONST(1),
4244 FRAC_CONST(1),
4245 FRAC_CONST(1),
4246 FRAC_CONST(1),
4247 FRAC_CONST(1),
4248 FRAC_CONST(1),
4249 FRAC_CONST(1),
4250 FRAC_CONST(1),
4251 FRAC_CONST(1),
4252 FRAC_CONST(1),
4253 FRAC_CONST(1),
4254 FRAC_CONST(1),
4255 FRAC_CONST(1),
4256 FRAC_CONST(1),
4257 FRAC_CONST(1),
4258 FRAC_CONST(1),
4259 FRAC_CONST(1),
4260 FRAC_CONST(1),
4261 FRAC_CONST(1),
4262 FRAC_CONST(1),
4263 FRAC_CONST(1),
4264 FRAC_CONST(1),
4265 FRAC_CONST(1),
4266 FRAC_CONST(1),
4267 FRAC_CONST(1),
4268 FRAC_CONST(1),
4269 FRAC_CONST(1),
4270 FRAC_CONST(1),
4271 FRAC_CONST(1),
4272 FRAC_CONST(1),
4273 FRAC_CONST(1),
4274 FRAC_CONST(1),
4275 FRAC_CONST(1),
4276 FRAC_CONST(1),
4277 FRAC_CONST(1),
4278 FRAC_CONST(1),
4279 FRAC_CONST(1),
4280 FRAC_CONST(1),
4281 FRAC_CONST(1),
4282 FRAC_CONST(1),
4283 FRAC_CONST(1),
4284 FRAC_CONST(1),
4285 FRAC_CONST(1),
4286 FRAC_CONST(1),
4287 FRAC_CONST(1),
4288 FRAC_CONST(1),
4289 FRAC_CONST(1),
4290 FRAC_CONST(1),
4291 FRAC_CONST(1),
4292 FRAC_CONST(1),
4293 FRAC_CONST(1)
4294};
4295#endif
4296#endif
4297
4298#ifdef __cplusplus
4299}
4300#endif
4301#endif
diff --git a/apps/codecs/libfaad/specrec.c b/apps/codecs/libfaad/specrec.c
new file mode 100644
index 0000000000..a452fbd90e
--- /dev/null
+++ b/apps/codecs/libfaad/specrec.c
@@ -0,0 +1,1272 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28/*
29 Spectral reconstruction:
30 - grouping/sectioning
31 - inverse quantization
32 - applying scalefactors
33*/
34
35#include "common.h"
36#include "structs.h"
37
38#include <string.h>
39#include <stdlib.h>
40#include "specrec.h"
41#include "filtbank.h"
42#include "syntax.h"
43#include "iq_table.h"
44#include "ms.h"
45#include "is.h"
46#include "pns.h"
47#include "tns.h"
48#include "drc.h"
49#include "lt_predict.h"
50#include "ic_predict.h"
51#ifdef SSR_DEC
52#include "ssr.h"
53#include "ssr_fb.h"
54#endif
55
56
57/* static function declarations */
58static uint8_t quant_to_spec(NeAACDecHandle hDecoder,
59 ic_stream *ics, int16_t *quant_data,
60 real_t *spec_data, uint16_t frame_len);
61
62
63#ifdef LD_DEC
64ALIGN static const uint8_t num_swb_512_window[] =
65{
66 0, 0, 0, 36, 36, 37, 31, 31, 0, 0, 0, 0
67};
68ALIGN static const uint8_t num_swb_480_window[] =
69{
70 0, 0, 0, 35, 35, 37, 30, 30, 0, 0, 0, 0
71};
72#endif
73
74ALIGN static const uint8_t num_swb_960_window[] =
75{
76 40, 40, 45, 49, 49, 49, 46, 46, 42, 42, 42, 40
77};
78
79ALIGN static const uint8_t num_swb_1024_window[] =
80{
81 41, 41, 47, 49, 49, 51, 47, 47, 43, 43, 43, 40
82};
83
84ALIGN static const uint8_t num_swb_128_window[] =
85{
86 12, 12, 12, 14, 14, 14, 15, 15, 15, 15, 15, 15
87};
88
89ALIGN static const uint16_t swb_offset_1024_96[] =
90{
91 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56,
92 64, 72, 80, 88, 96, 108, 120, 132, 144, 156, 172, 188, 212, 240,
93 276, 320, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960, 1024
94};
95
96ALIGN static const uint16_t swb_offset_128_96[] =
97{
98 0, 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 92, 128
99};
100
101ALIGN static const uint16_t swb_offset_1024_64[] =
102{
103 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56,
104 64, 72, 80, 88, 100, 112, 124, 140, 156, 172, 192, 216, 240, 268,
105 304, 344, 384, 424, 464, 504, 544, 584, 624, 664, 704, 744, 784, 824,
106 864, 904, 944, 984, 1024
107};
108
109ALIGN static const uint16_t swb_offset_128_64[] =
110{
111 0, 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 92, 128
112};
113
114ALIGN static const uint16_t swb_offset_1024_48[] =
115{
116 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 48, 56, 64, 72,
117 80, 88, 96, 108, 120, 132, 144, 160, 176, 196, 216, 240, 264, 292,
118 320, 352, 384, 416, 448, 480, 512, 544, 576, 608, 640, 672, 704, 736,
119 768, 800, 832, 864, 896, 928, 1024
120};
121
122#ifdef LD_DEC
123ALIGN static const uint16_t swb_offset_512_48[] =
124{
125 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 68, 76, 84,
126 92, 100, 112, 124, 136, 148, 164, 184, 208, 236, 268, 300, 332, 364, 396,
127 428, 460, 512
128};
129
130ALIGN static const uint16_t swb_offset_480_48[] =
131{
132 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 64, 72 ,80 ,88,
133 96, 108, 120, 132, 144, 156, 172, 188, 212, 240, 272, 304, 336, 368, 400,
134 432, 480
135};
136#endif
137
138ALIGN static const uint16_t swb_offset_128_48[] =
139{
140 0, 4, 8, 12, 16, 20, 28, 36, 44, 56, 68, 80, 96, 112, 128
141};
142
143ALIGN static const uint16_t swb_offset_1024_32[] =
144{
145 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 48, 56, 64, 72,
146 80, 88, 96, 108, 120, 132, 144, 160, 176, 196, 216, 240, 264, 292,
147 320, 352, 384, 416, 448, 480, 512, 544, 576, 608, 640, 672, 704, 736,
148 768, 800, 832, 864, 896, 928, 960, 992, 1024
149};
150
151#ifdef LD_DEC
152ALIGN static const uint16_t swb_offset_512_32[] =
153{
154 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 64, 72, 80,
155 88, 96, 108, 120, 132, 144, 160, 176, 192, 212, 236, 260, 288, 320, 352,
156 384, 416, 448, 480, 512
157};
158
159ALIGN static const uint16_t swb_offset_480_32[] =
160{
161 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 72, 80,
162 88, 96, 104, 112, 124, 136, 148, 164, 180, 200, 224, 256, 288, 320, 352,
163 384, 416, 448, 480
164};
165#endif
166
167ALIGN static const uint16_t swb_offset_1024_24[] =
168{
169 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 52, 60, 68,
170 76, 84, 92, 100, 108, 116, 124, 136, 148, 160, 172, 188, 204, 220,
171 240, 260, 284, 308, 336, 364, 396, 432, 468, 508, 552, 600, 652, 704,
172 768, 832, 896, 960, 1024
173};
174
175#ifdef LD_DEC
176ALIGN static const uint16_t swb_offset_512_24[] =
177{
178 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 52, 60, 68,
179 80, 92, 104, 120, 140, 164, 192, 224, 256, 288, 320, 352, 384, 416,
180 448, 480, 512
181};
182
183ALIGN static const uint16_t swb_offset_480_24[] =
184{
185 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 52, 60, 68, 80, 92, 104, 120,
186 140, 164, 192, 224, 256, 288, 320, 352, 384, 416, 448, 480
187};
188#endif
189
190ALIGN static const uint16_t swb_offset_128_24[] =
191{
192 0, 4, 8, 12, 16, 20, 24, 28, 36, 44, 52, 64, 76, 92, 108, 128
193};
194
195ALIGN static const uint16_t swb_offset_1024_16[] =
196{
197 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 100, 112, 124,
198 136, 148, 160, 172, 184, 196, 212, 228, 244, 260, 280, 300, 320, 344,
199 368, 396, 424, 456, 492, 532, 572, 616, 664, 716, 772, 832, 896, 960, 1024
200};
201
202ALIGN static const uint16_t swb_offset_128_16[] =
203{
204 0, 4, 8, 12, 16, 20, 24, 28, 32, 40, 48, 60, 72, 88, 108, 128
205};
206
207ALIGN static const uint16_t swb_offset_1024_8[] =
208{
209 0, 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132, 144, 156, 172,
210 188, 204, 220, 236, 252, 268, 288, 308, 328, 348, 372, 396, 420, 448,
211 476, 508, 544, 580, 620, 664, 712, 764, 820, 880, 944, 1024
212};
213
214ALIGN static const uint16_t swb_offset_128_8[] =
215{
216 0, 4, 8, 12, 16, 20, 24, 28, 36, 44, 52, 60, 72, 88, 108, 128
217};
218
219ALIGN static const uint16_t *swb_offset_1024_window[] =
220{
221 swb_offset_1024_96, /* 96000 */
222 swb_offset_1024_96, /* 88200 */
223 swb_offset_1024_64, /* 64000 */
224 swb_offset_1024_48, /* 48000 */
225 swb_offset_1024_48, /* 44100 */
226 swb_offset_1024_32, /* 32000 */
227 swb_offset_1024_24, /* 24000 */
228 swb_offset_1024_24, /* 22050 */
229 swb_offset_1024_16, /* 16000 */
230 swb_offset_1024_16, /* 12000 */
231 swb_offset_1024_16, /* 11025 */
232 swb_offset_1024_8 /* 8000 */
233};
234
235#ifdef LD_DEC
236ALIGN static const uint16_t *swb_offset_512_window[] =
237{
238 0, /* 96000 */
239 0, /* 88200 */
240 0, /* 64000 */
241 swb_offset_512_48, /* 48000 */
242 swb_offset_512_48, /* 44100 */
243 swb_offset_512_32, /* 32000 */
244 swb_offset_512_24, /* 24000 */
245 swb_offset_512_24, /* 22050 */
246 0, /* 16000 */
247 0, /* 12000 */
248 0, /* 11025 */
249 0 /* 8000 */
250};
251
252ALIGN static const uint16_t *swb_offset_480_window[] =
253{
254 0, /* 96000 */
255 0, /* 88200 */
256 0, /* 64000 */
257 swb_offset_480_48, /* 48000 */
258 swb_offset_480_48, /* 44100 */
259 swb_offset_480_32, /* 32000 */
260 swb_offset_480_24, /* 24000 */
261 swb_offset_480_24, /* 22050 */
262 0, /* 16000 */
263 0, /* 12000 */
264 0, /* 11025 */
265 0 /* 8000 */
266};
267#endif
268
269ALIGN static const uint16_t *swb_offset_128_window[] =
270{
271 swb_offset_128_96, /* 96000 */
272 swb_offset_128_96, /* 88200 */
273 swb_offset_128_64, /* 64000 */
274 swb_offset_128_48, /* 48000 */
275 swb_offset_128_48, /* 44100 */
276 swb_offset_128_48, /* 32000 */
277 swb_offset_128_24, /* 24000 */
278 swb_offset_128_24, /* 22050 */
279 swb_offset_128_16, /* 16000 */
280 swb_offset_128_16, /* 12000 */
281 swb_offset_128_16, /* 11025 */
282 swb_offset_128_8 /* 8000 */
283};
284
285#define bit_set(A, B) ((A) & (1<<(B)))
286
287/* 4.5.2.3.4 */
288/*
289 - determine the number of windows in a window_sequence named num_windows
290 - determine the number of window_groups named num_window_groups
291 - determine the number of windows in each group named window_group_length[g]
292 - determine the total number of scalefactor window bands named num_swb for
293 the actual window type
294 - determine swb_offset[swb], the offset of the first coefficient in
295 scalefactor window band named swb of the window actually used
296 - determine sect_sfb_offset[g][section],the offset of the first coefficient
297 in section named section. This offset depends on window_sequence and
298 scale_factor_grouping and is needed to decode the spectral_data().
299*/
300uint8_t window_grouping_info(NeAACDecHandle hDecoder, ic_stream *ics)
301{
302 uint8_t i, g;
303
304 uint8_t sf_index = hDecoder->sf_index;
305
306 switch (ics->window_sequence) {
307 case ONLY_LONG_SEQUENCE:
308 case LONG_START_SEQUENCE:
309 case LONG_STOP_SEQUENCE:
310 ics->num_windows = 1;
311 ics->num_window_groups = 1;
312 ics->window_group_length[ics->num_window_groups-1] = 1;
313#ifdef LD_DEC
314 if (hDecoder->object_type == LD)
315 {
316 if (hDecoder->frameLength == 512)
317 ics->num_swb = num_swb_512_window[sf_index];
318 else /* if (hDecoder->frameLength == 480) */
319 ics->num_swb = num_swb_480_window[sf_index];
320 } else {
321#endif
322 if (hDecoder->frameLength == 1024)
323 ics->num_swb = num_swb_1024_window[sf_index];
324 else /* if (hDecoder->frameLength == 960) */
325 ics->num_swb = num_swb_960_window[sf_index];
326#ifdef LD_DEC
327 }
328#endif
329
330 /* preparation of sect_sfb_offset for long blocks */
331 /* also copy the last value! */
332#ifdef LD_DEC
333 if (hDecoder->object_type == LD)
334 {
335 if (hDecoder->frameLength == 512)
336 {
337 for (i = 0; i < ics->num_swb; i++)
338 {
339 ics->sect_sfb_offset[0][i] = swb_offset_512_window[sf_index][i];
340 ics->swb_offset[i] = swb_offset_512_window[sf_index][i];
341 }
342 } else /* if (hDecoder->frameLength == 480) */ {
343 for (i = 0; i < ics->num_swb; i++)
344 {
345 ics->sect_sfb_offset[0][i] = swb_offset_480_window[sf_index][i];
346 ics->swb_offset[i] = swb_offset_480_window[sf_index][i];
347 }
348 }
349 ics->sect_sfb_offset[0][ics->num_swb] = hDecoder->frameLength;
350 ics->swb_offset[ics->num_swb] = hDecoder->frameLength;
351 } else {
352#endif
353 for (i = 0; i < ics->num_swb; i++)
354 {
355 ics->sect_sfb_offset[0][i] = swb_offset_1024_window[sf_index][i];
356 ics->swb_offset[i] = swb_offset_1024_window[sf_index][i];
357 }
358 ics->sect_sfb_offset[0][ics->num_swb] = hDecoder->frameLength;
359 ics->swb_offset[ics->num_swb] = hDecoder->frameLength;
360#ifdef LD_DEC
361 }
362#endif
363 return 0;
364 case EIGHT_SHORT_SEQUENCE:
365 ics->num_windows = 8;
366 ics->num_window_groups = 1;
367 ics->window_group_length[ics->num_window_groups-1] = 1;
368 ics->num_swb = num_swb_128_window[sf_index];
369
370 for (i = 0; i < ics->num_swb; i++)
371 ics->swb_offset[i] = swb_offset_128_window[sf_index][i];
372 ics->swb_offset[ics->num_swb] = hDecoder->frameLength/8;
373
374 for (i = 0; i < ics->num_windows-1; i++) {
375 if (bit_set(ics->scale_factor_grouping, 6-i) == 0)
376 {
377 ics->num_window_groups += 1;
378 ics->window_group_length[ics->num_window_groups-1] = 1;
379 } else {
380 ics->window_group_length[ics->num_window_groups-1] += 1;
381 }
382 }
383
384 /* preparation of sect_sfb_offset for short blocks */
385 for (g = 0; g < ics->num_window_groups; g++)
386 {
387 uint16_t width;
388 uint8_t sect_sfb = 0;
389 uint16_t offset = 0;
390
391 for (i = 0; i < ics->num_swb; i++)
392 {
393 if (i+1 == ics->num_swb)
394 {
395 width = (hDecoder->frameLength/8) - swb_offset_128_window[sf_index][i];
396 } else {
397 width = swb_offset_128_window[sf_index][i+1] -
398 swb_offset_128_window[sf_index][i];
399 }
400 width *= ics->window_group_length[g];
401 ics->sect_sfb_offset[g][sect_sfb++] = offset;
402 offset += width;
403 }
404 ics->sect_sfb_offset[g][sect_sfb] = offset;
405 }
406 return 0;
407 default:
408 return 1;
409 }
410}
411
412/* iquant() *
413/* output = sign(input)*abs(input)^(4/3) */
414/**/
415static INLINE real_t iquant(int16_t q, const real_t *tab, uint8_t *error)
416{
417#ifdef FIXED_POINT
418/* For FIXED_POINT the iq_table is prescaled by 3 bits (iq_table[]/8) */
419/* BIG_IQ_TABLE allows you to use the full 8192 value table, if this is not
420 * defined a 1026 value table and interpolation will be used
421 */
422#ifndef BIG_IQ_TABLE
423 static const real_t errcorr[] = {
424 REAL_CONST(0), REAL_CONST(1.0/8.0), REAL_CONST(2.0/8.0), REAL_CONST(3.0/8.0),
425 REAL_CONST(4.0/8.0), REAL_CONST(5.0/8.0), REAL_CONST(6.0/8.0), REAL_CONST(7.0/8.0),
426 REAL_CONST(0)
427 };
428 real_t x1, x2;
429#endif
430 int16_t sgn = 1;
431
432 if (q < 0)
433 {
434 q = -q;
435 sgn = -1;
436 }
437
438 if (q < IQ_TABLE_SIZE)
439 {
440//#define IQUANT_PRINT
441#ifdef IQUANT_PRINT
442 //printf("0x%.8X\n", sgn * tab[q]);
443 printf("%d\n", sgn * tab[q]);
444#endif
445 return sgn * tab[q];
446 }
447
448#ifndef BIG_IQ_TABLE
449 if (q >= 8192)
450 {
451 *error = 17;
452 return 0;
453 }
454
455 /* linear interpolation */
456 x1 = tab[q>>3];
457 x2 = tab[(q>>3) + 1];
458 return sgn * 16 * (MUL_R(errcorr[q&7],(x2-x1)) + x1);
459#else
460 *error = 17;
461 return 0;
462#endif
463
464#else
465 if (q < 0)
466 {
467 /* tab contains a value for all possible q [0,8192] */
468 if (-q < IQ_TABLE_SIZE)
469 return -tab[-q];
470
471 *error = 17;
472 return 0;
473 } else {
474 /* tab contains a value for all possible q [0,8192] */
475 if (q < IQ_TABLE_SIZE)
476 return tab[q];
477
478 *error = 17;
479 return 0;
480 }
481#endif
482}
483
484#ifndef FIXED_POINT
485ALIGN static const real_t pow2sf_tab[] = {
486 2.9802322387695313E-008, 5.9604644775390625E-008, 1.1920928955078125E-007,
487 2.384185791015625E-007, 4.76837158203125E-007, 9.5367431640625E-007,
488 1.9073486328125E-006, 3.814697265625E-006, 7.62939453125E-006,
489 1.52587890625E-005, 3.0517578125E-005, 6.103515625E-005,
490 0.0001220703125, 0.000244140625, 0.00048828125,
491 0.0009765625, 0.001953125, 0.00390625,
492 0.0078125, 0.015625, 0.03125,
493 0.0625, 0.125, 0.25,
494 0.5, 1.0, 2.0,
495 4.0, 8.0, 16.0, 32.0,
496 64.0, 128.0, 256.0,
497 512.0, 1024.0, 2048.0,
498 4096.0, 8192.0, 16384.0,
499 32768.0, 65536.0, 131072.0,
500 262144.0, 524288.0, 1048576.0,
501 2097152.0, 4194304.0, 8388608.0,
502 16777216.0, 33554432.0, 67108864.0,
503 134217728.0, 268435456.0, 536870912.0,
504 1073741824.0, 2147483648.0, 4294967296.0,
505 8589934592.0, 17179869184.0, 34359738368.0,
506 68719476736.0, 137438953472.0, 274877906944.0
507};
508#endif
509
510/* quant_to_spec: perform dequantisation and scaling
511 * and in case of short block it also does the deinterleaving
512 */
513/*
514 For ONLY_LONG_SEQUENCE windows (num_window_groups = 1,
515 window_group_length[0] = 1) the spectral data is in ascending spectral
516 order.
517 For the EIGHT_SHORT_SEQUENCE window, the spectral order depends on the
518 grouping in the following manner:
519 - Groups are ordered sequentially
520 - Within a group, a scalefactor band consists of the spectral data of all
521 grouped SHORT_WINDOWs for the associated scalefactor window band. To
522 clarify via example, the length of a group is in the range of one to eight
523 SHORT_WINDOWs.
524 - If there are eight groups each with length one (num_window_groups = 8,
525 window_group_length[0..7] = 1), the result is a sequence of eight spectra,
526 each in ascending spectral order.
527 - If there is only one group with length eight (num_window_groups = 1,
528 window_group_length[0] = 8), the result is that spectral data of all eight
529 SHORT_WINDOWs is interleaved by scalefactor window bands.
530 - Within a scalefactor window band, the coefficients are in ascending
531 spectral order.
532*/
533static uint8_t quant_to_spec(NeAACDecHandle hDecoder,
534 ic_stream *ics, int16_t *quant_data,
535 real_t *spec_data, uint16_t frame_len)
536{
537 ALIGN static const real_t pow2_table[] =
538 {
539 COEF_CONST(1.0),
540 COEF_CONST(1.1892071150027210667174999705605), /* 2^0.25 */
541 COEF_CONST(1.4142135623730950488016887242097), /* 2^0.5 */
542 COEF_CONST(1.6817928305074290860622509524664) /* 2^0.75 */
543 };
544 const real_t *tab = iq_table;
545
546 uint8_t g, sfb, win;
547 uint16_t width, bin, k, gindex, wa, wb;
548 uint8_t error = 0; /* Init error flag */
549#ifndef FIXED_POINT
550 real_t scf;
551#endif
552
553 k = 0;
554 gindex = 0;
555
556 for (g = 0; g < ics->num_window_groups; g++)
557 {
558 uint16_t j = 0;
559 uint16_t gincrease = 0;
560 uint16_t win_inc = ics->swb_offset[ics->num_swb];
561
562 for (sfb = 0; sfb < ics->num_swb; sfb++)
563 {
564 int32_t exp, frac;
565
566 width = ics->swb_offset[sfb+1] - ics->swb_offset[sfb];
567
568 /* this could be scalefactor for IS or PNS, those can be negative or bigger then 255 */
569 /* just ignore them */
570 if (ics->scale_factors[g][sfb] < 0 || ics->scale_factors[g][sfb] > 255)
571 {
572 exp = 0;
573 frac = 0;
574 } else {
575 /* ics->scale_factors[g][sfb] must be between 0 and 255 */
576 exp = (ics->scale_factors[g][sfb] /* - 100 */) >> 2;
577 /* frac must always be > 0 */
578 frac = (ics->scale_factors[g][sfb] /* - 100 */) & 3;
579 }
580
581#ifdef FIXED_POINT
582 exp -= 25;
583 /* IMDCT pre-scaling */
584 if (hDecoder->object_type == LD)
585 {
586 exp -= 6 /*9*/;
587 } else {
588 if (ics->window_sequence == EIGHT_SHORT_SEQUENCE)
589 exp -= 4 /*7*/;
590 else
591 exp -= 7 /*10*/;
592 }
593#endif
594
595 wa = gindex + j;
596
597#ifndef FIXED_POINT
598 scf = pow2sf_tab[exp/*+25*/] * pow2_table[frac];
599#endif
600
601 for (win = 0; win < ics->window_group_length[g]; win++)
602 {
603 for (bin = 0; bin < width; bin += 4)
604 {
605#ifndef FIXED_POINT
606 wb = wa + bin;
607
608 spec_data[wb+0] = iquant(quant_data[k+0], tab, &error) * scf;
609 spec_data[wb+1] = iquant(quant_data[k+1], tab, &error) * scf;
610 spec_data[wb+2] = iquant(quant_data[k+2], tab, &error) * scf;
611 spec_data[wb+3] = iquant(quant_data[k+3], tab, &error) * scf;
612
613#else
614 real_t iq0 = iquant(quant_data[k+0], tab, &error);
615 real_t iq1 = iquant(quant_data[k+1], tab, &error);
616 real_t iq2 = iquant(quant_data[k+2], tab, &error);
617 real_t iq3 = iquant(quant_data[k+3], tab, &error);
618
619 wb = wa + bin;
620
621 if (exp < 0)
622 {
623 spec_data[wb+0] = iq0 >>= -exp;
624 spec_data[wb+1] = iq1 >>= -exp;
625 spec_data[wb+2] = iq2 >>= -exp;
626 spec_data[wb+3] = iq3 >>= -exp;
627 } else {
628 spec_data[wb+0] = iq0 <<= exp;
629 spec_data[wb+1] = iq1 <<= exp;
630 spec_data[wb+2] = iq2 <<= exp;
631 spec_data[wb+3] = iq3 <<= exp;
632 }
633 if (frac != 0)
634 {
635 spec_data[wb+0] = MUL_C(spec_data[wb+0],pow2_table[frac]);
636 spec_data[wb+1] = MUL_C(spec_data[wb+1],pow2_table[frac]);
637 spec_data[wb+2] = MUL_C(spec_data[wb+2],pow2_table[frac]);
638 spec_data[wb+3] = MUL_C(spec_data[wb+3],pow2_table[frac]);
639 }
640
641//#define SCFS_PRINT
642#ifdef SCFS_PRINT
643 printf("%d\n", spec_data[gindex+(win*win_inc)+j+bin+0]);
644 printf("%d\n", spec_data[gindex+(win*win_inc)+j+bin+1]);
645 printf("%d\n", spec_data[gindex+(win*win_inc)+j+bin+2]);
646 printf("%d\n", spec_data[gindex+(win*win_inc)+j+bin+3]);
647 //printf("0x%.8X\n", spec_data[gindex+(win*win_inc)+j+bin+0]);
648 //printf("0x%.8X\n", spec_data[gindex+(win*win_inc)+j+bin+1]);
649 //printf("0x%.8X\n", spec_data[gindex+(win*win_inc)+j+bin+2]);
650 //printf("0x%.8X\n", spec_data[gindex+(win*win_inc)+j+bin+3]);
651#endif
652#endif
653
654 gincrease += 4;
655 k += 4;
656 }
657 wa += win_inc;
658 }
659 j += width;
660 }
661 gindex += gincrease;
662 }
663
664 return error;
665}
666
667static uint8_t allocate_single_channel(NeAACDecHandle hDecoder, uint8_t channel,
668 uint8_t output_channels)
669{
670 uint8_t mul = 1;
671
672#ifdef MAIN_DEC
673 /* MAIN object type prediction */
674 if (hDecoder->object_type == MAIN)
675 {
676 /* allocate the state only when needed */
677 if (hDecoder->pred_stat[channel] == NULL)
678 {
679 hDecoder->pred_stat[channel] = (pred_state*)faad_malloc(hDecoder->frameLength * sizeof(pred_state));
680 reset_all_predictors(hDecoder->pred_stat[channel], hDecoder->frameLength);
681 }
682 }
683#endif
684
685#ifdef LTP_DEC
686 if (is_ltp_ot(hDecoder->object_type))
687 {
688 /* allocate the state only when needed */
689 if (hDecoder->lt_pred_stat[channel] == NULL)
690 {
691 hDecoder->lt_pred_stat[channel] = (int16_t*)faad_malloc(hDecoder->frameLength*4 * sizeof(int16_t));
692 memset(hDecoder->lt_pred_stat[channel], 0, hDecoder->frameLength*4 * sizeof(int16_t));
693 }
694 }
695#endif
696
697 if (hDecoder->time_out[channel] == NULL)
698 {
699 mul = 1;
700#ifdef SBR_DEC
701 hDecoder->sbr_alloced[hDecoder->fr_ch_ele] = 0;
702 if ((hDecoder->sbr_present_flag == 1) || (hDecoder->forceUpSampling == 1))
703 {
704 /* SBR requires 2 times as much output data */
705 mul = 2;
706 hDecoder->sbr_alloced[hDecoder->fr_ch_ele] = 1;
707 }
708#endif
709 hDecoder->time_out[channel] = (real_t*)faad_malloc(mul*hDecoder->frameLength*sizeof(real_t));
710 memset(hDecoder->time_out[channel], 0, mul*hDecoder->frameLength*sizeof(real_t));
711 }
712#if (defined(PS_DEC) || defined(DRM_PS))
713 if (output_channels == 2)
714 {
715 if (hDecoder->time_out[channel+1] == NULL)
716 {
717 hDecoder->time_out[channel+1] = (real_t*)faad_malloc(mul*hDecoder->frameLength*sizeof(real_t));
718 memset(hDecoder->time_out[channel+1], 0, mul*hDecoder->frameLength*sizeof(real_t));
719 }
720 }
721#endif
722
723 if (hDecoder->fb_intermed[channel] == NULL)
724 {
725 hDecoder->fb_intermed[channel] = (real_t*)faad_malloc(hDecoder->frameLength*sizeof(real_t));
726 memset(hDecoder->fb_intermed[channel], 0, hDecoder->frameLength*sizeof(real_t));
727 }
728
729#ifdef SSR_DEC
730 if (hDecoder->object_type == SSR)
731 {
732 if (hDecoder->ssr_overlap[channel] == NULL)
733 {
734 hDecoder->ssr_overlap[channel] = (real_t*)faad_malloc(2*hDecoder->frameLength*sizeof(real_t));
735 memset(hDecoder->ssr_overlap[channel], 0, 2*hDecoder->frameLength*sizeof(real_t));
736 }
737 if (hDecoder->prev_fmd[channel] == NULL)
738 {
739 uint16_t k;
740 hDecoder->prev_fmd[channel] = (real_t*)faad_malloc(2*hDecoder->frameLength*sizeof(real_t));
741 for (k = 0; k < 2*hDecoder->frameLength; k++)
742 hDecoder->prev_fmd[channel][k] = REAL_CONST(-1);
743 }
744 }
745#endif
746
747 return 0;
748}
749
750static uint8_t allocate_channel_pair(NeAACDecHandle hDecoder,
751 uint8_t channel, uint8_t paired_channel)
752{
753 uint8_t mul = 1;
754
755#ifdef MAIN_DEC
756 /* MAIN object type prediction */
757 if (hDecoder->object_type == MAIN)
758 {
759 /* allocate the state only when needed */
760 if (hDecoder->pred_stat[channel] == NULL)
761 {
762 hDecoder->pred_stat[channel] = (pred_state*)faad_malloc(hDecoder->frameLength * sizeof(pred_state));
763 reset_all_predictors(hDecoder->pred_stat[channel], hDecoder->frameLength);
764 }
765 if (hDecoder->pred_stat[paired_channel] == NULL)
766 {
767 hDecoder->pred_stat[paired_channel] = (pred_state*)faad_malloc(hDecoder->frameLength * sizeof(pred_state));
768 reset_all_predictors(hDecoder->pred_stat[paired_channel], hDecoder->frameLength);
769 }
770 }
771#endif
772
773#ifdef LTP_DEC
774 if (is_ltp_ot(hDecoder->object_type))
775 {
776 /* allocate the state only when needed */
777 if (hDecoder->lt_pred_stat[channel] == NULL)
778 {
779 hDecoder->lt_pred_stat[channel] = (int16_t*)faad_malloc(hDecoder->frameLength*4 * sizeof(int16_t));
780 memset(hDecoder->lt_pred_stat[channel], 0, hDecoder->frameLength*4 * sizeof(int16_t));
781 }
782 if (hDecoder->lt_pred_stat[paired_channel] == NULL)
783 {
784 hDecoder->lt_pred_stat[paired_channel] = (int16_t*)faad_malloc(hDecoder->frameLength*4 * sizeof(int16_t));
785 memset(hDecoder->lt_pred_stat[paired_channel], 0, hDecoder->frameLength*4 * sizeof(int16_t));
786 }
787 }
788#endif
789
790 if (hDecoder->time_out[channel] == NULL)
791 {
792 mul = 1;
793#ifdef SBR_DEC
794 hDecoder->sbr_alloced[hDecoder->fr_ch_ele] = 0;
795 if ((hDecoder->sbr_present_flag == 1) || (hDecoder->forceUpSampling == 1))
796 {
797 /* SBR requires 2 times as much output data */
798 mul = 2;
799 hDecoder->sbr_alloced[hDecoder->fr_ch_ele] = 1;
800 }
801#endif
802 hDecoder->time_out[channel] = (real_t*)faad_malloc(mul*hDecoder->frameLength*sizeof(real_t));
803 memset(hDecoder->time_out[channel], 0, mul*hDecoder->frameLength*sizeof(real_t));
804 }
805 if (hDecoder->time_out[paired_channel] == NULL)
806 {
807 hDecoder->time_out[paired_channel] = (real_t*)faad_malloc(mul*hDecoder->frameLength*sizeof(real_t));
808 memset(hDecoder->time_out[paired_channel], 0, mul*hDecoder->frameLength*sizeof(real_t));
809 }
810
811 if (hDecoder->fb_intermed[channel] == NULL)
812 {
813 hDecoder->fb_intermed[channel] = (real_t*)faad_malloc(hDecoder->frameLength*sizeof(real_t));
814 memset(hDecoder->fb_intermed[channel], 0, hDecoder->frameLength*sizeof(real_t));
815 }
816 if (hDecoder->fb_intermed[paired_channel] == NULL)
817 {
818 hDecoder->fb_intermed[paired_channel] = (real_t*)faad_malloc(hDecoder->frameLength*sizeof(real_t));
819 memset(hDecoder->fb_intermed[paired_channel], 0, hDecoder->frameLength*sizeof(real_t));
820 }
821
822#ifdef SSR_DEC
823 if (hDecoder->object_type == SSR)
824 {
825 if (hDecoder->ssr_overlap[cpe->channel] == NULL)
826 {
827 hDecoder->ssr_overlap[cpe->channel] = (real_t*)faad_malloc(2*hDecoder->frameLength*sizeof(real_t));
828 memset(hDecoder->ssr_overlap[cpe->channel], 0, 2*hDecoder->frameLength*sizeof(real_t));
829 }
830 if (hDecoder->ssr_overlap[cpe->paired_channel] == NULL)
831 {
832 hDecoder->ssr_overlap[cpe->paired_channel] = (real_t*)faad_malloc(2*hDecoder->frameLength*sizeof(real_t));
833 memset(hDecoder->ssr_overlap[cpe->paired_channel], 0, 2*hDecoder->frameLength*sizeof(real_t));
834 }
835 if (hDecoder->prev_fmd[cpe->channel] == NULL)
836 {
837 uint16_t k;
838 hDecoder->prev_fmd[cpe->channel] = (real_t*)faad_malloc(2*hDecoder->frameLength*sizeof(real_t));
839 for (k = 0; k < 2*hDecoder->frameLength; k++)
840 hDecoder->prev_fmd[cpe->channel][k] = REAL_CONST(-1);
841 }
842 if (hDecoder->prev_fmd[cpe->paired_channel] == NULL)
843 {
844 uint16_t k;
845 hDecoder->prev_fmd[cpe->paired_channel] = (real_t*)faad_malloc(2*hDecoder->frameLength*sizeof(real_t));
846 for (k = 0; k < 2*hDecoder->frameLength; k++)
847 hDecoder->prev_fmd[cpe->paired_channel][k] = REAL_CONST(-1);
848 }
849 }
850#endif
851
852 return 0;
853}
854
855uint8_t reconstruct_single_channel(NeAACDecHandle hDecoder, ic_stream *ics,
856 element *sce, int16_t *spec_data)
857{
858 uint8_t retval, output_channels;
859 ALIGN real_t spec_coef[1024];
860
861#ifdef PROFILE
862 int64_t count = faad_get_ts();
863#endif
864
865
866 /* always allocate 2 channels, PS can always "suddenly" turn up */
867#if (defined(PS_DEC) || defined(DRM_PS))
868 output_channels = 2;
869#else
870 output_channels = 1;
871#endif
872
873 if (hDecoder->element_output_channels[hDecoder->fr_ch_ele] == 0)
874 {
875 /* element_output_channels not set yet */
876 hDecoder->element_output_channels[hDecoder->fr_ch_ele] = output_channels;
877 } else if (hDecoder->element_output_channels[hDecoder->fr_ch_ele] != output_channels) {
878 /* element inconsistency */
879 return 21;
880 }
881
882 if (hDecoder->element_alloced[hDecoder->fr_ch_ele] == 0)
883 {
884 retval = allocate_single_channel(hDecoder, sce->channel, output_channels);
885 if (retval > 0)
886 return retval;
887
888 hDecoder->element_alloced[hDecoder->fr_ch_ele] = 1;
889 }
890
891
892 /* dequantisation and scaling */
893 retval = quant_to_spec(hDecoder, ics, spec_data, spec_coef, hDecoder->frameLength);
894 if (retval > 0)
895 return retval;
896
897#ifdef PROFILE
898 count = faad_get_ts() - count;
899 hDecoder->requant_cycles += count;
900#endif
901
902
903 /* pns decoding */
904 pns_decode(ics, NULL, spec_coef, NULL, hDecoder->frameLength, 0, hDecoder->object_type);
905
906#ifdef MAIN_DEC
907 /* MAIN object type prediction */
908 if (hDecoder->object_type == MAIN)
909 {
910 /* intra channel prediction */
911 ic_prediction(ics, spec_coef, hDecoder->pred_stat[sce->channel], hDecoder->frameLength,
912 hDecoder->sf_index);
913
914 /* In addition, for scalefactor bands coded by perceptual
915 noise substitution the predictors belonging to the
916 corresponding spectral coefficients are reset.
917 */
918 pns_reset_pred_state(ics, hDecoder->pred_stat[sce->channel]);
919 }
920#endif
921
922#ifdef LTP_DEC
923 if (is_ltp_ot(hDecoder->object_type))
924 {
925#ifdef LD_DEC
926 if (hDecoder->object_type == LD)
927 {
928 if (ics->ltp.data_present)
929 {
930 if (ics->ltp.lag_update)
931 hDecoder->ltp_lag[sce->channel] = ics->ltp.lag;
932 }
933 ics->ltp.lag = hDecoder->ltp_lag[sce->channel];
934 }
935#endif
936
937 /* long term prediction */
938 lt_prediction(ics, &(ics->ltp), spec_coef, hDecoder->lt_pred_stat[sce->channel], hDecoder->fb,
939 ics->window_shape, hDecoder->window_shape_prev[sce->channel],
940 hDecoder->sf_index, hDecoder->object_type, hDecoder->frameLength);
941 }
942#endif
943
944 /* tns decoding */
945 tns_decode_frame(ics, &(ics->tns), hDecoder->sf_index, hDecoder->object_type,
946 spec_coef, hDecoder->frameLength);
947
948 /* drc decoding */
949 if (hDecoder->drc->present)
950 {
951 if (!hDecoder->drc->exclude_mask[sce->channel] || !hDecoder->drc->excluded_chns_present)
952 drc_decode(hDecoder->drc, spec_coef);
953 }
954
955 /* filter bank */
956#ifdef SSR_DEC
957 if (hDecoder->object_type != SSR)
958 {
959#endif
960 ifilter_bank(hDecoder->fb, ics->window_sequence, ics->window_shape,
961 hDecoder->window_shape_prev[sce->channel], spec_coef,
962 hDecoder->time_out[sce->channel], hDecoder->fb_intermed[sce->channel],
963 hDecoder->object_type, hDecoder->frameLength);
964#ifdef SSR_DEC
965 } else {
966 ssr_decode(&(ics->ssr), hDecoder->fb, ics->window_sequence, ics->window_shape,
967 hDecoder->window_shape_prev[sce->channel], spec_coef, hDecoder->time_out[sce->channel],
968 hDecoder->ssr_overlap[sce->channel], hDecoder->ipqf_buffer[sce->channel], hDecoder->prev_fmd[sce->channel],
969 hDecoder->frameLength);
970 }
971#endif
972
973 /* save window shape for next frame */
974 hDecoder->window_shape_prev[sce->channel] = ics->window_shape;
975
976#ifdef LTP_DEC
977 if (is_ltp_ot(hDecoder->object_type))
978 {
979 lt_update_state(hDecoder->lt_pred_stat[sce->channel], hDecoder->time_out[sce->channel],
980 hDecoder->fb_intermed[sce->channel], hDecoder->frameLength, hDecoder->object_type);
981 }
982#endif
983
984#ifdef SBR_DEC
985 if (((hDecoder->sbr_present_flag == 1) || (hDecoder->forceUpSampling == 1))
986 && hDecoder->sbr_alloced[hDecoder->fr_ch_ele])
987 {
988 uint8_t ele = hDecoder->fr_ch_ele;
989 uint8_t ch = sce->channel;
990
991 /* following case can happen when forceUpSampling == 1 */
992 if (hDecoder->sbr[ele] == NULL)
993 {
994 hDecoder->sbr[ele] = sbrDecodeInit(hDecoder->frameLength,
995 hDecoder->element_id[ele], 2*get_sample_rate(hDecoder->sf_index),
996 hDecoder->downSampledSBR
997#ifdef DRM
998 , 0
999#endif
1000 );
1001 }
1002
1003 if (sce->ics1.window_sequence == EIGHT_SHORT_SEQUENCE)
1004 hDecoder->sbr[ele]->maxAACLine = 8*sce->ics1.swb_offset[max(sce->ics1.max_sfb-1, 0)];
1005 else
1006 hDecoder->sbr[ele]->maxAACLine = sce->ics1.swb_offset[max(sce->ics1.max_sfb-1, 0)];
1007
1008 /* check if any of the PS tools is used */
1009#if (defined(PS_DEC) || defined(DRM_PS))
1010 if (hDecoder->ps_used[ele] == 0)
1011 {
1012#endif
1013 retval = sbrDecodeSingleFrame(hDecoder->sbr[ele], hDecoder->time_out[ch],
1014 hDecoder->postSeekResetFlag, hDecoder->downSampledSBR);
1015#if (defined(PS_DEC) || defined(DRM_PS))
1016 } else {
1017 retval = sbrDecodeSingleFramePS(hDecoder->sbr[ele], hDecoder->time_out[ch],
1018 hDecoder->time_out[ch+1], hDecoder->postSeekResetFlag,
1019 hDecoder->downSampledSBR);
1020 }
1021#endif
1022 if (retval > 0)
1023 return retval;
1024 } else if (((hDecoder->sbr_present_flag == 1) || (hDecoder->forceUpSampling == 1))
1025 && !hDecoder->sbr_alloced[hDecoder->fr_ch_ele])
1026 {
1027 return 23;
1028 }
1029#endif
1030
1031 /* copy L to R when no PS is used */
1032#if (defined(PS_DEC) || defined(DRM_PS))
1033 if ((hDecoder->ps_used[hDecoder->fr_ch_ele] == 0))
1034 {
1035 uint8_t ele = hDecoder->fr_ch_ele;
1036 uint8_t ch = sce->channel;
1037 uint16_t frame_size = (hDecoder->sbr_alloced[ele]) ? 2 : 1;
1038 frame_size *= hDecoder->frameLength*sizeof(real_t);
1039
1040 memcpy(hDecoder->time_out[ch+1], hDecoder->time_out[ch], frame_size);
1041 }
1042#endif
1043
1044 return 0;
1045}
1046
1047uint8_t reconstruct_channel_pair(NeAACDecHandle hDecoder, ic_stream *ics1, ic_stream *ics2,
1048 element *cpe, int16_t *spec_data1, int16_t *spec_data2)
1049{
1050 uint8_t retval;
1051 ALIGN real_t spec_coef1[1024];
1052 ALIGN real_t spec_coef2[1024];
1053
1054#ifdef PROFILE
1055 int64_t count = faad_get_ts();
1056#endif
1057 if (hDecoder->element_alloced[hDecoder->fr_ch_ele] == 0)
1058 {
1059 retval = allocate_channel_pair(hDecoder, cpe->channel, (uint8_t)cpe->paired_channel);
1060 if (retval > 0)
1061 return retval;
1062
1063 hDecoder->element_alloced[hDecoder->fr_ch_ele] = 1;
1064 }
1065
1066 /* dequantisation and scaling */
1067 retval = quant_to_spec(hDecoder, ics1, spec_data1, spec_coef1, hDecoder->frameLength);
1068 if (retval > 0)
1069 return retval;
1070 retval = quant_to_spec(hDecoder, ics2, spec_data2, spec_coef2, hDecoder->frameLength);
1071 if (retval > 0)
1072 return retval;
1073
1074#ifdef PROFILE
1075 count = faad_get_ts() - count;
1076 hDecoder->requant_cycles += count;
1077#endif
1078
1079
1080 /* pns decoding */
1081 if (ics1->ms_mask_present)
1082 {
1083 pns_decode(ics1, ics2, spec_coef1, spec_coef2, hDecoder->frameLength, 1, hDecoder->object_type);
1084 } else {
1085 pns_decode(ics1, NULL, spec_coef1, NULL, hDecoder->frameLength, 0, hDecoder->object_type);
1086 pns_decode(ics2, NULL, spec_coef2, NULL, hDecoder->frameLength, 0, hDecoder->object_type);
1087 }
1088
1089 /* mid/side decoding */
1090 ms_decode(ics1, ics2, spec_coef1, spec_coef2, hDecoder->frameLength);
1091
1092#if 0
1093 {
1094 int i;
1095 for (i = 0; i < 1024; i++)
1096 {
1097 //printf("%d\n", spec_coef1[i]);
1098 printf("0x%.8X\n", spec_coef1[i]);
1099 }
1100 for (i = 0; i < 1024; i++)
1101 {
1102 //printf("%d\n", spec_coef2[i]);
1103 printf("0x%.8X\n", spec_coef2[i]);
1104 }
1105 }
1106#endif
1107
1108 /* intensity stereo decoding */
1109 is_decode(ics1, ics2, spec_coef1, spec_coef2, hDecoder->frameLength);
1110
1111#if 0
1112 {
1113 int i;
1114 for (i = 0; i < 1024; i++)
1115 {
1116 printf("%d\n", spec_coef1[i]);
1117 //printf("0x%.8X\n", spec_coef1[i]);
1118 }
1119 for (i = 0; i < 1024; i++)
1120 {
1121 printf("%d\n", spec_coef2[i]);
1122 //printf("0x%.8X\n", spec_coef2[i]);
1123 }
1124 }
1125#endif
1126
1127#ifdef MAIN_DEC
1128 /* MAIN object type prediction */
1129 if (hDecoder->object_type == MAIN)
1130 {
1131 /* intra channel prediction */
1132 ic_prediction(ics1, spec_coef1, hDecoder->pred_stat[cpe->channel], hDecoder->frameLength,
1133 hDecoder->sf_index);
1134 ic_prediction(ics2, spec_coef2, hDecoder->pred_stat[cpe->paired_channel], hDecoder->frameLength,
1135 hDecoder->sf_index);
1136
1137 /* In addition, for scalefactor bands coded by perceptual
1138 noise substitution the predictors belonging to the
1139 corresponding spectral coefficients are reset.
1140 */
1141 pns_reset_pred_state(ics1, hDecoder->pred_stat[cpe->channel]);
1142 pns_reset_pred_state(ics2, hDecoder->pred_stat[cpe->paired_channel]);
1143 }
1144#endif
1145
1146#ifdef LTP_DEC
1147 if (is_ltp_ot(hDecoder->object_type))
1148 {
1149 ltp_info *ltp1 = &(ics1->ltp);
1150 ltp_info *ltp2 = (cpe->common_window) ? &(ics2->ltp2) : &(ics2->ltp);
1151#ifdef LD_DEC
1152 if (hDecoder->object_type == LD)
1153 {
1154 if (ltp1->data_present)
1155 {
1156 if (ltp1->lag_update)
1157 hDecoder->ltp_lag[cpe->channel] = ltp1->lag;
1158 }
1159 ltp1->lag = hDecoder->ltp_lag[cpe->channel];
1160 if (ltp2->data_present)
1161 {
1162 if (ltp2->lag_update)
1163 hDecoder->ltp_lag[cpe->paired_channel] = ltp2->lag;
1164 }
1165 ltp2->lag = hDecoder->ltp_lag[cpe->paired_channel];
1166 }
1167#endif
1168
1169 /* long term prediction */
1170 lt_prediction(ics1, ltp1, spec_coef1, hDecoder->lt_pred_stat[cpe->channel], hDecoder->fb,
1171 ics1->window_shape, hDecoder->window_shape_prev[cpe->channel],
1172 hDecoder->sf_index, hDecoder->object_type, hDecoder->frameLength);
1173 lt_prediction(ics2, ltp2, spec_coef2, hDecoder->lt_pred_stat[cpe->paired_channel], hDecoder->fb,
1174 ics2->window_shape, hDecoder->window_shape_prev[cpe->paired_channel],
1175 hDecoder->sf_index, hDecoder->object_type, hDecoder->frameLength);
1176 }
1177#endif
1178
1179 /* tns decoding */
1180 tns_decode_frame(ics1, &(ics1->tns), hDecoder->sf_index, hDecoder->object_type,
1181 spec_coef1, hDecoder->frameLength);
1182 tns_decode_frame(ics2, &(ics2->tns), hDecoder->sf_index, hDecoder->object_type,
1183 spec_coef2, hDecoder->frameLength);
1184
1185 /* drc decoding */
1186 if (hDecoder->drc->present)
1187 {
1188 if (!hDecoder->drc->exclude_mask[cpe->channel] || !hDecoder->drc->excluded_chns_present)
1189 drc_decode(hDecoder->drc, spec_coef1);
1190 if (!hDecoder->drc->exclude_mask[cpe->paired_channel] || !hDecoder->drc->excluded_chns_present)
1191 drc_decode(hDecoder->drc, spec_coef2);
1192 }
1193
1194 /* filter bank */
1195#ifdef SSR_DEC
1196 if (hDecoder->object_type != SSR)
1197 {
1198#endif
1199 ifilter_bank(hDecoder->fb, ics1->window_sequence, ics1->window_shape,
1200 hDecoder->window_shape_prev[cpe->channel], spec_coef1,
1201 hDecoder->time_out[cpe->channel], hDecoder->fb_intermed[cpe->channel],
1202 hDecoder->object_type, hDecoder->frameLength);
1203 ifilter_bank(hDecoder->fb, ics2->window_sequence, ics2->window_shape,
1204 hDecoder->window_shape_prev[cpe->paired_channel], spec_coef2,
1205 hDecoder->time_out[cpe->paired_channel], hDecoder->fb_intermed[cpe->paired_channel],
1206 hDecoder->object_type, hDecoder->frameLength);
1207#ifdef SSR_DEC
1208 } else {
1209 ssr_decode(&(ics1->ssr), hDecoder->fb, ics1->window_sequence, ics1->window_shape,
1210 hDecoder->window_shape_prev[cpe->channel], spec_coef1, hDecoder->time_out[cpe->channel],
1211 hDecoder->ssr_overlap[cpe->channel], hDecoder->ipqf_buffer[cpe->channel],
1212 hDecoder->prev_fmd[cpe->channel], hDecoder->frameLength);
1213 ssr_decode(&(ics2->ssr), hDecoder->fb, ics2->window_sequence, ics2->window_shape,
1214 hDecoder->window_shape_prev[cpe->paired_channel], spec_coef2, hDecoder->time_out[cpe->paired_channel],
1215 hDecoder->ssr_overlap[cpe->paired_channel], hDecoder->ipqf_buffer[cpe->paired_channel],
1216 hDecoder->prev_fmd[cpe->paired_channel], hDecoder->frameLength);
1217 }
1218#endif
1219
1220 /* save window shape for next frame */
1221 hDecoder->window_shape_prev[cpe->channel] = ics1->window_shape;
1222 hDecoder->window_shape_prev[cpe->paired_channel] = ics2->window_shape;
1223
1224#ifdef LTP_DEC
1225 if (is_ltp_ot(hDecoder->object_type))
1226 {
1227 lt_update_state(hDecoder->lt_pred_stat[cpe->channel], hDecoder->time_out[cpe->channel],
1228 hDecoder->fb_intermed[cpe->channel], hDecoder->frameLength, hDecoder->object_type);
1229 lt_update_state(hDecoder->lt_pred_stat[cpe->paired_channel], hDecoder->time_out[cpe->paired_channel],
1230 hDecoder->fb_intermed[cpe->paired_channel], hDecoder->frameLength, hDecoder->object_type);
1231 }
1232#endif
1233
1234#ifdef SBR_DEC
1235 if (((hDecoder->sbr_present_flag == 1) || (hDecoder->forceUpSampling == 1))
1236 && hDecoder->sbr_alloced[hDecoder->fr_ch_ele])
1237 {
1238 uint8_t ele = hDecoder->fr_ch_ele;
1239 uint8_t ch0 = cpe->channel;
1240 uint8_t ch1 = cpe->paired_channel;
1241
1242 /* following case can happen when forceUpSampling == 1 */
1243 if (hDecoder->sbr[ele] == NULL)
1244 {
1245 hDecoder->sbr[ele] = sbrDecodeInit(hDecoder->frameLength,
1246 hDecoder->element_id[ele], 2*get_sample_rate(hDecoder->sf_index),
1247 hDecoder->downSampledSBR
1248#ifdef DRM
1249 , 0
1250#endif
1251 );
1252 }
1253
1254 if (cpe->ics1.window_sequence == EIGHT_SHORT_SEQUENCE)
1255 hDecoder->sbr[ele]->maxAACLine = 8*cpe->ics1.swb_offset[max(cpe->ics1.max_sfb-1, 0)];
1256 else
1257 hDecoder->sbr[ele]->maxAACLine = cpe->ics1.swb_offset[max(cpe->ics1.max_sfb-1, 0)];
1258
1259 retval = sbrDecodeCoupleFrame(hDecoder->sbr[ele],
1260 hDecoder->time_out[ch0], hDecoder->time_out[ch1],
1261 hDecoder->postSeekResetFlag, hDecoder->downSampledSBR);
1262 if (retval > 0)
1263 return retval;
1264 } else if (((hDecoder->sbr_present_flag == 1) || (hDecoder->forceUpSampling == 1))
1265 && !hDecoder->sbr_alloced[hDecoder->fr_ch_ele])
1266 {
1267 return 23;
1268 }
1269#endif
1270
1271 return 0;
1272}
diff --git a/apps/codecs/libfaad/specrec.h b/apps/codecs/libfaad/specrec.h
new file mode 100644
index 0000000000..c3540ac973
--- /dev/null
+++ b/apps/codecs/libfaad/specrec.h
@@ -0,0 +1,46 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __SPECREC_H__
29#define __SPECREC_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#include "syntax.h"
36
37uint8_t window_grouping_info(NeAACDecHandle hDecoder, ic_stream *ics);
38uint8_t reconstruct_channel_pair(NeAACDecHandle hDecoder, ic_stream *ics1, ic_stream *ics2,
39 element *cpe, int16_t *spec_data1, int16_t *spec_data2);
40uint8_t reconstruct_single_channel(NeAACDecHandle hDecoder, ic_stream *ics, element *sce,
41 int16_t *spec_data);
42
43#ifdef __cplusplus
44}
45#endif
46#endif
diff --git a/apps/codecs/libfaad/structs.h b/apps/codecs/libfaad/structs.h
new file mode 100644
index 0000000000..0703a77f91
--- /dev/null
+++ b/apps/codecs/libfaad/structs.h
@@ -0,0 +1,473 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __STRUCTS_H__
29#define __STRUCTS_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#include "cfft.h"
36#ifdef SBR_DEC
37#include "sbr_dec.h"
38#endif
39
40#define MAX_CHANNELS 64
41#define MAX_SYNTAX_ELEMENTS 48
42#define MAX_WINDOW_GROUPS 8
43#define MAX_SFB 51
44#define MAX_LTP_SFB 40
45#define MAX_LTP_SFB_S 8
46
47/* used to save the prediction state */
48typedef struct {
49 int16_t r[2];
50 int16_t COR[2];
51 int16_t VAR[2];
52} pred_state;
53
54typedef struct {
55 uint16_t N;
56 cfft_info *cfft;
57 complex_t *sincos;
58#ifdef PROFILE
59 int64_t cycles;
60 int64_t fft_cycles;
61#endif
62} mdct_info;
63
64typedef struct
65{
66 const real_t *long_window[2];
67 const real_t *short_window[2];
68#ifdef LD_DEC
69 const real_t *ld_window[2];
70#endif
71
72 mdct_info *mdct256;
73#ifdef LD_DEC
74 mdct_info *mdct1024;
75#endif
76 mdct_info *mdct2048;
77#ifdef PROFILE
78 int64_t cycles;
79#endif
80} fb_info;
81
82typedef struct
83{
84 uint8_t present;
85
86 uint8_t num_bands;
87 uint8_t pce_instance_tag;
88 uint8_t excluded_chns_present;
89 uint8_t band_top[17];
90 uint8_t prog_ref_level;
91 uint8_t dyn_rng_sgn[17];
92 uint8_t dyn_rng_ctl[17];
93 uint8_t exclude_mask[MAX_CHANNELS];
94 uint8_t additional_excluded_chns[MAX_CHANNELS];
95
96 real_t ctrl1;
97 real_t ctrl2;
98} drc_info;
99
100typedef struct
101{
102 uint8_t element_instance_tag;
103 uint8_t object_type;
104 uint8_t sf_index;
105 uint8_t num_front_channel_elements;
106 uint8_t num_side_channel_elements;
107 uint8_t num_back_channel_elements;
108 uint8_t num_lfe_channel_elements;
109 uint8_t num_assoc_data_elements;
110 uint8_t num_valid_cc_elements;
111 uint8_t mono_mixdown_present;
112 uint8_t mono_mixdown_element_number;
113 uint8_t stereo_mixdown_present;
114 uint8_t stereo_mixdown_element_number;
115 uint8_t matrix_mixdown_idx_present;
116 uint8_t pseudo_surround_enable;
117 uint8_t matrix_mixdown_idx;
118 uint8_t front_element_is_cpe[16];
119 uint8_t front_element_tag_select[16];
120 uint8_t side_element_is_cpe[16];
121 uint8_t side_element_tag_select[16];
122 uint8_t back_element_is_cpe[16];
123 uint8_t back_element_tag_select[16];
124 uint8_t lfe_element_tag_select[16];
125 uint8_t assoc_data_element_tag_select[16];
126 uint8_t cc_element_is_ind_sw[16];
127 uint8_t valid_cc_element_tag_select[16];
128
129 uint8_t channels;
130
131 uint8_t comment_field_bytes;
132 uint8_t comment_field_data[257];
133
134 /* extra added values */
135 uint8_t num_front_channels;
136 uint8_t num_side_channels;
137 uint8_t num_back_channels;
138 uint8_t num_lfe_channels;
139 uint8_t sce_channel[16];
140 uint8_t cpe_channel[16];
141} program_config;
142
143typedef struct
144{
145 uint16_t syncword;
146 uint8_t id;
147 uint8_t layer;
148 uint8_t protection_absent;
149 uint8_t profile;
150 uint8_t sf_index;
151 uint8_t private_bit;
152 uint8_t channel_configuration;
153 uint8_t original;
154 uint8_t home;
155 uint8_t emphasis;
156 uint8_t copyright_identification_bit;
157 uint8_t copyright_identification_start;
158 uint16_t aac_frame_length;
159 uint16_t adts_buffer_fullness;
160 uint8_t no_raw_data_blocks_in_frame;
161 uint16_t crc_check;
162
163 /* control param */
164 uint8_t old_format;
165} adts_header;
166
167typedef struct
168{
169 uint8_t copyright_id_present;
170 int8_t copyright_id[10];
171 uint8_t original_copy;
172 uint8_t home;
173 uint8_t bitstream_type;
174 uint32_t bitrate;
175 uint8_t num_program_config_elements;
176 uint32_t adif_buffer_fullness;
177
178 /* maximum of 16 PCEs */
179 program_config pce[16];
180} adif_header;
181
182#ifdef LTP_DEC
183typedef struct
184{
185 uint8_t last_band;
186 uint8_t data_present;
187 uint16_t lag;
188 uint8_t lag_update;
189 uint8_t coef;
190 uint8_t long_used[MAX_SFB];
191 uint8_t short_used[8];
192 uint8_t short_lag_present[8];
193 uint8_t short_lag[8];
194} ltp_info;
195#endif
196
197#ifdef MAIN_DEC
198typedef struct
199{
200 uint8_t limit;
201 uint8_t predictor_reset;
202 uint8_t predictor_reset_group_number;
203 uint8_t prediction_used[MAX_SFB];
204} pred_info;
205#endif
206
207typedef struct
208{
209 uint8_t number_pulse;
210 uint8_t pulse_start_sfb;
211 uint8_t pulse_offset[4];
212 uint8_t pulse_amp[4];
213} pulse_info;
214
215typedef struct
216{
217 uint8_t n_filt[8];
218 uint8_t coef_res[8];
219 uint8_t length[8][4];
220 uint8_t order[8][4];
221 uint8_t direction[8][4];
222 uint8_t coef_compress[8][4];
223 uint8_t coef[8][4][32];
224} tns_info;
225
226#ifdef SSR_DEC
227typedef struct
228{
229 uint8_t max_band;
230
231 uint8_t adjust_num[4][8];
232 uint8_t alevcode[4][8][8];
233 uint8_t aloccode[4][8][8];
234} ssr_info;
235#endif
236
237typedef struct
238{
239 uint8_t max_sfb;
240
241 uint8_t num_swb;
242 uint8_t num_window_groups;
243 uint8_t num_windows;
244 uint8_t window_sequence;
245 uint8_t window_group_length[8];
246 uint8_t window_shape;
247 uint8_t scale_factor_grouping;
248 uint16_t sect_sfb_offset[8][15*8];
249 uint16_t swb_offset[52];
250
251 uint8_t sect_cb[8][15*8];
252 uint16_t sect_start[8][15*8];
253 uint16_t sect_end[8][15*8];
254 uint8_t sfb_cb[8][8*15];
255 uint8_t num_sec[8]; /* number of sections in a group */
256
257 uint8_t global_gain;
258 int16_t scale_factors[8][51]; /* [0..255] */
259
260 uint8_t ms_mask_present;
261 uint8_t ms_used[MAX_WINDOW_GROUPS][MAX_SFB];
262
263 uint8_t noise_used;
264
265 uint8_t pulse_data_present;
266 uint8_t tns_data_present;
267 uint8_t gain_control_data_present;
268 uint8_t predictor_data_present;
269
270 pulse_info pul;
271 tns_info tns;
272#ifdef MAIN_DEC
273 pred_info pred;
274#endif
275#ifdef LTP_DEC
276 ltp_info ltp;
277 ltp_info ltp2;
278#endif
279#ifdef SSR_DEC
280 ssr_info ssr;
281#endif
282
283#ifdef ERROR_RESILIENCE
284 /* ER HCR data */
285 uint16_t length_of_reordered_spectral_data;
286 uint8_t length_of_longest_codeword;
287 /* ER RLVC data */
288 uint8_t sf_concealment;
289 uint8_t rev_global_gain;
290 uint16_t length_of_rvlc_sf;
291 uint16_t dpcm_noise_nrg;
292 uint8_t sf_escapes_present;
293 uint8_t length_of_rvlc_escapes;
294 uint16_t dpcm_noise_last_position;
295#endif
296} ic_stream; /* individual channel stream */
297
298typedef struct
299{
300 uint8_t channel;
301 int16_t paired_channel;
302
303 uint8_t element_instance_tag;
304 uint8_t common_window;
305
306 ic_stream ics1;
307 ic_stream ics2;
308} element; /* syntax element (SCE, CPE, LFE) */
309
310typedef struct mp4AudioSpecificConfig
311{
312 /* Audio Specific Info */
313 /*uint8_t*/ unsigned char objectTypeIndex;
314 /*uint8_t*/ unsigned char samplingFrequencyIndex;
315 /*uint32_t*/ unsigned long samplingFrequency;
316 /*uint8_t*/ unsigned char channelsConfiguration;
317
318 /* GA Specific Info */
319 /*uint8_t*/ unsigned char frameLengthFlag;
320 /*uint8_t*/ unsigned char dependsOnCoreCoder;
321 /*uint16_t*/ unsigned short coreCoderDelay;
322 /*uint8_t*/ unsigned char extensionFlag;
323 /*uint8_t*/ unsigned char aacSectionDataResilienceFlag;
324 /*uint8_t*/ unsigned char aacScalefactorDataResilienceFlag;
325 /*uint8_t*/ unsigned char aacSpectralDataResilienceFlag;
326 /*uint8_t*/ unsigned char epConfig;
327
328 /*uint8_t*/ char sbr_present_flag;
329 /*uint8_t*/ char forceUpSampling;
330 /*uint8_t*/ char downSampledSBR;
331} mp4AudioSpecificConfig;
332
333typedef struct NeAACDecConfiguration
334{
335 /*uint8_t*/ unsigned char defObjectType;
336 /*uint32_t*/ unsigned long defSampleRate;
337 /*uint8_t*/ unsigned char outputFormat;
338 /*uint8_t*/ unsigned char downMatrix;
339 /*uint8_t*/ unsigned char useOldADTSFormat;
340 /*uint8_t*/ unsigned char dontUpSampleImplicitSBR;
341} NeAACDecConfiguration, *NeAACDecConfigurationPtr;
342
343typedef struct NeAACDecFrameInfo
344{
345 /*uint32_t*/ unsigned long bytesconsumed;
346 /*uint32_t*/ unsigned long samples;
347 /*uint8_t*/ unsigned char channels;
348 /*uint8_t*/ unsigned char error;
349 /*uint32_t*/ unsigned long samplerate;
350
351 /* SBR: 0: off, 1: on; normal, 2: on; downsampled */
352 /*uint8_t*/ unsigned char sbr;
353
354 /* MPEG-4 ObjectType */
355 /*uint8_t*/ unsigned char object_type;
356
357 /* AAC header type; MP4 will be signalled as RAW also */
358 /*uint8_t*/ unsigned char header_type;
359
360 /* multichannel configuration */
361 /*uint8_t*/ unsigned char num_front_channels;
362 /*uint8_t*/ unsigned char num_side_channels;
363 /*uint8_t*/ unsigned char num_back_channels;
364 /*uint8_t*/ unsigned char num_lfe_channels;
365 /*uint8_t*/ unsigned char channel_position[MAX_CHANNELS];
366
367 /* PS: 0: off, 1: on */
368 /*uint8_t*/ unsigned char ps;
369} NeAACDecFrameInfo;
370
371typedef struct
372{
373 uint8_t adts_header_present;
374 uint8_t adif_header_present;
375 uint8_t sf_index;
376 uint8_t object_type;
377 uint8_t channelConfiguration;
378#ifdef ERROR_RESILIENCE
379 uint8_t aacSectionDataResilienceFlag;
380 uint8_t aacScalefactorDataResilienceFlag;
381 uint8_t aacSpectralDataResilienceFlag;
382#endif
383 uint16_t frameLength;
384 uint8_t postSeekResetFlag;
385
386 uint32_t frame;
387
388 uint8_t downMatrix;
389 uint8_t upMatrix;
390 uint8_t first_syn_ele;
391 uint8_t has_lfe;
392 /* number of channels in current frame */
393 uint8_t fr_channels;
394 /* number of elements in current frame */
395 uint8_t fr_ch_ele;
396
397 /* element_output_channels:
398 determines the number of channels the element will output
399 */
400 uint8_t element_output_channels[MAX_SYNTAX_ELEMENTS];
401 /* element_alloced:
402 determines whether the data needed for the element is allocated or not
403 */
404 uint8_t element_alloced[MAX_SYNTAX_ELEMENTS];
405 /* alloced_channels:
406 determines the number of channels where output data is allocated for
407 */
408 uint8_t alloced_channels;
409
410 /* output data buffer */
411 void *sample_buffer;
412
413 uint8_t window_shape_prev[MAX_CHANNELS];
414#ifdef LTP_DEC
415 uint16_t ltp_lag[MAX_CHANNELS];
416#endif
417 fb_info *fb;
418 drc_info *drc;
419
420 real_t *time_out[MAX_CHANNELS];
421 real_t *fb_intermed[MAX_CHANNELS];
422
423#ifdef SBR_DEC
424 int8_t sbr_present_flag;
425 int8_t forceUpSampling;
426 int8_t downSampledSBR;
427 /* determines whether SBR data is allocated for the gives element */
428 uint8_t sbr_alloced[MAX_SYNTAX_ELEMENTS];
429
430 sbr_info *sbr[MAX_SYNTAX_ELEMENTS];
431#endif
432#if (defined(PS_DEC) || defined(DRM_PS))
433 uint8_t ps_used[MAX_SYNTAX_ELEMENTS];
434 uint8_t ps_used_global;
435#endif
436
437#ifdef SSR_DEC
438 real_t *ssr_overlap[MAX_CHANNELS];
439 real_t *prev_fmd[MAX_CHANNELS];
440 real_t ipqf_buffer[MAX_CHANNELS][4][96/4];
441#endif
442
443#ifdef MAIN_DEC
444 pred_state *pred_stat[MAX_CHANNELS];
445#endif
446#ifdef LTP_DEC
447 int16_t *lt_pred_stat[MAX_CHANNELS];
448#endif
449
450 /* Program Config Element */
451 uint8_t pce_set;
452 program_config pce;
453 uint8_t element_id[MAX_CHANNELS];
454 uint8_t internal_channel[MAX_CHANNELS];
455
456 /* Configuration data */
457 NeAACDecConfiguration config;
458
459#ifdef PROFILE
460 int64_t cycles;
461 int64_t spectral_cycles;
462 int64_t output_cycles;
463 int64_t scalefac_cycles;
464 int64_t requant_cycles;
465#endif
466} NeAACDecStruct, *NeAACDecHandle;
467
468
469
470#ifdef __cplusplus
471}
472#endif
473#endif
diff --git a/apps/codecs/libfaad/syntax.c b/apps/codecs/libfaad/syntax.c
new file mode 100644
index 0000000000..1ce086eb4b
--- /dev/null
+++ b/apps/codecs/libfaad/syntax.c
@@ -0,0 +1,2330 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28/*
29 Reads the AAC bitstream as defined in 14496-3 (MPEG-4 Audio)
30*/
31
32#include "common.h"
33#include "structs.h"
34
35#include <stdlib.h>
36#include <string.h>
37
38#include "decoder.h"
39#include "syntax.h"
40#include "specrec.h"
41#include "huffman.h"
42#include "bits.h"
43#include "pulse.h"
44#include "analysis.h"
45#include "drc.h"
46#ifdef ERROR_RESILIENCE
47#include "rvlc.h"
48#endif
49#ifdef SBR_DEC
50#include "sbr_syntax.h"
51#endif
52
53
54/* static function declarations */
55static void decode_sce_lfe(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, bitfile *ld,
56 uint8_t id_syn_ele);
57static void decode_cpe(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, bitfile *ld,
58 uint8_t id_syn_ele);
59static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld,
60 uint8_t channel, uint8_t *tag);
61static uint8_t channel_pair_element(NeAACDecHandle hDecoder, bitfile *ld,
62 uint8_t channel, uint8_t *tag);
63#ifdef COUPLING_DEC
64static uint8_t coupling_channel_element(NeAACDecHandle hDecoder, bitfile *ld);
65#endif
66static uint16_t data_stream_element(NeAACDecHandle hDecoder, bitfile *ld);
67static uint8_t program_config_element(program_config *pce, bitfile *ld);
68static uint8_t fill_element(NeAACDecHandle hDecoder, bitfile *ld, drc_info *drc
69#ifdef SBR_DEC
70 ,uint8_t sbr_ele
71#endif
72 );
73static uint8_t individual_channel_stream(NeAACDecHandle hDecoder, element *ele,
74 bitfile *ld, ic_stream *ics, uint8_t scal_flag,
75 int16_t *spec_data);
76static uint8_t ics_info(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld,
77 uint8_t common_window);
78static uint8_t section_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld);
79static uint8_t scale_factor_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld);
80#ifdef SSR_DEC
81static void gain_control_data(bitfile *ld, ic_stream *ics);
82#endif
83static uint8_t spectral_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld,
84 int16_t *spectral_data);
85static uint16_t extension_payload(bitfile *ld, drc_info *drc, uint16_t count);
86static uint8_t pulse_data(ic_stream *ics, pulse_info *pul, bitfile *ld);
87static void tns_data(ic_stream *ics, tns_info *tns, bitfile *ld);
88#ifdef LTP_DEC
89static uint8_t ltp_data(NeAACDecHandle hDecoder, ic_stream *ics, ltp_info *ltp, bitfile *ld);
90#endif
91static uint8_t adts_fixed_header(adts_header *adts, bitfile *ld);
92static void adts_variable_header(adts_header *adts, bitfile *ld);
93static void adts_error_check(adts_header *adts, bitfile *ld);
94static uint8_t dynamic_range_info(bitfile *ld, drc_info *drc);
95static uint8_t excluded_channels(bitfile *ld, drc_info *drc);
96#ifdef SCALABLE_DEC
97static int8_t aac_scalable_main_header(NeAACDecHandle hDecoder, ic_stream *ics1, ic_stream *ics2,
98 bitfile *ld, uint8_t this_layer_stereo);
99#endif
100
101
102/* Table 4.4.1 */
103int8_t GASpecificConfig(bitfile *ld, mp4AudioSpecificConfig *mp4ASC,
104 program_config *pce_out)
105{
106 program_config pce;
107
108 /* 1024 or 960 */
109 mp4ASC->frameLengthFlag = faad_get1bit(ld
110 DEBUGVAR(1,138,"GASpecificConfig(): FrameLengthFlag"));
111#ifndef ALLOW_SMALL_FRAMELENGTH
112 if (mp4ASC->frameLengthFlag == 1)
113 return -3;
114#endif
115
116 mp4ASC->dependsOnCoreCoder = faad_get1bit(ld
117 DEBUGVAR(1,139,"GASpecificConfig(): DependsOnCoreCoder"));
118 if (mp4ASC->dependsOnCoreCoder == 1)
119 {
120 mp4ASC->coreCoderDelay = (uint16_t)faad_getbits(ld, 14
121 DEBUGVAR(1,140,"GASpecificConfig(): CoreCoderDelay"));
122 }
123
124 mp4ASC->extensionFlag = faad_get1bit(ld DEBUGVAR(1,141,"GASpecificConfig(): ExtensionFlag"));
125 if (mp4ASC->channelsConfiguration == 0)
126 {
127 if (program_config_element(&pce, ld))
128 return -3;
129 //mp4ASC->channelsConfiguration = pce.channels;
130
131 if (pce_out != NULL)
132 memcpy(pce_out, &pce, sizeof(program_config));
133
134 /*
135 if (pce.num_valid_cc_elements)
136 return -3;
137 */
138 }
139
140#ifdef ERROR_RESILIENCE
141 if (mp4ASC->extensionFlag == 1)
142 {
143 /* Error resilience not supported yet */
144 if (mp4ASC->objectTypeIndex >= ER_OBJECT_START)
145 {
146 mp4ASC->aacSectionDataResilienceFlag = faad_get1bit(ld
147 DEBUGVAR(1,144,"GASpecificConfig(): aacSectionDataResilienceFlag"));
148 mp4ASC->aacScalefactorDataResilienceFlag = faad_get1bit(ld
149 DEBUGVAR(1,145,"GASpecificConfig(): aacScalefactorDataResilienceFlag"));
150 mp4ASC->aacSpectralDataResilienceFlag = faad_get1bit(ld
151 DEBUGVAR(1,146,"GASpecificConfig(): aacSpectralDataResilienceFlag"));
152
153 /* 1 bit: extensionFlag3 */
154 }
155 }
156#endif
157
158 return 0;
159}
160
161/* Table 4.4.2 */
162/* An MPEG-4 Audio decoder is only required to follow the Program
163 Configuration Element in GASpecificConfig(). The decoder shall ignore
164 any Program Configuration Elements that may occur in raw data blocks.
165 PCEs transmitted in raw data blocks cannot be used to convey decoder
166 configuration information.
167*/
168static uint8_t program_config_element(program_config *pce, bitfile *ld)
169{
170 uint8_t i;
171
172 memset(pce, 0, sizeof(program_config));
173
174 pce->channels = 0;
175
176 pce->element_instance_tag = (uint8_t)faad_getbits(ld, 4
177 DEBUGVAR(1,10,"program_config_element(): element_instance_tag"));
178
179 pce->object_type = (uint8_t)faad_getbits(ld, 2
180 DEBUGVAR(1,11,"program_config_element(): object_type"));
181 pce->sf_index = (uint8_t)faad_getbits(ld, 4
182 DEBUGVAR(1,12,"program_config_element(): sf_index"));
183 pce->num_front_channel_elements = (uint8_t)faad_getbits(ld, 4
184 DEBUGVAR(1,13,"program_config_element(): num_front_channel_elements"));
185 pce->num_side_channel_elements = (uint8_t)faad_getbits(ld, 4
186 DEBUGVAR(1,14,"program_config_element(): num_side_channel_elements"));
187 pce->num_back_channel_elements = (uint8_t)faad_getbits(ld, 4
188 DEBUGVAR(1,15,"program_config_element(): num_back_channel_elements"));
189 pce->num_lfe_channel_elements = (uint8_t)faad_getbits(ld, 2
190 DEBUGVAR(1,16,"program_config_element(): num_lfe_channel_elements"));
191 pce->num_assoc_data_elements = (uint8_t)faad_getbits(ld, 3
192 DEBUGVAR(1,17,"program_config_element(): num_assoc_data_elements"));
193 pce->num_valid_cc_elements = (uint8_t)faad_getbits(ld, 4
194 DEBUGVAR(1,18,"program_config_element(): num_valid_cc_elements"));
195
196 pce->mono_mixdown_present = faad_get1bit(ld
197 DEBUGVAR(1,19,"program_config_element(): mono_mixdown_present"));
198 if (pce->mono_mixdown_present == 1)
199 {
200 pce->mono_mixdown_element_number = (uint8_t)faad_getbits(ld, 4
201 DEBUGVAR(1,20,"program_config_element(): mono_mixdown_element_number"));
202 }
203
204 pce->stereo_mixdown_present = faad_get1bit(ld
205 DEBUGVAR(1,21,"program_config_element(): stereo_mixdown_present"));
206 if (pce->stereo_mixdown_present == 1)
207 {
208 pce->stereo_mixdown_element_number = (uint8_t)faad_getbits(ld, 4
209 DEBUGVAR(1,22,"program_config_element(): stereo_mixdown_element_number"));
210 }
211
212 pce->matrix_mixdown_idx_present = faad_get1bit(ld
213 DEBUGVAR(1,23,"program_config_element(): matrix_mixdown_idx_present"));
214 if (pce->matrix_mixdown_idx_present == 1)
215 {
216 pce->matrix_mixdown_idx = (uint8_t)faad_getbits(ld, 2
217 DEBUGVAR(1,24,"program_config_element(): matrix_mixdown_idx"));
218 pce->pseudo_surround_enable = faad_get1bit(ld
219 DEBUGVAR(1,25,"program_config_element(): pseudo_surround_enable"));
220 }
221
222 for (i = 0; i < pce->num_front_channel_elements; i++)
223 {
224 pce->front_element_is_cpe[i] = faad_get1bit(ld
225 DEBUGVAR(1,26,"program_config_element(): front_element_is_cpe"));
226 pce->front_element_tag_select[i] = (uint8_t)faad_getbits(ld, 4
227 DEBUGVAR(1,27,"program_config_element(): front_element_tag_select"));
228
229 if (pce->front_element_is_cpe[i] & 1)
230 {
231 pce->cpe_channel[pce->front_element_tag_select[i]] = pce->channels;
232 pce->num_front_channels += 2;
233 pce->channels += 2;
234 } else {
235 pce->sce_channel[pce->front_element_tag_select[i]] = pce->channels;
236 pce->num_front_channels++;
237 pce->channels++;
238 }
239 }
240
241 for (i = 0; i < pce->num_side_channel_elements; i++)
242 {
243 pce->side_element_is_cpe[i] = faad_get1bit(ld
244 DEBUGVAR(1,28,"program_config_element(): side_element_is_cpe"));
245 pce->side_element_tag_select[i] = (uint8_t)faad_getbits(ld, 4
246 DEBUGVAR(1,29,"program_config_element(): side_element_tag_select"));
247
248 if (pce->side_element_is_cpe[i] & 1)
249 {
250 pce->cpe_channel[pce->side_element_tag_select[i]] = pce->channels;
251 pce->num_side_channels += 2;
252 pce->channels += 2;
253 } else {
254 pce->sce_channel[pce->side_element_tag_select[i]] = pce->channels;
255 pce->num_side_channels++;
256 pce->channels++;
257 }
258 }
259
260 for (i = 0; i < pce->num_back_channel_elements; i++)
261 {
262 pce->back_element_is_cpe[i] = faad_get1bit(ld
263 DEBUGVAR(1,30,"program_config_element(): back_element_is_cpe"));
264 pce->back_element_tag_select[i] = (uint8_t)faad_getbits(ld, 4
265 DEBUGVAR(1,31,"program_config_element(): back_element_tag_select"));
266
267 if (pce->back_element_is_cpe[i] & 1)
268 {
269 pce->cpe_channel[pce->back_element_tag_select[i]] = pce->channels;
270 pce->channels += 2;
271 pce->num_back_channels += 2;
272 } else {
273 pce->sce_channel[pce->back_element_tag_select[i]] = pce->channels;
274 pce->num_back_channels++;
275 pce->channels++;
276 }
277 }
278
279 for (i = 0; i < pce->num_lfe_channel_elements; i++)
280 {
281 pce->lfe_element_tag_select[i] = (uint8_t)faad_getbits(ld, 4
282 DEBUGVAR(1,32,"program_config_element(): lfe_element_tag_select"));
283
284 pce->sce_channel[pce->lfe_element_tag_select[i]] = pce->channels;
285 pce->num_lfe_channels++;
286 pce->channels++;
287 }
288
289 for (i = 0; i < pce->num_assoc_data_elements; i++)
290 pce->assoc_data_element_tag_select[i] = (uint8_t)faad_getbits(ld, 4
291 DEBUGVAR(1,33,"program_config_element(): assoc_data_element_tag_select"));
292
293 for (i = 0; i < pce->num_valid_cc_elements; i++)
294 {
295 pce->cc_element_is_ind_sw[i] = faad_get1bit(ld
296 DEBUGVAR(1,34,"program_config_element(): cc_element_is_ind_sw"));
297 pce->valid_cc_element_tag_select[i] = (uint8_t)faad_getbits(ld, 4
298 DEBUGVAR(1,35,"program_config_element(): valid_cc_element_tag_select"));
299 }
300
301 faad_byte_align(ld);
302
303 pce->comment_field_bytes = (uint8_t)faad_getbits(ld, 8
304 DEBUGVAR(1,36,"program_config_element(): comment_field_bytes"));
305
306 for (i = 0; i < pce->comment_field_bytes; i++)
307 {
308 pce->comment_field_data[i] = (uint8_t)faad_getbits(ld, 8
309 DEBUGVAR(1,37,"program_config_element(): comment_field_data"));
310 }
311 pce->comment_field_data[i] = 0;
312
313 if (pce->channels > MAX_CHANNELS)
314 return 22;
315
316 return 0;
317}
318
319static void decode_sce_lfe(NeAACDecHandle hDecoder,
320 NeAACDecFrameInfo *hInfo, bitfile *ld,
321 uint8_t id_syn_ele)
322{
323 uint8_t channels = hDecoder->fr_channels;
324 uint8_t tag = 0;
325
326 if (channels+1 > MAX_CHANNELS)
327 {
328 hInfo->error = 12;
329 return;
330 }
331 if (hDecoder->fr_ch_ele+1 > MAX_SYNTAX_ELEMENTS)
332 {
333 hInfo->error = 13;
334 return;
335 }
336
337 /* for SCE hDecoder->element_output_channels[] is not set here because this
338 can become 2 when some form of Parametric Stereo coding is used
339 */
340
341 /* save the syntax element id */
342 hDecoder->element_id[hDecoder->fr_ch_ele] = id_syn_ele;
343
344 /* decode the element */
345 hInfo->error = single_lfe_channel_element(hDecoder, ld, channels, &tag);
346
347 /* map output channels position to internal data channels */
348 if (hDecoder->element_output_channels[hDecoder->fr_ch_ele] == 2)
349 {
350 /* this might be faulty when pce_set is true */
351 hDecoder->internal_channel[channels] = channels;
352 hDecoder->internal_channel[channels+1] = channels+1;
353 } else {
354 if (hDecoder->pce_set)
355 hDecoder->internal_channel[hDecoder->pce.sce_channel[tag]] = channels;
356 else
357 hDecoder->internal_channel[channels] = channels;
358 }
359
360 hDecoder->fr_channels += hDecoder->element_output_channels[hDecoder->fr_ch_ele];
361 hDecoder->fr_ch_ele++;
362}
363
364static void decode_cpe(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, bitfile *ld,
365 uint8_t id_syn_ele)
366{
367 uint8_t channels = hDecoder->fr_channels;
368 uint8_t tag = 0;
369
370 if (channels+2 > MAX_CHANNELS)
371 {
372 hInfo->error = 12;
373 return;
374 }
375 if (hDecoder->fr_ch_ele+1 > MAX_SYNTAX_ELEMENTS)
376 {
377 hInfo->error = 13;
378 return;
379 }
380
381 /* for CPE the number of output channels is always 2 */
382 if (hDecoder->element_output_channels[hDecoder->fr_ch_ele] == 0)
383 {
384 /* element_output_channels not set yet */
385 hDecoder->element_output_channels[hDecoder->fr_ch_ele] = 2;
386 } else if (hDecoder->element_output_channels[hDecoder->fr_ch_ele] != 2) {
387 /* element inconsistency */
388 hInfo->error = 21;
389 return;
390 }
391
392 /* save the syntax element id */
393 hDecoder->element_id[hDecoder->fr_ch_ele] = id_syn_ele;
394
395 /* decode the element */
396 hInfo->error = channel_pair_element(hDecoder, ld, channels, &tag);
397
398 /* map output channel position to internal data channels */
399 if (hDecoder->pce_set)
400 {
401 hDecoder->internal_channel[hDecoder->pce.cpe_channel[tag]] = channels;
402 hDecoder->internal_channel[hDecoder->pce.cpe_channel[tag]+1] = channels+1;
403 } else {
404 hDecoder->internal_channel[channels] = channels;
405 hDecoder->internal_channel[channels+1] = channels+1;
406 }
407
408 hDecoder->fr_channels += 2;
409 hDecoder->fr_ch_ele++;
410}
411
412void raw_data_block(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
413 bitfile *ld, program_config *pce, drc_info *drc)
414{
415 uint8_t id_syn_ele;
416
417 hDecoder->fr_channels = 0;
418 hDecoder->fr_ch_ele = 0;
419 hDecoder->first_syn_ele = 25;
420 hDecoder->has_lfe = 0;
421
422#ifdef ERROR_RESILIENCE
423 if (hDecoder->object_type < ER_OBJECT_START)
424 {
425#endif
426 /* Table 4.4.3: raw_data_block() */
427 while ((id_syn_ele = (uint8_t)faad_getbits(ld, LEN_SE_ID
428 DEBUGVAR(1,4,"NeAACDecDecode(): id_syn_ele"))) != ID_END)
429 {
430 switch (id_syn_ele) {
431 case ID_SCE:
432 if (hDecoder->first_syn_ele == 25) hDecoder->first_syn_ele = id_syn_ele;
433 decode_sce_lfe(hDecoder, hInfo, ld, id_syn_ele);
434 if (hInfo->error > 0)
435 return;
436 break;
437 case ID_CPE:
438 if (hDecoder->first_syn_ele == 25) hDecoder->first_syn_ele = id_syn_ele;
439 decode_cpe(hDecoder, hInfo, ld, id_syn_ele);
440 if (hInfo->error > 0)
441 return;
442 break;
443 case ID_LFE:
444 hDecoder->has_lfe++;
445 decode_sce_lfe(hDecoder, hInfo, ld, id_syn_ele);
446 if (hInfo->error > 0)
447 return;
448 break;
449 case ID_CCE: /* not implemented yet, but skip the bits */
450#ifdef COUPLING_DEC
451 hInfo->error = coupling_channel_element(hDecoder, ld);
452#else
453 hInfo->error = 6;
454#endif
455 if (hInfo->error > 0)
456 return;
457 break;
458 case ID_DSE:
459 data_stream_element(hDecoder, ld);
460 break;
461 case ID_PCE:
462 /* 14496-4: 5.6.4.1.2.1.3: */
463 /* program_configuration_element()'s in access units shall be ignored */
464 program_config_element(pce, ld);
465 //if ((hInfo->error = program_config_element(pce, ld)) > 0)
466 // return;
467 //hDecoder->pce_set = 1;
468 break;
469 case ID_FIL:
470 /* one sbr_info describes a channel_element not a channel! */
471 /* if we encounter SBR data here: error */
472 /* SBR data will be read directly in the SCE/LFE/CPE element */
473 if ((hInfo->error = fill_element(hDecoder, ld, drc
474#ifdef SBR_DEC
475 , INVALID_SBR_ELEMENT
476#endif
477 )) > 0)
478 return;
479 break;
480 }
481 }
482#ifdef ERROR_RESILIENCE
483 } else {
484 /* Table 262: er_raw_data_block() */
485 switch (hDecoder->channelConfiguration)
486 {
487 case 1:
488 decode_sce_lfe(hDecoder, hInfo, ld, ID_SCE);
489 if (hInfo->error > 0)
490 return;
491 break;
492 case 2:
493 decode_cpe(hDecoder, hInfo, ld, ID_CPE);
494 if (hInfo->error > 0)
495 return;
496 break;
497 case 3:
498 decode_sce_lfe(hDecoder, hInfo, ld, ID_SCE);
499 decode_cpe(hDecoder, hInfo, ld, ID_CPE);
500 if (hInfo->error > 0)
501 return;
502 break;
503 case 4:
504 decode_sce_lfe(hDecoder, hInfo, ld, ID_SCE);
505 decode_cpe(hDecoder, hInfo, ld, ID_CPE);
506 decode_sce_lfe(hDecoder, hInfo, ld, ID_SCE);
507 if (hInfo->error > 0)
508 return;
509 break;
510 case 5:
511 decode_sce_lfe(hDecoder, hInfo, ld, ID_SCE);
512 decode_cpe(hDecoder, hInfo, ld, ID_CPE);
513 decode_cpe(hDecoder, hInfo, ld, ID_CPE);
514 if (hInfo->error > 0)
515 return;
516 break;
517 case 6:
518 decode_sce_lfe(hDecoder, hInfo, ld, ID_SCE);
519 decode_cpe(hDecoder, hInfo, ld, ID_CPE);
520 decode_cpe(hDecoder, hInfo, ld, ID_CPE);
521 decode_sce_lfe(hDecoder, hInfo, ld, ID_LFE);
522 if (hInfo->error > 0)
523 return;
524 break;
525 case 7: /* 8 channels */
526 decode_sce_lfe(hDecoder, hInfo, ld, ID_SCE);
527 decode_cpe(hDecoder, hInfo, ld, ID_CPE);
528 decode_cpe(hDecoder, hInfo, ld, ID_CPE);
529 decode_cpe(hDecoder, hInfo, ld, ID_CPE);
530 decode_sce_lfe(hDecoder, hInfo, ld, ID_LFE);
531 if (hInfo->error > 0)
532 return;
533 break;
534 default:
535 hInfo->error = 7;
536 return;
537 }
538#if 0
539 cnt = bits_to_decode() / 8;
540 while (cnt >= 1)
541 {
542 cnt -= extension_payload(cnt);
543 }
544#endif
545 }
546#endif
547
548 /* new in corrigendum 14496-3:2002 */
549#ifdef DRM
550 if (hDecoder->object_type != DRM_ER_LC)
551#endif
552 {
553 faad_byte_align(ld);
554 }
555
556 return;
557}
558
559/* Table 4.4.4 and */
560/* Table 4.4.9 */
561static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld,
562 uint8_t channel, uint8_t *tag)
563{
564 uint8_t retval = 0;
565 element sce = {0};
566 ic_stream *ics = &(sce.ics1);
567 ALIGN int16_t spec_data[1024] = {0};
568
569 sce.element_instance_tag = (uint8_t)faad_getbits(ld, LEN_TAG
570 DEBUGVAR(1,38,"single_lfe_channel_element(): element_instance_tag"));
571
572 *tag = sce.element_instance_tag;
573 sce.channel = channel;
574 sce.paired_channel = -1;
575
576 retval = individual_channel_stream(hDecoder, &sce, ld, ics, 0, spec_data);
577 if (retval > 0)
578 return retval;
579
580#ifdef SBR_DEC
581 /* check if next bitstream element is a fill element */
582 /* if so, read it now so SBR decoding can be done in case of a file with SBR */
583 if (faad_showbits(ld, LEN_SE_ID) == ID_FIL)
584 {
585 faad_flushbits(ld, LEN_SE_ID);
586
587 /* one sbr_info describes a channel_element not a channel! */
588 if ((retval = fill_element(hDecoder, ld, hDecoder->drc, hDecoder->fr_ch_ele)) > 0)
589 {
590 return retval;
591 }
592 }
593#endif
594
595 /* noiseless coding is done, spectral reconstruction is done now */
596 retval = reconstruct_single_channel(hDecoder, ics, &sce, spec_data);
597 if (retval > 0)
598 return retval;
599
600 return 0;
601}
602
603/* Table 4.4.5 */
604static uint8_t channel_pair_element(NeAACDecHandle hDecoder, bitfile *ld,
605 uint8_t channels, uint8_t *tag)
606{
607 ALIGN int16_t spec_data1[1024] = {0};
608 ALIGN int16_t spec_data2[1024] = {0};
609 element cpe = {0};
610 ic_stream *ics1 = &(cpe.ics1);
611 ic_stream *ics2 = &(cpe.ics2);
612 uint8_t result;
613
614 cpe.channel = channels;
615 cpe.paired_channel = channels+1;
616
617 cpe.element_instance_tag = (uint8_t)faad_getbits(ld, LEN_TAG
618 DEBUGVAR(1,39,"channel_pair_element(): element_instance_tag"));
619 *tag = cpe.element_instance_tag;
620
621 if ((cpe.common_window = faad_get1bit(ld
622 DEBUGVAR(1,40,"channel_pair_element(): common_window"))) & 1)
623 {
624 /* both channels have common ics information */
625 if ((result = ics_info(hDecoder, ics1, ld, cpe.common_window)) > 0)
626 return result;
627
628 ics1->ms_mask_present = (uint8_t)faad_getbits(ld, 2
629 DEBUGVAR(1,41,"channel_pair_element(): ms_mask_present"));
630 if (ics1->ms_mask_present == 1)
631 {
632 uint8_t g, sfb;
633 for (g = 0; g < ics1->num_window_groups; g++)
634 {
635 for (sfb = 0; sfb < ics1->max_sfb; sfb++)
636 {
637 ics1->ms_used[g][sfb] = faad_get1bit(ld
638 DEBUGVAR(1,42,"channel_pair_element(): faad_get1bit"));
639 }
640 }
641 }
642
643#ifdef ERROR_RESILIENCE
644 if ((hDecoder->object_type >= ER_OBJECT_START) && (ics1->predictor_data_present))
645 {
646 if ((
647#ifdef LTP_DEC
648 ics1->ltp.data_present =
649#endif
650 faad_get1bit(ld DEBUGVAR(1,50,"channel_pair_element(): ltp.data_present"))) & 1)
651 {
652#ifdef LTP_DEC
653 if ((result = ltp_data(hDecoder, ics1, &(ics1->ltp), ld)) > 0)
654 {
655 return result;
656 }
657#else
658 return 26;
659#endif
660 }
661 }
662#endif
663
664 memcpy(ics2, ics1, sizeof(ic_stream));
665 } else {
666 ics1->ms_mask_present = 0;
667 }
668
669 if ((result = individual_channel_stream(hDecoder, &cpe, ld, ics1,
670 0, spec_data1)) > 0)
671 {
672 return result;
673 }
674
675#ifdef ERROR_RESILIENCE
676 if (cpe.common_window && (hDecoder->object_type >= ER_OBJECT_START) &&
677 (ics1->predictor_data_present))
678 {
679 if ((
680#ifdef LTP_DEC
681 ics1->ltp2.data_present =
682#endif
683 faad_get1bit(ld DEBUGVAR(1,50,"channel_pair_element(): ltp.data_present"))) & 1)
684 {
685#ifdef LTP_DEC
686 if ((result = ltp_data(hDecoder, ics1, &(ics1->ltp2), ld)) > 0)
687 {
688 return result;
689 }
690#else
691 return 26;
692#endif
693 }
694 }
695#endif
696
697 if ((result = individual_channel_stream(hDecoder, &cpe, ld, ics2,
698 0, spec_data2)) > 0)
699 {
700 return result;
701 }
702
703#ifdef SBR_DEC
704 /* check if next bitstream element is a fill element */
705 /* if so, read it now so SBR decoding can be done in case of a file with SBR */
706 if (faad_showbits(ld, LEN_SE_ID) == ID_FIL)
707 {
708 faad_flushbits(ld, LEN_SE_ID);
709
710 /* one sbr_info describes a channel_element not a channel! */
711 if ((result = fill_element(hDecoder, ld, hDecoder->drc, hDecoder->fr_ch_ele)) > 0)
712 {
713 return result;
714 }
715 }
716#endif
717
718 /* noiseless coding is done, spectral reconstruction is done now */
719 if ((result = reconstruct_channel_pair(hDecoder, ics1, ics2, &cpe,
720 spec_data1, spec_data2)) > 0)
721 {
722 return result;
723 }
724
725 return 0;
726}
727
728/* Table 4.4.6 */
729static uint8_t ics_info(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld,
730 uint8_t common_window)
731{
732 uint8_t retval = 0;
733
734 /* ics->ics_reserved_bit = */ faad_get1bit(ld
735 DEBUGVAR(1,43,"ics_info(): ics_reserved_bit"));
736 ics->window_sequence = (uint8_t)faad_getbits(ld, 2
737 DEBUGVAR(1,44,"ics_info(): window_sequence"));
738 ics->window_shape = faad_get1bit(ld
739 DEBUGVAR(1,45,"ics_info(): window_shape"));
740
741 if (ics->window_sequence == EIGHT_SHORT_SEQUENCE)
742 {
743 ics->max_sfb = (uint8_t)faad_getbits(ld, 4
744 DEBUGVAR(1,46,"ics_info(): max_sfb (short)"));
745 ics->scale_factor_grouping = (uint8_t)faad_getbits(ld, 7
746 DEBUGVAR(1,47,"ics_info(): scale_factor_grouping"));
747 } else {
748 ics->max_sfb = (uint8_t)faad_getbits(ld, 6
749 DEBUGVAR(1,48,"ics_info(): max_sfb (long)"));
750 }
751
752 /* get the grouping information */
753 if ((retval = window_grouping_info(hDecoder, ics)) > 0)
754 return retval;
755
756 /* should be an error */
757 /* check the range of max_sfb */
758 if (ics->max_sfb > ics->num_swb)
759 return 16;
760
761 if (ics->window_sequence != EIGHT_SHORT_SEQUENCE)
762 {
763 if ((ics->predictor_data_present = faad_get1bit(ld
764 DEBUGVAR(1,49,"ics_info(): predictor_data_present"))) & 1)
765 {
766 if (hDecoder->object_type == MAIN) /* MPEG2 style AAC predictor */
767 {
768 uint8_t sfb;
769
770 uint8_t limit = min(ics->max_sfb, max_pred_sfb(hDecoder->sf_index));
771#ifdef MAIN_DEC
772 ics->pred.limit = limit;
773#endif
774
775 if ((
776#ifdef MAIN_DEC
777 ics->pred.predictor_reset =
778#endif
779 faad_get1bit(ld DEBUGVAR(1,53,"ics_info(): pred.predictor_reset"))) & 1)
780 {
781#ifdef MAIN_DEC
782 ics->pred.predictor_reset_group_number =
783#endif
784 (uint8_t)faad_getbits(ld, 5 DEBUGVAR(1,54,"ics_info(): pred.predictor_reset_group_number"));
785 }
786
787 for (sfb = 0; sfb < limit; sfb++)
788 {
789#ifdef MAIN_DEC
790 ics->pred.prediction_used[sfb] =
791#endif
792 faad_get1bit(ld DEBUGVAR(1,55,"ics_info(): pred.prediction_used"));
793 }
794 }
795#ifdef LTP_DEC
796 else { /* Long Term Prediction */
797 if (hDecoder->object_type < ER_OBJECT_START)
798 {
799 if ((ics->ltp.data_present = faad_get1bit(ld
800 DEBUGVAR(1,50,"ics_info(): ltp.data_present"))) & 1)
801 {
802 if ((retval = ltp_data(hDecoder, ics, &(ics->ltp), ld)) > 0)
803 {
804 return retval;
805 }
806 }
807 if (common_window)
808 {
809 if ((ics->ltp2.data_present = faad_get1bit(ld
810 DEBUGVAR(1,51,"ics_info(): ltp2.data_present"))) & 1)
811 {
812 if ((retval = ltp_data(hDecoder, ics, &(ics->ltp2), ld)) > 0)
813 {
814 return retval;
815 }
816 }
817 }
818 }
819#ifdef ERROR_RESILIENCE
820 if (!common_window && (hDecoder->object_type >= ER_OBJECT_START))
821 {
822 if ((ics->ltp.data_present = faad_get1bit(ld
823 DEBUGVAR(1,50,"ics_info(): ltp.data_present"))) & 1)
824 {
825 ltp_data(hDecoder, ics, &(ics->ltp), ld);
826 }
827 }
828#endif
829 }
830#endif
831 }
832 }
833
834 return retval;
835}
836
837/* Table 4.4.7 */
838static uint8_t pulse_data(ic_stream *ics, pulse_info *pul, bitfile *ld)
839{
840 uint8_t i;
841
842 pul->number_pulse = (uint8_t)faad_getbits(ld, 2
843 DEBUGVAR(1,56,"pulse_data(): number_pulse"));
844 pul->pulse_start_sfb = (uint8_t)faad_getbits(ld, 6
845 DEBUGVAR(1,57,"pulse_data(): pulse_start_sfb"));
846
847 /* check the range of pulse_start_sfb */
848 if (pul->pulse_start_sfb > ics->num_swb)
849 return 16;
850
851 for (i = 0; i < pul->number_pulse+1; i++)
852 {
853 pul->pulse_offset[i] = (uint8_t)faad_getbits(ld, 5
854 DEBUGVAR(1,58,"pulse_data(): pulse_offset"));
855#if 0
856 printf("%d\n", pul->pulse_offset[i]);
857#endif
858 pul->pulse_amp[i] = (uint8_t)faad_getbits(ld, 4
859 DEBUGVAR(1,59,"pulse_data(): pulse_amp"));
860#if 0
861 printf("%d\n", pul->pulse_amp[i]);
862#endif
863 }
864
865 return 0;
866}
867
868#ifdef COUPLING_DEC
869/* Table 4.4.8: Currently just for skipping the bits... */
870static uint8_t coupling_channel_element(NeAACDecHandle hDecoder, bitfile *ld)
871{
872 uint8_t c, result = 0;
873 uint8_t ind_sw_cce_flag = 0;
874 uint8_t num_gain_element_lists = 0;
875 uint8_t num_coupled_elements = 0;
876
877 element el_empty = {0};
878 ic_stream ics_empty = {0};
879 int16_t sh_data[1024];
880
881 c = faad_getbits(ld, LEN_TAG
882 DEBUGVAR(1,900,"coupling_channel_element(): element_instance_tag"));
883
884 ind_sw_cce_flag = faad_get1bit(ld
885 DEBUGVAR(1,901,"coupling_channel_element(): ind_sw_cce_flag"));
886 num_coupled_elements = faad_getbits(ld, 3
887 DEBUGVAR(1,902,"coupling_channel_element(): num_coupled_elements"));
888
889 for (c = 0; c < num_coupled_elements + 1; c++)
890 {
891 uint8_t cc_target_is_cpe, cc_target_tag_select;
892
893 num_gain_element_lists++;
894
895 cc_target_is_cpe = faad_get1bit(ld
896 DEBUGVAR(1,903,"coupling_channel_element(): cc_target_is_cpe"));
897 cc_target_tag_select = faad_getbits(ld, 4
898 DEBUGVAR(1,904,"coupling_channel_element(): cc_target_tag_select"));
899
900 if (cc_target_is_cpe)
901 {
902 uint8_t cc_l = faad_get1bit(ld
903 DEBUGVAR(1,905,"coupling_channel_element(): cc_l"));
904 uint8_t cc_r = faad_get1bit(ld
905 DEBUGVAR(1,906,"coupling_channel_element(): cc_r"));
906
907 if (cc_l && cc_r)
908 num_gain_element_lists++;
909 }
910 }
911
912 faad_get1bit(ld
913 DEBUGVAR(1,907,"coupling_channel_element(): cc_domain"));
914 faad_get1bit(ld
915 DEBUGVAR(1,908,"coupling_channel_element(): gain_element_sign"));
916 faad_getbits(ld, 2
917 DEBUGVAR(1,909,"coupling_channel_element(): gain_element_scale"));
918
919 if ((result = individual_channel_stream(hDecoder, &el_empty, ld, &ics_empty,
920 0, sh_data)) > 0)
921 {
922 return result;
923 }
924
925 for (c = 1; c < num_gain_element_lists; c++)
926 {
927 uint8_t cge;
928
929 if (ind_sw_cce_flag)
930 {
931 cge = 1;
932 } else {
933 cge = faad_get1bit(ld
934 DEBUGVAR(1,910,"coupling_channel_element(): common_gain_element_present"));
935 }
936
937 if (cge)
938 {
939 huffman_scale_factor(ld);
940 } else {
941 uint8_t g, sfb;
942
943 for (g = 0; g < ics_empty.num_window_groups; g++)
944 {
945 for (sfb = 0; sfb < ics_empty.max_sfb; sfb++)
946 {
947 if (ics_empty.sfb_cb[g][sfb] != ZERO_HCB)
948 huffman_scale_factor(ld);
949 }
950 }
951 }
952 }
953
954 return 0;
955}
956#endif
957
958/* Table 4.4.10 */
959static uint16_t data_stream_element(NeAACDecHandle hDecoder, bitfile *ld)
960{
961 uint8_t byte_aligned;
962 uint16_t i, count;
963
964 /* element_instance_tag = */ faad_getbits(ld, LEN_TAG
965 DEBUGVAR(1,60,"data_stream_element(): element_instance_tag"));
966 byte_aligned = faad_get1bit(ld
967 DEBUGVAR(1,61,"data_stream_element(): byte_aligned"));
968 count = (uint16_t)faad_getbits(ld, 8
969 DEBUGVAR(1,62,"data_stream_element(): count"));
970 if (count == 255)
971 {
972 count += (uint16_t)faad_getbits(ld, 8
973 DEBUGVAR(1,63,"data_stream_element(): extra count"));
974 }
975 if (byte_aligned)
976 faad_byte_align(ld);
977
978 for (i = 0; i < count; i++)
979 {
980 faad_getbits(ld, LEN_BYTE
981 DEBUGVAR(1,64,"data_stream_element(): data_stream_byte"));
982 }
983
984 return count;
985}
986
987/* Table 4.4.11 */
988static uint8_t fill_element(NeAACDecHandle hDecoder, bitfile *ld, drc_info *drc
989#ifdef SBR_DEC
990 ,uint8_t sbr_ele
991#endif
992 )
993{
994 uint16_t count;
995#ifdef SBR_DEC
996 uint8_t bs_extension_type;
997#endif
998
999 count = (uint16_t)faad_getbits(ld, 4
1000 DEBUGVAR(1,65,"fill_element(): count"));
1001 if (count == 15)
1002 {
1003 count += (uint16_t)faad_getbits(ld, 8
1004 DEBUGVAR(1,66,"fill_element(): extra count")) - 1;
1005 }
1006
1007 if (count > 0)
1008 {
1009#ifdef SBR_DEC
1010 bs_extension_type = (uint8_t)faad_showbits(ld, 4);
1011
1012 if ((bs_extension_type == EXT_SBR_DATA) ||
1013 (bs_extension_type == EXT_SBR_DATA_CRC))
1014 {
1015 if (sbr_ele == INVALID_SBR_ELEMENT)
1016 return 24;
1017
1018 if (!hDecoder->sbr[sbr_ele])
1019 {
1020 hDecoder->sbr[sbr_ele] = sbrDecodeInit(hDecoder->frameLength,
1021 hDecoder->element_id[sbr_ele], 2*get_sample_rate(hDecoder->sf_index),
1022 hDecoder->downSampledSBR
1023#ifdef DRM
1024 , 0
1025#endif
1026 );
1027 }
1028
1029 hDecoder->sbr_present_flag = 1;
1030
1031 /* parse the SBR data */
1032 hDecoder->sbr[sbr_ele]->ret = sbr_extension_data(ld, hDecoder->sbr[sbr_ele], count);
1033
1034#if 0
1035 if (hDecoder->sbr[sbr_ele]->ret > 0)
1036 {
1037 printf("%s\n", NeAACDecGetErrorMessage(hDecoder->sbr[sbr_ele]->ret));
1038 }
1039#endif
1040
1041#if (defined(PS_DEC) || defined(DRM_PS))
1042 if (hDecoder->sbr[sbr_ele]->ps_used)
1043 {
1044 hDecoder->ps_used[sbr_ele] = 1;
1045
1046 /* set element independent flag to 1 as well */
1047 hDecoder->ps_used_global = 1;
1048 }
1049#endif
1050 } else {
1051#endif
1052 while (count > 0)
1053 {
1054 count -= extension_payload(ld, drc, count);
1055 }
1056#ifdef SBR_DEC
1057 }
1058#endif
1059 }
1060
1061 return 0;
1062}
1063
1064/* Table 4.4.12 */
1065#ifdef SSR_DEC
1066static void gain_control_data(bitfile *ld, ic_stream *ics)
1067{
1068 uint8_t bd, wd, ad;
1069 ssr_info *ssr = &(ics->ssr);
1070
1071 ssr->max_band = (uint8_t)faad_getbits(ld, 2
1072 DEBUGVAR(1,1000,"gain_control_data(): max_band"));
1073
1074 if (ics->window_sequence == ONLY_LONG_SEQUENCE)
1075 {
1076 for (bd = 1; bd <= ssr->max_band; bd++)
1077 {
1078 for (wd = 0; wd < 1; wd++)
1079 {
1080 ssr->adjust_num[bd][wd] = (uint8_t)faad_getbits(ld, 3
1081 DEBUGVAR(1,1001,"gain_control_data(): adjust_num"));
1082
1083 for (ad = 0; ad < ssr->adjust_num[bd][wd]; ad++)
1084 {
1085 ssr->alevcode[bd][wd][ad] = (uint8_t)faad_getbits(ld, 4
1086 DEBUGVAR(1,1002,"gain_control_data(): alevcode"));
1087 ssr->aloccode[bd][wd][ad] = (uint8_t)faad_getbits(ld, 5
1088 DEBUGVAR(1,1003,"gain_control_data(): aloccode"));
1089 }
1090 }
1091 }
1092 } else if (ics->window_sequence == LONG_START_SEQUENCE) {
1093 for (bd = 1; bd <= ssr->max_band; bd++)
1094 {
1095 for (wd = 0; wd < 2; wd++)
1096 {
1097 ssr->adjust_num[bd][wd] = (uint8_t)faad_getbits(ld, 3
1098 DEBUGVAR(1,1001,"gain_control_data(): adjust_num"));
1099
1100 for (ad = 0; ad < ssr->adjust_num[bd][wd]; ad++)
1101 {
1102 ssr->alevcode[bd][wd][ad] = (uint8_t)faad_getbits(ld, 4
1103 DEBUGVAR(1,1002,"gain_control_data(): alevcode"));
1104 if (wd == 0)
1105 {
1106 ssr->aloccode[bd][wd][ad] = (uint8_t)faad_getbits(ld, 4
1107 DEBUGVAR(1,1003,"gain_control_data(): aloccode"));
1108 } else {
1109 ssr->aloccode[bd][wd][ad] = (uint8_t)faad_getbits(ld, 2
1110 DEBUGVAR(1,1003,"gain_control_data(): aloccode"));
1111 }
1112 }
1113 }
1114 }
1115 } else if (ics->window_sequence == EIGHT_SHORT_SEQUENCE) {
1116 for (bd = 1; bd <= ssr->max_band; bd++)
1117 {
1118 for (wd = 0; wd < 8; wd++)
1119 {
1120 ssr->adjust_num[bd][wd] = (uint8_t)faad_getbits(ld, 3
1121 DEBUGVAR(1,1001,"gain_control_data(): adjust_num"));
1122
1123 for (ad = 0; ad < ssr->adjust_num[bd][wd]; ad++)
1124 {
1125 ssr->alevcode[bd][wd][ad] = (uint8_t)faad_getbits(ld, 4
1126 DEBUGVAR(1,1002,"gain_control_data(): alevcode"));
1127 ssr->aloccode[bd][wd][ad] = (uint8_t)faad_getbits(ld, 2
1128 DEBUGVAR(1,1003,"gain_control_data(): aloccode"));
1129 }
1130 }
1131 }
1132 } else if (ics->window_sequence == LONG_STOP_SEQUENCE) {
1133 for (bd = 1; bd <= ssr->max_band; bd++)
1134 {
1135 for (wd = 0; wd < 2; wd++)
1136 {
1137 ssr->adjust_num[bd][wd] = (uint8_t)faad_getbits(ld, 3
1138 DEBUGVAR(1,1001,"gain_control_data(): adjust_num"));
1139
1140 for (ad = 0; ad < ssr->adjust_num[bd][wd]; ad++)
1141 {
1142 ssr->alevcode[bd][wd][ad] = (uint8_t)faad_getbits(ld, 4
1143 DEBUGVAR(1,1002,"gain_control_data(): alevcode"));
1144
1145 if (wd == 0)
1146 {
1147 ssr->aloccode[bd][wd][ad] = (uint8_t)faad_getbits(ld, 4
1148 DEBUGVAR(1,1003,"gain_control_data(): aloccode"));
1149 } else {
1150 ssr->aloccode[bd][wd][ad] = (uint8_t)faad_getbits(ld, 5
1151 DEBUGVAR(1,1003,"gain_control_data(): aloccode"));
1152 }
1153 }
1154 }
1155 }
1156 }
1157}
1158#endif
1159
1160#ifdef SCALABLE_DEC
1161/* Table 4.4.13 ASME */
1162void aac_scalable_main_element(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
1163 bitfile *ld, program_config *pce, drc_info *drc)
1164{
1165 uint8_t retval = 0;
1166 uint8_t channels = hDecoder->fr_channels = 0;
1167 uint8_t ch;
1168 uint8_t this_layer_stereo = (hDecoder->channelConfiguration > 1) ? 1 : 0;
1169 element cpe = {0};
1170 ic_stream *ics1 = &(cpe.ics1);
1171 ic_stream *ics2 = &(cpe.ics2);
1172 int16_t *spec_data;
1173 ALIGN int16_t spec_data1[1024] = {0};
1174 ALIGN int16_t spec_data2[1024] = {0};
1175
1176 hDecoder->fr_ch_ele = 0;
1177
1178 hInfo->error = aac_scalable_main_header(hDecoder, ics1, ics2, ld, this_layer_stereo);
1179 if (hInfo->error > 0)
1180 return;
1181
1182 cpe.common_window = 1;
1183 if (this_layer_stereo)
1184 {
1185 hDecoder->element_id[0] = ID_CPE;
1186 if (hDecoder->element_output_channels[hDecoder->fr_ch_ele] == 0)
1187 hDecoder->element_output_channels[hDecoder->fr_ch_ele] = 2;
1188 } else {
1189 hDecoder->element_id[0] = ID_SCE;
1190 }
1191
1192 for (ch = 0; ch < (this_layer_stereo ? 2 : 1); ch++)
1193 {
1194 ic_stream *ics;
1195 if (ch == 0)
1196 {
1197 ics = ics1;
1198 spec_data = spec_data1;
1199 } else {
1200 ics = ics2;
1201 spec_data = spec_data2;
1202 }
1203
1204 hInfo->error = individual_channel_stream(hDecoder, &cpe, ld, ics, 1, spec_data);
1205 if (hInfo->error > 0)
1206 return;
1207 }
1208
1209#ifdef DRM
1210#ifdef SBR_DEC
1211 /* In case of DRM we need to read the SBR info before channel reconstruction */
1212 if ((hDecoder->sbr_present_flag == 1) && (hDecoder->object_type == DRM_ER_LC))
1213 {
1214 bitfile ld_sbr = {0};
1215 uint32_t i;
1216 uint16_t count = 0;
1217 uint8_t *revbuffer;
1218 uint8_t *prevbufstart;
1219 uint8_t *pbufend;
1220
1221 /* all forward bitreading should be finished at this point */
1222 uint32_t bitsconsumed = faad_get_processed_bits(ld);
1223 uint32_t buffer_size = faad_origbitbuffer_size(ld);
1224 uint8_t *buffer = (uint8_t*)faad_origbitbuffer(ld);
1225
1226 if (bitsconsumed + 8 > buffer_size*8)
1227 {
1228 hInfo->error = 14;
1229 return;
1230 }
1231
1232 if (!hDecoder->sbr[0])
1233 {
1234 hDecoder->sbr[0] = sbrDecodeInit(hDecoder->frameLength, hDecoder->element_id[0],
1235 2*get_sample_rate(hDecoder->sf_index), 0 /* ds SBR */, 1);
1236 }
1237
1238 /* Reverse bit reading of SBR data in DRM audio frame */
1239 revbuffer = (uint8_t*)faad_malloc(buffer_size*sizeof(uint8_t));
1240 prevbufstart = revbuffer;
1241 pbufend = &buffer[buffer_size - 1];
1242 for (i = 0; i < buffer_size; i++)
1243 *prevbufstart++ = tabFlipbits[*pbufend--];
1244
1245 /* Set SBR data */
1246 /* consider 8 bits from AAC-CRC */
1247 count = (uint16_t)bit2byte(buffer_size*8 - bitsconsumed);
1248 faad_initbits(&ld_sbr, revbuffer, count);
1249
1250 hDecoder->sbr[0]->sample_rate = get_sample_rate(hDecoder->sf_index);
1251 hDecoder->sbr[0]->sample_rate *= 2;
1252
1253 faad_getbits(&ld_sbr, 8); /* Skip 8-bit CRC */
1254
1255 hDecoder->sbr[0]->ret = sbr_extension_data(&ld_sbr, hDecoder->sbr[0], count);
1256#if (defined(PS_DEC) || defined(DRM_PS))
1257 if (hDecoder->sbr[0]->ps_used)
1258 {
1259 hDecoder->ps_used[0] = 1;
1260 hDecoder->ps_used_global = 1;
1261 }
1262#endif
1263
1264 /* check CRC */
1265 /* no need to check it if there was already an error */
1266 if (hDecoder->sbr[0]->ret == 0)
1267 hDecoder->sbr[0]->ret = (uint8_t)faad_check_CRC(&ld_sbr, (uint16_t)faad_get_processed_bits(&ld_sbr) - 8);
1268
1269 /* SBR data was corrupted, disable it until the next header */
1270 if (hDecoder->sbr[0]->ret != 0)
1271 {
1272 hDecoder->sbr[0]->header_count = 0;
1273 }
1274
1275 faad_endbits(&ld_sbr);
1276
1277 if (revbuffer)
1278 faad_free(revbuffer);
1279 }
1280#endif
1281#endif
1282
1283 if (this_layer_stereo)
1284 {
1285 hInfo->error = reconstruct_channel_pair(hDecoder, ics1, ics2, &cpe, spec_data1, spec_data2);
1286 if (hInfo->error > 0)
1287 return;
1288 } else {
1289 hInfo->error = reconstruct_single_channel(hDecoder, ics1, &cpe, spec_data1);
1290 if (hInfo->error > 0)
1291 return;
1292 }
1293
1294 /* map output channels position to internal data channels */
1295 if (hDecoder->element_output_channels[hDecoder->fr_ch_ele] == 2)
1296 {
1297 /* this might be faulty when pce_set is true */
1298 hDecoder->internal_channel[channels] = channels;
1299 hDecoder->internal_channel[channels+1] = channels+1;
1300 } else {
1301 hDecoder->internal_channel[channels] = channels;
1302 }
1303
1304 hDecoder->fr_channels += hDecoder->element_output_channels[hDecoder->fr_ch_ele];
1305 hDecoder->fr_ch_ele++;
1306
1307 return;
1308}
1309
1310/* Table 4.4.15 */
1311static int8_t aac_scalable_main_header(NeAACDecHandle hDecoder, ic_stream *ics1, ic_stream *ics2,
1312 bitfile *ld, uint8_t this_layer_stereo)
1313{
1314 uint8_t retval = 0;
1315 uint8_t ch;
1316 ic_stream *ics;
1317
1318 /* ics1->ics_reserved_bit = */ faad_get1bit(ld
1319 DEBUGVAR(1,300,"aac_scalable_main_header(): ics_reserved_bits"));
1320 ics1->window_sequence = (uint8_t)faad_getbits(ld, 2
1321 DEBUGVAR(1,301,"aac_scalable_main_header(): window_sequence"));
1322 ics1->window_shape = faad_get1bit(ld
1323 DEBUGVAR(1,302,"aac_scalable_main_header(): window_shape"));
1324
1325 if (ics1->window_sequence == EIGHT_SHORT_SEQUENCE)
1326 {
1327 ics1->max_sfb = (uint8_t)faad_getbits(ld, 4
1328 DEBUGVAR(1,303,"aac_scalable_main_header(): max_sfb (short)"));
1329 ics1->scale_factor_grouping = (uint8_t)faad_getbits(ld, 7
1330 DEBUGVAR(1,304,"aac_scalable_main_header(): scale_factor_grouping"));
1331 } else {
1332 ics1->max_sfb = (uint8_t)faad_getbits(ld, 6
1333 DEBUGVAR(1,305,"aac_scalable_main_header(): max_sfb (long)"));
1334 }
1335
1336 /* get the grouping information */
1337 if ((retval = window_grouping_info(hDecoder, ics1)) > 0)
1338 return retval;
1339
1340 /* should be an error */
1341 /* check the range of max_sfb */
1342 if (ics1->max_sfb > ics1->num_swb)
1343 return 16;
1344
1345 if (this_layer_stereo)
1346 {
1347 ics1->ms_mask_present = (uint8_t)faad_getbits(ld, 2
1348 DEBUGVAR(1,306,"aac_scalable_main_header(): ms_mask_present"));
1349 if (ics1->ms_mask_present == 1)
1350 {
1351 uint8_t g, sfb;
1352 for (g = 0; g < ics1->num_window_groups; g++)
1353 {
1354 for (sfb = 0; sfb < ics1->max_sfb; sfb++)
1355 {
1356 ics1->ms_used[g][sfb] = faad_get1bit(ld
1357 DEBUGVAR(1,307,"aac_scalable_main_header(): faad_get1bit"));
1358 }
1359 }
1360 }
1361
1362 memcpy(ics2, ics1, sizeof(ic_stream));
1363 } else {
1364 ics1->ms_mask_present = 0;
1365 }
1366
1367 if (0)
1368 {
1369 faad_get1bit(ld
1370 DEBUGVAR(1,308,"aac_scalable_main_header(): tns_channel_mono_layer"));
1371 }
1372
1373 for (ch = 0; ch < (this_layer_stereo ? 2 : 1); ch++)
1374 {
1375 if (ch == 0)
1376 ics = ics1;
1377 else
1378 ics = ics2;
1379
1380 if ( 1 /*!tvq_layer_pesent || (tns_aac_tvq_en[ch] == 1)*/)
1381 {
1382 if ((ics->tns_data_present = faad_get1bit(ld
1383 DEBUGVAR(1,309,"aac_scalable_main_header(): tns_data_present"))) & 1)
1384 {
1385#ifdef DRM
1386 /* different order of data units in DRM */
1387 if (hDecoder->object_type != DRM_ER_LC)
1388#endif
1389 {
1390 tns_data(ics, &(ics->tns), ld);
1391 }
1392 }
1393 }
1394#if 0
1395 if (0 /*core_flag || tvq_layer_pesent*/)
1396 {
1397 if ((ch==0) || ((ch==1) && (core_stereo || tvq_stereo))
1398 diff_control_data();
1399 if (mono_stereo_flag)
1400 diff_control_data_lr();
1401 } else {
1402#endif
1403 if ((
1404#ifdef LTP_DEC
1405 ics->ltp.data_present =
1406#endif
1407 faad_get1bit(ld DEBUGVAR(1,310,"aac_scalable_main_header(): ltp.data_present"))) & 1)
1408 {
1409#ifdef LTP_DEC
1410 if ((retval = ltp_data(hDecoder, ics, &(ics->ltp), ld)) > 0)
1411 {
1412 return retval;
1413 }
1414#else
1415 return 26;
1416#endif
1417 }
1418#if 0
1419 }
1420#endif
1421 }
1422
1423 return 0;
1424}
1425#endif
1426
1427/* Table 4.4.24 */
1428static uint8_t individual_channel_stream(NeAACDecHandle hDecoder, element *ele,
1429 bitfile *ld, ic_stream *ics, uint8_t scal_flag,
1430 int16_t *spec_data)
1431{
1432 uint8_t result;
1433
1434 ics->global_gain = (uint8_t)faad_getbits(ld, 8
1435 DEBUGVAR(1,67,"individual_channel_stream(): global_gain"));
1436
1437 if (!ele->common_window && !scal_flag)
1438 {
1439 if ((result = ics_info(hDecoder, ics, ld, ele->common_window)) > 0)
1440 return result;
1441 }
1442
1443 if ((result = section_data(hDecoder, ics, ld)) > 0)
1444 return result;
1445
1446 if ((result = scale_factor_data(hDecoder, ics, ld)) > 0)
1447 return result;
1448
1449 if (!scal_flag)
1450 {
1451 /**
1452 ** NOTE: It could be that pulse data is available in scalable AAC too,
1453 ** as said in Amendment 1, this could be only the case for ER AAC,
1454 ** though. (have to check this out later)
1455 **/
1456 /* get pulse data */
1457 if ((ics->pulse_data_present = faad_get1bit(ld
1458 DEBUGVAR(1,68,"individual_channel_stream(): pulse_data_present"))) & 1)
1459 {
1460 if ((result = pulse_data(ics, &(ics->pul), ld)) > 0)
1461 return result;
1462 }
1463
1464 /* get tns data */
1465 if ((ics->tns_data_present = faad_get1bit(ld
1466 DEBUGVAR(1,69,"individual_channel_stream(): tns_data_present"))) & 1)
1467 {
1468#ifdef ERROR_RESILIENCE
1469 if (hDecoder->object_type < ER_OBJECT_START)
1470#endif
1471 tns_data(ics, &(ics->tns), ld);
1472 }
1473
1474 /* get gain control data */
1475 if ((ics->gain_control_data_present = faad_get1bit(ld
1476 DEBUGVAR(1,70,"individual_channel_stream(): gain_control_data_present"))) & 1)
1477 {
1478#ifdef SSR_DEC
1479 if (hDecoder->object_type != SSR)
1480 return 1;
1481 else
1482 gain_control_data(ld, ics);
1483#else
1484 return 1;
1485#endif
1486 }
1487 }
1488
1489#ifdef ERROR_RESILIENCE
1490 if (hDecoder->aacSpectralDataResilienceFlag)
1491 {
1492 ics->length_of_reordered_spectral_data = (uint16_t)faad_getbits(ld, 14
1493 DEBUGVAR(1,147,"individual_channel_stream(): length_of_reordered_spectral_data"));
1494
1495 if (hDecoder->channelConfiguration == 2)
1496 {
1497 if (ics->length_of_reordered_spectral_data > 6144)
1498 ics->length_of_reordered_spectral_data = 6144;
1499 } else {
1500 if (ics->length_of_reordered_spectral_data > 12288)
1501 ics->length_of_reordered_spectral_data = 12288;
1502 }
1503
1504 ics->length_of_longest_codeword = (uint8_t)faad_getbits(ld, 6
1505 DEBUGVAR(1,148,"individual_channel_stream(): length_of_longest_codeword"));
1506 if (ics->length_of_longest_codeword >= 49)
1507 ics->length_of_longest_codeword = 49;
1508 }
1509
1510 /* RVLC spectral data is put here */
1511 if (hDecoder->aacScalefactorDataResilienceFlag)
1512 {
1513 if ((result = rvlc_decode_scale_factors(ics, ld)) > 0)
1514 return result;
1515 }
1516
1517 if (hDecoder->object_type >= ER_OBJECT_START)
1518 {
1519 if (ics->tns_data_present)
1520 tns_data(ics, &(ics->tns), ld);
1521 }
1522
1523#ifdef DRM
1524 /* CRC check */
1525 if (hDecoder->object_type == DRM_ER_LC)
1526 if ((result = (uint8_t)faad_check_CRC(ld, (uint16_t)faad_get_processed_bits(ld) - 8)) > 0)
1527 return result;
1528#endif
1529
1530 if (hDecoder->aacSpectralDataResilienceFlag)
1531 {
1532 /* error resilient spectral data decoding */
1533 if ((result = reordered_spectral_data(hDecoder, ics, ld, spec_data)) > 0)
1534 {
1535 return result;
1536 }
1537 } else {
1538#endif
1539 /* decode the spectral data */
1540 if ((result = spectral_data(hDecoder, ics, ld, spec_data)) > 0)
1541 {
1542 return result;
1543 }
1544#ifdef ERROR_RESILIENCE
1545 }
1546#endif
1547
1548 /* pulse coding reconstruction */
1549 if (ics->pulse_data_present)
1550 {
1551 if (ics->window_sequence != EIGHT_SHORT_SEQUENCE)
1552 {
1553 if ((result = pulse_decode(ics, spec_data, hDecoder->frameLength)) > 0)
1554 return result;
1555 } else {
1556 return 2; /* pulse coding not allowed for short blocks */
1557 }
1558 }
1559
1560 return 0;
1561}
1562
1563/* Table 4.4.25 */
1564static uint8_t section_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld)
1565{
1566 uint8_t g;
1567 uint8_t sect_esc_val, sect_bits;
1568
1569 if (ics->window_sequence == EIGHT_SHORT_SEQUENCE)
1570 sect_bits = 3;
1571 else
1572 sect_bits = 5;
1573 sect_esc_val = (1<<sect_bits) - 1;
1574
1575#if 0
1576 printf("\ntotal sfb %d\n", ics->max_sfb);
1577 printf(" sect top cb\n");
1578#endif
1579
1580 for (g = 0; g < ics->num_window_groups; g++)
1581 {
1582 uint8_t k = 0;
1583 uint8_t i = 0;
1584
1585 while (k < ics->max_sfb)
1586 {
1587#ifdef ERROR_RESILIENCE
1588 uint8_t vcb11 = 0;
1589#endif
1590 uint8_t sfb;
1591 uint8_t sect_len_incr;
1592 uint16_t sect_len = 0;
1593 uint8_t sect_cb_bits = 4;
1594
1595 /* if "faad_getbits" detects error and returns "0", "k" is never
1596 incremented and we cannot leave the while loop */
1597 if ((ld->error != 0) || (ld->no_more_reading))
1598 return 14;
1599
1600#ifdef ERROR_RESILIENCE
1601 if (hDecoder->aacSectionDataResilienceFlag)
1602 sect_cb_bits = 5;
1603#endif
1604
1605 ics->sect_cb[g][i] = (uint8_t)faad_getbits(ld, sect_cb_bits
1606 DEBUGVAR(1,71,"section_data(): sect_cb"));
1607
1608#if 0
1609 printf("%d\n", ics->sect_cb[g][i]);
1610#endif
1611
1612 if (ics->sect_cb[g][i] == NOISE_HCB)
1613 ics->noise_used = 1;
1614
1615#ifdef ERROR_RESILIENCE
1616 if (hDecoder->aacSectionDataResilienceFlag)
1617 {
1618 if ((ics->sect_cb[g][i] == 11) ||
1619 ((ics->sect_cb[g][i] >= 16) && (ics->sect_cb[g][i] <= 32)))
1620 {
1621 vcb11 = 1;
1622 }
1623 }
1624 if (vcb11)
1625 {
1626 sect_len_incr = 1;
1627 } else {
1628#endif
1629 sect_len_incr = (uint8_t)faad_getbits(ld, sect_bits
1630 DEBUGVAR(1,72,"section_data(): sect_len_incr"));
1631#ifdef ERROR_RESILIENCE
1632 }
1633#endif
1634 while ((sect_len_incr == sect_esc_val) /* &&
1635 (k+sect_len < ics->max_sfb)*/)
1636 {
1637 sect_len += sect_len_incr;
1638 sect_len_incr = (uint8_t)faad_getbits(ld, sect_bits
1639 DEBUGVAR(1,72,"section_data(): sect_len_incr"));
1640 }
1641
1642 sect_len += sect_len_incr;
1643
1644 ics->sect_start[g][i] = k;
1645 ics->sect_end[g][i] = k + sect_len;
1646
1647#if 0
1648 printf("%d\n", ics->sect_start[g][i]);
1649#endif
1650#if 0
1651 printf("%d\n", ics->sect_end[g][i]);
1652#endif
1653
1654 if (k + sect_len >= 8*15)
1655 return 15;
1656 if (i >= 8*15)
1657 return 15;
1658
1659 for (sfb = k; sfb < k + sect_len; sfb++)
1660 {
1661 ics->sfb_cb[g][sfb] = ics->sect_cb[g][i];
1662#if 0
1663 printf("%d\n", ics->sfb_cb[g][sfb]);
1664#endif
1665 }
1666
1667#if 0
1668 printf(" %6d %6d %6d\n",
1669 i,
1670 ics->sect_end[g][i],
1671 ics->sect_cb[g][i]);
1672#endif
1673
1674 k += sect_len;
1675 i++;
1676 }
1677 ics->num_sec[g] = i;
1678#if 0
1679 printf("%d\n", ics->num_sec[g]);
1680#endif
1681 }
1682
1683#if 0
1684 printf("\n");
1685#endif
1686
1687 return 0;
1688}
1689
1690/*
1691 * decode_scale_factors()
1692 * decodes the scalefactors from the bitstream
1693 */
1694/*
1695 * All scalefactors (and also the stereo positions and pns energies) are
1696 * transmitted using Huffman coded DPCM relative to the previous active
1697 * scalefactor (respectively previous stereo position or previous pns energy,
1698 * see subclause 4.6.2 and 4.6.3). The first active scalefactor is
1699 * differentially coded relative to the global gain.
1700 */
1701static uint8_t decode_scale_factors(ic_stream *ics, bitfile *ld)
1702{
1703 uint8_t g, sfb;
1704 int16_t t;
1705 int8_t noise_pcm_flag = 1;
1706
1707 int16_t scale_factor = ics->global_gain;
1708 int16_t is_position = 0;
1709 int16_t noise_energy = ics->global_gain - 90;
1710
1711 for (g = 0; g < ics->num_window_groups; g++)
1712 {
1713 for (sfb = 0; sfb < ics->max_sfb; sfb++)
1714 {
1715 switch (ics->sfb_cb[g][sfb])
1716 {
1717 case ZERO_HCB: /* zero book */
1718 ics->scale_factors[g][sfb] = 0;
1719//#define SF_PRINT
1720#ifdef SF_PRINT
1721 printf("%d\n", ics->scale_factors[g][sfb]);
1722#endif
1723 break;
1724 case INTENSITY_HCB: /* intensity books */
1725 case INTENSITY_HCB2:
1726
1727 /* decode intensity position */
1728 t = huffman_scale_factor(ld);
1729 is_position += (t - 60);
1730 ics->scale_factors[g][sfb] = is_position;
1731#ifdef SF_PRINT
1732 printf("%d\n", ics->scale_factors[g][sfb]);
1733#endif
1734
1735 break;
1736 case NOISE_HCB: /* noise books */
1737
1738 /* decode noise energy */
1739 if (noise_pcm_flag)
1740 {
1741 noise_pcm_flag = 0;
1742 t = (int16_t)faad_getbits(ld, 9
1743 DEBUGVAR(1,73,"scale_factor_data(): first noise")) - 256;
1744 } else {
1745 t = huffman_scale_factor(ld);
1746 t -= 60;
1747 }
1748 noise_energy += t;
1749 ics->scale_factors[g][sfb] = noise_energy;
1750#ifdef SF_PRINT
1751 printf("%d\n", ics->scale_factors[g][sfb]);
1752#endif
1753
1754 break;
1755 default: /* spectral books */
1756
1757 /* ics->scale_factors[g][sfb] must be between 0 and 255 */
1758
1759 ics->scale_factors[g][sfb] = 0;
1760
1761 /* decode scale factor */
1762 t = huffman_scale_factor(ld);
1763 scale_factor += (t - 60);
1764 if (scale_factor < 0 || scale_factor > 255)
1765 return 4;
1766 ics->scale_factors[g][sfb] = scale_factor;
1767#ifdef SF_PRINT
1768 printf("%d\n", ics->scale_factors[g][sfb]);
1769#endif
1770
1771 break;
1772 }
1773 }
1774 }
1775
1776 return 0;
1777}
1778
1779/* Table 4.4.26 */
1780static uint8_t scale_factor_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld)
1781{
1782 uint8_t ret = 0;
1783#ifdef PROFILE
1784 int64_t count = faad_get_ts();
1785#endif
1786
1787#ifdef ERROR_RESILIENCE
1788 if (!hDecoder->aacScalefactorDataResilienceFlag)
1789 {
1790#endif
1791 ret = decode_scale_factors(ics, ld);
1792#ifdef ERROR_RESILIENCE
1793 } else {
1794 /* In ER AAC the parameters for RVLC are seperated from the actual
1795 data that holds the scale_factors.
1796 Strangely enough, 2 parameters for HCR are put inbetween them.
1797 */
1798 ret = rvlc_scale_factor_data(ics, ld);
1799 }
1800#endif
1801
1802#ifdef PROFILE
1803 count = faad_get_ts() - count;
1804 hDecoder->scalefac_cycles += count;
1805#endif
1806
1807 return ret;
1808}
1809
1810/* Table 4.4.27 */
1811static void tns_data(ic_stream *ics, tns_info *tns, bitfile *ld)
1812{
1813 uint8_t w, filt, i, start_coef_bits, coef_bits;
1814 uint8_t n_filt_bits = 2;
1815 uint8_t length_bits = 6;
1816 uint8_t order_bits = 5;
1817
1818 if (ics->window_sequence == EIGHT_SHORT_SEQUENCE)
1819 {
1820 n_filt_bits = 1;
1821 length_bits = 4;
1822 order_bits = 3;
1823 }
1824
1825 for (w = 0; w < ics->num_windows; w++)
1826 {
1827 tns->n_filt[w] = (uint8_t)faad_getbits(ld, n_filt_bits
1828 DEBUGVAR(1,74,"tns_data(): n_filt"));
1829#if 0
1830 printf("%d\n", tns->n_filt[w]);
1831#endif
1832
1833 if (tns->n_filt[w])
1834 {
1835 if ((tns->coef_res[w] = faad_get1bit(ld
1836 DEBUGVAR(1,75,"tns_data(): coef_res"))) & 1)
1837 {
1838 start_coef_bits = 4;
1839 } else {
1840 start_coef_bits = 3;
1841 }
1842#if 0
1843 printf("%d\n", tns->coef_res[w]);
1844#endif
1845 }
1846
1847 for (filt = 0; filt < tns->n_filt[w]; filt++)
1848 {
1849 tns->length[w][filt] = (uint8_t)faad_getbits(ld, length_bits
1850 DEBUGVAR(1,76,"tns_data(): length"));
1851#if 0
1852 printf("%d\n", tns->length[w][filt]);
1853#endif
1854 tns->order[w][filt] = (uint8_t)faad_getbits(ld, order_bits
1855 DEBUGVAR(1,77,"tns_data(): order"));
1856#if 0
1857 printf("%d\n", tns->order[w][filt]);
1858#endif
1859 if (tns->order[w][filt])
1860 {
1861 tns->direction[w][filt] = faad_get1bit(ld
1862 DEBUGVAR(1,78,"tns_data(): direction"));
1863#if 0
1864 printf("%d\n", tns->direction[w][filt]);
1865#endif
1866 tns->coef_compress[w][filt] = faad_get1bit(ld
1867 DEBUGVAR(1,79,"tns_data(): coef_compress"));
1868#if 0
1869 printf("%d\n", tns->coef_compress[w][filt]);
1870#endif
1871
1872 coef_bits = start_coef_bits - tns->coef_compress[w][filt];
1873 for (i = 0; i < tns->order[w][filt]; i++)
1874 {
1875 tns->coef[w][filt][i] = (uint8_t)faad_getbits(ld, coef_bits
1876 DEBUGVAR(1,80,"tns_data(): coef"));
1877#if 0
1878 printf("%d\n", tns->coef[w][filt][i]);
1879#endif
1880 }
1881 }
1882 }
1883 }
1884}
1885
1886#ifdef LTP_DEC
1887/* Table 4.4.28 */
1888static uint8_t ltp_data(NeAACDecHandle hDecoder, ic_stream *ics, ltp_info *ltp, bitfile *ld)
1889{
1890 uint8_t sfb, w;
1891
1892 ltp->lag = 0;
1893
1894#ifdef LD_DEC
1895 if (hDecoder->object_type == LD)
1896 {
1897 ltp->lag_update = (uint8_t)faad_getbits(ld, 1
1898 DEBUGVAR(1,142,"ltp_data(): lag_update"));
1899
1900 if (ltp->lag_update)
1901 {
1902 ltp->lag = (uint16_t)faad_getbits(ld, 10
1903 DEBUGVAR(1,81,"ltp_data(): lag"));
1904 }
1905 } else {
1906#endif
1907 ltp->lag = (uint16_t)faad_getbits(ld, 11
1908 DEBUGVAR(1,81,"ltp_data(): lag"));
1909#ifdef LD_DEC
1910 }
1911#endif
1912
1913 /* Check length of lag */
1914 if (ltp->lag > (hDecoder->frameLength << 1))
1915 return 18;
1916
1917 ltp->coef = (uint8_t)faad_getbits(ld, 3
1918 DEBUGVAR(1,82,"ltp_data(): coef"));
1919
1920 if (ics->window_sequence == EIGHT_SHORT_SEQUENCE)
1921 {
1922 for (w = 0; w < ics->num_windows; w++)
1923 {
1924 if ((ltp->short_used[w] = faad_get1bit(ld
1925 DEBUGVAR(1,83,"ltp_data(): short_used"))) & 1)
1926 {
1927 ltp->short_lag_present[w] = faad_get1bit(ld
1928 DEBUGVAR(1,84,"ltp_data(): short_lag_present"));
1929 if (ltp->short_lag_present[w])
1930 {
1931 ltp->short_lag[w] = (uint8_t)faad_getbits(ld, 4
1932 DEBUGVAR(1,85,"ltp_data(): short_lag"));
1933 }
1934 }
1935 }
1936 } else {
1937 ltp->last_band = (ics->max_sfb < MAX_LTP_SFB ? ics->max_sfb : MAX_LTP_SFB);
1938
1939 for (sfb = 0; sfb < ltp->last_band; sfb++)
1940 {
1941 ltp->long_used[sfb] = faad_get1bit(ld
1942 DEBUGVAR(1,86,"ltp_data(): long_used"));
1943 }
1944 }
1945
1946 return 0;
1947}
1948#endif
1949
1950/* Table 4.4.29 */
1951static uint8_t spectral_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld,
1952 int16_t *spectral_data)
1953{
1954 int8_t i;
1955 uint8_t g;
1956 uint16_t inc, k, p = 0;
1957 uint8_t groups = 0;
1958 uint8_t sect_cb;
1959 uint8_t result;
1960 uint16_t nshort = hDecoder->frameLength/8;
1961
1962#ifdef PROFILE
1963 int64_t count = faad_get_ts();
1964#endif
1965
1966 for(g = 0; g < ics->num_window_groups; g++)
1967 {
1968 p = groups*nshort;
1969
1970 for (i = 0; i < ics->num_sec[g]; i++)
1971 {
1972 sect_cb = ics->sect_cb[g][i];
1973
1974 inc = (sect_cb >= FIRST_PAIR_HCB) ? 2 : 4;
1975
1976 switch (sect_cb)
1977 {
1978 case ZERO_HCB:
1979 case NOISE_HCB:
1980 case INTENSITY_HCB:
1981 case INTENSITY_HCB2:
1982//#define SD_PRINT
1983#ifdef SD_PRINT
1984 {
1985 int j;
1986 for (j = ics->sect_sfb_offset[g][ics->sect_start[g][i]]; j < ics->sect_sfb_offset[g][ics->sect_end[g][i]]; j++)
1987 {
1988 printf("%d\n", 0);
1989 }
1990 }
1991#endif
1992//#define SFBO_PRINT
1993#ifdef SFBO_PRINT
1994 printf("%d\n", ics->sect_sfb_offset[g][ics->sect_start[g][i]]);
1995#endif
1996 p += (ics->sect_sfb_offset[g][ics->sect_end[g][i]] -
1997 ics->sect_sfb_offset[g][ics->sect_start[g][i]]);
1998 break;
1999 default:
2000#ifdef SFBO_PRINT
2001 printf("%d\n", ics->sect_sfb_offset[g][ics->sect_start[g][i]]);
2002#endif
2003 for (k = ics->sect_sfb_offset[g][ics->sect_start[g][i]];
2004 k < ics->sect_sfb_offset[g][ics->sect_end[g][i]]; k += inc)
2005 {
2006 if ((result = huffman_spectral_data(sect_cb, ld, &spectral_data[p])) > 0)
2007 return result;
2008#ifdef SD_PRINT
2009 {
2010 int j;
2011 for (j = p; j < p+inc; j++)
2012 {
2013 printf("%d\n", spectral_data[j]);
2014 }
2015 }
2016#endif
2017 p += inc;
2018 }
2019 break;
2020 }
2021 }
2022 groups += ics->window_group_length[g];
2023 }
2024
2025#ifdef PROFILE
2026 count = faad_get_ts() - count;
2027 hDecoder->spectral_cycles += count;
2028#endif
2029
2030 return 0;
2031}
2032
2033/* Table 4.4.30 */
2034static uint16_t extension_payload(bitfile *ld, drc_info *drc, uint16_t count)
2035{
2036 uint16_t i, n, dataElementLength;
2037 uint8_t dataElementLengthPart;
2038 uint8_t align = 4, data_element_version, loopCounter;
2039
2040 uint8_t extension_type = (uint8_t)faad_getbits(ld, 4
2041 DEBUGVAR(1,87,"extension_payload(): extension_type"));
2042
2043 switch (extension_type)
2044 {
2045 case EXT_DYNAMIC_RANGE:
2046 drc->present = 1;
2047 n = dynamic_range_info(ld, drc);
2048 return n;
2049 case EXT_FILL_DATA:
2050 /* fill_nibble = */ faad_getbits(ld, 4
2051 DEBUGVAR(1,136,"extension_payload(): fill_nibble")); /* must be ‘0000’ */
2052 for (i = 0; i < count-1; i++)
2053 {
2054 /* fill_byte[i] = */ faad_getbits(ld, 8
2055 DEBUGVAR(1,88,"extension_payload(): fill_byte")); /* must be ‘10100101’ */
2056 }
2057 return count;
2058 case EXT_DATA_ELEMENT:
2059 data_element_version = (uint8_t)faad_getbits(ld, 4
2060 DEBUGVAR(1,400,"extension_payload(): data_element_version"));
2061 switch (data_element_version)
2062 {
2063 case ANC_DATA:
2064 loopCounter = 0;
2065 dataElementLength = 0;
2066 do {
2067 dataElementLengthPart = (uint8_t)faad_getbits(ld, 8
2068 DEBUGVAR(1,401,"extension_payload(): dataElementLengthPart"));
2069 dataElementLength += dataElementLengthPart;
2070 loopCounter++;
2071 } while (dataElementLengthPart == 255);
2072
2073 for (i = 0; i < dataElementLength; i++)
2074 {
2075 /* data_element_byte[i] = */ faad_getbits(ld, 8
2076 DEBUGVAR(1,402,"extension_payload(): data_element_byte"));
2077 return (dataElementLength+loopCounter+1);
2078 }
2079 default:
2080 align = 0;
2081 }
2082 case EXT_FIL:
2083 default:
2084 faad_getbits(ld, align
2085 DEBUGVAR(1,88,"extension_payload(): fill_nibble"));
2086 for (i = 0; i < count-1; i++)
2087 {
2088 /* other_bits[i] = */ faad_getbits(ld, 8
2089 DEBUGVAR(1,89,"extension_payload(): fill_bit"));
2090 }
2091 return count;
2092 }
2093}
2094
2095/* Table 4.4.31 */
2096static uint8_t dynamic_range_info(bitfile *ld, drc_info *drc)
2097{
2098 uint8_t i, n = 1;
2099 uint8_t band_incr;
2100
2101 drc->num_bands = 1;
2102
2103 if (faad_get1bit(ld
2104 DEBUGVAR(1,90,"dynamic_range_info(): has instance_tag")) & 1)
2105 {
2106 drc->pce_instance_tag = (uint8_t)faad_getbits(ld, 4
2107 DEBUGVAR(1,91,"dynamic_range_info(): pce_instance_tag"));
2108 /* drc->drc_tag_reserved_bits = */ faad_getbits(ld, 4
2109 DEBUGVAR(1,92,"dynamic_range_info(): drc_tag_reserved_bits"));
2110 n++;
2111 }
2112
2113 drc->excluded_chns_present = faad_get1bit(ld
2114 DEBUGVAR(1,93,"dynamic_range_info(): excluded_chns_present"));
2115 if (drc->excluded_chns_present == 1)
2116 {
2117 n += excluded_channels(ld, drc);
2118 }
2119
2120 if (faad_get1bit(ld
2121 DEBUGVAR(1,94,"dynamic_range_info(): has bands data")) & 1)
2122 {
2123 band_incr = (uint8_t)faad_getbits(ld, 4
2124 DEBUGVAR(1,95,"dynamic_range_info(): band_incr"));
2125 /* drc->drc_bands_reserved_bits = */ faad_getbits(ld, 4
2126 DEBUGVAR(1,96,"dynamic_range_info(): drc_bands_reserved_bits"));
2127 n++;
2128 drc->num_bands += band_incr;
2129
2130 for (i = 0; i < drc->num_bands; i++);
2131 {
2132 drc->band_top[i] = (uint8_t)faad_getbits(ld, 8
2133 DEBUGVAR(1,97,"dynamic_range_info(): band_top"));
2134 n++;
2135 }
2136 }
2137
2138 if (faad_get1bit(ld
2139 DEBUGVAR(1,98,"dynamic_range_info(): has prog_ref_level")) & 1)
2140 {
2141 drc->prog_ref_level = (uint8_t)faad_getbits(ld, 7
2142 DEBUGVAR(1,99,"dynamic_range_info(): prog_ref_level"));
2143 /* drc->prog_ref_level_reserved_bits = */ faad_get1bit(ld
2144 DEBUGVAR(1,100,"dynamic_range_info(): prog_ref_level_reserved_bits"));
2145 n++;
2146 }
2147
2148 for (i = 0; i < drc->num_bands; i++)
2149 {
2150 drc->dyn_rng_sgn[i] = faad_get1bit(ld
2151 DEBUGVAR(1,101,"dynamic_range_info(): dyn_rng_sgn"));
2152 drc->dyn_rng_ctl[i] = (uint8_t)faad_getbits(ld, 7
2153 DEBUGVAR(1,102,"dynamic_range_info(): dyn_rng_ctl"));
2154 n++;
2155 }
2156
2157 return n;
2158}
2159
2160/* Table 4.4.32 */
2161static uint8_t excluded_channels(bitfile *ld, drc_info *drc)
2162{
2163 uint8_t i, n = 0;
2164 uint8_t num_excl_chan = 7;
2165
2166 for (i = 0; i < 7; i++)
2167 {
2168 drc->exclude_mask[i] = faad_get1bit(ld
2169 DEBUGVAR(1,103,"excluded_channels(): exclude_mask"));
2170 }
2171 n++;
2172
2173 while ((drc->additional_excluded_chns[n-1] = faad_get1bit(ld
2174 DEBUGVAR(1,104,"excluded_channels(): additional_excluded_chns"))) == 1)
2175 {
2176 for (i = num_excl_chan; i < num_excl_chan+7; i++)
2177 {
2178 drc->exclude_mask[i] = faad_get1bit(ld
2179 DEBUGVAR(1,105,"excluded_channels(): exclude_mask"));
2180 }
2181 n++;
2182 num_excl_chan += 7;
2183 }
2184
2185 return n;
2186}
2187
2188/* Annex A: Audio Interchange Formats */
2189
2190/* Table 1.A.2 */
2191void get_adif_header(adif_header *adif, bitfile *ld)
2192{
2193 uint8_t i;
2194
2195 /* adif_id[0] = */ faad_getbits(ld, 8
2196 DEBUGVAR(1,106,"get_adif_header(): adif_id[0]"));
2197 /* adif_id[1] = */ faad_getbits(ld, 8
2198 DEBUGVAR(1,107,"get_adif_header(): adif_id[1]"));
2199 /* adif_id[2] = */ faad_getbits(ld, 8
2200 DEBUGVAR(1,108,"get_adif_header(): adif_id[2]"));
2201 /* adif_id[3] = */ faad_getbits(ld, 8
2202 DEBUGVAR(1,109,"get_adif_header(): adif_id[3]"));
2203 adif->copyright_id_present = faad_get1bit(ld
2204 DEBUGVAR(1,110,"get_adif_header(): copyright_id_present"));
2205 if(adif->copyright_id_present)
2206 {
2207 for (i = 0; i < 72/8; i++)
2208 {
2209 adif->copyright_id[i] = (int8_t)faad_getbits(ld, 8
2210 DEBUGVAR(1,111,"get_adif_header(): copyright_id"));
2211 }
2212 adif->copyright_id[i] = 0;
2213 }
2214 adif->original_copy = faad_get1bit(ld
2215 DEBUGVAR(1,112,"get_adif_header(): original_copy"));
2216 adif->home = faad_get1bit(ld
2217 DEBUGVAR(1,113,"get_adif_header(): home"));
2218 adif->bitstream_type = faad_get1bit(ld
2219 DEBUGVAR(1,114,"get_adif_header(): bitstream_type"));
2220 adif->bitrate = faad_getbits(ld, 23
2221 DEBUGVAR(1,115,"get_adif_header(): bitrate"));
2222 adif->num_program_config_elements = (uint8_t)faad_getbits(ld, 4
2223 DEBUGVAR(1,116,"get_adif_header(): num_program_config_elements"));
2224
2225 for (i = 0; i < adif->num_program_config_elements + 1; i++)
2226 {
2227 if(adif->bitstream_type == 0)
2228 {
2229 adif->adif_buffer_fullness = faad_getbits(ld, 20
2230 DEBUGVAR(1,117,"get_adif_header(): adif_buffer_fullness"));
2231 } else {
2232 adif->adif_buffer_fullness = 0;
2233 }
2234
2235 program_config_element(&adif->pce[i], ld);
2236 }
2237}
2238
2239/* Table 1.A.5 */
2240uint8_t adts_frame(adts_header *adts, bitfile *ld)
2241{
2242 /* faad_byte_align(ld); */
2243 if (adts_fixed_header(adts, ld))
2244 return 5;
2245 adts_variable_header(adts, ld);
2246 adts_error_check(adts, ld);
2247
2248 return 0;
2249}
2250
2251/* Table 1.A.6 */
2252static uint8_t adts_fixed_header(adts_header *adts, bitfile *ld)
2253{
2254 uint16_t i;
2255 uint8_t sync_err = 1;
2256
2257 /* try to recover from sync errors */
2258 for (i = 0; i < 768; i++)
2259 {
2260 adts->syncword = (uint16_t)faad_showbits(ld, 12);
2261 if (adts->syncword != 0xFFF)
2262 {
2263 faad_getbits(ld, 8
2264 DEBUGVAR(0,0,""));
2265 } else {
2266 sync_err = 0;
2267 faad_getbits(ld, 12
2268 DEBUGVAR(1,118,"adts_fixed_header(): syncword"));
2269 break;
2270 }
2271 }
2272 if (sync_err)
2273 return 5;
2274
2275 adts->id = faad_get1bit(ld
2276 DEBUGVAR(1,119,"adts_fixed_header(): id"));
2277 adts->layer = (uint8_t)faad_getbits(ld, 2
2278 DEBUGVAR(1,120,"adts_fixed_header(): layer"));
2279 adts->protection_absent = faad_get1bit(ld
2280 DEBUGVAR(1,121,"adts_fixed_header(): protection_absent"));
2281 adts->profile = (uint8_t)faad_getbits(ld, 2
2282 DEBUGVAR(1,122,"adts_fixed_header(): profile"));
2283 adts->sf_index = (uint8_t)faad_getbits(ld, 4
2284 DEBUGVAR(1,123,"adts_fixed_header(): sf_index"));
2285 adts->private_bit = faad_get1bit(ld
2286 DEBUGVAR(1,124,"adts_fixed_header(): private_bit"));
2287 adts->channel_configuration = (uint8_t)faad_getbits(ld, 3
2288 DEBUGVAR(1,125,"adts_fixed_header(): channel_configuration"));
2289 adts->original = faad_get1bit(ld
2290 DEBUGVAR(1,126,"adts_fixed_header(): original"));
2291 adts->home = faad_get1bit(ld
2292 DEBUGVAR(1,127,"adts_fixed_header(): home"));
2293
2294 if (adts->old_format == 1)
2295 {
2296 /* Removed in corrigendum 14496-3:2002 */
2297 if (adts->id == 0)
2298 {
2299 adts->emphasis = (uint8_t)faad_getbits(ld, 2
2300 DEBUGVAR(1,128,"adts_fixed_header(): emphasis"));
2301 }
2302 }
2303
2304 return 0;
2305}
2306
2307/* Table 1.A.7 */
2308static void adts_variable_header(adts_header *adts, bitfile *ld)
2309{
2310 adts->copyright_identification_bit = faad_get1bit(ld
2311 DEBUGVAR(1,129,"adts_variable_header(): copyright_identification_bit"));
2312 adts->copyright_identification_start = faad_get1bit(ld
2313 DEBUGVAR(1,130,"adts_variable_header(): copyright_identification_start"));
2314 adts->aac_frame_length = (uint16_t)faad_getbits(ld, 13
2315 DEBUGVAR(1,131,"adts_variable_header(): aac_frame_length"));
2316 adts->adts_buffer_fullness = (uint16_t)faad_getbits(ld, 11
2317 DEBUGVAR(1,132,"adts_variable_header(): adts_buffer_fullness"));
2318 adts->no_raw_data_blocks_in_frame = (uint8_t)faad_getbits(ld, 2
2319 DEBUGVAR(1,133,"adts_variable_header(): no_raw_data_blocks_in_frame"));
2320}
2321
2322/* Table 1.A.8 */
2323static void adts_error_check(adts_header *adts, bitfile *ld)
2324{
2325 if (adts->protection_absent == 0)
2326 {
2327 adts->crc_check = (uint16_t)faad_getbits(ld, 16
2328 DEBUGVAR(1,134,"adts_error_check(): crc_check"));
2329 }
2330}
diff --git a/apps/codecs/libfaad/syntax.h b/apps/codecs/libfaad/syntax.h
new file mode 100644
index 0000000000..f9efde7d9b
--- /dev/null
+++ b/apps/codecs/libfaad/syntax.h
@@ -0,0 +1,124 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __SYNTAX_H__
29#define __SYNTAX_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#include "decoder.h"
36#include "bits.h"
37
38#define MAIN 1
39#define LC 2
40#define SSR 3
41#define LTP 4
42#define HE_AAC 5
43#define LD 23
44#define ER_LC 17
45#define ER_LTP 19
46#define DRM_ER_LC 27 /* special object type for DRM */
47
48/* header types */
49#define RAW 0
50#define ADIF 1
51#define ADTS 2
52
53/* SBR signalling */
54#define NO_SBR 0
55#define SBR_UPSAMPLED 1
56#define SBR_DOWNSAMPLED 2
57#define NO_SBR_UPSAMPLED 3
58
59/* DRM channel definitions */
60#define DRMCH_MONO 1
61#define DRMCH_STEREO 2
62#define DRMCH_SBR_MONO 3
63#define DRMCH_SBR_STEREO 4
64#define DRMCH_SBR_PS_STEREO 5
65
66
67/* First object type that has ER */
68#define ER_OBJECT_START 17
69
70
71/* Bitstream */
72#define LEN_SE_ID 3
73#define LEN_TAG 4
74#define LEN_BYTE 8
75
76#define EXT_FIL 0
77#define EXT_FILL_DATA 1
78#define EXT_DATA_ELEMENT 2
79#define EXT_DYNAMIC_RANGE 11
80#define ANC_DATA 0
81
82/* Syntax elements */
83#define ID_SCE 0x0
84#define ID_CPE 0x1
85#define ID_CCE 0x2
86#define ID_LFE 0x3
87#define ID_DSE 0x4
88#define ID_PCE 0x5
89#define ID_FIL 0x6
90#define ID_END 0x7
91
92#define ONLY_LONG_SEQUENCE 0x0
93#define LONG_START_SEQUENCE 0x1
94#define EIGHT_SHORT_SEQUENCE 0x2
95#define LONG_STOP_SEQUENCE 0x3
96
97#define ZERO_HCB 0
98#define FIRST_PAIR_HCB 5
99#define ESC_HCB 11
100#define QUAD_LEN 4
101#define PAIR_LEN 2
102#define NOISE_HCB 13
103#define INTENSITY_HCB2 14
104#define INTENSITY_HCB 15
105
106#define INVALID_SBR_ELEMENT 255
107
108int8_t GASpecificConfig(bitfile *ld, mp4AudioSpecificConfig *mp4ASC,
109 program_config *pce);
110
111uint8_t adts_frame(adts_header *adts, bitfile *ld);
112void get_adif_header(adif_header *adif, bitfile *ld);
113void raw_data_block(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
114 bitfile *ld, program_config *pce, drc_info *drc);
115uint8_t reordered_spectral_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld,
116 int16_t *spectral_data);
117void aac_scalable_main_element(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
118 bitfile *ld, program_config *pce, drc_info *drc);
119
120
121#ifdef __cplusplus
122}
123#endif
124#endif
diff --git a/apps/codecs/libfaad/tns.c b/apps/codecs/libfaad/tns.c
new file mode 100644
index 0000000000..fa33e57a14
--- /dev/null
+++ b/apps/codecs/libfaad/tns.c
@@ -0,0 +1,306 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#include "common.h"
29#include "structs.h"
30
31#include "syntax.h"
32#include "tns.h"
33
34
35/* static function declarations */
36static void tns_decode_coef(uint8_t order, uint8_t coef_res_bits, uint8_t coef_compress,
37 uint8_t *coef, real_t *a);
38static void tns_ar_filter(real_t *spectrum, uint16_t size, int8_t inc, real_t *lpc,
39 uint8_t order);
40static void tns_ma_filter(real_t *spectrum, uint16_t size, int8_t inc, real_t *lpc,
41 uint8_t order);
42
43
44#ifdef _MSC_VER
45#pragma warning(disable:4305)
46#pragma warning(disable:4244)
47#endif
48static real_t tns_coef_0_3[] =
49{
50 COEF_CONST(0.0), COEF_CONST(0.4338837391), COEF_CONST(0.7818314825), COEF_CONST(0.9749279122),
51 COEF_CONST(-0.9848077530), COEF_CONST(-0.8660254038), COEF_CONST(-0.6427876097), COEF_CONST(-0.3420201433),
52 COEF_CONST(-0.4338837391), COEF_CONST(-0.7818314825), COEF_CONST(-0.9749279122), COEF_CONST(-0.9749279122),
53 COEF_CONST(-0.9848077530), COEF_CONST(-0.8660254038), COEF_CONST(-0.6427876097), COEF_CONST(-0.3420201433)
54};
55static real_t tns_coef_0_4[] =
56{
57 COEF_CONST(0.0), COEF_CONST(0.2079116908), COEF_CONST(0.4067366431), COEF_CONST(0.5877852523),
58 COEF_CONST(0.7431448255), COEF_CONST(0.8660254038), COEF_CONST(0.9510565163), COEF_CONST(0.9945218954),
59 COEF_CONST(-0.9957341763), COEF_CONST(-0.9618256432), COEF_CONST(-0.8951632914), COEF_CONST(-0.7980172273),
60 COEF_CONST(-0.6736956436), COEF_CONST(-0.5264321629), COEF_CONST(-0.3612416662), COEF_CONST(-0.1837495178)
61};
62static real_t tns_coef_1_3[] =
63{
64 COEF_CONST(0.0), COEF_CONST(0.4338837391), COEF_CONST(-0.6427876097), COEF_CONST(-0.3420201433),
65 COEF_CONST(0.9749279122), COEF_CONST(0.7818314825), COEF_CONST(-0.6427876097), COEF_CONST(-0.3420201433),
66 COEF_CONST(-0.4338837391), COEF_CONST(-0.7818314825), COEF_CONST(-0.6427876097), COEF_CONST(-0.3420201433),
67 COEF_CONST(-0.7818314825), COEF_CONST(-0.4338837391), COEF_CONST(-0.6427876097), COEF_CONST(-0.3420201433)
68};
69static real_t tns_coef_1_4[] =
70{
71 COEF_CONST(0.0), COEF_CONST(0.2079116908), COEF_CONST(0.4067366431), COEF_CONST(0.5877852523),
72 COEF_CONST(-0.6736956436), COEF_CONST(-0.5264321629), COEF_CONST(-0.3612416662), COEF_CONST(-0.1837495178),
73 COEF_CONST(0.9945218954), COEF_CONST(0.9510565163), COEF_CONST(0.8660254038), COEF_CONST(0.7431448255),
74 COEF_CONST(-0.6736956436), COEF_CONST(-0.5264321629), COEF_CONST(-0.3612416662), COEF_CONST(-0.1837495178)
75};
76
77
78/* TNS decoding for one channel and frame */
79void tns_decode_frame(ic_stream *ics, tns_info *tns, uint8_t sr_index,
80 uint8_t object_type, real_t *spec, uint16_t frame_len)
81{
82 uint8_t w, f, tns_order;
83 int8_t inc;
84 int16_t size;
85 uint16_t bottom, top, start, end;
86 uint16_t nshort = frame_len/8;
87 real_t lpc[TNS_MAX_ORDER+1];
88
89 if (!ics->tns_data_present)
90 return;
91
92 for (w = 0; w < ics->num_windows; w++)
93 {
94 bottom = ics->num_swb;
95
96 for (f = 0; f < tns->n_filt[w]; f++)
97 {
98 top = bottom;
99 bottom = max(top - tns->length[w][f], 0);
100 tns_order = min(tns->order[w][f], TNS_MAX_ORDER);
101 if (!tns_order)
102 continue;
103
104 tns_decode_coef(tns_order, tns->coef_res[w]+3,
105 tns->coef_compress[w][f], tns->coef[w][f], lpc);
106
107 start = min(bottom, max_tns_sfb(sr_index, object_type, (ics->window_sequence == EIGHT_SHORT_SEQUENCE)));
108 start = min(start, ics->max_sfb);
109 start = ics->swb_offset[start];
110
111 end = min(top, max_tns_sfb(sr_index, object_type, (ics->window_sequence == EIGHT_SHORT_SEQUENCE)));
112 end = min(end, ics->max_sfb);
113 end = ics->swb_offset[end];
114
115 size = end - start;
116 if (size <= 0)
117 continue;
118
119 if (tns->direction[w][f])
120 {
121 inc = -1;
122 start = end - 1;
123 } else {
124 inc = 1;
125 }
126
127 tns_ar_filter(&spec[(w*nshort)+start], size, inc, lpc, tns_order);
128 }
129 }
130}
131
132/* TNS encoding for one channel and frame */
133void tns_encode_frame(ic_stream *ics, tns_info *tns, uint8_t sr_index,
134 uint8_t object_type, real_t *spec, uint16_t frame_len)
135{
136 uint8_t w, f, tns_order;
137 int8_t inc;
138 int16_t size;
139 uint16_t bottom, top, start, end;
140 uint16_t nshort = frame_len/8;
141 real_t lpc[TNS_MAX_ORDER+1];
142
143 if (!ics->tns_data_present)
144 return;
145
146 for (w = 0; w < ics->num_windows; w++)
147 {
148 bottom = ics->num_swb;
149
150 for (f = 0; f < tns->n_filt[w]; f++)
151 {
152 top = bottom;
153 bottom = max(top - tns->length[w][f], 0);
154 tns_order = min(tns->order[w][f], TNS_MAX_ORDER);
155 if (!tns_order)
156 continue;
157
158 tns_decode_coef(tns_order, tns->coef_res[w]+3,
159 tns->coef_compress[w][f], tns->coef[w][f], lpc);
160
161 start = min(bottom, max_tns_sfb(sr_index, object_type, (ics->window_sequence == EIGHT_SHORT_SEQUENCE)));
162 start = min(start, ics->max_sfb);
163 start = ics->swb_offset[start];
164
165 end = min(top, max_tns_sfb(sr_index, object_type, (ics->window_sequence == EIGHT_SHORT_SEQUENCE)));
166 end = min(end, ics->max_sfb);
167 end = ics->swb_offset[end];
168
169 size = end - start;
170 if (size <= 0)
171 continue;
172
173 if (tns->direction[w][f])
174 {
175 inc = -1;
176 start = end - 1;
177 } else {
178 inc = 1;
179 }
180
181 tns_ma_filter(&spec[(w*nshort)+start], size, inc, lpc, tns_order);
182 }
183 }
184}
185
186/* Decoder transmitted coefficients for one TNS filter */
187static void tns_decode_coef(uint8_t order, uint8_t coef_res_bits, uint8_t coef_compress,
188 uint8_t *coef, real_t *a)
189{
190 uint8_t i, m;
191 real_t tmp2[TNS_MAX_ORDER+1], b[TNS_MAX_ORDER+1];
192
193 /* Conversion to signed integer */
194 for (i = 0; i < order; i++)
195 {
196 if (coef_compress == 0)
197 {
198 if (coef_res_bits == 3)
199 {
200 tmp2[i] = tns_coef_0_3[coef[i]];
201 } else {
202 tmp2[i] = tns_coef_0_4[coef[i]];
203 }
204 } else {
205 if (coef_res_bits == 3)
206 {
207 tmp2[i] = tns_coef_1_3[coef[i]];
208 } else {
209 tmp2[i] = tns_coef_1_4[coef[i]];
210 }
211 }
212 }
213
214 /* Conversion to LPC coefficients */
215 a[0] = COEF_CONST(1.0);
216 for (m = 1; m <= order; m++)
217 {
218 for (i = 1; i < m; i++) /* loop only while i<m */
219 b[i] = a[i] + MUL_C(tmp2[m-1], a[m-i]);
220
221 for (i = 1; i < m; i++) /* loop only while i<m */
222 a[i] = b[i];
223
224 a[m] = tmp2[m-1]; /* changed */
225 }
226}
227
228static void tns_ar_filter(real_t *spectrum, uint16_t size, int8_t inc, real_t *lpc,
229 uint8_t order)
230{
231 /*
232 - Simple all-pole filter of order "order" defined by
233 y(n) = x(n) - lpc[1]*y(n-1) - ... - lpc[order]*y(n-order)
234 - The state variables of the filter are initialized to zero every time
235 - The output data is written over the input data ("in-place operation")
236 - An input vector of "size" samples is processed and the index increment
237 to the next data sample is given by "inc"
238 */
239
240 uint8_t j;
241 uint16_t i;
242 real_t y;
243 /* state is stored as a double ringbuffer */
244 real_t state[2*TNS_MAX_ORDER] = {0};
245 int8_t state_index = 0;
246
247 for (i = 0; i < size; i++)
248 {
249 y = *spectrum;
250
251 for (j = 0; j < order; j++)
252 y -= MUL_C(state[state_index+j], lpc[j+1]);
253
254 /* double ringbuffer state */
255 state_index--;
256 if (state_index < 0)
257 state_index = order-1;
258 state[state_index] = state[state_index + order] = y;
259
260 *spectrum = y;
261 spectrum += inc;
262
263//#define TNS_PRINT
264#ifdef TNS_PRINT
265 //printf("%d\n", y);
266 printf("0x%.8X\n", y);
267#endif
268 }
269}
270
271static void tns_ma_filter(real_t *spectrum, uint16_t size, int8_t inc, real_t *lpc,
272 uint8_t order)
273{
274 /*
275 - Simple all-zero filter of order "order" defined by
276 y(n) = x(n) + a(2)*x(n-1) + ... + a(order+1)*x(n-order)
277 - The state variables of the filter are initialized to zero every time
278 - The output data is written over the input data ("in-place operation")
279 - An input vector of "size" samples is processed and the index increment
280 to the next data sample is given by "inc"
281 */
282
283 uint8_t j;
284 uint16_t i;
285 real_t y;
286 /* state is stored as a double ringbuffer */
287 real_t state[2*TNS_MAX_ORDER] = {0};
288 int8_t state_index = 0;
289
290 for (i = 0; i < size; i++)
291 {
292 y = *spectrum;
293
294 for (j = 0; j < order; j++)
295 y += MUL_C(state[j], lpc[j+1]);
296
297 /* double ringbuffer state */
298 state_index--;
299 if (state_index < 0)
300 state_index = order-1;
301 state[state_index] = state[state_index + order] = *spectrum;
302
303 *spectrum = y;
304 spectrum += inc;
305 }
306}
diff --git a/apps/codecs/libfaad/tns.h b/apps/codecs/libfaad/tns.h
new file mode 100644
index 0000000000..dd10a61f3b
--- /dev/null
+++ b/apps/codecs/libfaad/tns.h
@@ -0,0 +1,48 @@
1/*
2** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18**
19** Any non-GPL usage of this software or parts of this software is strictly
20** forbidden.
21**
22** Commercial non-GPL licensing of this software is possible.
23** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24**
25** $Id$
26**/
27
28#ifndef __TNS_H__
29#define __TNS_H__
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35
36#define TNS_MAX_ORDER 20
37
38
39void tns_decode_frame(ic_stream *ics, tns_info *tns, uint8_t sr_index,
40 uint8_t object_type, real_t *spec, uint16_t frame_len);
41void tns_encode_frame(ic_stream *ics, tns_info *tns, uint8_t sr_index,
42 uint8_t object_type, real_t *spec, uint16_t frame_len);
43
44
45#ifdef __cplusplus
46}
47#endif
48#endif