diff options
author | unknown <unknown@xiph.org> | 2004-03-20 18:24:03 +0000 |
---|---|---|
committer | unknown <unknown@xiph.org> | 2004-03-20 18:24:03 +0000 |
commit | 40da4a2fb5096c1bbb0cb229ba291066b8244b05 (patch) | |
tree | 24b53770fc549dd7c00ab4c5939559dd5b755405 | |
parent | fc025616971725aa2d2f47a988630f247e9872e0 (diff) | |
download | libvorbis-git-40da4a2fb5096c1bbb0cb229ba291066b8244b05.tar.gz |
This commit was manufactured by cvs2svn to create branch
'branch_postbeta2'.
svn path=/branches/branch_postbeta2/vorbis/; revision=610
197 files changed, 0 insertions, 38240 deletions
diff --git a/COPYING b/COPYING deleted file mode 100644 index d60c31a9..00000000 --- a/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/COPYING.LIB b/COPYING.LIB deleted file mode 100644 index c4792dd2..00000000 --- a/COPYING.LIB +++ /dev/null @@ -1,515 +0,0 @@ - - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations -below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. -^L - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it -becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. -^L - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control -compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. -^L - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. -^L - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. -^L - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. -^L - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply, and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License -may add an explicit geographical distribution limitation excluding those -countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. -^L - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS -^L - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms -of the ordinary General Public License). - - To apply these terms, attach the following notices to the library. -It is safest to attach them to the start of each source file to most -effectively convey the exclusion of warranty; and each file should -have at least the "copyright" line and a pointer to where the full -notice is found. - - - <one line to give the library's name and a brief idea of what it -does.> - Copyright (C) <year> <name of author> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper -mail. - -You should also get your employer (if you work as a programmer) or -your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James -Random Hacker. - - <signature of Ty Coon>, 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index 36ef9bb9..00000000 --- a/Makefile.in +++ /dev/null @@ -1,33 +0,0 @@ -# vorbis makefile configured for use with gcc on any platform - -# $Id: Makefile.in,v 1.11 2000/08/24 01:10:02 kcarnold Exp $ - -############################################################################### -# # -# To build a production vorbis (preferrably using gmake), just type 'make'. # -# To build with debugging or profiling information, use 'make debug' or # -# 'make profile' respectively. 'make clean' is a good idea between builds # -# with different target names, or before a final build. # -# # -############################################################################### - - -# DO NOT EDIT BELOW! ########################################################## -# (unless, of course, you know what you are doing :) ########################## - -@SET_MAKE@ - -SUBDIRS = lib examples # vorbis-tools cmdline xmms vq huff kmpg - -# configure changes items in these, so get distclean to remove them. -DCLEAN_DIRS = vorbis-tools cmdline xmms vq huff kmpg - -all debug profile selftest target clean: - echo $(MAKECMDGOALS) - @for dir in $(SUBDIRS); do (cd $$dir && $(MAKE) $(MFLAGS) $(MAKECMDGOALS)) || exit 1; done - -rm -f *~ - -distclean: - @for dir in $(SUBDIRS) $(DCLEAN_DIRS); do (cd $$dir && $(MAKE) $(MFLAGS) $(MAKECMDGOALS)) || exit 1; done - -rm -f Makefile config.* - diff --git a/README b/README deleted file mode 100644 index 4f593e19..00000000 --- a/README +++ /dev/null @@ -1,73 +0,0 @@ -******************************************************************** -* * -* THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * -* USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * -* THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * -* PLEASE READ THESE TERMS DISTRIBUTING. * -* * -* THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * -* by Monty <monty@xiph.org> and The XIPHOPHORUS Company * -* http://www.xiph.org/ * -* * -******************************************************************** - -WHAT'S HERE: - -This source distribution includes libvorbis, a full-featured example -encoder/player to demonstrate use of libvorbis and documentation on -the Ogg Vorbis audio coding format. - -Directory: - -./lib The source for libvorbis, an LGPLed inplementation of - the public domain OggSquish Vorbis audio encoding - format. - -./cmdline A full-featured command line encoder/decoder/player - utility ('vorbis') that demonstrates programmatic use - of libvorbis. - -./docs Vorbis specification documents - -WHAT IS VORBIS: - -Vorbis is a general purpose audio and music encoding format -contemporary to MPEG-4's AAC and TwinVQ, the next generation beyond -MPEG audio layer 3. Unlike the MPEG sponsored formats (and other -proprietary formats such as RealAudio G2 and Windows' flavor of the -month), the Vorbis CODEC specification belongs to the public domain. -All the technical details are published and documented, and any -software entity may make full use of the format without royalty or -patent concerns. - -This package contains libvorbis, an LGPLed software implementation of -the Vorbis specification by the Xiphophorus company -(http://www.xiph.org/), vorbisfile, an LGPLed convenience library -built on Vorbis designed to simplify common uses and a number of GPL -example programs, utilities and player plugins. - -CONTACT: - -The OggSquish homepage is located at 'http://www.xiph.org/ogg/'. -Vorbis's homepage is located at 'http://www.xiph.org/ogg/vorbis/'. -Up to date technical documents, contact information, source code and -pre-built utilities may be found there. - -BUILD: - -A standard build should consist of nothing more than: - -./configure -make - -and as root if desired : - -make install - -This will install the ogg vorbis commandline encoder/player ('ogg') -into /usr/local/bin, the ogg player and libvorbis manpages into -/usr/local/man/ and libvorbis.a into /usr/local/lib. - -Monty <monty@xiph.org>, <xiphmont@mit.edu> - -$Id: README,v 1.4 2000/05/12 21:42:04 xiphmont Exp $ diff --git a/configure b/configure deleted file mode 100755 index da2b9de8..00000000 --- a/configure +++ /dev/null @@ -1,2536 +0,0 @@ -#! /bin/sh - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; - - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - - *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=lib/mdct.c - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - - -#AC_CONFIG_HEADER(config.h) - -cp configure.guess config.guess -cp configure.sub config.sub - -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - - -# Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } -fi - -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:556: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 - - -case $host in - *-*-irix*) - if test -z "$CC"; then - CC=cc - fi - echo $ac_n "checking for ALwritesamps in -laudio""... $ac_c" 1>&6 -echo "configure:583: checking for ALwritesamps in -laudio" >&5 -ac_lib_var=`echo audio'_'ALwritesamps | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-laudio $LIBS" -cat > conftest.$ac_ext <<EOF -#line 591 "configure" -#include "confdefs.h" -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char ALwritesamps(); - -int main() { -ALwritesamps() -; return 0; } -EOF -if { (eval echo configure:602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo audio | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <<EOF -#define $ac_tr_lib 1 -EOF - - LIBS="-laudio $LIBS" - -else - echo "$ac_t""no" 1>&6 -fi - - ;; -# BeOS does not use -lm -# *-*-beos) -# LIBS="" -# ;; -# added better check below - -esac - -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:641: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:671: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:722: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - ;; - esac - fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:754: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext << EOF - -#line 765 "configure" -#include "confdefs.h" - -main(){return(0);} -EOF -if { (eval echo configure:770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:796: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:801: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <<EOF -#ifdef __GNUC__ - yes; -#endif -EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes -else - GCC= -fi - -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:829: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi - -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:861: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext <<EOF -#line 876 "configure" -#include "confdefs.h" -#include <assert.h> -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext <<EOF -#line 893 "configure" -#include "confdefs.h" -#include <assert.h> -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext <<EOF -#line 910 "configure" -#include "confdefs.h" -#include <assert.h> -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - -# Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:943: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" -fi -fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -# Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:973: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_AR="ar" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -AR="$ac_cv_prog_AR" -if test -n "$AR"; then - echo "$ac_t""$AR" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -# Extract the first word of "install", so it can be a program name with args. -set dummy install; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1002: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_INSTALL'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$INSTALL"; then - ac_cv_prog_INSTALL="$INSTALL" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_INSTALL="install" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -INSTALL="$ac_cv_prog_INSTALL" -if test -n "$INSTALL"; then - echo "$ac_t""$INSTALL" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - -#not everyone uses libm (eg, BeOS) -#AC_CHECK_LIB(m, cos, LIBS="-lm"; AC_DEFINE(HAVE_LIBM), LIBS="") -# We no longer use config.h -echo $ac_n "checking for cos in -lm""... $ac_c" 1>&6 -echo "configure:1033: checking for cos in -lm" >&5 -ac_lib_var=`echo m'_'cos | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lm $LIBS" -cat > conftest.$ac_ext <<EOF -#line 1041 "configure" -#include "confdefs.h" -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char cos(); - -int main() { -cos() -; return 0; } -EOF -if { (eval echo configure:1052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="-lm" -else - echo "$ac_t""no" 1>&6 -LIBS="" -fi - - -if test -z "$GCC"; then - case $host in - *-*-irix*) - DEBUG="-g -signed" - OPT="-O2 -w -signed" - PROFILE="-p -g3 -O2 -signed" ;; - sparc-sun-solaris*) - DEBUG="-v -g" - OPT="-xO4 -fast -w -fsimple -native -xcg92" - PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc" ;; - *) - DEBUG="-g" - OPT="-O" - PROFILE="-g -p" ;; - esac -else - - case $host in - *86-*-linux*) - DEBUG="-g -Wall -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char" - OPT="-O20 -ffast-math -D_REENTRANT -fsigned-char" - PROFILE="-pg -g -O20 -ffast-math -D_REENTRANT -fsigned-char" - - # glibc < 2.1.3 has a serious FP bug in the math inline header - # that will cripple Vorbis. Look to see if the magic FP stack - # clobber is missing in the mathinline header, thus indicating - # the buggy version - - cat > conftest.$ac_ext <<EOF -#line 1103 "configure" -#include "confdefs.h" - - #define __LIBC_INTERNAL_MATH_INLINES 1 - #define __OPTIMIZE__ - #include <math.h> - -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "log10.*fldlg2.*fxch" >/dev/null 2>&1; then - rm -rf conftest* - bad=maybe -else - rm -rf conftest* - bad=no -fi -rm -f conftest* - - if test ${bad} = "maybe" ;then - cat > conftest.$ac_ext <<EOF -#line 1123 "configure" -#include "confdefs.h" - - #define __LIBC_INTERNAL_MATH_INLINES 1 - #define __OPTIMIZE__ - #include <math.h> - -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "log10.*fldlg2.*fxch.*st\([0123456789]*\)" >/dev/null 2>&1; then - rm -rf conftest* - bad=no -else - rm -rf conftest* - bad=yes -fi -rm -f conftest* - - fi - if test ${bad} = "yes" ;then - echo "configure: warning: " 1>&2 - echo "configure: warning: ********************************************************" 1>&2 - echo "configure: warning: * The glibc headers on this machine have a serious bug *" 1>&2 - echo "configure: warning: * in /usr/include/bits/mathinline.h This bug affects *" 1>&2 - echo "configure: warning: * all floating point code, not just Ogg, built on this *" 1>&2 - echo "configure: warning: * machine. Upgrading to glibc 2.1.3 is strongly urged *" 1>&2 - echo "configure: warning: * to correct the problem. Note that upgrading glibc *" 1>&2 - echo "configure: warning: * will not fix any previously built programs; this is *" 1>&2 - echo "configure: warning: * a compile-time time bug. *" 1>&2 - echo "configure: warning: * To work around the problem for this build of Ogg, *" 1>&2 - echo "configure: warning: * autoconf is disabling all math inlining. This will *" 1>&2 - echo "configure: warning: * hurt Ogg performace but is necessary for an Ogg that *" 1>&2 - echo "configure: warning: * will actually work. Once glibc is upgraded, rerun *" 1>&2 - echo "configure: warning: * configure and make to build with inlining. *" 1>&2 - echo "configure: warning: ********************************************************" 1>&2 - echo "configure: warning: " 1>&2 - - OPT=${OPT}" -D__NO_MATH_INLINES" - PROFILE=${PROFILE}" -D__NO_MATH_INLINES" - fi;; - *-*-linux*) - DEBUG="-g -Wall -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char" - OPT="-O20 -ffast-math -D_REENTRANT -fsigned-char" - PROFILE="-pg -g -O20 -ffast-math -D_REENTRANT -fsigned-char";; - sparc-sun-*) - DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char -mv8" - OPT="-O20 -ffast-math -D__NO_MATH_INLINES -fsigned-char -mv8" - PROFILE="-pg -g -O20 -D__NO_MATH_INLINES -fsigned-char -mv8" ;; - *) - DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char" - OPT="-O20 -D__NO_MATH_INLINES -fsigned-char" - PROFILE="-O20 -g -pg -D__NO_MATH_INLINES -fsigned-char" ;; - esac -fi - -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1179: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1184 "configure" -#include "confdefs.h" -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <float.h> -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - ac_cv_header_stdc=yes -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -cat > conftest.$ac_ext <<EOF -#line 1209 "configure" -#include "confdefs.h" -#include <string.h> -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -cat > conftest.$ac_ext <<EOF -#line 1227 "configure" -#include "confdefs.h" -#include <stdlib.h> -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -if test "$cross_compiling" = yes; then - : -else - cat > conftest.$ac_ext <<EOF -#line 1248 "configure" -#include "confdefs.h" -#include <ctype.h> -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int main () { int i; for (i = 0; i < 256; i++) -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); -exit (0); } - -EOF -if { (eval echo configure:1259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - : -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_header_stdc=no -fi -rm -fr conftest* -fi - -fi -fi - -echo "$ac_t""$ac_cv_header_stdc" 1>&6 -if test $ac_cv_header_stdc = yes; then - cat >> confdefs.h <<\EOF -#define STDC_HEADERS 1 -EOF - -fi - - - -#AC_CHECK_LIB(pthread, pthread_create, -# pthread_lib="-lpthread"; AC_DEFINE(HAVE_LIBPTHREAD), :) -# We no longer use config.h -echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:1288: checking for pthread_create in -lpthread" >&5 -ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lpthread $LIBS" -cat > conftest.$ac_ext <<EOF -#line 1296 "configure" -#include "confdefs.h" -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char pthread_create(); - -int main() { -pthread_create() -; return 0; } -EOF -if { (eval echo configure:1307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - pthread_lib="-lpthread" -else - echo "$ac_t""no" 1>&6 -: -fi - - -#dnl Linuxthreads require you to define _REENTRANT in all threaded -#dnl code. Bogus, bogus... -# -#if test -n "$pthread_lib"; then -# case $host in -# i?86-*-linux*) -# AC_DEFINE(_REENTRANT) -# ;; -# esac -#fi -# We no longer use config.h - -#if test -n "$x_libraries"; then -# XOGG="yes" -# -# dnl If we find libgtk installed, great; otherwise assume we have -# dnl to build it ourselves. -# -# AC_CHECK_LIB(gtk, gtk_main, :, LIBGTKDIR="libgtk", $X_LIBS -lglib -lgdk -lX11 -lXext -lm) -# -# dnl libpthread is required for xogg. -# -# if test -z "$pthread_lib"; then XOGG=""; fi -# -# dnl If we don't have libgtk installed, and we don't have a libgtk -# dnl subdirectory to build the library ourself, we can't build xogg. -# -# if test -n "$LIBGTKDIR" -a ! -d "$LIBGTKDIR"; then -# XOGG="" -# LIBGTKDIR="" -# fi -#fi - - -dummy="__noconf" - -#if test -d "$LIBGTKDIR"; then -# enable_shared="no"; export enable_shared -# dummy="libgtk" -# AC_CONFIG_SUBDIRS("$dummy") -# X_LIBS="-L${srcdir}/libgtk/gtk/.libs -L${srcdir}/libgtk/gdk/.libs -L${srcdir}/libgtk/glib/.libs $X_LIBS" -#fi - -# check macro modified from Jon Shiring's to compensate for autoconf's lagging -# behind the times on type madness - -echo $ac_n "checking for int16_t""... $ac_c" 1>&6 -echo "configure:1376: checking for int16_t" >&5 -if eval "test \"`echo '$''{'has_int16_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - has_int16_t=no - -else - cat > conftest.$ac_ext <<EOF -#line 1385 "configure" -#include "confdefs.h" - -#ifdef __BEOS__ -#include <inttypes.h> -#endif -#include <sys/types.h> -int16_t foo; -int main() {return 0;} - -EOF -if { (eval echo configure:1396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - has_int16_t=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - has_int16_t=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$has_int16_t" 1>&6 - -echo $ac_n "checking for int32_t""... $ac_c" 1>&6 -echo "configure:1413: checking for int32_t" >&5 -if eval "test \"`echo '$''{'has_int32_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - has_int32_t=no - -else - cat > conftest.$ac_ext <<EOF -#line 1422 "configure" -#include "confdefs.h" - -#ifdef __BEOS__ -#include <inttypes.h> -#endif -#include <sys/types.h> -int32_t foo; -int main() {return 0;} - -EOF -if { (eval echo configure:1433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - has_int32_t=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - has_int32_t=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$has_int32_t" 1>&6 - -echo $ac_n "checking for uint32_t""... $ac_c" 1>&6 -echo "configure:1450: checking for uint32_t" >&5 -if eval "test \"`echo '$''{'has_uint32_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - has_uint32_t=no - -else - cat > conftest.$ac_ext <<EOF -#line 1459 "configure" -#include "confdefs.h" - -#ifdef __BEOS__ -#include <inttypes.h> -#endif -#include <sys/types.h> -uint32_t foo; -int main() {return 0;} - -EOF -if { (eval echo configure:1470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - has_uint32_t=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - has_uint32_t=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$has_uint32_t" 1>&6 - -echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6 -echo "configure:1487: checking for u_int32_t" >&5 -if eval "test \"`echo '$''{'has_u_int32_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - has_u_int32_t=no - -else - cat > conftest.$ac_ext <<EOF -#line 1496 "configure" -#include "confdefs.h" - -#ifdef __BEOS__ -#include <inttypes.h> -#endif -#include <sys/types.h> -u_int32_t foo; -int main() {return 0;} - -EOF -if { (eval echo configure:1507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - has_u_int32_t=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - has_u_int32_t=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$has_u_int32_t" 1>&6 - -echo $ac_n "checking for int64_t""... $ac_c" 1>&6 -echo "configure:1524: checking for int64_t" >&5 -if eval "test \"`echo '$''{'has_int64_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - has_int64_t=no - -else - cat > conftest.$ac_ext <<EOF -#line 1533 "configure" -#include "confdefs.h" - -#ifdef __BEOS__ -#include <inttypes.h> -#endif -#include <sys/types.h> -int64_t foo; -int main() {return 0;} - -EOF -if { (eval echo configure:1544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - has_int64_t=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - has_int64_t=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$has_int64_t" 1>&6 - -echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:1561: checking size of short" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext <<EOF -#line 1569 "configure" -#include "confdefs.h" -#include <stdio.h> -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(short)); - exit(0); -} -EOF -if { (eval echo configure:1580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_short=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_short=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_short" 1>&6 -cat >> confdefs.h <<EOF -#define SIZEOF_SHORT $ac_cv_sizeof_short -EOF - - -echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:1600: checking size of int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext <<EOF -#line 1608 "configure" -#include "confdefs.h" -#include <stdio.h> -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(int)); - exit(0); -} -EOF -if { (eval echo configure:1619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_int=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_int=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_int" 1>&6 -cat >> confdefs.h <<EOF -#define SIZEOF_INT $ac_cv_sizeof_int -EOF - - -echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:1639: checking size of long" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext <<EOF -#line 1647 "configure" -#include "confdefs.h" -#include <stdio.h> -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(long)); - exit(0); -} -EOF -if { (eval echo configure:1658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_long=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_long=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_long" 1>&6 -cat >> confdefs.h <<EOF -#define SIZEOF_LONG $ac_cv_sizeof_long -EOF - - -echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:1678: checking size of long long" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext <<EOF -#line 1686 "configure" -#include "confdefs.h" -#include <stdio.h> -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(long long)); - exit(0); -} -EOF -if { (eval echo configure:1697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_long_long=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_long_long=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 -cat >> confdefs.h <<EOF -#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long -EOF - - - - -if test x$has_int16_t = "xyes" ; then - SIZE16="int16_t" -else - case 2 in - $ac_cv_sizeof_short) SIZE16="short";; - $ac_cv_sizeof_int) SIZE16="int";; - esac -fi - -if test x$has_int32_t = "xyes" ; then - SIZE32="int32_t" -else - case 4 in - $ac_cv_sizeof_short) SIZE32="short";; - $ac_cv_sizeof_int) SIZE32="int";; - $ac_cv_sizeof_long) SIZE32="long";; - esac -fi - -if test x$has_uint32_t = "xyes" ; then - USIZE32="uint32_t" -else - if test x$has_u_int32_t = "xyes" ; then - USIZE32="u_int32_t" - else - case 4 in - $ac_cv_sizeof_short) USIZE32="unsigned short";; - $ac_cv_sizeof_int) USIZE32="unsigned int";; - $ac_cv_sizeof_long) USIZE32="unsigned long";; - esac - fi -fi - -if test x$has_int64_t = "xyes" ; then - SIZE64="int64_t" -else -case 8 in - $ac_cv_sizeof_int) SIZE64="int";; - $ac_cv_sizeof_long) SIZE64="long";; - $ac_cv_sizeof_long_long) SIZE64="long long";; -esac -fi - -if test -z "$SIZE16"; then - { echo "configure: error: No 16 bit type found on this platform!" 1>&2; exit 1; } -fi -if test -z "$SIZE32"; then - { echo "configure: error: No 32 bit type found on this platform!" 1>&2; exit 1; } -fi -if test -z "$USIZE32"; then - { echo "configure: error: No unsigned 32 bit type found on this platform!" 1>&2; exit 1; } -fi -if test -z "$SIZE64"; then - echo "configure: warning: No 64 bit type found on this platform!" 1>&2 -fi - -#AC_CHECK_HEADER(alloca.h,AC_DEFINE(USE_ALLOCA_H),:) -#AC_CHECK_HEADER(memory.h,AC_DEFINE(USE_MEMORY_H),:) -# We no longer use config.h -ac_safe=`echo "alloca.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for alloca.h""... $ac_c" 1>&6 -echo "configure:1779: checking for alloca.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1784 "configure" -#include "confdefs.h" -#include <alloca.h> -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - CFLAGS="$CFLAGS -DUSE_ALLOCA_H" -else - echo "$ac_t""no" 1>&6 -: -fi - -ac_safe=`echo "memory.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for memory.h""... $ac_c" 1>&6 -echo "configure:1813: checking for memory.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1818 "configure" -#include "confdefs.h" -#include <memory.h> -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - CFLAGS="$CFLAGS -DUSE_MEMORY_H" -else - echo "$ac_t""no" 1>&6 -: -fi - - -echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1847: checking for working const" >&5 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1852 "configure" -#include "confdefs.h" - -int main() { - -/* Ultrix mips cc rejects this. */ -typedef int charset[2]; const charset x; -/* SunOS 4.1.1 cc rejects this. */ -char const *const *ccp; -char **p; -/* NEC SVR4.0.2 mips cc rejects this. */ -struct point {int x, y;}; -static struct point const zero = {0,0}; -/* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in an arm - of an if-expression whose if-part is not a constant expression */ -const char *g = "string"; -ccp = &g + (g ? g-g : 0); -/* HPUX 7.0 cc rejects these. */ -++ccp; -p = (char**) ccp; -ccp = (char const *const *) p; -{ /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; -} -{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; -} -{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; -} -{ /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; -} -{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; -} - -; return 0; } -EOF -if { (eval echo configure:1901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_const=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_const=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_c_const" 1>&6 -if test $ac_cv_c_const = no; then - cat >> confdefs.h <<\EOF -#define const -EOF - -fi - -echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1922: checking whether time.h and sys/time.h may both be included" >&5 -if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1927 "configure" -#include "confdefs.h" -#include <sys/types.h> -#include <sys/time.h> -#include <time.h> -int main() { -struct tm *tp; -; return 0; } -EOF -if { (eval echo configure:1936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_time=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_time=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_header_time" 1>&6 -if test $ac_cv_header_time = yes; then - cat >> confdefs.h <<\EOF -#define TIME_WITH_SYS_TIME 1 -EOF - -fi - -echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:1957: checking whether struct tm is in sys/time.h or time.h" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1962 "configure" -#include "confdefs.h" -#include <sys/types.h> -#include <time.h> -int main() { -struct tm *tp; tp->tm_sec; -; return 0; } -EOF -if { (eval echo configure:1970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_tm=time.h -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_tm=sys/time.h -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_tm" 1>&6 -if test $ac_cv_struct_tm = sys/time.h; then - cat >> confdefs.h <<\EOF -#define TM_IN_SYS_TIME 1 -EOF - -fi - - -echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1992: checking whether ${MAKE-make} sets \${MAKE}" >&5 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftestmake <<\EOF -all: - @echo 'ac_maketemp="${MAKE}"' -EOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi -rm -f conftestmake -fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$ac_t""yes" 1>&6 - SET_MAKE= -else - echo "$ac_t""no" 1>&6 - SET_MAKE="MAKE=${MAKE-make}" -fi - -echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:2019: checking for 8-bit clean memcmp" >&5 -if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_memcmp_clean=no -else - cat > conftest.$ac_ext <<EOF -#line 2027 "configure" -#include "confdefs.h" - -main() -{ - char c0 = 0x40, c1 = 0x80, c2 = 0x81; - exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1); -} - -EOF -if { (eval echo configure:2037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_func_memcmp_clean=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_memcmp_clean=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 -test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" - -echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2055: checking return type of signal handlers" >&5 -if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 2060 "configure" -#include "confdefs.h" -#include <sys/types.h> -#include <signal.h> -#ifdef signal -#undef signal -#endif -#ifdef __cplusplus -extern "C" void (*signal (int, void (*)(int)))(int); -#else -void (*signal ()) (); -#endif - -int main() { -int i; -; return 0; } -EOF -if { (eval echo configure:2077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_type_signal=void -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_type_signal=int -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_type_signal" 1>&6 -cat >> confdefs.h <<EOF -#define RETSIGTYPE $ac_cv_type_signal -EOF - - -for ac_func in gettimeofday select strcspn strerror strspn sigaction -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2098: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 2103 "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ -#include <assert.h> -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <<EOF -#define $ac_tr_func 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi -done - - - - - - - - - - - - -#AC_SUBST(XOGG) -#AC_SUBST(LIBGTKDIR) - - -subdirs="vorbis-tools/libao" - - -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g -s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -rm -f conftest.defs - - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS <<EOF -#! /bin/sh -# Generated automatically by configure. -# Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir - -trap 'rm -fr `echo "Makefile lib/Makefile examples/Makefile include/vorbis/os_types.h\ - vorbis-tools/Makefile\ - vq/Makefile huff/Makefile cmdline/Makefile xmms/Makefile kmpg/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS <<EOF - -# Protect against being on the right side of a sed subst in config.status. -sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; - s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@host@%$host%g -s%@host_alias@%$host_alias%g -s%@host_cpu@%$host_cpu%g -s%@host_vendor@%$host_vendor%g -s%@host_os@%$host_os%g -s%@CC@%$CC%g -s%@CPP@%$CPP%g -s%@RANLIB@%$RANLIB%g -s%@AR@%$AR%g -s%@INSTALL@%$INSTALL%g -s%@SET_MAKE@%$SET_MAKE%g -s%@LIBOBJS@%$LIBOBJS%g -s%@SIZE16@%$SIZE16%g -s%@SIZE32@%$SIZE32%g -s%@USIZE32@%$USIZE32%g -s%@SIZE64@%$SIZE64%g -s%@OPT@%$OPT%g -s%@DEBUG@%$DEBUG%g -s%@PROFILE@%$PROFILE%g -s%@pthread_lib@%$pthread_lib%g -s%@subdirs@%$subdirs%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <<EOF - -CONFIG_FILES=\${CONFIG_FILES-"Makefile lib/Makefile examples/Makefile include/vorbis/os_types.h\ - vorbis-tools/Makefile\ - vq/Makefile huff/Makefile cmdline/Makefile xmms/Makefile kmpg/Makefile"} -EOF -cat >> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* - -EOF -cat >> $CONFIG_STATUS <<EOF - -EOF -cat >> $CONFIG_STATUS <<\EOF - -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - -if test "$no_recursion" != yes; then - - # Remove --cache-file and --srcdir arguments so they do not pile up. - ac_sub_configure_args= - ac_prev= - for ac_arg in $ac_configure_args; do - if test -n "$ac_prev"; then - ac_prev= - continue - fi - case "$ac_arg" in - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - ;; - *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; - esac - done - - for ac_config_dir in vorbis-tools/libao; do - - # Do not complain, so a configure script can configure whichever - # parts of a large source tree are present. - if test ! -d $srcdir/$ac_config_dir; then - continue - fi - - echo configuring in $ac_config_dir - - case "$srcdir" in - .) ;; - *) - if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; - else - { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } - fi - ;; - esac - - ac_popdir=`pwd` - cd $ac_config_dir - - # A "../" for each directory in /$ac_config_dir. - ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` - - case "$srcdir" in - .) # No --srcdir option. We are building in place. - ac_sub_srcdir=$srcdir ;; - /*) # Absolute path. - ac_sub_srcdir=$srcdir/$ac_config_dir ;; - *) # Relative path. - ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; - esac - - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_sub_srcdir/configure; then - ac_sub_configure=$ac_sub_srcdir/configure - elif test -f $ac_sub_srcdir/configure.in; then - ac_sub_configure=$ac_configure - else - echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 - ac_sub_configure= - fi - - # The recursion is here. - if test -n "$ac_sub_configure"; then - - # Make the cache file name correct relative to the subdirectory. - case "$cache_file" in - /*) ac_sub_cache_file=$cache_file ;; - *) # Relative path. - ac_sub_cache_file="$ac_dots$cache_file" ;; - esac - - echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" - # The eval makes quoting arguments work. - if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir - then : - else - { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } - fi - fi - - cd $ac_popdir - done -fi - - diff --git a/configure.guess b/configure.guess deleted file mode 100755 index 2960d6e0..00000000 --- a/configure.guess +++ /dev/null @@ -1,951 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. -# -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Written by Per Bothner <bothner@cygnus.com>. -# The master version of this file is at the FSF in /home/gd/gnu/lib. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit system type (host/target name). -# -# Only a few systems have been added to this list; please add others -# (but try to keep the structure clean). -# - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 8/24/94.) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - cat <<EOF >dummy.s - .globl main - .ent main -main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 - .end main -EOF - ${CC-cc} dummy.s -o dummy 2>/dev/null - if test "$?" = 0 ; then - ./dummy - case "$?" in - 7) - UNAME_MACHINE="alpha" - ;; - 15) - UNAME_MACHINE="alphaev5" - ;; - 14) - UNAME_MACHINE="alphaev56" - ;; - 10) - UNAME_MACHINE="alphapca56" - ;; - 16) - UNAME_MACHINE="alphaev6" - ;; - esac - fi - rm -f dummy.s dummy - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` - exit 0 ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit 0 ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-cbm-sysv4 - exit 0;; - amiga:NetBSD:*:*) - echo m68k-cbm-netbsd${UNAME_RELEASE} - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; - arc64:OpenBSD:*:*) - echo mips64el-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hkmips:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; - arm32:NetBSD:*:*) - echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - SR2?01:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit 0;; - Pyramid*:OSx*:*:*|MIS*:OSx*:*:*|MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit 0 ;; - NILE:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit 0 ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit 0 ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; - atari*:NetBSD:*:*) - echo m68k-atari-netbsd${UNAME_RELEASE} - exit 0 ;; - atari*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3*:NetBSD:*:*) - echo m68k-sun-netbsd${UNAME_RELEASE} - exit 0 ;; - sun3*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:NetBSD:*:*) - echo m68k-apple-netbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; - macppc:NetBSD:*:*) - echo powerpc-apple-netbsd${UNAME_RELEASE} - exit 0 ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit 0 ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - 2020:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - sed 's/^ //' << EOF >dummy.c - int main (argc, argv) int argc; char **argv; { - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - ${CC-cc} dummy.c -o dummy \ - && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit 0 ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit 0 ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit 0 ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit 0 ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ - -o ${TARGET_BINARY_INTERFACE}x = x ] ; then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else echo i586-dg-dgux${UNAME_RELEASE} - fi - exit 0 ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit 0 ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit 0 ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit 0 ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit 0 ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i?86:AIX:*:*) - echo i386-ibm-aix - exit 0 ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - sed 's/^ //' << EOF >dummy.c - #include <sys/systemcfg.h> - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - echo rs6000-ibm-aix3.2.5 - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit 0 ;; - *:AIX:*:4) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` - if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=4.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit 0 ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit 0 ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit 0 ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit 0 ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit 0 ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit 0 ;; - 9000/[34678]??:HP-UX:*:*) - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/6?? | 9000/7?? | 9000/80[24] | 9000/8?[13679] | 9000/892 ) - sed 's/^ //' << EOF >dummy.c - #include <stdlib.h> - #include <unistd.h> - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (${CC-cc} dummy.c -o dummy 2>/dev/null ) && HP_ARCH=`./dummy` - rm -f dummy.c dummy - esac - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; - 3050*:HI-UX:*:*) - sed 's/^ //' << EOF >dummy.c - #include <unistd.h> - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - echo unknown-hitachi-hiuxwe2 - exit 0 ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit 0 ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit 0 ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit 0 ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit 0 ;; - i?86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit 0 ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit 0 ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit 0 ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit 0 ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit 0 ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit 0 ;; - CRAY*X-MP:*:*:*) - echo xmp-cray-unicos - exit 0 ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} - exit 0 ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ - exit 0 ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} - exit 0 ;; - CRAY-2:*:*:*) - echo cray2-cray-unicos - exit 0 ;; - F300:UNIX_System_V:*:*) - FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; - F301:UNIX_System_V:*:*) - echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` - exit 0 ;; - hp3[0-9][05]:NetBSD:*:*) - echo m68k-hp-netbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - i?86:BSD/386:*:* | *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; - *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; - *:NetBSD:*:*) - echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit 0 ;; - i*:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit 0 ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - *:GNU:*:*) - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; - *:Linux:*:*) - # uname on the ARM produces all sorts of strangeness, and we need to - # filter it out. - case "$UNAME_MACHINE" in - arm* | sa110*) UNAME_MACHINE="arm" ;; - esac - - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. - ld_help_string=`ld --help 2>&1` - ld_supported_emulations=`echo $ld_help_string \ - | sed -ne '/supported emulations:/!d - s/[ ][ ]*/ /g - s/.*supported emulations: *// - s/ .*// - p'` - case "$ld_supported_emulations" in - i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; - i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; - sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;; - esac - - if test "${UNAME_MACHINE}" = "alpha" ; then - sed 's/^ //' <<EOF >dummy.s - .globl main - .ent main - main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 - .end main -EOF - LIBC="" - ${CC-cc} dummy.s -o dummy 2>/dev/null - if test "$?" = 0 ; then - ./dummy - case "$?" in - 7) - UNAME_MACHINE="alpha" - ;; - 15) - UNAME_MACHINE="alphaev5" - ;; - 14) - UNAME_MACHINE="alphaev56" - ;; - 10) - UNAME_MACHINE="alphapca56" - ;; - 16) - UNAME_MACHINE="alphaev6" - ;; - esac - - objdump --private-headers dummy | \ - grep ld.so.1 > /dev/null - if test "$?" = 0 ; then - LIBC="libc1" - fi - fi - rm -f dummy.s dummy - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 - elif test "${UNAME_MACHINE}" = "mips" ; then - cat >dummy.c <<EOF -main(argc, argv) - int argc; - char *argv[]; -{ -#ifdef __MIPSEB__ - printf ("%s-unknown-linux-gnu\n", argv[1]); -#endif -#ifdef __MIPSEL__ - printf ("%sel-unknown-linux-gnu\n", argv[1]); -#endif - return 0; -} -EOF - ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - else - # Either a pre-BFD a.out linker (linux-gnuoldld) - # or one that does not give us useful --help. - # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. - # If ld does not provide *any* "supported emulations:" - # that means it is gnuoldld. - echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" - test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 - - case "${UNAME_MACHINE}" in - i?86) - VENDOR=pc; - ;; - *) - VENDOR=unknown; - ;; - esac - # Determine whether the default compiler is a.out or elf - cat >dummy.c <<EOF -#include <features.h> -main(argc, argv) - int argc; - char *argv[]; -{ -#ifdef __ELF__ -# ifdef __GLIBC__ -# if __GLIBC__ >= 2 - printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); -# else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); -# endif -# else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); -# endif -#else - printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); -#endif - return 0; -} -EOF - ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - fi ;; -# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions -# are messed up and put the nodename in both sysname and nodename. - i?86:DYNIX/ptx:4*:*) - echo i386-sequent-sysv4 - exit 0 ;; - i?86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; - i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} - fi - exit 0 ;; - i?86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` - echo ${UNAME_MACHINE}-pc-isc$UNAME_REL - elif /bin/uname -X 2>/dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit 0 ;; - i?86:UnixWare:*:*) - if /bin/uname -X 2>/dev/null >/dev/null ; then - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - fi - echo ${UNAME_MACHINE}-unixware-${UNAME_RELEASE}-${UNAME_VERSION} - exit 0 ;; - pc:*:*:*) - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit 0 ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit 0 ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit 0 ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit 0 ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit 0 ;; - M68*:*:R3V[567]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; - m68*:LynxOS:2.*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit 0 ;; - i?86:LynxOS:2.*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit 0 ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit 0 ;; - PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says <Richard.M.Bartel@ccMail.Census.GOV> - echo i586-unisys-sysv4 - exit 0 ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes <hewes@openmarket.com>. - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit 0 ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit 0 ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; - news*:NEWS-OS:*:6*) - echo mips-sony-newsos6 - exit 0 ;; - R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit 0 ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit 0 ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit 0 ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit 0 ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -cat >dummy.c <<EOF -#ifdef _SEQUENT_ -# include <sys/types.h> -# include <sys/utsname.h> -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include <sys/param.h> - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -#if !defined (ultrix) - printf ("vax-dec-bsd\n"); exit (0); -#else - printf ("vax-dec-ultrix\n"); exit (0); -#endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 -rm -f dummy.c dummy - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit 0 ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - c34*) - echo c34-convex-bsd - exit 0 ;; - c38*) - echo c38-convex-bsd - exit 0 ;; - c4*) - echo c4-convex-bsd - exit 0 ;; - esac -fi - -#echo '(Unable to guess system type)' 1>&2 - -exit 1 diff --git a/configure.in b/configure.in deleted file mode 100644 index 56732495..00000000 --- a/configure.in +++ /dev/null @@ -1,354 +0,0 @@ -# $Id: configure.in,v 1.22 2000/08/30 07:09:46 xiphmont Exp $ - -AC_INIT(lib/mdct.c) -#AC_CONFIG_HEADER(config.h) - -cp configure.guess config.guess -cp configure.sub config.sub - -AC_CANONICAL_HOST - -dnl If we're on IRIX, we wanna use cc even if gcc is there (unless the user -dnl has overriden us)... -case $host in - *-*-irix*) - if test -z "$CC"; then - CC=cc - fi - AC_CHECK_LIB(audio, ALwritesamps) - ;; -# BeOS does not use -lm -# *-*-beos) -# LIBS="" -# ;; -# added better check below - -esac - -AC_PROG_CC -AC_PROG_CPP -AC_PROG_RANLIB -AC_CHECK_PROG(AR,ar,ar) -AC_CHECK_PROG(INSTALL,install,install) - -#not everyone uses libm (eg, BeOS) -#AC_CHECK_LIB(m, cos, LIBS="-lm"; AC_DEFINE(HAVE_LIBM), LIBS="") -# We no longer use config.h -AC_CHECK_LIB(m, cos, LIBS="-lm", LIBS="") - -dnl Set some target options -if test -z "$GCC"; then - case $host in - *-*-irix*) - DEBUG="-g -signed" - OPT="-O2 -w -signed" - PROFILE="-p -g3 -O2 -signed" ;; - sparc-sun-solaris*) - DEBUG="-v -g" - OPT="-xO4 -fast -w -fsimple -native -xcg92" - PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc" ;; - *) - DEBUG="-g" - OPT="-O" - PROFILE="-g -p" ;; - esac -else - - case $host in - *86-*-linux*) - DEBUG="-g -Wall -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char" - OPT="-O20 -ffast-math -D_REENTRANT -fsigned-char" - PROFILE="-pg -g -O20 -ffast-math -D_REENTRANT -fsigned-char" - - # glibc < 2.1.3 has a serious FP bug in the math inline header - # that will cripple Vorbis. Look to see if the magic FP stack - # clobber is missing in the mathinline header, thus indicating - # the buggy version - - AC_EGREP_CPP(log10.*fldlg2.*fxch,[ - #define __LIBC_INTERNAL_MATH_INLINES 1 - #define __OPTIMIZE__ - #include <math.h> - ],bad=maybe,bad=no) - if test ${bad} = "maybe" ;then - AC_EGREP_CPP(log10.*fldlg2.*fxch.*st\([[0123456789]]*\), - [ - #define __LIBC_INTERNAL_MATH_INLINES 1 - #define __OPTIMIZE__ - #include <math.h> - ],bad=no,bad=yes) - fi - if test ${bad} = "yes" ;then - AC_MSG_WARN([ ]) - AC_MSG_WARN([********************************************************]) - AC_MSG_WARN([* The glibc headers on this machine have a serious bug *]) - AC_MSG_WARN([* in /usr/include/bits/mathinline.h This bug affects *]) - AC_MSG_WARN([* all floating point code, not just Ogg, built on this *]) - AC_MSG_WARN([* machine. Upgrading to glibc 2.1.3 is strongly urged *]) - AC_MSG_WARN([* to correct the problem. Note that upgrading glibc *]) - AC_MSG_WARN([* will not fix any previously built programs; this is *]) - AC_MSG_WARN([* a compile-time time bug. *]) - AC_MSG_WARN([* To work around the problem for this build of Ogg, *]) - AC_MSG_WARN([* autoconf is disabling all math inlining. This will *]) - AC_MSG_WARN([* hurt Ogg performace but is necessary for an Ogg that *]) - AC_MSG_WARN([* will actually work. Once glibc is upgraded, rerun *]) - AC_MSG_WARN([* configure and make to build with inlining. *]) - AC_MSG_WARN([********************************************************]) - AC_MSG_WARN([ ]) - - OPT=${OPT}" -D__NO_MATH_INLINES" - PROFILE=${PROFILE}" -D__NO_MATH_INLINES" - fi;; - *-*-linux*) - DEBUG="-g -Wall -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char" - OPT="-O20 -ffast-math -D_REENTRANT -fsigned-char" - PROFILE="-pg -g -O20 -ffast-math -D_REENTRANT -fsigned-char";; - sparc-sun-*) - DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char -mv8" - OPT="-O20 -ffast-math -D__NO_MATH_INLINES -fsigned-char -mv8" - PROFILE="-pg -g -O20 -D__NO_MATH_INLINES -fsigned-char -mv8" ;; - *) - DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char" - OPT="-O20 -D__NO_MATH_INLINES -fsigned-char" - PROFILE="-O20 -g -pg -D__NO_MATH_INLINES -fsigned-char" ;; - esac -fi - -AC_HEADER_STDC - -dnl AC_PATH_X -dnl AC_PATH_XTRA - -#AC_CHECK_LIB(pthread, pthread_create, -# pthread_lib="-lpthread"; AC_DEFINE(HAVE_LIBPTHREAD), :) -# We no longer use config.h -AC_CHECK_LIB(pthread, pthread_create, pthread_lib="-lpthread", :) - -#dnl Linuxthreads require you to define _REENTRANT in all threaded -#dnl code. Bogus, bogus... -# -#if test -n "$pthread_lib"; then -# case $host in -# i?86-*-linux*) -# AC_DEFINE(_REENTRANT) -# ;; -# esac -#fi -# We no longer use config.h - -#if test -n "$x_libraries"; then -# XOGG="yes" -# -# dnl If we find libgtk installed, great; otherwise assume we have -# dnl to build it ourselves. -# -# AC_CHECK_LIB(gtk, gtk_main, :, LIBGTKDIR="libgtk", $X_LIBS -lglib -lgdk -lX11 -lXext -lm) -# -# dnl libpthread is required for xogg. -# -# if test -z "$pthread_lib"; then XOGG=""; fi -# -# dnl If we don't have libgtk installed, and we don't have a libgtk -# dnl subdirectory to build the library ourself, we can't build xogg. -# -# if test -n "$LIBGTKDIR" -a ! -d "$LIBGTKDIR"; then -# XOGG="" -# LIBGTKDIR="" -# fi -#fi - -dnl This seems to be the only way to make autoconf only *sometimes* configure -dnl a subdirectory with AC_CONFIG_SUBDIRS. "__noconf" is assumed to not -dnl exist as a directory, so configure won't try to recursively enter it, unless -dnl the shell variable $dummy is reset to an existing directory inside the -dnl if clause. - -dummy="__noconf" - -#if test -d "$LIBGTKDIR"; then -# enable_shared="no"; export enable_shared -# dummy="libgtk" -# AC_CONFIG_SUBDIRS("$dummy") -# X_LIBS="-L${srcdir}/libgtk/gtk/.libs -L${srcdir}/libgtk/gdk/.libs -L${srcdir}/libgtk/glib/.libs $X_LIBS" -#fi - -# check macro modified from Jon Shiring's to compensate for autoconf's lagging -# behind the times on type madness - -AC_MSG_CHECKING(for int16_t) -AC_CACHE_VAL(has_int16_t, -[AC_TRY_RUN([ -#ifdef __BEOS__ -#include <inttypes.h> -#endif -#include <sys/types.h> -int16_t foo; -int main() {return 0;} -], -has_int16_t=yes, -has_int16_t=no, -has_int16_t=no -)]) -AC_MSG_RESULT($has_int16_t) - -AC_MSG_CHECKING(for int32_t) -AC_CACHE_VAL(has_int32_t, -[AC_TRY_RUN([ -#ifdef __BEOS__ -#include <inttypes.h> -#endif -#include <sys/types.h> -int32_t foo; -int main() {return 0;} -], -has_int32_t=yes, -has_int32_t=no, -has_int32_t=no -)]) -AC_MSG_RESULT($has_int32_t) - -AC_MSG_CHECKING(for uint32_t) -AC_CACHE_VAL(has_uint32_t, -[AC_TRY_RUN([ -#ifdef __BEOS__ -#include <inttypes.h> -#endif -#include <sys/types.h> -uint32_t foo; -int main() {return 0;} -], -has_uint32_t=yes, -has_uint32_t=no, -has_uint32_t=no -)]) -AC_MSG_RESULT($has_uint32_t) - -AC_MSG_CHECKING(for u_int32_t) -AC_CACHE_VAL(has_u_int32_t, -[AC_TRY_RUN([ -#ifdef __BEOS__ -#include <inttypes.h> -#endif -#include <sys/types.h> -u_int32_t foo; -int main() {return 0;} -], -has_u_int32_t=yes, -has_u_int32_t=no, -has_u_int32_t=no -)]) -AC_MSG_RESULT($has_u_int32_t) - -AC_MSG_CHECKING(for int64_t) -AC_CACHE_VAL(has_int64_t, -[AC_TRY_RUN([ -#ifdef __BEOS__ -#include <inttypes.h> -#endif -#include <sys/types.h> -int64_t foo; -int main() {return 0;} -], -has_int64_t=yes, -has_int64_t=no, -has_int64_t=no -)]) -AC_MSG_RESULT($has_int64_t) - -AC_CHECK_SIZEOF(short) -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(long) -AC_CHECK_SIZEOF(long long) - - -if test x$has_int16_t = "xyes" ; then - SIZE16="int16_t" -else - case 2 in - $ac_cv_sizeof_short) SIZE16="short";; - $ac_cv_sizeof_int) SIZE16="int";; - esac -fi - -if test x$has_int32_t = "xyes" ; then - SIZE32="int32_t" -else - case 4 in - $ac_cv_sizeof_short) SIZE32="short";; - $ac_cv_sizeof_int) SIZE32="int";; - $ac_cv_sizeof_long) SIZE32="long";; - esac -fi - -if test x$has_uint32_t = "xyes" ; then - USIZE32="uint32_t" -else - if test x$has_u_int32_t = "xyes" ; then - USIZE32="u_int32_t" - else - case 4 in - $ac_cv_sizeof_short) USIZE32="unsigned short";; - $ac_cv_sizeof_int) USIZE32="unsigned int";; - $ac_cv_sizeof_long) USIZE32="unsigned long";; - esac - fi -fi - -if test x$has_int64_t = "xyes" ; then - SIZE64="int64_t" -else -case 8 in - $ac_cv_sizeof_int) SIZE64="int";; - $ac_cv_sizeof_long) SIZE64="long";; - $ac_cv_sizeof_long_long) SIZE64="long long";; -esac -fi - -if test -z "$SIZE16"; then - AC_MSG_ERROR(No 16 bit type found on this platform!) -fi -if test -z "$SIZE32"; then - AC_MSG_ERROR(No 32 bit type found on this platform!) -fi -if test -z "$USIZE32"; then - AC_MSG_ERROR(No unsigned 32 bit type found on this platform!) -fi -if test -z "$SIZE64"; then - AC_MSG_WARN(No 64 bit type found on this platform!) -fi - -#AC_CHECK_HEADER(alloca.h,AC_DEFINE(USE_ALLOCA_H),:) -#AC_CHECK_HEADER(memory.h,AC_DEFINE(USE_MEMORY_H),:) -# We no longer use config.h -AC_CHECK_HEADER(alloca.h,CFLAGS="$CFLAGS -DUSE_ALLOCA_H",:) -AC_CHECK_HEADER(memory.h,CFLAGS="$CFLAGS -DUSE_MEMORY_H",:) - -AC_C_CONST -AC_HEADER_TIME -AC_STRUCT_TM - -AC_PROG_MAKE_SET -AC_FUNC_MEMCMP -AC_TYPE_SIGNAL -AC_CHECK_FUNCS(gettimeofday select strcspn strerror strspn sigaction) - -AC_SUBST(SIZE16) -AC_SUBST(SIZE32) -AC_SUBST(USIZE32) -AC_SUBST(SIZE64) -AC_SUBST(OPT) -AC_SUBST(LIBS) -AC_SUBST(DEBUG) -AC_SUBST(PROFILE) -AC_SUBST(CC) -AC_SUBST(RANLIB) -#AC_SUBST(XOGG) -#AC_SUBST(LIBGTKDIR) -AC_SUBST(pthread_lib) - -AC_CONFIG_SUBDIRS(vorbis-tools/libao) - -AC_OUTPUT(Makefile lib/Makefile examples/Makefile include/vorbis/os_types.h\ - vorbis-tools/Makefile\ - vq/Makefile huff/Makefile cmdline/Makefile xmms/Makefile kmpg/Makefile) - diff --git a/configure.sub b/configure.sub deleted file mode 100755 index 00bea6e6..00000000 --- a/configure.sub +++ /dev/null @@ -1,955 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script, version 1.1. -# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc. -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -if [ x$1 = x ] -then - echo Configuration name missing. 1>&2 - echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 - echo "or $0 ALIAS" 1>&2 - echo where ALIAS is a recognized configuration type. 1>&2 - exit 1 -fi - -# First pass through any local machine types. -case $1 in - *local*) - echo $1 - exit 0 - ;; - *) - ;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - linux-gnu*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple) - os= - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco5) - os=sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ - | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ - | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 | hppa2.0 \ - | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \ - | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \ - | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ - | mipstx39 | mipstx39el \ - | sparc | sparclet | sparclite | sparc64 | v850) - basic_machine=$basic_machine-unknown - ;; - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i[34567]86) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ - | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ - | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ - | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ - | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* \ - | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \ - | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ - | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ - | sparc64-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-* \ - | mipstx39-* | mipstx39el-* \ - | f301-*) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-cbm - ;; - amigaos | amigados) - basic_machine=m68k-cbm - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-cbm - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | ymp) - basic_machine=ymp-cray - os=-unicos - ;; - cray2) - basic_machine=cray2-cray - os=-unicos - ;; - [ctj]90-cray) - basic_machine=c90-cray - os=-unicos - ;; - crds | unos) - basic_machine=m68k-crds - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - os=-mvs - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i[34567]86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i[34567]86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i[34567]86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i[34567]86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - miniframe) - basic_machine=m68000-convergent - ;; - mipsel*-linux*) - basic_machine=mipsel-unknown - os=-linux-gnu - ;; - mips*-linux*) - basic_machine=mips-unknown - os=-linux-gnu - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - np1) - basic_machine=np1-gould - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pentium | p5 | k5 | nexen) - basic_machine=i586-pc - ;; - pentiumpro | p6 | k6 | 6x86) - basic_machine=i686-pc - ;; - pentiumii | pentium2) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | nexen-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | k6-* | 6x86-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=rs6000-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - xmp) - basic_machine=xmp-cray - os=-unicos - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - mips) - if [ x$os = x-linux-gnu ]; then - basic_machine=mips-unknown - else - basic_machine=mips-mips - fi - ;; - romp) - basic_machine=romp-ibm - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sparc) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv* | -beos*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -ctix* | -uts*) - os=-sysv - ;; - -ns2 ) - os=-nextstep2 - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -xenix) - os=-xenix - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - *-acorn) - os=-riscix1.2 - ;; - arm*-semi) - os=-aout - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-ibm) - os=-aix - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f301-fujitsu) - os=-uxpv - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -hpux*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -vxsim* | -vxworks*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os diff --git a/debian/README.debian b/debian/README.debian deleted file mode 100644 index da252efd..00000000 --- a/debian/README.debian +++ /dev/null @@ -1,14 +0,0 @@ -Ogg Vorbis for Debian ---------------------- - -Ogg Vorbis currently does not have a shared library. it is a goal for the -future, but presently, any compiling using the codec should be done as -follows: - - gcc [flags] -c X.c - gcc [flags] /usr/lib/vorbisfile.a /usr/lib/libvorbis.a \ - X.o -o X - -Of course, only include the .a's that are required for your program. - - -- Michael Beattie <mjb@debian.org>, Mon, 26 Jun 2000 18:59:56 +1200 diff --git a/debian/README.examples b/debian/README.examples deleted file mode 100644 index 01d11fd2..00000000 --- a/debian/README.examples +++ /dev/null @@ -1,11 +0,0 @@ -Example tools using vorbis. - -The examples/ directory contains some example source files to build tools -using the vorbis codec. The Makefile is only included to show how they are -compiled. It contains relative references to the libraries in the source -tree, so it will *not* work without being edited first. - -The misc.h included in chaining_example and seeking_test just allows the -use of a debugging malloc. (defined in misc.c) It is safe to comment out. - - -- Michael Beattie <mjb@debian.org>, Mon, 26 Jun 2000 18:59:56 +1200 diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index 27bf0873..00000000 --- a/debian/changelog +++ /dev/null @@ -1,25 +0,0 @@ -vorbis (1.0beta2-1) unstable; urgency=low - - * New upstream version. Closes: #67326, #68416 - * Changed xmms-vorbis to Architechture: any. Closes: #67395 - * Added Build-deps. Closes: #66628 - * Moved vorbize to vorbis-tools along with oggenc and vorbiscomment - - -- Michael Beattie <mjb@debian.org> Wed, 9 Aug 2000 00:30:15 +1200 - -vorbis (1.0beta1-1) unstable; urgency=low - - * First Beta, Ready for debian release. - - -- Michael Beattie <mickyb@es.co.nz> Fri, 30 Jun 2000 19:26:59 +1200 - -vorbis (0.0-1) unstable; urgency=low - - * Initial Release. - * Initial package, not placed in archive. - - -- Michael Beattie <mickyb@es.co.nz> Mon, 26 Jun 2000 18:59:56 +1200 - -Local variables: -mode: debian-changelog -End: diff --git a/debian/control b/debian/control deleted file mode 100644 index c3dd56f5..00000000 --- a/debian/control +++ /dev/null @@ -1,68 +0,0 @@ -Source: vorbis -Section: sound -Priority: optional -Maintainer: Michael Beattie <mjb@debian.org> -Build-Depends: debhelper (>= 2.1.5), xmms-dev -Standards-Version: 3.0.1 - -Package: libvorbis-dev -Section: devel -Architecture: any -Depends: libc6-dev (>= 2.1.3) -Description: The OGG Vorbis lossy audio compression codec. - This Package contains the development libraries and header files for - Ogg Vorbis. - . - Ogg Vorbis is a fully Open, non-proprietary, patent-and-royalty-free, - general-purpose compressed audio format for high quality (44.1-48.0kHz, - 16+ bit, polyphonic) audio and music at fixed and variable bitrates - from 16 to 128 kbps/channel. This places Vorbis in the same class as - audio representations including MPEG-1 audio layer 3, MPEG-4 - audio (AAC and TwinVQ), and PAC. - -Package: xmms-vorbis -Architecture: any -Depends: ${shlibs:Depends}, xmms -Description: An xmms plugin to play Ogg Vorbis files. - This Package contains a plugin for xmms to play files encoded using the - Ogg Vorbis lossy audio compression codec. - . - Ogg Vorbis is a fully Open, non-proprietary, patent-and-royalty-free, - general-purpose compressed audio format for high quality (44.1-48.0kHz, - 16+ bit, polyphonic) audio and music at fixed and variable bitrates - from 16 to 128 kbps/channel. This places Vorbis in the same class as - audio representations including MPEG-1 audio layer 3, MPEG-4 - audio (AAC and TwinVQ), and PAC. - -Package: ogg123 -Architecture: any -Depends: ${shlibs:Depends} -Description: A player for Ogg Vorbis files. - This Package contains a commandline player for files encoded using the - Ogg Vorbis lossy audio compression codec. - . - Ogg Vorbis is a fully Open, non-proprietary, patent-and-royalty-free, - general-purpose compressed audio format for high quality (44.1-48.0kHz, - 16+ bit, polyphonic) audio and music at fixed and variable bitrates - from 16 to 128 kbps/channel. This places Vorbis in the same class as - audio representations including MPEG-1 audio layer 3, MPEG-4 - audio (AAC and TwinVQ), and PAC. - -Package: vorbis-tools -Architecture: any -Depends: ${shlibs:Depends} -Suggests: ogg123 | xmms-vorbis -Description: An encoder for the Ogg Vorbis lossy audio compression codec. - This Package contains two Ogg Vorbis encoders, oggenc and vorbize. - An example script for converting .mp3's to .ogg's is included. - (/usr/share/doc/vorbize/examples/mp3tovorbis) - NOTE: Currently vorbis only works with 44kHz, 16bit stereo raw PCM or - wav files. Use sox to coax any other formats into line. - . - Ogg Vorbis is a fully Open, non-proprietary, patent-and-royalty-free, - general-purpose compressed audio format for high quality (44.1-48.0kHz, - 16+ bit, polyphonic) audio and music at fixed and variable bitrates - from 16 to 128 kbps/channel. This places Vorbis in the same class as - audio representations including MPEG-1 audio layer 3, MPEG-4 - audio (AAC and TwinVQ), and PAC. - diff --git a/debian/copyright b/debian/copyright deleted file mode 100644 index 442a7d3c..00000000 --- a/debian/copyright +++ /dev/null @@ -1,25 +0,0 @@ -This package was debianized by Michael Beattie <mjb@debian.org> on -Mon, 26 Jun 2000 18:59:56 +1200. - -It was downloaded from http://www.xiph.org/ogg/vorbis/ (via CVS) - -Upstream Author(s): Monty <monty@xiph.org> - -Copyright: - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 dated June, 1991. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA. - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License can be found in /usr/share/common-licenses/GPL'. diff --git a/debian/dirs b/debian/dirs deleted file mode 100644 index 0d97de53..00000000 --- a/debian/dirs +++ /dev/null @@ -1,3 +0,0 @@ -usr/lib -usr/include/vorbis/book -usr/share/doc/libvorbis-dev/html diff --git a/debian/docs b/debian/docs deleted file mode 100644 index a7d3a859..00000000 --- a/debian/docs +++ /dev/null @@ -1,3 +0,0 @@ -README -todo.txt -debian/README.examples diff --git a/debian/examples b/debian/examples deleted file mode 100644 index a1adfae4..00000000 --- a/debian/examples +++ /dev/null @@ -1,6 +0,0 @@ -examples/Makefile -examples/chaining_example.c -examples/decoder_example.c -examples/encoder_example.c -examples/seeking_test.c -examples/vorbisfile_example.c diff --git a/debian/ogg123.dirs b/debian/ogg123.dirs deleted file mode 100644 index e7724817..00000000 --- a/debian/ogg123.dirs +++ /dev/null @@ -1 +0,0 @@ -usr/bin diff --git a/debian/ogg123.docs b/debian/ogg123.docs deleted file mode 100644 index 8f7da824..00000000 --- a/debian/ogg123.docs +++ /dev/null @@ -1 +0,0 @@ -vorbis-tools/README diff --git a/debian/override.Lintian b/debian/override.Lintian deleted file mode 100644 index 5733a47a..00000000 --- a/debian/override.Lintian +++ /dev/null @@ -1 +0,0 @@ -xmms-vorbis: shlib-with-non-pic-code diff --git a/debian/rules b/debian/rules deleted file mode 100755 index c843e10a..00000000 --- a/debian/rules +++ /dev/null @@ -1,170 +0,0 @@ -#!/usr/bin/make -f -# Sample debian/rules that uses debhelper. -# GNU copyright 1997 by Joey Hess. -# Modified for Ogg Vorbis, 2000 by Michael Beattie - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -# This is the debhelper compatability version to use. -export DH_COMPAT=1 - -# This has to be exported to make some magic below work. -export DH_OPTIONS - -build: build-stamp -build-stamp: - dh_testdir - - ./configure --disable-alsa --prefix=/usr \ - --mandir=\$${prefix}/share/man \ - --infodir=\$${prefix}/share/info - # Add here commands to compile the package. - $(MAKE) - cd vorbis-tools && $(MAKE) && $(MAKE) ogg123 - cd xmms && $(MAKE) - - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp - - # Add here commands to clean up after the build process. - -$(MAKE) distclean - - dh_clean - - -# Build architecture-independent files here. -binary-arch: libvorbis-dev ogg123 vorbis-tools xmms-vorbis - -libvorbis-dev: DH_OPTIONS=-plibvorbis-dev -libvorbis-dev: build - # Need this version of debhelper for DH_OPTIONS to work. - dh_testversion 1.1.17 - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - -cp -a include/vorbis/*.h `pwd`/debian/tmp/usr/include/vorbis/ - -cp -a include/vorbis/book/*.vqh `pwd`/debian/tmp/usr/include/vorbis/book/ - -cp lib/*.a `pwd`/debian/tmp/usr/lib/ - - -cp docs/*.html docs/*.png `pwd`/debian/tmp/usr/share/doc/libvorbis-dev/html/ - - dh_installdocs - dh_installexamples -# dh_installmanpages -# dh_installinfo -# dh_undocumented - dh_installchangelogs - dh_strip - dh_link - dh_compress - dh_fixperms - dh_installdeb -# dh_makeshlibs -# dh_shlibdeps - dh_gencontrol -u -isp - dh_md5sums - dh_builddeb - - - -ogg123: DH_OPTIONS=-pogg123 -ogg123: build - # Need this version of debhelper for DH_OPTIONS to work. - dh_testversion 1.1.17 - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - install -m 755 vorbis-tools/ogg123 `pwd`/debian/ogg123/usr/bin/ - - dh_installdocs vorbis-tools/README -# dh_installmenu - dh_installmanpages vorbize.1 oggenc.1 -# dh_installinfo -# dh_undocumented - dh_installchangelogs vorbis-tools/Changelog - dh_strip - dh_link - dh_compress - dh_fixperms - dh_installdeb -# dh_makeshlibs - dh_shlibdeps - dh_gencontrol -u -isp - dh_md5sums - dh_builddeb - - - -vorbis-tools: DH_OPTIONS=-pvorbis-tools -vorbis-tools: build - # Need this version of debhelper for DH_OPTIONS to work. - dh_testversion 1.1.17 - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - install -m 755 vorbis-tools/vorbize `pwd`/debian/vorbis-tools/usr/bin/ - install -m 755 vorbis-tools/oggenc `pwd`/debian/vorbis-tools/usr/bin/ - install -m 755 vorbis-tools/vorbiscomment `pwd`/debian/vorbis-tools/usr/bin/ - - dh_installdocs vorbis-tools/README - dh_installexamples vorbis-tools/mp3tovorbis -# dh_installmenu - dh_installmanpages ogg123.1 -# dh_installinfo -# dh_undocumented - dh_installchangelogs vorbis-tools/Changelog - dh_strip - dh_link - dh_compress - dh_fixperms - dh_installdeb -# dh_makeshlibs - dh_shlibdeps - dh_gencontrol -u -isp - dh_md5sums - dh_builddeb - - - -xmms-vorbis: DH_OPTIONS=-pxmms-vorbis -xmms-vorbis: build install - # Need this version of debhelper for DH_OPTIONS to work. - dh_testversion 1.1.17 - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - install -m 644 xmms/libvorbis.so `pwd`/debian/xmms-vorbis/usr/lib/xmms/Input/ - - dh_installdocs - dh_installchangelogs - dh_strip - dh_link - dh_compress - dh_fixperms - dh_installdeb -# - dh_shlibdeps - dh_gencontrol -u -isp - dh_md5sums - dh_builddeb - - -# Build architecture-dependent files here. -binary-indep: - - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install diff --git a/debian/vorbis-tools.dirs b/debian/vorbis-tools.dirs deleted file mode 100644 index e7724817..00000000 --- a/debian/vorbis-tools.dirs +++ /dev/null @@ -1 +0,0 @@ -usr/bin diff --git a/debian/vorbis-tools.docs b/debian/vorbis-tools.docs deleted file mode 100644 index 843d9055..00000000 --- a/debian/vorbis-tools.docs +++ /dev/null @@ -1 +0,0 @@ -vorbis-tools/README
\ No newline at end of file diff --git a/debian/xmms-vorbis.dirs b/debian/xmms-vorbis.dirs deleted file mode 100644 index d382c88a..00000000 --- a/debian/xmms-vorbis.dirs +++ /dev/null @@ -1 +0,0 @@ -usr/lib/xmms/Input diff --git a/debian/xmms-vorbis.docs b/debian/xmms-vorbis.docs deleted file mode 100644 index 76a44b63..00000000 --- a/debian/xmms-vorbis.docs +++ /dev/null @@ -1,2 +0,0 @@ -xmms/README -debian/override.Lintian diff --git a/doc/framing.html b/doc/framing.html deleted file mode 100644 index 51054c7d..00000000 --- a/doc/framing.html +++ /dev/null @@ -1,384 +0,0 @@ -<HTML><HEAD><TITLE>xiph.org: Ogg Vorbis documentation</TITLE> -<BODY bgcolor="#ffffff" text="#202020" link="#006666" vlink="#000000"> -<nobr><a href="vorbis.html"><img src="white-ogg.png" border=0><img -src="vorbisword2.png" border=0></a></nobr><p> - -<h1><font color=#000070> -Ogg logical bitstream framing -</font></h1> - -<em>Last update to this document: July 15, 1999</em><br> - -<h2>Ogg bitstreams</h2> - -Vorbis encodes short-time blocks of PCM data into raw packets of -bit-packed data. These raw packets may be used directly by transport -mechanisms that provide their own framing and packet-seperation -mechanisms (such as UDP datagrams). For stream based storage (such as -files) and transport (such as TCP streams or pipes), Vorbis uses the -Ogg bitstream format to provide framing/sync, sync recapture -after error, landmarks during seeking, and enough information to -properly seperate data back into packets at the original packet -boundaries without relying on decoding to find packet boundaries.<p> - -<h2>Design constraints for Ogg bitstreams</h2> - -<ol><li>True streaming; we must not need to seek to build a 100% - complete bitstream. - -<li> Use no more than approximately 1-2% of bitstream bandwidth for - packet boundary marking, high-level framing, sync and seeking. - -<li> Specification of absolute position within the original sample - stream. - -<li> Simple mechanism to ease limited editing, such as a simplified - concatenation mechanism. - -<li> Detection of corruption, recapture after error and direct, random - access to data at arbitrary positions in the bitstream. -</ol> - -<h2>Logical and Physical Bitstreams</h2> - -A <em>logical</em> Ogg bitstream is a contiguous stream of -sequential pages belonging only to the logical bitstream. A -<em>physical</em> Ogg bitstream is constructed from one or more -than one logical Ogg bitstream (the simplest physical bitstream -is simply a single logical bitstream). We describe below the exact -formatting of an Ogg logical bitstream. Combining logical -bitstreams into more complex physical bitstreams is described in the -<a href="oggstream.html">Ogg bitstream overview</a>. The exact -mapping of raw Vorbis packets into a valid Ogg Vorbis physical -bitstream is described in <a href="vorbis-stream.html">Vorbis -bitstream mapping</a>. - -<h2>Bitstream structure</h2> - -An Ogg stream is structured by dividing incoming packets into -segments of up to 255 bytes and then wrapping a group of contiguous -packet segments into a variable length page preceeded by a page -header. Both the header size and page size are variable; the page -header contains sizing information and checksum data to determine -header/page size and data integrity.<p> - -The bitstream is captured (or recaptured) by looking for the beginning -of a page, specifically the capture pattern. Once the capture pattern -is found, the decoder verifies page sync and integrity by computing -and comparing the checksum. At that point, the decoder can extract the -packets themselves.<p> - -<h3>Packet segmentation</h3> - -Packets are logically divided into multiple segments before encoding -into a page. Note that the segmentation and fragmentation process is a -logical one; it's used to compute page header values and the original -page data need not be disturbed, even when a packet spans page -boundaries.<p> - -The raw packet is logically divided into [n] 255 byte segments and a -last fractional segment of < 255 bytes. A packet size may well -consist only of the trailing fractional segment, and a fractional -segment may be zero length. These values, called "lacing values" are -then saved and placed into the header segment table.<p> - -An example should make the basic concept clear:<p> - -<pre> -<tt> -raw packet: - ___________________________________________ - |______________packet data__________________| 753 bytes - -lacing values for page header segment table: 255,255,243 -</tt> -</pre> - -We simply add the lacing values for the total size; the last lacing -value for a packet is always the value that is less than 255. Note -that this encoding both avoids imposing a maximum packet size as well -as imposing minimum overhead on small packets (as opposed to, eg, -simply using two bytes at the head of every packet and having a max -packet size of 32k. Small packets (<255, the typical case) are -penalized with twice the segmentation overhead). Using the lacing -values as suggested, small packets see the minimum possible -byte-aligned overheade (1 byte) and large packets, over 512 bytes or -so, see a fairly constant ~.5% overhead on encoding space.<p> - -Note that a lacing value of 255 implies that a second lacing value -follows in the packet, and a value of < 255 marks the end of the -packet after that many additional bytes. A packet of 255 bytes (or a -multiple of 255 bytes) is terminated by a lacing value of 0:<p> - -<pre><tt> -raw packet: - _______________________________ - |________packet data____________| 255 bytes - -lacing values: 255, 0 -</tt></pre> - -Note also that a 'nil' (zero length) packet is not an error; it -consists of nothing more than a lacing value of zero in the header.<p> - -<h3>Packets spanning pages</h3> - -Packets are not resticted to beginning and ending within a page, -although individual segments are, by definition, required to do so. -Packets are not restricted to a maximum size, although excessively -large packets in the data stream are discouraged; the Ogg -bitstream specification strongly recommends nominal page size of -approximately 4-8kB (large packets are forseen as being useful for -initialization data at the beginning of a logical bitstream).<p> - -After segmenting a packet, the encoder may decide not to place all the -resulting segments into the current page; to do so, the encoder places -the lacing values of the segments it wishes to belong to the current -page into the current segment table, then finishes the page. The next -page is begun with the first value in the segment table belonging to -the next packet segment, thus continuing the packet (data in the -packet body must also correspond properly to the lacing values in the -spanned pages. The segment data in the first packet corresponding to -the lacing values of the first page belong in that page; packet -segments listed in the segment table of the following page must begin -the page body of the subsequent page).<p> - -The last mechanic to spanning a page boundary is to set the header -flag in the new page to indicate that the first lacing value in the -segment table continues rather than begins a packet; a header flag of -0x01 is set to indicate a continued packet. Although mandatory, it -is not actually algorithmically necessary; one could inspect the -preceeding segment table to determine if the packet is new or -continued. Adding the information to the packet_header flag allows a -simpler design (with no overhead) that needs only inspect the current -page header after frame capture. This also allows faster error -recovery in the event that the packet originates in a corrupt -preceeding page, implying that the previous page's segment table -cannot be trusted.<p> - -Note that a packet can span an arbitrary number of pages; the above -spanning process is repeated for each spanned page boundary. Also a -'zero termination' on a packet size that is an even multiple of 255 -must appear even if the lacing value appears in the next page as a -zero-length continuation of the current packet. The header flag -should be set to 0x01 to indicate that the packet spanned, even though -the span is a nil case as far as data is concerned.<p> - -The encoding looks odd, but is properly optimized for speed and the -expected case of the majority of packets being between 50 and 200 -bytes (note that it is designed such that packets of wildly different -sizes can be handled within the model; placing packet size -restrictions on the encoder would have only slightly simplified design -in page generation and increased overall encoder complexity).<p> - -The main point behind tracking individual packets (and packet -segments) is to allow more flexible encoding tricks that requiring -explicit knowledge of packet size. An example is simple bandwidth -limiting, implemented by simply truncating packets in the nominal case -if the packet is arranged so that the least sensitive portion of the -data comes last.<p> - -<h3>Page header</h3> - -The headering mechanism is designed to avoid copying and re-assembly -of the packet data (ie, making the packet segmentation process a -logical one); the header can be generated directly from incoming -packet data. The encoder buffers packet data until it finishes a -complete page at which point it writes the header followed by the -buffered packet segments.<p> - -<h4>capture_pattern</h4> - - A header begins with a capture pattern that simplifies identifying - pages; once the decoder has found the capture pattern it can do a more - intensive job of verifying that it has in fact found a page boundary - (as opposed to an inadvertant coincidence in the byte stream).<p> - -<pre><tt> - byte value - - 0 0x4f 'O' - 1 0x67 'g' - 2 0x67 'g' - 3 0x53 'S' -</tt></pre> - -<h4>stream_structure_version</h4> - - The capture pattern is followed by the stream structure revision: - -<pre><tt> - byte value - - 4 0x00 -</tt></pre> - -<h4>header_type_flag</h4> - - The header type flag identifies this page's context in the bitstream: - -<pre><tt> - byte value - - 5 bitflags: 0x01: unset = fresh packet - set = continued packet - 0x02: unset = not first page of logical bitstream - set = first page of logical bitstream (bos) - 0x04: unset = not last page of logical bitstream - set = last page of logical bitstream (eos) -</tt></pre> - -<h4>PCM absolute position</h4> - - (This is packed in the same way the rest of Ogg data is packed; - LSb of LSB first. Note that the 'position' data specifies a 'sample' - number (eg, in a CD quality sample is four octets, 16 bits for left - and 16 bits for right; in video it would be the frame number). The - position specified is the total samples encoded after including all - packets finished on this page (packets begun on this page but - continuing on to thenext page do not count). The rationale here is - that the position specified in the frame header of the last page - tells how long the PCM data coded by the bitstream is. A truncated - stream will still return the proper number of samples that can be - decoded fully. - -<pre><tt> - byte value - - 6 0xXX LSB - 7 0xXX - 8 0xXX - 9 0xXX - 10 0xXX - 11 0xXX - 12 0xXX - 13 0xXX MSB -</tt></pre> - -<h4>stream serial number</h4> - - Ogg allows for seperate logical bitstreams to be mixed at page - granularity in a physical bitstream. The most common case would be - sequential arrangement, but it is possible to interleave pages for - two seperate bitstreams to be decoded concurrently. The serial - number is the means by which pages physical pages are associated with - a particular logical stream. Each logical stream must have a unique - serial number within a physical stream: - -<pre><tt> - byte value - - 14 0xXX LSB - 15 0xXX - 16 0xXX - 17 0xXX MSB -</tt></pre> - -<h4>page sequence no</h4> - - Page counter; lets us know if a page is lost (useful where packets - span page boundaries). - -<pre><tt> - byte value - - 18 0xXX LSB - 19 0xXX - 20 0xXX - 21 0xXX MSB -</tt></pre> - -<h4>page checksum</h4> - - 32 bit CRC value (direct algorithm, initial val and final XOR = 0, - generator polynomial=0x04c11db7). The value is computed over the - entire header (with the CRC field in the header set to zero) and then - continued over the page. The CRC field is then filled with the - computed value.<p> - - (A thorough discussion of CRC algorithms can be found in <a - href="ftp://ftp.rocksoft.com/clients/rocksoft/papers/crc_v3.txt">"A - Painless Guide to CRC Error Detection Algorithms"</a> by Ross - Williams <a - href="mailto:ross@guest.adelaide.edu.au">ross@guest.adelaide.edu.au</a>.) - -<pre><tt> - byte value - - 22 0xXX LSB - 23 0xXX - 24 0xXX - 25 0xXX MSB -</tt></pre> - -<h4>page_segments</h4> - - The number of segment entries to appear in the segment table. The - maximum number of 255 segments (255 bytes each) sets the maximum - possible physical page size at 65307 bytes or just under 64kB (thus - we know that a header corrupted so as destroy sizing/alignment - information will not cause a runaway bitstream. We'll read in the - page according to the corrupted size information that's guaranteed to - be a reasonable size regardless, notice the checksum mismatch, drop - sync and then look for recapture).<p> - -<pre><tt> - byte value - - 26 0x00-0xff (0-255) -</tt></pre> - -<h4>segment_table (containing packet lacing values)</h4> - - The lacing values for each packet segment physically appearing in - this page are listed in contiguous order. - -<pre><tt> - byte value - - 27 0x00-0xff (0-255) - [...] - n 0x00-0xff (0-255, n=page_segments+26) -</tt></pre> - -Total page size is calculated directly from the known header size and -lacing values in the segment table. Packet data segments follow -immediately after the header.<p> - -Page headers typically impose a flat .25-.5% space overhead assuming -nominal ~8k page sizes. The segmentation table needed for exact -packet recovery in the streaming layer adds approximately .5-1% -nominal assuming expected encoder behavior in the 44.1kHz, 128kbps -stereo encodings.<p> - -<hr> -<a href="http://www.xiph.org/"> -<img src="white-xifish.png" align=left border=0> -</a> -<font size=-2 color=#505050> - -Ogg is a <a href="http://www.xiph.org">Xiphophorus</a> effort to -protect essential tenets of Internet multimedia from corporate -hostage-taking; Open Source is the net's greatest tool to keep -everyone honest. See <a href="http://www.xiph.org/about.html">About -Xiphophorus</a> for details. -<p> - -Ogg Vorbis is the first Ogg audio CODEC. Anyone may -freely use and distribute the Ogg and Vorbis specification, -whether in a private, public or corporate capacity. However, -Xiphophorus and the Ogg project (xiph.org) reserve the right to set -the Ogg/Vorbis specification and certify specification compliance.<p> - -Xiphophorus's Vorbis software CODEC implementation is distributed -under the Lessr/Library GNU Public License. This does not restrict -third parties from distributing independent implementations of Vorbis -software under other licenses.<p> - -OggSquish, Vorbis, Xiphophorus and their logos are trademarks (tm) of -<a href="http://www.xiph.org/">Xiphophorus</a>. These pages are -copyright (C) 1994-2000 Xiphophorus. All rights reserved.<p> - -</body> - - diff --git a/doc/oggstream.html b/doc/oggstream.html deleted file mode 100644 index 46a221c8..00000000 --- a/doc/oggstream.html +++ /dev/null @@ -1,192 +0,0 @@ -<HTML><HEAD><TITLE>xiph.org: Ogg Vorbis documentation</TITLE> -<BODY bgcolor="#ffffff" text="#202020" link="#006666" vlink="#000000"> -<nobr><a href="vorbis.html"><img src="white-ogg.png" border=0><img -src="vorbisword2.png" border=0></a></nobr><p> - - -<h1><font color=#000070> -Ogg logical and physical bitstream overview -</font></h1> - -<em>Last update to this document: July 18, 1999</em><br> - -<h2>Ogg bitstreams</h2> - -Ogg codecs use octet vectors of raw, compressed data -(<em>packets</em>). These compressed packets do not have any -high-level structure or boundary information; strung together, they -appear to be streams of random bytes with no landmarks.<p> - -Raw packets may be used directly by transport mechanisms that provide -their own framing and packet-seperation mechanisms (such as UDP -datagrams). For stream based storage (such as files) and transport -(such as TCP streams or pipes), Vorbis and other future Ogg codecs use -the Ogg bitstream format to provide framing/sync, sync recapture -after error, landmarks during seeking, and enough information to -properly seperate data back into packets at the original packet -boundaries without relying on decoding to find packet boundaries.<p> - -<h2>Logical and physical bitstreams</h2> - -Raw packets are grouped and encoded into contiguous pages of -structured bitstream data called <em>logical bitstreams</em>. A -logical bitstream consists of pages, in order, belonging to a single -codec instance. Each page is a self contained entity (although it is -possible that a packet may be split and encoded across one or more -pages); that is, the page decode mechanism is designed to recognize, -verify and handle single pages at a time from the overall bitstream.<p> - -Multiple logical bitstreams can be combined (with restricctions) into -a single <em>physical bitstream</em>. A physical bitstream consists -of multiple logical bitstreams multiplexed at the page level. Whole -pages are taken in order from multiple logical bitstreams and combined -into a single physical stream of pages. The decoder reconstructs the -original logical bitstreams from the physical bitstream by taking the -pages in order fromt he physical bitstream and redirecting them into -the appropriate logical decoding entitiy. The simplest physical -bitstream is a single, unmultiplexed logical bitstream. <p> - -<a href=framing.html>Ogg Logical Bitstream Framing</a> discusses -the page format of an Ogg bitstream, the packet coding process -and logical bitstreams in detail. The remainder of this document -specifies requirements for constructing finished, physical Ogg -bitstreams.<p> - -<h2>Mapping Restrictions</h2> - -Logical bitstreams may not be mapped/multiplexed into physical -bitstreams without restriction. Here we discuss design restrictions -on Ogg physical bitstreams in general, mostly to introduce -design rationale. Each 'media' format defines its own (generally more -restrictive) mapping. An '<a href="vorbis-stream.html">Ogg Vorbis -Audio Bitstream</a>', for example, has a <a -href="vorbis-stream.html">specific physical bitstream structure</a>. -An 'Ogg A/V' bitstream (not currently specified) will also mandate a -specific, restricted physical bitstream format.<p> - -<h3>additional end-to-end structure</h3> - -The <a href="framing.html">framing specification</a> defines -'beginning of stream' and 'end of stream' page markers via a header -flag (it is possible for a stream to consist of a single page). A -stream always consists of an integer number of pages, an easy -requirement given the variable size nature of pages.<p> - -In addition to the header flag marking the first and last pages of a -logical bitstream, the first page of an Ogg bitstream obeys -additional restrictions. Each individual media mapping specifies its -own implementation details regarding these restrictions.<p> - -The first page of a logical Ogg bitstream consists of a single, -small 'initial header' packet that includes sufficient information to -identify the exact CODEC type and media requirements of the logical -bitstream. The intent of this restriction is to simplify identifying -the bitstream type and content; for a given media type (or across all -Ogg media types) we can know that we only need a small, fixed -amount of data to uniquely identify the bitstream type.<p> - -As an example, Ogg Vorbis places the name and revision of the Vorbis -CODEC, the audio rate and the audio quality into this initial header, -thus simplifying vastly the certain identification of an Ogg Vorbis -audio bitstream.<p> - -<h3>sequential multiplexing (chaining)</h3> - -The simplest form of logical bitstream multiplexing is concatenation -(<em>chaining</em>). Complete logical bitstreams are strung -one-after-another in order. The bitstreams do not overlap; the final -page of a given logical bitstream is immediately followed by the -initial page of the next. Chaining is the only logical->physical -mapping allowed by Ogg Vorbis.<p> - -Each chained logical bitstream must have a unique serial number within -the scope of the physical bitstream.<p> - -<h3>concurrent multiplexing (grouping)</h3> - -Logical bitstreams may also be multiplexed 'in parallel' -(<em>grouped</em>). An example of grouping would be to allow -streaming of seperate audio and video streams, using differnt codecs -and different logical bitstreams, in the same physical bitstream. -Whole pages from multiple logical bitstreams are mixed together.<p> - -The initial pages of each logical bitstream must appear first; the -media mapping specifies the order of the initial pages. For example, -Ogg A/V will eventually specify an Ogg video bitstream with -audio. The mapping may specify that the physical bitstream must begin -with the initial page of a logical video bitstream, followed by the -initial page of an audio stream. Unlike initial pages, terminal pages -for the logical bitstreams need not all occur contiguously (although a -specific media mapping may require this; it is not mandated by the -generic Ogg stream spec). Terminal pages may be 'nil' pages, -that is, pages containing no content but simply a page header with -position information and the 'last page of bitstream' flag set in the -page header.<p> - -Each grouped bitstream must have a unique serial number within the -scope of the physical bitstream.<p> - -<h3>sequential and concurrent multiplexing</h3> - -Groups of concurrently multiplexed bitstreams may be chained -consecutively. Such a physical bitstream obeys all the rules of both -grouped and chained multiplexed streams; the groups, when unchained , -must stand on their own as a valid concurrently multiplexed -bitstream.<p> - -<h3>multiplexing example</h3> - -Below, we present an example of a grouped and chained bitstream:<p> - -<img src=stream.png><p> - -In this example, we see pages from five total logical bitstreams -multiplexed into a physical bitstream. Note the following -characteristics: - -<ol><li>Grouped bitstreams begin together; all of the initial pages -must appear before any data pages. When concurrently multiplexed -groups are chained, the new group does not begin until all the -bitstreams in the previous group have terminated.<p> - -<li>The pages of concurrently multiplexed bitstreams need not conform -to a regular order; the only requirement is that page <tt>n</tt> of a -logical bitstream follow page <tt>n-1</tt> in the physical bitstream. -There are no restrictions on intervening pages belonging to other -logical bitstreams. (Tying page appearence to bitrate demands is one -logical strategy, ie, the page appears at the chronological point -where decode requires more information). - -</ol> - -<hr> -<a href="http://www.xiph.org/"> -<img src="white-xifish.png" align=left border=0> -</a> -<font size=-2 color=#505050> - -Ogg is a <a href="http://www.xiph.org">Xiphophorus</a> effort to -protect essential tenets of Internet multimedia from corporate -hostage-taking; Open Source is the net's greatest tool to keep -everyone honest. See <a href="http://www.xiph.org/about.html">About -Xiphophorus</a> for details. -<p> - -Ogg Vorbis is the first Ogg audio CODEC. Anyone may -freely use and distribute the Ogg and Vorbis specification, -whether in a private, public or corporate capacity. However, -Xiphophorus and the Ogg project (xiph.org) reserve the right to set -the Ogg/Vorbis specification and certify specification compliance.<p> - -Xiphophorus's Vorbis software CODEC implementation is distributed -under the Lesser/Library GNU Public License. This does not restrict -third parties from distributing independent implementations of Vorbis -software under other licenses.<p> - -OggSquish, Vorbis, Xiphophorus and their logos are trademarks (tm) of -<a href="http://www.xiph.org/">Xiphophorus</a>. These pages are -copyright (C) 1994-2000 Xiphophorus. All rights reserved.<p> - -</body> - - diff --git a/doc/programming.html b/doc/programming.html deleted file mode 100644 index 7f6e62fe..00000000 --- a/doc/programming.html +++ /dev/null @@ -1,507 +0,0 @@ -<HTML><HEAD><TITLE>xiph.org: Ogg Vorbis documentation</TITLE> -<BODY bgcolor="#ffffff" text="#202020" link="#006666" vlink="#000000"> -<nobr><img src="white-ogg.png"><img src="vorbisword2.png"></nobr><p> - - -<h1><font color=#000070> -Programming with Xiphophorus <tt>libvorbis</tt> -</font></h1> - -<em>Last update to this document: July 22, 1999</em><br> - -<h2>Description</h2> - -Libvorbis is Xiphophorus's portable Ogg Vorbis CODEC implemented as a -programmatic library. Libvorbis provides primitives to handle framing -and manipulation of Ogg bitstreams (used by the Vorbis for -streaming), a full analysis (encoding) interface as well as packet -decoding and synthesis for playback. <p> - -The libvorbis library does not provide any system interface; a -full-featured demonstration player included with the library -distribtion provides example code for a variety of system interfaces -as well as a working example of using libvorbis in production code. - -<h2>Encoding Overview</h2> - - - -<h2>Decoding Overview</h2> - -Decoding a bitstream with libvorbis follows roughly the following -steps: - -<ol> -<li>Frame the incoming bitstream into pages -<li>Sort the pages by logical bitstream and buffer then into logical streams -<li>Decompose the logical streams into raw packets -<li>Reconstruct segments of the original data from each packet -<li>Glue the reconstructed segments back into a decoded stream -</ol> - -<h3>Framing</h3> - -An Ogg bitstream is logically arranged into pages, but to decode -the pages, we have to find them first. The raw bitstream is first fed -into an <tt>ogg_sync_state</tt> buffer using <tt>ogg_sync_buffer()</tt> -and <tt>ogg_sync_wrote()</tt>. After each block we submit to the sync -buffer, we should check to see if we can frame and extract a complete -page or pages using <tt>ogg_sync_pageout()</tt>. Extra pages are -buffered; allowing them to build up in the <tt>ogg_sync_state</tt> -buffer will eventually exhaust memory.<p> - -The Ogg pages returned from <tt>ogg_sync_pageout</tt> need not be -decoded further to be used as landmarks in seeking; seeking can be -either a rough process of simply jumping to approximately intuited -portions of the bitstream, or it can be a precise bisection process -that captures pages and inspects data position. When seeking, -however, sequential multiplexing (chaining) must be accounted for; -beginning play in a new logical bitstream requires initializing a -synthesis engine with the headers from that bitstream. Vorbis -bitstreams do not make use of concurent multiplexing (grouping).<p> - -<h3>Sorting</h3> - -The pages produced by <tt>ogg_sync_pageout</tt> are then sorted by -serial number to seperate logical bitstreams. Initialize logical -bitstream buffers (<tt>og_stream_state</tt>) using -<tt>ogg_stream_init()</tt>. Pages are submitted to the matching -logical bitstream buffer using <tt>ogg_stream_pagein</tt>; the serial -number of the page and the stream buffer must match, or the page will -be rejected. A page submitted out of sequence will simply be noted, -and in the course of outputting packets, the hole will be flagged -(<tt>ogg_sync_pageout</tt> and <tt>ogg_stream_packetout</tt> will -return a negative value at positions where they had to recapture the -stream). - -<h3>Extracting packets</h3> - -After submitting page[s] to a logical stream, read available packets -using <tt>ogg_stream_packetout</tt>. - -<h3>Decoding packets</h3> - -<h3>Reassembling data segments</h3> - - -<h2>Ogg Bitstream Manipulation Structures</h3> - -Two of the Ogg bitstream data structures are intended to be -transparent to the developer; the fields should be used directly.<p> - -<h3>ogg_packet</h3> - -<pre> -typedef struct { - unsigned char *packet; - long bytes; - long b_o_s; - long e_o_s; - - size64 frameno; - -} ogg_packet; -</pre> - -<dl> -<dt>packet: <dd>a pointer to the byte data of the raw packet -<dt>bytes: <dd>the size of the packet' raw data -<dt>b_o_s: <dd>beginning of stream; nonzero if this is the first packet of - the logical bitstream -<dt>e_o_s: <dd>end of stream; nonzero if this is the last packet of the - logical bitstream -<dt>frameno: <dd>the absolute position of this packet in the original - uncompressed data stream. -</dl> - -<h4>encoding notes</h4> The encoder is responsible for setting all of -the fields of the packet to appropriate values before submission to -<tt>ogg_stream_packetin()</tt>; however, it is noted that the value in -<tt>b_o_s</tt> is ignored; the first page produced from a given -<tt>ogg_stream_state</tt> structure will be stamped as the initial -page. <tt>e_o_s</tt>, however, must be set; this is the means by -which the stream encoding primitives handle end of stream and cleanup. - -<h4>decoding notes</h4><tt>ogg_stream_packetout()</tt> sets the fields -to appropriate values. Note that frameno will be >= 0 only in the -case that the given packet actually represents that position (ie, only -the last packet completed on any page will have a meaningful -<tt>frameno</tt>). Intervening frames will see <tt>frameno</tt> set -to -1. - -<h3>ogg_page</h3> - -<pre> -typedef struct { - unsigned char *header; - long header_len; - unsigned char *body; - long body_len; -} ogg_page; -</pre> - -<dl> -<dt>header: <dd>pointer to the page header data -<dt>header_len: <dd>length of the page header in bytes -<dt>body: <dd>pointer to the page body -<dt>body_len: <dd>length of the page body -</dl> - -Note that although the <tt>header</tt> and <tt>body</tt> pointers do -not necessarily point into a single contiguous page vector, the page -body must immediately follow the header in the bitstream.<p> - -<h2>Ogg Bitstream Manipulation Functions</h3> - -<h3> -int ogg_page_bos(ogg_page *og); -</h3> - -Returns the 'beginning of stream' flag for the given Ogg page. The -beginning of stream flag is set on the initial page of a logical -bitstream.<P> - -Zero indicates the flag is cleared (this is not the initial page of a -logical bitstream). Nonzero indicates the flag is set (this is the -initial page of a logical bitstream).<p> - -<h3> -int ogg_page_continued(ogg_page *og); -</h3> - -Returns the 'packet continued' flag for the given Ogg page. The packet -continued flag indicates whether or not the body data of this page -begins with packet continued from a preceeding page.<p> -Zero (unset) indicates that the body data begins with a new packet. -Nonzero (set) indicates that the first packet data on the page is a -continuation from the preceeding page. - -<h3> -int ogg_page_eos(ogg_page *og); -</h3> - -Returns the 'end of stream' flag for a give Ogg page. The end of page -flag is set on the last (terminal) page of a logical bitstream.<p> - -Zero (unset) indicates that this is not the last page of a logical -bitstream. Nonzero (set) indicates that this is the last page of a -logical bitstream and that no addiitonal pages belonging to this -bitstream may follow.<p> - -<h3> -size64 ogg_page_frameno(ogg_page *og); -</h3> - -Returns the position of this page as an absolute position within the -original uncompressed data. The position, as returned, is 'frames -encoded to date up to and including the last whole packet on this -page'. Partial packets begun on this page but continued to the -following page are not included. If no packet ends on this page, the -frame position value will be equal to the frame position value of the -preceeding page. If none of the original uncompressed data is yet -represented in the logical bitstream (for example, the first page of a -bitstream consists only of a header packet; this packet encodes only -metadata), the value shall be zero.<p> - -The units of the framenumber are determined by media mapping. A -vorbis audio bitstream, for example, defines one frame to be the -channel values from a single sampling period (eg, a 16 bit stereo -bitstream consists of two samples of two bytes for a total of four -bytes, thus a frame would be four bytes). A video stream defines one -frame to be a single frame of video.<p> - -<h3> -int ogg_page_pageno(ogg_page *og); -</h3> - -Returns the sequential page number of the given Ogg page. The first -page in a logical bitstream is numbered zero; following pages are -numbered in increasing monotonic order.<p> - -<h3> -int ogg_page_serialno(ogg_page *og); -</h3> - -Returns the serial number of the given Ogg page. The serial number is -used as a handle to distinguish various logical bitstreams in a -physical Ogg bitstresm. Every logical bitstream within a -physical bitstream must use a unique (within the scope of the physical -bitstream) serial number, which is stamped on all bitstream pages.<p> - -<h3> -int ogg_page_version(ogg_page *og); -</h3> - -Returns the revision of the Ogg bitstream structure of the given page. -Currently, the only permitted number is zero. Later revisions of the -bitstream spec will increment this version should any changes be -incompatable.</p> - -<h3> -int ogg_stream_clear(ogg_stream_state *os); -</h3> - -Clears and deallocates the internal storage of the given Ogg stream. -After clearing, the stream structure is not initialized for use; -<tt>ogg_stream_init</tt> must be called to reinitialize for use. -Use <tt>ogg_stream_reset</tt> to reset the stream state -to a fresh, intiialized state.<p> - -<tt>ogg_stream_clear</tt> does not call <tt>free()</tt> on the pointer -<tt>os</tt>, allowing use of this call on stream structures in static -or automatic storage. <tt>ogg_stream_destroy</tt>is a complimentary -function that frees the pointer as well.<p> - -Returns zero on success and non-zero on failure. This function always -succeeds.<p> - -<h3> -int ogg_stream_destroy(ogg_stream_state *os); -</h3> - -Clears and deallocates the internal storage of the given Ogg stream, -then frees the storage associated with the pointer <tt>os</tt>.<p> - -<tt>ogg_stream_clear</tt> does not call <tt>free()</tt> on the pointer -<tt>os</tt>, allowing use of that call on stream structures in static -or automatic storage.<p> - -Returns zero on success and non-zero on failure. This function always -succeeds.<p> - -<h3> -int ogg_stream_init(ogg_stream_state *os,int serialno); -</h3> - -Initialize the storage associated with <tt>os</tt> for use as an Ogg -stream. This call is used to initialize a stream for both encode and -decode. The given serial number is the serial number that will be -stamped on pages of the produced bitstream (during encode), or used as -a check that pages match (during decode).<p> - -Returns zero on success, nonzero on failure.<p> - -<h3> -int ogg_stream_packetin(ogg_stream_state *os, ogg_packet *op); -</h3> - -Used during encoding to add the given raw packet to the given Ogg -bitstream. The contents of <tt>op</tt> are copied; -<tt>ogg_stream_packetin</tt> does not retain any pointers into -<tt>op</tt>'s storage. The encoding proccess buffers incoming packets -until enough packets have been assembled to form an entire page; -<tt>ogg_stream_pageout</tt> is used to read complete pages.<p> - -Returns zero on success, nonzero on failure.<p> - -<h3> -int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op); -</h3> - -Used during decoding to read raw packets from the given logical -bitstream. <tt>ogg_stream_packetout</tt> will only return complete -packets for which checksumming indicates no corruption. The size and -contents of the packet exactly match those given in the encoding -process. <p> - -Returns zero if the next packet is not ready to be read (not buffered -or incomplete), positive if it returned a complete packet in -<tt>op</tt> and negative if there is a gap, extra bytes or corruption -at this position in the bitstream (essentially that the bitstream had -to be recaptured). A negative value is not necessarily an error. It -would be a common occurence when seeking, for example, which requires -recapture of the bitstream at the position decoding continued.<p> - -Iff the return value is positive, <tt>ogg_stream_packetout</tt> placed -a packet in <tt>op</tt>. The data in <t>op</tt> points to static -storage that is valid until the next call to -<tt>ogg_stream_pagein</tt>, <tt>ogg_stream_clear</tt>, -<tt>ogg_stream_reset</tt>, or <tt>ogg_stream_destroy</tt>. The -pointers are not invalidated by more calls to -<tt>ogg_stream_packetout</tt>.<p> - -<h3> -int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og); -</h3> - -Used during decoding to buffer the given complete, pre-verified page -for decoding into raw Ogg packets. The given page must be framed, -normally produced by <tt>ogg_sync_pageout</tt>, and from the logical -bitstream associated with <tt>os</tt> (the serial numbers must match). -The contents of the given page are copied; <tt>ogg_stream_pagein</tt> -retains no pointers into <tt>og</tt> storage.<p> - -Returns zero on success and non-zero on failure.<p> - -<h3> -int ogg_stream_pageout(ogg_stream_state *os, ogg_page *og); -</h3> - -Used during encode to read complete pages from the stream buffer. The -returned page is ready for sending out to the real world.<p> - -Returns zero if there is no complete page ready for reading. Returns -nonzero when it has placed data for a complete page into -<tt>og</tt>. Note that the storage returned in og points into internal -storage; the pointers in <tt>og</tt> are valid until the next call to -<tt>ogg_stream_pageout</tt>, <tt>ogg_stream_packetin</tt>, -<tt>ogg_stream_reset</tt>, <tt>ogg_stream_clear</tt> or -<tt>ogg_stream_destroy</tt>. - -<h3> -int ogg_stream_reset(ogg_stream_state *os); -</h3> - -Resets the given stream's state to that of a blank, unused stream; -this may be used during encode or decode. <p> - -Note that if used during encode, it does not alter the stream's serial -number. In addition, the next page produced during encoding will be -marked as the 'initial' page of the logical bitstream.<p> - -When used during decode, this simply clears the data buffer of any -pending pages. Beginning and end of stream cues are read from the -bitstream and are unaffected by reset.<p> - -Returns zero on success and non-zero on failure. This function always -succeeds.<p> - -<h3> -char *ogg_sync_buffer(ogg_sync_state *oy, long size); -</h3> - -This call is used to buffer a raw bitstream for framing and -verification. <tt>ogg_sync_buffer</tt> handles stream capture and -recapture, checksumming, and division into Ogg pages (as required by -<tt>ogg_stream_pagein</tt>).<p> - -<tt>ogg_sync_buffer</tt> exposes a buffer area into which the decoder -copies the next (up to) <tt>size</tt> bytes. We expose the buffer -(rather than taking a buffer) in order to avoid an extra copy many -uses; this way, for example, <tt>read()</tt> can transfer data -directly into the stream buffer without first needing to place it in -temporary storage.<p> - -Returns a pointer into <tt>oy</tt>'s internal bitstream sync buffer; -the remaining space in the sync buffer is at least <tt>size</tt> -bytes. The decoder need not write all of <tt>size</tt> bytes; -<tt>ogg_sync_wrote</tt> is used to inform the engine how many bytes -were actually written. Use of <tt>ogg_sync_wrote</tt> after writing -into the exposed buffer is mandantory.<p> - -<h3> -int ogg_sync_clear(ogg_sync_state *oy); -</h3> - -<tt>ogg_sync_clear</tt> - -Clears and deallocates the internal storage of the given Ogg sync -buffer. After clearing, the sync structure is not initialized for -use; <tt>ogg_sync_init</tt> must be called to reinitialize for use. -Use <tt>ogg_sync_reset</tt> to reset the sync state and buffer to a -fresh, intiialized state.<p> - -<tt>ogg_sync_clear</tt> does not call <tt>free()</tt> on the pointer -<tt>oy</tt>, allowing use of this call on sync structures in static -or automatic storage. <tt>ogg_sync_destroy</tt>is a complimentary -function that frees the pointer as well.<p> - -Returns zero on success and non-zero on failure. This function always -succeeds.<p> - -<h3> -int ogg_sync_destroy(ogg_sync_state *oy); -</h3> - -Clears and deallocates the internal storage of the given Ogg sync -buffer, then frees the storage associated with the pointer -<tt>oy</tt>.<p> - -<tt>ogg_sync_clear</tt> does not call <tt>free()</tt> on the pointer -<tt>oy</tt>, allowing use of that call on stream structures in static -or automatic storage.<p> - -Returns zero on success and non-zero on failure. This function always -succeeds.<p> - -<h3> -int ogg_sync_init(ogg_sync_state *oy); -</h3> - -Initializes the sync buffer <tt>oy</tt> for use.<p> -Returns zero on success and non-zero on failure. This function always -succeeds.<p> - -<h3> -int ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og); -</h3> - -Reads complete, framed, verified Ogg pages from the sync buffer, -placing the page data in <tt>og</tt>.<p> - -Returns zero when there's no complete pages buffered for -retrieval. Returns negative when a loss of sync or recapture occurred -(this is not necessarily an error; recapture would be required after -seeking, for example). Returns positive when a page is returned in -<tt>og</tt>. Note that the data in <tt>og</tt> points into the sync -buffer storage; the pointers are valid until the next call to -<tt>ogg_sync_buffer</tt>, <tt>ogg_sync_clear</tt>, -<tt>ogg_sync_destroy</tt> or <tt>ogg_sync_reset</tt>. - - -<h3> -int ogg_sync_reset(ogg_sync_state *oy); -</h3> - -<tt>ogg_sync_reset</tt> resets the sync state in <tt>oy</tt> to a -clean, empty state. This is useful, for example, when seeking to a -new location in a bitstream.<p> - -Returns zero on success, nonzero on failure.<p> - -<h3> -int ogg_sync_wrote(ogg_sync_state *oy, long bytes); -</h3> - -Used to inform the sync state as to how many bytes were actually -written into the exposed sync buffer. It must be equal to or less -than the size of the buffer requested.<p> - -Returns zero on success and non-zero on failure; failure occurs only -when the number of bytes written were larger than the buffer.<p> - -<hr> -<a href="http://www.xiph.org/"> -<img src="white-xifish.png" align=left border=0> -</a> -<font size=-2 color=#505050> - -Ogg is a <a href="http://www.xiph.org">Xiphophorus</a> effort to -protect essential tenets of Internet multimedia from corporate -hostage-taking; Open Source is the net's greatest tool to keep -everyone honest. See <a href="http://www.xiph.org/about.html">About -Xiphophorus</a> for details. -<p> - -Ogg Vorbis is the first Ogg audio CODEC. Anyone may -freely use and distribute the Ogg and Vorbis specification, -whether in a private, public or corporate capacity. However, -Xiphophorus and the Ogg project (xiph.org) reserve the right to set -the Ogg/Vorbis specification and certify specification compliance.<p> - -Xiphophorus's Vorbis software CODEC implementation is distributed -under the Lesser/Library GNU Public License. This does not restrict -third parties from distributing independent implementations of Vorbis -software under other licenses.<p> - -OggSquish, Vorbis, Xiphophorus and their logos are trademarks (tm) of -<a href="http://www.xiph.org/">Xiphophorus</a>. These pages are -copyright (C) 1994-2000 Xiphophorus. All rights reserved.<p> - -</body> - - - - - - diff --git a/doc/stream.png b/doc/stream.png Binary files differdeleted file mode 100644 index 6e9dca88..00000000 --- a/doc/stream.png +++ /dev/null diff --git a/doc/v-comment.html b/doc/v-comment.html deleted file mode 100644 index a425eb03..00000000 --- a/doc/v-comment.html +++ /dev/null @@ -1,194 +0,0 @@ -<HTML><HEAD><TITLE>xiph.org: Ogg Vorbis documentation</TITLE> -<BODY bgcolor="#ffffff" text="#202020" link="#006666" vlink="#000000"> -<nobr><img src="white-ogg.png"><img src="vorbisword2.png"></nobr><p> - - -<h1><font color=#000070> -Ogg Vorbis comment field specification -</font></h1> - -<em>Last update to this document: June 16, 2000</em><p> - -The text comment header is the second (of three) header packets that -begin a Vorbis bitstream. It is meant for short, text comments, -not arbitrary metadata; arbitrary metadata belongs in a -metadata stream (usually an XML stream type).<p> - -<h2>Comment use rationale</h2> - - -The comment field is meant to be used much like someone jotting a -quick note on the bottom of a CDR. It should be a little information to -remember the disc by and explain it to others; a short, to-the-point -text note that need not only be a couple words, but isn't going to be -more than a short paragraph. The essentials, in other words, whatever -they turn out to be, eg: - -<blockquote> -"Honest Bob and the Factory-to-Dealer-Incentives, _I'm Still Around_, -opening for Moxy Fruvous, 1997" -</blockquote> - -<h2>Structure</h2> - -The comment header logically is a list of eight-bit-clean vectors; the -number of vectors is bounded to 2^32-1 and the length of each vector -is limited to 2^32-1 bytes. The vector length is encoded; the vector -is not null terminated. In addition to the vector list, there is a -single vector for vendor name (also 8 bit clean, length encoded in 32 -bits). Libvorbis currently sets the vendor string to "Xiphophorus -libVorbis I 20000508".<p> - -The comment vectors are structured similarly to a UNIX environment. -That is, comment fields consist of a field name and a field value and -look like: - -<pre> -comment[0]="ARTIST=me"; -comment[1]="TITLE=the sound of vorbis"; -</pre> - -<h2>Content vector format</h2> - -<ul> -<li>A case-insensitive field name that may consist of ASCII 0x20 through -0x7D, 0x3D ('=') excluded. ASCII 0x41 through 0x5A inclusive (A-Z) is -to be considered equivalent to ASCII 0x61 through 0x7A inclusive -(a-z). - -<li>The field name is immediately followed by ASCII 0x3D ('='); this -equals sign is used to terminate the field name. - -<li>0x3D is followed by 8 bit clean UTF-8 field contents to the end of -the field. -</ul> - -<h3>Field names</h3> - -Below is a proposed, minimal list of standard filed names with a -description of intended use. No single or group of field names is -mandatory; a comment header may contain one, all or none of the names -in this list. -<dl> -<dt>TITLE<dd>Track name - -<dt>VERSION<dd>The version field may be used to differentiate multiple version of the same track title in a single collection. - -<dt>ALBUM<dd>The collection name to which this track belongs - -<dt>ARTIST<dd>Track performer - -<dt>ORGANIZATION<dd>Name of the organization producing the track (ie, -the 'record label') - -<dt>DESCRIPTION<dd>A short text description of the contents - -<dt>GENRE<dd>A short text indication of music genre - -<dt>DATE<dd>Date the track was recorded - -<dt>LOCATION<dd>Location where track was recorded - -<dt>COPYRIGHT<dd>Copyright information -</dl> - -<h3>Implications</h3> -<ul> -<li> -Field names should not be 'internationalized'; this is a -concession to simplicity not an attempt to exclude the majority of -the world that doesn't speak English. Field *contents*, however, -are represented in UTF-8 to allow easy representation of any language. -<li> -We have the length of the entirety of the field and restrictions on -the field name so that the field name is bounded in a known way. Thus -we also have the length of the field contents. -<li> -Individual 'vendors' may use non-standard field names within -reason. The proper use of comment fields should be clear through -context at this point. Abuse will be discouraged. -<li> -There is no vendor-specific prefix to 'nonstandard' field names. -Vendors should make some effort to avoid arbitrarily polluting the -common namespace. -<li> -Field names are not required to be unique (occur once) within a -comment header. As an example, assume a track was recorded by three -well know artists; the following is permissible: -<pre> - ARTIST=Dizzy Gillespie - ARTIST=Sonny Rollins - ARTIST=Sonny Stitt -</pre> - -</ul> - -<h2>Encoding</h2> - -The comment header comprises the entirety of the second bitstream -header packet. Unlike the first bitstream header packet, it is not -generally the only packet on the second page and may not be restricted -to within the second bitstream page. The length of the comment header -packet is [practically] unbounded. The comment header packet is not -optional; it must be present in the bitstream even if it is -effectively empty.<p> - -The comment header is encoded as follows (as per Ogg's standard -bitstream mapping which renders least-significant-bit of the word to be -coded into the least significant available bit of the current -bitstream octet first): - -<ol> -<li> -Vendor string length (32 bit unsigned quantity specifying number of octets) - -<li> -Vendor string ([vendor string length] octets coded from beginning of string to end of string, not null terminated) - -<li>Number of comment fields (32 bit unsigned quantity specifying number of fields) - -<li>Comment field 0 length (if [Number of comment fields]>0; 32 bit unsigned quantity specifying number of octets) - -<li> -Comment field 0 ([Comment field 0 length] octets coded from beginning of string to end of string, not null terminated) - -<li>Comment field 1 length (if [Number of comment fields]>1...)... -</ol> - -This is actually somewhat easier to describe in code; implementation of the above can be found in vorbis/lib/info.c:_vorbis_pack_comment(),_vorbis_unpack_comment() - -<hr> -<a href="http://www.xiph.org/"> -<img src="white-xifish.png" align=left border=0> -</a> -<font size=-2 color=#505050> - -Ogg is a <a href="http://www.xiph.org">Xiphophorus</a> effort to -protect essential tenets of Internet multimedia from corporate -hostage-taking; Open Source is the net's greatest tool to keep -everyone honest. See <a href="http://www.xiph.org/about.html">About -Xiphophorus</a> for details. -<p> - -Ogg Vorbis is the first Ogg audio CODEC. Anyone may -freely use and distribute the Ogg and Vorbis specification, -whether in a private, public or corporate capacity. However, -Xiphophorus and the Ogg project (xiph.org) reserve the right to set -the Ogg/Vorbis specification and certify specification compliance.<p> - -Xiphophorus's Vorbis software CODEC implementation is distributed -under the Lesser/Library GNU Public License. This does not restrict -third parties from distributing independent implementations of Vorbis -software under other licenses.<p> - -OggSquish, Vorbis, Xiphophorus and their logos are trademarks (tm) of -<a href="http://www.xiph.org/">Xiphophorus</a>. These pages are -copyright (C) 1994-2000 Xiphophorus. All rights reserved.<p> - -</body> - - - - - - diff --git a/doc/vorbis.html b/doc/vorbis.html deleted file mode 100644 index 27e3a5b0..00000000 --- a/doc/vorbis.html +++ /dev/null @@ -1,196 +0,0 @@ -<HTML><HEAD><TITLE>xiph.org: Ogg Vorbis documentation</TITLE> -<BODY bgcolor="#ffffff" text="#202020" link="#006666" vlink="#000000"> -<nobr><img src="white-ogg.png"><img src="vorbisword2.png"></nobr><p> - - -<h1><font color=#000070> -Ogg Vorbis encoding format documentation -</font></h1> - -<em>Last update to this document: July 15, 1999</em><br> -<em>Last update to Vorbis documentation: July 21, 1999</em><p> - -<table><tr><td> -<img src=wait.png> -</td><td valign=center> -As of writing, not all the below document -links are live. They will be populated as we complete the -documents. -</td></tr></table> - -<p> -<h2>Documents</h2> -<ul> -<li><a href="packet.html">Vorbis packet structure</a> -<li><a href="envelope.html">Temporal envelope shaping and blocksize</a> -<li><a href="mdct.html">Time domain segmentation and MDCT transform</a> -<li><a href="resolution.html">The resolution floor</a> -<li><a href="residuals.html">MDCT-domain fine structure</a><p> - -<li><a href="probmodel.html">The Vorbis probability model</a> - -<li><a href="bitpack.html">The Vorbis bitpacker</a><p> - -<li><a href="oggstream.html">Ogg bitstream overview</a> -<li><a href="framing.html">Ogg logical bitstream and framing spec</a> -<li><a href="vorbis-stream.html">Vorbis packet->Ogg bitstream - mapping</a><p> - -<li><a href="programming.html">Programming with libvorbis</a><p> -</ul> - -<h2>Description</h2> -Ogg Vorbis is a general purpose compressed audio format -for high quality (44.1-48.0kHz, 16+ bit, polyphonic) audio and music -at moderate fixed and variable bitrates (40-80 kb/s/channel). This -places Vorbis in the same class as audio representations including -MPEG-1 audio layer 3, MPEG-4 audio (AAC and TwinVQ), and PAC.<p> - -Vorbis is the first of a planned family of Ogg multimedia coding -formats being developed as part of Xiphophorus's Ogg multimedia -project. See <a href="http://www.xiph.org/">http://www.xiph.org/</a> -for more information. - -<h2>Vorbis technical documents</h2> - -A Vorbis encoder takes in overlapping (but contiguous) short-time -segments of audio data. The encoder analyzes the content of the audio -to determine an optimal compact representation; this phase of encoding -is known as <em>analysis</em>. For each short-time block of sound, -the encoder then packs an efficient representation of the signal, as -determined by analysis, into a raw packet much smaller than the size -required by the original signal; this phase is <em>coding</em>. -Lastly, in a streaming environment, the raw packets are then -structured into a continuous stream of octets; this last phase is -<em>streaming</em>. Note that the stream of octets is referred to both -as a 'byte-' and 'bit-'stream; the latter usage is acceptible as the -stream of octets is a physical representation of a true logical -bit-by-bit stream.<p> - -A Vorbis decoder performs a mirror image process of extracting the -original sequence of raw packets from an Ogg stream (<em>stream -decomposition</em>), reconstructing the signal representation from the -raw data in the packet (<em>decoding</em>) and them reconstituting an -audio signal from the decoded representation (<em>synthesis</em>).<p> - -The <a href="programming.html">Programming with libvorbis</a> -documents discuss use of the reference Vorbis codec library -(libvorbis) produced by Xiphophorus.<p> - -The data representations and algorithms necessary at each step to -encode and decode Ogg Vorbis bitstreams are described by the below -documents in sufficient detail to construct a complete Vorbis codec. -Note that at the time of writing, Vorbis is still in a 'Request For -Comments' stage of development; despite being in advanced stages of -development, input from the multimedia community is welcome.<p> - -<h3>Vorbis analysis and synthesis</h3> - -Analysis begins by seperating an input audio stream into individual, -overlapping short-time segments of audio data. These segments are -then transformed into an alternate representation, seeking to -represent the original signal in a more efficient form that codes into -a smaller number of bytes. The analysis and transformation stage is -the most complex element of producing a Vorbis bitstream.<p> - -The corresponding synthesis step in the decoder is simpler; there is -no analysis to perform, merely a mechanical, deterministic -reconstruction of the original audio data from the transform-domain -representation.<p> - -<ul> -<li><a href="packet.html">Vorbis packet structure</a>: Describes the basic analysis components necessary to produce Vorbis packets and the structure of the packet itself. -<li><a href="envelope.html">Temporal envelope shaping and blocksize</a>: Use of temporal envelope shaping and variable blocksize to minimize time-domain energy leakage during wide dynamic range and spectral energy swings. Also discusses time-related principles of psychoacoustics. -<li><a href="mdct.html">Time domain segmentation and MDCT transform</a>: Division of time domain data into individual overlapped, windowed short-time vectors and transformation using the MDCT -<li><a href="resolution.html">The resolution floor</a>: Use of frequency doamin psychoacoustics, and the MDCT-domain noise, masking and resolution floors -<li><a href="residuals.html">MDCT-domain fine structure</a>: Production, quantization and massaging of MDCT-spectrum fine structure -</ul> - -<h3>Vorbis coding and decoding</h3> - -Coding and decoding converts the transform-domain representation of -the original audio produced by analysis to and from a bitwise packed -raw data packet. Coding and decoding consist of two logically -orthogonal concepts, <em>back-end coding</em> and <em>bitpacking</em>.<p> - -<em>Back-end coding</em> uses a probability model to represent the raw numbers -of the audio representation in as few physical bits as possible; -familiar examples of back-end coding include Huffman coding and Vector -Quantization.<p> - -<em>Bitpacking</em> arranges the variable sized words of the back-end -coding into a vector of octets without wasting space. The octets -produced by coding a single short-time audio segment is one raw Vorbis -packet.<p> - -<ul> - -<li><a href="probmodel.html">The Vorbis probability model</a> - -<li><a href="bitpack.html">The Vorbis bitpacker</a>: Arrangement of -variable bit-length words into an octet-aligned packet. - -</ul> - -<h3>Vorbis streaming and stream decomposition</h3> - -Vorbis packets contain the raw, bitwise-compressed representation of a -snippet of audio. These packets contain no structure and cannot be -strung together directly into a stream; for streamed transmission and -storage, Vorbis packets are encoded into an Ogg bitstream.<p> - -<ul> - -<li><a href="oggstream.html">Ogg bitstream overview</a>: High-level -description of Ogg logical bitstreams, how logical bitstreams -(of mixed media types) can be combined into physical bitstreams, and -restrictions on logical-to-physical mapping. Note that this document is -not specific only to Ogg Vorbis. - -<li><a href="framing.html">Ogg logical bitstream and framing -spec</a>: Low level, complete specification of Ogg logical -bitstream pages. Note that this document is not specific only to Ogg -Vorbis. - -<li><a href="vorbis-stream.html">Vorbis bitstream mapping</a>: -Specifically describes mapping Vorbis data into an -Ogg physical bitstream. - -</ul> - - -<hr> -<a href="http://www.xiph.org/"> -<img src="white-xifish.png" align=left border=0> -</a> -<font size=-2 color=#505050> - -Ogg is a <a href="http://www.xiph.org">Xiphophorus</a> effort to -protect essential tenets of Internet multimedia from corporate -hostage-taking; Open Source is the net's greatest tool to keep -everyone honest. See <a href="http://www.xiph.org/about.html">About -Xiphophorus</a> for details. -<p> - -Ogg Vorbis is the first Ogg audio CODEC. Anyone may -freely use and distribute the Ogg and Vorbis specification, -whether in a private, public or corporate capacity. However, -Xiphophorus and the Ogg project (xiph.org) reserve the right to set -the Ogg/Vorbis specification and certify specification compliance.<p> - -Xiphophorus's Vorbis software CODEC implementation is distributed -under the Lesser/Library GNU Public License. This does not restrict -third parties from distributing independent implementations of Vorbis -software under other licenses.<p> - -OggSquish, Vorbis, Xiphophorus and their logos are trademarks (tm) of -<a href="http://www.xiph.org/">Xiphophorus</a>. These pages are -copyright (C) 1994-2000 Xiphophorus. All rights reserved.<p> - -</body> - - - - - - diff --git a/doc/vorbisword2.png b/doc/vorbisword2.png Binary files differdeleted file mode 100644 index 12e3d316..00000000 --- a/doc/vorbisword2.png +++ /dev/null diff --git a/doc/wait.png b/doc/wait.png Binary files differdeleted file mode 100644 index 2d10af60..00000000 --- a/doc/wait.png +++ /dev/null diff --git a/doc/white-ogg.png b/doc/white-ogg.png Binary files differdeleted file mode 100644 index 45dc0acd..00000000 --- a/doc/white-ogg.png +++ /dev/null diff --git a/doc/white-xifish.png b/doc/white-xifish.png Binary files differdeleted file mode 100644 index ab25cc8f..00000000 --- a/doc/white-xifish.png +++ /dev/null diff --git a/examples/Makefile.in b/examples/Makefile.in deleted file mode 100644 index 8683e279..00000000 --- a/examples/Makefile.in +++ /dev/null @@ -1,87 +0,0 @@ -# vorbis makefile configured for use with gcc on any platform - -# $Id: Makefile.in,v 1.13 2000/08/15 11:53:18 xiphmont Exp $ - -############################################################################### -# # -# To build a production vorbis (preferrably using gmake), just type 'make'. # -# To build with debugging or profiling information, use 'make debug' or # -# 'make profile' respectively. 'make clean' is a good idea between builds # -# with different target names, or before a final build. # -# # -############################################################################### - - -# DO NOT EDIT BELOW! ########################################################## -# (unless, of course, you know what you are doing :) ########################## - -@SET_MAKE@ -FLAGS=-I. -I../include @CFLAGS@ -OPT=@OPT@ $(FLAGS) -DEBUG=@DEBUG@ $(FLAGS) -PROFILE=@PROFILE@ $(FLAGS) -CC=@CC@ -LD=@CC@ -LDFLAGS=@LDFLAGS@ $(FLAGS) -AR=@AR@ -RANLIB=@RANLIB@ -LIBS=@LIBS@ - -HFILES = ../include/vorbis/codec.h ../include/vorbis/vorbisfile.h \ - ../include/vorbis/internal.h ../include/vorbis/backends.h \ - ../include/vorbis/codebook.h -OFILES = encoder_example.o decoder_example.o chaining_example.o \ - vorbisfile_example.o seeking_test.o -BINFILES = encoder_example decoder_example chaining_example \ - vorbisfile_example seeking_test - -all: - $(MAKE) target CFLAGS="$(OPT)" - -debug: - $(MAKE) target CFLAGS="$(DEBUG)" - -profile: - $(MAKE) target CFLAGS="$(PROFILE)" - -target: $(BINFILES) - -encoder_example.o: ../include/vorbis/modes.h - -encoder_example: $(OFILES) ../lib/libvorbis.a - $(CC) $(CFLAGS) $(LDFLAGS) encoder_example.o ../lib/libvorbis.a -o \ - encoder_example $(LIBS) - -decoder_example: $(OFILES) ../lib/libvorbis.a - $(CC) $(CFLAGS) $(LDFLAGS) decoder_example.o ../lib/libvorbis.a -o \ - decoder_example $(LIBS) - -chaining_example: $(OFILES) ../lib/libvorbis.a ../lib/vorbisfile.a - $(CC) $(CFLAGS) $(LDFLAGS) chaining_example.o \ - ../lib/vorbisfile.a ../lib/libvorbis.a \ - -o chaining_example $(LIBS) -vorbisfile_example: $(OFILES) ../lib/libvorbis.a ../lib/vorbisfile.a - $(CC) $(CFLAGS) $(LDFLAGS) vorbisfile_example.o \ - ../lib/vorbisfile.a ../lib/libvorbis.a \ - -o vorbisfile_example $(LIBS) - -seeking_test: $(OFILES) ../lib/libvorbis.a ../lib/vorbisfile.a - $(CC) $(CFLAGS) $(LDFLAGS) seeking_test.o \ - ../lib/vorbisfile.a ../lib/libvorbis.a \ - -o seeking_test $(LIBS) - -selftest: - -$(OFILES): $(HFILES) - -.c.o: - $(CC) $(CFLAGS) -c $< - -clean: - -rm -f *.o *.a test* *~ *.out ogg config.* \ - encoder_example decoder_example chaining_example \ - vorbisfile_example seeking_test - -distclean: clean - -rm -f Makefile - diff --git a/examples/chaining_example.c b/examples/chaining_example.c deleted file mode 100644 index 445c9a35..00000000 --- a/examples/chaining_example.c +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: illustrate simple use of chained bitstream and vorbisfile.a - last mod: $Id: chaining_example.c,v 1.5 2000/06/14 10:13:35 xiphmont Exp $ - - ********************************************************************/ - -#include "vorbis/codec.h" -#include "vorbis/vorbisfile.h" -#include "../lib/misc.h" - -int main(){ - OggVorbis_File ov; - int i; - - /* open the file/pipe on stdin */ - if(ov_open(stdin,&ov,NULL,-1)==-1){ - printf("Could not open input as an OggVorbis file.\n\n"); - exit(1); - } - - /* print details about each logical bitstream in the input */ - if(ov_seekable(&ov)){ - printf("Input bitstream contained %ld logical bitstream section(s).\n", - ov_streams(&ov)); - printf("Total bitstream playing time: %ld seconds\n\n", - (long)ov_time_total(&ov,-1)); - - }else{ - printf("Standard input was not seekable.\n" - "First logical bitstream information:\n\n"); - } - - for(i=0;i<ov_streams(&ov);i++){ - vorbis_info *vi=ov_info(&ov,i); - printf("\tlogical bitstream section %d information:\n",i+1); - printf("\t\t%ldHz %d channels bitrate %ldkbps serial number=%ld\n", - vi->rate,vi->channels,ov_bitrate(&ov,i)/1000, - ov_serialnumber(&ov,i)); - printf("\t\tcompressed length: %ld bytes ",(long)(ov_raw_total(&ov,i))); - printf(" play time: %lds\n",(long)ov_time_total(&ov,i)); - } - - ov_clear(&ov); - return 0; -} - - - - - - - - - - - - - diff --git a/examples/decoder_example.c b/examples/decoder_example.c deleted file mode 100644 index a8b6a19a..00000000 --- a/examples/decoder_example.c +++ /dev/null @@ -1,299 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: simple example decoder - last mod: $Id: decoder_example.c,v 1.12 2000/08/30 06:09:21 xiphmont Exp $ - - ********************************************************************/ - -/* Takes a vorbis bitstream from stdin and writes raw stereo PCM to - stdout. Decodes simple and chained OggVorbis files from beginning - to end. Vorbisfile.a is somewhat more complex than the code below. */ - -/* Note that this is POSIX, not ANSI code */ - -#include <stdio.h> -#include <stdlib.h> -#include <math.h> -#include "vorbis/codec.h" - -#ifdef _WIN32 /* We need the following two to set stdin/stdout to binary */ -#include <io.h> -#include <fcntl.h> -#endif - -#if defined(macintosh) && defined(__MWERKS__) -#include <console.h> /* CodeWarrior's Mac "command-line" support */ -#endif - -ogg_int16_t convbuffer[4096]; /* take 8k out of the data segment, not the stack */ -int convsize=4096; - -int main(int argc, char **argv){ - ogg_sync_state oy; /* sync and verify incoming physical bitstream */ - ogg_stream_state os; /* take physical pages, weld into a logical - stream of packets */ - ogg_page og; /* one Ogg bitstream page. Vorbis packets are inside */ - ogg_packet op; /* one raw packet of data for decode */ - - vorbis_info vi; /* struct that stores all the static vorbis bitstream - settings */ - vorbis_comment vc; /* struct that stores all the bitstream user comments */ - vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */ - vorbis_block vb; /* local working space for packet->PCM decode */ - - char *buffer; - int bytes; - -#ifdef _WIN32 /* We need to set stdin/stdout to binary mode. Damn windows. */ - /* Beware the evil ifdef. We avoid these where we can, but this one we - cannot. Don't add any more, you'll probably go to hell if you do. */ - _setmode( _fileno( stdin ), _O_BINARY ); - _setmode( _fileno( stdout ), _O_BINARY ); -#endif - -#if defined(macintosh) && defined(__MWERKS__) - - argc = ccommand(&argv); /* get a "command line" from the Mac user */ - /* this also lets the user set stdin and stdout */ -#endif - - /********** Decode setup ************/ - - ogg_sync_init(&oy); /* Now we can read pages */ - - while(1){ /* we repeat if the bitstream is chained */ - int eos=0; - int i; - - /* grab some data at the head of the stream. We want the first page - (which is guaranteed to be small and only contain the Vorbis - stream initial header) We need the first page to get the stream - serialno. */ - - /* submit a 4k block to libvorbis' Ogg layer */ - buffer=ogg_sync_buffer(&oy,4096); - bytes=fread(buffer,1,4096,stdin); - ogg_sync_wrote(&oy,bytes); - - /* Get the first page. */ - if(ogg_sync_pageout(&oy,&og)!=1){ - /* have we simply run out of data? If so, we're done. */ - if(bytes<4096)break; - - /* error case. Must not be Vorbis data */ - fprintf(stderr,"Input does not appear to be an Ogg bitstream.\n"); - exit(1); - } - - /* Get the serial number and set up the rest of decode. */ - /* serialno first; use it to set up a logical stream */ - ogg_stream_init(&os,ogg_page_serialno(&og)); - - /* extract the initial header from the first page and verify that the - Ogg bitstream is in fact Vorbis data */ - - /* I handle the initial header first instead of just having the code - read all three Vorbis headers at once because reading the initial - header is an easy way to identify a Vorbis bitstream and it's - useful to see that functionality seperated out. */ - - vorbis_info_init(&vi); - vorbis_comment_init(&vc); - if(ogg_stream_pagein(&os,&og)<0){ - /* error; stream version mismatch perhaps */ - fprintf(stderr,"Error reading first page of Ogg bitstream data.\n"); - exit(1); - } - - if(ogg_stream_packetout(&os,&op)!=1){ - /* no page? must not be vorbis */ - fprintf(stderr,"Error reading initial header packet.\n"); - exit(1); - } - - if(vorbis_synthesis_headerin(&vi,&vc,&op)<0){ - /* error case; not a vorbis header */ - fprintf(stderr,"This Ogg bitstream does not contain Vorbis " - "audio data.\n"); - exit(1); - } - - /* At this point, we're sure we're Vorbis. We've set up the logical - (Ogg) bitstream decoder. Get the comment and codebook headers and - set up the Vorbis decoder */ - - /* The next two packets in order are the comment and codebook headers. - They're likely large and may span multiple pages. Thus we reead - and submit data until we get our two pacakets, watching that no - pages are missing. If a page is missing, error out; losing a - header page is the only place where missing data is fatal. */ - - i=0; - while(i<2){ - while(i<2){ - int result=ogg_sync_pageout(&oy,&og); - if(result==0)break; /* Need more data */ - /* Don't complain about missing or corrupt data yet. We'll - catch it at the packet output phase */ - if(result==1){ - ogg_stream_pagein(&os,&og); /* we can ignore any errors here - as they'll also become apparent - at packetout */ - while(i<2){ - result=ogg_stream_packetout(&os,&op); - if(result==0)break; - if(result==-1){ - /* Uh oh; data at some point was corrupted or missing! - We can't tolerate that in a header. Die. */ - fprintf(stderr,"Corrupt secondary header. Exiting.\n"); - exit(1); - } - vorbis_synthesis_headerin(&vi,&vc,&op); - i++; - } - } - } - /* no harm in not checking before adding more */ - buffer=ogg_sync_buffer(&oy,4096); - bytes=fread(buffer,1,4096,stdin); - if(bytes==0 && i<2){ - fprintf(stderr,"End of file before finding all Vorbis headers!\n"); - exit(1); - } - ogg_sync_wrote(&oy,bytes); - } - - /* Throw the comments plus a few lines about the bitstream we're - decoding */ - { - char **ptr=vc.user_comments; - while(*ptr){ - fprintf(stderr,"%s\n",*ptr); - ++ptr; - } - fprintf(stderr,"\nBitstream is %d channel, %ldHz\n",vi.channels,vi.rate); - fprintf(stderr,"Encoded by: %s\n\n",vc.vendor); - } - - convsize=4096/vi.channels; - - /* OK, got and parsed all three headers. Initialize the Vorbis - packet->PCM decoder. */ - vorbis_synthesis_init(&vd,&vi); /* central decode state */ - vorbis_block_init(&vd,&vb); /* local state for most of the decode - so multiple block decodes can - proceed in parallel. We could init - multiple vorbis_block structures - for vd here */ - - /* The rest is just a straight decode loop until end of stream */ - while(!eos){ - while(!eos){ - int result=ogg_sync_pageout(&oy,&og); - if(result==0)break; /* need more data */ - if(result==-1){ /* missing or corrupt data at this page position */ - fprintf(stderr,"Corrupt or missing data in bitstream; " - "continuing...\n"); - }else{ - ogg_stream_pagein(&os,&og); /* can safely ignore errors at - this point */ - while(1){ - result=ogg_stream_packetout(&os,&op); - - if(result==0)break; /* need more data */ - if(result==-1){ /* missing or corrupt data at this page position */ - /* no reason to complain; already complained above */ - }else{ - /* we have a packet. Decode it */ - double **pcm; - int samples; - - if(vorbis_synthesis(&vb,&op)==0) /* test for success! */ - vorbis_synthesis_blockin(&vd,&vb); - /* - - **pcm is a multichannel double vector. In stereo, for - example, pcm[0] is left, and pcm[1] is right. samples is - the size of each channel. Convert the float values - (-1.<=range<=1.) to whatever PCM format and write it out */ - - while((samples=vorbis_synthesis_pcmout(&vd,&pcm))>0){ - int j; - int clipflag=0; - int bout=(samples<convsize?samples:convsize); - - /* convert doubles to 16 bit signed ints (host order) and - interleave */ - for(i=0;i<vi.channels;i++){ - ogg_int16_t *ptr=convbuffer+i; - double *mono=pcm[i]; - for(j=0;j<bout;j++){ - int val=mono[j]*32767.; - /* might as well guard against clipping */ - if(val>32767){ - val=32767; - clipflag=1; - } - if(val<-32768){ - val=-32768; - clipflag=1; - } - *ptr=val; - ptr+=2; - } - } - - if(clipflag) - fprintf(stderr,"Clipping in frame %ld\n",(long)(vd.sequence)); - - - fwrite(convbuffer,2*vi.channels,bout,stdout); - - vorbis_synthesis_read(&vd,bout); /* tell libvorbis how - many samples we - actually consumed */ - } - } - } - if(ogg_page_eos(&og))eos=1; - } - } - if(!eos){ - buffer=ogg_sync_buffer(&oy,4096); - bytes=fread(buffer,1,4096,stdin); - ogg_sync_wrote(&oy,bytes); - if(bytes==0)eos=1; - } - } - - /* clean up this logical bitstream; before exit we see if we're - followed by another [chained] */ - - ogg_stream_clear(&os); - - /* ogg_page and ogg_packet structs always point to storage in - libvorbis. They're never freed or manipulated directly */ - - vorbis_block_clear(&vb); - vorbis_dsp_clear(&vd); - vorbis_info_clear(&vi); /* must be called last */ - } - - /* OK, clean up the framer */ - ogg_sync_clear(&oy); - - fprintf(stderr,"Done.\n"); - return(0); -} - diff --git a/examples/encoder_example.c b/examples/encoder_example.c deleted file mode 100644 index 63ec66e1..00000000 --- a/examples/encoder_example.c +++ /dev/null @@ -1,187 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: simple example encoder - last mod: $Id: encoder_example.c,v 1.13 2000/08/15 14:01:02 xiphmont Exp $ - - ********************************************************************/ - -/* takes a stereo 16bit 44.1kHz WAV file from stdin and encodes it into - a Vorbis bitstream */ - -/* Note that this is POSIX, not ANSI, code */ - -#include <stdio.h> -#include <stdlib.h> -#include <time.h> -#include <math.h> -#include "vorbis/mode_C.h" - -#ifdef _WIN32 /* We need the following two to set stdin/stdout to binary */ -#include <io.h> -#include <fcntl.h> -#endif - -#if defined(macintosh) && defined(__MWERKS__) -#include <console.h> /* CodeWarrior's Mac "command-line" support */ -#endif - -#define READ 1024 -signed char readbuffer[READ*4+44]; /* out of the data segment, not the stack */ - -int main(){ - ogg_stream_state os; /* take physical pages, weld into a logical - stream of packets */ - ogg_page og; /* one Ogg bitstream page. Vorbis packets are inside */ - ogg_packet op; /* one raw packet of data for decode */ - - vorbis_info *vi; /* struct that stores all the static vorbis bitstream - settings */ - vorbis_comment vc; /* struct that stores all the user comments */ - - vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */ - vorbis_block vb; /* local working space for packet->PCM decode */ - - int eos=0; - -#if defined(macintosh) && defined(__MWERKS__) - int argc = 0; - char **argv = NULL; - argc = ccommand(&argv); /* get a "command line" from the Mac user */ - /* this also lets the user set stdin and stdout */ -#endif - - /* we cheat on the WAV header; we just bypass 44 bytes and never - verify that it matches 16bit/stereo/44.1kHz. This is just an - example, after all. */ - -#ifdef _WIN32 /* We need to set stdin/stdout to binary mode. Damn windows. */ - /* Beware the evil ifdef. We avoid these where we can, but this one we - cannot. Don't add any more, you'll probably go to hell if you do. */ - _setmode( _fileno( stdin ), _O_BINARY ); - _setmode( _fileno( stdout ), _O_BINARY ); -#endif - - - fread(readbuffer,1,44,stdin); - - /********** Encode setup ************/ - - /* choose an encoding mode */ - /* (mode 0: 44kHz stereo uncoupled, roughly 128kbps VBR) */ - vi=&info_C; - - /* add a comment */ - vorbis_comment_init(&vc); - vorbis_comment_add(&vc,"Track encoded by encoder_example.c"); - - /* set up the analysis state and auxiliary encoding storage */ - vorbis_analysis_init(&vd,vi); - vorbis_block_init(&vd,&vb); - - /* set up our packet->stream encoder */ - /* pick a random serial number; that way we can more likely build - chained streams just by concatenation */ - srand(time(NULL)); - ogg_stream_init(&os,rand()); - - /* Vorbis streams begin with three headers; the initial header (with - most of the codec setup parameters) which is mandated by the Ogg - bitstream spec. The second header holds any comment fields. The - third header holds the bitstream codebook. We merely need to - make the headers, then pass them to libvorbis one at a time; - libvorbis handles the additional Ogg bitstream constraints */ - - { - ogg_packet header; - ogg_packet header_comm; - ogg_packet header_code; - - vorbis_analysis_headerout(&vd,&vc,&header,&header_comm,&header_code); - ogg_stream_packetin(&os,&header); /* automatically placed in its own - page */ - ogg_stream_packetin(&os,&header_comm); - ogg_stream_packetin(&os,&header_code); - - /* no need to write out here. We'll get to that in the main loop */ - } - - while(!eos){ - long i; - long bytes=fread(readbuffer,1,READ*4,stdin); /* stereo hardwired here */ - - if(bytes==0){ - /* end of file. this can be done implicitly in the mainline, - but it's easier to see here in non-clever fashion. - Tell the library we're at end of stream so that it can handle - the last frame and mark end of stream in the output properly */ - vorbis_analysis_wrote(&vd,0); - - }else{ - /* data to encode */ - - /* expose the buffer to submit data */ - double **buffer=vorbis_analysis_buffer(&vd,READ); - - /* uninterleave samples */ - for(i=0;i<bytes/4;i++){ - buffer[0][i]=((readbuffer[i*4+1]<<8)| - (0x00ff&(int)readbuffer[i*4]))/32768.; - buffer[1][i]=((readbuffer[i*4+3]<<8)| - (0x00ff&(int)readbuffer[i*4+2]))/32768.; - } - - /* tell the library how much we actually submitted */ - vorbis_analysis_wrote(&vd,i); - } - - /* vorbis does some data preanalysis, then divvies up blocks for - more involved (potentially parallel) processing. Get a single - block for encoding now */ - while(vorbis_analysis_blockout(&vd,&vb)==1){ - - /* analysis */ - vorbis_analysis(&vb,&op); - - /* weld the packet into the bitstream */ - ogg_stream_packetin(&os,&op); - - /* write out pages (if any) */ - while(!eos){ - int result=ogg_stream_pageout(&os,&og); - if(result==0)break; - fwrite(og.header,1,og.header_len,stdout); - fwrite(og.body,1,og.body_len,stdout); - - /* this could be set above, but for illustrative purposes, I do - it here (to show that vorbis does know where the stream ends) */ - - if(ogg_page_eos(&og))eos=1; - - } - } - } - - /* clean up and exit. vorbis_info_clear() must be called last */ - - ogg_stream_clear(&os); - vorbis_block_clear(&vb); - vorbis_dsp_clear(&vd); - - /* ogg_page and ogg_packet structs always point to storage in - libvorbis. They're never freed or manipulated directly */ - - fprintf(stderr,"Done.\n"); - return(0); -} - diff --git a/examples/seeking_example.c b/examples/seeking_example.c deleted file mode 100644 index 57088518..00000000 --- a/examples/seeking_example.c +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: illustrate seeking, and test it too - last mod: $Id: seeking_example.c,v 1.3 2000/07/07 06:16:24 xiphmont Exp $ - - ********************************************************************/ - -#include <stdlib.h> -#include <stdio.h> -#include "vorbis/codec.h" -#include "vorbis/vorbisfile.h" -#include "../lib/misc.h" - -int main(){ - OggVorbis_File ov; - int i; - - /* open the file/pipe on stdin */ - if(ov_open(stdin,&ov,NULL,-1)==-1){ - printf("Could not open input as an OggVorbis file.\n\n"); - exit(1); - } - - /* print details about each logical bitstream in the input */ - if(ov_seekable(&ov)){ - double length=ov_time_total(&ov,-1); - printf("testing seeking to random places in %g seconds....\n",length); - for(i=0;i<100;i++){ - double val=(double)rand()/RAND_MAX*length; - ov_time_seek(&ov,val); - printf("\r\t%d [%gs]... ",i,val); - fflush(stdout); - } - - printf("\r \nOK.\n\n"); - }else{ - printf("Standard input was not seekable.\n"); - } - - ov_clear(&ov); - return 0; -} - - - - - - - - - - - - - diff --git a/examples/vorbisfile_example.c b/examples/vorbisfile_example.c deleted file mode 100644 index ff7d9152..00000000 --- a/examples/vorbisfile_example.c +++ /dev/null @@ -1,91 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: simple example decoder using vorbisfile - last mod: $Id: vorbisfile_example.c,v 1.1 2000/06/19 10:05:57 xiphmont Exp $ - - ********************************************************************/ - -/* Takes a vorbis bitstream from stdin and writes raw stereo PCM to - stdout using vorbisfile. Using vorbisfile is much simpler than - dealing with libvorbis. */ - -#include <stdio.h> -#include <stdlib.h> -#include <math.h> -#include "vorbis/codec.h" -#include "vorbis/vorbisfile.h" - -#ifdef _WIN32 /* We need the following two to set stdin/stdout to binary */ -#include <io.h> -#include <fcntl.h> -#endif - -char pcmout[4096]; /* take 4k out of the data segment, not the stack */ - -int main(int argc, char **argv){ - OggVorbis_File vf; - int eof=0; - int current_section; - -#ifdef _WIN32 /* We need to set stdin/stdout to binary mode. Damn windows. */ - /* Beware the evil ifdef. We avoid these where we can, but this one we - cannot. Don't add any more, you'll probably go to hell if you do. */ - _setmode( _fileno( stdin ), _O_BINARY ); - _setmode( _fileno( stdout ), _O_BINARY ); -#endif - - if(ov_open(stdin, &vf, NULL, 0) < 0) { - fprintf(stderr,"Input does not appear to be an Ogg bitstream.\n"); - exit(1); - } - - /* Throw the comments plus a few lines about the bitstream we're - decoding */ - { - char **ptr=ov_comment(&vf,-1)->user_comments; - vorbis_info *vi=ov_info(&vf,-1); - while(*ptr){ - fprintf(stderr,"%s\n",*ptr); - ++ptr; - } - fprintf(stderr,"\nBitstream is %d channel, %ldHz\n",vi->channels,vi->rate); - fprintf(stderr,"Encoded by: %s\n\n",ov_comment(&vf,-1)->vendor); - } - - while(!eof){ - long ret=ov_read(&vf,pcmout,sizeof(pcmout),0,2,1,¤t_section); - switch(ret){ - case 0: - /* EOF */ - eof=1; - break; - case -1: - /* error in the stream. Not a problem, just reporting it in - case we (the app) cares. In this case, we don't. */ - break; - default: - /* we don't bother dealing with sample rate changes, etc, but - you'll have to*/ - fwrite(pcmout,1,ret,stdout); - break; - } - } - - /* cleanup */ - ov_clear(&vf); - - fprintf(stderr,"Done.\n"); - return(0); -} - diff --git a/include/vorbis/backends.h b/include/vorbis/backends.h deleted file mode 100644 index 1a7caddb..00000000 --- a/include/vorbis/backends.h +++ /dev/null @@ -1,139 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: libvorbis backend and mapping structures; needed for - static mode headers - last mod: $Id: backends.h,v 1.11 2000/07/12 09:36:17 xiphmont Exp $ - - ********************************************************************/ - -/* this is exposed up here because we need it for static modes. - Lookups for each backend aren't exposed because there's no reason - to do so */ - -#ifndef _vorbis_time_backend_h_ -#define _vorbis_time_backend_h_ - -/* this would all be simpler/shorter with templates, but.... */ -/* Transform backend generic *************************************/ - -/* only mdct right now. Flesh it out more if we ever transcend mdct - in the transform domain */ - -/* Time backend generic ******************************************/ -typedef struct{ - void (*pack) (vorbis_info_time *,oggpack_buffer *); - vorbis_info_time *(*unpack)(vorbis_info *,oggpack_buffer *); - vorbis_look_time *(*look) (vorbis_dsp_state *,vorbis_info_mode *, - vorbis_info_time *); - void (*free_info) (vorbis_info_time *); - void (*free_look) (vorbis_look_time *); - int (*forward) (struct vorbis_block *,vorbis_look_time *, - double *,double *); - int (*inverse) (struct vorbis_block *,vorbis_look_time *, - double *,double *); -} vorbis_func_time; - -typedef struct{ - int dummy; -} vorbis_info_time0; - -/* Floor backend generic *****************************************/ -typedef struct{ - void (*pack) (vorbis_info_floor *,oggpack_buffer *); - vorbis_info_floor *(*unpack)(vorbis_info *,oggpack_buffer *); - vorbis_look_floor *(*look) (vorbis_dsp_state *,vorbis_info_mode *, - vorbis_info_floor *); - void (*free_info) (vorbis_info_floor *); - void (*free_look) (vorbis_look_floor *); - int (*forward) (struct vorbis_block *,vorbis_look_floor *, - double *,double *); - int (*inverse) (struct vorbis_block *,vorbis_look_floor *, - double *); -} vorbis_func_floor; - -typedef struct{ - int order; - long rate; - long barkmap; - - int ampbits; - int ampdB; - - int numbooks; /* <= 16 */ - int books[16]; -} vorbis_info_floor0; - -/* Residue backend generic *****************************************/ -typedef struct{ - void (*pack) (vorbis_info_residue *,oggpack_buffer *); - vorbis_info_residue *(*unpack)(vorbis_info *,oggpack_buffer *); - vorbis_look_residue *(*look) (vorbis_dsp_state *,vorbis_info_mode *, - vorbis_info_residue *); - void (*free_info) (vorbis_info_residue *); - void (*free_look) (vorbis_look_residue *); - int (*forward) (struct vorbis_block *,vorbis_look_residue *, - double **,int); - int (*inverse) (struct vorbis_block *,vorbis_look_residue *, - double **,int); -} vorbis_func_residue; - -typedef struct vorbis_info_residue0{ -/* block-partitioned VQ coded straight residue */ - long begin; - long end; - - /* first stage (lossless partitioning) */ - int grouping; /* group n vectors per partition */ - int partitions; /* possible codebooks for a partition */ - int groupbook; /* huffbook for partitioning */ - int secondstages[64]; /* expanded out to pointers in lookup */ - int booklist[256]; /* list of second stage books */ - - /* encode-only heuristic settings */ - double entmax[64]; /* book entropy threshholds*/ - double ampmax[64]; /* book amp threshholds*/ - int subgrp[64]; /* book heuristic subgroup size */ - int blimit[64]; /* subgroup position limits */ - -} vorbis_info_residue0; - -/* Mapping backend generic *****************************************/ -typedef struct{ - void (*pack) (vorbis_info *,vorbis_info_mapping *, - oggpack_buffer *); - vorbis_info_mapping *(*unpack)(vorbis_info *,oggpack_buffer *); - vorbis_look_mapping *(*look) (vorbis_dsp_state *,vorbis_info_mode *, - vorbis_info_mapping *); - void (*free_info) (vorbis_info_mapping *); - void (*free_look) (vorbis_look_mapping *); - int (*forward) (struct vorbis_block *vb,vorbis_look_mapping *); - int (*inverse) (struct vorbis_block *vb,vorbis_look_mapping *); -} vorbis_func_mapping; - -typedef struct vorbis_info_mapping0{ - int submaps; /* <= 16 */ - int chmuxlist[256]; /* up to 256 channels in a Vorbis stream */ - - int timesubmap[16]; /* [mux] */ - int floorsubmap[16]; /* [mux] submap to floors */ - int residuesubmap[16]; /* [mux] submap to residue */ - int psysubmap[16]; /* [mux]; encode only */ -} vorbis_info_mapping0; - -#endif - - - - - diff --git a/include/vorbis/book/lsp12_0.vqh b/include/vorbis/book/lsp12_0.vqh deleted file mode 100644 index b0a0a277..00000000 --- a/include/vorbis/book/lsp12_0.vqh +++ /dev/null @@ -1,1157 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_lsp12_0_VQH_ -#define _V_lsp12_0_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_lsp12_0[] = { - 0, - 3, - 6, - 7, - 8, - 9, - 10, - 11, - 13, - 15, - 19, - 25, - 40, -}; - -static long _vq_lengthlist_lsp12_0[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,16,15, 0, 0, 0, 0, 0, 0, 0, 0, 0,15,14,14, - 0, 0, 0, 0, 8, 0, 0, 0, 0,16,15,16, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,14,14,16, 0, 0, 0, 0, 0, 0, 0, - 0, 0,16,16,15, 0,16, 0, 0, 0, 0, 0, 0, 0,13,15, - 0, 0,15,13, 0, 0, 0, 0, 0, 0,15,14, 0, 0,15,14, - 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,15, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,16,15,15, 0,16, 0, 0, 0, 0, - 0,15, 0, 0,16,15, 0, 0, 0, 0, 0, 0, 0, 0,15, 0, - 14,14,14,15,14,16, 0, 0, 0, 0, 0,15,12,12,13,13, - 13,16, 0, 0, 0, 0, 0, 0,16,12,12,13,11,11,14, 0, - 0, 0, 0, 0, 0, 0,12,12,12,10,11,12,15, 0, 0, 0, - 0, 0,14,14,12,10,10,10,12, 0,16, 0, 0, 0, 0, 0, - 14,13,11,11,11,13,16, 0, 0, 0, 0, 0, 0, 0,14,13, - 14,13,15, 0, 0, 0, 0, 0, 0, 0, 0,16,15, 0, 0,16, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,14,15,13,14,14,13,16,15,16, - 0, 0, 0, 0,14,13,10,11,12,12,13, 0, 0, 0, 0, 0, - 0,14,10, 9, 9, 9,10,12,16, 0, 0, 0, 0, 0,14,11, - 9, 8, 9,10,12,15, 0, 0, 0, 0, 0,14,12, 9, 9, 9, - 9,12, 0, 0, 0, 0, 0, 0,14,13,11,10, 9,10,14, 0, - 0, 0, 0, 0, 0, 0,14,13,13,12,13,16, 0, 0, 0, 0, - 0, 0, 0, 0,15,16, 0,14, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0,15,16, 0, 0, 0, 0, 0, - 14,13,12,12,12,12,14, 0,15,16, 0, 0,15, 8, 9, 8, - 9,10,11,12,16, 0, 0, 0, 0,15, 9, 6, 7, 6, 7, 9, - 11, 0, 0, 0, 0, 0, 0,11, 8, 6, 5, 7, 8,12,16, 0, - 0, 0, 0, 0,12,10, 7, 7, 7, 8,12,15,16, 0, 0, 0, - 0,14,12, 9, 8, 8, 9,13, 0, 0, 0, 0, 0, 0,14,13, - 11,11,12,12,15, 0, 0, 0, 0, 0, 0,16,16,15,16,15, - 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0,14,15,16, 0, 0, 0, 0,14,13,12,10,11, 8,12,14, - 16,16, 0, 0, 0, 0,14, 7, 7, 8, 9,10,12,16, 0, 0, - 0, 0, 0, 8, 6, 5, 5, 6, 8,11,14, 0, 0, 0, 0, 0, - 10, 6, 5, 4, 5, 7,11,15, 0, 0, 0, 0, 0,12, 9, 6, - 6, 6, 8,11,15, 0, 0, 0, 0, 0,13,10, 8, 7, 7, 9, - 13, 0, 0, 0, 0, 0,13,13,12,10,11,11,11,14, 0, 0, - 0, 0, 0, 0,16, 0, 0, 0,15,15, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,15, 0, 0,16,14,13,14, 0,16, 0, 0, - 0,14,13,12,11,11,12,12,14,16, 0, 0, 0, 0, 0,12, - 10, 9, 8, 9,10,12, 0, 0, 0, 0, 0, 0,10, 8, 6, 6, - 6, 8,10,15, 0, 0, 0, 0, 0,10, 8, 6, 5, 6, 7,10, - 0, 0, 0, 0, 0, 0,11, 9, 7, 6, 6, 8,10,15, 0, 0, - 0, 0,14,11,10, 8, 7, 7, 8,12, 0,16, 0, 0, 0,13, - 13,13,11,11,11,11,15,15, 0, 0, 0, 0, 0, 0,16,16, - 16,16,14,16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,16, 0, - 15,16,14,14, 0, 0, 0, 0, 0, 0,15,12,13,12,12,12, - 12,15, 0, 0, 0, 0, 0,15,12,11,10,10, 9,10,12,16, - 0, 0, 0, 0,16,11,10, 8, 7, 7, 8,10,16, 0, 0, 0, - 0,15,11, 9, 8, 6, 6, 6,10,15, 0, 0, 0, 0,14,11, - 10, 8, 7, 6, 7,11,15, 0, 0, 0, 0,14,12,10, 8, 7, - 7, 7,13,15, 0, 0, 0, 0,15,14,12,10,10,12,13,14, - 0, 0, 0, 0, 0, 0, 0, 0,16, 0,16, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,15, 0, 0, 0, 0,16, 0, 0, 0,16, - 0, 0, 0, 0,12,14,12,12,14,14,14, 0,16, 0, 0, 0, - 0,13,14,12,11,12,12,13, 0, 0, 0, 0, 0,16,13,13, - 11,10, 9,10,13,15, 0, 0, 0, 0,15,12,11,11, 8, 8, - 9,12, 0, 0, 0, 0, 0,14,13,12, 9, 8, 8,10,15, 0, - 0, 0, 0, 0, 0,12,12, 9, 9,10,11,16, 0,16, 0, 0, - 0, 0, 0,14,13,13,14,15,16, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,14,15,15, - 15, 0, 0,16, 0, 0, 0, 0, 0, 0,15, 0,16,16, 0,16, - 0, 0, 0, 0, 0, 0, 0,14, 0,14,15, 0,16,16, 0, 0, - 0, 0, 0, 0,16, 0,15,15, 0,15, 0, 0, 0, 0, 0, 0, - 0,16,16,15,14,16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 15,15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,15, 0, - 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,15, 0, 0, - 0, 0,16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,15, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,16,16, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,16, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0,15, 8, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, -}; - -static long _vq_pigeonmap_lsp12_0[] = { - 0, 0, 0, 0, 0, 1, 1, 1, - 2, 2, 3, 3, 3, 4, 4, 4, - 4, 4, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, - 5, 6, 6, 6, 6, 6, 6, 6, -}; - -static long _vq_fitlist_lsp12_0[] = { - 196, 353, 343, 344, 345, 356, 366, 379, - 535, 189, 357, 201, 368, 380, 238, 250, - 392, 536, 548, 716, 226, 381, 393, 537, - 549, 704, 369, 561, 705, 202, 214, 227, - 239, 251, 370, 382, 394, 406, 538, 550, - 562, 706, 215, 717, 418, 574, 718, 730, - 873, 874, 1032, 1200, 707, 865, 875, 1033, - 1201, 729, 872, 1029, 1198, 886, 1042, 563, - 575, 719, 731, 743, 887, 899, 1043, 343, - 344, 189, 345, 178, 190, 201, 202, 356, - 357, 214, 368, 369, 215, 226, 370, 191, - 203, 227, 347, 371, 538, 381, 537, 382, - 539, 865, 228, 383, 384, 540, 552, 697, - 708, 550, 551, 706, 707, 1032, 1033, 1034, - 866, 709, 1202, 394, 719, 875, 876, 395, - 720, 877, 1203, 1201, 396, 553, 564, 721, - 878, 889, 1035, 1045, 1046, 1200, 565, 722, - 733, 890, 1047, 1058, 1214, 1215, 178, 189, - 344, 345, 179, 190, 191, 347, 202, 203, - 216, 215, 230, 373, 372, 242, 385, 541, - 698, 867, 243, 542, 228, 371, 697, 398, - 554, 255, 256, 412, 568, 710, 724, 254, - 267, 397, 410, 411, 567, 543, 581, 438, - 712, 750, 763, 906, 424, 881, 540, 866, - 384, 357, 1035, 553, 709, 880, 865, 722, - 878, 723, 879, 893, 1037, 1049, 179, 191, - 543, 1037, 712, 881, 426, 713, 230, 243, - 256, 373, 542, 412, 568, 764, 724, 698, - 880, 867, 581, 893, 438, 1049, 1375, 1388, - 750, 906, 1048, 1217, 1115, 763, 1453, 1231, - 1413, 196, 353, 366, 716, 872, 379, 535, - 729, 1041, 392, 548, 704, 380, 536, 238, - 250, 368, 561, 717, 226, 393, 549, 418, - 574, 730, 406, 562, 587, 873, 743, 886, - 419, 575, 251, 239, 600, 407, 420, 432, - 588, 601, 950, 1106, 1236, 1249, 1262, 756, - 769, 408, 421, 433, 576, 589, 602, 614, - 757, 770, 782, 394, 744, 899, 1275, 912, - 925, 1119, 563, 938, 434, 446, 758, 1223, - 926, 590, 615, 771, 783, 939, 951, 718, - 1055, 1288, 1094, 1107, 603, 795, 952, 1120, - 1042, 189, 190, 201, 202, 214, 178, 226, - 215, 227, 191, 203, 228, 238, 239, 216, - 357, 371, 370, 369, 383, 384, 540, 697, - 382, 395, 539, 396, 254, 372, 397, 189, - 201, 202, 214, 226, 238, 250, 368, 227, - 239, 251, 215, 228, 369, 381, 370, 382, - 394, 383, 395, 393, 406, 538, 550, 371, - 407, 539, 551, 419, 563, 384, 396, 397, - 408, 409, 420, 421, 432, 433, 540, 552, - 553, 564, 565, 576, 577, 589, 708, 720, - 721, 733, 190, 201, 202, 214, 215, 226, - 227, 238, 239, 251, 203, 228, 191, 216, - 254, 242, 267, 384, 397, 255, 372, 385, - 371, 383, 396, 395, 408, 540, 552, 409, - 410, 421, 422, 541, 553, 565, 566, 578, - 709, 722, 398, 423, 554, 579, 710, 420, - 433, 434, 564, 577, 590, 721, 734, 201, - 238, 250, 356, 366, 368, 379, 380, 392, - 535, 536, 548, 704, 226, 393, 214, 239, - 251, 561, 227, 549, 381, 717, 418, 406, - 419, 407, 420, 432, 394, 574, 587, 575, - 588, 600, 383, 395, 396, 408, 409, 421, - 433, 564, 576, 577, 589, 601, 745, 757, - 562, 730, 382, 563, 743, 550, 731, 744, - 756, 551, 732, 769, 434, 590, 602, 758, - 770, 201, 202, 214, 215, 226, 227, 238, - 239, 250, 251, 228, 254, 203, 216, 267, - 396, 408, 409, 421, 395, 407, 420, 432, - 433, 383, 384, 397, 565, 577, 371, 410, - 419, 422, 434, 552, 553, 564, 576, 578, - 588, 589, 590, 601, 602, 733, 745, 746, - 758, 423, 435, 446, 591, 603, 370, 382, - 394, 406, 539, 551, 563, 575, 720, 732, - 540, 566, 721, 734, 579, 747, 759, 614, - 771, 436, 447, 592, 604, 615, 760, 772, - 203, 215, 216, 227, 228, 239, 251, 242, - 254, 267, 255, 230, 243, 384, 396, 397, - 409, 423, 436, 256, 411, 424, 410, 398, - 422, 435, 448, 592, 605, 412, 437, 449, - 580, 593, 749, 421, 434, 566, 578, 385, - 579, 567, 591, 447, 554, 604, 748, 761, - 736, 446, 603, 616, 760, 773, 617, 774, - 606, 618, 762, 230, 242, 254, 255, 267, - 243, 256, 412, 438, 543, 581, 426, 450, - 463, 712, 750, 763, 881, 424, 568, 411, - 437, 580, 593, 932, 606, 373, 398, 436, - 542, 567, 736, 749, 449, 762, 775, 619, - 788, 764, 631, 645, 1127, 1115, 1139, 618, - 385, 554, 723, 724, 880, 893, 906, 919, - 892, 905, 918, 1049, 1061, 1075, 1074, 931, - 1101, 944, 957, 1257, 1270, 1283, 1087, 1100, - 1126, 1113, 1295, 226, 238, 250, 251, 239, - 227, 418, 419, 432, 228, 254, 396, 407, - 408, 409, 420, 421, 433, 406, 600, 588, - 589, 601, 267, 397, 410, 422, 434, 435, - 446, 577, 578, 590, 602, 603, 614, 576, - 769, 615, 758, 770, 771, 782, 423, 447, - 591, 757, 783, 459, 436, 448, 604, 616, - 784, 587, 395, 564, 565, 575, 759, 795, - 939, 951, 460, 628, 796, 383, 745, 394, - 756, 938, 952, 393, 562, 563, 574, 743, - 744, 964, 925, 926, 927, 1107, 1120, 629, - 797, 215, 226, 227, 228, 238, 239, 251, - 254, 267, 384, 395, 396, 397, 407, 408, - 409, 420, 421, 432, 433, 434, 422, 242, - 435, 446, 255, 447, 423, 436, 448, 459, - 615, 449, 460, 604, 605, 616, 617, 592, - 628, 784, 785, 424, 437, 618, 629, 786, - 577, 589, 590, 602, 410, 603, 591, 614, - 578, 772, 773, 797, 798, 759, 771, 631, - 787, 799, 579, 760, 450, 800, 955, 956, - 968, 242, 254, 255, 267, 230, 243, 256, - 436, 424, 437, 449, 411, 423, 435, 447, - 448, 459, 460, 593, 605, 617, 618, 412, - 450, 606, 580, 616, 628, 629, 774, 786, - 787, 438, 463, 581, 619, 631, 775, 799, - 788, 592, 604, 798, 800, 398, 446, 761, - 773, 762, 567, 749, 956, 968, 969, 955, - 785, 797, 1137, 1138, 645, 1139, 1136, 1306, - 957, 1126, 1476, 426, 764, 713, 1115, 645, - 1453, 1815, 1994, 1993, 1139, 1138, 1295, 1464, - 1476, 1127, 1283, 1632, 1438, 1451, 1581, 1762, - 1775, 1787, 1270, 1413, 1463, 1388, 1375, 1399, - 1412, 1425, 1555, 1580, 1593, 1257, 1786, 750, - 763, 775, 906, 919, 931, 932, 944, 1075, - 1087, 1100, 1113, 1231, 1244, 1256, 1269, 1282, - 788, 957, 1101, 619, 1126, 238, 250, 251, - 379, 380, 392, 393, 406, 418, 419, 548, - 549, 561, 562, 574, 575, 587, 600, 717, - 729, 730, 743, 756, 950, 1106, 1249, 1262, - 1275, 432, 588, 769, 239, 407, 420, 601, - 744, 757, 925, 1119, 408, 421, 433, 576, - 589, 602, 614, 770, 782, 938, 434, 446, - 577, 590, 603, 615, 758, 771, 783, 939, - 951, 912, 926, 795, 254, 267, 422, 435, - 447, 459, 784, 952, 1288, 1107, 796, 964, - 1120, 616, 628, 1094, 448, 460, 797, 953, - 629, 798, 1289, 1134, 617, 799, 1135, 449, - 631, 800, 968, 1136, 1304, 618, 786, 787, - 969, 1137, 785, 463, 956, 1138, 1306, 955, - 954, 619, 645, 788, 1139, 1476, 1123, 1124, - 1125, 899, 1122, 1292, 1293, 1294, 1121, 1291, - 1276, 1290, 1461, 1462, 1460, 1463, 1630, 251, - 254, 267, 409, 420, 421, 422, 432, 433, - 434, 435, 446, 447, 459, 589, 590, 601, - 602, 603, 614, 615, 758, 770, 771, 782, - 783, 784, 795, 951, 448, 604, 616, 628, - 436, 460, 617, 796, 952, 449, 629, 797, - 964, 618, 798, 631, 799, 450, 787, 800, - 968, 1136, 463, 619, 956, 969, 1137, 1135, - 786, 1138, 788, 1304, 1306, 645, 1139, 957, - 1476, 1134, 955, 1126, 953, 785, 1125, 954, - 1124, 1295, 1294, 256, 424, 437, 438, 448, - 449, 450, 459, 460, 463, 606, 617, 618, - 619, 629, 631, 775, 786, 787, 798, 799, - 800, 788, 968, 969, 645, 1139, 956, 1453, - 1138, 1127, 1815, 436, 447, 605, 616, 774, - 593, 412, 581, 762, 931, 944, 955, 957, - 785, 943, 1125, 1124, 1137, 954, 1112, 1113, - 1126, 1295, 1306, 1123, 1281, 1100, 1282, 1136, - 1293, 1294, 1476, 1292, 1269, 1283, 1464, 450, - 463, 426, 645, 764, 1127, 1115, 1453, 1815, - 1139, 1994, 1993, 619, 631, 788, 799, 800, - 957, 968, 969, 1137, 1138, 1126, 1295, 1306, - 1476, 932, 1101, 763, 1270, 1283, 1464, 438, - 459, 460, 463, 628, 629, 631, 645, 796, - 797, 798, 799, 800, 956, 964, 968, 969, - 1124, 1125, 1134, 1135, 1136, 1137, 1138, 1293, - 1304, 1306, 1476, 1139, 1294, 1462, 1463, 1994, - 1993, 1815, 446, 447, 615, 616, 783, 784, - 795, 952, 953, 785, 617, 786, 954, 618, - 787, 955, 1123, 957, 1126, 1122, 1292, 1295, - 1291, 1464, 1632, 449, 619, 788, 1461, 1460, - 1630, 196, 353, 343, 344, 356, 366, 379, - 535, 345, 1029, 536, 704, 1198, 716, 872, - 357, 368, 380, 548, 705, 873, 729, 1041, - 1366, 392, 537, 549, 717, 874, 1032, 1042, - 1200, 561, 706, 718, 886, 1043, 1201, 1211, - 369, 381, 538, 1033, 393, 550, 875, 370, - 382, 394, 539, 551, 562, 707, 719, 865, - 876, 887, 1034, 1044, 1202, 189, 201, 356, - 357, 366, 368, 369, 379, 380, 381, 392, - 535, 536, 537, 548, 549, 705, 202, 214, - 226, 238, 370, 382, 393, 538, 550, 706, - 394, 250, 406, 562, 215, 227, 239, 251, - 371, 383, 395, 407, 539, 551, 563, 707, - 718, 719, 575, 731, 875, 396, 408, 540, - 552, 564, 576, 708, 720, 732, 876, 874, - 1032, 865, 1033, 887, 888, 419, 744, 900, - 1044, 384, 420, 565, 577, 709, 721, 733, - 745, 877, 889, 901, 1045, 190, 201, 202, - 214, 215, 226, 227, 238, 239, 357, 368, - 369, 370, 371, 381, 382, 383, 394, 537, - 538, 539, 550, 551, 707, 865, 203, 228, - 384, 395, 540, 552, 697, 708, 191, 216, - 372, 396, 553, 709, 866, 254, 385, 397, - 409, 541, 565, 566, 722, 408, 564, 410, - 721, 878, 1035, 720, 577, 733, 877, 578, - 734, 398, 554, 579, 710, 735, 876, 1034, - 698, 890, 891, 1047, 889, 421, 746, 902, - 1046, 422, 747, 903, 423, 567, 723, 748, - 879, 904, 191, 203, 216, 228, 371, 372, - 384, 385, 397, 540, 541, 553, 697, 698, - 866, 242, 373, 554, 710, 867, 230, 398, - 542, 243, 256, 412, 568, 724, 880, 893, - 255, 567, 723, 543, 581, 750, 906, 1037, - 1049, 411, 424, 580, 438, 712, 879, 736, - 593, 749, 763, 919, 892, 1048, 1075, 1231, - 905, 881, 1061, 1217, 1244, 918, 1074, 932, - 1230, 1257, 1375, 762, 1087, 1243, 1101, 196, - 716, 872, 353, 729, 1041, 366, 535, 379, - 548, 704, 380, 392, 536, 561, 717, 873, - 549, 705, 730, 886, 1366, 1042, 1210, 1223, - 1236, 393, 574, 718, 874, 899, 1055, 1029, - 1198, 1211, 1249, 418, 562, 743, 887, 1043, - 1068, 1106, 1224, 1262, 1405, 587, 731, 912, - 1056, 1212, 1237, 1275, 343, 344, 1200, 1032, - 1201, 1380, 706, 875, 1033, 1044, 1202, 1213, - 1225, 1381, 1418, 366, 379, 380, 392, 535, - 536, 548, 704, 368, 381, 393, 537, 549, - 561, 705, 717, 226, 238, 250, 369, 382, - 394, 406, 418, 538, 550, 562, 574, 706, - 718, 730, 239, 251, 395, 407, 419, 551, - 563, 575, 587, 719, 731, 873, 874, 886, - 707, 743, 875, 887, 899, 420, 432, 564, - 576, 588, 600, 720, 732, 744, 756, 888, - 900, 1042, 1043, 1055, 876, 912, 1044, 1056, - 1068, 408, 589, 601, 733, 745, 757, 769, - 889, 901, 913, 925, 1057, 1069, 214, 226, - 227, 238, 239, 250, 251, 369, 370, 381, - 382, 383, 393, 394, 395, 406, 407, 419, - 538, 539, 550, 551, 562, 563, 575, 707, - 719, 215, 228, 371, 384, 396, 408, 420, - 540, 552, 564, 576, 708, 720, 432, 588, - 732, 397, 409, 421, 433, 553, 565, 577, - 589, 721, 733, 731, 744, 876, 888, 709, - 745, 877, 889, 601, 757, 901, 422, 434, - 566, 578, 590, 602, 722, 734, 746, 758, - 890, 902, 900, 913, 1045, 1057, 878, 914, - 1046, 1058, 770, 926, 1070, 410, 591, 603, - 735, 747, 759, 771, 891, 903, 915, 927, - 1059, 1071, 228, 371, 383, 384, 395, 396, - 397, 408, 409, 421, 540, 552, 553, 564, - 565, 577, 709, 721, 216, 254, 372, 385, - 410, 422, 541, 566, 578, 722, 242, 267, - 398, 423, 554, 579, 710, 434, 590, 734, - 435, 591, 735, 255, 411, 436, 567, 592, - 723, 733, 746, 878, 890, 747, 891, 748, - 879, 603, 759, 903, 604, 760, 904, 424, - 580, 605, 736, 761, 892, 902, 915, 1047, - 1059, 916, 1060, 917, 1048, 772, 928, 1072, - 773, 929, 1073, 593, 749, 774, 905, 930, - 1061, 196, 716, 729, 872, 1041, 366, 379, - 380, 392, 535, 536, 548, 561, 704, 717, - 873, 393, 549, 574, 730, 418, 886, 250, - 406, 562, 575, 587, 705, 718, 731, 743, - 899, 1042, 1106, 1223, 1236, 1249, 1262, 756, - 912, 1055, 419, 600, 1210, 950, 1211, 1275, - 1068, 588, 744, 769, 925, 874, 887, 1405, - 1224, 900, 1081, 432, 757, 913, 938, 1094, - 1119, 238, 250, 368, 379, 380, 381, 392, - 393, 394, 406, 418, 536, 537, 548, 549, - 550, 561, 562, 574, 575, 587, 705, 717, - 718, 730, 731, 743, 886, 899, 251, 407, - 419, 563, 239, 382, 395, 408, 420, 432, - 551, 564, 576, 588, 600, 732, 744, 756, - 421, 433, 577, 589, 601, 745, 757, 769, - 912, 925, 434, 590, 602, 758, 770, 719, - 900, 720, 733, 901, 913, 746, 914, 926, - 938, 446, 603, 614, 759, 771, 782, 927, - 939, 887, 1068, 888, 1069, 1081, 889, 902, - 1070, 1082, 1094, 915, 1083, 1095, 1107, 615, - 772, 783, 928, 940, 951, 1096, 1108, 383, - 395, 396, 407, 408, 409, 419, 420, 421, - 432, 433, 552, 564, 565, 576, 577, 588, - 589, 601, 733, 745, 254, 384, 397, 410, - 422, 434, 553, 566, 578, 590, 602, 734, - 746, 758, 267, 423, 435, 446, 579, 591, - 603, 747, 759, 614, 771, 436, 447, 592, - 604, 615, 760, 772, 721, 757, 770, 902, - 914, 722, 735, 903, 915, 927, 748, 916, - 928, 783, 940, 448, 605, 616, 761, 773, - 784, 929, 941, 890, 926, 939, 1071, 1083, - 891, 904, 1072, 1084, 1096, 917, 1085, 1097, - 952, 1109, 459, 617, 774, 785, 930, 942, - 953, 1098, 1110, 254, 267, 397, 409, 410, - 421, 422, 423, 434, 435, 566, 578, 579, - 590, 591, 603, 735, 747, 242, 255, 385, - 398, 411, 436, 554, 567, 592, 604, 748, - 424, 580, 605, 736, 447, 760, 448, 761, - 437, 449, 593, 749, 616, 773, 460, 606, - 617, 618, 762, 774, 786, 930, 943, 759, - 772, 904, 916, 723, 917, 905, 929, 918, - 785, 942, 450, 775, 787, 931, 928, 941, - 1073, 1085, 892, 1086, 1074, 1098, 1099, 1087, - 954, 1111, 955, 1112, 619, 944, 956, 1100, - 716, 729, 1223, 1236, 379, 392, 535, 548, - 561, 574, 704, 717, 730, 1106, 1249, 1262, - 250, 380, 393, 406, 418, 536, 549, 562, - 575, 587, 600, 705, 718, 731, 743, 756, - 873, 886, 899, 912, 950, 1042, 1055, 1068, - 1275, 419, 432, 588, 601, 744, 757, 769, - 925, 1119, 938, 1081, 770, 782, 1094, 1288, - 420, 433, 576, 589, 602, 614, 745, 758, - 771, 783, 913, 926, 939, 951, 1095, 1107, - 1263, 1276, 446, 795, 1120, 615, 784, 796, - 952, 964, 1405, 1418, 1041, 1210, 1082, 1108, - 1121, 1289, 407, 418, 419, 420, 432, 433, - 575, 576, 587, 588, 589, 600, 601, 744, - 756, 757, 769, 770, 925, 938, 408, 421, - 434, 577, 590, 602, 614, 745, 758, 771, - 782, 926, 939, 409, 422, 435, 446, 578, - 591, 603, 615, 746, 759, 772, 783, 927, - 940, 1107, 951, 447, 784, 795, 952, 448, - 459, 604, 616, 628, 785, 796, 953, 1120, - 964, 1121, 460, 797, 617, 629, 798, 913, - 1094, 914, 1095, 1108, 1134, 786, 954, 1135, - 1082, 1263, 1276, 928, 941, 1109, 1289, 1122, - 799, 955, 1123, 1136, 1304, 422, 434, 435, - 446, 447, 591, 603, 604, 614, 615, 772, - 423, 436, 448, 459, 592, 605, 616, 773, - 784, 449, 460, 617, 628, 785, 618, 629, - 786, 797, 631, 787, 798, 799, 955, 800, - 956, 968, 1136, 760, 783, 941, 761, 774, - 942, 796, 953, 954, 1124, 1135, 969, 1137, - 929, 952, 1110, 930, 943, 1111, 1122, 1123, - 1304, 1125, 1138, 1306, 950, 1106, 1119, 1275, - 1288, 600, 769, 782, 432, 601, 614, 770, - 783, 795, 938, 939, 951, 1107, 1120, 1276, - 446, 615, 796, 952, 964, 1289, 459, 784, - 628, 797, 460, 629, 953, 1134, 1121, 785, - 798, 954, 1122, 1135, 1304, 799, 968, 1123, - 1136, 1290, 1291, 631, 800, 955, 969, 1124, - 1137, 1292, 1306, 1138, 1293, 1125, 1294, 1476, - 1459, 463, 1139, 1460, 1461, 1462, 645, 1463, - 1630, 1632, 1108, 1445, 190, 347, 697, 865, - 1034, 191, 698, 866, 1035, 867, 371, 1203, - 372, 373, 542, 724, 880, 541, 568, 893, - 1049, 384, 385, 397, 540, 553, 554, 566, - 709, 710, 722, 878, 879, 891, 1047, 398, - 567, 723, 892, 1048, 412, 581, 906, 1037, - 1033, 1202, 735, 1060, 1216, 736, 1061, 1217, - 1231, 366, 379, 535, 548, 704, 716, 729, - 872, 873, 1029, 1041, 1198, 536, 705, 717, - 368, 380, 392, 537, 549, 561, 706, 718, - 874, 886, 1032, 1042, 1200, 730, 369, 381, - 393, 538, 550, 562, 574, 719, 731, 875, - 887, 899, 1043, 1055, 743, 1211, 382, 394, - 406, 418, 551, 563, 575, 587, 707, 732, - 744, 876, 888, 900, 912, 1044, 1056, 1068, - 1212, 1210, 1223, 1201, 1224, 720, 756, 901, - 913, 1045, 1057, 1069, 1081, 1213, 1225, 1237, - 368, 369, 380, 381, 393, 536, 537, 538, - 549, 550, 562, 705, 706, 707, 718, 719, - 874, 875, 887, 1032, 1033, 1043, 1201, 370, - 382, 394, 539, 551, 563, 708, 720, 865, - 876, 888, 1034, 1044, 1202, 406, 575, 731, - 732, 900, 1056, 371, 383, 395, 407, 540, - 552, 564, 576, 721, 733, 877, 889, 901, - 1045, 1057, 419, 588, 744, 745, 913, 1069, - 1213, 384, 396, 408, 420, 553, 565, 577, - 589, 709, 734, 746, 878, 890, 902, 914, - 1046, 1058, 1070, 1214, 1212, 1203, 1225, 1226, - 757, 1082, 1238, 722, 758, 903, 915, 1047, - 1059, 1071, 1083, 1215, 1227, 1239, 370, 371, - 382, 383, 395, 538, 539, 540, 551, 552, - 564, 707, 708, 709, 720, 721, 865, 876, - 877, 889, 1034, 1045, 1203, 384, 396, 553, - 565, 697, 722, 866, 878, 890, 1035, 1046, - 372, 385, 397, 409, 410, 541, 554, 566, - 578, 698, 710, 734, 735, 867, 879, 891, - 903, 1047, 1059, 1060, 1216, 408, 577, 733, - 902, 1058, 579, 723, 904, 421, 590, 746, - 747, 915, 1071, 1215, 422, 591, 748, 916, - 1072, 398, 423, 567, 592, 736, 892, 917, - 1048, 1073, 1214, 1228, 1229, 1227, 759, 1084, - 1240, 760, 1085, 1241, 761, 905, 1061, 1086, - 1217, 1242, 380, 392, 393, 536, 548, 549, - 561, 562, 574, 704, 705, 717, 718, 730, - 743, 873, 874, 886, 887, 899, 1042, 1043, - 1055, 1211, 381, 394, 406, 418, 537, 550, - 563, 575, 587, 706, 719, 731, 744, 756, - 875, 888, 900, 912, 1044, 1056, 1068, 1212, - 1224, 382, 395, 407, 419, 538, 551, 564, - 576, 588, 600, 707, 720, 732, 745, 757, - 876, 889, 901, 913, 925, 1045, 1057, 1069, - 1081, 1213, 1225, 769, 1237, 408, 420, 432, - 577, 589, 601, 733, 758, 770, 902, 914, - 926, 938, 1058, 1070, 1082, 1094, 1226, 1238, - 1214, 1250, 746, 927, 939, 1071, 1083, 1095, - 1107, 1227, 1239, 1251, 1263, 383, 395, 396, - 407, 408, 419, 420, 432, 539, 551, 552, - 563, 564, 565, 575, 576, 577, 588, 589, - 601, 707, 708, 719, 720, 721, 732, 733, - 744, 745, 746, 757, 758, 876, 877, 888, - 889, 890, 900, 901, 902, 913, 914, 926, - 1045, 1046, 1057, 1058, 1069, 1070, 1082, 1214, - 1226, 384, 397, 409, 421, 433, 540, 553, - 566, 578, 590, 602, 709, 722, 734, 747, - 759, 878, 891, 903, 915, 927, 1047, 1059, - 1071, 1083, 1215, 1227, 770, 771, 939, 1095, - 1239, 410, 422, 434, 579, 591, 603, 735, - 760, 772, 904, 916, 928, 940, 1060, 1072, - 1084, 1096, 1228, 1240, 1238, 1251, 1216, 1252, - 1108, 1264, 748, 929, 941, 1073, 1085, 1097, - 1109, 1229, 1241, 1253, 1265, 397, 409, 410, - 421, 422, 434, 553, 565, 566, 577, 578, - 579, 590, 591, 603, 709, 721, 722, 734, - 735, 746, 747, 748, 759, 760, 878, 890, - 891, 902, 903, 904, 915, 916, 928, 1047, - 1059, 1060, 1071, 1072, 1084, 1216, 1228, 385, - 398, 423, 435, 541, 554, 567, 592, 604, - 710, 723, 761, 879, 892, 917, 929, 1048, - 1073, 1085, 1229, 411, 436, 580, 605, 736, - 749, 905, 930, 1061, 1086, 1217, 772, 773, - 941, 1097, 1241, 774, 942, 1098, 1242, 424, - 593, 762, 918, 943, 1074, 1099, 1230, 1240, - 1253, 1254, 1255, 1110, 1266, 1111, 1267, 931, - 1087, 1112, 1243, 1268, 411, 424, 542, 567, - 568, 580, 593, 723, 724, 736, 749, 762, - 880, 892, 893, 905, 918, 1049, 1061, 1074, - 1230, 412, 437, 581, 606, 750, 906, 931, - 1087, 763, 919, 1075, 1231, 438, 543, 712, - 881, 932, 1101, 1244, 1257, 775, 1243, 944, - 1100, 1270, 426, 1283, 1256, 1113, 1269, 764, - 1127, 1388, 450, 619, 788, 957, 463, 1126, - 1295, 1282, 1139, 1115, 1399, 1413, 1412, 1425, - 1438, 1581, 1451, 716, 729, 872, 1041, 1210, - 1223, 1236, 1249, 379, 392, 418, 548, 561, - 574, 704, 717, 730, 743, 873, 886, 899, - 1042, 1055, 1068, 1106, 1211, 1224, 1262, 1405, - 393, 406, 549, 562, 575, 587, 718, 731, - 756, 874, 887, 900, 912, 1043, 1056, 1081, - 1237, 1275, 950, 419, 588, 600, 744, 769, - 913, 925, 1069, 1094, 1119, 1250, 1418, 432, - 601, 757, 926, 938, 1082, 1107, 1263, 1288, - 1212, 1225, 1238, 770, 1095, 1251, 1276, 406, - 418, 419, 562, 574, 575, 587, 588, 600, - 730, 731, 743, 744, 756, 769, 887, 899, - 900, 912, 913, 925, 1056, 1068, 1069, 1081, - 1237, 407, 420, 432, 563, 576, 589, 601, - 732, 745, 757, 770, 888, 901, 914, 926, - 938, 1057, 1070, 1082, 1094, 1238, 1250, 408, - 421, 433, 564, 577, 590, 602, 733, 746, - 758, 771, 889, 902, 915, 927, 939, 1058, - 1071, 1083, 1095, 1107, 1239, 1251, 782, 1263, - 434, 603, 614, 759, 783, 928, 940, 951, - 1084, 1096, 1108, 1252, 1264, 1276, 446, 615, - 772, 784, 941, 952, 1097, 1109, 1120, 1265, - 1277, 1225, 1226, 1227, 1240, 1253, 795, 953, - 1110, 1121, 1266, 1278, 1289, 409, 421, 422, - 433, 434, 565, 577, 578, 589, 590, 591, - 601, 602, 603, 614, 733, 734, 745, 746, - 747, 758, 759, 770, 771, 772, 890, 902, - 903, 914, 915, 916, 926, 927, 928, 939, - 940, 1059, 1071, 1072, 1083, 1084, 1095, 1096, - 1108, 1240, 1252, 410, 423, 435, 446, 566, - 579, 592, 604, 615, 735, 748, 760, 773, - 891, 904, 917, 929, 941, 1060, 1073, 1085, - 1097, 1109, 1241, 1253, 783, 784, 952, 1265, - 436, 447, 605, 616, 761, 785, 930, 942, - 953, 1086, 1098, 1110, 1254, 1266, 1121, 1278, - 448, 459, 617, 628, 774, 786, 943, 954, - 1099, 1111, 1122, 1267, 1279, 1228, 1264, 1277, - 1229, 1242, 1255, 796, 1290, 797, 955, 1112, - 1123, 1268, 1280, 1291, 423, 435, 436, 447, - 579, 591, 592, 603, 604, 605, 616, 735, - 747, 748, 760, 761, 772, 773, 774, 904, - 916, 917, 928, 929, 930, 941, 942, 1073, - 1085, 1086, 1097, 1098, 1110, 1242, 1254, 411, - 424, 448, 567, 580, 593, 617, 736, 749, - 892, 905, 918, 943, 1061, 1074, 1099, 1111, - 1255, 437, 449, 606, 618, 762, 775, 931, - 1087, 1112, 1243, 785, 786, 954, 1267, 787, - 955, 1268, 944, 956, 1100, 1256, 460, 629, - 1123, 1280, 1124, 1281, 450, 619, 631, 788, - 1113, 1125, 1269, 1266, 1279, 1230, 798, 1292, - 799, 1293, 800, 957, 1282, 1294, 729, 1106, - 1223, 1236, 1249, 1262, 1275, 1405, 1418, 950, - 1119, 432, 588, 600, 601, 756, 757, 769, - 770, 782, 913, 925, 926, 938, 939, 1081, - 1082, 1094, 1095, 1107, 1250, 1263, 1276, 1288, - 614, 951, 1108, 1120, 1431, 783, 795, 952, - 1289, 964, 1121, 1445, 796, 1251, 1264, 1277, - 1432, 1290, 1134, 1419, 1459, 1420, 1433, 1446, - 1601, 1122, 1135, 1291, 1460, 1588, 1602, 1447, - 1304, 1616, 601, 614, 769, 770, 782, 926, - 938, 939, 951, 1095, 1107, 1108, 1276, 446, - 602, 615, 771, 783, 795, 927, 940, 952, - 1096, 1109, 1120, 1277, 447, 603, 616, 772, - 784, 796, 928, 941, 953, 964, 1097, 1110, - 1121, 1278, 1289, 459, 628, 785, 797, 954, - 1122, 1290, 460, 629, 1123, 1134, 1291, 798, - 1135, 1304, 799, 955, 968, 1124, 1136, 1292, - 1264, 1265, 1266, 1279, 1137, 1293, 447, 448, - 459, 604, 615, 616, 617, 628, 772, 773, - 784, 785, 796, 797, 929, 941, 942, 952, - 953, 954, 1098, 1110, 1111, 1121, 1122, 1279, - 449, 460, 605, 618, 629, 774, 786, 798, - 930, 943, 955, 1099, 1112, 1123, 1280, 1134, - 1291, 787, 799, 956, 1124, 1135, 1292, 631, - 968, 1125, 1136, 1293, 1304, 800, 969, 1137, - 1306, 1138, 1294, 1267, 1290, 1268, 1281, 950, - 1119, 1288, 782, 795, 951, 1107, 1120, 1276, - 1289, 614, 783, 952, 964, 1121, 796, 1134, - 1290, 1445, 459, 628, 797, 1122, 1135, 1291, - 1304, 1459, 629, 798, 1136, 799, 968, 1292, - 1460, 1137, 1306, 1461, 631, 800, 969, 1138, - 1293, 1462, 1630, 1463, 1476, 1632, 645, 1139, - 1815, 1993, 1994, 1277, 1432, 1601, 1446, 1786, - 1787, 1464, 1602, 1616, 1433, 1588, 1757, 1617, - 1447, 1603, 1590, 1732, 1604, 1775, 343, 344, - 345, 356, 1029, 1198, 357, 535, 536, 704, - 1032, 1200, 1201, 366, 873, 705, 1033, 874, - 706, 865, 875, 1202, 537, 718, 887, 1043, - 1044, 1212, 538, 707, 719, 876, 888, 1034, - 1045, 1203, 1213, 1056, 1057, 1214, 1371, 900, - 1055, 1068, 1069, 1211, 1224, 1225, 1226, 1237, - 1380, 1381, 1382, 1393, 345, 356, 357, 1032, - 1033, 1200, 1201, 865, 1034, 1202, 1203, 697, - 866, 540, 708, 709, 877, 1035, 707, 876, - 878, 539, 720, 889, 1045, 1046, 1214, 1371, - 371, 384, 552, 553, 565, 721, 722, 733, - 734, 890, 891, 902, 1047, 1058, 1059, 1215, - 1216, 1227, 903, 1060, 1071, 1228, 1383, 1384, - 541, 710, 735, 867, 879, 904, 1048, 1072, - 1229, 1385, 1057, 1070, 1213, 1226, 1239, 1382, - 1395, 1240, 1396, 1073, 1217, 1241, 1397, 347, - 697, 865, 866, 1033, 1034, 1035, 1202, 1203, - 698, 867, 373, 542, 880, 1049, 541, 710, - 568, 724, 893, 1037, 879, 723, 892, 1048, - 1217, 906, 1231, 372, 385, 554, 722, 735, - 878, 891, 904, 1047, 1060, 1216, 1229, 567, - 736, 1061, 905, 1230, 1371, 1386, 1074, 1073, - 1385, 1075, 1375, 1059, 1072, 1215, 1228, 1241, - 1242, 1384, 1397, 1398, 1243, 1399, 1244, 919, - 366, 379, 535, 536, 548, 704, 705, 717, - 729, 873, 886, 1029, 1042, 1198, 1200, 1210, - 1211, 1223, 1236, 874, 1043, 1055, 537, 549, - 706, 718, 730, 875, 887, 899, 1032, 1044, - 1056, 1201, 1212, 1224, 561, 1068, 550, 562, - 707, 719, 731, 743, 876, 888, 900, 912, - 1057, 1069, 1213, 1225, 1237, 574, 1081, 1380, - 563, 575, 720, 732, 744, 756, 889, 901, - 913, 925, 1045, 1070, 1082, 1214, 1226, 1238, - 1250, 1381, 1393, 1058, 1094, 1239, 1251, 1382, - 1394, 1406, 1249, 1405, 1549, 1227, 1263, 1383, - 1395, 1407, 1419, 1550, 538, 550, 706, 707, - 718, 719, 731, 874, 875, 876, 887, 888, - 900, 1032, 1033, 1043, 1044, 1045, 1056, 1057, - 1201, 1202, 1212, 1213, 1225, 539, 551, 708, - 720, 732, 865, 877, 889, 901, 1034, 1046, - 1058, 1203, 1214, 1226, 1371, 563, 744, 913, - 1069, 1070, 1238, 552, 564, 709, 721, 733, - 745, 878, 890, 902, 914, 1059, 1071, 1215, - 1227, 1239, 576, 757, 926, 1082, 1083, 1251, - 1382, 565, 577, 722, 734, 746, 758, 891, - 903, 915, 927, 1047, 1072, 1084, 1216, 1228, - 1240, 1252, 1383, 1381, 1394, 1395, 1095, 1407, - 1060, 1096, 1241, 1253, 1384, 1396, 1408, 1264, - 1420, 1551, 1229, 1265, 1385, 1397, 1409, 1421, - 1552, 540, 552, 708, 709, 720, 721, 733, - 876, 877, 878, 889, 890, 902, 1034, 1045, - 1046, 1047, 1058, 1059, 1203, 1214, 1215, 1227, - 553, 722, 734, 866, 891, 903, 1035, 1060, - 1216, 1228, 372, 385, 541, 554, 566, 579, - 698, 710, 723, 735, 747, 748, 867, 879, - 892, 904, 916, 1048, 1072, 1073, 1217, 1229, - 1241, 1385, 565, 746, 915, 1071, 1240, 917, - 1061, 1242, 578, 759, 928, 1084, 1085, 1253, - 1384, 760, 929, 1086, 1254, 567, 736, 761, - 905, 930, 1074, 1230, 1255, 1383, 1397, 1398, - 1396, 1097, 1409, 1098, 1410, 1099, 1243, 1386, - 1411, 1266, 1422, 1267, 1423, 1268, 1399, 1424, - 554, 710, 723, 867, 879, 892, 1048, 1061, - 1217, 373, 542, 567, 580, 724, 736, 749, - 880, 893, 905, 1049, 1074, 1230, 1386, 568, - 581, 750, 906, 1037, 1075, 1231, 543, 712, - 919, 1244, 1375, 918, 1243, 763, 881, 932, - 1101, 1257, 1413, 1087, 762, 931, 1256, 1270, - 1399, 1100, 1412, 1283, 1388, 1555, 1269, 1425, - 1581, 1113, 1282, 1438, 1451, 1464, 1580, 1593, - 1762, 1632, 1775, 1295, 1127, 716, 729, 872, - 1041, 1210, 1223, 1366, 1236, 1249, 548, 561, - 574, 704, 705, 717, 718, 730, 743, 873, - 874, 886, 887, 899, 1042, 1043, 1055, 1068, - 1106, 1211, 1212, 1224, 1262, 1380, 1405, 1418, - 587, 731, 756, 900, 912, 1056, 1081, 1225, - 1237, 1275, 1393, 1431, 925, 950, 1069, 1250, - 1381, 1406, 1549, 1094, 1119, 1238, 1394, 1562, - 1263, 1288, 1419, 1550, 1575, 1407, 1432, 1588, - 1601, 1732, 574, 718, 730, 731, 743, 874, - 886, 887, 899, 900, 912, 1042, 1043, 1055, - 1056, 1068, 1081, 1211, 1212, 1224, 1225, 1237, - 1380, 575, 587, 719, 732, 744, 756, 875, - 888, 901, 913, 925, 1044, 1057, 1069, 1082, - 1094, 1213, 1226, 1238, 1250, 1381, 1393, 576, - 588, 720, 733, 745, 757, 769, 876, 889, - 902, 914, 926, 938, 1045, 1058, 1070, 1083, - 1095, 1214, 1227, 1239, 1251, 1263, 1382, 1394, - 600, 1107, 1406, 589, 601, 746, 758, 770, - 915, 927, 939, 1071, 1096, 1108, 1240, 1252, - 1264, 1276, 1395, 1407, 1383, 1419, 1084, 1265, - 1277, 1396, 1408, 1420, 1432, 1549, 1550, 1562, - 1551, 1575, 1253, 1409, 1421, 1433, 1445, 1564, - 577, 589, 721, 733, 734, 745, 746, 757, - 758, 770, 877, 889, 890, 901, 902, 903, - 913, 914, 915, 926, 927, 939, 1045, 1046, - 1057, 1058, 1059, 1070, 1071, 1082, 1083, 1084, - 1095, 1096, 1214, 1215, 1226, 1227, 1228, 1238, - 1239, 1240, 1251, 1252, 1264, 1383, 1395, 578, - 590, 722, 735, 747, 759, 771, 878, 891, - 904, 916, 928, 940, 1047, 1060, 1072, 1085, - 1097, 1216, 1229, 1241, 1253, 1265, 1384, 1396, - 602, 1108, 1109, 1277, 1408, 591, 603, 748, - 760, 772, 917, 929, 941, 1073, 1098, 1110, - 1242, 1254, 1266, 1278, 1397, 1409, 1407, 1420, - 1385, 1421, 1433, 1086, 1267, 1279, 1398, 1410, - 1422, 1434, 1552, 1564, 1565, 1446, 1577, 1255, - 1411, 1423, 1435, 1447, 1578, 579, 591, 735, - 747, 748, 759, 760, 772, 891, 903, 904, - 915, 916, 917, 928, 929, 941, 1047, 1059, - 1060, 1072, 1073, 1084, 1085, 1086, 1097, 1098, - 1216, 1228, 1229, 1240, 1241, 1242, 1253, 1254, - 1266, 1385, 1397, 592, 723, 736, 761, 773, - 879, 892, 905, 930, 942, 1048, 1061, 1099, - 1217, 1230, 1255, 1267, 1398, 580, 749, 774, - 918, 943, 1074, 1087, 1243, 1268, 1386, 604, - 1110, 1111, 1279, 1410, 605, 1112, 1280, 1411, - 593, 762, 931, 1100, 1256, 1281, 1399, 1409, - 1422, 1423, 1424, 1435, 1436, 1269, 1412, 1437, - 1567, 1555, 1448, 1449, 1580, 1425, 1450, 426, - 764, 881, 1388, 1115, 713, 1453, 1127, 716, - 729, 872, 1041, 1210, 1223, 1236, 1249, 1405, - 1106, 1262, 1275, 1418, 574, 587, 600, 730, - 731, 743, 744, 756, 769, 887, 899, 900, - 912, 913, 925, 950, 1055, 1056, 1068, 1069, - 1081, 1094, 1119, 1212, 1224, 1225, 1237, 1238, - 1250, 1380, 1393, 1406, 1431, 757, 926, 938, - 1082, 1107, 1251, 1263, 1288, 1419, 770, 782, - 939, 1095, 1264, 1276, 1432, 1381, 1394, 1407, - 951, 1108, 1420, 1445, 1549, 1562, 1575, 1588, - 1120, 1277, 1433, 1601, 600, 744, 756, 757, - 769, 900, 912, 913, 925, 926, 938, 1068, - 1069, 1081, 1082, 1094, 1107, 1225, 1237, 1238, - 1250, 1251, 1263, 1406, 601, 745, 758, 770, - 901, 914, 927, 939, 1070, 1083, 1095, 1108, - 1226, 1239, 1252, 1264, 1276, 1407, 1419, 602, - 746, 759, 771, 782, 902, 915, 928, 940, - 951, 1071, 1084, 1096, 1109, 1227, 1240, 1253, - 1265, 1277, 1408, 1420, 1120, 1432, 614, 772, - 783, 941, 952, 1097, 1121, 1266, 1278, 1289, - 1421, 1433, 1445, 615, 784, 795, 953, 964, - 1110, 1122, 1279, 1290, 1434, 1446, 1394, 1395, - 1396, 1409, 1422, 1291, 1435, 1447, 1575, 1588, - 1577, 1601, 1590, 1602, 1448, 1459, 1603, 603, - 747, 759, 760, 771, 772, 783, 903, 915, - 916, 927, 928, 929, 939, 940, 941, 952, - 1071, 1072, 1083, 1084, 1085, 1096, 1097, 1108, - 1109, 1110, 1228, 1240, 1241, 1252, 1253, 1254, - 1264, 1265, 1266, 1277, 1278, 1409, 1421, 604, - 748, 761, 773, 784, 904, 917, 930, 942, - 953, 1073, 1086, 1098, 1111, 1229, 1242, 1255, - 1267, 1279, 1410, 1422, 615, 1121, 1122, 1290, - 1434, 616, 774, 785, 943, 954, 1099, 1123, - 1268, 1280, 1291, 1423, 1435, 796, 1447, 617, - 786, 797, 955, 1112, 1124, 1281, 1292, 1436, - 1448, 1397, 1433, 1446, 1398, 1411, 1424, 1134, - 1459, 1135, 1293, 1437, 1449, 1460, 1578, 1590, - 1591, 1603, 1604, 1616, 1304, 1450, 1461, 1605, - 1617, 605, 761, 773, 774, 785, 917, 929, - 930, 941, 942, 943, 954, 1073, 1085, 1086, - 1098, 1099, 1110, 1111, 1112, 1242, 1254, 1255, - 1266, 1267, 1268, 1279, 1280, 1411, 1423, 749, - 762, 786, 905, 918, 931, 955, 1074, 1087, - 1230, 1243, 1256, 1281, 1424, 606, 775, 787, - 944, 956, 1100, 1113, 1269, 1412, 617, 1123, - 1124, 1292, 1436, 618, 1125, 1293, 1437, 1282, - 1294, 1425, 798, 1449, 799, 968, 1450, 619, - 788, 800, 957, 969, 1126, 1438, 1435, 1448, - 1399, 1136, 1461, 1137, 1462, 1138, 1295, 1451, - 1463, 1580, 1593, 1581, 1605, 1306, 782, 783, - 939, 951, 952, 1107, 1108, 1120, 1264, 1276, - 1277, 1289, 1445, 784, 795, 940, 953, 964, - 1109, 1121, 1265, 1278, 1290, 1446, 785, 796, - 941, 954, 1110, 1122, 1134, 1266, 1279, 1291, - 1447, 628, 797, 1123, 1135, 1292, 1459, 798, - 1304, 1460, 1136, 799, 968, 1137, 1293, 1306, - 1461, 1433, 1434, 1435, 1448, 1462, 1630, 1616, - 1602, 1138, 1294, 1463, 628, 785, 786, 796, - 797, 942, 953, 954, 955, 1110, 1111, 1122, - 1123, 1134, 1135, 1267, 1279, 1280, 1290, 1291, - 1292, 1448, 629, 787, 798, 943, 956, 1112, - 1124, 1136, 1268, 1281, 1293, 1304, 1449, 1460, - 799, 968, 1125, 1137, 1294, 1461, 800, 969, - 1306, 1462, 1138, 1463, 1476, 1436, 1459, 1437, - 1450, 1630, 1632, 1617, 1139, 645, 1464, 1815, - 1993, 1994, 1605, 1787, 1786, 1762, 1775, 787, - 798, 799, 955, 956, 968, 1112, 1124, 1125, - 1136, 1137, 1281, 1292, 1293, 1294, 1450, 631, - 788, 800, 944, 957, 969, 1113, 1138, 1269, - 1282, 1306, 1126, 1295, 1451, 1462, 1463, 1139, - 1464, 1476, 645, 1127, 1461, 1438, 1632, 196, - 1366, 1029, 1041, 1198, 1210, 872, 1223, 1236, - 873, 1042, 1211, 1249, 1405, 1380, 1418, 1200, - 1549, 1381, 1393, 1431, 1562, 1550, 1575, 1406, - 1551, 1732, 1588, 1757, 1262, 1275, 1032, 1201, - 1043, 1212, 1224, 1371, 1382, 1394, 1395, 1407, - 1552, 1564, 1786, 1762, 1775, 1787, 1202, 1383, - 1384, 1396, 1565, 1577, 1578, 1590, 1591, 1567, - 1603, 1604, 1580, 1616, 1029, 1198, 1366, 872, - 1041, 1210, 1200, 1032, 1042, 1201, 1211, 1223, - 704, 873, 1380, 874, 1043, 1055, 1212, 1224, - 717, 886, 1236, 1249, 1405, 875, 887, 1044, - 1056, 1068, 1202, 1213, 1225, 1237, 1381, 1393, - 1549, 1418, 1371, 1382, 1394, 1550, 1406, 1562, - 1551, 1575, 1033, 1034, 1203, 876, 888, 1045, - 1057, 1069, 1214, 1226, 1238, 1383, 1395, 1046, - 1058, 1215, 1227, 1239, 1384, 1396, 1407, 1552, - 1408, 1564, 1565, 1577, 1032, 1033, 1200, 1201, - 1202, 1371, 865, 1034, 1203, 697, 866, 1035, - 1046, 1215, 1214, 878, 1047, 1059, 1216, 1228, - 1384, 709, 877, 890, 1045, 1058, 1071, 1227, - 1240, 1383, 1385, 1396, 1552, 891, 1060, 1072, - 1229, 1241, 1397, 1226, 1239, 1382, 1395, 1551, - 879, 1048, 1073, 1217, 1242, 1398, 1408, 1564, - 1409, 1565, 1386, 1410, 1411, 1423, 1555, 1567, - 1550, 1577, 1578, 1422, 1580, 1590, 1591, 697, - 866, 1034, 1035, 1203, 1371, 698, 867, 879, - 1048, 1217, 373, 542, 723, 724, 880, 892, - 893, 905, 1037, 1049, 1061, 1074, 1230, 1231, - 1386, 1399, 1047, 1216, 710, 1060, 1229, 1385, - 736, 1243, 1555, 878, 891, 1215, 1228, 1384, - 1073, 1242, 1398, 906, 1075, 1375, 904, 1241, - 1397, 1244, 1412, 1087, 1256, 1410, 1411, 1567, - 1425, 1581, 919, 1257, 1413, 1046, 1383, 1552, - 1059, 1396, 1565, 1438, 1227, 1409, 1551, 1580, - 1388, 1578, 1270, 1366, 1041, 1210, 872, 1223, - 1198, 1236, 873, 1042, 1211, 1249, 1405, 1055, - 1224, 1262, 1380, 1418, 716, 1068, 1106, 1212, - 1237, 1275, 1393, 1431, 1549, 1381, 1406, 1562, - 1550, 1575, 1419, 1588, 1551, 1732, 1432, 1564, - 1601, 1757, 1288, 1786, 1762, 1787, 1445, 1775, - 1602, 1119, 1616, 1617, 1993, 1081, 1094, 1107, - 1238, 1250, 1251, 1263, 1276, 1394, 1407, 950, - 1264, 1420, 1120, 1277, 1289, 1433, 1446, 873, - 886, 1042, 1043, 1055, 1200, 1211, 1212, 1224, - 1236, 1249, 1380, 1405, 1381, 1393, 1044, 1056, - 1213, 1225, 1237, 1382, 1394, 1549, 1068, 1406, - 1057, 1069, 1214, 1226, 1238, 1250, 1395, 1407, - 1550, 1562, 1081, 1419, 1070, 1082, 1227, 1239, - 1251, 1263, 1383, 1408, 1420, 1551, 1575, 1418, - 1396, 1432, 1552, 1564, 1588, 1577, 1565, 1601, - 1732, 1421, 1433, 1578, 1590, 1602, 1757, 1045, - 1057, 1213, 1214, 1225, 1226, 1238, 1371, 1381, - 1382, 1383, 1394, 1395, 1550, 1046, 1058, 1215, - 1227, 1239, 1384, 1396, 1551, 1070, 1251, 1407, - 1408, 1059, 1071, 1216, 1228, 1240, 1252, 1397, - 1409, 1552, 1564, 1083, 1264, 1420, 1421, 1072, - 1084, 1229, 1241, 1253, 1265, 1385, 1410, 1422, - 1565, 1577, 1433, 1398, 1434, 1578, 1590, 1591, - 1602, 1567, 1603, 1575, 1588, 1732, 1601, 1757, - 1423, 1435, 1580, 1604, 1616, 1047, 1059, 1215, - 1216, 1227, 1228, 1240, 1383, 1384, 1385, 1396, - 1397, 1552, 1060, 1229, 1241, 1398, 879, 892, - 1048, 1061, 1073, 1086, 1217, 1230, 1242, 1254, - 1255, 1386, 1410, 1411, 1567, 1072, 1253, 1409, - 1565, 1399, 1085, 1266, 1422, 1423, 1578, 1267, - 1424, 1074, 1243, 1268, 1412, 1555, 1580, 1435, - 1591, 1436, 1437, 1593, 1408, 1421, 1564, 1577, - 1434, 1590, 1581, 1603, 1604, 1605, 1425, 1450, - 1616, 1617, 1762, 1081, 1225, 1237, 1238, 1250, - 1380, 1381, 1393, 1394, 1406, 1419, 1549, 1550, - 1562, 1082, 1094, 1226, 1239, 1251, 1263, 1382, - 1395, 1407, 1420, 1432, 1551, 1575, 1083, 1095, - 1227, 1240, 1252, 1264, 1276, 1383, 1396, 1408, - 1421, 1433, 1552, 1564, 1588, 1107, 1445, 1096, - 1108, 1253, 1265, 1277, 1409, 1434, 1446, 1565, - 1577, 1601, 1422, 1578, 1590, 1602, 1603, 1732, - 1591, 1757, 1447, 1604, 1616, 1084, 1096, 1228, - 1240, 1241, 1252, 1253, 1264, 1265, 1277, 1383, - 1384, 1395, 1396, 1397, 1408, 1409, 1420, 1421, - 1422, 1433, 1434, 1552, 1564, 1565, 1577, 1085, - 1097, 1229, 1242, 1254, 1266, 1278, 1385, 1398, - 1410, 1423, 1435, 1578, 1590, 1109, 1446, 1447, - 1602, 1098, 1110, 1255, 1267, 1279, 1411, 1436, - 1448, 1567, 1591, 1603, 1424, 1580, 1604, 1616, - 1605, 1617, 1593, 1732, 1757, 1449, 1086, 1098, - 1242, 1254, 1255, 1266, 1267, 1279, 1385, 1397, - 1398, 1410, 1411, 1422, 1423, 1424, 1435, 1436, - 1567, 1578, 1591, 1099, 1230, 1243, 1268, 1280, - 1386, 1399, 1437, 1555, 1580, 1087, 1256, 1281, - 1412, 1425, 1593, 1111, 1448, 1449, 1604, 1112, - 1450, 1605, 1100, 1269, 1438, 1581, 1617, 1462, - 1630, 1762, 1451, 1463, 1775, 1616, 1786, 1787, - 1632, 1107, 1251, 1263, 1264, 1276, 1406, 1407, - 1419, 1420, 1432, 1445, 1575, 1588, 1108, 1252, - 1265, 1277, 1408, 1421, 1433, 1446, 1564, 1577, - 1601, 1109, 1253, 1266, 1278, 1289, 1409, 1422, - 1434, 1447, 1565, 1578, 1590, 1602, 1120, 1121, - 1279, 1290, 1435, 1459, 1591, 1603, 1122, 1291, - 1448, 1460, 1604, 1616, 1617, 1757, 1732, 1461, - 1605, 1630, 1786, 1110, 1254, 1266, 1267, 1278, - 1279, 1290, 1409, 1410, 1421, 1422, 1423, 1434, - 1435, 1446, 1447, 1448, 1578, 1590, 1591, 1602, - 1603, 1111, 1255, 1268, 1280, 1291, 1411, 1424, - 1436, 1449, 1567, 1580, 1604, 1616, 1122, 1459, - 1460, 1123, 1281, 1292, 1437, 1461, 1593, 1605, - 1617, 1124, 1293, 1304, 1450, 1462, 1630, 1762, - 1786, 1775, 1787, 1632, 1112, 1268, 1280, 1281, - 1292, 1411, 1423, 1424, 1436, 1437, 1448, 1449, - 1450, 1580, 1593, 1604, 1605, 1617, 1256, 1269, - 1293, 1412, 1425, 1581, 1113, 1282, 1294, 1438, - 1451, 1124, 1461, 1462, 1125, 1463, 1630, 1306, - 1126, 1295, 1464, 1632, 1476, 1762, 1413, 1775, - 1787, 1786, 950, 1106, 1119, 1262, 1275, 1288, - 1418, 1431, 951, 1107, 1120, 1263, 1264, 1276, - 1277, 1289, 1419, 1420, 1432, 1433, 1445, 1575, - 1588, 1601, 1446, 1602, 964, 1121, 1290, 1459, - 795, 1134, 1291, 1447, 1603, 1616, 796, 1460, - 1757, 952, 1135, 1304, 1461, 1278, 1434, 1590, - 1292, 1617, 1630, 1562, 1604, 1136, 1786, 1732, - 1448, 1591, 1605, 1787, 1293, 1462, 1137, 1306, - 968, 1138, 1294, 1463, 1476, 1632, 1449, 1775, - 1762, 1137, 1294, 1306, 1450, 1462, 1463, 1630, - 1138, 1295, 1451, 1476, 1632, 1464, 1139, 1127, - 645, 1815, 1775, 1787, 1203, 1371, 1381, 1382, - 1383, 1549, 1550, 1551, 1552, 1214, 1215, 1384, - 1395, 1396, 1564, 1565, 1035, 1216, 1228, 1385, - 1397, 1409, 1577, 1394, 1562, 1229, 1398, 1410, - 1567, 1578, 1217, 1386, 1411, 1422, 1423, 1555, - 1580, 1590, 1591, 1732, 1399, 1593, 1575, 1602, - 1603, 1757, 1604, 1605, 1616, 1581, 1762, 1424, - 1617, 1786, 1775, 1787, 1408, 1588, 1601, 1434, - 1435, 1436, 1448, 1412, 1425, 1437, 1449, 1815, - 1993, 1994, 1216, 1217, 1228, 1229, 1383, 1384, - 1385, 1386, 1396, 1397, 1398, 1409, 1410, 1552, - 1564, 1565, 1567, 1578, 1048, 1230, 1242, 1399, - 1411, 1555, 1580, 1412, 1037, 1049, 1231, 1375, - 1413, 1581, 1423, 1591, 1244, 1425, 1438, 1593, - 1257, 1388, 1270, 1451, 1422, 1577, 1762, 1775, - 1605, 1787, 1283, 1464, 1632, 1732, 1786, 1604, - 1453, 1815, 1993, 1994, 1393, 1549, 1550, 1562, - 1394, 1406, 1551, 1575, 1395, 1407, 1552, 1564, - 1588, 1732, 1419, 1565, 1577, 1601, 1757, 1786, - 1762, 1787, 1775, 1432, 1551, 1564, 1575, 1577, - 1588, 1601, 1732, 1757, 1565, 1578, 1590, 1591, - 1602, 1603, 1447, 1604, 1616, 1617, 1605, 1786, - 1580, 1593, 1762, 1787, 1775, 1993, 1435, 1567, - 1436, 1448, 1449, 1460, 1994, 1119, 1275, 1288, - 1406, 1418, 1419, 1431, 1445, 1549, 1562, 1459, - 1630, 1304, 1461, 1134, 1135, 1437, 1555, 1581, - 1632, 1815, 1476, 1290, 1289, 1446, 1306, 1462, - 1463, -}; - -static long _vq_fitmap_lsp12_0[] = { - 0, 0, 0, 71, 142, 206, 206, 241, - 0, 0, 329, 142, 206, 206, 241, 0, - 359, 410, 142, 206, 206, 241, 463, 529, - 608, 667, 206, 206, 241, 739, 825, 897, - 667, 963, 963, 1021, 1151, 897, 1227, 1295, - 963, 963, 1328, 1328, 1328, 1295, 963, 963, - 963, 241, 1393, 0, 71, 142, 206, 206, - 1393, 0, 1453, 1533, 1618, 206, 206, 1687, - 1755, 1838, 1938, 667, 206, 206, 2025, 2089, - 2191, 2291, 667, 963, 206, 2376, 2466, 2557, - 1227, 1295, 963, 963, 2620, 1328, 1328, 1295, - 963, 963, 963, 1328, 963, 963, 963, 963, - 963, 963, 1687, 1393, 1393, 71, 2692, 206, - 206, 1687, 2745, 2824, 2926, 1618, 206, 206, - 1687, 3026, 3133, 3253, 3356, 206, 206, 3427, - 3503, 3613, 3732, 3356, 963, 963, 3830, 3898, - 3966, 1227, 1295, 963, 963, 4031, 1328, 1328, - 1295, 963, 963, 963, 1328, 963, 963, 963, - 963, 963, 963, 1687, 1687, 4102, 4156, 4231, - 206, 206, 1687, 4296, 4388, 4497, 4600, 206, - 206, 4669, 4738, 4848, 4965, 3356, 5063, 206, - 5071, 5148, 5255, 5369, 963, 206, 206, 3830, - 5462, 5524, 5591, 1295, 206, 206, 4031, 5524, - 1328, 963, 963, 963, 963, 963, 963, 963, - 963, 963, 963, 963, 5631, 5692, 5692, 5764, - 5831, 206, 206, 5907, 5975, 6039, 6109, 4600, - 206, 206, 4669, 6179, 6245, 6310, 963, 5063, - 206, 5907, 6369, 6427, 6484, 963, 206, 206, - 6530, 6530, 5524, 6601, 963, 963, 963, 4031, - 4031, 963, 963, 963, 963, 963, 963, 963, - 963, 963, 963, 963, 963, 5631, 5631, 5631, - 6620, 6690, 963, 963, 5907, 6748, 6620, 6620, - 963, 963, 963, 5907, 6771, 6771, 6771, 963, - 963, 963, 5907, 6771, 6771, 5524, 963, 963, - 963, 6771, 6771, 5524, 963, 963, 963, 963, - 6771, 4031, 963, 963, 963, 963, 963, 963, - 963, 963, 963, 963, 963, 963, 5631, 5907, - 6620, 6620, 5524, 963, 963, 5907, 6620, 5524, - 5524, 963, 963, 963, 6620, 5524, 5524, 963, - 963, 963, 963, 6620, 5524, 963, 963, 963, - 963, 963, 6620, 963, 963, 963, 963, 963, - 963, 963, 963, 963, 963, 963, 963, 963, - 963, 963, 963, 963, 963, 963, 963, -}; - -static long _vq_fitlength_lsp12_0[] = { - 71, 71, 71, 71, 64, 35, 35, 88, - 71, 71, 30, 64, 35, 35, 88, 71, - 51, 53, 64, 35, 35, 88, 66, 79, - 59, 72, 35, 35, 88, 86, 72, 66, - 72, 58, 58, 130, 76, 66, 68, 33, - 58, 58, 65, 65, 65, 33, 58, 58, - 58, 88, 60, 71, 71, 64, 35, 35, - 60, 71, 80, 85, 69, 35, 35, 68, - 83, 100, 87, 72, 35, 35, 64, 102, - 100, 85, 72, 58, 35, 90, 91, 63, - 68, 33, 58, 58, 72, 65, 65, 33, - 58, 58, 58, 65, 58, 58, 58, 58, - 58, 58, 68, 60, 60, 71, 53, 35, - 35, 68, 79, 102, 100, 69, 35, 35, - 68, 107, 120, 103, 71, 35, 35, 76, - 110, 119, 98, 71, 58, 58, 68, 68, - 65, 68, 33, 58, 58, 71, 65, 65, - 33, 58, 58, 58, 65, 58, 58, 58, - 58, 58, 58, 68, 68, 54, 75, 65, - 35, 35, 68, 92, 109, 103, 69, 35, - 35, 69, 110, 117, 98, 71, 8, 35, - 77, 107, 114, 93, 58, 35, 35, 68, - 62, 67, 40, 33, 35, 35, 71, 67, - 65, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 61, 72, 72, 67, - 76, 35, 35, 68, 64, 70, 70, 69, - 35, 35, 69, 66, 65, 59, 58, 8, - 35, 68, 58, 57, 46, 58, 35, 35, - 71, 71, 67, 19, 58, 58, 58, 71, - 71, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 61, 61, 61, - 70, 58, 58, 58, 68, 23, 70, 70, - 58, 58, 58, 68, 62, 62, 62, 58, - 58, 58, 68, 62, 62, 67, 58, 58, - 58, 62, 62, 67, 58, 58, 58, 58, - 62, 71, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 61, 68, - 70, 70, 67, 58, 58, 68, 70, 67, - 67, 58, 58, 58, 70, 67, 67, 58, - 58, 58, 58, 70, 67, 58, 58, 58, - 58, 58, 70, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, -}; - -static encode_aux_pigeonhole _vq_auxp_lsp12_0 = { - 0.15, 0.01, 40, 7, - _vq_pigeonmap_lsp12_0, - 6833, - _vq_fitlist_lsp12_0, - _vq_fitmap_lsp12_0, - _vq_fitlength_lsp12_0 -}; - -static static_codebook _vq_book_lsp12_0 = { - 3, 2197, - _vq_lengthlist_lsp12_0, - 1, 1605579571, 1597274849, 6, 1, - _vq_quantlist_lsp12_0, - NULL, - NULL, - &_vq_auxp_lsp12_0, -}; - - -#endif diff --git a/include/vorbis/book/lsp30_0.vqh b/include/vorbis/book/lsp30_0.vqh deleted file mode 100644 index b9e95e43..00000000 --- a/include/vorbis/book/lsp30_0.vqh +++ /dev/null @@ -1,2073 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_lsp30_0_VQH_ -#define _V_lsp30_0_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_lsp30_0[] = { - 0, - 5, - 6, - 7, - 8, - 9, - 10, - 12, - 14, - 16, - 18, - 22, - 26, - 30, -}; - -static long _vq_lengthlist_lsp30_0[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,20,18,16,15,17,18, 0, 0, 0, 0, 0, 0, 0, - 19,17,15,14,16,19,20, 0, 0, 0, 0, 0, 0, 0,20,16, - 15,16,16, 0, 0, 0, 0, 0, 0, 0, 0,20, 0,20,16,19, - 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,20,17,18, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,18,17, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,20,18, 0,20, 0, 0, - 0, 0, 0, 0, 0, 0, 0,19, 0,18, 0,20, 0,20, 0, 0, - 0, 0, 0, 0, 0, 0, 0,19, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 20,20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,19, - 0, 0, 0, 0, 0,19,16,14,13,13,15,18,20,20, 0, 0, - 0, 0, 0, 0, 0, 0,16,16,16,19,19, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,17,17,20, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,17,17,19, 0,19,17,20, 0, 0, 0, 0, 0, 0, - 0,17,16,17, 0,14,17, 0, 0, 0, 0, 0, 0, 0, 0,16, - 18,18,17,14,20, 0, 0, 0, 0, 0, 0,20,19,16,18,16, - 14,13,19, 0, 0, 0, 0, 0, 0, 0,20,18,16,15,15,15, - 20,20, 0, 0, 0, 0, 0, 0,18,16,16,18,18,18,17, 0, - 0, 0, 0, 0,20, 0,17,18,18,20,17,18,18, 0, 0, 0, - 0, 0, 0,19,19,17,15,15,16,18,20, 0, 0, 0, 0, 0, - 0, 0,20,17,19, 0, 0,20, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 20,19, 0,20, 0, 0, 0, 0,19,17,15,15,14,14,17,18, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,20,17, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,17, 0, 0, 0,18, 0, - 0, 0, 0, 0, 0, 0, 0,18,15,18,20,18,20, 0, 0, 0, - 0, 0, 0, 0, 0,14,18,18, 0,20,18, 0, 0, 0, 0, 0, - 0, 0, 0,14,17,19,18,15,20, 0, 0, 0, 0, 0, 0,19, - 18,17,16,18,16,15, 0,20, 0, 0, 0, 0, 0, 0,19,16, - 16,15,15,15,19,20, 0, 0, 0, 0, 0, 0,20,18,17,15, - 15,15,17,18, 0, 0,20,17,18, 0,17,18,18,17,14,16, - 18,19, 0, 0, 0, 0, 0,17,17,16,14,15,15,18,20, 0, - 0, 0, 0, 0, 0, 0,19,19,18,17,20, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,20,15,17,18,18,20,20, 0, 0, 0, 0,16,15,16, - 14,15,16,18,19,20,18, 0, 0, 0, 0, 0, 0, 0, 0,18, - 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,19,16,20, - 19,19,20, 0, 0, 0, 0, 0, 0, 0,18,15,16, 0,19,20, - 18, 0, 0, 0, 0, 0,19,18,16,15,17,18,18,17, 0, 0, - 0, 0, 0, 0, 0,20,17,18,18,17, 0,16,20, 0, 0, 0, - 0, 0, 0,20,17,14,15,17,16,15,20,20, 0, 0, 0, 0, - 0, 0,19,17,15,13,13,14,17,17, 0, 0, 0, 0,19, 0, - 0,17,17,14,13,14,17,20, 0, 0,20,19, 0,20, 0,18, - 17,14,13,15,15,20, 0, 0, 0, 0,20,18,16,16,14,14, - 13,19,20, 0, 0, 0, 0, 0, 0, 0, 0,17,16,14,18,18, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,20, - 0, 0, 0, 0, 0,17,15,14,15,16,17,19,20, 0, 0, 0, - 0,20,19,15,14,15,16,16,20,17,20, 0, 0, 0, 0, 0, - 0, 0, 0,19,18, 0, 0,19, 0, 0, 0, 0, 0, 0, 0, 0, - 0,17,16,16,16,17, 0,20, 0, 0, 0, 0,19,16,15,15, - 17,18,16,17,18, 0, 0, 0, 0, 0,16,15,14,17,16,17, - 17,17,18,19, 0, 0, 0,20, 0,17, 0,16,14,15,15,15, - 18,19, 0, 0, 0, 0, 0,20,17,16,14,15,14,14,16,16, - 0, 0, 0, 0, 0, 0,19,16,15,13,13,13,16,17, 0, 0, - 0, 0, 0,20,18,18,16,13,12,13,19,19, 0, 0,20, 0, - 0, 0,20,16,14,13,12,14,18, 0, 0, 0, 0, 0,18,18, - 17,15,13,13,11,17, 0,17, 0, 0, 0, 0, 0,17,17,18, - 15,12,19, 0, 0,20, 0, 0, 0, 0, 0, 0, 0, 0,19, 0, - 0, 0, 0, 0, 0, 0, 0,18,17,16,14,14,15,16,16,17, - 18, 0, 0, 0, 0, 0,19,18,14,16,16,18,17,17,20, 0, - 0, 0, 0, 0, 0, 0,18,18,18,17,17,18, 0, 0, 0, 0, - 0, 0, 0, 0,18,16,15,15,16,16,19, 0, 0, 0, 0, 0, - 20,16,15,16,19,15,15,14,19, 0, 0, 0, 0,19,19,18, - 15,17,16,14,15,15,18, 0, 0, 0, 0, 0, 0, 0,20,14, - 14,15,14,14,16,17, 0, 0, 0, 0,20, 0,18,15,14,14, - 13,13,17,19, 0, 0, 0, 0, 0,20,19,15,14,13,12,12, - 19,13, 0, 0, 0,20, 0,18,17,15,13,12,12,12,20,16, - 0,20, 0,20,18,17,17,15,12,11,11,13,19,16, 0, 0, - 0,19,17,16,19,14,12,12,12,16, 0,16, 0, 0, 0, 0, - 17,17,16,16,15,13,17,20,18,17, 0, 0, 0, 0, 0, 0, - 0,19,16,18, 0, 0,18,18, 0, 0,18,15,14,14,14,14, - 16,17,15,16,19, 0, 0, 0, 0, 0, 0,18,16,16,16,16, - 16,16,19,19, 0, 0, 0, 0, 0,18,16,16,16,16,17,16, - 0, 0, 0, 0, 0, 0, 0,18,16,16,16,16,15,15,17, 0, - 0, 0, 0, 0, 0, 0,17,16,17,14,14,14,20,18, 0, 0, - 0, 0, 0, 0,20,17,15,13,14,13,16, 0, 0, 0, 0,19, - 15,18,18,16,14,13,13,13,15,20, 0, 0, 0, 0,19,20, - 17,15,13,12,11,12,15,20, 0,19, 0, 0,18,19,16,13, - 12,11,10,11,15, 9, 0,18,18,19, 0,16,15,13,11,10, - 9,12,18,17, 0,20,17,16,16,15,14,12,10,10, 9,13, - 19,16,20,14,17,18,17,15,15,13,12,11,10,15,16,13, - 0,19,20,17,16,18,19,17,12,14,17,20,14,14,20, 0, - 20,18,20, 0,19,16,14,13, 0,19,17,18, 0, 0, 0,18, - 15,14,14,15,17,17,15,15,17,20, 0,17, 0, 0,17, 0, - 17,14,14,15,15,15,19,18, 0, 0, 0, 0, 0,19,16,14, - 15,16,15,15,20,18, 0, 0, 0, 0,16,16,14,14,16,15, - 13,14,19, 0, 0, 0,20,15,15, 9,15,15,16,13,12,13, - 17,20, 0, 0,16,14,12,13,13,15,14,13,12,13,16, 0, - 0, 0,18,16,13,13,14,14,13,12,11,11,14,20, 0, 0, - 0,20,20,16,14,12,11,10, 9,10,14,18, 0,20, 0,16, - 16,15,14,11, 9, 7, 8,10,15,18, 0,16,17,16,14,14, - 13,10, 8, 7, 7,11,15,16,18,17,16,16,14,13,11, 9, - 8, 7, 8,12,16,14,20,13,16,15,14,14,12,11,10,10, - 10,13,14,14,15,17,18,17,18,18,19,13,11,12,16,16, - 16,16,19,20,18,20, 0, 0,17,13,12,19,17,16,15,17, - 0, 0, 0,19,18,17,15,15,16,17,15,15,19,20, 0,13, - 0,20, 0,18,16,15,15,15,15,16,17,20, 0,13,17,17, - 17,18,16,16,15,14,16,16,20,20, 0,14,16,16,14,14, - 14,15,15,14,14,14,18,19,16,15,18,13,13,13,14,14, - 14,14,13,13,16,20,14,16,17,17,14,15,15,15,14,13, - 12,12,16,19,19,18, 0,17,17,16,15,13,12,11,10,11, - 15, 0, 0,16,20,16,14,14,14, 9, 8, 8, 8, 9,15, 0, - 20,15,14,12,11,11,11, 8, 6, 6, 6, 9,14, 0,17,14, - 16,14,13,11,10, 7, 5, 5, 6,10,15,15,17,13,14,13, - 13,12,10, 7, 6, 6, 7,11,13,14,14,13,14,14,13,12, - 12,10, 9,10, 9,11,15,15,15,17,18,16,17,17,16,13, - 11,13,14,14,14,18, 0,19, 0,20,20, 0,18,12,12,16, - 16,14,15,18, 0, 0, 0, 0,19,20,20,20,20,18,17,16, - 19,20, 0,18,18, 0, 0,18,18,14,17,16,16,16,18,18, - 0, 0, 0,20,17,15,13,15,16,15,16,14,16, 0, 0,16, - 15,15,15,14,14,14,14,15,15,13,16, 0, 0,16,14,14, - 13,15,13,14,13,13,14,12,16,20, 0,17,16,16,14,14, - 14,14,13,12,12,11,16,20, 0,15,18,16,15,15,14,13, - 11,10,10,10,15, 0,18,13,15,13,12,12,12,10, 8, 7, - 7, 9,14,19,15,12,13,12,11,11,10, 8, 6, 5, 6, 9, - 14, 0,14,12,13,12,12,11, 9, 7, 4, 4, 6, 8,15,19, - 14,12,13,13,12,11, 9, 7, 6, 5, 6, 9,13, 0,12,12, - 14,13,13,12,11,10, 9, 9, 8,10,16,20,17,14,16,15, - 15,14,14,14,13,15,12,13,14,19,20, 0,20,20, 0,17, - 14,11,13,15,15,13,17,18, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,18,18,20,19, 0,19, 0, 0,19,17,19,15,15,16, - 17,15,17, 0, 0,20,20,19,18,19,15,14,14,15,17,14, - 16, 0, 0, 0, 0,17,16,16,14,13,13,15,15,13,16, 0, - 0,18,20,17,14,14,13,12,13,13,13,12,16, 0,20,19, - 18,16,15,14,14,13,12,12,11,12,16, 0, 0,15,16,16, - 15,14,13,12,11,10, 9,10,16, 0,17,12,14,14,13,13, - 12,10, 8, 7, 7,10,15,18,14,11,14,13,12,12,11, 7, - 6, 5, 6,10,15,19,13,11,13,13,12,11, 9, 7, 5, 5, - 6, 9,15,20,13,10,13,12,11,11, 9, 7, 6, 5, 6, 8, - 15,20,14,11,13,12,13,12,11,10, 9, 9, 9,11,17,17, - 18,13,14,14,14,14,14,13,13,13,12,13,14, 0, 0,18, - 17,16,14,14,12,11,13,16,16,14,18,20, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,20,16,17,19, 0, 0, 0, 0, 0, 0, - 18,15,17,19,18,15,14,20, 0, 0, 0, 0, 0,20,17,16, - 15,16,17,15,16, 0, 0, 0, 0, 0,20,19,17,16,15,15, - 15,15,15, 0,20, 0, 0, 0,20,17,16,15,14,14,14,14, - 16, 0,20, 0,20, 0,18,18,16,14,13,13,13,13,17, 0, - 20,16,18,16,18,16,15,13,12,12,12,13,17, 0,18,13, - 16,15,13,13,12,11,11,10,11,12,16, 0,14,12,15,14, - 13,12,12,10, 9,10,10,11,16, 0,14,11,14,15,14,13, - 12, 9, 9,10,10,11,17, 0,14,11,13,14,13,12,11,10, - 10,10, 9,10,17, 0,16,12,13,13,13,13,13,11,11,11, - 10,12, 0, 0,20,14,14,14,15,16,13,12,14,14,12,13, - 17, 0, 0,16,16,13,13,12,11,13,18,16,15,14, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0,20,20,17,16,18, 0, 0, - 0, 0, 0,20, 0,17,18, 0, 0, 0,18, 0, 0, 0, 0, 0, - 0, 0,20,19,20, 0, 0,16,17,20, 0, 0, 0, 0, 0, 0, - 0,18, 0, 0,20,16,15, 0, 0,20, 0, 0, 0, 0, 0,20, - 0,20, 0,16,15, 0, 0,20,20, 0, 0, 0,20,18,18,17, - 17,15,16, 0, 0,20, 0, 0, 0, 0,20,17,17,16,16,16, - 17, 0, 0,18, 0,19, 0,18,16,15,13,14,14,15,20, 0, - 20,16,20,20,18,17,15,13,13,15,14,14,19, 0,20,14, - 15,16,16,16,14,11,13,14,13,14,20, 0,20,14,14,14, - 14,14,12,11,12,13,12,13,20,20, 0,14,16,17,18,20, - 16,14,13,13,13,14,20, 0, 0,17,15,15,14,15,15,16, - 18,16,13,13, 0, 0, 0,16,14,14,14,13,14,16, 0, 0, - 16,17, 0,19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,18, - 18,20, 0, 0, 0, 0, 0, 0,20, 0, 0, 0, 0,20,19, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,19,20, 0,20,19,20, 0, 0, 0, 0, 0,20, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,20, - 0,20,20,20,20, 0, 0, 0, 0, 0, 0,20, 0,19,19, 0, - 20,17,20, 0, 0, 0, 0, 0, 0, 0, 0,19,18,17,19,18, - 0, 0,20, 0,20,19,19,20,19,17,17,19,19,17, 0, 0, - 0, 0, 0,20, 0, 0,18,19,17,16,16,15, 0, 0, 0, 0, - 0,20,20, 0, 0,20,18,16,14,14, 0, 0, 0,17,16,15, - 16, 0,20, 0,18,18,15,16, 0, 0, 0,16,16,15,15,17, - 0,19, 0, 0,18,16,18, 9, -}; - -static long _vq_pigeonmap_lsp30_0[] = { - 0, 0, 0, 0, 0, 0, 1, 1, - 2, 2, 3, 3, 3, 3, 4, 4, - 4, 4, 5, 5, 5, 5, 5, 5, - 5, 6, 6, 6, 6, 6, -}; - -static long _vq_fitlist_lsp30_0[] = { - 983, 1178, 1179, 19, 32, 984, 408, 59, - 46, 213, 789, 594, 33, 409, 214, 985, - 1180, 790, 410, 605, 20, 34, 47, 48, - 61, 215, 216, 411, 595, 986, 606, 230, - 412, 607, 801, 802, 803, 998, 62, 21, - 35, 426, 608, 804, 999, 662, 844, 845, - 858, 871, 1000, 1040, 1053, 1195, 663, 1387, - 1054, 1430, 1624, 1638, 1652, 1390, 1444, 1583, - 1597, 1611, 1263, 49, 63, 77, 217, 231, - 245, 299, 650, 259, 427, 664, 677, 846, - 859, 495, 678, 873, 1041, 860, 1055, 691, - 19, 20, 32, 33, 34, 21, 48, 35, - 47, 22, 49, 36, 594, 789, 595, 400, - 46, 61, 62, 63, 790, 791, 215, 596, - 216, 217, 230, 50, 77, 231, 984, 986, - 213, 214, 410, 411, 412, 401, 413, 792, - 426, 608, 23, 218, 245, 427, 609, 409, - 987, 606, 607, 597, 988, 232, 414, 623, - 1182, 804, 805, 37, 24, 38, 64, 598, - 219, 78, 79, 233, 793, 794, 415, 246, - 610, 220, 247, 611, 989, 990, 442, 624, - 234, 1185, 806, 807, 22, 23, 36, 37, - 50, 401, 597, 24, 38, 598, 207, 403, - 599, 221, 795, 600, 220, 234, 79, 93, - 613, 796, 991, 612, 107, 458, 640, 263, - 793, 794, 247, 809, 989, 990, 219, 1187, - 233, 415, 808, 277, 459, 641, 823, 992, - 1005, 611, 654, 836, 1004, 655, 837, 1186, - 807, 1019, 1188, 1018, 473, 261, 275, 109, - 121, 289, 290, 291, 457, 471, 485, 487, - 614, 669, 810, 851, 1033, 667, 668, 850, - 486, 446, 683, 865, 207, 403, 599, 795, - 221, 600, 796, 991, 992, 614, 1188, 109, - 263, 264, 446, 810, 613, 277, 459, 278, - 460, 642, 1006, 809, 641, 123, 291, 473, - 823, 655, 837, 474, 656, 1384, 292, 1005, - 1019, 1202, 1385, 1201, 488, 852, 1034, 265, - 487, 669, 306, 684, 866, 839, 1048, 1203, - 1230, 851, 1033, 1398, 880, 1062, 1244, 1412, - 1580, 1215, 1581, 1229, 1426, 1258, 983, 1178, - 1179, 32, 408, 19, 59, 46, 213, 984, - 409, 33, 214, 605, 410, 801, 1180, 1375, - 1376, 1387, 606, 789, 985, 594, 790, 986, - 1181, 1182, 802, 411, 607, 998, 1377, 1571, - 803, 215, 595, 791, 987, 1378, 216, 412, - 608, 999, 1183, 804, 230, 426, 1000, 1195, - 844, 1014, 1196, 1209, 1572, 1573, 1574, 1583, - 1768, 1390, 1597, 1585, 1598, 1769, 1611, 1430, - 1779, 1770, 1599, 1780, 1612, 20, 21, 34, - 47, 48, 61, 62, 35, 49, 22, 63, - 36, 50, 77, 64, 215, 216, 230, 412, - 217, 231, 413, 23, 218, 245, 426, 427, - 37, 78, 232, 259, 414, 411, 608, 609, - 623, 246, 273, 455, 610, 804, 805, 637, - 650, 662, 663, 845, 1000, 1014, 819, 260, - 442, 469, 624, 651, 806, 33, 46, 607, - 803, 844, 664, 677, 846, 858, 859, 871, - 1028, 1040, 1041, 999, 299, 300, 495, 287, - 678, 873, 1054, 860, 496, 691, 1042, 1055, - 314, 692, 887, 22, 23, 36, 50, 64, - 37, 24, 38, 78, 79, 92, 219, 93, - 233, 220, 77, 218, 232, 414, 246, 260, - 415, 247, 442, 234, 261, 245, 259, 610, - 611, 273, 624, 274, 456, 275, 457, 612, - 806, 638, 807, 639, 820, 470, 652, 471, - 808, 107, 106, 288, 289, 287, 484, 458, - 485, 640, 667, 290, 654, 681, 836, 834, - 666, 835, 849, 863, 1004, 1018, 848, 680, - 1002, 1003, 1016, 1017, 1031, 1045, 1200, 1198, - 1030, 1199, 1212, 862, 1044, 1213, 35, 48, - 49, 62, 63, 77, 36, 50, 64, 78, - 92, 230, 245, 259, 217, 231, 413, 426, - 427, 218, 232, 37, 246, 273, 414, 455, - 637, 260, 287, 442, 609, 623, 219, 469, - 610, 624, 650, 663, 651, 233, 274, 456, - 483, 638, 664, 677, 846, 662, 805, 819, - 845, 859, 1014, 1028, 833, 665, 820, 299, - 678, 860, 873, 1042, 847, 288, 470, 652, - 679, 834, 38, 79, 93, 107, 220, 234, - 121, 275, 221, 290, 458, 640, 109, 263, - 613, 277, 459, 641, 289, 486, 247, 261, - 457, 612, 471, 291, 303, 485, 654, 668, - 836, 123, 473, 655, 487, 614, 667, 304, - 264, 305, 446, 669, 808, 850, 809, 823, - 683, 810, 851, 500, 864, 278, 460, 501, - 642, 865, 878, 1005, 837, 879, 1006, 656, - 639, 835, 849, 1004, 1018, 1200, 1032, 1019, - 1201, 1033, 1047, 1046, 1214, 1228, 1215, 1229, - 1060, 1242, 1061, 1243, 1202, 109, 123, 277, - 264, 278, 291, 446, 460, 614, 642, 810, - 292, 474, 656, 265, 488, 306, 473, 684, - 487, 669, 852, 866, 839, 880, 1048, 1062, - 1006, 1034, 1230, 1203, 1244, 1202, 1076, 1258, - 698, 867, 1272, 894, 881, 1245, 320, 516, - 1090, 712, 908, 503, 699, 1077, 334, 530, - 1104, 726, 895, 321, 517, 1286, 1273, 1300, - 922, 1091, 713, 1412, 1426, 1440, 1454, 1399, - 1413, 1468, 1118, 1287, 909, 1441, 1482, 1469, - 1496, 1314, 1105, 49, 63, 77, 50, 64, - 78, 92, 259, 106, 245, 273, 299, 119, - 287, 246, 300, 455, 469, 495, 496, 232, - 79, 93, 260, 274, 637, 651, 664, 677, - 678, 483, 107, 288, 231, 427, 650, 218, - 442, 456, 623, 663, 665, 301, 470, 484, - 314, 497, 261, 275, 289, 302, 315, 457, - 471, 498, 511, 666, 680, 693, 846, 233, - 247, 638, 652, 860, 679, 692, 510, 691, - 861, 875, 862, 876, 888, 328, 889, 819, - 833, 847, 859, 873, 1042, 1056, 848, 706, - 316, 694, 707, 78, 79, 92, 106, 93, - 107, 121, 135, 119, 260, 274, 261, 275, - 289, 458, 288, 290, 302, 303, 486, 233, - 247, 456, 470, 457, 234, 471, 485, 640, - 484, 654, 301, 315, 680, 499, 668, 498, - 316, 304, 317, 652, 666, 639, 667, 681, - 836, 694, 512, 695, 500, 513, 850, 497, - 862, 876, 863, 877, 864, 878, 329, 511, - 890, 330, 891, 849, 708, 318, 696, 709, - 107, 121, 135, 221, 290, 458, 109, 263, - 304, 486, 613, 668, 277, 459, 123, 303, - 500, 641, 264, 278, 292, 305, 319, 460, - 474, 275, 289, 485, 640, 654, 809, 291, - 446, 487, 317, 499, 501, 318, 488, 515, - 656, 473, 614, 642, 683, 655, 696, 331, - 514, 697, 306, 684, 669, 332, 333, 864, - 878, 865, 879, 892, 893, 513, 710, 528, - 711, 529, 866, 880, 823, 837, 851, 852, - 906, 907, 698, 109, 123, 264, 278, 446, - 460, 292, 474, 642, 488, 656, 265, 306, - 684, 305, 125, 320, 319, 698, 516, 334, - 839, 867, 712, 894, 503, 881, 530, 866, - 880, 1245, 699, 1077, 726, 908, 321, 852, - 1090, 333, 347, 348, 517, 544, 713, 531, - 895, 727, 909, 922, 740, 1105, 936, 1104, - 1091, 1118, 1132, 923, 545, 1286, 1300, 1273, - 1287, 1314, 1301, 1328, 1119, 741, 1315, 1482, - 1496, 1469, 1483, 1510, 1497, 1524, 1133, 32, - 46, 59, 213, 408, 409, 33, 47, 61, - 214, 410, 48, 62, 215, 216, 230, 426, - 662, 844, 871, 605, 411, 606, 412, 607, - 663, 858, 1053, 49, 63, 77, 299, 650, - 677, 845, 859, 1040, 1054, 801, 802, 300, - 495, 664, 846, 873, 1041, 803, 998, 1263, - 691, 608, 999, 1430, 1444, 1055, 1289, 1387, - 1638, 1652, 1583, 1597, 1611, 1625, 1680, 1264, - 1624, 1639, 1862, 1082, 496, 534, 887, 1195, - 1390, 1598, 1612, 678, 1431, 1458, 1512, 1694, - 1303, 692, 730, 1278, 1265, 1653, 1445, 35, - 48, 49, 61, 62, 63, 77, 230, 231, - 299, 426, 650, 662, 663, 677, 844, 845, - 858, 859, 871, 1040, 1053, 245, 259, 495, - 664, 300, 846, 873, 1054, 496, 691, 119, - 314, 510, 534, 692, 887, 1041, 340, 535, - 718, 730, 888, 678, 1055, 1263, 1082, 706, - 1278, 1264, 1289, 1303, 536, 731, 926, 1109, - 803, 999, 860, 1028, 1042, 1223, 1056, 1265, - 1445, 1446, 1458, 1459, 1070, 1084, 1279, 1097, - 1292, 1473, 1121, 1266, 1280, 1304, 1474, 915, - 1305, 63, 77, 245, 259, 273, 299, 300, - 495, 663, 664, 677, 64, 78, 92, 119, - 287, 455, 469, 496, 678, 314, 691, 301, - 483, 692, 510, 340, 534, 315, 328, 497, - 706, 887, 535, 718, 524, 536, 888, 902, - 731, 1082, 730, 1097, 342, 915, 1070, 1084, - 1278, 1279, 1109, 1292, 1098, 538, 733, 916, - 1111, 1266, 1280, 1293, 1294, 1123, 1112, 1124, - 1307, 1304, 1305, 1474, 1475, 1319, 930, 1125, - 1308, 1320, 1476, 1488, 1489, 1490, 1502, 1126, - 1321, 1503, 78, 92, 106, 119, 273, 287, - 299, 300, 93, 107, 121, 302, 315, 288, - 289, 301, 316, 328, 329, 497, 498, 511, - 524, 148, 314, 340, 342, 510, 135, 525, - 496, 275, 484, 693, 303, 485, 694, 707, - 512, 706, 483, 692, 274, 470, 680, 538, - 330, 343, 708, 721, 317, 526, 539, 889, - 890, 902, 903, 499, 904, 536, 733, 916, - 917, 344, 722, 735, 107, 121, 135, 148, - 304, 317, 318, 331, 109, 123, 332, 344, - 345, 500, 513, 514, 527, 289, 302, 498, - 303, 316, 696, 330, 709, 710, 315, 329, - 485, 694, 499, 290, 512, 526, 540, 722, - 528, 541, 723, 695, 486, 708, 343, 891, - 892, 525, 904, 905, 906, 539, 918, 919, - 736, 346, 724, 737, 1087, 1088, 1100, 1101, - 1102, 1114, 932, 1115, 542, 920, 933, 1283, - 1284, 1296, 1297, 1298, 1310, 1128, 1311, 738, - 1116, 1129, 1324, 934, 1312, 1325, 1479, 1480, - 1492, 1493, 1494, 1506, 1507, 1130, 135, 304, - 109, 123, 305, 319, 264, 278, 292, 306, - 333, 460, 474, 488, 501, 515, 656, 684, - 317, 318, 331, 500, 697, 711, 529, 291, - 332, 514, 527, 320, 347, 698, 345, 528, - 346, 725, 516, 543, 513, 696, 277, 487, - 710, 542, 473, 683, 724, 334, 712, 669, - 906, 893, 907, 894, 920, 921, 541, 738, - 739, 530, 908, 879, 880, 934, 935, 726, - 46, 47, 59, 61, 213, 214, 215, 408, - 409, 410, 605, 606, 662, 801, 802, 844, - 871, 1053, 48, 62, 216, 230, 411, 426, - 607, 663, 803, 845, 858, 998, 1040, 1054, - 1263, 1430, 299, 677, 859, 495, 650, 664, - 873, 1289, 300, 691, 496, 1444, 1680, 534, - 314, 887, 1512, 1055, 1082, 1264, 730, 535, - 340, 1458, 1694, 1303, 718, 1330, 1485, 1121, - 536, 731, 926, 328, 342, 1387, 1611, 1652, - 733, 1625, 1123, 524, 538, 1124, 1639, 1278, - 1317, 1318, 1319, 355, 746, 915, 1125, 1320, - 1331, 1431, 1653, 1862, 1526, 1109, 551, 916, - 930, 942, 1111, 1137, 1321, 1332, 1304, 1307, - 1514, 1515, 1513, 1305, 1333, 119, 299, 300, - 314, 495, 496, 534, 691, 287, 301, 340, - 510, 535, 692, 718, 887, 730, 328, 536, - 706, 731, 524, 342, 329, 355, 538, 733, - 343, 551, 746, 1124, 356, 926, 1123, 930, - 1125, 915, 916, 1319, 1320, 942, 1137, 1321, - 1331, 1332, 747, 1111, 1126, 552, 943, 1138, - 315, 511, 148, 525, 539, 721, 748, 357, - 944, 1139, 553, 1140, 1121, 1289, 1303, 1330, - 1317, 1318, 1526, 1540, 1333, 1358, 1527, 1513, - 1514, 1722, 1345, 1334, 1346, 1109, 1528, 370, - 1152, 1335, 1347, 957, 1541, 1305, 106, 119, - 301, 302, 314, 315, 328, 329, 340, 342, - 497, 510, 511, 524, 536, 107, 121, 148, - 316, 498, 525, 538, 707, 135, 343, 355, - 330, 344, 331, 356, 357, 526, 527, 539, - 540, 552, 722, 735, 736, 345, 553, 551, - 748, 358, 541, 749, 370, 554, 512, 721, - 317, 513, 930, 931, 932, 944, 566, 945, - 371, 750, 917, 918, 733, 747, 359, 567, - 946, 1126, 1127, 746, 723, 1128, 737, 943, - 1140, 1141, 555, 763, 1142, 135, 148, 304, - 317, 318, 331, 332, 344, 345, 500, 513, - 514, 527, 540, 109, 123, 528, 541, 710, - 723, 330, 526, 346, 357, 736, 358, 542, - 724, 737, 359, 553, 554, 738, 555, 750, - 178, 360, 751, 371, 556, 709, 343, 722, - 372, 539, 932, 933, 934, 567, 946, 568, - 947, 752, 919, 920, 569, 948, 1128, 1129, - 749, 1130, 1142, 1143, 763, 764, 765, 1144, - 1115, 1116, 1324, 1325, 945, 1326, 1338, 1339, - 959, 960, 961, 1340, 1311, 1312, 1141, 1155, - 1156, 570, 1157, 109, 123, 305, 318, 332, - 345, 346, 514, 528, 541, 319, 333, 501, - 515, 542, 697, 711, 529, 306, 347, 320, - 516, 543, 698, 725, 334, 712, 724, 738, - 739, 530, 359, 360, 178, 348, 361, 726, - 555, 556, 934, 557, 935, 544, 751, 740, - 753, 192, 193, 362, 375, 558, 936, 949, - 752, 1132, 570, 1145, 907, 908, 948, 569, - 921, 1130, 1131, 922, 1144, 765, 766, 754, - 1103, 1326, 1104, 1327, 947, 1328, 961, 1340, - 767, 1341, 125, 320, 334, 347, 516, 530, - 712, 348, 321, 503, 517, 544, 699, 713, - 531, 726, 740, 362, 545, 727, 909, 361, - 923, 558, 936, 741, 754, 375, 557, 193, - 951, 1133, 1147, 1329, 1132, 1342, 1160, 922, - 1105, 1119, 1328, 1525, 1538, 1118, 1356, 1343, - 1314, 1301, 1315, 1524, 1539, 1510, 1497, 1511, - 1734, 965, 1720, 1721, 1552, 1161, 1735, 1706, - 1707, 1357, 1916, 1930, 1748, 1931, 1902, 1903, - 1553, 328, 340, 342, 355, 356, 524, 536, - 538, 551, 733, 746, 930, 552, 747, 942, - 357, 748, 943, 370, 944, 553, 566, 1138, - 1139, 1140, 957, 1152, 1334, 1335, 1345, 1346, - 1347, 1137, 1333, 1336, 1153, 1348, 958, 749, - 371, 567, 763, 1154, 945, 1349, 959, 1350, - 731, 915, 916, 1111, 1112, 1124, 1125, 1126, - 1320, 1321, 343, 539, 721, 735, 917, 1322, - 1123, 1307, 1308, 931, 1113, 1319, 1332, 1516, - 1517, 1127, 1309, 1518, 1530, 1531, 1141, 1532, - 1503, 1504, 1323, 1337, 344, 355, 356, 357, - 551, 552, 553, 748, 370, 345, 358, 554, - 749, 371, 566, 750, 359, 567, 372, 555, - 763, 568, 178, 764, 945, 946, 958, 959, - 569, 960, 1155, 765, 1156, 1141, 751, 1142, - 957, 1154, 1351, 961, 1169, 1352, 1337, 947, - 1338, 1153, 1350, 1364, 974, 1157, 1365, 1143, - 1349, 1362, 1547, 1353, 1548, 1533, 1339, 1534, - 1546, 1170, 1545, 1560, 1366, 1561, 1729, 1535, - 1730, 1742, 1743, 1744, 1549, 1741, 1756, 1562, - 1757, 1925, 1731, 1926, 1938, 1939, 1754, 1940, - 1745, 1937, 1952, 1758, 1953, 346, 358, 359, - 371, 554, 555, 750, 372, 178, 360, 556, - 751, 567, 568, 192, 764, 569, 570, 765, - 752, 961, 766, 960, 947, 948, 962, 1144, - 1156, 1157, 974, 1158, 1143, 1170, 1353, 1171, - 1354, 1339, 1340, 1352, 1169, 1367, 1366, 1550, - 1535, 1536, 1548, 1549, 1365, 1562, 1563, 1731, - 1732, 1744, 1745, 1561, 1746, 1758, 1564, 1759, - 1927, 1928, 1940, 1941, 1757, 1942, 1954, 1760, - 1955, 178, 192, 361, 557, 348, 753, 193, - 362, 375, 544, 558, 740, 936, 949, 570, - 754, 569, 766, 767, 1160, 360, 556, 752, - 765, 948, 962, 1159, 1342, 1355, 1356, 1369, - 961, 1144, 1145, 1158, 1538, 1551, 1171, 1354, - 1341, 1367, 1550, 1537, 1563, 1746, 1564, 1552, - 1734, 1733, 1747, 1565, 1759, 1174, 1748, 1929, - 1942, 1760, 1761, 1370, 1930, 1943, 1944, 1956, - 1957, 1566, 193, 362, 375, 558, 754, 545, - 741, 951, 1133, 1147, 1329, 1160, 1342, 1343, - 1356, 965, 1161, 1174, 767, 1159, 1538, 1355, - 1357, 1539, 1552, 1370, 783, 1553, 1175, 1734, - 1748, 1566, 1371, 1735, 1749, 1762, 1567, 1930, - 1931, 1944, 1945, 1958, 1763, 983, 1178, 1179, - 984, 789, 408, 213, 409, 594, 790, 985, - 1180, 214, 605, 410, 215, 606, 801, 1181, - 986, 411, 802, 595, 1182, 216, 607, 791, - 412, 230, 426, 608, 803, 987, 998, 804, - 999, 662, 844, 1000, 1195, 858, 871, 1040, - 1053, 1209, 845, 1624, 1638, 1387, 1390, 1430, - 1652, 1583, 1597, 1611, 1054, 1444, 1598, 1625, - 1431, 1585, 1612, 1639, 1680, 1263, 1458, 1264, - 1779, 1862, 1626, 1289, 1445, 1459, 1807, 1653, - 1640, 1375, 1376, 1571, 1377, 1572, 1599, 1780, - 1613, 1627, 1808, 1821, 594, 789, 790, 595, - 791, 986, 400, 596, 214, 985, 1182, 216, - 792, 987, 1183, 215, 410, 411, 606, 412, - 607, 217, 230, 608, 988, 401, 413, 597, - 1184, 802, 803, 426, 804, 231, 609, 218, - 427, 793, 805, 1000, 232, 245, 414, 610, - 623, 819, 1001, 259, 637, 1181, 998, 999, - 989, 1014, 1196, 806, 1015, 1197, 455, 624, - 833, 1378, 1379, 1380, 1195, 1185, 1209, 1210, - 1002, 1211, 650, 1028, 651, 820, 1029, 1377, - 845, 1223, 1392, 1198, 1393, 846, 1224, 847, - 1016, 1225, 400, 596, 792, 401, 597, 793, - 598, 794, 989, 217, 988, 1184, 218, 1185, - 231, 413, 609, 414, 219, 232, 610, 990, - 415, 1186, 245, 427, 623, 805, 806, 233, - 246, 611, 624, 220, 807, 442, 820, 1002, - 234, 247, 612, 1003, 260, 638, 261, 639, - 819, 1001, 1016, 1198, 808, 1017, 1199, 456, - 834, 457, 835, 1380, 1381, 1382, 637, 1015, - 1197, 1212, 1004, 1213, 652, 1030, 1031, 833, - 1211, 1394, 1200, 1395, 848, 1226, 849, 1018, - 1227, 598, 794, 990, 1186, 207, 403, 599, - 795, 991, 1187, 221, 600, 796, 219, 220, - 233, 415, 611, 807, 247, 234, 612, 613, - 992, 808, 1004, 640, 809, 823, 1005, 1188, - 458, 654, 836, 1018, 1032, 1200, 1214, 263, - 277, 459, 473, 641, 655, 837, 1019, 1033, - 1201, 1215, 850, 291, 614, 669, 851, 1003, - 1382, 1383, 1384, 290, 668, 1046, 1228, 487, - 810, 865, 1047, 1229, 1199, 639, 1017, 1396, - 1397, 486, 864, 1242, 1006, 1243, 1578, 1579, - 835, 1213, 1410, 1411, 1580, 1060, 1424, 683, - 1061, 1202, 1425, 215, 216, 230, 410, 411, - 412, 606, 607, 608, 802, 803, 998, 426, - 804, 999, 662, 844, 1000, 1195, 845, 858, - 1014, 1040, 1053, 1196, 1209, 217, 231, 413, - 427, 609, 650, 663, 805, 846, 859, 871, - 1028, 1041, 1054, 1210, 1223, 245, 623, 664, - 677, 678, 860, 873, 1042, 1055, 1224, 1390, - 1392, 1405, 1263, 1056, 1238, 1264, 1418, 1406, - 1419, 1432, 1070, 1252, 1265, 1420, 1433, 217, - 230, 231, 412, 413, 426, 608, 609, 804, - 1000, 245, 427, 623, 650, 805, 218, 232, - 259, 414, 455, 610, 637, 819, 1001, 246, - 273, 442, 624, 651, 806, 833, 662, 663, - 664, 844, 845, 846, 858, 859, 1014, 1028, - 1041, 1196, 1210, 469, 1015, 260, 287, 456, - 638, 665, 820, 847, 1002, 999, 1040, 1195, - 1209, 1223, 1197, 1029, 860, 1042, 1211, 483, - 652, 834, 861, 1016, 1043, 1198, 231, 245, - 259, 427, 609, 623, 637, 650, 663, 664, - 677, 805, 819, 845, 846, 859, 1028, 273, - 455, 469, 651, 678, 833, 860, 1015, 232, - 246, 260, 287, 442, 483, 610, 624, 638, - 665, 806, 820, 847, 1029, 274, 456, 470, - 652, 679, 834, 861, 1016, 299, 873, 1042, - 300, 1043, 288, 301, 484, 666, 848, 875, - 1030, 1001, 1041, 1055, 1224, 1056, 1211, 1002, - 1225, 1057, 1212, 495, 1238, 496, 1070, 1239, - 497, 680, 862, 1044, 1071, 1226, 233, 247, - 260, 261, 274, 288, 442, 456, 470, 484, - 611, 638, 639, 652, 666, 807, 834, 848, - 1030, 275, 457, 471, 680, 835, 862, 1017, - 234, 289, 485, 612, 640, 667, 808, 849, - 1031, 458, 654, 681, 836, 863, 1018, 1044, - 302, 876, 1045, 290, 303, 486, 668, 850, - 877, 1032, 1003, 1226, 1058, 1213, 1004, 1227, - 1059, 1214, 1240, 498, 1072, 1241, 499, 864, - 1046, 1073, 1228, 415, 624, 806, 820, 1002, - 1016, 1198, 1212, 1199, 1200, 1394, 1395, 1408, - 1254, 1409, 1255, 1396, 290, 458, 486, 640, - 654, 668, 836, 850, 1032, 221, 613, 809, - 864, 878, 1046, 1060, 263, 277, 304, 459, - 500, 641, 655, 823, 837, 1005, 1019, 1074, - 1201, 473, 291, 487, 669, 851, 1033, 614, - 683, 810, 865, 879, 1047, 1061, 264, 305, - 446, 460, 642, 1006, 696, 501, 1075, 278, - 474, 656, 697, 852, 1034, 1228, 1242, 1256, - 1215, 1229, 1243, 1257, 1202, 1270, 892, 1271, - 292, 893, 1048, 1230, 808, 1004, 1018, 1200, - 1214, 1396, 1410, 1424, 1397, 1411, 1425, 1438, - 1439, 1398, 650, 662, 663, 664, 677, 845, - 846, 858, 859, 871, 1041, 1054, 299, 495, - 678, 860, 873, 1042, 1055, 300, 496, 691, - 1056, 692, 887, 1070, 1082, 314, 510, 888, - 1028, 1238, 1264, 1252, 1265, 1266, 1278, 706, - 1084, 1279, 844, 1040, 1053, 1223, 1263, 1224, - 1432, 1445, 1446, 1459, 1289, 1458, 1460, 1431, - 1444, 1473, 1485, 718, 902, 1097, 1280, 1292, - 1433, 1434, 1447, 1448, 1461, 1462, 1474, 1098, - 1293, 1475, 259, 273, 287, 299, 300, 455, - 469, 495, 496, 637, 651, 664, 665, 677, - 678, 691, 833, 847, 860, 873, 1056, 483, - 679, 692, 861, 1043, 260, 274, 288, 301, - 456, 470, 497, 638, 652, 666, 834, 848, - 875, 1057, 484, 680, 693, 862, 1044, 887, - 1070, 314, 888, 1071, 302, 315, 498, 876, - 889, 1058, 510, 706, 511, 694, 707, 1072, - 1084, 328, 902, 1085, 316, 329, 512, 890, - 903, 1029, 1252, 1239, 1030, 1253, 1240, 1266, - 1267, 1254, 1268, 1097, 1280, 524, 1098, 1281, - 525, 708, 1086, 1099, 261, 275, 288, 289, - 302, 457, 470, 471, 484, 498, 639, 666, - 667, 680, 835, 849, 862, 876, 1058, 485, - 681, 694, 863, 1045, 290, 303, 458, 499, - 640, 654, 668, 836, 850, 877, 1059, 486, - 695, 864, 1046, 1072, 316, 890, 1073, 304, - 317, 500, 878, 891, 1060, 512, 708, 513, - 696, 709, 1074, 1086, 330, 904, 1087, 318, - 331, 514, 892, 905, 1031, 1254, 1241, 1032, - 1255, 1242, 1268, 1269, 1256, 1270, 1282, 526, - 1100, 1283, 527, 710, 1088, 1101, 290, 304, - 486, 500, 668, 864, 878, 1060, 263, 277, - 459, 641, 655, 696, 823, 837, 892, 1074, - 291, 318, 473, 487, 669, 851, 865, 1019, - 1033, 1047, 683, 305, 501, 879, 1061, 264, - 278, 446, 460, 642, 656, 697, 893, 1075, - 292, 319, 474, 488, 852, 866, 1034, 1048, - 514, 1088, 710, 515, 1089, 684, 711, 880, - 1062, 906, 332, 907, 306, 333, 1076, 528, - 1102, 724, 529, 1103, 698, 725, 894, 1256, - 1270, 1215, 1229, 1243, 1257, 1271, 1230, 1244, - 1284, 1285, 1258, 1272, 1298, 920, 1299, 320, - 921, 1090, 605, 801, 1387, 1583, 1597, 1624, - 1638, 1652, 408, 409, 410, 606, 662, 802, - 844, 858, 871, 998, 1040, 1053, 1430, 1444, - 1598, 1611, 1612, 1625, 1639, 1680, 1862, 1054, - 1263, 1431, 1458, 299, 495, 663, 677, 845, - 859, 873, 1041, 1055, 1082, 1264, 1289, 1626, - 1445, 1459, 691, 887, 1278, 1512, 1653, 1694, - 534, 730, 1303, 1485, 1585, 1779, 1807, 1876, - 1121, 1304, 1473, 926, 1109, 1640, 535, 718, - 1292, 1305, 1317, 1499, 1821, 1667, 301, 314, - 315, 328, 497, 510, 524, 693, 706, 889, - 902, 511, 707, 1085, 302, 316, 329, 498, - 525, 694, 890, 903, 512, 708, 721, 1086, - 915, 1098, 342, 916, 1099, 330, 343, 526, - 904, 917, 538, 733, 539, 722, 735, 1100, - 1112, 930, 1113, 344, 540, 918, 931, 1097, - 1281, 1282, 1111, 1294, 1295, 1296, 1125, 1308, - 1126, 1309, 736, 1114, 1127, 1293, 1307, 1321, - 1322, 932, 1310, 1323, 1477, 1478, 1490, 1491, - 1492, 1504, 1505, 1128, 318, 332, 514, 528, - 710, 906, 305, 501, 683, 697, 724, 879, - 920, 1102, 319, 346, 515, 893, 1075, 1089, - 711, 333, 529, 907, 306, 684, 698, 725, - 880, 921, 1103, 320, 347, 516, 894, 1076, - 1090, 542, 1116, 738, 543, 1117, 712, 739, - 908, 934, 935, 334, 530, 1104, 1130, 1131, - 726, 922, 1298, 1271, 1285, 1299, 1272, 1286, - 1312, 1313, 1300, 1326, 1327, 348, 1118, 544, - 1314, 1494, 1467, 1481, 1495, 1468, 1482, 1508, - 1509, 1496, 1522, 1523, 740, 871, 1289, 1512, - 1680, 1694, 1263, 1458, 1303, 1485, 534, 730, - 926, 1121, 1304, 1330, 535, 731, 1708, 1317, - 1499, 340, 536, 718, 1109, 1123, 1318, 1124, - 1319, 1305, 1513, 733, 915, 1111, 1125, 1320, - 1331, 1514, 1526, 1332, 1515, 746, 1137, 355, - 551, 942, 1138, 1333, 1527, 1722, 1500, 1540, - 1709, 342, 538, 916, 1307, 930, 1112, 1126, - 1321, 747, 356, 552, 748, 943, 1139, 1334, - 524, 1308, 1322, 1516, 944, 1335, 1528, 1501, - 1918, 1345, 1529, 1140, 1346, 1530, 1502, 1503, - 1517, 1336, 1347, 1531, 329, 342, 343, 525, - 538, 721, 733, 917, 930, 539, 735, 1113, - 330, 344, 526, 722, 918, 931, 540, 736, - 1114, 355, 356, 551, 746, 1125, 1126, 1322, - 357, 552, 748, 932, 1127, 1323, 747, 942, - 943, 944, 553, 749, 1128, 345, 358, 541, - 723, 737, 919, 945, 1324, 1140, 554, 750, - 933, 1141, 370, 1139, 1336, 371, 566, 946, - 1337, 957, 958, 567, 763, 1142, 359, 372, - 555, 751, 959, 1338, 1309, 1310, 1321, 1138, - 1115, 1129, 1335, 1152, 1153, 1154, 568, 947, - 1155, 346, 542, 738, 934, 333, 360, 515, - 529, 711, 725, 907, 921, 1103, 1130, 1326, - 347, 543, 1117, 739, 935, 334, 361, 516, - 530, 712, 726, 908, 922, 1104, 1131, 1327, - 348, 544, 1118, 359, 555, 751, 556, 752, - 557, 753, 740, 936, 947, 948, 949, 1132, - 1144, 1145, 362, 1328, 1340, 570, 375, 1341, - 558, 754, 569, 765, 766, 961, 962, 767, - 1157, 1299, 1313, 1300, 1314, 1143, 1158, 1159, - 1342, 1522, 1523, 1339, 1524, 1536, 1537, 1353, - 1354, 1355, 1495, 1509, 1496, 1510, 1538, 1330, - 1526, 534, 535, 730, 731, 926, 1121, 1123, - 1317, 1318, 1331, 1513, 1514, 1540, 1722, 1319, - 1332, 746, 942, 1137, 1333, 1527, 355, 551, - 747, 1138, 1345, 1528, 943, 1139, 1334, 1358, - 1346, 1529, 1736, 1152, 1347, 1541, 1554, 957, - 1348, 1542, 1709, 1723, 1543, 1737, 1360, 1544, - 1738, 1724, 1555, 1739, 1932, 1933, 1556, 1919, - 1725, 1934, 1946, 1920, 2128, 1740, 1751, 1935, - 355, 551, 746, 747, 942, 943, 1137, 1138, - 1139, 1333, 1334, 356, 552, 748, 944, 1140, - 1335, 1345, 1346, 1529, 370, 566, 957, 1152, - 1336, 1347, 1530, 1153, 1348, 1542, 958, 1154, - 1349, 1531, 1543, 1350, 1360, 1544, 357, 553, - 749, 945, 371, 567, 763, 959, 1155, 1361, - 1362, 1141, 1545, 1351, 1546, 1541, 1555, 1556, - 1557, 1364, 410, 605, 606, 801, 802, 998, - 411, 607, 803, 999, 412, 426, 608, 662, - 804, 844, 1000, 1040, 1053, 1195, 1209, 1390, - 1387, 858, 871, 1196, 1430, 663, 845, 1041, - 1054, 1223, 1585, 1598, 859, 1263, 1418, 1431, - 1597, 1611, 1014, 1405, 1444, 1599, 1583, 1612, - 1625, 1210, 1392, 1432, 1445, 1587, 1600, 1613, - 1626, 1780, 1639, 1419, 1458, 1601, 1614, 1627, - 1640, 1795, 1055, 1264, 1433, 1446, 1459, 1653, - 1460, 1615, 1628, 1641, 1808, 1796, 1809, 1822, - 1447, 1629, 1642, 1655, 1810, 1823, 413, 427, - 609, 623, 650, 663, 804, 805, 845, 846, - 1000, 1001, 1014, 1028, 1041, 1196, 1209, 1210, - 1223, 245, 637, 664, 819, 833, 1015, 1042, - 1197, 1224, 259, 414, 455, 610, 624, 651, - 806, 847, 1002, 1029, 1211, 246, 442, 469, - 638, 665, 820, 834, 1016, 1043, 1198, 1225, - 677, 859, 860, 1055, 678, 1056, 1238, 273, - 861, 260, 456, 483, 652, 679, 848, 1030, - 1057, 1212, 1239, 1392, 1393, 873, 1406, 1252, - 1407, 875, 1044, 1226, 1253, 1394, 446, 614, - 642, 810, 1006, 1202, 264, 460, 656, 852, - 1034, 278, 292, 474, 488, 866, 1048, 1230, - 1244, 265, 684, 839, 880, 1062, 1076, 1203, - 1258, 1412, 1426, 306, 1272, 1398, 1440, 1399, - 1454, 1413, 867, 1245, 1595, 1594, 1608, 1622, - 1636, 1468, 1650, 1609, 1441, 1790, 1804, 1818, - 1832, 1664, 1791, 1623, 698, 894, 1090, 1286, - 881, 1077, 1273, 1482, 1637, 1469, 1846, 1860, - 1678, 1651, 455, 623, 637, 650, 651, 663, - 664, 677, 678, 819, 833, 846, 859, 860, - 873, 1001, 1015, 1028, 1029, 1041, 1042, 1055, - 1056, 1197, 1211, 1224, 1238, 273, 469, 665, - 847, 861, 1043, 1070, 1225, 1252, 287, 442, - 456, 483, 624, 638, 652, 679, 820, 834, - 875, 1002, 1016, 1030, 1057, 1198, 1212, 1239, - 274, 470, 666, 848, 862, 1044, 1071, 1226, - 1253, 495, 691, 1265, 496, 692, 1266, 288, - 484, 497, 680, 693, 876, 1058, 1240, 1267, - 1420, 1407, 1421, 1408, 887, 1434, 888, 1435, - 889, 1072, 1254, 1422, 288, 457, 470, 484, - 639, 652, 666, 680, 834, 835, 848, 862, - 876, 1003, 1017, 1030, 1031, 1044, 1058, 1199, - 1213, 1226, 1240, 275, 471, 667, 849, 863, - 1045, 1072, 1227, 1254, 289, 458, 485, 640, - 654, 681, 836, 877, 1004, 1018, 1032, 1059, - 1200, 1214, 1241, 668, 850, 864, 1046, 1073, - 1228, 1255, 498, 694, 1268, 290, 486, 499, - 695, 878, 1060, 1242, 1269, 1422, 1409, 1423, - 1410, 1436, 890, 1437, 891, 1074, 1256, 1424, - 290, 486, 654, 668, 836, 850, 864, 878, - 1032, 1046, 1060, 1228, 1242, 304, 500, 613, - 641, 809, 823, 1005, 1019, 1074, 1201, 1256, - 1270, 263, 277, 459, 473, 655, 696, 837, - 851, 1033, 1215, 1229, 669, 865, 1047, 291, - 487, 683, 879, 1061, 1243, 305, 446, 501, - 614, 642, 810, 1006, 1075, 1202, 1257, 1271, - 264, 278, 460, 474, 656, 697, 852, 1034, - 1230, 892, 1088, 893, 292, 488, 866, 1048, - 1089, 1244, 1424, 1438, 1452, 1397, 1411, 1425, - 1439, 1453, 1398, 1412, 1466, 1284, 1467, 684, - 1062, 1285, 1426, 300, 469, 483, 495, 496, - 651, 665, 678, 679, 691, 692, 847, 860, - 861, 887, 888, 1029, 1043, 1056, 1057, 1070, - 1225, 1239, 1252, 1265, 1266, 875, 1071, 1084, - 1253, 301, 470, 484, 497, 652, 666, 680, - 693, 848, 862, 889, 1030, 1044, 1058, 1226, - 1240, 1267, 876, 1072, 1085, 1254, 1279, 510, - 706, 1280, 302, 498, 511, 694, 707, 890, - 1268, 1281, 314, 902, 1097, 1098, 315, 903, - 1086, 1099, 1293, 524, 1294, 316, 512, 525, - 708, 721, 904, 1282, 1295, 1448, 1435, 1449, - 1436, 1462, 1463, 1450, 1464, 915, 1476, 916, - 1477, 917, 1100, 302, 471, 485, 498, 667, - 680, 681, 694, 849, 862, 863, 876, 890, - 1031, 1045, 1058, 1059, 1072, 1227, 1241, 1254, - 1268, 877, 1073, 1086, 1255, 303, 486, 499, - 654, 668, 695, 850, 864, 891, 1032, 1046, - 1060, 1228, 1242, 1269, 878, 1074, 1087, 1256, - 512, 708, 1282, 304, 500, 513, 696, 709, - 892, 1270, 1283, 316, 904, 1100, 317, 905, - 1088, 1101, 526, 722, 1296, 318, 514, 527, - 710, 723, 906, 1284, 1297, 1450, 1437, 1451, - 1438, 1464, 1465, 1452, 1466, 1478, 918, 1479, - 919, 1102, 304, 500, 696, 864, 878, 892, - 1060, 1074, 1256, 1270, 318, 459, 473, 514, - 641, 655, 669, 837, 851, 1019, 1033, 1047, - 1088, 1215, 1229, 1284, 277, 291, 487, 683, - 710, 865, 879, 1061, 1243, 1257, 1075, 305, - 501, 697, 893, 1271, 319, 460, 474, 515, - 642, 656, 852, 1034, 1048, 1089, 1230, 1285, - 278, 292, 488, 684, 711, 866, 880, 1062, - 1244, 1258, 906, 1102, 907, 306, 1076, 1103, - 1272, 332, 528, 1298, 724, 333, 529, 1299, - 698, 725, 894, 920, 1116, 921, 320, 516, - 1090, 1117, 1286, 1452, 1466, 1411, 1425, 1439, - 1453, 1467, 1412, 1426, 1440, 1480, 1481, 1454, - 1468, 1494, 1312, 1495, 712, 1313, 495, 691, - 887, 1082, 1264, 1265, 1278, 1289, 1303, 1473, - 496, 534, 692, 718, 888, 1070, 1084, 1109, - 1266, 1279, 1292, 1304, 1474, 730, 926, 1121, - 1485, 510, 535, 706, 731, 1097, 1280, 1293, - 1305, 1487, 1317, 340, 536, 915, 1111, 1123, - 1318, 1460, 1461, 1475, 1499, 1488, 1500, 1124, - 1307, 1319, 1501, 1668, 1669, 1489, 1513, 1320, - 1502, 1514, 1656, 1670, 1681, 1682, 1683, 1684, - 1696, 1503, 1515, 1697, 1671, 1695, 1685, 1709, - 1516, 1698, 1710, 1865, 1866, 1878, 1879, 1880, - 1892, 1699, 1711, 1893, 539, 721, 735, 917, - 930, 1113, 1125, 1126, 1309, 1321, 1322, 931, - 1127, 540, 722, 736, 918, 1114, 1310, 1323, - 932, 1128, 343, 355, 356, 551, 552, 746, - 747, 748, 942, 943, 1138, 1518, 344, 357, - 553, 749, 944, 1140, 1324, 1519, 1139, 1334, - 1335, 1336, 945, 1141, 358, 541, 554, 737, - 750, 933, 1115, 1129, 1311, 1337, 1520, 946, - 1142, 1325, 370, 566, 957, 1152, 1532, 371, - 567, 763, 958, 1154, 1338, 1533, 1153, 1348, - 1349, 1350, 959, 1155, 372, 555, 568, 751, - 764, 947, 1143, 1351, 1534, 1505, 1506, 1517, - 1531, 960, 1339, 541, 723, 736, 737, 919, - 932, 1115, 1128, 1311, 1324, 933, 1129, 542, - 724, 738, 920, 1116, 1312, 1325, 934, 1130, - 345, 358, 553, 554, 749, 750, 945, 1141, - 1520, 346, 359, 555, 751, 946, 1142, 1326, - 1521, 1337, 1338, 947, 1143, 360, 556, 752, - 1339, 1522, 948, 1144, 372, 567, 568, 763, - 764, 959, 1155, 1534, 569, 765, 960, 1156, - 1340, 1535, 1351, 1352, 961, 1157, 570, 766, - 1353, 1536, 1507, 1508, 962, 789, 790, 984, - 985, 986, 1180, 1181, 1375, 1376, 1182, 1377, - 1378, 410, 605, 606, 801, 802, 998, 1572, - 1573, 411, 607, 791, 803, 987, 999, 1183, - 1574, 412, 608, 804, 1000, 1195, 1379, 1390, - 1196, 1209, 844, 1014, 1040, 1210, 1223, 1585, - 1392, 1405, 1418, 1571, 1768, 1769, 1770, 1598, - 1575, 1587, 1599, 1600, 1406, 1419, 1431, 1588, - 1601, 1613, 1430, 1432, 1444, 1612, 1614, 1626, - 1795, 791, 986, 987, 1182, 1377, 1378, 1183, - 792, 988, 1379, 1184, 595, 607, 802, 803, - 998, 1574, 596, 804, 1000, 1380, 1575, 412, - 608, 999, 1195, 1196, 413, 609, 805, 1001, - 1014, 623, 793, 819, 989, 1185, 1197, 1576, - 426, 1209, 1390, 1210, 1392, 427, 1015, 1028, - 414, 610, 637, 806, 833, 1002, 1211, 1381, - 1393, 650, 845, 846, 1041, 1223, 1224, 1405, - 1406, 624, 651, 820, 847, 1016, 1029, 1198, - 1225, 1407, 1042, 1043, 1212, 1573, 1419, 1588, - 1394, 1589, 1238, 1420, 1239, 1421, 1770, 1771, - 1772, 1587, 1577, 1601, 1602, 1603, 1408, 1769, - 1418, 1600, 1433, 1615, 1784, 1590, 1785, 1434, - 1616, 1435, 1617, 793, 988, 989, 1184, 1380, - 1185, 794, 990, 1381, 1186, 597, 805, 1001, - 1576, 598, 806, 1002, 1382, 1577, 414, 610, - 819, 1015, 1197, 624, 820, 1198, 415, 611, - 807, 1003, 1016, 1199, 1578, 833, 1029, 1211, - 1393, 638, 834, 1212, 1394, 1017, 1030, 612, - 639, 808, 835, 1004, 1213, 1395, 652, 848, - 1226, 1408, 849, 1018, 1031, 1200, 1227, 1409, - 1044, 1045, 1214, 1225, 1407, 1590, 1396, 1591, - 1240, 1422, 1241, 1423, 1772, 1773, 1774, 1589, - 1604, 1605, 1410, 1421, 1603, 1786, 1592, 1787, - 1436, 1618, 1437, 1619, 990, 1186, 1382, 599, - 795, 1578, 403, 612, 808, 991, 1187, 1383, - 600, 796, 1579, 613, 809, 992, 1188, 807, - 1003, 220, 234, 611, 639, 835, 1004, 1017, - 1199, 1200, 1213, 1395, 221, 823, 1005, 1201, - 1384, 1031, 1018, 1019, 640, 836, 1214, 1396, - 654, 850, 1032, 1228, 1410, 1046, 641, 837, - 1215, 1397, 655, 851, 1033, 1229, 1411, 1580, - 458, 668, 864, 1060, 1242, 1424, 1592, 459, - 473, 614, 669, 810, 865, 1006, 1047, 1061, - 1202, 1243, 1425, 1593, 878, 1256, 1438, 683, - 879, 1257, 1439, 1774, 1775, 1227, 1409, 1606, - 1607, 1776, 1074, 1620, 1075, 1398, 1621, 1591, - 1788, 1789, 1270, 1452, 1634, 1271, 1453, 1635, - 1970, 1971, 1423, 1605, 1802, 1803, 1972, 1816, - 1412, 1594, 1817, 796, 992, 1188, 1384, 1580, - 614, 810, 1006, 1202, 1385, 1776, 446, 642, - 1398, 1581, 837, 851, 1019, 1033, 1047, 1215, - 1229, 1397, 1411, 656, 852, 1034, 1230, 1412, - 1048, 1203, 460, 474, 866, 1062, 1244, 1426, - 1594, 488, 684, 880, 1076, 1258, 1440, 1608, - 1243, 1425, 1777, 1399, 1622, 1593, 1607, 1790, - 1272, 1454, 1636, 1413, 1972, 1439, 1621, 1973, - 1804, 1595, 1818, 804, 844, 999, 1000, 1014, - 1040, 1053, 1195, 1196, 1209, 1223, 1390, 845, - 858, 1028, 1041, 1054, 1210, 1224, 1392, 1405, - 1418, 662, 871, 1431, 650, 663, 846, 859, - 1042, 1055, 1238, 1406, 1419, 1432, 1587, 1263, - 1445, 1600, 1264, 1420, 1433, 1446, 1588, 1601, - 1599, 1613, 1614, 1627, 1434, 1447, 1602, 1615, - 1628, 1783, 1459, 1641, 1796, 1460, 1616, 1629, - 1642, 1784, 1797, 650, 805, 819, 845, 846, - 859, 1001, 1014, 1015, 1028, 1041, 1042, 1055, - 1196, 1197, 1210, 1223, 1224, 1238, 1392, 1405, - 1406, 1419, 637, 833, 860, 1029, 1056, 1211, - 1225, 1393, 1420, 651, 806, 820, 847, 1002, - 1016, 1043, 1198, 1239, 1407, 638, 834, 861, - 1030, 1057, 1212, 1226, 1394, 1421, 664, 873, - 1252, 1433, 1070, 1434, 665, 1253, 652, 848, - 875, 1044, 1071, 1240, 1408, 1435, 1588, 1589, - 1265, 1447, 1602, 1266, 1448, 1603, 1267, 1422, - 1449, 1590, 1601, 1615, 1616, 1617, 1629, 1630, - 1436, 1604, 1631, 1784, 1785, 1461, 1643, 1798, - 1462, 1644, 1799, 1463, 1618, 1645, 1786, 652, - 807, 834, 848, 1003, 1016, 1017, 1030, 1044, - 1198, 1199, 1212, 1226, 1240, 1394, 1408, 639, - 835, 862, 1031, 1058, 1213, 1227, 1395, 1422, - 808, 849, 1004, 1018, 1045, 1200, 1241, 1409, - 640, 836, 863, 1032, 1059, 1214, 1228, 1396, - 1423, 666, 1254, 876, 1072, 1436, 667, 1255, - 654, 850, 877, 1046, 1073, 1242, 1410, 1437, - 1590, 1591, 1604, 1268, 1450, 1605, 1269, 1424, - 1451, 1592, 1618, 1619, 1632, 1438, 1606, 1633, - 1786, 1787, 1800, 1464, 1646, 1801, 1465, 1620, - 1647, 1788, 654, 836, 850, 1018, 1032, 1046, - 1200, 1214, 1228, 1242, 1396, 1410, 668, 809, - 864, 878, 1005, 1060, 1256, 1424, 1438, 613, - 641, 823, 837, 1019, 1074, 1201, 1215, 1397, - 1033, 1229, 655, 851, 1047, 1243, 1411, 669, - 683, 810, 865, 879, 1006, 1061, 1257, 1425, - 1439, 614, 642, 1075, 1202, 1398, 1270, 1452, - 1271, 1453, 656, 852, 1034, 1230, 1412, 1592, - 1606, 1620, 1593, 1607, 1621, 1634, 1466, 1635, - 1048, 1467, 1594, 1648, 1649, 1244, 1426, 1608, - 1788, 1802, 1816, 1789, 1803, 1817, 1830, 1662, - 1831, 1663, 1790, 663, 845, 846, 858, 859, - 871, 1014, 1028, 1040, 1041, 1042, 1053, 1054, - 1055, 1209, 1210, 1223, 1224, 1263, 1264, 1392, - 1405, 1406, 1418, 1419, 1431, 1432, 1445, 664, - 677, 860, 873, 1056, 1238, 1252, 1265, 1420, - 1433, 1446, 1459, 678, 1070, 1082, 1266, 1434, - 1447, 1460, 1601, 1614, 1602, 1615, 1628, 1278, - 1448, 1461, 1616, 1629, 1588, 1627, 1641, 1642, - 1655, 1462, 1630, 1643, 1656, 1797, 1810, 1798, - 1811, 1473, 1824, 1474, 1644, 1657, 1812, 1825, - 678, 833, 847, 860, 873, 1015, 1029, 1042, - 1043, 1055, 1056, 1070, 1211, 1224, 1225, 1238, - 1252, 1265, 1266, 1393, 1407, 1420, 1433, 1434, - 1447, 665, 861, 1057, 1239, 1253, 1421, 1448, - 679, 834, 848, 875, 1016, 1030, 1044, 1071, - 1212, 1226, 1267, 1394, 1408, 1435, 666, 862, - 1058, 1240, 1254, 1422, 1449, 887, 1461, 888, - 1084, 1462, 680, 876, 889, 1072, 1085, 1268, - 1436, 1463, 1616, 1603, 1617, 1604, 1279, 1630, - 1280, 1631, 1281, 1450, 1618, 1589, 1629, 1643, - 1644, 1590, 1645, 1657, 1658, 1464, 1632, 1659, - 1812, 1799, 1813, 1800, 1475, 1826, 1476, 1827, - 1477, 1646, 1814, 680, 835, 849, 862, 876, - 1017, 1031, 1044, 1045, 1058, 1072, 1213, 1226, - 1227, 1240, 1254, 1268, 1395, 1409, 1422, 1436, - 667, 863, 1059, 1241, 1255, 1423, 1450, 681, - 836, 850, 877, 1018, 1032, 1046, 1073, 1214, - 1228, 1269, 1396, 1410, 1437, 668, 864, 1060, - 1242, 1256, 1424, 1451, 890, 1086, 1464, 878, - 891, 1074, 1087, 1270, 1438, 1465, 1618, 1605, - 1619, 1606, 1632, 1282, 1633, 1283, 1452, 1620, - 1591, 1646, 1592, 1647, 1660, 1466, 1634, 1661, - 1814, 1801, 1815, 1802, 1828, 1478, 1829, 1479, - 1648, 1816, 864, 878, 1046, 1060, 1074, 1228, - 1242, 1256, 1270, 1424, 1438, 696, 823, 837, - 892, 1005, 1019, 1033, 1201, 1215, 1397, 1452, - 1466, 641, 655, 669, 851, 865, 1047, 1088, - 1229, 1243, 1411, 1425, 1061, 1257, 683, 879, - 1075, 1271, 1439, 697, 893, 1006, 1034, 1202, - 1398, 1453, 1467, 642, 656, 852, 866, 1048, - 1089, 1230, 1244, 1412, 1426, 1284, 1285, 684, - 880, 1062, 1258, 1440, 1620, 1634, 1648, 1593, - 1607, 1621, 1635, 1649, 1594, 1608, 1662, 1480, - 1663, 1076, 1481, 1622, 1272, 1454, 1636, 1816, - 1830, 1844, 1789, 1803, 1817, 1831, 1845, 1790, - 1804, 1858, 1676, 1859, 1677, 1818, 1624, 1638, - 1652, 1387, 1583, 1597, 1598, 1611, 1779, 1053, - 1430, 1444, 1585, 1612, 1625, 871, 1431, 844, - 858, 1040, 1054, 1263, 1418, 1445, 1458, 1626, - 1639, 1680, 1807, 1862, 1432, 1459, 1640, 1653, - 1289, 1264, 1446, 1694, 1821, 1460, 1485, 1627, - 1641, 1655, 1667, 1835, 1876, 1473, 1599, 1613, - 1849, 1628, 1642, 1668, 1836, 1850, 1512, 1822, - 2030, 1614, 1809, 1823, 1837, 1669, 1681, 1863, - 1780, 1795, 1808, 1975, 1989, 1990, 2017, 1991, - 2058, 2005, 2018, 2031, 2019, 2032, 2045, 858, - 871, 1040, 1053, 1054, 1263, 1418, 1431, 1432, - 1444, 1445, 1458, 859, 873, 1041, 1055, 1264, - 1419, 1433, 1446, 1459, 1082, 1265, 1278, 1447, - 1460, 1289, 1473, 1485, 1641, 1655, 887, 1461, - 1303, 1474, 1668, 1279, 1292, 1627, 1640, 1628, - 1642, 1656, 1667, 1304, 1475, 1487, 1669, 1614, - 1653, 1615, 1629, 1643, 1657, 1681, 1488, 1670, - 1682, 1823, 1836, 1824, 1837, 1850, 1838, 1851, - 1852, 1499, 1864, 1500, 1671, 1683, 1865, 860, - 873, 1042, 1055, 1056, 1070, 1082, 1238, 1252, - 1264, 1265, 1278, 1420, 1433, 1434, 1446, 1447, - 1459, 1460, 691, 887, 1266, 1279, 1448, 1461, - 1473, 692, 888, 1084, 1280, 1462, 1474, 1292, - 1097, 1293, 1475, 1109, 1487, 706, 902, 1098, - 1294, 1476, 1488, 1629, 1642, 1630, 1643, 1656, - 1644, 1657, 1658, 1305, 1670, 1489, 1671, 1616, - 1655, 1669, 1683, 1490, 1672, 1684, 1825, 1838, - 1826, 1839, 1852, 1840, 1853, 1854, 1501, 1866, - 1502, 1685, 1867, 692, 861, 875, 887, 888, - 1043, 1057, 1070, 1071, 1084, 1239, 1252, 1253, - 1266, 1279, 1280, 1421, 1435, 1448, 1461, 1462, - 1267, 1449, 693, 862, 876, 889, 1044, 1058, - 1072, 1085, 1240, 1254, 1281, 1422, 1436, 1463, - 1268, 1450, 1097, 1475, 902, 1098, 1476, 694, - 890, 903, 1086, 1099, 1282, 1464, 1477, 706, - 1293, 1294, 707, 1295, 915, 1111, 1489, 916, - 1112, 1490, 708, 904, 917, 1100, 1113, 1296, - 1478, 1491, 1644, 1631, 1645, 1632, 1658, 1659, - 1646, 1660, 1307, 1672, 1308, 1673, 1309, 1617, - 1657, 1618, 1671, 1685, 1686, 1492, 1674, 1687, - 1840, 1827, 1841, 1828, 1854, 1855, 1842, 1856, - 1503, 1868, 1504, 1869, 1505, 694, 863, 877, - 890, 1045, 1059, 1072, 1073, 1086, 1241, 1254, - 1255, 1268, 1282, 1423, 1437, 1450, 1464, 1269, - 1451, 695, 864, 878, 891, 1046, 1060, 1074, - 1087, 1242, 1256, 1283, 1424, 1438, 1465, 1270, - 1452, 904, 1100, 1478, 696, 892, 905, 1088, - 1101, 1284, 1466, 1479, 708, 1296, 709, 1297, - 918, 1114, 1492, 710, 906, 919, 1102, 1115, - 1298, 1480, 1493, 1646, 1633, 1647, 1634, 1660, - 1661, 1648, 1662, 1674, 1310, 1675, 1311, 1619, - 1620, 1688, 1494, 1676, 1689, 1842, 1829, 1843, - 1830, 1856, 1857, 1844, 1858, 1870, 1506, 1871, - 1507, 696, 892, 1074, 1088, 1256, 1270, 1284, - 1452, 1466, 710, 851, 865, 906, 1033, 1047, - 1061, 1229, 1243, 1411, 1425, 1480, 669, 683, - 879, 1075, 1102, 1257, 1271, 1439, 1453, 697, - 893, 1089, 1285, 1467, 711, 852, 866, 907, - 1034, 1048, 1062, 1230, 1244, 1412, 1426, 1481, - 684, 880, 1076, 1103, 1258, 1272, 1440, 1454, - 1298, 1299, 698, 894, 1468, 724, 920, 1494, - 1116, 725, 921, 1495, 1090, 1117, 1286, 1312, - 1313, 712, 908, 1482, 1648, 1662, 1607, 1621, - 1635, 1649, 1663, 1608, 1622, 1636, 1676, 1677, - 1650, 1664, 1690, 1508, 1691, 1104, 1509, 1300, - 1678, 1844, 1858, 1803, 1817, 1831, 1845, 1859, - 1804, 1818, 1832, 1872, 1873, 1846, 1860, 1886, - 1704, 1887, 1705, 880, 1062, 1076, 1244, 1258, - 1272, 1440, 1454, 698, 894, 1090, 1286, 1468, - 712, 867, 908, 1245, 1413, 1482, 881, 1077, - 1104, 1273, 1441, 1300, 699, 895, 1469, 1091, - 1287, 726, 922, 1496, 1118, 1314, 713, 909, - 1483, 1105, 1301, 1636, 1650, 1664, 1609, 1623, - 1637, 1678, 1651, 1692, 1510, 1497, 1832, 1846, - 1860, 1833, 1874, 1847, 1888, 1706, 1875, 1412, - 1426, 1594, 1608, 1622, 1790, 1804, 1399, 1818, - 1595, 1791, 1986, 2000, 2014, 2028, 2042, 2056, - 2070, 1524, 1902, 2084, 2071, 2098, 1652, 1680, - 1862, 1625, 1639, 871, 1053, 1263, 1289, 1430, - 1431, 1444, 1445, 1458, 1459, 1512, 1611, 1612, - 1626, 1640, 1653, 1667, 1694, 1821, 1835, 1876, - 1485, 1303, 1473, 1304, 1109, 1121, 1317, 1487, - 1499, 1708, 730, 926, 1305, 1318, 1500, 1849, - 1668, 1681, 1682, 1330, 1501, 1513, 1695, 1890, - 1669, 1863, 1683, 1904, 1514, 1696, 1864, 1877, - 1878, 1526, 1697, 1709, 1891, 718, 902, 1084, - 1097, 1098, 1109, 1279, 1280, 1292, 1293, 1305, - 1475, 1476, 1487, 1488, 915, 1111, 1294, 1307, - 1489, 1123, 1501, 916, 1112, 1124, 1308, 1490, - 1502, 1319, 1320, 733, 1125, 1321, 1503, 1515, - 930, 1126, 1322, 1504, 1516, 1671, 1672, 1684, - 1685, 1686, 1698, 1517, 1699, 1683, 1697, 1711, - 1518, 1700, 1712, 1867, 1868, 1880, 1881, 1882, - 1894, 1713, 1895, 903, 915, 916, 1085, 1098, - 1099, 1111, 1112, 1281, 1294, 1307, 1308, 1477, - 1489, 1490, 1295, 721, 904, 917, 1086, 1100, - 1113, 1282, 1309, 1478, 1491, 1296, 1125, 1503, - 930, 1126, 1504, 722, 918, 931, 1114, 1127, - 1310, 1492, 1505, 1321, 1322, 735, 1323, 1517, - 1518, 736, 932, 1128, 1324, 1506, 1519, 1673, - 1674, 1686, 1687, 1688, 1700, 1701, 1685, 1699, - 1713, 1714, 1520, 1702, 1715, 1869, 1870, 1882, - 1883, 1884, 1896, 1897, 722, 905, 918, 1087, - 1100, 1101, 1114, 1283, 1296, 1310, 1479, 1492, - 1297, 723, 906, 919, 1088, 1102, 1115, 1284, - 1311, 1480, 1493, 1298, 932, 1128, 1506, 724, - 920, 933, 1116, 1129, 1312, 1494, 1507, 736, - 1324, 737, 1325, 1520, 738, 934, 1130, 1326, - 1508, 1521, 1675, 1676, 1688, 1689, 1690, 1702, - 1703, 1716, 1522, 1704, 1717, 1871, 1872, 1884, - 1885, 1886, 1898, 1899, 724, 920, 1102, 1116, - 1298, 1312, 1494, 738, 893, 934, 1089, 1285, - 1467, 1508, 711, 907, 1103, 1130, 1299, 1481, - 725, 921, 1117, 1313, 1495, 739, 894, 935, - 1090, 1286, 1468, 1509, 712, 908, 1104, 1131, - 1300, 1482, 1326, 1327, 726, 922, 1496, 1522, - 1523, 1118, 1314, 740, 936, 1510, 1690, 1663, - 1677, 1691, 1664, 1678, 1704, 1705, 1692, 1718, - 1719, 1132, 1328, 1706, 1886, 1859, 1873, 1887, - 1860, 1874, 1900, 1901, 1888, 1914, 1915, 908, - 1104, 1286, 1300, 1482, 726, 922, 1118, 1314, - 1496, 740, 895, 936, 1091, 1287, 1469, 1510, - 713, 909, 1105, 1132, 1301, 1483, 1328, 727, - 923, 1497, 1119, 1315, 1524, 741, 1511, 1133, - 1329, 1678, 1692, 1706, 1720, 1707, 1525, 1874, - 1888, 1875, 1902, 1916, 1512, 1694, 1708, 1121, - 1289, 1303, 1330, 1485, 1499, 1681, 1304, 1317, - 926, 1500, 1109, 1123, 1305, 1318, 1501, 1513, - 1526, 1319, 1514, 1695, 1709, 1124, 1320, 1331, - 1502, 1515, 1710, 1722, 1332, 1527, 1137, 1540, - 1333, 1528, 1723, 942, 1138, 1334, 1345, 1529, - 1724, 1696, 1516, 1697, 1711, 1918, 1736, 1905, - 1346, 1530, 1541, 1725, 1904, 1682, 1877, 1891, - 1698, 1906, 1919, 1920, 1892, 1712, 1893, 1907, - 2114, 1932, 1542, 1726, 1737, 1921, 1123, 1124, - 1305, 1318, 1319, 1501, 1502, 1513, 1514, 1111, - 1125, 1307, 1320, 1503, 1515, 1321, 1516, 1137, - 1331, 1332, 1527, 1710, 1711, 746, 930, 942, - 1126, 1138, 1322, 1333, 1504, 1517, 1528, 1712, - 1334, 943, 1139, 1529, 1335, 1530, 1345, 1346, - 1541, 1724, 1725, 944, 1140, 1152, 1336, 1347, - 1531, 1542, 1726, 1697, 1698, 1518, 1699, 1713, - 1348, 1532, 1543, 1727, 1709, 1723, 1906, 1907, - 1700, 1908, 1737, 1920, 1921, 1738, 1922, 1893, - 1894, 1714, 1895, 1909, 1544, 1728, 1739, 1923, - 930, 1112, 1124, 1125, 1126, 1307, 1308, 1320, - 1321, 1503, 1504, 1515, 1516, 1322, 1517, 1137, - 942, 1138, 1518, 551, 746, 747, 943, 1139, - 1332, 1333, 1334, 1528, 1529, 1712, 1713, 552, - 748, 931, 944, 1127, 1140, 1323, 1335, 1505, - 1530, 1714, 1336, 1531, 1152, 1532, 957, 1153, - 1346, 1347, 1348, 1542, 1543, 1726, 1727, 566, - 945, 958, 1141, 1154, 1337, 1349, 1544, 1728, - 1699, 1700, 1519, 1350, 1533, 1545, 1711, 1724, - 1725, 1908, 1909, 1701, 1910, 1738, 1739, 1922, - 1923, 1740, 1924, 1895, 1896, 1715, 1546, 1729, - 1741, 931, 1113, 1126, 1127, 1309, 1322, 1505, - 1517, 1518, 1323, 932, 1114, 1128, 1310, 1506, - 1519, 1324, 552, 735, 747, 748, 942, 943, - 944, 1138, 1139, 1140, 1334, 1335, 1714, 553, - 736, 749, 945, 1141, 1336, 1520, 1715, 1530, - 1531, 1532, 1337, 554, 750, 933, 946, 1129, - 1142, 1325, 1507, 1533, 1716, 1338, 1521, 566, - 957, 958, 1152, 1153, 1154, 1348, 1349, 1728, - 567, 763, 959, 1155, 1350, 1534, 1729, 1544, - 1545, 1546, 1351, 568, 764, 947, 960, 1143, - 1156, 1339, 1547, 1730, 1701, 1702, 1713, 1727, - 1352, 1535, 1910, 1911, 1726, 1703, 1912, 1717, - 1924, 1925, 1740, 1741, 1742, 1743, 1926, 1897, - 1898, 1909, 1923, 1548, 1731, 933, 1115, 1128, - 1129, 1311, 1324, 1507, 1520, 1325, 934, 1116, - 1130, 1312, 1508, 1521, 1326, 554, 737, 750, - 945, 946, 1141, 1142, 1337, 1716, 555, 738, - 751, 947, 1143, 1338, 1522, 1717, 1533, 1534, - 1339, 556, 752, 948, 1144, 1535, 1718, 1340, - 568, 764, 959, 960, 1155, 1156, 1351, 1730, - 569, 765, 961, 1157, 1352, 1536, 1731, 1547, - 1548, 1353, 570, 766, 962, 1158, 1549, 1732, - 1703, 1704, 1354, 1912, 1913, 1729, 1914, 1926, - 1927, 1743, 1744, 1745, 1928, 1899, 1900, 1550, - 1130, 1326, 1522, 556, 725, 739, 752, 921, - 935, 948, 1117, 1144, 1299, 1313, 1495, 1509, - 1718, 1131, 1327, 1523, 557, 726, 740, 753, - 922, 936, 949, 1118, 1145, 1300, 1314, 1496, - 1510, 1719, 1132, 1328, 947, 1143, 1339, 1340, - 1341, 1524, 1535, 1536, 1537, 766, 962, 558, - 754, 767, 1720, 570, 1158, 1732, 1354, 1159, - 1733, 362, 1342, 1355, 1538, 961, 1157, 1353, - 1549, 1550, 1551, 1691, 1705, 1692, 1706, 1734, - 1914, 1915, 1731, 1916, 1928, 1929, 1745, 1746, - 1747, 1887, 1901, 1888, 1902, 1930, 1345, 1346, - 1347, 1530, 1541, 1152, 1348, 1531, 1542, 957, - 1153, 1543, 1349, 1544, 1360, 1555, 1738, 1739, - 958, 1154, 1350, 1361, 1545, 1556, 1740, 1362, - 1546, 1557, 1741, 1726, 1737, 1727, 1751, 1934, - 1935, 1936, 1742, 1753, 1937, 1532, 959, 1155, - 1351, 1364, 1547, 1560, 1754, 1728, 1938, 1743, - 1949, 1756, 983, 1178, 1179, 1375, 1571, 1376, - 1624, 1387, 1572, 1638, 1583, 1768, 1597, 1598, - 1611, 1779, 1652, 1585, 1780, 1573, 1807, 1975, - 1769, 2030, 1989, 1375, 1376, 1571, 1377, 1572, - 1573, 1768, 1387, 1583, 1378, 1574, 1769, 1597, - 1779, 998, 1390, 1585, 1598, 1599, 1611, 1770, - 1780, 1612, 1430, 1600, 1613, 1975, 1625, 1807, - 1587, 1626, 1795, 1808, 1989, 1990, 1796, 1809, - 1821, 1978, 1991, 1639, 1822, 1783, 1624, 1638, - 1652, 2030, 1835, 1862, 2017, 1377, 1378, 1572, - 1573, 1768, 1574, 1769, 1770, 1390, 1585, 1195, - 1379, 1575, 1598, 1599, 1780, 1000, 1196, 1209, - 1392, 1405, 1418, 1431, 1587, 1588, 1600, 1601, - 1613, 1771, 1795, 1430, 1612, 1614, 1406, 1419, - 1432, 1602, 1615, 1783, 1796, 1626, 1808, 1627, - 1809, 1628, 1784, 1797, 1810, 1990, 1978, 1991, - 1798, 1811, 1979, 1992, 1822, 1823, 2005, 1824, - 1980, 1993, 2006, 1611, 1625, 1807, 1444, 1639, - 1640, 1821, 1445, 1458, 1641, 1653, 1835, 1836, - 1989, 2017, 1837, 2018, 1849, 2031, 1850, 2019, - 2032, 1379, 1574, 1769, 1770, 1575, 1380, 1771, - 1576, 1390, 1392, 1772, 1196, 1405, 1587, 1406, - 1588, 1197, 1393, 1381, 1407, 1577, 1589, 1210, - 1418, 1419, 1600, 1601, 1783, 1420, 1602, 1784, - 1211, 1198, 1394, 1421, 1603, 1773, 1785, 1433, - 1434, 1615, 1616, 1797, 1798, 1212, 1408, 1435, - 1590, 1617, 1799, 1604, 1614, 1796, 1629, 1811, - 1980, 1786, 1981, 1630, 1812, 1631, 1813, 1979, - 1978, 1993, 1994, 1995, 1800, 1810, 1992, 1825, - 2007, 1982, 1826, 2008, 1827, 2009, 1381, 1576, - 1772, 1577, 1382, 1773, 1578, 1393, 1394, 1774, - 1198, 1407, 1589, 1408, 1590, 1199, 1395, 1409, - 1591, 1970, 1212, 1421, 1603, 1785, 1422, 1604, - 1786, 1213, 1200, 1396, 1423, 1605, 1787, 1436, - 1618, 1800, 1214, 1410, 1437, 1592, 1619, 1801, - 1606, 1617, 1799, 1982, 1788, 1983, 1632, 1814, - 1633, 1815, 1981, 1996, 1997, 1802, 1813, 1995, - 1984, 1828, 2010, 1829, 2011, 1450, 1424, 1451, - 1620, 1646, 1464, 1647, 1438, 1465, 1634, 1660, - 1842, 1661, 1816, 1843, 2024, 1830, 1998, 2025, - 1856, 2038, 1857, 2012, 2039, 1578, 1774, 1383, - 1970, 1187, 1396, 1579, 1775, 1384, 1971, 1188, - 1397, 1580, 1395, 1004, 1018, 1200, 1214, 1409, - 1410, 1423, 1591, 1592, 1605, 1787, 1005, 1019, - 1201, 1215, 1411, 1593, 1776, 1213, 1227, 1424, - 1606, 1788, 1438, 1620, 1802, 1425, 1607, 1789, - 1439, 1621, 1803, 1972, 1242, 1256, 1452, 1634, - 1816, 1984, 1006, 1202, 1243, 1257, 1398, 1453, - 1594, 1635, 1817, 1985, 1466, 1648, 1830, 1412, - 1467, 1649, 1831, 1619, 1801, 1998, 1999, 2012, - 1608, 1790, 2013, 1983, 1662, 1844, 2026, 1663, - 1845, 2027, 2166, 2167, 1815, 1997, 2168, 1804, - 1986, 1384, 1580, 1776, 1385, 1972, 1398, 1581, - 1006, 1202, 1412, 1594, 1777, 1973, 1425, 1439, - 1607, 1621, 1789, 1803, 1426, 1608, 1790, 1440, - 1622, 1804, 1203, 1399, 1413, 1595, 1244, 1258, - 1454, 1636, 1818, 1986, 1468, 1650, 1832, 1609, - 1635, 1817, 2000, 1791, 2014, 1985, 1999, 1664, - 1846, 2028, 2168, 1831, 2013, 2169, 2182, 1860, - 2042, 1623, 2027, 2196, 2056, 2210, 1637, 1833, - 2183, 2181, 2195, 2224, 2365, 2364, 2209, 2238, - 2223, 2378, 2392, 2406, 2391, 2252, 2420, 1392, - 1405, 1406, 1418, 1419, 1431, 1432, 1445, 1587, - 1588, 1600, 1601, 1613, 1614, 1615, 1627, 1628, - 1783, 1795, 1796, 1809, 1420, 1433, 1446, 1602, - 1616, 1629, 1784, 1797, 1810, 1459, 1641, 1642, - 1823, 1434, 1447, 1460, 1630, 1643, 1798, 1811, - 1824, 1978, 1979, 1655, 1837, 1992, 1656, 1812, - 1825, 1838, 1980, 1993, 1991, 2005, 2006, 2019, - 1826, 1839, 1994, 2007, 2020, 1851, 2033, 1852, - 2008, 2021, 2034, 1448, 1461, 1644, 1657, 1473, - 1462, 1474, 1658, 1669, 1670, 1840, 1853, 2047, - 1854, 2022, 2035, 2048, 1865, 1866, 2036, 2049, - 1393, 1407, 1420, 1433, 1434, 1447, 1588, 1589, - 1602, 1615, 1616, 1629, 1630, 1784, 1797, 1798, - 1811, 1421, 1448, 1603, 1617, 1785, 1812, 1394, - 1408, 1435, 1590, 1631, 1799, 1422, 1449, 1604, - 1618, 1786, 1813, 1461, 1643, 1644, 1825, 1462, - 1826, 1645, 1436, 1463, 1632, 1800, 1827, 1980, - 1981, 1657, 1839, 1994, 1658, 1840, 1995, 1659, - 1814, 1841, 1982, 1993, 2007, 2008, 2009, 2021, - 2022, 1828, 1996, 2023, 1853, 2035, 1854, 2036, - 1855, 2010, 2037, 1424, 1438, 1592, 1606, 1620, - 1634, 1788, 1802, 1397, 1452, 1466, 1648, 1816, - 1830, 1411, 1425, 1593, 1607, 1789, 1621, 1439, - 1635, 1803, 1398, 1453, 1467, 1649, 1817, 1831, - 1412, 1426, 1594, 1608, 1790, 1662, 1844, 1663, - 1845, 1440, 1622, 1804, 1984, 1998, 2012, 1985, - 1999, 2013, 2026, 1858, 2027, 1859, 1986, 2040, - 2041, 1636, 1818, 2000, 2054, 2055, 1480, 1481, - 1454, 1676, 1677, 1468, 1650, 1832, 1872, 1873, - 2014, 1664, 1846, 2028, 2068, 2069, 1418, 1431, - 1432, 1444, 1445, 1458, 1599, 1600, 1612, 1613, - 1614, 1626, 1627, 1639, 1640, 1641, 1653, 1795, - 1796, 1808, 1809, 1821, 1822, 1835, 1419, 1433, - 1446, 1459, 1601, 1615, 1628, 1642, 1655, 1783, - 1797, 1810, 1823, 1836, 1849, 1447, 1460, 1629, - 1656, 1811, 1824, 1837, 1850, 1991, 1992, 2005, - 1667, 2018, 1643, 1668, 1825, 1838, 1851, 2006, - 2019, 1978, 2017, 2031, 1979, 1993, 2032, 2045, - 1852, 2007, 2020, 2033, 2046, 1863, 1839, 1864, - 2021, 2034, 2047, 1421, 1435, 1448, 1461, 1462, - 1603, 1616, 1617, 1630, 1643, 1644, 1657, 1658, - 1785, 1799, 1812, 1825, 1826, 1839, 1449, 1631, - 1645, 1813, 1840, 1422, 1436, 1463, 1604, 1618, - 1659, 1786, 1800, 1827, 1450, 1632, 1646, 1814, - 1841, 1475, 1853, 1476, 1854, 1464, 1477, 1660, - 1828, 1855, 2008, 1995, 2009, 1996, 1671, 2022, - 1672, 2023, 1673, 1842, 2010, 1981, 2021, 2035, - 2036, 1982, 2037, 2049, 2050, 1856, 2024, 2051, - 1867, 1868, 1869, 2038, 1423, 1437, 1450, 1464, - 1605, 1618, 1619, 1632, 1646, 1660, 1787, 1801, - 1814, 1828, 1451, 1633, 1647, 1815, 1842, 1424, - 1438, 1465, 1606, 1620, 1661, 1788, 1802, 1829, - 1452, 1634, 1648, 1816, 1843, 1478, 1856, 1466, - 1479, 1662, 1830, 1857, 2010, 1997, 2011, 1998, - 2024, 1674, 2025, 1675, 1844, 2012, 1983, 2038, - 1984, 2039, 2052, 1858, 2026, 2053, 1870, 1871, - 2040, 1492, 1480, 1493, 1676, 1688, 1689, 1506, - 1884, 1494, 1507, 1690, 1872, 1885, 2054, 2066, - 1702, 2067, 1703, 2080, 1886, 2068, 2081, 1898, - 1899, 1638, 1652, 1583, 1597, 1611, 1625, 1680, - 1779, 1862, 2030, 1430, 1598, 1612, 1639, 1780, - 1807, 1821, 1975, 1989, 1444, 1626, 1653, 1808, - 1835, 1458, 1640, 1822, 1445, 1459, 1627, 1641, - 1667, 1809, 1823, 1836, 1849, 1876, 2058, 1655, - 1668, 1837, 1850, 1694, 2017, 1473, 1485, 1681, - 1851, 1863, 1512, 1890, 2031, 2072, 1669, 1682, - 1864, 2018, 2032, 2045, 2046, 1708, 1865, 1877, - 2059, 1990, 2005, 2019, 2033, 2047, 2086, 1878, - 2060, 1904, 2061, 2073, 1446, 1459, 1460, 1627, - 1628, 1640, 1641, 1642, 1655, 1667, 1668, 1810, - 1823, 1824, 1836, 1837, 1849, 1850, 1447, 1461, - 1473, 1629, 1643, 1656, 1669, 1811, 1825, 1838, - 1851, 1485, 1863, 1474, 1657, 1670, 1839, 1852, - 1864, 1681, 1682, 1475, 1487, 1683, 1853, 1865, - 1499, 1877, 1488, 1500, 1671, 1684, 1866, 1878, - 2019, 2032, 2020, 2033, 2046, 2034, 2047, 2048, - 1695, 2060, 1696, 1867, 1879, 2061, 2006, 2045, - 2007, 2021, 2059, 2035, 2049, 2073, 1880, 2062, - 2074, 1891, 1892, 2063, 2075, 1448, 1461, 1462, - 1473, 1474, 1629, 1630, 1642, 1643, 1644, 1656, - 1657, 1669, 1670, 1812, 1825, 1826, 1838, 1839, - 1851, 1852, 1475, 1658, 1671, 1840, 1853, 1487, - 1865, 1476, 1488, 1672, 1854, 1866, 1683, 1684, - 1489, 1685, 1867, 1501, 1879, 1490, 1502, 1686, - 1868, 1880, 2021, 2034, 2022, 2035, 2048, 2036, - 2049, 2050, 1697, 2062, 1698, 1881, 2063, 2008, - 2047, 2061, 2075, 1882, 2064, 2076, 1893, 1894, - 2077, 1449, 1463, 1475, 1476, 1631, 1644, 1645, - 1658, 1671, 1672, 1813, 1827, 1840, 1853, 1854, - 1659, 1841, 1450, 1464, 1477, 1632, 1646, 1673, - 1814, 1828, 1855, 1660, 1842, 1489, 1867, 1490, - 1868, 1478, 1491, 1674, 1856, 1869, 1685, 1686, - 1687, 1503, 1881, 1504, 1882, 1492, 1505, 1688, - 1870, 1883, 2036, 2023, 2037, 2024, 2050, 2051, - 2038, 2052, 1699, 2064, 1700, 2065, 1701, 2009, - 2049, 2010, 2063, 2077, 2078, 1884, 2066, 2079, - 1895, 1896, 1897, 1480, 1648, 1662, 1676, 1844, - 1858, 1439, 1453, 1494, 1621, 1635, 1803, 1817, - 1872, 1467, 1649, 1663, 1831, 1845, 1481, 1677, - 1859, 1440, 1454, 1495, 1622, 1636, 1804, 1818, - 1873, 1468, 1650, 1664, 1832, 1846, 1690, 1691, - 1482, 1860, 1508, 1886, 1509, 1887, 1678, 1704, - 1705, 1496, 1874, 2040, 2054, 1999, 2013, 2027, - 2041, 2055, 2000, 2014, 2028, 2068, 2069, 2042, - 2056, 2082, 1900, 2083, 1901, 1692, 2070, 2096, - 2097, 1680, 1694, 1876, 1512, 1890, 1289, 1485, - 1653, 1667, 1708, 1835, 1836, 1849, 1850, 1863, - 2031, 2045, 2072, 1668, 1681, 1864, 1487, 1499, - 1669, 1682, 1695, 1865, 1877, 1904, 2086, 1500, - 1683, 1696, 1878, 1303, 2059, 1501, 1513, 1709, - 1879, 1891, 1330, 1526, 2100, 1514, 1697, 1710, - 1892, 2060, 2073, 2074, 1722, 1893, 1905, 2087, - 2032, 2046, 2061, 2075, 1906, 2088, 1918, 2089, - 2101, 1487, 1488, 1499, 1500, 1669, 1670, 1682, - 1683, 1695, 1696, 1865, 1866, 1877, 1878, 1489, - 1501, 1671, 1684, 1697, 1867, 1879, 1513, 1891, - 1502, 1514, 1685, 1698, 1880, 1892, 1709, 1710, - 1503, 1515, 1711, 1881, 1893, 1905, 1516, 1699, - 1712, 1894, 1906, 2061, 2062, 2074, 2075, 2076, - 2088, 1895, 1907, 2089, 2073, 2063, 2087, 2077, - 2101, 1908, 2090, 2102, 2091, 2103, 1490, 1672, - 1868, 1686, 1504, 1700, 1882, 1517, 1713, 1518, - 1714, 1896, 2064, 2078, 1909, 1910, 2092, 2104, - 2105, 1491, 1503, 1504, 1673, 1686, 1699, 1700, - 1869, 1881, 1882, 1687, 1492, 1505, 1674, 1701, - 1870, 1883, 1688, 1517, 1895, 1518, 1896, 1506, - 1519, 1702, 1884, 1897, 1713, 1714, 1715, 1909, - 1910, 1520, 1716, 1898, 1911, 2065, 2066, 2078, - 2079, 2080, 2092, 2093, 2077, 2091, 2105, 2106, - 1912, 2094, 2107, 1493, 1506, 1675, 1688, 1702, - 1871, 1884, 1689, 1494, 1507, 1676, 1703, 1872, - 1885, 1690, 1520, 1898, 1508, 1521, 1704, 1886, - 1899, 1716, 1717, 1912, 1522, 1718, 1900, 1913, - 2067, 2068, 2080, 2081, 2082, 2094, 2095, 2108, - 1914, 2096, 2109, 1508, 1690, 1704, 1886, 1481, - 1522, 1677, 1859, 1900, 1495, 1691, 1873, 1509, - 1705, 1887, 1482, 1523, 1678, 1860, 1901, 1496, - 1692, 1874, 1718, 1719, 1510, 1888, 1914, 1915, - 1706, 1524, 1902, 2082, 2055, 2069, 2083, 2056, - 2070, 2096, 2097, 2084, 2110, 2111, 1720, 2098, - 1496, 1678, 1692, 1874, 1510, 1706, 1888, 1483, - 1524, 1902, 1301, 1497, 1720, 1875, 1315, 1511, - 2071, 1916, 1707, 1525, 1903, 1721, 2070, 2084, - 2098, 2085, 2112, 2099, 1708, 1904, 1330, 1526, - 2100, 1317, 1499, 1500, 1513, 1681, 1682, 1695, - 1722, 1877, 1878, 1891, 2073, 1696, 1709, 1514, - 1892, 1515, 1697, 1710, 1893, 1905, 1918, 1711, - 1906, 2087, 1331, 1527, 2101, 1332, 1516, 1528, - 1712, 1723, 1894, 1907, 2102, 1540, 2114, 1724, - 1736, 1529, 1919, 1932, 1725, 1920, 1345, 1541, - 2115, 1346, 1530, 1542, 1726, 1737, 1921, 2116, - 2088, 1908, 2089, 2103, 2128, 1738, 1922, 1933, - 2117, 2074, 2090, 2104, 2310, 1934, 2118, 2129, - 1515, 1516, 1697, 1698, 1710, 1711, 1893, 1894, - 1905, 1906, 1517, 1699, 1712, 1895, 1907, 1527, - 1528, 1713, 1908, 1332, 1333, 1529, 1723, 1724, - 1919, 2102, 2103, 1334, 1518, 1530, 1714, 1725, - 1896, 1909, 1920, 2104, 1726, 1531, 1921, 1541, - 1542, 1727, 1922, 1346, 1347, 1543, 1737, 1738, - 1933, 2116, 2117, 1348, 1532, 1544, 1728, 1739, - 1923, 1934, 2118, 2089, 2090, 1910, 2091, 2105, - 1740, 1924, 1935, 2119, 2101, 2115, 2092, 2129, - 2130, 2106, 1936, 2120, 2131, 1517, 1518, 1699, - 1700, 1712, 1713, 1895, 1896, 1907, 1908, 1714, - 1909, 1529, 1530, 1910, 1334, 1335, 1531, 1724, - 1725, 1726, 1920, 1921, 2104, 2105, 1336, 1519, - 1532, 1715, 1727, 1897, 1922, 2106, 1728, 1923, - 1543, 1544, 1924, 1348, 1349, 1545, 1738, 1739, - 1740, 1934, 1935, 2118, 2119, 1350, 1533, 1546, - 1729, 1741, 1936, 2120, 2091, 2092, 1911, 1742, - 1925, 1937, 2103, 2116, 2117, 2093, 2130, 2131, - 2132, 2107, 1938, 2121, 2133, 1519, 1701, 1714, - 1897, 1909, 1910, 1715, 1520, 1702, 1898, 1911, - 1716, 1336, 1530, 1531, 1532, 1726, 1727, 2106, - 1337, 1533, 1728, 1912, 2107, 1922, 1923, 1924, - 1729, 1338, 1521, 1534, 1717, 1899, 1925, 2108, - 1730, 1913, 1350, 1544, 1545, 1546, 1740, 1741, - 2120, 1351, 1547, 1742, 1926, 2121, 1936, 1937, - 1938, 1743, 1352, 1535, 1548, 1731, 1939, 2122, - 2093, 2094, 2105, 2119, 1744, 1927, 2118, 2095, - 2109, 2132, 2133, 2134, 2135, 1940, 2123, 1521, - 1703, 1716, 1899, 1912, 1717, 1522, 1704, 1900, - 1913, 1718, 1338, 1533, 1534, 1729, 2108, 1339, - 1535, 1730, 1914, 2109, 1925, 1926, 1731, 1340, - 1536, 1927, 2110, 1732, 1352, 1547, 1548, 1743, - 2122, 1353, 1549, 1744, 1928, 2123, 1939, 1940, - 1745, 1354, 1550, 1941, 2124, 2095, 2096, 1746, - 2121, 2135, 2136, 2137, 1942, 1718, 1914, 1340, - 1509, 1523, 1536, 1691, 1705, 1887, 1901, 2110, - 1719, 1915, 1341, 1510, 1524, 1537, 1692, 1706, - 1888, 1902, 2111, 1720, 1535, 1731, 1732, 1733, - 1916, 1927, 1928, 1929, 1550, 1342, 1538, 1551, - 2112, 1354, 2124, 1746, 1355, 2125, 1734, 1747, - 1549, 1745, 1930, 1941, 1942, 1943, 2083, 2097, - 2084, 2098, 2126, 2123, 2137, 2138, 2139, 1524, - 1706, 1720, 1902, 1916, 1342, 1511, 1525, 1538, - 1707, 1903, 2112, 1721, 1734, 1930, 1147, 1343, - 1539, 1735, 2113, 1356, 1552, 2099, 2126, 1748, - 1931, 1944, 1357, 1553, 2127, 2098, 2085, 1749, - 2140, 1945, 2294, 2308, 2336, 2335, 1958, 2154, - 2504, 2505, 2518, 2490, 1540, 1736, 1932, 1358, - 1527, 1528, 1554, 1723, 1724, 1919, 2128, 1345, - 1541, 1920, 2115, 1542, 1725, 1737, 1921, 1738, - 1543, 1933, 1946, 1739, 1934, 1555, 2129, 1360, - 1544, 1556, 1740, 1751, 1935, 2130, 2116, 1936, - 2131, 2117, 1753, 1948, 2132, 2143, 2324, 2325, - 2144, 1922, 1923, 1545, 1741, 1361, 1557, 1362, - 1546, 1742, 1937, 1754, 1938, 1949, 2133, 2118, - 2119, 2134, 2145, 1544, 1545, 1739, 1740, 1741, - 1924, 1935, 1546, 1742, 1936, 1937, 1557, 1938, - 1362, 1753, 1754, 1948, 1949, 2132, 2133, 1364, - 1547, 1560, 1743, 2134, 1756, 1939, 1951, 1952, - 2146, 2120, 2131, 2144, 2145, 2135, 2147, 1546, - 1741, 1742, 1925, 1937, 1351, 1547, 1730, 1743, - 1926, 1938, 2121, 1352, 1548, 1731, 1744, 1927, - 1939, 2122, 1364, 1560, 1754, 2134, 1365, 1561, - 1756, 1940, 2135, 1951, 1952, 1757, 1366, 1549, - 1562, 1745, 1953, 2136, 1758, 1941, 2133, 2148, - 1954, 2149, 2123, 2146, 2147, 2137, 2150, 1548, - 1744, 1927, 1353, 1549, 1732, 1745, 1928, 1940, - 2123, 1354, 1550, 1746, 1941, 2124, 1366, 1561, - 1562, 1757, 2136, 1367, 1563, 1758, 1942, 2137, - 1953, 1954, 1759, 1564, 1955, 2138, 1760, 2150, - 1956, 2151, 2149, 2152, 2319, 2320, 2332, 2333, - 2334, 2346, 2347, 2331, 2345, 2348, 2515, 2516, - 2528, 2529, 2530, 2527, 2541, 1550, 1746, 1733, - 1929, 1942, 1355, 1551, 1564, 2125, 1747, 1734, - 1930, 1943, 1356, 1552, 1565, 2126, 2138, 1760, - 1369, 2139, 1748, 1761, 1563, 1759, 1944, 1955, - 1956, 1957, 1370, 1566, 2140, 2152, 2153, 1762, - 2151, 1958, 2321, 2334, 2335, 2348, 2154, 2336, - 2349, 2333, 2347, 2517, 2518, 2530, 2531, 2544, - 2545, 2529, 1356, 1552, 1748, 1930, 2126, 1735, - 1931, 1944, 1357, 1553, 1566, 2127, 1749, 1370, - 2140, 1762, 1945, 1958, 1371, 1567, 1763, 2154, - 1959, 2155, 2336, 2518, 2545, 2547, 2349, 2741, - 2742, 983, 1178, 1179, 1375, 1571, 1624, 1638, - 1572, 1768, 1583, 1387, 1779, 1769, 1597, 1652, - 2030, 1780, 1975, 1989, 1807, 1990, 2212, 1808, - 1821, 1991, 2017, 2226, 1978, 2240, 1822, 1835, - 1992, 2005, 2018, 2031, 2019, 2032, 2045, 2254, - 1836, 1849, 1979, 2006, 2046, 2202, 2228, 2241, - 2409, 1770, 1585, 1598, 1599, 1612, 1795, 1600, - 1613, 1783, 1796, 1809, 1810, 1823, 1993, 1980, - 1824, 1837, 1994, 2007, 2020, 2033, 2176, 2189, - 2216, 2242, 1611, 1862, 2058, 1850, 2072, 2423, - 2268, 2371, 2203, 2424, 2437, 1768, 1769, 1770, - 1585, 1780, 1575, 1587, 1599, 1600, 1771, 1783, - 1795, 1978, 1390, 1598, 1612, 1613, 1626, 1779, - 1796, 1807, 1808, 1809, 1821, 1975, 1989, 1990, - 1991, 1588, 1601, 1614, 1784, 1797, 1979, 1992, - 1822, 1810, 1980, 1993, 1823, 2005, 2006, 1798, - 1811, 1824, 1994, 2007, 2019, 2020, 2018, 2032, - 2033, 1812, 1825, 2008, 2021, 2034, 2176, 2189, - 2202, 2046, 2190, 2203, 2017, 2228, 2216, 2031, - 2371, 2241, 2409, 2204, 2217, 2230, 1835, 1836, - 1849, 1837, 1850, 2045, 1838, 1851, 2047, 2242, - 2423, 2243, 2424, 1575, 1770, 1771, 1576, 1772, - 1784, 1587, 1783, 1796, 1978, 1588, 1601, 1602, - 1797, 1979, 1980, 1798, 1577, 1589, 1603, 1773, - 1785, 1981, 1810, 1992, 1811, 1993, 1616, 1799, - 1812, 1994, 1590, 1786, 1813, 1995, 1825, 1826, - 2007, 2008, 1604, 1800, 1827, 1982, 2009, 1996, - 1600, 1795, 1809, 1991, 2006, 2021, 2176, 2177, - 2022, 2023, 2005, 2189, 2020, 2190, 2191, 2034, - 2035, 2202, 2203, 2036, 2204, 1814, 2010, 2037, - 2178, 2205, 1990, 2217, 2192, 2019, 2373, 2218, - 2219, 2371, 2361, 2216, 2386, 2387, 2230, 2231, - 2232, 2206, 2233, 2374, 2401, 1577, 1772, 1773, - 1785, 1578, 1774, 1786, 1970, 1799, 1981, 1590, - 1604, 1982, 1603, 1617, 1800, 1813, 1995, 1591, - 1787, 1605, 1801, 1983, 2166, 1814, 1996, 1592, - 1788, 1815, 1997, 1828, 2010, 1606, 1802, 1829, - 1984, 2011, 1998, 2009, 2178, 2179, 2024, 2025, - 2177, 2023, 2191, 2192, 2193, 2037, 2205, 2038, - 2206, 1816, 2012, 2039, 2180, 2207, 1994, 2176, - 2361, 2362, 2194, 2008, 2190, 2204, 2374, 2220, - 2221, 2373, 2219, 2387, 2388, 2233, 2401, 2234, - 2208, 2235, 1970, 1579, 1592, 1774, 1775, 1787, - 1788, 1983, 2166, 1971, 1580, 1593, 1776, 1789, - 2167, 1972, 1801, 1606, 1802, 1815, 1984, 1997, - 1607, 1803, 1985, 1605, 1619, 1816, 1998, 1620, - 1634, 1830, 2012, 1817, 1999, 1594, 1621, 1635, - 1831, 2013, 2168, 1648, 1844, 2026, 2180, 1608, - 1649, 1790, 1845, 1986, 2027, 2181, 1858, 2040, - 1804, 1859, 2041, 2011, 2194, 2195, 2208, 2000, - 2209, 2179, 2025, 2193, 2039, 2207, 2054, 2222, - 2055, 2223, 2362, 2363, 2364, 2236, 2014, 2182, - 2237, 2196, 2391, 2404, 2405, 2221, 2235, 2250, - 2251, 2419, 1784, 1797, 1798, 1810, 1811, 1823, - 1824, 1837, 1978, 1979, 1980, 1992, 1993, 2005, - 2006, 2007, 2019, 2020, 1812, 1825, 1838, 1994, - 2008, 2021, 1851, 2033, 2034, 1826, 1839, 1852, - 2022, 2035, 2047, 2048, 2176, 2189, 2032, 2046, - 2202, 1981, 2190, 2203, 2216, 2228, 1840, 1853, - 1995, 2036, 2049, 2204, 2217, 2230, 2218, 2231, - 2371, 2243, 2244, 2242, 2177, 2386, 2424, 2191, - 2232, 2245, 1836, 1849, 1850, 1991, 2018, 2031, - 2045, 1863, 1864, 2059, 2060, 2241, 1865, 2061, - 2255, 2256, 2409, 2423, 2437, 2257, 1785, 1799, - 1812, 1825, 1826, 1839, 1980, 1981, 1994, 2007, - 2008, 2021, 2022, 1813, 1840, 1995, 2009, 1786, - 1800, 1827, 1982, 2023, 1814, 1841, 1996, 2010, - 1853, 2035, 2036, 1854, 2037, 1828, 1855, 2024, - 2176, 2177, 2049, 2190, 2050, 2191, 2051, 2178, - 2034, 2048, 2189, 2202, 2203, 2204, 2216, 2217, - 2218, 2205, 1983, 2192, 2219, 2230, 2231, 2232, - 1842, 1997, 2038, 2206, 2233, 2220, 2373, 2245, - 2386, 2246, 2387, 2247, 2374, 2244, 2371, 2401, - 2179, 2388, 2415, 2428, 2193, 2234, 2429, 1787, - 1801, 1814, 1828, 1982, 1983, 1996, 2010, 2024, - 1815, 1842, 1997, 2011, 1788, 1802, 1829, 1984, - 2025, 1816, 1843, 1998, 2012, 2038, 1856, 2039, - 1830, 1857, 2026, 2178, 2179, 2192, 2052, 2193, - 2053, 2180, 2037, 2051, 2205, 2206, 2219, 2220, - 2207, 2194, 2221, 2233, 2234, 1844, 2040, 2208, - 2235, 2222, 2374, 2388, 2248, 2249, 2247, 2401, - 2415, 2417, 2429, 2430, 2236, 2404, 2431, 1870, - 1858, 1871, 2054, 2066, 2067, 2065, 2250, 2262, - 2263, 2261, 2443, 2444, 2445, 2432, 1816, 1830, - 1984, 1998, 2012, 2026, 1789, 1844, 1858, 2040, - 1803, 1817, 1985, 1999, 2013, 1831, 2027, 1790, - 1845, 1859, 2041, 1804, 1818, 1986, 2000, 2054, - 2055, 1832, 2014, 2180, 2194, 2208, 2181, 2195, - 2209, 2222, 2223, 2182, 2039, 2053, 2207, 2221, - 2236, 2237, 2235, 2068, 2250, 2028, 2069, 2196, - 2251, 2210, 2404, 2391, 2405, 2419, 2378, 2249, - 2417, 2432, 2433, 2431, 2264, 2446, 2224, 2265, - 2392, 2447, 1872, 1873, 1846, 1860, 2042, 2067, - 2082, 2056, 2083, 2238, 2406, 2263, 2445, 2278, - 2460, 2252, 2279, 2420, 2461, 1804, 1818, 1986, - 2000, 2014, 1832, 2028, 1791, 1846, 1860, 2042, - 1609, 1623, 2056, 1637, 1651, 1833, 1847, 2183, - 1678, 1874, 2210, 2224, 2182, 2196, 2070, 2238, - 2252, 2378, 2392, 2406, 2420, 2434, 2266, 2393, - 2448, 1888, 2084, 1875, 2071, 2280, 2462, 1706, - 1902, 2098, 2085, 2112, 2294, 1916, 2476, 1903, - 2099, 2308, 2617, 2490, 2504, 2030, 1862, 1611, - 1625, 1779, 1780, 1807, 1821, 1975, 1989, 2058, - 2212, 2226, 1808, 1835, 1990, 2017, 1822, 2031, - 1809, 1823, 1836, 1849, 1991, 2005, 2018, 2032, - 2045, 1639, 1680, 1876, 2240, 1837, 1850, 2019, - 2046, 2072, 2033, 1992, 2006, 2254, 1863, 2020, - 2047, 2059, 2228, 2241, 2202, 2242, 2268, 2409, - 2423, 2216, 2243, 2255, 2424, 2437, 1812, 1825, - 1826, 1838, 1839, 1851, 1852, 1993, 1994, 2006, - 2007, 2008, 2020, 2021, 2033, 2034, 2035, 2047, - 2048, 1840, 1853, 2022, 2036, 2049, 1865, 1854, - 1866, 2050, 2189, 2202, 2190, 2203, 2061, 2216, - 2062, 2204, 2217, 2060, 2176, 2228, 2230, 2242, - 2243, 1995, 2009, 2177, 2218, 2231, 2244, 1867, - 2023, 2063, 2191, 2232, 2245, 2246, 2386, 2257, - 2258, 2256, 2371, 2424, 2205, 2373, 2219, 2259, - 2387, 2428, 1813, 1827, 1840, 1853, 1854, 1995, - 2008, 2009, 2022, 2035, 2036, 2049, 2050, 1841, - 2023, 2037, 1814, 1828, 1855, 1996, 2010, 2051, - 1842, 2024, 2038, 1867, 1868, 1856, 1869, 2052, - 2204, 2191, 2205, 2192, 2063, 2218, 2064, 2219, - 2065, 2206, 2062, 2177, 2190, 2203, 2217, 2230, - 2231, 2232, 2244, 2245, 2178, 2246, 2233, 1997, - 2011, 2179, 2220, 2247, 2025, 2193, 2234, 2248, - 2387, 2401, 2388, 2259, 2260, 2415, 2261, 2258, - 2373, 2386, 2428, 2374, 2442, 2429, 2207, 2443, - 2221, 2430, 1862, 2030, 2058, 2212, 2226, 1876, - 1639, 1653, 1680, 1807, 1808, 1821, 1822, 1835, - 1849, 1989, 1990, 2017, 2031, 2072, 2240, 1836, - 2018, 2045, 1850, 2032, 1837, 1851, 1863, 2019, - 2033, 2046, 2059, 1694, 1890, 2254, 1864, 2047, - 2060, 1667, 2086, 1865, 1877, 2073, 1708, 1904, - 2268, 1878, 2061, 2074, 2228, 2241, 2242, 2100, - 2255, 2020, 2034, 2202, 2048, 2216, 2243, 2230, - 2256, 2282, 1891, 2062, 2075, 2087, 2244, 2257, - 2269, 2409, 2423, 2464, 2270, 2424, 2437, 2296, - 2451, 2478, 2258, 2271, 2283, 2453, 2465, 1838, - 1851, 1852, 1863, 1864, 2019, 2020, 2032, 2033, - 2034, 2046, 2047, 2059, 2060, 1839, 1853, 1865, - 2021, 2035, 2048, 2061, 1877, 1866, 1878, 2049, - 2062, 2073, 2074, 1867, 1879, 2075, 1891, 1880, - 1892, 2063, 2076, 2228, 2216, 2242, 2230, 2243, - 2244, 2087, 2256, 2088, 2257, 2189, 2202, 2203, - 2241, 2255, 2022, 2036, 2190, 2204, 2217, 2231, - 2050, 2218, 2245, 2269, 2232, 2258, 2270, 1893, - 2064, 2077, 2089, 2246, 2259, 2271, 2272, 2424, - 2283, 2284, 2453, 2423, 2437, 2451, 2386, 2465, - 2428, 2466, 2260, 2273, 2285, 2442, 2455, 2467, - 1840, 1853, 1854, 1865, 1866, 2021, 2022, 2034, - 2035, 2036, 2048, 2049, 2061, 2062, 1867, 2050, - 2063, 1879, 1868, 1880, 2064, 2075, 2076, 1881, - 2077, 1893, 1882, 1894, 2078, 2217, 2230, 2218, - 2231, 2244, 2232, 2245, 2246, 2089, 2258, 2090, - 2259, 2074, 2190, 2203, 2204, 2216, 2243, 2256, - 2257, 2023, 2037, 2191, 2205, 2051, 2219, 2088, - 2270, 2271, 2233, 2260, 2272, 1895, 2065, 2091, - 2247, 2273, 2274, 2428, 2442, 2285, 2286, 2455, - 2386, 2453, 2387, 2401, 2415, 2284, 2466, 2467, - 2429, 2456, 2468, 2261, 2287, 2443, 2469, 1841, - 1855, 1867, 1868, 2023, 2036, 2037, 2050, 2063, - 2064, 2051, 1842, 1856, 1869, 2024, 2038, 2065, - 2052, 1881, 1882, 1870, 1883, 2066, 2077, 2078, - 2079, 1895, 1896, 1884, 1897, 2080, 2062, 2076, - 2191, 2205, 2218, 2219, 2231, 2232, 2245, 2246, - 2192, 2206, 2220, 2233, 2247, 2260, 2025, 2039, - 2053, 2234, 2248, 2261, 2090, 2259, 2092, 2091, - 2274, 2067, 2093, 2262, 2275, 2258, 2193, 2207, - 2221, 2272, 2273, 2235, 2249, 2286, 2288, 2276, - 2387, 2401, 2415, 2428, 2442, 2388, 2429, 2443, - 2456, 2430, 2444, 2457, 2455, 2287, 2470, 2263, - 2289, 2458, 2471, 2417, 2468, 2469, 2431, 2445, - 1843, 1857, 1870, 2025, 2038, 2039, 2052, 2066, - 2053, 1844, 1858, 1871, 2026, 2040, 2067, 2054, - 1884, 1872, 1885, 2068, 2080, 2081, 1898, 1886, - 1899, 2082, 2065, 2079, 2193, 2207, 2220, 2221, - 2234, 2248, 2194, 2208, 2222, 2235, 2249, 2262, - 2236, 2250, 2263, 2093, 2094, 2276, 2095, 2264, - 2277, 2261, 2275, 2289, 2290, 2278, 2417, 2430, - 2444, 2404, 2431, 2445, 2458, 2432, 2446, 2459, - 2472, 2291, 2460, 2473, 2457, 2471, 1872, 2040, - 2054, 2068, 1831, 1845, 1886, 2013, 2027, 1859, - 2041, 2055, 1873, 2069, 1832, 1846, 1887, 2014, - 2028, 1860, 2042, 2056, 2082, 2083, 1874, 1900, - 1901, 2070, 2096, 2097, 1888, 2067, 2081, 2222, - 2236, 2250, 2195, 2209, 2223, 2237, 2251, 2196, - 2210, 2224, 2264, 2265, 2238, 2095, 2278, 2252, - 2279, 2263, 2181, 2182, 2277, 2110, 2292, 2084, - 2111, 2266, 2293, 2291, 2432, 2446, 2391, 2405, - 2419, 2433, 2447, 2392, 2406, 2420, 2460, 2461, - 2434, 2474, 2448, 2475, 2459, 2378, 2473, 2306, - 2488, 2280, 2307, 2462, 2489, 1890, 2072, 2086, - 1904, 1681, 1708, 1863, 1864, 1877, 2045, 2046, - 2059, 2100, 2241, 2268, 2060, 2073, 1878, 1879, - 1891, 2061, 2074, 2087, 2282, 1892, 2075, 2088, - 1695, 2255, 1893, 1905, 2101, 1722, 1918, 2296, - 1906, 2089, 2102, 2254, 2228, 2242, 2256, 2269, - 2270, 2114, 2283, 2243, 2062, 2244, 2257, 2076, - 2258, 2271, 2284, 2090, 2103, 2272, 2285, 2297, - 2423, 2437, 2464, 2478, 2451, 2492, 2298, 2424, - 2465, 2466, 2310, 2479, 2453, 2467, 2480, 2286, - 2299, 2468, 2481, 2493, 1879, 1880, 1891, 1892, - 2061, 2062, 2074, 2075, 2087, 2088, 1881, 1893, - 2063, 2076, 2089, 1905, 1894, 1906, 2077, 2090, - 2101, 2102, 1895, 1907, 2103, 1908, 2091, 2104, - 2257, 2258, 2270, 2271, 2272, 2284, 2285, 2244, - 2245, 2256, 2269, 2283, 2064, 2246, 2259, 2078, - 2260, 2273, 2297, 2286, 2298, 2092, 2105, 2274, - 2287, 2299, 2300, 2453, 2466, 2467, 2468, 2480, - 2481, 2465, 2479, 2442, 2455, 2456, 2469, 2493, - 2482, 2494, 2288, 2301, 2470, 2483, 2495, 1881, - 1882, 1893, 1894, 2063, 2064, 2076, 2077, 2089, - 2090, 1895, 2078, 2091, 1907, 1896, 1908, 2092, - 2103, 2104, 1909, 2105, 1910, 2106, 2259, 2260, - 2272, 2273, 2274, 2286, 2287, 2102, 2246, 2258, - 2271, 2284, 2285, 2065, 2247, 2079, 2261, 2298, - 2299, 2288, 2300, 2093, 2275, 2301, 2302, 2455, - 2456, 2468, 2469, 2470, 2482, 2483, 2442, 2467, - 2480, 2481, 2443, 2457, 2494, 2495, 2484, 2496, - 2289, 2471, 2497, 1883, 1895, 1896, 2065, 2078, - 2091, 2092, 2079, 1884, 1897, 2066, 2093, 2080, - 1909, 1910, 1898, 1911, 2094, 2105, 2106, 2107, - 1912, 2108, 2090, 2104, 2247, 2260, 2261, 2273, - 2274, 2248, 2262, 2275, 2288, 2067, 2081, 2276, - 2289, 2287, 2302, 2095, 2290, 2303, 2286, 2249, - 2263, 2300, 2301, 2277, 2304, 2443, 2456, 2457, - 2469, 2470, 2444, 2458, 2471, 2484, 2472, 2485, - 2483, 2498, 2291, 2486, 2499, 2482, 2445, 2459, - 2496, 2497, 2473, 1885, 1898, 2067, 2080, 2094, - 2081, 1886, 1899, 2068, 2095, 2082, 1912, 1900, - 1913, 2096, 2108, 2109, 1914, 2110, 2093, 2107, - 2249, 2262, 2263, 2276, 2250, 2264, 2277, 2290, - 2278, 2291, 2304, 2292, 2305, 2289, 2303, 2306, - 2445, 2458, 2459, 2472, 2446, 2460, 2473, 2486, - 2474, 2487, 2500, 2488, 2501, 2485, 2499, 1900, - 2082, 2096, 1873, 1914, 2069, 1887, 2083, 1901, - 2097, 1874, 1915, 2070, 1888, 2084, 2110, 2111, - 1902, 2098, 1916, 2095, 2109, 2264, 2278, 2251, - 2265, 2292, 2279, 2252, 2266, 2293, 2306, 2280, - 2307, 2291, 2237, 2238, 2305, 2124, 2112, 2125, - 2294, 2460, 2474, 2447, 2461, 2488, 2475, 2448, - 2462, 2489, 2502, 2476, 2503, 2487, 2433, 2434, - 2501, 2320, 2308, 2321, 2490, 1888, 2070, 2084, - 1902, 2098, 1875, 1916, 2071, 2085, 2112, 1903, - 2099, 2113, 2266, 2280, 2294, 2308, 2126, 1930, - 2476, 2490, 2504, 2462, 2505, 2518, 2100, 1722, - 1891, 1904, 1918, 2073, 2087, 2114, 2282, 2296, - 1709, 1892, 1905, 2074, 2269, 2088, 2101, 1906, - 1907, 2089, 2102, 2103, 2283, 1723, 1919, 2297, - 1724, 1908, 1920, 2104, 2115, 2298, 1736, 1932, - 2310, 2284, 2116, 2128, 1921, 2117, 1737, 1933, - 2311, 1738, 1922, 1934, 2118, 2129, 2312, 2270, - 2090, 2285, 2299, 2324, 2130, 2313, 2256, 2271, - 2272, 2286, 2300, 1946, 2492, 2493, 2314, 2325, - 2478, 2465, 2479, 2494, 2480, 2507, 2508, 2466, - 2481, 2495, 2326, 2509, 2467, 2468, 2482, 2496, - 1907, 1908, 2089, 2090, 2102, 2103, 1909, 2091, - 2104, 1919, 1920, 2105, 1724, 1725, 1921, 2115, - 2116, 2298, 2299, 1726, 1910, 1922, 2106, 2117, - 2300, 2118, 1923, 1933, 1934, 2119, 1738, 1739, - 1935, 2129, 2130, 2312, 2313, 1740, 1924, 1936, - 2120, 2131, 2314, 2285, 2286, 2297, 2092, 2287, - 2301, 2311, 2132, 2315, 2272, 2273, 2284, 2274, - 2288, 2302, 2325, 2326, 2316, 2327, 2494, 2495, - 2496, 2508, 2509, 2510, 2481, 2482, 2493, 2483, - 2497, 2507, 2328, 2511, 2468, 2469, 2480, 2470, - 2484, 2498, 2521, 2522, 1909, 1910, 2091, 2092, - 2104, 2105, 2106, 1921, 1922, 1726, 1727, 1923, - 2116, 2117, 2118, 2300, 2301, 1728, 1911, 1924, - 2107, 2119, 2302, 2120, 1935, 1936, 1740, 1741, - 1937, 2130, 2131, 2132, 2314, 2315, 1742, 1925, - 1938, 2121, 2133, 2316, 2287, 2288, 2299, 2093, - 2313, 2134, 2274, 2286, 2275, 2289, 2312, 2303, - 2326, 2327, 2328, 2317, 2329, 2496, 2497, 2498, - 2510, 2511, 2512, 2483, 2484, 2495, 2509, 2330, - 2470, 2482, 2471, 2485, 2508, 2499, 2522, 2523, - 2524, 1911, 2093, 2106, 2107, 1912, 2094, 2108, - 1728, 1922, 1923, 1924, 2118, 2119, 2302, 1729, - 1925, 2120, 2303, 2121, 1730, 1913, 1926, 2109, - 2304, 2122, 1742, 1936, 1937, 1938, 2132, 2133, - 2316, 1743, 1939, 2134, 2317, 2135, 1744, 1927, - 1940, 2123, 2318, 2275, 2288, 2289, 2301, 2276, - 2290, 2095, 2315, 2136, 2277, 2291, 2314, 2305, - 2328, 2329, 2330, 2331, 2319, 2498, 2499, 2500, - 2512, 2513, 2514, 2471, 2484, 2485, 2497, 2472, - 2486, 2511, 2332, 2473, 2487, 2510, 2501, 2524, - 2525, 2526, 2527, 1913, 2095, 2108, 2109, 1914, - 2096, 2110, 1730, 1925, 1926, 2121, 2304, 1731, - 1927, 2122, 2305, 2123, 1732, 1928, 2306, 2124, - 1744, 1939, 1940, 2135, 2318, 1745, 1941, 2136, - 2319, 2137, 1746, 1942, 2320, 2277, 2290, 2291, - 2278, 2292, 2138, 2317, 2331, 2332, 2333, 2500, - 2501, 2502, 2514, 2515, 2516, 2473, 2486, 2487, - 2474, 2488, 2334, 2513, 2527, 2528, 2529, 2110, - 1719, 1732, 1901, 1915, 1927, 1928, 2083, 2097, - 2123, 2124, 2279, 2292, 2306, 2111, 1720, 1733, - 1902, 1916, 1929, 2084, 2098, 2125, 2280, 2293, - 2307, 2112, 1746, 1942, 2320, 1734, 1747, 1930, - 1943, 2126, 2294, 2308, 2321, 1941, 2137, 2138, - 2139, 2334, 2335, 2319, 2333, 1944, 1957, 2140, - 2502, 2503, 2504, 2516, 2517, 2475, 2488, 2476, - 2489, 2490, 2518, 2530, 2531, 2515, 2529, 1932, - 2128, 1919, 1920, 1946, 2115, 2116, 2324, 1737, - 1921, 1933, 2117, 2129, 2311, 1934, 2130, 1935, - 2131, 1751, 2325, 1936, 1948, 2132, 2143, 2326, - 2144, 2312, 2327, 2313, 2314, 2145, 2328, 2339, - 2507, 2521, 2340, 2508, 2522, 2523, 2509, 2510, - 2341, 2524, 2535, 1937, 2133, 1753, 1949, 1754, - 1938, 2134, 2146, 2329, 2315, 2316, 2147, 2330, - 2342, 2525, 2511, 2512, 2536, 2343, 2526, 2537, - 1951, 1756, 1939, 1952, 2135, 2148, 2317, 2331, - 2344, 2513, 2538, 2527, 2539, 1938, 2133, 2134, - 1743, 1939, 2122, 2135, 2317, 1744, 1940, 2123, - 2136, 2318, 1756, 1951, 1952, 2146, 2147, 2330, - 1757, 1953, 2148, 2331, 2149, 1758, 1941, 1954, - 2137, 2332, 2150, 2329, 2344, 2345, 2328, 2319, - 2342, 2343, 2333, 2346, 2513, 2514, 2526, 2527, - 2528, 2525, 2540, 2541, 2524, 2515, 2538, 2539, - 2529, 1783, 1795, 1796, 1978, 1979, 1989, 1990, - 1991, 1992, 2005, 2017, 2018, 1784, 1797, 1980, - 1993, 2006, 2019, 2176, 2189, 2202, 2031, 2032, - 1994, 2007, 2020, 2190, 2203, 2228, 2371, 2409, - 2033, 2045, 2216, 2241, 2423, 2386, 2424, 2568, - 1978, 1979, 1980, 1991, 1992, 1993, 1994, 2005, - 2006, 2007, 2019, 2176, 2189, 2190, 2202, 2371, - 2177, 2203, 1981, 2191, 2204, 2361, 2386, 2178, - 2205, 2373, 2216, 2217, 2218, 2387, 2231, 2192, - 2219, 2374, 2232, 2206, 2233, 2388, 2401, 2568, - 2415, 2428, 2429, 2442, 2177, 2191, 2361, 2166, - 2362, 2178, 2373, 2192, 2179, 2374, 2193, 2205, - 2219, 2387, 2206, 2388, 2220, 2180, 2194, 2207, - 2221, 2401, 2234, 2248, 2208, 2235, 2417, 2430, - 2444, 2222, 2249, 2404, 2431, 2363, 2612, 2415, - 2429, 2443, 2445, 2613, 2236, 2432, 2639, 2362, - 2167, 2180, 2363, 2168, 2181, 2364, 2179, 2193, - 2194, 2207, 2195, 2559, 2208, 2209, 2221, 2222, - 2404, 2223, 2391, 2235, 2236, 2417, 2250, 2405, - 2182, 2196, 2237, 2419, 2560, 2249, 2432, 2210, - 2251, 2378, 2433, 2431, 2573, 2392, 2388, 2430, - 2446, 2374, 2447, 2615, 2612, 2613, 2445, 2406, - 2574, 2264, 2224, 2460, 2642, 2420, 2461, 2643, - 2641, 2459, 2265, 2238, 2252, 2434, 2474, 2656, - 2448, 2475, 2616, 2657, 2168, 2364, 2169, 2182, - 2365, 2196, 2560, 2210, 2378, 2391, 2405, 2392, - 2224, 2183, 2406, 2561, 2238, 2420, 2252, 2434, - 2393, 2419, 2574, 2448, 2573, 2616, 2266, 2462, - 2644, 2617, 2212, 2226, 2240, 2254, 1990, 2017, - 2018, 2031, 1991, 2005, 2019, 2032, 2045, 2228, - 2241, 2268, 2409, 2423, 2202, 2464, 2424, 2437, - 2189, 2202, 2228, 2241, 2409, 2423, 2176, 2190, - 2203, 2216, 2242, 2371, 2424, 2217, 2230, 2243, - 2437, 2386, 2451, 2568, 2203, 2216, 2371, 2190, - 2204, 2217, 2218, 2230, 2231, 2244, 2386, 2243, - 2424, 2568, 2373, 2387, 2428, 2623, 2218, 2373, - 2386, 2205, 2387, 2219, 2374, 2401, 2206, 2388, - 2415, 2191, 2231, 2232, 2245, 2246, 2428, 2233, - 2220, 2429, 2568, 2442, 2430, 2443, 2623, 2455, - 2456, 2444, 2457, 2612, 2639, 2259, 2247, 2234, - 2248, 2261, 2417, 2468, 2651, 2469, 2202, 2216, - 2228, 2230, 2241, 2242, 2243, 2255, 2371, 2409, - 2423, 2424, 2437, 2203, 2217, 2231, 2244, 2256, - 2386, 2204, 2218, 2232, 2245, 2257, 2269, 2451, - 2258, 2270, 2453, 2568, 2428, 2465, 2466, 2623, - 2246, 2373, 2387, 2259, 2401, 2442, 2271, 2415, - 2455, 2283, 2272, 2273, 2284, 2285, 2467, 2468, - 2479, 2480, 2456, 2469, 2481, 2651, 2493, 2676, - 2207, 2221, 2234, 2235, 2248, 2388, 2429, 2430, - 2443, 2444, 2249, 2262, 2417, 2431, 2404, 2236, - 2445, 2250, 2263, 2432, 2446, 2613, 2612, 2458, - 2459, 2457, 2639, 2641, 2653, 2654, 2642, 2276, - 2471, 2264, 2277, 2472, 2290, 2278, 2291, 2460, - 2473, 2485, 2486, 2474, 2668, 2487, 2656, 2669, - 2667, 2681, 2682, 2238, 2392, 2406, 2420, 2252, - 2434, 2266, 2393, 2448, 2280, 2462, 2644, 2476, - 2617, 2616, 2574, 2658, 2071, 2085, 2294, 2490, - 2099, 2308, 2504, 2254, 2268, 2228, 2241, 2282, - 2409, 2423, 2464, 2424, 2437, 2255, 2243, 2256, - 2257, 2269, 2451, 2478, 2296, 2270, 2271, 2283, - 2453, 2465, 2466, 2492, 2674, 2467, 2479, 2284, - 2297, 2480, 2310, 2298, 2481, 2493, 2494, 2468, - 2676, 2482, 2495, 2677, 2232, 2245, 2246, 2257, - 2258, 2259, 2270, 2271, 2386, 2428, 2442, 2453, - 2260, 2272, 2455, 2466, 2273, 2285, 2467, 2468, - 2456, 2274, 2469, 2623, 2470, 2481, 2482, 2651, - 2415, 2429, 2443, 2480, 2457, 2483, 2639, 2677, - 2260, 2401, 2415, 2428, 2429, 2442, 2455, 2443, - 2456, 2261, 2430, 2444, 2457, 2247, 2273, 2274, - 2468, 2248, 2262, 2275, 2470, 2469, 2288, 2276, - 2289, 2417, 2431, 2445, 2458, 2471, 2287, 2482, - 2484, 2472, 2623, 2612, 2639, 2653, 2651, 2483, - 2459, 2485, 2654, 2667, 2613, 2641, 2496, 2678, - 2679, 2680, 2302, 2290, 2303, 2301, 2498, 2497, - 2304, 2473, 2486, 2499, 2500, 2668, 2681, 2694, - 2487, 2682, 2695, 2669, 2264, 2432, 2446, 2223, - 2237, 2251, 2278, 2391, 2405, 2419, 2460, 2433, - 2447, 2265, 2224, 2238, 2252, 2279, 2392, 2406, - 2420, 2461, 2434, 2459, 2473, 2474, 2266, 2448, - 2475, 2292, 2293, 2487, 2306, 2488, 2280, 2307, - 2462, 2489, 2642, 2615, 2643, 2616, 2656, 2657, - 2670, 2644, 2671, 2573, 2574, 2669, 2502, 2684, - 2476, 2503, 2658, 2685, 2683, 2501, 2294, 2320, - 2308, 2321, 2490, 2698, 2699, 2697, 2516, 2504, - 2517, 2284, 2453, 2465, 2466, 2467, 2479, 2285, - 2455, 2468, 2480, 2286, 2469, 2481, 2298, 2493, - 2299, 2482, 2494, 2300, 2483, 2495, 2496, 2676, - 2677, 2456, 2651, 2470, 2678, 2484, 2497, 2679, - 2691, 2287, 2288, 2301, 2302, 2498, 2457, 2639, - 2471, 2653, 2680, 2485, 2667, 2290, 2459, 2472, - 2277, 2291, 2304, 2446, 2460, 2473, 2486, 2278, - 2292, 2305, 2474, 2487, 2485, 2499, 2500, 2306, - 2488, 2501, 2502, 2641, 2654, 2668, 2642, 2656, - 2669, 2682, 2670, 2683, 2696, 2684, 2697, 2681, - 2695, 2280, 2294, 2462, 2476, 2308, 2490, 2504, - 2099, 2113, 2505, 2518, 2658, 2699, 2492, 2310, - 2283, 2284, 2297, 2465, 2466, 2479, 2480, 2298, - 2467, 2481, 2493, 2494, 2495, 2324, 2311, 2312, - 2482, 2496, 2507, 2128, 2313, 2508, 2509, 2325, - 2326, 2510, 2521, 2674, 2676, 2677, 2691, 2522, - 2705, 2678, 2706, 2717, 2483, 2497, 2314, 2484, - 2498, 2315, 2511, 2327, 2328, 2512, 2523, 2679, - 2524, 2680, 2694, 2718, 2719, 2316, 2485, 2499, - 2329, 2330, 2513, 2525, 2526, 2667, 2681, 2695, - 2720, 2709, 2485, 2497, 2498, 2303, 2316, 2472, - 2486, 2499, 2304, 2317, 2473, 2487, 2500, 2315, - 2510, 2512, 2511, 2513, 2318, 2501, 2514, 2330, - 2331, 2329, 2524, 2526, 2525, 2527, 2332, 2515, - 2694, 2695, 2696, 2709, 2710, 2667, 2680, 2681, - 2668, 2682, 2528, 2669, 2683, 2706, 2697, 2720, - 2722, 2719, 2711, 2487, 2500, 2305, 2318, 2474, - 2488, 2501, 2306, 2319, 2502, 2513, 2514, 2515, - 2320, 2516, 2332, 2333, 2527, 2528, 2529, 2334, - 2696, 2697, 2698, 2710, 2711, 2712, 2669, 2682, - 2683, 2670, 2684, 2530, 2709, 2724, 2725, 2502, - 2293, 2307, 2320, 2475, 2489, 2503, 2294, 2308, - 2321, 2476, 2490, 2515, 2516, 2698, 2504, 2517, - 2699, 2334, 2335, 2530, 2518, 2531, 2713, 2529, - 2712, 2671, 2684, 2685, 2726, 2727, 2711, 2725, - 2308, 2490, 2504, 2505, 2518, 2335, 2336, 2154, - 1945, 1959, 2155, 2545, 2742, 2713, 2727, 2741, - 2531, 2547, 2349, 2743, 2324, 2311, 2312, 2507, - 2508, 2325, 2326, 2509, 2521, 2327, 2510, 2522, - 2523, 2339, 2340, 2524, 2535, 2717, 2341, 2536, - 2718, 2719, 2705, 2706, 2537, 2720, 2731, 2691, - 2732, 2328, 2511, 2329, 2512, 2525, 2342, 2526, - 2343, 2538, 2539, 2722, 2733, 2734, 2330, 2513, - 2344, 2527, 2540, 2709, 2735, 2330, 2331, 2513, - 2524, 2525, 2526, 2514, 2527, 2332, 2515, 2528, - 2344, 2345, 2343, 2538, 2540, 2539, 2541, 2346, - 2529, 2709, 2710, 2722, 2724, 2725, 2737, 2720, - 2711, 2735, 2734, 2332, 2333, 2515, 2527, 2528, - 2516, 2529, 2334, 2530, 2346, 2347, 2541, 2348, - 2725, 2544, 2726, 2711, 2712, 2724, 2737, 2740, - 2334, 2529, 2530, 2517, 2335, 2348, 2531, 2713, - 2518, 2336, 2349, 2544, 2545, 2726, 2727, 2740, - 2741, 2725, -}; - -static long _vq_fitmap_lsp30_0[] = { - 0, 0, 0, 88, 88, 172, 252, 318, - 0, 0, 389, 475, 172, 252, 0, 0, - 389, 558, 475, 626, 709, 0, 0, 389, - 787, 875, 944, 1019, 1095, 1183, 1265, 1346, - 1412, 1502, 1019, 1568, 1677, 1677, 1766, 1845, - 1931, 2010, 1677, 2081, 2081, 2164, 2253, 2321, - 2386, 0, 2429, 2429, 2516, 2602, 2681, 252, - 0, 0, 2771, 2839, 475, 626, 709, 0, - 2429, 2771, 2910, 2990, 3076, 709, 2429, 1183, - 3162, 3234, 3324, 3406, 709, 3498, 1183, 1265, - 3574, 1412, 3652, 1019, 3733, 3733, 2081, 3820, - 1845, 3905, 2010, 3991, 4056, 4056, 2164, 2253, - 2321, 2386, 318, 318, 318, 2516, 2602, 2681, - 252, 2429, 4114, 2771, 4198, 2990, 3076, 4278, - 2429, 4114, 2771, 4346, 4436, 4512, 709, 2429, - 3162, 3162, 4603, 4699, 4786, 709, 3498, 4894, - 1265, 3574, 1412, 3652, 1019, 3733, 3733, 2081, - 4980, 5075, 3905, 2010, 3991, 4056, 4056, 2164, - 2253, 2321, 2386, 2429, 318, 5149, 5217, 5323, - 5412, 5531, 2429, 4114, 5595, 5659, 5759, 5842, - 4278, 2429, 4114, 5931, 6008, 6107, 6194, 4278, - 6294, 6375, 6447, 6523, 6629, 6721, 6835, 6918, - 4894, 6981, 7043, 7116, 7180, 7255, 7300, 7374, - 7456, 7545, 7653, 7736, 2010, 3991, 7822, 7822, - 2164, 2253, 2321, 2386, 7874, 7899, 7949, 8033, - 8110, 8197, 8289, 7899, 7949, 8367, 8456, 8110, - 8531, 6835, 6294, 8606, 8367, 8683, 8756, 8531, - 6835, 8841, 8916, 8997, 9065, 8756, 9139, 6835, - 9209, 9273, 9273, 9353, 9403, 9443, 9488, 9516, - 9592, 9669, 9741, 9815, 9869, 9927, 9972, 9972, - 10035, 10071, 10119, 10173, 10226, 10257, 10257, 10341, - 10427, 10517, 10594, 8289, 10257, 10341, 10682, 10766, - 10847, 10926, 11013, 11069, 10682, 11126, 11194, 10847, - 10926, 11013, 11274, 11359, 11448, 11535, 11632, 11702, - 11013, 11789, 11868, 11943, 12011, 12083, 12135, 12197, - 12222, 12304, 12388, 12465, 12547, 12607, 9927, 12671, - 12671, 12671, 12749, 10119, 10173, 10226, 10257, 10257, - 12801, 12840, 12884, 12927, 12996, 13026, 13048, 13068, - 13086, 12884, 12927, 12996, 11274, 13126, 13126, 13086, - 13184, 12927, 13235, 13259, 13126, 13300, 13336, 13184, - 13404, 13235, 13259, 13473, 13473, 13336, 13517, 13404, - 13553, 13566, 13566, 13566, 13634, 13683, 13719, 13752, - 13772, 13772, 13772, 13821, 13851, 13872, 13752, -}; - -static long _vq_fitlength_lsp30_0[] = { - 88, 88, 88, 84, 84, 80, 66, 71, - 88, 88, 86, 83, 80, 66, 88, 88, - 86, 68, 83, 83, 78, 88, 88, 86, - 88, 69, 75, 76, 88, 82, 81, 66, - 90, 66, 76, 109, 89, 89, 79, 86, - 79, 71, 89, 83, 83, 89, 68, 65, - 43, 88, 87, 87, 86, 79, 90, 66, - 88, 88, 68, 71, 83, 83, 78, 88, - 87, 68, 80, 86, 86, 78, 87, 82, - 72, 90, 82, 92, 78, 76, 82, 81, - 78, 90, 81, 76, 87, 87, 83, 85, - 86, 86, 71, 65, 58, 58, 89, 68, - 65, 43, 71, 71, 71, 86, 79, 90, - 66, 87, 84, 68, 80, 86, 86, 68, - 87, 84, 68, 90, 76, 91, 78, 87, - 72, 72, 96, 87, 108, 78, 76, 86, - 81, 78, 90, 81, 76, 87, 87, 83, - 95, 74, 86, 71, 65, 58, 58, 89, - 68, 65, 43, 87, 71, 68, 106, 89, - 119, 64, 87, 84, 64, 100, 83, 89, - 68, 87, 84, 77, 99, 87, 100, 68, - 81, 72, 76, 106, 92, 114, 83, 63, - 86, 62, 73, 64, 75, 45, 74, 82, - 89, 108, 83, 86, 71, 65, 52, 52, - 89, 68, 65, 43, 25, 50, 84, 77, - 87, 92, 78, 50, 84, 89, 75, 87, - 75, 83, 81, 77, 89, 73, 85, 75, - 83, 75, 81, 68, 74, 85, 70, 83, - 64, 80, 80, 50, 40, 45, 28, 76, - 77, 72, 74, 54, 58, 45, 63, 63, - 36, 48, 54, 53, 31, 84, 84, 86, - 90, 77, 88, 78, 84, 86, 84, 81, - 79, 87, 56, 57, 84, 68, 80, 79, - 87, 56, 85, 89, 87, 97, 70, 87, - 56, 79, 75, 68, 72, 52, 62, 25, - 82, 84, 77, 82, 60, 64, 45, 78, - 78, 78, 52, 54, 53, 31, 84, 84, - 39, 44, 43, 69, 30, 22, 20, 18, - 40, 43, 69, 30, 85, 58, 58, 40, - 51, 69, 24, 41, 58, 36, 68, 51, - 69, 24, 41, 44, 44, 68, 36, 69, - 13, 68, 68, 68, 49, 36, 33, 20, - 49, 49, 49, 30, 21, 18, 20, -}; - -static encode_aux_pigeonhole _vq_auxp_lsp30_0 = { - 0.07, 0.002, 30, 7, - _vq_pigeonmap_lsp30_0, - 13890, - _vq_fitlist_lsp30_0, - _vq_fitmap_lsp30_0, - _vq_fitlength_lsp30_0 -}; - -static static_codebook _vq_book_lsp30_0 = { - 3, 2744, - _vq_lengthlist_lsp30_0, - 1, 1603398533, 1592812110, 5, 1, - _vq_quantlist_lsp30_0, - NULL, - NULL, - &_vq_auxp_lsp30_0, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_128_1.vqh b/include/vorbis/book/res0_1024a_128_1.vqh deleted file mode 100644 index 03d13fc4..00000000 --- a/include/vorbis/book/res0_1024a_128_1.vqh +++ /dev/null @@ -1,63 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_128_1_VQH_ -#define _V_res0_1024a_128_1_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_128_1[] = { - 1, - 2, - 0, -}; - -static long _vq_lengthlist_res0_1024a_128_1[] = { - 1, 4, 4, 4, 7, 7, 4, 7, 7, 5, 8, 8, 8,11,11, 8, - 11,11, 5, 8, 8, 8,11,11, 8,11,11, 5, 8, 8, 8,11, - 11, 8,11,11, 8,11,11,11,14,14,11,15,15, 8,11,11, - 11,14,14,12,15,15, 5, 8, 8, 8,11,11, 8,11,11, 8, - 11,11,11,15,14,11,14,15, 8,11,12,12,15,15,11,14, - 14, -}; - -static double _vq_quantthresh_res0_1024a_128_1[] = { - -0.5, 0.5, -}; - -static long _vq_quantmap_res0_1024a_128_1[] = { - 2, 0, 1, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_128_1 = { - _vq_quantthresh_res0_1024a_128_1, - _vq_quantmap_res0_1024a_128_1, - 3, - 3 -}; - -static static_codebook _vq_book_res0_1024a_128_1 = { - 4, 81, - _vq_lengthlist_res0_1024a_128_1, - 1, -535822336, 1611661312, 2, 0, - _vq_quantlist_res0_1024a_128_1, - NULL, - &_vq_auxt_res0_1024a_128_1, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_128_2.vqh b/include/vorbis/book/res0_1024a_128_2.vqh deleted file mode 100644 index 2f9947b8..00000000 --- a/include/vorbis/book/res0_1024a_128_2.vqh +++ /dev/null @@ -1,63 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_128_2_VQH_ -#define _V_res0_1024a_128_2_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_128_2[] = { - 1, - 2, - 0, -}; - -static long _vq_lengthlist_res0_1024a_128_2[] = { - 3, 4, 5, 4, 6, 6, 5, 6, 6, 4, 6, 6, 6, 8, 8, 6, - 8, 8, 5, 6, 6, 6, 8, 8, 6, 8, 8, 5, 6, 6, 6, 8, - 8, 6, 8, 8, 6, 8, 8, 8, 9, 9, 8, 9, 9, 6, 8, 8, - 8, 9, 9, 8, 9, 9, 5, 6, 6, 6, 8, 8, 6, 8, 8, 6, - 8, 8, 8, 9, 9, 8, 9, 9, 6, 8, 8, 8, 9, 9, 8, 9, - 9, -}; - -static double _vq_quantthresh_res0_1024a_128_2[] = { - -0.5, 0.5, -}; - -static long _vq_quantmap_res0_1024a_128_2[] = { - 2, 0, 1, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_128_2 = { - _vq_quantthresh_res0_1024a_128_2, - _vq_quantmap_res0_1024a_128_2, - 3, - 3 -}; - -static static_codebook _vq_book_res0_1024a_128_2 = { - 4, 81, - _vq_lengthlist_res0_1024a_128_2, - 1, -535822336, 1611661312, 2, 0, - _vq_quantlist_res0_1024a_128_2, - NULL, - &_vq_auxt_res0_1024a_128_2, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_128_3.vqh b/include/vorbis/book/res0_1024a_128_3.vqh deleted file mode 100644 index 54894619..00000000 --- a/include/vorbis/book/res0_1024a_128_3.vqh +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_128_3_VQH_ -#define _V_res0_1024a_128_3_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_128_3[] = { - 2, - 3, - 4, - 1, - 0, -}; - -static long _vq_lengthlist_res0_1024a_128_3[] = { - 2, 5, 7, 5, 7, 5, 6, 9, 6, 9, 7, 9,13, 9,13, 5, - 6, 9, 7, 9, 7, 9,13, 9,13, 5, 7, 9, 7, 9, 7, 8, - 11, 8,11, 9,11,15,11,15, 7, 8,11, 9,11, 9,11,15, - 11,15, 7, 9,12, 9,12, 9,11,15,11,15,13,15,19,15, - 19, 9,11,15,12,15,13,15,18,15,18, 5, 7, 9, 7, 9, - 7, 9,11, 8,11, 9,11,15,11,15, 7, 9,11, 9,11, 9, - 11,15,11,15, 7, 9,12, 9,13, 9,11,15,12,15,13,15, - 19,15,18, 9,11,15,12,15,13,15,19,15,18, 5, 7, 9, - 7, 9, 7, 9,11, 9,11, 9,11,15,12,15, 7, 9,11, 9, - 11, 9,11,15,11,15, 7, 9,11, 9,11, 9,10,13,11,13, - 11,13,17,13,17, 9,11,14,11,13,11,13,18,14,17, 9, - 11,15,12,15,11,13,18,14,18,15,18,19,18,22,11,14, - 18,14,18,15,18,22,18,20, 7, 9,11, 9,11, 9,11,13, - 11,13,11,14,17,13,17, 9,11,13,11,14,11,13,18,14, - 17, 9,12,15,11,15,11,14,17,13,18,15,17,21,17,19, - 12,14,18,14,19,16,18, 0,18, 0, 7, 9,13, 9,13, 9, - 11,16,12,16,13,15,19,15,21, 9,11,16,11,16,13,15, - 19,15,19, 9,11,15,12,16,11,13,17,14,18,16,18, 0, - 18,19,11,14,17,13,17,15,18, 0,18,21,13,16,20,15, - 21,15,18, 0,17,21,19,19, 0,20, 0,16,19, 0,18,20, - 21, 0, 0,20,21, 9,11,16,11,15,11,13,18,13,17,15, - 18,20,17,20,11,14,18,14,18,15,18,21,18,21,13,16, - 18,16,19,15,18,20,17,19,20, 0,21,19, 0,15,18, 0, - 18,21,20,20, 0,21, 0, 5, 7, 9, 7, 9, 7, 9,11, 9, - 11, 9,11,15,11,15, 7, 9,11, 9,11, 9,11,15,11,15, - 7, 9,11, 9,11, 9,11,13,11,13,11,14,18,14,18, 9, - 11,13,11,13,11,13,17,14,18, 9,12,15,12,16,11,14, - 18,14,18,15,18,21,18,21,11,13,17,14,19,15,17,19, - 18,21, 7, 9,11, 9,11, 9,11,14,11,13,12,14,17,14, - 17, 9,11,13,11,13,12,14,17,13,17, 9,11,16,12,16, - 11,14,18,14,18,16,19, 0,18, 0,11,14,18,13,18,16, - 18, 0,17,20, 7, 9,13, 9,13, 9,12,16,12,15,13,15, - 19,16,19, 9,12,16,12,15,13,15,18,15,20, 9,11,15, - 12,15,11,14,18,13,17,15,18,20,18,21,11,13,17,14, - 18,15,17,20,18, 0,13,15,19,16,18,15,18,21,17, 0, - 19,20, 0,21, 0,15,17,20,18, 0,21,20,21,21, 0, 9, - 11,15,12,15,11,14,18,14,19,16,17, 0,18, 0,11,14, - 17,14,18,15,17,20,17,21,13,15,19,16,20,15,18, 0, - 17,21,20,21, 0, 0, 0,15,17,21,18,20,19, 0,21,19, - 21, -}; - -static double _vq_quantthresh_res0_1024a_128_3[] = { - -1.5, -0.5, 0.5, 1.5, -}; - -static long _vq_quantmap_res0_1024a_128_3[] = { - 4, 3, 0, 1, 2, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_128_3 = { - _vq_quantthresh_res0_1024a_128_3, - _vq_quantmap_res0_1024a_128_3, - 5, - 5 -}; - -static static_codebook _vq_book_res0_1024a_128_3 = { - 4, 625, - _vq_lengthlist_res0_1024a_128_3, - 1, -533725184, 1611661312, 3, 0, - _vq_quantlist_res0_1024a_128_3, - NULL, - &_vq_auxt_res0_1024a_128_3, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_128_4.vqh b/include/vorbis/book/res0_1024a_128_4.vqh deleted file mode 100644 index b872fcf2..00000000 --- a/include/vorbis/book/res0_1024a_128_4.vqh +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_128_4_VQH_ -#define _V_res0_1024a_128_4_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_128_4[] = { - 2, - 3, - 4, - 1, - 0, -}; - -static long _vq_lengthlist_res0_1024a_128_4[] = { - 5, 6, 8, 6, 8, 6, 6, 9, 6, 9, 8, 9,11, 9,11, 6, - 6, 9, 6, 9, 8, 9,11, 9,11, 6, 6, 9, 6, 9, 6, 7, - 10, 7,10, 9,10,12,10,12, 6, 7,10, 7,10, 9,10,12, - 10,12, 8, 9,11, 9,11, 9,10,12,10,13,11,12,15,13, - 15, 9,10,12,10,12,11,12,15,13,15, 6, 6, 9, 7, 9, - 6, 7,10, 7,10, 9,10,12,10,12, 6, 7,10, 7,10, 9, - 10,12,10,12, 8, 9,11, 9,11, 9,10,12,10,12,11,12, - 15,12,14, 9,10,13,10,12,11,13,15,12,15, 6, 7, 9, - 7, 9, 7, 7,10, 8,10, 9,10,12,10,12, 6, 7,10, 8, - 10, 9,10,12,10,12, 6, 8,10, 8,10, 7, 8,11, 9,11, - 10,11,13,11,14, 7, 9,11, 9,11,10,11,14,11,14, 9, - 10,13,10,12,10,11,13,11,14,13,13,15,14,16,10,11, - 14,11,14,12,13,17,14,16, 7, 8,10, 8,10, 7, 9,11, - 8,11,10,11,14,11,14, 7, 9,11, 9,11,10,11,14,11, - 14, 9,10,13,10,13,10,11,14,11,14,12,14,16,13,16, - 10,11,13,11,14,12,14,17,14,16, 8, 9,11, 9,11, 9, - 10,13,10,13,11,13,15,13,15, 9,10,12,10,12,11,13, - 15,13,15, 9,10,12,10,13,10,11,14,11,14,13,13,16, - 14,17,10,11,14,11,14,13,14,17,14,15,11,13,15,12, - 15,12,14,16,14,17,15,16,18,16,20,13,14,16,14,16, - 15,17, 0,16,20, 9,10,13,10,13,10,11,14,11,14,13, - 14,17,14,16,10,11,14,11,14,13,14,16,14,16,11,13, - 16,13,16,12,14,16,13,17,15,17,18,15,18,13,14,16, - 14,18,16,16,18,16,19, 6, 7, 9, 7, 9, 6, 7,10, 7, - 10, 9,10,12,10,12, 7, 8,10, 8,10, 9,10,12,10,12, - 6, 8,10, 7,10, 7, 9,11, 8,11,10,11,14,11,13, 7, - 9,11, 9,11,10,11,13,11,14, 9,10,13,10,12,10,11, - 14,11,14,13,14,17,14,16,10,11,14,11,14,12,13,16, - 14,16, 7, 7,10, 8,10, 7, 8,11, 9,11,10,11,14,11, - 14, 7, 9,11, 8,11,10,11,14,11,13, 9,10,13,10,13, - 10,11,14,11,14,13,14,17,14,16,10,11,14,11,14,12, - 14,17,13,15, 8, 9,11, 9,11, 9,10,13,10,13,11,13, - 15,13,15, 9,10,13,10,13,11,13,15,13,15, 9,10,13, - 10,13,10,11,14,11,14,13,14,17,14,17,10,11,14,11, - 14,13,14,16,14,17,11,13,15,13,15,13,14,16,14,16, - 15,16,19,18,19,12,13,18,14,17,15,15,17,17,19, 9, - 10,13,10,13,10,11,14,11,14,13,14,16,14,16,10,11, - 14,11,14,13,14,17,14,16,11,13,16,13,15,13,14,17, - 14,17,16,17,18,16,19,12,14,17,14,17,15,17,18,15, - 17, -}; - -static double _vq_quantthresh_res0_1024a_128_4[] = { - -1.5, -0.5, 0.5, 1.5, -}; - -static long _vq_quantmap_res0_1024a_128_4[] = { - 4, 3, 0, 1, 2, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_128_4 = { - _vq_quantthresh_res0_1024a_128_4, - _vq_quantmap_res0_1024a_128_4, - 5, - 5 -}; - -static static_codebook _vq_book_res0_1024a_128_4 = { - 4, 625, - _vq_lengthlist_res0_1024a_128_4, - 1, -533725184, 1611661312, 3, 0, - _vq_quantlist_res0_1024a_128_4, - NULL, - &_vq_auxt_res0_1024a_128_4, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_128_5.vqh b/include/vorbis/book/res0_1024a_128_5.vqh deleted file mode 100644 index 5621facb..00000000 --- a/include/vorbis/book/res0_1024a_128_5.vqh +++ /dev/null @@ -1,212 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_128_5_VQH_ -#define _V_res0_1024a_128_5_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_128_5[] = { - 3, - 4, - 5, - 6, - 2, - 1, - 0, -}; - -static long _vq_lengthlist_res0_1024a_128_5[] = { - 3, 5, 7, 7, 5, 7, 7, 5, 7, 9,10, 7, 9,10, 7, 9, - 11,12, 9,11,12, 7,10,12,14,10,12,14, 5, 7, 9,10, - 7, 9,10, 7, 9,12,12, 9,12,12, 7,10,12,14,10,12, - 14, 5, 7, 9,10, 7, 9,10, 7, 9,11,11, 9,11,11, 9, - 11,13,14,11,13,14,10,12,14,16,12,14,16, 7, 9,11, - 12, 9,11,11, 9,11,13,14,11,13,14,10,12,14,16,12, - 14,17, 7, 9,11,12, 9,11,12, 9,11,14,14,11,14,14, - 12,14,16,17,14,16,17,13,14,16,17,14,17,17, 9,11, - 14,14,11,13,14,12,14,16,17,14,16,16,13,15,16,18, - 14,17,20, 7,10,12,13,10,12,13,10,12,14,15,12,14, - 15,13,14,16,18,14,17,18,15,17,19, 0,16,18, 0,10, - 12,15,16,12,14,16,13,15,17,19,15,16, 0,15,16,18, - 18,17,19,19, 5, 7, 9,10, 7, 9, 9, 7, 9,11,11, 9, - 11,12, 9,11,13,14,11,13,14,10,12,14,16,12,14,16, - 7, 9,11,12, 9,11,12, 9,11,14,14,11,14,14,10,12, - 14,16,12,14,16, 7, 9,11,12, 9,11,12, 9,11,14,14, - 11,14,14,12,14,16,17,13,15,17,12,14,17,19,14,16, - 18, 9,11,14,14,11,14,14,12,14,16,17,14,16,17,13, - 15,17,20,14,16,18, 8,10,12,13,10,12,13,10,12,14, - 15,12,14,16,13,15,17,18,14,17,18,15,17,18,20,16, - 18,19,10,12,14,16,12,15,16,12,14,16,19,15,16,18, - 15,16,18, 0,16,18,20, 5, 7, 9,10, 7, 9,10, 7, 9, - 11,12, 9,11,12, 9,11,14,14,11,14,15,10,12,14,17, - 12,14,17, 7, 9,11,12, 9,11,12, 9,11,14,14,11,13, - 14,10,12,14,16,12,14,16, 7, 9,11,12, 9,11,12, 9, - 10,13,13,10,13,13,11,13,15,16,13,15,16,12,13,15, - 18,14,16,20, 9,11,13,13,10,13,14,11,13,15,16,13, - 15,16,12,14,16,17,13,16,19, 9,11,14,15,11,14,14, - 11,13,16,16,13,15,16,14,15,17,19,15,18,19,15,16, - 17,18,16,19,20,11,13,15,17,13,16,16,14,15,18,18, - 16,17,18,15,16,18,19,16,18, 0,10,12,14,17,12,14, - 16,12,14,16,18,13,16,19,15,16,19, 0,16,19,19,16, - 18,20,19,19,20, 0,12,14,17,19,14,16,17,15,16,19, - 0,17,19,18,17,18, 0, 0,19,20,20, 7, 9,11,12, 9, - 11,12, 9,10,13,13,10,13,14,11,13,15,16,13,15,16, - 12,13,16,18,13,16,17, 9,10,13,13,11,13,14,11,13, - 15,16,13,15,16,12,13,16,17,13,16,19,10,11,14,14, - 11,14,14,11,13,16,16,13,16,16,14,15,18,18,15,18, - 18,15,17,18, 0,16,17,19,11,13,15,16,13,15,16,14, - 15,18,19,15,18,18,15,16,20, 0,17,18, 0,10,12,14, - 17,12,14,16,12,14,16,19,14,17,19,15,16, 0, 0,16, - 18, 0,17,18,20, 0,17,20, 0,12,14,16,19,14,16,18, - 15,16,19,20,16,18,19,16,19, 0, 0,19,20, 0, 8,10, - 12,12,10,12,12, 9,11,14,15,11,14,14,12,14,16,17, - 14,16,17,12,15,19,19,15,17,18, 9,11,14,14,11,14, - 14,12,14,17,18,14,17,17,12,15,18,17,14,17, 0,10, - 11,14,14,11,14,14,11,13,16,17,13,16,17,14,16,18, - 18,15,18,18,15,16,18, 0,17,20,20,11,13,15,17,13, - 16,16,14,15,19,18,15,19,19,15,16,19,20,16,18, 0, - 12,14,16,17,14,16,18,14,15,19,19,16,18,20,16,17, - 20,18,17, 0, 0,17,17,19,20,19, 0, 0,14,15,18,20, - 16,17,20,16,19, 0,20,18,20, 0,18,19,18, 0,19, 0, - 0,13,15,17,19,15,19,19,15,16,19, 0,16,18,20,16, - 17,19, 0,18, 0, 0,18,18,20, 0, 0, 0, 0,15,17,19, - 19,17,18, 0,17,18,20, 0,19,20, 0,20, 0, 0, 0,20, - 0, 0,10,11,14,15,12,14,14,11,13,16,17,13,16,16, - 14,16,18,18,16,18,19,15,16,19,20,16,18, 0,11,13, - 17,17,13,15,16,14,16,17,19,16,19,20,15,16,19,19, - 17,19,18,12,14,16,18,14,17,17,13,15,20,17,16,17, - 18,16,17, 0,20,17,19,19,17,19,19, 0,18,18,18,14, - 15,20,20,16,19,20,16,18, 0,20,18,19, 0,17,19,20, - 20,20,20, 0,13,15,17,20,15,17,18,14,16,19, 0,16, - 19, 0,16,19,20, 0,17,19, 0,20, 0,20, 0,18,19, 0, - 15,16,18,20,17,18, 0,17,19,20, 0,19, 0, 0,19, 0, - 0, 0,19, 0, 0, 8,10,12,14,10,12,14,10,12,14,16, - 12,15,16,12,15,17,19,15,16,19,14,17,20, 0,16,18, - 0,10,12,15,16,12,15,16,12,15,17,19,14,18,19,14, - 16,19,20,17,19, 0,10,12,15,17,12,15,16,12,14,17, - 17,14,16,20,15,17,18,20,16,18, 0,17,19,19, 0,19, - 0, 0,12,14,16,19,14,16,18,15,17,20, 0,16,18, 0, - 16,19,20, 0,20,19, 0,13,15,17,19,15,17,19,15,16, - 19,19,16,20,19,17,19,19,20,19, 0, 0,20,20, 0,20, - 0, 0, 0,14,17,20, 0,16,18,20,17,19, 0, 0,19,19, - 19,20,20, 0, 0,17,20, 0,15,18,18, 0,18,20,20,16, - 20,20,20,18, 0, 0,18,19,20, 0, 0, 0, 0,19, 0, 0, - 0,20, 0, 0,17,18, 0, 0,19, 0, 0,18,20, 0, 0,19, - 20, 0,20, 0, 0, 0,20, 0, 0,10,12,15,17,12,15,17, - 12,14,17, 0,14,17,18,15,17,19,19,16,18,20,16,18, - 0,19,19, 0, 0,12,14,16,18,14,17,17,15,16,18, 0, - 16,19, 0,16,20, 0, 0,19, 0, 0,13,15,18,20,15,17, - 19,14,16,19, 0,16,19, 0,17,20,19,20,19,19,20,20, - 0, 0,20,20,19, 0,15,16,19, 0,16, 0,20,17,19,20, - 0,20, 0, 0,20,20,20, 0,20, 0, 0,15,17,19, 0,18, - 19,20,17,18, 0,20,18,20, 0,19,20, 0,20, 0,20, 0, - 19,19, 0, 0,20, 0, 0,18,19,20, 0,19, 0, 0,20, 0, - 0, 0, 0, 0, 0,20, 0, 0, 0, 0, 0, 0, 5, 7, 9,10, - 7, 9,10, 7, 9,11,12, 9,11,12, 9,11,14,14,11,14, - 14,10,12,14,17,12,14,16, 7, 9,11,12, 9,11,12, 9, - 11,14,14,11,14,14,10,12,14,17,12,14,17, 7, 9,11, - 12, 9,11,12, 9,10,13,13,10,13,13,11,13,15,16,13, - 15,15,12,14,16,18,14,16,18, 9,10,13,13,11,13,13, - 11,13,15,15,13,15,16,12,13,16,17,14,16,17,10,11, - 14,15,11,14,14,11,13,16,16,13,16,16,14,15,19,19, - 15,18,18,15,16,17,20,16,17,18,11,13,15,17,13,15, - 16,14,15,17,17,16,18,18,15,16,18,19,16,19,19,10, - 12,14,16,12,15,16,12,14,17,18,14,16,19,15,16,19, - 0,17,19,19,16,18,20, 0,20, 0, 0,12,14,16,19,14, - 16,18,15,16,20, 0,16,19,19,17,18,18,19,18,19, 0, - 7, 9,11,12, 9,11,12, 9,10,13,14,11,13,14,11,13, - 15,16,13,15,16,12,13,16,17,14,16,17, 9,10,13,13, - 10,13,13,11,13,15,16,13,15,15,12,14,16,18,14,16, - 18,10,11,14,14,11,14,14,11,13,15,16,13,16,17,14, - 15,19,18,16,19,18,15,16, 0,19,16,17,20,11,13,16, - 16,13,16,16,14,16,17,18,16,17,19,15,16,19, 0,16, - 17,18,10,12,15,17,12,15,16,12,14,16,18,14,17,18, - 15,17,17,20,16,18, 0,17,19,19, 0,19,20, 0,12,14, - 17,18,14,16,18,15,16,19,19,16,20,20,17,18,19,19, - 18,18,19, 8,10,12,12,10,12,12, 9,11,14,15,11,14, - 15,12,14,16,18,14,16,17,12,14,18,18,14,17, 0,10, - 11,14,14,11,14,14,12,14,16,17,14,16,17,12,15,17, - 20,15,18,19,10,11,14,15,12,14,15,12,13,16,16,13, - 16,16,14,16,18,18,16,18,18,15,16,19,20,17, 0,19, - 11,13,15,16,13,16,16,14,15,17,19,16,19,19,15,16, - 19,19,16,18,20,12,14,16,17,14,17,16,14,16,18,19, - 15,19,19,16,17, 0,20,17,20,19,18,19,20,20,19, 0, - 0,14,16,18,18,16,18,19,17,19, 0,18,17,20, 0,16, - 20,18,20,19, 0, 0,13,15,17,19,15,18,18,14,17, 0, - 0,16,19,20,17,20, 0, 0,19,20, 0,19, 0, 0, 0,20, - 0, 0,15,17,19,20,17,18, 0,17,17,19,20,19,20, 0, - 19,19, 0, 0, 0, 0, 0,10,11,14,14,12,14,14,11,13, - 16,16,13,16,16,14,16,18,18,16,18,18,14,17,19, 0, - 16,19,20,11,13,15,16,13,16,16,14,16,18,20,16,20, - 18,15,17,18, 0,17,19, 0,12,14,17,17,14,17,17,14, - 16,19,20,16,18,19,16,18, 0, 0,19,19, 0,17,19, 0, - 0, 0, 0, 0,14,16,20,18,15,17,18,16,19,20,19,17, - 19,19,17,18,19, 0,17,19, 0,13,15,19,20,15,18,19, - 15,17,19, 0,17,19, 0,17,19, 0,20,19, 0, 0, 0, 0, - 20, 0,20, 0, 0,14,16,18,20,17,20, 0,17,19, 0, 0, - 19, 0,20,18, 0, 0, 0,19, 0, 0, 8,10,12,14,10,12, - 14,10,12,15,16,12,14,17,12,15,17,19,15,18,19,14, - 17,18,19,16,19,19,10,12,14,16,12,15,17,12,15,16, - 20,15,17,19,14,17,19,20,17, 0, 0,10,12,15,16,12, - 15,16,12,14,17,19,14,16,18,15,17,19,20,16,19,19, - 17, 0,19, 0,18, 0, 0,12,14,17,17,14,17,18,15,16, - 18, 0,17,18,19,16,19,20,20, 0,20, 0,13,15,17,20, - 15,17,18,15,16,19, 0,17, 0, 0,17,20, 0, 0,18,20, - 0,20, 0, 0, 0,19, 0, 0,14,16,18,19,17,19,20,17, - 19,20, 0,20,20, 0,18,18, 0, 0,20, 0, 0,15,16,19, - 19,18,19, 0,17,20,19, 0,18, 0, 0,19,20, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0,17, 0, 0, 0,19, 0, 0, - 18,20,20,19, 0, 0, 0, 0,20,19, 0,20, 0, 0,10,12, - 15,16,12,15,17,12,14,17,18,14,17,19,15,16,19,20, - 17,19, 0,16,20,19, 0,18,20, 0,12,14,16,18,14,16, - 19,15,16,18,19,16,17,20,17, 0, 0, 0,19, 0, 0,13, - 15,18,20,15,18,19,15,17,18,19,16,18, 0,17,18,19, - 0,19, 0, 0,19, 0,20, 0, 0, 0, 0,14,16,19, 0,17, - 18,20,17,18, 0, 0,18,19, 0, 0, 0, 0, 0,19, 0, 0, - 15,17,19,19,18,20, 0,18,19, 0,20,20, 0, 0,19, 0, - 0, 0, 0, 0, 0,20, 0, 0, 0, 0, 0, 0,17,19,18, 0, - 18, 0,20,19, 0, 0, 0,20,19, 0,20, 0, 0, 0,20,18, - 0, -}; - -static double _vq_quantthresh_res0_1024a_128_5[] = { - -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, -}; - -static long _vq_quantmap_res0_1024a_128_5[] = { - 6, 5, 4, 0, 1, 2, 3, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_128_5 = { - _vq_quantthresh_res0_1024a_128_5, - _vq_quantmap_res0_1024a_128_5, - 7, - 7 -}; - -static static_codebook _vq_book_res0_1024a_128_5 = { - 4, 2401, - _vq_lengthlist_res0_1024a_128_5, - 1, -533200896, 1611661312, 3, 0, - _vq_quantlist_res0_1024a_128_5, - NULL, - &_vq_auxt_res0_1024a_128_5, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_128_6.vqh b/include/vorbis/book/res0_1024a_128_6.vqh deleted file mode 100644 index b97a1e6f..00000000 --- a/include/vorbis/book/res0_1024a_128_6.vqh +++ /dev/null @@ -1,212 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_128_6_VQH_ -#define _V_res0_1024a_128_6_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_128_6[] = { - 3, - 4, - 5, - 6, - 2, - 1, - 0, -}; - -static long _vq_lengthlist_res0_1024a_128_6[] = { - 6, 7, 8, 9, 7, 8, 9, 7, 7, 9, 9, 7, 9,10, 8, 9, - 10,11, 9,10,11, 9,10,11,12,10,11,12, 7, 8, 9,10, - 7, 9,10, 8, 9,10,11, 9,10,11, 9,10,11,12,10,11, - 12, 7, 8, 9,10, 8, 9,10, 8, 8, 9,11, 8, 9,11, 9, - 10,11,12, 9,11,11,10,11,12,13,11,12,13, 7, 8,10, - 10, 8, 9,10, 9, 9,10,11,10,11,12,10,11,12,13,11, - 12,13, 8, 9,10,11, 9,11,12, 9,10,11,13,10,11,12, - 10,11,12,13,11,12,13,11,12,14,15,12,13,15, 9, 9, - 11,12, 9,11,12,10,11,12,14,11,12,13,11,12,14, 0, - 12,13,14, 9,10,12,13,10,12,14,10,11,13,15,11,13, - 14,11,12,14,16,13,14,15,13,15,16,15,14,15, 0,10, - 11,12,13,11,13,13,11,12,16,15,12,13,15,12,15,16, - 0,14,16,15, 7, 8, 9,10, 8, 9,10, 8, 8, 9,10, 8, - 10,11, 9, 9,11,12, 9,11,12,10,11,11,14,10,11,13, - 8, 8, 9,10, 8, 9,11, 9,10,11,11, 9,10,11,10,11, - 12,14,11,12,13, 8, 9,10,11, 9,10,11, 9,10,11,12, - 10,11,12,10,11,12,14,11,12,14,11,12,13,14,12,13, - 15, 9,10,11,12,10,11,13,10,11,12,14,11,12,13,11, - 12,14,14,12,13,15, 9,10,12,13,10,12,13,10,11,12, - 15,11,13,15,11,14,13,15,13,14,14,13,15,15, 0,15, - 15,15,10,11,13,14,11,14,13,12,12,14,15,12,15,16, - 13,14,16,16,15,14, 0, 7, 8, 9,10, 8, 9,10, 8, 8, - 9,11, 8,10,11, 9, 9,11,12, 9,11,12,10,11,12,13, - 11,12,13, 8, 8, 9,11, 8,10,11, 9, 9,11,12, 9,11, - 12,10,11,12,13,10,12,14, 8, 8,10,11, 8,10,11, 8, - 9,10,11, 9,10,12, 9,10,11,13,11,12,13,11,11,13, - 16,12,13,14, 8, 9,10,11, 9,10,12,10,11,11,13,10, - 12,12,11,12,13,15,12,13,15, 9,10,11,13,10,12,12, - 9,10,12,13,10,12,13,11,11,13,13,12,15,13,13,13, - 14,16,13,15, 0, 9,10,13,14,10,13,13,11,12,14, 0, - 12,13, 0,12,13,14,14,13,15,15,10,11,12,14,11,13, - 14,11,11,13,15,11,15,16,12,13,14,15,13,15,16,14, - 14,16,16,16,16, 0,11,12,14,14,12,14,16,12,14,14, - 16,14,13, 0,13, 0,16, 0,14, 0, 0, 8, 8,10,11, 8, - 10,11, 8, 9,10,11, 9,10,12,10,10,12,14,10,12,12, - 11,12,13,15,12,15,14, 8, 9,11,12, 9,11,12, 9,10, - 12,13,10,12,12,11,12,12,15,11,13,14, 9,10,11,12, - 10,12,12,10,10,12,13,10,12,12,11,12,13,15,11,13, - 14,12,13,16,15,13, 0,16, 9,11,12,13,10,12,15,11, - 13,13,14,12,13,15,12,13, 0, 0,13,16, 0,10,11,12, - 14,11,13,16,10,11,14,14,11,13,16,12,13,15,16,13, - 14,15,15,14,15, 0, 0,16,15,11,12,14,14,11,14,15, - 13,14,16, 0,13,14,15,14,15,14,16,15,14, 0, 8, 9, - 10,11, 9,10,11, 9,10,11,12,10,11,13,10,11,12,13, - 11,13,15,11,12,15,15,12,15,14, 9,10,11,12,10,11, - 12,10,11,14,13,11,13,14,12,12,15,15,12,15,15, 9, - 10,11,12,10,11,13,10,11,14,14,10,12,13,11,12,14, - 15,12,15,14,13,13,15,15,13,15,15,10,11,12,13,11, - 12,13,11,13,15,15,12,15,15,13,14,15, 0,14,15,15, - 10,11,14,15,11,13,15,11,12,14,15,12,15,14,13,12, - 14, 0,14,15, 0,15,15,15,16, 0, 0, 0,11,12,13,15, - 12,13,15,12,13,15,15,15,14,16,15,15,15, 0,14,14, - 16,12,14,15, 0,13,13,15,12,13,15, 0,13, 0, 0,14, - 14,16, 0,15,16, 0,15,15,16, 0, 0, 0, 0,12,15,16, - 16,14,14,16,15,16,16, 0,15,15, 0, 0, 0,16, 0, 0, - 0, 0, 9,10,12,13,10,11,12,10,10,12,13,11,12,14, - 11,12,15,16,12,14,16,13,13,15,15,13,15,15, 9,11, - 12,13,11,13,14,11,12,15, 0,12,13, 0,14,13,15, 0, - 14,15,16,10,11,13,15,12,13,16,11,12,13,16,12,14, - 15,13,15,15,16,13,15,16,14, 0,16,16,15, 0, 0,11, - 12,14,15,12,14, 0,12,14,14,16,16,15,16,14,15,16, - 0,15, 0,16,12,12,14, 0,13,14, 0,13,13,16,15,13, - 15, 0,15,16,16, 0,14,15,16, 0, 0, 0, 0,16,16, 0, - 12,12,15,14,14,16,16,14,15,16,16, 0, 0,16,15, 0, - 0,16, 0,16, 0,10,10,11,13,10,12,13,10,11,13,15, - 11,13,15,12,13,13, 0,13,13,16,13,14, 0, 0,13,16, - 0,11,11,14,13,11,13,15,11,12,16,15,13,14,14,13, - 15,15,16, 0, 0, 0,10,11,13,15,11,13,15,11,12,14, - 15,12,14,15,13,13,15, 0,14,14, 0,15,16, 0, 0,14, - 0,16,11,12,13,14,12,13,15,12,15,14, 0,14,16,15, - 14,13, 0, 0,15,16, 0,12,12,15,16,13, 0, 0,12,13, - 16, 0,14,15, 0,13,15,15,16,14,16, 0,16, 0,16, 0, - 16, 0, 0,13,13,15, 0,15,15,16,15,15, 0, 0, 0,16, - 0,16,15, 0, 0,15, 0, 0,12,14, 0, 0,15, 0, 0,14, - 14,16, 0,14,16, 0,16,16, 0,16, 0, 0, 0, 0,16, 0, - 16, 0, 0, 0,15, 0, 0, 0,15, 0, 0,15, 0, 0, 0,15, - 0, 0, 0,16, 0, 0, 0, 0, 0,10,12,13,14,11,12,15, - 11,13,14,16,11,15,16,13,14,16, 0,14,14,15,16, 0, - 0, 0,16, 0, 0,11,12,15,16,12,15,14,12,14,16,15, - 12,15,16,14,15,16, 0,16, 0,16,12,12,15,16,13,14, - 16,12,13,15, 0,14,15, 0,16,15, 0, 0,14,16, 0, 0, - 0,16, 0,16, 0, 0,13,12,16, 0,13,16, 0,14,16, 0, - 0,16,15, 0,16,16, 0, 0, 0, 0, 0,13,13, 0,16,15, - 16, 0,14,15,16,16,16,15, 0,15,16, 0, 0, 0,16, 0, - 15, 0, 0, 0, 0,16, 0,16,15, 0,16, 0,16, 0,16, 0, - 0,16, 0,16, 0,15, 0, 0, 0, 0, 0, 0, 7, 8, 9,10, - 8, 9,10, 8, 8, 9,12, 8, 9,10, 9, 9,11,12, 9,11, - 12,10,11,12,13,10,12,13, 8, 8, 9,11, 8,10,10, 9, - 10,11,12,10,11,12,10,11,12,13,11,12,14, 8, 8,10, - 11, 8,10,10, 8, 9,10,11, 9,10,11, 9,10,12,12,10, - 12,14,11,12,12,15,11,13,15, 8, 9,10,12, 9,10,11, - 10,10,12,12,10,12,13,11,12,13,14,11,12,16, 9,10, - 12,12,10,11,13, 9,10,12,13,10,12,14,11,12,14,13, - 12,13,16,12,13,14,15,13,15,16,10,10,12,13,10,12, - 14,11,11,12,16,12,13,15,12,12,14,15,13,16, 0,10, - 11,14,14,11,13,15,11,12,13, 0,12,13,14,12,12,16, - 16,14,14, 0,14,14,14, 0,14, 0, 0,11,12,13,15,12, - 14,15,13,13,14, 0,13,13,15,14,14,15, 0,15,14,16, - 8, 8,10,11, 8,10,11, 8, 9,10,13, 9,11,12,10,10, - 12,12,10,11,12,11,12,13, 0,11,14,14, 8, 9,10,11, - 9,10,11, 9,10,12,14,10,12,13,11,11,13,14,11,12, - 14, 9,10,11,12,10,12,13, 9,10,12,13,10,12,13,11, - 12,13,16,12,13,14,12,13,14,16,13,14,14,10,11,12, - 13,10,12,13,11,12,15,15,11,14,14,13,13,15, 0,12, - 13, 0,10,11,13,16,11,13,15,11,12,13,14,11,13,15, - 12,13,14, 0,14,15,16,13,16,16,16,16,14, 0,11,12, - 12,14,11,14,14,12,13,16, 0,13,16,15,14,14,15, 0, - 15,16, 0, 8, 9,10,11, 9,10,11, 9,10,12,12,10,11, - 12,11,11,13,13,11,13,14,12,12,13,14,13,13,15, 9, - 10,12,12,10,11,12,11,11,13,13,11,12,13,11,12,15, - 0,14,14, 0, 9,10,12,13,10,11,13,10,10,12,13,11, - 12,13,11,12,13,14,12,13,16,13,12,15,16,14,14, 0, - 10,10,12,13,10,12,14,11,12,14, 0,12,13,14,13,14, - 15, 0,14,15, 0,11,11,13,16,11,14,13,11,12,14,16, - 12,13,14,12,13,14, 0,13,15,16,14,14,16, 0,14, 0, - 0,11,13,14,15,12,15,13,12,13,14,16,14,14, 0,14, - 16,16,16, 0, 0, 0,11,13,16,16,12,14,16,13,14,16, - 0,13, 0,16,14,14, 0,16,14,16, 0,16, 0,16, 0, 0, - 0, 0,12,14, 0,16,14,15,16,14,14, 0,15,14,16, 0, - 0, 0, 0, 0,16, 0, 0, 9,10,11,12,10,11,13,10,11, - 12,13,11,13,13,11,12,14,14,12,13,14,13,13,14,14, - 14,14, 0, 9,11,12,14,10,12,12,11,12,14,14,12,13, - 14,13,12,16,16,13,14, 0,10,11,13,14,11,14,15,11, - 11,14,14,13,14,16,13,13, 0,15,13,16, 0,16,14,16, - 0,16,15, 0,11,12,14,15,12,13,16,12,14, 0, 0,14, - 16,16,13,15,15, 0,14,15,16,11,13,16, 0,13,14,15, - 12,14,15, 0,14,14,16,13,14,15, 0,14, 0, 0, 0, 0, - 0, 0,15,16, 0,12,13,14,16,13,14, 0,14,16, 0, 0, - 14,15,16, 0,16,16,16,15,16, 0,10,10,12,13,10,12, - 13,10,11,13,14,11,12,14,12,13,14,14,12,13, 0,13, - 14,15,16,13,14,16,10,11,13,14,12,13,14,12,12,14, - 16,13,14,15,13,15,14,15,14,15, 0,10,11,13,14,11, - 12,14,11,12,15,15,12,13,14,13,13,14,16,13,15, 0, - 14,14,16, 0, 0,14, 0,11,12,13,16,12,14,16,12,14, - 0,16,13,16,16,15,15, 0, 0,14, 0, 0,11,12,14,15, - 13,14,15,12,14,16, 0,14,14, 0,14,16,16, 0,15,15, - 0,14,16, 0, 0,15,16, 0,12,13,14, 0,13,14,15,14, - 14, 0, 0,15, 0, 0,14, 0, 0, 0, 0, 0, 0,13,14,16, - 16,15,15, 0,14,16, 0, 0,15, 0, 0,14, 0, 0, 0,15, - 16, 0, 0, 0, 0, 0, 0, 0, 0,13,14,16, 0,15, 0, 0, - 13,16, 0, 0,16, 0, 0,16, 0,16, 0, 0, 0, 0,10,11, - 13,14,11,14,14,11,11,14, 0,12,15,16,13,14,15, 0, - 14, 0,15,15,14,16, 0,15, 0,16,11,13,14,14,12,14, - 14,12,13,16, 0,13,15,16,15, 0, 0, 0,15,16, 0,12, - 13,14, 0,13,16,14,12,13,14,16,14,16,16,15,14,16, - 16, 0,16, 0,15, 0, 0, 0,16, 0, 0,12,14,15, 0,14, - 14,16,14,16,16, 0,14,16, 0,16, 0, 0, 0,16,16, 0, - 14,16,15, 0,16, 0,16,13,14, 0, 0, 0, 0,16, 0,15, - 0, 0, 0, 0, 0,16, 0,16, 0, 0, 0, 0,14,14, 0, 0, - 14, 0, 0,15, 0,15, 0, 0,16, 0,16, 0, 0, 0, 0, 0, - 0, -}; - -static double _vq_quantthresh_res0_1024a_128_6[] = { - -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, -}; - -static long _vq_quantmap_res0_1024a_128_6[] = { - 6, 5, 4, 0, 1, 2, 3, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_128_6 = { - _vq_quantthresh_res0_1024a_128_6, - _vq_quantmap_res0_1024a_128_6, - 7, - 7 -}; - -static static_codebook _vq_book_res0_1024a_128_6 = { - 4, 2401, - _vq_lengthlist_res0_1024a_128_6, - 1, -533200896, 1611661312, 3, 0, - _vq_quantlist_res0_1024a_128_6, - NULL, - &_vq_auxt_res0_1024a_128_6, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_128_7.vqh b/include/vorbis/book/res0_1024a_128_7.vqh deleted file mode 100644 index 833db7fc..00000000 --- a/include/vorbis/book/res0_1024a_128_7.vqh +++ /dev/null @@ -1,75 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_128_7_VQH_ -#define _V_res0_1024a_128_7_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_128_7[] = { - 6, - 7, - 8, - 9, - 10, - 12, - 5, - 4, - 3, - 2, - 0, -}; - -static long _vq_lengthlist_res0_1024a_128_7[] = { - 1, 4, 6, 7, 7, 8, 4, 6, 7, 7, 8, 4, 6, 8, 9, 9, - 10, 6, 8, 9, 9,10, 7, 8,10,11,11,12, 8,10,11,11, - 12, 8,10,11,12,12,13,10,11,12,12,13, 7,10,11,12, - 13,14,10,11,13,13,14, 9,11,13,14,14,15,11,13,14, - 14,15, 4, 6, 8, 9, 9,10, 6, 8, 9, 9,10, 7, 8,10, - 11,11,12, 8,10,11,11,12, 8,10,11,12,12,13,10,11, - 12,12,13, 8,10,11,13,13,14,10,11,13,13,14, 9,11, - 13,14,14,15,11,13,14,14,15, -}; - -static double _vq_quantthresh_res0_1024a_128_7[] = { - -5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, - 3.5, 5, -}; - -static long _vq_quantmap_res0_1024a_128_7[] = { - 10, 9, 8, 7, 6, 0, 1, 2, - 3, 4, 5, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_128_7 = { - _vq_quantthresh_res0_1024a_128_7, - _vq_quantmap_res0_1024a_128_7, - 11, - 11 -}; - -static static_codebook _vq_book_res0_1024a_128_7 = { - 2, 121, - _vq_lengthlist_res0_1024a_128_7, - 1, -531103744, 1611661312, 4, 0, - _vq_quantlist_res0_1024a_128_7, - NULL, - &_vq_auxt_res0_1024a_128_7, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_128_8.vqh b/include/vorbis/book/res0_1024a_128_8.vqh deleted file mode 100644 index b50a0e64..00000000 --- a/include/vorbis/book/res0_1024a_128_8.vqh +++ /dev/null @@ -1,86 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_128_8_VQH_ -#define _V_res0_1024a_128_8_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_128_8[] = { - 11, - 12, - 13, - 14, - 15, - 17, - 19, - 22, - 10, - 9, - 8, - 7, - 5, - 3, - 0, -}; - -static long _vq_lengthlist_res0_1024a_128_8[] = { - 2, 4, 6, 7, 7, 7, 7, 8, 4, 6, 7, 7, 7, 7, 8, 5, - 6, 7, 8, 8, 9, 8, 9, 6, 7, 8, 8, 9, 8, 9, 6, 8, - 9, 9, 9, 9, 9,10, 8, 9, 9, 9, 9, 9,10, 7, 8, 9, - 10,10,10,10,11, 8, 9,10,10,10,10,11, 7, 9, 9,10, - 10,10,10,11, 9, 9,10,10,10,10,11, 7, 9,10,10,10, - 10,10,11, 9,10,10,10,10,10,11, 7, 9,10,11,10,11, - 11,12, 9,10,10,10,11,11,12, 8,10,11,11,11,11,12, - 12,10,11,11,11,11,12,12, 5, 6, 7, 8, 8, 8, 8, 9, - 6, 7, 8, 8, 9, 8, 9, 6, 8, 9, 9, 9, 9, 9,10, 8, - 9, 9, 9, 9, 9,10, 7, 8, 9,10,10,10,10,11, 8, 9, - 10,10,10,10,11, 7, 9, 9,10,10,10,10,11, 8, 9,10, - 10,10,10,11, 7, 9,10,10,10,10,10,11, 9,10,10,10, - 10,10,11, 7, 9,10,10,10,11,11,12, 9,10,11,10,11, - 11,12, 8,10,11,11,11,11,12,12,10,11,11,11,11,12, - 12, -}; - -static double _vq_quantthresh_res0_1024a_128_8[] = { - -9.5, -7, -5, -3.5, -2.5, -1.5, -0.5, 0.5, - 1.5, 2.5, 3.5, 5, 7, 9.5, -}; - -static long _vq_quantmap_res0_1024a_128_8[] = { - 14, 13, 12, 11, 10, 9, 8, 0, - 1, 2, 3, 4, 5, 6, 7, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_128_8 = { - _vq_quantthresh_res0_1024a_128_8, - _vq_quantmap_res0_1024a_128_8, - 15, - 15 -}; - -static static_codebook _vq_book_res0_1024a_128_8 = { - 2, 225, - _vq_lengthlist_res0_1024a_128_8, - 1, -529137664, 1611661312, 5, 0, - _vq_quantlist_res0_1024a_128_8, - NULL, - &_vq_auxt_res0_1024a_128_8, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_128_9.vqh b/include/vorbis/book/res0_1024a_128_9.vqh deleted file mode 100644 index 45f09269..00000000 --- a/include/vorbis/book/res0_1024a_128_9.vqh +++ /dev/null @@ -1,115 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_128_9_VQH_ -#define _V_res0_1024a_128_9_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_128_9[] = { - 45, - 46, - 47, - 48, - 49, - 51, - 53, - 56, - 61, - 68, - 77, - 90, - 44, - 43, - 42, - 41, - 39, - 37, - 34, - 29, - 22, - 13, - 0, -}; - -static long _vq_lengthlist_res0_1024a_128_9[] = { - 3, 5, 6, 7, 7, 7, 8, 8, 8,11,14,20, 5, 6, 7, 7, - 7, 8, 8, 8,11,15,18, 5, 6, 7, 8, 8, 8, 8, 9, 9, - 13,15,20, 6, 7, 8, 8, 8, 8, 9, 9,13,16,19, 6, 7, - 8, 8, 8, 9, 9,10,10,13,15, 0, 7, 8, 8, 8, 9, 9, - 10,10,13,16, 0, 7, 8, 9, 9, 9, 9,10,10,11,14,18, - 0, 8, 8, 9, 9, 9,10,10,11,14,16, 0, 7, 8, 9, 9, - 9, 9,10,10,11,15,18, 0, 8, 9, 9, 9, 9, 9,10,11, - 14,17,19, 7, 8, 9, 9, 9, 9,10,10,11,15,19, 0, 8, - 9, 9, 9, 9,10,10,11,16, 0, 0, 7, 9, 9,10,10,10, - 10,11,11,17,18, 0, 9, 9,10,10,10,10,11,11,16,19, - 0, 8, 9,10,10,10,10,11,11,12,16, 0, 0, 9,10,11, - 10,11,11,11,12,15, 0, 0, 8, 9,10,11,11,11,11,12, - 14,16, 0, 0,10,10,11,11,11,11,12,14,18, 0, 0,11, - 14,14,15,14,16,15,15,17, 0, 0, 0,13,14,14,14,15, - 15,15,19,19, 0, 0,14,17,18, 0, 0, 0, 0, 0, 0, 0, - 0, 0,16,19, 0, 0,19, 0, 0, 0, 0, 0, 0,18, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 5, 6, 7, 8, 8, 8, 8, 9, 9,13,15,19, - 6, 7, 8, 8, 8, 8, 9, 9,13,17, 0, 6, 7, 8, 8, 8, - 9, 9,10,10,13,15,17, 7, 8, 8, 8, 9, 9,10,10,13, - 16, 0, 6, 8, 9, 9, 9, 9,10,10,11,14,15,19, 8, 9, - 9, 9, 9,10,10,11,14,17, 0, 7, 8, 9, 9, 9, 9,10, - 10,11,15,16, 0, 8, 9, 9, 9, 9,10,10,11,15,18, 0, - 7, 8, 9, 9, 9,10,10,10,11,15,19, 0, 8, 9, 9, 9, - 9,10,10,11,15, 0, 0, 7, 9, 9,10,10,10,10,11,11, - 15,19, 0, 9, 9,10,10,10,10,11,11,15,19,19, 8, 9, - 10,10,10,10,11,11,12,15, 0, 0, 9,10,10,10,10,11, - 11,12,16,19, 0, 8,10,10,11,11,11,11,12,14,19, 0, - 0,10,10,11,11,11,11,12,14,18, 0, 0,11,13,15,14, - 15,15,15,16,17, 0, 0, 0,13,15,15,14,14,16,15,17, - 0, 0, 0,14,19,17, 0, 0, 0, 0,19, 0, 0, 0, 0,17, - 18,19,18,19, 0, 0, 0, 0, 0, 0,16, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,19, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -}; - -static double _vq_quantthresh_res0_1024a_128_9[] = { - -38.5, -27.5, -19.5, -13.5, -9.5, -7, -5, -3.5, - -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 5, - 7, 9.5, 13.5, 19.5, 27.5, 38.5, -}; - -static long _vq_quantmap_res0_1024a_128_9[] = { - 22, 21, 20, 19, 18, 17, 16, 15, - 14, 13, 12, 0, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_128_9 = { - _vq_quantthresh_res0_1024a_128_9, - _vq_quantmap_res0_1024a_128_9, - 23, - 23 -}; - -static static_codebook _vq_book_res0_1024a_128_9 = { - 2, 529, - _vq_lengthlist_res0_1024a_128_9, - 1, -524910592, 1611661312, 7, 0, - _vq_quantlist_res0_1024a_128_9, - NULL, - &_vq_auxt_res0_1024a_128_9, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_160_1.vqh b/include/vorbis/book/res0_1024a_160_1.vqh deleted file mode 100644 index 74e5e312..00000000 --- a/include/vorbis/book/res0_1024a_160_1.vqh +++ /dev/null @@ -1,63 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_160_1_VQH_ -#define _V_res0_1024a_160_1_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_160_1[] = { - 1, - 2, - 0, -}; - -static long _vq_lengthlist_res0_1024a_160_1[] = { - 1, 4, 4, 4, 7, 7, 4, 7, 7, 5, 8, 8, 8,11,11, 8, - 11,11, 5, 8, 8, 8,11,11, 8,11,11, 5, 8, 8, 8,11, - 11, 8,11,11, 8,11,11,11,15,15,11,15,15, 8,11,11, - 11,15,15,12,15,15, 5, 8, 8, 8,11,11, 8,11,11, 8, - 11,11,11,15,15,11,15,15, 8,11,11,12,15,15,11,15, - 15, -}; - -static double _vq_quantthresh_res0_1024a_160_1[] = { - -0.5, 0.5, -}; - -static long _vq_quantmap_res0_1024a_160_1[] = { - 2, 0, 1, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_160_1 = { - _vq_quantthresh_res0_1024a_160_1, - _vq_quantmap_res0_1024a_160_1, - 3, - 3 -}; - -static static_codebook _vq_book_res0_1024a_160_1 = { - 4, 81, - _vq_lengthlist_res0_1024a_160_1, - 1, -535822336, 1611661312, 2, 0, - _vq_quantlist_res0_1024a_160_1, - NULL, - &_vq_auxt_res0_1024a_160_1, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_160_2.vqh b/include/vorbis/book/res0_1024a_160_2.vqh deleted file mode 100644 index 493fc7ca..00000000 --- a/include/vorbis/book/res0_1024a_160_2.vqh +++ /dev/null @@ -1,63 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_160_2_VQH_ -#define _V_res0_1024a_160_2_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_160_2[] = { - 1, - 2, - 0, -}; - -static long _vq_lengthlist_res0_1024a_160_2[] = { - 3, 4, 5, 5, 6, 6, 5, 6, 6, 5, 6, 6, 6, 7, 7, 6, - 7, 8, 5, 6, 6, 6, 7, 7, 6, 7, 7, 5, 6, 6, 6, 8, - 8, 6, 7, 7, 6, 8, 7, 7, 9, 9, 8, 9, 9, 6, 8, 8, - 7, 9, 9, 8, 9, 9, 5, 6, 6, 6, 7, 7, 6, 8, 8, 6, - 8, 8, 8, 9, 9, 8, 9, 9, 6, 7, 8, 8, 9, 9, 7, 9, - 9, -}; - -static double _vq_quantthresh_res0_1024a_160_2[] = { - -0.5, 0.5, -}; - -static long _vq_quantmap_res0_1024a_160_2[] = { - 2, 0, 1, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_160_2 = { - _vq_quantthresh_res0_1024a_160_2, - _vq_quantmap_res0_1024a_160_2, - 3, - 3 -}; - -static static_codebook _vq_book_res0_1024a_160_2 = { - 4, 81, - _vq_lengthlist_res0_1024a_160_2, - 1, -535822336, 1611661312, 2, 0, - _vq_quantlist_res0_1024a_160_2, - NULL, - &_vq_auxt_res0_1024a_160_2, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_160_3.vqh b/include/vorbis/book/res0_1024a_160_3.vqh deleted file mode 100644 index d5d05104..00000000 --- a/include/vorbis/book/res0_1024a_160_3.vqh +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_160_3_VQH_ -#define _V_res0_1024a_160_3_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_160_3[] = { - 2, - 3, - 4, - 1, - 0, -}; - -static long _vq_lengthlist_res0_1024a_160_3[] = { - 2, 5, 7, 5, 7, 5, 6, 9, 7, 9, 7, 9,13, 9,13, 5, - 6, 9, 7, 9, 7, 9,13, 9,13, 5, 7, 9, 7, 9, 7, 8, - 11, 8,11, 9,11,15,11,15, 7, 8,11, 8,11,10,11,14, - 11,15, 7, 9,13, 9,13, 9,12,15,11,15,13,15,18,15, - 18,10,11,15,12,15,13,16,19,16,18, 5, 7, 9, 7, 9, - 7, 8,11, 8,11,10,11,15,11,15, 7, 9,11, 8,11,10, - 11,15,11,15, 7, 9,13, 9,13,10,11,15,11,15,13,16, - 18,15,18,10,11,15,12,15,13,15,19,15,18, 5, 7, 9, - 7, 9, 7, 8,11, 9,11, 9,11,15,11,15, 7, 9,11, 9, - 11, 9,11,15,11,15, 7, 9,11, 9,11, 8,10,13,10,13, - 11,13,17,13,17, 9,11,13,10,13,12,14,18,13,17, 9, - 11,15,12,15,11,13,17,13,17,15,17,19,18, 0,12,14, - 18,13,17,16,17, 0,18,20, 7, 9,11, 9,11, 9,10,13, - 10,13,11,13,18,13,16, 9,11,13,11,13,11,13,19,13, - 17, 9,11,15,12,15,12,14,17,13,18,15,17,20,17,19, - 12,13,17,14,17,16,18,19,18, 0, 7, 9,13, 9,13, 9, - 12,15,11,15,13,16, 0,15,19, 9,12,15,12,15,13,15, - 19,15,20, 9,11,16,11,15,11,13,18,13,19,15,17, 0, - 17, 0,11,14,18,14,17,15,17, 0,17, 0,13,15,20,15, - 19,15,18,19,17,20,19,19, 0,20, 0,15,18,19,18,20, - 18, 0, 0, 0,20, 9,12,15,11,15,11,13,18,13,16,15, - 18, 0,17, 0,12,13,18,14,18,16,17, 0,17, 0,13,16, - 18,15,19,15,18, 0,18, 0,18, 0, 0,20, 0,16,18, 0, - 19, 0,19, 0, 0,20, 0, 5, 7, 9, 7, 9, 7, 8,11, 9, - 11, 9,11,15,12,15, 7, 9,11, 9,11, 9,12,15,11,15, - 7, 9,11, 9,11, 9,10,13,10,13,11,13,17,13,17, 9, - 10,13,11,13,11,13,17,14,18, 9,12,16,12,15,12,14, - 17,13,18,15,18, 0,17, 0,12,13,18,14,17,15,17, 0, - 17,20, 7, 9,11, 9,11, 9,10,13,11,13,12,13,17,14, - 17, 9,11,13,10,13,12,13,17,13,16,10,11,15,12,16, - 12,14,17,14,17,15,18,20,18, 0,11,14,17,14,18,16, - 18,20,17,20, 7, 9,13,10,13, 9,11,15,11,15,13,15, - 19,15, 0, 9,11,16,12,16,13,16, 0,16,18, 9,11,15, - 11,16,11,13,18,13,18,16,18, 0,17, 0,11,13,17,14, - 17,15,18,20,17, 0,13,16,20,16,18,15,19, 0,18, 0, - 19, 0, 0, 0, 0,15,17,20,16, 0,19,19, 0,20, 0, 9, - 11,15,11,16,11,13,17,14,19,16,17,20,18, 0,11,14, - 17,13,17,15,17,20,18,20,13,15,18,16,20,15,17, 0, - 18, 0, 0,20, 0, 0, 0,15,18, 0,17,19,19,20, 0,20, - 20, -}; - -static double _vq_quantthresh_res0_1024a_160_3[] = { - -1.5, -0.5, 0.5, 1.5, -}; - -static long _vq_quantmap_res0_1024a_160_3[] = { - 4, 3, 0, 1, 2, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_160_3 = { - _vq_quantthresh_res0_1024a_160_3, - _vq_quantmap_res0_1024a_160_3, - 5, - 5 -}; - -static static_codebook _vq_book_res0_1024a_160_3 = { - 4, 625, - _vq_lengthlist_res0_1024a_160_3, - 1, -533725184, 1611661312, 3, 0, - _vq_quantlist_res0_1024a_160_3, - NULL, - &_vq_auxt_res0_1024a_160_3, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_160_4.vqh b/include/vorbis/book/res0_1024a_160_4.vqh deleted file mode 100644 index 685c2604..00000000 --- a/include/vorbis/book/res0_1024a_160_4.vqh +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_160_4_VQH_ -#define _V_res0_1024a_160_4_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_160_4[] = { - 2, - 3, - 4, - 1, - 0, -}; - -static long _vq_lengthlist_res0_1024a_160_4[] = { - 6, 6, 8, 6, 8, 6, 7, 9, 7, 9, 8, 9,11, 9,11, 6, - 7, 9, 7, 9, 8, 9,11, 9,11, 6, 7, 9, 7, 9, 7, 7, - 9, 7, 9, 9, 9,11,10,12, 7, 7, 9, 7, 9, 9,10,11, - 10,12, 8, 9,11, 9,11, 9,10,12,10,12,11,12,14,12, - 14, 9,10,12,10,12,11,12,14,12,14, 6, 7, 9, 7, 9, - 7, 7, 9, 7, 9, 9,10,12, 9,11, 7, 7,10, 7, 9, 9, - 10,12, 9,11, 8, 9,11, 9,11, 9,10,12,10,12,11,12, - 14,12,14, 9,10,12,10,12,11,12,14,12,13, 6, 7, 9, - 7, 9, 7, 7, 9, 7,10, 9,10,12,10,12, 7, 7, 9, 7, - 10, 9,10,12,10,12, 7, 7,10, 7, 9, 7, 8,10, 8,10, - 10,10,12,10,12, 7, 8,10, 8,10,10,10,12,10,12, 9, - 10,12,10,12, 9,10,12,10,13,12,12,14,12,14,10,10, - 12,10,12,12,12,14,12,14, 7, 7, 9, 7,10, 7, 8,10, - 8,10,10,10,12,10,12, 7, 8,10, 8,10,10,10,12,10, - 12, 9,10,12,10,12,10,10,12,10,12,12,12,14,12,14, - 10,10,12,10,13,12,13,14,13,14, 8, 9,11, 9,11, 9, - 10,12,10,12,11,12,14,12,14, 9,10,12,10,12,11,12, - 14,12,14, 9,10,12,10,12,10,10,12,10,12,12,12,14, - 13,15,10,10,12,10,12,12,13,14,13,14,11,12,14,12, - 14,12,12,14,12,15,14,14,16,15,16,12,12,15,12,14, - 14,15,17,15,16, 9,10,12,10,12,10,10,12,10,12,12, - 12,15,12,14,10,10,12,10,12,12,12,14,12,14,11,12, - 14,12,14,12,12,14,12,14,13,14,17,14,16,12,12,14, - 12,15,14,15,16,14,16, 6, 7, 9, 7, 9, 7, 7, 9, 7, - 10, 9,10,12,10,12, 7, 7,10, 7,10, 9,10,12,10,12, - 7, 7,10, 7,10, 7, 8,10, 8,10,10,10,12,10,12, 7, - 8,10, 8,10,10,10,12,10,13, 9,10,12,10,12,10,10, - 12,10,12,12,12,14,12,14,10,10,12,10,12,12,12,14, - 12,15, 7, 7,10, 7,10, 7, 8,10, 8,10,10,10,12,10, - 12, 7, 8,10, 8,10,10,10,12,10,12, 9,10,12,10,12, - 10,10,12,10,13,12,13,14,13,14,10,10,13,10,12,12, - 12,14,12,14, 8, 9,11, 9,11, 9,10,12,10,12,11,12, - 14,12,14, 9,10,12,10,12,11,12,14,12,14, 9,10,12, - 10,12,10,10,13,10,12,12,13,14,12,15,10,10,12,10, - 13,12,12,14,13,14,11,12,14,12,14,12,13,14,12,14, - 13,15,16,14,16,12,12,14,13,14,14,14,16,15,16, 9, - 10,12,10,12,10,10,12,10,13,12,12,14,12,15,10,10, - 13,10,12,12,13,15,13,14,11,12,14,12,14,12,12,14, - 13,15,14,14,17,15,16,12,12,14,12,14,14,14,17,14, - 16, -}; - -static double _vq_quantthresh_res0_1024a_160_4[] = { - -1.5, -0.5, 0.5, 1.5, -}; - -static long _vq_quantmap_res0_1024a_160_4[] = { - 4, 3, 0, 1, 2, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_160_4 = { - _vq_quantthresh_res0_1024a_160_4, - _vq_quantmap_res0_1024a_160_4, - 5, - 5 -}; - -static static_codebook _vq_book_res0_1024a_160_4 = { - 4, 625, - _vq_lengthlist_res0_1024a_160_4, - 1, -533725184, 1611661312, 3, 0, - _vq_quantlist_res0_1024a_160_4, - NULL, - &_vq_auxt_res0_1024a_160_4, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_160_5.vqh b/include/vorbis/book/res0_1024a_160_5.vqh deleted file mode 100644 index 8e4db71f..00000000 --- a/include/vorbis/book/res0_1024a_160_5.vqh +++ /dev/null @@ -1,212 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_160_5_VQH_ -#define _V_res0_1024a_160_5_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_160_5[] = { - 3, - 4, - 5, - 6, - 2, - 1, - 0, -}; - -static long _vq_lengthlist_res0_1024a_160_5[] = { - 4, 5, 7, 8, 6, 8, 8, 5, 7, 9,10, 7, 9,10, 8, 9, - 11,12, 9,11,12, 8,10,12,15,10,12,15, 6, 7, 9,10, - 7, 9,10, 8, 9,11,12, 9,11,12, 8,10,12,14,10,12, - 15, 6, 7, 9,10, 7, 9,10, 7, 8,10,11, 8,10,11, 9, - 10,12,13,10,12,14,10,11,14,16,11,14,16, 7, 8,10, - 11, 8,10,11, 9,10,12,13,10,13,14,10,11,14,16,11, - 14,17, 8, 9,11,12, 9,11,12, 9,10,13,13,10,12,14, - 11,12,15,16,13,15,16,13,14,15,19,14,17,20, 9,10, - 12,14,10,13,14,11,13,15,16,13,15,16,13,14,16,18, - 14,17, 0, 8,10,12,14,10,12,14,10,11,14,16,11,14, - 16,13,14,16,18,14,16,19,15,16,20,20,17,18, 0,10, - 11,14,16,11,14,16,13,14,16,18,14,16,19,16,16,20, - 20,17,19,20, 6, 7, 9,10, 7, 9,10, 7, 8,10,11, 8, - 10,11, 9,10,13,14,10,12,13,10,11,13,16,11,13,16, - 7, 8,10,11, 8,10,11, 9,10,13,14,10,13,14,10,11, - 13,16,11,14,17, 8, 9,11,12, 9,11,12, 9,10,12,14, - 10,13,13,12,13,15,17,13,15,16,13,14,16,19,14,16, - 19, 9,10,13,14,10,13,14,11,13,15,16,13,15,16,13, - 14,16,20,14,16,18, 8,10,12,14,10,12,14,10,11,14, - 16,12,14,16,13,14,16,19,14,17,20,16,16,19, 0,17, - 18, 0,10,12,14,16,11,14,16,13,14,16,19,14,16,19, - 15,16,19, 0,16, 0, 0, 6, 7, 9,10, 7, 9,10, 7, 8, - 10,11, 8,10,11, 9,10,13,14,10,13,14,10,11,14,16, - 12,14,16, 7, 8,10,11, 8,10,11, 9,10,13,14,10,12, - 14,10,11,14,16,11,14,17, 7, 8,10,11, 8,10,11, 8, - 9,11,12, 9,11,12,10,12,14,15,12,14,15,11,12,15, - 19,13,15,18, 8, 9,11,12, 9,11,12,10,11,14,15,12, - 14,15,11,13,15,18,13,15,18, 9,10,13,14,10,13,14, - 10,12,14,15,12,14,15,13,14,16,17,14,17,17,14,15, - 17,20,15,18,20,10,11,14,15,12,14,15,13,14,17,20, - 14,16,18,14,15,17,20,15,18, 0,10,12,14,16,12,14, - 16,11,13,16,18,13,15,18,14,15,16,19,15,17,20,16, - 17,20,20,20, 0, 0,11,13,15,19,13,16,17,14,15,18, - 19,15,17,19,16,18, 0, 0,17,18, 0, 7, 8,10,11, 8, - 10,11, 8, 9,12,12, 9,11,12,10,12,14,15,11,14,15, - 11,13,15,17,12,15,18, 8, 9,11,12, 9,12,13,10,12, - 14,15,11,14,15,11,13,15,18,13,16,19, 9,10,13,14, - 10,13,14,10,12,14,15,11,14,15,13,14,16,17,14,16, - 17,14,15,18, 0,15,16, 0,10,12,14,15,12,14,15,13, - 14,17,17,14,17,17,14,15,18,20,15,18, 0,10,12,14, - 16,12,14,16,11,13,15,18,13,15,18,14,15,17,19,15, - 17, 0,17,18,20, 0,18,19, 0,11,13,15,17,13,16,18, - 14,15,18,20,15,17, 0,17,17, 0, 0,18,20, 0, 8, 9, - 11,12, 9,11,12, 9,10,13,14,10,13,14,11,13,15,17, - 13,15,16,12,14,16,18,14,16,20, 9,10,13,14,10,13, - 14,11,13,15,17,13,16,16,12,14,17,18,14,16,20, 9, - 10,13,14,10,13,14,10,11,14,15,12,14,14,13,14,17, - 18,14,17,17,14,15,17,20,15,18, 0,10,12,14,15,12, - 14,15,13,14,17,18,14,17,18,14,15,18, 0,15,18, 0, - 11,13,15,16,13,15,16,13,14,16,19,14,16,18,15,16, - 19,19,16,19,20,16,17,18,20,17,19, 0,13,14,16,17, - 14,17,17,15,17,18, 0,17,19, 0,17,18, 0, 0,17,19, - 20,12,14,16,18,14,16,19,14,15,17,18,15,18, 0,16, - 17,20, 0,18, 0, 0,18,20,20, 0, 0, 0, 0,14,16,18, - 0,15,18, 0,16,18,19, 0,18,18, 0,19,20,20, 0, 0, - 0, 0, 9,10,13,13,10,13,14,10,12,14,15,12,14,15, - 13,14,17,18,14,17,18,14,16,18,20,15,18, 0,10,12, - 14,15,12,14,15,13,14,16,18,14,17,18,14,15,18,19, - 15,17,19,11,13,15,16,13,15,16,12,14,17,18,14,17, - 17,15,16,18,19,16,20,20,16,18,20, 0,18,19, 0,13, - 14,16,18,14,17,18,15,17,18,19,16,18,19,17,18,20, - 0,18,19, 0,13,14,16,19,14,17,18,14,15,17, 0,15, - 18,20,16,17,19, 0,16,20, 0,19,20, 0, 0,20, 0, 0, - 14,15,17, 0,15,18, 0,16,19,19, 0,19, 0, 0,18, 0, - 0, 0,20, 0, 0, 8,10,12,14,10,12,14,10,12,14,16, - 12,14,17,12,14,17,20,14,16,20,14,16,20, 0,16,20, - 0,10,12,14,16,11,14,16,12,14,16,18,14,17,19,14, - 17,19, 0,16,18, 0,10,11,14,16,11,14,17,11,13,15, - 17,13,16,19,14,15,18, 0,15,18,20,17,18,20, 0,19, - 20, 0,11,13,15,18,13,15,17,14,16,18, 0,15,18,20, - 17,18, 0, 0,18,19, 0,12,14,16,18,14,16,18,13,15, - 17, 0,15,18,20,16,16, 0, 0,17,19, 0,20,19, 0, 0, - 0, 0, 0,14,15,18, 0,15,18, 0,16,18,20, 0,18,20, - 0,19, 0, 0, 0,20,20,20,15,16,19,20,17,19,20,16, - 18,20, 0,17,20, 0,18, 0, 0, 0,20, 0, 0,20, 0, 0, - 0, 0, 0, 0,17,17, 0, 0,18,20, 0, 0, 0,20, 0, 0, - 0, 0, 0, 0, 0, 0,20, 0, 0,10,11,14,16,11,14,16, - 11,13,15,18,13,15,17,14,15,17,20,16,18, 0,17,18, - 0, 0,17,19, 0,11,13,15,18,13,15,18,14,15,17, 0, - 16,17,20,16,18, 0,20,19,20, 0,13,14,17,19,14,16, - 18,14,15,17,20,15,18,19,16,17,18, 0,17, 0,20,19, - 0,20, 0,20,20, 0,14,15,18, 0,15,17,20,16,18,19, - 0,18,20, 0,18,20, 0, 0,19, 0, 0,15,17,19, 0,17, - 18, 0,16,19,19, 0,17, 0, 0,18,20, 0, 0,20, 0, 0, - 0, 0, 0, 0,19, 0, 0,17,19,20, 0,18,19, 0,20, 0, - 0, 0,20, 0,20, 0, 0, 0, 0, 0, 0, 0, 6, 7, 9,10, - 7, 9,10, 7, 8,10,11, 8,10,11, 9,10,13,13,10,13, - 14,10,11,14,17,11,14,17, 7, 8,10,11, 8,10,11, 9, - 10,13,14,10,13,14,10,11,14,16,11,14,17, 7, 8,10, - 11, 8,10,11, 8, 9,12,12, 9,11,12,10,12,14,15,12, - 14,15,11,13,15,17,13,15,18, 8, 9,11,12, 9,12,12, - 10,12,14,15,12,14,15,11,13,15,18,13,15,18, 9,10, - 13,14,10,13,14,10,12,14,15,12,14,15,13,14,16,17, - 14,16,17,14,15,19,20,15,18,19,10,12,14,15,12,14, - 15,13,14,16,17,14,17,18,14,15,17,20,15,17, 0,10, - 11,14,16,12,14,16,11,13,15,18,13,15,18,14,16,18, - 19,15,18,19,16,18,20, 0,18, 0, 0,12,13,15,18,13, - 15,18,14,15,17,19,15,18,19,16,17,20, 0,19,19, 0, - 7, 8,10,11, 8,10,11, 8, 9,11,12, 9,12,12,10,11, - 13,15,12,14,15,11,13,15,17,12,15,17, 8, 9,12,13, - 9,12,12,10,12,14,15,12,14,15,12,13,15,18,13,15, - 18, 9,10,13,14,10,13,14,10,12,14,15,12,14,15,13, - 14,17,18,14,17,19,14,15,18,19,15,18, 0,10,12,14, - 15,12,14,15,13,14,18,17,14,16,18,14,16,18,20,15, - 17,20,10,12,14,17,12,14,16,11,13,15,18,13,16,18, - 14,16,17,20,15,17,20,17,19,20, 0,18, 0, 0,12,13, - 15, 0,13,15,17,14,15,18,20,15,17,19,17,18, 0, 0, - 18,19,20, 8, 9,11,12, 9,11,12, 9,10,13,14,11,13, - 14,11,13,15,16,13,15,17,12,14,17,20,14,16,18, 9, - 10,13,14,11,13,14,11,13,15,17,13,15,16,12,14,16, - 18,14,16,19, 9,10,13,14,10,13,14,10,12,14,15,12, - 14,15,13,14,17,18,14,17,18,14,15,17, 0,15,18,19, - 10,12,14,15,12,14,15,13,14,17,18,14,17,18,14,15, - 18,20,15,18,20,11,13,15,16,13,15,17,13,14,16,18, - 14,17,17,15,17,19, 0,17,19, 0,16,17, 0, 0,18,20, - 0,13,14,16,19,14,17,18,15,16,19,20,17,19, 0,16, - 17,19, 0,18,19, 0,13,13,16,20,14,16,19,14,15,17, - 20,15,18,19,17,19,20, 0,17,19,20,19, 0,20, 0,20, - 0, 0,14,15,18,20,15,18, 0,16,17,20, 0,18,20, 0, - 19, 0,20, 0, 0, 0, 0, 9,10,13,14,10,13,14,10,11, - 14,15,12,14,15,13,14,16,18,14,17,18,14,16,18, 0, - 15,18,19,10,12,14,15,12,14,15,13,14,16,18,14,16, - 18,14,15,18,19,15,18,19,11,13,15,16,13,15,16,13, - 14,17,17,14,17,18,15,16,18,20,17,20,19,17,18,20, - 0,19,20, 0,13,14,17,18,14,17,17,15,17,19,20,17, - 0,19,16,18,19, 0,18,20, 0,13,14,17,20,14,17,19, - 14,15,18,19,15,18,20,17,17,20, 0,18,19, 0,19, 0, - 0, 0, 0, 0, 0,14,15,18,19,15,17,19,16,18,20, 0, - 18,20, 0,20,20, 0, 0,20, 0, 0, 8,10,12,14,10,12, - 14,10,12,14,17,11,14,17,12,14,17,18,14,17,19,14, - 16,18, 0,17,20, 0,10,11,14,16,12,14,17,12,14,17, - 0,14,17,19,14,17,20,20,17,19, 0,10,11,14,16,11, - 14,16,11,13,15,18,13,15,18,14,15,18, 0,15,19,20, - 16,19,20, 0,18, 0, 0,11,12,15,18,13,15,18,14,15, - 17, 0,16,18,19,16,18,19, 0,18, 0, 0,12,14,17,18, - 14,16,20,14,15,18, 0,15,18, 0,16,18, 0, 0,18,20, - 0,18,20, 0, 0,20, 0, 0,14,15,18,20,15,18,20,16, - 18,18, 0,18,20, 0,19,20, 0, 0, 0,20, 0,15,17,19, - 0,16,19, 0,17,18,20, 0,18, 0, 0,18, 0,20, 0,20, - 0, 0, 0, 0, 0, 0, 0, 0, 0,16,18,20,19,18, 0, 0, - 20,19, 0, 0,20, 0, 0, 0, 0, 0, 0, 0, 0, 0,10,11, - 14,17,12,14,17,11,13,15,17,13,16,18,14,15,18, 0, - 15,18,20,16,17,19, 0,18,19, 0,11,13,15,18,13,15, - 19,14,15,18, 0,15,19,20,17,18,20, 0,18,18, 0,13, - 14,16, 0,14,16,20,14,15,17,19,15,18,19,16,18,19, - 0,19, 0, 0, 0, 0, 0, 0,20, 0, 0,14,15,17, 0,15, - 17,20,16,17,20, 0,18,18,20,19,20, 0, 0,20, 0, 0, - 15,16,19,20,16,20, 0,16,18, 0,20,18,20, 0,18, 0, - 0, 0, 0, 0, 0, 0, 0,20, 0, 0, 0, 0,16,18, 0, 0, - 19,20, 0,18,20, 0, 0,19,20, 0, 0, 0, 0, 0,20, 0, - 0, -}; - -static double _vq_quantthresh_res0_1024a_160_5[] = { - -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, -}; - -static long _vq_quantmap_res0_1024a_160_5[] = { - 6, 5, 4, 0, 1, 2, 3, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_160_5 = { - _vq_quantthresh_res0_1024a_160_5, - _vq_quantmap_res0_1024a_160_5, - 7, - 7 -}; - -static static_codebook _vq_book_res0_1024a_160_5 = { - 4, 2401, - _vq_lengthlist_res0_1024a_160_5, - 1, -533200896, 1611661312, 3, 0, - _vq_quantlist_res0_1024a_160_5, - NULL, - &_vq_auxt_res0_1024a_160_5, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_160_6.vqh b/include/vorbis/book/res0_1024a_160_6.vqh deleted file mode 100644 index 403a803c..00000000 --- a/include/vorbis/book/res0_1024a_160_6.vqh +++ /dev/null @@ -1,212 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_160_6_VQH_ -#define _V_res0_1024a_160_6_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_160_6[] = { - 3, - 4, - 5, - 6, - 2, - 1, - 0, -}; - -static long _vq_lengthlist_res0_1024a_160_6[] = { - 7, 8, 9,10, 8, 9,10, 8, 8, 9,10, 8, 9,10, 9, 9, - 10,12, 9,10,11,10,10,12,13,10,12,13, 8, 8, 9,10, - 8, 9,10, 9, 9,10,12, 9,10,11,10,10,12,13,10,12, - 13, 8, 8, 9,10, 8, 9,10, 8, 8, 9,11, 8, 9,11, 9, - 9,11,12, 9,11,12,10,11,12,14,11,12,14, 8, 8, 9, - 11, 8, 9,11, 9, 9,11,12, 9,11,12,10,11,12,14,11, - 12,14, 9, 9,10,12, 9,10,12, 9, 9,11,12, 9,11,12, - 10,11,12,13,11,12,13,12,12,13,15,12,13,15, 9, 9, - 11,12, 9,11,12,10,11,12,13,11,12,14,12,12,13,15, - 12,14,16,10,11,12,13,10,12,13,10,11,12,14,11,12, - 14,12,12,14,15,12,14,15,13,14,15,17,14,16,17,10, - 11,12,14,11,12,14,12,12,14,15,12,13,16,13,14,15, - 18,14,15,17, 8, 8, 9,10, 8, 9,10, 8, 8, 9,11, 8, - 9,11, 9, 9,11,12, 9,11,12,10,11,12,14,11,12,14, - 8, 8, 9,11, 8, 9,11, 9, 9,11,12, 9,11,12,10,11, - 12,14,11,12,13, 9, 9,10,11, 9,10,12, 9, 9,11,12, - 9,11,12,10,11,12,14,11,12,14,12,12,14,15,12,13, - 15, 9, 9,11,12, 9,11,12,10,11,12,14,11,12,13,12, - 12,14,15,12,13,15,10,10,12,13,11,12,13,10,11,12, - 14,11,12,14,12,12,13,15,12,14,16,13,14,16,17,14, - 15,17,11,11,12,14,11,12,14,12,12,14,16,12,13,15, - 13,14,16,17,14,15,17, 8, 8, 9,10, 8, 9,10, 8, 8, - 10,11, 8, 9,11, 9, 9,11,12, 9,11,12,10,11,12,14, - 11,12,14, 8, 8, 9,11, 8, 9,11, 9, 9,11,12, 9,11, - 12,10,11,12,14,11,12,14, 8, 8, 9,11, 8, 9,11, 8, - 9,10,11, 9,10,11, 9,10,11,13,10,11,13,11,11,13, - 14,11,13,15, 8, 9,10,11, 9,10,11,10,10,11,12,10, - 11,13,11,11,13,14,11,13,14, 9, 9,11,12, 9,11,12, - 9,10,11,13,10,11,13,11,11,13,14,11,13,14,12,13, - 14,15,13,15,15, 9,10,11,13,10,11,13,11,11,13,14, - 11,13,14,12,13,14,16,13,14,15,11,11,12,14,11,12, - 14,11,11,13,15,11,13,15,12,13,14,15,13,14,16,14, - 15,16,16,15,16,18,11,11,13,15,11,13,14,12,13,14, - 16,13,15,16,14,15,16,18,15,16,18, 8, 8, 9,11, 8, - 10,11, 8, 9,10,11, 9,10,11, 9,10,11,13,10,11,12, - 11,11,13,14,11,13,14, 8, 9,10,11, 9,10,11,10,10, - 11,13,10,11,13,11,11,13,14,11,13,14, 9, 9,11,12, - 10,11,12, 9,10,11,13,10,11,13,11,11,13,14,11,12, - 14,12,13,14,16,13,14,15, 9,10,11,13,10,11,13,11, - 11,12,14,11,13,14,12,13,14,16,13,15,16,10,11,12, - 14,11,13,14,11,12,13,14,11,13,14,12,13,14,16,13, - 14,15,14,14,17,18,14,15,16,11,12,13,15,12,13,15, - 12,13,14,17,13,14,16,14,14,16,17,15,16,17, 9, 9, - 10,12, 9,10,12, 9,10,11,12,10,11,12,10,11,12,13, - 11,12,14,12,12,14,15,12,14,16, 9, 9,11,12, 9,11, - 12,10,11,12,13,11,12,13,12,12,14,16,12,14,15, 9, - 10,11,12,10,11,12,10,10,11,13,10,11,13,11,11,13, - 14,11,13,14,12,13,14,16,13,14,16,10,10,11,13,10, - 11,13,11,11,13,14,11,13,14,12,13,15,16,13,14,16, - 10,11,12,14,11,12,14,11,11,13,14,11,13,15,12,12, - 14,16,13,14,16,13,14,15,17,14,16,17,11,11,13,14, - 11,13,14,12,13,14,16,13,14,16,13,15,16,18,14,15, - 18,12,12,14,16,12,14,16,12,13,14,16,13,14,16,13, - 14,15,17,15,15,18,15,15,17,18,16,16,20,12,13,14, - 17,13,14,16,14,14,15,18,14,15,18,16,16,18,20,17, - 19,18, 9,10,11,12,10,11,12, 9,10,11,13,10,11,13, - 11,12,13,14,11,13,14,12,13,14,16,13,14,16,10,10, - 11,13,10,11,13,11,11,13,14,11,13,14,12,13,14,16, - 13,14,16,10,11,12,14,11,12,14,11,11,13,14,11,13, - 14,12,13,14,16,12,14,15,13,14,15,17,14,15,16,11, - 11,13,14,11,13,14,12,13,14,16,13,14,15,14,14,16, - 17,14,15,17,12,12,14,16,13,14,15,12,13,14,16,13, - 14,16,13,14,15,17,14,15,17,15,16,18,18,15,17,18, - 12,13,14,16,13,14,16,14,14,15,18,15,16,17,16,17, - 17,20,16,17,19,10,10,12,14,11,12,13,11,11,12,14, - 11,12,15,12,12,14,16,12,14,16,13,14,16,17,14,16, - 18,10,11,12,14,11,12,15,12,12,14,15,12,14,16,14, - 14,15,17,14,16,18,11,11,12,14,11,12,14,11,11,13, - 15,12,13,15,12,13,14,16,13,14,16,14,15,16,17,15, - 16,18,11,11,13,15,12,13,15,12,13,14,16,13,14,16, - 14,15,16,20,15,16,18,12,12,14,15,12,14,15,12,13, - 14,16,13,14,16,14,14,16,17,14,15,18,15,16,18,18, - 17,17,20,12,13,14,16,13,14,16,14,15,17,17,14,16, - 18,16,17,18,18,17,18,19,14,14,16,17,14,16,17,14, - 15,15,17,15,15,20,15,16,17,18,16,18, 0,16,18,18, - 0,17,18,20,14,15,16,18,14,16,18,15,16,19,20,16, - 17,18,17,19,20,20,18,19, 0,10,11,12,14,11,12,14, - 11,12,13,15,11,13,15,12,13,14,16,13,14,17,15,15, - 16,17,15,16,20,11,11,13,15,11,13,14,12,13,14,17, - 13,14,16,14,15,16,18,15,17,17,12,12,14,16,12,14, - 15,12,13,14,17,13,14,16,14,14,15,17,14,16,17,15, - 16,19,20,16,17,17,12,13,14,16,13,14,16,13,14,15, - 18,15,15,17,16,16,18,20,16,18,19,14,14,15,18,14, - 16,18,14,15,15,17,15,16,18,15,16,17,20,16,17,18, - 17,19,19, 0,17,17, 0,14,14,16,18,15,17,17,15,16, - 19,18,16,19,18,18,17,19, 0,17,19,20, 8, 8, 9,10, - 8, 9,10, 8, 8, 9,11, 8, 9,11, 9, 9,11,12, 9,11, - 12,10,11,12,14,11,12,13, 8, 8, 9,11, 8, 9,11, 9, - 9,11,12, 9,11,12,11,11,12,14,11,12,14, 8, 8, 9, - 11, 8,10,11, 8, 9,10,11, 9,10,11, 9,10,11,13,10, - 11,12,11,11,13,14,11,13,14, 8, 9,10,11, 9,10,11, - 9,10,11,13,10,11,13,11,11,13,14,11,13,15, 9,10, - 11,12, 9,11,12, 9,10,11,13,10,11,13,11,11,13,15, - 11,13,14,12,13,14,16,13,14,15, 9,10,11,13,10,11, - 13,11,11,12,14,11,13,14,12,13,14,15,13,14,16,11, - 11,12,15,11,12,14,11,12,13,14,11,13,15,12,13,14, - 16,13,14,16,14,15,15,18,15,16,17,11,11,13,15,11, - 13,15,12,13,14,16,13,14,16,14,14,16,17,15,17,17, - 8, 8, 9,11, 8,10,11, 8, 9,10,11, 9,10,11, 9,10, - 11,13,10,11,13,11,11,13,15,11,13,15, 8, 9,10,11, - 9,10,11, 9,10,11,13,10,11,12,11,12,13,14,11,12, - 14, 9, 9,11,12,10,11,12,10,10,11,13,10,11,13,11, - 11,13,14,11,13,14,12,13,14,15,13,14,15, 9,10,11, - 13,10,11,13,11,11,13,14,11,13,14,12,13,14,16,12, - 14,16,10,11,12,14,11,12,14,11,11,13,15,12,13,15, - 12,13,14,16,13,15,16,14,15,17,17,14,17,17,11,12, - 13,15,11,13,15,12,13,14,16,13,14,16,14,15,16,18, - 14,15,17, 9, 9,10,12, 9,10,12, 9, 9,11,12,10,11, - 12,10,11,12,14,11,12,13,12,12,14,15,12,14,16, 9, - 10,11,12,10,11,12,10,11,12,14,11,12,13,12,12,14, - 15,13,14,16, 9,10,11,12, 9,11,12,10,10,11,13,10, - 11,13,11,11,13,14,11,13,14,12,13,14,16,13,14,16, - 10,10,11,13,10,11,13,11,11,13,14,11,13,14,12,13, - 14,15,13,14,17,10,11,12,14,11,12,13,11,11,13,14, - 11,12,14,12,13,14,16,13,14,15,14,14,15,17,14,16, - 17,11,11,13,14,11,13,14,12,13,14,15,13,14,16,14, - 14,15,17,14,16,18,12,12,14,16,12,14,15,12,13,14, - 17,13,14,17,14,14,16,17,14,16,18,16,16,17,20,16, - 17,17,12,13,14,16,13,14,16,14,14,15,16,14,15,17, - 16,15,17,17,16,17,18, 9,10,11,12,10,11,12,10,10, - 11,13,10,11,13,11,11,13,14,11,13,14,12,13,14,16, - 13,14,16,10,10,11,13,10,11,13,11,11,13,14,11,13, - 14,13,13,14,17,13,14,16,10,11,12,14,11,12,14,11, - 11,13,14,11,13,14,12,13,14,15,13,14,16,14,15,15, - 17,14,15,16,11,11,13,14,11,13,14,12,13,14,16,13, - 14,16,13,14,16,17,14,15,17,12,12,14,16,12,14,15, - 12,13,14,16,13,14,16,14,14,15,17,15,16,17,16,17, - 18,19,17,18,18,13,13,14,16,12,14,16,13,14,15,17, - 14,15,17,15,16,17,17,16,17,17,10,11,12,14,10,12, - 14,10,11,12,14,11,12,14,12,12,14,16,12,14,15,14, - 14,16,18,14,15,17,11,11,13,14,11,12,14,12,12,14, - 16,13,14,15,14,14,16,17,14,16,17,11,11,12,14,11, - 12,14,11,11,13,15,11,13,15,12,13,15,16,13,14,16, - 14,15,16,18,15,16,18,11,11,13,15,11,13,15,13,13, - 14,16,13,14,16,14,15,17,17,15,18,18,12,12,14,15, - 12,14,16,12,13,14,16,13,14,16,13,15,16,17,14,16, - 17,16,16,18,20,16,17,20,12,13,14,16,13,14,16,14, - 14,15,18,15,15,17,16,16,18, 0,16,17,20,13,14,15, - 17,14,15,17,14,14,17,18,15,16,17,15,16,18, 0,16, - 17,19,17,18,20,20,18,20, 0,14,14,17,19,15,16,18, - 16,16,17,20,16,18,18,17,18,18,20,18, 0, 0,11,11, - 12,14,11,12,14,11,11,13,15,11,13,15,12,13,14,16, - 13,14,16,14,15,15,18,15,16,17,11,11,13,14,11,13, - 15,12,13,15,16,13,14,16,14,15,16,18,15,16,17,12, - 12,14,15,12,14,16,12,13,14,17,13,14,16,14,14,16, - 17,14,16,17,16,17,18,18,16,17, 0,12,13,14,16,13, - 14,16,13,14,16,19,14,15,17,16,16,20, 0,16,17,18, - 13,14,15,17,14,16,18,14,14,16,19,15,16,20,16,16, - 18,18,16,17,20,18,18, 0,20,18,18,20,14,15,16,18, - 15,16,18,15,16,17,20,16,17,19,17,17, 0,19,17,17, - 18, -}; - -static double _vq_quantthresh_res0_1024a_160_6[] = { - -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, -}; - -static long _vq_quantmap_res0_1024a_160_6[] = { - 6, 5, 4, 0, 1, 2, 3, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_160_6 = { - _vq_quantthresh_res0_1024a_160_6, - _vq_quantmap_res0_1024a_160_6, - 7, - 7 -}; - -static static_codebook _vq_book_res0_1024a_160_6 = { - 4, 2401, - _vq_lengthlist_res0_1024a_160_6, - 1, -533200896, 1611661312, 3, 0, - _vq_quantlist_res0_1024a_160_6, - NULL, - &_vq_auxt_res0_1024a_160_6, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_160_7.vqh b/include/vorbis/book/res0_1024a_160_7.vqh deleted file mode 100644 index c5b5a771..00000000 --- a/include/vorbis/book/res0_1024a_160_7.vqh +++ /dev/null @@ -1,75 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_160_7_VQH_ -#define _V_res0_1024a_160_7_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_160_7[] = { - 6, - 7, - 8, - 9, - 10, - 12, - 5, - 4, - 3, - 2, - 0, -}; - -static long _vq_lengthlist_res0_1024a_160_7[] = { - 2, 4, 5, 7, 7, 8, 4, 6, 7, 7, 8, 4, 5, 6, 8, 8, - 9, 5, 6, 8, 8, 9, 6, 7, 8, 9, 9,11, 7, 8, 9,10, - 11, 7, 8, 9,11,11,12, 8, 9,11,11,12, 7, 8,10,11, - 12,13, 8,10,11,12,13, 9,10,11,13,13,14,10,11,12, - 13,14, 4, 5, 6, 8, 8, 9, 5, 6, 8, 8, 9, 6, 7, 8, - 9, 9,11, 7, 8, 9,10,11, 7, 8, 9,11,11,12, 8, 9, - 11,11,12, 7, 8,10,11,12,13, 8,10,11,12,13, 9,10, - 11,13,13,14,10,11,12,13,14, -}; - -static double _vq_quantthresh_res0_1024a_160_7[] = { - -5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, - 3.5, 5, -}; - -static long _vq_quantmap_res0_1024a_160_7[] = { - 10, 9, 8, 7, 6, 0, 1, 2, - 3, 4, 5, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_160_7 = { - _vq_quantthresh_res0_1024a_160_7, - _vq_quantmap_res0_1024a_160_7, - 11, - 11 -}; - -static static_codebook _vq_book_res0_1024a_160_7 = { - 2, 121, - _vq_lengthlist_res0_1024a_160_7, - 1, -531103744, 1611661312, 4, 0, - _vq_quantlist_res0_1024a_160_7, - NULL, - &_vq_auxt_res0_1024a_160_7, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_160_8.vqh b/include/vorbis/book/res0_1024a_160_8.vqh deleted file mode 100644 index 219c4900..00000000 --- a/include/vorbis/book/res0_1024a_160_8.vqh +++ /dev/null @@ -1,86 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_160_8_VQH_ -#define _V_res0_1024a_160_8_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_160_8[] = { - 11, - 12, - 13, - 14, - 15, - 17, - 19, - 22, - 10, - 9, - 8, - 7, - 5, - 3, - 0, -}; - -static long _vq_lengthlist_res0_1024a_160_8[] = { - 3, 4, 6, 6, 7, 7, 7, 8, 4, 6, 6, 6, 7, 7, 8, 4, - 6, 7, 7, 8, 8, 8, 9, 5, 7, 7, 8, 8, 8, 9, 6, 7, - 8, 9, 9, 9, 9,10, 7, 8, 9, 9, 9, 9,10, 7, 8, 9, - 10,10,10,10,11, 8, 9,10,10,10,10,11, 7, 8, 9,10, - 10,10,10,11, 8, 9,10,10,10,10,11, 8, 9,10,10,10, - 10,11,11, 9,10,10,10,10,11,11, 8, 9,10,11,11,11, - 11,12, 9,10,11,11,11,11,12, 9,10,11,12,12,12,12, - 13,10,11,12,12,12,12,13, 4, 6, 7, 7, 8, 8, 8, 9, - 6, 7, 7, 8, 8, 8, 9, 6, 7, 8, 9, 9, 9, 9,10, 7, - 8, 9, 9, 9, 9,10, 7, 8, 9,10,10,10,10,11, 8, 9, - 10,10,10,10,11, 7, 8, 9,10,10,10,10,11, 8, 9,10, - 10,10,10,11, 8, 9,10,10,10,10,10,11, 9,10,10,10, - 10,11,11, 8, 9,10,11,11,11,11,12, 9,10,11,11,11, - 11,12, 9,10,11,12,12,12,12,13,10,11,12,12,12,12, - 13, -}; - -static double _vq_quantthresh_res0_1024a_160_8[] = { - -9.5, -7, -5, -3.5, -2.5, -1.5, -0.5, 0.5, - 1.5, 2.5, 3.5, 5, 7, 9.5, -}; - -static long _vq_quantmap_res0_1024a_160_8[] = { - 14, 13, 12, 11, 10, 9, 8, 0, - 1, 2, 3, 4, 5, 6, 7, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_160_8 = { - _vq_quantthresh_res0_1024a_160_8, - _vq_quantmap_res0_1024a_160_8, - 15, - 15 -}; - -static static_codebook _vq_book_res0_1024a_160_8 = { - 2, 225, - _vq_lengthlist_res0_1024a_160_8, - 1, -529137664, 1611661312, 5, 0, - _vq_quantlist_res0_1024a_160_8, - NULL, - &_vq_auxt_res0_1024a_160_8, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_160_9.vqh b/include/vorbis/book/res0_1024a_160_9.vqh deleted file mode 100644 index 745f2f64..00000000 --- a/include/vorbis/book/res0_1024a_160_9.vqh +++ /dev/null @@ -1,115 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_160_9_VQH_ -#define _V_res0_1024a_160_9_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_160_9[] = { - 45, - 46, - 47, - 48, - 49, - 51, - 53, - 56, - 61, - 68, - 77, - 90, - 44, - 43, - 42, - 41, - 39, - 37, - 34, - 29, - 22, - 13, - 0, -}; - -static long _vq_lengthlist_res0_1024a_160_9[] = { - 3, 4, 6, 6, 7, 7, 7, 8, 7,11,14,18, 5, 6, 6, 7, - 7, 7, 8, 7,11,15,18, 5, 6, 7, 8, 8, 8, 8, 9, 9, - 13,16,19, 6, 7, 8, 8, 8, 8, 9, 9,13,16,19, 6, 7, - 8, 9, 9, 9, 9,10,10,13,17, 0, 7, 8, 9, 8, 9, 9, - 10,10,13,16, 0, 7, 8, 9, 9, 9, 9,10,10,11,15,17, - 0, 8, 9, 9, 9, 9,10,10,11,14,19, 0, 7, 8, 9, 9, - 9, 9,10,10,11,15,17, 0, 8, 9, 9, 9, 9,10,10,11, - 15,17,19, 7, 8, 9,10,10,10,10,11,11,15,19,19, 8, - 9,10,10,10,10,11,11,16,18, 0, 8, 9,10,10,10,10, - 11,11,12,16,18, 0, 9,10,10,10,10,11,11,12,16,19, - 18, 8, 9,10,11,11,11,11,12,12,16,19, 0, 9,10,11, - 11,11,11,12,12,15,19,19, 8,10,11,11,11,11,12,12, - 14,18, 0, 0,10,11,11,11,12,12,12,14,17,19, 0,11, - 13,15,16,15,15,16,16,17, 0, 0, 0,14,15,15,15,15, - 16,17,17, 0, 0, 0,15,18, 0,19,19, 0, 0, 0, 0, 0, - 0, 0,18, 0,19,19, 0, 0, 0, 0, 0, 0, 0,18, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 5, 6, 7, 8, 8, 8, 8, 9, 9,12,15,19, - 6, 7, 8, 8, 8, 8, 9, 9,13,17, 0, 6, 7, 8, 9, 9, - 9, 9,10,10,13,16,19, 7, 8, 9, 9, 9, 9,10,10,13, - 18, 0, 7, 8, 9, 9, 9, 9,10,10,11,14,16,19, 8, 9, - 9, 9, 9,10,10,11,14,17, 0, 7, 8, 9, 9, 9, 9,10, - 10,11,14,16, 0, 8, 9, 9, 9, 9,10,10,11,15,19, 0, - 7, 8, 9,10,10,10,10,11,11,15,19,19, 8, 9,10,10, - 10,10,11,11,16,18, 0, 8, 9,10,10,10,10,11,11,12, - 16,18,18, 9,10,10,10,10,11,11,12,16,18, 0, 8, 9, - 10,11,11,11,11,12,12,16,19,19, 9,10,11,11,11,11, - 12,12,16,17,18, 8,10,11,12,11,11,12,12,14,18, 0, - 0,10,11,11,11,11,12,12,14,18, 0, 0,11,13,15,16, - 15,16,16,16,18, 0, 0, 0,13,15,15,15,15,16,16,17, - 0, 0, 0,15,18, 0, 0,18, 0, 0, 0, 0, 0, 0, 0,19, - 18, 0,19, 0, 0, 0, 0, 0, 0, 0,17, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,19, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -}; - -static double _vq_quantthresh_res0_1024a_160_9[] = { - -38.5, -27.5, -19.5, -13.5, -9.5, -7, -5, -3.5, - -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 5, - 7, 9.5, 13.5, 19.5, 27.5, 38.5, -}; - -static long _vq_quantmap_res0_1024a_160_9[] = { - 22, 21, 20, 19, 18, 17, 16, 15, - 14, 13, 12, 0, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_160_9 = { - _vq_quantthresh_res0_1024a_160_9, - _vq_quantmap_res0_1024a_160_9, - 23, - 23 -}; - -static static_codebook _vq_book_res0_1024a_160_9 = { - 2, 529, - _vq_lengthlist_res0_1024a_160_9, - 1, -524910592, 1611661312, 7, 0, - _vq_quantlist_res0_1024a_160_9, - NULL, - &_vq_auxt_res0_1024a_160_9, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_192_1.vqh b/include/vorbis/book/res0_1024a_192_1.vqh deleted file mode 100644 index 5a32ba99..00000000 --- a/include/vorbis/book/res0_1024a_192_1.vqh +++ /dev/null @@ -1,63 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_192_1_VQH_ -#define _V_res0_1024a_192_1_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_192_1[] = { - 1, - 2, - 0, -}; - -static long _vq_lengthlist_res0_1024a_192_1[] = { - 1, 4, 5, 5, 7, 7, 5, 7, 7, 5, 7, 7, 7, 9, 9, 7, - 9, 9, 5, 7, 7, 7, 9, 9, 8, 9, 9, 5, 7, 7, 7, 9, - 9, 8, 9, 9, 8, 9, 9, 9,11,11, 9,11,11, 8, 9, 9, - 9,11,11,10,11,11, 5, 7, 7, 8, 9, 9, 8, 9, 9, 8, - 9,10,10,11,11,10,11,11, 8,10,10,10,11,11,10,11, - 11, -}; - -static double _vq_quantthresh_res0_1024a_192_1[] = { - -0.5, 0.5, -}; - -static long _vq_quantmap_res0_1024a_192_1[] = { - 2, 0, 1, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_192_1 = { - _vq_quantthresh_res0_1024a_192_1, - _vq_quantmap_res0_1024a_192_1, - 3, - 3 -}; - -static static_codebook _vq_book_res0_1024a_192_1 = { - 4, 81, - _vq_lengthlist_res0_1024a_192_1, - 1, -535822336, 1611661312, 2, 0, - _vq_quantlist_res0_1024a_192_1, - NULL, - &_vq_auxt_res0_1024a_192_1, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_192_2.vqh b/include/vorbis/book/res0_1024a_192_2.vqh deleted file mode 100644 index d97f1d54..00000000 --- a/include/vorbis/book/res0_1024a_192_2.vqh +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_192_2_VQH_ -#define _V_res0_1024a_192_2_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_192_2[] = { - 2, - 3, - 4, - 1, - 0, -}; - -static long _vq_lengthlist_res0_1024a_192_2[] = { - 4, 5, 7, 5, 7, 5, 6, 9, 6, 9, 7, 9,11, 9,11, 5, - 6, 9, 7, 9, 7, 9,11, 9,11, 5, 7, 9, 7, 9, 7, 8, - 10, 8,10, 9,10,12,10,12, 7, 8,10, 8,10, 9,10,12, - 10,12, 8, 9,11, 9,11, 9,10,12,10,12,11,12,14,12, - 14, 9,10,12,10,12,11,12,14,12,14, 5, 7, 9, 7, 9, - 7, 8,10, 8,10, 9,10,12,10,12, 7, 8,10, 8,10, 9, - 10,12,10,12, 8, 9,11, 9,11, 9,10,12,10,12,11,12, - 14,12,14, 9,10,12,10,12,11,12,14,12,14, 5, 7, 9, - 7, 9, 7, 8,10, 8,10, 9,10,12,10,12, 7, 8,10, 8, - 10, 9,10,12,10,12, 7, 8,10, 8,10, 8, 8,11, 9,11, - 10,11,12,11,13, 8, 9,11, 9,11,10,11,12,11,13, 9, - 10,12,10,12,10,11,13,11,13,12,13,14,13,15,10,11, - 13,11,13,12,13,14,13,15, 7, 8,10, 8,10, 8, 9,11, - 9,11,10,11,13,11,12, 8, 9,11, 9,11,10,11,13,11, - 13, 9,10,12,10,12,10,11,13,11,13,12,13,15,13,14, - 10,11,13,11,13,12,13,15,13,14, 8, 9,11, 9,11, 9, - 10,12,10,12,11,12,14,12,14, 9,10,12,10,12,11,12, - 14,12,14, 9,10,12,10,12,10,11,13,11,13,12,13,15, - 13,15,10,11,13,11,13,12,13,15,13,14,11,12,14,12, - 14,12,12,14,13,15,14,14,14,14,16,12,13,14,13,14, - 14,15,16,14,17, 9,10,12,10,12,10,11,13,11,13,12, - 13,15,13,14,10,11,13,11,13,12,13,14,13,15,11,12, - 14,12,14,12,13,15,13,15,14,15,16,14,16,12,13,15, - 13,15,14,14,16,14,16, 5, 7, 9, 7, 9, 7, 8,10, 8, - 10, 9,10,12,10,12, 7, 8,10, 8,10, 9,10,12,10,12, - 7, 8,10, 8,10, 8, 9,11, 9,11,10,11,13,11,13, 8, - 9,11, 9,11,10,11,13,11,13, 9,10,12,10,12,10,11, - 13,11,13,12,13,15,13,14,10,11,13,11,13,12,13,14, - 13,15, 7, 8,10, 8,10, 8, 9,11, 9,11,10,11,13,11, - 13, 8, 9,11, 9,11,10,11,13,11,12, 9,10,12,10,12, - 10,11,13,11,13,12,13,15,13,14,10,11,13,11,13,12, - 13,15,13,14, 8, 9,11, 9,11, 9,10,12,10,12,11,12, - 14,12,14, 9,10,12,10,12,11,12,14,12,14, 9,10,12, - 10,12,10,11,13,11,13,12,13,15,13,14,10,11,13,11, - 13,12,13,15,13,15,11,12,14,12,14,12,13,15,13,15, - 14,15,16,15,16,12,13,14,13,15,14,14,15,14,17, 9, - 10,12,10,12,10,11,13,11,13,12,13,14,13,15,10,11, - 13,11,13,12,13,14,13,14,11,12,14,12,14,12,13,15, - 13,14,14,14,16,15,16,12,13,14,13,14,14,14,16,14, - 14, -}; - -static double _vq_quantthresh_res0_1024a_192_2[] = { - -1.5, -0.5, 0.5, 1.5, -}; - -static long _vq_quantmap_res0_1024a_192_2[] = { - 4, 3, 0, 1, 2, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_192_2 = { - _vq_quantthresh_res0_1024a_192_2, - _vq_quantmap_res0_1024a_192_2, - 5, - 5 -}; - -static static_codebook _vq_book_res0_1024a_192_2 = { - 4, 625, - _vq_lengthlist_res0_1024a_192_2, - 1, -533725184, 1611661312, 3, 0, - _vq_quantlist_res0_1024a_192_2, - NULL, - &_vq_auxt_res0_1024a_192_2, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_192_3.vqh b/include/vorbis/book/res0_1024a_192_3.vqh deleted file mode 100644 index e6adea7b..00000000 --- a/include/vorbis/book/res0_1024a_192_3.vqh +++ /dev/null @@ -1,212 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_192_3_VQH_ -#define _V_res0_1024a_192_3_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_192_3[] = { - 3, - 4, - 5, - 6, - 2, - 1, - 0, -}; - -static long _vq_lengthlist_res0_1024a_192_3[] = { - 5, 6, 8, 9, 6, 8, 9, 6, 7, 9,10, 7, 9,10, 8, 9, - 11,12, 9,11,12, 9,10,12,13,10,12,14, 6, 7, 9,10, - 7, 9,10, 8, 9,11,12, 9,11,12, 9,10,12,14,10,12, - 14, 6, 7, 9,10, 8, 9,10, 8, 8,10,11, 8,10,11, 9, - 10,11,12,10,11,12,10,11,12,14,11,13,14, 8, 8,10, - 11, 8,10,11, 9,10,11,12,10,11,12,10,11,12,14,11, - 13,14, 8, 9,11,12, 9,11,12, 9,10,11,12,10,11,13, - 11,11,12,14,11,13,14,12,13,14,15,13,14,16, 9,10, - 11,12,10,11,13,11,11,12,14,11,13,14,12,12,14,15, - 13,14,15, 9,10,12,13,10,12,13,10,11,13,14,11,13, - 14,12,13,14,16,13,14,16,14,14,15,16,15,16,18,10, - 11,13,15,11,13,15,12,13,14,16,13,14,16,14,15,15, - 17,15,15,17, 6, 8, 9,10, 8, 9,10, 8, 8,10,11, 8, - 10,11, 9,10,11,12,10,11,12,10,11,13,14,11,12,14, - 8, 8,10,11, 8,10,11, 9,10,11,12,10,11,12,10,11, - 12,14,11,12,14, 8, 9,11,12, 9,11,12, 9,10,11,13, - 10,11,13,11,11,13,14,11,13,14,12,13,14,15,12,14, - 15, 9,10,11,13,10,11,12,11,11,12,14,11,12,14,12, - 13,14,15,13,14,15, 9,10,12,13,10,12,13,10,11,13, - 14,11,13,14,12,13,14,16,13,14,15,14,15,16,17,14, - 15,17,10,11,13,14,11,13,14,12,13,14,16,13,14,15, - 14,15,16,17,14,15,17, 6, 8, 9,10, 8, 9,10, 8, 8, - 10,11, 8,10,11, 9,10,11,13,10,11,13,10,11,13,15, - 11,12,14, 8, 8,10,11, 8,10,11, 9,10,11,12,10,11, - 13,10,11,12,14,11,13,14, 8, 8,10,11, 8,10,11, 8, - 9,10,12, 9,10,12,10,10,12,13,11,12,13,11,12,13, - 15,12,13,15, 8, 9,10,12, 9,10,12,10,10,12,13,10, - 12,13,11,12,13,15,12,13,15, 9,10,11,13,10,11,12, - 10,10,12,13,11,12,13,11,12,13,14,12,13,14,13,13, - 14,15,13,15,16,10,10,12,13,11,12,13,11,12,13,14, - 12,13,14,13,13,14,16,13,14,16,10,11,13,14,11,13, - 14,11,12,13,15,12,13,15,13,13,14,16,13,14,15,14, - 15,16,17,15,16,17,11,12,13,15,12,13,15,13,13,15, - 16,13,14,16,15,15,16,17,15,16,17, 8, 8,10,11, 8, - 10,11, 8, 9,10,12, 9,10,12,10,10,12,13,10,12,13, - 11,12,13,15,12,13,15, 8, 9,10,12, 9,10,12,10,11, - 12,13,11,12,13,11,12,13,15,12,13,15, 9,10,11,13, - 10,11,13,10,10,12,13,10,12,13,11,12,13,14,12,13, - 14,13,13,14,16,13,14,15,10,11,12,13,11,12,13,11, - 12,13,14,12,13,14,13,13,14,16,13,15,16,10,11,13, - 14,11,13,14,11,12,13,15,12,13,15,13,13,14,16,13, - 14,16,15,15,16,17,15,16,17,11,12,13,15,12,13,15, - 13,13,14,16,13,15,16,14,15,16,17,15,16,17, 8, 9, - 11,12, 9,11,12, 9,10,11,12,10,11,13,11,11,13,14, - 11,13,14,12,13,14,16,13,14,16, 9,10,11,13,10,11, - 13,11,11,13,14,11,13,14,12,13,14,15,13,14,16, 9, - 10,11,13,10,11,13,10,11,12,13,10,12,13,11,12,13, - 14,12,13,14,13,13,15,16,13,15,16,10,11,12,13,11, - 12,13,11,12,13,14,12,13,14,13,13,14,16,13,14,16, - 11,11,13,14,11,13,14,11,12,13,14,12,13,15,13,13, - 14,15,13,14,16,14,14,15,17,14,16,17,11,12,13,14, - 12,13,15,13,13,14,15,13,14,15,14,15,16,17,14,15, - 17,12,13,14,16,13,14,15,13,13,14,16,13,14,16,14, - 14,15,17,14,15,17,15,16,17,18,16,18,19,13,13,15, - 16,13,15,16,14,15,16,18,15,16,17,16,16,17,20,16, - 17,18, 9,10,11,13,10,11,13,10,11,12,13,10,12,13, - 11,12,13,15,12,13,14,13,13,15,16,13,14,16,10,10, - 12,13,11,12,13,11,12,13,14,12,13,15,13,13,14,16, - 13,15,16,11,11,12,14,11,13,14,11,12,13,14,12,13, - 14,13,13,14,15,13,14,15,14,14,16,17,14,15,16,11, - 12,13,14,12,13,14,13,13,14,15,13,14,15,14,15,15, - 17,15,15,17,12,13,14,16,13,14,16,13,13,14,16,13, - 14,16,13,14,15,17,14,15,16,15,16,17,19,16,16,18, - 13,13,14,16,13,15,16,14,14,15,17,15,16,18,16,16, - 17,18,16,18,19, 9,10,12,14,11,12,14,10,11,13,15, - 11,13,15,12,13,14,16,13,14,16,14,15,16,17,15,16, - 17,10,11,13,14,11,13,15,12,13,14,16,13,14,15,14, - 14,16,17,15,15,18,10,11,13,14,11,13,14,11,12,13, - 15,12,13,15,13,13,14,16,13,14,16,15,15,16,17,15, - 16,17,11,12,13,15,12,13,15,13,13,15,16,13,14,16, - 15,15,16,17,15,17,17,12,13,14,15,13,14,16,13,13, - 15,16,13,15,16,14,14,15,17,15,16,17,16,17,17,19, - 16,17,18,13,13,14,16,13,14,16,14,14,16,18,14,15, - 17,16,16,17,20,16,18,18,14,15,16,17,15,16,17,14, - 15,17,18,15,16,18,15,16,16,18,16,17,19,17,17,17, - 18,17,18, 0,14,15,16,18,15,16,18,16,16,17,19,16, - 17,18,17,18,19,21,18,20,19,10,11,13,14,11,13,14, - 11,12,13,15,12,13,15,13,13,14,16,13,14,16,14,15, - 16,17,15,17,19,11,12,13,15,12,13,15,13,13,14,16, - 14,14,16,15,15,16,18,15,16,18,12,13,14,15,13,14, - 16,12,13,14,16,13,14,16,14,14,15,18,14,15,18,16, - 16,16,18,16,17,18,13,13,14,16,13,15,16,14,14,16, - 17,15,16,17,16,16,17,18,16,17,19,14,15,16,17,15, - 16,18,14,15,16,19,15,16,18,15,16,17,20,16,17,17, - 17,17,19,20,18,17,19,15,15,16,18,15,16,18,16,16, - 17,18,16,17,18,18,17,19,20,17,18,19, 7, 8, 9,10, - 8, 9,10, 8, 8,10,11, 8,10,11, 9,10,11,12,10,11, - 13,10,11,13,14,11,13,14, 8, 8,10,11, 8,10,11, 9, - 10,11,13,10,11,13,10,11,13,14,11,13,14, 8, 8,10, - 11, 8,10,11, 8, 9,10,12, 9,10,12,10,10,12,13,10, - 12,13,11,12,13,15,12,13,15, 8, 9,10,12, 9,10,12, - 10,10,12,13,11,12,13,11,12,13,15,12,13,15, 9,10, - 11,13,10,11,13,10,11,12,13,10,12,13,11,12,13,14, - 12,13,14,13,13,14,16,13,14,16,10,10,12,13,11,12, - 13,11,12,13,14,12,13,14,13,13,14,15,13,14,16,10, - 11,13,14,11,13,14,11,12,13,15,12,13,15,13,13,15, - 16,13,15,16,15,15,16,17,15,16,18,11,12,13,15,12, - 13,15,13,13,14,15,13,14,16,15,15,16,17,15,16,18, - 8, 8,10,11, 8,10,11, 8, 9,10,12, 9,11,12,10,11, - 12,13,10,12,13,11,12,13,14,12,13,15, 8, 9,11,12, - 9,10,12,10,11,12,13,10,12,13,11,12,13,15,12,13, - 15, 9,10,11,13,10,11,13,10,10,12,13,11,12,13,11, - 12,13,14,12,13,14,13,13,14,16,13,14,16,10,11,12, - 13,11,12,13,11,12,13,14,12,13,14,13,13,14,16,13, - 14,16,10,11,13,15,11,13,14,11,12,13,15,12,13,15, - 13,13,14,16,13,15,16,15,15,16,18,15,16,17,11,12, - 13,15,12,13,15,13,13,15,16,13,14,16,14,15,16,17, - 15,16,17, 8, 9,11,12, 9,11,12, 9,10,11,13,10,11, - 13,11,11,12,14,11,12,14,12,13,14,15,13,14,15, 9, - 10,11,13,10,11,13,11,11,13,14,11,13,14,12,13,14, - 15,13,14,16, 9,10,11,13,10,11,13,10,11,12,13,11, - 12,13,11,12,13,14,12,13,14,13,13,14,16,13,14,16, - 10,11,12,13,11,12,13,11,12,13,14,12,13,15,13,13, - 14,16,13,14,16,11,11,13,14,11,13,14,11,12,13,15, - 12,13,14,13,13,14,16,13,14,15,14,14,16,17,14,15, - 17,11,12,13,14,12,13,14,13,13,14,16,13,14,16,14, - 14,15,16,14,16,17,12,13,14,16,13,14,16,13,13,14, - 16,13,15,16,14,14,16,17,15,16,17,16,16,17,18,16, - 17,19,13,13,14,16,13,15,16,14,14,15,17,14,16,17, - 15,16,16,17,16,17,19, 9,10,11,13,10,11,13,10,10, - 12,13,11,12,13,11,12,13,14,12,13,14,13,13,14,16, - 13,14,16,10,11,12,13,11,12,13,11,12,13,14,12,13, - 14,13,13,14,16,13,14,16,11,11,13,14,11,13,14,11, - 12,13,14,12,13,14,13,13,14,15,13,14,16,14,15,16, - 17,14,16,17,11,12,13,14,12,13,15,13,13,14,15,13, - 14,15,14,15,16,17,14,16,16,12,13,14,16,13,14,16, - 13,13,14,16,13,15,16,14,14,15,17,15,15,17,16,16, - 17,18,16,17,19,13,13,14,16,13,14,16,14,15,15,17, - 14,15,17,16,16,17,19,16,16,17, 9,10,12,14,10,12, - 14,10,11,13,14,11,13,14,12,13,14,16,13,14,16,14, - 15,16,17,15,16,17,10,11,13,15,11,13,15,12,13,14, - 16,13,14,16,14,15,16,17,15,16,18,10,11,13,14,11, - 13,14,11,12,13,15,12,13,15,13,13,14,16,13,15,16, - 15,15,17,18,15,16,18,11,12,13,15,12,13,15,13,13, - 14,16,14,15,17,15,15,16,17,15,16,17,12,13,14,16, - 13,14,16,13,13,15,16,13,15,16,14,15,15,17,14,15, - 17,16,16,17,18,16,17,18,12,13,14,16,13,15,16,14, - 14,15,17,14,16,17,16,16,16,17,16,18,19,14,15,16, - 17,15,16,17,15,15,16,17,15,16,17,16,16,17,19,16, - 17,18,18,17,18,19,17,19,20,14,15,16,18,15,16,18, - 15,15,17,18,16,17,18,17,17,17,19,18,19,20,10,11, - 13,14,11,13,15,11,12,13,15,12,13,15,13,13,14,16, - 13,15,16,15,15,17,18,15,16,17,11,12,13,15,12,13, - 15,13,13,15,16,13,15,16,14,15,16,17,15,16,17,12, - 13,14,16,13,14,16,13,13,14,16,13,15,17,14,15,16, - 17,14,16,17,16,16,17,21,16,17,20,13,13,15,16,13, - 14,16,14,15,16,17,14,15,17,16,17,18,19,16,17,18, - 14,15,16,18,15,16,17,14,15,16,17,15,16,18,16,16, - 17,18,16,17,18,17,19,18,20,18,18,20,15,15,17,18, - 15,16,18,16,16,17,18,16,16,18,17,17,19,19,17,18, - 19, -}; - -static double _vq_quantthresh_res0_1024a_192_3[] = { - -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, -}; - -static long _vq_quantmap_res0_1024a_192_3[] = { - 6, 5, 4, 0, 1, 2, 3, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_192_3 = { - _vq_quantthresh_res0_1024a_192_3, - _vq_quantmap_res0_1024a_192_3, - 7, - 7 -}; - -static static_codebook _vq_book_res0_1024a_192_3 = { - 4, 2401, - _vq_lengthlist_res0_1024a_192_3, - 1, -533200896, 1611661312, 3, 0, - _vq_quantlist_res0_1024a_192_3, - NULL, - &_vq_auxt_res0_1024a_192_3, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_192_4.vqh b/include/vorbis/book/res0_1024a_192_4.vqh deleted file mode 100644 index 9c8472b8..00000000 --- a/include/vorbis/book/res0_1024a_192_4.vqh +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_192_4_VQH_ -#define _V_res0_1024a_192_4_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_192_4[] = { - 4, - 5, - 6, - 7, - 8, - 3, - 2, - 1, - 0, -}; - -static long _vq_lengthlist_res0_1024a_192_4[] = { - 3, 4, 5, 7, 7, 4, 5, 7, 7, 4, 5, 6, 7, 8, 5, 6, - 7, 8, 5, 6, 7, 8, 9, 6, 7, 8, 9, 7, 7, 8,10,10, - 7, 8,10,10, 7, 8, 9,10,11, 8, 9,10,11, 4, 5, 6, - 7, 8, 5, 6, 7, 8, 5, 6, 7, 8, 9, 6, 7, 8, 9, 7, - 7, 8, 9,10, 7, 8, 9,10, 7, 8, 9,10,11, 8, 9,10, - 11, -}; - -static double _vq_quantthresh_res0_1024a_192_4[] = { - -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, -}; - -static long _vq_quantmap_res0_1024a_192_4[] = { - 8, 7, 6, 5, 0, 1, 2, 3, - 4, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_192_4 = { - _vq_quantthresh_res0_1024a_192_4, - _vq_quantmap_res0_1024a_192_4, - 9, - 9 -}; - -static static_codebook _vq_book_res0_1024a_192_4 = { - 2, 81, - _vq_lengthlist_res0_1024a_192_4, - 1, -531628032, 1611661312, 4, 0, - _vq_quantlist_res0_1024a_192_4, - NULL, - &_vq_auxt_res0_1024a_192_4, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_192_5.vqh b/include/vorbis/book/res0_1024a_192_5.vqh deleted file mode 100644 index ba12a3d5..00000000 --- a/include/vorbis/book/res0_1024a_192_5.vqh +++ /dev/null @@ -1,115 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_192_5_VQH_ -#define _V_res0_1024a_192_5_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_192_5[] = { - 45, - 46, - 47, - 48, - 49, - 51, - 53, - 56, - 61, - 68, - 77, - 90, - 44, - 43, - 42, - 41, - 39, - 37, - 34, - 29, - 22, - 13, - 0, -}; - -static long _vq_lengthlist_res0_1024a_192_5[] = { - 3, 5, 6, 7, 7, 7, 8, 9,11,14,18,22, 5, 6, 7, 7, - 7, 8, 9,11,14,18, 0, 5, 6, 6, 7, 7, 8, 9,10,12, - 16,19,24, 6, 6, 7, 7, 8, 9,10,12,16,20,24, 6, 6, - 7, 8, 8, 9,10,11,13,17,20, 0, 6, 7, 8, 8, 9,10, - 11,13,17,20, 0, 7, 7, 8, 9, 9, 9,10,11,14,18,20, - 0, 7, 8, 9, 9, 9,10,11,14,17,21, 0, 7, 8, 8, 9, - 9, 9,10,11,14,18,23, 0, 8, 8, 9, 9, 9,10,11,14, - 18,21, 0, 7, 8, 9, 9,10,10,11,12,14,19, 0, 0, 8, - 9, 9,10,10,11,12,14,18,21, 0, 8, 9,10,11,11,11, - 11,12,14,18, 0,22, 9,10,11,11,11,11,12,14,18,22, - 0, 9,10,11,12,12,12,12,13,15,19,21,21,10,11,12, - 12,12,12,13,15,19,22,23,11,12,13,14,14,14,15,15, - 17,19, 0, 0,13,14,14,14,14,15,15,17,19, 0, 0,14, - 16,18,18,18,19,19,19,19, 0, 0, 0,17,17,18,18,18, - 19,19,20, 0, 0, 0,18,20,22,23, 0,23,23, 0, 0, 0, - 0, 0,22,22, 0, 0, 0,23,23, 0, 0, 0, 0,20, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 5, 6, 6, 7, 7, 8, 9,10,12,15,20,21, - 6, 6, 7, 7, 8, 9,10,12,16,19, 0, 6, 6, 7, 8, 8, - 9,10,11,13,17,19,21, 6, 7, 8, 8, 9,10,11,13,17, - 20,23, 7, 7, 8, 9, 9, 9,10,11,14,17,20,23, 7, 8, - 9, 9, 9,10,11,14,17,21, 0, 7, 8, 8, 9, 9, 9,10, - 11,14,17,20,22, 8, 8, 9, 9, 9,10,11,14,18, 0, 0, - 7, 8, 9, 9,10,10,11,12,14,19,21, 0, 8, 9, 9,10, - 10,11,12,14,18,22, 0, 8, 9,10,11,11,11,11,12,14, - 18,22,23, 9,10,11,11,11,11,12,14,19,22, 0, 9,10, - 11,12,12,12,12,13,15,18,21,23,10,11,12,12,12,12, - 13,15,19,22,23,11,12,14,14,14,14,15,15,17,20, 0, - 0,12,14,14,14,14,14,15,17,20,23, 0,14,16,18,19, - 18,18,19,19,20, 0, 0, 0,16,18,19,18,18,19,19,21, - 0, 0, 0,18, 0,23, 0,23, 0, 0, 0, 0, 0, 0, 0,21, - 0, 0, 0,22,22, 0, 0, 0, 0, 0,21, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -}; - -static double _vq_quantthresh_res0_1024a_192_5[] = { - -38.5, -27.5, -19.5, -13.5, -9.5, -7, -5, -3.5, - -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 5, - 7, 9.5, 13.5, 19.5, 27.5, 38.5, -}; - -static long _vq_quantmap_res0_1024a_192_5[] = { - 22, 21, 20, 19, 18, 17, 16, 15, - 14, 13, 12, 0, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_192_5 = { - _vq_quantthresh_res0_1024a_192_5, - _vq_quantmap_res0_1024a_192_5, - 23, - 23 -}; - -static static_codebook _vq_book_res0_1024a_192_5 = { - 2, 529, - _vq_lengthlist_res0_1024a_192_5, - 1, -524910592, 1611661312, 7, 0, - _vq_quantlist_res0_1024a_192_5, - NULL, - &_vq_auxt_res0_1024a_192_5, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_256_1.vqh b/include/vorbis/book/res0_1024a_256_1.vqh deleted file mode 100644 index 5b07388a..00000000 --- a/include/vorbis/book/res0_1024a_256_1.vqh +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_256_1_VQH_ -#define _V_res0_1024a_256_1_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_256_1[] = { - 2, - 3, - 4, - 1, - 0, -}; - -static long _vq_lengthlist_res0_1024a_256_1[] = { - 2, 4, 8, 4, 8, 5, 7,10, 7,10, 9,10,12,10,12, 5, - 7,10, 7,10, 9,10,12,10,12, 5, 7,10, 7,10, 7, 8, - 11, 8,11,10,11,13,11,13, 7, 8,11, 8,11,10,11,13, - 11,13, 9,10,13,10,13,10,11,13,11,13,13,14,15,14, - 15,11,11,13,11,13,13,13,15,13,15, 5, 7,10, 7,10, - 7, 8,11, 8,11,10,11,13,11,13, 7, 8,11, 8,11,10, - 11,13,11,13, 9,10,12,10,13,10,11,13,11,13,13,14, - 15,14,15,11,11,13,11,13,13,14,15,13,15, 5, 7,10, - 7,10, 7, 8,11, 8,11,10,11,13,11,13, 7, 8,11, 8, - 11,10,11,13,11,13, 7, 8,11, 8,11, 9,10,12,10,12, - 11,12,14,12,14, 9,10,12,10,12,11,12,14,12,14,10, - 11,14,11,14,11,12,14,12,14,13,14,16,14,16,11,12, - 14,12,14,14,14,16,14,16, 7, 9,11, 9,11, 9,10,12, - 10,12,11,12,14,12,14, 9,10,12,10,12,11,12,14,12, - 14,11,12,13,11,14,11,12,14,12,14,14,14,16,14,15, - 12,12,14,12,14,14,14,16,14,16, 9,11,13,11,13,11, - 12,14,11,14,13,14,16,14,15,10,11,13,12,14,13,14, - 15,14,15,10,12,14,11,14,11,12,14,12,14,14,14,16, - 14,16,12,12,14,12,14,14,14,16,14,16,13,14,16,14, - 15,14,14,16,14,16,15,16,15,16,17,14,14,16,14,16, - 16,16,18,16,17,11,12,13,12,14,12,12,14,12,14,14, - 14,16,14,16,12,12,14,12,14,14,14,16,14,16,13,14, - 15,14,16,14,14,16,14,16,15,16,18,16,17,14,14,16, - 14,16,15,17,18,16,18, 5, 7,10, 7,10, 7, 8,11, 8, - 11,10,11,13,11,13, 7, 8,11, 8,11,10,11,13,11,13, - 7, 9,11, 9,11, 9,10,12,10,12,11,12,14,12,14, 9, - 10,12,10,12,12,12,14,12,14,10,11,13,11,14,11,12, - 14,12,14,14,14,16,14,16,11,12,14,12,14,14,14,15, - 14,16, 7, 9,11, 9,11, 9,10,12,10,12,12,12,14,12, - 14, 9,10,12,10,12,11,12,14,12,14,11,11,13,12,14, - 12,12,14,12,14,14,14,16,15,16,11,12,14,12,14,13, - 14,16,14,15, 9,11,13,11,13,11,11,14,11,14,13,13, - 15,14,15,11,11,14,12,14,13,14,15,14,15,11,12,14, - 12,14,11,12,14,12,14,14,14,16,15,16,12,12,14,12, - 14,14,14,16,14,16,13,14,15,14,16,14,14,16,15,16, - 15,16,18,16,17,14,14,16,14,16,16,15,17,16,18,10, - 11,14,12,14,12,12,14,12,14,14,14,16,15,16,12,12, - 14,12,14,14,14,16,14,16,13,14,16,14,15,14,15,16, - 15,16,16,16,17,16,17,13,14,16,14,16,16,16,17,15, - 16, -}; - -static double _vq_quantthresh_res0_1024a_256_1[] = { - -1.5, -0.5, 0.5, 1.5, -}; - -static long _vq_quantmap_res0_1024a_256_1[] = { - 4, 3, 0, 1, 2, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_256_1 = { - _vq_quantthresh_res0_1024a_256_1, - _vq_quantmap_res0_1024a_256_1, - 5, - 5 -}; - -static static_codebook _vq_book_res0_1024a_256_1 = { - 4, 625, - _vq_lengthlist_res0_1024a_256_1, - 1, -533725184, 1611661312, 3, 0, - _vq_quantlist_res0_1024a_256_1, - NULL, - &_vq_auxt_res0_1024a_256_1, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_256_2.vqh b/include/vorbis/book/res0_1024a_256_2.vqh deleted file mode 100644 index 9fd433c5..00000000 --- a/include/vorbis/book/res0_1024a_256_2.vqh +++ /dev/null @@ -1,75 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_256_2_VQH_ -#define _V_res0_1024a_256_2_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_256_2[] = { - 6, - 7, - 8, - 9, - 10, - 12, - 5, - 4, - 3, - 2, - 0, -}; - -static long _vq_lengthlist_res0_1024a_256_2[] = { - 3, 4, 6, 7, 7, 9, 4, 6, 7, 7, 9, 4, 5, 6, 7, 8, - 9, 5, 6, 7, 8, 9, 6, 6, 7, 8, 8,10, 6, 7, 8, 8, - 10, 7, 7, 8, 9, 9,10, 7, 8, 9, 9,10, 8, 8, 8, 9, - 9,10, 8, 9, 9,10,10, 9, 9,10,10,11,11, 9,10,10, - 11,11, 4, 5, 6, 7, 8, 9, 5, 6, 7, 8, 9, 6, 6, 7, - 8, 8,10, 6, 7, 8, 8,10, 7, 7, 8, 9, 9,10, 7, 8, - 9, 9,10, 8, 8, 9, 9, 9,10, 8, 9, 9,10,10, 9, 9, - 10,10,11,11, 9,10,10,11,11, -}; - -static double _vq_quantthresh_res0_1024a_256_2[] = { - -5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, - 3.5, 5, -}; - -static long _vq_quantmap_res0_1024a_256_2[] = { - 10, 9, 8, 7, 6, 0, 1, 2, - 3, 4, 5, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_256_2 = { - _vq_quantthresh_res0_1024a_256_2, - _vq_quantmap_res0_1024a_256_2, - 11, - 11 -}; - -static static_codebook _vq_book_res0_1024a_256_2 = { - 2, 121, - _vq_lengthlist_res0_1024a_256_2, - 1, -531103744, 1611661312, 4, 0, - _vq_quantlist_res0_1024a_256_2, - NULL, - &_vq_auxt_res0_1024a_256_2, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_256_3.vqh b/include/vorbis/book/res0_1024a_256_3.vqh deleted file mode 100644 index 589b87b9..00000000 --- a/include/vorbis/book/res0_1024a_256_3.vqh +++ /dev/null @@ -1,86 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_256_3_VQH_ -#define _V_res0_1024a_256_3_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_256_3[] = { - 11, - 12, - 13, - 14, - 15, - 17, - 19, - 22, - 10, - 9, - 8, - 7, - 5, - 3, - 0, -}; - -static long _vq_lengthlist_res0_1024a_256_3[] = { - 5, 6, 6, 7, 7, 7, 8, 8, 6, 6, 7, 7, 7, 8, 9, 6, - 6, 7, 7, 7, 8, 8, 9, 6, 7, 7, 7, 8, 8, 9, 6, 7, - 7, 8, 7, 8, 8,10, 7, 7, 8, 7, 8, 8,10, 7, 7, 8, - 8, 8, 8, 9,10, 7, 8, 8, 8, 8, 9,10, 7, 7, 8, 8, - 8, 8, 9,10, 7, 8, 8, 8, 8, 9,10, 7, 8, 8, 8, 8, - 8, 9,10, 8, 8, 8, 8, 8, 9,10, 8, 8, 9, 9, 9, 9, - 10,11, 8, 9, 9, 9, 9,10,11, 9, 9,10,10,10,10,11, - 12, 9,10,10,10,10,11,12, 6, 6, 7, 7, 7, 8, 8, 9, - 6, 7, 7, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, - 7, 8, 7, 8, 8,10, 7, 7, 8, 8, 8, 8, 9,10, 7, 8, - 8, 8, 8, 9,10, 7, 7, 8, 8, 8, 8, 9,10, 7, 7, 8, - 8, 8, 9,10, 7, 8, 8, 8, 8, 8, 9,10, 8, 8, 8, 8, - 8, 9,10, 8, 8, 9, 9, 9, 9,10,11, 8, 9, 9, 9, 9, - 10,11, 9, 9,10,10,10,10,11,12, 9,10,10,10,10,11, - 12, -}; - -static double _vq_quantthresh_res0_1024a_256_3[] = { - -9.5, -7, -5, -3.5, -2.5, -1.5, -0.5, 0.5, - 1.5, 2.5, 3.5, 5, 7, 9.5, -}; - -static long _vq_quantmap_res0_1024a_256_3[] = { - 14, 13, 12, 11, 10, 9, 8, 0, - 1, 2, 3, 4, 5, 6, 7, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_256_3 = { - _vq_quantthresh_res0_1024a_256_3, - _vq_quantmap_res0_1024a_256_3, - 15, - 15 -}; - -static static_codebook _vq_book_res0_1024a_256_3 = { - 2, 225, - _vq_lengthlist_res0_1024a_256_3, - 1, -529137664, 1611661312, 5, 0, - _vq_quantlist_res0_1024a_256_3, - NULL, - &_vq_auxt_res0_1024a_256_3, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_256_4.vqh b/include/vorbis/book/res0_1024a_256_4.vqh deleted file mode 100644 index 0ee7e515..00000000 --- a/include/vorbis/book/res0_1024a_256_4.vqh +++ /dev/null @@ -1,100 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_256_4_VQH_ -#define _V_res0_1024a_256_4_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_256_4[] = { - 23, - 24, - 25, - 26, - 27, - 29, - 31, - 34, - 39, - 46, - 22, - 21, - 20, - 19, - 17, - 15, - 12, - 7, - 0, -}; - -static long _vq_lengthlist_res0_1024a_256_4[] = { - 4, 5, 6, 7, 7, 7, 8, 8, 8,10, 5, 6, 7, 7, 7, 8, - 8, 8,10, 5, 6, 7, 8, 8, 8, 8, 9, 9,11, 6, 7, 8, - 8, 8, 8, 9, 9,11, 6, 7, 8, 8, 8, 8, 9, 9, 9,12, - 7, 8, 8, 8, 8, 9, 9, 9,12, 7, 8, 8, 9, 9, 9, 9, - 10,10,13, 8, 8, 9, 9, 9, 9,10,10,13, 7, 8, 8, 9, - 9, 9, 9,10,10,13, 8, 8, 9, 9, 9, 9,10,10,13, 7, - 8, 9, 9, 9, 9, 9,10,10,13, 8, 9, 9, 9, 9, 9,10, - 10,13, 8, 8, 9, 9, 9, 9,10,10,11,14, 9, 9, 9, 9, - 9,10,10,11,13, 8, 9,10,10,10,10,10,11,11,14, 9, - 10,10,10,10,10,11,11,14, 8, 9,10,10,10,11,11,11, - 13,15, 9,10,10,10,11,11,11,12,15,11,12,13,14,14, - 14,15,15,15,17,12,13,14,14,14,14,14,15,17, 5, 6, - 7, 8, 8, 8, 8, 9, 9,11, 6, 7, 8, 8, 8, 8, 9, 9, - 11, 6, 7, 8, 8, 8, 8, 9, 9, 9,12, 7, 8, 8, 8, 8, - 9, 9, 9,12, 7, 8, 8, 9, 9, 9, 9,10,10,13, 8, 8, - 9, 9, 9, 9,10,10,13, 7, 8, 8, 9, 9, 9, 9,10,10, - 13, 8, 8, 9, 9, 9, 9,10,10,13, 8, 8, 9, 9, 9, 9, - 9,10,10,13, 8, 9, 9, 9, 9, 9,10,10,13, 8, 8, 9, - 9, 9, 9,10,10,11,13, 9, 9, 9, 9, 9,10,10,11,13, - 8, 9,10,10,10,10,10,11,11,14, 9,10,10,10,10,10, - 11,11,14, 8, 9,10,10,10,11,11,11,12,15, 9,10,10, - 10,11,11,11,12,15,11,12,13,14,14,14,14,15,15,17, - 12,13,14,14,14,14,14,15,17, -}; - -static double _vq_quantthresh_res0_1024a_256_4[] = { - -19.5, -13.5, -9.5, -7, -5, -3.5, -2.5, -1.5, - -0.5, 0.5, 1.5, 2.5, 3.5, 5, 7, 9.5, - 13.5, 19.5, -}; - -static long _vq_quantmap_res0_1024a_256_4[] = { - 18, 17, 16, 15, 14, 13, 12, 11, - 10, 0, 1, 2, 3, 4, 5, 6, - 7, 8, 9, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_256_4 = { - _vq_quantthresh_res0_1024a_256_4, - _vq_quantmap_res0_1024a_256_4, - 19, - 19 -}; - -static static_codebook _vq_book_res0_1024a_256_4 = { - 2, 361, - _vq_lengthlist_res0_1024a_256_4, - 1, -526974976, 1611661312, 6, 0, - _vq_quantlist_res0_1024a_256_4, - NULL, - &_vq_auxt_res0_1024a_256_4, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_256_5.vqh b/include/vorbis/book/res0_1024a_256_5.vqh deleted file mode 100644 index 6084889e..00000000 --- a/include/vorbis/book/res0_1024a_256_5.vqh +++ /dev/null @@ -1,133 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_256_5_VQH_ -#define _V_res0_1024a_256_5_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_256_5[] = { - 88, - 89, - 90, - 91, - 92, - 94, - 96, - 99, - 104, - 111, - 120, - 133, - 151, - 176, - 87, - 86, - 85, - 84, - 82, - 80, - 77, - 72, - 65, - 56, - 43, - 25, - 0, -}; - -static long _vq_lengthlist_res0_1024a_256_5[] = { - 3, 5, 6, 7, 7, 7, 7, 8, 9,10, 8,10,12,11, 5, 6, - 6, 7, 7, 8, 8, 9,10, 7,11,12,12, 5, 6, 7, 8, 8, - 8, 8, 9,10,12, 9,13,15,15, 6, 7, 8, 8, 8, 9, 9, - 10,12, 9,12,14,13, 6, 7, 8, 9, 9, 9,10,10,11,12, - 10,13,15,15, 7, 8, 9, 9, 9,10,10,10,13,10,13,16, - 15, 7, 8, 9,10, 9,10,10,10,11,14,11,14, 0,16, 8, - 9,10, 9,10,10,10,11,14,11,14,16, 0, 7, 8, 9,10, - 10,10,10,10,11,14,11,14,15,15, 8, 9, 9, 9,10,10, - 10,11,14,11,14, 0,16, 7, 9, 9,10,10,10,10,10,11, - 14,11,14,14, 0, 8, 9,10,10,10,10,10,11,13,11,14, - 16,16, 8, 9,10,11,10,10,10,10,11,14,11,14,15,16, - 9,10,10,10,10,10,10,12,14,11,14,15,15, 8, 9,10, - 11,10,10,11,11,12,14,11,13,15,15, 9,10,11,10,11, - 11,11,12,14,11,13,14,15, 9,10,11,12,12,12,12,12, - 12,14,12,13,14,16,10,11,12,12,12,13,12,13,15,12, - 14,14,15, 9,12,13,15,15,14,14,16,15, 0,13,15,16, - 16,12,15,16,16,14,14,16, 0,16,15, 0, 0,16, 7, 9, - 10,12,12,12,13,12,13,14,16, 0, 0,15, 9,11,12,12, - 12,13,12,13,14,16, 0, 0,15, 9,12,13,15, 0,16,16, - 16, 0,16,16, 0, 0,16,12,14,15,16,15,16,16, 0, 0, - 16, 0, 0, 0,11,12,15,16, 0,16,16,15,15,16,16, 0, - 0,16,13,15, 0,16, 0, 0, 0, 0, 0,16, 0, 0,15,11, - 14,14, 0,15, 0,16, 0,15,16,15, 0, 0,16,13,15, 0, - 16, 0,15, 0,15,15,16, 0, 0,16, 5, 6, 7, 8, 8, 8, - 9, 9,10,12, 9,12,14,14, 6, 7, 8, 8, 8, 9, 9,10, - 12, 9,13,13,15, 6, 7, 8, 9, 9, 9, 9, 9,11,13,10, - 13,15,15, 7, 8, 9, 9, 9, 9,10,11,13,10,13,16,14, - 7, 8, 9, 9, 9,10,10,10,11,13,11,14,16, 0, 8, 9, - 9, 9,10,10,10,11,14,11,15,16,15, 7, 8, 9, 9,10, - 10,10,10,12,13,11,15,16,16, 8, 9, 9, 9,10,10,10, - 11,14,10,15, 0,16, 8, 8, 9,10,10,10,10,10,11,14, - 11,13,16,15, 9, 9,10,10,10,10,10,11,14,10,14, 0, - 15, 8, 9,10,11,10,10,10,11,12,13,11,14,15,15, 9, - 10,10,10,10,10,11,11,14,11,14,16,16, 8, 9,10,11, - 10,11,11,11,12,14,11,13,15,14, 9,10,11,10,10,11, - 10,12,15,11,13,15,14, 9,10,11,12,12,12,12,12,14, - 15,12,15,14,16,10,11,12,11,12,12,12,13,15,12,14, - 14,16,10,12,14,15,14,14,15, 0, 0,16,13,15,15, 0, - 12,13,14,15,14,14,15, 0,15,14,16,16,16, 7,10,11, - 12,11,13,13,14,12,16, 0, 0, 0, 0,10,11,12,12,12, - 13,13,13,15,15,15, 0,16,10,11,13,13, 0, 0, 0,16, - 0,16, 0, 0, 0, 0,12,14,16,15, 0, 0,16, 0, 0, 0, - 0, 0,16,11,12,15, 0,16, 0,16, 0, 0, 0, 0, 0, 0, - 0,12, 0, 0,15,16,16,16, 0, 0,16, 0, 0, 0,11,15, - 16, 0,14, 0, 0, 0,15, 0,16, 0, 0,15,14,14,15,15, - 15, 0, 0, 0,16,16, 0,16,16, -}; - -static double _vq_quantthresh_res0_1024a_256_5[] = { - -75.5, -54, -38.5, -27.5, -19.5, -13.5, -9.5, -7, - -5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, - 3.5, 5, 7, 9.5, 13.5, 19.5, 27.5, 38.5, - 54, 75.5, -}; - -static long _vq_quantmap_res0_1024a_256_5[] = { - 26, 25, 24, 23, 22, 21, 20, 19, - 18, 17, 16, 15, 14, 0, 1, 2, - 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_256_5 = { - _vq_quantthresh_res0_1024a_256_5, - _vq_quantmap_res0_1024a_256_5, - 27, - 27 -}; - -static static_codebook _vq_book_res0_1024a_256_5 = { - 2, 729, - _vq_lengthlist_res0_1024a_256_5, - 1, -522846208, 1611661312, 8, 0, - _vq_quantlist_res0_1024a_256_5, - NULL, - &_vq_auxt_res0_1024a_256_5, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_350_1.vqh b/include/vorbis/book/res0_1024a_350_1.vqh deleted file mode 100644 index 48fb9ec4..00000000 --- a/include/vorbis/book/res0_1024a_350_1.vqh +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_350_1_VQH_ -#define _V_res0_1024a_350_1_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_350_1[] = { - 2, - 3, - 4, - 1, - 0, -}; - -static long _vq_lengthlist_res0_1024a_350_1[] = { - 2, 5, 8, 5, 8, 5, 7, 9, 7, 9, 9,10,12,10,11, 5, - 7, 9, 7, 9, 9,10,12,10,12, 5, 7, 9, 7,10, 7, 8, - 10, 8,10,10,11,12,11,12, 7, 8,10, 8,10,10,10,12, - 11,12, 9,10,12,10,12,10,11,12,11,13,12,13,14,13, - 14,10,11,13,11,13,12,12,14,13,14, 6, 7, 9, 7,10, - 7, 8,10, 8,10,10,11,12,10,12, 7, 8,10, 8,10,10, - 11,12,11,12, 9,10,12,10,12,10,11,13,11,13,12,13, - 14,13,14,10,11,13,11,13,13,13,15,13,14, 5, 7,10, - 7,10, 7, 8,11, 8,10,10,11,13,11,13, 7, 8,10, 8, - 11,10,11,12,11,12, 7, 8,11, 8,10, 8, 9,11, 9,11, - 11,12,13,12,13, 8, 9,11, 9,11,11,11,13,12,13,10, - 11,13,11,12,11,12,13,12,14,13,13,13,14,15,11,12, - 13,12,13,13,13,15,13,15, 7, 8,11, 8,11, 8, 9,11, - 9,11,11,12,13,12,13, 8, 9,11, 9,11,11,12,13,12, - 13,10,11,13,11,13,11,12,13,12,13,13,14,15,13,14, - 11,12,13,12,13,13,13,15,13,16, 9,10,12,10,12,10, - 11,13,11,13,12,13,15,13,15,10,11,13,11,13,12,13, - 14,13,14,10,11,13,11,13,11,12,14,12,13,13,14,15, - 14,15,11,12,14,12,13,13,14,15,14,15,12,13,15,13, - 14,13,13,16,13,15,14,13,14,15,16,13,14,16,14,14, - 15,16,16,16,16,10,11,13,11,13,11,12,13,12,14,13, - 14,15,13,14,11,12,13,12,13,13,13,15,13,15,12,13, - 14,13,15,12,13,15,13,16,14,15,16,14,14,13,14,15, - 14,15,15,15,16,16,17, 5, 7,10, 7,10, 7, 8,10, 8, - 10,10,11,12,11,12, 7, 8,10, 8,11,10,11,13,11,13, - 7, 8,11, 8,11, 9, 9,11, 9,11,11,11,13,12,13, 8, - 9,11,10,11,11,12,13,12,13,10,11,13,11,13,11,12, - 13,12,13,13,14,15,13,15,11,12,14,12,13,13,13,13, - 14,15, 7, 8,11, 9,11, 9, 9,11,10,11,11,12,14,11, - 13, 8,10,12, 9,11,11,12,13,12,12,10,11,12,11,13, - 11,12,13,12,14,13,13,15,14,15,11,12,14,12,14,13, - 13,15,13,14, 9,10,12,10,12,10,11,13,11,13,12,13, - 15,13,14,10,11,13,11,13,12,13,15,13,15,10,11,13, - 11,13,11,12,14,12,13,13,13,15,13,15,11,12,13,12, - 13,13,14,15,14,15,13,13,14,13,14,13,14,15,14,15, - 15,16,16,16,16,12,13,15,13,16,15,14,15,15,17,10, - 11,13,11,13,11,12,13,12,14,13,13,14,14,15,11,12, - 14,12,13,13,14,15,14,15,12,13,14,13,15,13,14,15, - 14,14,15,15,16,15,17,13,13,15,13,15,15,15,17,14, - 14, -}; - -static double _vq_quantthresh_res0_1024a_350_1[] = { - -1.5, -0.5, 0.5, 1.5, -}; - -static long _vq_quantmap_res0_1024a_350_1[] = { - 4, 3, 0, 1, 2, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_350_1 = { - _vq_quantthresh_res0_1024a_350_1, - _vq_quantmap_res0_1024a_350_1, - 5, - 5 -}; - -static static_codebook _vq_book_res0_1024a_350_1 = { - 4, 625, - _vq_lengthlist_res0_1024a_350_1, - 1, -533725184, 1611661312, 3, 0, - _vq_quantlist_res0_1024a_350_1, - NULL, - &_vq_auxt_res0_1024a_350_1, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_350_2.vqh b/include/vorbis/book/res0_1024a_350_2.vqh deleted file mode 100644 index 52d243e9..00000000 --- a/include/vorbis/book/res0_1024a_350_2.vqh +++ /dev/null @@ -1,75 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_350_2_VQH_ -#define _V_res0_1024a_350_2_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_350_2[] = { - 6, - 7, - 8, - 9, - 10, - 12, - 5, - 4, - 3, - 2, - 0, -}; - -static long _vq_lengthlist_res0_1024a_350_2[] = { - 4, 5, 6, 6, 7, 8, 5, 6, 6, 7, 8, 5, 5, 6, 7, 7, - 8, 5, 6, 7, 7, 8, 6, 6, 7, 7, 7, 9, 6, 6, 7, 8, - 9, 7, 7, 7, 8, 8, 9, 7, 7, 8, 8, 9, 7, 7, 8, 8, - 8, 9, 7, 8, 8, 8, 9, 8, 8, 9, 9, 9,10, 8, 9, 9, - 9,10, 5, 5, 6, 7, 7, 8, 5, 6, 7, 7, 8, 6, 6, 7, - 7, 8, 9, 6, 7, 7, 8, 9, 7, 7, 7, 8, 8, 9, 7, 7, - 8, 8, 9, 7, 7, 8, 8, 8, 9, 7, 8, 8, 8, 9, 8, 8, - 9, 9, 9,10, 8, 9, 9, 9,10, -}; - -static double _vq_quantthresh_res0_1024a_350_2[] = { - -5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, - 3.5, 5, -}; - -static long _vq_quantmap_res0_1024a_350_2[] = { - 10, 9, 8, 7, 6, 0, 1, 2, - 3, 4, 5, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_350_2 = { - _vq_quantthresh_res0_1024a_350_2, - _vq_quantmap_res0_1024a_350_2, - 11, - 11 -}; - -static static_codebook _vq_book_res0_1024a_350_2 = { - 2, 121, - _vq_lengthlist_res0_1024a_350_2, - 1, -531103744, 1611661312, 4, 0, - _vq_quantlist_res0_1024a_350_2, - NULL, - &_vq_auxt_res0_1024a_350_2, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_350_3.vqh b/include/vorbis/book/res0_1024a_350_3.vqh deleted file mode 100644 index 08fa579c..00000000 --- a/include/vorbis/book/res0_1024a_350_3.vqh +++ /dev/null @@ -1,86 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_350_3_VQH_ -#define _V_res0_1024a_350_3_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_350_3[] = { - 11, - 12, - 13, - 14, - 15, - 17, - 19, - 22, - 10, - 9, - 8, - 7, - 5, - 3, - 0, -}; - -static long _vq_lengthlist_res0_1024a_350_3[] = { - 5, 6, 6, 7, 7, 7, 8, 9, 6, 7, 7, 7, 7, 8, 9, 6, - 6, 7, 7, 7, 8, 8,10, 6, 7, 7, 7, 8, 8, 9, 7, 7, - 7, 7, 7, 8, 9,10, 7, 7, 7, 7, 8, 9,10, 7, 7, 7, - 8, 8, 8, 9,10, 7, 7, 8, 8, 8, 9,10, 7, 7, 7, 8, - 8, 8, 9,10, 7, 7, 8, 8, 8, 9,10, 7, 8, 8, 8, 8, - 8, 9,10, 8, 8, 8, 8, 8, 9,10, 8, 8, 9, 9, 9, 9, - 10,11, 8, 9, 9, 9, 9,10,11, 9,10,10,10,10,10,11, - 12,10,10,10,10,10,11,12, 6, 6, 7, 7, 7, 8, 8, 9, - 6, 7, 7, 7, 8, 8, 9, 7, 7, 7, 7, 7, 8, 9,10, 7, - 7, 7, 7, 8, 9,10, 7, 7, 7, 8, 8, 8, 9,10, 7, 7, - 8, 8, 8, 9,10, 7, 7, 7, 8, 8, 8, 9,10, 7, 7, 8, - 8, 8, 9,10, 8, 8, 8, 8, 8, 8, 9,10, 8, 8, 8, 8, - 8, 9,10, 8, 8, 9, 9, 9, 9,10,11, 8, 9, 9, 9, 9, - 10,11, 9,10,10,10,10,10,11,12,10,10,10,10,10,11, - 12, -}; - -static double _vq_quantthresh_res0_1024a_350_3[] = { - -9.5, -7, -5, -3.5, -2.5, -1.5, -0.5, 0.5, - 1.5, 2.5, 3.5, 5, 7, 9.5, -}; - -static long _vq_quantmap_res0_1024a_350_3[] = { - 14, 13, 12, 11, 10, 9, 8, 0, - 1, 2, 3, 4, 5, 6, 7, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_350_3 = { - _vq_quantthresh_res0_1024a_350_3, - _vq_quantmap_res0_1024a_350_3, - 15, - 15 -}; - -static static_codebook _vq_book_res0_1024a_350_3 = { - 2, 225, - _vq_lengthlist_res0_1024a_350_3, - 1, -529137664, 1611661312, 5, 0, - _vq_quantlist_res0_1024a_350_3, - NULL, - &_vq_auxt_res0_1024a_350_3, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_350_4.vqh b/include/vorbis/book/res0_1024a_350_4.vqh deleted file mode 100644 index 9ec3f250..00000000 --- a/include/vorbis/book/res0_1024a_350_4.vqh +++ /dev/null @@ -1,100 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_350_4_VQH_ -#define _V_res0_1024a_350_4_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_350_4[] = { - 23, - 24, - 25, - 26, - 27, - 29, - 31, - 34, - 39, - 46, - 22, - 21, - 20, - 19, - 17, - 15, - 12, - 7, - 0, -}; - -static long _vq_lengthlist_res0_1024a_350_4[] = { - 5, 6, 7, 7, 7, 8, 8, 8, 8,10, 6, 7, 7, 7, 7, 8, - 8, 8,10, 6, 6, 7, 8, 8, 8, 8, 8, 9,11, 6, 7, 8, - 8, 8, 8, 8, 9,11, 7, 7, 8, 8, 8, 8, 9, 9, 9,11, - 7, 8, 8, 8, 8, 9, 9, 9,11, 7, 8, 8, 8, 8, 8, 9, - 9,10,12, 8, 8, 9, 8, 9, 9, 9,10,12, 7, 8, 8, 8, - 8, 8, 9, 9, 9,12, 8, 8, 8, 8, 8, 9, 9, 9,12, 8, - 8, 8, 9, 8, 8, 9, 9,10,12, 8, 8, 9, 8, 8, 9, 9, - 10,12, 8, 8, 9, 9, 9, 9, 9, 9,10,12, 8, 9, 9, 9, - 9, 9, 9,10,12, 8, 9, 9, 9, 9, 9, 9,10,10,12, 9, - 9, 9, 9, 9, 9,10,10,12, 9, 9, 9,10,10,10,10,10, - 11,13, 9,10,10,10,10,10,10,11,13,10,11,12,12,12, - 12,13,13,13,15,11,12,12,12,13,13,13,13,15, 6, 6, - 7, 8, 8, 8, 8, 9, 9,11, 6, 7, 8, 8, 8, 8, 9, 9, - 11, 7, 7, 8, 8, 8, 8, 9, 9, 9,11, 7, 8, 8, 8, 8, - 9, 9, 9,11, 7, 8, 8, 8, 8, 9, 9, 9,10,12, 8, 8, - 9, 8, 9, 9, 9,10,12, 7, 8, 8, 8, 8, 8, 9, 9, 9, - 12, 8, 8, 8, 8, 8, 9, 9, 9,12, 8, 8, 8, 9, 8, 8, - 9, 9,10,12, 8, 8, 9, 8, 8, 9, 9,10,12, 8, 8, 9, - 9, 9, 9, 9, 9,10,12, 8, 9, 9, 9, 9, 9, 9,10,12, - 8, 9, 9, 9, 9, 9, 9,10,10,12, 9, 9, 9, 9, 9, 9, - 10,10,12, 9, 9, 9,10,10,10,10,10,11,13, 9, 9,10, - 10,10,10,10,11,13,10,11,12,12,12,12,13,13,13,15, - 11,12,12,12,12,13,13,13,15, -}; - -static double _vq_quantthresh_res0_1024a_350_4[] = { - -19.5, -13.5, -9.5, -7, -5, -3.5, -2.5, -1.5, - -0.5, 0.5, 1.5, 2.5, 3.5, 5, 7, 9.5, - 13.5, 19.5, -}; - -static long _vq_quantmap_res0_1024a_350_4[] = { - 18, 17, 16, 15, 14, 13, 12, 11, - 10, 0, 1, 2, 3, 4, 5, 6, - 7, 8, 9, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_350_4 = { - _vq_quantthresh_res0_1024a_350_4, - _vq_quantmap_res0_1024a_350_4, - 19, - 19 -}; - -static static_codebook _vq_book_res0_1024a_350_4 = { - 2, 361, - _vq_lengthlist_res0_1024a_350_4, - 1, -526974976, 1611661312, 6, 0, - _vq_quantlist_res0_1024a_350_4, - NULL, - &_vq_auxt_res0_1024a_350_4, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_1024a_350_5.vqh b/include/vorbis/book/res0_1024a_350_5.vqh deleted file mode 100644 index 645956b0..00000000 --- a/include/vorbis/book/res0_1024a_350_5.vqh +++ /dev/null @@ -1,133 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_1024a_350_5_VQH_ -#define _V_res0_1024a_350_5_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_1024a_350_5[] = { - 88, - 89, - 90, - 91, - 92, - 94, - 96, - 99, - 104, - 111, - 120, - 133, - 151, - 176, - 87, - 86, - 85, - 84, - 82, - 80, - 77, - 72, - 65, - 56, - 43, - 25, - 0, -}; - -static long _vq_lengthlist_res0_1024a_350_5[] = { - 4, 6, 7, 7, 7, 8, 8, 8, 8, 9, 9,10,11,10, 6, 7, - 7, 7, 8, 8, 8, 8, 9, 9,10,11,10, 6, 7, 7, 8, 8, - 8, 8, 8, 9,10, 9,11,12,11, 7, 8, 8, 8, 8, 8, 8, - 9,10, 9,11,12,11, 7, 8, 8, 9, 9, 9, 9, 9, 9,10, - 10,12,13,12, 8, 8, 9, 9, 9, 9, 9, 9,10,10,12,12, - 12, 7, 8, 9, 9, 9, 9, 9, 9,10,11,11,12,13,12, 8, - 9, 9, 9, 9, 9, 9,10,11,10,12,13,12, 7, 8, 9, 9, - 9, 9, 9, 9, 9,10,10,12,13,12, 8, 9, 9, 9, 9, 9, - 9, 9,10,10,12,12,12, 8, 8, 9, 9, 9, 9, 9, 9, 9, - 10,10,12,13,12, 8, 9, 9, 9, 9, 9, 9, 9,10,10,11, - 12,11, 8, 9, 9, 9, 9, 9, 9, 9, 9,11,10,12,13,13, - 9, 9, 9, 9, 9, 9, 9, 9,11,10,12,12,12, 8, 9, 9, - 9, 9, 9, 9, 9,10,10,10,12,13,13, 9, 9, 9, 9, 9, - 9, 9, 9,11,10,11,12,12, 9, 9,10,10,10,10,10,10, - 10,11,11,13,14,13, 9,10,10,10,10,10,10,10,11,11, - 12,13,13,10,10,11,11,11,11,11,12,12,13,12,14,15, - 14,10,11,11,11,11,11,12,12,13,13,14,14,14, 9,10, - 11,12,12,12,12,12,12,13,14,15,17,15,10,11,12,12, - 12,12,12,12,13,15,16,16,15,11,12,13,14,14,14,14, - 15,15,15,17,18,18,15,12,13,14,14,15,15,15,15,16, - 18,18,17,15,11,13,14,16,15,15,16,16,18,18,18,20, - 18,16,13,14,15,15,15,17,17,17,20,19,20,20,15,10, - 12,13,13,13,13,13,14,14,15,15,15,15,12,12,13,13, - 13,13,13,14,15,15,15,15,16,12, 6, 7, 7, 8, 8, 8, - 8, 8, 9,10, 9,11,12,11, 7, 8, 8, 8, 8, 8, 8, 9, - 10, 9,11,12,11, 7, 8, 8, 9, 9, 9, 9, 9, 9,10,10, - 12,13,12, 8, 8, 9, 8, 9, 9, 9, 9,10,10,12,12,12, - 7, 8, 9, 9, 9, 9, 9, 9,10,11,11,12,13,12, 8, 9, - 9, 9, 9, 9, 9,10,11,10,12,13,12, 8, 8, 9, 9, 9, - 9, 9, 9, 9,10,10,12,13,12, 8, 9, 9, 9, 9, 9, 9, - 9,11,10,11,12,12, 8, 8, 9, 9, 9, 9, 9, 9, 9,10, - 10,12,13,12, 8, 9, 9, 9, 9, 9, 9, 9,10,10,11,12, - 12, 8, 9, 9, 9, 9, 9, 9, 9, 9,10,10,12,13,13, 9, - 9, 9, 9, 9, 9, 9, 9,11,10,12,12,12, 8, 9, 9, 9, - 9, 9, 9, 9,10,11,10,12,13,13, 9, 9, 9, 9, 9, 9, - 9,10,11,10,12,12,12, 9, 9,10,10,10,10,10,10,10, - 11,11,13,13,13, 9,10,10,10,10,10,10,10,11,11,12, - 13,13,10,10,11,11,11,11,11,12,12,13,13,14,15,14, - 10,11,11,11,11,12,11,12,13,12,13,14,14, 9,10,11, - 12,12,12,12,12,12,13,14,16,17,15,10,11,12,12,12, - 12,12,12,13,15,16,16,15,11,12,13,14,14,14,14,15, - 15,16,16,17,18,15,12,13,14,14,14,14,15,15,16,16, - 18,20,15,12,13,15,15,15,15,16,17,18,18,18,18,19, - 16,13,14,16,16,16,17,17,16,18, 0,19,20,15,10,11, - 13,13,12,13,13,14,14,15,16,16,16,12,12,12,13,13, - 13,13,14,14,15,15,16,16,12, -}; - -static double _vq_quantthresh_res0_1024a_350_5[] = { - -75.5, -54, -38.5, -27.5, -19.5, -13.5, -9.5, -7, - -5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, - 3.5, 5, 7, 9.5, 13.5, 19.5, 27.5, 38.5, - 54, 75.5, -}; - -static long _vq_quantmap_res0_1024a_350_5[] = { - 26, 25, 24, 23, 22, 21, 20, 19, - 18, 17, 16, 15, 14, 0, 1, 2, - 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, -}; - -static encode_aux_threshmatch _vq_auxt_res0_1024a_350_5 = { - _vq_quantthresh_res0_1024a_350_5, - _vq_quantmap_res0_1024a_350_5, - 27, - 27 -}; - -static static_codebook _vq_book_res0_1024a_350_5 = { - 2, 729, - _vq_lengthlist_res0_1024a_350_5, - 1, -522846208, 1611661312, 8, 0, - _vq_quantlist_res0_1024a_350_5, - NULL, - &_vq_auxt_res0_1024a_350_5, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_128a_128_1.vqh b/include/vorbis/book/res0_128a_128_1.vqh deleted file mode 100644 index 3f77bce7..00000000 --- a/include/vorbis/book/res0_128a_128_1.vqh +++ /dev/null @@ -1,63 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_128a_128_1_VQH_ -#define _V_res0_128a_128_1_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_128a_128_1[] = { - 1, - 2, - 0, -}; - -static long _vq_lengthlist_res0_128a_128_1[] = { - 1, 4, 4, 5, 7, 7, 5, 7, 7, 5, 7, 7, 7, 9,10, 7, - 9,10, 5, 7, 8, 7,10, 9, 7,10, 9, 5, 8, 8, 8,10, - 10, 7,10,10, 7,10,10,10,12,13,10,12,13, 8,10,10, - 9,13,12,10,12,13, 5, 8, 8, 8,10,10, 8,10,10, 7, - 10,10,10,12,12,10,12,13, 8,10,10,10,13,13,10,13, - 12, -}; - -static double _vq_quantthresh_res0_128a_128_1[] = { - -0.5, 0.5, -}; - -static long _vq_quantmap_res0_128a_128_1[] = { - 2, 0, 1, -}; - -static encode_aux_threshmatch _vq_auxt_res0_128a_128_1 = { - _vq_quantthresh_res0_128a_128_1, - _vq_quantmap_res0_128a_128_1, - 3, - 3 -}; - -static static_codebook _vq_book_res0_128a_128_1 = { - 4, 81, - _vq_lengthlist_res0_128a_128_1, - 1, -535822336, 1611661312, 2, 0, - _vq_quantlist_res0_128a_128_1, - NULL, - &_vq_auxt_res0_128a_128_1, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_128a_128_2.vqh b/include/vorbis/book/res0_128a_128_2.vqh deleted file mode 100644 index 909401a7..00000000 --- a/include/vorbis/book/res0_128a_128_2.vqh +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_128a_128_2_VQH_ -#define _V_res0_128a_128_2_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_128a_128_2[] = { - 2, - 3, - 4, - 1, - 0, -}; - -static long _vq_lengthlist_res0_128a_128_2[] = { - 2, 5, 6, 4, 6, 4, 7, 9, 7, 9, 7, 9,14, 9,13, 5, - 7, 9, 7, 9, 7, 9,13, 9,13, 5, 7, 9, 7,10, 7, 9, - 12, 9,12, 9,11,15,12, 0, 7, 9,11, 9,11, 9,12,16, - 11,15, 7, 9,14,10,14, 9,12,16,12, 0,12, 0, 0,15, - 16, 9,11, 0,12, 0,13,16,15,16, 0, 5, 7, 9, 7, 9, - 7, 9,11, 9,11, 9,12,15,11,16, 7, 9,11, 9,12, 9, - 12, 0,12, 0, 7,10,14,10, 0, 9,11, 0,12,16,14,15, - 0,15, 0, 9,12,15,12,15,14,16, 0,16, 0, 5, 7,10, - 7,10, 7, 9,12, 9,12,10,12, 0,12,16, 7, 9,12, 9, - 13,10,12,16,12,14, 7, 9,12, 9,11, 9,12,14,11,14, - 12,14, 0,14, 0, 9,11,13,11,16,12,14, 0,16, 0, 9, - 12,16,12,15,11,14,16,13, 0,15,16, 0, 0, 0,11,13, - 0,14, 0, 0, 0, 0, 0,16, 7, 9,11, 9,12, 9,11,13, - 11,13,12,15, 0,14,16, 9,11,14,11,13,12,14, 0,15, - 0,10,12, 0,12, 0,11,16, 0,13,16, 0, 0, 0, 0, 0, - 12,14,16,14, 0,16, 0, 0, 0, 0, 7,10,13,10,16,10, - 12,16,13,16,14, 0, 0,16, 0,10,12, 0,12, 0,15, 0, - 0, 0, 0, 9,12, 0,12, 0,12,15, 0,14, 0, 0,16, 0, - 16, 0,11,14,15,13, 0,16,16, 0, 0, 0,14,15, 0,16, - 0,15, 0, 0, 0, 0, 0, 0, 0, 0, 0,16, 0, 0, 0, 0, - 0, 0, 0, 0, 0,10,12,15,13,16,12,14, 0,13, 0, 0, - 0, 0,16, 0,12,14, 0,14, 0,15, 0, 0,16, 0,14,15, - 0,16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,16,15, 0, - 0, 0, 0, 0, 0, 0, 0, 5, 7,10, 7,10, 7, 9,12, 9, - 13,10,13,16,12,16, 7, 9,12, 9,12,10,13,16,12,15, - 7, 9,13, 9,12, 9,11,15,11,15,12,16, 0,15,16, 9, - 11,14,12,14,11,14,16, 0,16,10,12,16,11, 0,12,13, - 0,15, 0,16, 0, 0, 0, 0,12,13, 0,14,16, 0,15, 0, - 0, 0, 7,10,12, 9,12, 9,11,15,11,14,12,14, 0,14, - 15, 9,11,16,11,15,12,15,16,14, 0,10,13, 0,13, 0, - 12,14, 0,15,16, 0,16, 0, 0, 0,12,15, 0,16, 0,14, - 0, 0, 0, 0, 7,10, 0,10,14,10,12,16,12,16,15,16, - 0,16,16,10,12,14,12, 0,15, 0, 0, 0, 0,10,12, 0, - 13, 0,12,14, 0, 0, 0,16, 0, 0,16, 0,12,14, 0,14, - 0, 0, 0, 0, 0, 0,15,15, 0, 0, 0,15, 0, 0,15, 0, - 0, 0, 0, 0, 0,15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, - 13, 0,12,16,12,14, 0,14,16, 0, 0, 0, 0, 0,13,14, - 0,15, 0,16, 0, 0, 0, 0,14, 0, 0,16, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,14,16, 0, 0, 0, 0, 0, 0, 0, - 0, -}; - -static double _vq_quantthresh_res0_128a_128_2[] = { - -1.5, -0.5, 0.5, 1.5, -}; - -static long _vq_quantmap_res0_128a_128_2[] = { - 4, 3, 0, 1, 2, -}; - -static encode_aux_threshmatch _vq_auxt_res0_128a_128_2 = { - _vq_quantthresh_res0_128a_128_2, - _vq_quantmap_res0_128a_128_2, - 5, - 5 -}; - -static static_codebook _vq_book_res0_128a_128_2 = { - 4, 625, - _vq_lengthlist_res0_128a_128_2, - 1, -533725184, 1611661312, 3, 0, - _vq_quantlist_res0_128a_128_2, - NULL, - &_vq_auxt_res0_128a_128_2, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_128a_128_3.vqh b/include/vorbis/book/res0_128a_128_3.vqh deleted file mode 100644 index de58bddb..00000000 --- a/include/vorbis/book/res0_128a_128_3.vqh +++ /dev/null @@ -1,212 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_128a_128_3_VQH_ -#define _V_res0_128a_128_3_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_128a_128_3[] = { - 3, - 4, - 5, - 6, - 2, - 1, - 0, -}; - -static long _vq_lengthlist_res0_128a_128_3[] = { - 2, 5, 7, 6, 5, 6, 6, 5, 7, 8, 8, 7, 8, 9, 8,10, - 12,12,10,10,11, 8,10,13,14,10,13,13, 5, 7, 9, 9, - 7, 9, 9, 8, 9,11,13, 9,12,11, 7,10,13,14,10,13, - 13, 5, 7, 9, 9, 7, 9, 9, 7, 9,11,11, 9,11,11,10, - 11,12, 0,11, 0,14,10, 0, 0,14,12, 0, 0, 7, 9,12, - 11, 8,10,10,11,12, 0,14,11,14,14,10,12, 0, 0,12, - 14,13, 8,10,12,14,11,12,12,10,11,13,14,11,14,13, - 12,13,14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,12, - 0,12,12,14,12,13,14, 0, 0,13, 0, 0, 0, 0, 0, 0, - 14, 0, 0, 8,10, 0, 0,11, 0,14,11,13, 0, 0,13, 0, - 0,13, 0, 0, 0, 0, 0,14, 0, 0, 0, 0, 0, 0, 0,11, - 12,14, 0, 0, 0, 0,14, 0, 0, 0, 0, 0, 0,13, 0, 0, - 0, 0, 0, 0, 5, 7, 9, 9, 7, 9, 9, 7, 9,10,11, 9, - 10,11,10,11,14,14,11,14,14,10,12,13,14,12, 0, 0, - 7, 8,11,11, 9,11,10,10,12,14,12,11, 0,14,11,13, - 13,12,13,14,13, 8,10,14,13,10,14,13,10,13,14, 0, - 13,12, 0, 0,14, 0, 0, 0, 0, 0,14,14, 0, 0, 0, 0, - 0,10,11,12,14,11, 0,13,12,14, 0, 0,14, 0, 0,14, - 14, 0, 0, 0, 0, 0, 8,11, 0, 0,11,14,14,10,12, 0, - 14,14, 0, 0,14,14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,10,14,14, 0,12, 0, 0,14, 0, 0, 0,14, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 5, 7, 9, 9, 7, 9,10, 8,10, - 10,10, 9,11,10,11,13,11, 0,12,14, 0,11,14, 0, 0, - 0,14, 0, 8, 9,11,11, 9,12,11,11,13,12,14,11,14, - 0,10,14,13,14,12, 0, 0, 8, 9,11,12,10,11,11, 9, - 11,13,12,11,12,13, 0, 0, 0, 0,13,14, 0,13, 0, 0, - 0, 0, 0, 0, 9,12,12,13,11,14, 0,14,14,14, 0, 0, - 0, 0,14, 0, 0, 0, 0, 0, 0,11,11, 0, 0,13, 0,13, - 12, 0, 0, 0,14, 0, 0, 0,14, 0,14, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10,13, 0, 0, 0, 0, - 0,11, 0, 0, 0,14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,14,14, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,10,11,11,10, - 11,11, 9,12,13,12,12,12,14,11, 0, 0,13,13, 0, 0, - 12,14, 0, 0, 0, 0, 0, 9,12,12,12,11,14,12,13,14, - 0,14, 0, 0, 0,12, 0, 0,14, 0, 0, 0,11,13, 0, 0, - 14, 0, 0,13,14, 0, 0, 0,14, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,12, 0, 0, 0,14, 0, 0, 0, - 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10,11, 0, - 0,12, 0, 0,14,14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,14, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,11, - 14, 0,11,14,14,11,12,14, 0,12, 0,13,13, 0, 0, 0, - 14, 0, 0,14, 0, 0, 0, 0, 0, 0,11,13, 0,14,13,14, - 0, 0, 0, 0, 0, 0, 0, 0,14, 0, 0, 0, 0, 0, 0,10, - 11, 0, 0,12,14, 0,12, 0, 0, 0, 0, 0, 0,14, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,12,14, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 13, 0, 0, 0,14, 0, 0, 0, 0, 0, 0,14, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,14, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,10,12, 0, 0,14,14,14,11,14,13, 0,13, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,14,14,14, - 14,14, 0, 0,14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 8,10,14,14,11, 0,14,13,14,13, 0, - 14, 0, 0, 0, 0, 0, 0,14, 0, 0, 0, 0, 0, 0, 0, 0, - 0,10,12, 0, 0,13, 0, 0,14,14, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,12, 0, 0, 0,14, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,13, 0, 0, 0, 0, 0, 0,13, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,13, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,13, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0,11, 0, 0, 0,14,14, 0, - 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 9, 9, - 8, 9, 9, 8, 9,11,11, 9,11,14,11,11,14,14,11, 0, - 13,11, 0,14, 0,12,14, 0, 8, 9,11,14,10,11,10,11, - 12,14,14,14, 0,12,10,12, 0, 0,12, 0,13, 7, 9,10, - 11, 9,11,11,10,11,12,14,11,13,12,13, 0,14,14,14, - 0,14,14, 0,13, 0, 0, 0, 0,10,11,14,12,11,14,12, - 12,14,13,14, 0,14, 0,13,14, 0, 0,14, 0, 0,11,13, - 12, 0, 0,14, 0,12, 0,14, 0, 0, 0,13,13, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,14,14,14, 0,14, 0, - 0, 0, 0, 0, 0, 0, 0,14,14, 0, 0, 0, 0, 0, 0,10, - 14, 0,12,14, 0, 0,14,12, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,13, 0, 0, 0, - 0, 0,14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 8,10,11,11, 9,12,10, 9,12,13, 0,13, 0, 0,12,14, - 13, 0,12, 0, 0,14, 0, 0, 0,14, 0, 0, 9,11,13,14, - 11,14,12,14, 0, 0, 0,14,14, 0,13, 0, 0, 0,14,14, - 0,11,13, 0, 0,13, 0, 0,13, 0, 0, 0,14, 0, 0,14, - 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,12,13, 0, - 0, 0, 0,14, 0, 0, 0, 0,14, 0, 0, 0, 0, 0, 0, 0, - 0, 0,12,14, 0, 0,12, 0, 0,14, 0, 0, 0, 0, 0, 0, - 0,14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,12, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 8,10,13, 0,10,13,13,10,13, 0, 0,14,14, - 14, 0, 0, 0, 0,14, 0, 0, 0,14, 0, 0, 0, 0, 0,10, - 13, 0,12,13, 0,14, 0, 0, 0, 0, 0, 0, 0, 0,14, 0, - 0, 0, 0, 0,11,12,14, 0, 0,14,14, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 13,14, 0, 0, 0, 0,14, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,14,13, 0, 0, 0, 0, 0,14, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,10,14,14, 0,12,13,14,13,14, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,14, 0, 0, 0,14, 0, 0,13,14, 0, 0,14, 0, - 0, 0, 0, 0, 0, 0, 0, 0,14, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,14, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0,13, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,11, 0, 0,10,14, - 0,11,14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,14, - 0, 0, 0, 0, 0, 0,12, 0, 0, 0,14,14, 0,13, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,11, 0, 0, 0, 0, - 14,14,13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,14,14, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,14, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,11,14, - 0, 0, 0, 0, 0,13,14, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,13, - 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,13, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -}; - -static double _vq_quantthresh_res0_128a_128_3[] = { - -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, -}; - -static long _vq_quantmap_res0_128a_128_3[] = { - 6, 5, 4, 0, 1, 2, 3, -}; - -static encode_aux_threshmatch _vq_auxt_res0_128a_128_3 = { - _vq_quantthresh_res0_128a_128_3, - _vq_quantmap_res0_128a_128_3, - 7, - 7 -}; - -static static_codebook _vq_book_res0_128a_128_3 = { - 4, 2401, - _vq_lengthlist_res0_128a_128_3, - 1, -533200896, 1611661312, 3, 0, - _vq_quantlist_res0_128a_128_3, - NULL, - &_vq_auxt_res0_128a_128_3, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_128a_128_4.vqh b/include/vorbis/book/res0_128a_128_4.vqh deleted file mode 100644 index c2a52041..00000000 --- a/include/vorbis/book/res0_128a_128_4.vqh +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_128a_128_4_VQH_ -#define _V_res0_128a_128_4_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_128a_128_4[] = { - 4, - 5, - 6, - 7, - 8, - 3, - 2, - 1, - 0, -}; - -static long _vq_lengthlist_res0_128a_128_4[] = { - 2, 3, 5, 6, 6, 3, 5, 6, 5, 4, 5, 7, 8, 7, 6, 7, - 8, 7, 7, 9,11,13,11, 9,10,11,11, 9,11,13,13,14, - 11,13,13,15, 8,11,13,13,15,11,14, 0,15, 4, 5, 7, - 8, 7, 5, 7, 8, 7, 7, 9,11,11,10, 9,11,13,11, 9, - 11,14,13,13,11,13,13,13, 8,11,14,15,13,12,14, 0, - 14, -}; - -static double _vq_quantthresh_res0_128a_128_4[] = { - -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, -}; - -static long _vq_quantmap_res0_128a_128_4[] = { - 8, 7, 6, 5, 0, 1, 2, 3, - 4, -}; - -static encode_aux_threshmatch _vq_auxt_res0_128a_128_4 = { - _vq_quantthresh_res0_128a_128_4, - _vq_quantmap_res0_128a_128_4, - 9, - 9 -}; - -static static_codebook _vq_book_res0_128a_128_4 = { - 2, 81, - _vq_lengthlist_res0_128a_128_4, - 1, -531628032, 1611661312, 4, 0, - _vq_quantlist_res0_128a_128_4, - NULL, - &_vq_auxt_res0_128a_128_4, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_128a_128_5.vqh b/include/vorbis/book/res0_128a_128_5.vqh deleted file mode 100644 index 21b4ad08..00000000 --- a/include/vorbis/book/res0_128a_128_5.vqh +++ /dev/null @@ -1,115 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_128a_128_5_VQH_ -#define _V_res0_128a_128_5_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_128a_128_5[] = { - 45, - 46, - 47, - 48, - 49, - 51, - 53, - 56, - 61, - 68, - 77, - 90, - 44, - 43, - 42, - 41, - 39, - 37, - 34, - 29, - 22, - 13, - 0, -}; - -static long _vq_lengthlist_res0_128a_128_5[] = { - 2, 3, 5, 6, 7, 6, 7, 7, 9,14,19, 0, 3, 5, 6, 6, - 6, 7, 7, 9,13, 0, 0, 4, 6, 7, 8, 8, 8, 9, 9,11, - 15, 0, 0, 6, 7, 8, 8, 8, 8, 9,11,15, 0, 0, 8, 9, - 11,11,12,12,12,12,14, 0, 0, 0, 9,10,12,12,12,12, - 13,15,19, 0, 0,11,12,13,14,14,15,15,16,18, 0, 0, - 0,12,13,15,15,14,14,15,17, 0, 0, 0,12,14,15,15, - 17,15,18,18,18, 0, 0, 0,14,15,17,17,16,18,16, 0, - 0, 0, 0,12,15,16,15, 0,18,18, 0, 0, 0, 0, 0,15, - 16,17,17, 0, 0, 0, 0, 0, 0, 0,13,16,17,17, 0,18, - 18, 0, 0, 0, 0, 0,18, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0,14,18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,16, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,16,18, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,18, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 4, 6, 7, 8, 8, 8, 9, 9,11,18, 0, 0, - 6, 7, 8, 8, 8, 8, 9,11,15, 0, 0, 8, 9,11,12,12, - 12,12,12,15, 0, 0, 0, 9,11,11,12,12,12,13,15,18, - 0, 0,11,12,13,14,14,14,14,15,18, 0, 0, 0,12,14, - 15,14,15,15,15,18, 0, 0, 0,12,14,16,15,17,16,18, - 17, 0, 0, 0, 0,14,15,17,15,15,17,17,17, 0, 0, 0, - 12,15,17,17,17,18, 0, 0, 0, 0, 0, 0,15,17,18,18, - 17, 0, 0, 0, 0, 0, 0,13, 0,18, 0, 0,18, 0, 0, 0, - 0, 0, 0,17, 0,18,18, 0, 0, 0, 0, 0, 0, 0,14, 0, - 0,18, 0,18, 0, 0, 0, 0, 0, 0,17, 0,18, 0, 0, 0, - 0, 0, 0, 0, 0,16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,17, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -}; - -static double _vq_quantthresh_res0_128a_128_5[] = { - -38.5, -27.5, -19.5, -13.5, -9.5, -7, -5, -3.5, - -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 5, - 7, 9.5, 13.5, 19.5, 27.5, 38.5, -}; - -static long _vq_quantmap_res0_128a_128_5[] = { - 22, 21, 20, 19, 18, 17, 16, 15, - 14, 13, 12, 0, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, -}; - -static encode_aux_threshmatch _vq_auxt_res0_128a_128_5 = { - _vq_quantthresh_res0_128a_128_5, - _vq_quantmap_res0_128a_128_5, - 23, - 23 -}; - -static static_codebook _vq_book_res0_128a_128_5 = { - 2, 529, - _vq_lengthlist_res0_128a_128_5, - 1, -524910592, 1611661312, 7, 0, - _vq_quantlist_res0_128a_128_5, - NULL, - &_vq_auxt_res0_128a_128_5, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_128a_160_1.vqh b/include/vorbis/book/res0_128a_160_1.vqh deleted file mode 100644 index 92e63d9c..00000000 --- a/include/vorbis/book/res0_128a_160_1.vqh +++ /dev/null @@ -1,63 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_128a_160_1_VQH_ -#define _V_res0_128a_160_1_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_128a_160_1[] = { - 1, - 2, - 0, -}; - -static long _vq_lengthlist_res0_128a_160_1[] = { - 2, 4, 4, 4, 6, 6, 4, 6, 6, 5, 7, 6, 6, 7, 8, 6, - 7, 8, 5, 6, 7, 6, 8, 7, 6, 8, 7, 6, 7, 7, 7, 8, - 9, 7, 8, 8, 7, 9, 8, 8, 9,10, 9,10, 9, 7, 8, 9, - 8,10, 9, 9,10,10, 6, 7, 7, 7, 8, 8, 7, 9, 9, 7, - 9, 8, 9,10, 9, 8, 9,10, 7, 8, 9, 9,10,10, 8,10, - 9, -}; - -static double _vq_quantthresh_res0_128a_160_1[] = { - -0.5, 0.5, -}; - -static long _vq_quantmap_res0_128a_160_1[] = { - 2, 0, 1, -}; - -static encode_aux_threshmatch _vq_auxt_res0_128a_160_1 = { - _vq_quantthresh_res0_128a_160_1, - _vq_quantmap_res0_128a_160_1, - 3, - 3 -}; - -static static_codebook _vq_book_res0_128a_160_1 = { - 4, 81, - _vq_lengthlist_res0_128a_160_1, - 1, -535822336, 1611661312, 2, 0, - _vq_quantlist_res0_128a_160_1, - NULL, - &_vq_auxt_res0_128a_160_1, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_128a_160_2.vqh b/include/vorbis/book/res0_128a_160_2.vqh deleted file mode 100644 index 193259d8..00000000 --- a/include/vorbis/book/res0_128a_160_2.vqh +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_128a_160_2_VQH_ -#define _V_res0_128a_160_2_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_128a_160_2[] = { - 2, - 3, - 4, - 1, - 0, -}; - -static long _vq_lengthlist_res0_128a_160_2[] = { - 4, 5, 7, 5, 7, 5, 6, 8, 6, 8, 7, 9,11, 9,11, 5, - 6, 8, 6, 8, 8, 9,11, 9,11, 5, 6, 9, 6, 9, 6, 7, - 10, 8,10, 9,10,13,10,13, 6, 7,10, 7,10, 9,10,13, - 10,13, 8, 9,12, 9,12, 9,10,13,10,13,12,13, 0,13, - 16, 9,10,13,10,13,12,13,17,13,16, 5, 6, 9, 6, 9, - 6, 7,10, 7,10, 9,10,13,10,12, 6, 7,10, 8,10, 9, - 10,13,10,12, 8, 9,12, 9,12, 9,10,13,10,13,12,13, - 16,13,14, 9,10,14,10,13,12,13,17,13,15, 6, 7, 9, - 7, 9, 7, 8,11, 8,10, 9,10,13,10,14, 7, 8,10, 8, - 10, 9,10,12,10,13, 7, 8,10, 8,10, 8, 9,11, 9,12, - 11,11,13,11,13, 8, 9,11, 9,11,10,12,14,11,14, 9, - 11,13,11,13,10,11,14,12,14,13,13,17,15, 0,11,12, - 15,12,16,13,15,17,14,17, 7, 8,10, 8,10, 8, 9,11, - 9,11,10,12,15,11,13, 8, 9,11, 9,12,10,11,14,11, - 14, 9,10,13,10,14,10,11,14,11,14,13,14,17,13,16, - 10,12,14,12,15,13,14,16,14, 0, 8,10,13, 9,12,10, - 11,13,11,14,13,14, 0,14,17,10,10,13,11,13,12,14, - 15,13,15,10,11,13,11,14,11,11,16,12,14,15,14,17, - 15, 0,11,12,14,12,13,13,16,17,14, 0,13,14,17,13, - 16,13,14,16,14,16,17,15, 0,16,17,13,14, 0,16,16, - 17,16,17,17, 0,10,11,14,11,14,11,12,14,11,14,14, - 15, 0,14,16,11,12,15,11,15,15,15,17,15,15,13,13, - 16,13,16,13,15,16,14,17,17,17, 0,16,17,14,16, 0, - 14, 0,17,17, 0,17, 0, 6, 7, 9, 7, 9, 7, 8,10, 8, - 10, 9,10,13,10,13, 7, 8,10, 8,10, 9,10,13,10,13, - 7, 8,10, 8,10, 8, 9,12, 9,11,10,11,14,12,14, 8, - 9,11, 9,12,10,11,13,11,14, 9,11,13,10,13,11,11, - 14,12,16,13,15,17,14,17,11,11,14,12,14,13,13,16, - 15,16, 7, 8,10, 8,10, 8, 9,11, 9,12,10,12,13,12, - 14, 8, 9,12, 9,11,10,12,15,11,14, 9,10,14,11,14, - 11,12,14,12,14,13,14,17,14,17,10,12,15,11,14,13, - 14,16,13,15, 9,10,12, 9,13,10,11,14,11,14,12,13, - 16,13,15,10,11,14,10,14,13,13,16,14,17, 9,11,14, - 10,14,11,12,15,12,15,13,15,17,15, 0,11,12,14,12, - 15,14,14, 0,15, 0,12,14,16,13,16,14,14,17,15,16, - 17,16, 0,16,17,13,15, 0,16,16,16,15, 0,16, 0,10, - 11,13,11,13,11,12,15,12,14,13,15, 0,15,17,11,12, - 14,12,14,13,16,17,14, 0,13,14,15,13,16,14,14,16, - 14,15,17,17, 0, 0, 0,13,15, 0,14, 0,14, 0,17,15, - 17, -}; - -static double _vq_quantthresh_res0_128a_160_2[] = { - -1.5, -0.5, 0.5, 1.5, -}; - -static long _vq_quantmap_res0_128a_160_2[] = { - 4, 3, 0, 1, 2, -}; - -static encode_aux_threshmatch _vq_auxt_res0_128a_160_2 = { - _vq_quantthresh_res0_128a_160_2, - _vq_quantmap_res0_128a_160_2, - 5, - 5 -}; - -static static_codebook _vq_book_res0_128a_160_2 = { - 4, 625, - _vq_lengthlist_res0_128a_160_2, - 1, -533725184, 1611661312, 3, 0, - _vq_quantlist_res0_128a_160_2, - NULL, - &_vq_auxt_res0_128a_160_2, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_128a_160_3.vqh b/include/vorbis/book/res0_128a_160_3.vqh deleted file mode 100644 index af1fae62..00000000 --- a/include/vorbis/book/res0_128a_160_3.vqh +++ /dev/null @@ -1,212 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_128a_160_3_VQH_ -#define _V_res0_128a_160_3_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_128a_160_3[] = { - 3, - 4, - 5, - 6, - 2, - 1, - 0, -}; - -static long _vq_lengthlist_res0_128a_160_3[] = { - 4, 5, 7, 7, 5, 7, 7, 5, 7, 9, 9, 7, 9, 9, 7, 9, - 11,11, 9,10,13, 8,10,12,15,10,12, 0, 6, 7, 9, 9, - 7, 9, 9, 8, 9,11,11, 9,11,13, 8,10,12,14,10,11, - 14, 6, 7, 9,10, 7, 9,10, 7, 8,10,11, 8,10,11, 9, - 10,13,12,10,13,13,10,11,14,15,11,13,14, 7, 8,10, - 11, 8,10,11, 9,10,12,12,10,13, 0,10,11,12,15,11, - 13,15, 8, 9,11,13, 9,12,13, 9,10,13,14,10,14,13, - 11,12,15, 0,12,15,14,13,13,15,15,13,15, 0, 9,10, - 13,14,11,12,14,11,12,13,15,14,14, 0,13,14,14, 0, - 15, 0, 0, 9,10,13,15,10,14,15,10,11,13, 0,12,14, - 0,13,15, 0,15,13, 0, 0,15,15, 0, 0, 0, 0, 0,10, - 11,14,15,11,14,14,12,14,15, 0,13,15, 0,15,15, 0, - 0, 0, 0, 0, 6, 7, 9,10, 7, 9, 9, 7, 8,10,11, 8, - 10,11, 9,11,12,13,10,12,13,10,11,13,14,11,14,14, - 7, 8,10,11, 8,10,11, 9,10,13,13,10,12,13,10,11, - 13,15,11,13,15, 8, 9,12,12, 9,11,13, 9,11,13,14, - 11,12,14,11,12,14, 0,12,14, 0,12,14, 0, 0,14,14, - 15, 9,10,14,15,10,13,14,12,13,15,15,13, 0, 0,12, - 14, 0, 0,14,15,15, 9,10,13,14,10,13, 0,10,12,15, - 0,11,13, 0,12,14, 0, 0,14,15, 0,15,15, 0, 0,14, - 15, 0,10,12,14, 0,11,13, 0,12,13,15, 0,14,15,15, - 0,15, 0, 0,14, 0, 0, 6, 7, 9,10, 7,10,10, 7, 8, - 10,11, 8,11,11, 9,10,12,14,10,13,13,10,11,14,14, - 11,13, 0, 7, 8,10,11, 8,10,11, 9,11,12,13,11,13, - 13,10,11,15, 0,11,13, 0, 7, 8,10,12, 8,10,11, 8, - 9,11,13, 9,12,13,10,12,14,13,12,12,15,12,12,15, - 0,12,15,15, 8, 9,12,13, 9,12,12,11,12,14,14,11, - 13,13,11,12, 0,14,12, 0,14, 9,11,12,14,10,13,13, - 10,11,13,15,12,14, 0,13,13,15,15,13,14, 0,14,14, - 14, 0, 0, 0, 0,10,11,13,15,12,13,15,13,14,15, 0, - 0,15, 0,13, 0, 0, 0,15, 0, 0,10,11,14, 0,11,13, - 15,11,12, 0, 0,12,15, 0,13,14, 0, 0,13, 0, 0, 0, - 0, 0, 0,14, 0, 0,12,13,14, 0,13, 0, 0,15,14, 0, - 0, 0,15, 0,14, 0, 0, 0, 0, 0, 0, 7, 8,11,11, 8, - 11,11, 8,10,11,12,10,11,12,10,11,14,14,11,14,14, - 11,13, 0, 0,12,14,15, 8, 9,12,13, 9,12,13,10,11, - 13,15,12,13,15,11,12,14,14,12,13, 0,10,10,12,14, - 10,15,14,10,11,13,14,11,14,14,12,13, 0, 0,13,15, - 15,14,14, 0, 0,14, 0, 0,11,11,14,15,12,14,14,13, - 13,15, 0,14, 0, 0,13,15, 0, 0,15,15, 0,10,12,15, - 14,11,14,15,12,12, 0, 0,14,14, 0,13, 0, 0, 0,14, - 0, 0,14, 0, 0, 0, 0, 0, 0,12,13,14, 0,13,15, 0, - 13,14, 0, 0,15, 0, 0, 0, 0, 0, 0,15, 0, 0, 8,10, - 13,13,10,11,14,10,11,14,14,11,13,13,12,12,14,14, - 12,14, 0,13,15,14, 0,14,15, 0,10,10,12,13,11,13, - 14,12,13,14,15,13,15, 0,14,15, 0, 0,14, 0, 0, 9, - 11,13,14,11,12,13,11,12,13,15,12,15, 0,14,14, 0, - 0, 0, 0, 0,12,14, 0, 0,15, 0, 0,11,12,14,14,11, - 14,14,12,13,15, 0,13,14, 0,14,14, 0, 0,15, 0, 0, - 12,12,13,15,12, 0,14,12,14, 0, 0,13,15, 0,14,15, - 0, 0,15, 0, 0, 0, 0, 0, 0, 0, 0, 0,12,14,15, 0, - 15,15, 0,15,14, 0, 0, 0,15, 0, 0,15,15, 0, 0, 0, - 0,13,12, 0, 0,13,15, 0,14,14,15, 0,15, 0,15, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,15, 0,15, - 0, 0, 0, 0,14, 0, 0, 0,15, 0, 0, 0, 0, 0, 0, 0, - 0, 0,10,11,13,15,11,12,15,11,12,13,14,12,13,14, - 14, 0,15, 0,13, 0, 0,14, 0, 0, 0,15,14, 0,10,11, - 12,14,11,14,14,14,14, 0, 0,14, 0, 0,13,15,15, 0, - 0, 0, 0,12,13,14,15,12,15, 0,12,14,15, 0,14, 0, - 0,14, 0, 0, 0,15, 0, 0, 0, 0, 0, 0,15, 0, 0,13, - 15, 0,15,14, 0,15,13,15, 0, 0,15, 0, 0, 0, 0, 0, - 0, 0, 0, 0,13, 0, 0, 0,14, 0, 0,14, 0, 0, 0,14, - 0, 0,14, 0, 0,15,15, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 14,14, 0, 0, 0, 0, 0,15, 0,15, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9,10,13, 0,11,13, 0,10,12,14,14, - 12,14, 0,12, 0,14, 0,14, 0, 0,14, 0, 0, 0,15, 0, - 0,10,11,15,15,12,14,15,13,13, 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 0, 0,10,12,14, 0,11,14,15,11,13, 0, - 15,13,14,15,13, 0, 0, 0, 0, 0,15, 0, 0, 0, 0, 0, - 0, 0,12,12,15, 0,12,15, 0,13,15, 0,14,15, 0, 0, - 15, 0, 0, 0, 0, 0, 0,13,13, 0, 0,13,15, 0,13,15, - 0, 0, 0, 0, 0, 0, 0, 0, 0,14, 0, 0, 0, 0, 0, 0, - 0, 0, 0,14,15,15, 0,15, 0, 0, 0,15, 0, 0, 0, 0, - 0, 0, 0, 0, 0,15, 0, 0, 0, 0, 0, 0, 0, 0, 0,15, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0,10,11,14, 0,12, 0, 0, - 12,13,14,15,13, 0, 0,13, 0, 0, 0, 0,15, 0,15, 0, - 0, 0, 0, 0, 0,12,13,14, 0,13, 0, 0,13,14, 0, 0, - 0, 0, 0, 0, 0, 0, 0,15, 0, 0,13,14,15, 0,15, 0, - 0,14,14,15, 0, 0, 0, 0, 0, 0,15, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,15,14, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,15, 0, 0, 0, - 0, 0,14, 0, 0, 0,15, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7,10,10, - 7, 9,10, 7, 8,11,11, 8,10,12, 9,10,12,13,10,12, - 15,10,12,13,14,12,15, 0, 7, 8,10,11, 8,11,12, 9, - 10,13,13,10,12,13,10,12,13,15,11,15, 0, 7, 8,11, - 11, 8,11,11, 8, 9,11,12, 9,11,12,10,12,14,15,12, - 13, 0,12,13,14,15,14, 0, 0, 8, 9,11,13, 9,12,13, - 10,12,13,14,11,15,15,12,12,13,14,14,14, 0,10,11, - 12,15,10,12,14,10,13,15,15,11,15,14,13,13,14, 0, - 13,13, 0,13,15, 0, 0, 0, 0, 0,10,11,13,14,11,15, - 14,12,15, 0, 0,14,15, 0,14,15,15, 0,14,15, 0,10, - 12, 0, 0,11,14, 0,11,12, 0, 0,12,14, 0,15, 0,14, - 0,14, 0, 0,15, 0, 0, 0, 0, 0, 0,12,13, 0, 0,13, - 15, 0,13, 0,15, 0,14,15, 0,14,14, 0, 0, 0, 0, 0, - 7, 8,11,11, 8,10,11, 8, 9,12,12,10,11,12,10,12, - 13,13,12,15,14,11,12,15, 0,12,14, 0, 8, 9,12,14, - 9,12,12,11,12,14,14,11,13,15,12,13,14,14,12,14, - 0, 9,10,13,15,10,13,15,11,11,14,14,12,14,15,12, - 14, 0,15,15, 0, 0,12,14, 0, 0,15, 0, 0,11,12,13, - 0,11,14,13,13,13, 0,15,13,14, 0,15, 0, 0, 0,14, - 15, 0,11,12, 0, 0,12,15, 0,12,14, 0,14,13, 0,15, - 13,14, 0, 0,15, 0,15,15, 0, 0, 0, 0, 0, 0,12,14, - 14,15,13,14, 0,14, 0, 0, 0,13, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 8, 9,12,14, 9,11,13, 9,10,13,15,10,13, - 13,12,13,15, 0,13, 0, 0,14,13, 0, 0,15,15,15, 9, - 11,13,14,10,13,13,11,13,14,15,13,15, 0,13,13, 0, - 15,15,15, 0,10,11,12,14,11,13,15,11,12,15,15,12, - 14, 0,12,15,15, 0,15,15, 0,13,14, 0, 0,15,15, 0, - 11,11, 0, 0,12,14, 0,14,13,15, 0,15,15, 0,14,14, - 0, 0, 0, 0, 0,12,13, 0, 0,15,14,14,12,14, 0, 0, - 14,15, 0,14,15, 0, 0,15,14, 0,15,15, 0, 0, 0, 0, - 0,14,13,14, 0,14, 0, 0,14,15, 0, 0, 0, 0, 0,15, - 0, 0, 0,15, 0, 0,12,15, 0, 0,13,15, 0,15, 0, 0, - 0,13, 0, 0,14, 0,15, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,14,15, 0, 0,13,15, 0,15,14, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,10,11,13, 0,11,13,15,11,12, - 13, 0,12,14, 0,12,14,15, 0,13, 0,15,13, 0, 0, 0, - 15, 0, 0,11,12,13,14,12,14, 0,13,14,14, 0,13,14, - 0, 0,15, 0,15, 0, 0, 0,12,13,14, 0,12, 0, 0,12, - 0,15, 0,14,15, 0,14,15, 0, 0,15, 0, 0, 0, 0, 0, - 0,15, 0, 0,13,14,15, 0,13,15,15,14,14, 0, 0,15, - 0, 0, 0, 0, 0, 0, 0, 0, 0,13, 0, 0, 0,14, 0, 0, - 14, 0, 0, 0,14, 0, 0, 0, 0, 0, 0, 0,15, 0, 0, 0, - 0, 0, 0, 0, 0,13,15, 0, 0,14, 0, 0,14, 0, 0, 0, - 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,11,14, 0,10,13, - 0,10,12,14, 0,11,14, 0,14,15,15,14,14, 0, 0,14, - 0, 0, 0,15, 0, 0,10,11,14,14,12,14,14,13,14,15, - 0,14,15, 0,15, 0, 0, 0,14, 0, 0,10,12,14, 0,12, - 14, 0,12,13,15, 0,13,15, 0,13, 0, 0, 0, 0, 0, 0, - 14, 0, 0, 0, 0, 0, 0,14,12, 0, 0,13,15, 0,14, 0, - 0, 0,14, 0, 0, 0, 0, 0, 0, 0, 0, 0,12,14, 0, 0, - 14,15, 0,13,14, 0, 0,15, 0, 0,15,15, 0, 0,15, 0, - 0, 0, 0, 0, 0, 0, 0, 0,14,14, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,15, 0, - 0,14, 0, 0, 0,15, 0, 0,14, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0,15, 0, 0, 0, 0, 0, 0, 0, 0, 0,11,12, - 15, 0,12,14,15,12,13,15, 0,12, 0, 0,14,15, 0, 0, - 14, 0, 0,15, 0, 0, 0, 0, 0, 0,12,13,15, 0,13,15, - 15,14, 0, 0, 0, 0,15, 0,14, 0, 0, 0,15, 0, 0,14, - 13,15, 0,13, 0, 0,15,14, 0, 0,15, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,13,14, 0, 0,14, - 0, 0,15, 0, 0, 0, 0, 0, 0, 0, 0, 0,15, 0, 0, 0, - 15,15, 0, 0,15, 0, 0,15, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -}; - -static double _vq_quantthresh_res0_128a_160_3[] = { - -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, -}; - -static long _vq_quantmap_res0_128a_160_3[] = { - 6, 5, 4, 0, 1, 2, 3, -}; - -static encode_aux_threshmatch _vq_auxt_res0_128a_160_3 = { - _vq_quantthresh_res0_128a_160_3, - _vq_quantmap_res0_128a_160_3, - 7, - 7 -}; - -static static_codebook _vq_book_res0_128a_160_3 = { - 4, 2401, - _vq_lengthlist_res0_128a_160_3, - 1, -533200896, 1611661312, 3, 0, - _vq_quantlist_res0_128a_160_3, - NULL, - &_vq_auxt_res0_128a_160_3, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_128a_160_4.vqh b/include/vorbis/book/res0_128a_160_4.vqh deleted file mode 100644 index 98258937..00000000 --- a/include/vorbis/book/res0_128a_160_4.vqh +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_128a_160_4_VQH_ -#define _V_res0_128a_160_4_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_128a_160_4[] = { - 4, - 5, - 6, - 7, - 8, - 3, - 2, - 1, - 0, -}; - -static long _vq_lengthlist_res0_128a_160_4[] = { - 2, 4, 5, 7, 6, 3, 5, 7, 6, 4, 5, 7, 9, 8, 5, 7, - 8, 8, 6, 7, 8,10, 9, 7, 9,10,10, 7, 8,10,11,12, - 9,11,12,12, 7, 8,11,14,14, 8,11,12,13, 4, 5, 7, - 8, 8, 5, 7, 8, 8, 6, 7, 9,10,10, 7, 9,10,10, 8, - 8,10,12,11, 9,11,13,12, 7, 8,10,13,13, 9,11,12, - 13, -}; - -static double _vq_quantthresh_res0_128a_160_4[] = { - -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, -}; - -static long _vq_quantmap_res0_128a_160_4[] = { - 8, 7, 6, 5, 0, 1, 2, 3, - 4, -}; - -static encode_aux_threshmatch _vq_auxt_res0_128a_160_4 = { - _vq_quantthresh_res0_128a_160_4, - _vq_quantmap_res0_128a_160_4, - 9, - 9 -}; - -static static_codebook _vq_book_res0_128a_160_4 = { - 2, 81, - _vq_lengthlist_res0_128a_160_4, - 1, -531628032, 1611661312, 4, 0, - _vq_quantlist_res0_128a_160_4, - NULL, - &_vq_auxt_res0_128a_160_4, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_128a_160_5.vqh b/include/vorbis/book/res0_128a_160_5.vqh deleted file mode 100644 index 2bb04750..00000000 --- a/include/vorbis/book/res0_128a_160_5.vqh +++ /dev/null @@ -1,115 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_128a_160_5_VQH_ -#define _V_res0_128a_160_5_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_128a_160_5[] = { - 45, - 46, - 47, - 48, - 49, - 51, - 53, - 56, - 61, - 68, - 77, - 90, - 44, - 43, - 42, - 41, - 39, - 37, - 34, - 29, - 22, - 13, - 0, -}; - -static long _vq_lengthlist_res0_128a_160_5[] = { - 3, 4, 5, 6, 6, 6, 6, 7, 9,14,18, 0, 4, 5, 6, 6, - 6, 6, 7, 9,13,17, 0, 5, 5, 6, 7, 7, 7, 7, 8,10, - 13, 0, 0, 5, 6, 7, 7, 7, 7, 8,10,14,18, 0, 7, 7, - 8, 9, 9, 9, 9, 9,12,15, 0, 0, 7, 8, 9, 9, 9, 9, - 9,11,16, 0, 0, 9, 9,10,11,10,10,11,12,14, 0, 0, - 0, 9,10,10,11,11,11,11,13,18, 0, 0,10,10,11,12, - 12,12,12,13,14,18, 0, 0,10,11,12,12,12,12,13,16, - 0, 0, 0,11,12,13,14,14,14,14,17,17, 0, 0, 0,12, - 13,14,14,14,14,15,16,18, 0, 0,12,14,15,15,16,15, - 16,17, 0, 0, 0, 0,14,15,17,16,16,18,17, 0, 0, 0, - 0,13,17, 0, 0,18, 0, 0, 0,18, 0, 0, 0,16,17,17, - 18, 0,18, 0, 0, 0, 0, 0,14,17,18,18, 0, 0, 0, 0, - 0, 0, 0, 0,15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,17, - 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,17, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,18, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 5, 5, 6, 7, 7, 7, 7, 8,10,14, 0, 0, - 5, 6, 7, 7, 7, 7, 8,10,14,18, 0, 7, 7, 8, 9, 9, - 9, 9, 9,11,15, 0, 0, 7, 8, 9, 9, 9, 9, 9,11,17, - 0, 0, 9, 9,10,11,10,11,11,11,14,17, 0, 0, 9,10, - 10,11,11,11,11,14, 0, 0, 0,10,11,11,12,12,12,12, - 13,15,18, 0, 0,11,11,12,12,12,12,13,15, 0, 0, 0, - 11,12,13,14,14,14,14,16,17, 0, 0, 0,12,13,14,13, - 15,14,15,16, 0, 0, 0,12,14,15,16,16,17,15, 0,18, - 0, 0, 0,14,16,17,16,16,16,18, 0, 0, 0, 0,14,17, - 16,18, 0, 0,16, 0, 0, 0, 0, 0,15,18,17,18,18, 0, - 0, 0, 0, 0, 0,14,17, 0,18, 0,18, 0, 0, 0, 0, 0, - 0,17,18,18, 0, 0, 0, 0, 0, 0, 0, 0,15,17, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,18, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,18, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -}; - -static double _vq_quantthresh_res0_128a_160_5[] = { - -38.5, -27.5, -19.5, -13.5, -9.5, -7, -5, -3.5, - -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 5, - 7, 9.5, 13.5, 19.5, 27.5, 38.5, -}; - -static long _vq_quantmap_res0_128a_160_5[] = { - 22, 21, 20, 19, 18, 17, 16, 15, - 14, 13, 12, 0, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, -}; - -static encode_aux_threshmatch _vq_auxt_res0_128a_160_5 = { - _vq_quantthresh_res0_128a_160_5, - _vq_quantmap_res0_128a_160_5, - 23, - 23 -}; - -static static_codebook _vq_book_res0_128a_160_5 = { - 2, 529, - _vq_lengthlist_res0_128a_160_5, - 1, -524910592, 1611661312, 7, 0, - _vq_quantlist_res0_128a_160_5, - NULL, - &_vq_auxt_res0_128a_160_5, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_128a_192_1.vqh b/include/vorbis/book/res0_128a_192_1.vqh deleted file mode 100644 index 74e6314f..00000000 --- a/include/vorbis/book/res0_128a_192_1.vqh +++ /dev/null @@ -1,63 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_128a_192_1_VQH_ -#define _V_res0_128a_192_1_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_128a_192_1[] = { - 1, - 2, - 0, -}; - -static long _vq_lengthlist_res0_128a_192_1[] = { - 1, 4, 4, 5, 6, 6, 5, 6, 6, 5, 7, 7, 7, 8, 8, 7, - 8, 8, 5, 7, 7, 7, 8, 8, 7, 9, 8, 7, 8, 8, 9,10, - 10, 8, 9, 9, 9,10, 9,10, 9,11,10,11,11, 9, 9,10, - 10,11,10,10,11,11, 7, 8, 8, 8, 9, 9, 9,10,10, 9, - 10, 9,10,11,11,10,10,11, 9,10,10,10,11,11, 9,11, - 8, -}; - -static double _vq_quantthresh_res0_128a_192_1[] = { - -0.5, 0.5, -}; - -static long _vq_quantmap_res0_128a_192_1[] = { - 2, 0, 1, -}; - -static encode_aux_threshmatch _vq_auxt_res0_128a_192_1 = { - _vq_quantthresh_res0_128a_192_1, - _vq_quantmap_res0_128a_192_1, - 3, - 3 -}; - -static static_codebook _vq_book_res0_128a_192_1 = { - 4, 81, - _vq_lengthlist_res0_128a_192_1, - 1, -535822336, 1611661312, 2, 0, - _vq_quantlist_res0_128a_192_1, - NULL, - &_vq_auxt_res0_128a_192_1, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_128a_192_2.vqh b/include/vorbis/book/res0_128a_192_2.vqh deleted file mode 100644 index 97902933..00000000 --- a/include/vorbis/book/res0_128a_192_2.vqh +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_128a_192_2_VQH_ -#define _V_res0_128a_192_2_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_128a_192_2[] = { - 2, - 3, - 4, - 1, - 0, -}; - -static long _vq_lengthlist_res0_128a_192_2[] = { - 4, 5, 6, 5, 6, 5, 6, 7, 6, 7, 7, 8,10, 8,10, 5, - 6, 7, 6, 7, 7, 8,10, 8,10, 6, 7, 8, 6, 8, 7, 7, - 9, 7, 9, 9, 9,11, 9,11, 7, 7, 9, 7, 9, 9, 9,11, - 10,11, 9, 9,11, 9,11, 9,10,12,10,12,11,11,13,12, - 13, 9,10,11,10,11,11,11,13,12,13, 6, 6, 8, 7, 8, - 7, 7, 9, 7, 9, 9, 9,11, 9,11, 7, 7, 9, 7, 9, 9, - 9,11, 9,10, 8, 9,11, 9,11, 9,10,11,10,12,11,12, - 13,12,13, 9,10,11,10,11,11,12,13,11,13, 7, 7, 9, - 7, 9, 8, 8,10, 8,10,10,10,12,10,11, 7, 8, 9, 8, - 10, 9,10,11,10,12, 8, 8,10, 8,10, 8, 9,10, 9,10, - 10,10,12,11,13, 8, 9,10, 9,10,10,11,12,10,12,10, - 11,12,10,12,10,11,12,11,12,12,11,13,12,14,10,11, - 13,11,13,13,13,15,12,16, 8, 8,10, 8,10, 8, 9,11, - 9,10,10,11,12,10,12, 8, 9,10, 9,11,10,11,12,11, - 12,10,11,12,11,12,10,11,12,11,13,12,14,15,11,12, - 11,11,12,11,12,12,12,14,13,13, 9,10,12,10,12,10, - 11,12,11,13,12,13,14,13,15,10,11,12,11,12,12,12, - 14,12,14,10,11,13,11,12,11,11,13,11,13,13,13,15, - 13,14,11,12,13,12,12,13,13,14,13,14,12,13,15,13, - 13,12,13,14,12,15,14,13,14,14,15,12,13,14,14,15, - 14,15,18,15,18,10,11,13,11,12,11,11,13,12,13,13, - 14,15,13,14,11,11,13,11,13,13,13,15,14,14,12,12, - 14,13,14,12,12,16,12,15,14,15,15,13,15,13,13,15, - 14,15,14,14,16,15,17, 7, 7, 9, 7, 9, 7, 8, 9, 8, - 9, 9,10,11,10,11, 8, 8,10, 8,10, 9,10,11,10,12, - 8, 8,10, 8,10, 9, 9,11, 9,10,10,10,12,10,12, 8, - 9,10, 9,10,10,10,11,11,13,10,10,12,10,12,11,11, - 13,11,12,12,12,14,12,14,10,11,12,11,12,12,11,12, - 13,14, 8, 8,10, 8,10, 8, 9,10, 9,11,10,11,12,10, - 12, 8, 9,11, 9,10,10,11,12,11,11,10,10,12,11,12, - 11,11,12,11,13,12,12,14,13,14,10,11,12,10,12,12, - 12,14,11,12,10,10,12,10,12,11,11,12,11,13,12,12, - 14,12,13,11,11,12,11,12,12,13,14,13,14,10,11,13, - 10,11,11,11,13,11,12,13,13,15,13,14,11,11,13,11, - 13,13,13,14,13,14,12,12,15,13,13,13,13,16,12,14, - 14,15,15,15,15,12,12,14,13,14,13,13,14,15,15,10, - 11,12,11,13,11,12,12,11,13,12,13,15,13,16,11,11, - 13,11,13,12,13,14,13,14,13,13,14,13,14,14,13,14, - 13,14,14,14,16,15,16,12,13,14,13,13,13,14,16,14, - 16, -}; - -static double _vq_quantthresh_res0_128a_192_2[] = { - -1.5, -0.5, 0.5, 1.5, -}; - -static long _vq_quantmap_res0_128a_192_2[] = { - 4, 3, 0, 1, 2, -}; - -static encode_aux_threshmatch _vq_auxt_res0_128a_192_2 = { - _vq_quantthresh_res0_128a_192_2, - _vq_quantmap_res0_128a_192_2, - 5, - 5 -}; - -static static_codebook _vq_book_res0_128a_192_2 = { - 4, 625, - _vq_lengthlist_res0_128a_192_2, - 1, -533725184, 1611661312, 3, 0, - _vq_quantlist_res0_128a_192_2, - NULL, - &_vq_auxt_res0_128a_192_2, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_128a_192_3.vqh b/include/vorbis/book/res0_128a_192_3.vqh deleted file mode 100644 index b254c82f..00000000 --- a/include/vorbis/book/res0_128a_192_3.vqh +++ /dev/null @@ -1,212 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_128a_192_3_VQH_ -#define _V_res0_128a_192_3_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_128a_192_3[] = { - 3, - 4, - 5, - 6, - 2, - 1, - 0, -}; - -static long _vq_lengthlist_res0_128a_192_3[] = { - 5, 6, 7, 8, 6, 7, 8, 6, 7, 8, 9, 7, 8, 9, 8, 9, - 10,11, 9,10,11, 9,10,11,13,10,11,13, 6, 7, 8, 9, - 7, 8, 9, 8, 8,10,11, 9,10,11, 9,10,11,13,10,11, - 13, 7, 7, 9,10, 7, 9, 9, 7, 8, 9,10, 8, 9,10, 9, - 9,11,11, 9,11,12,10,10,12,14,11,12,14, 7, 8, 9, - 10, 8, 9,10, 9, 9,10,11, 9,10,12,10,11,12,13,11, - 12,14, 9, 9,11,12, 9,11,12, 9,10,11,12,10,11,12, - 10,10,12,14,11,12,13,12,12,13,15,12,14,15, 9,10, - 11,12,10,11,12,10,10,12,13,11,12,14,11,12,14,14, - 12,15,16,11,11,12,14,11,12,14,11,11,13,15,11,12, - 17,12,12,13,16,12,13, 0,14,14,15,16,15,16,17,11, - 11,13,15,11,13,15,12,12,13,16,13,14,16,14,14,16, - 17,14,15,16, 7, 7, 9, 9, 7, 9, 9, 8, 8, 9,10, 8, - 9,10, 9, 9,11,12, 9,10,11,10,11,12,13,11,12,13, - 8, 8, 9,10, 8, 9,10, 9, 9,11,12, 9,10,12,10,11, - 12,14,11,12,12, 9, 9,10,11,10,11,11, 9,10,11,12, - 10,11,12,10,11,12,13,11,12,14,12,12,14,15,12,13, - 14, 9,10,11,12,10,11,13,10,11,12,13,11,12,13,12, - 12,13,15,12,13,15,10,11,12,14,11,12,14,11,11,12, - 14,11,12,14,12,12,13,17,13,14,16,14,14,15,16,14, - 15, 0,11,11,13,14,11,13,15,12,13,14,16,12,14,14, - 15,14,15,15,15,17,15, 7, 8, 9,10, 8, 9,10, 8, 9, - 10,11, 8,10,11, 9,10,11,12,10,11,12,10,12,13,14, - 11,12,14, 8, 8,10,11, 8, 9,11, 9, 9,11,12,10,11, - 12,10,11,12,14,11,12,13, 8, 9,10,11, 9,10,11, 8, - 9,10,11, 9,10,11,10,10,11,12,10,11,13,11,12,13, - 14,12,13,15, 9, 9,10,11, 9,10,11,10,10,11,12,10, - 11,12,11,11,12,14,12,13,14,10,10,11,12,10,11,12, - 10,10,11,13,10,12,13,11,11,12,13,11,12,15,13,13, - 13,15,13,15,16,10,10,12,13,10,11,13,11,11,12,14, - 12,13,14,12,12,14,16,13,15,17,11,12,12,15,12,12, - 14,12,12,13,15,12,13,15,12,13,14,14,13,14,16,14, - 14,15, 0,15,16,17,12,12,13,15,11,14,16,12,14,14, - 16,13,14,15,15,14, 0,16,16,16,17, 8, 9,10,10, 9, - 10,11, 8, 9,10,11, 9,10,11,10,10,11,12,10,11,12, - 11,12,12,15,11,12,15, 9, 9,10,11, 9,10,11,10,10, - 11,12,10,11,13,11,11,12,14,12,12,14,10,10,11,12, - 10,11,13,10,10,11,12,10,11,12,11,11,12,15,11,12, - 13,13,13,15,16,12,14,15,10,10,11,13,10,11,13,11, - 11,13,14,11,13,14,13,13,15, 0,13,15,16,11,11,13, - 15,12,13,15,11,12,13,15,12,14,15,12,14,14,15,12, - 13,16,14,14,16,17,14,15,16,12,12,13,15,12,13,17, - 13,13,14,17,13,14,15,14,16,16, 0,15,16, 0,10,10, - 11,12,10,11,12,10,10,11,12,10,12,12,11,11,13,14, - 11,13,13,13,13,15,15,13,14,15,10,10,11,12,10,11, - 13,11,11,12,14,12,12,13,12,13,14,15,13,14,15,10, - 10,11,13,10,11,13,10,11,12,14,11,12,13,11,12,13, - 14,12,13,16,13,13,14,16,14,15,16,10,11,12,13,11, - 12,13,11,12,13,13,11,12,14,12,13,14,16,14,14,15, - 11,12,13,14,11,13,13,12,11,13,14,11,13,15,12,12, - 14,14,13,14,16,15,14,15, 0,14,15,16,12,12,13,15, - 12,12,14,12,13,14,17,13,14,16,14,14,15,17,15,16, - 15,12,13,15,14,13,13,16,13,13,15,15,13,16,15,14, - 14,14,16,14,15,17,16,15,15,17,16,16, 0,13,13,14, - 15,13,15,16,14,14,16,17,15,14,17,16,15,16,17,17, - 17, 0,10,11,12,13,11,12,13,10,11,12,13,11,12,13, - 11,12,13,14,12,12,14,13,13,14,17,14,14,15,10,11, - 12,13,11,11,13,12,11,13,15,12,13,15,13,13,14,16, - 14,14,16,11,11,13,14,12,12,15,11,12,13,14,12,13, - 14,12,13,14,16,13,13,15,14,15,15, 0,14,15, 0,12, - 12,12,14,12,13,15,12,14,13,14,13,14,15,15,16,16, - 17,14,15, 0,12,13,14,15,13,14, 0,13,14,15,16,13, - 14, 0,14,14,16,17,13,15,16,17,16, 0,17,15,15,17, - 13,13,15,16,13,15,16,15,15, 0,15,14,16, 0,16,17, - 0, 0,16, 0, 0,11,12,13,14,12,12,14,12,12,13,15, - 12,13,14,13,13,15,16,13,14,16,15,15, 0, 0,14,15, - 0,12,12,13,15,12,14,14,12,12,14,16,13,14,15,14, - 14,17,17,14,16,17,12,12,14,16,12,13,15,12,13,14, - 15,12,14,15,13,13,15,15,14,15,16,15,16,17,17,16, - 16, 0,12,12,13,15,13,13,16,13,14,15,16,13,14,15, - 14,16, 0,16,16,16,17,13,13,14,15,14,15,15,13,13, - 15,17,13,15,15,15,15,15,17,16,17,17,16,17,16, 0, - 17, 0, 0,13,14,15, 0,14,15,17,14,15,15,16,15,16, - 0,15,17,16,17,16, 0, 0,16,15, 0,17,15,15,17,15, - 14,16,16,16,16,17,17,16,15, 0,15,16, 0, 0, 0,17, - 0, 0, 0, 0,15,15,15,17,15,16, 0,15,16, 0, 0, 0, - 16, 0,17, 0, 0, 0, 0, 0, 0,12,13,14,14,12,13,14, - 12,12,13, 0,12,13,15,14,14,14,15,14,16,16,15,16, - 17, 0,15,16,16,12,13,13,15,13,13,15,14,13,14,17, - 14,15,17,14,14,15,17,16,16,17,13,13,14,15,14,14, - 16,13,13,15,15,13,14,16,14,15,16,17,15,15,16,15, - 16, 0, 0,16,16,17,13,13,15,16,13,15,16,15,14,16, - 0,15,16,17,16,16,17,17,16, 0, 0,14,15,16,16,15, - 15, 0,16,15,16,17,16,15, 0,16,17,16, 0,17, 0, 0, - 0,16,17, 0,16,17,17,15,15,16,17,16,16, 0,16,17, - 17, 0,17,17, 0,17,16, 0, 0,17, 0, 0, 7, 8, 9,10, - 8, 9,10, 8, 8,10,10, 8, 9,11, 9,10,11,12,10,11, - 12,11,11,12,14,11,12,13, 8, 8,10,11, 9,10,11,10, - 10,11,12,10,11,12,11,11,12,15,11,12,14, 8, 9,10, - 11, 9,10,11, 9, 9,10,11, 9,10,11,10,10,11,13,10, - 11,13,11,11,13,15,12,13,14, 9, 9,10,11, 9,10,11, - 10,10,11,12,10,11,12,11,11,13,15,12,13,14,10,10, - 11,12,10,11,12,10,11,12,13,10,11,13,11,12,13,15, - 12,13,14,13,13,14,16,13,15,16,10,10,12,12,10,11, - 13,11,11,12,14,11,12,14,13,12,13,15,13,14,16,11, - 12,13,15,11,13,14,12,12,13,15,12,13,15,12,13,14, - 16,13,15,17,14,15,16, 0,15,15,17,12,12,13,15,11, - 13,15,13,13,15,15,13,14,15,14,14,15,17,16,17,17, - 8, 8,10,11, 9,10,11, 9, 9,10,11, 9,10,11,10,10, - 11,12,10,12,12,11,12,13,14,12,13,14, 8, 9,10,11, - 9,10,11,10,11,11,13,10,11,13,11,12,13,14,11,13, - 15,10,10,11,12,10,11,13,10,10,11,13,11,12,13,11, - 11,12,15,11,12,14,13,13,14,15,13,13,16,10,10,11, - 12,10,11,13,11,12,13,14,11,12,14,12,14,14,15,13, - 13,15,12,12,13,14,12,12,15,11,12,13,14,12,14,15, - 12,13,14,17,13,15,16,14,15,16,17,15,15, 0,11,12, - 13,14,12,13,14,13,13,14,17,12,14,15,14,15,16, 0, - 14,15, 0, 9,10,11,12,10,11,12,10,10,11,12,10,11, - 13,11,11,12,15,11,12,13,13,12,14,16,13,14,16,10, - 10,11,13,10,11,13,11,11,13,14,12,13,14,12,13,14, - 14,12,15,15,10,10,12,13,10,11,13,10,11,11,13,11, - 12,14,12,12,13,13,12,12,14,13,13,14,15,13,14,15, - 10,11,12,13,11,12,13,12,12,13,14,13,13,14,13,13, - 14,17,14,15,17,11,11,13,14,12,12,13,11,12,13,15, - 12,13,13,13,13,14,15,13,14,15,14,14,15, 0,14,15, - 17,12,12,13,15,12,13,14,13,13,13,15,13,14,15,14, - 14,15,17,15,16,17,13,13,14,15,13,14,15,13,14,15, - 17,13,14,15,15,15,15, 0,15,15, 0,16,17, 0, 0,16, - 0,17,13,13,15,15,14,14,16,14,14,14,16,15,16,17, - 15,15,15,17,16,16, 0,10,10,12,13,11,12,13,10,11, - 12,13,11,12,14,11,11,12,14,12,13,14,13,13,14,16, - 13,15,15,10,11,11,13,10,12,13,12,12,13,15,12,13, - 14,13,13,15,16,13,15,16,11,12,12,14,12,12,14,12, - 12,13,14,12,13,14,13,14,14,15,13,14,16,14,15,15, - 17,15,16,17,11,12,13,15,11,13,14,13,13,15,16,12, - 14,14,13,14,16,17,15,15,16,14,15,15,16,13,15,16, - 14,14,15,17,14,15,17,14,14,15,15,14,16,15,15,17, - 0,16,16,16, 0,13,14,15,16,13,14,15,14,15,16,17, - 13,14, 0,15,17,17, 0,17,15, 0,11,12,13,14,12,13, - 14,12,12,13,16,12,13,14,13,13,13,15,13,14,17, 0, - 14,15,17,14,15,17,12,12,12,14,12,15,16,13,13,14, - 0,13,14,16,15,16,16,17,16,16,16,12,13,13,15,12, - 13,15,12,12,13,15,12,13,15,13,14,14,17,13,14,17, - 16,15,15,16,16, 0, 0,12,13,14,16,12,13,15,13,14, - 15,15,13,16,17,15,15,15,17,15,17, 0,13,13,15,17, - 14,15,15,13,13,14, 0,14,14,16,14,14,17, 0,15,15, - 16,15,16, 0, 0,16, 0,17,13,13,14,17,14,15,15,14, - 15,14,16,14,17,17,16,15,16,16,17, 0, 0,14,15,15, - 0,15,16, 0,14,16,16,17,15,16, 0,16,15,17, 0,16, - 17, 0,17,17, 0, 0, 0,17, 0,15,14,16,17,15,16,16, - 17,15, 0, 0, 0, 0,17,16,16, 0, 0, 0, 0, 0,12,12, - 13,14,12,13,14,12,12,13,14,13,14,16,14,13,14,16, - 13,15,17,15,14,17, 0,15,15,16,12,13,14,15,13,13, - 15,14,14,15,15,13,14,17,16,15,17,17,15,16, 0,13, - 13,15,15,14,15,15,14,14,14,15,15,15,16,15,14,16, - 16,16,16,17, 0,17,16, 0,16, 0, 0,14,14,14,17,13, - 15,15,15,15,17,17,15,16,16,15,15, 0, 0,15, 0, 0, - 14,15,16, 0,15, 0, 0,16,17,16, 0,15,16,17,16, 0, - 0,17,17, 0, 0, 0,16, 0,17,17, 0, 0,14,16,15, 0, - 15, 0,17,15,16,16,17,15, 0, 0, 0,17, 0, 0, 0,15, - 0, -}; - -static double _vq_quantthresh_res0_128a_192_3[] = { - -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, -}; - -static long _vq_quantmap_res0_128a_192_3[] = { - 6, 5, 4, 0, 1, 2, 3, -}; - -static encode_aux_threshmatch _vq_auxt_res0_128a_192_3 = { - _vq_quantthresh_res0_128a_192_3, - _vq_quantmap_res0_128a_192_3, - 7, - 7 -}; - -static static_codebook _vq_book_res0_128a_192_3 = { - 4, 2401, - _vq_lengthlist_res0_128a_192_3, - 1, -533200896, 1611661312, 3, 0, - _vq_quantlist_res0_128a_192_3, - NULL, - &_vq_auxt_res0_128a_192_3, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_128a_192_4.vqh b/include/vorbis/book/res0_128a_192_4.vqh deleted file mode 100644 index a9458bff..00000000 --- a/include/vorbis/book/res0_128a_192_4.vqh +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_128a_192_4_VQH_ -#define _V_res0_128a_192_4_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_128a_192_4[] = { - 4, - 5, - 6, - 7, - 8, - 3, - 2, - 1, - 0, -}; - -static long _vq_lengthlist_res0_128a_192_4[] = { - 3, 4, 5, 6, 6, 4, 5, 6, 7, 4, 5, 6, 7, 7, 5, 6, - 7, 7, 6, 6, 7, 8, 9, 6, 7, 8, 9, 7, 7, 8,10,10, - 7, 8,10,10, 7, 8, 9,11,12, 8, 9,10,12, 4, 5, 6, - 7, 7, 5, 6, 7, 7, 6, 6, 7, 8, 9, 6, 7, 8, 9, 7, - 7, 8,10,10, 7, 8,10,10, 8, 8, 9,11,12, 8, 9,10, - 12, -}; - -static double _vq_quantthresh_res0_128a_192_4[] = { - -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, -}; - -static long _vq_quantmap_res0_128a_192_4[] = { - 8, 7, 6, 5, 0, 1, 2, 3, - 4, -}; - -static encode_aux_threshmatch _vq_auxt_res0_128a_192_4 = { - _vq_quantthresh_res0_128a_192_4, - _vq_quantmap_res0_128a_192_4, - 9, - 9 -}; - -static static_codebook _vq_book_res0_128a_192_4 = { - 2, 81, - _vq_lengthlist_res0_128a_192_4, - 1, -531628032, 1611661312, 4, 0, - _vq_quantlist_res0_128a_192_4, - NULL, - &_vq_auxt_res0_128a_192_4, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_128a_192_5.vqh b/include/vorbis/book/res0_128a_192_5.vqh deleted file mode 100644 index ee1071e0..00000000 --- a/include/vorbis/book/res0_128a_192_5.vqh +++ /dev/null @@ -1,115 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_128a_192_5_VQH_ -#define _V_res0_128a_192_5_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_128a_192_5[] = { - 45, - 46, - 47, - 48, - 49, - 51, - 53, - 56, - 61, - 68, - 77, - 90, - 44, - 43, - 42, - 41, - 39, - 37, - 34, - 29, - 22, - 13, - 0, -}; - -static long _vq_lengthlist_res0_128a_192_5[] = { - 5, 5, 6, 6, 6, 7, 7, 8,10,13,17, 0, 5, 6, 6, 6, - 7, 7, 8,10,13,16,20, 5, 6, 6, 7, 7, 7, 7, 8,10, - 14,17, 0, 6, 6, 7, 7, 7, 7, 8,10,13,17, 0, 6, 7, - 7, 7, 7, 7, 8, 8,10,14,20,20, 7, 7, 7, 7, 7, 8, - 8,10,14,19, 0, 7, 8, 8, 8, 8, 8, 9, 9,11,15,20, - 0, 8, 8, 8, 8, 8, 8, 9,11,15, 0, 0, 8, 8, 9, 9, - 9, 9, 9,10,12,15,18, 0, 9, 9, 9, 9, 9, 9,10,12, - 15,18, 0, 9,10,10,11,10,10,11,11,13,16, 0, 0, 9, - 10,11,10,10,11,11,13,15,18, 0,11,11,12,13,12,12, - 12,13,14,18,18, 0,11,12,12,12,12,13,13,14,18,19, - 0,13,13,14,14,14,14,14,15,16,19, 0, 0,13,14,14, - 14,14,14,14,16,19, 0, 0,14,15,15,16,17,19,18,17, - 19, 0, 0, 0,15,16,16,16,16,18,17,18,19, 0, 0,15, - 16,19,18, 0, 0, 0, 0, 0, 0, 0, 0,16,17,18,19,18, - 19,19, 0, 0, 0, 0,18,17, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 5, 6, 6, 7, 7, 7, 7, 8,10,13,17, 0, - 6, 6, 7, 7, 7, 7, 8,10,13,19, 0, 6, 7, 7, 7, 7, - 7, 8, 8,10,14, 0, 0, 7, 7, 7, 7, 7, 8, 8,10,14, - 19, 0, 7, 8, 8, 8, 8, 8, 9, 9,11,15,19, 0, 8, 8, - 8, 8, 8, 9, 9,11,15,18, 0, 8, 8, 9, 9, 9, 9, 9, - 10,12,16,19, 0, 9, 9, 9, 9, 9, 9,10,12,14,19, 0, - 9,10,10,11,10,10,11,11,13,16,18, 0, 9,10,11,10, - 10,11,11,13,15,19, 0,11,11,12,13,12,12,13,13,14, - 18, 0, 0,11,12,13,12,12,12,13,15,17, 0, 0,13,13, - 14,14,13,14,14,14,16,19, 0, 0,13,14,15,14,14,15, - 14,16,18, 0, 0,15,15,16,18,16,17,17,17,19, 0, 0, - 0,15,16,16,16,16,18,19,18, 0, 0, 0,16,17,18, 0, - 0,18, 0,19, 0, 0, 0, 0,16,18,19,19, 0,19,19, 0, - 0, 0, 0,16,17,19,19, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,19, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,19,19, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -}; - -static double _vq_quantthresh_res0_128a_192_5[] = { - -38.5, -27.5, -19.5, -13.5, -9.5, -7, -5, -3.5, - -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 5, - 7, 9.5, 13.5, 19.5, 27.5, 38.5, -}; - -static long _vq_quantmap_res0_128a_192_5[] = { - 22, 21, 20, 19, 18, 17, 16, 15, - 14, 13, 12, 0, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, -}; - -static encode_aux_threshmatch _vq_auxt_res0_128a_192_5 = { - _vq_quantthresh_res0_128a_192_5, - _vq_quantmap_res0_128a_192_5, - 23, - 23 -}; - -static static_codebook _vq_book_res0_128a_192_5 = { - 2, 529, - _vq_lengthlist_res0_128a_192_5, - 1, -524910592, 1611661312, 7, 0, - _vq_quantlist_res0_128a_192_5, - NULL, - &_vq_auxt_res0_128a_192_5, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_128a_256_1.vqh b/include/vorbis/book/res0_128a_256_1.vqh deleted file mode 100644 index 74cc6769..00000000 --- a/include/vorbis/book/res0_128a_256_1.vqh +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_128a_256_1_VQH_ -#define _V_res0_128a_256_1_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_128a_256_1[] = { - 2, - 3, - 4, - 1, - 0, -}; - -static long _vq_lengthlist_res0_128a_256_1[] = { - 2, 3, 6, 3, 6, 5, 6, 8, 6, 8, 9, 9,11, 9,11, 5, - 6, 8, 6, 8, 9, 9,10, 9,10, 6, 7, 9, 7, 8, 7, 8, - 9, 8,10,10,11,11,10,12, 7, 8, 9, 8,10,10,10,12, - 11,13,10,11,12,10,12,11,11,12,11,12,12,13,14,13, - 16,11,12,13,11,13,12,12,14,12,14, 6, 7, 8, 7, 9, - 7, 8,10, 8, 9,10,11,12,10,12, 7, 8,10, 8,10,10, - 10,12,10,11,10,11,12,11,12,10,11,13,12,12,13,13, - 13,13, 0,11,12,12,11,12,12,13,13,14,14, 7, 8,11, - 8,10, 9, 9,11, 9,11,12,12,13,12,13, 8, 9,11, 9, - 10,12,11,13,12,12, 9,10,12,10,11,10, 9,11,11,12, - 12,12,12,14,14,10,11,12,10,11,13,12,13,13,13,12, - 12,13,13,14,13,13,14,12,14, 0,14,13,16,16,13,13, - 15,13,14,14,16,15,13,14, 9,10,11,10,12,10,11,12, - 10,11,12,13,13,12,13,10,10,11,11,12,13,15,13,12, - 15,12,12,13,12,13,12,13,14,13,14,14,14, 0,14,14, - 13,13,14,13,14,14,14,16,16,15,11,13,15,14,13,13, - 13,16,12,16,14,16,16,14,16,13,15,16,13,14,16,16, - 15,15, 0,13,13,15,13,16,13,14,15,16,14, 0,15, 0, - 0, 0,15,14,15,15,15,14,16, 0,15,16,15,16,16,16, - 16,16,15,16, 0,16,16,16,14,15, 0,16, 0, 0, 0, 0, - 0, 0, 0, 0, 0,13,13,15,13,15,14,14,16,14, 0, 0, - 16, 0, 0,16,14,13,15,14,15,14,16, 0, 0, 0,14,14, - 0, 0,15,16,16,15,16, 0, 0,15, 0,15,16, 0, 0,16, - 16, 0, 0, 0, 0, 0,16, 7, 8,10, 8,10, 9,10,11, 9, - 11,11,12,12,12,12, 9,10,11,10,11,11,12,14,12,12, - 9,10,11, 9,11,10,11,12,11,12,13,12,13,12,13,10, - 10,12,11,13,13,12,13,14,14,12,12,14,12,14,12,13, - 14,12,14,14,16,15,15,16,12,13,16,12,16,13,13,14, - 14,16, 9,10,11,10,11,10,11,12,10,12,12,13,14,13, - 13,10,11,12, 9,10,12,13,14,12,12,14,12,13,12,16, - 12,13,14,13,14,13,16,14,15, 0,13,14,14,13,15,14, - 14,16,13,14,11,12,16,13,14,13,14,13,13,14,15,14, - 16,15,15,13,13,14,13,14,15, 0, 0,15, 0,13,14,15, - 16,15,13,15,16,13,15,16,14, 0,16,15,14,14,16,15, - 0,16,16, 0,16, 0,16,14, 0,15, 0,16, 0, 0,15,15, - 0, 0,15,16, 0,16, 0, 0,15, 0,16,16, 0, 0, 0,12, - 14,16,13, 0,13,14,13,16, 0, 0,16, 0,14, 0,16,14, - 0,16,16,16, 0, 0,16, 0,16,16, 0,16, 0,16,15, 0, - 0, 0,15, 0, 0, 0, 0,16,15, 0,15, 0, 0, 0, 0,14, - 14, -}; - -static double _vq_quantthresh_res0_128a_256_1[] = { - -1.5, -0.5, 0.5, 1.5, -}; - -static long _vq_quantmap_res0_128a_256_1[] = { - 4, 3, 0, 1, 2, -}; - -static encode_aux_threshmatch _vq_auxt_res0_128a_256_1 = { - _vq_quantthresh_res0_128a_256_1, - _vq_quantmap_res0_128a_256_1, - 5, - 5 -}; - -static static_codebook _vq_book_res0_128a_256_1 = { - 4, 625, - _vq_lengthlist_res0_128a_256_1, - 1, -533725184, 1611661312, 3, 0, - _vq_quantlist_res0_128a_256_1, - NULL, - &_vq_auxt_res0_128a_256_1, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_128a_256_2.vqh b/include/vorbis/book/res0_128a_256_2.vqh deleted file mode 100644 index c7fa2229..00000000 --- a/include/vorbis/book/res0_128a_256_2.vqh +++ /dev/null @@ -1,75 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_128a_256_2_VQH_ -#define _V_res0_128a_256_2_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_128a_256_2[] = { - 6, - 7, - 8, - 9, - 10, - 12, - 5, - 4, - 3, - 2, - 0, -}; - -static long _vq_lengthlist_res0_128a_256_2[] = { - 3, 4, 5, 6, 6, 7, 4, 5, 6, 6, 7, 5, 5, 6, 6, 7, - 8, 5, 6, 6, 7, 8, 6, 7, 7, 8, 8, 9, 7, 7, 8, 8, - 9, 8, 8, 8, 9, 9,10, 8, 8, 9, 9,10, 9, 9, 9,10, - 10,10, 9, 9,10,10,10,10,11,11,11,11,12,11,11,11, - 11,12, 5, 5, 6, 6, 7, 8, 5, 6, 6, 7, 8, 6, 6, 7, - 8, 8, 9, 6, 7, 8, 8, 9, 8, 8, 8, 9, 9,10, 8, 8, - 9, 9,10, 9, 9, 9,10,10,10, 9, 9,10,10,10,10,10, - 11,11,11,12,10,11,11,11,12, -}; - -static double _vq_quantthresh_res0_128a_256_2[] = { - -5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, - 3.5, 5, -}; - -static long _vq_quantmap_res0_128a_256_2[] = { - 10, 9, 8, 7, 6, 0, 1, 2, - 3, 4, 5, -}; - -static encode_aux_threshmatch _vq_auxt_res0_128a_256_2 = { - _vq_quantthresh_res0_128a_256_2, - _vq_quantmap_res0_128a_256_2, - 11, - 11 -}; - -static static_codebook _vq_book_res0_128a_256_2 = { - 2, 121, - _vq_lengthlist_res0_128a_256_2, - 1, -531103744, 1611661312, 4, 0, - _vq_quantlist_res0_128a_256_2, - NULL, - &_vq_auxt_res0_128a_256_2, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_128a_256_3.vqh b/include/vorbis/book/res0_128a_256_3.vqh deleted file mode 100644 index 596df5e2..00000000 --- a/include/vorbis/book/res0_128a_256_3.vqh +++ /dev/null @@ -1,86 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_128a_256_3_VQH_ -#define _V_res0_128a_256_3_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_128a_256_3[] = { - 11, - 12, - 13, - 14, - 15, - 17, - 19, - 22, - 10, - 9, - 8, - 7, - 5, - 3, - 0, -}; - -static long _vq_lengthlist_res0_128a_256_3[] = { - 6, 6, 6, 7, 7, 7, 7, 8, 6, 6, 7, 7, 7, 7, 8, 6, - 7, 7, 7, 7, 7, 7, 8, 7, 7, 7, 7, 7, 7, 8, 7, 7, - 7, 8, 7, 7, 8, 9, 7, 7, 8, 7, 7, 8, 9, 8, 8, 8, - 8, 8, 8, 8, 9, 8, 8, 8, 8, 8, 8, 9, 8, 8, 8, 8, - 8, 8, 8, 9, 8, 8, 8, 8, 8, 8, 9, 8, 8, 8, 8, 8, - 8, 8, 9, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 8, - 9, 9, 9, 9, 9, 8, 8, 9, 9, 9,10,10,10, 9, 9, 9, - 10,10,10,10, 9, 9,10,10, 6, 7, 7, 7, 7, 7, 7, 8, - 7, 7, 7, 7, 7, 7, 8, 7, 7, 7, 8, 7, 7, 8, 9, 7, - 7, 8, 7, 7, 8, 9, 8, 8, 8, 8, 8, 8, 8, 9, 8, 8, - 8, 8, 8, 8, 9, 8, 8, 8, 8, 8, 8, 8, 9, 8, 8, 8, - 8, 8, 8, 9, 8, 8, 8, 8, 8, 8, 8, 9, 8, 8, 8, 8, - 8, 8, 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 8, - 9, 9, 9, 9,10,10, 9, 9,10,10,10,10,10, 9, 9,10, - 10, -}; - -static double _vq_quantthresh_res0_128a_256_3[] = { - -9.5, -7, -5, -3.5, -2.5, -1.5, -0.5, 0.5, - 1.5, 2.5, 3.5, 5, 7, 9.5, -}; - -static long _vq_quantmap_res0_128a_256_3[] = { - 14, 13, 12, 11, 10, 9, 8, 0, - 1, 2, 3, 4, 5, 6, 7, -}; - -static encode_aux_threshmatch _vq_auxt_res0_128a_256_3 = { - _vq_quantthresh_res0_128a_256_3, - _vq_quantmap_res0_128a_256_3, - 15, - 15 -}; - -static static_codebook _vq_book_res0_128a_256_3 = { - 2, 225, - _vq_lengthlist_res0_128a_256_3, - 1, -529137664, 1611661312, 5, 0, - _vq_quantlist_res0_128a_256_3, - NULL, - &_vq_auxt_res0_128a_256_3, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_128a_256_4.vqh b/include/vorbis/book/res0_128a_256_4.vqh deleted file mode 100644 index 3ad345ff..00000000 --- a/include/vorbis/book/res0_128a_256_4.vqh +++ /dev/null @@ -1,100 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_128a_256_4_VQH_ -#define _V_res0_128a_256_4_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_128a_256_4[] = { - 23, - 24, - 25, - 26, - 27, - 29, - 31, - 34, - 39, - 46, - 22, - 21, - 20, - 19, - 17, - 15, - 12, - 7, - 0, -}; - -static long _vq_lengthlist_res0_128a_256_4[] = { - 7, 7, 8, 8, 8, 7, 8, 8, 8,11, 7, 8, 8, 7, 7, 8, - 8, 8,11, 8, 8, 8, 8, 8, 8, 8, 8, 8,11, 8, 8, 8, - 8, 8, 8, 8, 8,11, 8, 8, 8, 8, 8, 8, 8, 8, 9,12, - 8, 8, 8, 8, 8, 8, 8, 9,11, 8, 8, 8, 9, 8, 8, 8, - 8, 9,11, 8, 8, 9, 8, 8, 8, 8, 9,12, 8, 8, 8, 8, - 8, 8, 8, 8, 8,11, 8, 8, 8, 8, 8, 8, 8, 9,11, 8, - 8, 8, 8, 8, 8, 8, 8, 8,11, 8, 8, 8, 8, 8, 8, 8, - 8,11, 8, 8, 8, 9, 8, 8, 8, 8, 9,12, 8, 8, 9, 8, - 8, 8, 8, 9,11, 9, 9, 9, 9, 9, 8, 8, 8, 9,12, 9, - 9, 9, 9, 8, 8, 8, 9,12,10,10,10,10,10, 9,10,10, - 11,13,10,10,10,10, 9, 9,10,11,13,13,12,13,13,12, - 12,12,12,13,16,12,13,13,12,12,13,12,13,15, 8, 8, - 8, 8, 8, 8, 8, 8, 9,11, 8, 8, 8, 8, 8, 8, 8, 8, - 11, 8, 8, 8, 8, 8, 8, 8, 8, 9,12, 8, 8, 8, 8, 8, - 8, 8, 9,11, 8, 8, 8, 8, 8, 8, 8, 8, 9,12, 8, 8, - 8, 8, 8, 8, 8, 9,11, 8, 8, 8, 8, 8, 8, 8, 8, 9, - 11, 8, 8, 8, 8, 8, 8, 8, 8,11, 8, 8, 8, 8, 8, 8, - 8, 8, 8,11, 8, 8, 8, 8, 7, 8, 8, 8,11, 8, 8, 8, - 9, 8, 8, 8, 8, 9,11, 8, 8, 8, 8, 8, 8, 8, 9,11, - 9, 9, 9, 9, 9, 8, 8, 8, 9,12, 9, 9, 9, 8, 8, 8, - 8, 9,12,10,10,10,10,10, 9,10,10,11,13,10,10,10, - 10, 9, 9,10,11,13,12,12,12,13,13,12,12,12,13,14, - 12,13,13,12,12,12,13,13,16, -}; - -static double _vq_quantthresh_res0_128a_256_4[] = { - -19.5, -13.5, -9.5, -7, -5, -3.5, -2.5, -1.5, - -0.5, 0.5, 1.5, 2.5, 3.5, 5, 7, 9.5, - 13.5, 19.5, -}; - -static long _vq_quantmap_res0_128a_256_4[] = { - 18, 17, 16, 15, 14, 13, 12, 11, - 10, 0, 1, 2, 3, 4, 5, 6, - 7, 8, 9, -}; - -static encode_aux_threshmatch _vq_auxt_res0_128a_256_4 = { - _vq_quantthresh_res0_128a_256_4, - _vq_quantmap_res0_128a_256_4, - 19, - 19 -}; - -static static_codebook _vq_book_res0_128a_256_4 = { - 2, 361, - _vq_lengthlist_res0_128a_256_4, - 1, -526974976, 1611661312, 6, 0, - _vq_quantlist_res0_128a_256_4, - NULL, - &_vq_auxt_res0_128a_256_4, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_128a_256_5.vqh b/include/vorbis/book/res0_128a_256_5.vqh deleted file mode 100644 index ed32a2bf..00000000 --- a/include/vorbis/book/res0_128a_256_5.vqh +++ /dev/null @@ -1,133 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_128a_256_5_VQH_ -#define _V_res0_128a_256_5_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_128a_256_5[] = { - 88, - 89, - 90, - 91, - 92, - 94, - 96, - 99, - 104, - 111, - 120, - 133, - 151, - 176, - 87, - 86, - 85, - 84, - 82, - 80, - 77, - 72, - 65, - 56, - 43, - 25, - 0, -}; - -static long _vq_lengthlist_res0_128a_256_5[] = { - 6, 7, 7, 7, 7, 7, 7, 7, 8,11, 9,11,13, 0, 6, 7, - 8, 7, 7, 7, 7, 8,11, 9,12,15,13, 7, 7, 7, 8, 8, - 8, 8, 8, 9,11, 9,13,15, 0, 7, 7, 8, 8, 8, 8, 8, - 9,11, 9,13,13, 0, 7, 8, 8, 9, 8, 8, 9, 8, 9,11, - 10,12,14, 0, 8, 8, 9, 8, 8, 8, 8, 9,11,10,12, 0, - 0, 8, 9, 9, 9, 9, 9, 9, 9, 9,11,11,12, 0, 0, 9, - 8, 9, 9, 8, 9, 9,10,12,10,13, 0, 0, 8, 8, 8, 8, - 8, 8, 8, 8, 9,12,10, 0, 0, 0, 8, 8, 9, 8, 8, 8, - 8,10,11,10, 0, 0, 0, 8, 8, 8, 9, 8, 8, 8, 8, 9, - 12,11,14,14, 0, 8, 8, 9, 9, 8, 8, 9, 9,11,10,13, - 0, 0, 9, 8, 9, 9, 9, 9, 9, 8,10,14,12,14, 0, 0, - 8, 9, 9, 8, 8, 9, 9,10,13,10,13, 0, 0, 9, 9, 9, - 10, 9, 9, 9, 9,10,13,11,13, 0, 0, 9, 9,10, 9, 9, - 9, 9,10,13,11,14, 0, 0, 9,10,10,10,10,10,10,10, - 11, 0,11,14, 0, 0,10,10,10,10,10,10,10,11,13,11, - 0, 0, 0,10,11,11,13,11,11,12,13,12, 0,14, 0, 0, - 0,11,11,13,12,12,12,11, 0,14,14, 0, 0, 0,10,10, - 11,10,10,10,10,10,13,13, 0, 0, 0, 0,10,10,11,10, - 10,11,11,11,13, 0, 0, 0, 0,11,12,13,14, 0, 0,14, - 14, 0, 0, 0, 0, 0, 0,13,11,13,13, 0, 0,14,14,14, - 0, 0, 0, 0,12,14,14,14, 0,14, 0,14, 0, 0, 0, 0, - 0, 0,13,14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,13,14, 0, - 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 8, 8, 8, - 8, 8, 9,10,10,14, 0, 0, 7, 8, 8, 8, 8, 8, 8, 9, - 11,10,12, 0, 0, 8, 7, 8, 8, 8, 8, 8, 8, 9,11,10, - 0, 0, 0, 8, 8, 9, 8, 8, 8, 8, 9,11,11,14,14, 0, - 8, 8, 8, 9, 8, 8, 8, 9,10,11,10,14, 0, 0, 8, 8, - 9, 9, 8, 9, 9, 9,11,11, 0, 0, 0, 8, 8, 8, 9, 8, - 8, 8, 8, 9,13,10, 0, 0, 0, 8, 8, 9, 8, 8, 8, 8, - 10,11,10,14,13, 0, 8, 8, 9, 8, 8, 8, 9, 9, 9,12, - 11, 0, 0, 0, 9, 8, 9, 8, 8, 8, 9, 9,13,11,14, 0, - 0, 8, 8, 9, 9, 9, 8, 9, 8,10,12,11,14, 0, 0, 8, - 9, 9, 9, 9,10, 9,10,12,10,14, 0, 0, 8, 9, 9, 9, - 9, 9, 9, 9,10,13,11, 0, 0, 0, 9, 9, 9, 9, 9, 9, - 9,10,12,10, 0, 0, 0, 9,10,10,11,10,10,10,10,12, - 13,12, 0, 0, 0, 9, 9,10,12,10,10,10,12,14,12, 0, - 0, 0,10,11,11,12,11,12,12,13,13,13,13, 0, 0, 0, - 11,13,11,11,12,12,12,13,14,13,13, 0, 0,10,10,11, - 10,11,10,11,10,12,13, 0, 0, 0, 0,10,10,10,11,12, - 10,11,11,13, 0, 0, 0, 0,10,13,13,13,14, 0,14,12, - 0, 0, 0, 0, 0, 0,10,12,13, 0,13,13,12,14,14, 0, - 0, 0, 0,12,12,14, 0,14, 0, 0, 0, 0, 0, 0, 0, 0, - 0,12,14,14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,14, - 0,14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,13, 0, 0, 0, - 14, 0, 0, 0, 0, 0, 0, 0, 0, -}; - -static double _vq_quantthresh_res0_128a_256_5[] = { - -75.5, -54, -38.5, -27.5, -19.5, -13.5, -9.5, -7, - -5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, - 3.5, 5, 7, 9.5, 13.5, 19.5, 27.5, 38.5, - 54, 75.5, -}; - -static long _vq_quantmap_res0_128a_256_5[] = { - 26, 25, 24, 23, 22, 21, 20, 19, - 18, 17, 16, 15, 14, 0, 1, 2, - 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, -}; - -static encode_aux_threshmatch _vq_auxt_res0_128a_256_5 = { - _vq_quantthresh_res0_128a_256_5, - _vq_quantmap_res0_128a_256_5, - 27, - 27 -}; - -static static_codebook _vq_book_res0_128a_256_5 = { - 2, 729, - _vq_lengthlist_res0_128a_256_5, - 1, -522846208, 1611661312, 8, 0, - _vq_quantlist_res0_128a_256_5, - NULL, - &_vq_auxt_res0_128a_256_5, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_128a_350_1.vqh b/include/vorbis/book/res0_128a_350_1.vqh deleted file mode 100644 index 98660fea..00000000 --- a/include/vorbis/book/res0_128a_350_1.vqh +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_128a_350_1_VQH_ -#define _V_res0_128a_350_1_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_128a_350_1[] = { - 2, - 3, - 4, - 1, - 0, -}; - -static long _vq_lengthlist_res0_128a_350_1[] = { - 2, 5,10, 5,10, 5, 7, 0, 7, 9,10, 8, 0,10, 0, 5, - 7, 8, 7,10, 8,10, 0,10, 0, 5, 8, 0, 9,10, 7, 0, - 10, 8, 9,10, 0, 0,10, 0, 6, 7, 0,10,10, 8, 8, 0, - 10, 0,10,10, 0, 9,10,10,10, 0, 0, 0,10, 0, 0, 0, - 0, 0, 0, 0,10,10,10, 0, 0, 0, 0, 6, 7, 9, 8, 9, - 6,10,10, 7,10, 9,10, 0,10, 0, 9, 8,10,10,10, 8, - 0, 0,10, 0, 9,10,10, 0,10, 9, 0,10,10, 0,10, 0, - 0, 0, 0,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 9, 9, - 8, 0, 7, 8, 0, 0, 0, 9,10,10, 0, 0, 8,10, 0, 9, - 0,10, 0, 0, 0, 0, 8,10, 0, 9, 0, 0, 0, 0,10, 0, - 0, 0, 0, 0, 0, 8,10, 0, 7, 0,10, 0, 0, 9, 0, 0, - 0, 0,10, 0, 0,10, 0, 9, 0, 0, 9, 0,10, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 6, 8, 0, 8, 0, 7, 0, 0, - 8, 0,10,10, 0, 0, 0, 9,10, 8, 0, 0, 0, 0, 0, 0, - 0, 0,10,10, 0, 0, 9, 8, 0, 0, 0,10, 0, 0, 0, 0, - 10, 0,10, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 9, - 0, 0, 0, 0, 0, 0, 0,10, 0, 9,10, 0, 0,10, 8, 9, - 0, 0, 0, 9, 0, 0, 0, 0,10, 0, 0, 0, 0,10,10, 0, - 0, 0, 0, 0, 0, 0, 0,10, 0, 0, 0, 0,10, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, - 10, 0, 0,10, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 5,10, 0, 8, 0, 8,10,10, 8, - 0, 0, 0, 0, 0, 0, 9, 9, 0,10, 0, 0, 0, 9, 9, 0, - 6, 8, 0, 9, 0, 7, 0, 0, 7, 9, 9, 0, 9, 8, 0, 7, - 7, 0, 9, 9, 0, 0, 0, 9, 0, 9, 0, 0, 8, 9, 0, 9, - 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 8, 9, 0, 0, 0, - 0, 0, 7, 0, 0, 0, 0, 8, 8, 0, 0, 0, 8, 0, 0, 0, - 0, 0, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 9, 9, 8, - 0, 0, 0, 0, 8, 9, 9, 0, 0, 9, 0, 0, 0, 0, 8, 0, - 0, 8, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 9, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, - 0, -}; - -static double _vq_quantthresh_res0_128a_350_1[] = { - -1.5, -0.5, 0.5, 1.5, -}; - -static long _vq_quantmap_res0_128a_350_1[] = { - 4, 3, 0, 1, 2, -}; - -static encode_aux_threshmatch _vq_auxt_res0_128a_350_1 = { - _vq_quantthresh_res0_128a_350_1, - _vq_quantmap_res0_128a_350_1, - 5, - 5 -}; - -static static_codebook _vq_book_res0_128a_350_1 = { - 4, 625, - _vq_lengthlist_res0_128a_350_1, - 1, -533725184, 1611661312, 3, 0, - _vq_quantlist_res0_128a_350_1, - NULL, - &_vq_auxt_res0_128a_350_1, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_128a_350_2.vqh b/include/vorbis/book/res0_128a_350_2.vqh deleted file mode 100644 index 119727c8..00000000 --- a/include/vorbis/book/res0_128a_350_2.vqh +++ /dev/null @@ -1,75 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_128a_350_2_VQH_ -#define _V_res0_128a_350_2_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_128a_350_2[] = { - 6, - 7, - 8, - 9, - 10, - 12, - 5, - 4, - 3, - 2, - 0, -}; - -static long _vq_lengthlist_res0_128a_350_2[] = { - 5, 5, 5, 6, 6, 6, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, - 7, 6, 6, 6, 7, 7, 6, 6, 7, 7, 7, 8, 6, 7, 7, 7, - 8, 7, 7, 8, 8, 8, 8, 7, 7, 8, 8, 8, 7, 7, 8, 8, - 8, 8, 7, 8, 8, 8, 9, 8, 8, 8, 9, 9, 8, 8, 8, 9, - 9, 9, 6, 6, 6, 6, 7, 7, 6, 6, 7, 7, 7, 6, 6, 7, - 7, 7, 8, 7, 7, 7, 7, 8, 7, 7, 8, 8, 8, 8, 7, 7, - 8, 8, 8, 7, 7, 8, 8, 8, 8, 7, 8, 8, 8, 8, 8, 8, - 9, 9, 9, 9, 8, 8, 9, 8, 9, -}; - -static double _vq_quantthresh_res0_128a_350_2[] = { - -5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, - 3.5, 5, -}; - -static long _vq_quantmap_res0_128a_350_2[] = { - 10, 9, 8, 7, 6, 0, 1, 2, - 3, 4, 5, -}; - -static encode_aux_threshmatch _vq_auxt_res0_128a_350_2 = { - _vq_quantthresh_res0_128a_350_2, - _vq_quantmap_res0_128a_350_2, - 11, - 11 -}; - -static static_codebook _vq_book_res0_128a_350_2 = { - 2, 121, - _vq_lengthlist_res0_128a_350_2, - 1, -531103744, 1611661312, 4, 0, - _vq_quantlist_res0_128a_350_2, - NULL, - &_vq_auxt_res0_128a_350_2, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_128a_350_3.vqh b/include/vorbis/book/res0_128a_350_3.vqh deleted file mode 100644 index af4b9214..00000000 --- a/include/vorbis/book/res0_128a_350_3.vqh +++ /dev/null @@ -1,86 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_128a_350_3_VQH_ -#define _V_res0_128a_350_3_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_128a_350_3[] = { - 11, - 12, - 13, - 14, - 15, - 17, - 19, - 22, - 10, - 9, - 8, - 7, - 5, - 3, - 0, -}; - -static long _vq_lengthlist_res0_128a_350_3[] = { - 6, 6, 7, 7, 7, 7, 7, 8, 6, 7, 7, 7, 7, 7, 8, 7, - 7, 7, 7, 7, 7, 8, 8, 7, 7, 7, 7, 7, 8, 8, 7, 7, - 7, 8, 7, 7, 8, 9, 7, 7, 8, 7, 7, 8, 9, 8, 8, 8, - 8, 8, 8, 8, 9, 8, 8, 8, 8, 8, 8, 9, 7, 8, 8, 8, - 7, 8, 8, 9, 7, 8, 8, 7, 8, 8, 9, 8, 8, 8, 8, 8, - 8, 8, 9, 8, 8, 8, 8, 8, 8, 9, 8, 8, 8, 9, 8, 8, - 9,10, 8, 9, 9, 8, 8, 9,10, 9, 9,10,10, 9, 9,10, - 10, 9,10,10, 9, 9,10,10, 7, 7, 7, 7, 7, 7, 8, 8, - 7, 7, 7, 7, 7, 8, 8, 7, 7, 7, 8, 7, 7, 8, 9, 7, - 7, 8, 7, 7, 8, 9, 8, 8, 8, 8, 8, 8, 8, 9, 8, 8, - 8, 8, 8, 8, 9, 7, 8, 8, 8, 7, 8, 8, 9, 7, 8, 8, - 8, 8, 8, 9, 8, 8, 8, 8, 8, 8, 8, 9, 8, 8, 8, 8, - 8, 8, 9, 8, 8, 9, 9, 8, 8, 9,10, 8, 8, 9, 8, 8, - 9,10, 9, 9,10,10, 9, 9,10,10, 9,10,10, 9, 9,10, - 10, -}; - -static double _vq_quantthresh_res0_128a_350_3[] = { - -9.5, -7, -5, -3.5, -2.5, -1.5, -0.5, 0.5, - 1.5, 2.5, 3.5, 5, 7, 9.5, -}; - -static long _vq_quantmap_res0_128a_350_3[] = { - 14, 13, 12, 11, 10, 9, 8, 0, - 1, 2, 3, 4, 5, 6, 7, -}; - -static encode_aux_threshmatch _vq_auxt_res0_128a_350_3 = { - _vq_quantthresh_res0_128a_350_3, - _vq_quantmap_res0_128a_350_3, - 15, - 15 -}; - -static static_codebook _vq_book_res0_128a_350_3 = { - 2, 225, - _vq_lengthlist_res0_128a_350_3, - 1, -529137664, 1611661312, 5, 0, - _vq_quantlist_res0_128a_350_3, - NULL, - &_vq_auxt_res0_128a_350_3, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_128a_350_4.vqh b/include/vorbis/book/res0_128a_350_4.vqh deleted file mode 100644 index 07ca74dd..00000000 --- a/include/vorbis/book/res0_128a_350_4.vqh +++ /dev/null @@ -1,100 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_128a_350_4_VQH_ -#define _V_res0_128a_350_4_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_128a_350_4[] = { - 23, - 24, - 25, - 26, - 27, - 29, - 31, - 34, - 39, - 46, - 22, - 21, - 20, - 19, - 17, - 15, - 12, - 7, - 0, -}; - -static long _vq_lengthlist_res0_128a_350_4[] = { - 7, 8, 8, 8, 8, 8, 8, 8, 8,10, 8, 8, 8, 8, 8, 8, - 8, 8,10, 8, 8, 8, 8, 8, 8, 8, 8, 8,10, 8, 8, 8, - 8, 8, 8, 8, 8,10, 8, 8, 8, 8, 8, 8, 8, 8, 9,10, - 8, 8, 8, 8, 8, 8, 8, 8,10, 8, 8, 8, 9, 8, 8, 8, - 8, 9,10, 8, 8, 9, 8, 8, 8, 8, 9,10, 8, 8, 8, 8, - 8, 8, 8, 8, 8,10, 8, 8, 8, 8, 8, 8, 8, 8,10, 8, - 8, 8, 8, 8, 8, 8, 8, 8,10, 8, 8, 8, 8, 8, 8, 8, - 8,10, 8, 9, 9, 9, 8, 8, 8, 8, 8,10, 9, 9, 9, 8, - 8, 8, 8, 8,10, 9, 9, 9, 9, 9, 8, 8, 8, 9,10, 9, - 9, 9, 9, 8, 8, 8, 9,10,10,10,10,10,10, 9, 9, 9, - 10,11,10,10,10,10, 9, 9, 9,10,11,12,12,12,12,12, - 12,12,12,12,13,12,12,12,12,12,12,12,12,13, 8, 8, - 8, 8, 8, 8, 8, 8, 8,10, 8, 8, 8, 8, 8, 8, 8, 8, - 10, 8, 8, 8, 8, 8, 8, 8, 8, 8,10, 8, 8, 8, 8, 8, - 8, 8, 8,10, 8, 8, 8, 9, 8, 8, 8, 8, 9,10, 8, 8, - 9, 8, 8, 8, 8, 9,10, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 10, 8, 8, 8, 8, 8, 8, 8, 8,10, 8, 8, 8, 8, 8, 8, - 8, 8, 8,10, 8, 8, 8, 8, 8, 8, 8, 8,10, 8, 9, 9, - 9, 8, 8, 8, 8, 8,10, 9, 9, 9, 8, 8, 8, 8, 8,10, - 9, 9, 9, 9, 9, 8, 8, 8, 9,10, 9, 9, 9, 9, 8, 8, - 8, 9,10,10,10,10,10,10, 9, 9, 9,10,11,10,10,10, - 10,10, 9, 9,10,11,12,12,12,12,12,12,12,12,12,13, - 12,12,12,12,12,12,12,12,13, -}; - -static double _vq_quantthresh_res0_128a_350_4[] = { - -19.5, -13.5, -9.5, -7, -5, -3.5, -2.5, -1.5, - -0.5, 0.5, 1.5, 2.5, 3.5, 5, 7, 9.5, - 13.5, 19.5, -}; - -static long _vq_quantmap_res0_128a_350_4[] = { - 18, 17, 16, 15, 14, 13, 12, 11, - 10, 0, 1, 2, 3, 4, 5, 6, - 7, 8, 9, -}; - -static encode_aux_threshmatch _vq_auxt_res0_128a_350_4 = { - _vq_quantthresh_res0_128a_350_4, - _vq_quantmap_res0_128a_350_4, - 19, - 19 -}; - -static static_codebook _vq_book_res0_128a_350_4 = { - 2, 361, - _vq_lengthlist_res0_128a_350_4, - 1, -526974976, 1611661312, 6, 0, - _vq_quantlist_res0_128a_350_4, - NULL, - &_vq_auxt_res0_128a_350_4, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/res0_128a_350_5.vqh b/include/vorbis/book/res0_128a_350_5.vqh deleted file mode 100644 index 632c9cd9..00000000 --- a/include/vorbis/book/res0_128a_350_5.vqh +++ /dev/null @@ -1,133 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by vq/somethingorother - - ********************************************************************/ - -#ifndef _V_res0_128a_350_5_VQH_ -#define _V_res0_128a_350_5_VQH_ -#include "vorbis/codebook.h" - -static long _vq_quantlist_res0_128a_350_5[] = { - 88, - 89, - 90, - 91, - 92, - 94, - 96, - 99, - 104, - 111, - 120, - 133, - 151, - 176, - 87, - 86, - 85, - 84, - 82, - 80, - 77, - 72, - 65, - 56, - 43, - 25, - 0, -}; - -static long _vq_lengthlist_res0_128a_350_5[] = { - 7, 7, 8, 8, 8, 8, 8, 8, 8, 9, 9,11,11,11, 7, 8, - 8, 8, 8, 8, 8, 8, 9, 9,11,13,12, 7, 8, 8, 9, 8, - 8, 8, 8, 8,10,10,12,13,14, 8, 8, 8, 8, 8, 8, 8, - 8, 9, 9,12,13,14, 8, 8, 9, 9, 8, 8, 8, 8, 8,10, - 10,12,15,14, 8, 9, 9, 8, 8, 8, 8, 8,10,10,12,14, - 13, 9, 9, 9, 9, 9, 8, 8, 8, 9,10,10,13,14,15, 9, - 9, 9, 9, 8, 9, 8, 9,10,10,12,15,16, 8, 8, 9, 9, - 8, 8, 8, 8, 8,10,10,12,14,14, 8, 9, 9, 8, 8, 8, - 8, 8,10, 9,12,14,17, 8, 8, 9, 9, 8, 8, 8, 8, 8, - 10,10,12,14,16, 9, 9, 9, 8, 8, 8, 8, 8,10, 9,12, - 14, 0, 9, 9, 9, 9, 8, 8, 8, 8, 8,10,10,13,14,15, - 9, 9, 9, 9, 8, 8, 8, 8,10, 9,12,15,16, 9, 9, 9, - 9, 9, 9, 8, 8, 9,10,10,12,14,15, 9, 9, 9, 9, 8, - 8, 8, 9,10,10,12,14, 0,10,10,10,10,10, 9,10, 9, - 10,11,11,14, 0, 0,10,10,10,10, 9,10, 9,10,11,11, - 13,17, 0,11,11,11,12,12,11,11,11,11,13,12,14,16, - 17,11,12,11,12,11,12,11,12,12,12,15,17, 0,11,11, - 11,12,12,11,12,11,12,13,14,16, 0, 0,11,12,12,12, - 11,11,11,12,13,14,17, 0, 0,12,13,13,13,14,14,14, - 14,14,14, 0, 0, 0, 0,13,13,13,14,13,14,14,13,15, - 16,16, 0, 0,13,15,16,17,15,17,17,16, 0,17, 0, 0, - 0, 0,13,15,15,15,15,16,15,16,17, 0,16, 0, 0,12, - 14,15, 0, 0,17,16,15,16, 0, 0, 0, 0, 0,14,16,17, - 16,16,15,15,15,17,17, 0, 0, 0, 8, 8, 8, 8, 8, 8, - 8, 8, 8,10,10,12,13,14, 8, 8, 9, 8, 8, 8, 8, 8, - 9, 9,12,14,14, 8, 8, 9, 9, 8, 8, 8, 8, 8,10,10, - 12,14,14, 8, 9, 9, 8, 8, 8, 8, 8,10,10,12,14,15, - 9, 9, 9, 9, 9, 9, 8, 8, 9,10,10,13,14,17, 9, 9, - 9, 8, 8, 8, 8, 9,10,10,12,15,16, 8, 8, 9, 9, 8, - 8, 8, 8, 8,10,10,12,14,16, 8, 9, 9, 8, 8, 8, 8, - 8,10, 9,12,14,16, 8, 8, 9, 9, 8, 8, 8, 8, 8,10, - 10,12,15,15, 9, 9, 9, 8, 8, 8, 8, 8, 9, 9,11,14, - 16, 9, 9, 9, 9, 9, 8, 8, 8, 8,10,10,12,15,16, 9, - 9, 9, 9, 8, 8, 8, 8,10,10,12,14,15, 9, 9, 9, 9, - 9, 8, 8, 8, 9,10,10,12,14,16, 9, 9, 9, 9, 8, 8, - 8, 9,10,10,12,15,15,10,10,10,10,10, 9, 9, 9,10, - 11,11,13,15,17,10,10,10,10, 9, 9, 9,10,11,11,13, - 17,17,11,11,12,11,12,11,11,11,12,13,13,15,17, 0, - 11,11,12,11,11,11,11,11,12,12,15,17,17,11,12,11, - 12,11,11,11,11,12,13,15, 0, 0, 0,11,12,12,12,11, - 12,12,12,12,14,16, 0, 0,13,13,13,13,15,14,14,14, - 14,14,16,17, 0, 0,13,14,15,14,14,14,14,14,15,16, - 0, 0, 0,13,14,16,15,15, 0,17,15,17,17, 0, 0, 0, - 0,15,15,16,15,15,16,16,16,17,17,17, 0, 0,13,15, - 17,17,16,15,17,16,16, 0, 0, 0, 0, 0,14,16,15,16, - 16,15,15,14,17,16, 0, 0, 0, -}; - -static double _vq_quantthresh_res0_128a_350_5[] = { - -75.5, -54, -38.5, -27.5, -19.5, -13.5, -9.5, -7, - -5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, - 3.5, 5, 7, 9.5, 13.5, 19.5, 27.5, 38.5, - 54, 75.5, -}; - -static long _vq_quantmap_res0_128a_350_5[] = { - 26, 25, 24, 23, 22, 21, 20, 19, - 18, 17, 16, 15, 14, 0, 1, 2, - 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, -}; - -static encode_aux_threshmatch _vq_auxt_res0_128a_350_5 = { - _vq_quantthresh_res0_128a_350_5, - _vq_quantmap_res0_128a_350_5, - 27, - 27 -}; - -static static_codebook _vq_book_res0_128a_350_5 = { - 2, 729, - _vq_lengthlist_res0_128a_350_5, - 1, -522846208, 1611661312, 8, 0, - _vq_quantlist_res0_128a_350_5, - NULL, - &_vq_auxt_res0_128a_350_5, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/resaux0_1024a_128.vqh b/include/vorbis/book/resaux0_1024a_128.vqh deleted file mode 100644 index d458b846..00000000 --- a/include/vorbis/book/resaux0_1024a_128.vqh +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by huff/huffbuld - - ********************************************************************/ - -#ifndef _V_resaux0_1024a_128_VQH_ -#define _V_resaux0_1024a_128_VQH_ -#include "vorbis/codebook.h" - -static long _huff_lengthlist_resaux0_1024a_128[] = { - 2, 6,12,10,14,11,18,11,13,15, 5, 3, 5, 6, 8, 8, - 12, 8,10,12,10, 5, 4, 5, 7, 8,12, 9,12,15, 9, 5, - 5, 5, 6, 6,11, 7,10,13,13, 7, 7, 6, 7, 8,11, 9, - 12,16,10, 7, 7, 6, 8, 7,11, 7, 9,13,17,12,12,11, - 11,11,14,12,15,18, 9, 7, 8, 6, 8, 6,11, 6, 7,11, - 10, 9, 9, 8, 9, 7,10, 6, 7,10,12,11,12,10,10, 8, - 11, 7, 8,11, -}; - -static static_codebook _huff_book_resaux0_1024a_128 = { - 2, 100, - _huff_lengthlist_resaux0_1024a_128, - 0, 0, 0, 0, 0, - NULL, - NULL, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/resaux0_1024a_160.vqh b/include/vorbis/book/resaux0_1024a_160.vqh deleted file mode 100644 index 9764826a..00000000 --- a/include/vorbis/book/resaux0_1024a_160.vqh +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by huff/huffbuld - - ********************************************************************/ - -#ifndef _V_resaux0_1024a_160_VQH_ -#define _V_resaux0_1024a_160_VQH_ -#include "vorbis/codebook.h" - -static long _huff_lengthlist_resaux0_1024a_160[] = { - 2, 6,13,11,15,11,16,11,13,15, 5, 4, 7, 7, 9, 9, - 12, 9,11,13,11, 6, 6, 7, 7, 9,10,10,13,15, 9, 6, - 7, 6, 7, 8, 9, 8,10,13,13, 8, 6, 6, 4, 6, 6, 7, - 11,14,10, 8, 8, 7, 6, 7, 7, 6,10,13,16,11, 9, 9, - 6, 7, 7, 6,10,14, 9, 8, 9, 7, 6, 6, 6, 4, 6,10, - 10, 9,11, 9, 9, 8, 9, 5, 5, 7,12,11,13,11,12,11, - 11, 8, 6, 8, -}; - -static static_codebook _huff_book_resaux0_1024a_160 = { - 2, 100, - _huff_lengthlist_resaux0_1024a_160, - 0, 0, 0, 0, 0, - NULL, - NULL, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/resaux0_1024a_192.vqh b/include/vorbis/book/resaux0_1024a_192.vqh deleted file mode 100644 index f6e0e58e..00000000 --- a/include/vorbis/book/resaux0_1024a_192.vqh +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by huff/huffbuld - - ********************************************************************/ - -#ifndef _V_resaux0_1024a_192_VQH_ -#define _V_resaux0_1024a_192_VQH_ -#include "vorbis/codebook.h" - -static long _huff_lengthlist_resaux0_1024a_192[] = { - 2, 6,11,11,11,11, 5, 3, 6, 8, 9, 9, 9, 5, 4, 5, - 7, 8,10, 7, 5, 5, 5, 7,10, 7, 6, 5, 5, 5, 9, 8, - 7, 6, 5, 3, -}; - -static static_codebook _huff_book_resaux0_1024a_192 = { - 2, 36, - _huff_lengthlist_resaux0_1024a_192, - 0, 0, 0, 0, 0, - NULL, - NULL, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/resaux0_1024a_256.vqh b/include/vorbis/book/resaux0_1024a_256.vqh deleted file mode 100644 index cffc25c5..00000000 --- a/include/vorbis/book/resaux0_1024a_256.vqh +++ /dev/null @@ -1,116 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by huff/huffbuld - - ********************************************************************/ - -#ifndef _V_resaux0_1024a_256_VQH_ -#define _V_resaux0_1024a_256_VQH_ -#include "vorbis/codebook.h" - -static long _huff_lengthlist_resaux0_1024a_256[] = { - 3, 9,12,12,13,16, 9, 9,13,14,16,17,11,15,17,18, - 18,20,12,14,17,17,20,19,14,13,16,16,17,19,19,19, - 19,18,18,17, 8,11,16,18,18,18,10, 9,13,16,17,18, - 14,15,15,16,18,19,13,16,17,18,18,19,14,16,17,18, - 18,19,17,18,18,19,19,19,14,17,19,18,18,19,15,16, - 16,18,19,19,16,17,15,17,18,19,15,17,17,17,18,19, - 14,18,18,19,18,19,18,19,19,19,19,19,14,18,17,19, - 19,19,15,17,17,17,18,19,19,18,19,17,19,19,16,18, - 19,19,19,19,16,19,19,19,19,19,19,19,19,19,19,19, - 13,17,17,19,19,19,16,19,19,19,18,19,16,19,19,19, - 19,19,17,19,19,19,19,19,17,19,19,19,19,19,19,19, - 19,19,19,19,16,19,19,19,19,19,18,19,19,19,19,19, - 18,19,19,19,19,19,19,19,19,19,19,19,18,19,19,19, - 19,19,17,19,19,19,19,19, 6,10,13,15,15,16, 8, 9, - 14,17,16,19,12,15,15,18,17,19,13,15,17,18,19,19, - 15,14,16,18,19,19,19,19,19,19,19,19, 6, 8,15,15, - 16,16, 5, 4, 8,13,13,17,11, 8, 9,12,15,19,10,11, - 13,13,14,18,12,13,15,14,16,19,16,18,19,19,19,19, - 12,14,17,18,19,19,11, 8,10,13,16,19,15, 9, 8,11, - 15,19,14,13,11,12,14,19,15,14,14,14,16,19,18,18, - 19,19,19,19,13,16,18,16,17,19,14,12,13,14,16,19, - 16,12,12,13,15,19,16,15,12,12,15,19,16,16,14,15, - 17,19,18,19,19,19,19,19,14,16,17,17,18,19,14,13, - 14,15,17,19,15,16,15,14,16,19,16,15,15,15,17,19, - 17,16,16,18,19,19,19,19,19,19,19,19,17,19,18,18, - 19,19,18,17,18,19,19,19,16,19,18,19,19,19,17,17, - 18,19,19,19,19,17,19,19,19,19,19,19,19,19,19,19, - 12,13,17,17,18,19,13,13,16,18,19,19,18,17,16,19, - 19,19,19,18,18,19,19,19,19,19,19,19,19,19,19,19, - 19,19,19,19,10,12,16,18,17,18, 9, 6, 9,13,15,17, - 13, 8, 8,12,15,19,13,12,12,13,15,19,13,13,13,15, - 18,19,15,16,17,19,19,19,11,14,17,17,19,18,11, 6, - 8,12,14,16,14, 6, 4, 8,12,19,14,10, 7, 8,11,18, - 14,12,10,11,13,16,17,17,16,18,19,19,14,16,17,17, - 16,19,14,10,11,12,14,18,15, 9, 7, 8,11,18,15,11, - 7, 6,10,18,16,13,10,10,12,19,18,19,18,18,18,19, - 17,18,18,18,18,19,16,12,12,13,16,19,16,12,10,11, - 12,16,17,13,10, 9,12,18,18,14,12,12,14,19,17,19, - 19,19,18,19,19,19,19,19,19,19,18,18,16,19,19,19, - 19,18,16,16,16,19,18,17,17,17,18,19,19,18,18,18, - 18,19,19,19,19,19,19,19,11,14,18,19,19,19,15,13, - 18,19,19,19,16,17,18,18,19,19,19,17,18,19,19,19, - 19,19,19,19,19,19,19,19,19,19,19,19,14,14,17,19, - 19,19,13, 9,11,14,16,19,15,11,10,12,15,19,15,13, - 12,12,14,19,16,15,14,14,16,19,17,18,19,18,19,19, - 12,14,17,17,19,19,13, 9,10,12,14,17,13, 8, 6, 7, - 11,16,13,11, 7, 6,10,17,14,13,10, 9,11,16,19,17, - 16,16,15,19,12,15,16,16,17,19,13,10,10,11,12,17, - 15, 9, 6, 6, 9,16,14, 9, 5, 3, 7,14,16,11, 8, 6, - 8,14,18,17,15,15,15,17,13,14,17,18,19,19,15,12, - 13,13,15,18,18,12,10, 9,11,15,19,11, 8, 6, 8,15, - 18,12,10, 8, 9,14,18,18,15,14,14,17,19,18,19,19, - 19,19,19,17,16,18,19,19,19,19,16,15,17,19,19,18, - 15,15,15,19,19,16,15,15,15,19,19,19,18,17,18,19, - 11,13,19,19,19,19,17,13,19,18,19,19,16,18,18,17, - 19,19,18,18,19,19,19,19,19,19,19,19,19,19,19,19, - 19,19,19,19,15,16,19,18,19,19,16,12,13,14,16,19, - 18,13,12,12,14,19,17,15,13,12,13,17,17,16,15,13, - 14,19,19,16,17,16,17,19,13,15,16,18,19,19,16,11, - 11,13,15,18,14,11, 9,10,12,18,14,13,10, 8,10,18, - 15,14,11,10,11,16,19,18,17,15,15,18,11,14,18,18, - 18,19,13,11,12,13,13,17,15,11, 9, 9,10,16,15,11, - 8, 5, 7,14,17,12, 9, 6, 7,13,19,17,15,14,13,17, - 11,15,18,19,19,19,14,13,14,14,15,18,17,12,11,10, - 11,16,17,11, 9, 6, 7,13,19,12,10, 6, 6,12,19,16, - 14,13,13,17,16,15,19,19,19,19,17,14,16,17,18,19, - 19,18,16,14,16,17,19,16,15,13,14,19,19,15,14,13, - 13,18,19,17,16,17,16,19,15,15,19,19,19,19,19,13, - 13,19,19,19,19,18,14,16,19,19,19,19,19,19,19,19, - 19,19,19,19,19,19,19,19,19,19,19,19,18,19,19,19, - 19,19,19,17,18,18,19,19,19,19,15,14,18,19,19,19, - 16,14,17,19,19,17,18,15,16,19,19,17,19,19,18,19, - 16,18,19,19,19,19,19,16,17,18,19,19,19,17,17,15, - 17,19,17,17,15,12,15,19,18,15,14,14,15,19,19,19, - 17,16,18,18,13,15,19,19,19,19,18,16,17,17,16,19, - 19,16,15,15,15,18,18,16,14,11,12,17,18,15,14,12, - 12,16,19,19,17,17,17,19,14,16,19,19,19,19,18,17, - 18,18,19,19,18,16,18,15,15,18,19,16,14,11,12,17, - 19,16,13,11,11,15,19,18,16,17,16,19,18,19,19,19, - 19,19,19,18,19,19,19,19,19,19,19,17,18,19,19,18, - 17,17,18,19,19,18,15,18,17,19,19,19,18,19,19,19, -}; - -static static_codebook _huff_book_resaux0_1024a_256 = { - 4, 1296, - _huff_lengthlist_resaux0_1024a_256, - 0, 0, 0, 0, 0, - NULL, - NULL, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/resaux0_1024a_350.vqh b/include/vorbis/book/resaux0_1024a_350.vqh deleted file mode 100644 index ead2c9d2..00000000 --- a/include/vorbis/book/resaux0_1024a_350.vqh +++ /dev/null @@ -1,116 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by huff/huffbuld - - ********************************************************************/ - -#ifndef _V_resaux0_1024a_350_VQH_ -#define _V_resaux0_1024a_350_VQH_ -#include "vorbis/codebook.h" - -static long _huff_lengthlist_resaux0_1024a_350[] = { - 6,17,20,20,19,17,18,16,18,19,19,19,16,16,19,19, - 19,19,17,17,19,19,19,19,19,17,19,19,19,19,19,15, - 19,19,19,19,15,17,19,19,18,16,17,13,16,19,19,19, - 17,14,16,19,19,18,19,18,19,19,19,19,19,16,19,19, - 19,19,18,15,17,19,19,18,18,19,19,19,19,17,19,15, - 17,18,18,16,19,17,18,18,19,18,19,19,19,19,19,19, - 19,19,19,19,18,19,19,17,19,18,19,18,19,19,18,19, - 19,18,19,18,18,18,19,17,19,18,19,19,19,19,19,18, - 19,19,19,19,18,19,19,19,19,18,18,19,19,19,19,18, - 18,18,17,19,19,19,17,17,18,19,18,19,17,19,19,19, - 19,19,19,19,19,19,19,19,19,19,19,19,19,18,19,18, - 19,19,18,18,16,14,17,19,19,19,18,16,18,19,19,19, - 17,16,19,19,19,19,18,17,19,19,19,19,19,19,19,19, - 19,19,19,19,19,19,19,19,14,15,17,19,18,15,18,15, - 19,19,19,17,16,17,19,19,19,18,17,17,19,19,19,18, - 19,18,19,19,19,18,19,16,17,19,19,18,14,15,18,18, - 18,16,15,10,12,14,15,13,16,13,11,14,14,15,12,15, - 15,15,16,17,11,13,15,17,17,19,15,13,14,17,17,16, - 16,19,19,19,18,17,17,14,13,14,15,14,17,13,10,11, - 12,15,16,15,12,12,13,18,15,14,13,14,15,19,16,15, - 14,15,16,16,19,19,19,17,19,19,18,15,14,14,14,18, - 17,14,12,13,15,19,18,14,13,12,14,19,15,15,15,14, - 17,18,16,17,16,16,18,16,18,19,18,18,18,19,16,14, - 14,14,16,19,16,15,13,14,16,19,18,16,14,14,16,19, - 18,15,15,16,18,19,17,16,17,17,18,17,19,18,16,17, - 18,19,16,14,14,18,18,19,15,15,16,16,19,19,16,16, - 16,16,18,19,16,15,17,17,18,18,17,15,16,16,18,17, - 17,16,17,19,17,19,19,17,17,18,18,19,18,19,19,19, - 19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19, - 19,19,19,19,17,17,19,18,19,16,16,12,13,14,14,13, - 15,13,11,12,13,16,13,13,12,12,14,18,11,11,12,14, - 16,18,16,12,14,17,19,16,14,16,19,18,19,19,13, 9, - 11,13,14,13,14, 8, 5, 6, 9,12,16, 9, 6, 6, 9,15, - 13,10, 8, 9,11,14,16,12,11,12,16,15,15,16,18,19, - 18,18,13,10,12,12,14,16,14, 8, 6, 6,10,14,17,10, - 6, 5, 8,15,18,13, 9, 9,10,15,18,15,13,14,17,17, - 17,19,18,17,17,18,16,13,12,13,14,18,17,12, 9, 9, - 11,15,19,13, 9, 8,10,15,19,14,11,11,12,16,18,16, - 15,17,17,18,19,18,18,18,18,19,17,14,14,16,19,19, - 16,15,13,14,15,18,18,15,15,14,15,18,19,15,16,16, - 17,19,16,15,15,17,17,19,17,18,19,19,18,19,19,16, - 18,18,18,19,18,19,19,19,19,19,19,19,19,19,19,19, - 19,18,18,19,19,19,19,18,19,19,19,19,18,18,19,19, - 19,17,16,12,13,14,15,15,19,14,12,12,14,16,18,14, - 12,12,14,19,18,14,14,14,16,19,18,15,17,19,18,19, - 12,15,19,19,19,17,11, 8,11,12,13,14,14, 7, 5, 6, - 10,13,18,10, 6, 5, 9,14,19,12, 9, 9,11,15,17,14, - 13,13,15,17,12,15,19,18,18,18,10, 8,11,11,13,16, - 13, 7, 5, 5, 8,13,16, 9, 4, 3, 6,13,19,13, 8, 6, - 8,14,17,15,12,13,14,16,14,19,19,18,18,19,12,12, - 13,12,13,17,18,12, 8, 8,10,14,17,13, 8, 5, 7,14, - 17,14, 9, 7, 8,14,19,15,13,13,14,16,19,19,19,19, - 19,19,18,17,15,17,19,19,16,17,13,14,15,17,18,17, - 14,14,14,16,18,18,14,13,13,17,17,16,15,15,14,18, - 16,19,19,19,19,19,19,18,19,19,18,19,19,19,19,19, - 18,19,19,18,18,19,19,19,19,19,19,19,19,19,19,19, - 19,19,19,19,15,17,19,19,19,19,14,13,14,16,15,18, - 15,14,13,13,15,19,19,15,13,14,15,19,19,17,15,14, - 14,16,19,18,17,17,15,18,13,16,19,19,19,19,12,10, - 13,13,13,18,15,11, 9, 9,11,16,18,13, 9, 8,10,16, - 19,15,11,10,11,15,19,16,14,14,14,17,12,16,19,18, - 17,18,10,10,13,12,13,16,15,11, 8, 8,10,13,18,12, - 7, 5, 7,11,19,13, 9, 6, 7,12,19,14,12,11,12,15, - 14,17,19,17,19,19,11,12,14,13,14,18,16,13,10, 9, - 10,13,17,14, 9, 6, 6,11,17,13, 9, 6, 5, 9,18,15, - 12,10, 9,13,19,19,19,19,19,19,17,15,17,18,18,19, - 17,17,15,14,14,17,19,17,13,11,11,14,18,15,12,10, - 8,12,19,15,14,12,11,14,14,17,19,19,19,19,17,17, - 19,19,19,19,16,19,19,19,19,19,18,19,19,19,19,19, - 19,19,19,19,19,19,19,19,19,19,19,19,14,16,19,19, - 19,19,16,13,14,18,18,19,17,15,14,16,18,19,18,17, - 17,16,17,19,19,19,18,16,15,16,19,17,16,18,17,17, - 17,19,19,19,19,19,19,15,16,16,16,18,17,16,11,13, - 16,18,18,17,13,11,14,17,17,16,14,12,13,16,19,18, - 15,14,14,17,17,18,19,19,19,19,16,16,17,16,17,19, - 18,16,13,13,14,15,18,17,12, 8,10,11,18,15,13, 9, - 9,12,19,16,12,11,12,14,18,18,19,18,19,19,15,17, - 17,17,18,19,19,17,16,14,13,14,19,17,13, 8, 8,11, - 18,15,12, 7, 6,10,19,14,13,11, 9,12,17,16,19,18, - 19,19,15,13,17,18,19,19,16,16,15,12,13,16,17,16, - 13, 9,11,14,18,16,13,10, 9,11,17,15,14,13,11,14, -}; - -static static_codebook _huff_book_resaux0_1024a_350 = { - 4, 1296, - _huff_lengthlist_resaux0_1024a_350, - 0, 0, 0, 0, 0, - NULL, - NULL, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/resaux0_128a_128.vqh b/include/vorbis/book/resaux0_128a_128.vqh deleted file mode 100644 index 12651bf1..00000000 --- a/include/vorbis/book/resaux0_128a_128.vqh +++ /dev/null @@ -1,116 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by huff/huffbuld - - ********************************************************************/ - -#ifndef _V_resaux0_128a_128_VQH_ -#define _V_resaux0_128a_128_VQH_ -#include "vorbis/codebook.h" - -static long _huff_lengthlist_resaux0_128a_128[] = { - 6,15,15,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,11,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,10,13,14,14, - 14,14,10,11,13,14,14,14,14,13,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 10,13,14,14,14,14,13,13,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14, 9,13,14,14,14,14, 9, 8,11,14,14,14, - 14,11,13,14,14,14,14,13,14,14,14,14,14,13,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,12,11, - 14,14,14,14,13,13,13,14,14,14,13,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,13,14,14,14, - 14,14,14,13,14,14,14,14,14,14,14,14,14,14,14,13, - 14,14,14,14,13,14,14,14,14,14,13,14,14,14,14,14, - 14,14,14,14,14,14,13,13,14,14,14,14,14,13,14,14, - 14,14,14,14,14,14,14,14,13,14,14,14,13,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,13,14,14,14,14, - 14,14,13,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,10,13,14,14,14,14,12,13, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14, 9,13,14,14, - 14,14, 7, 7,10,14,14,13,11,10,13,14,14,14,14,13, - 13,14,14,14,13,14,14,14,14,14,14,14,14,14,14,14, - 11,14,13,14,14,14,10,10,14,14,14,14,13,11,13,14, - 14,14,14,13,14,14,14,14,14,14,14,14,14,14,12,14, - 14,14,14,14,14,14,14,14,14,14,13,12,14,14,14,14, - 13,14,14,14,14,14,13,14,14,14,14,14,13,13,14,14, - 14,14,13,14,14,14,13,14,14,14,14,14,14,14,14,14, - 14,14,14,14,13,13,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,13,14,14,14,14,14,13,13,14,14, - 14,14,12,13,14,14,14,14,14,13,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,12,14,14,14,14,13, - 9,14,14,14,14,14,12,12,14,14,14,14,14,13,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14, 8,11,14,14,14,14, 6, 5, 9,12,13,13, - 10, 8,11,14,14,13,12,12,13,14,14,14,13,13,14,14, - 14,14,13,13,14,14,14,14,11,13,14,14,14,14, 8, 8, - 10,13,14,14,10,10,12,14,14,14,13,12,14,13,14,13, - 12,14,13,13,14,14,10,13,14,14,14,14,13,14,14,14, - 14,14,11,11,13,14,14,14,12,13,13,14,14,14,12,13, - 14,14,14,13,14,14,14,14,14,14,12,13,14,14,14,14, - 14,13,14,14,14,14,13,12,13,14,14,14,12,13,12,14, - 14,14,12,13,13,14,14,14,12,13,14,14,14,14,12,14, - 14,14,14,14,13,14,14,14,14,14,12,12,13,14,14,14, - 13,12,13,14,13,14,13,14,14,14,14,14,13,14,14,14, - 14,14,12,12,14,14,14,14, 5,12,14,14,14,14,10,10, - 14,14,14,14,14,13,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14, 4, 9,12,14, - 13,14, 3, 2, 5, 9, 9,10, 6, 5, 7,10,12,13, 9, 9, - 11,12,13,14,11,11,12,13,14,14,12,12,14,14,14,14, - 7,11,12,13,13,13, 4, 4, 7,10,12,14, 6, 6, 9,12, - 14,14, 9,10,12,13,12,13,11,11,13,13,14,14,11,12, - 14,14,14,14, 9,12,13,13,13,14, 7, 8,11,12,13,12, - 8, 9,11,14,14,14,10,12,14,14,14,14,11,12,14,14, - 14,14,10,12,13,14,14,14,10,14,14,13,12,13, 9,10, - 12,12,12,12,10,11,12,14,14,14,11,12,12,14,14,14, - 11,14,13,13,14,14,10,13,14,14,14,14,11,14,14,14, - 14,13,10,11,13,13,13,13,11,13,14,13,14,14,13,12, - 13,13,14,14,12,13,14,14,14,14,12,14,14,14,14,14, -}; - -static static_codebook _huff_book_resaux0_128a_128 = { - 4, 1296, - _huff_lengthlist_resaux0_128a_128, - 0, 0, 0, 0, 0, - NULL, - NULL, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/resaux0_128a_160.vqh b/include/vorbis/book/resaux0_128a_160.vqh deleted file mode 100644 index 9d560617..00000000 --- a/include/vorbis/book/resaux0_128a_160.vqh +++ /dev/null @@ -1,116 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by huff/huffbuld - - ********************************************************************/ - -#ifndef _V_resaux0_128a_160_VQH_ -#define _V_resaux0_128a_160_VQH_ -#include "vorbis/codebook.h" - -static long _huff_lengthlist_resaux0_128a_160[] = { - 6,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,13,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,14,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,14,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,14,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,14,15,15,15,15,15,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,13,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,13,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,13,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,13, - 14,14,14,14,14,14,14,14,14,14,14,13,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,13,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 13,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,13,14,14,14,14,14,13,12,13,14,14,14, - 14,12,12,14,14,14,14,13,14,14,14,14,14,13,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,11,11, - 11,13,14,14,12,10,10,14,14,14,14,13,13,14,14,14, - 13,14,14,14,14,14,14,14,14,14,14,14,13,14,14,14, - 14,14,11,12,13,13,14,14,12,12,13,14,14,14,14,14, - 14,14,14,14,13,14,14,14,14,14,13,13,14,14,14,14, - 14,14,14,14,14,14,12,12,14,13,14,14,14,13,13,14, - 13,14,13,13,13,14,14,14,13,14,14,14,13,14,13,14, - 14,14,14,14,14,14,14,14,14,14,13,13,13,14,14,14, - 12,14,13,14,14,14,14,14,13,14,14,14,12,13,14,14, - 14,14,12,13,14,14,14,14, 5,14,14,14,14,14,11,14, - 13,14,14,14,14,13,12,14,14,14,14,14,13,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14, 5,10,14,14, - 14,14, 5, 5, 7,10,14,14, 8, 6, 6, 9,11,13,11, 9, - 10,11,14,14,12,12,13,13,14,14,14,13,14,13,14,14, - 6,11,13,14,14,14, 3, 4, 5, 8,10,12, 5, 3, 4, 7, - 10,12, 7, 6, 7,10,11,13, 9, 9,10,11,14,13,10,11, - 12,13,13,14, 8,13,13,14,13,13, 5, 6, 8,10,12,12, - 5, 5, 7, 9,11,11, 7, 7, 9,11,12,13, 9, 9,11,12, - 12,14,10,12,14,14,14,14, 9,14,14,14,13,13, 6, 7, - 10,11,11,12, 7, 7, 9,11,12,13, 8, 9,11,12,12,14, - 9,10,13,13,14,14, 9,11,13,14,14,14,10,14,14,14, - 14,13, 8, 9,12,13,13,12, 8, 9,10,11,12,13, 9,10, - 13,12,14,13,10,10,13,13,14,14, 9,11,11,13,13,14, -}; - -static static_codebook _huff_book_resaux0_128a_160 = { - 4, 1296, - _huff_lengthlist_resaux0_128a_160, - 0, 0, 0, 0, 0, - NULL, - NULL, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/resaux0_128a_192.vqh b/include/vorbis/book/resaux0_128a_192.vqh deleted file mode 100644 index d06722e1..00000000 --- a/include/vorbis/book/resaux0_128a_192.vqh +++ /dev/null @@ -1,116 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by huff/huffbuld - - ********************************************************************/ - -#ifndef _V_resaux0_128a_192_VQH_ -#define _V_resaux0_128a_192_VQH_ -#include "vorbis/codebook.h" - -static long _huff_lengthlist_resaux0_128a_192[] = { - 7,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,13,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,14,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,14,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,14,14,15,15, - 15,15,13,14,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,14,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,14,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,14,15,15,15,15,15,14,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,13,13,15,15,15,15,12,14,15,15,15,15, - 15,13,14,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,13, - 15,15,15,15,15,13,15,15,15,15,15,15,14,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,14,15,15,14,15,15,15,14, - 13,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,14,15,13,15, - 15,15,15,15,14,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,14,15,15,15,15, 9,15,15,15,15,15,15,15, - 15,15,15,15,15,14,15,15,15,15,15,15,14,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,12,15,14,15, - 15,15,13,11,13,15,15,15,13,12,12,12,13,15,15,15, - 12,13,15,15,15,15,14,15,15,15,15,15,15,15,15,15, - 14,15,15,15,15,15, 8, 9,12,13,15,15, 8, 7, 7, 9, - 12,15,10, 8, 7, 9,13,13,10,10,10,11,13,14,12,12, - 13,13,15,15,13,14,15,14,15,15, 6, 7,10,12,13,13, - 5, 4, 5, 6, 9,12, 6, 5, 5, 6, 9,12, 7, 7, 7, 8, - 10,12, 9,10,10,11,13,14,12,15,15,15,13,13, 5, 7, - 10,12,11,12, 4, 4, 5, 7, 9,12, 5, 5, 5, 7, 9,11, - 6, 6, 7, 8, 9,12, 8, 8, 9,10,12,12,10,12,12,13, - 15,14, 6, 8,11,12,12,11, 5, 5, 7, 9,10,11, 5, 5, - 7, 8, 9,11, 6, 6, 7, 8,10,12, 7, 7, 8,10,11,13, -}; - -static static_codebook _huff_book_resaux0_128a_192 = { - 4, 1296, - _huff_lengthlist_resaux0_128a_192, - 0, 0, 0, 0, 0, - NULL, - NULL, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/resaux0_128a_256.vqh b/include/vorbis/book/resaux0_128a_256.vqh deleted file mode 100644 index 4acc2d46..00000000 --- a/include/vorbis/book/resaux0_128a_256.vqh +++ /dev/null @@ -1,116 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by huff/huffbuld - - ********************************************************************/ - -#ifndef _V_resaux0_128a_256_VQH_ -#define _V_resaux0_128a_256_VQH_ -#include "vorbis/codebook.h" - -static long _huff_lengthlist_resaux0_128a_256[] = { - 6,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,13,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,13,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,12,13,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,13,14,14,14,14,14,14,14,13,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,13,14,14,14,14,14,14,14,14,14,14,14,14,13, - 14,14,14,14,14,14,14,14,13,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,12,14,14,14, - 14,14,14,13,14,14,14,14,14,13,13,14,14,14,14,14, - 13,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,11,12,14,14,14,14,12,10,14, - 14,14,13,13,12,14,14,14,13,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,11,11,14,14,14,14, - 9, 7, 7,11,14,14,10, 7, 6, 8,11,14,11,11,10, 9, - 12,14,14,14,13,14,14,14,14,14,14,14,14,14,12,11, - 14,14,14,14,10, 8, 9,12,13,14,10, 7, 7, 9,11,14, - 12,10, 9,10,11,14,14,14,14,13,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,13,14,14,14,14,13, - 13,14,13,14,14,13,13,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,13,14,14,14,14, - 14,14,10,12,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,10, - 12,14,14,14,14,10, 8,13,14,14,14,11, 9,12,13,14, - 13,14,14,14,14,14,14,14,14,14,14,14,13,14,14,14, - 14,14, 7, 8,11,13,14,14, 5, 4, 5, 8,11,13, 6, 4, - 3, 5, 8,14, 9, 7, 6, 7, 9,13,14,14,13,12,13,14, - 13,14,14,14,14,14, 7, 8,14,13,13,14, 5, 4, 6, 9, - 11,14, 6, 4, 4, 5, 8,13, 9, 6, 6, 7, 9,13,13,11, - 11,12,13,14,14,14,14,14,14,14,12,12,13,14,13,14, - 10,10,11,12,13,14,11,10,10,12,14,14,14,12,11,12, - 13,14,13,11,14,13,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,12,14,14,14,14,13,11,14,14,14,14,14, - 13,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,13,14,14,14,14,13,13,13, - 14,14,13,14,12,12,14,14,14,14,14,14,14,14,14,14, - 14,14,14,14,14,14,14,14,14,14,10,12,14,11,10,14, - 9, 8,10,13,13,14,10, 8, 8,11,12,13,11,10,11,12, - 13,14,13,13,14,14,14,14,13,14,14,14,14,14,10,10, - 14,13,14,14, 8, 8,10,13,13,14,10, 8, 8,11,13,14, - 11,10, 9,12,14,14,13,13,14,14,14,14,14,14,14,14, - 14,14,12,14,14,14,14,14,13,13,13,13,14,14,14,13, - 13,14,14,14,14,12,13,14,14,14,14,12,14,14,14,14, -}; - -static static_codebook _huff_book_resaux0_128a_256 = { - 4, 1296, - _huff_lengthlist_resaux0_128a_256, - 0, 0, 0, 0, 0, - NULL, - NULL, - NULL, -}; - - -#endif diff --git a/include/vorbis/book/resaux0_128a_350.vqh b/include/vorbis/book/resaux0_128a_350.vqh deleted file mode 100644 index 06cb1d78..00000000 --- a/include/vorbis/book/resaux0_128a_350.vqh +++ /dev/null @@ -1,116 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 * - * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: static codebook autogenerated by huff/huffbuld - - ********************************************************************/ - -#ifndef _V_resaux0_128a_350_VQH_ -#define _V_resaux0_128a_350_VQH_ -#include "vorbis/codebook.h" - -static long _huff_lengthlist_resaux0_128a_350[] = { - 7,16,16,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,13,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,13,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,14,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,14,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,14,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,14,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,14,12,15,15,15,15,15,13, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,14,14,15, - 15,15,15,12,15,15,15,15,15,13,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,14,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,13,13,14,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,13, 9,11,15,15,15, - 7, 3, 6,14,15,15, 7, 4, 6,13,15,14,11, 9,12,14, - 15,15,15,15,15,15,15,15,15,15,15,13,15,15,13, 9, - 9,13,15,15, 6, 3, 5,10,15,14, 5, 3, 5,10,14,12, - 8, 7, 9,12,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,13,14,14,15,15,11, 8,10,13,15,14, 9, 7, - 9,12,15,11, 9, 9,11,13, 9,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,14,14,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, - 15,15,15,15,15,15,15,14,15,15,15,15,15,15,14,15, - 15,15,15,15,13,13,15,15,15,15,15,15,15,15,15,13, - 14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,13, - 15,15,12,10,12,13,15,15, 8, 4, 7,12,15,15, 8, 5, - 8,14,14,12,11,11,12,15,15,15,15,15,15,15,15,15, - 15,15,15,11,15,15,13,10,11,10,15,15, 8, 4, 6,11, - 15,13, 7, 4, 6,11,13,10, 9, 9, 9,12,15,15,15,15, - 15,15,15,15,15,15,15,13,15,15,15,12,14,11,15,15, - 11, 9,11,14,15,15,10, 8,10,13,15,12, 9,10,11,13, -}; - -static static_codebook _huff_book_resaux0_128a_350 = { - 4, 1296, - _huff_lengthlist_resaux0_128a_350, - 0, 0, 0, 0, 0, - NULL, - NULL, - NULL, -}; - - -#endif diff --git a/include/vorbis/codebook.h b/include/vorbis/codebook.h deleted file mode 100644 index 7f1950a1..00000000 --- a/include/vorbis/codebook.h +++ /dev/null @@ -1,118 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: codebook types - last mod: $Id: codebook.h,v 1.6 2000/07/17 12:55:35 xiphmont Exp $ - - ********************************************************************/ - -#ifndef _V_CODEBOOK_H_ -#define _V_CODEBOOK_H_ - -/* This structure encapsulates huffman and VQ style encoding books; it - doesn't do anything specific to either. - - valuelist/quantlist are nonNULL (and q_* significant) only if - there's entry->value mapping to be done. - - If encode-side mapping must be done (and thus the entry needs to be - hunted), the auxiliary encode pointer will point to a decision - tree. This is true of both VQ and huffman, but is mostly useful - with VQ. - -*/ - -typedef struct static_codebook{ - long dim; /* codebook dimensions (elements per vector) */ - long entries; /* codebook entries */ - long *lengthlist; /* codeword lengths in bits */ - - /* mapping ***************************************************************/ - int maptype; /* 0=none - 1=implicitly populated values from map column - 2=listed arbitrary values */ - - /* The below does a linear, single monotonic sequence mapping. */ - long q_min; /* packed 32 bit float; quant value 0 maps to minval */ - long q_delta; /* packed 32 bit float; val 1 - val 0 == delta */ - int q_quant; /* bits: 0 < quant <= 16 */ - int q_sequencep; /* bitflag */ - - long *quantlist; /* map == 1: (int)(entries^(1/dim)) element column map - map == 2: list of dim*entries quantized entry vals - */ - - /* encode helpers ********************************************************/ - struct encode_aux_nearestmatch *nearest_tree; - struct encode_aux_threshmatch *thresh_tree; - struct encode_aux_pigeonhole *pigeon_tree; -} static_codebook; - -/* this structures an arbitrary trained book to quickly find the - nearest cell match */ -typedef struct encode_aux_nearestmatch{ - /* pre-calculated partitioning tree */ - long *ptr0; - long *ptr1; - - long *p; /* decision points (each is an entry) */ - long *q; /* decision points (each is an entry) */ - long aux; /* number of tree entries */ - long alloc; -} encode_aux_nearestmatch; - -/* assumes a maptype of 1; encode side only, so that's OK */ -typedef struct encode_aux_threshmatch{ - double *quantthresh; - long *quantmap; - int quantvals; - int threshvals; -} encode_aux_threshmatch; - -typedef struct encode_aux_pigeonhole{ - double min; - double del; - - int mapentries; - int quantvals; - long *pigeonmap; - - long fittotal; - long *fitlist; - long *fitmap; - long *fitlength; -} encode_aux_pigeonhole; - -typedef struct decode_aux{ - long *ptr0; - long *ptr1; - long aux; /* number of tree entries */ -} decode_aux; - -typedef struct codebook{ - long dim; /* codebook dimensions (elements per vector) */ - long entries; /* codebook entries */ - const static_codebook *c; - - double *valuelist; /* list of dim*entries actual entry values */ - long *codelist; /* list of bitstream codewords for each entry */ - struct decode_aux *decode_tree; - -} codebook; - -#endif - - - - - diff --git a/include/vorbis/codec.h b/include/vorbis/codec.h deleted file mode 100644 index 38e24fc2..00000000 --- a/include/vorbis/codec.h +++ /dev/null @@ -1,431 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: libvorbis codec headers - last mod: $Id: codec.h,v 1.29 2000/08/30 07:09:46 xiphmont Exp $ - - ********************************************************************/ - -#ifndef _vorbis_codec_h_ -#define _vorbis_codec_h_ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -#define MAX_BARK 27 - -#include "os_types.h" -#include "vorbis/codebook.h" -#include "vorbis/internal.h" - -typedef void vorbis_look_transform; -typedef void vorbis_info_time; -typedef void vorbis_look_time; -typedef void vorbis_info_floor; -typedef void vorbis_look_floor; -typedef void vorbis_echstate_floor; -typedef void vorbis_info_residue; -typedef void vorbis_look_residue; -typedef void vorbis_info_mapping; -typedef void vorbis_look_mapping; - -/* mode ************************************************************/ -typedef struct { - int blockflag; - int windowtype; - int transformtype; - int mapping; -} vorbis_info_mode; - -/* psychoacoustic setup ********************************************/ -#define P_BANDS 17 -#define P_LEVELS 11 -typedef struct vorbis_info_psy{ - int athp; - int decayp; - int smoothp; - - int noisecullp; - double noisecull_barkwidth; - - double ath_adjatt; - double ath_maxatt; - - /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */ - /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */ - /* y: 0 10 20 30 40 50 60 70 80 90 100 dB */ - - int tonemaskp; - double toneatt[P_BANDS][P_LEVELS]; - - int peakattp; - double peakatt[P_BANDS][P_LEVELS]; - - int noisemaskp; - double noiseatt[P_BANDS][P_LEVELS]; - - double max_curve_dB; - - /* decay setup */ - double attack_coeff; - double decay_coeff; -} vorbis_info_psy; - -/* vorbis_info contains all the setup information specific to the - specific compression/decompression mode in progress (eg, - psychoacoustic settings, channel setup, options, codebook - etc). -*********************************************************************/ - -typedef struct vorbis_info{ - int version; - int channels; - long rate; - - /* The below bitrate declarations are *hints*. - Combinations of the three values carry the following implications: - - all three set to the same value: - implies a fixed rate bitstream - only nominal set: - implies a VBR stream that averages the nominal bitrate. No hard - upper/lower limit - upper and or lower set: - implies a VBR bitstream that obeys the bitrate limits. nominal - may also be set to give a nominal rate. - none set: - the coder does not care to speculate. - */ - - long bitrate_upper; - long bitrate_nominal; - long bitrate_lower; - - /* Vorbis supports only short and long blocks, but allows the - encoder to choose the sizes */ - - long blocksizes[2]; - - /* modes are the primary means of supporting on-the-fly different - blocksizes, different channel mappings (LR or mid-side), - different residue backends, etc. Each mode consists of a - blocksize flag and a mapping (along with the mapping setup */ - - int modes; - int maps; - int times; - int floors; - int residues; - int books; - int psys; /* encode only */ - - vorbis_info_mode *mode_param[64]; - int map_type[64]; - vorbis_info_mapping *map_param[64]; - int time_type[64]; - vorbis_info_time *time_param[64]; - int floor_type[64]; - vorbis_info_floor *floor_param[64]; - int residue_type[64]; - vorbis_info_residue *residue_param[64]; - static_codebook *book_param[256]; - vorbis_info_psy *psy_param[64]; /* encode only */ - - /* for block long/sort tuning; encode only */ - int envelopesa; - double preecho_thresh; - double preecho_clamp; - double preecho_minenergy; -} vorbis_info; - -/* ogg_page is used to encapsulate the data in one Ogg bitstream page *****/ - -typedef struct { - unsigned char *header; - long header_len; - unsigned char *body; - long body_len; -} ogg_page; - -/* ogg_stream_state contains the current encode/decode state of a logical - Ogg bitstream **********************************************************/ - -typedef struct { - unsigned char *body_data; /* bytes from packet bodies */ - long body_storage; /* storage elements allocated */ - long body_fill; /* elements stored; fill mark */ - long body_returned; /* elements of fill returned */ - - - int *lacing_vals; /* The values that will go to the segment table */ - ogg_int64_t *pcm_vals; /* pcm_pos values for headers. Not compact - this way, but it is simple coupled to the - lacing fifo */ - long lacing_storage; - long lacing_fill; - long lacing_packet; - long lacing_returned; - - unsigned char header[282]; /* working space for header encode */ - int header_fill; - - int e_o_s; /* set when we have buffered the last packet in the - logical bitstream */ - int b_o_s; /* set after we've written the initial page - of a logical bitstream */ - long serialno; - int pageno; - ogg_int64_t packetno; /* sequence number for decode; the framing - knows where there's a hole in the data, - but we need coupling so that the codec - (which is in a seperate abstraction - layer) also knows about the gap */ - ogg_int64_t pcmpos; - -} ogg_stream_state; - -/* ogg_packet is used to encapsulate the data and metadata belonging - to a single raw Ogg/Vorbis packet *************************************/ - -typedef struct { - unsigned char *packet; - long bytes; - long b_o_s; - long e_o_s; - - ogg_int64_t frameno; - ogg_int64_t packetno; /* sequence number for decode; the framing - knows where there's a hole in the data, - but we need coupling so that the codec - (which is in a seperate abstraction - layer) also knows about the gap */ - -} ogg_packet; - -typedef struct { - unsigned char *data; - int storage; - int fill; - int returned; - - int unsynced; - int headerbytes; - int bodybytes; -} ogg_sync_state; - -/* vorbis_dsp_state buffers the current vorbis audio - analysis/synthesis state. The DSP state belongs to a specific - logical bitstream ****************************************************/ -typedef struct vorbis_dsp_state{ - int analysisp; - vorbis_info *vi; - int modebits; - - double **pcm; - double **pcmret; - int pcm_storage; - int pcm_current; - int pcm_returned; - - int preextrapolate; - int eofflag; - - long lW; - long W; - long nW; - long centerW; - - ogg_int64_t frameno; - ogg_int64_t sequence; - - ogg_int64_t glue_bits; - ogg_int64_t time_bits; - ogg_int64_t floor_bits; - ogg_int64_t res_bits; - - /* local lookup storage */ - void *ve; /* envelope lookup */ - double **window[2][2][2]; /* block, leadin, leadout, type */ - vorbis_look_transform **transform[2]; /* block, type */ - codebook *fullbooks; - /* backend lookups are tied to the mode, not the backend or naked mapping */ - vorbis_look_mapping **mode; - - /* local storage, only used on the encoding side. This way the - application does not need to worry about freeing some packets' - memory and not others'; packet storage is always tracked. - Cleared next call to a _dsp_ function */ - unsigned char *header; - unsigned char *header1; - unsigned char *header2; - -} vorbis_dsp_state; - -/* vorbis_block is a single block of data to be processed as part of -the analysis/synthesis stream; it belongs to a specific logical -bitstream, but is independant from other vorbis_blocks belonging to -that logical bitstream. *************************************************/ - -struct alloc_chain{ - void *ptr; - struct alloc_chain *next; -}; - -typedef struct vorbis_block{ - /* necessary stream state for linking to the framing abstraction */ - double **pcm; /* this is a pointer into local storage */ - oggpack_buffer opb; - - long lW; - long W; - long nW; - int pcmend; - int mode; - - int eofflag; - ogg_int64_t frameno; - ogg_int64_t sequence; - vorbis_dsp_state *vd; /* For read-only access of configuration */ - - /* local storage to avoid remallocing; it's up to the mapping to - structure it */ - void *localstore; - long localtop; - long localalloc; - long totaluse; - struct alloc_chain *reap; - - /* bitmetrics for the frame */ - long glue_bits; - long time_bits; - long floor_bits; - long res_bits; - -} vorbis_block; - -#include "vorbis/backends.h" - -/* vorbis_info contains all the setup information specific to the - specific compression/decompression mode in progress (eg, - psychoacoustic settings, channel setup, options, codebook - etc). vorbis_info and substructures are in backends.h. -*********************************************************************/ - -/* the comments are not part of vorbis_info so that vorbis_info can be - static storage */ -typedef struct vorbis_comment{ - /* unlimited user comment fields. libvorbis writes 'libvorbis' - whatever vendor is set to in encode */ - char **user_comments; - int *comment_lengths; - int comments; - char *vendor; - -} vorbis_comment; - - -/* libvorbis encodes in two abstraction layers; first we perform DSP - and produce a packet (see docs/analysis.txt). The packet is then - coded into a framed OggSquish bitstream by the second layer (see - docs/framing.txt). Decode is the reverse process; we sync/frame - the bitstream and extract individual packets, then decode the - packet back into PCM audio. - - The extra framing/packetizing is used in streaming formats, such as - files. Over the net (such as with UDP), the framing and - packetization aren't necessary as they're provided by the transport - and the streaming layer is not used */ - -/* OggSquish BITSREAM PRIMITIVES: encoding **************************/ - -extern int ogg_stream_packetin(ogg_stream_state *os, ogg_packet *op); -extern int ogg_stream_pageout(ogg_stream_state *os, ogg_page *og); -extern int ogg_stream_flush(ogg_stream_state *os, ogg_page *og); - -/* OggSquish BITSREAM PRIMITIVES: decoding **************************/ - -extern int ogg_sync_init(ogg_sync_state *oy); -extern int ogg_sync_clear(ogg_sync_state *oy); -extern int ogg_sync_destroy(ogg_sync_state *oy); -extern int ogg_sync_reset(ogg_sync_state *oy); - -extern char *ogg_sync_buffer(ogg_sync_state *oy, long size); -extern int ogg_sync_wrote(ogg_sync_state *oy, long bytes); -extern long ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og); -extern int ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og); -extern int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og); -extern int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op); - -/* OggSquish BITSREAM PRIMITIVES: general ***************************/ - -extern int ogg_stream_init(ogg_stream_state *os,int serialno); -extern int ogg_stream_clear(ogg_stream_state *os); -extern int ogg_stream_reset(ogg_stream_state *os); -extern int ogg_stream_destroy(ogg_stream_state *os); -extern int ogg_stream_eof(ogg_stream_state *os); - -extern int ogg_page_version(ogg_page *og); -extern int ogg_page_continued(ogg_page *og); -extern int ogg_page_bos(ogg_page *og); -extern int ogg_page_eos(ogg_page *og); -extern ogg_int64_t ogg_page_frameno(ogg_page *og); -extern int ogg_page_serialno(ogg_page *og); -extern int ogg_page_pageno(ogg_page *og); - -/* Vorbis PRIMITIVES: general ***************************************/ - -extern void vorbis_info_init(vorbis_info *vi); -extern void vorbis_info_clear(vorbis_info *vi); -extern void vorbis_comment_init(vorbis_comment *vc); -extern void vorbis_comment_add(vorbis_comment *vc, char *comment); -extern void vorbis_comment_add_tag(vorbis_comment *vc, - char *tag, char *contents); -extern char *vorbis_comment_query(vorbis_comment *vc, char *tag, int count); -extern int vorbis_comment_query_count(vorbis_comment *vc, char *tag); -extern void vorbis_comment_clear(vorbis_comment *vc); - -extern int vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb); -extern int vorbis_block_clear(vorbis_block *vb); -extern void vorbis_dsp_clear(vorbis_dsp_state *v); - -/* Vorbis PRIMITIVES: analysis/DSP layer ****************************/ - -extern int vorbis_analysis_init(vorbis_dsp_state *v,vorbis_info *vi); -extern int vorbis_analysis_headerout(vorbis_dsp_state *v, - vorbis_comment *vc, - ogg_packet *op, - ogg_packet *op_comm, - ogg_packet *op_code); -extern double **vorbis_analysis_buffer(vorbis_dsp_state *v,int vals); -extern int vorbis_analysis_wrote(vorbis_dsp_state *v,int vals); -extern int vorbis_analysis_blockout(vorbis_dsp_state *v,vorbis_block *vb); -extern int vorbis_analysis(vorbis_block *vb,ogg_packet *op); - -/* Vorbis PRIMITIVES: synthesis layer *******************************/ -extern int vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc, - ogg_packet *op); - -extern int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi); -extern int vorbis_synthesis(vorbis_block *vb,ogg_packet *op); -extern int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb); -extern int vorbis_synthesis_pcmout(vorbis_dsp_state *v,double ***pcm); -extern int vorbis_synthesis_read(vorbis_dsp_state *v,int samples); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif - diff --git a/include/vorbis/internal.h b/include/vorbis/internal.h deleted file mode 100644 index 100df518..00000000 --- a/include/vorbis/internal.h +++ /dev/null @@ -1,40 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: libvorbis codec internal types. These structures are - 'visible', but generally uninteresting to the developer - last mod: $Id: internal.h,v 1.7 2000/07/12 09:36:17 xiphmont Exp $ - - ********************************************************************/ - -#ifndef _vorbis_internal_h_ -#define _vorbis_internal_h_ - -/* structures for various internal data abstractions ********************/ - -typedef struct { - long endbyte; - int endbit; - - unsigned char *buffer; - unsigned char *ptr; - long storage; - -} oggpack_buffer; - -#endif - - - - - diff --git a/include/vorbis/mode_A.h b/include/vorbis/mode_A.h deleted file mode 100644 index 7a631349..00000000 --- a/include/vorbis/mode_A.h +++ /dev/null @@ -1,206 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: predefined encoding modes - last mod: $Id: mode_A.h,v 1.3 2000/08/15 14:01:02 xiphmont Exp $ - - ********************************************************************/ - -#ifndef _V_MODES_A_H_ -#define _V_MODES_A_H_ - -#include <stdio.h> -#include "vorbis/codec.h" -#include "vorbis/backends.h" - -#include "vorbis/book/lsp12_0.vqh" -#include "vorbis/book/lsp30_0.vqh" - -#include "vorbis/book/resaux0_128a_128.vqh" -#include "vorbis/book/resaux0_1024a_128.vqh" - -#include "vorbis/book/res0_128a_128_1.vqh" -#include "vorbis/book/res0_128a_128_2.vqh" -#include "vorbis/book/res0_128a_128_3.vqh" -#include "vorbis/book/res0_128a_128_4.vqh" -#include "vorbis/book/res0_128a_128_5.vqh" -#include "vorbis/book/res0_1024a_128_1.vqh" -#include "vorbis/book/res0_1024a_128_2.vqh" -#include "vorbis/book/res0_1024a_128_3.vqh" -#include "vorbis/book/res0_1024a_128_4.vqh" -#include "vorbis/book/res0_1024a_128_5.vqh" -#include "vorbis/book/res0_1024a_128_6.vqh" -#include "vorbis/book/res0_1024a_128_7.vqh" -#include "vorbis/book/res0_1024a_128_8.vqh" -#include "vorbis/book/res0_1024a_128_9.vqh" - -static vorbis_info_psy _psy_set_A={ - 1,/*athp*/ - 1,/*decayp*/ - 1,/*smoothp*/ - 0,.1, - - -100., - -140., - - /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */ - /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */ - /* y: 0 10 20 30 40 50 60 70 80 90 100 dB */ - - 1,/* tonemaskp */ - /* 0 10 20 30 40 50 60 70 80 90 100 */ - {{-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*63*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*88*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*125*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*175*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*250*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*350*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*500*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*700*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*1000*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*1400*/ - {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*2000*/ - {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*2800*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*4000*/ - {-30.,-30.,-35.,-37.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*5600*/ - {-20.,-25.,-30.,-35.,-35.,-50.,-60.,-70.,-80.,-90.,-100.}, /*8000*/ - {-20.,-25.,-30.,-33.,-35.,-45.,-55.,-65.,-75.,-90.,-100.}, /*11500*/ - {-20.,-24.,-26.,-32.,-35.,-45.,-55.,-65.,-75.,-90.,-100.}, /*16000*/ - }, - - 1,/* peakattp */ - {{-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*63*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*88*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*125*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-16.,-17.}, /*8000*/ - { -6., -7., -9., -9., -9., -9.,-10.,-11.,-12.,-13.,-14.}, /*11500*/ - { -6., -6., -9., -9., -9., -9., -9., -9.,-10.,-11.,-12.}, /*16000*/ - }, - - 1,/*noisemaskp */ - /* 0 10 20 30 40 50 60 70 80 90 100 */ - {{-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*63*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*88*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*125*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*175*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*250*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*350*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*500*/ - { 6., 6., 6., 2., 2., 2., 2., 2., 2., 1., 0.}, /*700*/ - - { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*1000*/ - { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*1400*/ - { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*2000*/ - { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*2800*/ - { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*4000*/ - { 10., 10., 10., 10., 10., 10., 8., 8., 6., 6., 6.}, /*5600*/ - { 10., 10., 10., 10., 10., 10., 8., 8., 8., 8., 8.}, /*8000*/ - { 10., 10., 10., 10., 10., 10., 10., 10., 10., 10., 10.}, /*11500*/ - { 10., 10., 10., 10., 10., 10., 10., 10., 10., 10., 10.}, /*16000*/ - }, - - 100., - - -0., -.004 /* attack/decay control */ -}; - - -/* with GNUisms, this could be short and readable. Oh well */ -static vorbis_info_time0 _time_set0A={0}; -static vorbis_info_floor0 _floor_set0A={12, 44100, 64, 12,150, 1, {0} }; -static vorbis_info_floor0 _floor_set1A={30, 44100, 256, 12,150, 1, {1} }; -static vorbis_info_residue0 _residue_set0A={0,128, 32,6,2, - {0,1,1,1,1,1}, - {4,5,6,7,8}, - - {0,99999,9999,9999,9999}, - {99,1.5,2.5,3.5,5}, - {5,5,5,5,5}, - {99,99,99,99,99}}; - -static vorbis_info_residue0 _residue_set1A={0,1024, 32,10,3, - {0,1,1,1,1,1,1,1,1,1}, - {9,10,11,12,13,14,15,16,17}, - - {0,9,9999,17,9999, - 27,9999,9999,9999}, - {99,1.5,1.5,2.5,2.5,3.5,3.5,7,13}, - {5,5,5,5,5,5,5,5,5}, - {99,99,99,99,99,99,99,99,99}}; - -static vorbis_info_mapping0 _mapping_set0A={1, {0,0}, {0}, {0}, {0}, {0}}; -static vorbis_info_mapping0 _mapping_set1A={1, {0,0}, {0}, {1}, {1}, {0}}; -static vorbis_info_mode _mode_set0A={0,0,0,0}; -static vorbis_info_mode _mode_set1A={1,0,0,1}; - -/* CD quality stereo, no channel coupling */ -vorbis_info info_A={ - /* channels, sample rate, upperkbps, nominalkbps, lowerkbps */ - 0, 2, 44100, 0,0,0, - /* smallblock, largeblock */ - {256, 2048}, - /* modes,maps,times,floors,residues,books,psys */ - 2, 2, 1, 2, 2, 18, 1, - /* modes */ - {&_mode_set0A,&_mode_set1A}, - /* maps */ - {0,0},{&_mapping_set0A,&_mapping_set1A}, - /* times */ - {0,0},{&_time_set0A}, - /* floors */ - {0,0},{&_floor_set0A,&_floor_set1A}, - /* residue */ - {0,0},{&_residue_set0A,&_residue_set1A}, - /* books */ - {&_vq_book_lsp12_0, /* 0 */ - &_vq_book_lsp30_0, /* 1 */ - - &_huff_book_resaux0_128a_128, - &_huff_book_resaux0_1024a_128, - - &_vq_book_res0_128a_128_1, - &_vq_book_res0_128a_128_2, - &_vq_book_res0_128a_128_3, - &_vq_book_res0_128a_128_4, - &_vq_book_res0_128a_128_5, - &_vq_book_res0_1024a_128_1, - &_vq_book_res0_1024a_128_2, - &_vq_book_res0_1024a_128_3, - &_vq_book_res0_1024a_128_4, - &_vq_book_res0_1024a_128_5, - &_vq_book_res0_1024a_128_6, - &_vq_book_res0_1024a_128_7, - &_vq_book_res0_1024a_128_8, - &_vq_book_res0_1024a_128_9, - - }, - /* psy */ - {&_psy_set_A}, - /* thresh sample period, preecho clamp trigger threshhold, range, minenergy */ - 256, 32, 6, -96. -}; - -#define PREDEF_INFO_MAX 0 - -#endif diff --git a/include/vorbis/mode_B.h b/include/vorbis/mode_B.h deleted file mode 100644 index bb40ad83..00000000 --- a/include/vorbis/mode_B.h +++ /dev/null @@ -1,205 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: predefined encoding modes - last mod: $Id: mode_B.h,v 1.1 2000/08/15 11:53:18 xiphmont Exp $ - - ********************************************************************/ - -#ifndef _V_MODES_B_H_ -#define _V_MODES_B_H_ - -#include <stdio.h> -#include "vorbis/codec.h" -#include "vorbis/backends.h" - -#include "vorbis/book/lsp12_0.vqh" -#include "vorbis/book/lsp30_0.vqh" - -#include "vorbis/book/resaux0_128a_160.vqh" -#include "vorbis/book/resaux0_1024a_160.vqh" - -#include "vorbis/book/res0_128a_160_1.vqh" -#include "vorbis/book/res0_128a_160_2.vqh" -#include "vorbis/book/res0_128a_160_3.vqh" -#include "vorbis/book/res0_128a_160_4.vqh" -#include "vorbis/book/res0_128a_160_5.vqh" -#include "vorbis/book/res0_1024a_160_1.vqh" -#include "vorbis/book/res0_1024a_160_2.vqh" -#include "vorbis/book/res0_1024a_160_3.vqh" -#include "vorbis/book/res0_1024a_160_4.vqh" -#include "vorbis/book/res0_1024a_160_5.vqh" -#include "vorbis/book/res0_1024a_160_6.vqh" -#include "vorbis/book/res0_1024a_160_7.vqh" -#include "vorbis/book/res0_1024a_160_8.vqh" -#include "vorbis/book/res0_1024a_160_9.vqh" - -static vorbis_info_psy _psy_set_B={ - 1,/*athp*/ - 1,/*decayp*/ - 1,/*smoothp*/ - 0,.1, - - -100., - -140., - - /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */ - /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */ - /* y: 0 10 20 30 40 50 60 70 80 90 100 dB */ - - 1,/* tonemaskp */ - /* 0 10 20 30 40 50 60 70 80 90 100 */ - {{-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*63*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*88*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*125*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*175*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*250*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*350*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*500*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*700*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*1000*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*1400*/ - {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*2000*/ - {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*2800*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*4000*/ - {-30.,-30.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*5600*/ - {-30.,-30.,-35.,-35.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*8000*/ - {-30.,-30.,-35.,-33.,-35.,-45.,-55.,-65.,-75.,-90.,-100.}, /*11500*/ - {-30.,-28.,-30.,-32.,-35.,-45.,-55.,-65.,-75.,-90.,-100.}, /*16000*/ - }, - - 1,/* peakattp */ - {{-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*63*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*88*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*125*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-16.,-17.}, /*8000*/ - { -6., -7., -9., -9., -9., -9.,-10.,-11.,-12.,-13.,-14.}, /*11500*/ - { -6., -6., -9., -9., -9., -9., -9., -9.,-10.,-11.,-12.}, /*16000*/ - }, - - 1,/*noisemaskp */ - /* 0 10 20 30 40 50 60 70 80 90 100 */ - {{-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*63*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*88*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*125*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*175*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*250*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*350*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*500*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*700*/ - - { 4., 4., 4., 4., 4., 2., 1., 0., -1., -2., -3.}, /*1000*/ - { 4., 4., 4., 4., 4., 2., 1., 0., 0., -2., -3.}, /*1400*/ - { 4., 4., 4., 4., 2., 2., 1., 0., 0., -2., -3.}, /*2000*/ - { 4., 4., 4., 4., 2., 2., 1., 0., 0., -2., -3.}, /*2800*/ - { 4., 4., 4., 4., 4., 4., 2., 0., 0., 0., 0.}, /*4000*/ - { 4., 4., 4., 4., 4., 4., 2., 2., 2., 2., 2.}, /*5600*/ - { 6., 6., 6., 6., 4., 4., 4., 4., 4., 2., 2.}, /*8000*/ - { 8., 8., 8., 8., 6., 6., 6., 6., 6., 4., 4.}, /*11500*/ - { 8., 8., 8., 8., 8., 8., 8., 6., 6., 6., 4.}, /*16000*/ - }, - - 110., - - -0., -.004 /* attack/decay control */ -}; - -/* with GNUisms, this could be short and readable. Oh well */ -static vorbis_info_time0 _time_set0B={0}; -static vorbis_info_floor0 _floor_set0B={12, 44100, 64, 12,150, 1, {0} }; -static vorbis_info_floor0 _floor_set1B={30, 44100, 256, 12,150, 1, {1} }; -static vorbis_info_residue0 _residue_set0B={0,128, 32,6,2, - {0,1,1,1,1,1}, - {4,5,6,7,8}, - - {0,99999,9999,9999,9999}, - {99,1.5,2.5,3.5,5}, - {5,5,5,5,5}, - {99,99,99,99,99}}; - -static vorbis_info_residue0 _residue_set1B={0,1024, 32,10,3, - {0,1,1,1,1,1,1,1,1,1}, - {9,10,11,12,13,14,15,16,17}, - - {0,9,9999,17,9999, - 27,9999,9999,9999}, - {99,1.5,1.5,2.5,2.5,3.5,3.5,7,13}, - {5,5,5,5,5,5,5,5,5}, - {99,99,99,99,99,99,99,99,99}}; - -static vorbis_info_mapping0 _mapping_set0B={1, {0,0}, {0}, {0}, {0}, {0}}; -static vorbis_info_mapping0 _mapping_set1B={1, {0,0}, {0}, {1}, {1}, {0}}; -static vorbis_info_mode _mode_set0B={0,0,0,0}; -static vorbis_info_mode _mode_set1B={1,0,0,1}; - -/* CD quality stereo, no channel coupling */ -vorbis_info info_B={ - /* channels, sample rate, upperkbps, nominalkbps, lowerkbps */ - 0, 2, 44100, 0,0,0, - /* smallblock, largeblock */ - {256, 2048}, - /* modes,maps,times,floors,residues,books,psys */ - 2, 2, 1, 2, 2, 18, 1, - /* modes */ - {&_mode_set0B,&_mode_set1B}, - /* maps */ - {0,0},{&_mapping_set0B,&_mapping_set1B}, - /* times */ - {0,0},{&_time_set0B}, - /* floors */ - {0,0},{&_floor_set0B,&_floor_set1B}, - /* residue */ - {0,0},{&_residue_set0B,&_residue_set1B}, - /* books */ - {&_vq_book_lsp12_0, /* 0 */ - &_vq_book_lsp30_0, /* 1 */ - - &_huff_book_resaux0_128a_160, - &_huff_book_resaux0_1024a_160, - - &_vq_book_res0_128a_160_1, - &_vq_book_res0_128a_160_2, - &_vq_book_res0_128a_160_3, - &_vq_book_res0_128a_160_4, - &_vq_book_res0_128a_160_5, - &_vq_book_res0_1024a_160_1, - &_vq_book_res0_1024a_160_2, - &_vq_book_res0_1024a_160_3, - &_vq_book_res0_1024a_160_4, - &_vq_book_res0_1024a_160_5, - &_vq_book_res0_1024a_160_6, - &_vq_book_res0_1024a_160_7, - &_vq_book_res0_1024a_160_8, - &_vq_book_res0_1024a_160_9, - - }, - /* psy */ - {&_psy_set_B}, - /* thresh sample period, preecho clamp trigger threshhold, range, minenergy */ - 256, 32, 6, -96. -}; - -#define PREDEF_INFO_MAX 0 - -#endif diff --git a/include/vorbis/mode_C.h b/include/vorbis/mode_C.h deleted file mode 100644 index baf0162b..00000000 --- a/include/vorbis/mode_C.h +++ /dev/null @@ -1,196 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: predefined encoding modes - last mod: $Id: mode_C.h,v 1.2 2000/08/15 14:01:02 xiphmont Exp $ - - ********************************************************************/ - -#ifndef _V_MODES_C_H_ -#define _V_MODES_C_H_ - -#include <stdio.h> -#include "vorbis/codec.h" -#include "vorbis/backends.h" - -#include "vorbis/book/lsp12_0.vqh" -#include "vorbis/book/lsp30_0.vqh" - -#include "vorbis/book/resaux0_128a_192.vqh" -#include "vorbis/book/resaux0_1024a_192.vqh" - -#include "vorbis/book/res0_128a_192_1.vqh" -#include "vorbis/book/res0_128a_192_2.vqh" -#include "vorbis/book/res0_128a_192_3.vqh" -#include "vorbis/book/res0_128a_192_4.vqh" -#include "vorbis/book/res0_128a_192_5.vqh" -#include "vorbis/book/res0_1024a_192_1.vqh" -#include "vorbis/book/res0_1024a_192_2.vqh" -#include "vorbis/book/res0_1024a_192_3.vqh" -#include "vorbis/book/res0_1024a_192_4.vqh" -#include "vorbis/book/res0_1024a_192_5.vqh" - -static vorbis_info_psy _psy_set_C={ - 1,/*athp*/ - 0,/*decayp*/ - 1,/*smoothp*/ - 0,.1, - - -100., - -140., - - /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */ - /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */ - /* y: 0 10 20 30 40 50 60 70 80 90 100 dB */ - - 1,/* tonemaskp */ - /* 0 10 20 30 40 50 60 70 80 90 100 */ - {{-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*63*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*88*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*125*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*175*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*250*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*350*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*500*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*700*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*1000*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*1400*/ - {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*2000*/ - {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*2800*/ - {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*4000*/ - {-30.,-30.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*5600*/ - {-30.,-30.,-35.,-35.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*8000*/ - {-30.,-30.,-35.,-33.,-35.,-45.,-55.,-65.,-75.,-90.,-100.}, /*11500*/ - {-30.,-28.,-30.,-32.,-35.,-45.,-55.,-65.,-75.,-90.,-100.}, /*16000*/ - }, - - 1,/* peakattp */ - {{-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*63*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*88*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*125*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-16.,-17.}, /*8000*/ - { -6., -7., -9., -9., -9., -9.,-10.,-11.,-12.,-13.,-14.}, /*11500*/ - { -6., -6., -9., -9., -9., -9., -9., -9.,-10.,-11.,-12.}, /*16000*/ - }, - - 1,/*noisemaskp */ - /* 0 10 20 30 40 50 60 70 80 90 100 */ - {{-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*63*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*88*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*125*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*175*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*250*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*350*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*500*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*700*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*1000*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*1400*/ - - { 0., -4., -4., -4., -6., -6., -6., -6., -6., -6., -6.}, /*2000*/ - { 0., -3., -4., -4., -4., -5., -6., -6., -6., -6., -6.}, /*2800*/ - { 0., -2., -2., -2., -2., -2., -2., -2., -4., -4., -4.}, /*4000*/ - { 0., -0., -0., -0., -0., -2., -2., -2., -2., -2., -2.}, /*5600*/ - { 0., 0., 0., 0., 0., 0., 0., 0., 0., -2., -4.}, /*8000*/ - { 2., 2., 2., 2., 2., 2., 0., 0., 0., 0., 0.}, /*11500*/ - { 2., 2., 2., 2., 2., 4., 4., 4., 4., 4., 4.}, /*16000*/ - }, - - 100., - - -0., -.004 /* attack/decay control */ -}; - -/* with GNUisms, this could be short and readable. Oh well */ -static vorbis_info_time0 _time_set0C={0}; -static vorbis_info_floor0 _floor_set0C={12, 44100, 64, 12,150, 1, {0} }; -static vorbis_info_floor0 _floor_set1C={30, 44100, 256, 12,150, 1, {1} }; -static vorbis_info_residue0 _residue_set0C={0,128, 32,6,2, - {0,1,1,1,1,1}, - {4,5,6,7,8}, - - {0,99999,9999,9999,9999}, - {99,1.5,2.5,3.5,5}, - {5,5,5,5,5}, - {99,99,99,99,99}}; - -static vorbis_info_residue0 _residue_set1C={0,1024, 32,6,3, - {0,1,1,1,1,1}, - {9,10,11,12,13}, - - {0,99999,9999,9999,9999}, - {99,1.5,2.5,3.5,5}, - {5,5,5,5,5}, - {99,99,99,99,99}}; - -static vorbis_info_mapping0 _mapping_set0C={1, {0,0}, {0}, {0}, {0}, {0}}; -static vorbis_info_mapping0 _mapping_set1C={1, {0,0}, {0}, {1}, {1}, {0}}; -static vorbis_info_mode _mode_set0C={0,0,0,0}; -static vorbis_info_mode _mode_set1C={1,0,0,1}; - -/* CD quality stereo, no channel coupling */ -vorbis_info info_C={ - /* channels, sample rate, upperkbps, nominalkbps, lowerkbps */ - 0, 2, 44100, 0,0,0, - /* smallblock, largeblock */ - {256, 2048}, - /* modes,maps,times,floors,residues,books,psys */ - 2, 2, 1, 2, 2, 14, 1, - /* modes */ - {&_mode_set0C,&_mode_set1C}, - /* maps */ - {0,0},{&_mapping_set0C,&_mapping_set1C}, - /* times */ - {0,0},{&_time_set0C}, - /* floors */ - {0,0},{&_floor_set0C,&_floor_set1C}, - /* residue */ - {0,0},{&_residue_set0C,&_residue_set1C}, - /* books */ - {&_vq_book_lsp12_0, /* 0 */ - &_vq_book_lsp30_0, /* 1 */ - - &_huff_book_resaux0_128a_192, - &_huff_book_resaux0_1024a_192, - - &_vq_book_res0_128a_192_1, - &_vq_book_res0_128a_192_2, - &_vq_book_res0_128a_192_3, - &_vq_book_res0_128a_192_4, - &_vq_book_res0_128a_192_5, - &_vq_book_res0_1024a_192_1, - &_vq_book_res0_1024a_192_2, - &_vq_book_res0_1024a_192_3, - &_vq_book_res0_1024a_192_4, - &_vq_book_res0_1024a_192_5, - - }, - /* psy */ - {&_psy_set_C}, - /* thresh sample period, preecho clamp trigger threshhold, range, minenergy */ - 256, 24, 6, -96. -}; - -#define PREDEF_INFO_MAX 0 - -#endif diff --git a/include/vorbis/mode_D.h b/include/vorbis/mode_D.h deleted file mode 100644 index db116499..00000000 --- a/include/vorbis/mode_D.h +++ /dev/null @@ -1,179 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: predefined encoding modes - last mod: $Id: mode_D.h,v 1.3 2000/08/15 15:24:30 msmith Exp $ - - ********************************************************************/ - -/* this is really a freeform VBR mode. It roughly centers on 256 kbps stereo */ - -#ifndef _V_MODES_D_H_ -#define _V_MODES_D_H_ - -#include <stdio.h> -#include "vorbis/codec.h" -#include "vorbis/backends.h" - -#include "vorbis/book/lsp12_0.vqh" -#include "vorbis/book/lsp30_0.vqh" - -#include "vorbis/book/resaux0_128a_256.vqh" -#include "vorbis/book/resaux0_1024a_256.vqh" - -#include "vorbis/book/res0_128a_256_1.vqh" -#include "vorbis/book/res0_128a_256_2.vqh" -#include "vorbis/book/res0_128a_256_3.vqh" -#include "vorbis/book/res0_128a_256_4.vqh" -#include "vorbis/book/res0_128a_256_5.vqh" -#include "vorbis/book/res0_1024a_256_1.vqh" -#include "vorbis/book/res0_1024a_256_2.vqh" -#include "vorbis/book/res0_1024a_256_3.vqh" -#include "vorbis/book/res0_1024a_256_4.vqh" -#include "vorbis/book/res0_1024a_256_5.vqh" - -static vorbis_info_psy _psy_set_256 ={ - 1,/*athp*/ - 0,/*decayp*/ - 1,/*smoothp*/ - 0,.1, - - -100., - -140., - - /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */ - /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */ - /* y: 0 10 20 30 40 50 60 70 80 90 100 dB */ - - 1,/* tonemaskp */ - /* 0 10 20 30 40 50 60 70 80 90 100 */ - {{-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*63*/ - {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*125*/ - {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*175*/ - {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*250*/ - {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*350*/ - {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*500*/ - {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*700*/ - {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*1000*/ - {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*1400*/ - {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*2000*/ - {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*2800*/ - {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*4000*/ - {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*5600*/ - {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*8000*/ - {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*11500*/ - {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*16000*/ - }, - - 1,/* peakattp */ - {{-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*63*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*88*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*125*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*175*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*250*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*350*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*500*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*700*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*1000*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*1400*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*2000*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*2800*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*4000*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*5600*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*8000*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*11500*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*16000*/ - }, - - 0,/*noisemaskp */ - /* 0 10 20 30 40 50 60 70 80 90 100 */ - {0}, - - 110., - - -0., -.004 /* attack/decay control */ -}; - -/* with GNUisms, this could be short and readable. Oh well */ -static vorbis_info_time0 _time_set0_256={0}; -static vorbis_info_floor0 _floor_set0_256={12, 44100, 64, 12,150, 1, {0} }; -static vorbis_info_floor0 _floor_set1_256={30, 44100, 256, 12,150, 1, {1} }; -static vorbis_info_residue0 _residue_set0_256={0,128, 32,6,2, - {0,1,1,1,1,1}, - {4,5,6,7,8}, - - {0,9999,9999,9999,9999}, - {99,2.5,7,13.5,27.5}, - {5,5,5,5,5}, - {99,99,99,99,99}}; - -static vorbis_info_residue0 _residue_set1_256={0,1024, 32,6,3, - {0,1,1,1,1,1}, - {9,10,11,12,13}, - - {0,9999,9999,9999,9999}, - {99,2.5,7,13.5,27.5}, - {5,5,5,5,5}, - {99,99,99,99,99}}; - -static vorbis_info_mapping0 _mapping_set0_256={1, {0,0}, {0}, {0}, {0}, {0}}; -static vorbis_info_mapping0 _mapping_set1_256={1, {0,0}, {0}, {1}, {1}, {0}}; -static vorbis_info_mode _mode_set0_256={0,0,0,0}; -static vorbis_info_mode _mode_set1_256={1,0,0,1}; - -/* CD quality stereo, no channel coupling */ -vorbis_info info_D={ - /* channels, sample rate, upperkbps, nominalkbps, lowerkbps */ - 0, 2, 44100, 0,0,0, - /* smallblock, largeblock */ - {256, 2048}, - /* modes,maps,times,floors,residues,books,psys */ - 2, 2, 1, 2, 2, 14, 1, - /* modes */ - {&_mode_set0_256,&_mode_set1_256}, - /* maps */ - {0,0},{&_mapping_set0_256,&_mapping_set1_256}, - /* times */ - {0,0},{&_time_set0_256}, - /* floors */ - {0,0},{&_floor_set0_256,&_floor_set1_256}, - /* residue */ - {0,0},{&_residue_set0_256,&_residue_set1_256}, - /* books */ - {&_vq_book_lsp12_0, /* 0 */ - &_vq_book_lsp30_0, /* 1 */ - - &_huff_book_resaux0_128a_256, - &_huff_book_resaux0_1024a_256, - - &_vq_book_res0_128a_256_1, - &_vq_book_res0_128a_256_2, - &_vq_book_res0_128a_256_3, - &_vq_book_res0_128a_256_4, - &_vq_book_res0_128a_256_5, - &_vq_book_res0_1024a_256_1, - &_vq_book_res0_1024a_256_2, - &_vq_book_res0_1024a_256_3, - &_vq_book_res0_1024a_256_4, - &_vq_book_res0_1024a_256_5, - - }, - /* psy */ - {&_psy_set_256}, - /* thresh sample period, preecho clamp trigger threshhold, range, minenergy */ - 256, 24, 6, -96. -}; - -#define PREDEF_INFO_MAX 0 - -#endif diff --git a/include/vorbis/mode_E.h b/include/vorbis/mode_E.h deleted file mode 100644 index ad60f410..00000000 --- a/include/vorbis/mode_E.h +++ /dev/null @@ -1,163 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: predefined encoding modes - last mod: $Id: mode_E.h,v 1.1 2000/08/15 09:45:47 xiphmont Exp $ - - ********************************************************************/ - -/* this is really a freeform VBR mode. It roughly centers on 350 kbps stereo */ - -#ifndef _V_MODES_E_H_ -#define _V_MODES_E_H_ - -#include <stdio.h> -#include "vorbis/codec.h" -#include "vorbis/backends.h" - -#include "vorbis/book/lsp12_0.vqh" -#include "vorbis/book/lsp30_0.vqh" - -#include "vorbis/book/resaux0_128a_350.vqh" -#include "vorbis/book/resaux0_1024a_350.vqh" - -#include "vorbis/book/res0_128a_350_1.vqh" -#include "vorbis/book/res0_128a_350_2.vqh" -#include "vorbis/book/res0_128a_350_3.vqh" -#include "vorbis/book/res0_128a_350_4.vqh" -#include "vorbis/book/res0_128a_350_5.vqh" -#include "vorbis/book/res0_1024a_350_1.vqh" -#include "vorbis/book/res0_1024a_350_2.vqh" -#include "vorbis/book/res0_1024a_350_3.vqh" -#include "vorbis/book/res0_1024a_350_4.vqh" -#include "vorbis/book/res0_1024a_350_5.vqh" - -static vorbis_info_psy _psy_set_E ={ - 1,/*athp*/ - 0,/*decayp*/ - 1,/*smoothp*/ - 0,.1, - - -140., - -180., - - /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */ - /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */ - /* y: 0 10 20 30 40 50 60 70 80 90 100 dB */ - - 0,/* tonemaskp */ - /* 0 10 20 30 40 50 60 70 80 90 100 */ - {0}, - - 1,/* peakattp */ - {{-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*63*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*88*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*125*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*175*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*250*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*350*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*500*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*700*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*1000*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*1400*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*2000*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*2800*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*4000*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*5600*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*8000*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*11500*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*16000*/ - }, - - 0,/*noisemaskp */ - /* 0 10 20 30 40 50 60 70 80 90 100 */ - {0}, - - 110., - - -0., -.004 /* attack/decay control */ -}; - -/* with GNUisms, this could be short and readable. Oh well */ -static vorbis_info_time0 _time_set0_E={0}; -static vorbis_info_floor0 _floor_set0_E={12, 44100, 64, 12,150, 1, {0} }; -static vorbis_info_floor0 _floor_set1_E={30, 44100, 256, 12,150, 1, {1} }; -static vorbis_info_residue0 _residue_set0_E={0,128, 32,6,2, - {0,1,1,1,1,1}, - {4,5,6,7,8}, - - {0,9999,9999,9999,9999}, - {99,2.5,7,13.5,27.5}, - {5,5,5,5,5}, - {99,99,99,99,99}}; - -static vorbis_info_residue0 _residue_set1_E={0,1024, 32,6,3, - {0,1,1,1,1,1}, - {9,10,11,12,13}, - - {0,9999,9999,9999,9999}, - {99,2.5,7,13.5,27.5}, - {5,5,5,5,5}, - {99,99,99,99,99}}; - -static vorbis_info_mapping0 _mapping_set0_E={1, {0,0}, {0}, {0}, {0}, {0}}; -static vorbis_info_mapping0 _mapping_set1_E={1, {0,0}, {0}, {1}, {1}, {0}}; -static vorbis_info_mode _mode_set0_E={0,0,0,0}; -static vorbis_info_mode _mode_set1_E={1,0,0,1}; - -/* CD quality stereo, no channel coupling */ -vorbis_info info_E={ - /* channels, sample rate, upperkbps, nominalkbps, lowerkbps */ - 0, 2, 44100, 0,0,0, - /* smallblock, largeblock */ - {256, 2048}, - /* modes,maps,times,floors,residues,books,psys */ - 2, 2, 1, 2, 2, 14, 1, - /* modes */ - {&_mode_set0_E,&_mode_set1_E}, - /* maps */ - {0,0},{&_mapping_set0_E,&_mapping_set1_E}, - /* times */ - {0,0},{&_time_set0_E}, - /* floors */ - {0,0},{&_floor_set0_E,&_floor_set1_E}, - /* residue */ - {0,0},{&_residue_set0_E,&_residue_set1_E}, - /* books */ - {&_vq_book_lsp12_0, /* 0 */ - &_vq_book_lsp30_0, /* 1 */ - - &_huff_book_resaux0_128a_350, - &_huff_book_resaux0_1024a_350, - - &_vq_book_res0_128a_350_1, - &_vq_book_res0_128a_350_2, - &_vq_book_res0_128a_350_3, - &_vq_book_res0_128a_350_4, - &_vq_book_res0_128a_350_5, - &_vq_book_res0_1024a_350_1, - &_vq_book_res0_1024a_350_2, - &_vq_book_res0_1024a_350_3, - &_vq_book_res0_1024a_350_4, - &_vq_book_res0_1024a_350_5, - - }, - /* psy */ - {&_psy_set_E}, - /* thresh sample period, preecho clamp trigger threshhold, range, minenergy */ - 256, 24, 6, -96. -}; - -#define PREDEF_INFO_MAX 0 - -#endif diff --git a/include/vorbis/modes.h b/include/vorbis/modes.h deleted file mode 100644 index 6cd279f9..00000000 --- a/include/vorbis/modes.h +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: predefined encoding modes - last mod: $Id: modes.h,v 1.20 2000/08/15 11:53:18 xiphmont Exp $ - - ********************************************************************/ - -#ifndef _V_MODES_H_ -#define _V_MODES_H_ - -#include "vorbis/mode_A.h" -#include "vorbis/mode_B.h" -#include "vorbis/mode_C.h" -#include "vorbis/mode_D.h" -#include "vorbis/mode_E.h" - -#endif diff --git a/include/vorbis/vorbisfile.h b/include/vorbis/vorbisfile.h deleted file mode 100644 index 854972a4..00000000 --- a/include/vorbis/vorbisfile.h +++ /dev/null @@ -1,118 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: stdio-based convenience library for opening/seeking/decoding - last mod: $Id: vorbisfile.h,v 1.7 2000/08/30 06:09:21 xiphmont Exp $ - - ********************************************************************/ - -#ifndef _OV_FILE_H_ -#define _OV_FILE_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -#include <stdio.h> -#include "codec.h" - -/* The function prototypes for the callbacks are basically the same as for - * the stdio functions fread, fseek, fclose, ftell. - * The one difference is that the FILE * arguments have been replaced with - * a void * - this is to be used as a pointer to whatever internal data these - * functions might need. In the stdio case, it's just a FILE * cast to a void * - * - * If you use other functions, check the docs for these functions and return - * the right values. For seek_func(), you *MUST* return -1 if the stream is - * unseekable - */ -typedef struct { - size_t (*read_func) (void *ptr, size_t size, size_t nmemb, void *datasource); - int (*seek_func) (void *datasource, ogg_int64_t offset, int whence); - int (*close_func) (void *datasource); - long (*tell_func) (void *datasource); -} ov_callbacks; - - -typedef struct { - void *datasource; /* Pointer to a FILE *, etc. */ - int seekable; - ogg_int64_t offset; - ogg_int64_t end; - ogg_sync_state oy; - - /* If the FILE handle isn't seekable (eg, a pipe), only the current - stream appears */ - int links; - ogg_int64_t *offsets; - ogg_int64_t *dataoffsets; - long *serialnos; - ogg_int64_t *pcmlengths; - vorbis_info *vi; - vorbis_comment *vc; - - /* Decoding working state local storage */ - ogg_int64_t pcm_offset; - int decode_ready; - long current_serialno; - int current_link; - - double bittrack; - double samptrack; - - ogg_stream_state os; /* take physical pages, weld into a logical - stream of packets */ - vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */ - vorbis_block vb; /* local working space for packet->PCM decode */ - - ov_callbacks callbacks; - -} OggVorbis_File; - -extern int ov_clear(OggVorbis_File *vf); -extern int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes); -extern int ov_open_callbacks(void *datasource, OggVorbis_File *vf, - char *initial, long ibytes, ov_callbacks callbacks); - -extern long ov_bitrate(OggVorbis_File *vf,int i); -extern long ov_bitrate_instant(OggVorbis_File *vf); -extern long ov_streams(OggVorbis_File *vf); -extern long ov_seekable(OggVorbis_File *vf); -extern long ov_serialnumber(OggVorbis_File *vf,int i); - -extern ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i); -extern ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i); -extern double ov_time_total(OggVorbis_File *vf,int i); - -extern int ov_raw_seek(OggVorbis_File *vf,long pos); -extern int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos); -extern int ov_time_seek(OggVorbis_File *vf,double pos); - -extern ogg_int64_t ov_raw_tell(OggVorbis_File *vf); -extern ogg_int64_t ov_pcm_tell(OggVorbis_File *vf); -extern double ov_time_tell(OggVorbis_File *vf); - -extern vorbis_info *ov_info(OggVorbis_File *vf,int link); -extern vorbis_comment *ov_comment(OggVorbis_File *vf,int link); - -extern long ov_read(OggVorbis_File *vf,char *buffer,int length, - int bigendianp,int word,int sgned,int *bitstream); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif - - diff --git a/install.sh b/install.sh deleted file mode 100644 index e69de29b..00000000 --- a/install.sh +++ /dev/null diff --git a/lib/Makefile.in b/lib/Makefile.in deleted file mode 100644 index 160ae16a..00000000 --- a/lib/Makefile.in +++ /dev/null @@ -1,100 +0,0 @@ -# vorbis makefile configured for use with gcc on any platform -# $Id: Makefile.in,v 1.34 2000/08/30 06:09:21 xiphmont Exp $ - -############################################################################### -# # -# To build a production vorbis (preferrably using gmake), just type 'make'. # -# To build with debugging or profiling information, use 'make debug' or # -# 'make profile' respectively. 'make clean' is a good idea between builds # -# with different target names, or before a final build. # -# # -############################################################################### - - -# DO NOT EDIT BELOW! ########################################################## -# (unless, of course, you know what you are doing :) ########################## - -@SET_MAKE@ -FLAGS=-I. -I../include @CFLAGS@ -OPT=@OPT@ $(FLAGS) -DEBUG=@DEBUG@ $(FLAGS) -PROFILE=@PROFILE@ $(FLAGS) -CC=@CC@ -LD=@CC@ -LDFLAGS=@LDFLAGS@ $(FLAGS) -AR=@AR@ -RANLIB=@RANLIB@ -LIBS=@LIBS@ - -HFILES = ../include/vorbis/codec.h \ - ../include/vorbis/internal.h ../include/vorbis/backends.h \ - ../include/vorbis/codebook.h \ - bitwise.h envelope.h lpc.h lsp.h bookinternal.h misc.h\ - psy.h smallft.h window.h scales.h os.h mdct.h registry.h\ - masking.h sharedbook.h iir.h -LFILES = framing.o mdct.o smallft.o block.o envelope.o window.o\ - lsp.o lpc.o analysis.o synthesis.o psy.o info.o bitwise.o\ - time0.o floor0.o res0.o mapping0.o registry.o\ - codebook.o sharedbook.o iir.o -VF_HFILES = ../include/vorbis/vorbisfile.h ../include/vorbis/codec.h \ - ../include/vorbis/internal.h ../include/vorbis/codebook.h \ - os.h misc.h -VF_LFILES = vorbisfile.o - -PSY_FILES = mdct.o psy.o lpc.o smallft.o window.o psytune.o floor0.o \ - bitwise.o lsp.o codebook.o sharedbook.o - -all: - $(MAKE) target CFLAGS="$(OPT)" - -debug: - $(MAKE) target CFLAGS="$(DEBUG)" - -analysis: - $(MAKE) target CFLAGS="$(DEBUG) -DANALYSIS" - -profile: - $(MAKE) target CFLAGS="$(PROFILE)" - -target: libvorbis.a vorbisfile.a psytune - -selftest: - $(MAKE) clean - $(CC) $(DEBUG) $(LDFLAGS) -D_V_SELFTEST framing.c -o test_framing - $(CC) $(DEBUG) $(LDFLAGS) -D_V_SELFTEST bitwise.c\ - -o test_bitwise $(LIBS) - $(CC) $(DEBUG) $(LDFLAGS) -c bitwise.c - $(CC) $(DEBUG) $(LDFLAGS) -D_V_SELFTEST sharedbook.c\ - -o test_sharedbook $(LIBS) - $(CC) $(DEBUG) $(LDFLAGS) -c sharedbook.c - $(CC) $(DEBUG) $(LDFLAGS) -D_V_SELFTEST codebook.c \ - sharedbook.o bitwise.o -o test_codebook $(LIBS) - @echo - @./test_framing - @./test_bitwise - @./test_sharedbook - @./test_codebook - -libvorbis.a: $(LFILES) - $(AR) -r libvorbis.a $(LFILES) - $(RANLIB) libvorbis.a - -vorbisfile.a: $(VF_LFILES) - $(AR) -r vorbisfile.a $(VF_LFILES) - $(RANLIB) vorbisfile.a - -psytune: $(PSY_FILES) - $(CC) $(CFLAGS) $(LDFLAGS) $(PSY_FILES) -o $@ $(LIBS) - -$(LFILES): $(HFILES) -$(VF_LFILES): $(VF_HFILES) - -.c.o: - $(CC) $(CFLAGS) -c $< - -clean: - -rm -f *.o *.a test* *~ *.out ogg config.* tone psytune - -distclean: clean - -rm -f Makefile - diff --git a/lib/analysis.c b/lib/analysis.c deleted file mode 100644 index e24a66b9..00000000 --- a/lib/analysis.c +++ /dev/null @@ -1,105 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: single-block PCM analysis mode dispatch - last mod: $Id: analysis.c,v 1.33 2000/08/15 09:09:42 xiphmont Exp $ - - ********************************************************************/ - -#include <stdio.h> -#include <string.h> -#include <math.h> -#include "vorbis/codec.h" -#include "bitwise.h" -#include "registry.h" -#include "scales.h" -#include "os.h" - -/* decides between modes, dispatches to the appropriate mapping. */ -int vorbis_analysis(vorbis_block *vb,ogg_packet *op){ - vorbis_dsp_state *vd=vb->vd; - vorbis_info *vi=vd->vi; - int type; - int mode=0; - - vb->glue_bits=0; - vb->time_bits=0; - vb->floor_bits=0; - vb->res_bits=0; - - /* first things first. Make sure encode is ready */ - _oggpack_reset(&vb->opb); - /* Encode the packet type */ - _oggpack_write(&vb->opb,0,1); - - /* currently lazy. Short block dispatches to 0, long to 1. */ - - if(vb->W &&vi->modes>1)mode=1; - type=vi->map_type[vi->mode_param[mode]->mapping]; - vb->mode=mode; - - /* Encode frame mode, pre,post windowsize, then dispatch */ - _oggpack_write(&vb->opb,mode,vd->modebits); - if(vb->W){ - _oggpack_write(&vb->opb,vb->lW,1); - _oggpack_write(&vb->opb,vb->nW,1); - /*fprintf(stderr,"*"); - }else{ - fprintf(stderr,".");*/ - } - - if(_mapping_P[type]->forward(vb,vd->mode[mode])) - return(-1); - - /* set up the packet wrapper */ - - op->packet=_oggpack_buffer(&vb->opb); - op->bytes=_oggpack_bytes(&vb->opb); - op->b_o_s=0; - op->e_o_s=vb->eofflag; - op->frameno=vb->frameno; - op->packetno=vb->sequence; /* for sake of completeness */ - - return(0); -} - -/* there was no great place to put this.... */ -void _analysis_output(char *base,int i,double *v,int n,int bark,int dB){ -#ifdef ANALYSIS - int j; - FILE *of; - char buffer[80]; - sprintf(buffer,"%s_%d.m",base,i); - of=fopen(buffer,"w"); - - if(!of)perror("failed to open data dump file"); - - for(j=0;j<n;j++){ - if(dB && v[j]==0) - fprintf(of,"\n\n"); - else{ - if(bark) - fprintf(of,"%g ",toBARK(22050.*j/n)); - else - fprintf(of,"%g ",(double)j); - - if(dB){ - fprintf(of,"%g\n",todB(fabs(v[j]))); - }else{ - fprintf(of,"%g\n",v[j]); - } - } - } - fclose(of); -#endif -} diff --git a/lib/barkmel.c b/lib/barkmel.c deleted file mode 100644 index 83a5bf34..00000000 --- a/lib/barkmel.c +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: bark scale utility - last mod: $Id: barkmel.c,v 1.1 2000/01/04 09:04:58 xiphmont Exp $ - - ********************************************************************/ - -#include <stdio.h> -#include "scales.h" -int main(){ - int i; - double rate; - for(i=64;i<32000;i*=2){ - rate=48000.; - fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n", - rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2)); - - rate=44100.; - fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n", - rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2)); - - rate=32000.; - fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n", - rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2)); - - rate=22050.; - fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n", - rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2)); - - rate=16000.; - fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n", - rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2)); - - rate=11025.; - fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n", - rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2)); - - rate=8000.; - fprintf(stderr,"rate=%gHz, block=%d, f(1)=%.2gHz bark(1)=%.2g (of %.2g)\n\n", - rate,i,rate/2 / (i/2),toBARK(rate/2 /(i/2)),toBARK(rate/2)); - - - } - for(i=0;i<28;i++){ - fprintf(stderr,"bark=%d %gHz\n", - i,fromBARK(i)); - } - return(0); -} - diff --git a/lib/bitwise.c b/lib/bitwise.c deleted file mode 100644 index 1655708b..00000000 --- a/lib/bitwise.c +++ /dev/null @@ -1,410 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: packing variable sized words into an octet stream - last mod: $Id: bitwise.c,v 1.12 2000/07/07 01:41:43 xiphmont Exp $ - - ********************************************************************/ - -/* We're 'LSb' endian; if we write a word but read individual bits, - then we'll read the lsb first */ - -#include <string.h> -#include <stdlib.h> -#include "bitwise.h" -#include "misc.h" -#include "os.h" - -#define BUFFER_INCREMENT 256 - -static unsigned long mask[]= -{0x00000000,0x00000001,0x00000003,0x00000007,0x0000000f, - 0x0000001f,0x0000003f,0x0000007f,0x000000ff,0x000001ff, - 0x000003ff,0x000007ff,0x00000fff,0x00001fff,0x00003fff, - 0x00007fff,0x0000ffff,0x0001ffff,0x0003ffff,0x0007ffff, - 0x000fffff,0x001fffff,0x003fffff,0x007fffff,0x00ffffff, - 0x01ffffff,0x03ffffff,0x07ffffff,0x0fffffff,0x1fffffff, - 0x3fffffff,0x7fffffff,0xffffffff }; - -void _oggpack_writeinit(oggpack_buffer *b){ - memset(b,0,sizeof(oggpack_buffer)); - b->ptr=b->buffer=malloc(BUFFER_INCREMENT); - b->buffer[0]='\0'; - b->storage=BUFFER_INCREMENT; -} - -void _oggpack_reset(oggpack_buffer *b){ - b->ptr=b->buffer; - b->buffer[0]=0; - b->endbit=b->endbyte=0; -} - -void _oggpack_writeclear(oggpack_buffer *b){ - free(b->buffer); - memset(b,0,sizeof(oggpack_buffer)); -} - -void _oggpack_readinit(oggpack_buffer *b,unsigned char *buf,int bytes){ - memset(b,0,sizeof(oggpack_buffer)); - b->buffer=b->ptr=buf; - b->storage=bytes; -} - -/* Takes only up to 32 bits. */ -void _oggpack_write(oggpack_buffer *b,unsigned long value,int bits){ - if(b->endbyte+4>=b->storage){ - b->buffer=realloc(b->buffer,b->storage+BUFFER_INCREMENT); - b->storage+=BUFFER_INCREMENT; - b->ptr=b->buffer+b->endbyte; - } - - value&=mask[bits]; - bits+=b->endbit; - - b->ptr[0]|=value<<b->endbit; - - if(bits>=8){ - b->ptr[1]=value>>(8-b->endbit); - if(bits>=16){ - b->ptr[2]=value>>(16-b->endbit); - if(bits>=24){ - b->ptr[3]=value>>(24-b->endbit); - if(bits>=32){ - if(b->endbit) - b->ptr[4]=value>>(32-b->endbit); - else - b->ptr[4]=0; - } - } - } - } - - b->endbyte+=bits/8; - b->ptr+=bits/8; - b->endbit=bits&7; -} - -/* Read in bits without advancing the bitptr; bits <= 32 */ -long _oggpack_look(oggpack_buffer *b,int bits){ - unsigned long ret; - unsigned long m=mask[bits]; - - bits+=b->endbit; - - if(b->endbyte+4>=b->storage){ - /* not the main path */ - if(b->endbyte+(bits-1)/8>=b->storage)return(-1); - } - - ret=b->ptr[0]>>b->endbit; - if(bits>8){ - ret|=b->ptr[1]<<(8-b->endbit); - if(bits>16){ - ret|=b->ptr[2]<<(16-b->endbit); - if(bits>24){ - ret|=b->ptr[3]<<(24-b->endbit); - if(bits>32 && b->endbit) - ret|=b->ptr[4]<<(32-b->endbit); - } - } - } - return(m&ret); -} - -long _oggpack_look1(oggpack_buffer *b){ - if(b->endbyte>=b->storage)return(-1); - return((b->ptr[0]>>b->endbit)&1); -} - -void _oggpack_adv(oggpack_buffer *b,int bits){ - bits+=b->endbit; - b->ptr+=bits/8; - b->endbyte+=bits/8; - b->endbit=bits&7; -} - -void _oggpack_adv1(oggpack_buffer *b){ - if(++(b->endbit)>7){ - b->endbit=0; - b->ptr++; - b->endbyte++; - } -} - -/* bits <= 32 */ -long _oggpack_read(oggpack_buffer *b,int bits){ - unsigned long ret; - unsigned long m=mask[bits]; - - bits+=b->endbit; - - if(b->endbyte+4>=b->storage){ - /* not the main path */ - ret=-1; - if(b->endbyte+(bits-1)/8>=b->storage)goto overflow; - } - - ret=b->ptr[0]>>b->endbit; - if(bits>8){ - ret|=b->ptr[1]<<(8-b->endbit); - if(bits>16){ - ret|=b->ptr[2]<<(16-b->endbit); - if(bits>24){ - ret|=b->ptr[3]<<(24-b->endbit); - if(bits>32 && b->endbit){ - ret|=b->ptr[4]<<(32-b->endbit); - } - } - } - } - ret&=m; - - overflow: - - b->ptr+=bits/8; - b->endbyte+=bits/8; - b->endbit=bits&7; - return(ret); -} - -long _oggpack_read1(oggpack_buffer *b){ - unsigned long ret; - - if(b->endbyte>=b->storage){ - /* not the main path */ - ret=-1; - goto overflow; - } - - ret=(b->ptr[0]>>b->endbit)&1; - - overflow: - - b->endbit++; - if(b->endbit>7){ - b->endbit=0; - b->ptr++; - b->endbyte++; - } - return(ret); -} - -long _oggpack_bytes(oggpack_buffer *b){ - return(b->endbyte+(b->endbit+7)/8); -} - -long _oggpack_bits(oggpack_buffer *b){ - return(b->endbyte*8+b->endbit); -} - -unsigned char *_oggpack_buffer(oggpack_buffer *b){ - return(b->buffer); -} - -/* Self test of the bitwise routines; everything else is based on - them, so they damned well better be solid. */ - -#ifdef _V_SELFTEST -#include <stdio.h> - -static int ilog(unsigned int v){ - int ret=0; - while(v){ - ret++; - v>>=1; - } - return(ret); -} - -oggpack_buffer o; -oggpack_buffer r; - -void report(char *in){ - fprintf(stderr,"%s",in); - exit(1); -} - -void cliptest(unsigned long *b,int vals,int bits,int *comp,int compsize){ - long bytes,i; - unsigned char *buffer; - - _oggpack_reset(&o); - for(i=0;i<vals;i++) - _oggpack_write(&o,b[i],bits?bits:ilog(b[i])); - buffer=_oggpack_buffer(&o); - bytes=_oggpack_bytes(&o); - if(bytes!=compsize)report("wrong number of bytes!\n"); - for(i=0;i<bytes;i++)if(buffer[i]!=comp[i]){ - for(i=0;i<bytes;i++)fprintf(stderr,"%x %x\n",(int)buffer[i],(int)comp[i]); - report("wrote incorrect value!\n"); - } - _oggpack_readinit(&r,buffer,bytes); - for(i=0;i<vals;i++){ - int tbit=bits?bits:ilog(b[i]); - if(_oggpack_look(&r,tbit)==-1) - report("out of data!\n"); - if(_oggpack_look(&r,tbit)!=(b[i]&mask[tbit])) - report("looked at incorrect value!\n"); - if(tbit==1) - if(_oggpack_look1(&r)!=(b[i]&mask[tbit])) - report("looked at single bit incorrect value!\n"); - if(tbit==1){ - if(_oggpack_read1(&r)!=(b[i]&mask[tbit])) - report("read incorrect single bit value!\n"); - }else{ - if(_oggpack_read(&r,tbit)!=(b[i]&mask[tbit])) - report("read incorrect value!\n"); - } - } - if(_oggpack_bytes(&r)!=bytes)report("leftover bytes after read!\n"); -} - -int main(void){ - unsigned char *buffer; - long bytes,i; - static unsigned long testbuffer1[]= - {18,12,103948,4325,543,76,432,52,3,65,4,56,32,42,34,21,1,23,32,546,456,7, - 567,56,8,8,55,3,52,342,341,4,265,7,67,86,2199,21,7,1,5,1,4}; - int test1size=43; - - static unsigned long testbuffer2[]= - {216531625L,1237861823,56732452,131,3212421,12325343,34547562,12313212, - 1233432,534,5,346435231,14436467,7869299,76326614,167548585, - 85525151,0,12321,1,349528352}; - int test2size=21; - - static unsigned long large[]= - {2136531625L,2137861823,56732452,131,3212421,12325343,34547562,12313212, - 1233432,534,5,2146435231,14436467,7869299,76326614,167548585, - 85525151,0,12321,1,2146528352}; - - static unsigned long testbuffer3[]= - {1,0,14,0,1,0,12,0,1,0,0,0,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,1,1,1,1,1,0,0,1, - 0,1,30,1,1,1,0,0,1,0,0,0,12,0,11,0,1,0,0,1}; - int test3size=56; - - int onesize=33; - static int one[]={146,25,44,151,195,15,153,176,233,131,196,65,85,172,47,40, - 34,242,223,136,35,222,211,86,171,50,225,135,214,75,172, - 223,4}; - - int twosize=6; - static int two[]={61,255,255,251,231,29}; - - int threesize=54; - static int three[]={169,2,232,252,91,132,156,36,89,13,123,176,144,32,254, - 142,224,85,59,121,144,79,124,23,67,90,90,216,79,23,83, - 58,135,196,61,55,129,183,54,101,100,170,37,127,126,10, - 100,52,4,14,18,86,77,1}; - - int foursize=38; - static int four[]={18,6,163,252,97,194,104,131,32,1,7,82,137,42,129,11,72, - 132,60,220,112,8,196,109,64,179,86,9,137,195,208,122,169, - 28,2,133,0,1}; - - int fivesize=45; - static int five[]={169,2,126,139,144,172,30,4,80,72,240,59,130,218,73,62, - 241,24,210,44,4,20,0,248,116,49,135,100,110,130,181,169, - 84,75,159,2,1,0,132,192,8,0,0,18,22}; - - int sixsize=7; - static int six[]={17,177,170,242,169,19,148}; - - /* Test read/write together */ - /* Later we test against pregenerated bitstreams */ - _oggpack_writeinit(&o); - - fprintf(stderr,"\nSmall preclipped packing: "); - cliptest(testbuffer1,test1size,0,one,onesize); - fprintf(stderr,"ok."); - - fprintf(stderr,"\nNull bit call: "); - cliptest(testbuffer3,test3size,0,two,twosize); - fprintf(stderr,"ok."); - - fprintf(stderr,"\nLarge preclipped packing: "); - cliptest(testbuffer2,test2size,0,three,threesize); - fprintf(stderr,"ok."); - - fprintf(stderr,"\n32 bit preclipped packing: "); - _oggpack_reset(&o); - for(i=0;i<test2size;i++) - _oggpack_write(&o,large[i],32); - buffer=_oggpack_buffer(&o); - bytes=_oggpack_bytes(&o); - _oggpack_readinit(&r,buffer,bytes); - for(i=0;i<test2size;i++){ - if(_oggpack_look(&r,32)==-1)report("out of data. failed!"); - if(_oggpack_look(&r,32)!=large[i]){ - fprintf(stderr,"%ld != %ld (%lx!=%lx):",_oggpack_look(&r,32),large[i], - _oggpack_look(&r,32),large[i]); - report("read incorrect value!\n"); - } - _oggpack_adv(&r,32); - } - if(_oggpack_bytes(&r)!=bytes)report("leftover bytes after read!\n"); - fprintf(stderr,"ok."); - - fprintf(stderr,"\nSmall unclipped packing: "); - cliptest(testbuffer1,test1size,7,four,foursize); - fprintf(stderr,"ok."); - - fprintf(stderr,"\nLarge unclipped packing: "); - cliptest(testbuffer2,test2size,17,five,fivesize); - fprintf(stderr,"ok."); - - fprintf(stderr,"\nSingle bit unclicpped packing: "); - cliptest(testbuffer3,test3size,1,six,sixsize); - fprintf(stderr,"ok."); - - fprintf(stderr,"\nTesting read past end: "); - _oggpack_readinit(&r,"\0\0\0\0\0\0\0\0",8); - for(i=0;i<64;i++){ - if(_oggpack_read(&r,1)!=0){ - fprintf(stderr,"failed; got -1 prematurely.\n"); - exit(1); - } - } - if(_oggpack_look(&r,1)!=-1 || - _oggpack_read(&r,1)!=-1){ - fprintf(stderr,"failed; read past end without -1.\n"); - exit(1); - } - _oggpack_readinit(&r,"\0\0\0\0\0\0\0\0",8); - if(_oggpack_read(&r,30)!=0 || _oggpack_read(&r,16)!=0){ - fprintf(stderr,"failed 2; got -1 prematurely.\n"); - exit(1); - } - - if(_oggpack_look(&r,18)!=0 || - _oggpack_look(&r,18)!=0){ - fprintf(stderr,"failed 3; got -1 prematurely.\n"); - exit(1); - } - if(_oggpack_look(&r,19)!=-1 || - _oggpack_look(&r,19)!=-1){ - fprintf(stderr,"failed; read past end without -1.\n"); - exit(1); - } - if(_oggpack_look(&r,32)!=-1 || - _oggpack_look(&r,32)!=-1){ - fprintf(stderr,"failed; read past end without -1.\n"); - exit(1); - } - fprintf(stderr,"ok.\n\n"); - - - return(0); -} -#endif -#undef BUFFER_INCREMENT diff --git a/lib/bitwise.h b/lib/bitwise.h deleted file mode 100644 index 29f4a9ec..00000000 --- a/lib/bitwise.h +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: packing variable sized words into an octet stream - last mod: $Id: bitwise.h,v 1.6 2000/07/07 01:41:43 xiphmont Exp $ - - ********************************************************************/ - -#ifndef _V_BITW_H_ -#define _V_BITW_H_ - -#include "vorbis/codec.h" - -extern void _oggpack_writeinit(oggpack_buffer *b); -extern void _oggpack_reset(oggpack_buffer *b); -extern void _oggpack_writeclear(oggpack_buffer *b); -extern void _oggpack_readinit(oggpack_buffer *b,unsigned char *buf,int bytes); -extern void _oggpack_write(oggpack_buffer *b,unsigned long value,int bits); -extern long _oggpack_look(oggpack_buffer *b,int bits); -extern long _oggpack_look1(oggpack_buffer *b); -extern void _oggpack_adv(oggpack_buffer *b,int bits); -extern void _oggpack_adv1(oggpack_buffer *b); -extern long _oggpack_read(oggpack_buffer *b,int bits); -extern long _oggpack_read1(oggpack_buffer *b); -extern long _oggpack_bytes(oggpack_buffer *b); -extern long _oggpack_bits(oggpack_buffer *b); -extern unsigned char *_oggpack_buffer(oggpack_buffer *b); - -#endif diff --git a/lib/block.c b/lib/block.c deleted file mode 100644 index 7e534066..00000000 --- a/lib/block.c +++ /dev/null @@ -1,728 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: PCM data vector blocking, windowing and dis/reassembly - last mod: $Id: block.c,v 1.38 2000/08/27 07:59:19 msmith Exp $ - - Handle windowing, overlap-add, etc of the PCM vectors. This is made - more amusing by Vorbis' current two allowed block sizes. - - Vorbis manipulates the dynamic range of the incoming PCM data - envelope to minimise time-domain energy leakage from percussive and - plosive waveforms being quantized in the MDCT domain. - - ********************************************************************/ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include "vorbis/codec.h" - -#include "window.h" -#include "envelope.h" -#include "mdct.h" -#include "lpc.h" -#include "bitwise.h" -#include "registry.h" -#include "sharedbook.h" -#include "bookinternal.h" -#include "misc.h" -#include "os.h" - -static int ilog2(unsigned int v){ - int ret=0; - while(v>1){ - ret++; - v>>=1; - } - return(ret); -} - -/* pcm accumulator examples (not exhaustive): - - <-------------- lW ----------------> - <--------------- W ----------------> -: .....|..... _______________ | -: .''' | '''_--- | |\ | -:.....''' |_____--- '''......| | \_______| -:.................|__________________|_______|__|______| - |<------ Sl ------>| > Sr < |endW - |beginSl |endSl | |endSr - |beginW |endlW |beginSr - - - |< lW >| - <--------------- W ----------------> - | | .. ______________ | - | | ' `/ | ---_ | - |___.'___/`. | ---_____| - |_______|__|_______|_________________| - | >|Sl|< |<------ Sr ----->|endW - | | |endSl |beginSr |endSr - |beginW | |endlW - mult[0] |beginSl mult[n] - - <-------------- lW -----------------> - |<--W-->| -: .............. ___ | | -: .''' |`/ \ | | -:.....''' |/`....\|...| -:.........................|___|___|___| - |Sl |Sr |endW - | | |endSr - | |beginSr - | |endSl - |beginSl - |beginW -*/ - -/* block abstraction setup *********************************************/ - -#ifndef WORD_ALIGN -#define WORD_ALIGN 8 -#endif - -int vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb){ - memset(vb,0,sizeof(vorbis_block)); - vb->vd=v; - vb->localalloc=0; - vb->localstore=NULL; - if(v->analysisp) - _oggpack_writeinit(&vb->opb); - - return(0); -} - -void *_vorbis_block_alloc(vorbis_block *vb,long bytes){ - bytes=(bytes+(WORD_ALIGN-1)) & ~(WORD_ALIGN-1); - if(bytes+vb->localtop>vb->localalloc){ - /* can't just realloc... there are outstanding pointers */ - if(vb->localstore){ - struct alloc_chain *link=malloc(sizeof(struct alloc_chain)); - vb->totaluse+=vb->localtop; - link->next=vb->reap; - link->ptr=vb->localstore; - vb->reap=link; - } - /* highly conservative */ - vb->localalloc=bytes; - vb->localstore=malloc(vb->localalloc); - vb->localtop=0; - } - { - void *ret=(void *)(((char *)vb->localstore)+vb->localtop); - vb->localtop+=bytes; - return ret; - } -} - -/* reap the chain, pull the ripcord */ -void _vorbis_block_ripcord(vorbis_block *vb){ - /* reap the chain */ - struct alloc_chain *reap=vb->reap; - while(reap){ - struct alloc_chain *next=reap->next; - free(reap->ptr); - memset(reap,0,sizeof(struct alloc_chain)); - free(reap); - reap=next; - } - /* consolidate storage */ - if(vb->totaluse){ - vb->localstore=realloc(vb->localstore,vb->totaluse+vb->localalloc); - vb->localalloc+=vb->totaluse; - vb->totaluse=0; - } - - /* pull the ripcord */ - vb->localtop=0; - vb->reap=NULL; -} - -int vorbis_block_clear(vorbis_block *vb){ - if(vb->vd) - if(vb->vd->analysisp) - _oggpack_writeclear(&vb->opb); - _vorbis_block_ripcord(vb); - if(vb->localstore)free(vb->localstore); - - memset(vb,0,sizeof(vorbis_block)); - return(0); -} - -/* Analysis side code, but directly related to blocking. Thus it's - here and not in analysis.c (which is for analysis transforms only). - The init is here because some of it is shared */ - -static int _vds_shared_init(vorbis_dsp_state *v,vorbis_info *vi,int encp){ - int i; - memset(v,0,sizeof(vorbis_dsp_state)); - - v->vi=vi; - v->modebits=ilog2(vi->modes); - - v->transform[0]=calloc(VI_TRANSFORMB,sizeof(vorbis_look_transform *)); - v->transform[1]=calloc(VI_TRANSFORMB,sizeof(vorbis_look_transform *)); - - /* MDCT is tranform 0 */ - - v->transform[0][0]=calloc(1,sizeof(mdct_lookup)); - v->transform[1][0]=calloc(1,sizeof(mdct_lookup)); - mdct_init(v->transform[0][0],vi->blocksizes[0]); - mdct_init(v->transform[1][0],vi->blocksizes[1]); - - v->window[0][0][0]=calloc(VI_WINDOWB,sizeof(double *)); - v->window[0][0][1]=v->window[0][0][0]; - v->window[0][1][0]=v->window[0][0][0]; - v->window[0][1][1]=v->window[0][0][0]; - v->window[1][0][0]=calloc(VI_WINDOWB,sizeof(double *)); - v->window[1][0][1]=calloc(VI_WINDOWB,sizeof(double *)); - v->window[1][1][0]=calloc(VI_WINDOWB,sizeof(double *)); - v->window[1][1][1]=calloc(VI_WINDOWB,sizeof(double *)); - - for(i=0;i<VI_WINDOWB;i++){ - v->window[0][0][0][i]= - _vorbis_window(i,vi->blocksizes[0],vi->blocksizes[0]/2,vi->blocksizes[0]/2); - v->window[1][0][0][i]= - _vorbis_window(i,vi->blocksizes[1],vi->blocksizes[0]/2,vi->blocksizes[0]/2); - v->window[1][0][1][i]= - _vorbis_window(i,vi->blocksizes[1],vi->blocksizes[0]/2,vi->blocksizes[1]/2); - v->window[1][1][0][i]= - _vorbis_window(i,vi->blocksizes[1],vi->blocksizes[1]/2,vi->blocksizes[0]/2); - v->window[1][1][1][i]= - _vorbis_window(i,vi->blocksizes[1],vi->blocksizes[1]/2,vi->blocksizes[1]/2); - } - - if(encp){ /* encode/decode differ here */ - /* finish the codebooks */ - v->fullbooks=calloc(vi->books,sizeof(codebook)); - for(i=0;i<vi->books;i++) - vorbis_book_init_encode(v->fullbooks+i,vi->book_param[i]); - v->analysisp=1; - }else{ - /* finish the codebooks */ - v->fullbooks=calloc(vi->books,sizeof(codebook)); - for(i=0;i<vi->books;i++) - vorbis_book_init_decode(v->fullbooks+i,vi->book_param[i]); - } - - /* initialize the storage vectors to a decent size greater than the - minimum */ - - v->pcm_storage=8192; /* we'll assume later that we have - a minimum of twice the blocksize of - accumulated samples in analysis */ - v->pcm=malloc(vi->channels*sizeof(double *)); - v->pcmret=malloc(vi->channels*sizeof(double *)); - { - int i; - for(i=0;i<vi->channels;i++) - v->pcm[i]=calloc(v->pcm_storage,sizeof(double)); - } - - /* all 1 (large block) or 0 (small block) */ - /* explicitly set for the sake of clarity */ - v->lW=0; /* previous window size */ - v->W=0; /* current window size */ - - /* all vector indexes */ - v->centerW=vi->blocksizes[1]/2; - - v->pcm_current=v->centerW; - - /* initialize all the mapping/backend lookups */ - v->mode=calloc(vi->modes,sizeof(vorbis_look_mapping *)); - for(i=0;i<vi->modes;i++){ - int mapnum=vi->mode_param[i]->mapping; - int maptype=vi->map_type[mapnum]; - v->mode[i]=_mapping_P[maptype]->look(v,vi->mode_param[i], - vi->map_param[mapnum]); - } - - return(0); -} - -/* arbitrary settings and spec-mandated numbers get filled in here */ -int vorbis_analysis_init(vorbis_dsp_state *v,vorbis_info *vi){ - _vds_shared_init(v,vi,1); - - /* Initialize the envelope state storage */ - v->ve=calloc(1,sizeof(envelope_lookup)); - _ve_envelope_init(v->ve,vi); - - return(0); -} - -void vorbis_dsp_clear(vorbis_dsp_state *v){ - int i,j,k; - if(v){ - vorbis_info *vi=v->vi; - - if(v->window[0][0][0]){ - for(i=0;i<VI_WINDOWB;i++) - if(v->window[0][0][0][i])free(v->window[0][0][0][i]); - free(v->window[0][0][0]); - - for(j=0;j<2;j++) - for(k=0;k<2;k++){ - for(i=0;i<VI_WINDOWB;i++) - if(v->window[1][j][k][i])free(v->window[1][j][k][i]); - free(v->window[1][j][k]); - } - } - - if(v->pcm){ - for(i=0;i<vi->channels;i++) - if(v->pcm[i])free(v->pcm[i]); - free(v->pcm); - if(v->pcmret)free(v->pcmret); - } - - if(v->ve){ - _ve_envelope_clear(v->ve); - free(v->ve); - } - - if(v->transform[0]){ - mdct_clear(v->transform[0][0]); - free(v->transform[0][0]); - free(v->transform[0]); - } - if(v->transform[1]){ - mdct_clear(v->transform[1][0]); - free(v->transform[1][0]); - free(v->transform[1]); - } - - /* free mode lookups; these are actually vorbis_look_mapping structs */ - if(vi){ - for(i=0;i<vi->modes;i++){ - int mapnum=vi->mode_param[i]->mapping; - int maptype=vi->map_type[mapnum]; - _mapping_P[maptype]->free_look(v->mode[i]); - } - /* free codebooks */ - for(i=0;i<vi->books;i++) - vorbis_book_clear(v->fullbooks+i); - } - - if(v->mode)free(v->mode); - if(v->fullbooks)free(v->fullbooks); - - /* free header, header1, header2 */ - if(v->header)free(v->header); - if(v->header1)free(v->header1); - if(v->header2)free(v->header2); - - memset(v,0,sizeof(vorbis_dsp_state)); - } -} - -double **vorbis_analysis_buffer(vorbis_dsp_state *v, int vals){ - int i; - vorbis_info *vi=v->vi; - - /* free header, header1, header2 */ - if(v->header)free(v->header);v->header=NULL; - if(v->header1)free(v->header1);v->header1=NULL; - if(v->header2)free(v->header2);v->header2=NULL; - - /* Do we have enough storage space for the requested buffer? If not, - expand the PCM (and envelope) storage */ - - if(v->pcm_current+vals>=v->pcm_storage){ - v->pcm_storage=v->pcm_current+vals*2; - - for(i=0;i<vi->channels;i++){ - v->pcm[i]=realloc(v->pcm[i],v->pcm_storage*sizeof(double)); - } - } - - for(i=0;i<vi->channels;i++) - v->pcmret[i]=v->pcm[i]+v->pcm_current; - - return(v->pcmret); -} - -static void _preextrapolate_helper(vorbis_dsp_state *v){ - int i; - int order=32; - double *lpc=alloca(order*sizeof(double)); - double *work=alloca(v->pcm_current*sizeof(double)); - long j; - v->preextrapolate=1; - - if(v->pcm_current-v->centerW>order*2){ /* safety */ - for(i=0;i<v->vi->channels;i++){ - - /* need to run the extrapolation in reverse! */ - for(j=0;j<v->pcm_current;j++) - work[j]=v->pcm[i][v->pcm_current-j-1]; - - /* prime as above */ - vorbis_lpc_from_data(work,lpc,v->pcm_current-v->centerW,order); - - /* run the predictor filter */ - vorbis_lpc_predict(lpc,work+v->pcm_current-v->centerW-order, - order, - work+v->pcm_current-v->centerW, - v->centerW); - for(j=0;j<v->pcm_current;j++) - v->pcm[i][v->pcm_current-j-1]=work[j]; - } - } -} - - -/* call with val<=0 to set eof */ - -int vorbis_analysis_wrote(vorbis_dsp_state *v, int vals){ - vorbis_info *vi=v->vi; - if(vals<=0){ - int order=32; - int i; - double *lpc=alloca(order*sizeof(double)); - - /* if it wasn't done earlier (very short sample) */ - if(!v->preextrapolate) - _preextrapolate_helper(v); - - /* We're encoding the end of the stream. Just make sure we have - [at least] a full block of zeroes at the end. */ - /* actually, we don't want zeroes; that could drop a large - amplitude off a cliff, creating spread spectrum noise that will - suck to encode. Extrapolate for the sake of cleanliness. */ - - vorbis_analysis_buffer(v,v->vi->blocksizes[1]*2); - v->eofflag=v->pcm_current; - v->pcm_current+=v->vi->blocksizes[1]*2; - - for(i=0;i<vi->channels;i++){ - if(v->eofflag>order*2){ - /* extrapolate with LPC to fill in */ - long n; - - /* make a predictor filter */ - n=v->eofflag; - if(n>v->vi->blocksizes[1])n=v->vi->blocksizes[1]; - vorbis_lpc_from_data(v->pcm[i]+v->eofflag-n,lpc,n,order); - - /* run the predictor filter */ - vorbis_lpc_predict(lpc,v->pcm[i]+v->eofflag-order,order, - v->pcm[i]+v->eofflag,v->pcm_current-v->eofflag); - }else{ - /* not enough data to extrapolate (unlikely to happen due to - guarding the overlap, but bulletproof in case that - assumtion goes away). zeroes will do. */ - memset(v->pcm[i]+v->eofflag,0, - (v->pcm_current-v->eofflag)*sizeof(double)); - - } - } - }else{ - - if(v->pcm_current+vals>v->pcm_storage) - return(-1); - - v->pcm_current+=vals; - - /* we may want to reverse extrapolate the beginning of a stream - too... in case we're beginning on a cliff! */ - /* clumsy, but simple. It only runs once, so simple is good. */ - if(!v->preextrapolate && v->pcm_current-v->centerW>v->vi->blocksizes[1]) - _preextrapolate_helper(v); - - } - return(0); -} - -/* do the deltas, envelope shaping, pre-echo and determine the size of - the next block on which to continue analysis */ -int vorbis_analysis_blockout(vorbis_dsp_state *v,vorbis_block *vb){ - int i; - vorbis_info *vi=v->vi; - long beginW=v->centerW-vi->blocksizes[v->W]/2,centerNext; - - /* check to see if we're started... */ - if(!v->preextrapolate)return(0); - - /* check to see if we're done... */ - if(v->eofflag==-1)return(0); - - /* By our invariant, we have lW, W and centerW set. Search for - the next boundary so we can determine nW (the next window size) - which lets us compute the shape of the current block's window */ - - if(vi->blocksizes[0]<vi->blocksizes[1]){ - long largebound; - long bp; - - if(v->W) - /* min boundary; nW large, next small */ - largebound=v->centerW+vi->blocksizes[1]*3/4+vi->blocksizes[0]/4; - else - /* min boundary; nW large, next small */ - largebound=v->centerW+vi->blocksizes[1]*3/4+vi->blocksizes[0]*3/4; - - bp=_ve_envelope_search(v,largebound); - if(bp==-1)return(0); /* not enough data currently to search for a - full long block */ - v->nW=bp; - - }else - v->nW=0; - - centerNext=v->centerW+vi->blocksizes[v->W]/4+vi->blocksizes[v->nW]/4; - - { - /* center of next block + next block maximum right side. */ - - long blockbound=centerNext+vi->blocksizes[v->nW]/2; - if(v->pcm_current<blockbound)return(0); /* not enough data yet; - although this check is - less strict that the - _ve_envelope_search, - the search is not run - if we only use one - block size */ - } - - /* fill in the block. Note that for a short window, lW and nW are *short* - regardless of actual settings in the stream */ - - _vorbis_block_ripcord(vb); - if(v->W){ - vb->lW=v->lW; - vb->W=v->W; - vb->nW=v->nW; - }else{ - vb->lW=0; - vb->W=v->W; - vb->nW=0; - } - vb->vd=v; - vb->sequence=v->sequence; - vb->frameno=v->frameno; - vb->pcmend=vi->blocksizes[v->W]; - - /* copy the vectors; this uses the local storage in vb */ - { - vb->pcm=_vorbis_block_alloc(vb,sizeof(double *)*vi->channels); - for(i=0;i<vi->channels;i++){ - vb->pcm[i]=_vorbis_block_alloc(vb,vb->pcmend*sizeof(double)); - memcpy(vb->pcm[i],v->pcm[i]+beginW,vi->blocksizes[v->W]*sizeof(double)); - } - } - - /* handle eof detection: eof==0 means that we've not yet received EOF - eof>0 marks the last 'real' sample in pcm[] - eof<0 'no more to do'; doesn't get here */ - - if(v->eofflag){ - if(v->centerW>=v->eofflag){ - v->eofflag=-1; - vb->eofflag=1; - return(1); - } - } - - /* advance storage vectors and clean up */ - { - int new_centerNext=vi->blocksizes[1]/2; - int movementW=centerNext-new_centerNext; - - _ve_envelope_shift(v->ve,movementW); - v->pcm_current-=movementW; - - for(i=0;i<vi->channels;i++) - memmove(v->pcm[i],v->pcm[i]+movementW, - v->pcm_current*sizeof(double)); - - - v->lW=v->W; - v->W=v->nW; - v->centerW=new_centerNext; - - v->sequence++; - - if(v->eofflag){ - v->eofflag-=movementW; - /* do not add padding to end of stream! */ - if(v->centerW>=v->eofflag){ - v->frameno+=movementW-(v->centerW-v->eofflag); - }else{ - v->frameno+=movementW; - } - }else{ - v->frameno+=movementW; - } - } - - /* done */ - return(1); -} - -int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi){ - _vds_shared_init(v,vi,0); - - /* Adjust centerW to allow an easier mechanism for determining output */ - v->pcm_returned=v->centerW; - v->centerW-= vi->blocksizes[v->W]/4+vi->blocksizes[v->lW]/4; - v->frameno=-1; - v->sequence=-1; - - return(0); -} - -/* Unike in analysis, the window is only partially applied for each - block. The time domain envelope is not yet handled at the point of - calling (as it relies on the previous block). */ - -int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb){ - vorbis_info *vi=v->vi; - - /* Shift out any PCM that we returned previously */ - /* centerW is currently the center of the last block added */ - if(v->pcm_returned && v->centerW>vi->blocksizes[1]/2){ - - /* don't shift too much; we need to have a minimum PCM buffer of - 1/2 long block */ - - int shiftPCM=v->centerW-vi->blocksizes[1]/2; - shiftPCM=(v->pcm_returned<shiftPCM?v->pcm_returned:shiftPCM); - - v->pcm_current-=shiftPCM; - v->centerW-=shiftPCM; - v->pcm_returned-=shiftPCM; - - if(shiftPCM){ - int i; - for(i=0;i<vi->channels;i++) - memmove(v->pcm[i],v->pcm[i]+shiftPCM, - v->pcm_current*sizeof(double)); - } - } - - v->lW=v->W; - v->W=vb->W; - v->nW=-1; - - v->glue_bits+=vb->glue_bits; - v->time_bits+=vb->time_bits; - v->floor_bits+=vb->floor_bits; - v->res_bits+=vb->res_bits; - - if(v->sequence+1 != vb->sequence)v->frameno=-1; /* out of sequence; - lose count */ - - v->sequence=vb->sequence; - - { - int sizeW=vi->blocksizes[v->W]; - int centerW=v->centerW+vi->blocksizes[v->lW]/4+sizeW/4; - int beginW=centerW-sizeW/2; - int endW=beginW+sizeW; - int beginSl; - int endSl; - int i,j; - - /* Do we have enough PCM/mult storage for the block? */ - if(endW>v->pcm_storage){ - /* expand the storage */ - v->pcm_storage=endW+vi->blocksizes[1]; - - for(i=0;i<vi->channels;i++) - v->pcm[i]=realloc(v->pcm[i],v->pcm_storage*sizeof(double)); - } - - /* overlap/add PCM */ - - switch(v->W){ - case 0: - beginSl=0; - endSl=vi->blocksizes[0]/2; - break; - case 1: - beginSl=vi->blocksizes[1]/4-vi->blocksizes[v->lW]/4; - endSl=beginSl+vi->blocksizes[v->lW]/2; - break; - } - - for(j=0;j<vi->channels;j++){ - double *pcm=v->pcm[j]+beginW; - - /* the overlap/add section */ - for(i=beginSl;i<endSl;i++) - pcm[i]+=vb->pcm[j][i]; - /* the remaining section */ - for(;i<sizeW;i++) - pcm[i]=vb->pcm[j][i]; - } - - /* track the frame number... This is for convenience, but also - making sure our last packet doesn't end with added padding. If - the last packet is partial, the number of samples we'll have to - return will be past the vb->frameno. - - This is not foolproof! It will be confused if we begin - decoding at the last page after a seek or hole. In that case, - we don't have a starting point to judge where the last frame - is. For this reason, vorbisfile will always try to make sure - it reads the last two marked pages in proper sequence */ - - if(v->frameno==-1) - v->frameno=vb->frameno; - else{ - v->frameno+=(centerW-v->centerW); - if(vb->frameno!=-1 && v->frameno!=vb->frameno){ - if(v->frameno>vb->frameno && vb->eofflag){ - /* partial last frame. Strip the padding off */ - centerW-=(v->frameno-vb->frameno); - }/* else{ Shouldn't happen *unless* the bitstream is out of - spec. Either way, believe the bitstream } */ - v->frameno=vb->frameno; - } - } - - /* Update, cleanup */ - - v->centerW=centerW; - v->pcm_current=endW; - - if(vb->eofflag)v->eofflag=1; - } - - return(0); -} - -/* pcm==NULL indicates we just want the pending samples, no more */ -int vorbis_synthesis_pcmout(vorbis_dsp_state *v,double ***pcm){ - vorbis_info *vi=v->vi; - if(v->pcm_returned<v->centerW){ - if(pcm){ - int i; - for(i=0;i<vi->channels;i++) - v->pcmret[i]=v->pcm[i]+v->pcm_returned; - *pcm=v->pcmret; - } - return(v->centerW-v->pcm_returned); - } - return(0); -} - -int vorbis_synthesis_read(vorbis_dsp_state *v,int bytes){ - if(bytes && v->pcm_returned+bytes>v->centerW)return(-1); - v->pcm_returned+=bytes; - return(0); -} - diff --git a/lib/bookinternal.h b/lib/bookinternal.h deleted file mode 100644 index 72caec36..00000000 --- a/lib/bookinternal.h +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: basic codebook pack/unpack/code/decode operations - last mod: $Id: bookinternal.h,v 1.8 2000/06/14 01:38:31 xiphmont Exp $ - - ********************************************************************/ - -#ifndef _V_INT_CODEBOOK_H_ -#define _V_INT_CODEBOOK_H_ - -#include "vorbis/codebook.h" -#include "bitwise.h" - -extern int vorbis_staticbook_pack(const static_codebook *c,oggpack_buffer *b); -extern int vorbis_staticbook_unpack(oggpack_buffer *b,static_codebook *c); - -extern int vorbis_book_encode(codebook *book, int a, oggpack_buffer *b); -extern int vorbis_book_errorv(codebook *book, double *a); -extern int vorbis_book_encodev(codebook *book, int best,double *a, - oggpack_buffer *b); -extern int vorbis_book_encodevs(codebook *book, double *a, oggpack_buffer *b, - int step,int stagetype); - -extern long vorbis_book_decode(codebook *book, oggpack_buffer *b); -extern long vorbis_book_decodevs(codebook *book, double *a, oggpack_buffer *b, - int step,int stagetype); - -#endif diff --git a/lib/codebook.c b/lib/codebook.c deleted file mode 100644 index b7b6f832..00000000 --- a/lib/codebook.c +++ /dev/null @@ -1,498 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: basic codebook pack/unpack/code/decode operations - last mod: $Id: codebook.c,v 1.17 2000/07/07 01:37:00 xiphmont Exp $ - - ********************************************************************/ - -#include <stdlib.h> -#include <string.h> -#include <math.h> -#include "vorbis/codec.h" -#include "vorbis/codebook.h" -#include "bitwise.h" -#include "scales.h" -#include "sharedbook.h" -#include "bookinternal.h" -#include "misc.h" -#include "os.h" - -/* packs the given codebook into the bitstream **************************/ - -int vorbis_staticbook_pack(const static_codebook *c,oggpack_buffer *opb){ - long i,j; - int ordered=0; - - /* first the basic parameters */ - _oggpack_write(opb,0x564342,24); - _oggpack_write(opb,c->dim,16); - _oggpack_write(opb,c->entries,24); - - /* pack the codewords. There are two packings; length ordered and - length random. Decide between the two now. */ - - for(i=1;i<c->entries;i++) - if(c->lengthlist[i]<c->lengthlist[i-1])break; - if(i==c->entries)ordered=1; - - if(ordered){ - /* length ordered. We only need to say how many codewords of - each length. The actual codewords are generated - deterministically */ - - long count=0; - _oggpack_write(opb,1,1); /* ordered */ - _oggpack_write(opb,c->lengthlist[0]-1,5); /* 1 to 32 */ - - for(i=1;i<c->entries;i++){ - long this=c->lengthlist[i]; - long last=c->lengthlist[i-1]; - if(this>last){ - for(j=last;j<this;j++){ - _oggpack_write(opb,i-count,_ilog(c->entries-count)); - count=i; - } - } - } - _oggpack_write(opb,i-count,_ilog(c->entries-count)); - - }else{ - /* length random. Again, we don't code the codeword itself, just - the length. This time, though, we have to encode each length */ - _oggpack_write(opb,0,1); /* unordered */ - - /* algortihmic mapping has use for 'unused entries', which we tag - here. The algorithmic mapping happens as usual, but the unused - entry has no codeword. */ - for(i=0;i<c->entries;i++) - if(c->lengthlist[i]==0)break; - - if(i==c->entries){ - _oggpack_write(opb,0,1); /* no unused entries */ - for(i=0;i<c->entries;i++) - _oggpack_write(opb,c->lengthlist[i]-1,5); - }else{ - _oggpack_write(opb,1,1); /* we have unused entries; thus we tag */ - for(i=0;i<c->entries;i++){ - if(c->lengthlist[i]==0){ - _oggpack_write(opb,0,1); - }else{ - _oggpack_write(opb,1,1); - _oggpack_write(opb,c->lengthlist[i]-1,5); - } - } - } - } - - /* is the entry number the desired return value, or do we have a - mapping? If we have a mapping, what type? */ - _oggpack_write(opb,c->maptype,4); - switch(c->maptype){ - case 0: - /* no mapping */ - break; - case 1:case 2: - /* implicitly populated value mapping */ - /* explicitly populated value mapping */ - - if(!c->quantlist){ - /* no quantlist? error */ - return(-1); - } - - /* values that define the dequantization */ - _oggpack_write(opb,c->q_min,32); - _oggpack_write(opb,c->q_delta,32); - _oggpack_write(opb,c->q_quant-1,4); - _oggpack_write(opb,c->q_sequencep,1); - - { - int quantvals; - switch(c->maptype){ - case 1: - /* a single column of (c->entries/c->dim) quantized values for - building a full value list algorithmically (square lattice) */ - quantvals=_book_maptype1_quantvals(c); - break; - case 2: - /* every value (c->entries*c->dim total) specified explicitly */ - quantvals=c->entries*c->dim; - break; - } - - /* quantized values */ - for(i=0;i<quantvals;i++) - _oggpack_write(opb,labs(c->quantlist[i]),c->q_quant); - - } - break; - default: - /* error case; we don't have any other map types now */ - return(-1); - } - - return(0); -} - -/* unpacks a codebook from the packet buffer into the codebook struct, - readies the codebook auxiliary structures for decode *************/ -int vorbis_staticbook_unpack(oggpack_buffer *opb,static_codebook *s){ - long i,j; - memset(s,0,sizeof(static_codebook)); - - /* make sure alignment is correct */ - if(_oggpack_read(opb,24)!=0x564342)goto _eofout; - - /* first the basic parameters */ - s->dim=_oggpack_read(opb,16); - s->entries=_oggpack_read(opb,24); - if(s->entries==-1)goto _eofout; - - /* codeword ordering.... length ordered or unordered? */ - switch(_oggpack_read(opb,1)){ - case 0: - /* unordered */ - s->lengthlist=malloc(sizeof(long)*s->entries); - - /* allocated but unused entries? */ - if(_oggpack_read(opb,1)){ - /* yes, unused entries */ - - for(i=0;i<s->entries;i++){ - if(_oggpack_read(opb,1)){ - long num=_oggpack_read(opb,5); - if(num==-1)goto _eofout; - s->lengthlist[i]=num+1; - }else - s->lengthlist[i]=0; - } - }else{ - /* all entries used; no tagging */ - for(i=0;i<s->entries;i++){ - long num=_oggpack_read(opb,5); - if(num==-1)goto _eofout; - s->lengthlist[i]=num+1; - } - } - - break; - case 1: - /* ordered */ - { - long length=_oggpack_read(opb,5)+1; - s->lengthlist=malloc(sizeof(long)*s->entries); - - for(i=0;i<s->entries;){ - long num=_oggpack_read(opb,_ilog(s->entries-i)); - if(num==-1)goto _eofout; - for(j=0;j<num;j++,i++) - s->lengthlist[i]=length; - length++; - } - } - break; - default: - /* EOF */ - return(-1); - } - - /* Do we have a mapping to unpack? */ - switch((s->maptype=_oggpack_read(opb,4))){ - case 0: - /* no mapping */ - break; - case 1: case 2: - /* implicitly populated value mapping */ - /* explicitly populated value mapping */ - - s->q_min=_oggpack_read(opb,32); - s->q_delta=_oggpack_read(opb,32); - s->q_quant=_oggpack_read(opb,4)+1; - s->q_sequencep=_oggpack_read(opb,1); - - { - int quantvals; - switch(s->maptype){ - case 1: - quantvals=_book_maptype1_quantvals(s); - break; - case 2: - quantvals=s->entries*s->dim; - break; - } - - /* quantized values */ - s->quantlist=malloc(sizeof(double)*quantvals); - for(i=0;i<quantvals;i++) - s->quantlist[i]=_oggpack_read(opb,s->q_quant); - - if(s->quantlist[quantvals-1]==-1)goto _eofout; - } - break; - default: - goto _errout; - } - - /* all set */ - return(0); - - _errout: - _eofout: - vorbis_staticbook_clear(s); - return(-1); -} - -/* returns the number of bits ************************************************/ -int vorbis_book_encode(codebook *book, int a, oggpack_buffer *b){ - _oggpack_write(b,book->codelist[a],book->c->lengthlist[a]); - return(book->c->lengthlist[a]); -} - -/* One the encode side, our vector writers are each designed for a -specific purpose, and the encoder is not flexible without modification: - -The LSP vector coder uses a single stage nearest-match with no -interleave, so no step and no error return. This is specced by floor0 -and doesn't change. - -Residue0 encoding interleaves, uses multiple stages, and each stage -peels of a specific amount of resolution from a lattice (thus we want -to match by threshhold, not nearest match). Residue doesn't *have* to -be encoded that way, but to change it, one will need to add more -infrastructure on the encode side (decode side is specced and simpler) */ - -/* floor0 LSP (single stage, non interleaved, nearest match) */ -/* returns entry number and *modifies a* to the quantization value *****/ -int vorbis_book_errorv(codebook *book,double *a){ - int dim=book->dim,k; - int best=_best(book,a,1); - for(k=0;k<dim;k++) - a[k]=(book->valuelist+best*dim)[k]; - return(best); -} - -/* returns the number of bits and *modifies a* to the quantization value *****/ -int vorbis_book_encodev(codebook *book,int best,double *a,oggpack_buffer *b){ - int k,dim=book->dim; - for(k=0;k<dim;k++) - a[k]=(book->valuelist+best*dim)[k]; - return(vorbis_book_encode(book,best,b)); -} - -/* res0 (multistage, interleave, lattice) */ -/* returns the number of bits and *modifies a* to the remainder value ********/ -int vorbis_book_encodevs(codebook *book,double *a,oggpack_buffer *b, - int step,int addmul){ - - int best=vorbis_book_besterror(book,a,step,addmul); - return(vorbis_book_encode(book,best,b)); -} - -/* Decode side is specced and easier, because we don't need to find - matches using different criteria; we simply read and map. There are - two things we need to do 'depending': - - We may need to support interleave. We don't really, but it's - convenient to do it here rather than rebuild the vector later. - - Cascades may be additive or multiplicitive; this is not inherent in - the codebook, but set in the code using the codebook. Like - interleaving, it's easiest to do it here. - stage==0 -> declarative (set the value) - stage==1 -> additive - stage==2 -> multiplicitive */ - -/* returns the entry number or -1 on eof *************************************/ -long vorbis_book_decode(codebook *book, oggpack_buffer *b){ - long ptr=0; - decode_aux *t=book->decode_tree; - do{ - switch(_oggpack_read1(b)){ - case 0: - ptr=t->ptr0[ptr]; - break; - case 1: - ptr=t->ptr1[ptr]; - break; - case -1: - return(-1); - } - }while(ptr>0); - return(-ptr); -} - -/* returns the entry number or -1 on eof *************************************/ -long vorbis_book_decodevs(codebook *book,double *a,oggpack_buffer *b, - int step,int addmul){ - long entry=vorbis_book_decode(book,b); - int i,o; - if(entry==-1)return(-1); - switch(addmul){ - case -1: - for(i=0,o=0;i<book->dim;i++,o+=step) - a[o]=(book->valuelist+entry*book->dim)[i]; - break; - case 0: - for(i=0,o=0;i<book->dim;i++,o+=step) - a[o]+=(book->valuelist+entry*book->dim)[i]; - break; - case 1: - for(i=0,o=0;i<book->dim;i++,o+=step) - a[o]*=(book->valuelist+entry*book->dim)[i]; - break; - } - return(entry); -} - -#ifdef _V_SELFTEST - -/* Simple enough; pack a few candidate codebooks, unpack them. Code a - number of vectors through (keeping track of the quantized values), - and decode using the unpacked book. quantized version of in should - exactly equal out */ - -#include <stdio.h> - -#include "vorbis/book/lsp20_0.vqh" -#include "vorbis/book/res0a_13.vqh" -#define TESTSIZE 40 - -double test1[TESTSIZE]={ - 0.105939, - 0.215373, - 0.429117, - 0.587974, - - 0.181173, - 0.296583, - 0.515707, - 0.715261, - - 0.162327, - 0.263834, - 0.342876, - 0.406025, - - 0.103571, - 0.223561, - 0.368513, - 0.540313, - - 0.136672, - 0.395882, - 0.587183, - 0.652476, - - 0.114338, - 0.417300, - 0.525486, - 0.698679, - - 0.147492, - 0.324481, - 0.643089, - 0.757582, - - 0.139556, - 0.215795, - 0.324559, - 0.399387, - - 0.120236, - 0.267420, - 0.446940, - 0.608760, - - 0.115587, - 0.287234, - 0.571081, - 0.708603, -}; - -double test3[TESTSIZE]={ - 0,1,-2,3,4,-5,6,7,8,9, - 8,-2,7,-1,4,6,8,3,1,-9, - 10,11,12,13,14,15,26,17,18,19, - 30,-25,-30,-1,-5,-32,4,3,-2,0}; - -static_codebook *testlist[]={&_vq_book_lsp20_0, - &_vq_book_res0a_13,NULL}; -double *testvec[]={test1,test3}; - -int main(){ - oggpack_buffer write; - oggpack_buffer read; - long ptr=0,i; - _oggpack_writeinit(&write); - - fprintf(stderr,"Testing codebook abstraction...:\n"); - - while(testlist[ptr]){ - codebook c; - static_codebook s; - double *qv=alloca(sizeof(double)*TESTSIZE); - double *iv=alloca(sizeof(double)*TESTSIZE); - memcpy(qv,testvec[ptr],sizeof(double)*TESTSIZE); - memset(iv,0,sizeof(double)*TESTSIZE); - - fprintf(stderr,"\tpacking/coding %ld... ",ptr); - - /* pack the codebook, write the testvector */ - _oggpack_reset(&write); - vorbis_book_init_encode(&c,testlist[ptr]); /* get it into memory - we can write */ - vorbis_staticbook_pack(testlist[ptr],&write); - fprintf(stderr,"Codebook size %ld bytes... ",_oggpack_bytes(&write)); - for(i=0;i<TESTSIZE;i+=c.dim){ - int best=_best(&c,qv+i,1); - vorbis_book_encodev(&c,best,qv+i,&write); - } - vorbis_book_clear(&c); - - fprintf(stderr,"OK.\n"); - fprintf(stderr,"\tunpacking/decoding %ld... ",ptr); - - /* transfer the write data to a read buffer and unpack/read */ - _oggpack_readinit(&read,_oggpack_buffer(&write),_oggpack_bytes(&write)); - if(vorbis_staticbook_unpack(&read,&s)){ - fprintf(stderr,"Error unpacking codebook.\n"); - exit(1); - } - if(vorbis_book_init_decode(&c,&s)){ - fprintf(stderr,"Error initializing codebook.\n"); - exit(1); - } - - for(i=0;i<TESTSIZE;i+=c.dim) - if(vorbis_book_decodevs(&c,iv+i,&read,1,-1)==-1){ - fprintf(stderr,"Error reading codebook test data (EOP).\n"); - exit(1); - } - for(i=0;i<TESTSIZE;i++) - if(fabs(qv[i]-iv[i])>.000001){ - fprintf(stderr,"read (%g) != written (%g) at position (%ld)\n", - iv[i],qv[i],i); - exit(1); - } - - fprintf(stderr,"OK\n"); - ptr++; - } - - /* The above is the trivial stuff; now try unquantizing a log scale codebook */ - - exit(0); -} - -#endif diff --git a/lib/envelope.c b/lib/envelope.c deleted file mode 100644 index 63a3f939..00000000 --- a/lib/envelope.c +++ /dev/null @@ -1,236 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: PCM data envelope analysis and manipulation - last mod: $Id: envelope.c,v 1.21 2000/08/15 09:09:42 xiphmont Exp $ - - Preecho calculation. - - ********************************************************************/ - -#include <stdlib.h> -#include <string.h> -#include <stdio.h> -#include <math.h> -#include "vorbis/codec.h" - -#include "os.h" -#include "scales.h" -#include "envelope.h" -#include "bitwise.h" -#include "misc.h" - -/* We use a Chebyshev bandbass for the preecho trigger bandpass; it's - close enough for sample rates 32000-48000 Hz (corner frequencies at - 6k/14k assuming sample rate of 44.1kHz) */ - -/* Digital filter designed by mkfilter/mkshape/gencode A.J. Fisher - Command line: /www/usr/fisher/helpers/mkfilter -Ch \ - -6.0000000000e+00 -Bp -o 5 -a 1.3605442177e-01 3.1746031746e-01 -l */ - -static int cheb_bandpass_stages=10; -static double cheb_bandpass_gain=5.589612458e+01; -/* z^-stage, z^-stage+1... */ -static double cheb_bandpass_B[]={-1.,0.,5.,0.,-10.,0.,10.,0.,-5.,0.,1}; -static double cheb_bandpass_A[]={ - -0.1917409386, - 0.0078657069, - -0.7126903444, - 0.0266343467, - -1.4047174730, - 0.0466964232, - -1.9032773429, - 0.0451493360, - -1.4471447397, - 0.0303413711}; - -static int cheb_highpass_stages=10; -static double cheb_highpass_gain= 5.291963434e+01; -/* z^-stage, z^-stage+1... */ -static double cheb_highpass_B[]={1,-10,45,-120,210,-252,210,-120,45,-10,1}; -static double cheb_highpass_A[]={ - -0.1247628029, - 0.1334086523, - -0.3997715614, - 0.3213011089, - -1.1131924119, - 1.7692446626, - -3.6241199038, - 4.1950871291, - -4.2771757867, - 2.3920318913}; - -void _ve_envelope_init(envelope_lookup *e,vorbis_info *vi){ - long rate=vi->rate; - int ch=vi->channels; - int window=vi->envelopesa; - int i; - e->winlength=window; - e->minenergy=fromdB(vi->preecho_minenergy); - e->iir=calloc(ch,sizeof(IIR_state)); - e->filtered=calloc(ch,sizeof(double *)); - e->ch=ch; - e->storage=128; - for(i=0;i<ch;i++){ - IIR_init(e->iir+i,cheb_highpass_stages,cheb_highpass_gain, - cheb_highpass_A,cheb_highpass_B); - e->filtered[i]=calloc(e->storage,sizeof(double)); - } - - drft_init(&e->drft,window); - e->window=malloc(e->winlength*sizeof(double)); - /* We just use a straight sin(x) window for this */ - for(i=0;i<e->winlength;i++) - e->window[i]=sin((i+.5)/e->winlength*M_PI); -} - -void _ve_envelope_clear(envelope_lookup *e){ - int i; - for(i=0;i<e->ch;i++){ - IIR_clear((e->iir+i)); - free(e->filtered[i]); - } - drft_clear(&e->drft); - free(e->window); - free(e->filtered); - memset(e,0,sizeof(envelope_lookup)); -} - -/*static int frameno=0;*/ - -static void smooth_noise(long n,double *f,double *noise){ - long i; - long lo=0,hi=0; - double acc=0.; - - for(i=0;i<n;i++){ - long newhi=i*1.0442718740+5; - long newlo=i*.8781245150-5; - if(newhi>n)newhi=n; - - for(;lo<newlo;lo++) - acc-=f[lo]*f[lo]; - for(;hi<newhi;hi++) - acc+=f[hi]*f[hi]; - noise[i]=todB(sqrt(acc/(hi-lo))); - } -} - -static double _ve_deltai(envelope_lookup *ve,IIR_state *iir, - double *pre,double *post){ - long no=ve->winlength/3; /* past the highpass rollon! */ - long n2=ve->winlength*2; - long n=ve->winlength; - - double *workA=alloca(sizeof(double)*n2),A=0.; - double *workB=alloca(sizeof(double)*n2),B=0.; - long i; - - /*_analysis_output("A",frameno,pre,n,0,0); - _analysis_output("B",frameno,post,n,0,0);*/ - - for(i=0;i<n;i++){ - workA[i]=pre[i]*ve->window[i]; - workB[i]=post[i]*ve->window[i]; - } - - /*_analysis_output("Awin",frameno,workA,n,0,0); - _analysis_output("Bwin",frameno,workB,n,0,0);*/ - - drft_forward(&ve->drft,workA); - drft_forward(&ve->drft,workB); - - /* we want to have a 'minimum bar' for energy, else we're just - basing blocks on quantization noise that outweighs the signal - itself (for low power signals) */ - { - double min=ve->minenergy; - for(i=0;i<n;i++){ - if(fabs(workA[i])<min)workA[i]=min; - if(fabs(workB[i])<min)workB[i]=min; - } - } - - /*_analysis_output("Afft",frameno,workA,n,0,0); - _analysis_output("Bfft",frameno,workB,n,0,0);*/ - - for(i=0;i<n;i++){ - A+=workA[i]*workA[i]; - B+=workB[i]*workB[i]; - } - - A=todB(A); - B=todB(B); - - return(B-A); -} - -long _ve_envelope_search(vorbis_dsp_state *v,long searchpoint){ - vorbis_info *vi=v->vi; - envelope_lookup *ve=v->ve; - long i,j; - - /* make sure we have enough storage to match the PCM */ - if(v->pcm_storage>ve->storage){ - ve->storage=v->pcm_storage; - for(i=0;i<ve->ch;i++) - ve->filtered[i]=realloc(ve->filtered[i],ve->storage*sizeof(double)); - } - - /* catch up the highpass to match the pcm */ - for(i=0;i<ve->ch;i++){ - double *filtered=ve->filtered[i]; - double *pcm=v->pcm[i]; - IIR_state *iir=ve->iir+i; - - for(j=ve->current;j<v->pcm_current;j++) - filtered[j]=IIR_filter(iir,pcm[j]); - } - ve->current=v->pcm_current; - - /* Now search through our cached highpass data for breaking points */ - /* starting point */ - if(v->W) - j=v->centerW+vi->blocksizes[1]/4-vi->blocksizes[0]/4; - else - j=v->centerW; - - while(j+ve->winlength<=v->pcm_current){ - for(i=0;i<ve->ch;i++){ - double *filtered=ve->filtered[i]+j; - IIR_state *iir=ve->iir+i; - double m=_ve_deltai(ve,iir,filtered-ve->winlength,filtered); - - if(m>vi->preecho_thresh){ - /*frameno++;*/ - return(0); - } - /*frameno++;*/ - } - - j+=vi->blocksizes[0]/2; - if(j>=searchpoint)return(1); - } - - return(-1); -} - -void _ve_envelope_shift(envelope_lookup *e,long shift){ - int i; - for(i=0;i<e->ch;i++) - memmove(e->filtered[i],e->filtered[i]+shift,(e->current-shift)* - sizeof(double)); - e->current-=shift; -} - - diff --git a/lib/envelope.h b/lib/envelope.h deleted file mode 100644 index dc43a7e3..00000000 --- a/lib/envelope.h +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: PCM data envelope analysis and manipulation - last mod: $Id: envelope.h,v 1.9 2000/08/15 09:09:42 xiphmont Exp $ - - ********************************************************************/ - -#ifndef _V_ENVELOPE_ -#define _V_ENVELOPE_ - -#include "iir.h" -#include "smallft.h" - -#define EORDER 16 - -typedef struct { - int ch; - int winlength; - int searchstep; - double minenergy; - - IIR_state *iir; - double **filtered; - long storage; - long current; - - drft_lookup drft; - double *window; -} envelope_lookup; - -extern void _ve_envelope_init(envelope_lookup *e,vorbis_info *vi); -extern void _ve_envelope_clear(envelope_lookup *e); -extern long _ve_envelope_search(vorbis_dsp_state *v,long searchpoint); -extern void _ve_envelope_shift(envelope_lookup *e,long shift); - - -#endif - diff --git a/lib/floor0.c b/lib/floor0.c deleted file mode 100644 index f330b24b..00000000 --- a/lib/floor0.c +++ /dev/null @@ -1,424 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: floor backend 0 implementation - last mod: $Id: floor0.c,v 1.23 2000/08/23 10:16:56 xiphmont Exp $ - - ********************************************************************/ - -#include <stdlib.h> -#include <string.h> -#include <math.h> -#include "vorbis/codec.h" -#include "bitwise.h" -#include "registry.h" -#include "lpc.h" -#include "lsp.h" -#include "bookinternal.h" -#include "sharedbook.h" -#include "scales.h" -#include "misc.h" -#include "os.h" - -#include "misc.h" -#include <stdio.h> - -typedef struct { - long n; - int ln; - int m; - int *linearmap; - - vorbis_info_floor0 *vi; - lpc_lookup lpclook; - double *lsp_look; - -} vorbis_look_floor0; - -/* infrastructure for finding fit */ -static long _f0_fit(codebook *book, - double *orig, - double *workfit, - int cursor){ - int dim=book->dim; - double norm,base=0.,err=0.; - int i,best=0; - double *lsp=workfit+cursor; - - if(cursor)base=workfit[cursor-1]; - norm=orig[cursor+dim-1]-base; - - for(i=0;i<dim;i++) - lsp[i]=(orig[i+cursor]-base); - best=_best(book,lsp,1); - - memcpy(lsp,book->valuelist+best*dim,dim*sizeof(double)); - for(i=0;i<dim;i++) - lsp[i]+=base; - return(best); -} - -/***********************************************/ - -static void free_info(vorbis_info_floor *i){ - if(i){ - memset(i,0,sizeof(vorbis_info_floor0)); - free(i); - } -} - -static void free_look(vorbis_look_floor *i){ - vorbis_look_floor0 *look=(vorbis_look_floor0 *)i; - if(i){ - if(look->linearmap)free(look->linearmap); - if(look->lsp_look)free(look->lsp_look); - lpc_clear(&look->lpclook); - memset(look,0,sizeof(vorbis_look_floor0)); - free(look); - } -} - -static void pack (vorbis_info_floor *i,oggpack_buffer *opb){ - vorbis_info_floor0 *info=(vorbis_info_floor0 *)i; - int j; - _oggpack_write(opb,info->order,8); - _oggpack_write(opb,info->rate,16); - _oggpack_write(opb,info->barkmap,16); - _oggpack_write(opb,info->ampbits,6); - _oggpack_write(opb,info->ampdB,8); - _oggpack_write(opb,info->numbooks-1,4); - for(j=0;j<info->numbooks;j++) - _oggpack_write(opb,info->books[j],8); -} - -static vorbis_info_floor *unpack (vorbis_info *vi,oggpack_buffer *opb){ - int j; - vorbis_info_floor0 *info=malloc(sizeof(vorbis_info_floor0)); - info->order=_oggpack_read(opb,8); - info->rate=_oggpack_read(opb,16); - info->barkmap=_oggpack_read(opb,16); - info->ampbits=_oggpack_read(opb,6); - info->ampdB=_oggpack_read(opb,8); - info->numbooks=_oggpack_read(opb,4)+1; - - if(info->order<1)goto err_out; - if(info->rate<1)goto err_out; - if(info->barkmap<1)goto err_out; - if(info->numbooks<1)goto err_out; - - for(j=0;j<info->numbooks;j++){ - info->books[j]=_oggpack_read(opb,8); - if(info->books[j]<0 || info->books[j]>=vi->books)goto err_out; - } - return(info); - err_out: - free_info(info); - return(NULL); -} - -/* initialize Bark scale and normalization lookups. We could do this - with static tables, but Vorbis allows a number of possible - combinations, so it's best to do it computationally. - - The below is authoritative in terms of defining scale mapping. - Note that the scale depends on the sampling rate as well as the - linear block and mapping sizes */ - -static vorbis_look_floor *look (vorbis_dsp_state *vd,vorbis_info_mode *mi, - vorbis_info_floor *i){ - int j; - double scale; - vorbis_info *vi=vd->vi; - vorbis_info_floor0 *info=(vorbis_info_floor0 *)i; - vorbis_look_floor0 *look=calloc(1,sizeof(vorbis_look_floor0)); - look->m=info->order; - look->n=vi->blocksizes[mi->blockflag]/2; - look->ln=info->barkmap; - look->vi=info; - - if(vd->analysisp) - lpc_init(&look->lpclook,look->ln,look->m); - - /* we choose a scaling constant so that: - floor(bark(rate/2-1)*C)=mapped-1 - floor(bark(rate/2)*C)=mapped */ - scale=look->ln/toBARK(info->rate/2.); - - /* the mapping from a linear scale to a smaller bark scale is - straightforward. We do *not* make sure that the linear mapping - does not skip bark-scale bins; the decoder simply skips them and - the encoder may do what it wishes in filling them. They're - necessary in some mapping combinations to keep the scale spacing - accurate */ - look->linearmap=malloc(look->n*sizeof(int)); - for(j=0;j<look->n;j++){ - int val=floor( toBARK((info->rate/2.)/look->n*j) - *scale); /* bark numbers represent band edges */ - if(val>look->ln)val=look->ln; /* guard against the approximation */ - look->linearmap[j]=val; - } - - look->lsp_look=malloc(look->ln*sizeof(double)); - for(j=0;j<look->ln;j++) - look->lsp_look[j]=2*cos(M_PI/look->ln*j); - - return look; -} - -/* less efficient than the decode side (written for clarity). We're - not bottlenecked here anyway */ - -double _curve_to_lpc(double *curve,double *lpc, - vorbis_look_floor0 *l,long frameno){ - /* map the input curve to a bark-scale curve for encoding */ - - int mapped=l->ln; - double *work=alloca(sizeof(double)*mapped); - int i,j,last=0; - int bark=0; - - memset(work,0,sizeof(double)*mapped); - - /* Only the decode side is behavior-specced; for now in the encoder, - we select the maximum value of each band as representative (this - helps make sure peaks don't go out of range. In error terms, - selecting min would make more sense, but the codebook is trained - numerically, so we don't actually lose. We'd still want to - use the original curve for error and noise estimation */ - - for(i=0;i<l->n;i++){ - bark=l->linearmap[i]; - if(work[bark]<curve[i])work[bark]=curve[i]; - if(bark>last+1){ - /* If the bark scale is climbing rapidly, some bins may end up - going unused. This isn't a waste actually; it keeps the - scale resolution even so that the LPC generator has an easy - time. However, if we leave the bins empty we lose energy. - So, fill 'em in. The decoder does not do anything with he - unused bins, so we can fill them anyway we like to end up - with a better spectral curve */ - - /* we'll always have a bin zero, so we don't need to guard init */ - long span=bark-last; - for(j=1;j<span;j++){ - double del=(double)j/span; - work[j+last]=work[bark]*del+work[last]*(1.-del); - } - } - last=bark; - } - - /* If we're over-ranged to avoid edge effects, fill in the end of spectrum gap */ - for(i=bark+1;i<mapped;i++) - work[i]=work[i-1]; - -#if 0 - { /******************/ - FILE *of; - char buffer[80]; - int i; - - sprintf(buffer,"Fmask_%d.m",frameno); - of=fopen(buffer,"w"); - for(i=0;i<mapped;i++) - fprintf(of,"%g\n",work[i]); - fclose(of); - } -#endif - - return vorbis_lpc_from_curve(work,lpc,&(l->lpclook)); -} - -/* generate the whole freq response curve of an LPC IIR filter */ - -void _lsp_to_curve(double *curve,double *lsp,double amp, - vorbis_look_floor0 *l,char *name,long frameno){ - /* l->m+1 must be less than l->ln, but guard in case we get a bad stream */ - double *lcurve=alloca(sizeof(double)*l->ln); - int i; - - if(amp==0){ - memset(curve,0,sizeof(double)*l->n); - return; - } - vorbis_lsp_to_curve(lcurve,l->ln,lsp,l->m,amp,l->lsp_look); - - for(i=0;i<l->n;i++)curve[i]=lcurve[l->linearmap[i]]; - -} - -static long seq=0; -static int forward(vorbis_block *vb,vorbis_look_floor *i, - double *in,double *out){ - long j; - vorbis_look_floor0 *look=(vorbis_look_floor0 *)i; - vorbis_info_floor0 *info=look->vi; - double *work=alloca((look->ln+look->n)*sizeof(double)); - double amp; - long bits=0; - -#ifdef TRAIN_LSP - FILE *of; - FILE *ef; - char buffer[80]; - -#if 1 - sprintf(buffer,"lsp0coeff_%d.vqd",vb->mode); - of=fopen(buffer,"a"); -#endif - - sprintf(buffer,"lsp0ent_%d.vqd",vb->mode); - ef=fopen(buffer,"a"); -#endif - - /* our floor comes in on a linear scale; go to a [-Inf...0] dB - scale. The curve has to be positive, so we offset it. */ - - for(j=0;j<look->n;j++){ - double val=todB(in[j])+info->ampdB; - if(val<1.) - work[j]=1.; - else - work[j]=val; - } - - /* use 'out' as temp storage */ - /* Convert our floor to a set of lpc coefficients */ - amp=sqrt(_curve_to_lpc(work,out,look,seq)); - - /* amp is in the range (0. to ampdB]. Encode that range using - ampbits bits */ - - { - long maxval=(1L<<info->ampbits)-1; - - long val=rint(amp/info->ampdB*maxval); - - if(val<0)val=0; /* likely */ - if(val>maxval)val=maxval; /* not bloody likely */ - - _oggpack_write(&vb->opb,val,info->ampbits); - if(val>0) - amp=(float)val/maxval*info->ampdB; - else - amp=0; - } - - if(amp>0){ - - /* the spec supports using one of a number of codebooks. Right - now, encode using this lib supports only one */ - codebook *b=vb->vd->fullbooks+info->books[0]; - _oggpack_write(&vb->opb,0,_ilog(info->numbooks)); - - /* LSP <-> LPC is orthogonal and LSP quantizes more stably */ - vorbis_lpc_to_lsp(out,out,look->m); - -#if 1 -#ifdef TRAIN_LSP - { - double last=0.; - for(j=0;j<look->m;j++){ - fprintf(of,"%.12g, ",out[j]-last); - last=out[j]; - } - } - fprintf(of,"\n"); - fclose(of); -#endif -#endif - - /* code the spectral envelope, and keep track of the actual - quantized values; we don't want creeping error as each block is - nailed to the last quantized value of the previous block. */ - - for(j=0;j<look->m;j+=b->dim){ - int entry=_f0_fit(b,out,work,j); - bits+=vorbis_book_encode(b,entry,&vb->opb); - -#ifdef TRAIN_LSP - fprintf(ef,"%d,\n",entry); -#endif - - } - -#ifdef ANALYSIS - { - double last=0; - for(j=0;j<look->m;j++){ - out[j]=work[j]-last; - last=work[j]; - } - } - _analysis_output("lsp",seq,out,look->m,0,0); - -#endif - -#ifdef TRAIN_LSP - fclose(ef); -#endif - - /* take the coefficients back to a spectral envelope curve */ - _lsp_to_curve(out,work,amp,look,"Ffloor",seq++); - for(j=0;j<look->n;j++)out[j]= fromdB(out[j]-info->ampdB); - return(1); - } - - memset(out,0,sizeof(double)*look->n); - seq++; - return(0); -} - -static int inverse(vorbis_block *vb,vorbis_look_floor *i,double *out){ - vorbis_look_floor0 *look=(vorbis_look_floor0 *)i; - vorbis_info_floor0 *info=look->vi; - int j,k; - - int ampraw=_oggpack_read(&vb->opb,info->ampbits); - if(ampraw>0){ /* also handles the -1 out of data case */ - long maxval=(1<<info->ampbits)-1; - double amp=(float)ampraw/maxval*info->ampdB; - int booknum=_oggpack_read(&vb->opb,_ilog(info->numbooks)); - - if(booknum!=-1){ - codebook *b=vb->vd->fullbooks+info->books[booknum]; - double last=0.; - - memset(out,0,sizeof(double)*look->m); - - for(j=0;j<look->m;j+=b->dim) - if(vorbis_book_decodevs(b,out+j,&vb->opb,1,-1)==-1)goto eop; - for(j=0;j<look->m;){ - for(k=0;k<b->dim;k++,j++)out[j]+=last; - last=out[j-1]; - } - - /* take the coefficients back to a spectral envelope curve */ - _lsp_to_curve(out,out,amp,look,"",0); - - for(j=0;j<look->n;j++)out[j]=fromdB(out[j]-info->ampdB); - return(1); - } - } - - eop: - memset(out,0,sizeof(double)*look->n); - return(0); -} - -/* export hooks */ -vorbis_func_floor floor0_exportbundle={ - &pack,&unpack,&look,&free_info,&free_look,&forward,&inverse -}; - - diff --git a/lib/framing.c b/lib/framing.c deleted file mode 100644 index 152400b0..00000000 --- a/lib/framing.c +++ /dev/null @@ -1,1623 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and the XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: code raw [Vorbis] packets into framed OggSquish stream and - decode Ogg streams back into raw packets - last mod: $Id: framing.c,v 1.25 2000/08/30 06:09:21 xiphmont Exp $ - - note: The CRC code is directly derived from public domain code by - Ross Williams (ross@guest.adelaide.edu.au). See docs/framing.html - for details. - - ********************************************************************/ - -#include <stdlib.h> -#include <string.h> -#include "vorbis/codec.h" -#include "misc.h" - -/* A complete description of Ogg framing exists in docs/framing.html */ - -int ogg_page_version(ogg_page *og){ - return((int)(og->header[4])); -} - -int ogg_page_continued(ogg_page *og){ - return((int)(og->header[5]&0x01)); -} - -int ogg_page_bos(ogg_page *og){ - return((int)(og->header[5]&0x02)); -} - -int ogg_page_eos(ogg_page *og){ - return((int)(og->header[5]&0x04)); -} - -ogg_int64_t ogg_page_frameno(ogg_page *og){ - unsigned char *page=og->header; - ogg_int64_t pcmpos=page[13]&(0xff); - pcmpos= (pcmpos<<8)|(page[12]&0xff); - pcmpos= (pcmpos<<8)|(page[11]&0xff); - pcmpos= (pcmpos<<8)|(page[10]&0xff); - pcmpos= (pcmpos<<8)|(page[9]&0xff); - pcmpos= (pcmpos<<8)|(page[8]&0xff); - pcmpos= (pcmpos<<8)|(page[7]&0xff); - pcmpos= (pcmpos<<8)|(page[6]&0xff); - return(pcmpos); -} - -int ogg_page_serialno(ogg_page *og){ - return(og->header[14] | - (og->header[15]<<8) | - (og->header[16]<<16) | - (og->header[17]<<24)); -} - -int ogg_page_pageno(ogg_page *og){ - return(og->header[18] | - (og->header[19]<<8) | - (og->header[20]<<16) | - (og->header[21]<<24)); -} - -/* helper to initialize lookup for direct-table CRC */ - -static ogg_uint32_t crc_lookup[256]; -static int crc_ready=0; - -static ogg_uint32_t _ogg_crc_entry(unsigned long index){ - int i; - unsigned long r; - - r = index << 24; - for (i=0; i<8; i++) - if (r & 0x80000000UL) - r = (r << 1) ^ 0x04c11db7; /* The same as the ethernet generator - polynomial, although we use an - unreflected alg and an init/final - of 0, not 0xffffffff */ - else - r<<=1; - return (r & 0xffffffffUL); -} - -/* mind this in threaded code; sync_init and stream_init call it. - It's thread safe only after the first time it returns */ - -static void _ogg_crc_init(void){ - if(!crc_ready){ - /* initialize the crc_lookup table */ - int i; - for (i=0;i<256;i++) - crc_lookup[i]=_ogg_crc_entry((unsigned long)i); - crc_ready=0; - } -} - -/* init the encode/decode logical stream state */ - -int ogg_stream_init(ogg_stream_state *os,int serialno){ - if(os){ - memset(os,0,sizeof(ogg_stream_state)); - os->body_storage=16*1024; - os->body_data=malloc(os->body_storage*sizeof(char)); - - os->lacing_storage=1024; - os->lacing_vals=malloc(os->lacing_storage*sizeof(int)); - os->pcm_vals=malloc(os->lacing_storage*sizeof(ogg_int64_t)); - - /* initialize the crc_lookup table if not done */ - _ogg_crc_init(); - - os->serialno=serialno; - - return(0); - } - return(-1); -} - -/* _clear does not free os, only the non-flat storage within */ -int ogg_stream_clear(ogg_stream_state *os){ - if(os){ - if(os->body_data)free(os->body_data); - if(os->lacing_vals)free(os->lacing_vals); - if(os->pcm_vals)free(os->pcm_vals); - - memset(os,0,sizeof(ogg_stream_state)); - } - return(0); -} - -int ogg_stream_destroy(ogg_stream_state *os){ - if(os){ - ogg_stream_clear(os); - free(os); - } - return(0); -} - -/* Helpers for ogg_stream_encode; this keeps the structure and - what's happening fairly clear */ - -static void _os_body_expand(ogg_stream_state *os,int needed){ - if(os->body_storage<=os->body_fill+needed){ - os->body_storage+=(needed+1024); - os->body_data=realloc(os->body_data,os->body_storage); - } -} - -static void _os_lacing_expand(ogg_stream_state *os,int needed){ - if(os->lacing_storage<=os->lacing_fill+needed){ - os->lacing_storage+=(needed+32); - os->lacing_vals=realloc(os->lacing_vals,os->lacing_storage*sizeof(int)); - os->pcm_vals=realloc(os->pcm_vals,os->lacing_storage*sizeof(ogg_int64_t)); - } -} - -/* checksum the page */ -/* Direct table CRC; note that this will be faster in the future if we - perform the checksum silmultaneously with other copies */ - -static void _os_checksum(ogg_page *og){ - ogg_uint32_t crc_reg=0; - int i; - - for(i=0;i<og->header_len;i++) - crc_reg=(crc_reg<<8)^crc_lookup[((crc_reg >> 24)&0xff)^og->header[i]]; - for(i=0;i<og->body_len;i++) - crc_reg=(crc_reg<<8)^crc_lookup[((crc_reg >> 24)&0xff)^og->body[i]]; - - og->header[22]=crc_reg&0xff; - og->header[23]=(crc_reg>>8)&0xff; - og->header[24]=(crc_reg>>16)&0xff; - og->header[25]=(crc_reg>>24)&0xff; -} - -/* submit data to the internal buffer of the framing engine */ -int ogg_stream_packetin(ogg_stream_state *os,ogg_packet *op){ - int lacing_vals=op->bytes/255+1,i; - - if(os->body_returned){ - /* advance packet data according to the body_returned pointer. We - had to keep it around to return a pointer into the buffer last - call */ - - os->body_fill-=os->body_returned; - if(os->body_fill) - memmove(os->body_data,os->body_data+os->body_returned, - os->body_fill*sizeof(char)); - os->body_returned=0; - } - - /* make sure we have the buffer storage */ - _os_body_expand(os,op->bytes); - _os_lacing_expand(os,lacing_vals); - - /* Copy in the submitted packet. Yes, the copy is a waste; this is - the liability of overly clean abstraction for the time being. It - will actually be fairly easy to eliminate the extra copy in the - future */ - - memcpy(os->body_data+os->body_fill,op->packet,op->bytes); - os->body_fill+=op->bytes; - - /* Store lacing vals for this packet */ - for(i=0;i<lacing_vals-1;i++){ - os->lacing_vals[os->lacing_fill+i]=255; - os->pcm_vals[os->lacing_fill+i]=os->pcmpos; - } - os->lacing_vals[os->lacing_fill+i]=(op->bytes)%255; - os->pcmpos=os->pcm_vals[os->lacing_fill+i]=op->frameno; - - /* flag the first segment as the beginning of the packet */ - os->lacing_vals[os->lacing_fill]|= 0x100; - - os->lacing_fill+=lacing_vals; - - /* for the sake of completeness */ - os->packetno++; - - if(op->e_o_s)os->e_o_s=1; - - return(0); -} - -/* This will flush remaining packets into a page (returning nonzero), - even if there is not enough data to trigger a flush normally - (undersized page). If there are no packets or partial packets to - flush, ogg_stream_flush returns 0. Note that ogg_stream_flush will - try to flush a normal sized page like ogg_stream_pageout; a call to - ogg_stream_flush does not gurantee that all packets have flushed. - Only a return value of 0 from ogg_stream_flush indicates all packet - data is flushed into pages. - - ogg_stream_page will flush the last page in a stream even if it's - undersized; you almost certainly want to use ogg_stream_pageout - (and *not* ogg_stream_flush) unless you need to flush an undersized - page in the middle of a stream for some reason. */ - -int ogg_stream_flush(ogg_stream_state *os,ogg_page *og){ - int i; - int vals=0; - int maxvals=(os->lacing_fill>255?255:os->lacing_fill); - int bytes=0; - long acc=0; - ogg_int64_t pcm_pos=os->pcm_vals[0]; - - if(maxvals==0)return(0); - - /* construct a page */ - /* decide how many segments to include */ - - /* If this is the initial header case, the first page must only include - the initial header packet */ - if(os->b_o_s==0){ /* 'initial header page' case */ - pcm_pos=0; - for(vals=0;vals<maxvals;vals++){ - if((os->lacing_vals[vals]&0x0ff)<255){ - vals++; - break; - } - } - }else{ - for(vals=0;vals<maxvals;vals++){ - if(acc>4096)break; - acc+=os->lacing_vals[vals]&0x0ff; - pcm_pos=os->pcm_vals[vals]; - } - } - - /* construct the header in temp storage */ - memcpy(os->header,"OggS",4); - - /* stream structure version */ - os->header[4]=0x00; - - /* continued packet flag? */ - os->header[5]=0x00; - if((os->lacing_vals[0]&0x100)==0)os->header[5]|=0x01; - /* first page flag? */ - if(os->b_o_s==0)os->header[5]|=0x02; - /* last page flag? */ - if(os->e_o_s && os->lacing_fill==vals)os->header[5]|=0x04; - os->b_o_s=1; - - /* 64 bits of PCM position */ - for(i=6;i<14;i++){ - os->header[i]=(pcm_pos&0xff); - pcm_pos>>=8; - } - - /* 32 bits of stream serial number */ - { - long serialno=os->serialno; - for(i=14;i<18;i++){ - os->header[i]=(serialno&0xff); - serialno>>=8; - } - } - - /* 32 bits of page counter (we have both counter and page header - because this val can roll over) */ - if(os->pageno==-1)os->pageno=0; /* because someone called - stream_reset; this would be a - strange thing to do in an - encode stream, but it has - plausible uses */ - { - long pageno=os->pageno++; - for(i=18;i<22;i++){ - os->header[i]=(pageno&0xff); - pageno>>=8; - } - } - - /* zero for computation; filled in later */ - os->header[22]=0; - os->header[23]=0; - os->header[24]=0; - os->header[25]=0; - - /* segment table */ - os->header[26]=vals&0xff; - for(i=0;i<vals;i++) - bytes+=os->header[i+27]=(os->lacing_vals[i]&0xff); - - /* set pointers in the ogg_page struct */ - og->header=os->header; - og->header_len=os->header_fill=vals+27; - og->body=os->body_data+os->body_returned; - og->body_len=bytes; - - /* advance the lacing data and set the body_returned pointer */ - - os->lacing_fill-=vals; - memmove(os->lacing_vals,os->lacing_vals+vals,os->lacing_fill*sizeof(int)); - memmove(os->pcm_vals,os->pcm_vals+vals,os->lacing_fill*sizeof(ogg_int64_t)); - os->body_returned+=bytes; - - /* calculate the checksum */ - - _os_checksum(og); - - /* done */ - return(1); -} - - -/* This constructs pages from buffered packet segments. The pointers -returned are to static buffers; do not free. The returned buffers are -good only until the next call (using the same ogg_stream_state) */ - -int ogg_stream_pageout(ogg_stream_state *os, ogg_page *og){ - - if((os->e_o_s&&os->lacing_fill) || /* 'were done, now flush' case */ - os->body_fill-os->body_returned > 4096 ||/* 'page nominal size' case */ - os->lacing_fill>=255 || /* 'segment table full' case */ - (os->lacing_fill&&!os->b_o_s)){ /* 'initial header page' case */ - - return(ogg_stream_flush(os,og)); - } - - /* not enough data to construct a page and not end of stream */ - return(0); -} - -int ogg_stream_eof(ogg_stream_state *os){ - return os->e_o_s; -} - -/* DECODING PRIMITIVES: packet streaming layer **********************/ - -/* This has two layers to place more of the multi-serialno and paging - control in the application's hands. First, we expose a data buffer - using ogg_sync_buffer(). The app either copies into the - buffer, or passes it directly to read(), etc. We then call - ogg_sync_wrote() to tell how many bytes we just added. - - Pages are returned (pointers into the buffer in ogg_sync_state) - by ogg_sync_pageout(). The page is then submitted to - ogg_stream_pagein() along with the appropriate - ogg_stream_state* (ie, matching serialno). We then get raw - packets out calling ogg_stream_packetout() with a - ogg_stream_state. See the 'frame-prog.txt' docs for details and - example code. */ - -/* initialize the struct to a known state */ -int ogg_sync_init(ogg_sync_state *oy){ - if(oy){ - memset(oy,0,sizeof(ogg_sync_state)); - _ogg_crc_init(); - } - return(0); -} - -/* clear non-flat storage within */ -int ogg_sync_clear(ogg_sync_state *oy){ - if(oy){ - if(oy->data)free(oy->data); - ogg_sync_init(oy); - } - return(0); -} - -char *ogg_sync_buffer(ogg_sync_state *oy, long size){ - - /* first, clear out any space that has been previously returned */ - if(oy->returned){ - oy->fill-=oy->returned; - if(oy->fill>0) - memmove(oy->data,oy->data+oy->returned, - (oy->fill)*sizeof(char)); - oy->returned=0; - } - - if(size>oy->storage-oy->fill){ - /* We need to extend the internal buffer */ - long newsize=size+oy->fill+4096; /* an extra page to be nice */ - - if(oy->data) - oy->data=realloc(oy->data,newsize); - else - oy->data=malloc(newsize); - oy->storage=newsize; - } - - /* expose a segment at least as large as requested at the fill mark */ - return((char *)oy->data+oy->fill); -} - -int ogg_sync_wrote(ogg_sync_state *oy, long bytes){ - if(oy->fill+bytes>oy->storage)return(-1); - oy->fill+=bytes; - return(0); -} - -/* sync the stream. This is meant to be useful for finding page - boundaries. - - return values for this: - -n) skipped n bytes - 0) page not ready; more data (no bytes skipped) - n) page synced at current location; page length n bytes - -*/ - -long ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og){ - unsigned char *page=oy->data+oy->returned; - unsigned char *next; - long bytes=oy->fill-oy->returned; - - if(oy->headerbytes==0){ - int headerbytes,i; - if(bytes<27)return(0); /* not enough for a header */ - - /* verify capture pattern */ - if(memcmp(page,"OggS",4))goto sync_fail; - - headerbytes=page[26]+27; - if(bytes<headerbytes)return(0); /* not enough for header + seg table */ - - /* count up body length in the segment table */ - - for(i=0;i<page[26];i++) - oy->bodybytes+=page[27+i]; - oy->headerbytes=headerbytes; - } - - if(oy->bodybytes+oy->headerbytes>bytes)return(0); - - /* The whole test page is buffered. Verify the checksum */ - { - /* Grab the checksum bytes, set the header field to zero */ - char chksum[4]; - ogg_page log; - - memcpy(chksum,page+22,4); - memset(page+22,0,4); - - /* set up a temp page struct and recompute the checksum */ - log.header=page; - log.header_len=oy->headerbytes; - log.body=page+oy->headerbytes; - log.body_len=oy->bodybytes; - _os_checksum(&log); - - /* Compare */ - if(memcmp(chksum,page+22,4)){ - /* D'oh. Mismatch! Corrupt page (or miscapture and not a page - at all) */ - /* replace the computed checksum with the one actually read in */ - memcpy(page+22,chksum,4); - - /* Bad checksum. Lose sync */ - goto sync_fail; - } - } - - /* yes, have a whole page all ready to go */ - { - unsigned char *page=oy->data+oy->returned; - long bytes; - - if(og){ - og->header=page; - og->header_len=oy->headerbytes; - og->body=page+oy->headerbytes; - og->body_len=oy->bodybytes; - } - - oy->unsynced=0; - oy->returned+=(bytes=oy->headerbytes+oy->bodybytes); - oy->headerbytes=0; - oy->bodybytes=0; - return(bytes); - } - - sync_fail: - - oy->headerbytes=0; - oy->bodybytes=0; - - /* search for possible capture */ - next=memchr(page+1,'O',bytes-1); - if(!next) - next=oy->data+oy->fill; - - oy->returned=next-oy->data; - return(-(next-page)); -} - -/* sync the stream and get a page. Keep trying until we find a page. - Supress 'sync errors' after reporting the first. - - return values: - -1) recapture (hole in data) - 0) need more data - 1) page returned - - Returns pointers into buffered data; invalidated by next call to - _stream, _clear, _init, or _buffer */ - -int ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og){ - - /* all we need to do is verify a page at the head of the stream - buffer. If it doesn't verify, we look for the next potential - frame */ - - while(1){ - long ret=ogg_sync_pageseek(oy,og); - if(ret>0){ - /* have a page */ - return(1); - } - if(ret==0){ - /* need more data */ - return(0); - } - - /* head did not start a synced page... skipped some bytes */ - if(!oy->unsynced){ - oy->unsynced=1; - return(-1); - } - - /* loop. keep looking */ - - } -} - -/* add the incoming page to the stream state; we decompose the page - into packet segments here as well. */ - -int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og){ - unsigned char *header=og->header; - unsigned char *body=og->body; - long bodysize=og->body_len; - int segptr=0; - - int version=ogg_page_version(og); - int continued=ogg_page_continued(og); - int bos=ogg_page_bos(og); - int eos=ogg_page_eos(og); - ogg_int64_t pcmpos=ogg_page_frameno(og); - int serialno=ogg_page_serialno(og); - int pageno=ogg_page_pageno(og); - int segments=header[26]; - - /* clean up 'returned data' */ - { - long lr=os->lacing_returned; - long br=os->body_returned; - - /* body data */ - if(br){ - os->body_fill-=br; - if(os->body_fill) - memmove(os->body_data,os->body_data+br,os->body_fill); - os->body_returned=0; - } - - if(lr){ - /* segment table */ - if(os->lacing_fill-lr){ - memmove(os->lacing_vals,os->lacing_vals+lr, - (os->lacing_fill-lr)*sizeof(int)); - memmove(os->pcm_vals,os->pcm_vals+lr, - (os->lacing_fill-lr)*sizeof(ogg_int64_t)); - } - os->lacing_fill-=lr; - os->lacing_packet-=lr; - os->lacing_returned=0; - } - } - - /* check the serial number */ - if(serialno!=os->serialno)return(-1); - if(version>0)return(-1); - - _os_lacing_expand(os,segments+1); - - /* are we in sequence? */ - if(pageno!=os->pageno){ - int i; - - /* unroll previous partial packet (if any) */ - for(i=os->lacing_packet;i<os->lacing_fill;i++) - os->body_fill-=os->lacing_vals[i]&0xff; - os->lacing_fill=os->lacing_packet; - - /* make a note of dropped data in segment table */ - if(os->pageno!=-1){ - os->lacing_vals[os->lacing_fill++]=0x400; - os->lacing_packet++; - } - - /* are we a 'continued packet' page? If so, we'll need to skip - some segments */ - if(continued){ - bos=0; - for(;segptr<segments;segptr++){ - int val=header[27+segptr]; - body+=val; - bodysize-=val; - if(val<255){ - segptr++; - break; - } - } - } - } - - if(bodysize){ - _os_body_expand(os,bodysize); - memcpy(os->body_data+os->body_fill,body,bodysize); - os->body_fill+=bodysize; - } - - { - int saved=-1; - while(segptr<segments){ - int val=header[27+segptr]; - os->lacing_vals[os->lacing_fill]=val; - os->pcm_vals[os->lacing_fill]=-1; - - if(bos){ - os->lacing_vals[os->lacing_fill]|=0x100; - bos=0; - } - - if(val<255)saved=os->lacing_fill; - - os->lacing_fill++; - segptr++; - - if(val<255)os->lacing_packet=os->lacing_fill; - } - - /* set the pcmpos on the last pcmval of the last full packet */ - if(saved!=-1){ - os->pcm_vals[saved]=pcmpos; - } - - } - - if(eos){ - os->e_o_s=1; - if(os->lacing_fill>0) - os->lacing_vals[os->lacing_fill-1]|=0x200; - } - - os->pageno=pageno+1; - - return(0); -} - -/* clear things to an initial state. Good to call, eg, before seeking */ -int ogg_sync_reset(ogg_sync_state *oy){ - oy->fill=0; - oy->returned=0; - oy->unsynced=0; - oy->headerbytes=0; - oy->bodybytes=0; - return(0); -} - -int ogg_stream_reset(ogg_stream_state *os){ - os->body_fill=0; - os->body_returned=0; - - os->lacing_fill=0; - os->lacing_packet=0; - os->lacing_returned=0; - - os->header_fill=0; - - os->e_o_s=0; - os->b_o_s=0; - os->pageno=-1; - os->packetno=0; - os->pcmpos=0; - - return(0); -} - -int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op){ - - /* The last part of decode. We have the stream broken into packet - segments. Now we need to group them into packets (or return the - out of sync markers) */ - - int ptr=os->lacing_returned; - - if(os->lacing_packet<=ptr)return(0); - - if(os->lacing_vals[ptr]&0x400){ - /* We lost sync here; let the app know */ - os->lacing_returned++; - - /* we need to tell the codec there's a gap; it might need to - handle previous packet dependencies. */ - os->packetno++; - return(-1); - } - - /* Gather the whole packet. We'll have no holes or a partial packet */ - { - int size=os->lacing_vals[ptr]&0xff; - int bytes=0; - - op->packet=os->body_data+os->body_returned; - op->e_o_s=os->lacing_vals[ptr]&0x200; /* last packet of the stream? */ - op->b_o_s=os->lacing_vals[ptr]&0x100; /* first packet of the stream? */ - bytes+=size; - - while(size==255){ - int val=os->lacing_vals[++ptr]; - size=val&0xff; - if(val&0x200)op->e_o_s=0x200; - bytes+=size; - } - - op->packetno=os->packetno; - op->frameno=os->pcm_vals[ptr]; - op->bytes=bytes; - - os->body_returned+=bytes; - os->lacing_returned=ptr+1; - } - os->packetno++; - return(1); -} - -#ifdef _V_SELFTEST -#include <stdio.h> - -ogg_stream_state os_en, os_de; -ogg_sync_state oy; - -void checkpacket(ogg_packet *op,int len, int no, int pos){ - long j; - static int sequence=0; - static int lastno=0; - - if(op->bytes!=len){ - fprintf(stderr,"incorrect packet length!\n"); - exit(1); - } - if(op->frameno!=pos){ - fprintf(stderr,"incorrect packet position!\n"); - exit(1); - } - - /* packet number just follows sequence/gap; adjust the input number - for that */ - if(no==0){ - sequence=0; - }else{ - sequence++; - if(no>lastno+1) - sequence++; - } - lastno=no; - if(op->packetno!=sequence){ - fprintf(stderr,"incorrect packet sequence %ld != %d\n", - (long)(op->packetno),sequence); - exit(1); - } - - /* Test data */ - for(j=0;j<op->bytes;j++) - if(op->packet[j]!=((j+no)&0xff)){ - fprintf(stderr,"body data mismatch (1) at pos %ld: %x!=%lx!\n\n", - j,op->packet[j],(j+no)&0xff); - exit(1); - } -} - -void check_page(unsigned char *data,const int *header,ogg_page *og){ - long j; - /* Test data */ - for(j=0;j<og->body_len;j++) - if(og->body[j]!=data[j]){ - fprintf(stderr,"body data mismatch (2) at pos %ld: %x!=%x!\n\n", - j,data[j],og->body[j]); - exit(1); - } - - /* Test header */ - for(j=0;j<og->header_len;j++){ - if(og->header[j]!=header[j]){ - fprintf(stderr,"header content mismatch at pos %ld:\n",j); - for(j=0;j<header[26]+27;j++) - fprintf(stderr," (%ld)%02x:%02x",j,header[j],og->header[j]); - fprintf(stderr,"\n"); - exit(1); - } - } - if(og->header_len!=header[26]+27){ - fprintf(stderr,"header length incorrect! (%ld!=%d)\n", - og->header_len,header[26]+27); - exit(1); - } -} - -void print_header(ogg_page *og){ - int j; - fprintf(stderr,"\nHEADER:\n"); - fprintf(stderr," capture: %c %c %c %c version: %d flags: %x\n", - og->header[0],og->header[1],og->header[2],og->header[3], - (int)og->header[4],(int)og->header[5]); - - fprintf(stderr," pcmpos: %d serialno: %d pageno: %d\n", - (og->header[9]<<24)|(og->header[8]<<16)| - (og->header[7]<<8)|og->header[6], - (og->header[17]<<24)|(og->header[16]<<16)| - (og->header[15]<<8)|og->header[14], - (og->header[21]<<24)|(og->header[20]<<16)| - (og->header[19]<<8)|og->header[18]); - - fprintf(stderr," checksum: %02x:%02x:%02x:%02x\n segments: %d (", - (int)og->header[22],(int)og->header[23], - (int)og->header[24],(int)og->header[25], - (int)og->header[26]); - - for(j=27;j<og->header_len;j++) - fprintf(stderr,"%d ",(int)og->header[j]); - fprintf(stderr,")\n\n"); -} - -void copy_page(ogg_page *og){ - unsigned char *temp=malloc(og->header_len); - memcpy(temp,og->header,og->header_len); - og->header=temp; - - temp=malloc(og->body_len); - memcpy(temp,og->body,og->body_len); - og->body=temp; -} - -void error(void){ - fprintf(stderr,"error!\n"); - exit(1); -} - -/* 17 only */ -const int head1_0[] = {0x4f,0x67,0x67,0x53,0,0x06, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x02,0x03,0x04,0,0,0,0, - 0x15,0xed,0xec,0x91, - 1, - 17}; - -/* 17, 254, 255, 256, 500, 510, 600 byte, pad */ -const int head1_1[] = {0x4f,0x67,0x67,0x53,0,0x02, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x02,0x03,0x04,0,0,0,0, - 0x59,0x10,0x6c,0x2c, - 1, - 17}; -const int head2_1[] = {0x4f,0x67,0x67,0x53,0,0x04, - 0x07,0x18,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x02,0x03,0x04,1,0,0,0, - 0x89,0x33,0x85,0xce, - 13, - 254,255,0,255,1,255,245,255,255,0, - 255,255,90}; - -/* nil packets; beginning,middle,end */ -const int head1_2[] = {0x4f,0x67,0x67,0x53,0,0x02, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x02,0x03,0x04,0,0,0,0, - 0xff,0x7b,0x23,0x17, - 1, - 0}; -const int head2_2[] = {0x4f,0x67,0x67,0x53,0,0x04, - 0x07,0x28,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x02,0x03,0x04,1,0,0,0, - 0x5c,0x3f,0x66,0xcb, - 17, - 17,254,255,0,0,255,1,0,255,245,255,255,0, - 255,255,90,0}; - -/* large initial packet */ -const int head1_3[] = {0x4f,0x67,0x67,0x53,0,0x02, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x02,0x03,0x04,0,0,0,0, - 0x01,0x27,0x31,0xaa, - 18, - 255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255,255,10}; - -const int head2_3[] = {0x4f,0x67,0x67,0x53,0,0x04, - 0x07,0x08,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x02,0x03,0x04,1,0,0,0, - 0x7f,0x4e,0x8a,0xd2, - 4, - 255,4,255,0}; - - -/* continuing packet test */ -const int head1_4[] = {0x4f,0x67,0x67,0x53,0,0x02, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x02,0x03,0x04,0,0,0,0, - 0xff,0x7b,0x23,0x17, - 1, - 0}; - -const int head2_4[] = {0x4f,0x67,0x67,0x53,0,0x00, - 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x02,0x03,0x04,1,0,0,0, - 0x34,0x24,0xd5,0x29, - 17, - 255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255,255}; - -const int head3_4[] = {0x4f,0x67,0x67,0x53,0,0x05, - 0x07,0x0c,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x02,0x03,0x04,2,0,0,0, - 0xc8,0xc3,0xcb,0xed, - 5, - 10,255,4,255,0}; - - -/* page with the 255 segment limit */ -const int head1_5[] = {0x4f,0x67,0x67,0x53,0,0x02, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x02,0x03,0x04,0,0,0,0, - 0xff,0x7b,0x23,0x17, - 1, - 0}; - -const int head2_5[] = {0x4f,0x67,0x67,0x53,0,0x00, - 0x07,0xfc,0x03,0x00,0x00,0x00,0x00,0x00, - 0x01,0x02,0x03,0x04,1,0,0,0, - 0xed,0x2a,0x2e,0xa7, - 255, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10}; - -const int head3_5[] = {0x4f,0x67,0x67,0x53,0,0x04, - 0x07,0x00,0x04,0x00,0x00,0x00,0x00,0x00, - 0x01,0x02,0x03,0x04,2,0,0,0, - 0x6c,0x3b,0x82,0x3d, - 1, - 50}; - - -/* packet that overspans over an entire page */ -const int head1_6[] = {0x4f,0x67,0x67,0x53,0,0x02, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x02,0x03,0x04,0,0,0,0, - 0xff,0x7b,0x23,0x17, - 1, - 0}; - -const int head2_6[] = {0x4f,0x67,0x67,0x53,0,0x00, - 0x07,0x04,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x02,0x03,0x04,1,0,0,0, - 0x3c,0xd9,0x4d,0x3f, - 17, - 100,255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255}; - -const int head3_6[] = {0x4f,0x67,0x67,0x53,0,0x01, - 0x07,0x04,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x02,0x03,0x04,2,0,0,0, - 0xbd,0xd5,0xb5,0x8b, - 17, - 255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255,255}; - -const int head4_6[] = {0x4f,0x67,0x67,0x53,0,0x05, - 0x07,0x10,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x02,0x03,0x04,3,0,0,0, - 0xef,0xdd,0x88,0xde, - 7, - 255,255,75,255,4,255,0}; - -/* packet that overspans over an entire page */ -const int head1_7[] = {0x4f,0x67,0x67,0x53,0,0x02, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x02,0x03,0x04,0,0,0,0, - 0xff,0x7b,0x23,0x17, - 1, - 0}; - -const int head2_7[] = {0x4f,0x67,0x67,0x53,0,0x00, - 0x07,0x04,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x02,0x03,0x04,1,0,0,0, - 0x3c,0xd9,0x4d,0x3f, - 17, - 100,255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255}; - -const int head3_7[] = {0x4f,0x67,0x67,0x53,0,0x05, - 0x07,0x08,0x00,0x00,0x00,0x00,0x00,0x00, - 0x01,0x02,0x03,0x04,2,0,0,0, - 0xd4,0xe0,0x60,0xe5, - 1,0}; - -void test_pack(const int *pl, const int **headers){ - unsigned char *data=malloc(1024*1024); /* for scripted test cases only */ - long inptr=0; - long outptr=0; - long deptr=0; - long depacket=0; - long pcm_pos=7; - int i,j,packets,pageno=0,pageout=0; - int eosflag=0; - int bosflag=0; - - ogg_stream_reset(&os_en); - ogg_stream_reset(&os_de); - ogg_sync_reset(&oy); - - for(packets=0;;packets++)if(pl[packets]==-1)break; - - for(i=0;i<packets;i++){ - /* construct a test packet */ - ogg_packet op; - int len=pl[i]; - - op.packet=data+inptr; - op.bytes=len; - op.e_o_s=(pl[i+1]<0?1:0); - op.frameno=pcm_pos; - - pcm_pos+=1024; - - for(j=0;j<len;j++)data[inptr++]=i+j; - - /* submit the test packet */ - ogg_stream_packetin(&os_en,&op); - - /* retrieve any finished pages */ - { - ogg_page og; - - while(ogg_stream_pageout(&os_en,&og)){ - /* We have a page. Check it carefully */ - - fprintf(stderr,"%d, ",pageno); - - if(headers[pageno]==NULL){ - fprintf(stderr,"coded too many pages!\n"); - exit(1); - } - - check_page(data+outptr,headers[pageno],&og); - - outptr+=og.body_len; - pageno++; - - /* have a complete page; submit it to sync/decode */ - - { - ogg_page og_de; - ogg_packet op_de; - char *buf=ogg_sync_buffer(&oy,og.header_len+og.body_len); - memcpy(buf,og.header,og.header_len); - memcpy(buf+og.header_len,og.body,og.body_len); - ogg_sync_wrote(&oy,og.header_len+og.body_len); - - while(ogg_sync_pageout(&oy,&og_de)>0){ - /* got a page. Happy happy. Verify that it's good. */ - - check_page(data+deptr,headers[pageout],&og_de); - deptr+=og_de.body_len; - pageout++; - - /* submit it to deconstitution */ - ogg_stream_pagein(&os_de,&og_de); - - /* packets out? */ - while(ogg_stream_packetout(&os_de,&op_de)>0){ - - /* verify the packet! */ - /* check data */ - if(memcmp(data+depacket,op_de.packet,op_de.bytes)){ - fprintf(stderr,"packet data mismatch in decode! pos=%ld\n", - depacket); - exit(1); - } - /* check bos flag */ - if(bosflag==0 && op_de.b_o_s==0){ - fprintf(stderr,"b_o_s flag not set on packet!\n"); - exit(1); - } - if(bosflag && op_de.b_o_s){ - fprintf(stderr,"b_o_s flag incorrectly set on packet!\n"); - exit(1); - } - bosflag=1; - depacket+=op_de.bytes; - - /* check eos flag */ - if(eosflag){ - fprintf(stderr,"Multiple decoded packets with eos flag!\n"); - exit(1); - } - - if(op_de.e_o_s)eosflag=1; - - /* check pcmpos flag */ - if(op_de.frameno!=-1){ - fprintf(stderr," pcm:%ld ",(long)op_de.frameno); - } - } - } - } - } - } - } - free(data); - if(headers[pageno]!=NULL){ - fprintf(stderr,"did not write last page!\n"); - exit(1); - } - if(headers[pageout]!=NULL){ - fprintf(stderr,"did not decode last page!\n"); - exit(1); - } - if(inptr!=outptr){ - fprintf(stderr,"encoded page data incomplete!\n"); - exit(1); - } - if(inptr!=deptr){ - fprintf(stderr,"decoded page data incomplete!\n"); - exit(1); - } - if(inptr!=depacket){ - fprintf(stderr,"decoded packet data incomplete!\n"); - exit(1); - } - if(!eosflag){ - fprintf(stderr,"Never got a packet with EOS set!\n"); - exit(1); - } - fprintf(stderr,"ok.\n"); -} - -int main(void){ - - ogg_stream_init(&os_en,0x04030201); - ogg_stream_init(&os_de,0x04030201); - ogg_sync_init(&oy); - - /* Exercise each code path in the framing code. Also verify that - the checksums are working. */ - - { - /* 17 only */ - const int packets[]={17, -1}; - const int *headret[]={head1_0,NULL}; - - fprintf(stderr,"testing single page encoding... "); - test_pack(packets,headret); - } - - { - /* 17, 254, 255, 256, 500, 510, 600 byte, pad */ - const int packets[]={17, 254, 255, 256, 500, 510, 600, -1}; - const int *headret[]={head1_1,head2_1,NULL}; - - fprintf(stderr,"testing basic page encoding... "); - test_pack(packets,headret); - } - - { - /* nil packets; beginning,middle,end */ - const int packets[]={0,17, 254, 255, 0, 256, 0, 500, 510, 600, 0, -1}; - const int *headret[]={head1_2,head2_2,NULL}; - - fprintf(stderr,"testing basic nil packets... "); - test_pack(packets,headret); - } - - { - /* large initial packet */ - const int packets[]={4345,259,255,-1}; - const int *headret[]={head1_3,head2_3,NULL}; - - fprintf(stderr,"testing initial-packet lacing > 4k... "); - test_pack(packets,headret); - } - - { - /* continuing packet test */ - const int packets[]={0,4345,259,255,-1}; - const int *headret[]={head1_4,head2_4,head3_4,NULL}; - - fprintf(stderr,"testing single packet page span... "); - test_pack(packets,headret); - } - - /* page with the 255 segment limit */ - { - - const int packets[]={0,10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,10, - 10,10,10,10,10,10,10,50,-1}; - const int *headret[]={head1_5,head2_5,head3_5,NULL}; - - fprintf(stderr,"testing max packet segments... "); - test_pack(packets,headret); - } - - { - /* packet that overspans over an entire page */ - const int packets[]={0,100,9000,259,255,-1}; - const int *headret[]={head1_6,head2_6,head3_6,head4_6,NULL}; - - fprintf(stderr,"testing very large packets... "); - test_pack(packets,headret); - } - - { - /* term only page. why not? */ - const int packets[]={0,100,4080,-1}; - const int *headret[]={head1_7,head2_7,head3_7,NULL}; - - fprintf(stderr,"testing zero data page (1 nil packet)... "); - test_pack(packets,headret); - } - - - - { - /* build a bunch of pages for testing */ - unsigned char *data=malloc(1024*1024); - int pl[]={0,100,4079,2956,2057,76,34,912,0,234,1000,1000,1000,300,-1}; - int inptr=0,i,j; - ogg_page og[5]; - - ogg_stream_reset(&os_en); - - for(i=0;pl[i]!=-1;i++){ - ogg_packet op; - int len=pl[i]; - - op.packet=data+inptr; - op.bytes=len; - op.e_o_s=(pl[i+1]<0?1:0); - op.frameno=(i+1)*1000; - - for(j=0;j<len;j++)data[inptr++]=i+j; - ogg_stream_packetin(&os_en,&op); - } - - free(data); - - /* retrieve finished pages */ - for(i=0;i<5;i++){ - if(ogg_stream_pageout(&os_en,&og[i])==0){ - fprintf(stderr,"Too few pages output building sync tests!\n"); - exit(1); - } - copy_page(&og[i]); - } - - /* Test lost pages on pagein/packetout: no rollback */ - { - ogg_page temp; - ogg_packet test; - - fprintf(stderr,"Testing loss of pages... "); - - ogg_sync_reset(&oy); - ogg_stream_reset(&os_de); - for(i=0;i<5;i++){ - memcpy(ogg_sync_buffer(&oy,og[i].header_len),og[i].header, - og[i].header_len); - ogg_sync_wrote(&oy,og[i].header_len); - memcpy(ogg_sync_buffer(&oy,og[i].body_len),og[i].body,og[i].body_len); - ogg_sync_wrote(&oy,og[i].body_len); - } - - ogg_sync_pageout(&oy,&temp); - ogg_stream_pagein(&os_de,&temp); - ogg_sync_pageout(&oy,&temp); - ogg_stream_pagein(&os_de,&temp); - ogg_sync_pageout(&oy,&temp); - /* skip */ - ogg_sync_pageout(&oy,&temp); - ogg_stream_pagein(&os_de,&temp); - - /* do we get the expected results/packets? */ - - if(ogg_stream_packetout(&os_de,&test)!=1)error(); - checkpacket(&test,0,0,0); - if(ogg_stream_packetout(&os_de,&test)!=1)error(); - checkpacket(&test,100,1,-1); - if(ogg_stream_packetout(&os_de,&test)!=1)error(); - checkpacket(&test,4079,2,3000); - if(ogg_stream_packetout(&os_de,&test)!=-1){ - fprintf(stderr,"Error: loss of page did not return error\n"); - exit(1); - } - if(ogg_stream_packetout(&os_de,&test)!=1)error(); - checkpacket(&test,76,5,-1); - if(ogg_stream_packetout(&os_de,&test)!=1)error(); - checkpacket(&test,34,6,-1); - fprintf(stderr,"ok.\n"); - } - - /* Test lost pages on pagein/packetout: rollback with continuation */ - { - ogg_page temp; - ogg_packet test; - - fprintf(stderr,"Testing loss of pages (rollback required)... "); - - ogg_sync_reset(&oy); - ogg_stream_reset(&os_de); - for(i=0;i<5;i++){ - memcpy(ogg_sync_buffer(&oy,og[i].header_len),og[i].header, - og[i].header_len); - ogg_sync_wrote(&oy,og[i].header_len); - memcpy(ogg_sync_buffer(&oy,og[i].body_len),og[i].body,og[i].body_len); - ogg_sync_wrote(&oy,og[i].body_len); - } - - ogg_sync_pageout(&oy,&temp); - ogg_stream_pagein(&os_de,&temp); - ogg_sync_pageout(&oy,&temp); - ogg_stream_pagein(&os_de,&temp); - ogg_sync_pageout(&oy,&temp); - ogg_stream_pagein(&os_de,&temp); - ogg_sync_pageout(&oy,&temp); - /* skip */ - ogg_sync_pageout(&oy,&temp); - ogg_stream_pagein(&os_de,&temp); - - /* do we get the expected results/packets? */ - - if(ogg_stream_packetout(&os_de,&test)!=1)error(); - checkpacket(&test,0,0,0); - if(ogg_stream_packetout(&os_de,&test)!=1)error(); - checkpacket(&test,100,1,-1); - if(ogg_stream_packetout(&os_de,&test)!=1)error(); - checkpacket(&test,4079,2,3000); - if(ogg_stream_packetout(&os_de,&test)!=1)error(); - checkpacket(&test,2956,3,4000); - if(ogg_stream_packetout(&os_de,&test)!=-1){ - fprintf(stderr,"Error: loss of page did not return error\n"); - exit(1); - } - if(ogg_stream_packetout(&os_de,&test)!=1)error(); - checkpacket(&test,300,13,14000); - fprintf(stderr,"ok.\n"); - } - - /* the rest only test sync */ - { - ogg_page og_de; - /* Test fractional page inputs: incomplete capture */ - fprintf(stderr,"Testing sync on partial inputs... "); - ogg_sync_reset(&oy); - memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header, - 3); - ogg_sync_wrote(&oy,3); - if(ogg_sync_pageout(&oy,&og_de)>0)error(); - - /* Test fractional page inputs: incomplete fixed header */ - memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header+3, - 20); - ogg_sync_wrote(&oy,20); - if(ogg_sync_pageout(&oy,&og_de)>0)error(); - - /* Test fractional page inputs: incomplete header */ - memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header+23, - 5); - ogg_sync_wrote(&oy,5); - if(ogg_sync_pageout(&oy,&og_de)>0)error(); - - /* Test fractional page inputs: incomplete body */ - - memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header+28, - og[1].header_len-28); - ogg_sync_wrote(&oy,og[1].header_len-28); - if(ogg_sync_pageout(&oy,&og_de)>0)error(); - - memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body,1000); - ogg_sync_wrote(&oy,1000); - if(ogg_sync_pageout(&oy,&og_de)>0)error(); - - memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body+1000, - og[1].body_len-1000); - ogg_sync_wrote(&oy,og[1].body_len-1000); - if(ogg_sync_pageout(&oy,&og_de)<=0)error(); - - fprintf(stderr,"ok.\n"); - } - - /* Test fractional page inputs: page + incomplete capture */ - { - ogg_page og_de; - fprintf(stderr,"Testing sync on 1+partial inputs... "); - ogg_sync_reset(&oy); - - memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header, - og[1].header_len); - ogg_sync_wrote(&oy,og[1].header_len); - - memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body, - og[1].body_len); - ogg_sync_wrote(&oy,og[1].body_len); - - memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header, - 20); - ogg_sync_wrote(&oy,20); - if(ogg_sync_pageout(&oy,&og_de)<=0)error(); - if(ogg_sync_pageout(&oy,&og_de)>0)error(); - - memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header+20, - og[1].header_len-20); - ogg_sync_wrote(&oy,og[1].header_len-20); - memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body, - og[1].body_len); - ogg_sync_wrote(&oy,og[1].body_len); - if(ogg_sync_pageout(&oy,&og_de)<=0)error(); - - fprintf(stderr,"ok.\n"); - } - - /* Test recapture: garbage + page */ - { - ogg_page og_de; - fprintf(stderr,"Testing search for capture... "); - ogg_sync_reset(&oy); - - /* 'garbage' */ - memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body, - og[1].body_len); - ogg_sync_wrote(&oy,og[1].body_len); - - memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header, - og[1].header_len); - ogg_sync_wrote(&oy,og[1].header_len); - - memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body, - og[1].body_len); - ogg_sync_wrote(&oy,og[1].body_len); - - memcpy(ogg_sync_buffer(&oy,og[2].header_len),og[2].header, - 20); - ogg_sync_wrote(&oy,20); - if(ogg_sync_pageout(&oy,&og_de)>0)error(); - if(ogg_sync_pageout(&oy,&og_de)<=0)error(); - if(ogg_sync_pageout(&oy,&og_de)>0)error(); - - memcpy(ogg_sync_buffer(&oy,og[2].header_len),og[2].header+20, - og[2].header_len-20); - ogg_sync_wrote(&oy,og[2].header_len-20); - memcpy(ogg_sync_buffer(&oy,og[2].body_len),og[2].body, - og[2].body_len); - ogg_sync_wrote(&oy,og[2].body_len); - if(ogg_sync_pageout(&oy,&og_de)<=0)error(); - - fprintf(stderr,"ok.\n"); - } - - /* Test recapture: page + garbage + page */ - { - ogg_page og_de; - fprintf(stderr,"Testing recapture... "); - ogg_sync_reset(&oy); - - memcpy(ogg_sync_buffer(&oy,og[1].header_len),og[1].header, - og[1].header_len); - ogg_sync_wrote(&oy,og[1].header_len); - - memcpy(ogg_sync_buffer(&oy,og[1].body_len),og[1].body, - og[1].body_len); - ogg_sync_wrote(&oy,og[1].body_len); - - memcpy(ogg_sync_buffer(&oy,og[2].header_len),og[2].header, - og[2].header_len); - ogg_sync_wrote(&oy,og[2].header_len); - - memcpy(ogg_sync_buffer(&oy,og[2].header_len),og[2].header, - og[2].header_len); - ogg_sync_wrote(&oy,og[2].header_len); - - if(ogg_sync_pageout(&oy,&og_de)<=0)error(); - - memcpy(ogg_sync_buffer(&oy,og[2].body_len),og[2].body, - og[2].body_len-5); - ogg_sync_wrote(&oy,og[2].body_len-5); - - memcpy(ogg_sync_buffer(&oy,og[3].header_len),og[3].header, - og[3].header_len); - ogg_sync_wrote(&oy,og[3].header_len); - - memcpy(ogg_sync_buffer(&oy,og[3].body_len),og[3].body, - og[3].body_len); - ogg_sync_wrote(&oy,og[3].body_len); - - if(ogg_sync_pageout(&oy,&og_de)>0)error(); - if(ogg_sync_pageout(&oy,&og_de)<=0)error(); - - fprintf(stderr,"ok.\n"); - } - } - - return(0); -} - -#endif - - - - diff --git a/lib/iir.c b/lib/iir.c deleted file mode 100644 index b4a7a9e0..00000000 --- a/lib/iir.c +++ /dev/null @@ -1,302 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: Direct Form I, II IIR filters, plus some specializations - last mod: $Id: iir.c,v 1.1 2000/07/12 09:36:18 xiphmont Exp $ - - ********************************************************************/ - -/* LPC is actually a degenerate case of form I/II filters, but we need - both */ - -#include <stdlib.h> -#include <string.h> -#include <math.h> -#include "iir.h" - -void IIR_init(IIR_state *s,int stages,double gain, double *A, double *B){ - memset(s,0,sizeof(IIR_state)); - s->stages=stages; - s->gain=gain; - s->coeff_A=malloc(stages*sizeof(double)); - s->coeff_B=malloc((stages+1)*sizeof(double)); - s->z_A=calloc(stages*2,sizeof(double)); - s->z_B=calloc(stages*2,sizeof(double)); - - memcpy(s->coeff_A,A,stages*sizeof(double)); - memcpy(s->coeff_B,B,(stages+1)*sizeof(double)); -} - -void IIR_clear(IIR_state *s){ - if(s){ - free(s->coeff_A); - free(s->coeff_B); - free(s->z_A); - free(s->z_B); - memset(s,0,sizeof(IIR_state)); - } -} - -double IIR_filter(IIR_state *s,double in){ - int stages=s->stages,i; - double newA; - double newB=0; - double *zA=s->z_A+s->ring; - - newA=in/=s->gain; - for(i=0;i<stages;i++){ - newA+= s->coeff_A[i] * zA[i]; - newB+= s->coeff_B[i] * zA[i]; - } - newB+=newA*s->coeff_B[stages]; - - zA[0]=zA[stages]=newA; - if(++s->ring>=stages)s->ring=0; - - return(newB); -} - -/* this assumes the symmetrical structure of the feed-forward stage of - a Chebyshev bandpass to save multiplies */ -double IIR_filter_ChebBand(IIR_state *s,double in){ - int stages=s->stages,i; - double newA; - double newB=0; - double *zA=s->z_A+s->ring; - - newA=in/=s->gain; - - newA+= s->coeff_A[0] * zA[0]; - for(i=1;i<(stages>>1);i++){ - newA+= s->coeff_A[i] * zA[i]; - newB+= s->coeff_B[i] * (zA[i]-zA[stages-i]); - } - newB+= s->coeff_B[i] * zA[i]; - for(;i<stages;i++) - newA+= s->coeff_A[i] * zA[i]; - - newB+= newA-zA[0]; - - zA[0]=zA[stages]=newA; - if(++s->ring>=stages)s->ring=0; - - return(newB); -} - -#ifdef _V_SELFTEST - -/* z^-stage, z^-stage+1... */ -static double cheb_bandpass_B[]={-1.,0.,5.,0.,-10.,0.,10.,0.,-5.,0.,1}; -static double cheb_bandpass_A[]={-0.6665900311, - 1.0070146601, - -3.1262875409, - 3.5017171569, - -6.2779211945, - 5.2966481740, - -6.7570216587, - 4.0760335768, - -3.9134284363, - 1.3997338886}; - -static double data[128]={ - 0.0426331, - 0.0384521, - 0.0345764, - 0.0346069, - 0.0314636, - 0.0310059, - 0.0318604, - 0.0336304, - 0.036438, - 0.0348511, - 0.0354919, - 0.0343628, - 0.0325623, - 0.0318909, - 0.0263367, - 0.0225525, - 0.0195618, - 0.0160828, - 0.0168762, - 0.0145569, - 0.0126343, - 0.0127258, - 0.00820923, - 0.00787354, - 0.00558472, - 0.00204468, - 3.05176e-05, - -0.00357056, - -0.00570679, - -0.00991821, - -0.0101013, - -0.00881958, - -0.0108948, - -0.0110168, - -0.0119324, - -0.0161438, - -0.0194702, - -0.0229187, - -0.0260315, - -0.0282288, - -0.0306091, - -0.0330505, - -0.0364685, - -0.0385742, - -0.0428772, - -0.043457, - -0.0425415, - -0.0462341, - -0.0467529, - -0.0489807, - -0.0520325, - -0.0558167, - -0.0596924, - -0.0591431, - -0.0612793, - -0.0618591, - -0.0615845, - -0.0634155, - -0.0639648, - -0.0683594, - -0.0718079, - -0.0729675, - -0.0791931, - -0.0860901, - -0.0885315, - -0.088623, - -0.089386, - -0.0899353, - -0.0886841, - -0.0910645, - -0.0948181, - -0.0919495, - -0.0891418, - -0.0916443, - -0.096344, - -0.100464, - -0.105499, - -0.108612, - -0.112213, - -0.117676, - -0.120911, - -0.124329, - -0.122162, - -0.120605, - -0.12326, - -0.12619, - -0.128998, - -0.13205, - -0.134247, - -0.137939, - -0.143555, - -0.14389, - -0.14859, - -0.153717, - -0.159851, - -0.164551, - -0.162811, - -0.164276, - -0.156952, - -0.140564, - -0.123291, - -0.10321, - -0.0827637, - -0.0652466, - -0.053772, - -0.0509949, - -0.0577698, - -0.0818176, - -0.114929, - -0.148895, - -0.181122, - -0.200714, - -0.21048, - -0.203644, - -0.179413, - -0.145325, - -0.104492, - -0.0658264, - -0.0332031, - -0.0106201, - -0.00363159, - -0.00909424, - -0.0244141, - -0.0422058, - -0.0537415, - -0.0610046, - -0.0609741, - -0.0547791}; - -/* comparison test code from http://www-users.cs.york.ac.uk/~fisher/mkfilter/ - (the above page kicks ass, BTW)*/ - -#define NZEROS 10 -#define NPOLES 10 -#define GAIN 4.599477515e+02 - -static float xv[NZEROS+1], yv[NPOLES+1]; - -static double filterloop(double next){ - xv[0] = xv[1]; xv[1] = xv[2]; xv[2] = xv[3]; xv[3] = xv[4]; xv[4] = xv[5]; - xv[5] = xv[6]; xv[6] = xv[7]; xv[7] = xv[8]; xv[8] = xv[9]; xv[9] = xv[10]; - xv[10] = next / GAIN; - yv[0] = yv[1]; yv[1] = yv[2]; yv[2] = yv[3]; yv[3] = yv[4]; yv[4] = yv[5]; - yv[5] = yv[6]; yv[6] = yv[7]; yv[7] = yv[8]; yv[8] = yv[9]; yv[9] = yv[10]; - yv[10] = (xv[10] - xv[0]) + 5 * (xv[2] - xv[8]) + 10 * (xv[6] - xv[4]) - + ( -0.6665900311 * yv[0]) + ( 1.0070146601 * yv[1]) - + ( -3.1262875409 * yv[2]) + ( 3.5017171569 * yv[3]) - + ( -6.2779211945 * yv[4]) + ( 5.2966481740 * yv[5]) - + ( -6.7570216587 * yv[6]) + ( 4.0760335768 * yv[7]) - + ( -3.9134284363 * yv[8]) + ( 1.3997338886 * yv[9]); - return(yv[10]); -} - -#include <stdio.h> -int main(){ - - /* run the pregenerated Chebyshev filter, then our own distillation - through the generic and specialized code */ - double *work=malloc(128*sizeof(double)); - IIR_state iir; - int i; - - for(i=0;i<128;i++)work[i]=filterloop(data[i]); - { - FILE *out=fopen("IIR_ref.m","w"); - for(i=0;i<128;i++)fprintf(out,"%g\n",work[i]); - fclose(out); - } - - IIR_init(&iir,NPOLES,GAIN,cheb_bandpass_A,cheb_bandpass_B); - for(i=0;i<128;i++)work[i]=IIR_filter(&iir,data[i]); - { - FILE *out=fopen("IIR_gen.m","w"); - for(i=0;i<128;i++)fprintf(out,"%g\n",work[i]); - fclose(out); - } - IIR_clear(&iir); - - IIR_init(&iir,NPOLES,GAIN,cheb_bandpass_A,cheb_bandpass_B); - for(i=0;i<128;i++)work[i]=IIR_filter_ChebBand(&iir,data[i]); - { - FILE *out=fopen("IIR_cheb.m","w"); - for(i=0;i<128;i++)fprintf(out,"%g\n",work[i]); - fclose(out); - } - IIR_clear(&iir); - - return(0); -} - -#endif diff --git a/lib/iir.h b/lib/iir.h deleted file mode 100644 index 22e10dba..00000000 --- a/lib/iir.h +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: Direct Form I, II IIR filters, plus some specializations - last mod: $Id: iir.h,v 1.1 2000/07/12 09:36:18 xiphmont Exp $ - - ********************************************************************/ - -#ifndef _V_IIR_H_ -#define _V_IIR_H_ - -typedef struct { - int stages; - double *coeff_A; - double *coeff_B; - double *z_A; - double *z_B; - int ring; - double gain; -} IIR_state; - -void IIR_init(IIR_state *s,int stages,double gain, double *A, double *B); -void IIR_clear(IIR_state *s); -double IIR_filter(IIR_state *s,double in); -double IIR_filter_ChebBand(IIR_state *s,double in); - -#endif diff --git a/lib/info.c b/lib/info.c deleted file mode 100644 index 410a6c31..00000000 --- a/lib/info.c +++ /dev/null @@ -1,558 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: maintain the info structure, info <-> header packets - last mod: $Id: info.c,v 1.30 2000/08/15 09:09:43 xiphmont Exp $ - - ********************************************************************/ - -/* general handling of the header and the vorbis_info structure (and - substructures) */ - -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#include "vorbis/codec.h" -#include "vorbis/backends.h" -#include "bitwise.h" -#include "sharedbook.h" -#include "bookinternal.h" -#include "registry.h" -#include "window.h" -#include "psy.h" -#include "misc.h" -#include "os.h" - -/* helpers */ -static int ilog2(unsigned int v){ - int ret=0; - while(v>1){ - ret++; - v>>=1; - } - return(ret); -} - -static void _v_writestring(oggpack_buffer *o,char *s){ - while(*s){ - _oggpack_write(o,*s++,8); - } -} - -static void _v_readstring(oggpack_buffer *o,char *buf,int bytes){ - while(bytes--){ - *buf++=_oggpack_read(o,8); - } -} - -void vorbis_comment_init(vorbis_comment *vc){ - memset(vc,0,sizeof(vorbis_comment)); -} - -void vorbis_comment_add(vorbis_comment *vc,char *comment){ - vc->user_comments=realloc(vc->user_comments, - (vc->comments+2)*sizeof(char *)); - vc->comment_lengths=realloc(vc->comment_lengths, - (vc->comments+2)*sizeof(int)); - vc->user_comments[vc->comments]=strdup(comment); - vc->comment_lengths[vc->comments]=strlen(comment); - vc->comments++; - vc->user_comments[vc->comments]=NULL; -} - -void vorbis_comment_add_tag(vorbis_comment *vc, char *tag, char *contents){ - char *comment=alloca(strlen(tag)+strlen(contents)+2); /* +2 for = and \0 */ - strcpy(comment, tag); - strcat(comment, "="); - strcat(comment, contents); - vorbis_comment_add(vc, comment); -} - -/* This is more or less the same as strncasecmp - but that doesn't exist - * everywhere, and this is a fairly trivial function, so we include it */ -static int tagcompare(const char *s1, const char *s2, int n){ - int c=0; - while(c < n){ - if(toupper(s1[c]) != toupper(s2[c])) - return !0; - c++; - } - return 0; -} - -char *vorbis_comment_query(vorbis_comment *vc, char *tag, int count){ - long i; - int found = 0; - int taglen = strlen(tag)+1; /* +1 for the = we append */ - char *fulltag = alloca(taglen+ 1); - - strcpy(fulltag, tag); - strcat(fulltag, "="); - - for(i=0;i<vc->comments;i++){ - if(!tagcompare(vc->user_comments[i], fulltag, taglen)){ - if(count == found) - /* We return a pointer to the data, not a copy */ - return vc->user_comments[i] + taglen; - else - found++; - } - } - return NULL; /* didn't find anything */ -} - -int vorbis_comment_query_count(vorbis_comment *vc, char *tag){ - int i,count=0; - int taglen = strlen(tag)+1; /* +1 for the = we append */ - char *fulltag = alloca(taglen+1); - strcpy(fulltag,tag); - strcat(fulltag, "="); - - for(i=0;i<vc->comments;i++){ - if(!tagcompare(vc->user_comments[i], fulltag, taglen)) - count++; - } - - return count; -} - -void vorbis_comment_clear(vorbis_comment *vc){ - if(vc){ - long i; - for(i=0;i<vc->comments;i++) - if(vc->user_comments[i])free(vc->user_comments[i]); - if(vc->user_comments)free(vc->user_comments); - if(vc->comment_lengths)free(vc->comment_lengths); - if(vc->vendor)free(vc->vendor); - } - memset(vc,0,sizeof(vorbis_comment)); -} - -/* used by synthesis, which has a full, alloced vi */ -void vorbis_info_init(vorbis_info *vi){ - memset(vi,0,sizeof(vorbis_info)); -} - -void vorbis_info_clear(vorbis_info *vi){ - int i; - - for(i=0;i<vi->modes;i++) - if(vi->mode_param[i])free(vi->mode_param[i]); - /*if(vi->mode_param)free(vi->mode_param);*/ - - for(i=0;i<vi->maps;i++) /* unpack does the range checking */ - _mapping_P[vi->map_type[i]]->free_info(vi->map_param[i]); - /*if(vi->map_param)free(vi->map_param);*/ - - for(i=0;i<vi->times;i++) /* unpack does the range checking */ - _time_P[vi->time_type[i]]->free_info(vi->time_param[i]); - /*if(vi->time_param)free(vi->time_param);*/ - - for(i=0;i<vi->floors;i++) /* unpack does the range checking */ - _floor_P[vi->floor_type[i]]->free_info(vi->floor_param[i]); - /*if(vi->floor_param)free(vi->floor_param);*/ - - for(i=0;i<vi->residues;i++) /* unpack does the range checking */ - _residue_P[vi->residue_type[i]]->free_info(vi->residue_param[i]); - /*if(vi->residue_param)free(vi->residue_param);*/ - - /* the static codebooks *are* freed if you call info_clear, because - decode side does alloc a 'static' codebook. Calling clear on the - full codebook does not clear the static codebook (that's our - responsibility) */ - for(i=0;i<vi->books;i++){ - /* just in case the decoder pre-cleared to save space */ - if(vi->book_param[i]){ - vorbis_staticbook_clear(vi->book_param[i]); - free(vi->book_param[i]); - } - } - /*if(vi->book_param)free(vi->book_param);*/ - - for(i=0;i<vi->psys;i++) - _vi_psy_free(vi->psy_param[i]); - /*if(vi->psy_param)free(vi->psy_param);*/ - - memset(vi,0,sizeof(vorbis_info)); -} - -/* Header packing/unpacking ********************************************/ - -static int _vorbis_unpack_info(vorbis_info *vi,oggpack_buffer *opb){ - vi->version=_oggpack_read(opb,32); - if(vi->version!=0)return(-1); - - vi->channels=_oggpack_read(opb,8); - vi->rate=_oggpack_read(opb,32); - - vi->bitrate_upper=_oggpack_read(opb,32); - vi->bitrate_nominal=_oggpack_read(opb,32); - vi->bitrate_lower=_oggpack_read(opb,32); - - vi->blocksizes[0]=1<<_oggpack_read(opb,4); - vi->blocksizes[1]=1<<_oggpack_read(opb,4); - - if(vi->rate<1)goto err_out; - if(vi->channels<1)goto err_out; - if(vi->blocksizes[0]<8)goto err_out; - if(vi->blocksizes[1]<vi->blocksizes[0])goto err_out; - - if(_oggpack_read(opb,1)!=1)goto err_out; /* EOP check */ - - return(0); - err_out: - vorbis_info_clear(vi); - return(-1); -} - -static int _vorbis_unpack_comment(vorbis_comment *vc,oggpack_buffer *opb){ - int i; - int vendorlen=_oggpack_read(opb,32); - if(vendorlen<0)goto err_out; - vc->vendor=calloc(vendorlen+1,1); - _v_readstring(opb,vc->vendor,vendorlen); - vc->comments=_oggpack_read(opb,32); - if(vc->comments<0)goto err_out; - vc->user_comments=calloc(vc->comments+1,sizeof(char **)); - vc->comment_lengths=calloc(vc->comments+1, sizeof(int)); - - for(i=0;i<vc->comments;i++){ - int len=_oggpack_read(opb,32); - if(len<0)goto err_out; - vc->comment_lengths[i]=len; - vc->user_comments[i]=calloc(len+1,1); - _v_readstring(opb,vc->user_comments[i],len); - } - if(_oggpack_read(opb,1)!=1)goto err_out; /* EOP check */ - - return(0); - err_out: - vorbis_comment_clear(vc); - return(-1); -} - -/* all of the real encoding details are here. The modes, books, - everything */ -static int _vorbis_unpack_books(vorbis_info *vi,oggpack_buffer *opb){ - int i; - - /* codebooks */ - vi->books=_oggpack_read(opb,8)+1; - /*vi->book_param=calloc(vi->books,sizeof(static_codebook *));*/ - for(i=0;i<vi->books;i++){ - vi->book_param[i]=calloc(1,sizeof(static_codebook)); - if(vorbis_staticbook_unpack(opb,vi->book_param[i]))goto err_out; - } - - /* time backend settings */ - vi->times=_oggpack_read(opb,6)+1; - /*vi->time_type=malloc(vi->times*sizeof(int));*/ - /*vi->time_param=calloc(vi->times,sizeof(void *));*/ - for(i=0;i<vi->times;i++){ - vi->time_type[i]=_oggpack_read(opb,16); - if(vi->time_type[i]<0 || vi->time_type[i]>=VI_TIMEB)goto err_out; - vi->time_param[i]=_time_P[vi->time_type[i]]->unpack(vi,opb); - if(!vi->time_param[i])goto err_out; - } - - /* floor backend settings */ - vi->floors=_oggpack_read(opb,6)+1; - /*vi->floor_type=malloc(vi->floors*sizeof(int));*/ - /*vi->floor_param=calloc(vi->floors,sizeof(void *));*/ - for(i=0;i<vi->floors;i++){ - vi->floor_type[i]=_oggpack_read(opb,16); - if(vi->floor_type[i]<0 || vi->floor_type[i]>=VI_FLOORB)goto err_out; - vi->floor_param[i]=_floor_P[vi->floor_type[i]]->unpack(vi,opb); - if(!vi->floor_param[i])goto err_out; - } - - /* residue backend settings */ - vi->residues=_oggpack_read(opb,6)+1; - /*vi->residue_type=malloc(vi->residues*sizeof(int));*/ - /*vi->residue_param=calloc(vi->residues,sizeof(void *));*/ - for(i=0;i<vi->residues;i++){ - vi->residue_type[i]=_oggpack_read(opb,16); - if(vi->residue_type[i]<0 || vi->residue_type[i]>=VI_RESB)goto err_out; - vi->residue_param[i]=_residue_P[vi->residue_type[i]]->unpack(vi,opb); - if(!vi->residue_param[i])goto err_out; - } - - /* map backend settings */ - vi->maps=_oggpack_read(opb,6)+1; - /*vi->map_type=malloc(vi->maps*sizeof(int));*/ - /*vi->map_param=calloc(vi->maps,sizeof(void *));*/ - for(i=0;i<vi->maps;i++){ - vi->map_type[i]=_oggpack_read(opb,16); - if(vi->map_type[i]<0 || vi->map_type[i]>=VI_MAPB)goto err_out; - vi->map_param[i]=_mapping_P[vi->map_type[i]]->unpack(vi,opb); - if(!vi->map_param[i])goto err_out; - } - - /* mode settings */ - vi->modes=_oggpack_read(opb,6)+1; - /*vi->mode_param=calloc(vi->modes,sizeof(void *));*/ - for(i=0;i<vi->modes;i++){ - vi->mode_param[i]=calloc(1,sizeof(vorbis_info_mode)); - vi->mode_param[i]->blockflag=_oggpack_read(opb,1); - vi->mode_param[i]->windowtype=_oggpack_read(opb,16); - vi->mode_param[i]->transformtype=_oggpack_read(opb,16); - vi->mode_param[i]->mapping=_oggpack_read(opb,8); - - if(vi->mode_param[i]->windowtype>=VI_WINDOWB)goto err_out; - if(vi->mode_param[i]->transformtype>=VI_WINDOWB)goto err_out; - if(vi->mode_param[i]->mapping>=vi->maps)goto err_out; - } - - if(_oggpack_read(opb,1)!=1)goto err_out; /* top level EOP check */ - - return(0); - err_out: - vorbis_info_clear(vi); - return(-1); -} - -/* The Vorbis header is in three packets; the initial small packet in - the first page that identifies basic parameters, a second packet - with bitstream comments and a third packet that holds the - codebook. */ - -int vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc,ogg_packet *op){ - oggpack_buffer opb; - - if(op){ - _oggpack_readinit(&opb,op->packet,op->bytes); - - /* Which of the three types of header is this? */ - /* Also verify header-ness, vorbis */ - { - char buffer[6]; - int packtype=_oggpack_read(&opb,8); - memset(buffer,0,6); - _v_readstring(&opb,buffer,6); - if(memcmp(buffer,"vorbis",6)){ - /* not a vorbis header */ - return(-1); - } - switch(packtype){ - case 0x01: /* least significant *bit* is read first */ - if(!op->b_o_s){ - /* Not the initial packet */ - return(-1); - } - if(vi->rate!=0){ - /* previously initialized info header */ - return(-1); - } - - return(_vorbis_unpack_info(vi,&opb)); - - case 0x03: /* least significant *bit* is read first */ - if(vi->rate==0){ - /* um... we didn't get the initial header */ - return(-1); - } - - return(_vorbis_unpack_comment(vc,&opb)); - - case 0x05: /* least significant *bit* is read first */ - if(vi->rate==0 || vc->vendor==NULL){ - /* um... we didn;t get the initial header or comments yet */ - return(-1); - } - - return(_vorbis_unpack_books(vi,&opb)); - - default: - /* Not a valid vorbis header type */ - return(-1); - break; - } - } - } - return(-1); -} - -/* pack side **********************************************************/ - -static int _vorbis_pack_info(oggpack_buffer *opb,vorbis_info *vi){ - /* preamble */ - _oggpack_write(opb,0x01,8); - _v_writestring(opb,"vorbis"); - - /* basic information about the stream */ - _oggpack_write(opb,0x00,32); - _oggpack_write(opb,vi->channels,8); - _oggpack_write(opb,vi->rate,32); - - _oggpack_write(opb,vi->bitrate_upper,32); - _oggpack_write(opb,vi->bitrate_nominal,32); - _oggpack_write(opb,vi->bitrate_lower,32); - - _oggpack_write(opb,ilog2(vi->blocksizes[0]),4); - _oggpack_write(opb,ilog2(vi->blocksizes[1]),4); - _oggpack_write(opb,1,1); - - return(0); -} - -static int _vorbis_pack_comment(oggpack_buffer *opb,vorbis_comment *vc){ - char temp[]="Xiphophorus libVorbis I 20000508"; - - /* preamble */ - _oggpack_write(opb,0x03,8); - _v_writestring(opb,"vorbis"); - - /* vendor */ - _oggpack_write(opb,strlen(temp),32); - _v_writestring(opb,temp); - - /* comments */ - - _oggpack_write(opb,vc->comments,32); - if(vc->comments){ - int i; - for(i=0;i<vc->comments;i++){ - if(vc->user_comments[i]){ - _oggpack_write(opb,vc->comment_lengths[i],32); - _v_writestring(opb,vc->user_comments[i]); - }else{ - _oggpack_write(opb,0,32); - } - } - } - _oggpack_write(opb,1,1); - - return(0); -} - -static int _vorbis_pack_books(oggpack_buffer *opb,vorbis_info *vi){ - int i; - _oggpack_write(opb,0x05,8); - _v_writestring(opb,"vorbis"); - - /* books */ - _oggpack_write(opb,vi->books-1,8); - for(i=0;i<vi->books;i++) - if(vorbis_staticbook_pack(vi->book_param[i],opb))goto err_out; - - /* times */ - _oggpack_write(opb,vi->times-1,6); - for(i=0;i<vi->times;i++){ - _oggpack_write(opb,vi->time_type[i],16); - _time_P[vi->time_type[i]]->pack(vi->time_param[i],opb); - } - - /* floors */ - _oggpack_write(opb,vi->floors-1,6); - for(i=0;i<vi->floors;i++){ - _oggpack_write(opb,vi->floor_type[i],16); - _floor_P[vi->floor_type[i]]->pack(vi->floor_param[i],opb); - } - - /* residues */ - _oggpack_write(opb,vi->residues-1,6); - for(i=0;i<vi->residues;i++){ - _oggpack_write(opb,vi->residue_type[i],16); - _residue_P[vi->residue_type[i]]->pack(vi->residue_param[i],opb); - } - - /* maps */ - _oggpack_write(opb,vi->maps-1,6); - for(i=0;i<vi->maps;i++){ - _oggpack_write(opb,vi->map_type[i],16); - _mapping_P[vi->map_type[i]]->pack(vi,vi->map_param[i],opb); - } - - /* modes */ - _oggpack_write(opb,vi->modes-1,6); - for(i=0;i<vi->modes;i++){ - _oggpack_write(opb,vi->mode_param[i]->blockflag,1); - _oggpack_write(opb,vi->mode_param[i]->windowtype,16); - _oggpack_write(opb,vi->mode_param[i]->transformtype,16); - _oggpack_write(opb,vi->mode_param[i]->mapping,8); - } - _oggpack_write(opb,1,1); - - return(0); -err_out: - return(-1); -} - -int vorbis_analysis_headerout(vorbis_dsp_state *v, - vorbis_comment *vc, - ogg_packet *op, - ogg_packet *op_comm, - ogg_packet *op_code){ - vorbis_info *vi=v->vi; - oggpack_buffer opb; - - /* first header packet **********************************************/ - - _oggpack_writeinit(&opb); - if(_vorbis_pack_info(&opb,vi))goto err_out; - - /* build the packet */ - if(v->header)free(v->header); - v->header=malloc(_oggpack_bytes(&opb)); - memcpy(v->header,opb.buffer,_oggpack_bytes(&opb)); - op->packet=v->header; - op->bytes=_oggpack_bytes(&opb); - op->b_o_s=1; - op->e_o_s=0; - op->frameno=0; - - /* second header packet (comments) **********************************/ - - _oggpack_reset(&opb); - if(_vorbis_pack_comment(&opb,vc))goto err_out; - - if(v->header1)free(v->header1); - v->header1=malloc(_oggpack_bytes(&opb)); - memcpy(v->header1,opb.buffer,_oggpack_bytes(&opb)); - op_comm->packet=v->header1; - op_comm->bytes=_oggpack_bytes(&opb); - op_comm->b_o_s=0; - op_comm->e_o_s=0; - op_comm->frameno=0; - - /* third header packet (modes/codebooks) ****************************/ - - _oggpack_reset(&opb); - if(_vorbis_pack_books(&opb,vi))goto err_out; - - if(v->header2)free(v->header2); - v->header2=malloc(_oggpack_bytes(&opb)); - memcpy(v->header2,opb.buffer,_oggpack_bytes(&opb)); - op_code->packet=v->header2; - op_code->bytes=_oggpack_bytes(&opb); - op_code->b_o_s=0; - op_code->e_o_s=0; - op_code->frameno=0; - - _oggpack_writeclear(&opb); - return(0); - err_out: - _oggpack_writeclear(&opb); - memset(op,0,sizeof(ogg_packet)); - memset(op_comm,0,sizeof(ogg_packet)); - memset(op_code,0,sizeof(ogg_packet)); - - if(v->header)free(v->header); - if(v->header1)free(v->header1); - if(v->header2)free(v->header2); - v->header=NULL; - v->header1=NULL; - v->header2=NULL; - return(-1); -} - diff --git a/lib/lpc.c b/lib/lpc.c deleted file mode 100644 index ab7946a4..00000000 --- a/lib/lpc.c +++ /dev/null @@ -1,195 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: LPC low level routines - last mod: $Id: lpc.c,v 1.25 2000/08/23 10:16:57 xiphmont Exp $ - - ********************************************************************/ - -/* Some of these routines (autocorrelator, LPC coefficient estimator) - are derived from code written by Jutta Degener and Carsten Bormann; - thus we include their copyright below. The entirety of this file - is freely redistributable on the condition that both of these - copyright notices are preserved without modification. */ - -/* Preserved Copyright: *********************************************/ - -/* Copyright 1992, 1993, 1994 by Jutta Degener and Carsten Bormann, -Technische Universita"t Berlin - -Any use of this software is permitted provided that this notice is not -removed and that neither the authors nor the Technische Universita"t -Berlin are deemed to have made any representations as to the -suitability of this software for any purpose nor are held responsible -for any defects of this software. THERE IS ABSOLUTELY NO WARRANTY FOR -THIS SOFTWARE. - -As a matter of courtesy, the authors request to be informed about uses -this software has found, about bugs in this software, and about any -improvements that may be of general interest. - -Berlin, 28.11.1994 -Jutta Degener -Carsten Bormann - -*********************************************************************/ - -#include <stdlib.h> -#include <string.h> -#include <math.h> -#include "os.h" -#include "smallft.h" -#include "lpc.h" -#include "scales.h" -#include "misc.h" - -/* Autocorrelation LPC coeff generation algorithm invented by - N. Levinson in 1947, modified by J. Durbin in 1959. */ - -/* Input : n elements of time doamin data - Output: m lpc coefficients, excitation energy */ - -double vorbis_lpc_from_data(double *data,double *lpc,int n,int m){ - double *aut=alloca(sizeof(double)*(m+1)); - double error; - int i,j; - - /* autocorrelation, p+1 lag coefficients */ - - j=m+1; - while(j--){ - double d=0; - for(i=j;i<n;i++)d+=data[i]*data[i-j]; - aut[j]=d; - } - - /* Generate lpc coefficients from autocorr values */ - - error=aut[0]; - if(error==0){ - memset(lpc,0,m*sizeof(double)); - return 0; - } - - for(i=0;i<m;i++){ - double r=-aut[i+1]; - - /* Sum up this iteration's reflection coefficient; note that in - Vorbis we don't save it. If anyone wants to recycle this code - and needs reflection coefficients, save the results of 'r' from - each iteration. */ - - for(j=0;j<i;j++)r-=lpc[j]*aut[i-j]; - r/=error; - - /* Update LPC coefficients and total error */ - - lpc[i]=r; - for(j=0;j<i/2;j++){ - double tmp=lpc[j]; - lpc[j]+=r*lpc[i-1-j]; - lpc[i-1-j]+=r*tmp; - } - if(i%2)lpc[j]+=lpc[j]*r; - - error*=1.0-r*r; - } - - /* we need the error value to know how big an impulse to hit the - filter with later */ - - return error; -} - -/* Input : n element envelope spectral curve - Output: m lpc coefficients, excitation energy */ - -double vorbis_lpc_from_curve(double *curve,double *lpc,lpc_lookup *l){ - int n=l->ln; - int m=l->m; - double *work=alloca(sizeof(double)*(n+n)); - double fscale=.5/n; - int i,j; - - /* input is a real curve. make it complex-real */ - /* This mixes phase, but the LPC generation doesn't care. */ - for(i=0;i<n;i++){ - work[i*2]=curve[i]*fscale; - work[i*2+1]=0; - } - work[n*2-1]=curve[n-1]*fscale; - - n*=2; - drft_backward(&l->fft,work); - - /* The autocorrelation will not be circular. Shift, else we lose - most of the power in the edges. */ - - for(i=0,j=n/2;i<n/2;){ - double temp=work[i]; - work[i++]=work[j]; - work[j++]=temp; - } - - /* we *could* shave speed here by skimping on the edges (thus - speeding up the autocorrelation in vorbis_lpc_from_data) but we - don't right now. */ - - return(vorbis_lpc_from_data(work,lpc,n,m)); -} - -void lpc_init(lpc_lookup *l,long mapped, int m){ - memset(l,0,sizeof(lpc_lookup)); - - l->ln=mapped; - l->m=m; - - /* we cheat decoding the LPC spectrum via FFTs */ - drft_init(&l->fft,mapped*2); - -} - -void lpc_clear(lpc_lookup *l){ - if(l){ - drft_clear(&l->fft); - } -} - -void vorbis_lpc_predict(double *coeff,double *prime,int m, - double *data,long n){ - - /* in: coeff[0...m-1] LPC coefficients - prime[0...m-1] initial values (allocated size of n+m-1) - out: data[0...n-1] data samples */ - - long i,j,o,p; - double y; - double *work=alloca(sizeof(double)*(m+n)); - - if(!prime) - for(i=0;i<m;i++) - work[i]=0.; - else - for(i=0;i<m;i++) - work[i]=prime[i]; - - for(i=0;i<n;i++){ - y=0; - o=i; - p=m; - for(j=0;j<m;j++) - y-=work[o++]*coeff[--p]; - - data[i]=work[o]=y; - } -} diff --git a/lib/lpc.h b/lib/lpc.h deleted file mode 100644 index 7c5b9b36..00000000 --- a/lib/lpc.h +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: LPC low level routines - last mod: $Id: lpc.h,v 1.13 2000/08/23 10:16:57 xiphmont Exp $ - - ********************************************************************/ - -#ifndef _V_LPC_H_ -#define _V_LPC_H_ - -#include "vorbis/codec.h" -#include "smallft.h" - -typedef struct lpclook{ - /* en/decode lookups */ - drft_lookup fft; - - int ln; - int m; - -} lpc_lookup; - -extern void lpc_init(lpc_lookup *l,long mapped, int m); -extern void lpc_clear(lpc_lookup *l); - -/* simple linear scale LPC code */ -extern double vorbis_lpc_from_data(double *data,double *lpc,int n,int m); -extern double vorbis_lpc_from_curve(double *curve,double *lpc,lpc_lookup *l); - -extern void vorbis_lpc_predict(double *coeff,double *prime,int m, - double *data,long n); - - -#endif diff --git a/lib/lsp.c b/lib/lsp.c deleted file mode 100644 index f4f80e61..00000000 --- a/lib/lsp.c +++ /dev/null @@ -1,146 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: LSP (also called LSF) conversion routines - last mod: $Id: lsp.c,v 1.9 2000/08/19 11:46:28 xiphmont Exp $ - - The LSP generation code is taken (with minimal modification) from - "On the Computation of the LSP Frequencies" by Joseph Rothweiler - <rothwlr@altavista.net>, available at: - - http://www2.xtdl.com/~rothwlr/lsfpaper/lsfpage.html - - ********************************************************************/ - -/* Note that the lpc-lsp conversion finds the roots of polynomial with - an iterative root polisher (CACM algorithm 283). It *is* possible - to confuse this algorithm into not converging; that should only - happen with absurdly closely spaced roots (very sharp peaks in the - LPC f response) which in turn should be impossible in our use of - the code. If this *does* happen anyway, it's a bug in the floor - finder; find the cause of the confusion (probably a single bin - spike or accidental near-double-limit resolution problems) and - correct it. */ - -#include <math.h> -#include <string.h> -#include <stdlib.h> -#include "lsp.h" -#include "os.h" -#include "misc.h" - -void vorbis_lsp_to_curve(double *curve,int n,double *lsp,int m,double amp, - double *w){ - int i,j,k; - double *coslsp=alloca(m*sizeof(double)); - for(i=0;i<m;i++)coslsp[i]=2*cos(lsp[i]); - - for(k=0;k<n;k++){ - double p=.70710678118654752440; - double q=.70710678118654752440; - for(j=0;j<m;){ - p*= *w-coslsp[j++]; - q*= *w-coslsp[j++]; - } - curve[k]=amp/sqrt(p*p*(1.+ *w*.5)+q*q*(1.- *w*.5)); - w++; - } -} - -static void cheby(double *g, int ord) { - int i, j; - - g[0] *= 0.5; - for(i=2; i<= ord; i++) { - for(j=ord; j >= i; j--) { - g[j-2] -= g[j]; - g[j] += g[j]; - } - } -} - -static int comp(const void *a,const void *b){ - if(*(double *)a<*(double *)b) - return(1); - else - return(-1); -} - -/* CACM algorithm 283. */ -static void cacm283(double *a,int ord,double *r){ - int i, k; - double val, p, delta, error; - double rooti; - - for(i=0; i<ord;i++) r[i] = 2.0 * (i+0.5) / ord - 1.0; - - for(error=1 ; error > 1.e-12; ) { - error = 0; - for( i=0; i<ord; i++) { /* Update each point. */ - rooti = r[i]; - val = a[ord]; - p = a[ord]; - for(k=ord-1; k>= 0; k--) { - val = val * rooti + a[k]; - if (k != i) p *= rooti - r[k]; - } - delta = val/p; - r[i] -= delta; - - error += delta*delta; - } - } - - /* Replaced the original bubble sort with a real sort. With your - help, we can eliminate the bubble sort in our lifetime. --Monty */ - - qsort(r,ord,sizeof(double),comp); - -} - -/* Convert lpc coefficients to lsp coefficients */ -void vorbis_lpc_to_lsp(double *lpc,double *lsp,int m){ - int order2=m/2; - double *g1=alloca(sizeof(double)*(order2+1)); - double *g2=alloca(sizeof(double)*(order2+1)); - double *g1r=alloca(sizeof(double)*(order2+1)); - double *g2r=alloca(sizeof(double)*(order2+1)); - int i; - - /* Compute the lengths of the x polynomials. */ - /* Compute the first half of K & R F1 & F2 polynomials. */ - /* Compute half of the symmetric and antisymmetric polynomials. */ - /* Remove the roots at +1 and -1. */ - - g1[order2] = 1.0; - for(i=0;i<order2;i++) g1[order2-i-1] = lpc[i]+lpc[m-i-1]; - g2[order2] = 1.0; - for(i=0;i<order2;i++) g2[order2-i-1] = lpc[i]-lpc[m-i-1]; - - for(i=0; i<order2;i++) g1[order2-i-1] -= g1[order2-i]; - for(i=0; i<order2;i++) g2[order2-i-1] += g2[order2-i]; - - /* Convert into polynomials in cos(alpha) */ - cheby(g1,order2); - cheby(g2,order2); - - /* Find the roots of the 2 even polynomials.*/ - - cacm283(g1,order2,g1r); - cacm283(g2,order2,g2r); - - for(i=0;i<m;i+=2){ - lsp[i] = acos(g1r[i/2]); - lsp[i+1] = acos(g2r[i/2]); - } -} diff --git a/lib/lsp.h b/lib/lsp.h deleted file mode 100644 index 0d722ce9..00000000 --- a/lib/lsp.h +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: LSP (also called LSF) conversion routines - last mod: $Id: lsp.h,v 1.4 2000/08/19 11:46:28 xiphmont Exp $ - - ********************************************************************/ - - -#ifndef _V_LSP_H_ -#define _V_LSP_H_ - -extern void vorbis_lpc_to_lsp(double *lpc,double *lsp,int m); -extern void vorbis_lsp_to_curve(double *curve,int n, - double *lsp,int m,double amp, - double *w); - -#endif diff --git a/lib/mapping0.c b/lib/mapping0.c deleted file mode 100644 index 1dc0e80d..00000000 --- a/lib/mapping0.c +++ /dev/null @@ -1,383 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: channel mapping 0 implementation - last mod: $Id: mapping0.c,v 1.15 2000/08/15 09:09:43 xiphmont Exp $ - - ********************************************************************/ - -#include <stdlib.h> -#include <string.h> -#include <math.h> -#include "vorbis/codec.h" -#include "vorbis/backends.h" -#include "bitwise.h" -#include "bookinternal.h" -#include "registry.h" -#include "psy.h" -#include "misc.h" - -/* simplistic, wasteful way of doing this (unique lookup for each - mode/submapping); there should be a central repository for - identical lookups. That will require minor work, so I'm putting it - off as low priority. - - Why a lookup for each backend in a given mode? Because the - blocksize is set by the mode, and low backend lookups may require - parameters from other areas of the mode/mapping */ - -typedef struct { - vorbis_info_mode *mode; - vorbis_info_mapping0 *map; - - vorbis_look_time **time_look; - vorbis_look_floor **floor_look; - - vorbis_look_residue **residue_look; - vorbis_look_psy *psy_look; - - vorbis_func_time **time_func; - vorbis_func_floor **floor_func; - vorbis_func_residue **residue_func; - - int ch; - double **decay; - long lastframe; /* if a different mode is called, we need to - invalidate decay */ -} vorbis_look_mapping0; - -static void free_info(vorbis_info_mapping *i){ - if(i){ - memset(i,0,sizeof(vorbis_info_mapping0)); - free(i); - } -} - -static void free_look(vorbis_look_mapping *look){ - int i; - vorbis_look_mapping0 *l=(vorbis_look_mapping0 *)look; - if(l){ - for(i=0;i<l->map->submaps;i++){ - l->time_func[i]->free_look(l->time_look[i]); - l->floor_func[i]->free_look(l->floor_look[i]); - l->residue_func[i]->free_look(l->residue_look[i]); - if(l->psy_look)_vp_psy_clear(l->psy_look+i); - } - - if(l->decay){ - for(i=0;i<l->ch;i++){ - if(l->decay[i])free(l->decay[i]); - } - free(l->decay); - } - - free(l->time_func); - free(l->floor_func); - free(l->residue_func); - free(l->time_look); - free(l->floor_look); - free(l->residue_look); - if(l->psy_look)free(l->psy_look); - memset(l,0,sizeof(vorbis_look_mapping0)); - free(l); - } -} - -static vorbis_look_mapping *look(vorbis_dsp_state *vd,vorbis_info_mode *vm, - vorbis_info_mapping *m){ - int i; - vorbis_info *vi=vd->vi; - vorbis_look_mapping0 *look=calloc(1,sizeof(vorbis_look_mapping0)); - vorbis_info_mapping0 *info=look->map=(vorbis_info_mapping0 *)m; - look->mode=vm; - - look->time_look=calloc(info->submaps,sizeof(vorbis_look_time *)); - look->floor_look=calloc(info->submaps,sizeof(vorbis_look_floor *)); - - look->residue_look=calloc(info->submaps,sizeof(vorbis_look_residue *)); - if(vi->psys)look->psy_look=calloc(info->submaps,sizeof(vorbis_look_psy)); - - look->time_func=calloc(info->submaps,sizeof(vorbis_func_time *)); - look->floor_func=calloc(info->submaps,sizeof(vorbis_func_floor *)); - look->residue_func=calloc(info->submaps,sizeof(vorbis_func_residue *)); - - for(i=0;i<info->submaps;i++){ - int timenum=info->timesubmap[i]; - int floornum=info->floorsubmap[i]; - int resnum=info->residuesubmap[i]; - - look->time_func[i]=_time_P[vi->time_type[timenum]]; - look->time_look[i]=look->time_func[i]-> - look(vd,vm,vi->time_param[timenum]); - look->floor_func[i]=_floor_P[vi->floor_type[floornum]]; - look->floor_look[i]=look->floor_func[i]-> - look(vd,vm,vi->floor_param[floornum]); - look->residue_func[i]=_residue_P[vi->residue_type[resnum]]; - look->residue_look[i]=look->residue_func[i]-> - look(vd,vm,vi->residue_param[resnum]); - - if(vi->psys && vd->analysisp){ - int psynum=info->psysubmap[i]; - _vp_psy_init(look->psy_look+i,vi->psy_param[psynum], - vi->blocksizes[vm->blockflag]/2,vi->rate); - } - } - - look->ch=vi->channels; - if(vi->psys){ - look->decay=calloc(vi->channels,sizeof(double *)); - for(i=0;i<vi->channels;i++) - look->decay[i]=calloc(vi->blocksizes[vm->blockflag]/2,sizeof(double)); - } - - return(look); -} - -static void pack(vorbis_info *vi,vorbis_info_mapping *vm,oggpack_buffer *opb){ - int i; - vorbis_info_mapping0 *info=(vorbis_info_mapping0 *)vm; - - _oggpack_write(opb,info->submaps-1,4); - /* we don't write the channel submappings if we only have one... */ - if(info->submaps>1){ - for(i=0;i<vi->channels;i++) - _oggpack_write(opb,info->chmuxlist[i],4); - } - for(i=0;i<info->submaps;i++){ - _oggpack_write(opb,info->timesubmap[i],8); - _oggpack_write(opb,info->floorsubmap[i],8); - _oggpack_write(opb,info->residuesubmap[i],8); - } -} - -/* also responsible for range checking */ -static vorbis_info_mapping *unpack(vorbis_info *vi,oggpack_buffer *opb){ - int i; - vorbis_info_mapping0 *info=calloc(1,sizeof(vorbis_info_mapping0)); - memset(info,0,sizeof(vorbis_info_mapping0)); - - info->submaps=_oggpack_read(opb,4)+1; - - if(info->submaps>1){ - for(i=0;i<vi->channels;i++){ - info->chmuxlist[i]=_oggpack_read(opb,4); - if(info->chmuxlist[i]>=info->submaps)goto err_out; - } - } - for(i=0;i<info->submaps;i++){ - info->timesubmap[i]=_oggpack_read(opb,8); - if(info->timesubmap[i]>=vi->times)goto err_out; - info->floorsubmap[i]=_oggpack_read(opb,8); - if(info->floorsubmap[i]>=vi->floors)goto err_out; - info->residuesubmap[i]=_oggpack_read(opb,8); - if(info->residuesubmap[i]>=vi->residues)goto err_out; - } - - return info; - - err_out: - free_info(info); - return(NULL); -} - -#include <stdio.h> -#include "os.h" -#include "lpc.h" -#include "lsp.h" -#include "envelope.h" -#include "mdct.h" -#include "psy.h" -#include "bitwise.h" -#include "spectrum.h" -#include "scales.h" - -/* no time mapping implementation for now */ -static long seq=0; -static int forward(vorbis_block *vb,vorbis_look_mapping *l){ - vorbis_dsp_state *vd=vb->vd; - vorbis_info *vi=vd->vi; - vorbis_look_mapping0 *look=(vorbis_look_mapping0 *)l; - vorbis_info_mapping0 *info=look->map; - vorbis_info_mode *mode=look->mode; - int n=vb->pcmend; - int i,j; - double *window=vd->window[vb->W][vb->lW][vb->nW][mode->windowtype]; - - double **pcmbundle=alloca(sizeof(double *)*vi->channels); - int *nonzero=alloca(sizeof(int)*vi->channels); - - /* time domain pre-window: NONE IMPLEMENTED */ - - /* window the PCM data: takes PCM vector, vb; modifies PCM vector */ - - for(i=0;i<vi->channels;i++){ - double *pcm=vb->pcm[i]; - for(j=0;j<n;j++) - pcm[j]*=window[j]; - } - - /* time-domain post-window: NONE IMPLEMENTED */ - - /* transform the PCM data; takes PCM vector, vb; modifies PCM vector */ - /* only MDCT right now.... */ - for(i=0;i<vi->channels;i++){ - double *pcm=vb->pcm[i]; - mdct_forward(vd->transform[vb->W][0],pcm,pcm); - } - - { - double *floor=_vorbis_block_alloc(vb,n*sizeof(double)/2); - - for(i=0;i<vi->channels;i++){ - double *pcm=vb->pcm[i]; - double *decay=look->decay[i]; - int submap=info->chmuxlist[i]; - - /* if some other mode/mapping was called last frame, our decay - accumulator is out of date. Clear it. */ - if(look->lastframe+1 != vb->sequence) - memset(decay,0,n*sizeof(double)/2); - - /* perform psychoacoustics; do masking */ - _vp_compute_mask(look->psy_look+submap,pcm,floor,decay); - - _analysis_output("decay",seq,decay,n/2,0,1); - _analysis_output("mdct",seq,pcm,n/2,0,1); - _analysis_output("lmdct",seq,pcm,n/2,0,0); - _analysis_output("prefloor",seq,floor,n/2,0,1); - - /* perform floor encoding */ - nonzero[i]=look->floor_func[submap]-> - forward(vb,look->floor_look[submap],floor,floor); - - _analysis_output("floor",seq,floor,n/2,0,1); - - /* apply the floor, do optional noise levelling */ - _vp_apply_floor(look->psy_look+submap,pcm,floor); - - _analysis_output("res",seq++,pcm,n/2,0,0); - -#ifdef TRAIN_RES - if(nonzero[i]){ - FILE *of; - char buffer[80]; - int i; - - sprintf(buffer,"residue_%d.vqd",vb->mode); - of=fopen(buffer,"a"); - for(i=0;i<n/2;i++) - fprintf(of,"%.2f, ",pcm[i]); - fprintf(of,"\n"); - fclose(of); - } -#endif - - } - - /* perform residue encoding with residue mapping; this is - multiplexed. All the channels belonging to one submap are - encoded (values interleaved), then the next submap, etc */ - - for(i=0;i<info->submaps;i++){ - int ch_in_bundle=0; - for(j=0;j<vi->channels;j++){ - if(info->chmuxlist[j]==i && nonzero[j]==1){ - pcmbundle[ch_in_bundle++]=vb->pcm[j]; - } - } - - look->residue_func[i]->forward(vb,look->residue_look[i], - pcmbundle,ch_in_bundle); - } - } - - look->lastframe=vb->sequence; - return(0); -} - -static int inverse(vorbis_block *vb,vorbis_look_mapping *l){ - vorbis_dsp_state *vd=vb->vd; - vorbis_info *vi=vd->vi; - vorbis_look_mapping0 *look=(vorbis_look_mapping0 *)l; - vorbis_info_mapping0 *info=look->map; - vorbis_info_mode *mode=look->mode; - int i,j; - long n=vb->pcmend=vi->blocksizes[vb->W]; - - double *window=vd->window[vb->W][vb->lW][vb->nW][mode->windowtype]; - double **pcmbundle=alloca(sizeof(double *)*vi->channels); - int *nonzero=alloca(sizeof(int)*vi->channels); - - /* time domain information decode (note that applying the - information would have to happen later; we'll probably add a - function entry to the harness for that later */ - /* NOT IMPLEMENTED */ - - /* recover the spectral envelope; store it in the PCM vector for now */ - for(i=0;i<vi->channels;i++){ - double *pcm=vb->pcm[i]; - int submap=info->chmuxlist[i]; - nonzero[i]=look->floor_func[submap]-> - inverse(vb,look->floor_look[submap],pcm); - _analysis_output("ifloor",seq+i,pcm,n/2,0,1); - } - - /* recover the residue, apply directly to the spectral envelope */ - - for(i=0;i<info->submaps;i++){ - int ch_in_bundle=0; - for(j=0;j<vi->channels;j++){ - if(info->chmuxlist[j]==i && nonzero[j]) - pcmbundle[ch_in_bundle++]=vb->pcm[j]; - } - - look->residue_func[i]->inverse(vb,look->residue_look[i],pcmbundle,ch_in_bundle); - } - - /* transform the PCM data; takes PCM vector, vb; modifies PCM vector */ - /* only MDCT right now.... */ - for(i=0;i<vi->channels;i++){ - double *pcm=vb->pcm[i]; - _analysis_output("out",seq+i,pcm,n/2,0,1); - mdct_backward(vd->transform[vb->W][0],pcm,pcm); - } - - /* now apply the decoded pre-window time information */ - /* NOT IMPLEMENTED */ - - /* window the data */ - for(i=0;i<vi->channels;i++){ - double *pcm=vb->pcm[i]; - if(nonzero[i]) - for(j=0;j<n;j++) - pcm[j]*=window[j]; - else - for(j=0;j<n;j++) - pcm[j]=0.; - _analysis_output("final",seq++,pcm,n,0,0); - } - - /* now apply the decoded post-window time information */ - /* NOT IMPLEMENTED */ - - /* all done! */ - return(0); -} - -/* export hooks */ -vorbis_func_mapping mapping0_exportbundle={ - &pack,&unpack,&look,&free_info,&free_look,&forward,&inverse -}; - - - diff --git a/lib/masking.h b/lib/masking.h deleted file mode 100644 index 74a92987..00000000 --- a/lib/masking.h +++ /dev/null @@ -1,244 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: masking curve data for psychoacoustics - last mod: $Id: masking.h,v 1.4 2000/08/15 09:09:43 xiphmont Exp $ - - ********************************************************************/ - -#ifndef _V_MASKING_H_ -#define _V_MASKING_H_ - -/* Not really an ATH, more a bottom curve to limit LSP dynamic range */ -double ATH_Bark_dB[]={ - 15, 15, 15, 15, 11, 10, 8, 7, 7, 7, - 6, 2, 0, 0, -3, -5, -6, -6, -4.5, 2.5, - 10, 15, 15, 15, 15, 15, 15}; - -/* The below masking curves are straight from the R. Ehmer - (J. Acoustical Society of America) papers ca 1958-59. I modified - them slightly as Ehmer does not correct for the Absolute Threshold - of Hearing, and the low dB portions of the curves are thus highly - suspect. */ - -/* Let's all do the Trek thing and just call them 'Ehmer curves' ;-) - Note these are octaves, not Bark scale. */ - -#define EHMER_OFFSET 16 -#define EHMER_MAX 56 - -double tone_125_40dB_SL[EHMER_MAX]={ - 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 29, 27, 26, 25, 23, 21, - 20, 18, 16, 14, 12, 11, 9, 7, 5, 3, 2, 0, -2, -4, -6, -8, - -10, -12, -14, -16, -18, -20, -23, -25, -28,-30,-34,-37,-40,-44,-48,-52, --900,-900,-900,-900,-900,-900,-900,-900}; -double tone_125_60dB_SL[EHMER_MAX]={ - 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 49, 47, 46, 45, 43, 41, - 40, 38, 36, 34, 32, 31, 29, 27, 25, 23, 22, 20, 18, 16, 14, 12, - 10, 8, 6, 4, 2, 0, -3, -5, -8,-10,-14,-17,-20,-24,-28,-32, --900,-900,-900,-900,-900,-900,-900,-900}; -double tone_125_80dB_SL[EHMER_MAX]={ - 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 69, 67, 66, 65, 63, 61, - 60, 58, 56, 54, 52, 51, 49, 47, 45, 43, 42, 40, 38, 36, 34, 32, - 30, 28, 26, 24, 22, 20, 17, 15, 12, 10, 6, 3, 0, -4, -8,-12, --900,-900,-900,-900,-900,-900,-900,-900}; -double tone_125_100dB_SL[EHMER_MAX]={ - 85, 85, 85, 85, 85, 85, 85, 85, 85, 84, 84, 83, 82, 81, 80, 79, - 78, 77, 75, 74, 73, 72, 71, 70, 69, 68, 67, 65, 64, 63, 62, 60, - 58, 57, 55, 54, 52, 50, 48, 46, 44, 42, 40, 38, 36, 34, 31, 29, - 27, 24, 22, 20, 18, 15, 13, 11}; - -double tone_250_40dB_SL[EHMER_MAX]={ --900,-900,-900,-900,-900,-900,-900,-900, -19, -13, -7, -1, 4, 9, 15, 20, - 22, 23, 22, 19, 18, 18, 16, 13, 9, 7, 3, 1, -1, -3, -6, -8, - -10, -13, -16, -19, -21, -24, -28, -32, -900,-900,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900}; -double tone_250_60dB_SL[EHMER_MAX]={ --900,-900,-900,-900,-900,-900,-900, -10, -5, 1, 7, 13, 19, 25, 30, 33, - 36, 39, 38, 37, 38, 39, 39, 40, 38, 36, 35, 34, 33, 31, 29, 28, - 28, 28, 25, 20, 14, 10, 5, 0, -5,-10,-15,-20,-25,-30,-35,-40, --900,-900,-900,-900,-900,-900,-900,-900}; -double tone_250_80dB_SL[EHMER_MAX]={ --900,-900,-900,-900,-900,-900,-900, -10, 10, 17, 24, 30, 37, 41, 48, 49, - 50, 53, 54, 53, 53, 54, 55, 57, 57, 57, 58, 59, 60, 58, 57, 58, - 59, 58, 57, 54, 52, 50, 49, 47, 46, 47, 46, 44, 43, 42, 41, 40, - 38, 32, 27, 22, 17, 11, 6, 0}; -/* no data, just interpolated from 80 */ -double tone_250_100dB_SL[EHMER_MAX]={ --900,-900,-900,-900,-900,-900,-900, -10, 15, 25, 34, 40, 50, 56, 60, 70, - 70, 73, 74, 73, 73, 74, 75, 77, 77, 77, 78, 79, 80, 78, 77, 78, - 79, 78, 77, 74, 72, 70, 69, 67, 66, 67, 66, 64, 63, 62, 61, 60, - 58, 52, 47, 42, 37, 31, 26, 20}; - -double tone_500_40dB_SL[EHMER_MAX]={ --900,-900,-900,-900,-900,-900,-900, -40, -26, -20, -14, -8, -2, 4, 10, 17, - 23, 16, 12, 9, 6, 3, 0, -3, -7, -10, -13, -16, -20, -23, -26, -30, --900,-900,-900,-900,-900,-900,-900,-900, -900,-900,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900}; -double tone_500_60dB_SL[EHMER_MAX]={ --900,-900,-900,-900,-900,-900,-900,-900, -18, -12, -6, 0, 6, 13, 20, 30, - 39, 34, 31, 29, 29, 27, 24, 21, 18, 16, 13, 8, 6, 3, 1, -1, - -5, -2, -5, -8, -12, -15, -18, -22, -900,-900,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900}; -double tone_500_80dB_SL[EHMER_MAX]={ --900,-900,-900,-900,-900,-900,-900,-900, -22,-16,-10, 0, 10, 20, 32, 43, - 53, 52, 52, 50, 49, 50, 52, 55, 55, 54, 51, 49, 46, 44, 44, 42, - 38, 34, 32, 29, 29, 28, 25, 23, 20, 16, 10, 7, 4, 2, -1, -4, - -7, -10, -15, -20, -25, -30, -35, -40}; -double tone_500_100dB_SL[EHMER_MAX]={ --900,-900,-900,-900,-900,-900,-900, -10, -7, 2, 10, 19, 27, 35, 55, 56, - 62, 61, 60, 58, 57, 57, 59, 63, 65, 66, 62, 60, 57, 57, 58, 58, - 57, 56, 56, 56, 57, 57, 56, 57, 57, 54, 47, 41, 37, 28, 21, 16, - 10, 3, -3, -8, -13, -18, -23, -28}; - -double tone_1000_40dB_SL[EHMER_MAX]={ --900,-900,-900,-900,-900,-900,-900,-900, -55, -40, -30, -20, -10, 0, 9, 20, - 27, 20, 13, 14, 13, 5, -1, -6, -11, -20, -30,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900, -900,-900,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900}; -double tone_1000_60dB_SL[EHMER_MAX]={ --900,-900,-900,-900,-900,-900,-900, -43, -33,-23,-13, -3, 7, 17, 25, 37, - 42, 33, 25, 25, 23, 18, 13, 9, 4, -1, -7,-13,-18, -23, -28, -33, --900,-900,-900,-900,-900,-900,-900,-900, -900,-900,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900}; -double tone_1000_80dB_SL[EHMER_MAX]={ --900,-900,-900,-900,-900,-900,-900, -35, -25,-14, -4, 6, 16, 27, 33, 50, - 59, 57, 47, 41, 40, 43, 47, 48, 47, 42, 39, 37, 37, 36, 35, 32, - 30, 27, 21, 15, 5, -2, -10, -18, -900,-900,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900}; -double tone_1000_100dB_SL[EHMER_MAX]={ --900,-900,-900,-900,-900,-900, -40, -30, -20,-10, 0, 10, 23, 33, 45, 60, - 70, 72, 55, 49, 43, 40, 44, 54, 59, 58, 49, 43, 52, 57, 57, 58, - 58, 54, 49, 47, 42, 39, 33, 28, 20, 15, 5, 0, -5,-15,-20,-25, --900,-900,-900,-900,-900,-900,-900,-900}; - -double tone_2000_40dB_SL[EHMER_MAX]={ --900,-900,-900,-900,-900,-900,-900,-900, -40, -30, -21, -12, -3, 5, 12, 20, - 24, 21, 14, 5, -5, -15, -25, -35, -900,-900,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900, -900,-900,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900}; -double tone_2000_60dB_SL[EHMER_MAX]={ --900,-900,-900,-900,-900,-900,-900,-900, -40, -30, -21, -12, -2, 8, 19, 31, - 38, 34, 24, 17, 14, 13, 11, 7, 3, -2, -6, -10, -14, -20, -26, -32, --900,-900,-900,-900,-900,-900,-900,-900, -900,-900,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900}; -double tone_2000_80dB_SL[EHMER_MAX]={ --900,-900,-900,-900,-900,-900,-900,-900, -40, -30, -21, -12, -2, 13, 28, 40, - 51, 51, 43, 35, 28, 29, 35, 37, 37, 35, 31, 28, 25, 22, 19, 15, - 11, 8, 6, 2, -6, -14, -22, -30, -900,-900,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900}; -double tone_2000_100dB_SL[EHMER_MAX]={ --900,-900,-900,-900,-900,-900,-900,-900, -40, -30, -21, -10, 6, 25, 42, 60, - 66, 60, 53, 43, 35, 31, 34, 47, 58, 51, 43, 45, 54, 59, 59, 56, - 54, 51, 40, 29, 20, 11, 2, -8, -17, -26, -35,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900}; - -double tone_4000_40dB_SL[EHMER_MAX]={ --900,-900,-900,-900,-900,-900,-900,-900, -40, -30, -21, -12, 0, 3, 10, 18, - 24, 21, 14, 5, -5, -15, -25, -35, -900,-900,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900, -900,-900,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900}; - -double tone_4000_60dB_SL[EHMER_MAX]={ --900,-900,-900,-900,-900,-900,-900,-900, -40, -30, -21, -12, -2, 8, 19, 31, - 38, 33, 28, 23, 19, 14, 11, 8, 3, -2, -7, -12, -17, -22, -27, -37, --900,-900,-900,-900,-900,-900,-900,-900, -900,-900,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900}; - -double tone_4000_80dB_SL[EHMER_MAX]={ --900,-900,-900,-900,-900,-900,-900,-900, -60, -50, -40, -29, -12, 5, 19, 37, - 51, 49, 40, 35, 36, 36, 36, 33, 32, 24, 18, 8, -3, -12, -20, -29, --900,-900,-900,-900,-900,-900,-900,-900, -900,-900,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900}; - -double tone_4000_100dB_SL[EHMER_MAX]={ - -20, -12, -8, -4, 0, 4, 8, 11, 15, 22, 26, 28, 32, 36, 43, 52, - 62, 59, 50, 48, 50, 50, 45, 36, 45, 30, 20, 10, 0, -10, -19, -28, - -37,-900,-900,-900,-900,-900,-900,-900, -900,-900,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900}; - -double tone_8000_40dB_SL[EHMER_MAX]={ --900,-900,-900,-900,-900,-900,-900, -50, -41, -30, -21, -12, 0, 3, 10, 18, - 23, 20, 16, 15, 16, 18, 21, 23, 25, 27, 29, 32, 35, 38, 41, 44, - 47, 50, 55, 60, 85,-900,-900,-900, -900,-900,-900,-900,-900,-900,-900,-900, - -900,-900,-900,-900,-900,-900,-900,-900}; -double tone_8000_60dB_SL[EHMER_MAX]={ --900,-900,-900,-900,-900,-900,-900, -10, -21, -18, -14, -10, 0, 3, 15, 30, - 43, 40, 36, 35, 36, 38, 41, 43, 45, 47, 49, 52, 55, 58, 61, 64, - 67, 70, 75, 80,-900,-900,-900,-900, -900,-900,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900}; -double tone_8000_80dB_SL[EHMER_MAX]={ --900,-900,-900,-900,-900,-900,-900, -10, -1, 2, 6, 10, 13, 19, 25, 35, - 63, 60, 56, 55, 56, 58, 61, 63, 65, 70, 75, 80, 85, 90, 95, 100, - 100, 100, 100, 100,-900,-900,-900,-900, -900,-900,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900}; - -double tone_8000_100dB_SL[EHMER_MAX]={ - -18, -12, -7, -3, 0, 2, 6, 9, 12, 19, 22, 21, 19, 21, 40, 40, - 80, 60, 35, 25, 15, 5, -5, -15, -25, -35,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900, -900,-900,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900}; - -#if 0 /* not used for the time being */ -double noise_500_60dB_SL[EHMER_MAX]={ --900,-900,-900,-900,-900, -20, -11, -2, 7, 16, 25, 34, 43, 52, 61, 66, - 69, 68, 58, 50, 44, 38, 32, 28, 25, 24, 20, 18, 17, 12, 10, 8, - 5, 0, -5, -8, -12, -15, -18, -22, -900,-900,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900}; - -double noise_500_80dB_SL[EHMER_MAX]={ --900,-900,-900, -20, -10, -1, 8, 17, 26, 35, 44, 53, 62, 70, 79, 83, - 85, 85, 81, 77, 74, 71, 68, 63, 61, 59, 56, 55, 54, 52, 48, 47, - 45, 46, 45, 43, 40, 37, 33, 32, 35, 32, 30, 29, 20, 10, 0, -10, - -20, -30,-900,-900,-900,-900,-900,-900}; - -double noise_1000_60dB_SL[EHMER_MAX]={ --900,-900,-900,-900, -24, -15, -6, 3, 12, 21, 28, 34, 40, 48, 57, 60, - 61, 56, 54, 45, 36, 27, 21, 19, 17, 13, 10, 0, -10, -20, -20,-900, --900,-900,-900,-900,-900,-900,-900,-900, -900,-900,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900}; - -double noise_1000_80dB_SL[EHMER_MAX]={ --900, -26, -17, -8, 1, 10, 19, 28, 37, 41, 46, 51, 58, 68, 74, 81, - 80, 81, 70, 66, 58, 61, 59, 55, 54, 53, 52, 49, 48, 42, 38, 38, - 39, 34, 30, 27, 20, 10, 0, -10, -20, -30,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900}; - -double noise_2000_60dB_SL[EHMER_MAX]={ --900,-900,-900, -34, -25, -16, -7, 2, 11, 18, 23, 30, 35, 42, 51, 58, - 58, 57, 50, 40,-900,-900,-900,-900, -900,-900,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900, -900,-900,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900}; - -double noise_2000_80dB_SL[EHMER_MAX]={ --900, -26, -17, -8, 1, 10, 19, 28, 33, 38, 43, 48, 53, 62, 70, 77, - 77, 75, 70, 67, 68, 66, 62, 61, 60, 59, 52, 47, 39, 35, 34, 35, - 35, 33, 30, 27, 20, 10, 0, -10, -20, -30,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900}; - -double noise_4000_60dB_SL[EHMER_MAX]={ --900,-900,-900, -34, -25, -16, -7, 2, 11, 20, 25, 31, 37, 45, 56, 62, - 64, 61,-900,-900,-900,-900,-900,-900, -900,-900,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900, -900,-900,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900}; - -double noise_4000_80dB_SL[EHMER_MAX]={ --900, -26, -17, -8, 1, 10, 19, 26, 33, 39, 45, 50, 55, 65, 75, 82, - 84, 81, 78, 72, 70, 69, 66, 61, 50, 48, 46, 40, 35, 30, 25, 20, - 15, 10, 5, 0, -10, -20, -30,-900, -900,-900,-900,-900,-900,-900,-900,-900, --900,-900,-900,-900,-900,-900,-900,-900}; - -#endif -#endif - - diff --git a/lib/mdct.c b/lib/mdct.c deleted file mode 100644 index 1b1d195e..00000000 --- a/lib/mdct.c +++ /dev/null @@ -1,329 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: normalized modified discrete cosine transform - power of two length transform only [16 <= n ] - last mod: $Id: mdct.c,v 1.16 2000/03/10 13:21:18 xiphmont Exp $ - - Algorithm adapted from _The use of multirate filter banks for coding - of high quality digital audio_, by T. Sporer, K. Brandenburg and - B. Edler, collection of the European Signal Processing Conference - (EUSIPCO), Amsterdam, June 1992, Vol.1, pp 211-214 - - Note that the below code won't make much sense without the paper; - The presented algorithm was already fairly polished, and the code - once followed it closely. The current code both corrects several - typos in the paper and goes beyond the presented optimizations - (steps 4 through 6 are, for example, entirely eliminated). - - This module DOES NOT INCLUDE code to generate the window function. - Everybody has their own weird favorite including me... I happen to - like the properties of y=sin(2PI*sin^2(x)), but others may vehemently - disagree. - - ********************************************************************/ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <math.h> -#include "mdct.h" -#include "os.h" -#include "misc.h" - -/* build lookups for trig functions; also pre-figure scaling and - some window function algebra. */ - -void mdct_init(mdct_lookup *lookup,int n){ - int *bitrev=malloc(sizeof(int)*(n/4)); - double *trig=malloc(sizeof(double)*(n+n/4)); - double *AE=trig; - double *AO=trig+1; - double *BE=AE+n/2; - double *BO=BE+1; - double *CE=BE+n/2; - double *CO=CE+1; - - int i; - int log2n=lookup->log2n=rint(log(n)/log(2)); - lookup->n=n; - lookup->trig=trig; - lookup->bitrev=bitrev; - - /* trig lookups... */ - - for(i=0;i<n/4;i++){ - AE[i*2]=cos((M_PI/n)*(4*i)); - AO[i*2]=-sin((M_PI/n)*(4*i)); - BE[i*2]=cos((M_PI/(2*n))*(2*i+1)); - BO[i*2]=sin((M_PI/(2*n))*(2*i+1)); - } - for(i=0;i<n/8;i++){ - CE[i*2]=cos((M_PI/n)*(4*i+2)); - CO[i*2]=-sin((M_PI/n)*(4*i+2)); - } - - /* bitreverse lookup... */ - - { - int mask=(1<<(log2n-1))-1,i,j; - int msb=1<<(log2n-2); - for(i=0;i<n/8;i++){ - int acc=0; - for(j=0;msb>>j;j++) - if((msb>>j)&i)acc|=1<<j; - bitrev[i*2]=((~acc)&mask); - bitrev[i*2+1]=acc; - } - } -} - -void mdct_clear(mdct_lookup *l){ - if(l){ - if(l->trig)free(l->trig); - if(l->bitrev)free(l->bitrev); - memset(l,0,sizeof(mdct_lookup)); - } -} - -static double *_mdct_kernel(double *x, double *w, - int n, int n2, int n4, int n8, - mdct_lookup *init){ - int i; - /* step 2 */ - - { - double *xA=x+n4; - double *xB=x; - double *w2=w+n4; - double *A=init->trig+n2; - - for(i=0;i<n4;){ - double x0=*xA - *xB; - double x1; - w2[i]= *xA++ + *xB++; - - - x1= *xA - *xB; - A-=4; - - w[i++]= x0 * A[0] + x1 * A[1]; - w[i]= x1 * A[0] - x0 * A[1]; - - w2[i++]= *xA++ + *xB++; - - } - } - - /* step 3 */ - - { - int r,s; - for(i=0;i<init->log2n-3;i++){ - int k0=n>>(i+2); - int k1=1<<(i+3); - int wbase=n2-2; - double *A=init->trig; - double *temp; - - for(r=0;r<(k0>>2);r++){ - int w1=wbase; - int w2=w1-(k0>>1); - double AEv= A[0],wA; - double AOv= A[1],wB; - wbase-=2; - - k0++; - for(s=0;s<(2<<i);s++){ - wB =w[w1] -w[w2]; - x[w1] =w[w1] +w[w2]; - - wA =w[++w1] -w[++w2]; - x[w1] =w[w1] +w[w2]; - - x[w2] =wA*AEv - wB*AOv; - x[w2-1]=wB*AEv + wA*AOv; - - w1-=k0; - w2-=k0; - } - k0--; - - A+=k1; - } - - temp=w; - w=x; - x=temp; - } - } - - /* step 4, 5, 6, 7 */ - { - double *C=init->trig+n; - int *bit=init->bitrev; - double *x1=x; - double *x2=x+n2-1; - for(i=0;i<n8;i++){ - int t1=*bit++; - int t2=*bit++; - - double wA=w[t1]-w[t2+1]; - double wB=w[t1-1]+w[t2]; - double wC=w[t1]+w[t2+1]; - double wD=w[t1-1]-w[t2]; - - double wACE=wA* *C; - double wBCE=wB* *C++; - double wACO=wA* *C; - double wBCO=wB* *C++; - - *x1++=( wC+wACO+wBCE)*.5; - *x2--=(-wD+wBCO-wACE)*.5; - *x1++=( wD+wBCO-wACE)*.5; - *x2--=( wC-wACO-wBCE)*.5; - } - } - return(x); -} - -void mdct_forward(mdct_lookup *init, double *in, double *out){ - int n=init->n; - double *x=alloca(sizeof(double)*(n/2)); - double *w=alloca(sizeof(double)*(n/2)); - double *xx; - int n2=n>>1; - int n4=n>>2; - int n8=n>>3; - int i; - - /* window + rotate + step 1 */ - { - double tempA,tempB; - int in1=n2+n4-4; - int in2=in1+5; - double *A=init->trig+n2; - - i=0; - - for(i=0;i<n8;i+=2){ - A-=2; - tempA= in[in1+2] + in[in2]; - tempB= in[in1] + in[in2+2]; - in1 -=4;in2 +=4; - x[i]= tempB*A[1] + tempA*A[0]; - x[i+1]= tempB*A[0] - tempA*A[1]; - } - - in2=1; - - for(;i<n2-n8;i+=2){ - A-=2; - tempA= in[in1+2] - in[in2]; - tempB= in[in1] - in[in2+2]; - in1 -=4;in2 +=4; - x[i]= tempB*A[1] + tempA*A[0]; - x[i+1]= tempB*A[0] - tempA*A[1]; - } - - in1=n-4; - - for(;i<n2;i+=2){ - A-=2; - tempA= -in[in1+2] - in[in2]; - tempB= -in[in1] - in[in2+2]; - in1 -=4;in2 +=4; - x[i]= tempB*A[1] + tempA*A[0]; - x[i+1]= tempB*A[0] - tempA*A[1]; - } - } - - xx=_mdct_kernel(x,w,n,n2,n4,n8,init); - - /* step 8 */ - - { - double *B=init->trig+n2; - double *out2=out+n2; - double scale=4./n; - for(i=0;i<n4;i++){ - out[i] =(xx[0]*B[0]+xx[1]*B[1])*scale; - *(--out2)=(xx[0]*B[1]-xx[1]*B[0])*scale; - - xx+=2; - B+=2; - } - } -} - -void mdct_backward(mdct_lookup *init, double *in, double *out){ - int n=init->n; - double *x=alloca(sizeof(double)*(n/2)); - double *w=alloca(sizeof(double)*(n/2)); - double *xx; - int n2=n>>1; - int n4=n>>2; - int n8=n>>3; - int i; - - /* rotate + step 1 */ - { - double *inO=in+1; - double *xO= x; - double *A=init->trig+n2; - - for(i=0;i<n8;i++){ - A-=2; - *xO++=-*(inO+2)*A[1] - *inO*A[0]; - *xO++= *inO*A[1] - *(inO+2)*A[0]; - inO+=4; - } - - inO=in+n2-4; - - for(i=0;i<n8;i++){ - A-=2; - *xO++=*inO*A[1] + *(inO+2)*A[0]; - *xO++=*inO*A[0] - *(inO+2)*A[1]; - inO-=4; - } - - } - - xx=_mdct_kernel(x,w,n,n2,n4,n8,init); - - /* step 8 */ - - { - double *B=init->trig+n2; - int o1=n4,o2=o1-1; - int o3=n4+n2,o4=o3-1; - - for(i=0;i<n4;i++){ - double temp1= (*xx * B[1] - *(xx+1) * B[0]); - double temp2=-(*xx * B[0] + *(xx+1) * B[1]); - - out[o1]=-temp1; - out[o2]= temp1; - out[o3]= temp2; - out[o4]= temp2; - - o1++; - o2--; - o3++; - o4--; - xx+=2; - B+=2; - } - } -} diff --git a/lib/mdct.h b/lib/mdct.h deleted file mode 100644 index 06ee975f..00000000 --- a/lib/mdct.h +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: modified discrete cosine transform prototypes - last mod: $Id: mdct.h,v 1.11 2000/06/18 12:33:47 xiphmont Exp $ - - ********************************************************************/ - -#ifndef _OGG_mdct_H_ -#define _OGG_mdct_H_ - -#include "vorbis/codec.h" - -typedef struct { - int n; - int log2n; - - double *trig; - int *bitrev; - -} mdct_lookup; - -extern void mdct_init(mdct_lookup *lookup,int n); -extern void mdct_clear(mdct_lookup *l); -extern void mdct_forward(mdct_lookup *init, double *in, double *out); -extern void mdct_backward(mdct_lookup *init, double *in, double *out); - -#endif - - - - - - - - - - - - diff --git a/lib/misc.c b/lib/misc.c deleted file mode 100644 index 7534f4f5..00000000 --- a/lib/misc.c +++ /dev/null @@ -1,107 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ********************************************************************/ - -#define HEAD_ALIGN 32 -#include <pthread.h> -#include <stdlib.h> -#include <stdio.h> -#include "vorbis/codec.h" -#define MISC_C -#include "misc.h" - -static pthread_mutex_t memlock=PTHREAD_MUTEX_INITIALIZER; -void **pointers=NULL; -long *insertlist=NULL; /* We can't embed this in the pointer list; - a pointer can have any value... */ -int ptop=0; -int palloced=0; -int pinsert=0; - -typedef struct { - char *file; - long line; - long ptr; -} head; - -static void *_insert(void *ptr,char *file,long line){ - ((head *)ptr)->file=file; - ((head *)ptr)->line=line; - ((head *)ptr)->ptr=pinsert; - - pthread_mutex_lock(&memlock); - if(pinsert>=palloced){ - palloced+=64; - if(pointers){ - pointers=(void **)realloc(pointers,sizeof(void **)*palloced); - insertlist=(long *)realloc(insertlist,sizeof(long *)*palloced); - }else{ - pointers=(void **)malloc(sizeof(void **)*palloced); - insertlist=(long *)malloc(sizeof(long *)*palloced); - } - } - - pointers[pinsert]=ptr; - - if(pinsert==ptop) - pinsert=++ptop; - else - pinsert=insertlist[pinsert]; - - pthread_mutex_unlock(&memlock); - return(ptr+HEAD_ALIGN); -} - -static void _ripremove(void *ptr){ - int insert; - pthread_mutex_lock(&memlock); - insert=((head *)ptr)->ptr; - insertlist[insert]=pinsert; - pinsert=insert; - pointers[insert]=NULL; - pthread_mutex_unlock(&memlock); -} - -void _VDBG_dump(void){ - int i; - pthread_mutex_lock(&memlock); - for(i=0;i<ptop;i++){ - head *ptr=pointers[i]; - if(ptr) - fprintf(stderr,"unfreed bytes from %s:%ld\n", - ptr->file,ptr->line); - } - - pthread_mutex_unlock(&memlock); -} - -extern void *_VDBG_malloc(void *ptr,long bytes,char *file,long line){ - bytes+=HEAD_ALIGN; - if(ptr){ - ptr-=HEAD_ALIGN; - _ripremove(ptr); - ptr=realloc(ptr,bytes); - }else{ - ptr=malloc(bytes); - memset(ptr,0,bytes); - } - return _insert(ptr,file,line); -} - -extern void _VDBG_free(void *ptr,char *file,long line){ - if(ptr){ - ptr-=HEAD_ALIGN; - _ripremove(ptr); - free(ptr); - } -} - diff --git a/lib/misc.h b/lib/misc.h deleted file mode 100644 index 5e4eceb4..00000000 --- a/lib/misc.h +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: miscellaneous prototypes - last mod: $Id: misc.h,v 1.4 2000/05/08 20:49:49 xiphmont Exp $ - - ********************************************************************/ - -#ifndef _V_RANDOM_H_ -#define _V_RANDOM_H_ -#include "vorbis/codec.h" - -extern void *_vorbis_block_alloc(vorbis_block *vb,long bytes); -extern void _vorbis_block_ripcord(vorbis_block *vb); -extern void _analysis_output(char *base,int i,double *v,int n,int bark,int dB); - -#ifdef DEBUG_LEAKS -extern void *_VDBG_malloc(void *ptr,long bytes,char *file,long line); -extern void _VDBG_free(void *ptr,char *file,long line); - -#ifndef MISC_C -#undef malloc -#undef calloc -#undef realloc -#undef free - -#define malloc(x) _VDBG_malloc(NULL,(x),__FILE__,__LINE__) -#define calloc(x,y) _VDBG_malloc(NULL,(x)*(y),__FILE__,__LINE__) -#define realloc(x,y) _VDBG_malloc((x),(y),__FILE__,__LINE__) -#define free(x) _VDBG_free((x),__FILE__,__LINE__) -#endif -#endif - -#endif diff --git a/lib/os.h b/lib/os.h deleted file mode 100644 index 71586f55..00000000 --- a/lib/os.h +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef _OS_H -#define _OS_H -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: #ifdef jail to whip a few platforms into the UNIX ideal. - last mod: $Id: os.h,v 1.9 2000/08/23 06:38:49 xiphmont Exp $ - - ********************************************************************/ - -#include <math.h> -#ifndef _V_IFDEFJAIL_H_ -#define _V_IFDEFJAIL_H_ - -#ifndef M_PI -#define M_PI (3.1415926539) -#endif - -#ifndef __GNUC__ -#ifdef _WIN32 -# include <malloc.h> -# define rint(x) (floor((x)+0.5)) -#endif -#endif - -#ifdef _WIN32 -# define FAST_HYPOT(a, b) sqrt((a)*(a) + (b)*(b)) -#else /* if not _WIN32 */ -# define FAST_HYPOT hypot -#endif - -#endif - -#ifdef USE_ALLOCA_H -#include <alloca.h> -#endif - -#ifdef USE_MEMORY_H -#include <memory.h> -#endif - -#ifndef min -# define min(x,y) ((x)>(y)?(y):(x)) -#endif - -#ifndef max -# define max(x,y) ((x)<(y)?(y):(x)) -#endif - -#include "../include/vorbis/os_types.h" - -#endif /* _OS_H */ - - - diff --git a/lib/psy.c b/lib/psy.c deleted file mode 100644 index 38f5cfee..00000000 --- a/lib/psy.c +++ /dev/null @@ -1,710 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: psychoacoustics not including preecho - last mod: $Id: psy.c,v 1.26 2000/08/23 06:38:49 xiphmont Exp $ - - ********************************************************************/ - -#include <stdlib.h> -#include <math.h> -#include <string.h> -#include "vorbis/codec.h" - -#include "masking.h" -#include "psy.h" -#include "os.h" -#include "lpc.h" -#include "smallft.h" -#include "scales.h" -#include "misc.h" - -/* Why Bark scale for encoding but not masking computation? Because - masking has a strong harmonic dependancy */ - -/* the beginnings of real psychoacoustic infrastructure. This is - still not tightly tuned */ -void _vi_psy_free(vorbis_info_psy *i){ - if(i){ - memset(i,0,sizeof(vorbis_info_psy)); - free(i); - } -} - -/* Set up decibel threshhold slopes on a Bark frequency scale */ -/* ATH is the only bit left on a Bark scale. No reason to change it - right now */ -static void set_curve(double *ref,double *c,int n, double crate){ - int i,j=0; - - for(i=0;i<MAX_BARK-1;i++){ - int endpos=rint(fromBARK(i+1)*2*n/crate); - double base=ref[i]; - if(j<endpos){ - double delta=(ref[i+1]-base)/(endpos-j); - for(;j<endpos && j<n;j++){ - c[j]=base; - base+=delta; - } - } - } -} - -static void min_curve(double *c, - double *c2){ - int i; - for(i=0;i<EHMER_MAX;i++)if(c2[i]<c[i])c[i]=c2[i]; -} -static void max_curve(double *c, - double *c2){ - int i; - for(i=0;i<EHMER_MAX;i++)if(c2[i]>c[i])c[i]=c2[i]; -} - -static void attenuate_curve(double *c,double att){ - int i; - for(i=0;i<EHMER_MAX;i++) - c[i]+=att; -} - -static void linear_curve(double *c){ - int i; - for(i=0;i<EHMER_MAX;i++) - if(c[i]<=-200.) - c[i]=0.; - else - c[i]=fromdB(c[i]); -} - -static void interp_curve(double *c,double *c1,double *c2,double del){ - int i; - for(i=0;i<EHMER_MAX;i++) - c[i]=c2[i]*del+c1[i]*(1.-del); -} - -static void setup_curve(double **c, - int band, - double *curveatt_dB){ - int i,j; - double ath[EHMER_MAX]; - double tempc[P_LEVELS][EHMER_MAX]; - - memcpy(c[0],c[4],sizeof(double)*EHMER_MAX); - memcpy(c[2],c[4],sizeof(double)*EHMER_MAX); - - /* we add back in the ATH to avoid low level curves falling off to - -infinity and unneccessarily cutting off high level curves in the - curve limiting (last step). But again, remember... a half-band's - settings must be valid over the whole band, and it's better to - mask too little than too much, so be pessimal. */ - - for(i=0;i<EHMER_MAX;i++){ - double oc_min=band*.5-1+(i-EHMER_OFFSET)*.125; - double oc_max=band*.5-1+(i-EHMER_OFFSET+1)*.125; - double bark=toBARK(fromOC(oc_min)); - int ibark=floor(bark); - double del=bark-ibark; - double ath_min,ath_max; - - if(ibark<26) - ath_min=ATH_Bark_dB[ibark]*(1.-del)+ATH_Bark_dB[ibark+1]*del; - else - ath_min=200.; - - bark=toBARK(fromOC(oc_max)); - ibark=floor(bark); - del=bark-ibark; - - if(ibark<26) - ath_max=ATH_Bark_dB[ibark]*(1.-del)+ATH_Bark_dB[ibark+1]*del; - else - ath_max=200.; - - ath[i]=min(ath_min,ath_max); - } - - /* The c array is comes in as dB curves at 20 40 60 80 100 dB. - interpolate intermediate dB curves */ - for(i=1;i<P_LEVELS;i+=2){ - interp_curve(c[i],c[i-1],c[i+1],.5); - } - - /* normalize curves so the driving amplitude is 0dB */ - /* make temp curves with the ATH overlayed */ - for(i=0;i<P_LEVELS;i++){ - attenuate_curve(c[i],curveatt_dB[i]); - memcpy(tempc[i],ath,EHMER_MAX*sizeof(double)); - attenuate_curve(tempc[i],-i*10.); - max_curve(tempc[i],c[i]); - } - - /* Now limit the louder curves. - - the idea is this: We don't know what the playback attenuation - will be; 0dB SL moves every time the user twiddles the volume - knob. So that means we have to use a single 'most pessimal' curve - for all masking amplitudes, right? Wrong. The *loudest* sound - can be in (we assume) a range of ...+100dB] SL. However, sounds - 20dB down will be in a range ...+80], 40dB down is from ...+60], - etc... */ - - for(i=P_LEVELS-1;i>0;i--){ - for(j=0;j<i;j++) - min_curve(c[i],tempc[j]); - } - - /* take things out of dB domain into linear amplitude */ - for(i=0;i<P_LEVELS;i++) - linear_curve(c[i]); - -} - -void _vp_psy_init(vorbis_look_psy *p,vorbis_info_psy *vi,int n,long rate){ - long i,j; - memset(p,0,sizeof(vorbis_look_psy)); - p->ath=malloc(n*sizeof(double)); - p->octave=malloc(n*sizeof(int)); - p->bark=malloc(n*sizeof(double)); - p->vi=vi; - p->n=n; - - /* set up the lookups for a given blocksize and sample rate */ - /* Vorbis max sample rate is limited by 26 Bark (54kHz) */ - set_curve(ATH_Bark_dB, p->ath,n,rate); - for(i=0;i<n;i++) - p->ath[i]=fromdB(p->ath[i]); - for(i=0;i<n;i++) - p->bark[i]=toBARK(rate/(2*n)*i); - - for(i=0;i<n;i++){ - int oc=toOC((i+.5)*rate/(2*n))*2.+2; /* half octaves, actually */ - if(oc<0)oc=0; - if(oc>=P_BANDS)oc=P_BANDS-1; - p->octave[i]=oc; - } - - p->tonecurves=malloc(P_BANDS*sizeof(double **)); - p->noiseatt=malloc(P_BANDS*sizeof(double **)); - p->peakatt=malloc(P_BANDS*sizeof(double *)); - for(i=0;i<P_BANDS;i++){ - p->tonecurves[i]=malloc(P_LEVELS*sizeof(double *)); - p->noiseatt[i]=malloc(P_LEVELS*sizeof(double)); - p->peakatt[i]=malloc(P_LEVELS*sizeof(double)); - } - - for(i=0;i<P_BANDS;i++) - for(j=0;j<P_LEVELS;j++){ - p->tonecurves[i][j]=malloc(EHMER_MAX*sizeof(double)); - } - - /* OK, yeah, this was a silly way to do it */ - memcpy(p->tonecurves[0][4],tone_125_40dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[0][6],tone_125_60dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[0][8],tone_125_80dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[0][10],tone_125_100dB_SL,sizeof(double)*EHMER_MAX); - - memcpy(p->tonecurves[2][4],tone_125_40dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[2][6],tone_125_60dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[2][8],tone_125_80dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[2][10],tone_125_100dB_SL,sizeof(double)*EHMER_MAX); - - memcpy(p->tonecurves[4][4],tone_250_40dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[4][6],tone_250_60dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[4][8],tone_250_80dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[4][10],tone_250_100dB_SL,sizeof(double)*EHMER_MAX); - - memcpy(p->tonecurves[6][4],tone_500_40dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[6][6],tone_500_60dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[6][8],tone_500_80dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[6][10],tone_500_100dB_SL,sizeof(double)*EHMER_MAX); - - memcpy(p->tonecurves[8][4],tone_1000_40dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[8][6],tone_1000_60dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[8][8],tone_1000_80dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[8][10],tone_1000_100dB_SL,sizeof(double)*EHMER_MAX); - - memcpy(p->tonecurves[10][4],tone_2000_40dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[10][6],tone_2000_60dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[10][8],tone_2000_80dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[10][10],tone_2000_100dB_SL,sizeof(double)*EHMER_MAX); - - memcpy(p->tonecurves[12][4],tone_4000_40dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[12][6],tone_4000_60dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[12][8],tone_4000_80dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[12][10],tone_4000_100dB_SL,sizeof(double)*EHMER_MAX); - - memcpy(p->tonecurves[14][4],tone_8000_40dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[14][6],tone_8000_60dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[14][8],tone_8000_80dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[14][10],tone_8000_100dB_SL,sizeof(double)*EHMER_MAX); - - memcpy(p->tonecurves[16][4],tone_8000_40dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[16][6],tone_8000_60dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[16][8],tone_8000_80dB_SL,sizeof(double)*EHMER_MAX); - memcpy(p->tonecurves[16][10],tone_8000_100dB_SL,sizeof(double)*EHMER_MAX); - - /* interpolate curves between */ - for(i=1;i<P_BANDS;i+=2) - for(j=4;j<P_LEVELS;j+=2){ - memcpy(p->tonecurves[i][j],p->tonecurves[i-1][j],EHMER_MAX*sizeof(double)); - /*interp_curve(p->tonecurves[i][j], - p->tonecurves[i-1][j], - p->tonecurves[i+1][j],.5);*/ - min_curve(p->tonecurves[i][j],p->tonecurves[i+1][j]); - /*min_curve(p->tonecurves[i][j],p->tonecurves[i-1][j]);*/ - } - - /*for(i=0;i<P_BANDS-1;i++) - for(j=4;j<P_LEVELS;j+=2) - min_curve(p->tonecurves[i][j],p->tonecurves[i+1][j]);*/ - - /* set up the final curves */ - for(i=0;i<P_BANDS;i++) - setup_curve(p->tonecurves[i],i,vi->toneatt[i]); - - /* set up attenuation levels */ - for(i=0;i<P_BANDS;i++) - for(j=0;j<P_LEVELS;j++){ - p->peakatt[i][j]=fromdB(p->vi->peakatt[i][j]); - p->noiseatt[i][j]=fromdB(p->vi->noiseatt[i][j]); - } - -} - -void _vp_psy_clear(vorbis_look_psy *p){ - int i,j; - if(p){ - if(p->ath)free(p->ath); - if(p->octave)free(p->octave); - if(p->tonecurves){ - for(i=0;i<P_BANDS;i++){ - for(j=0;j<P_LEVELS;j++){ - free(p->tonecurves[i][j]); - } - free(p->noiseatt[i]); - free(p->tonecurves[i]); - free(p->peakatt[i]); - } - free(p->tonecurves); - free(p->noiseatt); - free(p->peakatt); - } - memset(p,0,sizeof(vorbis_look_psy)); - } -} - -static void compute_decay_fixed(vorbis_look_psy *p,double *f, double *decay, int n){ - /* handle decay */ - int i; - double decscale=fromdB(p->vi->decay_coeff*n); - double attscale=1./fromdB(p->vi->attack_coeff); - - static int frameno=0; - - for(i=10;i<n;i++){ - double pre=decay[i]; - if(decay[i]){ - double val=decay[i]*decscale; - double att=fabs(f[i]/val); - - if(att>attscale) - decay[i]=fabs(f[i]/attscale); - else - decay[i]=val; - }else{ - decay[i]=fabs(f[i]/attscale); - } - if(pre>f[i])f[i]=pre; - } -} - -static long _eights[EHMER_MAX+1]={ - 981,1069,1166,1272, - 1387,1512,1649,1798, - 1961,2139,2332,2543, - 2774,3025,3298,3597, - 3922,4277,4664,5087, - 5547,6049,6597,7194, - 7845,8555,9329,10173, - 11094,12098,13193,14387, - 15689,17109,18658,20347, - 22188,24196,26386,28774, - 31379,34219,37316,40693, - 44376,48393,52772,57549, - 62757,68437,74631,81386, - 88752,96785,105545,115097, - 125515}; - -static int seed_curve(double *flr, - double **curves, - double amp,double specmax, - int x,int n,double specatt, - int maxEH){ - int i; - double *curve; - - /* make this attenuation adjustable */ - int choice=(int)((todB(amp)-specmax+specatt)/10.+.5); - choice=max(choice,0); - choice=min(choice,P_LEVELS-1); - - for(i=maxEH;i>=0;i--) - if(((x*_eights[i])>>12)<n)break; - maxEH=i; - curve=curves[choice]; - - for(;i>=0;i--) - if(curve[i]>0.)break; - - for(;i>=0;i--){ - double lin=curve[i]; - if(lin>0.){ - double *fp=flr+((x*_eights[i])>>12); - lin*=amp; - if(*fp<lin)*fp=lin; - }else break; - } - return(maxEH); -} - -static void seed_peak(double *flr, - double *att, - double amp,double specmax, - int x,int n,double specatt){ - int prevx=(x*_eights[16])>>12; - - /* make this attenuation adjustable */ - int choice=rint((todB(amp)-specmax+specatt)/10.+.5); - if(choice<0)choice=0; - if(choice>=P_LEVELS)choice=P_LEVELS-1; - - if(prevx<n){ - double lin=att[choice]; - if(lin){ - lin*=amp; - if(flr[prevx]<lin)flr[prevx]=lin; - } - } -} - -static void seed_generic(vorbis_look_psy *p, - double ***curves, - double *f, - double *flr, - double *seeds, - double specmax){ - vorbis_info_psy *vi=p->vi; - long n=p->n,i; - int maxEH=EHMER_MAX-1; - - /* prime the working vector with peak values */ - /* Use the 125 Hz curve up to 125 Hz and 8kHz curve after 8kHz. */ - for(i=0;i<n;i++) - if(f[i]>flr[i]) - maxEH=seed_curve(seeds,curves[p->octave[i]], - f[i],specmax,i,n,vi->max_curve_dB,maxEH); -} - -static void seed_att(vorbis_look_psy *p, - double **att, - double *f, - double *flr, - double specmax){ - vorbis_info_psy *vi=p->vi; - long n=p->n,i; - - for(i=0;i<n;i++) - if(f[i]>flr[i]) - seed_peak(flr,att[p->octave[i]],f[i], - specmax,i,n,vi->max_curve_dB); -} - -static void seed_point(vorbis_look_psy *p, - double **att, - double *f, - double *flr, - double specmax){ - vorbis_info_psy *vi=p->vi; - long n=p->n,i; - - for(i=0;i<n;i++){ - /* make this attenuation adjustable */ - int choice=rint((todB(f[i])-specmax+vi->max_curve_dB)/10.+.5); - double lin; - if(choice<0)choice=0; - if(choice>=P_LEVELS)choice=P_LEVELS-1; - lin=att[p->octave[i]][choice]*f[i]; - if(flr[i]<lin)flr[i]=lin; - } -} - -/* bleaugh, this is more complicated than it needs to be */ -static void max_seeds(vorbis_look_psy *p,double *seeds,double *flr){ - long n=p->n,i,j; - long *posstack=alloca(n*sizeof(long)); - double *ampstack=alloca(n*sizeof(double)); - long stack=0; - - for(i=0;i<n;i++){ - if(stack<2){ - posstack[stack]=i; - ampstack[stack++]=seeds[i]; - }else{ - while(1){ - if(seeds[i]<ampstack[stack-1]){ - posstack[stack]=i; - ampstack[stack++]=seeds[i]; - break; - }else{ - if(i<posstack[stack-1]*1.0905077080){ - if(stack>1 && ampstack[stack-1]<ampstack[stack-2] && - i<posstack[stack-2]*1.0905077080){ - /* we completely overlap, making stack-1 irrelevant. pop it */ - stack--; - continue; - } - } - posstack[stack]=i; - ampstack[stack++]=seeds[i]; - break; - - } - } - } - } - - /* the stack now contains only the positions that are relevant. Scan - 'em straight through */ - { - long pos=0; - for(i=0;i<stack;i++){ - long endpos; - if(i<stack-1 && ampstack[i+1]>ampstack[i]){ - endpos=posstack[i+1]; - }else{ - endpos=posstack[i]*1.0905077080+1; /* +1 is important, else bin 0 is - discarded in short frames */ - } - if(endpos>n)endpos=n; - for(j=pos;j<endpos;j++) - if(flr[j]<ampstack[i]) - flr[j]=ampstack[i]; - pos=endpos; - } - } - - /* there. Linear time. I now remember this was on a problem set I - had in Grad Skool... I didn't solve it at the time ;-) */ -} - -static void bark_noise(long n,double *b,double *f,double *noise){ - long i=1,lo=0,hi=2; - double acc=0.,val,del=0.; - - double *norm=alloca(n*sizeof(double)); - double normacc=0; - - memset(noise,0,n*sizeof(double)); - memset(norm,0,n*sizeof(double)); - - while(hi<n){ - val=todB(f[i]*f[i])+400.; - del=1./(i-lo); - noise[lo]+=val*del; - noise[i]-=val*del; - norm[lo]+=del; - norm[i]-=del; - - del=1./(hi-i); - noise[i]-=val*del; - noise[hi]+=val*del; - norm[hi]+=del; - norm[i]-=del; - - - i++; - for(;hi<n && b[hi]-.3<b[i];hi++); - for(;lo<i-1 && b[lo]+.3<b[i];lo++); - if(i==hi)hi++; - } - - { - long ilo=i-lo; - long hii=hi-i; - long hilo=hi-lo; - - for(;i<n;i++){ - val=todB(f[i]*f[i])+400.; - del=1./(hii); - noise[i]-=val*del; - norm[i]-=del; - - del=1./(ilo); - noise[i-ilo]+=val*del; - noise[i]-=val*del; - norm[i-ilo]+=del; - norm[i]-=del; - } - for(i=1,lo=n-ilo;lo<n;lo++,i++){ - val=todB(f[n-i]*f[n-i])+400.; - del=1./ilo; - noise[lo]+=val*del; - norm[lo]+=del; - } - } - - - acc=0; - val=0; - - for(i=0;i<n;i++){ - val+=norm[i]; - norm[i]=val; - acc+=noise[i]; - noise[i]=acc; - } - - val=0; - acc=0; - for(i=0;i<n;i++){ - val+=norm[i]; - acc+=noise[i]; - if(val==0){ - noise[i]=0.; - norm[i]=0; - }else{ - double v=acc/val-400; - noise[i]=sqrt(fromdB(v)); - } - } -} - -/* stability doesn't matter */ -static int comp(const void *a,const void *b){ - if(fabs(**(double **)a)<fabs(**(double **)b)) - return(1); - else - return(-1); -} - -static int frameno=0; -void _vp_compute_mask(vorbis_look_psy *p,double *f, - double *flr, - double *decay){ - double *smooth=alloca(sizeof(double)*p->n); - int i,n=p->n; - double specmax=0.; - - double *seed=alloca(sizeof(double)*p->n); - double *seed2=alloca(sizeof(double)*p->n); - - memset(flr,0,n*sizeof(double)); - - /* noise masking */ - if(p->vi->noisemaskp){ - memset(seed,0,n*sizeof(double)); - bark_noise(n,p->bark,f,seed); - seed_point(p,p->noiseatt,seed,flr,specmax); - - } - - /* smooth the data is that's called for ********************************/ - for(i=0;i<n;i++)smooth[i]=fabs(f[i]); - if(p->vi->smoothp){ - /* compute power^.5 of three neighboring bins to smooth for peaks - that get split twixt bins/peaks that nail the bin. This evens - out treatment as we're not doing additive masking any longer. */ - double acc=smooth[0]*smooth[0]+smooth[1]*smooth[1]; - double prev=smooth[0]; - - smooth[0]=sqrt(acc); - for(i=1;i<n-1;i++){ - double this=smooth[i]; - acc+=smooth[i+1]*smooth[i+1]; - if(acc<0)acc=0; /* it can happen due to finite precision */ - smooth[i]=sqrt(acc); - acc-=prev*prev; - prev=this; - } - smooth[n-1]=sqrt(acc); - } - - /* find the highest peak so we know the limits *************************/ - for(i=0;i<n;i++){ - if(smooth[i]>specmax)specmax=smooth[i]; - } - specmax=todB(specmax); - - /* set the ATH (floating below specmax by a specified att) */ - if(p->vi->athp){ - double att=specmax+p->vi->ath_adjatt; - if(att<p->vi->ath_maxatt)att=p->vi->ath_maxatt; - att=fromdB(att); - - for(i=0;i<n;i++){ - double av=p->ath[i]*att; - if(av>flr[i])flr[i]=av; - } - } - - /* peak attenuation ******/ - if(p->vi->peakattp){ - memset(seed,0,n*sizeof(double)); - seed_att(p,p->peakatt,smooth,seed,specmax); - max_seeds(p,seed,flr); - } - - /* tone masking */ - if(p->vi->tonemaskp){ - memset(seed,0,n*sizeof(double)); - memset(seed2,0,n*sizeof(double)); - - seed_generic(p,p->tonecurves,smooth,flr,seed2,specmax); - max_seeds(p,seed2,seed2); - - for(i=0;i<n;i++)if(seed2[i]<flr[i])seed2[i]=flr[i]; - for(i=0;i<n;i++)if(seed2[i]<decay[i])seed2[i]=decay[i]; - - seed_generic(p,p->tonecurves,smooth,seed2,seed,specmax); - max_seeds(p,seed,seed); - - if(p->vi->decayp) - compute_decay_fixed(p,seed,decay,n); - - for(i=0;i<n;i++)if(flr[i]<seed[i])flr[i]=seed[i]; - - } - - frameno++; -} - - -/* this applies the floor and (optionally) tries to preserve noise - energy in low resolution portions of the spectrum */ -/* f and flr are *linear* scale, not dB */ -void _vp_apply_floor(vorbis_look_psy *p,double *f, double *flr){ - double *work=alloca(p->n*sizeof(double)); - int i,j,addcount=0; - - /* subtract the floor */ - for(j=0;j<p->n;j++){ - if(flr[j]<=0) - work[j]=0.; - else - work[j]=f[j]/flr[j]; - } - - memcpy(f,work,p->n*sizeof(double)); -} - - diff --git a/lib/psy.h b/lib/psy.h deleted file mode 100644 index c59beae3..00000000 --- a/lib/psy.h +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: random psychoacoustics (not including preecho) - last mod: $Id: psy.h,v 1.14 2000/08/15 09:09:43 xiphmont Exp $ - - ********************************************************************/ - -#ifndef _V_PSY_H_ -#define _V_PSY_H_ -#include "smallft.h" - -#ifndef EHMER_MAX -#define EHMER_MAX 56 -#endif - -typedef struct { - int n; - struct vorbis_info_psy *vi; - - double ***tonecurves; - double **peakatt; - double **noiseatt; - - double *ath; - int *octave; - double *bark; - -} vorbis_look_psy; - -extern void _vp_psy_init(vorbis_look_psy *p,vorbis_info_psy *vi,int n,long rate); -extern void _vp_psy_clear(vorbis_look_psy *p); -extern void *_vi_psy_dup(void *source); -extern void _vi_psy_free(vorbis_info_psy *i); -extern void _vp_compute_mask(vorbis_look_psy *p,double *f, - double *floor, - double *decay); -extern void _vp_apply_floor(vorbis_look_psy *p,double *f,double *flr); - -#endif - - diff --git a/lib/psytune.c b/lib/psytune.c deleted file mode 100644 index a3c03370..00000000 --- a/lib/psytune.c +++ /dev/null @@ -1,367 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: simple utility that runs audio through the psychoacoustics - without encoding - last mod: $Id: psytune.c,v 1.6 2000/08/19 11:46:28 xiphmont Exp $ - - ********************************************************************/ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <math.h> - -#include "vorbis/codec.h" -#include "os.h" -#include "psy.h" -#include "mdct.h" -#include "window.h" -#include "scales.h" -#include "lpc.h" - -static vorbis_info_psy _psy_set0={ - 1,/*athp*/ - 1,/*decayp*/ - 1,/*smoothp*/ - 0,.2, - - -100., - -140., - - /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */ - /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */ - /* y: 0 10 20 30 40 50 60 70 80 90 100 dB */ - - 1,/* tonemaskp */ - /* 0 10 20 30 40 50 60 70 80 90 100 */ - {{-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*63*/ - {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*88*/ - {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*125*/ - {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*175*/ - {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*250*/ - {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*350*/ - {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*500*/ - {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*700*/ - {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*1000*/ - {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*1400*/ - {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*2000*/ - {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*2800*/ - {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*4000*/ - {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*5600*/ - {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*8000*/ - {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*11500*/ - {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*16000*/ - }, - - 1,/* peakattp */ - {{-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*63*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*88*/ - {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*125*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/ - { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-16.,-17.}, /*8000*/ - { -6., -7., -9., -9., -9., -9.,-10.,-11.,-12.,-13.,-14.}, /*11500*/ - { -6., -6., -9., -9., -9., -9., -9., -9.,-10.,-11.,-12.}, /*16000*/ - }, - - 1,/*noisemaskp */ - /* 0 10 20 30 40 50 60 70 80 90 100 */ - {{-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*63*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*88*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*125*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*175*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*250*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*350*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*350*/ - {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*350*/ - { -6., -6., -6., -6., -6., -6., -6., -6., -6., -6., -6.}, /*2000*/ - { -6., -6., -6., -6., -6., -6., -6., -6., -6., -6., -6.}, /*2000*/ - { -6., -6., -6., -6., -6., -6., -6., -6., -6., -6., -6.}, /*2000*/ - { -6., -6., -6., -6., -6., -6., -6., -6., -6., -6., -6.}, /*2800*/ - { -0., -0., -0., -0., -0., -0., -0., -0., -0., -0., -0.}, /*4000*/ - { 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.}, /*5600*/ - { 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4.}, /*8000*/ - { 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4.}, /*11500*/ - { 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4.}, /*16000*/ - }, - - 110., - - -0, -.005, /* attack/decay control */ -}; - -static int noisy=0; -void analysis(char *base,int i,double *v,int n,int bark,int dB){ - if(noisy){ - int j; - FILE *of; - char buffer[80]; - sprintf(buffer,"%s_%d.m",base,i); - of=fopen(buffer,"w"); - - for(j=0;j<n;j++){ - if(dB && v[j]==0) - fprintf(of,"\n\n"); - else{ - if(bark) - fprintf(of,"%g ",toBARK(22050.*j/n)); - else - fprintf(of,"%g ",(double)j); - - if(dB){ - fprintf(of,"%g\n",todB(fabs(v[j]))); - }else{ - fprintf(of,"%g\n",v[j]); - } - } - } - fclose(of); - } -} - -typedef struct { - long n; - int ln; - int m; - int *linearmap; - - vorbis_info_floor0 *vi; - lpc_lookup lpclook; -} vorbis_look_floor0; - -extern double _curve_to_lpc(double *curve,double *lpc,vorbis_look_floor0 *l, - long frameno); -extern void _lsp_to_curve(double *curve,double *lpc,double amp, - vorbis_look_floor0 *l,char *name,long frameno); - -long frameno=0; - -/* hacked from floor0.c */ -static void floorinit(vorbis_look_floor0 *look,int n,int m,int ln){ - int j; - double scale; - look->m=m; - look->n=n; - look->ln=ln; - lpc_init(&look->lpclook,look->ln,look->m); - - scale=look->ln/toBARK(22050.); - - look->linearmap=malloc(look->n*sizeof(int)); - for(j=0;j<look->n;j++){ - int val=floor( toBARK(22050./n*j) *scale); - if(val>look->ln)val=look->ln; - look->linearmap[j]=val; - } -} - -int main(int argc,char *argv[]){ - int eos=0; - double nonz=0.; - double acc=0.; - double tot=0.; - - int framesize=2048; - int order=32; - int map=256; - - double *pcm[2],*out[2],*window,*decay[2],*lpc,*floor; - signed char *buffer,*buffer2; - mdct_lookup m_look; - vorbis_look_psy p_look; - long i,j,k; - - vorbis_look_floor0 floorlook; - - int ath=0; - int decayp=0; - - argv++; - while(*argv){ - if(*argv[0]=='-'){ - /* option */ - if(argv[0][1]=='v'){ - noisy=0; - } - if(argv[0][1]=='A'){ - ath=0; - } - if(argv[0][1]=='D'){ - decayp=0; - } - if(argv[0][1]=='X'){ - ath=0; - decayp=0; - } - }else - if(*argv[0]=='+'){ - /* option */ - if(argv[0][1]=='v'){ - noisy=1; - } - if(argv[0][1]=='A'){ - ath=1; - } - if(argv[0][1]=='D'){ - decayp=1; - } - if(argv[0][1]=='X'){ - ath=1; - decayp=1; - } - }else - framesize=atoi(argv[0]); - argv++; - } - - pcm[0]=malloc(framesize*sizeof(double)); - pcm[1]=malloc(framesize*sizeof(double)); - out[0]=calloc(framesize/2,sizeof(double)); - out[1]=calloc(framesize/2,sizeof(double)); - decay[0]=calloc(framesize/2,sizeof(double)); - decay[1]=calloc(framesize/2,sizeof(double)); - floor=malloc(framesize*sizeof(double)); - lpc=malloc(order*sizeof(double)); - buffer=malloc(framesize*4); - buffer2=buffer+framesize*2; - window=_vorbis_window(0,framesize,framesize/2,framesize/2); - mdct_init(&m_look,framesize); - _vp_psy_init(&p_look,&_psy_set0,framesize/2,44100); - floorinit(&floorlook,framesize/2,order,map); - - for(i=0;i<P_BANDS;i++) - for(j=0;j<P_LEVELS;j++) - analysis("Ptonecurve",i*100+j,p_look.tonecurves[i][j],EHMER_MAX,0,1); - - /* we cheat on the WAV header; we just bypass 44 bytes and never - verify that it matches 16bit/stereo/44.1kHz. */ - - fread(buffer,1,44,stdin); - fwrite(buffer,1,44,stdout); - memset(buffer,0,framesize*2); - - analysis("window",0,window,framesize,0,0); - - fprintf(stderr,"Processing for frame size %d...\n",framesize); - - while(!eos){ - long bytes=fread(buffer2,1,framesize*2,stdin); - if(bytes<framesize*2) - memset(buffer2+bytes,0,framesize*2-bytes); - - if(bytes!=0){ - - /* uninterleave samples */ - for(i=0;i<framesize;i++){ - pcm[0][i]=((buffer[i*4+1]<<8)| - (0x00ff&(int)buffer[i*4]))/32768.; - pcm[1][i]=((buffer[i*4+3]<<8)| - (0x00ff&(int)buffer[i*4+2]))/32768.; - } - - for(i=0;i<2;i++){ - double amp; - - analysis("pre",frameno,pcm[i],framesize,0,0); - - /* do the psychacoustics */ - for(j=0;j<framesize;j++) - pcm[i][j]*=window[j]; - - mdct_forward(&m_look,pcm[i],pcm[i]); - - analysis("mdct",frameno,pcm[i],framesize/2,1,1); - - _vp_compute_mask(&p_look,pcm[i],floor,decay[i]); - - analysis("prefloor",frameno,floor,framesize/2,1,1); - analysis("decay",frameno,decay[i],framesize/2,1,1); - - for(j=0;j<framesize/2;j++)floor[j]=todB(floor[j])+150; - amp=_curve_to_lpc(floor,lpc,&floorlook,frameno); - vorbis_lpc_to_lsp(lpc,lpc,order); - _lsp_to_curve(floor,lpc,sqrt(amp),&floorlook,"Ffloor",frameno); - for(j=0;j<framesize/2;j++)floor[j]=fromdB(floor[j]-150); - analysis("floor",frameno,floor,framesize/2,1,1); - - _vp_apply_floor(&p_look,pcm[i],floor); - /*r(j=0;j<framesize/2;j++) - if(fabs(pcm[i][j])<1.)pcm[i][j]=0;*/ - - analysis("quant",frameno,pcm[i],framesize/2,1,1); - - /* re-add floor */ - for(j=0;j<framesize/2;j++){ - double val=rint(pcm[i][j]); - tot++; - if(val){ - nonz++; - acc+=log(fabs(val)*2.+1.)/log(2); - pcm[i][j]=val*floor[j]; - }else{ - pcm[i][j]=0; - } - } - - analysis("final",frameno,pcm[i],framesize/2,1,1); - - /* take it back to time */ - mdct_backward(&m_look,pcm[i],pcm[i]); - for(j=0;j<framesize/2;j++) - out[i][j]+=pcm[i][j]*window[j]; - - frameno++; - } - - /* write data. Use the part of buffer we're about to shift out */ - for(i=0;i<2;i++){ - char *ptr=buffer+i*2; - double *mono=out[i]; - for(j=0;j<framesize/2;j++){ - int val=mono[j]*32767.; - /* might as well guard against clipping */ - if(val>32767)val=32767; - if(val<-32768)val=-32768; - ptr[0]=val&0xff; - ptr[1]=(val>>8)&0xff; - ptr+=4; - } - } - - fprintf(stderr,"*"); - fwrite(buffer,1,framesize*2,stdout); - memmove(buffer,buffer2,framesize*2); - - for(i=0;i<2;i++){ - for(j=0,k=framesize/2;j<framesize/2;j++,k++) - out[i][j]=pcm[i][k]*window[k]; - } - }else - eos=1; - } - fprintf(stderr,"average raw bits of entropy: %.03g/sample\n",acc/tot); - fprintf(stderr,"average nonzero samples: %.03g/%d\n",nonz/tot*framesize/2, - framesize/2); - fprintf(stderr,"Done\n\n"); - return 0; -} diff --git a/lib/registry.c b/lib/registry.c deleted file mode 100644 index 8e3d6611..00000000 --- a/lib/registry.c +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: registry for time, floor, res backends and channel mappings - last mod: $Id: registry.c,v 1.3 2000/03/10 13:21:18 xiphmont Exp $ - - ********************************************************************/ - -#include "vorbis/codec.h" -#include "registry.h" -#include "misc.h" - -/* seems like major overkill now; the backend numbers will grow into - the infrastructure soon enough */ - -extern vorbis_func_time time0_exportbundle; -extern vorbis_func_floor floor0_exportbundle; -extern vorbis_func_residue residue0_exportbundle; -extern vorbis_func_mapping mapping0_exportbundle; - -vorbis_func_time *_time_P[]={ - &time0_exportbundle, -}; - -vorbis_func_floor *_floor_P[]={ - &floor0_exportbundle, -}; - -vorbis_func_residue *_residue_P[]={ - &residue0_exportbundle, -}; - -vorbis_func_mapping *_mapping_P[]={ - &mapping0_exportbundle, -}; - diff --git a/lib/registry.h b/lib/registry.h deleted file mode 100644 index 7a13160d..00000000 --- a/lib/registry.h +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: registry for time, floor, res backends and channel mappings - last mod: $Id: registry.h,v 1.2 2000/01/22 13:28:30 xiphmont Exp $ - - ********************************************************************/ - -#ifndef _V_REG_H_ -#define _V_REG_H_ - -#define VI_TRANSFORMB 1 -#define VI_WINDOWB 1 -#define VI_TIMEB 1 -#define VI_FLOORB 1 -#define VI_RESB 1 -#define VI_MAPB 1 - -extern vorbis_func_time *_time_P[]; -extern vorbis_func_floor *_floor_P[]; -extern vorbis_func_residue *_residue_P[]; -extern vorbis_func_mapping *_mapping_P[]; - -#endif diff --git a/lib/res0.c b/lib/res0.c deleted file mode 100644 index c5428e95..00000000 --- a/lib/res0.c +++ /dev/null @@ -1,388 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: residue backend 0 implementation - last mod: $Id: res0.c,v 1.17 2000/08/15 09:09:43 xiphmont Exp $ - - ********************************************************************/ - -/* Slow, slow, slow, simpleminded and did I mention it was slow? The - encode/decode loops are coded for clarity and performance is not - yet even a nagging little idea lurking in the shadows. Oh and BTW, - it's slow. */ - -#include <stdlib.h> -#include <string.h> -#include <math.h> -#include <stdio.h> -#include "vorbis/codec.h" -#include "bitwise.h" -#include "registry.h" -#include "bookinternal.h" -#include "sharedbook.h" -#include "misc.h" -#include "os.h" - -typedef struct { - vorbis_info_residue0 *info; - int map; - - int parts; - codebook *phrasebook; - codebook ***partbooks; - - int partvals; - int **decodemap; -} vorbis_look_residue0; - -void free_info(vorbis_info_residue *i){ - if(i){ - memset(i,0,sizeof(vorbis_info_residue0)); - free(i); - } -} - -void free_look(vorbis_look_residue *i){ - int j; - if(i){ - vorbis_look_residue0 *look=(vorbis_look_residue0 *)i; - for(j=0;j<look->parts;j++) - if(look->partbooks[j])free(look->partbooks[j]); - free(look->partbooks); - for(j=0;j<look->partvals;j++) - free(look->decodemap[j]); - free(look->decodemap); - memset(i,0,sizeof(vorbis_look_residue0)); - free(i); - } -} - -void pack(vorbis_info_residue *vr,oggpack_buffer *opb){ - vorbis_info_residue0 *info=(vorbis_info_residue0 *)vr; - int j,acc=0; - _oggpack_write(opb,info->begin,24); - _oggpack_write(opb,info->end,24); - - _oggpack_write(opb,info->grouping-1,24); /* residue vectors to group and - code with a partitioned book */ - _oggpack_write(opb,info->partitions-1,6); /* possible partition choices */ - _oggpack_write(opb,info->groupbook,8); /* group huffman book */ - for(j=0;j<info->partitions;j++){ - _oggpack_write(opb,info->secondstages[j],4); /* zero *is* a valid choice */ - acc+=info->secondstages[j]; - } - for(j=0;j<acc;j++) - _oggpack_write(opb,info->booklist[j],8); - -} - -/* vorbis_info is for range checking */ -vorbis_info_residue *unpack(vorbis_info *vi,oggpack_buffer *opb){ - int j,acc=0; - vorbis_info_residue0 *info=calloc(1,sizeof(vorbis_info_residue0)); - - info->begin=_oggpack_read(opb,24); - info->end=_oggpack_read(opb,24); - info->grouping=_oggpack_read(opb,24)+1; - info->partitions=_oggpack_read(opb,6)+1; - info->groupbook=_oggpack_read(opb,8); - for(j=0;j<info->partitions;j++){ - int cascade=info->secondstages[j]=_oggpack_read(opb,4); - if(cascade>1)goto errout; /* temporary! when cascading gets - reworked and actually used, we don't - want old code to DTWT */ - acc+=cascade; - } - for(j=0;j<acc;j++) - info->booklist[j]=_oggpack_read(opb,8); - - if(info->groupbook>=vi->books)goto errout; - for(j=0;j<acc;j++) - if(info->booklist[j]>=vi->books)goto errout; - - return(info); - errout: - free_info(info); - return(NULL); -} - -vorbis_look_residue *look (vorbis_dsp_state *vd,vorbis_info_mode *vm, - vorbis_info_residue *vr){ - vorbis_info_residue0 *info=(vorbis_info_residue0 *)vr; - vorbis_look_residue0 *look=calloc(1,sizeof(vorbis_look_residue0)); - int j,k,acc=0; - int dim; - look->info=info; - look->map=vm->mapping; - - look->parts=info->partitions; - look->phrasebook=vd->fullbooks+info->groupbook; - dim=look->phrasebook->dim; - - look->partbooks=calloc(look->parts,sizeof(codebook **)); - - for(j=0;j<look->parts;j++){ - int stages=info->secondstages[j]; - if(stages){ - look->partbooks[j]=malloc(stages*sizeof(codebook *)); - for(k=0;k<stages;k++) - look->partbooks[j][k]=vd->fullbooks+info->booklist[acc++]; - } - } - - look->partvals=rint(pow(look->parts,dim)); - look->decodemap=malloc(look->partvals*sizeof(int *)); - for(j=0;j<look->partvals;j++){ - long val=j; - long mult=look->partvals/look->parts; - look->decodemap[j]=malloc(dim*sizeof(int)); - for(k=0;k<dim;k++){ - long deco=val/mult; - val-=deco*mult; - mult/=look->parts; - look->decodemap[j][k]=deco; - } - } - - return(look); -} - - -/* does not guard against invalid settings; eg, a subn of 16 and a - subgroup request of 32. Max subn of 128 */ -static int _testhack(double *vec,int n,vorbis_look_residue0 *look, - int auxparts,int auxpartnum){ - vorbis_info_residue0 *info=look->info; - int i,j=0; - double max,localmax=0.; - double temp[128]; - double entropy[8]; - - /* setup */ - for(i=0;i<n;i++)temp[i]=fabs(vec[i]); - - /* handle case subgrp==1 outside */ - for(i=0;i<n;i++) - if(temp[i]>localmax)localmax=temp[i]; - max=localmax; - - for(i=0;i<n;i++)temp[i]=rint(temp[i]); - - while(1){ - entropy[j]=localmax; - n>>=1; - j++; - - if(n<=0)break; - for(i=0;i<n;i++){ - temp[i]+=temp[i+n]; - } - localmax=0.; - for(i=0;i<n;i++) - if(temp[i]>localmax)localmax=temp[i]; - } - - for(i=0;i<auxparts-1;i++) - if(auxpartnum<info->blimit[i] && - entropy[info->subgrp[i]]<=info->entmax[i] && - max<=info->ampmax[i]) - break; - - return(i); -} - -static int _encodepart(oggpack_buffer *opb,double *vec, int n, - int stages, codebook **books,int mode,int part){ - int i,j,bits=0; - - for(j=0;j<stages;j++){ - int dim=books[j]->dim; - int step=n/dim; - for(i=0;i<step;i++){ - int entry=vorbis_book_besterror(books[j],vec+i,step,0); -#ifdef TRAIN_RESENT - { - char buf[80]; - FILE *f; - sprintf(buf,"res0_%da%d_%d.vqd",mode,j,part); - f=fopen(buf,"a"); - fprintf(f,"%d\n",entry); - fclose(f); - } -#endif - bits+=vorbis_book_encode(books[j],entry,opb); - } - } - - return(bits); -} - -static int _decodepart(oggpack_buffer *opb,double *work,double *vec, int n, - int stages, codebook **books){ - int i,j; - - memset(work,0,sizeof(double)*n); - for(j=0;j<stages;j++){ - int dim=books[j]->dim; - int step=n/dim; - for(i=0;i<step;i++) - if(vorbis_book_decodevs(books[j],work+i,opb,step,0)==-1) - return(-1); - } - - for(i=0;i<n;i++) - vec[i]*=work[i]; - - return(0); -} - -int forward(vorbis_block *vb,vorbis_look_residue *vl, - double **in,int ch){ - long i,j,k,l; - vorbis_look_residue0 *look=(vorbis_look_residue0 *)vl; - vorbis_info_residue0 *info=look->info; - - /* move all this setup out later */ - int samples_per_partition=info->grouping; - int possible_partitions=info->partitions; - int partitions_per_word=look->phrasebook->dim; - int n=info->end-info->begin; - long phrasebits=0,resbitsT=0; - long *resbits=alloca(sizeof(long)*possible_partitions); - long *resvals=alloca(sizeof(long)*possible_partitions); - - int partvals=n/samples_per_partition; - int partwords=(partvals+partitions_per_word-1)/partitions_per_word; - long **partword=_vorbis_block_alloc(vb,ch*sizeof(long *)); - - partvals=partwords*partitions_per_word; - - /* we find the patition type for each partition of each - channel. We'll go back and do the interleaved encoding in a - bit. For now, clarity */ - - memset(resbits,0,sizeof(long)*possible_partitions); - memset(resvals,0,sizeof(long)*possible_partitions); - - for(i=0;i<ch;i++){ - partword[i]=_vorbis_block_alloc(vb,n/samples_per_partition*sizeof(long)); - memset(partword[i],0,n/samples_per_partition*sizeof(long)); - } - - for(i=info->begin,l=0;i<info->end;i+=samples_per_partition,l++){ - for(j=0;j<ch;j++) - /* do the partition decision based on the number of 'bits' - needed to encode the block */ - partword[j][l]= - _testhack(in[j]+i,samples_per_partition,look,possible_partitions,l); - - } - /* we code the partition words for each channel, then the residual - words for a partition per channel until we've written all the - residual words for that partition word. Then write the next - parition channel words... */ - - for(i=info->begin,l=0;i<info->end;){ - /* first we encode a partition codeword for each channel */ - for(j=0;j<ch;j++){ - long val=partword[j][l]; - for(k=1;k<partitions_per_word;k++) - val= val*possible_partitions+partword[j][l+k]; - phrasebits+=vorbis_book_encode(look->phrasebook,val,&vb->opb); - } - /* now we encode interleaved residual values for the partitions */ - for(k=0;k<partitions_per_word;k++,l++,i+=samples_per_partition) - for(j=0;j<ch;j++){ - resbits[partword[j][l]]+= - _encodepart(&vb->opb,in[j]+i,samples_per_partition, - info->secondstages[partword[j][l]], - look->partbooks[partword[j][l]],look->map,partword[j][l]); - resvals[partword[j][l]]+=samples_per_partition; - } - - } - - for(i=0;i<possible_partitions;i++)resbitsT+=resbits[i]; - /*fprintf(stderr, - "Encoded %ld res vectors in %ld phrasing and %ld res bits\n\t", - ch*(info->end-info->begin),phrasebits,resbitsT); - for(i=0;i<possible_partitions;i++) - fprintf(stderr,"%ld(%ld):%ld ",i,resvals[i],resbits[i]); - fprintf(stderr,"\n");*/ - - return(0); -} - -/* a truncated packet here just means 'stop working'; it's not an error */ -int inverse(vorbis_block *vb,vorbis_look_residue *vl,double **in,int ch){ - long i,j,k,l,transend=vb->pcmend/2; - vorbis_look_residue0 *look=(vorbis_look_residue0 *)vl; - vorbis_info_residue0 *info=look->info; - - /* move all this setup out later */ - int samples_per_partition=info->grouping; - int partitions_per_word=look->phrasebook->dim; - int n=info->end-info->begin; - - int partvals=n/samples_per_partition; - int partwords=(partvals+partitions_per_word-1)/partitions_per_word; - int **partword=alloca(ch*sizeof(long *)); - double *work=alloca(sizeof(double)*samples_per_partition); - partvals=partwords*partitions_per_word; - - /* make sure we're zeroed up to the start */ - for(j=0;j<ch;j++) - memset(in[j],0,sizeof(double)*info->begin); - - for(i=info->begin,l=0;i<info->end;){ - /* fetch the partition word for each channel */ - for(j=0;j<ch;j++){ - int temp=vorbis_book_decode(look->phrasebook,&vb->opb); - if(temp==-1)goto eopbreak; - partword[j]=look->decodemap[temp]; - if(partword[j]==NULL)goto errout; - } - - /* now we decode interleaved residual values for the partitions */ - for(k=0;k<partitions_per_word;k++,l++,i+=samples_per_partition) - for(j=0;j<ch;j++){ - int part=partword[j][k]; - if(_decodepart(&vb->opb,work,in[j]+i,samples_per_partition, - info->secondstages[part], - look->partbooks[part])==-1)goto eopbreak; - } - } - - eopbreak: - if(i<transend){ - for(j=0;j<ch;j++) - memset(in[j]+i,0,sizeof(double)*(transend-i)); - } - - return(0); - - errout: - for(j=0;j<ch;j++) - memset(in[j],0,sizeof(double)*transend); - return(0); -} - -vorbis_func_residue residue0_exportbundle={ - &pack, - &unpack, - &look, - &free_info, - &free_look, - &forward, - &inverse -}; diff --git a/lib/scales.h b/lib/scales.h deleted file mode 100644 index 54ab4ea4..00000000 --- a/lib/scales.h +++ /dev/null @@ -1,51 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: linear scale -> dB, Bark and Mel scales - last mod: $Id: scales.h,v 1.5 2000/06/14 01:38:32 xiphmont Exp $ - - ********************************************************************/ - -#ifndef _V_SCALE_H_ -#define _V_SCALES_H_ - -#include <math.h> - -/* 20log10(x) */ -#define DYNAMIC_RANGE_dB 200. -#define todB(x) ((x)==0?-9.e40:log(fabs(x))*8.6858896) -#define fromdB(x) (exp((x)*.11512925)) - - -/* The bark scale equations are approximations, since the original - table was somewhat hand rolled. The below are chosen to have the - best possible fit to the rolled tables, thus their somewhat odd - appearance (these are more accurate and over a longer range than - the oft-quoted bark equations found in the texts I have). The - approximations are valid from 0 - 30kHz (nyquist) or so. - - all f in Hz, z in Bark */ - -#define toBARK(f) (13.1*atan(.00074*(f))+2.24*atan((f)*(f)*1.85e-8)+1e-4*(f)) -#define fromBARK(z) (102.*(z)-2.*pow(z,2.)+.4*pow(z,3)+pow(1.46,z)-1.) -#define toMEL(f) (log(1.+(f)*.001)*1442.695) -#define fromMEL(m) (1000.*exp((m)/1442.695)-1000.) - -/* Frequency to octave. We arbitrarily declare 125.0 Hz to be octave - 0.0 */ - -#define toOC(f) (log(f)*1.442695-6.965784) -#define fromOC(o) (exp(((o)+6.965784)*.693147)) - -#endif - diff --git a/lib/sharedbook.c b/lib/sharedbook.c deleted file mode 100644 index d4b9a37d..00000000 --- a/lib/sharedbook.c +++ /dev/null @@ -1,627 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: basic shared codebook operations - last mod: $Id: sharedbook.c,v 1.7 2000/07/19 18:10:46 xiphmont Exp $ - - ********************************************************************/ - -#include <stdlib.h> -#include <math.h> -#include <string.h> -#include "os.h" -#include "vorbis/codec.h" -#include "vorbis/codebook.h" -#include "bitwise.h" -#include "scales.h" -#include "sharedbook.h" - -/**** pack/unpack helpers ******************************************/ -int _ilog(unsigned int v){ - int ret=0; - while(v){ - ret++; - v>>=1; - } - return(ret); -} - -/* 32 bit float (not IEEE; nonnormalized mantissa + - biased exponent) : neeeeeee eeemmmmm mmmmmmmm mmmmmmmm - Why not IEEE? It's just not that important here. */ - -#define VQ_FEXP 10 -#define VQ_FMAN 21 -#define VQ_FEXP_BIAS 768 /* bias toward values smaller than 1. */ - -/* doesn't currently guard under/overflow */ -long _float32_pack(double val){ - int sign=0; - long exp; - long mant; - if(val<0){ - sign=0x80000000; - val= -val; - } - exp= floor(log(val)/log(2)); - mant=rint(ldexp(val,(VQ_FMAN-1)-exp)); - exp=(exp+VQ_FEXP_BIAS)<<VQ_FMAN; - - return(sign|exp|mant); -} - -double _float32_unpack(long val){ - double mant=val&0x1fffff; - double sign=val&0x80000000; - double exp =(val&0x7fe00000)>>VQ_FMAN; - if(sign)mant= -mant; - return(ldexp(mant,exp-(VQ_FMAN-1)-VQ_FEXP_BIAS)); -} - -/* given a list of word lengths, generate a list of codewords. Works - for length ordered or unordered, always assigns the lowest valued - codewords first. Extended to handle unused entries (length 0) */ -long *_make_words(long *l,long n){ - long i,j; - long marker[33]; - long *r=malloc(n*sizeof(long)); - memset(marker,0,sizeof(marker)); - - for(i=0;i<n;i++){ - long length=l[i]; - if(length>0){ - long entry=marker[length]; - - /* when we claim a node for an entry, we also claim the nodes - below it (pruning off the imagined tree that may have dangled - from it) as well as blocking the use of any nodes directly - above for leaves */ - - /* update ourself */ - if(length<32 && (entry>>length)){ - /* error condition; the lengths must specify an overpopulated tree */ - free(r); - return(NULL); - } - r[i]=entry; - - /* Look to see if the next shorter marker points to the node - above. if so, update it and repeat. */ - { - for(j=length;j>0;j--){ - - if(marker[j]&1){ - /* have to jump branches */ - if(j==1) - marker[1]++; - else - marker[j]=marker[j-1]<<1; - break; /* invariant says next upper marker would already - have been moved if it was on the same path */ - } - marker[j]++; - } - } - - /* prune the tree; the implicit invariant says all the longer - markers were dangling from our just-taken node. Dangle them - from our *new* node. */ - for(j=length+1;j<33;j++) - if((marker[j]>>1) == entry){ - entry=marker[j]; - marker[j]=marker[j-1]<<1; - }else - break; - } - } - - /* bitreverse the words because our bitwise packer/unpacker is LSb - endian */ - for(i=0;i<n;i++){ - long temp=0; - for(j=0;j<l[i];j++){ - temp<<=1; - temp|=(r[i]>>j)&1; - } - r[i]=temp; - } - - return(r); -} - -/* build the decode helper tree from the codewords */ -decode_aux *_make_decode_tree(codebook *c){ - const static_codebook *s=c->c; - long top=0,i,j; - decode_aux *t=malloc(sizeof(decode_aux)); - long *ptr0=t->ptr0=calloc(c->entries*2,sizeof(long)); - long *ptr1=t->ptr1=calloc(c->entries*2,sizeof(long)); - long *codelist=_make_words(s->lengthlist,s->entries); - - if(codelist==NULL)return(NULL); - t->aux=c->entries*2; - - for(i=0;i<c->entries;i++){ - if(s->lengthlist[i]>0){ - long ptr=0; - for(j=0;j<s->lengthlist[i]-1;j++){ - int bit=(codelist[i]>>j)&1; - if(!bit){ - if(!ptr0[ptr]) - ptr0[ptr]= ++top; - ptr=ptr0[ptr]; - }else{ - if(!ptr1[ptr]) - ptr1[ptr]= ++top; - ptr=ptr1[ptr]; - } - } - if(!((codelist[i]>>j)&1)) - ptr0[ptr]=-i; - else - ptr1[ptr]=-i; - } - } - free(codelist); - return(t); -} - -/* there might be a straightforward one-line way to do the below - that's portable and totally safe against roundoff, but I haven't - thought of it. Therefore, we opt on the side of caution */ -long _book_maptype1_quantvals(const static_codebook *b){ - long vals=floor(pow(b->entries,1./b->dim)); - - /* the above *should* be reliable, but we'll not assume that FP is - ever reliable when bitstream sync is at stake; verify via integer - means that vals really is the greatest value of dim for which - vals^b->bim <= b->entries */ - /* treat the above as an initial guess */ - while(1){ - long acc=1; - long acc1=1; - int i; - for(i=0;i<b->dim;i++){ - acc*=vals; - acc1*=vals+1; - } - if(acc<=b->entries && acc1>b->entries){ - return(vals); - }else{ - if(acc>b->entries){ - vals--; - }else{ - vals++; - } - } - } -} - -/* unpack the quantized list of values for encode/decode ***********/ -/* we need to deal with two map types: in map type 1, the values are - generated algorithmically (each column of the vector counts through - the values in the quant vector). in map type 2, all the values came - in in an explicit list. Both value lists must be unpacked */ -double *_book_unquantize(const static_codebook *b){ - long j,k; - if(b->maptype==1 || b->maptype==2){ - int quantvals; - double mindel=_float32_unpack(b->q_min); - double delta=_float32_unpack(b->q_delta); - double *r=calloc(b->entries*b->dim,sizeof(double)); - - /* maptype 1 and 2 both use a quantized value vector, but - different sizes */ - switch(b->maptype){ - case 1: - /* most of the time, entries%dimensions == 0, but we need to be - well defined. We define that the possible vales at each - scalar is values == entries/dim. If entries%dim != 0, we'll - have 'too few' values (values*dim<entries), which means that - we'll have 'left over' entries; left over entries use zeroed - values (and are wasted). So don't generate codebooks like - that */ - quantvals=_book_maptype1_quantvals(b); - for(j=0;j<b->entries;j++){ - double last=0.; - int indexdiv=1; - for(k=0;k<b->dim;k++){ - int index= (j/indexdiv)%quantvals; - double val=b->quantlist[index]; - val=fabs(val)*delta+mindel+last; - if(b->q_sequencep)last=val; - r[j*b->dim+k]=val; - indexdiv*=quantvals; - } - } - break; - case 2: - for(j=0;j<b->entries;j++){ - double last=0.; - for(k=0;k<b->dim;k++){ - double val=b->quantlist[j*b->dim+k]; - val=fabs(val)*delta+mindel+last; - if(b->q_sequencep)last=val; - r[j*b->dim+k]=val; - } - } - } - return(r); - } - return(NULL); -} - -void vorbis_staticbook_clear(static_codebook *b){ - if(b->quantlist)free(b->quantlist); - if(b->lengthlist)free(b->lengthlist); - if(b->nearest_tree){ - free(b->nearest_tree->ptr0); - free(b->nearest_tree->ptr1); - free(b->nearest_tree->p); - free(b->nearest_tree->q); - memset(b->nearest_tree,0,sizeof(encode_aux_nearestmatch)); - free(b->nearest_tree); - } - if(b->thresh_tree){ - free(b->thresh_tree->quantthresh); - free(b->thresh_tree->quantmap); - memset(b->thresh_tree,0,sizeof(encode_aux_threshmatch)); - free(b->thresh_tree); - } - memset(b,0,sizeof(static_codebook)); -} - -void vorbis_book_clear(codebook *b){ - /* static book is not cleared; we're likely called on the lookup and - the static codebook belongs to the info struct */ - if(b->decode_tree){ - free(b->decode_tree->ptr0); - free(b->decode_tree->ptr1); - memset(b->decode_tree,0,sizeof(decode_aux)); - free(b->decode_tree); - } - if(b->valuelist)free(b->valuelist); - if(b->codelist)free(b->codelist); - memset(b,0,sizeof(codebook)); -} - -int vorbis_book_init_encode(codebook *c,const static_codebook *s){ - memset(c,0,sizeof(codebook)); - c->c=s; - c->entries=s->entries; - c->dim=s->dim; - c->codelist=_make_words(s->lengthlist,s->entries); - c->valuelist=_book_unquantize(s); - return(0); -} - -int vorbis_book_init_decode(codebook *c,const static_codebook *s){ - memset(c,0,sizeof(codebook)); - c->c=s; - c->entries=s->entries; - c->dim=s->dim; - c->valuelist=_book_unquantize(s); - c->decode_tree=_make_decode_tree(c); - if(c->decode_tree==NULL)goto err_out; - return(0); - err_out: - vorbis_book_clear(c); - return(-1); -} - -static double _dist(int el,double *ref, double *b,int step){ - int i; - double acc=0.; - for(i=0;i<el;i++){ - double val=(ref[i]-b[i*step]); - acc+=val*val; - } - return(acc); -} - -#include <stdio.h> -int _best(codebook *book, double *a, int step){ - encode_aux_nearestmatch *nt=book->c->nearest_tree; - encode_aux_threshmatch *tt=book->c->thresh_tree; - encode_aux_pigeonhole *pt=book->c->pigeon_tree; - int dim=book->dim; - int ptr=0,k,o; - int savebest=-1; - double saverr; - - /* do we have a threshhold encode hint? */ - if(tt){ - int index=0; - /* find the quant val of each scalar */ - for(k=0,o=step*(dim-1);k<dim;k++,o-=step){ - int i; - /* linear search the quant list for now; it's small and although - with > 8 entries, it would be faster to bisect, this would be - a misplaced optimization for now */ - for(i=0;i<tt->threshvals-1;i++) - if(a[o]<tt->quantthresh[i])break; - - index=(index*tt->quantvals)+tt->quantmap[i]; - } - /* regular lattices are easy :-) */ - if(book->c->lengthlist[index]>0) /* is this unused? If so, we'll - use a decision tree after all - and fall through*/ - return(index); - } - - /* do we have a pigeonhole encode hint? */ - if(pt){ - const static_codebook *c=book->c; - int i,besti=-1; - double best; - int entry=0; - - /* dealing with sequentialness is a pain in the ass */ - if(c->q_sequencep){ - int pv; - long mul=1; - double qlast=0; - for(k=0,o=0;k<dim;k++,o+=step){ - pv=(int)((a[o]-qlast-pt->min)/pt->del); - if(pv<0 || pv>=pt->mapentries)break; - entry+=pt->pigeonmap[pv]*mul; - mul*=pt->quantvals; - qlast+=pv*pt->del+pt->min; - } - }else{ - for(k=0,o=step*(dim-1);k<dim;k++,o-=step){ - int pv=(int)((a[o]-pt->min)/pt->del); - if(pv<0 || pv>=pt->mapentries)break; - entry=entry*pt->quantvals+pt->pigeonmap[pv]; - } - } - - /* must be within the pigeonholable range; if we quant outside (or - in an entry that we define no list for), brute force it */ - if(k==dim && pt->fitlength[entry]){ - /* search the abbreviated list */ - long *list=pt->fitlist+pt->fitmap[entry]; - for(i=0;i<pt->fitlength[entry];i++){ - double this=_dist(dim,book->valuelist+list[i]*dim,a,step); - if(besti==-1 || this<best){ - best=this; - besti=list[i]; - } - } - - return(besti); - } - } - - if(nt){ - /* optimized using the decision tree */ - while(1){ - double c=0.; - double *p=book->valuelist+nt->p[ptr]; - double *q=book->valuelist+nt->q[ptr]; - - for(k=0,o=0;k<dim;k++,o+=step) - c+=(p[k]-q[k])*(a[o]-(p[k]+q[k])*.5); - - if(c>0.) /* in A */ - ptr= -nt->ptr0[ptr]; - else /* in B */ - ptr= -nt->ptr1[ptr]; - if(ptr<=0)break; - } - return(-ptr); - } - - /* brute force it! */ - { - const static_codebook *c=book->c; - int i,besti=-1; - double best; - double *e=book->valuelist; - for(i=0;i<book->entries;i++){ - if(c->lengthlist[i]>0){ - double this=_dist(dim,e,a,step); - if(besti==-1 || this<best){ - best=this; - besti=i; - } - } - e+=dim; - } - - /*if(savebest!=-1 && savebest!=besti){ - fprintf(stderr,"brute force/pigeonhole disagreement:\n" - "original:"); - for(i=0;i<dim*step;i+=step)fprintf(stderr,"%g,",a[i]); - fprintf(stderr,"\n" - "pigeonhole (entry %d, err %g):",savebest,saverr); - for(i=0;i<dim;i++)fprintf(stderr,"%g,", - (book->valuelist+savebest*dim)[i]); - fprintf(stderr,"\n" - "bruteforce (entry %d, err %g):",besti,best); - for(i=0;i<dim;i++)fprintf(stderr,"%g,", - (book->valuelist+besti*dim)[i]); - fprintf(stderr,"\n"); - }*/ - return(besti); - } -} - -/* returns the entry number and *modifies a* to the remainder value ********/ -int vorbis_book_besterror(codebook *book,double *a,int step,int addmul){ - int dim=book->dim,i,o; - int best=_best(book,a,step); - switch(addmul){ - case 0: - for(i=0,o=0;i<dim;i++,o+=step) - a[o]-=(book->valuelist+best*dim)[i]; - break; - case 1: - for(i=0,o=0;i<dim;i++,o+=step){ - double val=(book->valuelist+best*dim)[i]; - if(val==0){ - a[o]=0; - }else{ - a[o]/=val; - } - } - break; - } - return(best); -} - -long vorbis_book_codeword(codebook *book,int entry){ - return book->codelist[entry]; -} - -long vorbis_book_codelen(codebook *book,int entry){ - return book->c->lengthlist[entry]; -} - -#ifdef _V_SELFTEST - -/* Unit tests of the dequantizer; this stuff will be OK - cross-platform, I simply want to be sure that special mapping cases - actually work properly; a bug could go unnoticed for a while */ - -#include <stdio.h> - -/* cases: - - no mapping - full, explicit mapping - algorithmic mapping - - nonsequential - sequential -*/ - -static long full_quantlist1[]={0,1,2,3, 4,5,6,7, 8,3,6,1}; -static long partial_quantlist1[]={0,7,2}; - -/* no mapping */ -static_codebook test1={ - 4,16, - NULL, - 0, - 0,0,0,0, - NULL, - NULL,NULL -}; -static double *test1_result=NULL; - -/* linear, full mapping, nonsequential */ -static_codebook test2={ - 4,3, - NULL, - 2, - -533200896,1611661312,4,0, - full_quantlist1, - NULL,NULL -}; -static double test2_result[]={-3,-2,-1,0, 1,2,3,4, 5,0,3,-2}; - -/* linear, full mapping, sequential */ -static_codebook test3={ - 4,3, - NULL, - 2, - -533200896,1611661312,4,1, - full_quantlist1, - NULL,NULL -}; -static double test3_result[]={-3,-5,-6,-6, 1,3,6,10, 5,5,8,6}; - -/* linear, algorithmic mapping, nonsequential */ -static_codebook test4={ - 3,27, - NULL, - 1, - -533200896,1611661312,4,0, - partial_quantlist1, - NULL,NULL -}; -static double test4_result[]={-3,-3,-3, 4,-3,-3, -1,-3,-3, - -3, 4,-3, 4, 4,-3, -1, 4,-3, - -3,-1,-3, 4,-1,-3, -1,-1,-3, - -3,-3, 4, 4,-3, 4, -1,-3, 4, - -3, 4, 4, 4, 4, 4, -1, 4, 4, - -3,-1, 4, 4,-1, 4, -1,-1, 4, - -3,-3,-1, 4,-3,-1, -1,-3,-1, - -3, 4,-1, 4, 4,-1, -1, 4,-1, - -3,-1,-1, 4,-1,-1, -1,-1,-1}; - -/* linear, algorithmic mapping, sequential */ -static_codebook test5={ - 3,27, - NULL, - 1, - -533200896,1611661312,4,1, - partial_quantlist1, - NULL,NULL -}; -static double test5_result[]={-3,-6,-9, 4, 1,-2, -1,-4,-7, - -3, 1,-2, 4, 8, 5, -1, 3, 0, - -3,-4,-7, 4, 3, 0, -1,-2,-5, - -3,-6,-2, 4, 1, 5, -1,-4, 0, - -3, 1, 5, 4, 8,12, -1, 3, 7, - -3,-4, 0, 4, 3, 7, -1,-2, 2, - -3,-6,-7, 4, 1, 0, -1,-4,-5, - -3, 1, 0, 4, 8, 7, -1, 3, 2, - -3,-4,-5, 4, 3, 2, -1,-2,-3}; - -void run_test(static_codebook *b,double *comp){ - double *out=_book_unquantize(b); - int i; - - if(comp){ - if(!out){ - fprintf(stderr,"_book_unquantize incorrectly returned NULL\n"); - exit(1); - } - - for(i=0;i<b->entries*b->dim;i++) - if(fabs(out[i]-comp[i])>.0001){ - fprintf(stderr,"disagreement in unquantized and reference data:\n" - "position %d, %g != %g\n",i,out[i],comp[i]); - exit(1); - } - - }else{ - if(out){ - fprintf(stderr,"_book_unquantize returned a value array: \n" - " correct result should have been NULL\n"); - exit(1); - } - } -} - -int main(){ - /* run the nine dequant tests, and compare to the hand-rolled results */ - fprintf(stderr,"Dequant test 1... "); - run_test(&test1,test1_result); - fprintf(stderr,"OK\nDequant test 2... "); - run_test(&test2,test2_result); - fprintf(stderr,"OK\nDequant test 3... "); - run_test(&test3,test3_result); - fprintf(stderr,"OK\nDequant test 4... "); - run_test(&test4,test4_result); - fprintf(stderr,"OK\nDequant test 5... "); - run_test(&test5,test5_result); - fprintf(stderr,"OK\n\n"); - - return(0); -} - -#endif diff --git a/lib/sharedbook.h b/lib/sharedbook.h deleted file mode 100644 index df2c1fc4..00000000 --- a/lib/sharedbook.h +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: basic shared codebook operations - last mod: $Id: sharedbook.h,v 1.2 2000/05/08 20:49:50 xiphmont Exp $ - - ********************************************************************/ - -#ifndef _V_INT_SHCODEBOOK_H_ -#define _V_INT_SHCODEBOOK_H_ - -#include "vorbis/codebook.h" - -extern void vorbis_staticbook_clear(static_codebook *b); -extern int vorbis_book_init_encode(codebook *dest,const static_codebook *source); -extern int vorbis_book_init_decode(codebook *dest,const static_codebook *source); -extern void vorbis_book_clear(codebook *b); - -extern double *_book_unquantize(const static_codebook *b); -extern double *_book_logdist(const static_codebook *b,double *vals); -extern double _float32_unpack(long val); -extern long _float32_pack(double val); -extern int _best(codebook *book, double *a, int step); -extern int _ilog(unsigned int v); -extern long _book_maptype1_quantvals(const static_codebook *b); - -extern int vorbis_book_besterror(codebook *book,double *a,int step,int addmul); -extern long vorbis_book_codeword(codebook *book,int entry); -extern long vorbis_book_codelen(codebook *book,int entry); - - - -#endif diff --git a/lib/smallft.c b/lib/smallft.c deleted file mode 100644 index c75e451e..00000000 --- a/lib/smallft.c +++ /dev/null @@ -1,1255 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: *unnormalized* fft transform - last mod: $Id: smallft.c,v 1.8 2000/03/10 13:21:18 xiphmont Exp $ - -********************************************************************/ - -/* FFT implementation from OggSquish, minus cosine transforms, - * minus all but radix 2/4 case. In Vorbis we only need this - * cut-down version. - * - * To do more than just power-of-two sized vectors, see the full - * version I wrote for NetLib. - * - * Note that the packing is a little strange; rather than the FFT r/i - * packing following R_0, I_n, R_1, I_1, R_2, I_2 ... R_n-1, I_n-1, - * it follows R_0, R_1, I_1, R_2, I_2 ... R_n-1, I_n-1, I_n like the - * FORTRAN version - */ - -#include <stdlib.h> -#include <string.h> -#include <math.h> -#include "smallft.h" -#include "misc.h" - -static void drfti1(int n, double *wa, int *ifac){ - static int ntryh[4] = { 4,2,3,5 }; - static double tpi = 6.28318530717958647692528676655900577; - double arg,argh,argld,fi; - int ntry=0,i,j=-1; - int k1, l1, l2, ib; - int ld, ii, ip, is, nq, nr; - int ido, ipm, nfm1; - int nl=n; - int nf=0; - - L101: - j++; - if (j < 4) - ntry=ntryh[j]; - else - ntry+=2; - - L104: - nq=nl/ntry; - nr=nl-ntry*nq; - if (nr!=0) goto L101; - - nf++; - ifac[nf+1]=ntry; - nl=nq; - if(ntry!=2)goto L107; - if(nf==1)goto L107; - - for (i=1;i<nf;i++){ - ib=nf-i+1; - ifac[ib+1]=ifac[ib]; - } - ifac[2] = 2; - - L107: - if(nl!=1)goto L104; - ifac[0]=n; - ifac[1]=nf; - argh=tpi/n; - is=0; - nfm1=nf-1; - l1=1; - - if(nfm1==0)return; - - for (k1=0;k1<nfm1;k1++){ - ip=ifac[k1+2]; - ld=0; - l2=l1*ip; - ido=n/l2; - ipm=ip-1; - - for (j=0;j<ipm;j++){ - ld+=l1; - i=is; - argld=(double)ld*argh; - fi=0.; - for (ii=2;ii<ido;ii+=2){ - fi+=1.; - arg=fi*argld; - wa[i++]=cos(arg); - wa[i++]=sin(arg); - } - is+=ido; - } - l1=l2; - } -} - -static void fdrffti(int n, double *wsave, int *ifac){ - - if (n == 1) return; - drfti1(n, wsave+n, ifac); -} - -static void dradf2(int ido,int l1,double *cc,double *ch,double *wa1){ - int i,k; - double ti2,tr2; - int t0,t1,t2,t3,t4,t5,t6; - - t1=0; - t0=(t2=l1*ido); - t3=ido<<1; - for(k=0;k<l1;k++){ - ch[t1<<1]=cc[t1]+cc[t2]; - ch[(t1<<1)+t3-1]=cc[t1]-cc[t2]; - t1+=ido; - t2+=ido; - } - - if(ido<2)return; - if(ido==2)goto L105; - - t1=0; - t2=t0; - for(k=0;k<l1;k++){ - t3=t2; - t4=(t1<<1)+(ido<<1); - t5=t1; - t6=t1+t1; - for(i=2;i<ido;i+=2){ - t3+=2; - t4-=2; - t5+=2; - t6+=2; - tr2=wa1[i-2]*cc[t3-1]+wa1[i-1]*cc[t3]; - ti2=wa1[i-2]*cc[t3]-wa1[i-1]*cc[t3-1]; - ch[t6]=cc[t5]+ti2; - ch[t4]=ti2-cc[t5]; - ch[t6-1]=cc[t5-1]+tr2; - ch[t4-1]=cc[t5-1]-tr2; - } - t1+=ido; - t2+=ido; - } - - if(ido%2==1)return; - - L105: - t3=(t2=(t1=ido)-1); - t2+=t0; - for(k=0;k<l1;k++){ - ch[t1]=-cc[t2]; - ch[t1-1]=cc[t3]; - t1+=ido<<1; - t2+=ido; - t3+=ido; - } -} - -static void dradf4(int ido,int l1,double *cc,double *ch,double *wa1, - double *wa2,double *wa3){ - static double hsqt2 = .70710678118654752440084436210485; - int i,k,t0,t1,t2,t3,t4,t5,t6; - double ci2,ci3,ci4,cr2,cr3,cr4,ti1,ti2,ti3,ti4,tr1,tr2,tr3,tr4; - t0=l1*ido; - - t1=t0; - t4=t1<<1; - t2=t1+(t1<<1); - t3=0; - - for(k=0;k<l1;k++){ - tr1=cc[t1]+cc[t2]; - tr2=cc[t3]+cc[t4]; - - ch[t5=t3<<2]=tr1+tr2; - ch[(ido<<2)+t5-1]=tr2-tr1; - ch[(t5+=(ido<<1))-1]=cc[t3]-cc[t4]; - ch[t5]=cc[t2]-cc[t1]; - - t1+=ido; - t2+=ido; - t3+=ido; - t4+=ido; - } - - if(ido<2)return; - if(ido==2)goto L105; - - - t1=0; - for(k=0;k<l1;k++){ - t2=t1; - t4=t1<<2; - t5=(t6=ido<<1)+t4; - for(i=2;i<ido;i+=2){ - t3=(t2+=2); - t4+=2; - t5-=2; - - t3+=t0; - cr2=wa1[i-2]*cc[t3-1]+wa1[i-1]*cc[t3]; - ci2=wa1[i-2]*cc[t3]-wa1[i-1]*cc[t3-1]; - t3+=t0; - cr3=wa2[i-2]*cc[t3-1]+wa2[i-1]*cc[t3]; - ci3=wa2[i-2]*cc[t3]-wa2[i-1]*cc[t3-1]; - t3+=t0; - cr4=wa3[i-2]*cc[t3-1]+wa3[i-1]*cc[t3]; - ci4=wa3[i-2]*cc[t3]-wa3[i-1]*cc[t3-1]; - - tr1=cr2+cr4; - tr4=cr4-cr2; - ti1=ci2+ci4; - ti4=ci2-ci4; - - ti2=cc[t2]+ci3; - ti3=cc[t2]-ci3; - tr2=cc[t2-1]+cr3; - tr3=cc[t2-1]-cr3; - - ch[t4-1]=tr1+tr2; - ch[t4]=ti1+ti2; - - ch[t5-1]=tr3-ti4; - ch[t5]=tr4-ti3; - - ch[t4+t6-1]=ti4+tr3; - ch[t4+t6]=tr4+ti3; - - ch[t5+t6-1]=tr2-tr1; - ch[t5+t6]=ti1-ti2; - } - t1+=ido; - } - if(ido&1)return; - - L105: - - t2=(t1=t0+ido-1)+(t0<<1); - t3=ido<<2; - t4=ido; - t5=ido<<1; - t6=ido; - - for(k=0;k<l1;k++){ - ti1=-hsqt2*(cc[t1]+cc[t2]); - tr1=hsqt2*(cc[t1]-cc[t2]); - - ch[t4-1]=tr1+cc[t6-1]; - ch[t4+t5-1]=cc[t6-1]-tr1; - - ch[t4]=ti1-cc[t1+t0]; - ch[t4+t5]=ti1+cc[t1+t0]; - - t1+=ido; - t2+=ido; - t4+=t3; - t6+=ido; - } -} - -static void dradfg(int ido,int ip,int l1,int idl1,double *cc,double *c1, - double *c2,double *ch,double *ch2,double *wa){ - - static double tpi=6.28318530717958647692528676655900577; - int idij,ipph,i,j,k,l,ic,ik,is; - int t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; - double dc2,ai1,ai2,ar1,ar2,ds2; - int nbd; - double dcp,arg,dsp,ar1h,ar2h; - int idp2,ipp2; - - arg=tpi/(double)ip; - dcp=cos(arg); - dsp=sin(arg); - ipph=(ip+1)>>1; - ipp2=ip; - idp2=ido; - nbd=(ido-1)>>1; - t0=l1*ido; - t10=ip*ido; - - if(ido==1)goto L119; - for(ik=0;ik<idl1;ik++)ch2[ik]=c2[ik]; - - t1=0; - for(j=1;j<ip;j++){ - t1+=t0; - t2=t1; - for(k=0;k<l1;k++){ - ch[t2]=c1[t2]; - t2+=ido; - } - } - - is=-ido; - t1=0; - if(nbd>l1){ - for(j=1;j<ip;j++){ - t1+=t0; - is+=ido; - t2= -ido+t1; - for(k=0;k<l1;k++){ - idij=is-1; - t2+=ido; - t3=t2; - for(i=2;i<ido;i+=2){ - idij+=2; - t3+=2; - ch[t3-1]=wa[idij-1]*c1[t3-1]+wa[idij]*c1[t3]; - ch[t3]=wa[idij-1]*c1[t3]-wa[idij]*c1[t3-1]; - } - } - } - }else{ - - for(j=1;j<ip;j++){ - is+=ido; - idij=is-1; - t1+=t0; - t2=t1; - for(i=2;i<ido;i+=2){ - idij+=2; - t2+=2; - t3=t2; - for(k=0;k<l1;k++){ - ch[t3-1]=wa[idij-1]*c1[t3-1]+wa[idij]*c1[t3]; - ch[t3]=wa[idij-1]*c1[t3]-wa[idij]*c1[t3-1]; - t3+=ido; - } - } - } - } - - t1=0; - t2=ipp2*t0; - if(nbd<l1){ - for(j=1;j<ipph;j++){ - t1+=t0; - t2-=t0; - t3=t1; - t4=t2; - for(i=2;i<ido;i+=2){ - t3+=2; - t4+=2; - t5=t3-ido; - t6=t4-ido; - for(k=0;k<l1;k++){ - t5+=ido; - t6+=ido; - c1[t5-1]=ch[t5-1]+ch[t6-1]; - c1[t6-1]=ch[t5]-ch[t6]; - c1[t5]=ch[t5]+ch[t6]; - c1[t6]=ch[t6-1]-ch[t5-1]; - } - } - } - }else{ - for(j=1;j<ipph;j++){ - t1+=t0; - t2-=t0; - t3=t1; - t4=t2; - for(k=0;k<l1;k++){ - t5=t3; - t6=t4; - for(i=2;i<ido;i+=2){ - t5+=2; - t6+=2; - c1[t5-1]=ch[t5-1]+ch[t6-1]; - c1[t6-1]=ch[t5]-ch[t6]; - c1[t5]=ch[t5]+ch[t6]; - c1[t6]=ch[t6-1]-ch[t5-1]; - } - t3+=ido; - t4+=ido; - } - } - } - -L119: - for(ik=0;ik<idl1;ik++)c2[ik]=ch2[ik]; - - t1=0; - t2=ipp2*idl1; - for(j=1;j<ipph;j++){ - t1+=t0; - t2-=t0; - t3=t1-ido; - t4=t2-ido; - for(k=0;k<l1;k++){ - t3+=ido; - t4+=ido; - c1[t3]=ch[t3]+ch[t4]; - c1[t4]=ch[t4]-ch[t3]; - } - } - - ar1=1.; - ai1=0.; - t1=0; - t2=ipp2*idl1; - t3=(ip-1)*idl1; - for(l=1;l<ipph;l++){ - t1+=idl1; - t2-=idl1; - ar1h=dcp*ar1-dsp*ai1; - ai1=dcp*ai1+dsp*ar1; - ar1=ar1h; - t4=t1; - t5=t2; - t6=t3; - t7=idl1; - - for(ik=0;ik<idl1;ik++){ - ch2[t4++]=c2[ik]+ar1*c2[t7++]; - ch2[t5++]=ai1*c2[t6++]; - } - - dc2=ar1; - ds2=ai1; - ar2=ar1; - ai2=ai1; - - t4=idl1; - t5=(ipp2-1)*idl1; - for(j=2;j<ipph;j++){ - t4+=idl1; - t5-=idl1; - - ar2h=dc2*ar2-ds2*ai2; - ai2=dc2*ai2+ds2*ar2; - ar2=ar2h; - - t6=t1; - t7=t2; - t8=t4; - t9=t5; - for(ik=0;ik<idl1;ik++){ - ch2[t6++]+=ar2*c2[t8++]; - ch2[t7++]+=ai2*c2[t9++]; - } - } - } - - t1=0; - for(j=1;j<ipph;j++){ - t1+=idl1; - t2=t1; - for(ik=0;ik<idl1;ik++)ch2[ik]+=c2[t2++]; - } - - if(ido<l1)goto L132; - - t1=0; - t2=0; - for(k=0;k<l1;k++){ - t3=t1; - t4=t2; - for(i=0;i<ido;i++)cc[t4++]=ch[t3++]; - t1+=ido; - t2+=t10; - } - - goto L135; - - L132: - for(i=0;i<ido;i++){ - t1=i; - t2=i; - for(k=0;k<l1;k++){ - cc[t2]=ch[t1]; - t1+=ido; - t2+=t10; - } - } - - L135: - t1=0; - t2=ido<<1; - t3=0; - t4=ipp2*t0; - for(j=1;j<ipph;j++){ - - t1+=t2; - t3+=t0; - t4-=t0; - - t5=t1; - t6=t3; - t7=t4; - - for(k=0;k<l1;k++){ - cc[t5-1]=ch[t6]; - cc[t5]=ch[t7]; - t5+=t10; - t6+=ido; - t7+=ido; - } - } - - if(ido==1)return; - if(nbd<l1)goto L141; - - t1=-ido; - t3=0; - t4=0; - t5=ipp2*t0; - for(j=1;j<ipph;j++){ - t1+=t2; - t3+=t2; - t4+=t0; - t5-=t0; - t6=t1; - t7=t3; - t8=t4; - t9=t5; - for(k=0;k<l1;k++){ - for(i=2;i<ido;i+=2){ - ic=idp2-i; - cc[i+t7-1]=ch[i+t8-1]+ch[i+t9-1]; - cc[ic+t6-1]=ch[i+t8-1]-ch[i+t9-1]; - cc[i+t7]=ch[i+t8]+ch[i+t9]; - cc[ic+t6]=ch[i+t9]-ch[i+t8]; - } - t6+=t10; - t7+=t10; - t8+=ido; - t9+=ido; - } - } - return; - - L141: - - t1=-ido; - t3=0; - t4=0; - t5=ipp2*t0; - for(j=1;j<ipph;j++){ - t1+=t2; - t3+=t2; - t4+=t0; - t5-=t0; - for(i=2;i<ido;i+=2){ - t6=idp2+t1-i; - t7=i+t3; - t8=i+t4; - t9=i+t5; - for(k=0;k<l1;k++){ - cc[t7-1]=ch[t8-1]+ch[t9-1]; - cc[t6-1]=ch[t8-1]-ch[t9-1]; - cc[t7]=ch[t8]+ch[t9]; - cc[t6]=ch[t9]-ch[t8]; - t6+=t10; - t7+=t10; - t8+=ido; - t9+=ido; - } - } - } -} - -static void drftf1(int n,double *c,double *ch,double *wa,int *ifac){ - int i,k1,l1,l2; - int na,kh,nf; - int ip,iw,ido,idl1,ix2,ix3; - - nf=ifac[1]; - na=1; - l2=n; - iw=n; - - for(k1=0;k1<nf;k1++){ - kh=nf-k1; - ip=ifac[kh+1]; - l1=l2/ip; - ido=n/l2; - idl1=ido*l1; - iw-=(ip-1)*ido; - na=1-na; - - if(ip!=4)goto L102; - - ix2=iw+ido; - ix3=ix2+ido; - if(na!=0) - dradf4(ido,l1,ch,c,wa+iw-1,wa+ix2-1,wa+ix3-1); - else - dradf4(ido,l1,c,ch,wa+iw-1,wa+ix2-1,wa+ix3-1); - goto L110; - - L102: - if(ip!=2)goto L104; - if(na!=0)goto L103; - - dradf2(ido,l1,c,ch,wa+iw-1); - goto L110; - - L103: - dradf2(ido,l1,ch,c,wa+iw-1); - goto L110; - - L104: - if(ido==1)na=1-na; - if(na!=0)goto L109; - - dradfg(ido,ip,l1,idl1,c,c,c,ch,ch,wa+iw-1); - na=1; - goto L110; - - L109: - dradfg(ido,ip,l1,idl1,ch,ch,ch,c,c,wa+iw-1); - na=0; - - L110: - l2=l1; - } - - if(na==1)return; - - for(i=0;i<n;i++)c[i]=ch[i]; -} - -static void dradb2(int ido,int l1,double *cc,double *ch,double *wa1){ - int i,k,t0,t1,t2,t3,t4,t5,t6; - double ti2,tr2; - - t0=l1*ido; - - t1=0; - t2=0; - t3=(ido<<1)-1; - for(k=0;k<l1;k++){ - ch[t1]=cc[t2]+cc[t3+t2]; - ch[t1+t0]=cc[t2]-cc[t3+t2]; - t2=(t1+=ido)<<1; - } - - if(ido<2)return; - if(ido==2)goto L105; - - t1=0; - t2=0; - for(k=0;k<l1;k++){ - t3=t1; - t5=(t4=t2)+(ido<<1); - t6=t0+t1; - for(i=2;i<ido;i+=2){ - t3+=2; - t4+=2; - t5-=2; - t6+=2; - ch[t3-1]=cc[t4-1]+cc[t5-1]; - tr2=cc[t4-1]-cc[t5-1]; - ch[t3]=cc[t4]-cc[t5]; - ti2=cc[t4]+cc[t5]; - ch[t6-1]=wa1[i-2]*tr2-wa1[i-1]*ti2; - ch[t6]=wa1[i-2]*ti2+wa1[i-1]*tr2; - } - t2=(t1+=ido)<<1; - } - - if(ido%2==1)return; - -L105: - t1=ido-1; - t2=ido-1; - for(k=0;k<l1;k++){ - ch[t1]=cc[t2]+cc[t2]; - ch[t1+t0]=-(cc[t2+1]+cc[t2+1]); - t1+=ido; - t2+=ido<<1; - } -} - -static void dradb3(int ido,int l1,double *cc,double *ch,double *wa1, - double *wa2){ - static double taur = -.5; - static double taui = .86602540378443864676372317075293618; - int i,k,t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; - double ci2,ci3,di2,di3,cr2,cr3,dr2,dr3,ti2,tr2; - t0=l1*ido; - - t1=0; - t2=t0<<1; - t3=ido<<1; - t4=ido+(ido<<1); - t5=0; - for(k=0;k<l1;k++){ - tr2=cc[t3-1]+cc[t3-1]; - cr2=cc[t5]+(taur*tr2); - ch[t1]=cc[t5]+tr2; - ci3=taui*(cc[t3]+cc[t3]); - ch[t1+t0]=cr2-ci3; - ch[t1+t2]=cr2+ci3; - t1+=ido; - t3+=t4; - t5+=t4; - } - - if(ido==1)return; - - t1=0; - t3=ido<<1; - for(k=0;k<l1;k++){ - t7=t1+(t1<<1); - t6=(t5=t7+t3); - t8=t1; - t10=(t9=t1+t0)+t0; - - for(i=2;i<ido;i+=2){ - t5+=2; - t6-=2; - t7+=2; - t8+=2; - t9+=2; - t10+=2; - tr2=cc[t5-1]+cc[t6-1]; - cr2=cc[t7-1]+(taur*tr2); - ch[t8-1]=cc[t7-1]+tr2; - ti2=cc[t5]-cc[t6]; - ci2=cc[t7]+(taur*ti2); - ch[t8]=cc[t7]+ti2; - cr3=taui*(cc[t5-1]-cc[t6-1]); - ci3=taui*(cc[t5]+cc[t6]); - dr2=cr2-ci3; - dr3=cr2+ci3; - di2=ci2+cr3; - di3=ci2-cr3; - ch[t9-1]=wa1[i-2]*dr2-wa1[i-1]*di2; - ch[t9]=wa1[i-2]*di2+wa1[i-1]*dr2; - ch[t10-1]=wa2[i-2]*dr3-wa2[i-1]*di3; - ch[t10]=wa2[i-2]*di3+wa2[i-1]*dr3; - } - t1+=ido; - } -} - -static void dradb4(int ido,int l1,double *cc,double *ch,double *wa1, - double *wa2,double *wa3){ - static double sqrt2=1.4142135623730950488016887242097; - int i,k,t0,t1,t2,t3,t4,t5,t6,t7,t8; - double ci2,ci3,ci4,cr2,cr3,cr4,ti1,ti2,ti3,ti4,tr1,tr2,tr3,tr4; - t0=l1*ido; - - t1=0; - t2=ido<<2; - t3=0; - t6=ido<<1; - for(k=0;k<l1;k++){ - t4=t3+t6; - t5=t1; - tr3=cc[t4-1]+cc[t4-1]; - tr4=cc[t4]+cc[t4]; - tr1=cc[t3]-cc[(t4+=t6)-1]; - tr2=cc[t3]+cc[t4-1]; - ch[t5]=tr2+tr3; - ch[t5+=t0]=tr1-tr4; - ch[t5+=t0]=tr2-tr3; - ch[t5+=t0]=tr1+tr4; - t1+=ido; - t3+=t2; - } - - if(ido<2)return; - if(ido==2)goto L105; - - t1=0; - for(k=0;k<l1;k++){ - t5=(t4=(t3=(t2=t1<<2)+t6))+t6; - t7=t1; - for(i=2;i<ido;i+=2){ - t2+=2; - t3+=2; - t4-=2; - t5-=2; - t7+=2; - ti1=cc[t2]+cc[t5]; - ti2=cc[t2]-cc[t5]; - ti3=cc[t3]-cc[t4]; - tr4=cc[t3]+cc[t4]; - tr1=cc[t2-1]-cc[t5-1]; - tr2=cc[t2-1]+cc[t5-1]; - ti4=cc[t3-1]-cc[t4-1]; - tr3=cc[t3-1]+cc[t4-1]; - ch[t7-1]=tr2+tr3; - cr3=tr2-tr3; - ch[t7]=ti2+ti3; - ci3=ti2-ti3; - cr2=tr1-tr4; - cr4=tr1+tr4; - ci2=ti1+ti4; - ci4=ti1-ti4; - - ch[(t8=t7+t0)-1]=wa1[i-2]*cr2-wa1[i-1]*ci2; - ch[t8]=wa1[i-2]*ci2+wa1[i-1]*cr2; - ch[(t8+=t0)-1]=wa2[i-2]*cr3-wa2[i-1]*ci3; - ch[t8]=wa2[i-2]*ci3+wa2[i-1]*cr3; - ch[(t8+=t0)-1]=wa3[i-2]*cr4-wa3[i-1]*ci4; - ch[t8]=wa3[i-2]*ci4+wa3[i-1]*cr4; - } - t1+=ido; - } - - if(ido%2 == 1)return; - - L105: - - t1=ido; - t2=ido<<2; - t3=ido-1; - t4=ido+(ido<<1); - for(k=0;k<l1;k++){ - t5=t3; - ti1=cc[t1]+cc[t4]; - ti2=cc[t4]-cc[t1]; - tr1=cc[t1-1]-cc[t4-1]; - tr2=cc[t1-1]+cc[t4-1]; - ch[t5]=tr2+tr2; - ch[t5+=t0]=sqrt2*(tr1-ti1); - ch[t5+=t0]=ti2+ti2; - ch[t5+=t0]=-sqrt2*(tr1+ti1); - - t3+=ido; - t1+=t2; - t4+=t2; - } -} - -static void dradbg(int ido,int ip,int l1,int idl1,double *cc,double *c1, - double *c2,double *ch,double *ch2,double *wa){ - static double tpi=6.28318530717958647692528676655900577; - int idij,ipph,i,j,k,l,ik,is,t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10, - t11,t12; - double dc2,ai1,ai2,ar1,ar2,ds2; - int nbd; - double dcp,arg,dsp,ar1h,ar2h; - int ipp2; - - t10=ip*ido; - t0=l1*ido; - arg=tpi/(double)ip; - dcp=cos(arg); - dsp=sin(arg); - nbd=(ido-1)>>1; - ipp2=ip; - ipph=(ip+1)>>1; - if(ido<l1)goto L103; - - t1=0; - t2=0; - for(k=0;k<l1;k++){ - t3=t1; - t4=t2; - for(i=0;i<ido;i++){ - ch[t3]=cc[t4]; - t3++; - t4++; - } - t1+=ido; - t2+=t10; - } - goto L106; - - L103: - t1=0; - for(i=0;i<ido;i++){ - t2=t1; - t3=t1; - for(k=0;k<l1;k++){ - ch[t2]=cc[t3]; - t2+=ido; - t3+=t10; - } - t1++; - } - - L106: - t1=0; - t2=ipp2*t0; - t7=(t5=ido<<1); - for(j=1;j<ipph;j++){ - t1+=t0; - t2-=t0; - t3=t1; - t4=t2; - t6=t5; - for(k=0;k<l1;k++){ - ch[t3]=cc[t6-1]+cc[t6-1]; - ch[t4]=cc[t6]+cc[t6]; - t3+=ido; - t4+=ido; - t6+=t10; - } - t5+=t7; - } - - if (ido == 1)goto L116; - if(nbd<l1)goto L112; - - t1=0; - t2=ipp2*t0; - t7=0; - for(j=1;j<ipph;j++){ - t1+=t0; - t2-=t0; - t3=t1; - t4=t2; - - t7+=(ido<<1); - t8=t7; - for(k=0;k<l1;k++){ - t5=t3; - t6=t4; - t9=t8; - t11=t8; - for(i=2;i<ido;i+=2){ - t5+=2; - t6+=2; - t9+=2; - t11-=2; - ch[t5-1]=cc[t9-1]+cc[t11-1]; - ch[t6-1]=cc[t9-1]-cc[t11-1]; - ch[t5]=cc[t9]-cc[t11]; - ch[t6]=cc[t9]+cc[t11]; - } - t3+=ido; - t4+=ido; - t8+=t10; - } - } - goto L116; - - L112: - t1=0; - t2=ipp2*t0; - t7=0; - for(j=1;j<ipph;j++){ - t1+=t0; - t2-=t0; - t3=t1; - t4=t2; - t7+=(ido<<1); - t8=t7; - t9=t7; - for(i=2;i<ido;i+=2){ - t3+=2; - t4+=2; - t8+=2; - t9-=2; - t5=t3; - t6=t4; - t11=t8; - t12=t9; - for(k=0;k<l1;k++){ - ch[t5-1]=cc[t11-1]+cc[t12-1]; - ch[t6-1]=cc[t11-1]-cc[t12-1]; - ch[t5]=cc[t11]-cc[t12]; - ch[t6]=cc[t11]+cc[t12]; - t5+=ido; - t6+=ido; - t11+=t10; - t12+=t10; - } - } - } - -L116: - ar1=1.; - ai1=0.; - t1=0; - t9=(t2=ipp2*idl1); - t3=(ip-1)*idl1; - for(l=1;l<ipph;l++){ - t1+=idl1; - t2-=idl1; - - ar1h=dcp*ar1-dsp*ai1; - ai1=dcp*ai1+dsp*ar1; - ar1=ar1h; - t4=t1; - t5=t2; - t6=0; - t7=idl1; - t8=t3; - for(ik=0;ik<idl1;ik++){ - c2[t4++]=ch2[t6++]+ar1*ch2[t7++]; - c2[t5++]=ai1*ch2[t8++]; - } - dc2=ar1; - ds2=ai1; - ar2=ar1; - ai2=ai1; - - t6=idl1; - t7=t9-idl1; - for(j=2;j<ipph;j++){ - t6+=idl1; - t7-=idl1; - ar2h=dc2*ar2-ds2*ai2; - ai2=dc2*ai2+ds2*ar2; - ar2=ar2h; - t4=t1; - t5=t2; - t11=t6; - t12=t7; - for(ik=0;ik<idl1;ik++){ - c2[t4++]+=ar2*ch2[t11++]; - c2[t5++]+=ai2*ch2[t12++]; - } - } - } - - t1=0; - for(j=1;j<ipph;j++){ - t1+=idl1; - t2=t1; - for(ik=0;ik<idl1;ik++)ch2[ik]+=ch2[t2++]; - } - - t1=0; - t2=ipp2*t0; - for(j=1;j<ipph;j++){ - t1+=t0; - t2-=t0; - t3=t1; - t4=t2; - for(k=0;k<l1;k++){ - ch[t3]=c1[t3]-c1[t4]; - ch[t4]=c1[t3]+c1[t4]; - t3+=ido; - t4+=ido; - } - } - - if(ido==1)goto L132; - if(nbd<l1)goto L128; - - t1=0; - t2=ipp2*t0; - for(j=1;j<ipph;j++){ - t1+=t0; - t2-=t0; - t3=t1; - t4=t2; - for(k=0;k<l1;k++){ - t5=t3; - t6=t4; - for(i=2;i<ido;i+=2){ - t5+=2; - t6+=2; - ch[t5-1]=c1[t5-1]-c1[t6]; - ch[t6-1]=c1[t5-1]+c1[t6]; - ch[t5]=c1[t5]+c1[t6-1]; - ch[t6]=c1[t5]-c1[t6-1]; - } - t3+=ido; - t4+=ido; - } - } - goto L132; - - L128: - t1=0; - t2=ipp2*t0; - for(j=1;j<ipph;j++){ - t1+=t0; - t2-=t0; - t3=t1; - t4=t2; - for(i=2;i<ido;i+=2){ - t3+=2; - t4+=2; - t5=t3; - t6=t4; - for(k=0;k<l1;k++){ - ch[t5-1]=c1[t5-1]-c1[t6]; - ch[t6-1]=c1[t5-1]+c1[t6]; - ch[t5]=c1[t5]+c1[t6-1]; - ch[t6]=c1[t5]-c1[t6-1]; - t5+=ido; - t6+=ido; - } - } - } - -L132: - if(ido==1)return; - - for(ik=0;ik<idl1;ik++)c2[ik]=ch2[ik]; - - t1=0; - for(j=1;j<ip;j++){ - t2=(t1+=t0); - for(k=0;k<l1;k++){ - c1[t2]=ch[t2]; - t2+=ido; - } - } - - if(nbd>l1)goto L139; - - is= -ido-1; - t1=0; - for(j=1;j<ip;j++){ - is+=ido; - t1+=t0; - idij=is; - t2=t1; - for(i=2;i<ido;i+=2){ - t2+=2; - idij+=2; - t3=t2; - for(k=0;k<l1;k++){ - c1[t3-1]=wa[idij-1]*ch[t3-1]-wa[idij]*ch[t3]; - c1[t3]=wa[idij-1]*ch[t3]+wa[idij]*ch[t3-1]; - t3+=ido; - } - } - } - return; - - L139: - is= -ido-1; - t1=0; - for(j=1;j<ip;j++){ - is+=ido; - t1+=t0; - t2=t1; - for(k=0;k<l1;k++){ - idij=is; - t3=t2; - for(i=2;i<ido;i+=2){ - idij+=2; - t3+=2; - c1[t3-1]=wa[idij-1]*ch[t3-1]-wa[idij]*ch[t3]; - c1[t3]=wa[idij-1]*ch[t3]+wa[idij]*ch[t3-1]; - } - t2+=ido; - } - } -} - -static void drftb1(int n, double *c, double *ch, double *wa, int *ifac){ - int i,k1,l1,l2; - int na; - int nf,ip,iw,ix2,ix3,ido,idl1; - - nf=ifac[1]; - na=0; - l1=1; - iw=1; - - for(k1=0;k1<nf;k1++){ - ip=ifac[k1 + 2]; - l2=ip*l1; - ido=n/l2; - idl1=ido*l1; - if(ip!=4)goto L103; - ix2=iw+ido; - ix3=ix2+ido; - - if(na!=0) - dradb4(ido,l1,ch,c,wa+iw-1,wa+ix2-1,wa+ix3-1); - else - dradb4(ido,l1,c,ch,wa+iw-1,wa+ix2-1,wa+ix3-1); - na=1-na; - goto L115; - - L103: - if(ip!=2)goto L106; - - if(na!=0) - dradb2(ido,l1,ch,c,wa+iw-1); - else - dradb2(ido,l1,c,ch,wa+iw-1); - na=1-na; - goto L115; - - L106: - if(ip!=3)goto L109; - - ix2=iw+ido; - if(na!=0) - dradb3(ido,l1,ch,c,wa+iw-1,wa+ix2-1); - else - dradb3(ido,l1,c,ch,wa+iw-1,wa+ix2-1); - na=1-na; - goto L115; - - L109: -/* The radix five case can be translated later..... */ -/* if(ip!=5)goto L112; - - ix2=iw+ido; - ix3=ix2+ido; - ix4=ix3+ido; - if(na!=0) - dradb5(ido,l1,ch,c,wa+iw-1,wa+ix2-1,wa+ix3-1,wa+ix4-1); - else - dradb5(ido,l1,c,ch,wa+iw-1,wa+ix2-1,wa+ix3-1,wa+ix4-1); - na=1-na; - goto L115; - - L112:*/ - if(na!=0) - dradbg(ido,ip,l1,idl1,ch,ch,ch,c,c,wa+iw-1); - else - dradbg(ido,ip,l1,idl1,c,c,c,ch,ch,wa+iw-1); - if(ido==1)na=1-na; - - L115: - l1=l2; - iw+=(ip-1)*ido; - } - - if(na==0)return; - - for(i=0;i<n;i++)c[i]=ch[i]; -} - -void drft_forward(drft_lookup *l,double *data){ - if(l->n==1)return; - drftf1(l->n,data,l->trigcache,l->trigcache+l->n,l->splitcache); -} - -void drft_backward(drft_lookup *l,double *data){ - if (l->n==1)return; - drftb1(l->n,data,l->trigcache,l->trigcache+l->n,l->splitcache); -} - -void drft_init(drft_lookup *l,int n){ - l->n=n; - l->trigcache=calloc(3*n,sizeof(double)); - l->splitcache=calloc(32,sizeof(int)); - fdrffti(n, l->trigcache, l->splitcache); -} - -void drft_clear(drft_lookup *l){ - if(l){ - if(l->trigcache)free(l->trigcache); - if(l->splitcache)free(l->splitcache); - memset(l,0,sizeof(drft_lookup)); - } -} diff --git a/lib/smallft.h b/lib/smallft.h deleted file mode 100644 index 69e9b584..00000000 --- a/lib/smallft.h +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: fft transform - last mod: $Id: smallft.h,v 1.6 2000/01/22 13:28:32 xiphmont Exp $ - -********************************************************************/ - -#ifndef _V_SMFT_H_ -#define _V_SMFT_H_ - -#include "vorbis/codec.h" - -typedef struct { - int n; - double *trigcache; - int *splitcache; -} drft_lookup; - -extern void drft_forward(drft_lookup *l,double *data); -extern void drft_backward(drft_lookup *l,double *data); -extern void drft_init(drft_lookup *l,int n); -extern void drft_clear(drft_lookup *l); - -#endif diff --git a/lib/spectrum.h b/lib/spectrum.h deleted file mode 100644 index bafc25c8..00000000 --- a/lib/spectrum.h +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: spectrum envelope and residue code/decode - last mod: $Id: spectrum.h,v 1.4 2000/01/04 09:05:04 xiphmont Exp $ - - ********************************************************************/ - -#ifndef _V_SPECT_H_ -#define _V_SPECT_H_ - -extern int _vs_spectrum_encode(vorbis_block *vb,double amp,double *lsp); -extern int _vs_spectrum_decode(vorbis_block *vb,double *amp,double *lsp); -extern void _vs_residue_quantize(double *data,double *curve, - vorbis_info *vi,int n); -extern int _vs_residue_encode(vorbis_block *vb,double *data); -extern int _vs_residue_decode(vorbis_block *vb,double *data); - -extern void _vs_residue_train(vorbis_block *vb,double *data,double *curve, - int n); - -#endif diff --git a/lib/synthesis.c b/lib/synthesis.c deleted file mode 100644 index 00c90080..00000000 --- a/lib/synthesis.c +++ /dev/null @@ -1,74 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: single-block PCM synthesis - last mod: $Id: synthesis.c,v 1.17 2000/07/07 00:53:10 xiphmont Exp $ - - ********************************************************************/ - -#include <stdio.h> -#include "vorbis/codec.h" -#include "registry.h" -#include "bitwise.h" -#include "misc.h" -#include "os.h" - -int vorbis_synthesis(vorbis_block *vb,ogg_packet *op){ - vorbis_dsp_state *vd=vb->vd; - vorbis_info *vi=vd->vi; - oggpack_buffer *opb=&vb->opb; - int type,mode,i; - - /* first things first. Make sure decode is ready */ - _vorbis_block_ripcord(vb); - _oggpack_readinit(opb,op->packet,op->bytes); - - /* Check the packet type */ - if(_oggpack_read(opb,1)!=0){ - /* Oops. This is not an audio data packet */ - return(-1); - } - - /* read our mode and pre/post windowsize */ - mode=_oggpack_read(opb,vd->modebits); - if(mode==-1)return(-1); - - vb->mode=mode; - vb->W=vi->mode_param[mode]->blockflag; - if(vb->W){ - vb->lW=_oggpack_read(opb,1); - vb->nW=_oggpack_read(opb,1); - if(vb->nW==-1) return(-1); - }else{ - vb->lW=0; - vb->nW=0; - } - - /* more setup */ - vb->frameno=op->frameno; - vb->sequence=op->packetno-3; /* first block is third packet */ - vb->eofflag=op->e_o_s; - - /* alloc pcm passback storage */ - vb->pcmend=vi->blocksizes[vb->W]; - vb->pcm=_vorbis_block_alloc(vb,sizeof(double *)*vi->channels); - for(i=0;i<vi->channels;i++) - vb->pcm[i]=_vorbis_block_alloc(vb,vb->pcmend*sizeof(double)); - - /* unpack_header enforces range checking */ - type=vi->map_type[vi->mode_param[mode]->mapping]; - - return(_mapping_P[type]->inverse(vb,vd->mode[mode])); -} - - diff --git a/lib/time0.c b/lib/time0.c deleted file mode 100644 index 6344a485..00000000 --- a/lib/time0.c +++ /dev/null @@ -1,51 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: time backend 0 (dummy) - last mod: $Id: time0.c,v 1.5 2000/03/10 13:21:18 xiphmont Exp $ - - ********************************************************************/ - -#include <stdlib.h> -#include <string.h> -#include "vorbis/codec.h" -#include "registry.h" -#include "misc.h" - -static void pack (vorbis_info_time *i,oggpack_buffer *opb){ -} -static vorbis_info_time *unpack (vorbis_info *vi,oggpack_buffer *opb){ - return ""; - -} -static vorbis_look_time *look (vorbis_dsp_state *vd,vorbis_info_mode *mi, - vorbis_info_time *i){ - return ""; -} -static void free_info(vorbis_info_time *i){ -} -static void free_look(vorbis_look_time *i){ -} -static int forward(vorbis_block *vb,vorbis_look_time *i, - double *in,double *out){ - return(0); -} -static int inverse(vorbis_block *vb,vorbis_look_time *i, - double *in,double *out){ - return(0); -} - -/* export hooks */ -vorbis_func_time time0_exportbundle={ - &pack,&unpack,&look,&free_info,&free_look,&forward,&inverse -}; diff --git a/lib/vorbisfile.c b/lib/vorbisfile.c deleted file mode 100644 index 091ea2ad..00000000 --- a/lib/vorbisfile.c +++ /dev/null @@ -1,1156 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: stdio-based convenience library for opening/seeking/decoding - last mod: $Id: vorbisfile.c,v 1.28 2000/08/30 06:09:21 xiphmont Exp $ - - ********************************************************************/ - -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -#include <math.h> -#include <assert.h> - -#include "vorbis/codec.h" -#include "vorbis/vorbisfile.h" - -#include "os.h" -#include "misc.h" - -/* A 'chained bitstream' is a Vorbis bitstream that contains more than - one logical bitstream arranged end to end (the only form of Ogg - multiplexing allowed in a Vorbis bitstream; grouping [parallel - multiplexing] is not allowed in Vorbis) */ - -/* A Vorbis file can be played beginning to end (streamed) without - worrying ahead of time about chaining (see decoder_example.c). If - we have the whole file, however, and want random access - (seeking/scrubbing) or desire to know the total length/time of a - file, we need to account for the possibility of chaining. */ - -/* We can handle things a number of ways; we can determine the entire - bitstream structure right off the bat, or find pieces on demand. - This example determines and caches structure for the entire - bitstream, but builds a virtual decoder on the fly when moving - between links in the chain. */ - -/* There are also different ways to implement seeking. Enough - information exists in an Ogg bitstream to seek to - sample-granularity positions in the output. Or, one can seek by - picking some portion of the stream roughly in the desired area if - we only want course navigation through the stream. */ - -/************************************************************************* - * Many, many internal helpers. The intention is not to be confusing; - * rampant duplication and monolithic function implementation would be - * harder to understand anyway. The high level functions are last. Begin - * grokking near the end of the file */ - -/* read a little more data from the file/pipe into the ogg_sync framer */ -#define CHUNKSIZE 4096 -static long _get_data(OggVorbis_File *vf){ - char *buffer=ogg_sync_buffer(&vf->oy,CHUNKSIZE); - long bytes=(vf->callbacks.read_func)(buffer,1,CHUNKSIZE,vf->datasource); - ogg_sync_wrote(&vf->oy,bytes); - return(bytes); -} - -/* save a tiny smidge of verbosity to make the code more readable */ -static void _seek_helper(OggVorbis_File *vf,long offset){ - (vf->callbacks.seek_func)(vf->datasource, offset, SEEK_SET); - vf->offset=offset; - ogg_sync_reset(&vf->oy); -} - -/* The read/seek functions track absolute position within the stream */ - -/* from the head of the stream, get the next page. boundary specifies - if the function is allowed to fetch more data from the stream (and - how much) or only use internally buffered data. - - boundary: -1) unbounded search - 0) read no additional data; use cached only - n) search for a new page beginning for n bytes - - return: -1) did not find a page - n) found a page at absolute offset n */ - -static long _get_next_page(OggVorbis_File *vf,ogg_page *og,int boundary){ - if(boundary>0)boundary+=vf->offset; - while(1){ - long more; - - if(boundary>0 && vf->offset>=boundary)return(-1); - more=ogg_sync_pageseek(&vf->oy,og); - - if(more<0){ - /* skipped n bytes */ - vf->offset-=more; - }else{ - if(more==0){ - /* send more paramedics */ - if(!boundary)return(-1); - if(_get_data(vf)<=0)return(-1); - }else{ - /* got a page. Return the offset at the page beginning, - advance the internal offset past the page end */ - long ret=vf->offset; - vf->offset+=more; - return(ret); - - } - } - } -} - -/* find the latest page beginning before the current stream cursor - position. Much dirtier than the above as Ogg doesn't have any - backward search linkage. no 'readp' as it will certainly have to - read. */ -static long _get_prev_page(OggVorbis_File *vf,ogg_page *og){ - long begin=vf->offset; - long ret; - int offset=-1; - - while(offset==-1){ - begin-=CHUNKSIZE; - _seek_helper(vf,begin); - while(vf->offset<begin+CHUNKSIZE){ - ret=_get_next_page(vf,og,begin+CHUNKSIZE-vf->offset); - if(ret==-1){ - break; - }else{ - offset=ret; - } - } - } - - /* we have the offset. Actually snork and hold the page now */ - _seek_helper(vf,offset); - ret=_get_next_page(vf,og,CHUNKSIZE); - if(ret==-1){ - /* this shouldn't be possible */ - fprintf(stderr,"Missed page fencepost at end of logical bitstream. " - "Exiting.\n"); - exit(1); - } - return(offset); -} - -/* finds each bitstream link one at a time using a bisection search - (has to begin by knowing the offset of the lb's initial page). - Recurses for each link so it can alloc the link storage after - finding them all, then unroll and fill the cache at the same time */ -static void _bisect_forward_serialno(OggVorbis_File *vf, - long begin, - long searched, - long end, - long currentno, - long m){ - long endsearched=end; - long next=end; - ogg_page og; - long ret; - - /* the below guards against garbage seperating the last and - first pages of two links. */ - while(searched<endsearched){ - long bisect; - - if(endsearched-searched<CHUNKSIZE){ - bisect=searched; - }else{ - bisect=(searched+endsearched)/2; - } - - _seek_helper(vf,bisect); - ret=_get_next_page(vf,&og,-1); - if(ret<0 || ogg_page_serialno(&og)!=currentno){ - endsearched=bisect; - if(ret>=0)next=ret; - }else{ - searched=ret+og.header_len+og.body_len; - } - } - - _seek_helper(vf,next); - ret=_get_next_page(vf,&og,-1); - - if(searched>=end || ret==-1){ - vf->links=m+1; - vf->offsets=malloc((m+2)*sizeof(ogg_int64_t)); - vf->offsets[m+1]=searched; - }else{ - _bisect_forward_serialno(vf,next,vf->offset, - end,ogg_page_serialno(&og),m+1); - } - - vf->offsets[m]=begin; -} - -/* uses the local ogg_stream storage in vf; this is important for - non-streaming input sources */ -static int _fetch_headers(OggVorbis_File *vf,vorbis_info *vi,vorbis_comment *vc, - long *serialno){ - ogg_page og; - ogg_packet op; - int i,ret; - - ret=_get_next_page(vf,&og,CHUNKSIZE); - if(ret==-1){ - fprintf(stderr,"Did not find initial header for bitstream.\n"); - return -1; - } - - if(serialno)*serialno=ogg_page_serialno(&og); - ogg_stream_init(&vf->os,ogg_page_serialno(&og)); - - /* extract the initial header from the first page and verify that the - Ogg bitstream is in fact Vorbis data */ - - vorbis_info_init(vi); - vorbis_comment_init(vc); - - i=0; - while(i<3){ - ogg_stream_pagein(&vf->os,&og); - while(i<3){ - int result=ogg_stream_packetout(&vf->os,&op); - if(result==0)break; - if(result==-1){ - fprintf(stderr,"Corrupt header in logical bitstream.\n"); - goto bail_header; - } - if(vorbis_synthesis_headerin(vi,vc,&op)){ - fprintf(stderr,"Illegal header in logical bitstream.\n"); - goto bail_header; - } - i++; - } - if(i<3) - if(_get_next_page(vf,&og,1)<0){ - fprintf(stderr,"Missing header in logical bitstream.\n"); - goto bail_header; - } - } - return 0; - - bail_header: - vorbis_info_clear(vi); - vorbis_comment_clear(vc); - ogg_stream_clear(&vf->os); - return -1; -} - -/* last step of the OggVorbis_File initialization; get all the - vorbis_info structs and PCM positions. Only called by the seekable - initialization (local stream storage is hacked slightly; pay - attention to how that's done) */ -static void _prefetch_all_headers(OggVorbis_File *vf,vorbis_info *first_i, - vorbis_comment *first_c, - long dataoffset){ - ogg_page og; - int i,ret; - - vf->vi=calloc(vf->links,sizeof(vorbis_info)); - vf->vc=calloc(vf->links,sizeof(vorbis_info)); - vf->dataoffsets=malloc(vf->links*sizeof(ogg_int64_t)); - vf->pcmlengths=malloc(vf->links*sizeof(ogg_int64_t)); - vf->serialnos=malloc(vf->links*sizeof(long)); - - for(i=0;i<vf->links;i++){ - if(first_i && first_c && i==0){ - /* we already grabbed the initial header earlier. This just - saves the waste of grabbing it again */ - memcpy(vf->vi+i,first_i,sizeof(vorbis_info)); - memcpy(vf->vc+i,first_c,sizeof(vorbis_comment)); - vf->dataoffsets[i]=dataoffset; - }else{ - - /* seek to the location of the initial header */ - - _seek_helper(vf,vf->offsets[i]); - if(_fetch_headers(vf,vf->vi+i,vf->vc+i,NULL)==-1){ - fprintf(stderr,"Error opening logical bitstream #%d.\n\n",i+1); - vf->dataoffsets[i]=-1; - }else{ - vf->dataoffsets[i]=vf->offset; - ogg_stream_clear(&vf->os); - } - } - - /* get the serial number and PCM length of this link. To do this, - get the last page of the stream */ - { - long end=vf->offsets[i+1]; - _seek_helper(vf,end); - - while(1){ - ret=_get_prev_page(vf,&og); - if(ret==-1){ - /* this should not be possible */ - fprintf(stderr,"Could not find last page of logical " - "bitstream #%d\n\n",i); - vorbis_info_clear(vf->vi+i); - vorbis_comment_clear(vf->vc+i); - break; - } - if(ogg_page_frameno(&og)!=-1){ - vf->serialnos[i]=ogg_page_serialno(&og); - vf->pcmlengths[i]=ogg_page_frameno(&og); - break; - } - } - } - } -} - -static int _make_decode_ready(OggVorbis_File *vf){ - if(vf->decode_ready)exit(1); - vorbis_synthesis_init(&vf->vd,vf->vi); - vorbis_block_init(&vf->vd,&vf->vb); - vf->decode_ready=1; - return(0); -} - -static int _open_seekable(OggVorbis_File *vf){ - vorbis_info initial_i; - vorbis_comment initial_c; - long serialno,end; - int ret; - long dataoffset; - ogg_page og; - - /* is this even vorbis...? */ - ret=_fetch_headers(vf,&initial_i,&initial_c,&serialno); - dataoffset=vf->offset; - ogg_stream_clear(&vf->os); - if(ret==-1)return(-1); - - /* we can seek, so set out learning all about this file */ - vf->seekable=1; - (vf->callbacks.seek_func)(vf->datasource,0,SEEK_END); - vf->offset=vf->end=(vf->callbacks.tell_func)(vf->datasource); - - /* We get the offset for the last page of the physical bitstream. - Most OggVorbis files will contain a single logical bitstream */ - end=_get_prev_page(vf,&og); - - /* moer than one logical bitstream? */ - if(ogg_page_serialno(&og)!=serialno){ - - /* Chained bitstream. Bisect-search each logical bitstream - section. Do so based on serial number only */ - _bisect_forward_serialno(vf,0,0,end+1,serialno,0); - - }else{ - - /* Only one logical bitstream */ - _bisect_forward_serialno(vf,0,end,end+1,serialno,0); - - } - - _prefetch_all_headers(vf,&initial_i,&initial_c,dataoffset); - return(ov_raw_seek(vf,0)); - -} - -static int _open_nonseekable(OggVorbis_File *vf){ - /* we cannot seek. Set up a 'single' (current) logical bitstream entry */ - vf->links=1; - vf->vi=calloc(vf->links,sizeof(vorbis_info)); - vf->vc=calloc(vf->links,sizeof(vorbis_info)); - - /* Try to fetch the headers, maintaining all the storage */ - if(_fetch_headers(vf,vf->vi,vf->vc,&vf->current_serialno)==-1)return(-1); - _make_decode_ready(vf); - - return 0; -} - -/* clear out the current logical bitstream decoder */ -static void _decode_clear(OggVorbis_File *vf){ - ogg_stream_clear(&vf->os); - vorbis_dsp_clear(&vf->vd); - vorbis_block_clear(&vf->vb); - vf->decode_ready=0; - - vf->bittrack=0.; - vf->samptrack=0.; -} - -/* fetch and process a packet. Handles the case where we're at a - bitstream boundary and dumps the decoding machine. If the decoding - machine is unloaded, it loads it. It also keeps pcm_offset up to - date (seek and read both use this. seek uses a special hack with - readp). - - return: -1) hole in the data (lost packet) - 0) need more date (only if readp==0)/eof - 1) got a packet -*/ - -static int _process_packet(OggVorbis_File *vf,int readp){ - ogg_page og; - - /* handle one packet. Try to fetch it from current stream state */ - /* extract packets from page */ - while(1){ - - /* process a packet if we can. If the machine isn't loaded, - neither is a page */ - if(vf->decode_ready){ - ogg_packet op; - int result=ogg_stream_packetout(&vf->os,&op); - ogg_int64_t frameno; - - /* if(result==-1)return(-1); hole in the data. For now, swallow - and go. We'll need to add a real - error code in a bit. */ - if(result>0){ - /* got a packet. process it */ - frameno=op.frameno; - if(!vorbis_synthesis(&vf->vb,&op)){ /* lazy check for lazy - header handling. The - header packets aren't - audio, so if/when we - submit them, - vorbis_synthesis will - reject them */ - - /* suck in the synthesis data and track bitrate */ - { - int oldsamples=vorbis_synthesis_pcmout(&vf->vd,NULL); - vorbis_synthesis_blockin(&vf->vd,&vf->vb); - vf->samptrack+=vorbis_synthesis_pcmout(&vf->vd,NULL)-oldsamples; - vf->bittrack+=op.bytes*8; - } - - /* update the pcm offset. */ - if(frameno!=-1 && !op.e_o_s){ - int link=(vf->seekable?vf->current_link:0); - int i,samples; - - /* this packet has a pcm_offset on it (the last packet - completed on a page carries the offset) After processing - (above), we know the pcm position of the *last* sample - ready to be returned. Find the offset of the *first* - - As an aside, this trick is inaccurate if we begin - reading anew right at the last page; the end-of-stream - frameno declares the last frame in the stream, and the - last packet of the last page may be a partial frame. - So, we need a previous frameno from an in-sequence page - to have a reference point. Thus the !op.e_o_s clause - above */ - - samples=vorbis_synthesis_pcmout(&vf->vd,NULL); - - frameno-=samples; - for(i=0;i<link;i++) - frameno+=vf->pcmlengths[i]; - vf->pcm_offset=frameno; - } - return(1); - } - } - } - - if(!readp)return(0); - if(_get_next_page(vf,&og,-1)<0)return(0); /* eof. leave unitialized */ - - /* bitrate tracking; add the header's bytes here, the body bytes - are done by packet above */ - vf->bittrack+=og.header_len*8; - - /* has our decoding just traversed a bitstream boundary? */ - if(vf->decode_ready){ - if(vf->current_serialno!=ogg_page_serialno(&og)){ - _decode_clear(vf); - } - } - - /* Do we need to load a new machine before submitting the page? */ - /* This is different in the seekable and non-seekable cases. - - In the seekable case, we already have all the header - information loaded and cached; we just initialize the machine - with it and continue on our merry way. - - In the non-seekable (streaming) case, we'll only be at a - boundary if we just left the previous logical bitstream and - we're now nominally at the header of the next bitstream - */ - - if(!vf->decode_ready){ - int link; - if(vf->seekable){ - vf->current_serialno=ogg_page_serialno(&og); - - /* match the serialno to bitstream section. We use this rather than - offset positions to avoid problems near logical bitstream - boundaries */ - for(link=0;link<vf->links;link++) - if(vf->serialnos[link]==vf->current_serialno)break; - if(link==vf->links)return(-1); /* sign of a bogus stream. error out, - leave machine uninitialized */ - - vf->current_link=link; - - ogg_stream_init(&vf->os,vf->current_serialno); - ogg_stream_reset(&vf->os); - - }else{ - /* we're streaming */ - /* fetch the three header packets, build the info struct */ - - _fetch_headers(vf,vf->vi,vf->vc,&vf->current_serialno); - vf->current_link++; - link=0; - } - - _make_decode_ready(vf); - } - ogg_stream_pagein(&vf->os,&og); - } -} - -/********************************************************************** - * The helpers are over; it's all toplevel interface from here on out */ - -/* clear out the OggVorbis_File struct */ -int ov_clear(OggVorbis_File *vf){ - if(vf){ - vorbis_block_clear(&vf->vb); - vorbis_dsp_clear(&vf->vd); - ogg_stream_clear(&vf->os); - - if(vf->vi && vf->links){ - int i; - for(i=0;i<vf->links;i++){ - vorbis_info_clear(vf->vi+i); - vorbis_comment_clear(vf->vc+i); - } - free(vf->vi); - free(vf->vc); - } - if(vf->dataoffsets)free(vf->dataoffsets); - if(vf->pcmlengths)free(vf->pcmlengths); - if(vf->serialnos)free(vf->serialnos); - if(vf->offsets)free(vf->offsets); - ogg_sync_clear(&vf->oy); - if(vf->datasource)(vf->callbacks.close_func)(vf->datasource); - memset(vf,0,sizeof(OggVorbis_File)); - } -#ifdef DEBUG_LEAKS - _VDBG_dump(); -#endif - return(0); -} - -static int _fseek64_wrap(FILE *f,ogg_int64_t off,int whence){ - return fseek(f,(int)off,whence); -} - -/* inspects the OggVorbis file and finds/documents all the logical - bitstreams contained in it. Tries to be tolerant of logical - bitstream sections that are truncated/woogie. - - return: -1) error - 0) OK -*/ - -int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes){ - ov_callbacks callbacks = { - (size_t (*)(void *, size_t, size_t, void *)) fread, - (int (*)(void *, ogg_int64_t, int)) _fseek64_wrap, - (int (*)(void *)) fclose, - (long (*)(void *)) ftell - }; - - return ov_open_callbacks((void *)f, vf, initial, ibytes, callbacks); -} - - -int ov_open_callbacks(void *f,OggVorbis_File *vf,char *initial,long ibytes, - ov_callbacks callbacks) -{ - long offset=callbacks.seek_func(f,0,SEEK_CUR); - int ret; - - memset(vf,0,sizeof(OggVorbis_File)); - vf->datasource=f; - vf->callbacks = callbacks; - - /* init the framing state */ - ogg_sync_init(&vf->oy); - - /* perhaps some data was previously read into a buffer for testing - against other stream types. Allow initialization from this - previously read data (as we may be reading from a non-seekable - stream) */ - if(initial){ - char *buffer=ogg_sync_buffer(&vf->oy,ibytes); - memcpy(buffer,initial,ibytes); - ogg_sync_wrote(&vf->oy,ibytes); - } - - /* can we seek? Stevens suggests the seek test was portable */ - if(offset!=-1){ - ret=_open_seekable(vf); - }else{ - ret=_open_nonseekable(vf); - } - if(ret){ - vf->datasource=NULL; - ov_clear(vf); - } - return(ret); -} - -/* How many logical bitstreams in this physical bitstream? */ -long ov_streams(OggVorbis_File *vf){ - return vf->links; -} - -/* Is the FILE * associated with vf seekable? */ -long ov_seekable(OggVorbis_File *vf){ - return vf->seekable; -} - -/* returns the bitrate for a given logical bitstream or the entire - physical bitstream. If the file is open for random access, it will - find the *actual* average bitrate. If the file is streaming, it - returns the nominal bitrate (if set) else the average of the - upper/lower bounds (if set) else -1 (unset). - - If you want the actual bitrate field settings, get them from the - vorbis_info structs */ - -long ov_bitrate(OggVorbis_File *vf,int i){ - if(i>=vf->links)return(-1); - if(!vf->seekable && i!=0)return(ov_bitrate(vf,0)); - if(i<0){ - ogg_int64_t bits=0; - int i; - for(i=0;i<vf->links;i++) - bits+=(vf->offsets[i+1]-vf->dataoffsets[i])*8; - return(rint(bits/ov_time_total(vf,-1))); - }else{ - if(vf->seekable){ - /* return the actual bitrate */ - return(rint((vf->offsets[i+1]-vf->dataoffsets[i])*8/ov_time_total(vf,i))); - }else{ - /* return nominal if set */ - if(vf->vi[i].bitrate_nominal>0){ - return vf->vi[i].bitrate_nominal; - }else{ - if(vf->vi[i].bitrate_upper>0){ - if(vf->vi[i].bitrate_lower>0){ - return (vf->vi[i].bitrate_upper+vf->vi[i].bitrate_lower)/2; - }else{ - return vf->vi[i].bitrate_upper; - } - } - return(-1); - } - } - } -} - -/* returns the actual bitrate since last call. returns -1 if no - additional data to offer since last call (or at beginning of stream) */ -long ov_bitrate_instant(OggVorbis_File *vf){ - int link=(vf->seekable?vf->current_link:0); - long ret; - if(vf->samptrack==0)return(-1); - ret=vf->bittrack/vf->samptrack*vf->vi[link].rate+.5; - vf->bittrack=0.; - vf->samptrack=0.; - return(ret); -} - -/* Guess */ -long ov_serialnumber(OggVorbis_File *vf,int i){ - if(i>=vf->links)return(-1); - if(!vf->seekable && i>=0)return(ov_serialnumber(vf,-1)); - if(i<0){ - return(vf->current_serialno); - }else{ - return(vf->serialnos[i]); - } -} - -/* returns: total raw (compressed) length of content if i==-1 - raw (compressed) length of that logical bitstream for i==0 to n - -1 if the stream is not seekable (we can't know the length) -*/ -ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i){ - if(!vf->seekable || i>=vf->links)return(-1); - if(i<0){ - long acc=0; - int i; - for(i=0;i<vf->links;i++) - acc+=ov_raw_total(vf,i); - return(acc); - }else{ - return(vf->offsets[i+1]-vf->offsets[i]); - } -} - -/* returns: total PCM length (samples) of content if i==-1 - PCM length (samples) of that logical bitstream for i==0 to n - -1 if the stream is not seekable (we can't know the length) -*/ -ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i){ - if(!vf->seekable || i>=vf->links)return(-1); - if(i<0){ - ogg_int64_t acc=0; - int i; - for(i=0;i<vf->links;i++) - acc+=ov_pcm_total(vf,i); - return(acc); - }else{ - return(vf->pcmlengths[i]); - } -} - -/* returns: total seconds of content if i==-1 - seconds in that logical bitstream for i==0 to n - -1 if the stream is not seekable (we can't know the length) -*/ -double ov_time_total(OggVorbis_File *vf,int i){ - if(!vf->seekable || i>=vf->links)return(-1); - if(i<0){ - double acc=0; - int i; - for(i=0;i<vf->links;i++) - acc+=ov_time_total(vf,i); - return(acc); - }else{ - return((float)(vf->pcmlengths[i])/vf->vi[i].rate); - } -} - -/* seek to an offset relative to the *compressed* data. This also - immediately sucks in and decodes pages to update the PCM cursor. It - will cross a logical bitstream boundary, but only if it can't get - any packets out of the tail of the bitstream we seek to (so no - surprises). - - returns zero on success, nonzero on failure */ - -int ov_raw_seek(OggVorbis_File *vf,long pos){ - - if(!vf->seekable)return(-1); /* don't dump machine if we can't seek */ - if(pos<0 || pos>vf->offsets[vf->links])goto seek_error; - - /* clear out decoding machine state */ - vf->pcm_offset=-1; - _decode_clear(vf); - - /* seek */ - _seek_helper(vf,pos); - - /* we need to make sure the pcm_offset is set. We use the - _fetch_packet helper to process one packet with readp set, then - call it until it returns '0' with readp not set (the last packet - from a page has the 'frameno' field set, and that's how the - helper updates the offset */ - - switch(_process_packet(vf,1)){ - case 0: - /* oh, eof. There are no packets remaining. Set the pcm offset to - the end of file */ - vf->pcm_offset=ov_pcm_total(vf,-1); - return(0); - case -1: - /* error! missing data or invalid bitstream structure */ - goto seek_error; - default: - /* all OK */ - break; - } - - while(1){ - switch(_process_packet(vf,0)){ - case 0: - /* the offset is set. If it's a bogus bitstream with no offset - information, it's not but that's not our fault. We still run - gracefully, we're just missing the offset */ - return(0); - case -1: - /* error! missing data or invalid bitstream structure */ - goto seek_error; - default: - /* continue processing packets */ - break; - } - } - - seek_error: - /* dump the machine so we're in a known state */ - vf->pcm_offset=-1; - _decode_clear(vf); - return -1; -} - -/* seek to a sample offset relative to the decompressed pcm stream - - returns zero on success, nonzero on failure */ - -int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos){ - int link=-1; - ogg_int64_t total=ov_pcm_total(vf,-1); - - if(!vf->seekable)return(-1); /* don't dump machine if we can't seek */ - if(pos<0 || pos>total)goto seek_error; - - /* which bitstream section does this pcm offset occur in? */ - for(link=vf->links-1;link>=0;link--){ - total-=vf->pcmlengths[link]; - if(pos>=total)break; - } - - /* search within the logical bitstream for the page with the highest - pcm_pos preceeding (or equal to) pos. There is a danger here; - missing pages or incorrect frame number information in the - bitstream could make our task impossible. Account for that (it - would be an error condition) */ - { - ogg_int64_t target=pos-total; - long end=vf->offsets[link+1]; - long begin=vf->offsets[link]; - long best=begin; - - ogg_page og; - while(begin<end){ - long bisect; - long ret; - - if(end-begin<CHUNKSIZE){ - bisect=begin; - }else{ - bisect=(end+begin)/2; - } - - _seek_helper(vf,bisect); - ret=_get_next_page(vf,&og,end-bisect); - - if(ret==-1){ - end=bisect; - }else{ - ogg_int64_t frameno=ogg_page_frameno(&og); - if(frameno<target){ - best=ret; /* raw offset of packet with frameno */ - begin=vf->offset; /* raw offset of next packet */ - }else{ - end=bisect; - } - } - } - - /* found our page. seek to it (call raw_seek). */ - - if(ov_raw_seek(vf,best))goto seek_error; - } - - /* verify result */ - if(vf->pcm_offset>=pos)goto seek_error; - if(pos>ov_pcm_total(vf,-1))goto seek_error; - - /* discard samples until we reach the desired position. Crossing a - logical bitstream boundary with abandon is OK. */ - while(vf->pcm_offset<pos){ - double **pcm; - long target=pos-vf->pcm_offset; - long samples=vorbis_synthesis_pcmout(&vf->vd,&pcm); - - if(samples>target)samples=target; - vorbis_synthesis_read(&vf->vd,samples); - vf->pcm_offset+=samples; - - if(samples<target) - if(_process_packet(vf,1)==0) - vf->pcm_offset=ov_pcm_total(vf,-1); /* eof */ - } - return 0; - - seek_error: - /* dump machine so we're in a known state */ - vf->pcm_offset=-1; - _decode_clear(vf); - return -1; -} - -/* seek to a playback time relative to the decompressed pcm stream - returns zero on success, nonzero on failure */ -int ov_time_seek(OggVorbis_File *vf,double seconds){ - /* translate time to PCM position and call ov_pcm_seek */ - - int link=-1; - ogg_int64_t pcm_total=ov_pcm_total(vf,-1); - double time_total=ov_time_total(vf,-1); - - if(!vf->seekable)return(-1); /* don't dump machine if we can't seek */ - if(seconds<0 || seconds>time_total)goto seek_error; - - /* which bitstream section does this time offset occur in? */ - for(link=vf->links-1;link>=0;link--){ - pcm_total-=vf->pcmlengths[link]; - time_total-=ov_time_total(vf,link); - if(seconds>=time_total)break; - } - - /* enough information to convert time offset to pcm offset */ - { - ogg_int64_t target=pcm_total+(seconds-time_total)*vf->vi[link].rate; - return(ov_pcm_seek(vf,target)); - } - - seek_error: - /* dump machine so we're in a known state */ - vf->pcm_offset=-1; - _decode_clear(vf); - return -1; -} - -/* tell the current stream offset cursor. Note that seek followed by - tell will likely not give the set offset due to caching */ -ogg_int64_t ov_raw_tell(OggVorbis_File *vf){ - return(vf->offset); -} - -/* return PCM offset (sample) of next PCM sample to be read */ -ogg_int64_t ov_pcm_tell(OggVorbis_File *vf){ - return(vf->pcm_offset); -} - -/* return time offset (seconds) of next PCM sample to be read */ -double ov_time_tell(OggVorbis_File *vf){ - /* translate time to PCM position and call ov_pcm_seek */ - - int link=-1; - ogg_int64_t pcm_total=0; - double time_total=0.; - - if(vf->seekable){ - pcm_total=ov_pcm_total(vf,-1); - time_total=ov_time_total(vf,-1); - - /* which bitstream section does this time offset occur in? */ - for(link=vf->links-1;link>=0;link--){ - pcm_total-=vf->pcmlengths[link]; - time_total-=ov_time_total(vf,link); - if(vf->pcm_offset>=pcm_total)break; - } - } - - return((double)time_total+(double)(vf->pcm_offset-pcm_total)/vf->vi[link].rate); -} - -/* link: -1) return the vorbis_info struct for the bitstream section - currently being decoded - 0-n) to request information for a specific bitstream section - - In the case of a non-seekable bitstream, any call returns the - current bitstream. NULL in the case that the machine is not - initialized */ - -vorbis_info *ov_info(OggVorbis_File *vf,int link){ - if(vf->seekable){ - if(link<0) - if(vf->decode_ready) - return vf->vi+vf->current_link; - else - return NULL; - else - if(link>=vf->links) - return NULL; - else - return vf->vi+link; - }else{ - if(vf->decode_ready) - return vf->vi; - else - return NULL; - } -} - -/* grr, strong typing, grr, no templates/inheritence, grr */ -vorbis_comment *ov_comment(OggVorbis_File *vf,int link){ - if(vf->seekable){ - if(link<0) - if(vf->decode_ready) - return vf->vc+vf->current_link; - else - return NULL; - else - if(link>=vf->links) - return NULL; - else - return vf->vc+link; - }else{ - if(vf->decode_ready) - return vf->vc; - else - return NULL; - } -} - -int host_is_big_endian() { - short pattern = 0xbabe; - unsigned char *bytewise = (unsigned char *)&pattern; - if (bytewise[0] == 0xba) return 1; - - assert(bytewise[0] == 0xbe); - return 0; -} - -/* up to this point, everything could more or less hide the multiple - logical bitstream nature of chaining from the toplevel application - if the toplevel application didn't particularly care. However, at - the point that we actually read audio back, the multiple-section - nature must surface: Multiple bitstream sections do not necessarily - have to have the same number of channels or sampling rate. - - ov_read returns the sequential logical bitstream number currently - being decoded along with the PCM data in order that the toplevel - application can take action on channel/sample rate changes. This - number will be incremented even for streamed (non-seekable) streams - (for seekable streams, it represents the actual logical bitstream - index within the physical bitstream. Note that the accessor - functions above are aware of this dichotomy). - - input values: buffer) a buffer to hold packed PCM data for return - length) the byte length requested to be placed into buffer - bigendianp) should the data be packed LSB first (0) or - MSB first (1) - word) word size for output. currently 1 (byte) or - 2 (16 bit short) - - return values: -1) error/hole in data - 0) EOF - n) number of bytes of PCM actually returned. The - below works on a packet-by-packet basis, so the - return length is not related to the 'length' passed - in, just guaranteed to fit. - - *section) set to the logical bitstream number */ - -long ov_read(OggVorbis_File *vf,char *buffer,int length, - int bigendianp,int word,int sgned,int *bitstream){ - int i,j; - int host_endian = host_is_big_endian(); - - while(1){ - if(vf->decode_ready){ - double **pcm; - long samples=vorbis_synthesis_pcmout(&vf->vd,&pcm); - if(samples){ - /* yay! proceed to pack data into the byte buffer */ - - long channels=ov_info(vf,-1)->channels; - long bytespersample=word * channels; - if(samples>length/bytespersample)samples=length/bytespersample; - - /* a tight loop to pack each size */ - { - int val; - if(word==1){ - int off=(sgned?0:128); - for(j=0;j<samples;j++) - for(i=0;i<channels;i++){ - val=(int)(pcm[i][j]*128. + 0.5); - if(val>127)val=127; - else if(val<-128)val=-128; - *buffer++=val+off; - } - }else{ - int off=(sgned?0:32768); - - if(host_endian==bigendianp){ - if(sgned){ - for(i=0;i<channels;i++) { /* It's faster in this order */ - double *src=pcm[i]; - short *dest=((short *)buffer)+i; - for(j=0;j<samples;j++) { - val=(int)(src[j]*32768. + 0.5); - if(val>32767)val=32767; - else if(val<-32768)val=-32768; - *dest=val; - dest+=channels; - } - } - }else{ - for(i=0;i<channels;i++) { - double *src=pcm[i]; - short *dest=((short *)buffer)+i; - for(j=0;j<samples;j++) { - val=(int)(src[j]*32768. + 0.5); - if(val>32767)val=32767; - else if(val<-32768)val=-32768; - *dest=val+off; - dest+=channels; - } - } - } - }else if(bigendianp){ - for(j=0;j<samples;j++) - for(i=0;i<channels;i++){ - val=(int)(pcm[i][j]*32768. + 0.5); - if(val>32767)val=32767; - else if(val<-32768)val=-32768; - val+=off; - *buffer++=(val>>8); - *buffer++=(val&0xff); - } - }else{ - int val; - for(j=0;j<samples;j++) - for(i=0;i<channels;i++){ - val=(int)(pcm[i][j]*32768. + 0.5); - if(val>32767)val=32767; - else if(val<-32768)val=-32768; - val+=off; - *buffer++=(val&0xff); - *buffer++=(val>>8); - } - - } - } - } - - vorbis_synthesis_read(&vf->vd,samples); - vf->pcm_offset+=samples; - if(bitstream)*bitstream=vf->current_link; - return(samples*bytespersample); - } - } - - /* suck in another packet */ - switch(_process_packet(vf,1)){ - case 0: - return(0); - case -1: - return -1; - default: - break; - } - } -} - - - - diff --git a/lib/window.c b/lib/window.c deleted file mode 100644 index 9ca08d70..00000000 --- a/lib/window.c +++ /dev/null @@ -1,63 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: window functions - last mod: $Id: window.c,v 1.7 2000/03/10 13:21:18 xiphmont Exp $ - - ********************************************************************/ - -#include <stdlib.h> -#include <math.h> -#include "os.h" -#include "misc.h" - -double *_vorbis_window(int type, int window,int left,int right){ - double *ret=calloc(window,sizeof(double)); - - switch(type){ - case 0: - /* The 'vorbis window' (window 0) is sin(sin(x)*sin(x)*2pi) */ - { - int leftbegin=window/4-left/2; - int rightbegin=window-window/4-right/2; - int i; - - for(i=0;i<left;i++){ - double x=(i+.5)/left*M_PI/2.; - x=sin(x); - x*=x; - x*=M_PI/2.; - x=sin(x); - ret[i+leftbegin]=x; - } - - for(i=leftbegin+left;i<rightbegin;i++) - ret[i]=1.; - - for(i=0;i<right;i++){ - double x=(right-i-.5)/right*M_PI/2.; - x=sin(x); - x*=x; - x*=M_PI/2.; - x=sin(x); - ret[i+rightbegin]=x; - } - } - break; - default: - free(ret); - return(NULL); - } - return(ret); -} - diff --git a/lib/window.h b/lib/window.h deleted file mode 100644 index a9b30db0..00000000 --- a/lib/window.h +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: window functions - last mod: $Id: window.h,v 1.3 2000/01/22 13:28:37 xiphmont Exp $ - - ********************************************************************/ - -#ifndef _V_WINDOW_ -#define _V_WINDOW_ - -#define VI_WINDOWB 1 -extern double *_vorbis_window(int type,int window,int left,int right); - -#endif diff --git a/mac/compat/strdup.c b/mac/compat/strdup.c deleted file mode 100644 index 277574a7..00000000 --- a/mac/compat/strdup.c +++ /dev/null @@ -1 +0,0 @@ -#include <sys/types.h>
#include <string.h>
#include <stdlib.h>
char *strdup(const char *inStr)
{
char *outStr = NULL;
if (inStr == NULL) {
return NULL;
}
outStr = malloc(strlen(inStr) + 1);
if (outStr != NULL) {
strcpy(outStr, inStr);
}
return outStr;
}
\ No newline at end of file diff --git a/mac/compat/sys/types.h b/mac/compat/sys/types.h deleted file mode 100644 index b0d4f920..00000000 --- a/mac/compat/sys/types.h +++ /dev/null @@ -1 +0,0 @@ -#ifndef __SYS_TYPES_H__
#define __SYS_TYPES_H__ 1
#include <MacTypes.h>
#include <alloca.h>
#include <string.h>
typedef short int16_t;
typedef long int32_t;
typedef long long int64_t;
#define vorbis_size32_t long
#if defined(__cplusplus)
extern "C" {
#endif
#pragma options align=power
char *strdup(const char *inStr);
#pragma options align=reset
#if defined(__cplusplus)
}
#endif
#endif /* __SYS_TYPES_H__ */
\ No newline at end of file diff --git a/mac/decoder_example.mcp b/mac/decoder_example.mcp Binary files differdeleted file mode 100644 index 7857354c..00000000 --- a/mac/decoder_example.mcp +++ /dev/null diff --git a/mac/encoder_example.mcp b/mac/encoder_example.mcp Binary files differdeleted file mode 100644 index faf63cd2..00000000 --- a/mac/encoder_example.mcp +++ /dev/null diff --git a/mac/libvorbis.mcp b/mac/libvorbis.mcp Binary files differdeleted file mode 100644 index 2b5f5dc2..00000000 --- a/mac/libvorbis.mcp +++ /dev/null diff --git a/mac/libvorbis.mcp.exp b/mac/libvorbis.mcp.exp deleted file mode 100644 index 5ffc7c34..00000000 --- a/mac/libvorbis.mcp.exp +++ /dev/null @@ -1 +0,0 @@ -### From "vorbis/codec.h"
ogg_stream_packetin
ogg_stream_pageout
ogg_sync_init
ogg_sync_clear
#ogg_sync_destroy
ogg_sync_reset
ogg_sync_buffer
ogg_sync_wrote
ogg_sync_pageseek
ogg_sync_pageout
ogg_stream_pagein
ogg_stream_packetout
ogg_stream_init
ogg_stream_clear
ogg_stream_reset
ogg_stream_destroy
ogg_stream_eof
ogg_page_version
ogg_page_continued
ogg_page_bos
ogg_page_eos
ogg_page_frameno
ogg_page_serialno
ogg_page_pageno
vorbis_info_init
vorbis_info_clear
vorbis_comment_init
vorbis_comment_add
vorbis_comment_clear
vorbis_block_init
vorbis_block_clear
vorbis_dsp_clear
vorbis_analysis_init
vorbis_analysis_headerout
vorbis_analysis_buffer
vorbis_analysis_wrote
vorbis_analysis_blockout
vorbis_analysis
vorbis_synthesis_headerin
vorbis_synthesis_init
vorbis_synthesis
vorbis_synthesis_blockin
vorbis_synthesis_pcmout
vorbis_synthesis_read
strdup
\ No newline at end of file diff --git a/todo.txt b/todo.txt deleted file mode 100644 index d0e1665c..00000000 --- a/todo.txt +++ /dev/null @@ -1,22 +0,0 @@ -Development hit list for 1.0: - -libvorbis: - -Meaningful error code returns - -still some padding at EOS - -Option for brute-forcing vq search on maptype 2 (helps on undertrained -sets). - -encoder switch interface for binary compat through changes; ioctl()-like? - -API changes: - break up some of the more monolithic calls (eg, allow access - to MDCT domain data, additional low level framing capability) - convenience calls for text comments - -other: - -command line suite -'crashme'
\ No newline at end of file diff --git a/vorbis.spec b/vorbis.spec deleted file mode 100644 index 9c528e35..00000000 --- a/vorbis.spec +++ /dev/null @@ -1,73 +0,0 @@ -Summary: The OGG Vorbis lossy audio compression codec. -Name: vorbis -Version: 0.0 -Release: 1 -Copyright: GPL -Group: Development/Libraries -Source: http://www.xiph.org/vorbis/download/%{name}-%{version}.src.tgz -Url: http://www.xiph.org/vorbis/index.html -BuildRoot: /var/tmp/vorbis-root - -%description -Ogg Vorbis is a fully Open, non-proprietary, patent-and-royalty-free, -general-purpose compressed audio format for high quality (44.1-48.0kHz, -16+ bit, polyphonic) audio and music at fixed and variable bitrates -from 16 to 128 kbps/channel. This places Vorbis in the same class as -audio representations including MPEG-1 audio layer 3, MPEG-4 -audio (AAC and TwinVQ), and PAC. - -%package devel -Copyright: LGPL -Summary: Development library for OGG Vorbis -Group: Development/Libraries - -%description devel -Ogg Vorbis is a fully Open, non-proprietary, patent-and-royalty-free, -general-purpose compressed audio format for high quality (44.1-48.0kHz, -16+ bit, polyphonic) audio and music at fixed and variable bitrates -from 16 to 128 kbps/channel. This places Vorbis in the same class as -audio representations including MPEG-1 audio layer 3, MPEG-4 -audio (AAC and TwinVQ), and PAC. - -%prep -%setup -q - -%build -rm -rf $RPM_BUILD_ROOT -CFLAGS="${RPM_OPT_FLAGS}" ./configure --prefix=/usr -make - -%install -rm -rf $RPM_BUILD_ROOT - -install -d $RPM_BUILD_ROOT/usr/include/vorbis -install -d $RPM_BUILD_ROOT/usr/include/vorbis/book -install -d $RPM_BUILD_ROOT/usr/lib -install -d $RPM_BUILD_ROOT/usr/bin -install -m 0755 lib/libvorbis.a $RPM_BUILD_ROOT/usr/lib/ -install -m 0755 lib/vorbisfile.a $RPM_BUILD_ROOT/usr/lib/ -install -m 0644 include/vorbis/*.h $RPM_BUILD_ROOT/usr/include/vorbis/ -install -m 0644 include/vorbis/book/*.vqh $RPM_BUILD_ROOT/usr/include/vorbis/book/ -install -m 0755 -s huff/{residuesplit,huffbuild} $RPM_BUILD_ROOT/usr/bin -install -m 0755 -s vq/{genericvqtrain,lspvqtrain,residuevqtrain,\ -vqbuild,vqcascade,vqmetrics,vqpartition} \ - $RPM_BUILD_ROOT/usr/bin/ - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-,root,root) - -%doc README -/usr/bin/* - -%files devel -%defattr(-,root,root) -%doc README docs/*.{png,html} -/usr/include/vorbis/* -/usr/lib/* - -%changelog -* Sat Apr 29 2000 Peter Jones <pjones@redhat.com> -- first pass. diff --git a/vq/Makefile.in b/vq/Makefile.in deleted file mode 100644 index 37d0000e..00000000 --- a/vq/Makefile.in +++ /dev/null @@ -1,90 +0,0 @@ -# $Id: Makefile.in,v 1.14 2000/07/17 12:55:37 xiphmont Exp $ - -############################################################################### -# # -# To build a production vorbis (preferrably using gmake), just type 'make'. # -# To build with debugging or profiling information, use 'make debug' or # -# 'make profile' respectively. 'make clean' is a good idea between builds # -# with different target names, or before a final build. # -# # -############################################################################### - - -# DO NOT EDIT BELOW! ########################################################## -# (unless, of course, you know what you are doing :) ########################## - -@SET_MAKE@ -FLAGS=-I. -I../include @CFLAGS@ -OPT=@OPT@ $(FLAGS) -DEBUG=@DEBUG@ $(FLAGS) -PROFILE=@PROFILE@ $(FLAGS) -CC=@CC@ -LD=@CC@ -LDFLAGS=@LDFLAGS@ $(FLAGS) -AR=@AR@ -RANLIB=@RANLIB@ -LIBS=@LIBS@ - -HFILES = ../include/vorbis/codebook.h vqgen.h vqext.h bookutil.h - -OFILES = vqgen.o vqsplit.o bookutil.o ../lib/sharedbook.o -ALLOFILES = $(OFILES) lspdata.o genericdata.o train.o build.o run.o\ - cascade.o partition.o metrics.o residuedata.o latticebuild.o\ - latticepare.o latticehint.o latticetune.o - -all: - $(MAKE) target CFLAGS="$(OPT)" - -debug: - $(MAKE) target CFLAGS="$(DEBUG)" - -profile: - $(MAKE) target CFLAGS="$(PROFILE)" - -target: lspvqtrain genericvqtrain residuevqtrain vqbuild vqcascade vqmetrics latticebuild latticepare latticehint latticetune - -lspvqtrain: $(OFILES) lspdata.o train.o - $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS) - -residuevqtrain: $(OFILES) residuedata.o train.o - $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS) - -genericvqtrain: $(OFILES) genericdata.o train.o - $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS) - -vqbuild: $(OFILES) build.o - $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS) - -vqcascade: $(OFILES) run.o cascade.o - $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS) - -vqmetrics: $(OFILES) run.o metrics.o - $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS) - -latticebuild: $(OFILES) latticebuild.o - $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS) - -latticehint: $(OFILES) latticehint.o - $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS) - -latticepare: $(OFILES) latticepare.o - $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS) - -latticetune: $(OFILES) latticetune.o - $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS) - - -$(ALLOFILES): $(HFILES) - -.c.o: - $(CC) $(CFLAGS) -c $< - -$(OFILES): $(HFILES) - -clean: - -rm -f *.o *.a test* *~ *.out *.m config.* \ - lspvqtrain genericvqtrain residuevqtrain\ - vqbuild vqmetrics latticebuild vqcascade latticepare - -distclean: clean - -rm -f Makefile diff --git a/vq/auxpartition.pl b/vq/auxpartition.pl deleted file mode 100755 index 73708a1a..00000000 --- a/vq/auxpartition.pl +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/perl - -if($#ARGV<0){ - &usage; -} - -$|=1; - -$bands=0; - -foreach $arg (@ARGV){ - ($entries[$bands],$file[$bands])=split(/,/,$arg); - $bands++; -} - -# no time to deal with globs right now -if($bands>0){ - die unless open(ONE,"<".$file[0]); -} -if($bands>1){ - die unless open(TWO,"<".$file[1]); -} -if($bands>2){ - die unless open(THREE,"<".$file[2]); -} - - -while (<ONE>) { - my@nums = (); - @nums = split(/,/); - my$cols=$#nums; - for($i=0;$i<$cols;$i++){ - print $nums[$i].", "; - } - if($bands>1){ - $_=<TWO>; - @nums = (); - @nums = split(/,/); - $cols=$#nums; - for($i=0;$i<$cols;$i++){ - print $nums[$i]+$entries[0].", "; - } - if($bands>2){ - $_=<THREE>; - @nums = (); - @nums = split(/,/); - $cols=$#nums; - for($i=0;$i<$cols;$i++){ - print $nums[$i]+$entries[0]+$entries[1].", "; - } - } - } - print "\n"; - -} - -if($bands>0){ - close ONE; -} -if($bands>1){ - close TWO; -} -if($bands>2){ - close THREE; -} - -sub usage{ - print "\nOggVorbis auxbook spectral partitioner\n\n"; - print "auxpartition.pl <part_entries>,file [<part_entries>,file...]\n\n"; - exit(1); -} diff --git a/vq/bookutil.c b/vq/bookutil.c deleted file mode 100644 index 7d5bb9b5..00000000 --- a/vq/bookutil.c +++ /dev/null @@ -1,742 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: utility functions for loading .vqh and .vqd files - last mod: $Id: bookutil.c,v 1.16 2000/08/15 09:09:44 xiphmont Exp $ - - ********************************************************************/ - -#include <stdlib.h> -#include <stdio.h> -#include <math.h> -#include <string.h> -#include <errno.h> -#include "vorbis/codebook.h" -#include "../lib/sharedbook.h" -#include "bookutil.h" - -/* A few little utils for reading files */ -/* read a line. Use global, persistent buffering */ -static char *linebuffer=NULL; -static int lbufsize=0; -char *get_line(FILE *in){ - long sofar=0; - if(feof(in))return NULL; - - while(1){ - int gotline=0; - - while(!gotline){ - if(sofar+1>=lbufsize){ - if(!lbufsize){ - lbufsize=1024; - linebuffer=malloc(lbufsize); - }else{ - lbufsize*=2; - linebuffer=realloc(linebuffer,lbufsize); - } - } - { - long c=fgetc(in); - switch(c){ - case EOF: - if(sofar==0)return(NULL); - /* fallthrough correct */ - case '\n': - linebuffer[sofar]='\0'; - gotline=1; - break; - default: - linebuffer[sofar++]=c; - linebuffer[sofar]='\0'; - break; - } - } - } - - if(linebuffer[0]=='#'){ - sofar=0; - }else{ - return(linebuffer); - } - } -} - -/* read the next numerical value from the given file */ -static char *value_line_buff=NULL; - -int get_line_value(FILE *in,double *value){ - char *next; - - if(!value_line_buff)return(-1); - - *value=strtod(value_line_buff, &next); - if(next==value_line_buff){ - value_line_buff=NULL; - return(-1); - }else{ - value_line_buff=next; - while(*value_line_buff>44)value_line_buff++; - if(*value_line_buff==44)value_line_buff++; - return(0); - } -} - -int get_next_value(FILE *in,double *value){ - while(1){ - if(get_line_value(in,value)){ - value_line_buff=get_line(in); - if(!value_line_buff)return(-1); - }else{ - return(0); - } - } -} - -int get_next_ivalue(FILE *in,long *ivalue){ - double value; - int ret=get_next_value(in,&value); - *ivalue=value; - return(ret); -} - -static double sequence_base=0.; -static int v_sofar=0; -void reset_next_value(void){ - value_line_buff=NULL; - sequence_base=0.; - v_sofar=0; -} - -char *setup_line(FILE *in){ - reset_next_value(); - value_line_buff=get_line(in); - return(value_line_buff); -} - - -int get_vector(codebook *b,FILE *in,int start, int n,double *a){ - int i; - const static_codebook *c=b->c; - - while(1){ - - if(v_sofar==n || get_line_value(in,a)){ - reset_next_value(); - if(get_next_value(in,a)) - break; - for(i=0;i<start;i++){ - sequence_base=*a; - get_line_value(in,a); - } - } - - for(i=1;i<c->dim;i++) - if(get_line_value(in,a+i)) - break; - - if(i==c->dim){ - double temp=a[c->dim-1]; - for(i=0;i<c->dim;i++)a[i]-=sequence_base; - if(c->q_sequencep)sequence_base=temp; - v_sofar++; - return(0); - } - sequence_base=0.; - } - - return(-1); -} - -/* read lines fromt he beginning until we find one containing the - specified string */ -char *find_seek_to(FILE *in,char *s){ - rewind(in); - while(1){ - char *line=get_line(in); - if(line){ - if(strstr(line,s)) - return(line); - }else - return(NULL); - } -} - - -/* this reads the format as written by vqbuild/latticebuild; innocent - (legal) tweaking of the file that would not affect its valid - header-ness will break this routine */ - -codebook *codebook_load(char *filename){ - codebook *b=calloc(1,sizeof(codebook)); - static_codebook *c=(static_codebook *)(b->c=calloc(1,sizeof(static_codebook))); - encode_aux_nearestmatch *a=NULL; - encode_aux_threshmatch *t=NULL; - encode_aux_pigeonhole *p=NULL; - int quant_to_read=0; - FILE *in=fopen(filename,"r"); - char *line; - long i; - - if(in==NULL){ - fprintf(stderr,"Couldn't open codebook %s\n",filename); - exit(1); - } - - /* find the codebook struct */ - find_seek_to(in,"static static_codebook _vq_book_"); - - /* get the major important values */ - line=get_line(in); - if(sscanf(line,"%ld, %ld,", - &(c->dim),&(c->entries))!=2){ - fprintf(stderr,"1: syntax in %s in line:\t %s",filename,line); - exit(1); - } - line=get_line(in); - line=get_line(in); - if(sscanf(line,"%d, %ld, %ld, %d, %d,", - &(c->maptype),&(c->q_min),&(c->q_delta),&(c->q_quant), - &(c->q_sequencep))!=5){ - fprintf(stderr,"1: syntax in %s in line:\t %s",filename,line); - exit(1); - } - - /* find the auxiliary encode struct[s] (if any) */ - if(find_seek_to(in,"static encode_aux_nearestmatch _vq_aux")){ - /* how big? */ - c->nearest_tree=a=calloc(1,sizeof(encode_aux_nearestmatch)); - line=get_line(in); - line=get_line(in); - line=get_line(in); - line=get_line(in); - line=get_line(in); - if(sscanf(line,"%ld, %ld",&(a->aux),&(a->alloc))!=2){ - fprintf(stderr,"2: syntax in %s in line:\t %s",filename,line); - exit(1); - } - - /* load ptr0 */ - find_seek_to(in,"static long _vq_ptr0"); - reset_next_value(); - a->ptr0=malloc(sizeof(long)*a->aux); - for(i=0;i<a->aux;i++) - if(get_next_ivalue(in,a->ptr0+i)){ - fprintf(stderr,"out of data while reading codebook %s\n",filename); - exit(1); - } - - /* load ptr1 */ - find_seek_to(in,"static long _vq_ptr1"); - reset_next_value(); - a->ptr1=malloc(sizeof(long)*a->aux); - for(i=0;i<a->aux;i++) - if(get_next_ivalue(in,a->ptr1+i)){ - fprintf(stderr,"out of data while reading codebook %s\n",filename); - exit(1); - } - - - /* load p */ - find_seek_to(in,"static long _vq_p_"); - reset_next_value(); - a->p=malloc(sizeof(long)*a->aux); - for(i=0;i<a->aux;i++) - if(get_next_ivalue(in,a->p+i)){ - fprintf(stderr,"out of data while reading codebook %s\n",filename); - exit(1); - } - - /* load q */ - find_seek_to(in,"static long _vq_q_"); - reset_next_value(); - a->q=malloc(sizeof(long)*a->aux); - for(i=0;i<a->aux;i++) - if(get_next_ivalue(in,a->q+i)){ - fprintf(stderr,"out of data while reading codebook %s\n",filename); - exit(1); - } - } - - if(find_seek_to(in,"static encode_aux_threshmatch _vq_aux")){ - /* how big? */ - c->thresh_tree=t=calloc(1,sizeof(encode_aux_threshmatch)); - line=get_line(in); - line=get_line(in); - line=get_line(in); - if(sscanf(line,"%d",&(t->quantvals))!=1){ - fprintf(stderr,"3: syntax in %s in line:\t %s",filename,line); - exit(1); - } - line=get_line(in); - if(sscanf(line,"%d",&(t->threshvals))!=1){ - fprintf(stderr,"4: syntax in %s in line:\t %s",filename,line); - exit(1); - } - /* load quantthresh */ - find_seek_to(in,"static double _vq_quantthresh_"); - reset_next_value(); - t->quantthresh=malloc(sizeof(double)*t->threshvals); - for(i=0;i<t->threshvals-1;i++) - if(get_next_value(in,t->quantthresh+i)){ - fprintf(stderr,"out of data 1 while reading codebook %s\n",filename); - exit(1); - } - /* load quantmap */ - find_seek_to(in,"static long _vq_quantmap_"); - reset_next_value(); - t->quantmap=malloc(sizeof(long)*t->threshvals); - for(i=0;i<t->threshvals;i++) - if(get_next_ivalue(in,t->quantmap+i)){ - fprintf(stderr,"out of data 2 while reading codebook %s\n",filename); - exit(1); - } - } - - if(find_seek_to(in,"static encode_aux_pigeonhole _vq_aux")){ - int pigeons=1,i; - /* how big? */ - c->pigeon_tree=p=calloc(1,sizeof(encode_aux_pigeonhole)); - line=get_line(in); - if(sscanf(line,"%lf, %lf, %d, %d",&(p->min),&(p->del), - &(p->mapentries),&(p->quantvals))!=4){ - fprintf(stderr,"5: syntax in %s in line:\t %s",filename,line); - exit(1); - } - line=get_line(in); - line=get_line(in); - if(sscanf(line,"%ld",&(p->fittotal))!=1){ - fprintf(stderr,"6: syntax in %s in line:\t %s",filename,line); - exit(1); - } - /* load pigeonmap */ - find_seek_to(in,"static long _vq_pigeonmap_"); - reset_next_value(); - p->pigeonmap=malloc(sizeof(long)*p->mapentries); - for(i=0;i<p->mapentries;i++) - if(get_next_ivalue(in,p->pigeonmap+i)){ - fprintf(stderr,"out of data (pigeonmap) while reading codebook %s\n",filename); - exit(1); - } - /* load fitlist */ - find_seek_to(in,"static long _vq_fitlist_"); - reset_next_value(); - p->fitlist=malloc(sizeof(long)*p->fittotal); - for(i=0;i<p->fittotal;i++) - if(get_next_ivalue(in,p->fitlist+i)){ - fprintf(stderr,"out of data (fitlist) while reading codebook %s\n",filename); - exit(1); - } - /* load fitmap */ - find_seek_to(in,"static long _vq_fitmap_"); - reset_next_value(); - for(i=0;i<c->dim;i++)pigeons*=p->quantvals; - p->fitmap=malloc(sizeof(long)*pigeons); - for(i=0;i<pigeons;i++) - if(get_next_ivalue(in,p->fitmap+i)){ - fprintf(stderr,"out of data (fitmap) while reading codebook %s\n",filename); - exit(1); - } - - /* load fitlength */ - find_seek_to(in,"static long _vq_fitlength_"); - reset_next_value(); - p->fitlength=malloc(sizeof(long)*pigeons); - for(i=0;i<pigeons;i++) - if(get_next_ivalue(in,p->fitlength+i)){ - fprintf(stderr,"out of data (fitlength) while reading codebook %s\n",filename); - exit(1); - } - } - - switch(c->maptype){ - case 0: - quant_to_read=0; - break; - case 1: - quant_to_read=_book_maptype1_quantvals(c); - break; - case 2: - quant_to_read=c->entries*c->dim; - break; - } - - /* load the quantized entries */ - find_seek_to(in,"static long _vq_quantlist_"); - reset_next_value(); - c->quantlist=malloc(sizeof(long)*quant_to_read); - for(i=0;i<quant_to_read;i++) - if(get_next_ivalue(in,c->quantlist+i)){ - fprintf(stderr,"out of data while reading codebook %s\n",filename); - exit(1); - } - - /* load the lengthlist */ - find_seek_to(in,"static long _vq_lengthlist"); - reset_next_value(); - c->lengthlist=malloc(sizeof(long)*c->entries); - for(i=0;i<c->entries;i++) - if(get_next_ivalue(in,c->lengthlist+i)){ - fprintf(stderr,"out of data while reading codebook %s\n",filename); - exit(1); - } - - /* got it all */ - fclose(in); - - vorbis_book_init_encode(b,c); - - return(b); -} - -void spinnit(char *s,int n){ - static int p=0; - static long lasttime=0; - long test; - struct timeval thistime; - - gettimeofday(&thistime,NULL); - test=thistime.tv_sec*10+thistime.tv_usec/100000; - if(lasttime!=test){ - lasttime=test; - - fprintf(stderr,"%s%d ",s,n); - - p++;if(p>3)p=0; - switch(p){ - case 0: - fprintf(stderr,"| \r"); - break; - case 1: - fprintf(stderr,"/ \r"); - break; - case 2: - fprintf(stderr,"- \r"); - break; - case 3: - fprintf(stderr,"\\ \r"); - break; - } - fflush(stderr); - } -} - -void build_tree_from_lengths(int vals, long *hist, long *lengths){ - int i,j; - long *membership=malloc(vals*sizeof(long)); - long *histsave=alloca(vals*sizeof(long)); - memcpy(histsave,hist,vals*sizeof(long)); - - for(i=0;i<vals;i++)membership[i]=i; - - /* find codeword lengths */ - /* much more elegant means exist. Brute force n^2, minimum thought */ - for(i=vals;i>1;i--){ - int first=-1,second=-1; - long least=-1; - - spinnit("building... ",i); - - /* find the two nodes to join */ - for(j=0;j<vals;j++) - if(least==-1 || hist[j]<least){ - least=hist[j]; - first=membership[j]; - } - least=-1; - for(j=0;j<vals;j++) - if((least==-1 || hist[j]<least) && membership[j]!=first){ - least=hist[j]; - second=membership[j]; - } - if(first==-1 || second==-1){ - fprintf(stderr,"huffman fault; no free branch\n"); - exit(1); - } - - /* join them */ - least=hist[first]+hist[second]; - for(j=0;j<vals;j++) - if(membership[j]==first || membership[j]==second){ - membership[j]=first; - hist[j]=least; - lengths[j]++; - } - } - for(i=0;i<vals-1;i++) - if(membership[i]!=membership[i+1]){ - fprintf(stderr,"huffman fault; failed to build single tree\n"); - exit(1); - } - - /* for sanity check purposes: how many bits would it have taken to - encode the training set? */ - { - long bitsum=0; - long samples=0; - for(i=0;i<vals;i++){ - bitsum+=(histsave[i]-1)*lengths[i]; - samples+=histsave[i]-1; - } - - if(samples){ - fprintf(stderr,"\rTotal samples in training set: %ld \n",samples); - fprintf(stderr,"\rTotal bits used to represent training set: %ld\n", - bitsum); - } - } - - free(membership); -} - -/* wrap build_tree_from_lengths to allow zero entries in the histogram */ -void build_tree_from_lengths0(int vals, long *hist, long *lengths){ - - /* pack the 'sparse' hit list into a dense list, then unpack - the lengths after the build */ - - int upper=0,i; - long *lengthlist=calloc(vals,sizeof(long)); - long *newhist=alloca(vals*sizeof(long)); - - for(i=0;i<vals;i++) - if(hist[i]>0) - newhist[upper++]=hist[i]; - - if(upper != vals){ - fprintf(stderr,"\rEliminating %d unused entries; %d entries remain\n", - vals-upper,upper); - } - - build_tree_from_lengths(upper,newhist,lengthlist); - - upper=0; - for(i=0;i<vals;i++) - if(hist[i]>0) - lengths[i]=lengthlist[upper++]; - else - lengths[i]=0; - - free(lengthlist); -} - -void write_codebook(FILE *out,char *name,const static_codebook *c){ - encode_aux_pigeonhole *p=c->pigeon_tree; - encode_aux_threshmatch *t=c->thresh_tree; - encode_aux_nearestmatch *n=c->nearest_tree; - int i,j,k; - - /* save the book in C header form */ - fprintf(out, - "/********************************************************************\n" - " * *\n" - " * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. *\n" - " * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY *\n" - " * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. *\n" - " * PLEASE READ THESE TERMS DISTRIBUTING. *\n" - " * *\n" - " * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 *\n" - " * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company *\n" - " * http://www.xiph.org/ *\n" - " * *\n" - " ********************************************************************\n" - "\n" - " function: static codebook autogenerated by vq/somethingorother\n" - "\n" - " ********************************************************************/\n\n"); - - fprintf(out,"#ifndef _V_%s_VQH_\n#define _V_%s_VQH_\n",name,name); - fprintf(out,"#include \"vorbis/codebook.h\"\n\n"); - - /* first, the static vectors, then the book structure to tie it together. */ - /* quantlist */ - if(c->quantlist){ - long vals=(c->maptype==1?_book_maptype1_quantvals(c):c->entries*c->dim); - fprintf(out,"static long _vq_quantlist_%s[] = {\n",name); - for(j=0;j<vals;j++){ - fprintf(out,"\t%ld,\n",c->quantlist[j]); - } - fprintf(out,"};\n\n"); - } - - /* lengthlist */ - fprintf(out,"static long _vq_lengthlist_%s[] = {\n",name); - for(j=0;j<c->entries;){ - fprintf(out,"\t"); - for(k=0;k<16 && j<c->entries;k++,j++) - fprintf(out,"%2ld,",c->lengthlist[j]); - fprintf(out,"\n"); - } - fprintf(out,"};\n\n"); - - if(t){ - /* quantthresh */ - fprintf(out,"static double _vq_quantthresh_%s[] = {\n",name); - for(j=0;j<t->threshvals-1;){ - fprintf(out,"\t"); - for(k=0;k<8 && j<t->threshvals-1;k++,j++) - fprintf(out,"%.5g, ",t->quantthresh[j]); - fprintf(out,"\n"); - } - fprintf(out,"};\n\n"); - - /* quantmap */ - fprintf(out,"static long _vq_quantmap_%s[] = {\n",name); - for(j=0;j<t->threshvals;){ - fprintf(out,"\t"); - for(k=0;k<8 && j<t->threshvals;k++,j++) - fprintf(out,"%5ld,",t->quantmap[j]); - fprintf(out,"\n"); - } - fprintf(out,"};\n\n"); - - fprintf(out,"static encode_aux_threshmatch _vq_auxt_%s = {\n",name); - fprintf(out,"\t_vq_quantthresh_%s,\n",name); - fprintf(out,"\t_vq_quantmap_%s,\n",name); - fprintf(out,"\t%d,\n",t->quantvals); - fprintf(out,"\t%d\n};\n\n",t->threshvals); - } - - if(p){ - int pigeons=1; - for(i=0;i<c->dim;i++)pigeons*=p->quantvals; - - /* pigeonmap */ - fprintf(out,"static long _vq_pigeonmap_%s[] = {\n",name); - for(j=0;j<p->mapentries;){ - fprintf(out,"\t"); - for(k=0;k<8 && j<p->mapentries;k++,j++) - fprintf(out,"%5ld, ",p->pigeonmap[j]); - fprintf(out,"\n"); - } - fprintf(out,"};\n\n"); - /* fitlist */ - fprintf(out,"static long _vq_fitlist_%s[] = {\n",name); - for(j=0;j<p->fittotal;){ - fprintf(out,"\t"); - for(k=0;k<8 && j<p->fittotal;k++,j++) - fprintf(out,"%5ld, ",p->fitlist[j]); - fprintf(out,"\n"); - } - fprintf(out,"};\n\n"); - /* fitmap */ - fprintf(out,"static long _vq_fitmap_%s[] = {\n",name); - for(j=0;j<pigeons;){ - fprintf(out,"\t"); - for(k=0;k<8 && j<pigeons;k++,j++) - fprintf(out,"%5ld, ",p->fitmap[j]); - fprintf(out,"\n"); - } - fprintf(out,"};\n\n"); - /* fitlength */ - fprintf(out,"static long _vq_fitlength_%s[] = {\n",name); - for(j=0;j<pigeons;){ - fprintf(out,"\t"); - for(k=0;k<8 && j<pigeons;k++,j++) - fprintf(out,"%5ld, ",p->fitlength[j]); - fprintf(out,"\n"); - } - fprintf(out,"};\n\n"); - - fprintf(out,"static encode_aux_pigeonhole _vq_auxp_%s = {\n",name); - fprintf(out,"\t%g, %g, %d, %d,\n", - p->min,p->del,p->mapentries,p->quantvals); - - fprintf(out,"\t_vq_pigeonmap_%s,\n",name); - - fprintf(out,"\t%ld,\n",p->fittotal); - fprintf(out,"\t_vq_fitlist_%s,\n",name); - fprintf(out,"\t_vq_fitmap_%s,\n",name); - fprintf(out,"\t_vq_fitlength_%s\n};\n\n",name); - } - - if(n){ - - /* ptr0 */ - fprintf(out,"static long _vq_ptr0_%s[] = {\n",name); - for(j=0;j<n->aux;){ - fprintf(out,"\t"); - for(k=0;k<8 && j<n->aux;k++,j++) - fprintf(out,"%6ld,",n->ptr0[j]); - fprintf(out,"\n"); - } - fprintf(out,"};\n\n"); - - /* ptr1 */ - fprintf(out,"static long _vq_ptr1_%s[] = {\n",name); - for(j=0;j<n->aux;){ - fprintf(out,"\t"); - for(k=0;k<8 && j<n->aux;k++,j++) - fprintf(out,"%6ld,",n->ptr1[j]); - fprintf(out,"\n"); - } - fprintf(out,"};\n\n"); - - /* p */ - fprintf(out,"static long _vq_p_%s[] = {\n",name); - for(j=0;j<n->aux;){ - fprintf(out,"\t"); - for(k=0;k<8 && j<n->aux;k++,j++) - fprintf(out,"%6ld,",n->p[j]*c->dim); - fprintf(out,"\n"); - } - fprintf(out,"};\n\n"); - - /* q */ - fprintf(out,"static long _vq_q_%s[] = {\n",name); - for(j=0;j<n->aux;){ - fprintf(out,"\t"); - for(k=0;k<8 && j<n->aux;k++,j++) - fprintf(out,"%6ld,",n->q[j]*c->dim); - fprintf(out,"\n"); - } - fprintf(out,"};\n\n"); - - fprintf(out,"static encode_aux_nearestmatch _vq_auxn_%s = {\n",name); - fprintf(out,"\t_vq_ptr0_%s,\n",name); - fprintf(out,"\t_vq_ptr1_%s,\n",name); - fprintf(out,"\t_vq_p_%s,\n",name); - fprintf(out,"\t_vq_q_%s,\n",name); - fprintf(out,"\t%ld, %ld\n};\n\n",n->aux,n->aux); - } - - /* tie it all together */ - - fprintf(out,"static static_codebook _vq_book_%s = {\n",name); - - fprintf(out,"\t%ld, %ld,\n",c->dim,c->entries); - fprintf(out,"\t_vq_lengthlist_%s,\n",name); - fprintf(out,"\t%d, %ld, %ld, %d, %d,\n", - c->maptype,c->q_min,c->q_delta,c->q_quant,c->q_sequencep); - if(c->quantlist) - fprintf(out,"\t_vq_quantlist_%s,\n",name); - else - fprintf(out,"\tNULL,\n"); - - if(n) - fprintf(out,"\t&_vq_auxn_%s,\n",name); - else - fprintf(out,"\tNULL,\n"); - if(t) - fprintf(out,"\t&_vq_auxt_%s,\n",name); - else - fprintf(out,"\tNULL,\n"); - if(p) - fprintf(out,"\t&_vq_auxp_%s,\n",name); - else - fprintf(out,"\tNULL,\n"); - - fprintf(out,"};\n\n"); - - fprintf(out,"\n#endif\n"); -} diff --git a/vq/bookutil.h b/vq/bookutil.h deleted file mode 100644 index e225a85d..00000000 --- a/vq/bookutil.h +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: utility functions for loading .vqh and .vqd files - last mod: $Id: bookutil.h,v 1.6 2000/07/12 09:36:18 xiphmont Exp $ - - ********************************************************************/ - -#ifndef _V_BOOKUTIL_H_ -#define _V_BOOKUTIL_H_ - -#include <stdio.h> -#include <sys/time.h> - -#include "vorbis/codebook.h" - -extern char *get_line(FILE *in); -extern char *setup_line(FILE *in); -extern int get_line_value(FILE *in,double *value); -extern int get_next_value(FILE *in,double *value); -extern int get_next_ivalue(FILE *in,long *ivalue); -extern void reset_next_value(void); -extern int get_vector(codebook *b,FILE *in,int start,int num,double *a); -extern char *find_seek_to(FILE *in,char *s); - -extern codebook *codebook_load(char *filename); -extern void write_codebook(FILE *out,char *name,const static_codebook *c); - -extern void spinnit(char *s,int n); -extern void build_tree_from_lengths(int vals, long *hist, long *lengths); -extern void build_tree_from_lengths0(int vals, long *hist, long *lengths); - -#endif - diff --git a/vq/build.c b/vq/build.c deleted file mode 100644 index 295677aa..00000000 --- a/vq/build.c +++ /dev/null @@ -1,198 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: utility main for building codebooks from training sets - last mod: $Id: build.c,v 1.14 2000/06/14 01:38:32 xiphmont Exp $ - - ********************************************************************/ - -#include <stdlib.h> -#include <stdio.h> -#include <math.h> -#include <string.h> -#include <errno.h> -#include "vorbis/codebook.h" -#include "../lib/sharedbook.h" -#include "bookutil.h" - -#include "vqgen.h" -#include "vqsplit.h" - -static char *linebuffer=NULL; -static int lbufsize=0; -static char *rline(FILE *in,FILE *out){ - long sofar=0; - if(feof(in))return NULL; - - while(1){ - int gotline=0; - - while(!gotline){ - if(sofar>=lbufsize){ - if(!lbufsize){ - lbufsize=1024; - linebuffer=malloc(lbufsize); - }else{ - lbufsize*=2; - linebuffer=realloc(linebuffer,lbufsize); - } - } - { - long c=fgetc(in); - switch(c){ - case '\n': - case EOF: - gotline=1; - break; - default: - linebuffer[sofar++]=c; - linebuffer[sofar]='\0'; - break; - } - } - } - - if(linebuffer[0]=='#'){ - sofar=0; - }else{ - return(linebuffer); - } - } -} - -/* command line: - buildvq file -*/ - -int main(int argc,char *argv[]){ - vqgen v; - static_codebook c; - codebook b; - quant_meta q; - - long *quantlist=NULL; - int entries=-1,dim=-1,aux=-1; - FILE *out=NULL; - FILE *in=NULL; - char *line,*name; - long i,j,k; - - b.c=&c; - - if(argv[1]==NULL){ - fprintf(stderr,"Need a trained data set on the command line.\n"); - exit(1); - } - - { - char *ptr; - char *filename=strdup(argv[1]); - - in=fopen(filename,"r"); - if(!in){ - fprintf(stderr,"Could not open input file %s\n",filename); - exit(1); - } - - ptr=strrchr(filename,'-'); - if(ptr){ - *ptr='\0'; - name=strdup(filename); - sprintf(ptr,".vqh"); - }else{ - name=strdup(filename); - strcat(filename,".vqh"); - } - - out=fopen(filename,"w"); - if(out==NULL){ - fprintf(stderr,"Unable to open %s for writing\n",filename); - exit(1); - } - } - - /* suck in the trained book */ - - /* read book type, but it doesn't matter */ - line=rline(in,out); - - line=rline(in,out); - if(sscanf(line,"%d %d %d",&entries,&dim,&aux)!=3){ - fprintf(stderr,"Syntax error reading book file\n"); - exit(1); - } - - /* just use it to allocate mem */ - vqgen_init(&v,dim,0,entries,0.,NULL,NULL,0); - - /* quant */ - line=rline(in,out); - if(sscanf(line,"%ld %ld %d %d",&q.min,&q.delta, - &q.quant,&q.sequencep)!=4){ - fprintf(stderr,"Syntax error reading book file\n"); - exit(1); - } - - /* quantized entries */ - /* save quant data; we don't want to requantize later as our method - is currently imperfect wrt repeated application */ - i=0; - quantlist=malloc(sizeof(long)*v.elements*v.entries); - for(j=0;j<entries;j++){ - double a; - for(k=0;k<dim;k++){ - line=rline(in,out); - sscanf(line,"%lf",&a); - v.entrylist[i]=a; - quantlist[i++]=rint(a); - } - } - - /* ignore bias */ - for(j=0;j<entries;j++)line=rline(in,out); - free(v.bias); - v.bias=NULL; - - /* training points */ - { - double *b=alloca(sizeof(double)*(dim+aux)); - i=0; - v.entries=0; /* hack to avoid reseeding */ - while(1){ - for(k=0;k<dim+aux;k++){ - line=rline(in,out); - if(!line)break; - sscanf(line,"%lf",b+k); - } - if(feof(in))break; - vqgen_addpoint(&v,b,NULL); - } - v.entries=entries; - } - - fclose(in); - vqgen_unquantize(&v,&q); - - /* build the book */ - vqsp_book(&v,&b,quantlist); - c.q_min=q.min; - c.q_delta=q.delta; - c.q_quant=q.quant; - c.q_sequencep=q.sequencep; - - /* save the book in C header form */ - write_codebook(out,name,b.c); - - fclose(out); - exit(0); -} diff --git a/vq/cascade.c b/vq/cascade.c deleted file mode 100644 index dac193b6..00000000 --- a/vq/cascade.c +++ /dev/null @@ -1,94 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: function call to do simple data cascading - last mod: $Id: cascade.c,v 1.6 2000/05/08 20:49:50 xiphmont Exp $ - - ********************************************************************/ - -/* this one outputs residue to stdout. */ - -#include <stdlib.h> -#include <unistd.h> -#include <math.h> -#include "vorbis/codebook.h" -#include "../lib/sharedbook.h" -#include "bookutil.h" - -/* set up metrics */ - -double count=0.; - - -void process_preprocess(codebook **bs,char *basename){ -} - -void process_postprocess(codebook **b,char *basename){ - fprintf(stderr,"Done. \n"); -} - -double process_one(codebook *b,double *a,int dim,int step,int addmul, - double base){ - int j; - - if(b->c->q_sequencep){ - double temp; - for(j=0;j<dim;j++){ - temp=a[j*step]; - a[j*step]-=base; - } - base=temp; - } - - vorbis_book_besterror(b,a,step,addmul); - - return base; -} - -void process_vector(codebook **bs,int *addmul,int inter,double *a,int n){ - int i,bi=0; - int booknum=0; - - while(*bs){ - double base=0.; - codebook *b=*bs; - int dim=b->dim; - - if(inter){ - for(i=0;i<n/dim;i++) - base=process_one(b,a+i,dim,n/dim,addmul[bi],base); - }else{ - for(i=0;i<=n-dim;i+=dim) - base=process_one(b,a+i,dim,1,addmul[bi],base); - } - - bs++; - booknum++; - bi++; - } - - for(i=0;i<n;i++) - fprintf(stdout,"%f, ",a[i]); - fprintf(stdout,"\n"); - - if((long)(count++)%100)spinnit("working.... lines: ",count); -} - -void process_usage(void){ - fprintf(stderr, - "usage: vqcascade [-i] +|*<codebook>.vqh [ +|*<codebook.vqh> ]... \n" - " datafile.vqd [datafile.vqd]...\n\n" - " data can be taken on stdin. residual error data sent to\n" - " stdout.\n\n"); - -} diff --git a/vq/genericdata.c b/vq/genericdata.c deleted file mode 100644 index 2a6ffb95..00000000 --- a/vq/genericdata.c +++ /dev/null @@ -1,62 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: generic euclidian distance metric for VQ codebooks - last mod: $Id: genericdata.c,v 1.5 2000/05/08 20:49:50 xiphmont Exp $ - - ********************************************************************/ - -#include <stdlib.h> -#include <math.h> -#include <stdio.h> -#include "vqgen.h" -#include "vqext.h" - -char *vqext_booktype="GENERICdata"; -int vqext_aux=0; -quant_meta q={0,0,0,0}; /* non sequence data; each scalar - independent */ - -void vqext_quantize(vqgen *v,quant_meta *q){ - vqgen_quantize(v,q); -} - -double *vqext_weight(vqgen *v,double *p){ - /*noop*/ - return(p); -} - - /* candidate,actual */ -double vqext_metric(vqgen *v,double *e, double *p){ - int i; - double acc=0.; - for(i=0;i<v->elements;i++){ - double val=p[i]-e[i]; - acc+=val*val; - } - return sqrt(acc/v->elements); -} - -void vqext_addpoint_adj(vqgen *v,double *b,int start,int dim,int cols,int num){ - vqgen_addpoint(v,b+start,NULL); -} - -void vqext_preprocess(vqgen *v){ - /* noop */ -} - - - - - - diff --git a/vq/huffbuild.c b/vq/huffbuild.c deleted file mode 100644 index dc728f2c..00000000 --- a/vq/huffbuild.c +++ /dev/null @@ -1,195 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: hufftree builder - last mod: $Id: huffbuild.c,v 1.4 2000/07/12 09:36:17 xiphmont Exp $ - - ********************************************************************/ - -#include <stdlib.h> -#include <string.h> -#include <math.h> -#include <stdio.h> -#include "../vq/bookutil.h" - -static int nsofar=0; -static int getval(FILE *in,int begin,int n,int group,int max){ - double v; - int i; - long val=0; - - if(nsofar>=n || get_line_value(in,&v)){ - reset_next_value(); - nsofar=0; - if(get_next_value(in,&v)) - return(-1); - for(i=1;i<=begin;i++) - get_line_value(in,&v); - } - - val=(int)v; - nsofar++; - - for(i=1;i<group;i++,nsofar++) - if(nsofar>=n || get_line_value(in,&v)) - return(getval(in,begin,n,group,max)); - else - val = val*max+(int)v; - return(val); -} - -static void usage(){ - fprintf(stderr, - "usage:\n" - "huffbuild <input>.vqd <begin,n,group> [noguard]\n" - " where begin,n,group is first scalar, \n" - " number of scalars of each in line,\n" - " number of scalars in a group\n" - "eg: huffbuild reslongaux.vqd 0,1024,4\n" - "produces reslongaux.vqh\n\n"); - exit(1); -} - -int main(int argc, char *argv[]){ - char *base; - char *infile; - int i,j,k,begin,n,subn,guard=1; - FILE *file; - int maxval=0; - - if(argc<3)usage(); - if(argc==4)guard=0; - - infile=strdup(argv[1]); - base=strdup(infile); - if(strrchr(base,'.')) - strrchr(base,'.')[0]='\0'; - - { - char *pos=strchr(argv[2],','); - begin=atoi(argv[2]); - if(!pos) - usage(); - else - n=atoi(pos+1); - pos=strchr(pos+1,','); - if(!pos) - usage(); - else - subn=atoi(pos+1); - if(n/subn*subn != n){ - fprintf(stderr,"n must be divisible by group\n"); - exit(1); - } - } - - /* scan the file for maximum value */ - file=fopen(infile,"r"); - if(!file){ - fprintf(stderr,"Could not open file %s\n",infile); - exit(1); - } - i=0; - while(1){ - long v; - if(get_next_ivalue(file,&v))break; - if(v>maxval)maxval=v; - - if(!(i++&0xff))spinnit("loading... ",i); - } - rewind(file); - maxval++; - - { - long vals=pow(maxval,subn); - long *hist=malloc(vals*sizeof(long)); - long *lengths=malloc(vals*sizeof(long)); - - for(j=0;j<vals;j++)hist[j]=guard; - - reset_next_value(); - i/=subn; - while(!feof(file)){ - long val=getval(file,begin,n,subn,maxval); - if(val==-1)break; - hist[val]++; - if(!(i--&0xff))spinnit("loading... ",i*subn); - } - fclose(file); - - /* we have the probabilities, build the tree */ - fprintf(stderr,"Building tree for %ld entries\n",vals); - build_tree_from_lengths0(vals,hist,lengths); - - /* save the book */ - { - char *buffer=alloca(strlen(base)+5); - strcpy(buffer,base); - strcat(buffer,".vqh"); - file=fopen(buffer,"w"); - if(!file){ - fprintf(stderr,"Could not open file %s\n",buffer); - exit(1); - } - } - - fprintf(file, - "/********************************************************************\n" - " * *\n" - " * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. *\n" - " * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY *\n" - " * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. *\n" - " * PLEASE READ THESE TERMS DISTRIBUTING. *\n" - " * *\n" - " * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-1999 *\n" - " * by 1999 Monty <monty@xiph.org> and The XIPHOPHORUS Company *\n" - " * http://www.xiph.org/ *\n" - " * *\n" - " ********************************************************************\n" - "\n" - " function: static codebook autogenerated by huff/huffbuld\n" - "\n" - " ********************************************************************/\n\n"); - - fprintf(file,"#ifndef _V_%s_VQH_\n#define _V_%s_VQH_\n",base,base); - fprintf(file,"#include \"vorbis/codebook.h\"\n\n"); - - /* first, the static vectors, then the book structure to tie it together. */ - /* lengthlist */ - fprintf(file,"static long _huff_lengthlist_%s[] = {\n",base); - for(j=0;j<vals;){ - fprintf(file,"\t"); - for(k=0;k<16 && j<vals;k++,j++) - fprintf(file,"%2ld,",lengths[j]); - fprintf(file,"\n"); - } - fprintf(file,"};\n\n"); - - /* the toplevel book */ - fprintf(file,"static static_codebook _huff_book_%s = {\n",base); - fprintf(file,"\t%d, %ld,\n",subn,vals); - fprintf(file,"\t_huff_lengthlist_%s,\n",base); - fprintf(file,"\t0, 0, 0, 0, 0,\n"); - fprintf(file,"\tNULL,\n"); - fprintf(file,"\tNULL,\n"); - fprintf(file,"\tNULL,\n"); - fprintf(file,"};\n\n"); - - fprintf(file,"\n#endif\n"); - fclose(file); - fprintf(stderr,"Done. \n\n"); - } - exit(0); -} - - diff --git a/vq/latticebuild.c b/vq/latticebuild.c deleted file mode 100644 index aa92bdfb..00000000 --- a/vq/latticebuild.c +++ /dev/null @@ -1,174 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: utility main for building codebooks from lattice descriptions - last mod: $Id: latticebuild.c,v 1.5 2000/08/15 09:09:44 xiphmont Exp $ - - ********************************************************************/ - -#include <stdlib.h> -#include <stdio.h> -#include <math.h> -#include <string.h> -#include <errno.h> -#include "vorbis/codebook.h" -#include "../lib/sharedbook.h" -#include "bookutil.h" - -/* The purpose of this util is just to finish packaging the - description into a static codebook. It used to count hits for a - histogram, but I've divorced that out to add some flexibility (it - currently generates an equal probability codebook) - - command line: - latticebuild description.vql - - the lattice description file contains two lines: - - <n> <dim> <multiplicitavep> <sequentialp> - <value_0> <value_1> <value_2> ... <value_n-1> - - a threshmap (or pigeonmap) struct is generated by latticehint; - there are fun tricks one can do with the threshmap and cascades, - but the utils don't know them... - - entropy encoding is done by feeding an entry list collected from a - training set and feeding it to latticetune along with the book. - - latticebuild produces a codebook on stdout */ - -static int ilog(unsigned int v){ - int ret=0; - while(v){ - ret++; - v>>=1; - } - return(ret); -} - -int main(int argc,char *argv[]){ - codebook b; - static_codebook c; - double *quantlist; - long *hits; - - int entries=-1,dim=-1,quantvals=-1,addmul=-1,sequencep=0; - FILE *in=NULL; - char *line,*name; - long i,j; - - memset(&b,0,sizeof(b)); - memset(&c,0,sizeof(c)); - - if(argv[1]==NULL){ - fprintf(stderr,"Need a lattice description file on the command line.\n"); - exit(1); - } - - { - char *ptr; - char *filename=calloc(strlen(argv[1])+4,1); - - strcpy(filename,argv[1]); - in=fopen(filename,"r"); - if(!in){ - fprintf(stderr,"Could not open input file %s\n",filename); - exit(1); - } - - ptr=strrchr(filename,'.'); - if(ptr){ - *ptr='\0'; - name=strdup(filename); - }else{ - name=strdup(filename); - } - - } - - /* read the description */ - line=get_line(in); - if(sscanf(line,"%d %d %d %d",&quantvals,&dim,&addmul,&sequencep)!=4){ - if(sscanf(line,"%d %d %d",&quantvals,&dim,&addmul)!=3){ - fprintf(stderr,"Syntax error reading book file (line 1)\n"); - exit(1); - } - } - entries=pow(quantvals,dim); - c.dim=dim; - c.entries=entries; - c.lengthlist=malloc(entries*sizeof(long)); - c.maptype=1; - c.q_sequencep=sequencep; - c.quantlist=calloc(quantvals,sizeof(long)); - - quantlist=malloc(sizeof(long)*c.dim*c.entries); - hits=malloc(c.entries*sizeof(long)); - for(j=0;j<entries;j++)hits[j]=1; - for(j=0;j<entries;j++)c.lengthlist[j]=1; - - reset_next_value(); - setup_line(in); - for(j=0;j<quantvals;j++){ - if(get_line_value(in,quantlist+j)==-1){ - fprintf(stderr,"Ran out of data on line 2 of description file\n"); - exit(1); - } - } - - /* gen a real quant list from the more easily human-grokked input */ - { - double min=quantlist[0]; - double mindel=-1; - int fac=1; - for(j=1;j<quantvals;j++)if(quantlist[j]<min)min=quantlist[j]; - for(j=0;j<quantvals;j++) - for(i=j+1;i<quantvals;i++) - if(mindel==-1 || fabs(quantlist[j]-quantlist[i])<mindel) - mindel=fabs(quantlist[j]-quantlist[i]); - - j=0; - while(j<quantvals){ - for(j=0;j<quantvals;j++){ - double test=(quantlist[j]-min)/(mindel/fac); - if( fabs(rint(test)-test)>.000001) break; - } - if(j<quantvals)fac++; - } - - mindel/=fac; - fprintf(stderr,"min=%g mindel=%g\n",min,mindel); - - c.q_min=_float32_pack(min); - c.q_delta=_float32_pack(mindel); - c.q_quant=0; - - min=_float32_unpack(c.q_min); - mindel=_float32_unpack(c.q_delta); - for(j=0;j<quantvals;j++){ - c.quantlist[j]=rint((quantlist[j]-min)/mindel); - if(ilog(c.quantlist[j])>c.q_quant)c.q_quant=ilog(c.quantlist[j]); - } - } - - /* build the [default] codeword lengths */ - memset(c.lengthlist,0,sizeof(long)*entries); - for(i=0;i<entries;i++)hits[i]=1; - build_tree_from_lengths(entries,hits,c.lengthlist); - - /* save the book in C header form */ - write_codebook(stdout,name,&c); - fprintf(stderr,"\r " - "\nDone.\n"); - exit(0); -} diff --git a/vq/latticehint.c b/vq/latticehint.c deleted file mode 100644 index 94f4bbb8..00000000 --- a/vq/latticehint.c +++ /dev/null @@ -1,418 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: utility main for building thresh/pigeonhole encode hints - last mod: $Id: latticehint.c,v 1.2 2000/08/15 09:09:44 xiphmont Exp $ - - ********************************************************************/ - -#include <stdlib.h> -#include <stdio.h> -#include <math.h> -#include <string.h> -#include <errno.h> -#include "vorbis/codebook.h" -#include "../lib/sharedbook.h" -#include "../lib/scales.h" -#include "bookutil.h" -#include "vqgen.h" -#include "vqsplit.h" - -/* The purpose of this util is to build encode hints for lattice - codebooks so that brute forcing each codebook entry isn't needed. - Threshhold hints are for books in which each scalar in the vector - is independant (eg, residue) and pigeonhole lookups provide a - minimum error fit for words where the scalars are interdependant - (each affecting the fit of the next in sequence) as in an LSP - sequential book (or can be used along with a sparse threshhold map, - like a splitting tree that need not be trained) - - If the input book is non-sequential, a threshhold hint is built. - If the input book is sequential, a pigeonholing hist is built. - If the book is sparse, a pigeonholing hint is built, possibly in addition - to the threshhold hint - - command line: - latticehint book.vqh - - latticehint produces book.vqh on stdout */ - -static int longsort(const void *a, const void *b){ - return(**((long **)a)-**((long **)b)); -} - -static int addtosearch(int entry,long **tempstack,long *tempcount,int add){ - long *ptr=tempstack[entry]; - long i=tempcount[entry]; - - if(ptr){ - while(i--) - if(*ptr++==add)return(0); - tempstack[entry]=realloc(tempstack[entry], - (tempcount[entry]+1)*sizeof(long)); - }else{ - tempstack[entry]=malloc(sizeof(long)); - } - - tempstack[entry][tempcount[entry]++]=add; - return(1); -} - -static void setvals(int dim,encode_aux_pigeonhole *p, - long *temptrack,double *tempmin,double *tempmax, - int seqp){ - int i; - double last=0.; - for(i=0;i<dim;i++){ - tempmin[i]=(temptrack[i])*p->del+p->min+last; - tempmax[i]=tempmin[i]+p->del; - if(seqp)last=tempmin[i]; - } -} - -/* note that things are currently set up such that input fits that - quantize outside the pigeonmap are dropped and brute-forced. So we - can ignore the <0 and >=n boundary cases in min/max error */ - -static double minerror(int dim,double *a,encode_aux_pigeonhole *p, - long *temptrack,double *tempmin,double *tempmax){ - int i; - double err=0.; - for(i=0;i<dim;i++){ - double eval=0.; - if(a[i]<tempmin[i]){ - eval=tempmin[i]-a[i]; - }else if(a[i]>tempmax[i]){ - eval=a[i]-tempmax[i]; - } - err+=eval*eval; - } - return(err); -} - -static double maxerror(int dim,double *a,encode_aux_pigeonhole *p, - long *temptrack,double *tempmin,double *tempmax){ - int i; - double err=0.,eval; - for(i=0;i<dim;i++){ - if(a[i]<tempmin[i]){ - eval=tempmax[i]-a[i]; - }else if(a[i]>tempmax[i]){ - eval=a[i]-tempmin[i]; - }else{ - double t1=a[i]-tempmin[i]; - eval=tempmax[i]-a[i]; - if(t1>eval)eval=t1; - } - err+=eval*eval; - } - return(err); -} - -int main(int argc,char *argv[]){ - codebook *b; - static_codebook *c; - int entries=-1,dim=-1; - double min,del; - char *name; - long i,j; - long dB=0; - - if(argv[1]==NULL){ - fprintf(stderr,"Need a lattice book on the command line.\n"); - exit(1); - } - - if(argv[2])dB=1; - - { - char *ptr; - char *filename=strdup(argv[1]); - - b=codebook_load(filename); - c=(static_codebook *)(b->c); - - ptr=strrchr(filename,'.'); - if(ptr){ - *ptr='\0'; - name=strdup(filename); - }else{ - name=strdup(filename); - } - } - - if(c->maptype!=1){ - fprintf(stderr,"Provided book is not a latticebook.\n"); - exit(1); - } - - entries=b->entries; - dim=b->dim; - min=_float32_unpack(c->q_min); - del=_float32_unpack(c->q_delta); - - /* Do we want to gen a threshold hint? */ - if(c->q_sequencep==0){ - /* yes. Discard any preexisting threshhold hint */ - long quantvals=_book_maptype1_quantvals(c); - long **quantsort=alloca(quantvals*sizeof(long *)); - encode_aux_threshmatch *t=calloc(1,sizeof(encode_aux_threshmatch)); - c->thresh_tree=t; - - fprintf(stderr,"Adding threshold hint to %s...\n",name); - - /* simplest possible threshold hint only */ - t->quantthresh=calloc(quantvals-1,sizeof(double)); - t->quantmap=calloc(quantvals,sizeof(int)); - t->threshvals=quantvals; - t->quantvals=quantvals; - - /* the quantvals may not be in order; sort em first */ - for(i=0;i<quantvals;i++)quantsort[i]=c->quantlist+i; - qsort(quantsort,quantvals,sizeof(long *),longsort); - - /* ok, gen the map and thresholds */ - for(i=0;i<quantvals;i++)t->quantmap[i]=quantsort[i]-c->quantlist; - for(i=0;i<quantvals-1;i++){ - double v1=*(quantsort[i])*del+min; - double v2=*(quantsort[i+1])*del+min; - if(dB){ - if(fabs(v1)<.01)v1=(v1+v2)*.5; - if(fabs(v2)<.01)v2=(v1+v2)*.5; - t->quantthresh[i]=fromdB((todB(v1)+todB(v2))*.5); - if(v1<0 || v2<0)t->quantthresh[i]*=-1; - - }else{ - t->quantthresh[i]=(v1+v2)*.5; - } - } - } - - /* Do we want to gen a pigeonhole hint? */ - for(i=0;i<entries;i++)if(c->lengthlist[i]==0)break; - if(c->q_sequencep || i<entries){ - long **tempstack; - long *tempcount; - long *temptrack; - double *tempmin; - double *tempmax; - long totalstack=0; - long pigeons; - long subpigeons; - long quantvals=_book_maptype1_quantvals(c); - int changep=1,factor; - - encode_aux_pigeonhole *p=calloc(1,sizeof(encode_aux_pigeonhole)); - c->pigeon_tree=p; - - fprintf(stderr,"Adding pigeonhole hint to %s...\n",name); - - /* the idea is that we quantize uniformly, even in a nonuniform - lattice, so that quantization of one scalar has a predictable - result on the next sequential scalar in a greedy matching - algorithm. We generate a lookup based on the quantization of - the vector (pigeonmap groups quantized entries together) and - list the entries that could possible be the best fit for any - given member of that pigeonhole. The encode process then has a - much smaller list to brute force */ - - /* find our pigeonhole-specific quantization values, fill in the - quant value->pigeonhole map */ - factor=3; - p->del=del; - p->min=min; - p->quantvals=quantvals; - { - int max=0; - for(i=0;i<quantvals;i++)if(max<c->quantlist[i])max=c->quantlist[i]; - p->mapentries=max; - } - p->pigeonmap=malloc(p->mapentries*sizeof(long)); - p->quantvals=(quantvals+factor-1)/factor; - - /* pigeonhole roughly on the boundaries of the quantvals; the - exact pigeonhole grouping is an optimization issue, not a - correctness issue */ - for(i=0;i<p->mapentries;i++){ - double thisval=del*i+min; /* middle of the quant zone */ - int quant=0; - double err=fabs(c->quantlist[0]*del+min-thisval); - for(j=1;j<quantvals;j++){ - double thiserr=fabs(c->quantlist[j]*del+min-thisval); - if(thiserr<err){ - quant=j/factor; - err=thiserr; - } - } - p->pigeonmap[i]=quant; - } - - /* pigeonmap complete. Now do the grungy business of finding the - entries that could possibly be the best fit for a value appearing - in the pigeonhole. The trick that allows the below to work is the - uniform quantization; even though the scalars may be 'sequential' - (each a delta from the last), the uniform quantization means that - the error variance is *not* dependant. Given a pigeonhole and an - entry, we can find the minimum and maximum possible errors - (relative to the entry) for any point that could appear in the - pigeonhole */ - - /* must iterate over both pigeonholes and entries */ - /* temporarily (in order to avoid thinking hard), we grow each - pigeonhole seperately, the build a stack of 'em later */ - pigeons=1; - subpigeons=1; - for(i=0;i<dim;i++)subpigeons*=p->mapentries; - for(i=0;i<dim;i++)pigeons*=p->quantvals; - temptrack=calloc(dim,sizeof(long)); - tempmin=calloc(dim,sizeof(double)); - tempmax=calloc(dim,sizeof(double)); - tempstack=calloc(pigeons,sizeof(long *)); - tempcount=calloc(pigeons,sizeof(long)); - - while(1){ - double errorpost=-1; - char buffer[80]; - - /* map our current pigeonhole to a 'big pigeonhole' so we know - what list we're after */ - int entry=0; - for(i=dim-1;i>=0;i--)entry=entry*p->quantvals+p->pigeonmap[temptrack[i]]; - setvals(dim,p,temptrack,tempmin,tempmax,c->q_sequencep); - sprintf(buffer,"Building pigeonhole search list [%ld]...",totalstack); - - - /* Search all entries to find the one with the minimum possible - maximum error. Record that error */ - for(i=0;i<entries;i++){ - if(c->lengthlist[i]>0){ - double this=maxerror(dim,b->valuelist+i*dim,p, - temptrack,tempmin,tempmax); - if(errorpost==-1 || this<errorpost)errorpost=this; - spinnit(buffer,subpigeons); - } - } - - /* Our search list will contain all entries with a minimum - possible error <= our errorpost */ - for(i=0;i<entries;i++) - if(c->lengthlist[i]>0){ - spinnit(buffer,subpigeons); - if(minerror(dim,b->valuelist+i*dim,p, - temptrack,tempmin,tempmax)<errorpost) - totalstack+=addtosearch(entry,tempstack,tempcount,i); - } - - for(i=0;i<dim;i++){ - temptrack[i]++; - if(temptrack[i]<p->mapentries)break; - temptrack[i]=0; - } - if(i==dim)break; - subpigeons--; - } - - fprintf(stderr,"\r " - "\rTotal search list size (all entries): %ld\n",totalstack); - - /* pare the index of lists for improbable quantizations (where - improbable is determined by c->lengthlist; we assume that - pigeonholing is in sync with the codeword cells, which it is */ - /*for(i=0;i<entries;i++){ - double probability= 1./(1<<c->lengthlist[i]); - if(c->lengthlist[i]==0 || probability*entries<cutoff){ - totalstack-=tempcount[i]; - tempcount[i]=0; - } - }*/ - - /* pare the list of shortlists; merge contained and similar lists - together */ - p->fitmap=malloc(pigeons*sizeof(long)); - for(i=0;i<pigeons;i++)p->fitmap[i]=-1; - while(changep){ - char buffer[80]; - changep=0; - - for(i=0;i<pigeons;i++){ - if(p->fitmap[i]<0 && tempcount[i]){ - for(j=i+1;j<pigeons;j++){ - if(p->fitmap[j]<0 && tempcount[j]){ - /* is one list a superset, or are they sufficiently similar? */ - int amiss=0,bmiss=0,ii,jj; - for(ii=0;ii<tempcount[i];ii++){ - for(jj=0;jj<tempcount[j];jj++) - if(tempstack[i][ii]==tempstack[j][jj])break; - if(jj==tempcount[j])amiss++; - } - for(jj=0;jj<tempcount[j];jj++){ - for(ii=0;ii<tempcount[i];ii++) - if(tempstack[i][ii]==tempstack[j][jj])break; - if(ii==tempcount[i])bmiss++; - } - if(amiss==0 || - bmiss==0 || - (amiss*2<tempcount[i] && bmiss*2<tempcount[j] && - tempcount[i]+bmiss<entries/30)){ - - /*superset/similar Add all of one to the other. */ - for(jj=0;jj<tempcount[j];jj++) - totalstack+=addtosearch(i,tempstack,tempcount, - tempstack[j][jj]); - totalstack-=tempcount[j]; - p->fitmap[j]=i; - changep=1; - } - } - } - sprintf(buffer,"Consolidating [%ld total, %s]... ",totalstack, - changep?"reit":"nochange"); - spinnit(buffer,pigeons-i); - } - } - } - - /* repack the temp stack in final form */ - fprintf(stderr,"\r " - "\rFinal total list size: %ld\n",totalstack); - - - p->fittotal=totalstack; - p->fitlist=malloc((totalstack+1)*sizeof(long)); - p->fitlength=malloc(pigeons*sizeof(long)); - { - long usage=0; - for(i=0;i<pigeons;i++){ - if(p->fitmap[i]==-1){ - if(tempcount[i]) - memcpy(p->fitlist+usage,tempstack[i],tempcount[i]*sizeof(long)); - p->fitmap[i]=usage; - p->fitlength[i]=tempcount[i]; - usage+=tempcount[i]; - if(usage>totalstack){ - fprintf(stderr,"Internal error; usage>totalstack\n"); - exit(1); - } - }else{ - p->fitlength[i]=p->fitlength[p->fitmap[i]]; - p->fitmap[i]=p->fitmap[p->fitmap[i]]; - } - } - } - } - - write_codebook(stdout,name,c); - fprintf(stderr,"\r " - "\nDone.\n"); - exit(0); -} diff --git a/vq/latticepare.c b/vq/latticepare.c deleted file mode 100644 index 7b7c6903..00000000 --- a/vq/latticepare.c +++ /dev/null @@ -1,598 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: utility for paring low hit count cells from lattice codebook - last mod: $Id: latticepare.c,v 1.4 2000/07/12 09:36:18 xiphmont Exp $ - - ********************************************************************/ - -#include <stdlib.h> -#include <stdio.h> -#include <math.h> -#include <string.h> -#include <errno.h> -#include "vorbis/codebook.h" -#include "../lib/sharedbook.h" -#include "../lib/scales.h" -#include "bookutil.h" -#include "vqgen.h" -#include "vqsplit.h" -#include "../lib/os.h" - -/* Lattice codebooks have two strengths: important fetaures that are - poorly modelled by global error minimization training (eg, strong - peaks) are not neglected 2) compact quantized representation. - - A fully populated lattice codebook, however, swings point 1 too far - in the opposite direction; rare features need not be modelled quite - so religiously and as such, we waste bits unless we eliminate the - least common cells. The codebook rep supports unused cells, so we - need to tag such cells and build an auxiliary (non-thresh) search - mechanism to find the proper match quickly */ - -/* two basic steps; first is pare the cell for which dispersal creates - the least additional error. This will naturally choose - low-population cells and cells that have not taken on points from - neighboring paring (but does not result in the lattice collapsing - inward and leaving low population ares totally unmodelled). After - paring has removed the desired number of cells, we need to build an - auxiliary search for each culled point */ - -/* Although lattice books (due to threshhold-based matching) do not - actually use error to make cell selections (in fact, it need not - bear any relation), the 'secondbest' entry finder here is in fact - error/distance based, so latticepare is only useful on such books */ - -/* command line: - latticepare latticebook.vqh input_data.vqd <target_cells> - - produces a new output book on stdout -*/ - -static double _dist(int el,double *a, double *b){ - int i; - double acc=0.; - for(i=0;i<el;i++){ - double val=(a[i]-b[i]); - acc+=val*val; - } - return(acc); -} - -static double *pointlist; -static long points=0; - -void add_vector(codebook *b,double *vec,long n){ - int dim=b->dim,i,j; - int step=n/dim; - for(i=0;i<step;i++){ - for(j=i;j<n;j+=step){ - pointlist[points++]=vec[j]; - } - } -} - -static int bestm(codebook *b,double *vec){ - encode_aux_threshmatch *tt=b->c->thresh_tree; - int dim=b->dim; - int i,k,o; - int best=0; - - /* what would be the closest match if the codebook was fully - populated? */ - - for(k=0,o=dim-1;k<dim;k++,o--){ - int i; - for(i=0;i<tt->threshvals-1;i++) - if(vec[o]<tt->quantthresh[i])break; - best=(best*tt->quantvals)+tt->quantmap[i]; - } - return(best); -} - -static int closest(codebook *b,double *vec,int current){ - encode_aux_threshmatch *tt=b->c->thresh_tree; - int dim=b->dim; - int i,k,o; - - double bestmetric=0; - int bestentry=-1; - int best=bestm(b,vec); - - if(current<0 && b->c->lengthlist[best]>0)return best; - - for(i=0;i<b->entries;i++){ - if(b->c->lengthlist[i]>0 && i!=best && i!=current){ - double thismetric=_dist(dim, vec, b->valuelist+i*dim); - if(bestentry==-1 || thismetric<bestmetric){ - bestentry=i; - bestmetric=thismetric; - } - } - } - - return(bestentry); -} - -static double _heuristic(codebook *b,double *ppt,int secondbest){ - double *secondcell=b->valuelist+secondbest*b->dim; - int best=bestm(b,ppt); - double *firstcell=b->valuelist+best*b->dim; - double error=_dist(b->dim,firstcell,secondcell); - double *zero=alloca(b->dim*sizeof(double)); - double fromzero; - - memset(zero,0,b->dim*sizeof(double)); - fromzero=sqrt(_dist(b->dim,firstcell,zero)); - - return(error/fromzero); -} - -static int longsort(const void *a, const void *b){ - return **(long **)b-**(long **)a; -} - -void usage(void){ - fprintf(stderr,"Ogg/Vorbis lattice codebook paring utility\n\n" - "usage: latticepare book.vqh data.vqd <target_cells> <protected_cells> base\n" - "where <target_cells> is the desired number of final cells (or -1\n" - " for no change)\n" - " <protected_cells> is the number of highest-hit count cells\n" - " to protect from dispersal\n" - " base is the base name (not including .vqh) of the new\n" - " book\n\n"); - exit(1); -} - -int main(int argc,char *argv[]){ - char *basename; - codebook *b=NULL; - int entries=0; - int dim=0; - long i,j,target=-1,protect=-1; - FILE *out=NULL; - - int argnum=0; - - argv++; - if(*argv==NULL){ - usage(); - exit(1); - } - - while(*argv){ - if(*argv[0]=='-'){ - - argv++; - - }else{ - switch (argnum++){ - case 0:case 1: - { - /* yes, this is evil. However, it's very convenient to parse file - extentions */ - - /* input file. What kind? */ - char *dot; - char *ext=NULL; - char *name=strdup(*argv++); - dot=strrchr(name,'.'); - if(dot) - ext=dot+1; - else{ - ext=""; - - } - - - /* codebook */ - if(!strcmp(ext,"vqh")){ - - basename=strrchr(name,'/'); - if(basename) - basename=strdup(basename)+1; - else - basename=strdup(name); - dot=strrchr(basename,'.'); - if(dot)*dot='\0'; - - b=codebook_load(name); - dim=b->dim; - entries=b->entries; - } - - /* data file; we do actually need to suck it into memory */ - /* we're dealing with just one book, so we can de-interleave */ - if(!strcmp(ext,"vqd") && !points){ - int cols; - long lines=0; - char *line; - double *vec; - FILE *in=fopen(name,"r"); - if(!in){ - fprintf(stderr,"Could not open input file %s\n",name); - exit(1); - } - - reset_next_value(); - line=setup_line(in); - /* count cols before we start reading */ - { - char *temp=line; - while(*temp==' ')temp++; - for(cols=0;*temp;cols++){ - while(*temp>32)temp++; - while(*temp==' ')temp++; - } - } - vec=alloca(cols*sizeof(double)); - /* count, then load, to avoid fragmenting the hell out of - memory */ - while(line){ - lines++; - for(j=0;j<cols;j++) - if(get_line_value(in,vec+j)){ - fprintf(stderr,"Too few columns on line %ld in data file\n",lines); - exit(1); - } - if((lines&0xff)==0)spinnit("counting samples...",lines*cols); - line=setup_line(in); - } - pointlist=malloc((cols*lines+entries*dim)*sizeof(double)); - - rewind(in); - line=setup_line(in); - while(line){ - lines--; - for(j=0;j<cols;j++) - if(get_line_value(in,vec+j)){ - fprintf(stderr,"Too few columns on line %ld in data file\n",lines); - exit(1); - } - /* deinterleave, add to heap */ - add_vector(b,vec,cols); - if((lines&0xff)==0)spinnit("loading samples...",lines*cols); - - line=setup_line(in); - } - fclose(in); - } - } - break; - case 2: - target=atol(*argv++); - if(target==0)target=entries; - break; - case 3: - protect=atol(*argv++); - break; - case 4: - { - char *buff=alloca(strlen(*argv)+5); - sprintf(buff,"%s.vqh",*argv); - basename=*argv++; - - out=fopen(buff,"w"); - if(!out){ - fprintf(stderr,"unable ot open %s for output",buff); - exit(1); - } - } - break; - default: - usage(); - } - } - } - if(!entries || !points || !out)usage(); - if(target==-1)usage(); - - /* add guard points */ - for(i=0;i<entries;i++) - for(j=0;j<dim;j++) - pointlist[points++]=b->valuelist[i*dim+j]; - - points/=dim; - - /* set up auxiliary vectors for error tracking */ - { - encode_aux_nearestmatch *nt=NULL; - long pointssofar=0; - long *pointindex; - long indexedpoints=0; - long *entryindex; - long *reventry; - long *membership=malloc(points*sizeof(long)); - long *firsthead=malloc(entries*sizeof(long)); - long *secondary=malloc(points*sizeof(long)); - long *secondhead=malloc(entries*sizeof(long)); - - long *cellcount=calloc(entries,sizeof(long)); - long *cellcount2=calloc(entries,sizeof(long)); - double *cellerror=calloc(entries,sizeof(double)); - double *cellerrormax=calloc(entries,sizeof(double)); - long cellsleft=entries; - for(i=0;i<points;i++)membership[i]=-1; - for(i=0;i<entries;i++)firsthead[i]=-1; - for(i=0;i<points;i++)secondary[i]=-1; - for(i=0;i<entries;i++)secondhead[i]=-1; - - for(i=0;i<points;i++){ - /* assign vectors to the nearest cell. Also keep track of second - nearest for error statistics */ - double *ppt=pointlist+i*dim; - int firstentry=closest(b,ppt,-1); - int secondentry=closest(b,ppt,firstentry); - double firstmetric=_dist(dim,b->valuelist+dim*firstentry,ppt); - double secondmetric=_dist(dim,b->valuelist+dim*secondentry,ppt); - - if(!(i&0xff))spinnit("initializing... ",points-i); - - membership[i]=firsthead[firstentry]; - firsthead[firstentry]=i; - secondary[i]=secondhead[secondentry]; - secondhead[secondentry]=i; - - if(i<points-entries){ - cellerror[firstentry]+=secondmetric-firstmetric; - cellerrormax[firstentry]=max(cellerrormax[firstentry], - _heuristic(b,ppt,secondentry)); - cellcount[firstentry]++; - cellcount2[secondentry]++; - } - } - - /* which cells are most heavily populated? Protect as many from - dispersal as the user has requested */ - { - long **countindex=calloc(entries,sizeof(long *)); - for(i=0;i<entries;i++)countindex[i]=cellcount+i; - qsort(countindex,entries,sizeof(long *),longsort); - for(i=0;i<protect;i++){ - int ptr=countindex[i]-cellcount; - cellerrormax[ptr]=9e50; - } - } - - { - fprintf(stderr,"\r"); - for(i=0;i<entries;i++){ - /* decompose index */ - int entry=i; - for(j=0;j<dim;j++){ - fprintf(stderr,"%d:",entry%b->c->thresh_tree->quantvals); - entry/=b->c->thresh_tree->quantvals; - } - - fprintf(stderr,":%ld/%ld, ",cellcount[i],cellcount2[i]); - } - fprintf(stderr,"\n"); - } - - /* do the automatic cull request */ - while(cellsleft>target){ - int bestcell=-1; - double besterror=0; - double besterror2=0; - long head=-1; - char spinbuf[80]; - sprintf(spinbuf,"cells left to eliminate: %ld : ",cellsleft-target); - - /* find the cell with lowest removal impact */ - for(i=0;i<entries;i++){ - if(b->c->lengthlist[i]>0){ - if(bestcell==-1 || cellerrormax[i]<=besterror2){ - if(bestcell==-1 || cellerrormax[i]<besterror2 || - besterror>cellerror[i]){ - besterror=cellerror[i]; - besterror2=cellerrormax[i]; - bestcell=i; - } - } - } - } - - fprintf(stderr,"\reliminating cell %d \n" - " dispersal error of %g max/%g total (%ld hits)\n", - bestcell,besterror2,besterror,cellcount[bestcell]); - - /* disperse it. move each point out, adding it (properly) to - the second best */ - b->c->lengthlist[bestcell]=0; - head=firsthead[bestcell]; - firsthead[bestcell]=-1; - while(head!=-1){ - /* head is a point number */ - double *ppt=pointlist+head*dim; - int firstentry=closest(b,ppt,-1); - int secondentry=closest(b,ppt,firstentry); - double firstmetric=_dist(dim,b->valuelist+dim*firstentry,ppt); - double secondmetric=_dist(dim,b->valuelist+dim*secondentry,ppt); - long next=membership[head]; - - if(head<points-entries){ - cellcount[firstentry]++; - cellcount[bestcell]--; - cellerror[firstentry]+=secondmetric-firstmetric; - cellerrormax[firstentry]=max(cellerrormax[firstentry], - _heuristic(b,ppt,secondentry)); - } - - membership[head]=firsthead[firstentry]; - firsthead[firstentry]=head; - head=next; - if(cellcount[bestcell]%128==0) - spinnit(spinbuf,cellcount[bestcell]+cellcount2[bestcell]); - - } - - /* now see that all points that had the dispersed cell as second - choice have second choice reassigned */ - head=secondhead[bestcell]; - secondhead[bestcell]=-1; - while(head!=-1){ - double *ppt=pointlist+head*dim; - /* who are we assigned to now? */ - int firstentry=closest(b,ppt,-1); - /* what is the new second closest match? */ - int secondentry=closest(b,ppt,firstentry); - /* old second closest is the cell being disbanded */ - double oldsecondmetric=_dist(dim,b->valuelist+dim*bestcell,ppt); - /* new second closest error */ - double secondmetric=_dist(dim,b->valuelist+dim*secondentry,ppt); - long next=secondary[head]; - - if(head<points-entries){ - cellcount2[secondentry]++; - cellcount2[bestcell]--; - cellerror[firstentry]+=secondmetric-oldsecondmetric; - cellerrormax[firstentry]=max(cellerrormax[firstentry], - _heuristic(b,ppt,secondentry)); - } - - secondary[head]=secondhead[secondentry]; - secondhead[secondentry]=head; - head=next; - - if(cellcount2[bestcell]%128==0) - spinnit(spinbuf,cellcount2[bestcell]); - } - - cellsleft--; - } - - /* paring is over. Build decision trees using points that now fall - through the thresh matcher. */ - /* we don't free membership; we flatten it in order to use in lp_split */ - - for(i=0;i<entries;i++){ - long head=firsthead[i]; - spinnit("rearranging membership cache... ",entries-i); - while(head!=-1){ - long next=membership[head]; - membership[head]=i; - head=next; - } - } - - free(secondhead); - free(firsthead); - free(cellerror); - free(cellerrormax); - free(secondary); - - pointindex=malloc(points*sizeof(long)); - /* make a point index of fall-through points */ - for(i=0;i<points;i++){ - int best=_best(b,pointlist+i*dim,1); - if(best==-1) - pointindex[indexedpoints++]=i; - spinnit("finding orphaned points... ",points-i); - } - - /* make an entry index */ - entryindex=malloc(entries*sizeof(long)); - target=0; - for(i=0;i<entries;i++){ - if(b->c->lengthlist[i]>0) - entryindex[target++]=i; - } - - /* make working space for a reverse entry index */ - reventry=malloc(entries*sizeof(long)); - - /* do the split */ - nt=b->c->nearest_tree= - calloc(1,sizeof(encode_aux_nearestmatch)); - - nt->alloc=4096; - nt->ptr0=malloc(sizeof(long)*nt->alloc); - nt->ptr1=malloc(sizeof(long)*nt->alloc); - nt->p=malloc(sizeof(long)*nt->alloc); - nt->q=malloc(sizeof(long)*nt->alloc); - nt->aux=0; - - fprintf(stderr,"Leaves added: %d \n", - lp_split(pointlist,points, - b,entryindex,target, - pointindex,indexedpoints, - membership,reventry, - 0,&pointssofar)); - free(membership); - free(reventry); - free(pointindex); - - /* hack alert. I should just change the damned splitter and - codebook writer */ - for(i=0;i<nt->aux;i++)nt->p[i]*=dim; - for(i=0;i<nt->aux;i++)nt->q[i]*=dim; - - /* recount hits. Build new lengthlist. reuse entryindex storage */ - for(i=0;i<entries;i++)entryindex[i]=1; - for(i=0;i<points-entries;i++){ - int best=_best(b,pointlist+i*dim,1); - double *a=pointlist+i*dim; - if(!(i&0xff))spinnit("counting hits...",i); - if(best==-1){ - fprintf(stderr,"\nINTERNAL ERROR; a point count not be matched to a\n" - "codebook entry. The new decision tree is broken.\n"); - exit(1); - } - entryindex[best]++; - } - for(i=0;i<nt->aux;i++)nt->p[i]/=dim; - for(i=0;i<nt->aux;i++)nt->q[i]/=dim; - - /* the lengthlist builder doesn't actually deal with 0 hit entries. - So, we pack the 'sparse' hit list into a dense list, then unpack - the lengths after the build */ - { - int upper=0; - long *lengthlist=calloc(entries,sizeof(long)); - for(i=0;i<entries;i++){ - if(b->c->lengthlist[i]>0) - entryindex[upper++]=entryindex[i]; - else{ - if(entryindex[i]>1){ - fprintf(stderr,"\nINTERNAL ERROR; _best matched to unused entry\n"); - exit(1); - } - } - } - - /* sanity check */ - if(upper != target){ - fprintf(stderr,"\nINTERNAL ERROR; packed the wrong number of entries\n"); - exit(1); - } - - build_tree_from_lengths(upper,entryindex,lengthlist); - - upper=0; - for(i=0;i<entries;i++){ - if(b->c->lengthlist[i]>0) - b->c->lengthlist[i]=lengthlist[upper++]; - } - - } - } - /* we're done. write it out. */ - write_codebook(out,basename,b->c); - - fprintf(stderr,"\r \nDone.\n"); - return(0); -} - - - - diff --git a/vq/latticetune.c b/vq/latticetune.c deleted file mode 100644 index c4a81f94..00000000 --- a/vq/latticetune.c +++ /dev/null @@ -1,156 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: utility main for setting entropy encoding parameters - for lattice codebooks - last mod: $Id: latticetune.c,v 1.2 2000/08/15 09:09:44 xiphmont Exp $ - - ********************************************************************/ - -#include <stdlib.h> -#include <stdio.h> -#include <math.h> -#include <string.h> -#include <errno.h> -#include "vorbis/codebook.h" -#include "../lib/sharedbook.h" -#include "bookutil.h" - -/* This util takes a training-collected file listing codewords used in - LSP fitting, then generates new codeword lengths for maximally - efficient integer-bits entropy encoding. - - command line: - latticetune book.vqh input.vqd [unused_entriesp] - - latticetune produces book.vqh on stdout */ - -int main(int argc,char *argv[]){ - codebook *b; - static_codebook *c; - long *lengths; - long *hits; - - int entries=-1,dim=-1,guard=1; - FILE *in=NULL; - char *line,*name; - long j; - - if(argv[1]==NULL){ - fprintf(stderr,"Need a lattice codebook on the command line.\n"); - exit(1); - } - if(argv[2]==NULL){ - fprintf(stderr,"Need a codeword data file on the command line.\n"); - exit(1); - } - if(argv[3]!=NULL)guard=0; - - { - char *ptr; - char *filename=strdup(argv[1]); - - b=codebook_load(filename); - c=(static_codebook *)(b->c); - - ptr=strrchr(filename,'.'); - if(ptr){ - *ptr='\0'; - name=strdup(filename); - }else{ - name=strdup(filename); - } - } - - if(c->maptype!=1){ - fprintf(stderr,"Provided book is not a latticebook.\n"); - exit(1); - } - - entries=b->entries; - dim=b->dim; - - hits=malloc(entries*sizeof(long)); - lengths=calloc(entries,sizeof(long)); - for(j=0;j<entries;j++)hits[j]=guard; - - in=fopen(argv[2],"r"); - if(!in){ - fprintf(stderr,"Could not open input file %s\n",argv[2]); - exit(1); - } - - if(!strcmp(argv[0],"latticetune")){ - long lines=0; - line=setup_line(in); - while(line){ - long code; - lines++; - if(!(lines&0xfff))spinnit("codewords so far...",lines); - - if(sscanf(line,"%ld",&code)==1) - hits[code]++; - - line=setup_line(in); - } - } - - if(!strcmp(argv[0],"restune")){ - long step; - long lines=0; - long cols=-1; - double *vec; - line=setup_line(in); - while(line){ - int code; - if(!(lines&0xfff))spinnit("codewords so far...",lines); - - if(cols==-1){ - char *temp=line; - while(*temp==' ')temp++; - for(cols=0;*temp;cols++){ - while(*temp>32)temp++; - while(*temp==' ')temp++; - } - vec=alloca(sizeof(double)*cols); - step=cols/dim; - } - - for(j=0;j<cols;j++) - if(get_line_value(in,vec+j)){ - fprintf(stderr,"Too few columns on line %ld in data file\n",lines); - exit(1); - } - - for(j=0;j<step;j++){ - lines++; - code=_best(b,vec+j,step); - hits[code]++; - } - - line=setup_line(in); - } - } - - fclose(in); - - /* build the codeword lengths */ - build_tree_from_lengths0(entries,hits,lengths); - - c->lengthlist=lengths; - write_codebook(stdout,name,c); - - fprintf(stderr,"\r " - "\nDone.\n"); - exit(0); -} diff --git a/vq/lspdata.c b/vq/lspdata.c deleted file mode 100644 index 1181ac41..00000000 --- a/vq/lspdata.c +++ /dev/null @@ -1,160 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: metrics and quantization code for LSP VQ codebooks - last mod: $Id: lspdata.c,v 1.12 2000/05/08 20:49:50 xiphmont Exp $ - - ********************************************************************/ - -#include <stdlib.h> -#include <math.h> -#include <stdio.h> -#include "vqgen.h" -#include "vqext.h" -#include "../lib/sharedbook.h" - -char *vqext_booktype="LSPdata"; -quant_meta q={0,0,0,1}; /* set sequence data */ -int vqext_aux=1; - -double global_maxdel=M_PI; -double global_mindel=M_PI; -#if 0 -void vqext_quantize(vqgen *v,quant_meta *q){ - double delta,mindel; - double maxquant=((1<<q->quant)-1); - int j,k; - - /* first find the basic delta amount from the maximum span to be - encoded. Loosen the delta slightly to allow for additional error - during sequence quantization */ - - delta=(global_maxdel-global_mindel)/((1<<q->quant)-1.5); - - q->min=_float32_pack(global_mindel); - q->delta=_float32_pack(delta); - - mindel=_float32_unpack(q->min); - delta=_float32_unpack(q->delta); - - for(j=0;j<v->entries;j++){ - double last=0; - for(k=0;k<v->elements;k++){ - double val=_now(v,j)[k]; - double now=rint((val-last-mindel)/delta); - - _now(v,j)[k]=now; - if(now<0){ - /* be paranoid; this should be impossible */ - fprintf(stderr,"fault; quantized value<0\n"); - exit(1); - } - - if(now>maxquant){ - /* be paranoid; this should be impossible */ - fprintf(stderr,"fault; quantized value>max\n"); - exit(1); - } - last=(now*delta)+mindel+last; - } - } - -} -#else -void vqext_quantize(vqgen *v,quant_meta *q){ - vqgen_quantize(v,q); -} -#endif - -double *weight=NULL; -#if 0 -/* LSP training metric. We weight error proportional to distance - *between* LSP vector values. The idea of this metric is not to set - final cells, but get the midpoint spacing into a form conducive to - what we want, which is weighting toward preserving narrower - features. */ - -#define FUDGE (global_maxdel-weight[i]) - -double *vqext_weight(vqgen *v,double *p){ - int i; - int el=v->elements; - double lastp=0.; - for(i=0;i<el;i++){ - double predist=(p[i]-lastp); - double postdist=(p[i+1]-p[i]); - weight[i]=(predist<postdist?predist:postdist); - lastp=p[i]; - } - return p; -} -#else -#define FUDGE 1. -double *vqext_weight(vqgen *v,double *p){ - return p; -} -#endif - - /* candidate,actual */ -double vqext_metric(vqgen *v,double *e, double *p){ - int i; - int el=v->elements; - double acc=0.; - for(i=0;i<el;i++){ - double val=(p[i]-e[i])*FUDGE; - acc+=val*val; - } - return sqrt(acc/v->elements); -} - -/* Data files are line-vectors, starting with zero. If we want to - train on a subvector starting in the middle, we need to adjust the - data as if it was starting at zero. we also need to add the 'aux' - value, which is an extra point at the end so we have leading and - trailing space */ - -/* assume vqext_aux==1 */ -void vqext_addpoint_adj(vqgen *v,double *b,int start,int dim,int cols,int num){ - double *a=alloca(sizeof(double)*(dim+1)); /* +aux */ - double base=0; - int i; - - if(start>0)base=b[start-1]; - for(i=0;i<dim;i++)a[i]=b[i+start]-base; - if(start+dim+1>cols) /* +aux */ - a[i]=a[i-1]; - else - a[i]=b[i+start]-base; - - vqgen_addpoint(v,a,a+dim); -} - -/* we just need to calc the global_maxdel from the training set */ -void vqext_preprocess(vqgen *v){ - long j,k; - - global_maxdel=0.; - global_mindel=M_PI; - for(j=0;j<v->points;j++){ - double last=0.; - for(k=0;k<v->elements+v->aux;k++){ - double p=_point(v,j)[k]; - if(p-last>global_maxdel)global_maxdel=p-last; - if(p-last<global_mindel)global_mindel=p-last; - last=p; - } - } - - weight=malloc(sizeof(double)*v->elements); -} - diff --git a/vq/metrics.c b/vq/metrics.c deleted file mode 100644 index 20d7990b..00000000 --- a/vq/metrics.c +++ /dev/null @@ -1,298 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: function calls to collect codebook metrics - last mod: $Id: metrics.c,v 1.8 2000/06/14 01:38:32 xiphmont Exp $ - - ********************************************************************/ - - -#include <stdlib.h> -#include <unistd.h> -#include <math.h> -#include "vorbis/codebook.h" -#include "../lib/sharedbook.h" -#include "bookutil.h" - -/* collect the following metrics: - - mean and mean squared amplitude - mean and mean squared error - mean and mean squared error (per sample) by entry - worst case fit by entry - entry cell size - hits by entry - total bits - total samples - (average bits per sample)*/ - - -/* set up metrics */ - -double meanamplitude_acc=0.; -double meanamplitudesq_acc=0.; -double meanerror_acc=0.; -double meanerrorsq_acc=0.; - -double **histogram=NULL; -double **histogram_error=NULL; -double **histogram_errorsq=NULL; -double **histogram_hi=NULL; -double **histogram_lo=NULL; -double bits=0.; -double count=0.; - -static double *_now(codebook *c, int i){ - return c->valuelist+i*c->c->dim; -} - -int books=0; - -void process_preprocess(codebook **bs,char *basename){ - int i; - while(bs[books])books++; - - if(books){ - histogram=calloc(books,sizeof(double *)); - histogram_error=calloc(books,sizeof(double *)); - histogram_errorsq=calloc(books,sizeof(double *)); - histogram_hi=calloc(books,sizeof(double *)); - histogram_lo=calloc(books,sizeof(double *)); - }else{ - fprintf(stderr,"Specify at least one codebook\n"); - exit(1); - } - - for(i=0;i<books;i++){ - codebook *b=bs[i]; - histogram[i]=calloc(b->entries,sizeof(double)); - histogram_error[i]=calloc(b->entries*b->dim,sizeof(double)); - histogram_errorsq[i]=calloc(b->entries*b->dim,sizeof(double)); - histogram_hi[i]=calloc(b->entries*b->dim,sizeof(double)); - histogram_lo[i]=calloc(b->entries*b->dim,sizeof(double)); - } -} - -static double _dist(int el,double *a, double *b){ - int i; - double acc=0.; - for(i=0;i<el;i++){ - double val=(a[i]-b[i]); - acc+=val*val; - } - return acc; -} - -void cell_spacing(codebook *c){ - int j,k; - double min=-1,max=-1,mean=0.,meansq=0.; - long total=0; - - /* minimum, maximum, mean, ms cell spacing */ - for(j=0;j<c->c->entries;j++){ - if(c->c->lengthlist[j]>0){ - double localmin=-1.; - for(k=0;k<c->c->entries;k++){ - if(c->c->lengthlist[k]>0){ - double this=_dist(c->c->dim,_now(c,j),_now(c,k)); - if(j!=k && - (localmin==-1 || this<localmin)) - localmin=this; - } - } - - if(min==-1 || localmin<min)min=localmin; - if(max==-1 || localmin>max)max=localmin; - mean+=sqrt(localmin); - meansq+=localmin; - total++; - } - } - - fprintf(stderr,"\tminimum cell spacing (closest side): %g\n",sqrt(min)); - fprintf(stderr,"\tmaximum cell spacing (closest side): %g\n",sqrt(max)); - fprintf(stderr,"\tmean closest side spacing: %g\n",mean/total); - fprintf(stderr,"\tmean sq closest side spacing: %g\n",sqrt(meansq/total)); -} - -void process_postprocess(codebook **bs,char *basename){ - int i,k,book; - char *buffer=alloca(strlen(basename)+80); - - fprintf(stderr,"Done. Processed %ld data points:\n\n", - (long)count); - - fprintf(stderr,"Global statistics:******************\n\n"); - - fprintf(stderr,"\ttotal samples: %ld\n",(long)count); - fprintf(stderr,"\ttotal bits required to code: %ld\n",(long)bits); - fprintf(stderr,"\taverage bits per sample: %g\n\n",bits/count); - - fprintf(stderr,"\tmean sample amplitude: %g\n", - meanamplitude_acc/count); - fprintf(stderr,"\tmean squared sample amplitude: %g\n\n", - sqrt(meanamplitudesq_acc/count)); - - fprintf(stderr,"\tmean code error: %g\n", - meanerror_acc/count); - fprintf(stderr,"\tmean squared code error: %g\n\n", - sqrt(meanerrorsq_acc/count)); - - for(book=0;book<books;book++){ - FILE *out; - codebook *b=bs[book]; - int n=b->c->entries; - int dim=b->c->dim; - - fprintf(stderr,"Book %d statistics:------------------\n",book); - - cell_spacing(b); - - sprintf(buffer,"%s-%d-mse.m",basename,book); - out=fopen(buffer,"w"); - if(!out){ - fprintf(stderr,"Could not open file %s for writing\n",buffer); - exit(1); - } - - for(i=0;i<n;i++){ - for(k=0;k<dim;k++){ - fprintf(out,"%d, %g, %g\n", - i*dim+k,(b->valuelist+i*dim)[k], - sqrt((histogram_errorsq[book]+i*dim)[k]/histogram[book][i])); - } - } - fclose(out); - - sprintf(buffer,"%s-%d-me.m",basename,book); - out=fopen(buffer,"w"); - if(!out){ - fprintf(stderr,"Could not open file %s for writing\n",buffer); - exit(1); - } - - for(i=0;i<n;i++){ - for(k=0;k<dim;k++){ - fprintf(out,"%d, %g, %g\n", - i*dim+k,(b->valuelist+i*dim)[k], - (histogram_error[book]+i*dim)[k]/histogram[book][i]); - } - } - fclose(out); - - sprintf(buffer,"%s-%d-worst.m",basename,book); - out=fopen(buffer,"w"); - if(!out){ - fprintf(stderr,"Could not open file %s for writing\n",buffer); - exit(1); - } - - for(i=0;i<n;i++){ - for(k=0;k<dim;k++){ - fprintf(out,"%d, %g, %g, %g\n", - i*dim+k,(b->valuelist+i*dim)[k], - (b->valuelist+i*dim)[k]+(histogram_lo[book]+i*dim)[k], - (b->valuelist+i*dim)[k]+(histogram_hi[book]+i*dim)[k]); - } - } - fclose(out); - } -} - -double process_one(codebook *b,int book,double *a,int dim,int step,int addmul, - double base){ - int j,entry; - double amplitude=0.; - - if(book==0){ - double last=base; - for(j=0;j<dim;j++){ - amplitude=a[j*step]-(b->c->q_sequencep?last:0); - meanamplitude_acc+=fabs(amplitude); - meanamplitudesq_acc+=amplitude*amplitude; - count++; - last=a[j*step]; - } - } - - if(b->c->q_sequencep){ - double temp; - for(j=0;j<dim;j++){ - temp=a[j*step]; - a[j*step]-=base; - } - base=temp; - } - - entry=vorbis_book_besterror(b,a,step,addmul); - - if(entry==-1){ - fprintf(stderr,"Internal error: _best returned -1.\n"); - exit(1); - } - - histogram[book][entry]++; - bits+=vorbis_book_codelen(b,entry); - - for(j=0;j<dim;j++){ - double error=a[j*step]; - - if(book==books-1){ - meanerror_acc+=fabs(error); - meanerrorsq_acc+=error*error; - } - histogram_errorsq[book][entry*dim+j]+=error*error; - histogram_error[book][entry*dim+j]+=fabs(error); - if(histogram[book][entry]==0 || histogram_hi[book][entry*dim+j]<error) - histogram_hi[book][entry*dim+j]=error; - if(histogram[book][entry]==0 || histogram_lo[book][entry*dim+j]>error) - histogram_lo[book][entry*dim+j]=error; - } - return base; -} - - -void process_vector(codebook **bs,int *addmul,int inter,double *a,int n){ - int bi; - int i; - - for(bi=0;bi<books;bi++){ - codebook *b=bs[bi]; - int dim=b->dim; - double base=0.; - - if(inter){ - for(i=0;i<n/dim;i++) - base=process_one(b,bi,a+i,dim,n/dim,addmul[bi],base); - }else{ - for(i=0;i<=n-dim;i+=dim) - base=process_one(b,bi,a+i,dim,1,addmul[bi],base); - } - } - - if((long)(count)%100)spinnit("working.... samples: ",count); -} - -void process_usage(void){ - fprintf(stderr, - "usage: vqmetrics [-i] +|*<codebook>.vqh [ +|*<codebook.vqh> ]... \n" - " datafile.vqd [datafile.vqd]...\n\n" - " data can be taken on stdin. -i indicates interleaved coding.\n" - " Output goes to output files:\n" - " basename-me.m: gnuplot: mean error by entry value\n" - " basename-mse.m: gnuplot: mean square error by entry value\n" - " basename-worst.m: gnuplot: worst error by entry value\n" - " basename-distance.m: gnuplot file showing distance probability\n" - "\n"); - -} diff --git a/vq/residue_entropy b/vq/residue_entropy deleted file mode 100755 index 49c55a53..00000000 --- a/vq/residue_entropy +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/perl - -@quant=( - 0, 1, 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, - 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, - 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12 -); - - -use POSIX; -my($groupn)=@ARGV; -my%hash; -my$count=0; -my$lines=0; - -if(!defined($groupn)){ - print "Usage: residue_entropy <groupsize> \n"; - exit(1); -} -$|=1; - -while (<STDIN>) { - chop; - my@nums = (); - @nums = split(/,/); - $lines++; - - my$step=$#nums/$groupn; - for(my$i=0;$i<$step;$i++){ - my$key=""; - for(my$j=$i;$j<$#nums;$j+=$step){ - if($nums[$j]<0){ - $num=-$quant[int(-$nums[$j]*2)]; - }else{ - $num=$quant[int($nums[$j]*2)]; - } - $key.=":$num"; - } - - if(!defined($hash{$key})){ - $count++; - $hash{$key}=1; - } - } - - if(($lines % 1000)==0){ - print "\rworking... $lines lines, found $count values so far"; - } -} - -foreach $key (keys %hash){ - print "\t$key\n"; -} - -print "\r$count values total \n"; -print "Done.\n\n"; diff --git a/vq/residuedata.c b/vq/residuedata.c deleted file mode 100644 index 84bd6d9a..00000000 --- a/vq/residuedata.c +++ /dev/null @@ -1,162 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: metrics and quantization code for residue VQ codebooks - last mod: $Id: residuedata.c,v 1.3 2000/05/08 20:49:51 xiphmont Exp $ - - ********************************************************************/ - -#include <stdlib.h> -#include <math.h> -#include <stdio.h> -#include <string.h> -#include "vqgen.h" -#include "bookutil.h" -#include "../lib/sharedbook.h" -#include "../lib/scales.h" -#include "vqext.h" - -float scalequant=3.; -char *vqext_booktype="RESdata"; -quant_meta q={0,0,0,0}; /* set sequence data */ -int vqext_aux=0; - -static double *quant_save=NULL; - -double *vqext_weight(vqgen *v,double *p){ - return p; -} - -/* quantize aligned on unit boundaries. Because our grid is likely - very coarse, play 'shuffle the blocks'; don't allow multiple - entries to fill the same spot as is nearly certain to happen. */ - -void vqext_quantize(vqgen *v,quant_meta *q){ - int j,k; - long dim=v->elements; - long n=v->entries; - double max=-1; - double *test=alloca(sizeof(double)*dim); - int moved=0; - - - /* allow movement only to unoccupied coordinates on the coarse grid */ - for(j=0;j<n;j++){ - for(k=0;k<dim;k++){ - double val=_now(v,j)[k]; - double norm=rint(fabs(val)/scalequant); - if(norm>max)max=norm; - test[k]=norm; - } - - /* allow move only if unoccupied */ - if(quant_save){ - for(k=0;k<n;k++) - if(j!=k && memcmp(test,quant_save+dim*k,dim*sizeof(double))==0) - break; - if(k==n){ - if(memcmp(test,quant_save+dim*j,dim*sizeof(double))) - moved++; - memcpy(quant_save+dim*j,test,sizeof(double)*dim); - } - }else{ - memcpy(_now(v,j),test,sizeof(double)*dim); - } - } - - /* unlike the other trainers, we fill in our quantization - information (as we know granularity beforehand and don't need to - maximize it) */ - - q->min=_float32_pack(0.); - q->delta=_float32_pack(scalequant); - q->quant=_ilog(max); - - if(quant_save){ - memcpy(_now(v,0),quant_save,sizeof(double)*dim*n); - fprintf(stderr,"cells shifted this iteration: %d\n",moved); - } -} - - /* candidate,actual */ -double vqext_metric(vqgen *v,double *e, double *p){ - int i; - double acc=0.; - for(i=0;i<v->elements;i++){ - double val=p[i]-e[i]; - acc+=val*val; - } - return sqrt(acc); -} - -/* We don't interleave here; we assume that the interleave is provided - for us by residuesplit in vorbis/huff/ */ -void vqext_addpoint_adj(vqgen *v,double *b,int start,int dim,int cols,int num){ - vqgen_addpoint(v,b+start,NULL); -} - -/* need to reseed because of the coarse quantization we tend to use on - residuals (which causes lots & lots of dupes) */ -void vqext_preprocess(vqgen *v){ - long i,j,k,l; - double *test=alloca(sizeof(double)*v->elements); - scalequant=q.quant; - - vqext_quantize(v,&q); - vqgen_unquantize(v,&q); - - /* if there are any dupes, reseed */ - for(k=0;k<v->entries;k++){ - for(l=0;l<k;l++){ - if(memcmp(_now(v,k),_now(v,l),sizeof(double)*v->elements)==0) - break; - } - if(l<k)break; - } - - if(k<v->entries){ - fprintf(stderr,"reseeding with quantization....\n"); - - /* seed the inputs to input points, but points on unit boundaries, - ignoring quantbits for now, making sure each seed is unique */ - - for(i=0,j=0;i<v->points && j<v->entries;i++){ - for(k=0;k<v->elements;k++){ - double val=_point(v,i)[k]; - test[k]=rint(val/scalequant)*scalequant; - } - - for(l=0;l<j;l++){ - for(k=0;k<v->elements;k++) - if(test[k]!=_now(v,l)[k]) - break; - if(k==v->elements)break; - } - if(l==j){ - memcpy(_now(v,j),test,v->elements*sizeof(double)); - j++; - } - } - - if(j<v->elements){ - fprintf(stderr,"Not enough unique entries after prequantization\n"); - exit(1); - } - } - vqext_quantize(v,&q); - quant_save=malloc(sizeof(double)*v->elements*v->entries); - memcpy(quant_save,_now(v,0),sizeof(double)*v->elements*v->entries); - vqgen_unquantize(v,&q); - -} - diff --git a/vq/residuesplit.c b/vq/residuesplit.c deleted file mode 100644 index 57fe2f87..00000000 --- a/vq/residuesplit.c +++ /dev/null @@ -1,240 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: residue backend 0 partitioner/classifier - last mod: $Id: residuesplit.c,v 1.4 2000/08/15 09:09:32 xiphmont Exp $ - - ********************************************************************/ - -#include <stdlib.h> -#include <string.h> -#include <math.h> -#include <stdio.h> -#include "../vq/bookutil.h" -#include "../lib/sharedbook.h" - -/* does not guard against invalid settings; eg, a subn of 16 and a - subgroup request of 32. Max subn of 128 */ -static void _testhack(double *vec,int n,double *entropy){ - int i,j=0; - double max=0.; - double temp[128]; - - /* setup */ - for(i=0;i<n;i++)temp[i]=fabs(vec[i]); - - /* handle case subgrp==1 outside */ - for(i=0;i<n;i++) - if(temp[i]>max)max=temp[i]; - - for(i=0;i<n;i++)temp[i]=rint(temp[i]); - - while(1){ - entropy[j]=max; - n>>=1; - j++; - - if(n<=0)break; - for(i=0;i<n;i++){ - temp[i]+=temp[i+n]; - } - max=0.; - for(i=0;i<n;i++) - if(temp[i]>max)max=temp[i]; - } -} - -static FILE *of; -static FILE **or; - -/* we evaluate the the entropy measure for each interleaved subgroup */ -/* This is currently a bit specific to/hardwired for mapping 0; things - will need to change in the future when we get real multichannel - mappings */ -int quantaux(double *res,int n,double *ebound,double *mbound,int *subgrp,int parts, int subn){ - long i,j; - double entropy[8]; - int aux; - - for(i=0;i<=n-subn;i+=subn){ - double max=0.; - - _testhack(res+i,subn,entropy); - for(j=0;j<subn;j++) - if(fabs(res[i+j])>max)max=fabs(res[i+j]); - - for(j=0;j<parts-1;j++) - if(entropy[subgrp[j]]<=ebound[j] && - max<=mbound[j]) - break; - aux=j; - - fprintf(of,"%d, ",aux); - - for(j=0;j<subn;j++) - fprintf(or[aux],"%g, ",res[j+i]); - - fprintf(or[aux],"\n"); - } - - fprintf(of,"\n"); - - return(0); -} - -static int getline(FILE *in,double *vec,int begin,int n){ - int i,next=0; - - reset_next_value(); - if(get_next_value(in,vec))return(0); - if(begin){ - for(i=1;i<begin;i++) - get_line_value(in,vec); - next=0; - }else{ - next=1; - } - - for(i=next;i<n;i++) - if(get_line_value(in,vec+i)){ - fprintf(stderr,"ran out of columns in input data\n"); - exit(1); - } - - return(1); -} - -static void usage(){ - fprintf(stderr, - "usage:\n" - "residuesplit <res> <begin,n,group> <baseout> <ent,peak,sub> [<ent,peak,sub>]...\n" - " where begin,n,group is first scalar, \n" - " number of scalars of each in line,\n" - " number of scalars in a group\n" - " ent is the maximum entropy value allowed for membership in a group\n" - " peak is the maximum amplitude value allowed for membership in a group\n" - " subn is the maximum entropy value allowed for membership in a group\n" - - "eg: residuesplit mask.vqd floor.vqd 0,1024,16 res 0,.5,16 3,1.5,8 \n" - "produces resaux.vqd and res_0...n.vqd\n\n"); - exit(1); -} - -int main(int argc, char *argv[]){ - char *buffer; - char *base; - int i,parts,begin,n,subn,*subgrp; - FILE *res; - double *ebound,*mbound,*vec; - long c=0; - if(argc<5)usage(); - - base=strdup(argv[3]); - buffer=alloca(strlen(base)+20); - { - char *pos=strchr(argv[2],','); - begin=atoi(argv[2]); - if(!pos) - usage(); - else - n=atoi(pos+1); - pos=strchr(pos+1,','); - if(!pos) - usage(); - else - subn=atoi(pos+1); - if(n/subn*subn != n){ - fprintf(stderr,"n must be divisible by group\n"); - exit(1); - } - } - - /* how many parts?... */ - parts=argc-3; - - ebound=malloc(sizeof(double)*parts); - mbound=malloc(sizeof(double)*parts); - subgrp=malloc(sizeof(int)*parts); - - for(i=0;i<parts-1;i++){ - char *pos=strchr(argv[4+i],','); - if(*argv[4+i]==',') - ebound[i]=1e50; - else - ebound[i]=atof(argv[4+i]); - - if(!pos){ - mbound[i]=1e50; - subgrp[i]=_ilog(subn)-1; - }else{ - if(*(pos+1)==',') - mbound[i]=1e50; - else - mbound[i]=atof(pos+1); - pos=strchr(pos+1,','); - - if(!pos){ - subgrp[i]=_ilog(subn)-1; - }else{ - subgrp[i]=_ilog(atoi(pos+1))-1; - } - } - } - - ebound[i]=1e50; - mbound[i]=1e50; - subgrp[i]=_ilog(subn)-1; - - res=fopen(argv[1],"r"); - if(!res){ - fprintf(stderr,"Could not open file %s\n",argv[1]); - exit(1); - } - - or=alloca(parts*sizeof(FILE*)); - sprintf(buffer,"%saux.vqd",base); - of=fopen(buffer,"w"); - if(!of){ - fprintf(stderr,"Could not open file %s for writing\n",buffer); - exit(1); - } - for(i=0;i<parts;i++){ - sprintf(buffer,"%s_%d.vqd",base,i); - or[i]=fopen(buffer,"w"); - if(!or[i]){ - fprintf(stderr,"Could not open file %s for writing\n",buffer); - exit(1); - } - } - - vec=malloc(sizeof(double)*n); - /* get the input line by line and process it */ - while(!feof(res)){ - if(getline(res,vec,begin,n)) - quantaux(vec,n,ebound,mbound,subgrp,parts,subn); - c++; - if(!(c&0xf)){ - spinnit("kB so far...",(int)(ftell(res)/1024)); - } - } - fclose(res); - fclose(of); - for(i=0;i<parts;i++) - fclose(or[i]); - fprintf(stderr,"\rDone \n"); - return(0); -} - - - - diff --git a/vq/run.c b/vq/run.c deleted file mode 100644 index 4ba26f0e..00000000 --- a/vq/run.c +++ /dev/null @@ -1,217 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: utility main for loading and operating on codebooks - last mod: $Id: run.c,v 1.10 2000/05/08 20:49:51 xiphmont Exp $ - - ********************************************************************/ - -#include <unistd.h> -#include <stdlib.h> -#include <stdio.h> -#include <math.h> -#include <string.h> -#include <errno.h> -#include <sys/stat.h> -#include <sys/types.h> -#include <fcntl.h> - -#include "bookutil.h" - -/* command line: - utilname [-i] +|* input_book.vqh [+|* input_book.vqh] - input_data.vqd [input_data.vqd] - - produces output data on stdout - (may also take input data from stdin) - - */ - -extern void process_preprocess(codebook **b,char *basename); -extern void process_postprocess(codebook **b,char *basename); -extern void process_vector(codebook **b,int *addmul, int inter,double *a,int n); -extern void process_usage(void); - -int main(int argc,char *argv[]){ - char *basename; - codebook **b=calloc(1,sizeof(codebook *)); - int *addmul=calloc(1,sizeof(int)); - int books=0; - int input=0; - int interleave=0; - int j; - int start=0; - int num=-1; - argv++; - - if(*argv==NULL){ - process_usage(); - exit(1); - } - - /* yes, this is evil. However, it's very convenient to parse file - extentions */ - - while(*argv){ - if(*argv[0]=='-'){ - /* option */ - if(argv[0][1]=='s'){ - /* subvector */ - if(sscanf(argv[1],"%d,%d",&start,&num)!=2){ - num= -1; - if(sscanf(argv[1],"%d",&start)!=1){ - fprintf(stderr,"Syntax error using -s\n"); - exit(1); - } - } - argv+=2; - } - if(argv[0][1]=='i'){ - /* interleave */ - interleave=1; - argv+=1; - } - }else{ - /* input file. What kind? */ - char *dot; - char *ext=NULL; - char *name=strdup(*argv++); - dot=strrchr(name,'.'); - if(dot) - ext=dot+1; - else - ext=""; - - /* codebook */ - if(!strcmp(ext,"vqh")){ - int multp=0; - if(input){ - fprintf(stderr,"specify all input data (.vqd) files following\n" - "codebook header (.vqh) files\n"); - exit(1); - } - /* is it additive or multiplicative? */ - if(name[0]=='*'){ - multp=1; - name++; - } - if(name[0]=='+')name++; - - basename=strrchr(name,'/'); - if(basename) - basename=strdup(basename)+1; - else - basename=strdup(name); - dot=strrchr(basename,'.'); - if(dot)*dot='\0'; - - b=realloc(b,sizeof(codebook *)*(books+2)); - b[books]=codebook_load(name); - addmul=realloc(addmul,sizeof(int)*(books+1)); - addmul[books++]=multp; - b[books]=NULL; - } - - /* data file */ - if(!strcmp(ext,"vqd")){ - int cols; - long lines=0; - char *line; - double *vec; - FILE *in=fopen(name,"r"); - if(!in){ - fprintf(stderr,"Could not open input file %s\n",name); - exit(1); - } - - if(!input){ - process_preprocess(b,basename); - input++; - } - - reset_next_value(); - line=setup_line(in); - /* count cols before we start reading */ - { - char *temp=line; - while(*temp==' ')temp++; - for(cols=0;*temp;cols++){ - while(*temp>32)temp++; - while(*temp==' ')temp++; - } - } - vec=alloca(cols*sizeof(double)); - while(line){ - lines++; - for(j=0;j<cols;j++) - if(get_line_value(in,vec+j)){ - fprintf(stderr,"Too few columns on line %ld in data file\n",lines); - exit(1); - } - /* ignores -s for now */ - process_vector(b,addmul,interleave,vec,cols); - - line=setup_line(in); - } - fclose(in); - } - } - } - - /* take any data from stdin */ - { - struct stat st; - if(fstat(STDIN_FILENO,&st)==-1){ - fprintf(stderr,"Could not stat STDIN\n"); - exit(1); - } - if((S_IFIFO|S_IFREG|S_IFSOCK)&st.st_mode){ - int cols; - char *line; - long lines=0; - double *vec; - if(!input){ - process_preprocess(b,basename); - input++; - } - - line=setup_line(stdin); - /* count cols before we start reading */ - { - char *temp=line; - while(*temp==' ')temp++; - for(cols=0;*temp;cols++){ - while(*temp>32)temp++; - while(*temp==' ')temp++; - } - } - vec=alloca(cols*sizeof(double)); - while(line){ - lines++; - for(j=0;j<cols;j++) - if(get_line_value(stdin,vec+j)){ - fprintf(stderr,"Too few columns on line %ld in data file\n",lines); - exit(1); - } - /* ignores -s for now */ - process_vector(b,addmul,interleave,vec,cols); - - line=setup_line(stdin); - } - } - } - - process_postprocess(b,basename); - - return 0; -} diff --git a/vq/train.c b/vq/train.c deleted file mode 100644 index 04098a4e..00000000 --- a/vq/train.c +++ /dev/null @@ -1,362 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: utility main for training codebooks - last mod: $Id: train.c,v 1.18 2000/06/14 01:38:32 xiphmont Exp $ - - ********************************************************************/ - -#include <stdlib.h> -#include <stdio.h> -#include <math.h> -#include <string.h> -#include <errno.h> -#include <signal.h> -#include "vqgen.h" -#include "vqext.h" -#include "bookutil.h" - -static char *rline(FILE *in,FILE *out,int pass){ - while(1){ - char *line=get_line(in); - if(line && line[0]=='#'){ - if(pass)fprintf(out,"%s\n",line); - }else{ - return(line); - } - } -} - -/* command line: - trainvq vqfile [options] trainfile [trainfile] - - options: -params entries,dim,quant - -subvector start[,num] - -error desired_error - -iterations iterations -*/ - -static void usage(void){ - fprintf(stderr, "\nOggVorbis %s VQ codebook trainer\n\n" - "<foo>vqtrain vqfile [options] [datasetfile] [datasetfile]\n" - "options: -p[arams] <entries,dim,quant>\n" - " -s[ubvector] <start[,num]>\n" - " -e[rror] <desired_error>\n" - " -i[terations] <maxiterations>\n" - " -d[istance] quantization mesh spacing for density limitation\n" - " -b <dummy> eliminate cell size biasing; use normal LBG\n\n" - " -c <dummy> Use centroid (not median) midpoints\n" - - "examples:\n" - " train a new codebook to 1%% tolerance on datafile 'foo':\n" - " xxxvqtrain book -p 256,6,8 -e .01 foo\n" - " (produces a trained set in book-0.vqi)\n\n" - " continue training 'book-0.vqi' (produces book-1.vqi):\n" - " xxxvqtrain book-0.vqi\n\n" - " add subvector from element 1 to <dimension> from files\n" - " data*.m to the training in progress, prodicing book-1.vqi:\n" - " xxxvqtrain book-0.vqi -s 1,1 data*.m\n\n",vqext_booktype); -} - -int exiting=0; -void setexit(int dummy){ - fprintf(stderr,"\nexiting... please wait to finish this iteration\n"); - exiting=1; -} - -int main(int argc,char *argv[]){ - vqgen v; - - int entries=-1,dim=-1; - int start=0,num=-1; - double desired=.05,mindist=0.; - int iter=1000; - int biasp=1; - int centroid=0; - - FILE *out=NULL; - char *line; - long i,j,k; - int init=0; - q.quant=-1; - - argv++; - if(!*argv){ - usage(); - exit(0); - } - - /* get the book name, a preexisting book to continue training */ - { - FILE *in=NULL; - char *filename=alloca(strlen(*argv)+30),*ptr; - - strcpy(filename,*argv); - in=fopen(filename,"r"); - ptr=strrchr(filename,'-'); - if(ptr){ - int num; - ptr++; - num=atoi(ptr); - sprintf(ptr,"%d.vqi",num+1); - }else - strcat(filename,"-0.vqi"); - - out=fopen(filename,"w"); - if(out==NULL){ - fprintf(stderr,"Unable to open %s for writing\n",filename); - exit(1); - } - - if(in){ - /* we wish to suck in a preexisting book and continue to train it */ - double a; - - line=rline(in,out,1); - if(strcmp(line,vqext_booktype)){ - fprintf(stderr,"wrong book type; %s!=%s\n",line,vqext_booktype); - exit(1); - } - - line=rline(in,out,1); - if(sscanf(line,"%d %d %d",&entries,&dim,&vqext_aux)!=3){ - fprintf(stderr,"Syntax error reading book file\n"); - exit(1); - } - - vqgen_init(&v,dim,vqext_aux,entries,mindist, - vqext_metric,vqext_weight,centroid); - init=1; - - /* quant setup */ - line=rline(in,out,1); - if(sscanf(line,"%ld %ld %d %d",&q.min,&q.delta, - &q.quant,&q.sequencep)!=4){ - fprintf(stderr,"Syntax error reading book file\n"); - exit(1); - } - - /* quantized entries */ - i=0; - for(j=0;j<entries;j++){ - for(k=0;k<dim;k++){ - line=rline(in,out,0); - sscanf(line,"%lf",&a); - v.entrylist[i++]=a; - } - } - vqgen_unquantize(&v,&q); - - /* bias */ - i=0; - for(j=0;j<entries;j++){ - line=rline(in,out,0); - sscanf(line,"%lf",&a); - v.bias[i++]=a; - } - - v.seeded=1; - { - double *b=alloca((dim+vqext_aux)*sizeof(double)); - i=0; - while(1){ - for(k=0;k<dim+vqext_aux;k++){ - line=rline(in,out,0); - if(!line)break; - sscanf(line,"%lf",b+k); - } - if(feof(in))break; - vqgen_addpoint(&v,b,b+dim); - } - } - - fclose(in); - } - } - - /* get the rest... */ - argv=argv++; - while(*argv){ - if(argv[0][0]=='-'){ - /* it's an option */ - if(!argv[1]){ - fprintf(stderr,"Option %s missing argument.\n",argv[0]); - exit(1); - } - switch(argv[0][1]){ - case 'p': - if(sscanf(argv[1],"%d,%d,%d",&entries,&dim,&q.quant)!=3) - goto syner; - break; - case 's': - if(sscanf(argv[1],"%d,%d",&start,&num)!=2){ - num= -1; - if(sscanf(argv[1],"%d",&start)!=1) - goto syner; - } - break; - case 'e': - if(sscanf(argv[1],"%lf",&desired)!=1) - goto syner; - break; - case 'd': - if(sscanf(argv[1],"%lf",&mindist)!=1) - goto syner; - if(init)v.mindist=mindist; - break; - case 'i': - if(sscanf(argv[1],"%d",&iter)!=1) - goto syner; - break; - case 'b': - biasp=0; - break; - case 'c': - centroid=1; - break; - default: - fprintf(stderr,"Unknown option %s\n",argv[0]); - exit(1); - } - argv+=2; - }else{ - /* it's an input file */ - char *file=strdup(*argv++); - FILE *in; - int cols=-1; - - if(!init){ - if(dim==-1 || entries==-1 || q.quant==-1){ - fprintf(stderr,"-p required when training a new set\n"); - exit(1); - } - vqgen_init(&v,dim,vqext_aux,entries,mindist, - vqext_metric,vqext_weight,centroid); - init=1; - } - - in=fopen(file,"r"); - if(in==NULL){ - fprintf(stderr,"Could not open input file %s\n",file); - exit(1); - } - fprintf(out,"# training file entry: %s\n",file); - - while((line=rline(in,out,0))){ - if(cols==-1){ - char *temp=line; - while(*temp==' ')temp++; - for(cols=0;*temp;cols++){ - while(*temp>32)temp++; - while(*temp==' ')temp++; - } - } - { - int i; - double b[cols]; - if(start+num*dim>cols){ - fprintf(stderr,"ran out of columns reading %s\n",file); - exit(1); - } - while(*line==' ')line++; - for(i=0;i<cols;i++){ - - /* static length buffer bug workaround */ - char *temp=line; - char old; - while(*temp>32)temp++; - - old=temp[0]; - temp[0]='\0'; - b[i]=atof(line); - temp[0]=old; - - while(*line>32)line++; - while(*line==' ')line++; - } - if(num<=0)num=(cols-start)/dim; - for(i=0;i<num;i++) - vqext_addpoint_adj(&v,b,start+i*dim,dim,cols,num); - - } - } - fclose(in); - } - } - - if(!init){ - fprintf(stderr,"No input files!\n"); - exit(1); - } - - vqext_preprocess(&v); - - /* train the book */ - signal(SIGTERM,setexit); - signal(SIGINT,setexit); - - for(i=0;i<iter && !exiting;i++){ - double result; - if(i!=0){ - vqgen_unquantize(&v,&q); - vqgen_cellmetric(&v); - } - result=vqgen_iterate(&v,biasp); - vqext_quantize(&v,&q); - if(result<desired)break; - } - - /* save the book */ - - fprintf(out,"# OggVorbis VQ codebook trainer, intermediate file\n"); - fprintf(out,"%s\n",vqext_booktype); - fprintf(out,"%d %d %d\n",entries,dim,vqext_aux); - fprintf(out,"%ld %ld %d %d\n", - q.min,q.delta,q.quant,q.sequencep); - - /* quantized entries */ - fprintf(out,"# quantized entries---\n"); - i=0; - for(j=0;j<entries;j++) - for(k=0;k<dim;k++) - fprintf(out,"%d\n",(int)(rint(v.entrylist[i++]))); - - fprintf(out,"# biases---\n"); - i=0; - for(j=0;j<entries;j++) - fprintf(out,"%f\n",v.bias[i++]); - - /* we may have done the density limiting mesh trick; refetch the - training points from the temp file */ - - rewind(v.asciipoints); - fprintf(out,"# points---\n"); - { - /* sloppy, no error handling */ - long bytes; - char buff[4096]; - while((bytes=fread(buff,1,4096,v.asciipoints))) - while(bytes)bytes-=fwrite(buff,1,bytes,out); - } - - fclose(out); - fclose(v.asciipoints); - - vqgen_unquantize(&v,&q); - vqgen_cellmetric(&v); - exit(0); - - syner: - fprintf(stderr,"Syntax error in argument '%s'\n",*argv); - exit(1); -} diff --git a/vq/vqext.h b/vq/vqext.h deleted file mode 100644 index 194689a5..00000000 --- a/vq/vqext.h +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: prototypes for extermal metrics specific to data type - last mod: $Id: vqext.h,v 1.9 2000/05/08 20:49:51 xiphmont Exp $ - - ********************************************************************/ - -#ifndef _V_VQEXT_ -#define _V_VQEXT_ - -#include "vqgen.h" - -extern char *vqext_booktype; -extern quant_meta q; -extern int vqext_aux; - -extern double vqext_metric(vqgen *v,double *e, double *p); -extern double *vqext_weight(vqgen *v,double *p); -extern void vqext_addpoint_adj(vqgen *v,double *b,int start,int dim,int cols,int num); -extern void vqext_preprocess(vqgen *v); -extern void vqext_quantize(vqgen *v,quant_meta *); - - -#endif diff --git a/vq/vqgen.c b/vq/vqgen.c deleted file mode 100644 index 43a4dbec..00000000 --- a/vq/vqgen.c +++ /dev/null @@ -1,570 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: train a VQ codebook - last mod: $Id: vqgen.c,v 1.33 2000/07/17 12:55:37 xiphmont Exp $ - - ********************************************************************/ - -/* This code is *not* part of libvorbis. It is used to generate - trained codebooks offline and then spit the results into a - pregenerated codebook that is compiled into libvorbis. It is an - expensive (but good) algorithm. Run it on big iron. */ - -/* There are so many optimizations to explore in *both* stages that - considering the undertaking is almost withering. For now, we brute - force it all */ - -#include <stdlib.h> -#include <stdio.h> -#include <math.h> -#include <string.h> - -#include "vqgen.h" -#include "bookutil.h" -#include "../lib/sharedbook.h" - -/* Codebook generation happens in two steps: - - 1) Train the codebook with data collected from the encoder: We use - one of a few error metrics (which represent the distance between a - given data point and a candidate point in the training set) to - divide the training set up into cells representing roughly equal - probability of occurring. - - 2) Generate the codebook and auxiliary data from the trained data set -*/ - -/* Codebook training **************************************************** - * - * The basic idea here is that a VQ codebook is like an m-dimensional - * foam with n bubbles. The bubbles compete for space/volume and are - * 'pressurized' [biased] according to some metric. The basic alg - * iterates through allowing the bubbles to compete for space until - * they converge (if the damping is dome properly) on a steady-state - * solution. Individual input points, collected from libvorbis, are - * used to train the algorithm monte-carlo style. */ - -/* internal helpers *****************************************************/ -#define vN(data,i) (data+v->elements*i) - -/* default metric; squared 'distance' from desired value. */ -double _dist(vqgen *v,double *a, double *b){ - int i; - int el=v->elements; - double acc=0.; - for(i=0;i<el;i++){ - double val=(a[i]-b[i]); - acc+=val*val; - } - return sqrt(acc); -} - -double *_weight_null(vqgen *v,double *a){ - return a; -} - -/* *must* be beefed up. */ -void _vqgen_seed(vqgen *v){ - long i; - for(i=0;i<v->entries;i++) - memcpy(_now(v,i),_point(v,i),sizeof(double)*v->elements); - v->seeded=1; -} - -int directdsort(const void *a, const void *b){ - double av=*((double *)a); - double bv=*((double *)b); - if(av>bv)return(-1); - return(1); -} - -void vqgen_cellmetric(vqgen *v){ - int j,k; - double min=-1.,max=-1.,mean=0.,acc=0.; - long dup=0,unused=0; - #ifdef NOISY - int i; - char buff[80]; - double spacings[v->entries]; - int count=0; - FILE *cells; - sprintf(buff,"cellspace%d.m",v->it); - cells=fopen(buff,"w"); -#endif - - /* minimum, maximum, cell spacing */ - for(j=0;j<v->entries;j++){ - double localmin=-1.; - - for(k=0;k<v->entries;k++){ - if(j!=k){ - double this=_dist(v,_now(v,j),_now(v,k)); - if(this>0){ - if(v->assigned[k] && (localmin==-1 || this<localmin)) - localmin=this; - }else{ - if(k<j){ - dup++; - break; - } - } - } - } - if(k<v->entries)continue; - - if(v->assigned[j]==0){ - unused++; - continue; - } - - localmin=v->max[j]+localmin/2; /* this gives us rough diameter */ - if(min==-1 || localmin<min)min=localmin; - if(max==-1 || localmin>max)max=localmin; - mean+=localmin; - acc++; -#ifdef NOISY - spacings[count++]=localmin; -#endif - } - - fprintf(stderr,"cell diameter: %.03g::%.03g::%.03g (%ld unused/%ld dup)\n", - min,mean/acc,max,unused,dup); - -#ifdef NOISY - qsort(spacings,count,sizeof(double),directdsort); - for(i=0;i<count;i++) - fprintf(cells,"%g\n",spacings[i]); - fclose(cells); -#endif - -} - -/* External calls *******************************************************/ - -/* We have two forms of quantization; in the first, each vector - element in the codebook entry is orthogonal. Residues would use this - quantization for example. - - In the second, we have a sequence of monotonically increasing - values that we wish to quantize as deltas (to save space). We - still need to quantize so that absolute values are accurate. For - example, LSP quantizes all absolute values, but the book encodes - distance between values because each successive value is larger - than the preceeding value. Thus the desired quantibits apply to - the encoded (delta) values, not abs positions. This requires minor - additional encode-side trickery. */ - -void vqgen_quantize(vqgen *v,quant_meta *q){ - - double maxdel; - double mindel; - - double delta; - double maxquant=((1<<q->quant)-1); - - int j,k; - - mindel=maxdel=_now(v,0)[0]; - - for(j=0;j<v->entries;j++){ - double last=0.; - for(k=0;k<v->elements;k++){ - if(mindel>_now(v,j)[k]-last)mindel=_now(v,j)[k]-last; - if(maxdel<_now(v,j)[k]-last)maxdel=_now(v,j)[k]-last; - if(q->sequencep)last=_now(v,j)[k]; - } - } - - - /* first find the basic delta amount from the maximum span to be - encoded. Loosen the delta slightly to allow for additional error - during sequence quantization */ - - delta=(maxdel-mindel)/((1<<q->quant)-1.5); - - q->min=_float32_pack(mindel); - q->delta=_float32_pack(delta); - - mindel=_float32_unpack(q->min); - delta=_float32_unpack(q->delta); - - for(j=0;j<v->entries;j++){ - double last=0; - for(k=0;k<v->elements;k++){ - double val=_now(v,j)[k]; - double now=rint((val-last-mindel)/delta); - - _now(v,j)[k]=now; - if(now<0){ - /* be paranoid; this should be impossible */ - fprintf(stderr,"fault; quantized value<0\n"); - exit(1); - } - - if(now>maxquant){ - /* be paranoid; this should be impossible */ - fprintf(stderr,"fault; quantized value>max\n"); - exit(1); - } - if(q->sequencep)last=(now*delta)+mindel+last; - } - } -} - -/* much easier :-). Unlike in the codebook, we don't un-log log - scales; we just make sure they're properly offset. */ -void vqgen_unquantize(vqgen *v,quant_meta *q){ - long j,k; - double mindel=_float32_unpack(q->min); - double delta=_float32_unpack(q->delta); - - for(j=0;j<v->entries;j++){ - double last=0.; - for(k=0;k<v->elements;k++){ - double now=_now(v,j)[k]; - now=fabs(now)*delta+last+mindel; - if(q->sequencep)last=now; - _now(v,j)[k]=now; - } - } -} - -void vqgen_init(vqgen *v,int elements,int aux,int entries,double mindist, - double (*metric)(vqgen *,double *, double *), - double *(*weight)(vqgen *,double *),int centroid){ - memset(v,0,sizeof(vqgen)); - - v->centroid=centroid; - v->elements=elements; - v->aux=aux; - v->mindist=mindist; - v->allocated=32768; - v->pointlist=malloc(v->allocated*(v->elements+v->aux)*sizeof(double)); - - v->entries=entries; - v->entrylist=malloc(v->entries*v->elements*sizeof(double)); - v->assigned=malloc(v->entries*sizeof(long)); - v->bias=calloc(v->entries,sizeof(double)); - v->max=calloc(v->entries,sizeof(double)); - if(metric) - v->metric_func=metric; - else - v->metric_func=_dist; - if(weight) - v->weight_func=weight; - else - v->weight_func=_weight_null; - - v->asciipoints=tmpfile(); - -} - -void vqgen_addpoint(vqgen *v, double *p,double *a){ - int k; - for(k=0;k<v->elements;k++) - fprintf(v->asciipoints,"%.12g\n",p[k]); - for(k=0;k<v->aux;k++) - fprintf(v->asciipoints,"%.12g\n",a[k]); - - if(v->points>=v->allocated){ - v->allocated*=2; - v->pointlist=realloc(v->pointlist,v->allocated*(v->elements+v->aux)* - sizeof(double)); - } - - memcpy(_point(v,v->points),p,sizeof(double)*v->elements); - if(v->aux)memcpy(_point(v,v->points)+v->elements,a,sizeof(double)*v->aux); - - /* quantize to the density mesh if it's selected */ - if(v->mindist>0.){ - /* quantize to the mesh */ - for(k=0;k<v->elements+v->aux;k++) - _point(v,v->points)[k]= - rint(_point(v,v->points)[k]/v->mindist)*v->mindist; - } - v->points++; - if(!(v->points&0xff))spinnit("loading... ",v->points); -} - -/* yes, not threadsafe. These utils aren't */ -static int sortit=0; -static int sortsize=0; -static int meshcomp(const void *a,const void *b){ - if(((sortit++)&0xfff)==0)spinnit("sorting mesh...",sortit); - return(memcmp(a,b,sortsize)); -} - -void vqgen_sortmesh(vqgen *v){ - sortit=0; - if(v->mindist>0.){ - long i,march=1; - - /* sort to make uniqueness detection trivial */ - sortsize=(v->elements+v->aux)*sizeof(double); - qsort(v->pointlist,v->points,sortsize,meshcomp); - - /* now march through and eliminate dupes */ - for(i=1;i<v->points;i++){ - if(memcmp(_point(v,i),_point(v,i-1),sortsize)){ - /* a new, unique entry. march it down */ - if(i>march)memcpy(_point(v,march),_point(v,i),sortsize); - march++; - } - spinnit("eliminating density... ",v->points-i); - } - - /* we're done */ - fprintf(stderr,"\r%ld training points remining out of %ld" - " after density mesh (%ld%%)\n",march,v->points,march*100/v->points); - v->points=march; - - } - v->sorted=1; -} - -double vqgen_iterate(vqgen *v,int biasp){ - long i,j,k; - - double fdesired; - long desired; - long desired2; - - double asserror=0.; - double meterror=0.; - double *new; - double *new2; - long *nearcount; - double *nearbias; - #ifdef NOISY - char buff[80]; - FILE *assig; - FILE *bias; - FILE *cells; - sprintf(buff,"cells%d.m",v->it); - cells=fopen(buff,"w"); - sprintf(buff,"assig%d.m",v->it); - assig=fopen(buff,"w"); - sprintf(buff,"bias%d.m",v->it); - bias=fopen(buff,"w"); - #endif - - - if(v->entries<2){ - fprintf(stderr,"generation requires at least two entries\n"); - exit(1); - } - - if(!v->sorted)vqgen_sortmesh(v); - if(!v->seeded)_vqgen_seed(v); - - fdesired=(double)v->points/v->entries; - desired=fdesired; - desired2=desired*2; - new=malloc(sizeof(double)*v->entries*v->elements); - new2=malloc(sizeof(double)*v->entries*v->elements); - nearcount=malloc(v->entries*sizeof(long)); - nearbias=malloc(v->entries*desired2*sizeof(double)); - - /* fill in nearest points for entry biasing */ - /*memset(v->bias,0,sizeof(double)*v->entries);*/ - memset(nearcount,0,sizeof(long)*v->entries); - memset(v->assigned,0,sizeof(long)*v->entries); - if(biasp){ - for(i=0;i<v->points;i++){ - double *ppt=v->weight_func(v,_point(v,i)); - double firstmetric=v->metric_func(v,_now(v,0),ppt)+v->bias[0]; - double secondmetric=v->metric_func(v,_now(v,1),ppt)+v->bias[1]; - long firstentry=0; - long secondentry=1; - - if(!(i&0xff))spinnit("biasing... ",v->points+v->points+v->entries-i); - - if(firstmetric>secondmetric){ - double temp=firstmetric; - firstmetric=secondmetric; - secondmetric=temp; - firstentry=1; - secondentry=0; - } - - for(j=2;j<v->entries;j++){ - double thismetric=v->metric_func(v,_now(v,j),ppt)+v->bias[j]; - if(thismetric<secondmetric){ - if(thismetric<firstmetric){ - secondmetric=firstmetric; - secondentry=firstentry; - firstmetric=thismetric; - firstentry=j; - }else{ - secondmetric=thismetric; - secondentry=j; - } - } - } - - j=firstentry; - for(j=0;j<v->entries;j++){ - - double thismetric,localmetric; - double *nearbiasptr=nearbias+desired2*j; - long k=nearcount[j]; - - localmetric=v->metric_func(v,_now(v,j),ppt); - /* 'thismetric' is to be the bias value necessary in the current - arrangement for entry j to capture point i */ - if(firstentry==j){ - /* use the secondary entry as the threshhold */ - thismetric=secondmetric-localmetric; - }else{ - /* use the primary entry as the threshhold */ - thismetric=firstmetric-localmetric; - } - - /* support the idea of 'minimum distance'... if we want the - cells in a codebook to be roughly some minimum size (as with - the low resolution residue books) */ - - /* a cute two-stage delayed sorting hack */ - if(k<desired){ - nearbiasptr[k]=thismetric; - k++; - if(k==desired){ - spinnit("biasing... ",v->points+v->points+v->entries-i); - qsort(nearbiasptr,desired,sizeof(double),directdsort); - } - - }else if(thismetric>nearbiasptr[desired-1]){ - nearbiasptr[k]=thismetric; - k++; - if(k==desired2){ - spinnit("biasing... ",v->points+v->points+v->entries-i); - qsort(nearbiasptr,desired2,sizeof(double),directdsort); - k=desired; - } - } - nearcount[j]=k; - } - } - - /* inflate/deflate */ - - for(i=0;i<v->entries;i++){ - double *nearbiasptr=nearbias+desired2*i; - - spinnit("biasing... ",v->points+v->entries-i); - - /* due to the delayed sorting, we likely need to finish it off....*/ - if(nearcount[i]>desired) - qsort(nearbiasptr,nearcount[i],sizeof(double),directdsort); - - v->bias[i]=nearbiasptr[desired-1]; - - } - }else{ - memset(v->bias,0,v->entries*sizeof(double)); - } - - /* Now assign with new bias and find new midpoints */ - for(i=0;i<v->points;i++){ - double *ppt=v->weight_func(v,_point(v,i)); - double firstmetric=v->metric_func(v,_now(v,0),ppt)+v->bias[0]; - long firstentry=0; - - if(!(i&0xff))spinnit("centering... ",v->points-i); - - for(j=0;j<v->entries;j++){ - double thismetric=v->metric_func(v,_now(v,j),ppt)+v->bias[j]; - if(thismetric<firstmetric){ - firstmetric=thismetric; - firstentry=j; - } - } - - j=firstentry; - -#ifdef NOISY - fprintf(cells,"%g %g\n%g %g\n\n", - _now(v,j)[0],_now(v,j)[1], - ppt[0],ppt[1]); -#endif - - firstmetric-=v->bias[j]; - meterror+=firstmetric; - - if(v->centroid==0){ - /* set up midpoints for next iter */ - if(v->assigned[j]++){ - for(k=0;k<v->elements;k++) - vN(new,j)[k]+=ppt[k]; - if(firstmetric>v->max[j])v->max[j]=firstmetric; - }else{ - for(k=0;k<v->elements;k++) - vN(new,j)[k]=ppt[k]; - v->max[j]=firstmetric; - } - }else{ - /* centroid */ - if(v->assigned[j]++){ - for(k=0;k<v->elements;k++){ - if(vN(new,j)[k]>ppt[k])vN(new,j)[k]=ppt[k]; - if(vN(new2,j)[k]<ppt[k])vN(new2,j)[k]=ppt[k]; - } - if(firstmetric>v->max[firstentry])v->max[j]=firstmetric; - }else{ - for(k=0;k<v->elements;k++){ - vN(new,j)[k]=ppt[k]; - vN(new2,j)[k]=ppt[k]; - } - v->max[firstentry]=firstmetric; - } - } - } - - /* assign midpoints */ - - for(j=0;j<v->entries;j++){ -#ifdef NOISY - fprintf(assig,"%ld\n",v->assigned[j]); - fprintf(bias,"%g\n",v->bias[j]); -#endif - asserror+=fabs(v->assigned[j]-fdesired); - if(v->assigned[j]){ - if(v->centroid==0){ - for(k=0;k<v->elements;k++) - _now(v,j)[k]=vN(new,j)[k]/v->assigned[j]; - }else{ - for(k=0;k<v->elements;k++) - _now(v,j)[k]=(vN(new,j)[k]+vN(new2,j)[k])/2.; - } - } - } - - asserror/=(v->entries*fdesired); - - fprintf(stderr,"Pass #%d... ",v->it); - fprintf(stderr,": dist %g(%g) metric error=%g \n", - asserror,fdesired,meterror/v->points); - v->it++; - - free(new); - free(nearcount); - free(nearbias); -#ifdef NOISY - fclose(assig); - fclose(bias); - fclose(cells); -#endif - return(asserror); -} - diff --git a/vq/vqgen.h b/vq/vqgen.h deleted file mode 100644 index e5ce99df..00000000 --- a/vq/vqgen.h +++ /dev/null @@ -1,86 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: build a VQ codebook - last mod: $Id: vqgen.h,v 1.14 2000/06/14 01:38:32 xiphmont Exp $ - - ********************************************************************/ - -#ifndef _VQGEN_H_ -#define _VQGEN_H_ - -typedef struct vqgen{ - int seeded; - int sorted; - - int it; - int elements; - - int aux; - double mindist; - int centroid; - - /* point cache */ - double *pointlist; - long points; - long allocated; - - /* entries */ - double *entrylist; - long *assigned; - double *bias; - long entries; - double *max; - - double (*metric_func) (struct vqgen *v,double *entry,double *point); - double *(*weight_func) (struct vqgen *v,double *point); - - FILE *asciipoints; -} vqgen; - -typedef struct { - long min; /* packed 24 bit float */ - long delta; /* packed 24 bit float */ - int quant; /* 0 < quant <= 16 */ - int sequencep; /* bitflag */ -} quant_meta; - -static inline double *_point(vqgen *v,long ptr){ - return v->pointlist+((v->elements+v->aux)*ptr); -} - -static inline double *_aux(vqgen *v,long ptr){ - return _point(v,ptr)+v->aux; -} - -static inline double *_now(vqgen *v,long ptr){ - return v->entrylist+(v->elements*ptr); -} - -extern void vqgen_init(vqgen *v, - int elements,int aux,int entries,double mindist, - double (*metric)(vqgen *,double *, double *), - double *(*weight)(vqgen *,double *),int centroid); -extern void vqgen_addpoint(vqgen *v, double *p,double *aux); - -extern double vqgen_iterate(vqgen *v,int biasp); -extern void vqgen_unquantize(vqgen *v,quant_meta *q); -extern void vqgen_quantize(vqgen *v,quant_meta *q); -extern void vqgen_cellmetric(vqgen *v); - -#endif - - - - - diff --git a/vq/vqsplit.c b/vq/vqsplit.c deleted file mode 100644 index c54751bd..00000000 --- a/vq/vqsplit.c +++ /dev/null @@ -1,614 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: build a VQ codebook and the encoding decision 'tree' - last mod: $Id: vqsplit.c,v 1.19 2000/05/08 20:49:51 xiphmont Exp $ - - ********************************************************************/ - -/* This code is *not* part of libvorbis. It is used to generate - trained codebooks offline and then spit the results into a - pregenerated codebook that is compiled into libvorbis. It is an - expensive (but good) algorithm. Run it on big iron. */ - -/* There are so many optimizations to explore in *both* stages that - considering the undertaking is almost withering. For now, we brute - force it all */ - -#include <stdlib.h> -#include <stdio.h> -#include <math.h> -#include <string.h> -#include <sys/time.h> - -#include "vqgen.h" -#include "vqsplit.h" -#include "bookutil.h" -#include "../lib/sharedbook.h" - -/* Codebook generation happens in two steps: - - 1) Train the codebook with data collected from the encoder: We use - one of a few error metrics (which represent the distance between a - given data point and a candidate point in the training set) to - divide the training set up into cells representing roughly equal - probability of occurring. - - 2) Generate the codebook and auxiliary data from the trained data set -*/ - -/* Building a codebook from trained set ********************************** - - The codebook in raw form is technically finished once it's trained. - However, we want to finalize the representative codebook values for - each entry and generate auxiliary information to optimize encoding. - We generate the auxiliary coding tree using collected data, - probably the same data as in the original training */ - -/* At each recursion, the data set is split in half. Cells with data - points on side A go into set A, same with set B. The sets may - overlap. If the cell overlaps the deviding line only very slightly - (provided parameter), we may choose to ignore the overlap in order - to pare the tree down */ - -long *isortvals; -int iascsort(const void *a,const void *b){ - long av=isortvals[*((long *)a)]; - long bv=isortvals[*((long *)b)]; - return(av-bv); -} - -static double _Ndist(int el,double *a, double *b){ - int i; - double acc=0.; - for(i=0;i<el;i++){ - double val=(a[i]-b[i]); - acc+=val*val; - } - return sqrt(acc); -} - -#define _Npoint(i) (pointlist+dim*(i)) -#define _Nnow(i) (entrylist+dim*(i)) - - -/* goes through the split, but just counts it and returns a metric*/ -int vqsp_count(double *entrylist,double *pointlist,int dim, - long *membership,long *reventry, - long *entryindex,long entries, - long *pointindex,long points,int splitp, - long *entryA,long *entryB, - long besti,long bestj, - long *entriesA,long *entriesB,long *entriesC){ - long i,j; - long A=0,B=0,C=0; - long pointsA=0; - long pointsB=0; - long *temppointsA=NULL; - long *temppointsB=NULL; - - if(splitp){ - temppointsA=malloc(points*sizeof(long)); - temppointsB=malloc(points*sizeof(long)); - } - - memset(entryA,0,sizeof(long)*entries); - memset(entryB,0,sizeof(long)*entries); - - /* Do the points belonging to this cell occur on sideA, sideB or - both? */ - - for(i=0;i<points;i++){ - double *ppt=_Npoint(pointindex[i]); - long firstentry=membership[pointindex[i]]; - - if(firstentry==besti){ - entryA[reventry[firstentry]]=1; - if(splitp)temppointsA[pointsA++]=pointindex[i]; - continue; - } - if(firstentry==bestj){ - entryB[reventry[firstentry]]=1; - if(splitp)temppointsB[pointsB++]=pointindex[i]; - continue; - } - { - double distA=_Ndist(dim,ppt,_Nnow(besti)); - double distB=_Ndist(dim,ppt,_Nnow(bestj)); - if(distA<distB){ - entryA[reventry[firstentry]]=1; - if(splitp)temppointsA[pointsA++]=pointindex[i]; - }else{ - entryB[reventry[firstentry]]=1; - if(splitp)temppointsB[pointsB++]=pointindex[i]; - } - } - } - - /* The entry splitting isn't total, so that storage has to be - allocated for recursion. Reuse the entryA/entryB vectors */ - /* keep the entries in ascending order (relative to the original - list); we rely on that stability when ordering p/q choice */ - for(j=0;j<entries;j++){ - if(entryA[j] && entryB[j])C++; - if(entryA[j])entryA[A++]=entryindex[j]; - if(entryB[j])entryB[B++]=entryindex[j]; - } - *entriesA=A; - *entriesB=B; - *entriesC=C; - if(splitp){ - memcpy(pointindex,temppointsA,sizeof(long)*pointsA); - memcpy(pointindex+pointsA,temppointsB,sizeof(long)*pointsB); - free(temppointsA); - free(temppointsB); - } - return(pointsA); -} - -int lp_split(double *pointlist,long totalpoints, - codebook *b, - long *entryindex,long entries, - long *pointindex,long points, - long *membership,long *reventry, - long depth, long *pointsofar){ - - encode_aux_nearestmatch *t=b->c->nearest_tree; - - /* The encoder, regardless of book, will be using a straight - euclidian distance-to-point metric to determine closest point. - Thus we split the cells using the same (we've already trained the - codebook set spacing and distribution using special metrics and - even a midpoint division won't disturb the basic properties) */ - - int dim=b->dim; - double *entrylist=b->valuelist; - long ret; - long *entryA=calloc(entries,sizeof(long)); - long *entryB=calloc(entries,sizeof(long)); - long entriesA=0; - long entriesB=0; - long entriesC=0; - long pointsA=0; - long i,j,k; - - long besti=-1; - long bestj=-1; - - char spinbuf[80]; - sprintf(spinbuf,"splitting [%ld left]... ",totalpoints-*pointsofar); - - /* one reverse index needed */ - for(i=0;i<b->entries;i++)reventry[i]=-1; - for(i=0;i<entries;i++)reventry[entryindex[i]]=i; - - /* We need to find the dividing hyperplane. find the median of each - axis as the centerpoint and the normal facing farthest point */ - - /* more than one way to do this part. For small sets, we can brute - force it. */ - - if(entries<8 || (double)points*entries*entries<16.*1024*1024){ - /* try every pair possibility */ - double best=0; - double this; - for(i=0;i<entries-1;i++){ - for(j=i+1;j<entries;j++){ - spinnit(spinbuf,entries-i); - vqsp_count(b->valuelist,pointlist,dim, - membership,reventry, - entryindex,entries, - pointindex,points,0, - entryA,entryB, - entryindex[i],entryindex[j], - &entriesA,&entriesB,&entriesC); - this=(entriesA-entriesC)*(entriesB-entriesC); - - /* when choosing best, we also want some form of stability to - make sure more branches are pared later; secondary - weighting isn;t needed as the entry lists are in ascending - order, and we always try p/q in the same sequence */ - - if( (besti==-1) || - (this>best) ){ - - best=this; - besti=entryindex[i]; - bestj=entryindex[j]; - - } - } - } - }else{ - double *p=alloca(dim*sizeof(double)); - double *q=alloca(dim*sizeof(double)); - double best=0.; - - /* try COG/normal and furthest pairs */ - /* meanpoint */ - /* eventually, we want to select the closest entry and figure n/c - from p/q (because storing n/c is too large */ - for(k=0;k<dim;k++){ - spinnit(spinbuf,entries); - - p[k]=0.; - for(j=0;j<entries;j++) - p[k]+=b->valuelist[entryindex[j]*dim+k]; - p[k]/=entries; - - } - - /* we go through the entries one by one, looking for the entry on - the other side closest to the point of reflection through the - center */ - - for(i=0;i<entries;i++){ - double *ppi=_Nnow(entryindex[i]); - double ref_best=0.; - double ref_j=-1; - double this; - spinnit(spinbuf,entries-i); - - for(k=0;k<dim;k++) - q[k]=2*p[k]-ppi[k]; - - for(j=0;j<entries;j++){ - if(j!=i){ - double this=_Ndist(dim,q,_Nnow(entryindex[j])); - if(ref_j==-1 || this<=ref_best){ /* <=, not <; very important */ - ref_best=this; - ref_j=entryindex[j]; - } - } - } - - vqsp_count(b->valuelist,pointlist,dim, - membership,reventry, - entryindex,entries, - pointindex,points,0, - entryA,entryB, - entryindex[i],ref_j, - &entriesA,&entriesB,&entriesC); - this=(entriesA-entriesC)*(entriesB-entriesC); - - /* when choosing best, we also want some form of stability to - make sure more branches are pared later; secondary - weighting isn;t needed as the entry lists are in ascending - order, and we always try p/q in the same sequence */ - - if( (besti==-1) || - (this>best) ){ - - best=this; - besti=entryindex[i]; - bestj=ref_j; - - } - } - if(besti>bestj){ - long temp=besti; - besti=bestj; - bestj=temp; - } - - } - - /* find cells enclosing points */ - /* count A/B points */ - - pointsA=vqsp_count(b->valuelist,pointlist,dim, - membership,reventry, - entryindex,entries, - pointindex,points,1, - entryA,entryB, - besti,bestj, - &entriesA,&entriesB,&entriesC); - - /* fprintf(stderr,"split: total=%ld depth=%ld set A=%ld:%ld:%ld=B\n", - entries,depth,entriesA-entriesC,entriesC,entriesB-entriesC);*/ - { - long thisaux=t->aux++; - if(t->aux>=t->alloc){ - t->alloc*=2; - t->ptr0=realloc(t->ptr0,sizeof(long)*t->alloc); - t->ptr1=realloc(t->ptr1,sizeof(long)*t->alloc); - t->p=realloc(t->p,sizeof(long)*t->alloc); - t->q=realloc(t->q,sizeof(long)*t->alloc); - } - - t->p[thisaux]=besti; - t->q[thisaux]=bestj; - - if(entriesA==1){ - ret=1; - t->ptr0[thisaux]=entryA[0]; - *pointsofar+=pointsA; - }else{ - t->ptr0[thisaux]= -t->aux; - ret=lp_split(pointlist,totalpoints,b,entryA,entriesA,pointindex,pointsA, - membership,reventry,depth+1,pointsofar); - } - if(entriesB==1){ - ret++; - t->ptr1[thisaux]=entryB[0]; - *pointsofar+=points-pointsA; - }else{ - t->ptr1[thisaux]= -t->aux; - ret+=lp_split(pointlist,totalpoints,b,entryB,entriesB,pointindex+pointsA, - points-pointsA,membership,reventry, - depth+1,pointsofar); - } - } - free(entryA); - free(entryB); - return(ret); -} - -static int _node_eq(encode_aux_nearestmatch *v, long a, long b){ - long Aptr0=v->ptr0[a]; - long Aptr1=v->ptr1[a]; - long Bptr0=v->ptr0[b]; - long Bptr1=v->ptr1[b]; - - /* the possibility of choosing the same p and q, but switched, can;t - happen because we always look for the best p/q in the same search - order and the search is stable */ - - if(Aptr0==Bptr0 && Aptr1==Bptr1) - return(1); - - return(0); -} - -void vqsp_book(vqgen *v, codebook *b, long *quantlist){ - long i,j; - static_codebook *c=(static_codebook *)b->c; - encode_aux_nearestmatch *t; - - memset(b,0,sizeof(codebook)); - memset(c,0,sizeof(static_codebook)); - b->c=c; - t=c->nearest_tree=calloc(1,sizeof(encode_aux_nearestmatch)); - c->maptype=2; - - /* make sure there are no duplicate entries and that every - entry has points */ - - for(i=0;i<v->entries;){ - /* duplicate? if so, eliminate */ - for(j=0;j<i;j++){ - if(_Ndist(v->elements,_now(v,i),_now(v,j))==0.){ - fprintf(stderr,"found a duplicate entry! removing...\n"); - v->entries--; - memcpy(_now(v,i),_now(v,v->entries),sizeof(double)*v->elements); - memcpy(quantlist+i*v->elements,quantlist+v->entries*v->elements, - sizeof(long)*v->elements); - break; - } - } - if(j==i)i++; - } - - { - v->assigned=calloc(v->entries,sizeof(long)); - for(i=0;i<v->points;i++){ - double *ppt=_point(v,i); - double firstmetric=_Ndist(v->elements,_now(v,0),ppt); - long firstentry=0; - - if(!(i&0xff))spinnit("checking... ",v->points-i); - - for(j=0;j<v->entries;j++){ - double thismetric=_Ndist(v->elements,_now(v,j),ppt); - if(thismetric<firstmetric){ - firstmetric=thismetric; - firstentry=j; - } - } - - v->assigned[firstentry]++; - } - - for(j=0;j<v->entries;){ - if(v->assigned[j]==0){ - fprintf(stderr,"found an unused entry! removing...\n"); - v->entries--; - memcpy(_now(v,j),_now(v,v->entries),sizeof(double)*v->elements); - v->assigned[j]=v->assigned[v->elements]; - memcpy(quantlist+j*v->elements,quantlist+v->entries*v->elements, - sizeof(long)*v->elements); - continue; - } - j++; - } - } - - fprintf(stderr,"Building a book with %ld unique entries...\n",v->entries); - - { - long *entryindex=malloc(v->entries*sizeof(long *)); - long *pointindex=malloc(v->points*sizeof(long)); - long *membership=malloc(v->points*sizeof(long)); - long *reventry=malloc(v->entries*sizeof(long)); - long pointssofar=0; - - for(i=0;i<v->entries;i++)entryindex[i]=i; - for(i=0;i<v->points;i++)pointindex[i]=i; - - t->alloc=4096; - t->ptr0=malloc(sizeof(long)*t->alloc); - t->ptr1=malloc(sizeof(long)*t->alloc); - t->p=malloc(sizeof(long)*t->alloc); - t->q=malloc(sizeof(long)*t->alloc); - t->aux=0; - c->dim=v->elements; - c->entries=v->entries; - c->lengthlist=calloc(c->entries,sizeof(long)); - b->valuelist=v->entrylist; /* temporary; replaced later */ - b->dim=c->dim; - b->entries=c->entries; - - for(i=0;i<v->points;i++)membership[i]=-1; - for(i=0;i<v->points;i++){ - double *ppt=_point(v,i); - long firstentry=0; - double firstmetric=_Ndist(v->elements,_now(v,0),ppt); - - if(!(i&0xff))spinnit("assigning... ",v->points-i); - - for(j=1;j<v->entries;j++){ - if(v->assigned[j]!=-1){ - double thismetric=_Ndist(v->elements,_now(v,j),ppt); - if(thismetric<=firstmetric){ - firstmetric=thismetric; - firstentry=j; - } - } - } - - membership[i]=firstentry; - } - - fprintf(stderr,"Leaves added: %d \n", - lp_split(v->pointlist,v->points, - b,entryindex,v->entries, - pointindex,v->points, - membership,reventry, - 0,&pointssofar)); - - free(pointindex); - free(membership); - free(reventry); - - fprintf(stderr,"Paring/rerouting redundant branches... "); - - /* The tree is likely big and redundant. Pare and reroute branches */ - { - int changedflag=1; - - while(changedflag){ - changedflag=0; - - /* span the tree node by node; list unique decision nodes and - short circuit redundant branches */ - - for(i=0;i<t->aux;){ - int k; - - /* check list of unique decisions */ - for(j=0;j<i;j++) - if(_node_eq(t,i,j))break; - - if(j<i){ - /* a redundant entry; find all higher nodes referencing it and - short circuit them to the previously noted unique entry */ - changedflag=1; - for(k=0;k<t->aux;k++){ - if(t->ptr0[k]==-i)t->ptr0[k]=-j; - if(t->ptr1[k]==-i)t->ptr1[k]=-j; - } - - /* Now, we need to fill in the hole from this redundant - entry in the listing. Insert the last entry in the list. - Fix the forward pointers to that last entry */ - t->aux--; - t->ptr0[i]=t->ptr0[t->aux]; - t->ptr1[i]=t->ptr1[t->aux]; - t->p[i]=t->p[t->aux]; - t->q[i]=t->q[t->aux]; - for(k=0;k<t->aux;k++){ - if(t->ptr0[k]==-t->aux)t->ptr0[k]=-i; - if(t->ptr1[k]==-t->aux)t->ptr1[k]=-i; - } - /* hole plugged */ - - }else - i++; - } - - fprintf(stderr,"\rParing/rerouting redundant branches... " - "%ld remaining ",t->aux); - } - fprintf(stderr,"\n"); - } - } - - /* run all training points through the decision tree to get a final - probability count */ - { - long *probability=malloc(c->entries*sizeof(long)); - for(i=0;i<c->entries;i++)probability[i]=1; /* trivial guard */ - b->dim=c->dim; - - /* sigh. A necessary hack */ - for(i=0;i<t->aux;i++)t->p[i]*=c->dim; - for(i=0;i<t->aux;i++)t->q[i]*=c->dim; - - for(i=0;i<v->points;i++){ - /* we use the linear matcher regardless becuase the trainer - doesn't convert log to linear */ - int ret=_best(b,v->pointlist+i*v->elements,1); - probability[ret]++; - if(!(i&0xff))spinnit("counting hits... ",v->points-i); - } - for(i=0;i<t->aux;i++)t->p[i]/=c->dim; - for(i=0;i<t->aux;i++)t->q[i]/=c->dim; - - build_tree_from_lengths(c->entries,probability,c->lengthlist); - - free(probability); - } - - /* Sort the entries by codeword length, short to long (eases - assignment and packing to do it now) */ - { - long *wordlen=c->lengthlist; - long *index=malloc(c->entries*sizeof(long)); - long *revindex=malloc(c->entries*sizeof(long)); - int k; - for(i=0;i<c->entries;i++)index[i]=i; - isortvals=c->lengthlist; - qsort(index,c->entries,sizeof(long),iascsort); - - /* rearrange storage; ptr0/1 first as it needs a reverse index */ - /* n and c stay unchanged */ - for(i=0;i<c->entries;i++)revindex[index[i]]=i; - for(i=0;i<t->aux;i++){ - if(!(i&0x3f))spinnit("sorting... ",t->aux-i); - - if(t->ptr0[i]>=0)t->ptr0[i]=revindex[t->ptr0[i]]; - if(t->ptr1[i]>=0)t->ptr1[i]=revindex[t->ptr1[i]]; - t->p[i]=revindex[t->p[i]]; - t->q[i]=revindex[t->q[i]]; - } - free(revindex); - - /* map lengthlist and vallist with index */ - c->lengthlist=calloc(c->entries,sizeof(long)); - b->valuelist=malloc(sizeof(double)*c->entries*c->dim); - c->quantlist=malloc(sizeof(long)*c->entries*c->dim); - for(i=0;i<c->entries;i++){ - long e=index[i]; - for(k=0;k<c->dim;k++){ - b->valuelist[i*c->dim+k]=v->entrylist[e*c->dim+k]; - c->quantlist[i*c->dim+k]=quantlist[e*c->dim+k]; - } - c->lengthlist[i]=wordlen[e]; - } - - free(wordlen); - } - - fprintf(stderr,"Done. \n\n"); -} - diff --git a/vq/vqsplit.h b/vq/vqsplit.h deleted file mode 100644 index d09265bd..00000000 --- a/vq/vqsplit.h +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************** - * * - * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. * - * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY * - * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. * - * PLEASE READ THESE TERMS DISTRIBUTING. * - * * - * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 * - * by Monty <monty@xiph.org> and The XIPHOPHORUS Company * - * http://www.xiph.org/ * - * * - ******************************************************************** - - function: build a VQ codebook decision tree - last mod: $Id: vqsplit.h,v 1.2 2000/05/08 20:49:51 xiphmont Exp $ - - ********************************************************************/ - -#ifndef _VQSPL_H_ -#define _VQSPL_H_ - -#include "vorbis/codebook.h" - -extern void vqsp_book(vqgen *v,codebook *b,long *quantlist); -extern int vqenc_entry(codebook *b,double *val); -extern int lp_split(double *pointlist,long totalpoints, - codebook *b, - long *entryindex,long entries, - long *pointindex,long points, - long *membership,long *reventry, - long depth, long *pointsofar); - -#endif - - - - - |