Index: penc/branches/zorg/.new.downmix.c
===================================================================
--- /mppenc/branches/zorg/.new.downmix.c	(revision 40)
+++ 	(revision )
@@ -1,327 +1,0 @@
-
-//Pre-scaled downmix coefficients
-static float cmixlev_lut[4] = { 0.2928, 0.2468, 0.2071, 0.2468 };
-static float smixlev_lut[4] = { 0.2928, 0.2071, 0.0   , 0.2071 };
-
-downmix_3f_2r_to_2ch
-{
-        left      = samples[0];
-        centre    = samples[1];
-        right     = samples[2];
-        left_sur  = samples[3];
-        right_sur = samples[4];
-
-        clev = cmixlev_lut[bsi->cmixlev];
-        slev = smixlev_lut[bsi->surmixlev];
-
-        for (j = 0; j < 256; j++) {
-                left_tmp = 0.4142f * *left++  + clev * *centre   + slev * *left_sur++;
-                right_tmp= 0.4142f * *right++ + clev * *centre++ + slev * *right_sur++;
-
-                s16_samples[j * 2 ]    = (left_tmp );
-                s16_samples[j * 2 + 1] = (right_tmp);
-        }
-}
-
-downmix_2f_2r_to_2ch
-{
-        left      = samples[0];
-        right     = samples[1];
-        left_sur  = samples[2];
-        right_sur = samples[3];
-
-        slev = smixlev_lut[bsi->surmixlev];
-
-        for (j = 0; j < 256; j++) {
-                left_tmp = 0.4142f * *left++  + slev * *left_sur++;
-                right_tmp= 0.4142f * *right++ + slev * *right_sur++;
-
-                s16_samples[j * 2 ]    = (left_tmp );
-                s16_samples[j * 2 + 1] = (right_tmp);
-        }
-}
-
-downmix_3f_1r_to_2ch
-{
-        left      = samples[0];
-        centre    = samples[1];
-        right     = samples[2];
-        //Mono surround
-        sur = samples[3];
-
-        clev = cmixlev_lut[bsi->cmixlev];
-        slev = smixlev_lut[bsi->surmixlev];
-
-        for (j = 0; j < 256; j++) {
-                left_tmp = 0.4142f * *left++  + clev * *centre++ + slev * *sur;
-                right_tmp= 0.4142f * *right++ + clev * *centre   + slev * *sur++;
-
-                s16_samples[j * 2 ]    = (left_tmp );
-                s16_samples[j * 2 + 1] = (right_tmp);
-        }
-}
-
-
-downmix_2f_1r_to_2ch
-{
-        left      = samples[0];
-        right     = samples[1];
-        //Mono surround
-        sur = samples[2];
-
-        slev = smixlev_lut[bsi->surmixlev];
-
-        for (j = 0; j < 256; j++) {
-                left_tmp = 0.4142f * *left++  + slev * *sur;
-                right_tmp= 0.4142f * *right++ + slev * *sur++;
-
-                s16_samples[j * 2 ]    = (left_tmp );
-                s16_samples[j * 2 + 1] = (right_tmp);
-        }
-}
-
-downmix_3f_0r_to_2ch
-{
-        left      = samples[0];
-        centre    = samples[1];
-        right     = samples[2];
-
-        clev = cmixlev_lut[bsi->cmixlev];
-
-        for (j = 0; j < 256; j++) {
-                left_tmp = 0.4142f * *left++  + clev * *centre;
-                right_tmp= 0.4142f * *right++ + clev * *centre++;
-
-                s16_samples[j * 2 ]    = (left_tmp );
-                s16_samples[j * 2 + 1] = (right_tmp);
-        }
-}
-
-downmix_2f_0r_to_2ch
-{
-        left      = samples[0];
-        right     = samples[1];
-
-        for (j = 0; j < 256; j++) {
-                s16_samples[j * 2 ]    = (*left++ );
-                s16_samples[j * 2 + 1] = (*right++);
-        }
-}
-
-downmix_1f_0r_to_2ch
-{
-        for (j = 0; j < 256; j++) {
-                tmp = 0.7071f * *centre++;
-
-                s16_samples[j * 2 ] = s16_samples[j * 2 + 1] = tmp;
-        }
-}
-
-//
-// Downmix into 2 or 4 channels  (4 ch isn't in quite yet)
-//
-// The downmix function names have the following format
-//
-// downmix_Xf_Yr_to_[2|4]ch[_dolby]
-//
-// where X        = number of front channels
-//       Y        = number of rear channels
-//       [2|4]    = number of output channels
-//       [_dolby] = with or without dolby surround mix
-//
-
-downmix
-{
-        if(bsi->acmod > 7)
-                dprintf("(downmix) invalid acmod number\n");
-
-        //
-        //There are two main cases, with or without Dolby Surround
-        //
-        if(ac3_config.flags & AC3_DOLBY_SURR_ENABLE)
-        {
-                fprintf(stderr,"Dolby Surround Mixes not currently enabled\n");
-                exit(1);
-        }
-
-        //Non-Dolby surround downmixes
-        switch(bsi->acmod)
-        {
-                // 3/2
-                case 7:
-                        downmix_3f_2r_to_2ch(bsi,samples,s16_samples);
-                break;
-
-                // 2/2
-                case 6:
-                        downmix_2f_2r_to_2ch(bsi,samples,s16_samples);
-                break;
-
-                // 3/1
-                case 5:
-                        downmix_3f_1r_to_2ch(bsi,samples,s16_samples);
-                break;
-
-                // 2/1
-                case 4:
-                        downmix_2f_1r_to_2ch(bsi,samples,s16_samples);
-                break;
-
-                // 3/0
-                case 3:
-                        downmix_3f_0r_to_2ch(bsi,samples,s16_samples);
-                break;
-
-                case 2:
-                        downmix_2f_0r_to_2ch(bsi,samples,s16_samples);
-                break;
-
-                // 1/0
-                case 1:
-                        downmix_1f_0r_to_2ch(samples[0],s16_samples);
-                break;
-
-                // 1+1
-                case 0:
-                        downmix_1f_0r_to_2ch(samples[ac3_config.dual_mono_ch_sel],s16_samples);
-                break;
-        }
-}
-
-
-
-
-
-
-
-        //the dolby mixes lay here for the time being
-        switch(bsi->acmod)
-        {
-                // 3/2
-                case 7:
-                        left      = samples[0];
-                        centre    = samples[1];
-                        right     = samples[2];
-                        left_sur  = samples[3];
-                        right_sur = samples[4];
-
-                        for (j = 0; j < 256; j++)
-                        {
-                                right_tmp = 0.2265f * *left_sur++ + 0.2265f * *right_sur++;
-                                left_tmp  = -1 * right_tmp;
-                                right_tmp += 0.3204f * *right++ + 0.2265f * *centre;
-                                left_tmp  += 0.3204f * *left++  + 0.2265f * *centre++;
-
-                                samples[1][j] = right_tmp;
-                                samples[0][j] = left_tmp;
-                        }
-
-                break;
-
-                // 2/2
-                case 6:
-                        left      = samples[0];
-                        right     = samples[1];
-                        left_sur  = samples[2];
-                        right_sur = samples[3];
-
-                        for (j = 0; j < 256; j++)
-                        {
-                                right_tmp = 0.2265f * *left_sur++ + 0.2265f * *right_sur++;
-                                left_tmp  = -1 * right_tmp;
-                                right_tmp += 0.3204f * *right++;
-                                left_tmp  += 0.3204f * *left++ ;
-
-                                samples[1][j] = right_tmp;
-                                samples[0][j] = left_tmp;
-                        }
-                break;
-
-                // 3/1
-                case 5:
-                        left      = samples[0];
-                        centre    = samples[1];
-                        right     = samples[2];
-                        //Mono surround
-                        right_sur = samples[3];
-
-                        for (j = 0; j < 256; j++)
-                        {
-                                right_tmp =  0.2265f * *right_sur++;
-                                left_tmp  = -1 * right_tmp;
-                                right_tmp += 0.3204f * *right++ + 0.2265f * *centre;
-                                left_tmp  += 0.3204f * *left++  + 0.2265f * *centre++;
-
-                                samples[1][j] = right_tmp;
-                                samples[0][j] = left_tmp;
-                        }
-                break;
-
-                // 2/1
-                case 4:
-                        left      = samples[0];
-                        right     = samples[1];
-                        //Mono surround
-                        right_sur = samples[2];
-
-                        for (j = 0; j < 256; j++)
-                        {
-                                right_tmp =  0.2265f * *right_sur++;
-                                left_tmp  = -1 * right_tmp;
-                                right_tmp += 0.3204f * *right++;
-                                left_tmp  += 0.3204f * *left++;
-
-                                samples[1][j] = right_tmp;
-                                samples[0][j] = left_tmp;
-                        }
-                break;
-
-                // 3/0
-                case 3:
-                        left      = samples[0];
-                        centre    = samples[1];
-                        right     = samples[2];
-
-                        for (j = 0; j < 256; j++)
-                        {
-                                right_tmp = 0.3204f * *right++ + 0.2265f * *centre;
-                                left_tmp  = 0.3204f * *left++  + 0.2265f * *centre++;
-
-                                samples[1][j] = right_tmp;
-                                samples[0][j] = left_tmp;
-                        }
-                break;
-
-                // 2/0
-                case 2:
-                //Do nothing!
-                break;
-
-                // 1/0
-                case 1:
-                        //Mono program!
-                        right = samples[0];
-
-                        for (j = 0; j < 256; j++)
-                        {
-                                right_tmp = 0.7071f * *right++;
-
-                                samples[1][j] = right_tmp;
-                                samples[0][j] = right_tmp;
-                        }
-
-                break;
-
-                // 1+1
-                case 0:
-                        //Dual mono, output selected by user
-                        right = samples[ac3_config.dual_mono_ch_sel];
-
-                        for (j = 0; j < 256; j++)
-                        {
-                                right_tmp = 0.7071f * *right++;
-
-                                samples[1][j] = right_tmp;
-                                samples[0][j] = right_tmp;
-                        }
-                break;
Index: penc/branches/zorg/COPYING.GPL
===================================================================
--- /mppenc/branches/zorg/COPYING.GPL	(revision 40)
+++ 	(revision )
@@ -1,345 +1,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) 20yy  <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) 20yy 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.
Index: penc/branches/zorg/COPYING.LGPL
===================================================================
--- /mppenc/branches/zorg/COPYING.LGPL	(revision 40)
+++ 	(revision )
@@ -1,511 +1,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.
-
-
-  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.
-
-
-                  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.
-
-
-  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.
-
-
-  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.
-
-
-  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.
-
-
-  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.
-
-
-  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
-
-
-           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.1 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!
Index: penc/branches/zorg/Huffman.dsp
===================================================================
--- /mppenc/branches/zorg/Huffman.dsp	(revision 40)
+++ 	(revision )
@@ -1,100 +1,0 @@
-# Microsoft Developer Studio Project File - Name="huffman" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=huffman - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "huffman.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "huffman.mak" CFG="huffman - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "huffman - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "huffman - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "huffman - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "huffman - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ  /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ  /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "huffman - Win32 Release"
-# Name "huffman - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\huffman.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
Index: penc/branches/zorg/Import.sh
===================================================================
--- /mppenc/branches/zorg/Import.sh	(revision 40)
+++ 	(revision )
@@ -1,15 +1,0 @@
-#! /bin/bash
-
-dir=0
-
-sync
-
-#mount -t vfat /dev/hdg4 /mnt/zip &> /dev/null; mkdir 0; cp -R /mnt/zip/sv7/* 0
-
-./Remove.tab 0/{.,*,*/*,*/*/*,*/*/*/*}/*.{c,h,cpp} &> /dev/null
-( for i in * */* */*/* */*/*/* */*/*/*/*; do /usr/local/bin/unify ./"$i" ./0/* ./0/*/* ./0/*/*/* ./0/*/*/*/* ./0/*/*/*/*/*; done ) &> /dev/null
-rm -f 0/{.,*,*/*,*/*/*,*/*/*/*,*/*/*/*/*}/*.{obj,plg,pch,pdb,ilk,idb,ncb,*~,aps,sbr} &> /dev/null
-rmdir 0/{*/*/*/*,*/*/*,*/*,*} &> /dev/null &> /dev/null 
-chown -R pfk .
-
-#umount /mnt/zip
Index: penc/branches/zorg/Make.sh
===================================================================
--- /mppenc/branches/zorg/Make.sh	(revision 40)
+++ 	(revision )
@@ -1,22 +1,0 @@
-#! /bin/bash
-
-mv -i makefile      Makefile
-mv -i makefile.nol  Makefile.nol
-mv -i m             M
-mv -i mm            MM
-mv -i mmm.bat       MMM.bat
-mv -i make.sh       Make.sh
-mv -i remove.tab    Remove.tab
-mv -i summary       Summary
-mv -i howtocom.txt  HowToCom.txt
-mv -i howtorea.txt  HowToRea.txt
-for i in msc.bat tcc.bat ztc.bat ztc.res ztc.ret; do mv -i make$i Make$i; done
-
-chmod 755 Remove.tab wavcmp Make.sh M MM Remove.comment
-
-./Remove.tab
-
-make
-make test3
-sync
-make speed
Index: penc/branches/zorg/Makefile
===================================================================
--- /mppenc/branches/zorg/Makefile	(revision 40)
+++ 	(revision )
@@ -1,739 +1,0 @@
-#
-#  Makefile for mppdec/mppenc for gcc
-#  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-include version
-
-
-# Name of this Makefile
-
-MAKEFILE = Makefile
-
-# DEBIAN DESTDIR
-
-DESTDIR = `pwd`/debian/musepack-encoder/
-
-# Build static binaries
-
-#BLD_STATIC = 1
-
-# Define, if building with MinGW
-
-#MINGW    = 1
-
-# Select the compiler. Normally gcc is used.
-
-ifndef CC
-CC       = gcc
-endif
-CC3      = gcc -pipe -L/lib
-CC_MAJ   = $(shell $(CC) -dumpversion | cut -b 1)
-CC_MIN   = $(shell $(CC) -dumpversion | cut -b 3)
-TUNE    = $(shell [ $(CC_MAJ)$(CC_MIN) -ge 34 ] && echo tune || echo cpu)
-
-
-# Select architecture and CPU type with the variable $(ARCH).
-# If unset Intel 386 with optimization for Pentium is selected.
-
-ifndef ARCH
-ARCH     = -march=i586 -m$(TUNE)=i686
-endif
-
-ifdef MINGW
-EXEEXT   = .exe
-endif
-
-# Paths of several test files for testing
-# You don't need them for simple compiling
-
-TEST1    = /Archive/Audio/technik/mpc/SV4test.mpc
-TEST2    = /Archive/Audio/technik/mpc/SV5test.mpc
-TEST3    = /Archive/Audio/technik/mpc/SV6test.mpc
-TEST4    = /Archive/Audio/technik/mpc/SV7test.mpc
-TEST5    = '/Archive/Audio/Fury in the Slaughterhouse/Mono -- [02] Generation got its own disease.pac'
-TEST6    = /tmp/1.wav
-TEST7    = G1.mpc
-TEST8    = G2.mpc
-TEST9    = /Archive/1.mpc
-TEST10   = /Archive/CD.mpc
-TEST11   = /tmp/1.wav
-TEST12   = /tmp/2.wav
-
-DATE     = `date '+%Y-%m-%d_%H-%M-%S'`
-TMPFILE  = /tmp/tmpfile-mpp-$(DATE)-`hostname -f``tty|sed 's,/,-,g'`
-
-
-# Prioriry used for testing. This should reduce effects of other programs
-# while running the benchmark tests. Set to -20 if you are root, 0 otherwise
-
-NICE     = nice -n -20
-
-
-# Names of several tools
-
-RM_F     = rm -f --
-RM_RF    = rm -rf --
-CP_F     = cp -f --
-MV_F     = mv -f --
-STRIP    = strip
-CHOWN    = chown
-CHMOD    = chmod
-MKDIR    = mkdir
-CLS      = clear
-CAT      = cat
-LPAC     = lpac
-ZIP      = zip -9
-BZIP2    = bzip2 -9
-PGP      = pgp
-TAR      = tar
-LESS     = more
-ENCODE   = uuencode
-MAIL     = mail
-DEVNULL  = /dev/null
-LOGFILE  = /dev/tty
-#LOGFILE = logfile
-
-
-# Name of libraries you need for linking
-
-ifndef MINGW
-LDADD    = -lm
-#LDADD   += -lesd
-else
-LDADD    = -lwinmm -lws2_32
-endif
-#LDADD  += -lossaudio
-#LDADD  += -lrt
-#LDADD  += -lsocket -lnsl
-
-
-# Directory for object files
-
-OBJDIR = ./o
-
-
-# Path of additional includes and libs
-
-ifndef MINGW
-XINCLDIR = /usr/include
-XLIBDIR  = /usr/lib
-endif
-
-
-# Warning options, unset if the compiler makes trouble because of unknown
-# options
-
-WARN  = #\
-	-Wall                   \
-	-pedantic               \
-	-W                      \
-	-Wshadow                \
-	-Wbad-function-cast     \
-	-Wcast-align            \
-	-Wwrite-strings         \
-	-Wconversion            \
-	-Wsign-compare          \
-	-Wstrict-prototypes     \
-	-Wmissing-prototypes    \
-	-Wmissing-declarations  \
-	-Wnested-externs        \
-	-Wno-long-long          \
-
-
-# Feature select for different optimization versions
-
-# Defined in mppenc.h for win32
-ifndef MINGW
-FEATURE += -DCVD_FASTLOG
-FEATURE += -DFAST_MATH
-endif
-#FEATURE += -DEXTRA_DECONV
-#FEATURE += -DFASTER
-
-
-# Options for $(STRIP)
-
-STRIPOPT = --remove-section .comment --remove-section .note.ABI-tag --remove-section .note --remove-section .gnu.warning.llseek --remove-section .gnu.version
-
-
-# Die Zielvariante zum Ausliefern sollte nur 'OPTIM=-O3' und 'WARN=' enthalten,
-# damit das Programm überall (alle CPUs, OS und Compiler) übersetzbar ist.
-
-FLAGS = \
-	-fomit-frame-pointer -funroll-loops \
-	-mno-ieee-fp -ffast-math -pipe
-
-ifneq ($(CC_MAJ),4)
-FLAGS += -fmove-all-movables
-endif
-ifeq ($(CC_MAJ),2)
-FLAGS += -malign-jumps=5 -malign-loops=0 -malign-functions=5
-else
-FLAGS += -falign-jumps=5 -falign-loops=0 -falign-functions=5
-# unset optimizations that tend to break mppenc encodings
-UNBREAK = \
-	-fno-strict-aliasing -fno-gcse \
-	-fno-finite-math-only -fno-unsafe-math-optimizations
-endif
-
-OPTIM_SPEED = -O2 $(FLAGS) $(UNBREAK)
-
-OPTIM_SIZE = -Os $(FLAGS) $(UNBREAK)
-
-# Options to generate Assembly code for inspecting
-
-ASSEM = -S -fverbose-asm
-
-
-# Some remaining possible options (time measurement and debugging)
-
-#PROFILE = -DPROFILE
-#DEBUG   = -DNDEBUG
-
-
-#
-# Overwrite problematic options which can't be understand by all compilers
-#
-
-ifdef USE_GCC272
-ARCH        =
-FEATURE     =
-WARN        =
-PROFILE     =
-DEBUG       =
-XINCLDIR    =
-XLIBDIR     =
-ASSEM       =
-OPTIM_SPEED =
-OPTIM_SIZE  =
-endif
-
-
-# Merge all options together for CFLAGS and CFLAG_SIZE
-
-CFLAGS        += $(ARCH) $(FEATURE) $(WARN) $(PROFILE) $(DEBUG) -DMPPDEC_VERSION=\"$(MPPDEC_VERSION)\" -DMPPENC_VERSION=\"$(MPPENC_VERSION)\"
-ifndef MINGW
-CFLAGS       += -I$(XINCLDIR) -L$(XLIBDIR)
-endif
-#CFLAGS      += $(ASSEM)
-CFLAGS_SIZE   = $(CFLAGS) $(OPTIM_SIZE)
-CFLAGS       += $(OPTIM_SPEED)
-
-
-# Name and Options for NASM, the Netwide Assembler
-
-NASM          = nasm
-ifndef MINGW
-NASMFLAGS     = -f elf
-else
-NASMFLAGS     = -f win32
-endif
-
-
-# Another optimization for the Pentium Classic (60...200 MHz) and Pentium MMX (166...233 MHz)
-
-ifdef PENTIUM
-NASMFLAGS    += -DUSE_FXCH
-endif
-
-
-# Targets and general dependencies
-
-MPPDEC_TARGET    = mppdec
-MPPENC_TARGET    = mppenc$(EXEEXT)
-STREAM_TARGET    = streamserver
-REPLAY_TARGET    = replaygain$(EXEEXT)
-CLIPSTAT_TARGET  = clipstat
-TAGGER_TARGET    = tagger
-ALL_TARGETS      = $(MPPENC_TARGET) $(REPLAY_TARGET)
-
-OTHER_DEPEND_ASM = $(MAKEFILE) tools.inc version
-OTHER_DEPEND_DEC = $(MAKEFILE) mppdec.h mpp.h config.h profile.h version
-OTHER_DEPEND_ENC = $(OTHER_DEPEND_DEC) mppenc.h minimax.h
-
-
-# Lists of object and C files
-
-MPPDEC_OBJ = cpu_feat.o decode.o http.o huffsv7.o huffsv46.o id3tag.o mppdec.o profile.o requant.o synth.o synthasm.o synthtab.o toolsd.o wave_out.o stderr.o _setargv.o
-MPPDEC_SRC =            decode.c http.c huffsv7.c huffsv46.c id3tag.c mppdec.c profile.c requant.c synth.c            synthtab.c tools.c  wave_out.c stderr.c _setargv.c
-MPPDEC_ASO = cpu_feat.o                                                                                     synthasm.o
-
-
-MPPENC_OBJ = analy_filter.o ans.o bitstream.o cvd.o fft4g.o fft4gasm.o fft_routines.o mppenc.o profile.o psy.o psy_tab.o quant.o huffsv7e.o encode_sv7.o wave_in.o tags.o toolse.o fastmath.o pipeopen.o stderr.o regress.o keyboard.o
-ifdef MINGW
-MPPENC_OBJ += winmsg.o
-endif
-MPPENC_SRC = analy_filter.c ans.c bitstream.c cvd.c fft4g.c            fft_routines.c mppenc.c profile.c psy.c psy_tab.c quant.c huffsv7.c  encode_sv7.c wave_in.c tags.c tools.c  fastmath.c pipeopen.c stderr.c regress.c keyboard.c
-ifdef MINGW
-MPPENC_SRC += winmsg.c
-endif
-MPPENC_ASO =                                                fft4gasm.o
-
-
-REPLAY_OBJ = replaygain.o gain_analysis.o pipeopen.o stderr.o _setargv.o
-REPLAY_SRC = replaygain.c gain_analysis.c pipeopen.c stderr.c _setargv.c
-REPLAY_ASO =
-
-
-CLIPSTAT_OBJ = clipstat.o pipeopen.o stderr.o
-CLIPSTAT_SRC = clipstat.c pipeopen.c stderr.c
-CLIPSTAT_ASO =
-
-
-# Files for source packages
-
-MPPDEC_PACKAGE = $(MPPDEC_SRC) AUTHORS CHANGES COPYING.LGPL ChangeLog INSTALL NEWS README SV7.txt MANUAL.TXT SHOWDIFFS version *.mak streamserver.c HowToRea.txt $(MAKEFILE) Makefile.nol Makefile.bsd Makefile.sun Makefile.BeOS Makefile.Darwin Makemsc.bat Maketcc.bat Makeztc.bat Makeztc.res Makeztc.ret Makeintel.bat config.c config.dsp streamserver.dsp udp_server_client.c msr.h cpu_feat.nas dump.c mppdec.dsp mpp.dsw mpp.h mpp.prj mppdec.h profile.h synthasm.nas tools.inc replaygain.c replaygain.dsp gain_analysis.[ch] pipeopen.[ch] _setargv.c name.c name.dsp
-MPPENC_PACKAGE = $(MPPENC_SRC) TODO minimax.h mppenc.dsp mppenc.h fastmath.h winmsg.c A-*.txt fft4gasm.nas predict.h
-WINAMP_PACKAGE = winamp/COPYING.LGPL winamp/INFO.txt winamp/README_mpc-plugin_english.txt winamp/README_mpc-plugin_finnish.txt winamp/README_mpc-plugin_german.txt winamp/README_mpc-plugin_korean.txt winamp/README_mpc-plugin_spanish.txt winamp/TODO winamp/bitstream.cpp winamp/bitstream.h winamp/colorbar-klemm.bmp winamp/colorbar-korean.bmp winamp/colorbar-old.bmp winamp/colorbar.bmp winamp/config.cpp winamp/http.cpp winamp/huffsv46.cpp winamp/huffsv46.h winamp/huffsv7.cpp winamp/huffsv7.h winamp/idtag.cpp winamp/idtag.h winamp/in2.h winamp/in_mpc.cpp winamp/in_mpc.dsp winamp/in_mpc.dsw winamp/in_mpc.h winamp/jnetlib/Makefile winamp/jnetlib/asyncdns.cpp winamp/jnetlib/asyncdns.h winamp/jnetlib/connection.cpp winamp/jnetlib/connection.h winamp/jnetlib/httpget.cpp winamp/jnetlib/httpget.h winamp/jnetlib/httpserv.cpp winamp/jnetlib/httpserv.h winamp/jnetlib/jnetlib.h winamp/jnetlib/listen.cpp winamp/jnetlib/listen.h winamp/jnetlib/netinc.h winamp/jnetlib/sercon.cpp winamp/jnetlib/sercon.h winamp/jnetlib/test.cpp winamp/jnetlib/test.dsp winamp/jnetlib/test.dsw winamp/jnetlib/udpconnection.cpp winamp/jnetlib/udpconnection.h winamp/jnetlib/util.cpp winamp/jnetlib/util.h winamp/language.h winamp/logo.bmp winamp/minimax.h winamp/mpc_dec.cpp winamp/mpc_dec.h winamp/out.h winamp/requant.cpp winamp/requant.h winamp/resource.h winamp/resource.hm winamp/synth_filter.cpp winamp/synth_filter.h winamp/tag-korean.rc winamp/tag.rc winamp/tagz.cpp winamp/tagz.h winamp/unihack.cpp winamp/ws_exp.h winamp/ws_loader.c winamp/ws_loader.h
-XMMS_PACKAGE   = COPYING.LGPL xmms/ChangeLog xmms/in_mpc.c xmms/Makefile xmms/README_mpc-plugin_*.txt xmms/bitstream.[ch] xmms/huffsv{46,7}.[ch] xmms/minimax.h xmms/mpc_dec.[ch] xmms/mpplus_blue.xpm xmms/requant.[ch] xmms/synth_filter.[ch] xmms/xmms-musepack.spec xmms/xmms.dsp
-
-
-# may be megabytes of Trash
-
-TRASH       = ./*.o ./*.obj ./*.lst {$(MPPDEC_TARGET),$(MPPENC_TARGET)}{,-static,-diet} $(STREAM_TARGET) a.out ./*.da ./*.s $(REPLAY_TARGET)
-AUX_TRASH   = ./*~ ./*/*~ ./*.bak ./.*~ DEADJOE mpp.lib config.h config .logging website/{*~,*/*~} report-*.txt .{,/*}/{Release,Debug}/*.{obj,pch,pdb,sbr,ilk,idb,exp,res} ./*.{plg,ncb,opt}
-BACKUP_EXCL = *.mpc website/audio/* website/audio2/* website/audio3/* website/bin/* website/img/* i/* mpp{enc,dec}-[0-9].[0-9][0-9][a-z]/* rfc*.txt.bz2
-
-
-# Broadcast destinations
-
-BROADCAST_MPPDEC = busch piecha pfk zeiss case@mobiili.net steve.lhomme@free.fr Nicolaus.Berglmeir@t-online.de
-BROADCAST_MPPENC = Andree.Buschmann@web.de patrick.piecha@micronas.com pfk f.klemm@zeiss.de Nicolaus.Berglmeir@t-online.de
-
-
-########################################################################################
-#
-# Compile source packages
-
-all:    $(ALL_TARGETS)
-
-
-$(MPPDEC_TARGET): $(MPPDEC_OBJ)
-ifndef BLD_STATIC
-	$(CC)         $(CFLAGS) $(MPPDEC_OBJ) -o $(MPPDEC_TARGET)        $(LDADD)
-#	-$(STRIP)     $(STRIPOPT)                $(MPPDEC_TARGET)
-else
-	$(CC) -static $(CFLAGS) $(MPPDEC_OBJ) -o $(MPPDEC_TARGET)-static $(LDADD)
-#	-$(STRIP)     $(STRIPOPT)                $(MPPDEC_TARGET)-static
-endif
-
-
-$(MPPDEC_TARGET)16: $(MPPDEC_OBJ)
-	make clean
-	BITS=16 make mppdec
-	$(MV_F) mppdec mppdec16
-	$(MV_F) mppdec-static mppdec16-static
-
-
-$(MPPDEC_TARGET)24: $(MPPDEC_OBJ)
-	make clean
-	BITS=24 make mppdec
-	$(MV_F) mppdec mppdec24
-	$(MV_F) mppdec-static mppdec24-static
-
-
-$(MPPDEC_TARGET)32: $(MPPDEC_OBJ)
-	make clean
-	BITS=32 make mppdec
-	$(MV_F) mppdec mppdec32
-	$(MV_F) mppdec-static mppdec32-static
-
-
-$(MPPENC_TARGET): $(MPPENC_OBJ)
-ifndef BLD_STATIC
-	$(CC)         $(CFLAGS) $(MPPENC_OBJ) -o $(MPPENC_TARGET)        $(LDADD)
-#	-$(STRIP)     $(STRIPOPT)                $(MPPENC_TARGET)
-else
-	$(CC) -static $(CFLAGS) $(MPPENC_OBJ) -o $(MPPENC_TARGET)-static $(LDADD)
-#	-$(STRIP)     $(STRIPOPT)                $(MPPENC_TARGET)-static
-endif
-
-
-$(MPPDEC_TARGET)-profiling: $(MPPDEC_OBJ)
-	$(CC3) -c      $(CFLAGS) $(CSRC)                            -fprofile-arcs         $(LDADD)
-	$(CC3)         $(CFLAGS) $(OBJ)  -o $(MPPDEC_TARGET)        -fprofile-arcs         $(LDADD)
-	make
-	make speed2
-	$(CC3) -c      $(CFLAGS) $(CSRC)                            -fprofile-arcs         $(LDADD)
-	$(CC3)         $(CFLAGS) $(OBJ)  -o $(MPPDEC_TARGET)        -fbranch-probabilities $(LDADD)
-	$(CC3) -static $(CFLAGS) $(OBJ)  -o $(MPPDEC_TARGET)-static -fbranch-probabilities $(LDADD)
-
-
-$(MPPDEC_TARGET)-diet:   $(MPPDEC_ASO) config.h
-	diet $(CC) $(CFLAGS) -DUSE_DIET -DNDEBUG $(MPPDEC_SRC) $(MPPDEC_ASO) -o $(MPPDEC_TARGET)-diet
-	elftrunc $(MPPDEC_TARGET)-diet $(MPPDEC_TARGET)-diet
-
-
-$(MPPENC_TARGET)-diet:   $(MPPENC_ASO) config.h
-	diet $(CC) $(CFLAGS) -DUSE_DIET -DNDEBUG $(MPPENC_SRC) $(MPPENC_ASO) -o $(MPPENC_TARGET)-diet
-	elftrunc $(MPPENC_TARGET)-diet $(MPPENC_TARGET)-diet
-
-
-$(STREAM_TARGET):
-	$(CC) -DMPP_DECODER $(CFLAGS) -o $(STREAM_TARGET) $(STREAM_TARGET).c
-	-$(STRIP)     $(STRIPOPT)           $(STREAM_TARGET)
-
-
-$(REPLAY_TARGET): $(REPLAY_OBJ) mpp.h config.c
-	$(CC) $(CFLAGS) $(REPLAY_OBJ) -o $(REPLAY_TARGET)      $(LDADD)
-#	-$(STRIP)     $(STRIPOPT)           $(REPLAY_TARGET)
-
-
-$(TAGGER_TARGET):
-	$(CC) -DMPP_DECODER $(CFLAGS) -o $(TAGGER_TARGET) $(TAGGER_TARGET).c
-	-$(STRIP)     $(STRIPOPT)           $(TAGGER_TARGET)
-
-
-$(CLIPSTAT_TARGET):
-	$(CC)         $(CFLAGS) $(CLIPSTAT_OBJ) -o $(CLIPSTAT_TARGET)  $(LDADD)
-	-$(STRIP)     $(STRIPOPT)           $(CLIPSTAT_TARGET)
-
-
-###########################################################################################
-#
-# Compile mppdec source code files
-
-config.h: mpp.h config.c
-	$(CC) -DMPP_DECODER $(CFLAGS) -o config config.c   $(LDADD) &> $(LOGFILE)
-	@$(RM_F) config.h
-	@./config "$(CC) $(CFLAGS) -o <<EXE>> <<SRC>> $(LDADD)" "./<<EXE>>"
-	@$(RM_F) config
-
-
-decode.o:   $(OTHER_DEPEND_DEC) dump.c
-	$(CC) -c -DMPP_DECODER $(CFLAGS) decode.c
-
-http.o:     $(OTHER_DEPEND_DEC)
-	$(CC) -c -DMPP_DECODER $(CFLAGS) http.c
-
-huffsv7.o: $(OTHER_DEPEND_DEC)
-	$(CC) -c -DMPP_DECODER $(CFLAGS_SIZE) huffsv7.c
-
-huffsv46.o: $(OTHER_DEPEND_DEC)
-	$(CC) -c -DMPP_DECODER $(CFLAGS_SIZE) huffsv46.c
-
-id3tag.o:   $(OTHER_DEPEND_DEC)
-	$(CC) -c -DMPP_DECODER $(CFLAGS_SIZE) id3tag.c
-
-mppdec.o:   $(OTHER_DEPEND_DEC)
-	$(CC) -c -DMPP_DECODER $(CFLAGS) mppdec.c
-
-profile.o:  $(OTHER_DEPEND_DEC)
-	$(CC) -c -DMPP_DECODER $(CFLAGS) profile.c
-
-requant.o:  $(OTHER_DEPEND_DEC)
-	$(CC) -c -DMPP_DECODER $(CFLAGS_SIZE) requant.c
-
-synth.o:    $(OTHER_DEPEND_DEC)
-	$(CC) -c -DMPP_DECODER $(CFLAGS) -fno-omit-frame-pointer -O synth.c
-
-synthtab.o: $(OTHER_DEPEND_DEC)
-	$(CC) -c -DMPP_DECODER $(CFLAGS) synthtab.c
-
-toolsd.o:    $(OTHER_DEPEND_DEC)
-	$(CC) -c -DMPP_DECODER -o toolsd.o $(CFLAGS) tools.c
-
-wave_out.o: $(OTHER_DEPEND_DEC)
-	$(CC) -c -DMPP_DECODER $(CFLAGS) wave_out.c
-
-synthasm.o: $(OTHER_DEPEND_ASM) synthasm.nas
-	$(RM_F) synthasm.lst
-	$(NASM) $(NASMFLAGS) synthasm.nas -o synthasm.o -l synthasm.lst
-
-cpu_feat.o: $(OTHER_DEPEND_ASM) cpu_feat.nas
-	$(RM_F) cpu_feat.lst
-	$(NASM) $(NASMFLAGS) cpu_feat.nas -o cpu_feat.o -l cpu_feat.lst
-
-
-################################################################################
-#
-# Compile mppenc source code files
-
-wave_in.o:      $(OTHER_DEPEND_ENC)
-	$(CC) -c $(CFLAGS) -DMPP_ENCODER wave_in.c
-
-psy.o:          $(OTHER_DEPEND_ENC)
-	$(CC) -c $(CFLAGS) -DMPP_ENCODER psy.c
-
-ans.o:          $(OTHER_DEPEND_ENC)
-	$(CC) -c $(CFLAGS) -DMPP_ENCODER ans.c
-
-cvd.o:          $(OTHER_DEPEND_ENC)
-	$(CC) -c $(CFLAGS) -DMPP_ENCODER cvd.c
-
-huffsv7e.o:    $(OTHER_DEPEND_ENC)
-	$(CC) -o huffsv7e.o -c $(CFLAGS_SIZE) -DMPP_ENCODER huffsv7.c
-
-encode_sv7.o:   $(OTHER_DEPEND_ENC)
-	$(CC) -c $(CFLAGS) -DMPP_ENCODER encode_sv7.c
-
-bitstream.o:    $(OTHER_DEPEND_ENC)
-	$(CC) -c $(CFLAGS) -DMPP_ENCODER bitstream.c
-
-analy_filter.o: $(OTHER_DEPEND_ENC)
-	$(CC) -c $(CFLAGS) -DMPP_ENCODER analy_filter.c
-
-quant.o:        $(OTHER_DEPEND_ENC)
-	$(CC) -c $(CFLAGS) -DMPP_ENCODER quant.c
-
-fft4g.o:        $(OTHER_DEPEND_ENC) fft4g.c
-	$(CC) -c $(CFLAGS) -DMPP_ENCODER -fno-omit-frame-pointer -O fft4g.c
-
-fft4gasm.o:     $(OTHER_DEPEND_ASM) fft4gasm.nas
-	$(NASM) $(NASMFLAGS) fft4gasm.nas -o fft4gasm.o -l fft4gasm.lst
-
-fft_routines.o: $(OTHER_DEPEND_ENC)
-	$(CC) -c $(CFLAGS) -DMPP_ENCODER fft_routines.c
-
-psy_tab.o:      $(OTHER_DEPEND_ENC)
-	$(CC) -c $(CFLAGS) -DMPP_ENCODER psy_tab.c
-
-mppenc.o:       $(OTHER_DEPEND_ENC)
-	$(CC) -c $(CFLAGS) -DMPP_ENCODER mppenc.c
-
-toolse.o:    $(OTHER_DEPEND_ENC)
-	$(CC) -o toolse.o -c $(CFLAGS) -DMPP_ENCODER tools.c
-
-tags.o:    $(OTHER_DEPEND_ENC)
-	$(CC) -o tags.o -c $(CFLAGS) -DMPP_ENCODER tags.c
-
-keyboard.o:       $(OTHER_DEPEND_ENC)
-	$(CC) -c $(CFLAGS) -DMPP_ENCODER keyboard.c
-
-winmsg.o:       $(OTHER_DEPEND_ENC)
-	$(CC) -c $(CFLAGS) -DMPP_ENCODER winmsg.c
-
-################################################################################
-#
-# Compile replaygain source code files
-
-replaygain.o:
-	$(CC) -c $(CFLAGS) -DMPP_DECODER replaygain.c
-
-gain_analysis.o:
-	$(CC) -c $(CFLAGS) -DMPP_DECODER gain_analysis.c
-
-pipeopen.o:
-	$(CC) -c $(CFLAGS_SIZE) -DMPP_DECODER pipeopen.c
-
-stderr.o:
-	$(CC) -c $(CFLAGS_SIZE) -DMPP_DECODER stderr.c
-
-fastmath.o:
-	$(CC) -c $(CFLAGS_SIZE) -DMPP_ENCODER fastmath.c
-
-clipstat.o:
-	$(CC) -c $(CFLAGS_SIZE) -DMPP_DECODER clipstat.c
-
-_setargv.o:
-	$(CC) -c $(CFLAGS_SIZE) -DMPP_DECODER _setargv.c
-
-####################################################################################
-
-list:	list.o pipeopen.o _setargv.o stderr.o
-	$(CC) $(CFLAGS_SIZE) -DMPP_ENCODER -o list list.o pipeopen.o _setargv.o stderr.o -lm
-
-list.o:	list.c
-	$(CC) -c $(CFLAGS_SIZE) -DMPP_ENCODER list.c
-
-
-###############################################################################################
-#
-# Cleaning and removing unnecessary files
-
-clean:
-	@$(RM_F) $(TRASH)
-
-
-mrproper:
-	@$(RM_F) $(TRASH) $(AUX_TRASH)
-
-
-###############################################################################################
-#
-# Speed tests and function tests
-
-speedd1:
-	@$(CAT)  "$(TEST9)" "$(MPPDEC_TARGET)" > $(DEVNULL)
-	@$(CAT)  "$(TEST9)" "$(MPPDEC_TARGET)" > $(DEVNULL)
-	@$(NICE) time ./mppdec       "$(TEST9)"  $(DEVNULL)
-	@$(NICE) ../decorig/mppdec   "$(TEST9)"  $(DEVNULL)
-
-
-speedd2:
-	@$(CAT)  "$(TEST10)" "$(MPPDEC_TARGET)"   > $(DEVNULL)
-	@$(CAT)  "$(TEST10)" "$(MPPDEC_TARGET)"   > $(DEVNULL)
-	@$(NICE) time ./mppdec          "$(TEST10)" $(DEVNULL)
-	@$(NICE) time ./mppdec          "$(TEST10)" $(DEVNULL)
-	@$(NICE) time ../decorig/mppdec "$(TEST10)" $(DEVNULL)
-
-
-testd1:
-	./mppdec           "$(TEST4)" $(TEST11)
-	../decorig/mppdec "$(TEST4)" $(TEST12)
-	./wavcmp $(TEST11) $(TEST12) | $(LESS)
-	$(RM_F) $(TEST11) $(TEST12)
-
-
-testd2:
-	@./mppdec          "$(TEST9)" $(TEST11)
-	@../decorig/mppdec "$(TEST9)" $(TEST12)
-	@./wavcmp $(TEST11) $(TEST12) | $(LESS)
-	@$(RM_F) $(TEST11) $(TEST12)
-
-
-testd3:
-	@./mppdec          "$(TEST4)" $(TEST11)
-	@../decorig/mppdec "$(TEST4)" $(TEST12)
-	@./wavcmp $(TEST11) $(TEST12) > $(TMPFILE)
-	@$(RM_F) $(TEST11) $(TEST12)
-	@./mppdec          "$(TEST3)" $(TEST11)
-	@../decorig/mppdec "$(TEST3)" $(TEST12)
-	@./wavcmp $(TEST11) $(TEST12) >> $(TMPFILE)
-	@$(RM_F) $(TEST11) $(TEST12)
-	@./mppdec          "$(TEST2)" $(TEST11)
-	@../decorig/mppdec "$(TEST2)" $(TEST12)
-	@./wavcmp $(TEST11) $(TEST12) >> $(TMPFILE)
-	@$(RM_F) $(TEST11) $(TEST12)
-	@./mppdec          "$(TEST1)" $(TEST11)
-	@../decorig/mppdec "$(TEST1)" $(TEST12)
-	@./wavcmp $(TEST11) $(TEST12) >> $(TMPFILE)
-	@$(RM_F) $(TEST11) $(TEST12)
-	@$(LESS) $(TMPFILE)
-	@$(RM_F) $(TMPFILE)
-
-
-testd4:
-	@./mppdec          "$(TEST1)" $(TEST11)
-	@../decorig/mppdec "$(TEST1)" $(TEST12)
-	@./wavcmp $(TEST11) $(TEST12) >> $(TMPFILE)
-	@$(RM_F) $(TEST11) $(TEST12)
-
-
-speede1:
-	@-$(RM_F) $(TEST7) $(TEST8)
-	@$(LPAC) -x $(TEST5) $(TEST6)
-	@$(CAT) $(TEST6) > $(DEVNULL)
-	@./$(MPPENC_TARGET) $(TEST6) $(TEST7)
-	@$(CAT) $(TEST6) > $(DEVNULL)
-	@../encorig/mppenc $(TEST6) $(TEST8)
-
-
-speede2:
-	@-$(RM_F) $(TEST7) $(TEST8)
-	@$(CAT) $(TEST6) ./$(MPPENC_TARGET) > $(DEVNULL)
-	@$(NICE) ./$(MPPENC_TARGET) $(TEST6) $(TEST7)
-	@$(CAT) $(TEST6) > $(DEVNULL)
-	@../encorig/mppenc $(TEST6) $(TEST8)
-
-
-#################################################################################################################
-#
-# Backup of important files
-
-backup:
-	@make clean
-	@$(ZIP) -r ../codec_$(DATE).zip ./* -x $(BACKUP_EXCL)
-
-
-#################################################################################################################
-#
-# Installing all binary files
-
-##install:
-##	@make
-##	@-mount -o remount,rw /usr &> $(DEVNULL)
-##	@-$(CP_F)                      {mppdec,mppdec16,mppdec24,mppdec32,mppenc}{,-static,-diet} /usr/local/bin
-##	@-$(CHOWN)  0.0 /usr/local/bin/{mppdec,mppdec16,mppdec24,mppdec32,mppenc}{,-static,-diet}
-##	@-$(CHMOD) 4755 /usr/local/bin/{mppdec,mppdec16,mppdec24,mppdec32,mppenc}{,-static,-diet}
-##	@-$(CP_F)                      replaygain                                                 /usr/local/bin
-
-install:
-	@make
-	install -m 0755 mppenc$(EXEEXT) $(DESTDIR)/usr/bin/
-
-
-installv:
-	@make clean
-	@make mppenc
-	@-mount -o remount,rw /usr &> $(DEVNULL)
-	@-$(CP_F)                      mppenc /usr/local/bin/mppenc-${MPPENC_VERSION}
-	@-mount -o remount,ro /usr &> $(DEVNULL)
-
-
-websrc:
-	@chmod 755 Remove.tab
-	@./Remove.tab -v {.,*,*/*,*/*/*,*/*/*/*}/*.{c,cpp,h,inc,nas,txt,htm,html}
-	@make mrproper
-	@$(RM_F) website/src/{mppdec,mppenc,winamp,xmms}-*.{tar.gz,tar.bz2,tar.Z,zip,pgp}
-	@-$(MKDIR) mppdec-${MPPDEC_VERSION} mppenc-${MPPENC_VERSION} winamp-${WINAMP_VERSION} xmms-${XMMS_VERSION}
-	@$(CP_F) $(MPPDEC_PACKAGE) mppdec-${MPPDEC_VERSION}
-	@$(CP_F) $(MPPENC_PACKAGE) mppenc-${MPPENC_VERSION}
-	@$(CP_F) $(WINAMP_PACKAGE) winamp-${WINAMP_VERSION}
-	@$(CP_F) $(XMMS_PACKAGE)   xmms-${XMMS_VERSION}
-	@-$(CHOWN) -R nobody.nogroup mppdec-${MPPDEC_VERSION} mppenc-${MPPENC_VERSION} winamp-${WINAMP_VERSION} xmms-${XMMS_VERSION}
-	@$(TAR) cf - mppdec-${MPPDEC_VERSION} | bzip2 -9 > website/src/mppdec-${MPPDEC_VERSION}.tar.bz2
-	@$(TAR) cf - mppenc-${MPPENC_VERSION} | bzip2 -9 > website/src/mppenc-${MPPENC_VERSION}.tar.bz2
-	@$(TAR) cf - winamp-${WINAMP_VERSION} | bzip2 -9 > website/src/winamp-${WINAMP_VERSION}.tar.bz2
-	@$(TAR) cf - xmms-${XMMS_VERSION}     | bzip2 -9 > website/src/xmms-${XMMS_VERSION}.tar.bz2
-	@$(RM_RF) mppdec-${MPPDEC_VERSION} mppenc-${MPPENC_VERSION} winamp-${WINAMP_VERSION} xmms-${XMMS_VERSION}
-	@$(PGP) -e website/src/mppenc-${MPPENC_VERSION}.tar.bz2 MPEGplus
-	@$(CHMOD) 644 website/src/*
-
-
-zip:
-	@make websrc
-	@/usr/local/bin/gz website/src/mpp*.tar.bz2
-	@-mdel z:mpp??c*.tar.gz
-	@-mcopy website/src/mpp??c*.tar.gz z:
-	@-mdel a:mpp??c*.tar.gz
-	@-mcopy website/src/mpp??c*.tar.gz a:
-
-
-send:
-	@make websrc
-	@make onlysendsource
-
-
-onlysendsource:
-	@echo Sending Sources ...
-	@$(ENCODE) website/src/mppdec-${MPPDEC_VERSION}.tar.bz2 website/src/mppdec-${MPPDEC_VERSION}-$(DATE).tar.bz2     | $(MAIL) -s "Source Decoder (${MPPDEC_VERSION}) ($(DATE))" $(BROADCAST_MPPDEC)
-	@$(ENCODE) website/src/mppenc-${MPPENC_VERSION}.tar.bz2 website/src/mppenc-${MPPENC_VERSION}-$(DATE).tar.bz2.pgp | $(MAIL) -s "Source Encoder (${MPPENC_VERSION}) ($(DATE))" $(BROADCAST_MPPENC)
-	@$(ENCODE) website/src/winamp-${WINAMP_VERSION}.tar.bz2 website/src/winamp-${WINAMP_VERSION}-$(DATE).tar.bz2     | $(MAIL) -s "Source WinAmp  (${WINAMP_VERSION}) ($(DATE))" $(BROADCAST_MPPDEC)
-	@$(ENCODE) website/src/xmms-${XMMS_VERSION}.tar.bz2     website/src/xmms-${XMMS_VERSION}-$(DATE).tar.bz2         | $(MAIL) -s "Source XMMS    (${XMMS_VERSION}) ($(DATE))" $(BROADCAST_MPPDEC)
-	@echo -e 'Bei Modifikationen bitte einsenden:\n\n\tQuelle (Zeitstempel der Mail: '$(DATE)')\n\tModifikationen bestimmt mit »diff -abBU5 alteDatei neueDatei«\n\nFrank Klemm (pfk@fuchs.offl.uni-jena.de)\n ' | $(MAIL) -s "Hinweis" $(BROADCAST)
-
-
-onlysendbinary:
-	@make
-	@$(BZIP2) < mppdec-static | $(ENCODE) mppdec-${MPPDEC_VERSION}-linux-IA32-libc6-static.bz2 | $(MAIL) -s "Programm D" $(BROADCAST)
-	@$(BZIP2) < mppenc-static | $(ENCODE) mppenc-${MPPENC_VERSION}-linux-IA32-libc6-static.bz2 | $(MAIL) -s "Programm E" $(BROADCAST)
-
-
-#################################################################################################################
-#
-#
-
-linux:
-	@USE_GCC272=yes make
-
-
-linstall: linux
-	@$(CP_F) $(MPPDEC_TARGET) ~/bin1/mppdec_pp
-	@$(CP_F) $(MPPENC_TARGET) ~/bin1/mppenc_pp
-	@$(CP_F) $(REPLAY_TARGET) ~/bin1/replaygain_pp
-
-
-solaris:
-	@USE_GCC272=yes _SUNOS=yes make
-
-
-sinstall: solaris
-	@$(CP_F) $(MPPDEC_TARGET) ~/bin/mppdec_pp
-	@$(CP_F) $(MPPENC_TARGET) ~/bin/mppenc_pp
-	@$(CP_F) $(REPLAY_TARGET) ~/bin/replaygain_pp
-
-
-######### end of Makefile ###################################################################################
-
-
Index: penc/branches/zorg/Makefile.BeOS
===================================================================
--- /mppenc/branches/zorg/Makefile.BeOS	(revision 40)
+++ 	(revision )
@@ -1,84 +1,0 @@
-#
-#  Makefile for mppdec for BeOS R5 x86
-#  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-#
-
-CC       = cc
-RM_F     = rm -f
-#LDADD    = -lnet
-
-
-include version
-OPTIM    = -O3 -s
-
-WARN     =
-
-CFLAGS   = $(OPTIM) $(WARN) -DMPPDEC_VERSION=\"$(MPPDEC_VERSION)\" -DMPP_DECODER
-
-TARGETS  = mppdec
-
-MAKEFILE = Makefile.nol
-
-#
-#  Dependencies am Ende noch mal abgleichen
-#
-
-OBJ = \
-	decode.o     \
-	http.o       \
-	huffsv46.o   \
-	huffsv7.o    \
-	id3tag.o     \
-	mppdec.o     \
-	profile.o    \
-	requant.o    \
-	synth.o      \
-	synthtab.o   \
-	tools.o      \
-	wave_out.o   \
-	stderr.o     \
-
-
-all:    $(TARGETS)
-
-mppdec: $(OBJ)
-	$(CC)         $(CFLAGS) $(OBJ) -o $(TARGETS)        $(LDADD)
-	$(CC) -static $(CFLAGS) $(OBJ) -o $(TARGETS)-static $(LDADD)
-
-config.h: mpp.h config.c
-	$(CC)    $(OPTIM)   -DMPP_DECODER    -o config config.c   $(LDADD)
-	@./config "$(CC) $(OPTIM) -o <<EXE>> <<SRC>> $(LDADD)" "./<<EXE>>"
-	@$(RM_F) config
-
-decode.o:   mpp.h config.h profile.h $(MAKEFILE) dump.c
-
-huffsv46.o: mpp.h config.h profile.h $(MAKEFILE)
-
-huffsv7.o:  mpp.h config.h profile.h $(MAKEFILE)
-
-id3tag.o:   mpp.h config.h profile.h $(MAKEFILE)
-
-mppdec.o:   mpp.h config.h profile.h $(MAKEFILE)
-
-requant.o:  mpp.h config.h profile.h $(MAKEFILE)
-
-synth.o:    mpp.h config.h profile.h $(MAKEFILE)
-
-synthtab.o: mpp.h config.h profile.h $(MAKEFILE)
-
-tools.o:    mpp.h config.h profile.h $(MAKEFILE)
-
-wave_out.o: mpp.h config.h profile.h $(MAKEFILE)
-
-stderr.o:   mpp.h config.h profile.h $(MAKEFILE)
-
-
-clean:
-	@$(RM_F) *.o *.lst $(TARGETS) $(TARGETS)-static $(TARGETS)-diet config.h config
-
-mrproper:
-	@$(RM_F) *.o *.lst $(TARGETS) $(TARGETS)-static $(TARGETS)-diet ./*~ ./*.bak ./*.obj a.out *.s DEADJOE mpp.lib config.h config
-
-install:
-	@strip mppdec
-	@cp mppdec /boot/home/config/bin
Index: penc/branches/zorg/Makefile.Darwin
===================================================================
--- /mppenc/branches/zorg/Makefile.Darwin	(revision 40)
+++ 	(revision )
@@ -1,106 +1,0 @@
-#
-#  Makefile for mppdec for Darwin/Mac OS X
-#
-#  Assumes ESD (Fink package esound)
-#  ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-#
-
-CC       = gcc
-RM_F     = rm -f
-LDADD    = `esd-config --libs` -lesd
-
-include version
-
-# -m*=750 optimises for the G3
-OPTIM    = -O3 -mcpu=750 -mtune=750 -ffast-math -s
-
-WARN     = -Wno-long-double
-
-CFLAGS   = $(OPTIM) $(WARN) -DMPPDEC_VERSION=\"$(MPPDEC_VERSION)\" -DMPP_DECODER `esd-config --cflags`
-
-TARGETS  = mppdec
-
-MAKEFILE = Makefile.darwin
-
-#
-#  Dependencies am Ende noch mal abgleichen
-#
-
-OBJ = \
-	decode.o        \
-	http.o          \
-	huffsv46.o      \
-	huffsv7.o       \
-	id3tag.o        \
-	mppdec.o        \
-	profile.o       \
-	requant.o       \
-	synth.o         \
-	synthtab.o      \
-	tools.o         \
-	wave_out.o      \
-	_setargv.o      \
-	dump.o          \
-	gain_analysis.o \
-	pipeopen.o      \
-	stderr.o
-
-
-all:    $(TARGETS)
-
-
-mppdec: $(OBJ)
-	$(CC)          $(CFLAGS) $(OBJ) -o $(TARGETS)        $(LDADD)
-
-
-config.h: mpp.h config.c
-	$(CC)         $(OPTIM)    -DMPP_DECODER     -o config config.c   $(LDADD)
-	@./config "$(CC) $(OPTIM) -o <<EXE>> <<SRC>> $(LDADD)" "./<<EXE>>"
-	@$(RM_F) config
-
-
-
-decode.o:       mpp.h config.h profile.h $(MAKEFILE) dump.c
-
-http.o:         mpp.h config.h profile.h $(MAKEFILE)
-
-huffsv46.o:     mpp.h config.h profile.h $(MAKEFILE)
-
-huffsv7.o:      mpp.h config.h profile.h $(MAKEFILE)
-
-id3tag.o:       mpp.h config.h profile.h $(MAKEFILE)
-
-mppdec.o:       mpp.h config.h profile.h $(MAKEFILE)
-
-requant.o:      mpp.h config.h profile.h $(MAKEFILE)
-
-synth.o:        mpp.h config.h profile.h $(MAKEFILE)
-
-synthtab.o:     mpp.h config.h profile.h $(MAKEFILE)
-
-tools.o:        mpp.h config.h profile.h $(MAKEFILE)
-
-wave_out.o:     mpp.h config.h profile.h $(MAKEFILE)
-
-_setargv.o:     mpp.h config.h profile.h $(MAKEFILE)
-
-dump.o:         mpp.h config.h profile.h $(MAKEFILE)
-
-gain_analysis.o:  mpp.h config.h profile.h $(MAKEFILE)
-
-http.o:         mpp.h config.h profile.h $(MAKEFILE)
-
-pipeopen.o:     mpp.h config.h profile.h $(MAKEFILE)
-
-stderr.o:       mpp.h config.h profile.h $(MAKEFILE)
-
-
-clean:
-	@$(RM_F) *.o *.lst $(TARGETS) $(TARGETS)-static config.h config
-
-mrproper:
-	@$(RM_F) *.o *.lst $(TARGETS) $(TARGETS)-static ./*~ ./*.bak ./*.obj a.out *.s DEADJOE mpp.lib config.h config
-
-install:
-	@strip mppdec
-	@cp mppdec /usr/local/bin
Index: penc/branches/zorg/Makefile.bsd
===================================================================
--- /mppenc/branches/zorg/Makefile.bsd	(revision 40)
+++ 	(revision )
@@ -1,94 +1,0 @@
-#
-#  Makefile for mppdec for BSD
-#  ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-#
-
-CC       = cc
-RM_F     = rm -f
-LDADD    = -lm `esd-config --libs`
-#LDADD  += -lesd
-#LDADD  += -lossaudio
-
-include version
-OPTIM    = -O3 -march=pentiumpro -ffast-math -s
-
-WARN     =
-
-CFLAGS   = $(OPTIM) $(WARN) -DMPPDEC_VERSION=\"$(MPPDEC_VERSION)\" -DMPP_DECODER `esd-config --cflags`
-
-TARGETS  = mppdec
-
-MAKEFILE = Makefile.nol
-
-#
-#  Dependencies am Ende noch mal abgleichen
-#
-
-OBJ = \
-	decode.o     \
-	http.o       \
-	huffsv46.o   \
-	huffsv7.o    \
-	id3tag.o     \
-	mppdec.o     \
-	profile.o    \
-	requant.o    \
-	synth.o      \
-	synthtab.o   \
-	tools.o      \
-	wave_out.o   \
-	stderr.o     \
-	cpu_feat.o   \
-	synthasm.o   \
-	_setargv.o   \
-
-
-all:    $(TARGETS)
-
-mppdec: $(OBJ)
-	$(CC)         $(CFLAGS) $(OBJ) -o $(TARGETS)        $(LDADD)
-	$(CC) -static $(CFLAGS) $(OBJ) -o $(TARGETS)-static $(LDADD)
-
-config.h: mpp.h config.c
-	$(CC) $(OPTIM) -DMPP_DECODER `esd-config --cflags` -o config config.c $(LDADD)
-	@./config "$(CC) $(OPTIM) -o <<EXE>> <<SRC>> $(LDADD)" "./<<EXE>>"
-	@$(RM_F) config
-
-decode.o:   mpp.h config.h profile.h $(MAKEFILE) dump.c
-
-huffsv46.o: mpp.h config.h profile.h $(MAKEFILE)
-
-huffsv7.o:  mpp.h config.h profile.h $(MAKEFILE)
-
-id3tag.o:   mpp.h config.h profile.h $(MAKEFILE)
-
-mppdec.o:   mpp.h config.h profile.h $(MAKEFILE)
-
-requant.o:  mpp.h config.h profile.h $(MAKEFILE)
-
-synth.o:    mpp.h config.h profile.h $(MAKEFILE)
-
-synthtab.o: mpp.h config.h profile.h $(MAKEFILE)
-
-tools.o:    mpp.h config.h profile.h $(MAKEFILE)
-
-wave_out.o: mpp.h config.h profile.h $(MAKEFILE)
-
-stderr.o:   mpp.h config.h profile.h $(MAKEFILE)
-
-cpu_feat.o: tools.inc
-	nasm -f elf cpu_feat.nas
-
-synthasm.o: tools.inc
-	nasm -f elf synthasm.nas
-
-
-clean:
-	@$(RM_F) *.o *.lst $(TARGETS) $(TARGETS)-static $(TARGETS)-diet config.h config
-
-mrproper:
-	@$(RM_F) *.o *.lst $(TARGETS) $(TARGETS)-static $(TARGETS)-diet ./*~ ./*.bak ./*.obj a.out *.s DEADJOE mpp.lib config.h config
-
-install:
-	@strip mppdec
-	@cp mppdec /usr/local/bin
Index: penc/branches/zorg/Makefile.nol
===================================================================
--- /mppenc/branches/zorg/Makefile.nol	(revision 40)
+++ 	(revision )
@@ -1,100 +1,0 @@
-#
-#  Makefile for mppdec for generic ANSI-C compiler
-#  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-#
-
-CC       = cc
-RM_F     = rm -f
-LDADD    = -lm
-#LDADD  += -lesd
-#LDADD  += -lossaudio
-
-include version
-OPTIM    = -O3 -s
-
-WARN     =
-
-CFLAGS   = -DMPP_DECODER $(OPTIM) $(WARN) -DMPPDEC_VERSION=\"$(MPPDEC_VERSION)\"
-
-TARGETS  = mppdec
-
-MAKEFILE = Makefile.nol
-
-#
-#  Dependencies am Ende noch mal abgleichen
-#
-
-OBJ = \
-	decode.o         \
-	http.o           \
-	huffsv46.o       \
-	huffsv7.o        \
-	id3tag.o         \
-	mppdec.o         \
-	profile.o        \
-	requant.o        \
-	synth.o          \
-	synthtab.o       \
-	tools.o          \
-	wave_out.o       \
-	_setargv.o       \
-	dump.o           \
-	gain_analysis.o  \
-	http.o           \
-	pipeopen.o       \
-	stderr.o         \
-
-
-all:    $(TARGETS)
-
-mppdec: $(OBJ)
-	$(CC)         $(CFLAGS) $(OBJ) -o $(TARGETS)        $(LDADD)
-	$(CC) -static $(CFLAGS) $(OBJ) -o $(TARGETS)-static $(LDADD)
-
-config.h: mpp.h config.c
-	$(CC)         $(OPTIM)    -DMPP_DECODER     -o config config.c   $(LDADD)
-	@./config "$(CC) $(OPTIM) -o <<EXE>> <<SRC>> $(LDADD)" "./<<EXE>>"
-	@$(RM_F) config
-
-decode.o:   mpp.h config.h profile.h $(MAKEFILE) dump.c
-
-huffsv46.o: mpp.h config.h profile.h $(MAKEFILE)
-
-huffsv7.o:  mpp.h config.h profile.h $(MAKEFILE)
-
-id3tag.o:   mpp.h config.h profile.h $(MAKEFILE)
-
-mppdec.o:   mpp.h config.h profile.h $(MAKEFILE)
-
-requant.o:  mpp.h config.h profile.h $(MAKEFILE)
-
-synth.o:    mpp.h config.h profile.h $(MAKEFILE)
-
-synthtab.o: mpp.h config.h profile.h $(MAKEFILE)
-
-tools.o:    mpp.h config.h profile.h $(MAKEFILE)
-
-wave_out.o: mpp.h config.h profile.h $(MAKEFILE)
-
-_setargv.o: mpp.h config.h profile.h $(MAKEFILE)
-
-dump.o:     mpp.h config.h profile.h $(MAKEFILE)
-
-gain_analysis.o:  mpp.h config.h profile.h $(MAKEFILE)
-
-http.o:     mpp.h config.h profile.h $(MAKEFILE)
-
-pipeopen.o: mpp.h config.h profile.h $(MAKEFILE)
-
-stderr.o:   mpp.h config.h profile.h $(MAKEFILE)
-
-
-clean:
-	@$(RM_F) *.o *.lst $(TARGETS) $(TARGETS)-static $(TARGETS)-diet config.h config
-
-mrproper:
-	@$(RM_F) *.o *.lst $(TARGETS) $(TARGETS)-static $(TARGETS)-diet ./*~ ./*.bak ./*.obj a.out *.s DEADJOE mpp.lib config.h config
-
-install:
-	@strip mppdec
-	@cp mppdec /usr/local/bin
Index: penc/branches/zorg/Makefile.sun
===================================================================
--- /mppenc/branches/zorg/Makefile.sun	(revision 40)
+++ 	(revision )
@@ -1,107 +1,0 @@
-#
-#  Makefile for mppdec for Sun C compiler
-#  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-#
-
-CC       = cc -xCC
-RM_F     = rm -f
-LDADD    = -lm -lrt
-LDADD   += -lsocket -lnsl
-#LDADD  += -lesd
-#LDADD  += -lossaudio
-
-include version
-OPTIM    = -native -xO5 -fast -s
-
-WARN     =
-
-CFLAGS   = -DMPP_DECODER $(OPTIM) $(WARN) -DMPPDEC_VERSION=\"$(MPPDEC_VERSION)\"
-
-TARGETS  = mppdec
-
-MAKEFILE = Makefile.sun
-
-#
-#  Dependencies am Ende noch mal abgleichen
-#
-
-OBJ = \
-	decode.o        \
-	http.o          \
-	huffsv46.o      \
-	huffsv7.o       \
-	id3tag.o        \
-	mppdec.o        \
-	profile.o       \
-	requant.o       \
-	synth.o         \
-	synthtab.o      \
-	tools.o         \
-	wave_out.o      \
-	_setargv.o      \
-	dump.o          \
-	gain_analysis.o \
-	http.o          \
-	pipeopen.o      \
-	stderr.o
-
-
-all:    $(TARGETS)
-
-
-mppdec: $(OBJ)
-	$(CC)          $(CFLAGS) $(OBJ) -o $(TARGETS)        $(LDADD)
-	$(CC) -Bstatic $(CFLAGS) $(OBJ) -o $(TARGETS)-static $(LDADD)
-
-
-config.h: mpp.h config.c
-	$(CC)         $(OPTIM)    -DMPP_DECODER     -o config config.c   $(LDADD)
-	@./config "$(CC) $(OPTIM) -o <<EXE>> <<SRC>> $(LDADD)" "./<<EXE>>"
-	@$(RM_F) config
-
-
-
-decode.o:       mpp.h config.h profile.h $(MAKEFILE) dump.c
-
-http.o:         mpp.h config.h profile.h $(MAKEFILE)
-
-huffsv46.o:     mpp.h config.h profile.h $(MAKEFILE)
-
-huffsv7.o:      mpp.h config.h profile.h $(MAKEFILE)
-
-id3tag.o:       mpp.h config.h profile.h $(MAKEFILE)
-
-mppdec.o:       mpp.h config.h profile.h $(MAKEFILE)
-
-requant.o:      mpp.h config.h profile.h $(MAKEFILE)
-
-synth.o:        mpp.h config.h profile.h $(MAKEFILE)
-
-synthtab.o:     mpp.h config.h profile.h $(MAKEFILE)
-
-tools.o:        mpp.h config.h profile.h $(MAKEFILE)
-
-wave_out.o:     mpp.h config.h profile.h $(MAKEFILE)
-
-_setargv.o:     mpp.h config.h profile.h $(MAKEFILE)
-
-dump.o:         mpp.h config.h profile.h $(MAKEFILE)
-
-gain_analysis.o:  mpp.h config.h profile.h $(MAKEFILE)
-
-http.o:         mpp.h config.h profile.h $(MAKEFILE)
-
-pipeopen.o:     mpp.h config.h profile.h $(MAKEFILE)
-
-stderr.o:       mpp.h config.h profile.h $(MAKEFILE)
-
-
-clean:
-	@$(RM_F) *.o *.lst $(TARGETS) $(TARGETS)-static config.h config
-
-mrproper:
-	@$(RM_F) *.o *.lst $(TARGETS) $(TARGETS)-static ./*~ ./*.bak ./*.obj a.out *.s DEADJOE mpp.lib config.h config
-
-install:
-	@strip mppdec
-	@cp mppdec /usr/local/bin
Index: penc/branches/zorg/Makeintel.bat
===================================================================
--- /mppenc/branches/zorg/Makeintel.bat	(revision 40)
+++ 	(revision )
@@ -1,33 +1,0 @@
-@echo off
-
-cls
-
-SET NASM=nasmw.EXE
-SET CFLAGS=/Gr /nologo /O3 /QIfist /Qpc64 /Qrestrict /Qsox- /Qunroll12 /Qwp_ipo
-SET FILES=decode.c huffsv46.c huffsv7.c id3tag.c mppdec.c requant.c synth.c synthtab.c tools.c wave_out.c Release\cpu_feat.obj Release\synthasm.obj setargv.obj user32.lib winmm.lib
- ws2_32.lib
-
-del compile*.log 
-del *.lst
-
-mkdir Release
-%NASM% -f win32 -o Release\cpu_feat.obj -l cpu_feat.lst cpu_feat.nas
-%NASM% -f win32 -o Release\synthasm.obj -l synthasm.lst synthasm.nas
-
-icl /GB /QaxW /Feconfig.exe      %CFLAGS% config.c
-.\config.exe
-
-icl /GB /QaxW /Femppdec.exe      %CFLAGS% %FILES% > compile.log
-icl /G5       /Femppdec_P1.exe   %CFLAGS% %FILES% > compile_P1.log
-icl /G5 /QxM  /Femppdec_PMMX.exe %CFLAGS% %FILES% > compile_PMMX.log
-icl /G6 /Qxi  /Femppdec_PPro.exe %CFLAGS% %FILES% > compile_PPro.log
-icl /G6 /QxiM /Femppdec_P2.exe   %CFLAGS% %FILES% > compile_P2.log
-icl /G6 /QxK  /Femppdec_P3.exe   %CFLAGS% %FILES% > compile_P3.log
-icl /G7 /QxW  /Femppdec_P4.exe   %CFLAGS% %FILES% > compile_P4.log
-
-echo.
-dir *.exe
-echo.
-
-.\mppdec_P2.exe /Archive/1.mpc /dev/null
-.\mppdec_P2.exe /Archive/1.mpc /dev/null
Index: penc/branches/zorg/Makeintel.sh
===================================================================
--- /mppenc/branches/zorg/Makeintel.sh	(revision 40)
+++ 	(revision )
@@ -1,11 +1,0 @@
-#! /bin/bash
-
-clear
-
-icl /Ox /Ob2 /Og /Oi /Ot  /GB /QaxW  /Gr /Gs /Qip /Qunroll12 /Qpc64 /QIfist /Femppdec      decode.c huffsv7.c huffsv46.c id3tag.c mppdec.c requant.c synth.c synthtab.c tools.c wave_out.c Release/cpu_feat.o Release/synthasm.o
-icl /Ox /Ob2 /Og /Oi /Ot  /G5        /Gr /Gs /Qip /Qunroll12 /Qpc64 /QIfist /Femppdec_P1   decode.c huffsv7.c huffsv46.c id3tag.c mppdec.c requant.c synth.c synthtab.c tools.c wave_out.c Release/cpu_feat.o Release/synthasm.o
-icl /Ox /Ob2 /Og /Oi /Ot  /G6 /Qxi   /Gr /Gs /Qip /Qunroll12 /Qpc64 /QIfist /Femppdec_PPro decode.c huffsv7.c huffsv46.c id3tag.c mppdec.c requant.c synth.c synthtab.c tools.c wave_out.c Release/cpu_feat.o Release/synthasm.o
-icl /Ox /Ob2 /Og /Oi /Ot  /G5 /QxM   /Gr /Gs /Qip /Qunroll12 /Qpc64 /QIfist /Femppdec_PMMX decode.c huffsv7.c huffsv46.c id3tag.c mppdec.c requant.c synth.c synthtab.c tools.c wave_out.c Release/cpu_feat.o Release/synthasm.o
-icl /Ox /Ob2 /Og /Oi /Ot  /G6 /QxiM  /Gr /Gs /Qip /Qunroll12 /Qpc64 /QIfist /Femppdec_P2   decode.c huffsv7.c huffsv46.c id3tag.c mppdec.c requant.c synth.c synthtab.c tools.c wave_out.c Release/cpu_feat.o Release/synthasm.o
-icl /Ox /Ob2 /Og /Oi /Ot  /G6 /QxK   /Gr /Gs /Qip /Qunroll12 /Qpc64 /QIfist /Femppdec_P3   decode.c huffsv7.c huffsv46.c id3tag.c mppdec.c requant.c synth.c synthtab.c tools.c wave_out.c Release/cpu_feat.o Release/synthasm.o
-icl /Ox /Ob2 /Og /Oi /Ot  /G7 /QxW   /Gr /Gs /Qip /Qunroll12 /Qpc64 /QIfist /Femppdec_P4   decode.c huffsv7.c huffsv46.c id3tag.c mppdec.c requant.c synth.c synthtab.c tools.c wave_out.c Release/cpu_feat.o Release/synthasm.o
Index: penc/branches/zorg/Makemsc.bat
===================================================================
--- /mppenc/branches/zorg/Makemsc.bat	(revision 40)
+++ 	(revision )
@@ -1,22 +1,0 @@
-@echo off
-
-set include=D:\MSC\include
-set lib=D:\MSC\lib
-
-if exist *.obj	 del *.obj
-if exist mpp.lib del mpp.lib
-
-:::set opt=/W4 /G2 /Gr /Ot /Ol /Og /Oe /Oi /FPi87 /Gr /Gs
-set opt=/W4
-
-for %%i in (WAVE HUFF_NEW HUFF_OLD REQUANT SYNTH)	 do cl %opt% /c %%i.c
-for %%i in (DECODE MPPDEC TOOLS ID3TAG SYNTHTAB PROFILE) do cl %opt% /c %%i.c
-
-tlib mpp.lib /c +SYNTH.obj +HUFF_NEW.obj +HUFF_OLD.obj +REQUANT.obj +WAVE.obj +DECODE.obj
-tlib mpp.lib /c +MPPDEC.obj +TOOLS.obj +ID3TAG.obj +SYNTHTAB.obj +PROFILE.obj
-
-cl /Gr mppdec.obj mpp.lib
-diet mpp.exe > nul
-
-copy SV7test.mpp nul > nul
-mpp SV7test.mpp nul
Index: penc/branches/zorg/Maketcc.bat
===================================================================
--- /mppenc/branches/zorg/Maketcc.bat	(revision 40)
+++ 	(revision )
@@ -1,20 +1,0 @@
-@echo off
-
-tcc -ms -2 -f287 -DFILEIO=4 config.c
-.\config
-del config.exe
-
-if exist *.obj   del *.obj
-if exist mpp.lib del mpp.lib
-
-for %%i in (SYNTH HUFF_NEW HUFF_OLD REQUANT WAVE) do tcc -ms -DFILEIO=4 -2 -f287 -Z -G -O -c -k- %%i.c
-for %%i in (DECODE MPPDEC TOOLS ID3TAG SYNTHTAB PROFILE)  do tcc -ms -DFILEIO=4 -2 -f287 -Z -G -O -c -k- %%i.c
-
-tlib mpp.lib /c +SYNTH.obj +HUFF_NEW.obj +HUFF_OLD.obj +REQUANT.obj +WAVE.obj +DECODE.obj
-tlib mpp.lib /c +MPPDEC.obj +TOOLS.obj +ID3TAG.obj +SYNTHTAB.obj +PROFILE.obj
-
-tcc -2 -f287 -ms -empp.exe mpp.lib
-diet mpp.exe > nul
-
-copy SV7test.mpp nul > nul
-mpp SV7test.mpp nul
Index: penc/branches/zorg/Makeztc.bat
===================================================================
--- /mppenc/branches/zorg/Makeztc.bat	(revision 40)
+++ 	(revision )
@@ -1,12 +1,0 @@
-@echo off
-
-if exist mppz?.exe del mppz?.exe
-
-ztc -f -ms    -c          -v2 @makeztc.res
-ztc -f -ms    -omppz2.exe -v2 @makeztc.ret
-ztc -f -mx -3 -c	  -v2 @makeztc.res
-ztc -f -mx -3 -omppz3.exe -v2 @makeztc.ret
-
-copy  SV7test.mpp nul
-mppz2 SV7test.mpp nul
-mppz3 SV7test.mpp nul
Index: penc/branches/zorg/Makeztc.res
===================================================================
--- /mppenc/branches/zorg/Makeztc.res	(revision 40)
+++ 	(revision )
@@ -1,1 +1,0 @@
--o+dc -o+da -o+dv -o+reg -o+cse -o+vbe -o+time -o+li -o+liv -o+cp -o+cnp -o+w mppdec.c huffsv7.c huffsv46.c id3tag.c requant.c synthtab.c wave.c decode.c tools.c synth.c
Index: penc/branches/zorg/Makeztc.ret
===================================================================
--- /mppenc/branches/zorg/Makeztc.ret	(revision 40)
+++ 	(revision )
@@ -1,1 +1,0 @@
-mppdec.obj huffsv46.obj huffsv7.obj id3tag.obj requant.obj synthtab.obj wave.obj decode.obj tools.obj synth.obj
Index: penc/branches/zorg/README
===================================================================
--- /mppenc/branches/zorg/README	(revision 40)
+++ 	(revision )
@@ -1,45 +1,0 @@
-mppdec -- the MPEGplus compressed audio decoder
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-This is a speed and portability optimized version of Andree Buschmann's
-MPEG-Plus decoder. Speed enhancement is about 1:4...1:5 relative to the
-original source. Some of these optimizations flood back to the original
-decoder, but especially on AMD K6-2/AMD K6-III/AMD Athlon/AMD Duron/Intel
-Pentium III/Intel Pentium 4 there's still some hand written assembler code
-so this decoder ist still much faster.
-
-
-Advantages of this Decoder:
-  * really fast!
-  * direct support of Audio devices under UNIX and Windows
-  * realtime support on Unix, Windows and POSIX 1.b systems
-  * support of AMDs 3DNow! and Intels SSE
-  * support of reading ID3 tags (version 1 and 1.1)
-  * multiple files support
-  * runs also on 16 and 64 bit CPUs, not only on 32 bit
-  * needs less memory
-  * 16...32 bit, dithering and noise shaping support
-  * Microsoft WAVE, Apple AIFF and Raw PCM support
-
-Features still missing:
-  * resync on errors
-  * audio support also for other Operating Systems,
-    Rewind/Review/Cue/Fast Forward support
-  * Divide decoder into lib and frontend
-
-Note: Recommentations and bug reports are welcome
-(use a realname and a valid e-Mail address!).
-
-
-The author of the file format and the original coder and decoder is
-Andree Buschmann. His MPEGplus web page and work you can find at:
-
-    http://www.stud.uni-hannover.de/user/73884/audiocoder.html
-
-The web page of mppdec you hold in your hands (you can also find
-precompiled binaries there) is:
-
-    http://www.uni-jena.de/~pfk/mpp/
-
---
-Frank Klemm <pfk@schnecke.offl.uni-jena.de>
Index: penc/branches/zorg/Remove.comment
===================================================================
--- /mppenc/branches/zorg/Remove.comment	(revision 40)
+++ 	(revision )
@@ -1,19 +1,0 @@
-#! /bin/bash
-
-if [ "$1" = "-c" ]; then
-    # Replace //-Comments (C99/C++) with /*-Comments-*/
-    shift
-    while [ ! "$1" = "" ]; do
-        sed 's|//.*$|/\*& \*/|' < $1 | sed 's|/\*//|/\*|' > $1_x_x
-        mv -f $1_x_x $1
-        shift
-    done
-else
-    # convert ANSI-C to K&R
-    while [ ! "$1" = "" ]; do
-        # replacement of whole words only !!!!
-        ansi2knr < $1 | sed 's/const //g' | sed 's/( void )/()/' | sed 's/(void)//' | sed 's/void\* /char* /g' | sed 's/void/int/g' | sed 's/ signed / /g' > $1_x_x
-        mv -f $1_x_x $1
-        shift
-    done
-fi
Index: penc/branches/zorg/Remove.tab.c
===================================================================
--- /mppenc/branches/zorg/Remove.tab.c	(revision 40)
+++ 	(revision )
@@ -1,269 +1,0 @@
-/*
- *  In-place file filter
- */
-
- /* To do: inplace old data write test */
-
-#include <stdio.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-#ifndef _WIN32
-# include <unistd.h>
-# include <sys/time.h>
-# include <sys/ioctl.h>
-#else
-typedef signed long ssize_t;
-# include <io.h>
-# include <time.h>
-#define ftruncate( fd, olen )   _chsize(fd, olen)
-#endif
-#include <sys/types.h>
-#include <sys/stat.h>
-
-
-#ifndef O_BINARY
-# ifdef _O_BINARY
-#  define O_BINARY      _O_BINARY
-# else
-#  define O_BINARY      0
-# endif
-#endif
-
-
-int verbose  = 0;
-int Makefile = 0;
-
-/*
- *  Transform Tabulators to Spaces using 'tabsize'
- *  Remove Ctrl-M, Spaces and Tabulators at the end of lines
- *  Stop file interpreting at Ctrl-Z
- *  Remove multiple linefeeds at the end of a file
- */
-
-size_t
-convert ( char* dst, const char* src, ssize_t ilen, unsigned int tabsize )
-{
-    char*         d;
-    const char*   srce;
-    unsigned int  col;
-    unsigned int  n;
-
-
-    for ( srce = src + ilen, d = dst, col = 0; src < srce; src++ ) {
-        switch ( *src ) {
-        case '\x1A':
-            srce = src;
-        case '\n':
-            while ( d > dst  &&  d[-1] == '\r' ) d--;
-            while ( d > dst  &&  d[-1] == ' '  ) d--;
-            *d++ = '\n';
-            col  = 0;
-            if (Makefile) {
-                if ( src[1] == ' '  ||  src[1] == '\t' ) {
-                    while ( src[1] == ' '  ||  src[1] == '\t' )
-                        src++;
-                    *d++ = '\t';
-                }
-            }
-            break;
-        case '\t':
-            n = tabsize - col % tabsize;
-            memset ( d, ' ', n );
-            d   += n;
-            col += n;
-            break;
-        default:
-            *d++ = *src;
-            col++;
-            break;
-        }
-    }
-    *d++ = '\n';
-
-    while ( d > dst  &&  d[-1] == '\n'  &&  d[-2] == '\n' ) d--;
-    if ( d-1 == dst  &&  d[-1] == '\n' ) d--;
-
-    return d - dst;
-}
-
-/*
- *  Transform a file in-place. To avoid data loss, it uses atomic overwrite of data.
- *  new file < old file:
- *    - rewind
- *    - write all new data with one atomic write
- *    - cut size to new size
- *  new file == old file:
- *    - rewind
- *    - write all new data with one atomic write
- *  new file > old file:
- *    - seek to end
- *    - append data, if it fails, cut size down to old size and exit
- *    - rewind
- *    - write all new data with one atomic write
- */
-
-int
-process ( const char* filename, unsigned int tabsize )
-{
-    static char  input  [4 * 1024 * 1024];
-    static char  output [4 * 1024 * 1024];
-    ssize_t      ilen;
-    ssize_t      olen;
-    ssize_t      owrite;
-    int          fd;
-    int          ret = 0;
-    const char*  msg = NULL;
-
-    fd = open ( filename, O_RDWR | O_BINARY );
-
-    if ( fd < 0 ) {
-        msg = "File can't be opened in Read/Write mode";
-        goto end;
-    }
-
-    ilen = read ( fd, input, sizeof input );
-    olen = convert ( output, input, ilen, tabsize );
-
-    if ( ilen >= sizeof input  ||  olen >= sizeof output ) {
-        msg = "File is too large for this convert program";
-        goto end;
-    }
-
-    if      ( olen < ilen ) {                                   // smaller
-        if ( 0 != lseek ( fd, 0L, SEEK_SET ) ) {
-            msg = "Lseek failed. File not modified";
-            goto end;
-        }
-        owrite = write ( fd, output, olen );                    // atomic overwrite
-        if ( owrite <= 0 ) {
-            msg = "Writing new file failed";
-            goto end;
-        }
-        if ( owrite != olen ) {
-            msg = "Writing new file incomplete. *** DATA LOSS *** ";
-            goto end;
-        }
-        ftruncate ( fd, olen );
-        if ( verbose )
-            fprintf ( stderr, "Converted '%s'\n", filename );
-        ret = 1;
-    }
-    else if ( olen > ilen ) {                                   // larger
-        if ( ilen != lseek ( fd, ilen, SEEK_SET ) ) {
-            msg = "Lseek failed. File not modified";
-            goto end;
-        }
-        owrite = write ( fd, output + ilen, olen - ilen );      // append
-        if ( owrite <= 0 ) {
-            msg = "Writing new file failed";
-            goto end;
-        }
-        if ( owrite != olen - ilen ) {
-            ftruncate ( fd, ilen );
-            msg = "Writing new file incomplete";
-            goto end;
-        }
-        if ( 0 != lseek ( fd, 0L, SEEK_SET ) ) {
-            msg = "Rewind failed. File not modified";
-            goto end;
-        }
-        owrite = write ( fd, output, olen );
-        if ( owrite <= 0 ) {
-            msg = "Writing new file failed";
-            goto end;
-        }
-        if ( owrite != olen ) {
-            msg = "Writing new file incomplete. *** DATA LOSS *** ";
-            goto end;
-        }
-        if ( verbose )
-            fprintf ( stderr, "Converted '%s'\n", filename );
-        ret = 1;
-    }
-    else if ( 0 != memcmp (input, output, ilen) ) {
-        if ( 0 != lseek ( fd, 0L, SEEK_SET ) ) {
-            msg = "Lseek failed. File not modified";
-            goto end;
-        }
-        owrite = write ( fd, output, olen );
-        if ( owrite <= 0 ) {
-            msg = "Writing new file failed";
-            goto end;
-        }
-        if ( olen !=  owrite ) {
-            msg = "Writing new file incomplete. *** DATA LOSS *** ";
-            goto end;
-        }
-        if ( verbose )
-            fprintf ( stderr, "Converted '%s'\n", filename );
-        ret = 1;
-    }
-
-end:
-    if ( fd >= 0 )
-        close (fd);
-    if ( msg != NULL ) {
-        fprintf ( stderr, msg );
-        fprintf ( stderr, ": %s  (%s)\n", filename, strerror (errno) );
-    }
-    return ret;
-}
-
-
-/*
- *  determine tab size (default: 8)
- *  do converting file for file
- */
-
-void mysetargv ( int* argc, char*** argv, const char** extentions );
-
-int complete_read ( int fd, void* ptr, size_t len )
-{
-    return read ( fd, ptr, len );
-}
-
-int
-main ( int argc, char** argv )
-{
-    unsigned int  tabsize = 8;
-    unsigned int  changed = 0;
-    static const char*  extentions [] = { ".c", ".cpp", ".h", ".hpp", ".htm", ".html", ".nas", ".inc", ".s", NULL };
-
-    if ( argv[1] != NULL  &&  argv[1][0] == '-'  &&  argv[1][1] == 'v'  &&  argv[1][2] == '\0' ) {
-        verbose = 1;
-        ++argv;
-        argc--;
-    }
-
-    if ( argv[1] != NULL  &&  argv[1][0] == '-'  &&  (unsigned int)(argv[1][1]-'0') < 10u ) {
-        tabsize = atoi ( *++argv + 1 );
-        argc--;
-    } else if ( argv[1] != NULL  &&  argv[1][0] == '+'  &&  (unsigned int)(argv[1][1]-'0') < 10u ) {
-        Makefile = 1;
-        tabsize = atoi ( *++argv + 1 );
-        argc--;
-    }
-
-    if ( argv[1] == NULL ) {
-        fprintf ( stderr, "usage: Remove.tab [-v] [-tabsize] file [file...]\n" );
-        fprintf ( stderr, "       Remove.tab [-v] +tabsize file [file...] for Makefile\n" );
-        return 1;
-    }
-
-    mysetargv ( &argc, &argv, extentions );
-
-    if ( verbose )
-        fprintf ( stderr, "Tabsize is %u.\n", tabsize );
-
-    while ( *++argv )
-        changed += process ( *argv, tabsize );
-
-    if ( changed )
-        fprintf ( stderr, "%u files modified.\n", changed );
-
-    return 0;
-}
-
-/* end of Remove.tab.c */
Index: penc/branches/zorg/Remove.tab.dsp
===================================================================
--- /mppenc/branches/zorg/Remove.tab.dsp	(revision 40)
+++ 	(revision )
@@ -1,104 +1,0 @@
-# Microsoft Developer Studio Project File - Name="Remove.tab" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=Remove.tab - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "Remove.tab.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "Remove.tab.mak" CFG="Remove.tab - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "Remove.tab - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "Remove.tab - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "Remove.tab - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "MPP_DECODER" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "Remove.tab - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "Remove.tab - Win32 Release"
-# Name "Remove.tab - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\_setargv.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\Remove.tab.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
Index: penc/branches/zorg/Remove.tab.vcproj
===================================================================
--- /mppenc/branches/zorg/Remove.tab.vcproj	(revision 40)
+++ 	(revision )
@@ -1,184 +1,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="Remove.tab"
-	SccProjectName=""
-	SccLocalPath="">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\Debug"
-			IntermediateDirectory=".\Debug"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Debug/Remove.tab.pch"
-				AssemblerListingLocation=".\Debug/"
-				ObjectFile=".\Debug/"
-				ProgramDataBaseFileName=".\Debug/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=".\Debug/Remove.tab.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile=".\Debug/Remove.tab.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Debug/Remove.tab.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\Release"
-			IntermediateDirectory=".\Release"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;MPP_DECODER"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Release/Remove.tab.pch"
-				AssemblerListingLocation=".\Release/"
-				ObjectFile=".\Release/"
-				ProgramDataBaseFileName=".\Release/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=".\Release/Remove.tab.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				ProgramDatabaseFile=".\Release/Remove.tab.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Release/Remove.tab.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
-			<File
-				RelativePath="_setargv.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="Remove.tab.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: penc/branches/zorg/SHOWDIFFS
===================================================================
--- /mppenc/branches/zorg/SHOWDIFFS	(revision 40)
+++ 	(revision )
@@ -1,45 +1,0 @@
-#! /bin/bash
-
-oldpath="$1"
-newpath="$2"
-
-
-if [ "${oldpath}" = "" -o "${newpath}" = "" ]; then
-    echo usage: $0  old_dir  new_dir
-    exit
-fi
-
-
-killall -9 mgdiff &> /dev/null
-echo
-diffcount=0
-
-
-for oldfile in "${oldpath}"/*; do
-
-    newfile="${newpath}/${oldfile##*/}"
-    
-    if [ "${oldfile##*.}" = "o" -o "${oldfile##*.}" = "lst" ]; then
-        echo "${oldfile} not compared, uninteresting"
-    elif [ ! -f "${oldfile}" -o ! -f ${newfile} ]; then
-        echo "${oldfile} or ${newfile} is not a regular file"
-    else
-        if ! diff -abB "${oldfile}" "${newfile}" &> /dev/null; then
-            echo "${oldfile}" and "${newfile}" are different
-            sleep $[diffcount*diffcount/2]
-            mgdiff "${oldfile}" "${newfile}" &
-            diffcount=$[diffcount+1]
-        fi
-    fi
-done
-
-
-echo
-if   [ "${diffcount}" = "0" ]; then
-    echo "no differences found"
-elif [ "${diffcount}" = "1" ]; then
-    echo "1 file is different"
-else
-    echo ${diffcount} "files are different"
-fi
-echo
Index: penc/branches/zorg/Summary
===================================================================
--- /mppenc/branches/zorg/Summary	(revision 40)
+++ 	(revision )
@@ -1,39 +1,0 @@
-                                Intel PII-300   AMD K6-2-315    AMD K6-2-315    AMD K6-2-315    AMD K6-2-315
-                                                (3DNow!)                        (3DNow!)        (3DNow!)
-                                gcc-2.95.2      gcc-2.95.2      gcc-2.95.2      gcc-2.95.2      gcc-2.95.2
-
-Synthese_Filter_16()            3,85 s          1,89 s 1)       7,52 s          1,80 s          1,70 s          1,96 s          1,67 s
-memmove()                       0,26 s          0,31 s          0,27 s          0,26 s          0,44 s          0,44 s          0,31 s
-Huffman_Decode()+_fast()        3,34 s          2,20 s          2,21 s          2,10 s          1,66 s          1,60 s          1,23 s
-Calculate_New_V()               1,51 s          3,62 s 2)       4,04 s          1,15 s          0,97 s          0,96 s          0,88 s
-Lese_Bitstrom_SV7()             2,22 s          1,41 s          1,44 s          1,45 s          1,59 s          1,47 s          1,50 s
-Requantisierung()               0,83 s          1,04 s          1,06 s          0,59 s          0,61 s          0,63 s          0,63 s
-Bitstream_read()                0,17 s          0,10 s          0,10 s          0,09 s          0,11 s          0,10 s          0,16 s
-
-TOTAL                           12,47 s         10,90 s         16,96 s         7,64 s          7,26 s          7,33 s          6,61 s
-
-1) Main functionality is branched out to a 3DNow!-Routine
-   this functionality has been sped up by the factor 8.
-2) Some floating-point-copying with the integer unit.
-
-
-
-
-------------------------------------------------------------------------------
-100.0%     2086.467117 ms   *** TOTAL ***                         [701.6 MHz]
- 27.92%     582.506630 ms   Lese_Bitstrom_SV7()                   decode.c:525
- 21.75%     453.756631 ms   Synthese_Filter_16_3DNow()             synth.c:378
- 20.63%     430.395686 ms   Huffman_Decode_fastest()              decode.c:229
- 15.77%     329.139172 ms   Synthese_Filter_16_3DNow()             synth.c:389
-  3.61%      75.252374 ms   Requantize_MidSideStereo()             tools.c:160
-  2.83%      59.118796 ms   Huffman_Decode()                      decode.c:146
-  2.05%      42.766131 ms   Bitstream_read1()                     decode.c:104
-  2.02%      42.195878 ms   Synthese_Filter_16_3DNow()             synth.c:383
-  1.46%      30.471017 ms   Read_LittleEndians()                   tools.c:101
-  0.75%      15.669079 ms   Bitstream_read()                      decode.c:74
-  0.55%      11.377206 ms   fwrite_with_test()                      wave.c:26
-  0.41%       8.509899 ms   Decode()                              mppdec.c:84
-  0.16%       3.266557 ms   DecodeFile()                          mppdec.c:277
-  0.05%       1.110525 ms   write_PCM_2x16bit()                     wave.c:169
-  0.04%       0.931536 ms   main()                                mppdec.c:455
-------------------------------------------------------------------------------
Index: penc/branches/zorg/_setargv.c
===================================================================
--- /mppenc/branches/zorg/_setargv.c	(revision 40)
+++ 	(revision )
@@ -1,330 +1,0 @@
-/*
- * Musepack audio compression
- * Copyright (C) 1999-2004 Buschmann/Klemm/Piecha/Wolf
- *
- * 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.1 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
- */
-
-#include "mppdec.h"
-
-#ifndef _WIN32
-# include <sys/types.h>
-# include <sys/stat.h>
-# include <unistd.h>
-# include <dirent.h>
-# include <ctype.h>
-#else
-# include <stdlib.h>
-#endif
-
-/*
- *  Function type which is called by treewalk.
- *  The function gets the next filename and an auxiliary pointer.
- *  The function and the auxillary pointer are the last two parameters
- *  of treewalk. The function do the desired stuff and often you
- *  need a context for this function and for that this pointer can be used.
- */
-
-typedef int (*leaffn) ( const char* filename, void* aux );
-
-
-/*
- *  Array structure:
- *      length:  maximum number of elements you can store in the structure
- *      elems:   actual number of elements stored in the structure (elem <= length)
- *      array:   elements stored in the structure
- */
-
-typedef struct {
-    size_t    length;
-    size_t    elems;
-    char**    array;
-} argc_t;
-
-
-/*
- *  Check the 'filename' for the extention 'ext'.
- *  Returns 1 if filename has this extention, otherwise 0.
- *  Allowed wildcard in ext is currently the '?'.
- */
-
-static int
-extcompare ( const char* filename, const char* ext )
-{
-    if ( strlen (filename) < strlen (ext) )
-        return 0;
-
-    filename += strlen (filename) - strlen (ext);
-    for ( ; *ext; ext++, filename++ ) {
-        if ( *ext != '?' )
-            if ( *ext != *filename )
-                return 0;
-    }
-    return 1;
-}
-
-
-/*
- *  Walk trough a tree starting with 'start', searching for files with the extensions
- *  mask[0], mask[1], ... (NULL terminated list of extensions containing the ".").
- *  For each file 'f' is called with the filename and the parameter 'aux'.
- */
-
-#ifdef _WIN32
-
-long
-treewalk ( const char* start, const char** mask, leaffn f, void* aux )
-{
-    struct _finddata_t  fileinfo;
-    long                handle;
-    char                all [4096];
-    int                 i;
-    long                ret = 0;
-    const char*         name;
-    int                 path_len = strlen (start);
-
-    if ( path_len > 0  &&  start[path_len-1] == PATH_SEP )
-        path_len--;
-
-    sprintf ( all, "%.*s%c*", path_len, start, PATH_SEP );
-    if ( ( handle = _findfirst ( all, &fileinfo ) ) < 0 )
-        return 0;
-
-    do {
-        name = fileinfo.name;
-        sprintf ( all, "%.*s%c%s", path_len, start, PATH_SEP, name );
-        if ( ( fileinfo.attrib & _A_SUBDIR ) == 0 ) {   // file
-            for ( i = 0; mask[i]; i++ )
-                if ( extcompare (name, mask[i] ) ) {
-                    f (all, aux);
-                    ret++;
-                    break;
-                }
-        }
-        else {                                          // subdir
-            if ( 0 != strcmp (name, "." )  &&  0 != strcmp (name, "..") ) {
-                ret += treewalk ( all, mask, f, aux );
-            }
-        }
-
-    } while ( 0 == _findnext ( handle, &fileinfo) );
-
-    _findclose (handle);
-    return ret;
-}
-
-#else
-
-long
-treewalk ( const char* start, const char** mask, leaffn f, void* aux )
-{
-    DIR*                handle;
-    struct dirent*      de;
-    struct stat         b;
-    char                all [4096];
-    int                 i;
-    long                ret = 0;
-    const char*         name;
-    int                 path_len = strlen (start);
-
-    if ( path_len > 0  &&  start[path_len-1] == PATH_SEP )
-        path_len--;
-
-    if ( ( handle = opendir (start) ) == NULL )
-         return 0;
-
-    while ( NULL != ( de = readdir (handle) ) ) {
-        name = de -> d_name;
-        sprintf ( all, "%.*s%c%s", path_len, start, PATH_SEP, name );
-
-        if ( stat ( all, &b ) != 0 )
-            continue;
-
-        if     ( S_ISREG (b.st_mode) ) {                // file
-            for ( i = 0; mask[i]; i++ )
-                if ( extcompare (name, mask[i] ) ) {
-                    f (all, aux);
-                    ret++;
-                    break;
-                }
-        }
-        else if ( S_ISDIR (b.st_mode) ) {               // dir
-            if ( 0 != strcmp (name, "." )  &&  0 != strcmp (name, "..") ) {
-                ret += treewalk ( all, mask, f, aux );
-            }
-        }
-    }
-
-    closedir (handle);
-    return ret;
-}
-
-#endif
-
-/*
- *  A leaffn used by mysetargv(). aux is used as pointer to a argc_t structure,
- *  which is used for collecting all filenames in a list.
- */
-
-static int
-add_elem ( const char* filename, void* aux )
-{
-    argc_t*  p = (argc_t*) aux;
-
-    if ( p->elems >= p->length ) {
-        p->length += p->length / 2 + 512;
-        p->array = realloc ( p->array, sizeof(char*) * p->length );
-    }
-
-    p->array [p->elems++] = filename  ?  strdup (filename)  :  NULL;
-    // printf ("%s\n", filename );
-    return 0;
-}
-
-/*
- *  Used by mysetargv to sort files by the filename in ascending order.
- */
-
-static int Cdecl
-comparefilename ( const void* p1, const void* p2 )
-{
-    return strcmp ( *(const char**)p1, *(const char**)p2 );
-}
-
-
-/*
- * Other playlist formats I found:
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *  *.txt
- *    |Location|Name|Artist|Album|Length|Genre|Year|Type|Size|Comment|Bitrate|Track #|Date|Custom 1|Custom 2|Custom 3|
- *    |D:\Audio\Video Streams\A Bug's Life.avi|A Bug's Life|||01:31:02|||avi|647.391MB||||7/3/2001 9:21:18 AM||||
- *
- * *.mpl:
- *    <Item Location="D:\Audio\Bohinta\[08] broken_one.mp3" Type="mp3">
- *
- * *.htm*:
- *    <TD ALIGN="left" ><FONT SIZE="2" COLOR="#000000" FACE="Arial">D:\Audio\Bohinta\[09] lament.mp3</FONT></TD>
- *
- */
-
-
-/*
- *  Read out all files in an M3U file.
- *  Relative file names are converted to absolute filenames
- *  using the path of the M3U file.
- *  'f' and 'aux' have the same meaning as in treewalk.
- *  'fp' is a descriptor to the source file, name is its name
- *  (used for converting relative to absolute file names).
- */
-
-static void
-readm3u ( FILE_T fp, const char* name, leaffn f, void* aux )
-{
-    unsigned char   ch;
-    unsigned char*  p;
-    unsigned char*  q = strrchr ( name, PATH_SEP );
-    unsigned char   buff [4096];
-
-    if (q == NULL) {
-        q = buff;
-    } else {
-        memcpy ( buff, name, (char*)q-(char*)name+1 );
-        q = buff + ((char*)q-(char*)name+1);
-    }
-
-    while ( 1 == READ1 (fp, &ch) ) {
-        if ( ch != '#'  &&  ch >= ' ' ) {
-            p = q;
-            do {
-                *p++ = ch;
-                if ( 1 != READ1 (fp, &ch)  ||  ch < ' ' )
-                    break;
-            } while (1);
-
-            *p = '\0';
-            if ( q[1] == DRIVE_SEP  ||  q[0] == PATH_SEP )              // This is a disgusting hack
-                f (q, aux );
-            else
-                f (buff, aux);
-        }
-
-        while ( ch != '\n' )
-            if ( 1 != READ1 (fp, &ch) )
-                return;
-    }
-}
-
-
-/*
- *  mysetargv() is the interface function for this module.
- *  You give the original _argv[_argc] list and a list of allowed file
- *  extensions for the directory search (this is a NULL terminated
- *  list of file extensions including the dot ".").
- *
- *  The function generates a new _argv[_argc] list and stores its
- *  parameters back to callers variables.
- *  Normal files are simply copied to the new list, files ending
- *  with the directory separator ("/" or "\") will be treated as
- *  directory trees and all files with allowed extensions are
- *  added to the list (instead of the directory). Files ending with
- *  ".m3u" will be read and the contents are added to the list.
- *
- *  What do not work?
- *     - m3u files inside an m3u file
- *     - playlist files in *.txt format
- *     - playlist files in *.mpl format
- *     - playlist files in *.htm/*.html format
- */
-
-void
-mysetargv ( int* _argc, char*** _argv, const char** extentions )
-{
-    const char*  m3u = ".m3u";
-    argc_t       arg;
-    char*        p;
-    int          i;
-    size_t       j;
-    FILE_T       fp;
-
-    arg.length = 0;
-    arg.elems  = 0;
-    arg.array  = NULL;
-
-    for ( i = 0; i < *_argc; i++ ) {
-        p = (*_argv) [i];
-        if ( strlen(p) >= strlen(m3u)  &&  0 == strcasecmp (p+strlen(p)-strlen(m3u), m3u) ) {
-            fp = OPEN (p);
-            readm3u ( fp, p, add_elem, &arg );
-            CLOSE (fp);
-        }
-        else if ( p[0] == '\0'  ||  p[strlen(p)-1] != PATH_SEP ) {
-            add_elem ( p, &arg );
-        }
-        else {
-            j = arg.elems;
-            treewalk ( p, extentions, add_elem, &arg );
-            qsort ( arg.array + j, arg.elems - j, sizeof(char*), comparefilename );
-        }
-    }
-
-    add_elem ( NULL, &arg );
-    arg.array = realloc ( arg.array, sizeof(char*) * arg.elems );
-
-    *_argc = arg.elems - 1;
-    *_argv = arg.array;
-    return;
-}
-
-/* end of _setargv.c */
Index: penc/branches/zorg/aaa.c
===================================================================
--- /mppenc/branches/zorg/aaa.c	(revision 40)
+++ 	(revision )
@@ -1,79 +1,0 @@
-#include <stdio.h>
-#include <math.h>
-
-#define QUANT   256
-
-double  A  [18] [QUANT];
-long    B  [18] [QUANT];
-double  C  [18] [QUANT];
-double  AA [18];
-long    BB [18];
-
-/*
- 1[  0]:     0.841315 (   8)
- 1[  5]:     0.603536 (   1)
- 1[  6]:     0.697221 (   1)
- 1[  8]:     0.777310 (   1)
-
-*/
-
-int
-main ( void )
-{
-    int     i, j;
-    char    buff [256];
-    int     res, eff, events;
-    double  mult;
-    double  D;
-
-    while ( gets ( buff ) ) {
-        if ( 4 == sscanf ( buff, "%u[%u]: %lf (%u)", &res, &eff, &mult, &events )   &&  mult >= 0.01  &&  mult <= 100. ) {
-            A  [res] [eff] += events * mult;
-            B  [res] [eff] += events;
-            AA [res]       += events * mult;
-            BB [res]       += events;
-        }
-    }
-
-    for ( i = 1; i < 18; i++ )
-        for ( j = 0; j < QUANT; j++ )
-            if ( B [i] [j] )
-                printf ( "%2u[%3u]: %8.6f (%8lu)\n", i, j, A[i][j]/B[i][j], B[i][j] );
-
-    for ( i = 1; i < 18; i++ )
-        if ( BB [i] )
-            printf ( "%2u: %8.6f (%8lu)\n", i, AA[i]/BB[i], BB[i] );
-
-    for ( i = 0; i < 18; i++ ) {
-        D = B[i][24] ? A[i][24]/B[i][24] : 1.;
-        for ( j = 24; j < QUANT; j++ ) {
-            if ( B [i] [j] ) {
-                mult = sqrt( B[i][j]);        // 0 .... thousand
-                mult = (mult-1) / ( mult );
-                D = D * (1-mult) + A[i][j]/B[i][j] * mult;
-            }
-            C [i][j] = D;
-        }
-        D = B[i][24] ? A[i][24]/B[i][24] : 1.;
-        for ( j = 24; j >= 0; j-- ) {
-            if ( B [i] [j] ) {
-                mult = sqrt( B[i][j]);        // 0 .... thousand
-                mult = (mult-1) / ( mult );
-                D = D * (1-mult) + A[i][j]/B[i][j] * mult;
-            }
-            C [i][j] = D;
-        }
-    }
-
-    for ( i = 0; i < 18; i++ ) {
-        printf ( "    { ");
-        for ( j = 0; j < QUANT; j++ )
-            printf ( "%8.6f, ", C[i][j] );
-        printf ( "},\n" );
-    }
-
-    for ( i = 0; i < 18; i++ )
-        printf ( "    %8.6f,\n", BB[i] ? AA[i]/BB[i] : 1. );
-
-    return 0;
-}
Index: penc/branches/zorg/analy_filter-old.c
===================================================================
--- /mppenc/branches/zorg/analy_filter-old.c	(revision 40)
+++ 	(revision )
@@ -1,272 +1,0 @@
-#include "mppenc.h"
-
-
-/* C O N S T A N T S */
-/*
-for (i=0; i<32; ++i)
-{
-    for (k=0; k<32; ++k) {
-        Mi[i][k] = (float)(cos( (2*i+1)*k*M_PI/64 ));
-    }
-}
-*/
-// Mi[32][32] = Mi[i][k] being mapped onto M[1024] = M[i*32+k]
-static const float M[1024] = {
-    1.0000000000000000f, 0.9987954497337341f, 0.9951847195625305f, 0.9891765099647810f, 0.9807852506637573f, 0.9700312614440918f, 0.9569403529167175f, 0.9415440651830208f, 0.9238795042037964f, 0.9039893150329590f, 0.8819212913513184f, 0.8577286100002721f, 0.8314695954322815f, 0.8032075166702271f, 0.7730104327201843f, 0.7409511253549591f, 0.7071067690849304f, 0.6715589761734009f, 0.6343932747840881f, 0.5956993044924335f, 0.5555702447891235f, 0.5141027569770813f, 0.4713967442512512f, 0.4275550934302822f, 0.3826834261417389f, 0.3368898630142212f, 0.2902846634387970f, 0.2429801799032640f, 0.1950903236865997f, 0.1467304676771164f, 0.0980171412229538f, 0.0490676743274181f,
-    1.0000000000000000f, 0.9891765117645264f, 0.9569403529167175f, 0.9039892931234433f, 0.8314695954322815f, 0.7409511208534241f, 0.6343932747840881f, 0.5141027441932217f, 0.3826834261417389f, 0.2429801821708679f, 0.0980171412229538f,-0.0490676743274180f,-0.1950903236865997f,-0.3368898630142212f,-0.4713967442512512f,-0.5956993044924334f,-0.7071067690849304f,-0.8032075166702271f,-0.8819212913513184f,-0.9415440651830207f,-0.9807852506637573f,-0.9987954497337341f,-0.9951847195625305f,-0.9700312531945440f,-0.9238795042037964f,-0.8577286005020142f,-0.7730104327201843f,-0.6715589548470187f,-0.5555702447891235f,-0.4275550842285156f,-0.2902846634387970f,-0.1467304744553623f,
-    1.0000000000000000f, 0.9700312614440918f, 0.8819212913513184f, 0.7409511253549591f, 0.5555702447891235f, 0.3368898630142212f, 0.0980171412229538f,-0.1467304744553616f,-0.3826834261417389f,-0.5956993103027344f,-0.7730104327201843f,-0.9039892931234433f,-0.9807852506637573f,-0.9987954497337341f,-0.9569403529167175f,-0.8577286100002721f,-0.7071067690849304f,-0.5141027569770813f,-0.2902846634387970f,-0.0490676743274180f, 0.1950903236865997f, 0.4275550842285156f, 0.6343932747840881f, 0.8032075314806451f, 0.9238795042037964f, 0.9891765117645264f, 0.9951847195625305f, 0.9415440651830209f, 0.8314695954322815f, 0.6715589761734009f, 0.4713967442512512f, 0.2429801799032642f,
-    1.0000000000000000f, 0.9415440559387207f, 0.7730104327201843f, 0.5141027441932217f, 0.1950903236865997f,-0.1467304676771164f,-0.4713967442512512f,-0.7409511253549589f,-0.9238795042037964f,-0.9987954497337341f,-0.9569403529167175f,-0.8032075314806449f,-0.5555702447891235f,-0.2429801821708679f, 0.0980171412229538f, 0.4275550934302821f, 0.7071067690849304f, 0.9039893150329590f, 0.9951847195625305f, 0.9700312531945441f, 0.8314695954322815f, 0.5956993103027344f, 0.2902846634387970f,-0.0490676743274175f,-0.3826834261417389f,-0.6715589761734009f,-0.8819212913513184f,-0.9891765099647810f,-0.9807852506637573f,-0.8577286005020142f,-0.6343932747840881f,-0.3368898533922210f,
-    1.0000000000000000f, 0.9039893150329590f, 0.6343932747840881f, 0.2429801799032640f,-0.1950903236865997f,-0.5956993103027344f,-0.8819212913513184f,-0.9987954562051724f,-0.9238795042037964f,-0.6715589761734009f,-0.2902846634387970f, 0.1467304744553619f, 0.5555702447891235f, 0.8577286005020142f, 0.9951847195625305f, 0.9415440651830209f, 0.7071067690849304f, 0.3368898630142212f,-0.0980171412229538f,-0.5141027441932214f,-0.8314695954322815f,-0.9891765117645264f,-0.9569403529167175f,-0.7409511253549599f,-0.3826834261417389f, 0.0490676760673523f, 0.4713967442512512f, 0.8032075314806448f, 0.9807852506637573f, 0.9700312614440918f, 0.7730104327201843f, 0.4275550934302828f,
-    1.0000000000000000f, 0.8577286005020142f, 0.4713967442512512f,-0.0490676743274180f,-0.5555702447891235f,-0.9039893150329590f,-0.9951847195625305f,-0.8032075314806449f,-0.3826834261417389f, 0.1467304676771164f, 0.6343932747840881f, 0.9415440651830208f, 0.9807852506637573f, 0.7409511208534241f, 0.2902846634387970f,-0.2429801799032628f,-0.7071067690849304f,-0.9700312614440918f,-0.9569403529167175f,-0.6715589548470181f,-0.1950903236865997f, 0.3368898630142212f, 0.7730104327201843f, 0.9891765099647810f, 0.9238795042037964f, 0.5956993103027344f, 0.0980171412229538f,-0.4275550934302818f,-0.8314695954322815f,-0.9987954497337341f,-0.8819212913513184f,-0.5141027441932238f,
-    1.0000000000000000f, 0.8032075166702271f, 0.2902846634387970f,-0.3368898533922199f,-0.8314695954322815f,-0.9987954497337341f,-0.7730104327201843f,-0.2429801799032641f, 0.3826834261417389f, 0.8577286005020142f, 0.9951847195625305f, 0.7409511253549592f, 0.1950903236865997f,-0.4275550842285156f,-0.8819212913513184f,-0.9891765099647811f,-0.7071067690849304f,-0.1467304676771164f, 0.4713967442512512f, 0.9039892931234430f, 0.9807852506637573f, 0.6715589761734009f, 0.0980171412229538f,-0.5141027441932212f,-0.9238795042037964f,-0.9700312614440918f,-0.6343932747840881f,-0.0490676743274185f, 0.5555702447891235f, 0.9415440559387207f, 0.9569403529167175f, 0.5956993044924350f,
-    1.0000000000000000f, 0.7409511208534241f, 0.0980171412229538f,-0.5956993044924334f,-0.9807852506637573f,-0.8577286005020142f,-0.2902846634387970f, 0.4275550934302821f, 0.9238795042037964f, 0.9415440559387207f, 0.4713967442512512f,-0.2429801799032628f,-0.8314695954322815f,-0.9891765117645264f,-0.6343932747840881f, 0.0490676743274174f, 0.7071067690849304f, 0.9987954497337341f, 0.7730104327201843f, 0.1467304744553618f,-0.5555702447891235f,-0.9700312614440918f,-0.8819212913513184f,-0.3368898533922196f, 0.3826834261417389f, 0.9039893150329590f, 0.9569403529167175f, 0.5141027441932239f,-0.1950903236865997f,-0.8032075166702271f,-0.9951847195625305f,-0.6715589548470199f,
-    1.0000000000000000f, 0.6715589761734009f,-0.0980171412229538f,-0.8032075314806448f,-0.9807852506637573f,-0.5141027569770813f, 0.2902846634387970f, 0.9039892931234431f, 0.9238795042037964f, 0.3368898630142212f,-0.4713967442512512f,-0.9700312531945441f,-0.8314695954322815f,-0.1467304676771164f, 0.6343932747840881f, 0.9987954562051724f, 0.7071067690849304f,-0.0490676760673523f,-0.7730104327201843f,-0.9891765099647811f,-0.5555702447891235f, 0.2429801821708679f, 0.8819212913513184f, 0.9415440651830208f, 0.3826834261417389f,-0.4275550842285156f,-0.9569403529167175f,-0.8577286100002726f,-0.1950903236865997f, 0.5956993103027344f, 0.9951847195625305f, 0.7409511253549602f,
-    1.0000000000000000f, 0.5956993103027344f,-0.2902846634387970f,-0.9415440651830207f,-0.8314695954322815f,-0.0490676760673523f, 0.7730104327201843f, 0.9700312531945441f, 0.3826834261417389f,-0.5141027569770813f,-0.9951847195625305f,-0.6715589548470181f, 0.1950903236865997f, 0.9039893150329590f, 0.8819212913513184f, 0.1467304744553618f,-0.7071067690849304f,-0.9891765117645264f,-0.4713967442512512f, 0.4275550934302801f, 0.9807852506637573f, 0.7409511208534241f,-0.0980171412229538f,-0.8577286100002717f,-0.9238795042037964f,-0.2429801821708679f, 0.6343932747840881f, 0.9987954562051724f, 0.5555702447891235f,-0.3368898630142212f,-0.9569403529167175f,-0.8032075314806458f,
-    1.0000000000000000f, 0.5141027569770813f,-0.4713967442512512f,-0.9987954562051724f,-0.5555702447891235f, 0.4275550842285156f, 0.9951847195625305f, 0.5956993044924333f,-0.3826834261417389f,-0.9891765117645264f,-0.6343932747840881f, 0.3368898533922202f, 0.9807852506637573f, 0.6715589761734009f,-0.2902846634387970f,-0.9700312531945441f,-0.7071067690849304f, 0.2429801821708679f, 0.9569403529167175f, 0.7409511253549601f,-0.1950903236865997f,-0.9415440559387207f,-0.7730104327201843f, 0.1467304744553603f, 0.9238795042037964f, 0.8032075166702271f,-0.0980171412229538f,-0.9039892931234428f,-0.8314695954322815f, 0.0490676760673523f, 0.8819212913513184f, 0.8577286100002728f,
-    1.0000000000000000f, 0.4275550842285156f,-0.6343932747840881f,-0.9700312531945440f,-0.1950903236865997f, 0.8032075166702271f, 0.8819212913513184f,-0.0490676743274175f,-0.9238795042037964f,-0.7409511208534241f, 0.2902846634387970f, 0.9891765099647810f, 0.5555702447891235f,-0.5141027569770813f,-0.9951847195625305f,-0.3368898533922196f, 0.7071067690849304f, 0.9415440559387207f, 0.0980171412229538f,-0.8577286100002717f,-0.8314695954322815f, 0.1467304676771164f, 0.9569403529167175f, 0.6715589548470199f,-0.3826834261417389f,-0.9987954497337341f,-0.4713967442512512f, 0.5956993044924335f, 0.9807852506637573f, 0.2429801821708679f,-0.7730104327201843f,-0.9039892931234438f,
-    1.0000000000000000f, 0.3368898630142212f,-0.7730104327201843f,-0.8577286100002721f, 0.1950903236865997f, 0.9891765117645264f, 0.4713967442512512f,-0.6715589548470177f,-0.9238795042037964f, 0.0490676760673523f, 0.9569403529167175f, 0.5956993044924335f,-0.5555702447891235f,-0.9700312614440918f,-0.0980171412229538f, 0.9039892931234429f, 0.7071067690849304f,-0.4275550842285156f,-0.9951847195625305f,-0.2429801799032640f, 0.8314695954322815f, 0.8032075166702271f,-0.2902846634387970f,-0.9987954562051723f,-0.3826834261417389f, 0.7409511208534241f, 0.8819212913513184f,-0.1467304744553635f,-0.9807852506637573f,-0.5141027569770813f, 0.6343932747840881f, 0.9415440651830210f,
-    1.0000000000000000f, 0.2429801821708679f,-0.8819212913513184f,-0.6715589548470187f, 0.5555702447891235f, 0.9415440559387207f,-0.0980171412229538f,-0.9891765099647810f,-0.3826834261417389f, 0.8032075166702271f, 0.7730104327201843f,-0.4275550934302818f,-0.9807852506637573f,-0.0490676760673523f, 0.9569403529167175f, 0.5141027441932239f,-0.7071067690849304f,-0.8577286005020142f, 0.2902846634387970f, 0.9987954562051724f, 0.1950903236865997f,-0.9039893150329590f,-0.6343932747840881f, 0.5956993044924335f, 0.9238795042037964f,-0.1467304676771164f,-0.9951847195625305f,-0.3368898533922236f, 0.8314695954322815f, 0.7409511208534241f,-0.4713967442512512f,-0.9700312531945442f,
-    1.0000000000000000f, 0.1467304676771164f,-0.9569403529167175f,-0.4275550934302825f, 0.8314695954322815f, 0.6715589761734009f,-0.6343932747840881f,-0.8577286100002723f, 0.3826834261417389f, 0.9700312614440918f,-0.0980171412229538f,-0.9987954562051724f,-0.1950903236865997f, 0.9415440559387207f, 0.4713967442512512f,-0.8032075314806446f,-0.7071067690849304f, 0.5956993103027344f, 0.8819212913513184f,-0.3368898533922179f,-0.9807852506637573f, 0.0490676760673523f, 0.9951847195625305f, 0.2429801799032678f,-0.9238795042037964f,-0.5141027569770813f, 0.7730104327201843f, 0.7409511253549606f,-0.5555702447891235f,-0.9039893150329590f, 0.2902846634387970f, 0.9891765099647810f,
-    1.0000000000000000f, 0.0490676760673523f,-0.9951847195625305f,-0.1467304744553623f, 0.9807852506637573f, 0.2429801821708679f,-0.9569403529167175f,-0.3368898533922210f, 0.9238795042037964f, 0.4275550842285156f,-0.8819212913513184f,-0.5141027441932238f, 0.8314695954322815f, 0.5956993103027344f,-0.7730104327201843f,-0.6715589548470199f, 0.7071067690849304f, 0.7409511208534241f,-0.6343932747840881f,-0.8032075314806458f, 0.5555702447891235f, 0.8577286005020142f,-0.4713967442512512f,-0.9039892931234438f, 0.3826834261417389f, 0.9415440559387207f,-0.2902846634387970f,-0.9700312531945442f, 0.1950903236865997f, 0.9891765117645264f,-0.0980171412229538f,-0.9987954562051724f,
-    1.0000000000000000f,-0.0490676760673523f,-0.9951847195625305f, 0.1467304744553619f, 0.9807852506637573f,-0.2429801821708679f,-0.9569403529167175f, 0.3368898533922202f, 0.9238795042037964f,-0.4275550842285156f,-0.8819212913513184f, 0.5141027441932227f, 0.8314695954322815f,-0.5956993103027344f,-0.7730104327201843f, 0.6715589548470184f, 0.7071067690849304f,-0.7409511208534241f,-0.6343932747840881f, 0.8032075314806444f, 0.5555702447891235f,-0.8577286005020142f,-0.4713967442512512f, 0.9039892931234441f, 0.3826834261417389f,-0.9415440559387207f,-0.2902846634387970f, 0.9700312531945442f, 0.1950903236865997f,-0.9891765117645264f,-0.0980171412229538f, 0.9987954562051724f,
-    1.0000000000000000f,-0.1467304676771164f,-0.9569403529167175f, 0.4275550934302821f, 0.8314695954322815f,-0.6715589761734009f,-0.6343932747840881f, 0.8577286100002719f, 0.3826834261417389f,-0.9700312614440918f,-0.0980171412229538f, 0.9987954562051724f,-0.1950903236865997f,-0.9415440559387207f, 0.4713967442512512f, 0.8032075314806457f,-0.7071067690849304f,-0.5956993103027344f, 0.8819212913513184f, 0.3368898533922202f,-0.9807852506637573f,-0.0490676760673523f, 0.9951847195625305f,-0.2429801799032616f,-0.9238795042037964f, 0.5141027569770813f, 0.7730104327201843f,-0.7409511253549560f,-0.5555702447891235f, 0.9039893150329590f, 0.2902846634387970f,-0.9891765099647810f,
-    1.0000000000000000f,-0.2429801821708679f,-0.8819212913513184f, 0.6715589548470183f, 0.5555702447891235f,-0.9415440559387207f,-0.0980171412229538f, 0.9891765099647811f,-0.3826834261417389f,-0.8032075166702271f, 0.7730104327201843f, 0.4275550934302814f,-0.9807852506637573f, 0.0490676760673523f, 0.9569403529167175f,-0.5141027441932223f,-0.7071067690849304f, 0.8577286005020142f, 0.2902846634387970f,-0.9987954562051723f, 0.1950903236865997f, 0.9039893150329590f,-0.6343932747840881f,-0.5956993044924329f, 0.9238795042037964f, 0.1467304676771164f,-0.9951847195625305f, 0.3368898533922172f, 0.8314695954322815f,-0.7409511208534241f,-0.4713967442512512f, 0.9700312531945441f,
-    1.0000000000000000f,-0.3368898630142212f,-0.7730104327201843f, 0.8577286100002720f, 0.1950903236865997f,-0.9891765117645264f, 0.4713967442512512f, 0.6715589548470182f,-0.9238795042037964f,-0.0490676760673523f, 0.9569403529167175f,-0.5956993044924338f,-0.5555702447891235f, 0.9700312614440918f,-0.0980171412229538f,-0.9039892931234437f, 0.7071067690849304f, 0.4275550842285156f,-0.9951847195625305f, 0.2429801799032652f, 0.8314695954322815f,-0.8032075166702271f,-0.2902846634387970f, 0.9987954562051726f,-0.3826834261417389f,-0.7409511208534241f, 0.8819212913513184f, 0.1467304744553633f,-0.9807852506637573f, 0.5141027569770813f, 0.6343932747840881f,-0.9415440651830210f,
-    1.0000000000000000f,-0.4275550842285156f,-0.6343932747840881f, 0.9700312531945440f,-0.1950903236865997f,-0.8032075166702271f, 0.8819212913513184f, 0.0490676743274184f,-0.9238795042037964f, 0.7409511208534241f, 0.2902846634387970f,-0.9891765099647809f, 0.5555702447891235f, 0.5141027569770813f,-0.9951847195625305f, 0.3368898533922178f, 0.7071067690849304f,-0.9415440559387207f, 0.0980171412229538f, 0.8577286100002729f,-0.8314695954322815f,-0.1467304676771164f, 0.9569403529167175f,-0.6715589548470179f,-0.3826834261417389f, 0.9987954497337341f,-0.4713967442512512f,-0.5956993044924334f, 0.9807852506637573f,-0.2429801821708679f,-0.7730104327201843f, 0.9039892931234437f,
-    1.0000000000000000f,-0.5141027569770813f,-0.4713967442512512f, 0.9987954562051724f,-0.5555702447891235f,-0.4275550842285156f, 0.9951847195625305f,-0.5956993044924326f,-0.3826834261417389f, 0.9891765117645264f,-0.6343932747840881f,-0.3368898533922198f, 0.9807852506637573f,-0.6715589761734009f,-0.2902846634387970f, 0.9700312531945441f,-0.7071067690849304f,-0.2429801821708679f, 0.9569403529167175f,-0.7409511253549561f,-0.1950903236865997f, 0.9415440559387207f,-0.7730104327201843f,-0.1467304744553666f, 0.9238795042037964f,-0.8032075166702271f,-0.0980171412229538f, 0.9039892931234457f,-0.8314695954322815f,-0.0490676760673523f, 0.8819212913513184f,-0.8577286100002726f,
-    1.0000000000000000f,-0.5956993103027344f,-0.2902846634387970f, 0.9415440651830209f,-0.8314695954322815f, 0.0490676760673523f, 0.7730104327201843f,-0.9700312531945441f, 0.3826834261417389f, 0.5141027569770813f,-0.9951847195625305f, 0.6715589548470184f, 0.1950903236865997f,-0.9039893150329590f, 0.8819212913513184f,-0.1467304744553635f,-0.7071067690849304f, 0.9891765117645264f,-0.4713967442512512f,-0.4275550934302822f, 0.9807852506637573f,-0.7409511208534241f,-0.0980171412229538f, 0.8577286100002731f,-0.9238795042037964f, 0.2429801821708679f, 0.6343932747840881f,-0.9987954562051722f, 0.5555702447891235f, 0.3368898630142212f,-0.9569403529167175f, 0.8032075314806414f,
-    1.0000000000000000f,-0.6715589761734009f,-0.0980171412229538f, 0.8032075314806453f,-0.9807852506637573f, 0.5141027569770813f, 0.2902846634387970f,-0.9039892931234435f, 0.9238795042037964f,-0.3368898630142212f,-0.4713967442512512f, 0.9700312531945440f,-0.8314695954322815f, 0.1467304676771164f, 0.6343932747840881f,-0.9987954562051724f, 0.7071067690849304f, 0.0490676760673523f,-0.7730104327201843f, 0.9891765099647806f,-0.5555702447891235f,-0.2429801821708679f, 0.8819212913513184f,-0.9415440651830210f, 0.3826834261417389f, 0.4275550842285156f,-0.9569403529167175f, 0.8577286100002709f,-0.1950903236865997f,-0.5956993103027344f, 0.9951847195625305f,-0.7409511253549601f,
-    1.0000000000000000f,-0.7409511208534241f, 0.0980171412229538f, 0.5956993044924333f,-0.9807852506637573f, 0.8577286005020142f,-0.2902846634387970f,-0.4275550934302813f, 0.9238795042037964f,-0.9415440559387207f, 0.4713967442512512f, 0.2429801799032641f,-0.8314695954322815f, 0.9891765117645264f,-0.6343932747840881f,-0.0490676743274193f, 0.7071067690849304f,-0.9987954497337341f, 0.7730104327201843f,-0.1467304744553630f,-0.5555702447891235f, 0.9700312614440918f,-0.8819212913513184f, 0.3368898533922169f, 0.3826834261417389f,-0.9039893150329590f, 0.9569403529167175f,-0.5141027441932149f,-0.1950903236865997f, 0.8032075166702271f,-0.9951847195625305f, 0.6715589548470144f,
-    1.0000000000000000f,-0.8032075166702271f, 0.2902846634387970f, 0.3368898533922201f,-0.8314695954322815f, 0.9987954497337341f,-0.7730104327201843f, 0.2429801799032624f, 0.3826834261417389f,-0.8577286005020142f, 0.9951847195625305f,-0.7409511253549589f, 0.1950903236865997f, 0.4275550842285156f,-0.8819212913513184f, 0.9891765099647806f,-0.7071067690849304f, 0.1467304676771164f, 0.4713967442512512f,-0.9039892931234440f, 0.9807852506637573f,-0.6715589761734009f, 0.0980171412229538f, 0.5141027441932221f,-0.9238795042037964f, 0.9700312614440918f,-0.6343932747840881f, 0.0490676743274188f, 0.5555702447891235f,-0.9415440559387207f, 0.9569403529167175f,-0.5956993044924349f,
-    1.0000000000000000f,-0.8577286005020142f, 0.4713967442512512f, 0.0490676743274182f,-0.5555702447891235f, 0.9039893150329590f,-0.9951847195625305f, 0.8032075314806447f,-0.3826834261417389f,-0.1467304676771164f, 0.6343932747840881f,-0.9415440651830209f, 0.9807852506637573f,-0.7409511208534241f, 0.2902846634387970f, 0.2429801799032680f,-0.7071067690849304f, 0.9700312614440918f,-0.9569403529167175f, 0.6715589548470151f,-0.1950903236865997f,-0.3368898630142212f, 0.7730104327201843f,-0.9891765099647817f, 0.9238795042037964f,-0.5956993103027344f, 0.0980171412229538f, 0.4275550934302864f,-0.8314695954322815f, 0.9987954497337341f,-0.8819212913513184f, 0.5141027441932174f,
-    1.0000000000000000f,-0.9039893150329590f, 0.6343932747840881f,-0.2429801799032628f,-0.1950903236865997f, 0.5956993103027344f,-0.8819212913513184f, 0.9987954562051724f,-0.9238795042037964f, 0.6715589761734009f,-0.2902846634387970f,-0.1467304744553624f, 0.5555702447891235f,-0.8577286005020142f, 0.9951847195625305f,-0.9415440651830213f, 0.7071067690849304f,-0.3368898630142212f,-0.0980171412229538f, 0.5141027441932219f,-0.8314695954322815f, 0.9891765117645264f,-0.9569403529167175f, 0.7409511253549580f,-0.3826834261417389f,-0.0490676760673523f, 0.4713967442512512f,-0.8032075314806426f, 0.9807852506637573f,-0.9700312614440918f, 0.7730104327201843f,-0.4275550934302842f,
-    1.0000000000000000f,-0.9415440559387207f, 0.7730104327201843f,-0.5141027441932214f, 0.1950903236865997f, 0.1467304676771164f,-0.4713967442512512f, 0.7409511253549601f,-0.9238795042037964f, 0.9987954497337341f,-0.9569403529167175f, 0.8032075314806444f,-0.5555702447891235f, 0.2429801821708679f, 0.0980171412229538f,-0.4275550934302822f, 0.7071067690849304f,-0.9039893150329590f, 0.9951847195625305f,-0.9700312531945433f, 0.8314695954322815f,-0.5956993103027344f, 0.2902846634387970f, 0.0490676743274168f,-0.3826834261417389f, 0.6715589761734009f,-0.8819212913513184f, 0.9891765099647812f,-0.9807852506637573f, 0.8577286005020142f,-0.6343932747840881f, 0.3368898533922158f,
-    1.0000000000000000f,-0.9700312614440918f, 0.8819212913513184f,-0.7409511253549593f, 0.5555702447891235f,-0.3368898630142212f, 0.0980171412229538f, 0.1467304744553620f,-0.3826834261417389f, 0.5956993103027344f,-0.7730104327201843f, 0.9039892931234438f,-0.9807852506637573f, 0.9987954497337341f,-0.9569403529167175f, 0.8577286100002712f,-0.7071067690849304f, 0.5141027569770813f,-0.2902846634387970f, 0.0490676743274193f, 0.1950903236865997f,-0.4275550842285156f, 0.6343932747840881f,-0.8032075314806467f, 0.9238795042037964f,-0.9891765117645264f, 0.9951847195625305f,-0.9415440651830184f, 0.8314695954322815f,-0.6715589761734009f, 0.4713967442512512f,-0.2429801799032666f,
-    1.0000000000000000f,-0.9891765117645264f, 0.9569403529167175f,-0.9039892931234431f, 0.8314695954322815f,-0.7409511208534241f, 0.6343932747840881f,-0.5141027441932226f, 0.3826834261417389f,-0.2429801821708679f, 0.0980171412229538f, 0.0490676743274227f,-0.1950903236865997f, 0.3368898630142212f,-0.4713967442512512f, 0.5956993044924359f,-0.7071067690849304f, 0.8032075166702271f,-0.8819212913513184f, 0.9415440651830214f,-0.9807852506637573f, 0.9987954497337341f,-0.9951847195625305f, 0.9700312531945422f,-0.9238795042037964f, 0.8577286005020142f,-0.7730104327201843f, 0.6715589548470194f,-0.5555702447891235f, 0.4275550842285156f,-0.2902846634387970f, 0.1467304744553577f,
-    1.0000000000000000f,-0.9987954497337341f, 0.9951847195625305f,-0.9891765099647810f, 0.9807852506637573f,-0.9700312614440918f, 0.9569403529167175f,-0.9415440651830203f, 0.9238795042037964f,-0.9039893150329590f, 0.8819212913513184f,-0.8577286100002696f, 0.8314695954322815f,-0.8032075166702271f, 0.7730104327201843f,-0.7409511253549560f, 0.7071067690849304f,-0.6715589761734009f, 0.6343932747840881f,-0.5956993044924298f, 0.5555702447891235f,-0.5141027569770813f, 0.4713967442512512f,-0.4275550934302846f, 0.3826834261417389f,-0.3368898630142212f, 0.2902846634387970f,-0.2429801799032599f, 0.1950903236865997f,-0.1467304676771164f, 0.0980171412229538f,-0.0490676743274212f
-};
-
-const float  Ci_opt[512] = {
-     0.000000000f, 0.000101566f, 0.000971317f, 0.003134727f, 0.035780907f, 0.003134727f, 0.000971317f, 0.000101566f,
-    -0.000000477f, 0.000103951f, 0.000953674f, 0.002841473f, 0.035758972f, 0.003401756f, 0.000983715f, 0.000099182f,
-    -0.000000477f, 0.000105858f, 0.000930786f, 0.002521515f, 0.035694122f, 0.003643036f, 0.000991821f, 0.000096321f,
-    -0.000000477f, 0.000107288f, 0.000902653f, 0.002174854f, 0.035586357f, 0.003858566f, 0.000995159f, 0.000093460f,
-    -0.000000477f, 0.000108242f, 0.000868797f, 0.001800537f, 0.035435200f, 0.004049301f, 0.000994205f, 0.000090599f,
-    -0.000000477f, 0.000108719f, 0.000829220f, 0.001399517f, 0.035242081f, 0.004215240f, 0.000989437f, 0.000087261f,
-    -0.000000477f, 0.000108719f, 0.000783920f, 0.000971317f, 0.035007000f, 0.004357815f, 0.000980854f, 0.000083923f,
-    -0.000000954f, 0.000108242f, 0.000731945f, 0.000515938f, 0.034730434f, 0.004477024f, 0.000968933f, 0.000080585f,
-    -0.000000954f, 0.000106812f, 0.000674248f, 0.000033379f, 0.034412861f, 0.004573822f, 0.000954151f, 0.000076771f,
-    -0.000000954f, 0.000105381f, 0.000610352f,-0.000475883f, 0.034055710f, 0.004649162f, 0.000935555f, 0.000073433f,
-    -0.000000954f, 0.000102520f, 0.000539303f,-0.001011848f, 0.033659935f, 0.004703045f, 0.000915051f, 0.000070095f,
-    -0.000001431f, 0.000099182f, 0.000462532f,-0.001573563f, 0.033225536f, 0.004737377f, 0.000891685f, 0.000066280f,
-    -0.000001431f, 0.000095367f, 0.000378609f,-0.002161503f, 0.032754898f, 0.004752159f, 0.000866413f, 0.000062943f,
-    -0.000001907f, 0.000090122f, 0.000288486f,-0.002774239f, 0.032248020f, 0.004748821f, 0.000838757f, 0.000059605f,
-    -0.000001907f, 0.000084400f, 0.000191689f,-0.003411293f, 0.031706810f, 0.004728317f, 0.000809669f, 0.000055790f,
-    -0.000002384f, 0.000077724f, 0.000088215f,-0.004072189f, 0.031132698f, 0.004691124f, 0.000779152f, 0.000052929f,
-    -0.000002384f, 0.000069618f,-0.000021458f,-0.004756451f, 0.030526638f, 0.004638195f, 0.000747204f, 0.000049591f,
-    -0.000002861f, 0.000060558f,-0.000137329f,-0.005462170f, 0.029890060f, 0.004570484f, 0.000714302f, 0.000046253f,
-    -0.000003338f, 0.000050545f,-0.000259876f,-0.006189346f, 0.029224873f, 0.004489899f, 0.000680923f, 0.000043392f,
-    -0.000003338f, 0.000039577f,-0.000388145f,-0.006937027f, 0.028532982f, 0.004395962f, 0.000646591f, 0.000040531f,
-    -0.000003815f, 0.000027180f,-0.000522137f,-0.007703304f, 0.027815342f, 0.004290581f, 0.000611782f, 0.000037670f,
-    -0.000004292f, 0.000013828f,-0.000661850f,-0.008487225f, 0.027073860f, 0.004174709f, 0.000576973f, 0.000034809f,
-    -0.000004768f,-0.000000954f,-0.000806808f,-0.009287834f, 0.026310921f, 0.004048824f, 0.000542164f, 0.000032425f,
-    -0.000005245f,-0.000017166f,-0.000956535f,-0.010103703f, 0.025527000f, 0.003914356f, 0.000507355f, 0.000030041f,
-    -0.000006199f,-0.000034332f,-0.001111031f,-0.010933399f, 0.024725437f, 0.003771782f, 0.000472546f, 0.000027657f,
-    -0.000006676f,-0.000052929f,-0.001269817f,-0.011775017f, 0.023907185f, 0.003622532f, 0.000438213f, 0.000025272f,
-    -0.000007629f,-0.000072956f,-0.001432419f,-0.012627602f, 0.023074150f, 0.003467083f, 0.000404358f, 0.000023365f,
-    -0.000008106f,-0.000093937f,-0.001597881f,-0.013489246f, 0.022228718f, 0.003306866f, 0.000371456f, 0.000021458f,
-    -0.000009060f,-0.000116348f,-0.001766682f,-0.014358521f, 0.021372318f, 0.003141880f, 0.000339031f, 0.000019550f,
-    -0.000010014f,-0.000140190f,-0.001937389f,-0.015233517f, 0.020506859f, 0.002974033f, 0.000307560f, 0.000018120f,
-    -0.000011444f,-0.000165462f,-0.002110004f,-0.016112804f, 0.019634247f, 0.002803326f, 0.000277042f, 0.000016689f,
-    -0.000012398f,-0.000191212f,-0.002283096f,-0.016994476f, 0.018756866f, 0.002630711f, 0.000247478f, 0.000014782f,
-    -0.000013828f,-0.000218868f,-0.002457142f,-0.017876148f, 0.017876148f, 0.002457142f, 0.000218868f, 0.000013828f,
-    -0.000014782f,-0.000247478f,-0.002630711f,-0.018756866f, 0.016994476f, 0.002283096f, 0.000191212f, 0.000012398f,
-    -0.000016689f,-0.000277042f,-0.002803326f,-0.019634247f, 0.016112804f, 0.002110004f, 0.000165462f, 0.000011444f,
-    -0.000018120f,-0.000307560f,-0.002974033f,-0.020506859f, 0.015233517f, 0.001937389f, 0.000140190f, 0.000010014f,
-    -0.000019550f,-0.000339031f,-0.003141880f,-0.021372318f, 0.014358521f, 0.001766682f, 0.000116348f, 0.000009060f,
-    -0.000021458f,-0.000371456f,-0.003306866f,-0.022228718f, 0.013489246f, 0.001597881f, 0.000093937f, 0.000008106f,
-    -0.000023365f,-0.000404358f,-0.003467083f,-0.023074150f, 0.012627602f, 0.001432419f, 0.000072956f, 0.000007629f,
-    -0.000025272f,-0.000438213f,-0.003622532f,-0.023907185f, 0.011775017f, 0.001269817f, 0.000052929f, 0.000006676f,
-    -0.000027657f,-0.000472546f,-0.003771782f,-0.024725437f, 0.010933399f, 0.001111031f, 0.000034332f, 0.000006199f,
-    -0.000030041f,-0.000507355f,-0.003914356f,-0.025527000f, 0.010103703f, 0.000956535f, 0.000017166f, 0.000005245f,
-    -0.000032425f,-0.000542164f,-0.004048824f,-0.026310921f, 0.009287834f, 0.000806808f, 0.000000954f, 0.000004768f,
-    -0.000034809f,-0.000576973f,-0.004174709f,-0.027073860f, 0.008487225f, 0.000661850f,-0.000013828f, 0.000004292f,
-    -0.000037670f,-0.000611782f,-0.004290581f,-0.027815342f, 0.007703304f, 0.000522137f,-0.000027180f, 0.000003815f,
-    -0.000040531f,-0.000646591f,-0.004395962f,-0.028532982f, 0.006937027f, 0.000388145f,-0.000039577f, 0.000003338f,
-    -0.000043392f,-0.000680923f,-0.004489899f,-0.029224873f, 0.006189346f, 0.000259876f,-0.000050545f, 0.000003338f,
-    -0.000046253f,-0.000714302f,-0.004570484f,-0.029890060f, 0.005462170f, 0.000137329f,-0.000060558f, 0.000002861f,
-    -0.000049591f,-0.000747204f,-0.004638195f,-0.030526638f, 0.004756451f, 0.000021458f,-0.000069618f, 0.000002384f,
-    -0.000052929f,-0.000779152f,-0.004691124f,-0.031132698f, 0.004072189f,-0.000088215f,-0.000077724f, 0.000002384f,
-    -0.000055790f,-0.000809669f,-0.004728317f,-0.031706810f, 0.003411293f,-0.000191689f,-0.000084400f, 0.000001907f,
-    -0.000059605f,-0.000838757f,-0.004748821f,-0.032248020f, 0.002774239f,-0.000288486f,-0.000090122f, 0.000001907f,
-    -0.000062943f,-0.000866413f,-0.004752159f,-0.032754898f, 0.002161503f,-0.000378609f,-0.000095367f, 0.000001431f,
-    -0.000066280f,-0.000891685f,-0.004737377f,-0.033225536f, 0.001573563f,-0.000462532f,-0.000099182f, 0.000001431f,
-    -0.000070095f,-0.000915051f,-0.004703045f,-0.033659935f, 0.001011848f,-0.000539303f,-0.000102520f, 0.000000954f,
-    -0.000073433f,-0.000935555f,-0.004649162f,-0.034055710f, 0.000475883f,-0.000610352f,-0.000105381f, 0.000000954f,
-    -0.000076771f,-0.000954151f,-0.004573822f,-0.034412861f,-0.000033379f,-0.000674248f,-0.000106812f, 0.000000954f,
-    -0.000080585f,-0.000968933f,-0.004477024f,-0.034730434f,-0.000515938f,-0.000731945f,-0.000108242f, 0.000000954f,
-    -0.000083923f,-0.000980854f,-0.004357815f,-0.035007000f,-0.000971317f,-0.000783920f,-0.000108719f, 0.000000477f,
-    -0.000087261f,-0.000989437f,-0.004215240f,-0.035242081f,-0.001399517f,-0.000829220f,-0.000108719f, 0.000000477f,
-    -0.000090599f,-0.000994205f,-0.004049301f,-0.035435200f,-0.001800537f,-0.000868797f,-0.000108242f, 0.000000477f,
-    -0.000093460f,-0.000995159f,-0.003858566f,-0.035586357f,-0.002174854f,-0.000902653f,-0.000107288f, 0.000000477f,
-    -0.000096321f,-0.000991821f,-0.003643036f,-0.035694122f,-0.002521515f,-0.000930786f,-0.000105858f, 0.000000477f,
-    -0.000099182f,-0.000983715f,-0.003401756f,-0.035758972f,-0.002841473f,-0.000953674f,-0.000103951f, 0.000000477f
-};
-
-/* V A R I A B L E S */
-float  X_L[X_MEM+480];
-float  X_R[X_MEM+480];
-
-/* F U N C T I O N S */
-// vectoring & partial calculation
-static void
-Vectoring ( const float* x, float* y )
-{
-#ifndef FASTER
-    const float*  c = Ci_opt;
-    int           i;
-
-    for (i=0; i<16; ++i, c+=32, x+=4) {
-        *y++ = c[ 0] * x[  0] + c[ 1] * x[ 64] + c[ 2] * x[128] + c[ 3] * x[192]
-             + c[ 4] * x[256] + c[ 5] * x[320] + c[ 6] * x[384] + c[ 7] * x[448];
-
-        *y++ = c[ 8] * x[  1] + c[ 9] * x[ 65] + c[10] * x[129] + c[11] * x[193]
-             + c[12] * x[257] + c[13] * x[321] + c[14] * x[385] + c[15] * x[449];
-
-        *y++ = c[16] * x[  2] + c[17] * x[ 66] + c[18] * x[130] + c[19] * x[194]
-             + c[20] * x[258] + c[21] * x[322] + c[22] * x[386] + c[23] * x[450];
-
-        *y++ = c[24] * x[  3] + c[25] * x[ 67] + c[26] * x[131] + c[27] * x[195]
-             + c[28] * x[259] + c[29] * x[323] + c[30] * x[387] + c[31] * x[451];
-    }
-#else
-    const float*  c1;
-    const float*  c2;
-    const float*  x1;
-    const float*  x2;
-    int           i;
-
-    c1 = Ci_opt + 128;
-    x1 = x      +  16;
-    *y++ = c1[ 0] * x1[  0] + c1[ 1] * x1[ 64] + c1[ 2] * x1[128] + c1[ 3] * x1[192]
-         + c1[ 4] * x1[256] + c1[ 5] * x1[320] + c1[ 6] * x1[384] + c1[ 7] * x1[448];
-
-    c1 = Ci_opt + 128 - 8;
-    x1 = x      +  16 - 1;
-    c2 = Ci_opt + 128 + 8;
-    x2 = x      +  16 + 1;
-    for (i= 1; i<=16; ++i, c1-=8, x1-=1, c2+=8, x2+=1) {
-        *y++ = c1[ 0] * x1[  0] + c1[ 1] * x1[ 64] + c1[ 2] * x1[128] + c1[ 3] * x1[192]
-             + c1[ 4] * x1[256] + c1[ 5] * x1[320] + c1[ 6] * x1[384] + c1[ 7] * x1[448]
-             + c2[ 0] * x2[  0] + c2[ 1] * x2[ 64] + c2[ 2] * x2[128] + c2[ 3] * x2[192]
-             + c2[ 4] * x2[256] + c2[ 5] * x2[320] + c2[ 6] * x2[384] + c2[ 7] * x2[448];
-    }
-
-    c1 = Ci_opt + 128 + 136;
-    x1 = x      +  16 +  17;
-    c2 = Ci_opt + 640 - 136;
-    x2 = x      +  80 -  17;
-    *y++ = c1[ 0] * x1[  0] + c1[ 1] * x1[ 64] + c1[ 2] * x1[128] + c1[ 3] * x1[192]
-         + c1[ 4] * x1[256] + c1[ 5] * x1[320] + c1[ 6] * x1[384] + c1[ 7] * x1[448]
-         - c2[ 0] * x2[  0] - c2[ 1] * x2[ 64] - c2[ 2] * x2[128] - c2[ 3] * x2[192]
-         - c2[ 4] * x2[256] - c2[ 5] * x2[320] - c2[ 6] * x2[384] - c2[ 7] * x2[448];
-
-    c1 = Ci_opt + 128 + 144;
-    x1 = x      +  16 +  18;
-    c2 = Ci_opt + 640 - 144;
-    x2 = x      +  80 -  18;
-    for (i=18; i<=31; ++i, c1+=8, x1+=1, c2-=8, x2-=1) {
-        *y++ = c1[ 0] * x1[  0] + c1[ 1] * x1[ 64] + c1[ 2] * x1[128] + c1[ 3] * x1[192]
-             + c1[ 4] * x1[256] + c1[ 5] * x1[320] + c1[ 6] * x1[384] + c1[ 7] * x1[448]
-             - c2[ 0] * x2[  0] - c2[ 1] * x2[ 64] - c2[ 2] * x2[128] - c2[ 3] * x2[192]
-             - c2[ 4] * x2[256] - c2[ 5] * x2[320] - c2[ 6] * x2[384] - c2[ 7] * x2[448];
-    }
-#endif
-}
-
-// matrixing with Mi[32][32] = Mi[1024]
-static void
-Matrixing ( const int MaxBand, const float* mi, const float* y, float* samples )
-{
-    int   i;
-#ifdef FASTER
-    for (i=0; i<=MaxBand; ++i, mi+=32, samples+=72) { // 144 = sizeof(SubbandFloatTyp)/sizeof(float)
-        *samples = y[0] + mi[ 1] * y[ 1] + mi[ 2] * y[ 2] + mi[ 3] * y[ 3] + mi[ 4] * y[ 4] +
-                          mi[ 5] * y[ 5] + mi[ 6] * y[ 6] + mi[ 7] * y[ 7] + mi[ 8] * y[ 8] +
-                          mi[ 9] * y[ 9] + mi[10] * y[10] + mi[11] * y[11] + mi[12] * y[12] +
-                          mi[13] * y[13] + mi[14] * y[14] + mi[15] * y[15] + mi[16] * y[16] +
-                          mi[17] * y[17] + mi[18] * y[18] + mi[19] * y[19] + mi[20] * y[20] +
-                          mi[21] * y[21] + mi[22] * y[22] + mi[23] * y[23] + mi[24] * y[24] +
-                          mi[25] * y[25] + mi[26] * y[26] + mi[27] * y[27] + mi[28] * y[28] +
-                          mi[29] * y[29] + mi[30] * y[30] + mi[31] * y[31];
-    }
-#else
-    for (i=0; i<=MaxBand; ++i, mi+=32, samples+=72) { // 144 = sizeof(SubbandFloatTyp)/sizeof(float)
-        *samples = y[16] + mi[ 1] * (y[15]+y[17]) + mi[ 2] * (y[14]+y[18]) +
-                           mi[ 3] * (y[13]+y[19]) + mi[ 4] * (y[12]+y[20]) +
-                           mi[ 5] * (y[11]+y[21]) + mi[ 6] * (y[10]+y[22]) +
-                           mi[ 7] * (y[ 9]+y[23]) + mi[ 8] * (y[ 8]+y[24]) +
-                           mi[ 9] * (y[ 7]+y[25]) + mi[10] * (y[ 6]+y[26]) +
-                           mi[11] * (y[ 5]+y[27]) + mi[12] * (y[ 4]+y[28]) +
-                           mi[13] * (y[ 3]+y[29]) + mi[14] * (y[ 2]+y[30]) +
-                           mi[15] * (y[ 1]+y[31]) + mi[16] * (y[ 0]+y[32]) +
-                           mi[31] * (y[47]-y[49]) + mi[30] * (y[46]-y[50]) +
-                           mi[29] * (y[45]-y[51]) + mi[28] * (y[44]-y[52]) +
-                           mi[27] * (y[43]-y[53]) + mi[26] * (y[42]-y[54]) +
-                           mi[25] * (y[41]-y[55]) + mi[24] * (y[40]-y[56]) +
-                           mi[23] * (y[39]-y[57]) + mi[22] * (y[38]-y[58]) +
-                           mi[21] * (y[37]-y[59]) + mi[20] * (y[36]-y[60]) +
-                           mi[19] * (y[35]-y[61]) + mi[18] * (y[34]-y[62]) +
-                           mi[17] * (y[33]-y[63]);
-    }
-#endif
-}
-
-// Analysis-Filterbank
-void
-Analyse_Filter ( const PCMDataTyp* in, SubbandFloatTyp* out, const int MaxBand )
-{
-#ifndef FASTER
-    float Y_L[64],Y_R[64];
-#else
-    float Y_L[32],Y_R[32];
-#endif
-    float *x;
-    const float *pcm;
-    int n,i;
-
-    ENTER(3);
-    /************************* calculate L-signal ***************************/
-    memmove(X_L + X_MEM, X_L, 480*sizeof(float));
-    x     = X_L + X_MEM;
-    pcm   = in->L + 479;    // 479 = CENTER + 31
-    for (n=0; n<36; ++n, pcm+=64) {
-        // updating vector x
-        x  -= 32;
-        for (i=0; i<32; ++i) *(x+i) = *(pcm--);
-
-        // vectoring & partial calculation
-        Vectoring(x, Y_L);
-
-        // matrixing
-        Matrixing(MaxBand, M, Y_L, &out[0].L[n]);
-    }
-
-    /************************* calculate R-signal ***************************/
-    memmove(X_R + X_MEM, X_R, 480*sizeof(float));
-    x     = X_R + X_MEM;
-    pcm   = in->R + 479;    // 479 = CENTER + 31
-    for (n=0; n<36; ++n, pcm+=64) {
-        // updating vector x
-        x  -= 32;
-        for (i=0; i<32; ++i)
-            x[i] = *(pcm--);
-
-        // vectoring & partial calculation
-        Vectoring(x, Y_R);
-
-        // matrixing
-        Matrixing(MaxBand, M, Y_R, &out[0].R[n]);
-    }
-    LEAVE(3);
-}
Index: /mppenc/branches/zorg/analy_filter.c
===================================================================
--- /mppenc/branches/zorg/analy_filter.c	(revision 40)
+++ /mppenc/branches/zorg/analy_filter.c	(revision 41)
Index: /mppenc/branches/zorg/ans.c
===================================================================
--- /mppenc/branches/zorg/ans.c	(revision 40)
+++ /mppenc/branches/zorg/ans.c	(revision 41)
Index: /mppenc/branches/zorg/bitstream.c
===================================================================
--- /mppenc/branches/zorg/bitstream.c	(revision 40)
+++ /mppenc/branches/zorg/bitstream.c	(revision 41)
Index: penc/branches/zorg/clipboard.c
===================================================================
--- /mppenc/branches/zorg/clipboard.c	(revision 40)
+++ 	(revision )
@@ -1,57 +1,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <direct.h>
-#include <errno.h>
-#include <tchar.h>
-#include <windows.h>
-
-// EnumClipboardFormats
-
-void
-CopyToClipboard ( const char* src )
-{
-    TCHAR*   pClipboardText  = NULL;
-    BOOL     boClipboardOpen = FALSE;
-    BOOL     boReturnValue   = FALSE;
-    HGLOBAL  hGlobal         = NULL;
-
-    // Copy to clipboard
-    if ( ( hGlobal = GlobalAlloc ( GMEM_MOVEABLE | GMEM_DDESHARE, (strlen(src) + 1) * sizeof (TCHAR) ) ) == NULL )
-        goto Exit;
-    if ( ( pClipboardText = (TCHAR*) GlobalLock (hGlobal) ) == NULL )
-        goto Exit;
-    lstrcpy ( pClipboardText, src );
-    GlobalUnlock (hGlobal);
-
-    boClipboardOpen = OpenClipboard ( /*GetSafeHwnd()*/ NULL );
-    if ( ! boClipboardOpen )
-        goto LowOnMemoryExit;
-
-    EmptyClipboard ();
-    if ( SetClipboardData ( sizeof(char) != sizeof(TCHAR)  ?  CF_UNICODETEXT  :  CF_TEXT, hGlobal ) == 0 )
-        goto LowOnMemoryExit;
-
-        // Cleanup
-    hGlobal       = NULL ;
-    boReturnValue = TRUE ;
-
-Exit:
-    if ( boClipboardOpen )
-        CloseClipboard ();
-    if ( hGlobal != NULL )
-        GlobalFree (hGlobal);
-    return;
-
-LowOnMemoryExit:
-    fprintf ( stderr, "Low on memory\n" );
-    goto Exit;
-}
-
-
-int
-main ( void )
-{
-    CopyToClipboard ( "Ein Hase und ein Igel\n" );
-    return 0;
-}
Index: penc/branches/zorg/clipboard.dsp
===================================================================
--- /mppenc/branches/zorg/clipboard.dsp	(revision 40)
+++ 	(revision )
@@ -1,100 +1,0 @@
-# Microsoft Developer Studio Project File - Name="clipboard" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=clipboard - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "clipboard.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "clipboard.mak" CFG="clipboard - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "clipboard - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "clipboard - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "clipboard - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "clipboard___Win32_Release"
-# PROP BASE Intermediate_Dir "clipboard___Win32_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "clipboard___Win32_Release"
-# PROP Intermediate_Dir "clipboard___Win32_Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "clipboard - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ  /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ  /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "clipboard - Win32 Release"
-# Name "clipboard - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\clipboard.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
Index: penc/branches/zorg/clipboard.vcproj
===================================================================
--- /mppenc/branches/zorg/clipboard.vcproj	(revision 40)
+++ 	(revision )
@@ -1,166 +1,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="clipboard"
-	SccProjectName=""
-	SccLocalPath="">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\clipboard___Win32_Release"
-			IntermediateDirectory=".\clipboard___Win32_Release"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\clipboard___Win32_Release/clipboard.pch"
-				AssemblerListingLocation=".\clipboard___Win32_Release/"
-				ObjectFile=".\clipboard___Win32_Release/"
-				ProgramDataBaseFileName=".\clipboard___Win32_Release/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=".\clipboard___Win32_Release/clipboard.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				ProgramDatabaseFile=".\clipboard___Win32_Release/clipboard.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\clipboard___Win32_Release/clipboard.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\Debug"
-			IntermediateDirectory=".\Debug"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Debug/clipboard.pch"
-				AssemblerListingLocation=".\Debug/"
-				ObjectFile=".\Debug/"
-				ProgramDataBaseFileName=".\Debug/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=".\Debug/clipboard.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile=".\Debug/clipboard.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Debug/clipboard.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
-			<File
-				RelativePath="clipboard.c">
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: penc/branches/zorg/clipstat.c
===================================================================
--- /mppenc/branches/zorg/clipstat.c	(revision 40)
+++ 	(revision )
@@ -1,1186 +1,0 @@
-/*
- * known Bugs:
- *   Doesn't wait for the end of system (gnuplot). Does anyone know why?!
- *   Folder is being created even if no file was written
- *   Special characters in album- and filenames
- *   Scale division on all 4 axes
- *
- * to do:
- *   Write GetAlbumFromFilename()
- *   Write GetTitleFromFilename()
- *
- * Other interesting things
- *   - Uniformity of the LSBs (because of ADC-errors or non-linear coding (µ-law, DAT, some LSBs=0)
- *   - noise estimation via level and LPAC-Entropy
- */
-
-
-/* config section */
-#define GNUPLOT
-#define DIRECTORY  "results"
-
-#include <ctype.h>
-#include "mppdec.h"
-
-double
-derfc ( double x )
-{
-    double t, u, y;
-
-    t = 3.97886080735226 / (fabs(x) + 3.97886080735226);
-    u = t - 0.5;
-    y = ((((((((((0.00127109764952614092) * u + 1.19314022838340944e-4) * u -
-                  0.003963850973605135  ) * u - 8.70779635317295828e-4) * u +
-                  0.00773672528313526668) * u + 0.00383335126264887303) * u -
-                  0.0127223813782122755 ) * u - 0.0133823644533460069 ) * u +
-                  0.0161315329733252248 ) * u + 0.0390976845588484035 ) * u +
-                  0.00249367200053503304;
-    y = ((((((((((((y * u - 0.0838864557023001992) * u -
-                            0.119463959964325415 ) * u + 0.0166207924969367356) * u +
-                            0.357524274449531043 ) * u + 0.805276408752910567 ) * u +
-                            1.18902982909273333  ) * u + 1.37040217682338167  ) * u +
-                            1.31314653831023098  ) * u + 1.07925515155856677  ) * u +
-                            0.774368199119538609 ) * u + 0.490165080585318424 ) * u +
-                            0.275374741597376782 ) * t * exp(-x * x);
-    return x < 0  ?  2 - y  :  y;
-}
-
-
-double
-derf ( double x )
-{
-           int     k;
-           double  w, t, y;
-    static double  a[65] = {
-        5.958930743e-11, -1.13739022964e-9, 1.466005199839e-8, -1.635035446196e-7, 1.6461004480962e-6, -1.492559551950604e-5, 1.2055331122299265e-4, -8.548326981129666e-4,  0.00522397762482322257, -0.0268661706450773342,  0.11283791670954881569, -0.37612638903183748117, 1.12837916709551257377,
-        2.372510631e-11, -4.5493253732e-10, 5.90362766598e-9,  -6.642090827576e-8, 6.7595634268133e-7, -6.21188515924e-6,     5.10388300970969e-5,   -3.7015410692956173e-4, 0.00233307631218880978, -0.0125498847718219221,  0.05657061146827041994, -0.2137966477645600658,  0.84270079294971486929,
-        9.49905026e-12,  -1.8310229805e-10, 2.39463074e-9,     -2.721444369609e-8, 2.8045522331686e-7, -2.61830022482897e-6,  2.195455056768781e-5,  -1.6358986921372656e-4, 0.00107052153564110318, -0.00608284718113590151, 0.02986978465246258244, -0.13055593046562267625, 0.67493323603965504676,
-        3.82722073e-12,  -7.421598602e-11,  9.793057408e-10,   -1.126008898854e-8, 1.1775134830784e-7, -1.1199275838265e-6,   9.62023443095201e-6,   -7.404402135070773e-5,  5.0689993654144881e-4,  -0.00307553051439272889, 0.01668977892553165586, -0.08548534594781312114, 0.56909076642393639985,
-        1.55296588e-12,  -3.032205868e-11,  4.0424830707e-10,  -4.71135111493e-9,  5.011915876293e-8,  -4.8722516178974e-7,   4.30683284629395e-6,   -3.445026145385764e-5,  2.4879276133931664e-4,  -0.00162940941748079288, 0.00988786373932350462, -0.05962426839442303805, 0.49766113250947636708
-    };
-    static double  b[65] = {
-        -2.9734388465e-10, 2.69776334046e-9, -6.40788827665e-9, -1.6678201321e-8,   -2.1854388148686e-7,  2.66246030457984e-6,        1.612722157047886e-5, -2.5616361025506629e-4,        1.5380842432375365e-4, 0.00815533022524927908,        -0.01402283663896319337, -0.19746892495383021487,        0.71511720328842845913,
-        -1.951073787e-11, -3.2302692214e-10,  5.22461866919e-9,  3.42940918551e-9,  -3.5772874310272e-7,  1.9999935792654e-7,        2.687044575042908e-5, -1.1843240273775776e-4,        -8.0991728956032271e-4, 0.00661062970502241174,        0.00909530922354827295, -0.2016007277849101314,        0.51169696718727644908,
-         3.147682272e-11, -4.8465972408e-10,  6.3675740242e-10,  3.377623323271e-8, -1.5451139637086e-7, -2.03340624738438e-6,        1.947204525295057e-5, 2.854147231653228e-5,        -0.00101565063152200272, 0.00271187003520095655,        0.02328095035422810727, -0.16725021123116877197,        0.32490054966649436974,
-         2.31936337e-11,  -6.303206648e-11,  -2.64888267434e-9,  2.050708040581e-8,  1.1371857327578e-7, -2.11211337219663e-6,        3.68797328322935e-6, 9.823686253424796e-5,        -6.5860243990455368e-4, -7.5285814895230877e-4,        0.02585434424202960464, -0.11637092784486193258,        0.18267336775296612024,
-        -3.67789363e-12,   2.0876046746e-10, -1.93319027226e-9, -4.35953392472e-9,   1.8006992266137e-7, -7.8441223763969e-7,        -6.75407647949153e-6, 8.428418334440096e-5,        -1.7604388937031815e-4, -0.0023972961143507161,        0.0206412902387602297, -0.06905562880005864105,        0.09084526782065478489
-    };
-
-    w = fabs (x);
-    if ( w < 2.2 ) {
-        t = w * w;
-        k = (int) t;
-        t -= k;
-        k *= 13;
-        y = ((((((((((((a[k] * t + a[k + 1]) * t +
-            a[k +  2]) * t + a[k +  3]) * t + a[k +  4]) * t +
-            a[k +  5]) * t + a[k +  6]) * t + a[k +  7]) * t +
-            a[k +  8]) * t + a[k +  9]) * t + a[k + 10]) * t +
-            a[k + 11]) * t + a[k + 12]) * w;
-    } else if ( w < 6.9 ) {
-        k = (int) w;
-        t = w - k;
-        k = 13 * (k - 2);
-        y = (((((((((((b[k] * t + b[k + 1]) * t +
-            b[k +  2]) * t + b[k +  3]) * t + b[k +  4]) * t +
-            b[k +  5]) * t + b[k +  6]) * t + b[k +  7]) * t +
-            b[k +  8]) * t + b[k +  9]) * t + b[k + 10]) * t +
-            b[k + 11]) * t + b[k + 12];
-        y *= y;
-        y *= y;
-        y *= y;
-        y = 1 - y * y;
-    } else {
-        y = 1;
-    }
-    return x < 0  ?  -y  :  y;
-}
-
-
-double
-dierfc ( double y )
-{
-    double  s, t, u, w, x, z;
-
-    z = y > 1  ?  2. - y  :  y;
-    w = 0.916461398268964 - log (z);
-    u = sqrt (w);
-    s = (log (u) + 0.488826640273108) / w;
-    t = 1 / (u + 0.231729200323405);
-    x = u * (1 - s * (s * 0.124610454613712 + 0.5)) -
-        ((((-0.0728846765585675 * t + 0.269999308670029) * t +
-             0.150689047360223) * t + 0.116065025341614) * t +
-             0.499999303439796) * t;
-    t = 3.97886080735226 / (x + 3.97886080735226);
-    u = t - 0.5;
-    s = (((((((((0.00112648096188977922  * u +
-                 1.05739299623423047e-4) * u - 0.00351287146129100025) * u -
-                 7.71708358954120939e-4) * u + 0.00685649426074558612) * u +
-                 0.00339721910367775861) * u - 0.011274916933250487  ) * u -
-                 0.0118598117047771104 ) * u + 0.0142961988697898018 ) * u +
-                 0.0346494207789099922 ) * u + 0.00220995927012179067;
-    s = ((((((((((((s * u - 0.0743424357241784861) * u -
-        0.105872177941595488) * u + 0.0147297938331485121) * u +
-        0.316847638520135944) * u + 0.713657635868730364 ) * u +
-        1.05375024970847138 ) * u + 1.21448730779995237  ) * u +
-        1.16374581931560831 ) * u + 0.956464974744799006 ) * u +
-        0.686265948274097816) * u + 0.434397492331430115 ) * u +
-        0.244044510593190935) * t -
-        z * exp (x * x - 0.120782237635245222);
-    x += s * (x * s + 1);
-    return y > 1  ?   -x  :  +x;
-}
-
-
-double
-dgamma ( double x )
-{
-    int     k, n;
-    double  w, y;
-
-    n = x < 1.5  ?  -((int) (2.5 - x))  :  (int) (x - 1.5);
-    w = x - (n + 2);
-    y = ((((((((((((-1.99542863674e-7      * w + 1.337767384067e-6   ) * w -
-                     2.591225267689e-6   ) * w - 1.7545539395205e-5  ) * w +
-                     1.45596568617526e-4 ) * w - 3.60837876648255e-4 ) * w -
-                     8.04329819255744e-4 ) * w + 0.008023273027855346) * w -
-                     0.017645244547851414) * w - 0.024552490005641278) * w +
-                     0.19109110138763841 ) * w - 0.233093736421782878) * w -
-                     0.422784335098466784) * w + 0.99999999999999999;
-    if ( n > 0 ) {
-        w = x - 1;
-        for ( k = 2; k <= n; k++ ) {
-            w *= x - k;
-        }
-    } else {
-        w = 1;
-        for ( k = 0; k > n; k-- ) {
-            y *= x - k;
-        }
-    }
-    return w / y;
-}
-
-
-#ifdef GNUPLOT
-const char  __gnuplot [] =
-//"set grid\n"
-"set tics out\n"
-"set key bottom right\n"
-//"set nokey\n"
-"\n"
-"set xtics mirror\n"
-"set ytics mirror\n"
-"\n"
-"set xtics -10, 1, 10\n"
-"set ytics (\"32768\" 32768, \"24576\" 24576, \"16384\" 16384, \"8192\" 8192, \"0\" 0, \"-8192\" -8192, \"-16384\" -16384, \"-24576\" -24576, \"-32768\" -32768)"
-"\n"
-"set xrange[-5.5:5.5]\n"
-"set yrange[-32768:32768]\n"
-"\n"
-"set xlabel \"Sigma\"\n"
-"set ylabel \"Sample\"\n"
-"\n"
-"set data style lines\n"
-"\n"
-"set size 1024./128./5., 768./120./4.\n"
-"set terminal png color\n"
-;
-
-
-// fixme: needs to be written
-static const char*
-GetAlbumFromFilename ( const char* filename )
-{
-    static const char*  name = "Album";
-
-    return name;
-}
-
-
-// fixme: needs to be written
-static const char*
-GetTitleFromFilename ( const char* filename )
-{
-    static char  dstname [1024];
-    int          len = NULL==strrchr (filename, '.')  ?  strlen (filename)  :  strrchr (filename, '.') - filename;
-
-    sprintf ( dstname, "%*.*s", len, len, filename );
-
-    return dstname;
-}
-
-
-static int
-gnuplot ( int argc, const char** argv )
-{
-    int    i;
-    char   dstname [1024];
-    char   command [1024];
-    int    rc;
-    FILE*  fp;
-
-    stderr_printf ( "plotting ..." );
-
-    sprintf ( dstname, DIRECTORY"/%s.plot", GetAlbumFromFilename (argv[1]) );
-    if ( (fp = fopen ( dstname, "w")) == NULL ) {
-        stderr_printf ( "Can't create '%s'\n", dstname );
-        return -1;
-    }
-
-    fprintf ( fp, "%s\n", __gnuplot );
-    fprintf ( fp, "set title \"%s\"\n"     , GetAlbumFromFilename (argv[1]) );
-    fprintf ( fp, "set output \"%s.png\"\n", GetAlbumFromFilename (argv[1]) );
-
-
-    fprintf ( fp, "plot" );
-    for ( i = 1; i < argc; i++ ) {
-        fprintf ( fp, "%s\"%s\"", 1==i  ?  " "  :  ", ", GetTitleFromFilename (argv[i]) );
-    }
-    fprintf ( fp, "\n" );
-    fclose (fp);
-
-    if ( 0 != chdir (DIRECTORY) ) {
-        stderr_printf ( "\nCan't chdir %s\n", DIRECTORY );
-        return -1;
-    }
-
-    sprintf ( command, "gnuplot %s.plot &> /dev/null", GetAlbumFromFilename (argv[1]) );
-    stderr_printf ( "\n" );
-    rc = system (command);
-    /* system doesn't recognize most errors */
-    if ( 127 == rc ) {
-        /* fixme: errno should be checked here */
-        stderr_printf ( "Can't execute '%s'\n", command );
-    }
-    else if ( -1 == rc ) {
-        stderr_printf ( "Can't plot '%s'\n", GetAlbumFromFilename (argv[1]) );
-    }
-
-# if 0
-    for ( i = 1; i < argc; i++ ) {
-        sprintf ( command, "%s", GetTitleFromFilename (argv[i]) );
-        if ( 0 != unlink (command) ) {
-            stderr_printf ( "Can't delete '%s'\n", command );
-        }
-    }
-    sprintf ( command, "%s.plot", GetAlbumFromFilename (argv[1]) );
-    if ( 0 != unlink (command) ) {
-        stderr_printf ( "Can't delete '%s'\n", command );
-    }
-# endif
-
-    return rc;
-}
-
-#endif
-
-
-const char __1 [] =
-"#\n"
-"# ACE/gr parameter file\n"
-"#\n"
-"@version 40102\n"
-"@page layout free\n"
-"@ps linewidth begin 1\n"
-"@ps linewidth increment 2\n"
-"@hardcopy device 1\n"
-"@page 5\n"
-"@page inout 5\n"
-"@link page off\n"
-"@default linestyle 1\n"
-"@default linewidth 1\n"
-"@default color 1\n"
-"@default char size 1.0\n"
-"@default font 4\n"
-"@default font source 0\n"
-"@default symbol size 1.0\n"
-"@timestamp off\n"
-"@timestamp 0.03, 0.03\n"
-"@timestamp linewidth 1\n"
-"@timestamp color 1\n"
-"@timestamp rot 0\n"
-"@timestamp font 4\n"
-"@timestamp char size 1.0\n"
-"@timestamp def \"Wed Nov 28 22:36:22 2001\"\n"
-"@with g0\n"
-"@g0 on\n"
-"@g0 label off\n"
-"@g0 hidden false\n"
-"@g0 type xy\n"
-"@g0 autoscale type AUTO\n"
-"@g0 fixedpoint off\n"
-"@g0 fixedpoint type 0\n"
-"@g0 fixedpoint xy 0.0, 0.0\n"
-"@g0 fixedpoint format general general\n"
-"@g0 fixedpoint prec 6, 6\n"
-"@ world xmin -5.5\n"
-"@ world xmax 5.5\n"
-"@ world ymin -32768\n"
-"@ world ymax 32768\n"
-"@ stack world 0, 0, 0, 0 tick 0, 0, 0, 0\n"
-"@ view xmin 0.09\n"
-"@ view xmax 0.98\n"
-"@ view ymin 0.08\n"
-"@ view ymax 0.90\n"
-"@ title \"%*.*s\"\n"
-"@ title font 4\n"
-"@ title size 1.0\n"
-"@ title color 1\n"
-"@ title linewidth 1\n"
-"@ subtitle \"(amplitude statistics)\"\n"
-"@ subtitle font 4\n"
-"@ subtitle size 0.64\n"
-"@ subtitle color 1\n"
-"@ subtitle linewidth 1\n"
-"@ s0 symbol 0\n"
-"@ s0 symbol size 1.0\n"
-"@ s0 symbol fill 0\n"
-"@ s0 symbol color -1\n"
-"@ s0 symbol linewidth 1\n"
-"@ s0 symbol linestyle 1\n"
-"@ s0 symbol center false\n"
-"@ s0 symbol char 0\n"
-"@ s0 skip 0\n"
-"@ s0 linestyle 1\n"
-"@ s0 linewidth 1\n"
-"@ s0 color 1\n"
-"@ s0 fill 0\n"
-"@ s0 fill with color\n"
-"@ s0 fill color 1\n"
-"@ s0 fill pattern 0\n"
-"@ s0 errorbar type BOTH\n"
-"@ s0 errorbar length 1.0\n"
-"@ s0 errorbar linewidth 1\n"
-"@ s0 errorbar linestyle 1\n"
-"@ s0 errorbar riser on\n"
-"@ s0 errorbar riser linewidth 1\n"
-"@ s0 errorbar riser linestyle 1\n"
-"@ s0 xyz 0.0, 0.0\n"
-"@ s0 comment \"%*.*s\"\n"
-"@ xaxis  tick on\n"
-"@ xaxis  tick major 1\n"
-"@ xaxis  tick minor 0.2\n"
-"@ xaxis  tick offsetx 0.0\n"
-"@ xaxis  tick offsety 0.0\n"
-"@ xaxis  label \"deviation\"\n"
-"@ xaxis  label layout para\n"
-"@ xaxis  label place spec\n"
-"@ xaxis  label place 0.0, 0.06\n"
-"@ xaxis  label char size 0.80\n"
-"@ xaxis  label font 4\n"
-"@ xaxis  label color 1\n"
-"@ xaxis  label linewidth 1\n"
-"@ xaxis  ticklabel on\n"
-"@ xaxis  ticklabel type auto\n"
-"@ xaxis  ticklabel prec 5\n"
-"@ xaxis  ticklabel format general\n"
-"@ xaxis  ticklabel append \"s\"\n"
-"@ xaxis  ticklabel prepend \"\"\n"
-"@ xaxis  ticklabel layout horizontal\n"
-"@ xaxis  ticklabel place on ticks\n"
-"@ xaxis  ticklabel skip 0\n"
-"@ xaxis  ticklabel stagger 0\n"
-"@ xaxis  ticklabel op bottom\n"
-"@ xaxis  ticklabel sign normal\n"
-"@ xaxis  ticklabel start type spec\n"
-"@ xaxis  ticklabel start -5.0\n"
-"@ xaxis  ticklabel stop type spec\n"
-"@ xaxis  ticklabel stop 5.0\n"
-"@ xaxis  ticklabel char size 0.78\n"
-"@ xaxis  ticklabel font 8\n"
-"@ xaxis  ticklabel color 1\n"
-"@ xaxis  ticklabel linewidth 1\n"
-"@ xaxis  tick major on\n"
-"@ xaxis  tick minor on\n"
-"@ xaxis  tick default 6\n"
-"@ xaxis  tick in\n"
-"@ xaxis  tick major color 1\n"
-"@ xaxis  tick major linewidth 1\n"
-"@ xaxis  tick major linestyle 1\n"
-"@ xaxis  tick minor color 7\n"
-"@ xaxis  tick minor linewidth 1\n"
-"@ xaxis  tick minor linestyle 1\n"
-"@ xaxis  tick log off\n"
-"@ xaxis  tick size 0.72\n"
-"@ xaxis  tick minor size 0.48\n"
-"@ xaxis  bar off\n"
-"@ xaxis  bar color 1\n"
-"@ xaxis  bar linestyle 1\n"
-"@ xaxis  bar linewidth 1\n"
-"@ xaxis  tick major grid off\n"
-"@ xaxis  tick minor grid off\n"
-"@ xaxis  tick op both\n"
-"@ xaxis  tick type auto\n"
-"@ xaxis  tick spec 0\n"
-"@ yaxis  tick on\n"
-"@ yaxis  tick major 8192\n"
-"@ yaxis  tick minor 2048\n"
-"@ yaxis  tick offsetx 0.0\n"
-"@ yaxis  tick offsety 0.0\n"
-"@ yaxis  label \"Level\"\n"
-"@ yaxis  label layout para\n"
-"@ yaxis  label place spec\n"
-"@ yaxis  label place 0.065000, 0.0\n"
-"@ yaxis  label char size 1.0\n"
-"@ yaxis  label font 4\n"
-"@ yaxis  label color 1\n"
-"@ yaxis  label linewidth 1\n"
-"@ yaxis  ticklabel on\n"
-"@ yaxis  ticklabel type auto\n"
-"@ yaxis  ticklabel prec 5\n"
-"@ yaxis  ticklabel format general\n"
-"@ yaxis  ticklabel append \"\"\n"
-"@ yaxis  ticklabel prepend \"\"\n"
-"@ yaxis  ticklabel layout horizontal\n"
-"@ yaxis  ticklabel place on ticks\n"
-"@ yaxis  ticklabel skip 0\n"
-"@ yaxis  ticklabel stagger 0\n"
-"@ yaxis  ticklabel op left\n"
-"@ yaxis  ticklabel sign normal\n"
-"@ yaxis  ticklabel start type auto\n"
-"@ yaxis  ticklabel start 0.0\n"
-"@ yaxis  ticklabel stop type auto\n"
-"@ yaxis  ticklabel stop 0.0\n"
-"@ yaxis  ticklabel char size 0.72\n"
-"@ yaxis  ticklabel font 4\n"
-"@ yaxis  ticklabel color 1\n"
-"@ yaxis  ticklabel linewidth 1\n"
-"@ yaxis  tick major on\n"
-"@ yaxis  tick minor on\n"
-"@ yaxis  tick default 6\n"
-"@ yaxis  tick in\n"
-"@ yaxis  tick major color 1\n"
-"@ yaxis  tick major linewidth 1\n"
-"@ yaxis  tick major linestyle 1\n"
-"@ yaxis  tick minor color 7\n"
-"@ yaxis  tick minor linewidth 1\n"
-"@ yaxis  tick minor linestyle 1\n"
-"@ yaxis  tick log off\n"
-"@ yaxis  tick size 0.72\n"
-"@ yaxis  tick minor size 0.48\n"
-"@ yaxis  bar off\n"
-"@ yaxis  bar color 1\n"
-"@ yaxis  bar linestyle 1\n"
-"@ yaxis  bar linewidth 1\n"
-"@ yaxis  tick major grid off\n"
-"@ yaxis  tick minor grid off\n"
-"@ yaxis  tick op both\n"
-"@ yaxis  tick type auto\n"
-"@ yaxis  tick spec 0\n"
-"@ zeroxaxis  tick on\n"
-"@ zeroxaxis  tick major 5\n"
-"@ zeroxaxis  tick minor 2.5\n"
-"@ zeroxaxis  tick offsetx 0.0\n"
-"@ zeroxaxis  tick offsety 0.0\n"
-"@ zeroxaxis  label \"\"\n"
-"@ zeroxaxis  label layout para\n"
-"@ zeroxaxis  label place auto\n"
-"@ zeroxaxis  label char size 1.0\n"
-"@ zeroxaxis  label font 4\n"
-"@ zeroxaxis  label color 1\n"
-"@ zeroxaxis  label linewidth 1\n"
-"@ zeroxaxis  ticklabel off\n"
-"@ zeroxaxis  ticklabel type auto\n"
-"@ zeroxaxis  ticklabel prec 5\n"
-"@ zeroxaxis  ticklabel format general\n"
-"@ zeroxaxis  ticklabel append \"\"\n"
-"@ zeroxaxis  ticklabel prepend \"\"\n"
-"@ zeroxaxis  ticklabel layout horizontal\n"
-"@ zeroxaxis  ticklabel place on ticks\n"
-"@ zeroxaxis  ticklabel skip 0\n"
-"@ zeroxaxis  ticklabel stagger 0\n"
-"@ zeroxaxis  ticklabel op bottom\n"
-"@ zeroxaxis  ticklabel sign normal\n"
-"@ zeroxaxis  ticklabel start type auto\n"
-"@ zeroxaxis  ticklabel start 0.0\n"
-"@ zeroxaxis  ticklabel stop type auto\n"
-"@ zeroxaxis  ticklabel stop 0.0\n"
-"@ zeroxaxis  ticklabel char size 1.0\n"
-"@ zeroxaxis  ticklabel font 4\n"
-"@ zeroxaxis  ticklabel color 1\n"
-"@ zeroxaxis  ticklabel linewidth 1\n"
-"@ zeroxaxis  tick major off\n"
-"@ zeroxaxis  tick minor on\n"
-"@ zeroxaxis  tick default 6\n"
-"@ zeroxaxis  tick in\n"
-"@ zeroxaxis  tick major color 1\n"
-"@ zeroxaxis  tick major linewidth 1\n"
-"@ zeroxaxis  tick major linestyle 1\n"
-"@ zeroxaxis  tick minor color 7\n"
-"@ zeroxaxis  tick minor linewidth 1\n"
-"@ zeroxaxis  tick minor linestyle 1\n"
-"@ zeroxaxis  tick log off\n"
-"@ zeroxaxis  tick size 0.72\n"
-"@ zeroxaxis  tick minor size 0.48\n"
-"@ zeroxaxis  bar off\n"
-"@ zeroxaxis  bar color 1\n"
-"@ zeroxaxis  bar linestyle 1\n"
-"@ zeroxaxis  bar linewidth 1\n"
-"@ zeroxaxis  tick major grid off\n"
-"@ zeroxaxis  tick minor grid off\n"
-"@ zeroxaxis  tick op both\n"
-"@ zeroxaxis  tick type auto\n"
-"@ zeroxaxis  tick spec 0\n"
-"@ zeroyaxis  tick on\n"
-"@ zeroyaxis  tick major 20000\n"
-"@ zeroyaxis  tick minor 10000\n"
-"@ zeroyaxis  tick offsetx 0.0\n"
-"@ zeroyaxis  tick offsety 0.0\n"
-"@ zeroyaxis  label \"\"\n"
-"@ zeroyaxis  label layout para\n"
-"@ zeroyaxis  label place auto\n"
-"@ zeroyaxis  label char size 1.0\n"
-"@ zeroyaxis  label font 4\n"
-"@ zeroyaxis  label color 1\n"
-"@ zeroyaxis  label linewidth 1\n"
-"@ zeroyaxis  ticklabel off\n"
-"@ zeroyaxis  ticklabel type auto\n"
-"@ zeroyaxis  ticklabel prec 5\n"
-"@ zeroyaxis  ticklabel format general\n"
-"@ zeroyaxis  ticklabel append \"\"\n"
-"@ zeroyaxis  ticklabel prepend \"\"\n"
-"@ zeroyaxis  ticklabel layout horizontal\n"
-"@ zeroyaxis  ticklabel place on ticks\n"
-"@ zeroyaxis  ticklabel skip 0\n"
-"@ zeroyaxis  ticklabel stagger 0\n"
-"@ zeroyaxis  ticklabel op left\n"
-"@ zeroyaxis  ticklabel sign normal\n"
-"@ zeroyaxis  ticklabel start type auto\n"
-"@ zeroyaxis  ticklabel start 0.0\n"
-"@ zeroyaxis  ticklabel stop type auto\n"
-"@ zeroyaxis  ticklabel stop 0.0\n"
-"@ zeroyaxis  ticklabel char size 1.0\n"
-"@ zeroyaxis  ticklabel font 4\n"
-"@ zeroyaxis  ticklabel color 1\n"
-"@ zeroyaxis  ticklabel linewidth 1\n"
-"@ zeroyaxis  tick major off\n"
-"@ zeroyaxis  tick minor on\n"
-"@ zeroyaxis  tick default 6\n"
-"@ zeroyaxis  tick in\n"
-"@ zeroyaxis  tick major color 1\n"
-"@ zeroyaxis  tick major linewidth 1\n"
-"@ zeroyaxis  tick major linestyle 1\n"
-"@ zeroyaxis  tick minor color 7\n"
-"@ zeroyaxis  tick minor linewidth 1\n"
-"@ zeroyaxis  tick minor linestyle 1\n"
-"@ zeroyaxis  tick log off\n"
-"@ zeroyaxis  tick size 0.72\n"
-"@ zeroyaxis  tick minor size 0.48\n"
-"@ zeroyaxis  bar off\n"
-"@ zeroyaxis  bar color 1\n"
-"@ zeroyaxis  bar linestyle 1\n"
-"@ zeroyaxis  bar linewidth 1\n"
-"@ zeroyaxis  tick major grid off\n"
-"@ zeroyaxis  tick minor grid off\n"
-"@ zeroyaxis  tick op both\n"
-"@ zeroyaxis  tick type auto\n"
-"@ zeroyaxis  tick spec 0\n"
-"@ legend on\n"
-"@ legend loctype view\n"
-"@ legend layout 0\n"
-"@ legend vgap 2\n"
-"@ legend hgap 1\n"
-"@ legend length 4\n"
-"@ legend box on\n"
-"@ legend box fill on\n"
-"@ legend box fill with color\n"
-"@ legend box fill color 0\n"
-"@ legend box fill pattern 1\n"
-"@ legend box color 1\n"
-"@ legend box linewidth 1\n"
-"@ legend box linestyle 1\n"
-"@ legend x1 0.2\n"
-"@ legend y1 0.8\n"
-"@ legend font 4\n"
-"@ legend char size 0.5\n"
-"@ legend linestyle 1\n"
-"@ legend linewidth 1\n"
-"@ legend color 1\n"
-"@ frame on\n"
-"@ frame type 0\n"
-"@ frame linestyle 1\n"
-"@ frame linewidth 1\n"
-"@ frame color 1\n"
-"@ frame fill off\n"
-"@ frame background color 0\n"
-"@WITH G0\n"
-"@G0 ON\n"
-"@TARGET S0\n"
-"@TYPE xy\n"
-;
-
-const char __2 [] =
-"#\n"
-"# ACE/gr parameter file\n"
-"#\n"
-"@version 40102\n"
-"@page layout free\n"
-"@ps linewidth begin 1\n"
-"@ps linewidth increment 2\n"
-"@hardcopy device 1\n"
-"@page 5\n"
-"@page inout 5\n"
-"@link page off\n"
-"@default linestyle 1\n"
-"@default linewidth 1\n"
-"@default color 1\n"
-"@default char size 1.0\n"
-"@default font 4\n"
-"@default font source 0\n"
-"@default symbol size 1.0\n"
-"@timestamp off\n"
-"@timestamp 0.03, 0.03\n"
-"@timestamp linewidth 1\n"
-"@timestamp color 1\n"
-"@timestamp rot 0\n"
-"@timestamp font 4\n"
-"@timestamp char size 1.0\n"
-"@timestamp def \"Wed Nov 28 22:36:22 2001\"\n"
-"@with g0\n"
-"@g0 on\n"
-"@g0 label off\n"
-"@g0 hidden false\n"
-"@g0 type xy\n"
-"@g0 autoscale type AUTO\n"
-"@g0 fixedpoint off\n"
-"@g0 fixedpoint type 0\n"
-"@g0 fixedpoint xy 0.0, 0.0\n"
-"@g0 fixedpoint format general general\n"
-"@g0 fixedpoint prec 6, 6\n"
-"@ world xmin -33500\n"
-"@ world xmax 33500\n"
-"@ world ymin 0\n"
-"@ world ymax %f\n"
-"@ stack world 0, 0, 0, 0 tick 0, 0, 0, 0\n"
-"@ view xmin 0.09\n"
-"@ view xmax 0.98\n"
-"@ view ymin 0.08\n"
-"@ view ymax 0.90\n"
-"@ title \"%*.*s\"\n"
-"@ title font 4\n"
-"@ title size 1.0\n"
-"@ title color 1\n"
-"@ title linewidth 1\n"
-"@ subtitle \"(amplitude statistics)\"\n"
-"@ subtitle font 4\n"
-"@ subtitle size 0.64\n"
-"@ subtitle color 1\n"
-"@ subtitle linewidth 1\n"
-"@ s0 symbol 0\n"
-"@ s0 symbol size 1.0\n"
-"@ s0 symbol fill 0\n"
-"@ s0 symbol color -1\n"
-"@ s0 symbol linewidth 1\n"
-"@ s0 symbol linestyle 1\n"
-"@ s0 symbol center false\n"
-"@ s0 symbol char 0\n"
-"@ s0 skip 0\n"
-"@ s0 linestyle 1\n"
-"@ s0 linewidth 1\n"
-"@ s0 color 1\n"
-"@ s0 fill 0\n"
-"@ s0 fill with color\n"
-"@ s0 fill color 1\n"
-"@ s0 fill pattern 0\n"
-"@ s0 errorbar type BOTH\n"
-"@ s0 errorbar length 1.0\n"
-"@ s0 errorbar linewidth 1\n"
-"@ s0 errorbar linestyle 1\n"
-"@ s0 errorbar riser on\n"
-"@ s0 errorbar riser linewidth 1\n"
-"@ s0 errorbar riser linestyle 1\n"
-"@ s0 xyz 0.0, 0.0\n"
-"@ s0 comment \"%*.*s\"\n"
-"@ xaxis  tick on\n"
-"@ xaxis  tick major 8192\n"
-"@ xaxis  tick minor 2048\n"
-"@ xaxis  tick offsetx 0.0\n"
-"@ xaxis  tick offsety 0.0\n"
-"@ xaxis  label \"Level\"\n"
-"@ xaxis  label layout para\n"
-"@ xaxis  label place spec\n"
-"@ xaxis  label place 0.0, 0.06\n"
-"@ xaxis  label char size 0.80\n"
-"@ xaxis  label font 4\n"
-"@ xaxis  label color 1\n"
-"@ xaxis  label linewidth 1\n"
-"@ xaxis  ticklabel on\n"
-"@ xaxis  ticklabel type auto\n"
-"@ xaxis  ticklabel prec 5\n"
-"@ xaxis  ticklabel format general\n"
-"@ xaxis  ticklabel append \"\"\n"
-"@ xaxis  ticklabel prepend \"\"\n"
-"@ xaxis  ticklabel layout horizontal\n"
-"@ xaxis  ticklabel place on ticks\n"
-"@ xaxis  ticklabel skip 0\n"
-"@ xaxis  ticklabel stagger 0\n"
-"@ xaxis  ticklabel op bottom\n"
-"@ xaxis  ticklabel sign normal\n"
-"@ xaxis  ticklabel start type spec\n"
-"@ xaxis  ticklabel start -32768\n"
-"@ xaxis  ticklabel stop type spec\n"
-"@ xaxis  ticklabel stop 32768\n"
-"@ xaxis  ticklabel char size 0.78\n"
-"@ xaxis  ticklabel font 8\n"
-"@ xaxis  ticklabel color 1\n"
-"@ xaxis  ticklabel linewidth 1\n"
-"@ xaxis  tick major on\n"
-"@ xaxis  tick minor on\n"
-"@ xaxis  tick default 6\n"
-"@ xaxis  tick out\n"
-"@ xaxis  tick major color 1\n"
-"@ xaxis  tick major linewidth 1\n"
-"@ xaxis  tick major linestyle 1\n"
-"@ xaxis  tick minor color 7\n"
-"@ xaxis  tick minor linewidth 1\n"
-"@ xaxis  tick minor linestyle 1\n"
-"@ xaxis  tick log off\n"
-"@ xaxis  tick size 0.72\n"
-"@ xaxis  tick minor size 0.48\n"
-"@ xaxis  bar off\n"
-"@ xaxis  bar color 1\n"
-"@ xaxis  bar linestyle 1\n"
-"@ xaxis  bar linewidth 1\n"
-"@ xaxis  tick major grid off\n"
-"@ xaxis  tick minor grid off\n"
-"@ xaxis  tick op both\n"
-"@ xaxis  tick type auto\n"
-"@ xaxis  tick spec 0\n"
-"@ yaxis  tick on\n"
-"@ yaxis  tick major 1\n"
-"@ yaxis  tick minor 0.2\n"
-"@ yaxis  tick offsetx 0.0\n"
-"@ yaxis  tick offsety 0.0\n"
-"@ yaxis  label \"rel. Abundance\"\n"
-"@ yaxis  label layout para\n"
-"@ yaxis  label place spec\n"
-"@ yaxis  label place 0.065000, 0.0\n"
-"@ yaxis  label char size 1.0\n"
-"@ yaxis  label font 4\n"
-"@ yaxis  label color 1\n"
-"@ yaxis  label linewidth 1\n"
-"@ yaxis  ticklabel on\n"
-"@ yaxis  ticklabel type auto\n"
-"@ yaxis  ticklabel prec 5\n"
-"@ yaxis  ticklabel format general\n"
-"@ yaxis  ticklabel append \"**2\"\n"
-"@ yaxis  ticklabel prepend \"\"\n"
-"@ yaxis  ticklabel layout horizontal\n"
-"@ yaxis  ticklabel place on ticks\n"
-"@ yaxis  ticklabel skip 0\n"
-"@ yaxis  ticklabel stagger 0\n"
-"@ yaxis  ticklabel op left\n"
-"@ yaxis  ticklabel sign normal\n"
-"@ yaxis  ticklabel start type auto\n"
-"@ yaxis  ticklabel start 0.0\n"
-"@ yaxis  ticklabel stop type auto\n"
-"@ yaxis  ticklabel stop 0.0\n"
-"@ yaxis  ticklabel char size 0.72\n"
-"@ yaxis  ticklabel font 4\n"
-"@ yaxis  ticklabel color 1\n"
-"@ yaxis  ticklabel linewidth 1\n"
-"@ yaxis  tick major on\n"
-"@ yaxis  tick minor on\n"
-"@ yaxis  tick default 6\n"
-"@ yaxis  tick in\n"
-"@ yaxis  tick major color 1\n"
-"@ yaxis  tick major linewidth 1\n"
-"@ yaxis  tick major linestyle 1\n"
-"@ yaxis  tick minor color 7\n"
-"@ yaxis  tick minor linewidth 1\n"
-"@ yaxis  tick minor linestyle 1\n"
-"@ yaxis  tick log off\n"
-"@ yaxis  tick size 0.72\n"
-"@ yaxis  tick minor size 0.48\n"
-"@ yaxis  bar off\n"
-"@ yaxis  bar color 1\n"
-"@ yaxis  bar linestyle 1\n"
-"@ yaxis  bar linewidth 1\n"
-"@ yaxis  tick major grid off\n"
-"@ yaxis  tick minor grid off\n"
-"@ yaxis  tick op both\n"
-"@ yaxis  tick type auto\n"
-"@ yaxis  tick spec 0\n"
-"@ zeroxaxis  tick on\n"
-"@ zeroxaxis  tick major 5\n"
-"@ zeroxaxis  tick minor 2.5\n"
-"@ zeroxaxis  tick offsetx 0.0\n"
-"@ zeroxaxis  tick offsety 0.0\n"
-"@ zeroxaxis  label \"\"\n"
-"@ zeroxaxis  label layout para\n"
-"@ zeroxaxis  label place auto\n"
-"@ zeroxaxis  label char size 1.0\n"
-"@ zeroxaxis  label font 4\n"
-"@ zeroxaxis  label color 1\n"
-"@ zeroxaxis  label linewidth 1\n"
-"@ zeroxaxis  ticklabel off\n"
-"@ zeroxaxis  ticklabel type auto\n"
-"@ zeroxaxis  ticklabel prec 5\n"
-"@ zeroxaxis  ticklabel format general\n"
-"@ zeroxaxis  ticklabel append \"\"\n"
-"@ zeroxaxis  ticklabel prepend \"\"\n"
-"@ zeroxaxis  ticklabel layout horizontal\n"
-"@ zeroxaxis  ticklabel place on ticks\n"
-"@ zeroxaxis  ticklabel skip 0\n"
-"@ zeroxaxis  ticklabel stagger 0\n"
-"@ zeroxaxis  ticklabel op bottom\n"
-"@ zeroxaxis  ticklabel sign normal\n"
-"@ zeroxaxis  ticklabel start type auto\n"
-"@ zeroxaxis  ticklabel start 0.0\n"
-"@ zeroxaxis  ticklabel stop type auto\n"
-"@ zeroxaxis  ticklabel stop 0.0\n"
-"@ zeroxaxis  ticklabel char size 1.0\n"
-"@ zeroxaxis  ticklabel font 4\n"
-"@ zeroxaxis  ticklabel color 1\n"
-"@ zeroxaxis  ticklabel linewidth 1\n"
-"@ zeroxaxis  tick major off\n"
-"@ zeroxaxis  tick minor on\n"
-"@ zeroxaxis  tick default 6\n"
-"@ zeroxaxis  tick out\n"
-"@ zeroxaxis  tick major color 1\n"
-"@ zeroxaxis  tick major linewidth 1\n"
-"@ zeroxaxis  tick major linestyle 1\n"
-"@ zeroxaxis  tick minor color 7\n"
-"@ zeroxaxis  tick minor linewidth 1\n"
-"@ zeroxaxis  tick minor linestyle 1\n"
-"@ zeroxaxis  tick log off\n"
-"@ zeroxaxis  tick size 0.72\n"
-"@ zeroxaxis  tick minor size 0.48\n"
-"@ zeroxaxis  bar off\n"
-"@ zeroxaxis  bar color 1\n"
-"@ zeroxaxis  bar linestyle 1\n"
-"@ zeroxaxis  bar linewidth 1\n"
-"@ zeroxaxis  tick major grid off\n"
-"@ zeroxaxis  tick minor grid off\n"
-"@ zeroxaxis  tick op both\n"
-"@ zeroxaxis  tick type auto\n"
-"@ zeroxaxis  tick spec 0\n"
-"@ zeroyaxis  tick on\n"
-"@ zeroyaxis  tick major 5\n"
-"@ zeroyaxis  tick minor 2.5\n"
-"@ zeroyaxis  tick offsetx 0.0\n"
-"@ zeroyaxis  tick offsety 0.0\n"
-"@ zeroyaxis  label \"\"\n"
-"@ zeroyaxis  label layout para\n"
-"@ zeroyaxis  label place auto\n"
-"@ zeroyaxis  label char size 1.0\n"
-"@ zeroyaxis  label font 4\n"
-"@ zeroyaxis  label color 1\n"
-"@ zeroyaxis  label linewidth 1\n"
-"@ zeroyaxis  ticklabel off\n"
-"@ zeroyaxis  ticklabel type auto\n"
-"@ zeroyaxis  ticklabel prec 5\n"
-"@ zeroyaxis  ticklabel format general\n"
-"@ zeroyaxis  ticklabel append \"\"\n"
-"@ zeroyaxis  ticklabel prepend \"\"\n"
-"@ zeroyaxis  ticklabel layout horizontal\n"
-"@ zeroyaxis  ticklabel place on ticks\n"
-"@ zeroyaxis  ticklabel skip 0\n"
-"@ zeroyaxis  ticklabel stagger 0\n"
-"@ zeroyaxis  ticklabel op left\n"
-"@ zeroyaxis  ticklabel sign normal\n"
-"@ zeroyaxis  ticklabel start type auto\n"
-"@ zeroyaxis  ticklabel start 0.0\n"
-"@ zeroyaxis  ticklabel stop type auto\n"
-"@ zeroyaxis  ticklabel stop 0.0\n"
-"@ zeroyaxis  ticklabel char size 1.0\n"
-"@ zeroyaxis  ticklabel font 4\n"
-"@ zeroyaxis  ticklabel color 1\n"
-"@ zeroyaxis  ticklabel linewidth 1\n"
-"@ zeroyaxis  tick major off\n"
-"@ zeroyaxis  tick minor on\n"
-"@ zeroyaxis  tick default 6\n"
-"@ zeroyaxis  tick in\n"
-"@ zeroyaxis  tick major color 1\n"
-"@ zeroyaxis  tick major linewidth 1\n"
-"@ zeroyaxis  tick major linestyle 1\n"
-"@ zeroyaxis  tick minor color 7\n"
-"@ zeroyaxis  tick minor linewidth 1\n"
-"@ zeroyaxis  tick minor linestyle 1\n"
-"@ zeroyaxis  tick log off\n"
-"@ zeroyaxis  tick size 0.72\n"
-"@ zeroyaxis  tick minor size 0.48\n"
-"@ zeroyaxis  bar off\n"
-"@ zeroyaxis  bar color 1\n"
-"@ zeroyaxis  bar linestyle 1\n"
-"@ zeroyaxis  bar linewidth 1\n"
-"@ zeroyaxis  tick major grid off\n"
-"@ zeroyaxis  tick minor grid off\n"
-"@ zeroyaxis  tick op both\n"
-"@ zeroyaxis  tick type auto\n"
-"@ zeroyaxis  tick spec 0\n"
-"@ legend on\n"
-"@ legend loctype view\n"
-"@ legend layout 0\n"
-"@ legend vgap 2\n"
-"@ legend hgap 1\n"
-"@ legend length 4\n"
-"@ legend box on\n"
-"@ legend box fill on\n"
-"@ legend box fill with color\n"
-"@ legend box fill color 0\n"
-"@ legend box fill pattern 1\n"
-"@ legend box color 1\n"
-"@ legend box linewidth 1\n"
-"@ legend box linestyle 1\n"
-"@ legend x1 0.2\n"
-"@ legend y1 0.8\n"
-"@ legend font 4\n"
-"@ legend char size 0.5\n"
-"@ legend linestyle 1\n"
-"@ legend linewidth 1\n"
-"@ legend color 1\n"
-"@ frame on\n"
-"@ frame type 0\n"
-"@ frame linestyle 1\n"
-"@ frame linewidth 1\n"
-"@ frame color 1\n"
-"@ frame fill off\n"
-"@ frame background color 0\n"
-"@WITH G0\n"
-"@G0 ON\n"
-"@TARGET S0\n"
-"@TYPE xy\n"
-;
-
-
-const char __9 [] =
-"&\n";
-
-
-#if defined HAVE_INCOMPLETE_READ  &&  FILEIO != 1
-
-size_t
-complete_read ( int fd, void* dest, size_t bytes )
-{
-    size_t  bytesread = 0;
-    size_t  ret;
-
-    while ( bytes > 0 ) {
-        ret = read ( fd, dest, bytes );
-        if ( ret == 0  ||  ret == (size_t)-1 )
-            break;
-        dest       = (void*)(((char*)dest) + ret);
-        bytes     -= ret;
-        bytesread += ret;
-    }
-    return bytesread;
-}
-
-#endif
-
-
-static int
-Stat ( const char* filename, Uint8_t p[4][65536] )
-{
-    FILE*          fp;
-    Int16_t        buff [2048];
-    Uint32_t       header [11];
-    size_t         len;
-    size_t         i;
-    Uint16_t       val;
-    unsigned long  samples = -1;
-    unsigned long  sread   =  0;
-    char*          ext = NULL==strrchr (filename, '.')  ?  ""  :  strrchr (filename, '.') + 1;
-
-    if ( 0 == strcasecmp (ext, "pac") ) {
-        if ((fp = pipeopen ( "lpac -x -o #", filename)) == NULL) {
-            stderr_printf ( "Can't decode '%s'\n", filename );
-            exit (9);
-        } else {
-            stderr_printf ( "PAC-File: %s", filename );
-            if (fread ( header, 4, 11, fp ) != 11 )
-                return -1;
-            samples = header[10] / 2;
-        }
-    }
-    else if ( 0 == strcasecmp (ext, "mpc")  ||  0 == strcasecmp (ext, "mp+")  ||  0 == strcasecmp (ext, "mpp") ) {
-        if ((fp = pipeopen ( "mppdec --silent - - < #", filename)) == NULL) {
-            stderr_printf ( "Can't decode '%s'\n", filename );
-            exit (9);
-        } else {
-            stderr_printf ( "MPEGplus-File: %s", filename );
-            if (fread ( header, 4, 11, fp ) != 11 )
-                return -1;
-        }
-    }
-    else if ( 0 == strcmp (ext, "mp3") ) {
-        if ((fp = pipeopen ( "mpg123 --quiet --stereo --wav - # 2> /dev/null", filename)) == NULL) {
-            stderr_printf ( "Can't decode '%s'\n", filename );
-            exit (9);
-        } else {
-            stderr_printf ( "MP3-File: %s", filename );
-            if (fread ( header, 4, 11, fp ) != 11 )
-                return -1;
-        }
-    }
-    else if ( 0 == strcmp (ext, "wav") ) {
-        if ((fp = fopen ( filename, "rb" )) == NULL) {
-            stderr_printf ( "Can't open '%s'\n", filename );
-            exit (9);
-        } else {
-            stderr_printf ( "Wav-File: %s", filename );
-            if (fread ( header, 4, 11, fp ) != 11 )
-                return -1;
-            samples = header[10] / 2;
-        }
-    }
-    else if ( 0 == strcmp (filename, "-") ) {
-        fp = stdin;
-        stderr_printf ( "Unknown Format: stdin" );
-    }
-    else {
-        if ((fp = fopen ( filename, "rb" )) == NULL) {
-            stderr_printf ( "Can't open '%s'\n", filename );
-            exit (9);
-        } else {
-            stderr_printf ( "Unknown Format: %s", filename );
-        }
-    }
-
-    if ( (Uint32_t)-1 != samples )
-        stderr_printf ( " (%lu.%03lu.%03lu samples) ", samples/1000000/2, samples/1000/2 % 1000, samples/2 % 1000 );
-    else
-        stderr_printf ( " (unknown number of samples) ");
-
-    memset ( p, 0, 4 * 65536 );
-
-    while (( len = fread (buff, 2, samples < sizeof(buff)/sizeof(*buff) ? samples : sizeof(buff)/sizeof(*buff), fp) ) > 0 ) {
-        samples -= len;
-        sread   += len;
-        for ( i = 0; i < len; i++ ) {
-            val = (Uint16_t) buff[i];
-            if (++p[0][val] == 0)
-                if (++p[1][val] == 0)
-                    if (++p[2][val] == 0)
-                        ++p[3][val];
-        }
-        if ( sread % 5242880 == 0 )
-            stderr_printf ( "*");
-    }
-
-    stderr_printf ( "\n");
-    PCLOSE (fp);
-    return 0;
-}
-
-
-static double
-inverfc (double x )
-{
-#ifdef _WIN32
-    return dierfc (x) * sqrt (2.);
-#else
-    double  ret = 0;
-    int     i;
-
-    if ( x > 1 )
-        return -inverfc (2.-x);
-
-    for ( i = 0; i < 32; i++ ) {
-        if ( erfc (ret + 4./(1LU<<i)) >= x )
-            ret += 4. / (1LU << i);
-    }
-
-    return ret * sqrt(2.);
-#endif
-}
-
-static void
-analyseFile ( const char* name )
-{
-    Uint8_t  p [4] [65536];
-    long     __q   [65536];
-    long*    q = __q + 32768;
-    long     qmax;
-    double   __s   [65536];
-    double*  s = __s + 32768;
-    long     i;
-    double   tot;
-    double   sum;
-    char     dstname [1024];
-    int      len = NULL==strrchr (name, '.')  ?  strlen (name)  :  strrchr (name, '.') - name;
-
-    if ( Stat (name, p) < 0 )
-        return;
-
-    for ( i = 0; i < 65536; i++ )
-        __q [(Uint16_t)(i+0x8000)] = p[0][i] + 256*p[1][i] + 65536*p[2][i] + 16777216*p[3][i];
-
-    sum = 0.;
-    for ( i = -32768; i < 32768; i++ ) {
-        s[i] = 2. * sum + q[i];
-        sum += q[i];
-    }
-    tot = sum;
-    for ( i = 32767; i >= 0; i-- ) {
-        s[i] = 2. * sum - q[i];
-        sum -= q[i];
-    }
-
-    sprintf (dstname, DIRECTORY"/%*.*s.xmgr-1", len, len, name );
-    if ( NULL == freopen (dstname, "w", stdout) ) {
-        stderr_printf ("Can't create '%s'\n", dstname);
-        return;
-    }
-
-    printf ( __1, len, len, name, len, len, name );
-    for ( i = -32768; i < 32768; i++ ) {
-        if ( s[i-1] != s[i]  ||  s[i] != s[i+1] )
-            printf ( "%7.4f\t%6ld\n", inverfc (s[i] / tot), -i );
-    }
-    puts (__9);
-
-#ifdef GNUPLOT
-    sprintf ( dstname, DIRECTORY"/%s", GetTitleFromFilename (name) );
-    if ( NULL == freopen (dstname, "w", stdout) ) {
-        stderr_printf ( "Can't create '%s'\n", dstname );
-        return;
-    }
-    for ( i = -32768; i < 32768; i++ ) {
-        if ( s[i-1] != s[i]  ||  s[i] != s[i+1] )
-            printf ( "%7.4f\t%6ld\n", inverfc (s[i] / tot), -i );
-    }
-#endif
-
-    sprintf ( dstname, DIRECTORY"/%s.xmgr-2", GetTitleFromFilename (name) );
-    if ( NULL == freopen (dstname, "w", stdout) ) {
-        stderr_printf ( "Can't create '%s'\n", dstname );
-        return;
-    }
-    qmax = 0;
-    for ( i = -32768; i < 32768; i += i != -64 ? 1 : 128 ) {
-        if ( q[i] > qmax )
-            qmax = q[i];
-    }
-    printf ( __2, 256.*1.01/sqrt(sum) * (sqrt ( (qmax+1)) - 1 ), len, len, name, len, len, name );
-    for ( i = -32768; i < 32768;  i++ ) {
-        double tmp = abs(i) < 32 ? (q[32]*(i+32) + q[-32]*(32-i))/64. : q[i];
-        printf ( "%6ld\t%8.6f\n", i, 256. / sqrt(sum) * ( sqrt(tmp+1) - 1 ) );
-    }
-    puts (__9);
-
-    fflush (stdout);
-    return;
-}
-
-
-int Cdecl
-main ( int argc, char** argv )
-{
-    int  i;
-
-    MKDIR (DIRECTORY, 0777);
-
-    for ( i = 1; i < argc; i++ )
-        analyseFile ( argv [i] );
-
-#ifdef GNUPLOT
-    return gnuplot ( argc, argv );
-#endif
-
-    return 0;
-}
-
-/* end of stat.c */
Index: penc/branches/zorg/clipstat.dsp
===================================================================
--- /mppenc/branches/zorg/clipstat.dsp	(revision 40)
+++ 	(revision )
@@ -1,108 +1,0 @@
-# Microsoft Developer Studio Project File - Name="clipstat" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=clipstat - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "clipstat.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "clipstat.mak" CFG="clipstat - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "clipstat - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "clipstat - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "clipstat - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "clipstat___Win32_Release"
-# PROP BASE Intermediate_Dir "clipstat___Win32_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MPP_DECODER" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "clipstat - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "clipstat___Win32_Debug"
-# PROP BASE Intermediate_Dir "clipstat___Win32_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MPP_DECODER" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "clipstat - Win32 Release"
-# Name "clipstat - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\clipstat.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\pipeopen.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\stderr.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
Index: penc/branches/zorg/clipstat.vcproj
===================================================================
--- /mppenc/branches/zorg/clipstat.vcproj	(revision 40)
+++ 	(revision )
@@ -1,202 +1,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="clipstat"
-	SccProjectName=""
-	SccLocalPath="">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\Debug"
-			IntermediateDirectory=".\Debug"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;MPP_DECODER"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Debug/clipstat.pch"
-				AssemblerListingLocation=".\Debug/"
-				ObjectFile=".\Debug/"
-				ProgramDataBaseFileName=".\Debug/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=".\Debug/clipstat.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile=".\Debug/clipstat.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Debug/clipstat.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\Release"
-			IntermediateDirectory=".\Release"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;MPP_DECODER"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Release/clipstat.pch"
-				AssemblerListingLocation=".\Release/"
-				ObjectFile=".\Release/"
-				ProgramDataBaseFileName=".\Release/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=".\Release/clipstat.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				ProgramDatabaseFile=".\Release/clipstat.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Release/clipstat.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
-			<File
-				RelativePath="clipstat.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="pipeopen.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="stderr.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: penc/branches/zorg/codepage.c
===================================================================
--- /mppenc/branches/zorg/codepage.c	(revision 40)
+++ 	(revision )
@@ -1,64 +1,0 @@
-#include <stdio.h>
-#include <windows.h>
-
-/*
-int
-MultiByteToWideChar ( UINT      CodePage,           // code page
-                      DWORD     dwFlags,            // character-type options
-                      LPCSTR    lpMultiByteStr,     // address of string to map
-                      int       cchMultiByte,       // number of bytes in string
-                      LPWSTR    lpWideCharStr,      // address of wide-character buffer
-                      int       cchWideChar         // size of buffer
-);
-*/
-
-void
-test ( int CP )
-{
-    int      i;
-    int      j;
-    char     b [16];
-    wchar_t  a [ 8];
-    int      count = 0;
-
-    fprintf (stderr, "Codepage %u\n", CP );
-
-    for ( i = 1; i < 256; i++ ) {
-        b [0] = i;
-        if ( i == 2  &&  count == 0 )
-            return;
-        if ( 1 == MultiByteToWideChar ( CP, 0, b, 1, a, 8 )  &&  a[0] != 0 ) {
-            if ( count == 0 )
-                printf ("\n\n\n****** CP-%u ******\n\n", CP );
-            printf ("CP-%-4u    %02X  u%04X\n", CP, i, a[0] );
-            count++;
-        } else {
-            for ( j = 1; j < 256; j++ ) {
-                b [0] = i;
-                b [1] = j;
-                // printf ("\r%02u %02u", i, j );
-                if ( 1 == MultiByteToWideChar ( CP, 0, b, 2, a, 8 )  &&  a[0] != 0x30FB ) {
-                    if ( count == 0 )
-                        printf ("\n\n\n****** CP-%u ******\n\n", CP );
-                    printf ("CP-%-4u  %02X%02X  u%04X\n", CP, i, j, a[0] ),
-                    count++;
-                }
-            }
-        }
-    }
-
-    fflush ( stdout);
-}
-
-int
-main ( int argc, char** argv )
-{
-    int  i;
-
-    freopen ( "codepage.txt", "w", stdout );
-
-    for ( i = 0; i <= 11000; i++ )
-        test ( i );
-
-   return 0;
-}
Index: penc/branches/zorg/codepage.dsp
===================================================================
--- /mppenc/branches/zorg/codepage.dsp	(revision 40)
+++ 	(revision )
@@ -1,108 +1,0 @@
-# Microsoft Developer Studio Project File - Name="codepage" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=codepage - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "codepage.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "codepage.mak" CFG="codepage - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "codepage - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "codepage - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "codepage - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "codepage - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ  /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ  /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "codepage - Win32 Release"
-# Name "codepage - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\codepage.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# Begin Group "Results"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\codepage.txt
-# End Source File
-# End Group
-# End Target
-# End Project
Index: penc/branches/zorg/codepage.vcproj
===================================================================
--- /mppenc/branches/zorg/codepage.vcproj	(revision 40)
+++ 	(revision )
@@ -1,173 +1,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="codepage"
-	SccProjectName=""
-	SccLocalPath="">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\Debug"
-			IntermediateDirectory=".\Debug"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Debug/codepage.pch"
-				AssemblerListingLocation=".\Debug/"
-				ObjectFile=".\Debug/"
-				ProgramDataBaseFileName=".\Debug/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=".\Debug/codepage.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile=".\Debug/codepage.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Debug/codepage.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\Release"
-			IntermediateDirectory=".\Release"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Release/codepage.pch"
-				AssemblerListingLocation=".\Release/"
-				ObjectFile=".\Release/"
-				ProgramDataBaseFileName=".\Release/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=".\Release/codepage.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				ProgramDatabaseFile=".\Release/codepage.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Release/codepage.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
-			<File
-				RelativePath="codepage.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-		<Filter
-			Name="Results"
-			Filter="">
-			<File
-				RelativePath="codepage.txt">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: penc/branches/zorg/config.c
===================================================================
--- /mppenc/branches/zorg/config.c	(revision 40)
+++ 	(revision )
@@ -1,263 +1,0 @@
-#include <stdio.h>
-#include <limits.h>
-#define  NOT_INCLUDE_CONFIG_H
-#include "mppdec.h"
-
-
-static void
-version ( FILE* fp )
-{
-    FILE*  fpi = fopen ("version", "r");
-    char   buff [256];
-    char   version [16];
-
-    fprintf ( fp, "/* parsed values from file \"version\" */\n\n" );
-    while ( fgets ( buff, sizeof buff, fpi ) ) {
-        if ( 1 == sscanf ( buff, "MPPDEC_VERSION=%15[0-9.a-z]", version ) ) {
-            fprintf ( fp, "#ifndef MPPDEC_VERSION\n# define MPPDEC_VERSION   \"%s\"\n#endif\n\n", version );
-            switch ( version[3]-'0' ) {
-            case 1: case 3: case 5: case 7: case 9:
-                fprintf ( fp, "#define MPPDEC_BUILD  \"--Alpha--\"\n\n" );
-                break;
-            case 2: case 4: case 6: case 8:
-                fprintf ( fp, "#define MPPDEC_BUILD  \"-Beta-\"\n\n" );
-                break;
-            case 0:
-                fprintf ( fp, "#define MPPDEC_BUILD  \"Release\"\n\n" );
-                break;
-            }
-        }
-        else
-        if ( 1 == sscanf ( buff, "MPPENC_VERSION=%15[0-9.a-z]", version ) ) {
-            fprintf ( fp, "#ifndef MPPENC_VERSION\n# define MPPENC_VERSION   \"%s\"\n#endif\n\n", version );
-            switch ( version[3]-'0' ) {
-            case 1: case 3: case 5: case 7: case 9:
-                fprintf ( fp, "#define MPPENC_BUILD  \"--Alpha--\"\n\n" );
-                break;
-            case 2: case 4: case 6: case 8:
-                fprintf ( fp, "#define MPPENC_BUILD  \"-Beta-\"\n\n" );
-                break;
-            case 0:
-                fprintf ( fp, "#define MPPENC_BUILD  \"Release\"\n\n" );
-                break;
-            }
-        }
-    }
-
-    fclose (fpi);
-
-}
-
-
-
-unsigned long   v_lng = (unsigned long ) 0x8877665544332211L;
-unsigned short  v_sht = (unsigned short) 0x8877665544332211L;
-unsigned int    v_int = (unsigned int  ) 0x8877665544332211L;
-
-unsigned char*  lo = (unsigned char*) &v_lng;
-unsigned char*  sh = (unsigned char*) &v_sht;
-unsigned char*  in = (unsigned char*) &v_int;
-
-#define ROUND32_1(x)   ( floattmp = (x) + (Int32_t)0x00FF8000L, *(Int32_t*)(&floattmp) - (Int32_t)0x4B7F8000L )
-#define ROUND32_2(x)   ( (Int32_t) floor ((x) + 0.5) )
-
-#define ROUND64_1(x)   ( doubletmp = (x) + (Int64_t)0x001FFFFF80000000L, *(Int64_t*)(&doubletmp) - (Int64_t)0x433FFFFF80000000L )
-#define ROUND64_2(x)   ( (Int64_t) floor ((x) + 0.5) )
-
-
-int
-test_round_16 ( float x )
-{
-    float    floattmp;
-    Int32_t  tmp1 = ROUND32_1 (x);
-    Int32_t  tmp2 = ROUND32_2 (x);
-
-    if ( tmp1 != tmp2 )
-        return 1;
-
-    return 0;
-}
-
-
-int
-test_round_32 ( double x )
-{
-#ifdef NO_INT64_T
-    return 1;
-#else
-    double   doubletmp;
-    Int64_t  tmp1 = ROUND64_1 (x);
-    Int64_t  tmp2 = ROUND64_2 (x);
-
-    if ( tmp1 != tmp2 )
-        return 1;
-
-    return 0;
-#endif
-}
-
-
-static void
-Convert_to_80bit_BE_IEEE854_Float ( unsigned char* p, long double val )
-{
-    unsigned long  word32 = 0x401E;
-
-    if ( val > 0.L )
-        while ( val < (long double)0x80000000 )
-            word32--, val *= 2.L;
-
-    *p++   = (Uint8_t)(word32 >>  8);
-    *p++   = (Uint8_t)(word32 >>  0);
-    word32 = (Uint32_t) val;
-    *p++   = (Uint8_t)(word32 >> 24);
-    *p++   = (Uint8_t)(word32 >> 16);
-    *p++   = (Uint8_t)(word32 >>  8);
-    *p++   = (Uint8_t)(word32 >>  0);
-    word32 = (Uint32_t) ( (val - word32) * 4294967296.L );
-    *p++   = (Uint8_t)(word32 >> 24);
-    *p++   = (Uint8_t)(word32 >> 16);
-    *p++   = (Uint8_t)(word32 >>  8);
-    *p++   = (Uint8_t)(word32 >>  0);
-}
-
-
-int
-test_long_double ( int endian )
-{
-    long double           val;
-    unsigned char         p [10];
-    const unsigned char*  q = (const unsigned char*) & val;
-    int                   i;
-
-    if ( sizeof (val) < 10  ||  sizeof(val) > 16 )
-        return 0;
-    if ( endian == 0 )
-        return 0;
-
-    for ( val = 4.29e9; val >= 1.e-35; val *= 0.999 ) {
-        Convert_to_80bit_BE_IEEE854_Float ( p, val );
-        for ( i = 0; i < 10; i++ )
-            if ( p[i] != q[endian==2 ? i : 9-i] ) {
-                printf ("%40.30Lf ", val );
-                for ( i = 0; i<10; i++ ) printf ("%02X %02X  ", p[i], q[endian==2 ? i : 9-i] );
-                printf ("\n");
-                return 0;
-            }
-    }
-
-    return 1;
-}
-
-
-int
-main ( int argc, char** argv )
-{
-    int           flag = 0;  // Bit 0: little, Bit 1: big, Bit 2: unknown
-    unsigned int  k;
-    long          m;
-    FILE*         fp   = fopen ( "config.h", "w" );
-    int           endian;
-
-    if ( fp == NULL ) {
-        fprintf ( stderr, "config: Can't write 'config.h'\n");
-        return 1;
-    }
-
-    if ( argc > 1 )
-        fprintf ( stderr, "\n*** Compile sources with ***\n\n%s\n\n", argv[1] );
-
-    if ( argc > 2 )
-        fprintf ( stderr, "\n*** Execute binary with ***\n\n%s\n\n", argv[2] );
-
-    fprintf ( fp, "\n" );
-    fprintf ( fp, "/* Determine Endianess of the machine */\n" );
-    fprintf ( fp, "\n" );
-    fprintf ( fp, "#define HAVE_LITTLE_ENDIAN  1234\n" );
-    fprintf ( fp, "#define HAVE_BIG_ENDIAN     4321\n" );
-    fprintf ( fp, "\n" );
-
-        flag = 0;
-    for ( k = 0; k < sizeof(v_int); k++ )
-        if      ( in[k] == 0x11 * (k+1)             ) flag |= 1;
-        else if ( in[k] == 0x11 * (sizeof(v_int)-k) ) flag |= 2;
-        else                                          flag |= 4;
-
-    for ( k = 0; k < sizeof(v_lng); k++ )
-        if      ( lo[k] == 0x11 * (k+1)             ) flag |= 1;
-        else if ( lo[k] == 0x11 * (sizeof(v_lng)-k) ) flag |= 2;
-        else                                          flag |= 4;
-
-    for ( k = 0; k < sizeof(v_sht); k++ )
-        if      ( sh[k] == 0x11 * (k+1)             ) flag |= 1;
-        else if ( sh[k] == 0x11 * (sizeof(v_sht)-k) ) flag |= 2;
-        else                                          flag |= 4;
-
-    switch (flag) {
-    case 1:
-        endian = 1;
-        fprintf ( fp, "#define ENDIAN              HAVE_LITTLE_ENDIAN\n" );
-        break;
-    case 2:
-        endian = 2;
-        fprintf ( fp, "#define ENDIAN              HAVE_BIG_ENDIAN\n" );
-        break;
-    default:
-        endian = 0;
-        fprintf ( fp, "/* unknown endianess */\n" );
-        break;
-
-    }
-    fprintf ( fp, "\n" );
-
-
-    fprintf ( fp, "\n" );
-    fprintf ( fp, "/* Test the fast float-to-int rounding trick works */\n" );
-    fprintf ( fp, "\n" );
-    flag = 0;
-    for ( m = 0; m <= 32767; m++ ) {
-        flag |= test_round_16 ( (float)(+m - 0.499) );
-        flag |= test_round_16 ( (float)(+m        ) );
-        flag |= test_round_16 ( (float)(+m + 0.499) );
-        flag |= test_round_16 ( (float)(-m - 0.499) );
-        flag |= test_round_16 ( (float)(-m        ) );
-        flag |= test_round_16 ( (float)(-m + 0.499) );
-    }
-    if ( flag == 0 )
-        fprintf ( fp, "#define HAVE_IEEE754_FLOAT\n" );
-    else
-        fprintf ( fp, "/* #define HAVE_IEEE754_FLOAT */\n" );
-
-
-    flag = 0;
-    for ( m = 0; (unsigned long)m <= 0x7FFFFFFF; m += 1 + (m>>16) ) {
-        flag |= test_round_32 ( +m - 0.499 );
-        flag |= test_round_32 ( +m         );
-        flag |= test_round_32 ( +m + 0.499 );
-        flag |= test_round_32 ( -m - 0.499 );
-        flag |= test_round_32 ( -m         );
-        flag |= test_round_32 ( -m + 0.499 );
-    }
-    if ( flag == 0 )
-        fprintf ( fp, "#define HAVE_IEEE754_DOUBLE\n" );
-    else
-        fprintf ( fp, "/* #define HAVE_IEEE754_DOUBLE */\n" );
-    fprintf ( fp, "\n" );
-
-
-    fprintf ( fp, "\n" );
-    fprintf ( fp, "/* Test the presence of a 80 bit floating point type for writing AIFF headers */\n" );
-    fprintf ( fp, "\n" );
-    if ( test_long_double(endian) )
-        fprintf ( fp, "#define HAVE_IEEE854_LONGDOUBLE\n" );
-    else
-        fprintf ( fp, "/* #define HAVE_IEEE854_LONGDOUBLE */\n" );
-
-
-    fprintf ( fp, "\n\n" );
-    version ( fp );
-    fprintf ( fp, "/* end of config.h */\n" );
-    fclose (fp);
-    return 0;
-}
-
-/* end of config.h */
Index: penc/branches/zorg/config.dsp
===================================================================
--- /mppenc/branches/zorg/config.dsp	(revision 40)
+++ 	(revision )
@@ -1,102 +1,0 @@
-# Microsoft Developer Studio Project File - Name="config" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=config - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "config.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "config.mak" CFG="config - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "config - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "config - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "config - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MPP_ENCODER" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "config - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MPP_ENCODER" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "config - Win32 Release"
-# Name "config - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\config.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
Index: penc/branches/zorg/config.h
===================================================================
--- /mppenc/branches/zorg/config.h	(revision 40)
+++ 	(revision )
@@ -1,54 +1,0 @@
-/*
- * Musepack audio compression
- * Copyright (C) 1999-2004 Buschmann/Klemm/Piecha/Wolf
- *
- * 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.1 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
- */
-
-
-/* Determine Endianess of the machine */
-
-#define HAVE_LITTLE_ENDIAN  1234
-#define HAVE_BIG_ENDIAN     4321
-
-#define ENDIAN              HAVE_LITTLE_ENDIAN
-
-
-/* Test the fast float-to-int rounding trick works */
-
-#define HAVE_IEEE754_FLOAT
-#define HAVE_IEEE754_DOUBLE
-
-
-/* Test the presence of a 80-bit floating point type for writing AIFF headers */
-
-#define HAVE_IEEE854_LONGDOUBLE
-
-
-/* parsed values from file "version" */
-
-#ifndef MPPDEC_VERSION
-# define MPPDEC_VERSION   "1.15v"
-#endif
-
-#define MPPDEC_BUILD  "--Alpha--"
-
-#ifndef MPPENC_VERSION
-# define MPPENC_VERSION   "1.15v"
-#endif
-
-#define MPPENC_BUILD  "--Alpha--"
-
-/* end of config.h */
Index: penc/branches/zorg/config.vcproj
===================================================================
--- /mppenc/branches/zorg/config.vcproj	(revision 40)
+++ 	(revision )
@@ -1,166 +1,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="config"
-	SccProjectName=""
-	SccLocalPath="">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\Debug"
-			IntermediateDirectory=".\Debug"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;MPP_ENCODER"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Debug/config.pch"
-				AssemblerListingLocation=".\Debug/"
-				ObjectFile=".\Debug/"
-				ProgramDataBaseFileName=".\Debug/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=".\Debug/config.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile=".\Debug/config.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Debug/config.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\Release"
-			IntermediateDirectory=".\Release"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;MPP_ENCODER"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Release/config.pch"
-				AssemblerListingLocation=".\Release/"
-				ObjectFile=".\Release/"
-				ProgramDataBaseFileName=".\Release/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=".\Release/config.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				ProgramDatabaseFile=".\Release/config.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Release/config.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
-			<File
-				RelativePath="config.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: penc/branches/zorg/cvd-new.c
===================================================================
--- /mppenc/branches/zorg/cvd-new.c	(revision 40)
+++ 	(revision )
@@ -1,243 +1,0 @@
-#include "mppenc.h"
-
-/* C O N S T A N T S */
-// from MatLab-Simulation (Fourier-transforms of the Cos-Rolloff)
-#if 0
-static const float  Puls [11] = {
-    -0.02724753942504f, -0.10670808991329f, -0.06198987803623f,  0.18006206051664f,
-     0.49549552704050f,  0.64201253447071f,  0.49549552704050f,  0.18006206051664f,
-    -0.06198987803623f, -0.10670808991329f, -0.02724753942504f
-};
-#endif
-
-static const float  Puls [ 9] = {
-    -0.10670808991329f, -0.06198987803623f,  0.18006206051664f,  0.49549552704050f,
-     0.64201253447071f,  0.49549552704050f,  0.18006206051664f, -0.06198987803623f,
-    -0.10670808991329f
-};
-
-/*
-// Generating the Cos-Rolloff of the Cepstral-analysis, Cos-Rolloff from 5512,5 Hz to 11025 Hz
-// for ( k = 0; k <= 1024; k++ ) {
-//     if      (k < 256) CosWin [k-256] = 1;
-//     else if (k < 512) CosWin [k-256] = 0.5 + 0.5*cos (M_PI*(k-256)/256);
-//     else              CosWin [k-256] = 0;
-// }
-*/
-static const float  CosWin [256] = {
-    1.0000000000000000f, 0.9999623298645020f, 0.9998494386672974f, 0.9996612071990967f, 0.9993977546691895f, 0.9990590810775757f, 0.9986452460289002f, 0.9981563091278076f, 0.9975923895835877f, 0.9969534873962402f, 0.9962397813796997f, 0.9954513311386108f, 0.9945882558822632f, 0.9936507344245911f, 0.9926388263702393f, 0.9915527701377869f, 0.9903926253318787f, 0.9891586899757385f, 0.9878510832786560f, 0.9864699840545654f, 0.9850156307220459f, 0.9834882616996765f, 0.9818880558013916f, 0.9802152514457703f, 0.9784701466560364f, 0.9766530394554138f, 0.9747641086578369f, 0.9728036522865295f, 0.9707720279693604f, 0.9686695337295532f, 0.9664964079856873f, 0.9642530679702759f, 0.9619397521018982f, 0.9595569372177124f, 0.9571048617362976f, 0.9545840024948120f, 0.9519946575164795f, 0.9493372440338135f, 0.9466121792793274f, 0.9438198208808899f, 0.9409606456756592f, 0.9380350708961487f, 0.9350435137748718f, 0.9319864511489868f, 0.9288643002510071f, 0.9256775975227356f, 0.9224267601966858f, 0.9191123247146606f, 0.9157348275184631f, 0.9122946262359619f, 0.9087924361228943f, 0.9052286148071289f, 0.9016037583351135f, 0.8979184627532959f, 0.8941732048988342f, 0.8903686404228210f, 0.8865052461624146f, 0.8825836181640625f, 0.8786044120788574f, 0.8745682239532471f, 0.8704755902290344f, 0.8663271069526672f, 0.8621235489845276f, 0.8578653931617737f,
-    0.8535534143447876f, 0.8491881489753723f, 0.8447702527046204f, 0.8403005003929138f, 0.8357794880867004f, 0.8312078714370728f, 0.8265864253044128f, 0.8219157457351685f, 0.8171966671943665f, 0.8124297261238098f, 0.8076158165931702f, 0.8027555346488953f, 0.7978496551513672f, 0.7928989529609680f, 0.7879040837287903f, 0.7828658819198608f, 0.7777851223945618f, 0.7726625204086304f, 0.7674987912178040f, 0.7622948288917542f, 0.7570513486862183f, 0.7517691850662231f, 0.7464491128921509f, 0.7410919070243835f, 0.7356983423233032f, 0.7302693724632263f, 0.7248056530952454f, 0.7193081378936768f, 0.7137775421142578f, 0.7082147598266602f, 0.7026206851005554f, 0.6969960331916809f, 0.6913416981697083f, 0.6856585741043091f, 0.6799474954605103f, 0.6742093563079834f, 0.6684449315071106f, 0.6626551747322083f, 0.6568408608436585f, 0.6510030031204224f, 0.6451423168182373f, 0.6392598152160645f, 0.6333563923835754f, 0.6274328231811523f, 0.6214900612831116f, 0.6155290603637695f, 0.6095505952835083f, 0.6035556793212891f, 0.5975451469421387f, 0.5915199518203735f, 0.5854809284210205f, 0.5794290900230408f, 0.5733652114868164f, 0.5672903656959534f, 0.5612053275108337f, 0.5551111102104187f, 0.5490085482597351f, 0.5428986549377441f, 0.5367822647094727f, 0.5306603908538818f, 0.5245338082313538f, 0.5184035897254944f, 0.5122706294059753f, 0.5061357617378235f,
-    0.5000000000000000f, 0.4938642382621765f, 0.4877294003963471f, 0.4815963804721832f, 0.4754661619663239f, 0.4693396389484406f, 0.4632177054882050f, 0.4571013450622559f, 0.4509914219379425f, 0.4448888897895813f, 0.4387946724891663f, 0.4327096343040466f, 0.4266347587108612f, 0.4205709397792816f, 0.4145190417766571f, 0.4084800481796265f, 0.4024548530578613f, 0.3964443206787109f, 0.3904493749141693f, 0.3844709396362305f, 0.3785099089145660f, 0.3725671768188477f, 0.3666436076164246f, 0.3607401549816132f, 0.3548576533794403f, 0.3489970266819000f, 0.3431591391563416f, 0.3373448550701141f, 0.3315550684928894f, 0.3257906734943390f, 0.3200524747371674f, 0.3143413960933685f, 0.3086582720279694f, 0.3030039668083191f, 0.2973793447017670f, 0.2917852103710175f, 0.2862224578857422f, 0.2806918919086456f, 0.2751943469047546f, 0.2697306573390961f, 0.2643016278743744f, 0.2589081227779388f, 0.2535509169101715f, 0.2482308149337769f, 0.2429486215114594f, 0.2377051562070847f, 0.2325011938810349f, 0.2273375093936920f, 0.2222148776054382f, 0.2171340882778168f, 0.2120959013700485f, 0.2071010768413544f, 0.2021503448486328f, 0.1972444802522659f, 0.1923841983079910f, 0.1875702589750290f, 0.1828033626079559f, 0.1780842244625092f, 0.1734135746955872f, 0.1687921136617661f, 0.1642205268144608f, 0.1596994996070862f, 0.1552297323942184f, 0.1508118808269501f,
-    0.1464466154575348f, 0.1421345919370651f, 0.1378764659166336f, 0.1336728632450104f, 0.1295244395732880f, 0.1254318058490753f, 0.1213955804705620f, 0.1174163669347763f, 0.1134947761893272f, 0.1096313893795013f, 0.1058267876505852f, 0.1020815446972847f, 0.0983962342143059f, 0.0947714000940323f, 0.0912075936794281f, 0.0877053514122963f, 0.0842651948332787f, 0.0808876454830170f, 0.0775732174515724f, 0.0743224024772644f, 0.0711356922984123f, 0.0680135712027550f, 0.0649565011262894f, 0.0619649514555931f, 0.0590393692255020f, 0.0561801902949810f, 0.0533878505229950f, 0.0506627671420574f, 0.0480053536593914f, 0.0454160086810589f, 0.0428951233625412f, 0.0404430739581585f, 0.0380602329969406f, 0.0357469581067562f, 0.0335035994648933f, 0.0313304923474789f, 0.0292279683053494f, 0.0271963365375996f, 0.0252359099686146f, 0.0233469791710377f, 0.0215298328548670f, 0.0197847411036491f, 0.0181119665503502f, 0.0165117643773556f, 0.0149843730032444f, 0.0135300243273377f, 0.0121489353477955f, 0.0108413146808743f, 0.0096073597669601f, 0.0084472559392452f, 0.0073611787520349f, 0.0063492907211185f, 0.0054117450490594f, 0.0045486823655665f, 0.0037602325901389f, 0.0030465149320662f, 0.0024076367262751f, 0.0018436938989908f, 0.0013547716662288f, 0.0009409435442649f, 0.0006022718735039f, 0.0003388077020645f, 0.0001505906548118f, 0.0000376490788767f,
-};
-
-
-/* F U N C T I O N S */
-// sets all the harmonics
-static void
-SetVoiceLines ( int* VoiceLine, const float base, int val )
-{
-    int    n;
-    int    max = (int) (MAX_CVD_LINE * base / 1024.f);  // harmonics up to Index MAX_CVD_LINE (spectral lines outside of that don't make sense)
-    int    line;
-    float  frq = 1024.f / base;                         // frq = 1024./i is the Index of the basic harmonic
-
-    // go through all harmonics
-    for ( n = 1; n <= max; n++ ) {
-        line = (int) (n * frq);
-        VoiceLine [line] = VoiceLine [line+1] = val;
-    }
-}
-
-
-// Analyze the Cepstrum, search for the basic harmonic
-static void
-CEP_Analyse2048 ( float* res1, float* res2, const float* cep )
-{
-    int           n;
-    int           line;
-    float         cc [2 * MAX_ANALYZED_IDX + 3];    // cross correlation
-    float         cp [2 * MAX_ANALYZED_IDX + 3];
-    float         ref;
-    float         line_sum;
-    float         sum;
-    float         kkf;
-    float         norm;
-    const float*  x;
-
-    // cross-correlation with pulse shape
-    // Calculate idx = MIN_ANALYZED_IDX-2  to  MAX_ANALYZED_IDX+2,
-    // because they are read during search for maximum
-    // 50 -> 882 Hz, 700 -> 63 Hz base frequency
-
-    *res1 = *res2 = 0. ;
-    memset ( cc, 0  , sizeof cc );
-    memcpy ( cp, cep, sizeof cp );
-
-    for ( n = 0; n < sizeof(cp)/sizeof(*cp)/2; n++ ) {
-        cp [2*n  ] += 1.0f * cep [n];
-        cp [2*n+1] += 0.5f * (cep [n] + cep[n+1]);
-    }
-
-
-    for ( n = 0; n < 2 * MAX_ANALYZED_IDX + 3; n++ ) {
-        x      = cp + n;
-        if ( x[0] > 0. ) {
-            norm = x[-4] * x[-4] +
-                   x[-3] * x[-3] +
-                   x[-2] * x[-2] +
-                   x[-1] * x[-1] +
-                   x[ 0] * x[ 0] +
-                   x[ 1] * x[ 1] +
-                   x[ 2] * x[ 2] +
-                   x[ 3] * x[ 3] +
-                   x[ 4] * x[ 4];
-            kkf  = x[-4] * Puls [0] +
-                   x[-3] * Puls [1] +
-                   x[-2] * Puls [2] +
-                   x[-1] * Puls [3] +
-                   x[ 0] * Puls [4] +
-                   x[ 1] * Puls [5] +
-                   x[ 2] * Puls [6] +
-                   x[ 3] * Puls [7] +
-                   x[ 4] * Puls [8];
-            cc [n] = kkf * kkf / norm;         // calculate the square of ncc to avoid sqrt()
-        }
-    }
-
-#if 1
-#define MMM     2*MAX_ANALYZED_IDX*0+100
-    printf ("\n");
-    for ( n = 0; n < MMM; n++ )
-        printf ("%5u", n );
-    printf ("\n");
-    for ( n = 0; n < MMM; n++ )
-        printf ("%5.2f", cep[n] );
-    printf ("\n");
-    for ( n = 0; n < MMM; n++ )
-        printf ("%5.2f", cp[n] );
-    printf ("\n");
-    for ( n = 0; n < MMM; n++ )
-        printf ("%5.2f", cc[n] );
-    printf ("\n");
-#endif
-    {
-        static unsigned int x = 0;
-
-        printf ("%7.3f s   ", (x/2)*1152./44100 );
-        x++;
-    }
-
-    // search for the (relative) maximum
-    ref  = 0.f;
-    line = MED_ANALYZED_IDX;
-    for ( n = 2 * MAX_ANALYZED_IDX; n >= 2 * MED_ANALYZED_IDX; n-- ) {
-        if (
-             cc[n]     > ref          &&
-             cp[n]     > 0.00f        &&
-             cc[n>>1]  > 0.25f * ref  &&
-             cp[n>>1]  > 0.00f
-           )
-            ref  = cc[line = n];
-    }
-
-    printf ("ref=%5.3f ", ref );
-
-    // Calculating the center of the maximum (Interpolation)
-    x        = cp + line;
-    sum      = x[-3] + x[-2] + x[-1] + x[0] + x[1] + x[2] + x[3] + 1.e-30f;
-    line_sum = (x[1]-x[-1]) + 2 * (x[2]-x[-2]) + 3 * (x[3]-x[-3]) + sum * line + 1.e-30f;
-
-    ref = 0.5 * cp[line-1] + cp[line] + 0.5 * cp[line-1];
-
-    printf ("ref=%5.3f line=%5.1f *res1=%7.3f f=%8.3f    ", ref, 0.5 * line, 0.5 * line_sum / sum, 44100. / (0.5 * line_sum / sum) );
-
-    if ( ref > 0.15f )
-        *res1 = 0.5 * line_sum / sum;
-
-    if ( CVD_used < 2 )
-        return;
-
-    // search for the (relative) maximum
-    ref  = 0.f;
-    line = MIN_ANALYZED_IDX;
-
-    for ( n = 2*MED_ANALYZED_IDX; n >= 2*MIN_ANALYZED_IDX; n-- ) {
-        if (
-             cc[n]                   > ref         &&
-             cp[n]                   > 0.00f       &&
-             cc[n>>1]                > 0.25 * ref  &&
-             cp[n>>1]                > 0.00f
-           )
-            ref  = cc[line = n];
-    }
-
-    printf ("ref=%5.3f ", ref );
-
-    // Calculating the center of the maximum (Interpolation)
-    x        = cp + line;
-    sum      = x[-3] + x[-2] + x[-1] + x[0] + x[1] + x[2] + x[3] + 1.e-30f;
-    line_sum = (x[1]-x[-1]) + 2 * (x[2]-x[-2]) + 3 * (x[3]-x[-3]) + sum * line + 1.e-30f;
-
-    ref = 0.5 * cp[line-1] + cp[line] + 0.5 * cp[line-1];
-
-    printf ("ref=%5.3f line=%5.1f *res2=%8.3f f=%8.3f\n", ref, 0.5 * line, 0.5 * line_sum / sum, 44100. / (0.5 * line_sum / sum) );
-
-    if ( ref >= 0.15f )
-        *res2 = 0.5 * line_sum / sum;
-
-    return;
-}
-
-#ifndef CVD_FASTLOG
-# define logfast(x)     ((float) log (x))
-#else
-
-static __inline float   /* This is a rough estimation with an accuracy of |x|<0.0037 */
-logfast ( float x )
-{
-    double  y = x * x;
-    y *= y;
-    y *= y;
-    return (((int*)(&y))[1] + (45127.5 - 1072693248.)) * ( M_LN2 / (1L<<23) );
-}
-
-#endif
-
-// ClearVoiceDetection for spectrum *spec
-// input : Spectrum *spec
-// output: Array *vocal contains information if the FFT-Line is a harmonic component
-int
-CVD2048 ( const float* spec, int* vocal )
-{
-    static float  cep [4096];     // cep[4096] -- array, which is also used for the 2048 FFT
-    const float*  win = CosWin;   // pointer to cos-roll-off
-    float         res1;
-    float         res2;
-    int           n;
-
-    ENTER(20);
-    // Calculating logarithmated, windowed spectrum cep[]
-    // cep[512...1024] = 0 -- cep[1025...2047] doesn't matter, because the first have to be filled by fft
-    for ( n =   0; n < 256; n++ )
-        cep[n] = logfast (*spec++);
-    for ( n = 256; n < 512; n++ )
-        cep[n] = logfast (*spec++) * *win++;
-
-    memset ( cep+512, 0, 513*sizeof(*cep) );
-
-    // Calculating cepstrum of cep[] (the function Cepstrum() outputs the cepstrum in-place)
-    Cepstrum2048 ( cep, MAX_ANALYZED_IDX );
-
-    // search the harmonic
-    CEP_Analyse2048 ( &res1, &res2, cep );
-#include "cvd.h"
-    if ( res1 > 0.f  ||  res2 > 0.f ) {
-        if ( res1 > 0. ) SetVoiceLines ( vocal, res1, 10 );
-        if ( res2 > 0. ) SetVoiceLines ( vocal, res2,  2 );
-        LEAVE(20);
-        return 1;
-    }
-    LEAVE(20);
-    return 0;
-}
Index: penc/branches/zorg/cvd-new2.c
===================================================================
--- /mppenc/branches/zorg/cvd-new2.c	(revision 40)
+++ 	(revision )
@@ -1,239 +1,0 @@
-#include "mppenc.h"
-
-#define LIMIT1          0.032f
-#define LIMIT2          0.032f
-#define REF(line)       cc[line-1] * cp[line-1] \
-                      + cc[line  ] * cp[line  ] \
-                      + cc[line+1] * cp[line+1]
-
-/* C O N S T A N T S */
-// from MatLab-Simulation (Fourier-transforms of the Cos-Rolloff)
-#if 0
-static const float  Puls [11] = {
-    -0.02724753942504f, -0.10670808991329f, -0.06198987803623f,  0.18006206051664f,
-     0.49549552704050f,  0.64201253447071f,  0.49549552704050f,  0.18006206051664f,
-    -0.06198987803623f, -0.10670808991329f, -0.02724753942504f
-};
-#endif
-
-static const float  Puls [ 9] = {
-    -0.10670808991329f, -0.06198987803623f,  0.18006206051664f,  0.49549552704050f,
-     0.64201253447071f,  0.49549552704050f,  0.18006206051664f, -0.06198987803623f,
-    -0.10670808991329f
-};
-
-/*
-// Generating the Cos-Rolloff of the Cepstral-analysis, Cos-Rolloff from 5512,5 Hz to 11025 Hz
-// for ( k = 0; k <= 1024; k++ ) {
-//     if      (k < 256) CosWin [k-256] = 1;
-//     else if (k < 512) CosWin [k-256] = 0.5 + 0.5*cos (M_PI*(k-256)/256);
-//     else              CosWin [k-256] = 0;
-// }
-*/
-static const float  CosWin [256] = {
-    1.0000000000000000f, 0.9999623298645020f, 0.9998494386672974f, 0.9996612071990967f, 0.9993977546691895f, 0.9990590810775757f, 0.9986452460289002f, 0.9981563091278076f, 0.9975923895835877f, 0.9969534873962402f, 0.9962397813796997f, 0.9954513311386108f, 0.9945882558822632f, 0.9936507344245911f, 0.9926388263702393f, 0.9915527701377869f, 0.9903926253318787f, 0.9891586899757385f, 0.9878510832786560f, 0.9864699840545654f, 0.9850156307220459f, 0.9834882616996765f, 0.9818880558013916f, 0.9802152514457703f, 0.9784701466560364f, 0.9766530394554138f, 0.9747641086578369f, 0.9728036522865295f, 0.9707720279693604f, 0.9686695337295532f, 0.9664964079856873f, 0.9642530679702759f, 0.9619397521018982f, 0.9595569372177124f, 0.9571048617362976f, 0.9545840024948120f, 0.9519946575164795f, 0.9493372440338135f, 0.9466121792793274f, 0.9438198208808899f, 0.9409606456756592f, 0.9380350708961487f, 0.9350435137748718f, 0.9319864511489868f, 0.9288643002510071f, 0.9256775975227356f, 0.9224267601966858f, 0.9191123247146606f, 0.9157348275184631f, 0.9122946262359619f, 0.9087924361228943f, 0.9052286148071289f, 0.9016037583351135f, 0.8979184627532959f, 0.8941732048988342f, 0.8903686404228210f, 0.8865052461624146f, 0.8825836181640625f, 0.8786044120788574f, 0.8745682239532471f, 0.8704755902290344f, 0.8663271069526672f, 0.8621235489845276f, 0.8578653931617737f,
-    0.8535534143447876f, 0.8491881489753723f, 0.8447702527046204f, 0.8403005003929138f, 0.8357794880867004f, 0.8312078714370728f, 0.8265864253044128f, 0.8219157457351685f, 0.8171966671943665f, 0.8124297261238098f, 0.8076158165931702f, 0.8027555346488953f, 0.7978496551513672f, 0.7928989529609680f, 0.7879040837287903f, 0.7828658819198608f, 0.7777851223945618f, 0.7726625204086304f, 0.7674987912178040f, 0.7622948288917542f, 0.7570513486862183f, 0.7517691850662231f, 0.7464491128921509f, 0.7410919070243835f, 0.7356983423233032f, 0.7302693724632263f, 0.7248056530952454f, 0.7193081378936768f, 0.7137775421142578f, 0.7082147598266602f, 0.7026206851005554f, 0.6969960331916809f, 0.6913416981697083f, 0.6856585741043091f, 0.6799474954605103f, 0.6742093563079834f, 0.6684449315071106f, 0.6626551747322083f, 0.6568408608436585f, 0.6510030031204224f, 0.6451423168182373f, 0.6392598152160645f, 0.6333563923835754f, 0.6274328231811523f, 0.6214900612831116f, 0.6155290603637695f, 0.6095505952835083f, 0.6035556793212891f, 0.5975451469421387f, 0.5915199518203735f, 0.5854809284210205f, 0.5794290900230408f, 0.5733652114868164f, 0.5672903656959534f, 0.5612053275108337f, 0.5551111102104187f, 0.5490085482597351f, 0.5428986549377441f, 0.5367822647094727f, 0.5306603908538818f, 0.5245338082313538f, 0.5184035897254944f, 0.5122706294059753f, 0.5061357617378235f,
-    0.5000000000000000f, 0.4938642382621765f, 0.4877294003963471f, 0.4815963804721832f, 0.4754661619663239f, 0.4693396389484406f, 0.4632177054882050f, 0.4571013450622559f, 0.4509914219379425f, 0.4448888897895813f, 0.4387946724891663f, 0.4327096343040466f, 0.4266347587108612f, 0.4205709397792816f, 0.4145190417766571f, 0.4084800481796265f, 0.4024548530578613f, 0.3964443206787109f, 0.3904493749141693f, 0.3844709396362305f, 0.3785099089145660f, 0.3725671768188477f, 0.3666436076164246f, 0.3607401549816132f, 0.3548576533794403f, 0.3489970266819000f, 0.3431591391563416f, 0.3373448550701141f, 0.3315550684928894f, 0.3257906734943390f, 0.3200524747371674f, 0.3143413960933685f, 0.3086582720279694f, 0.3030039668083191f, 0.2973793447017670f, 0.2917852103710175f, 0.2862224578857422f, 0.2806918919086456f, 0.2751943469047546f, 0.2697306573390961f, 0.2643016278743744f, 0.2589081227779388f, 0.2535509169101715f, 0.2482308149337769f, 0.2429486215114594f, 0.2377051562070847f, 0.2325011938810349f, 0.2273375093936920f, 0.2222148776054382f, 0.2171340882778168f, 0.2120959013700485f, 0.2071010768413544f, 0.2021503448486328f, 0.1972444802522659f, 0.1923841983079910f, 0.1875702589750290f, 0.1828033626079559f, 0.1780842244625092f, 0.1734135746955872f, 0.1687921136617661f, 0.1642205268144608f, 0.1596994996070862f, 0.1552297323942184f, 0.1508118808269501f,
-    0.1464466154575348f, 0.1421345919370651f, 0.1378764659166336f, 0.1336728632450104f, 0.1295244395732880f, 0.1254318058490753f, 0.1213955804705620f, 0.1174163669347763f, 0.1134947761893272f, 0.1096313893795013f, 0.1058267876505852f, 0.1020815446972847f, 0.0983962342143059f, 0.0947714000940323f, 0.0912075936794281f, 0.0877053514122963f, 0.0842651948332787f, 0.0808876454830170f, 0.0775732174515724f, 0.0743224024772644f, 0.0711356922984123f, 0.0680135712027550f, 0.0649565011262894f, 0.0619649514555931f, 0.0590393692255020f, 0.0561801902949810f, 0.0533878505229950f, 0.0506627671420574f, 0.0480053536593914f, 0.0454160086810589f, 0.0428951233625412f, 0.0404430739581585f, 0.0380602329969406f, 0.0357469581067562f, 0.0335035994648933f, 0.0313304923474789f, 0.0292279683053494f, 0.0271963365375996f, 0.0252359099686146f, 0.0233469791710377f, 0.0215298328548670f, 0.0197847411036491f, 0.0181119665503502f, 0.0165117643773556f, 0.0149843730032444f, 0.0135300243273377f, 0.0121489353477955f, 0.0108413146808743f, 0.0096073597669601f, 0.0084472559392452f, 0.0073611787520349f, 0.0063492907211185f, 0.0054117450490594f, 0.0045486823655665f, 0.0037602325901389f, 0.0030465149320662f, 0.0024076367262751f, 0.0018436938989908f, 0.0013547716662288f, 0.0009409435442649f, 0.0006022718735039f, 0.0003388077020645f, 0.0001505906548118f, 0.0000376490788767f,
-};
-
-
-/* F U N C T I O N S */
-// sets all the harmonics
-static void
-SetVoiceLines ( int* VoiceLine, const float base, int val )
-{
-    int    n;
-    int    max = (int) (MAX_CVD_LINE * base / 1024.f);  // harmonics up to Index MAX_CVD_LINE (spectral lines outside of that don't make sense)
-    int    line;
-    float  frq = 1024.f / base;                         // frq = 1024./i is the Index of the basic harmonic
-
-    // go through all harmonics
-    for ( n = 1; n <= max; n++ ) {
-        line = (int) (n * frq);
-        VoiceLine [line] = VoiceLine [line+1] = val;
-    }
-}
-
-
-// Analyze the Cepstrum, search for the basic harmonic
-static void
-CEP_Analyse2048 ( float* res1, float* res2, const float* cp )
-{
-    int           n;
-    int           line;
-    float         cc [MAX_ANALYZED_IDX + 3];    // cross correlation
-    float         ref;
-    float         line_sum;
-    float         sum;
-    float         kkf;
-    float         norm;
-    const float*  x;
-
-    // cross-correlation with pulse shape
-    // Calculate idx = MIN_ANALYZED_IDX-2  to  MAX_ANALYZED_IDX+2,
-    // because they are read during search for maximum
-    // 50 -> 882 Hz, 700 -> 63 Hz base frequency
-
-    *res1 = *res2 = 0. ;
-
-    for ( n = 0; n < MAX_ANALYZED_IDX + 3; n++ ) {
-        x      = cp + n;
-        if ( x[0] > 0. ) {
-            norm = x[-4] * x[-4] +
-                   x[-3] * x[-3] +
-                   x[-2] * x[-2] +
-                   x[-1] * x[-1] +
-                   x[ 0] * x[ 0] +
-                   x[ 1] * x[ 1] +
-                   x[ 2] * x[ 2] +
-                   x[ 3] * x[ 3] +
-                   x[ 4] * x[ 4];
-            kkf  = x[-4] * Puls [0] +
-                   x[-3] * Puls [1] +
-                   x[-2] * Puls [2] +
-                   x[-1] * Puls [3] +
-                   x[ 0] * Puls [4] +
-                   x[ 1] * Puls [5] +
-                   x[ 2] * Puls [6] +
-                   x[ 3] * Puls [7] +
-                   x[ 4] * Puls [8];
-            cc [n] = kkf * kkf / norm;         // calculate the square of ncc to avoid sqrt()
-        }
-    }
-
-#if 0
-#define MMM     2*MAX_ANALYZED_IDX*0+100
-    printf ("\n");
-    for ( n = 0; n < MMM; n++ )
-        printf ("%5u", n );
-    printf ("\n");
-    for ( n = 0; n < MMM; n++ )
-        printf ("%5.2f", cep[n] );
-    printf ("\n");
-    for ( n = 0; n < MMM; n++ )
-        printf ("%5.2f", cp[n] );
-    printf ("\n");
-    for ( n = 0; n < MMM; n++ )
-        printf ("%5.2f", cc[n] );
-    printf ("\n");
-#endif
-    {
-        static unsigned int x = 0;
-
-        printf ("%7.3f s   ", (x/2)*1152./44100 );
-        x++;
-    }
-
-    // search for the (relative) maximum
-    ref  = 0.f;
-    line = MED_ANALYZED_IDX;
-    for ( n = MAX_ANALYZED_IDX; n >= MED_ANALYZED_IDX; n-- ) {
-        if (
-             cc[n]     > ref          &&
-             cp[n]     > 0.00f
-           )
-         if ( REF(n) > LIMIT1 )
-            ref  = cc[line = n];
-    }
-
-    printf ("ref=%5.3f ", ref );
-
-    // Calculating the center of the maximum (Interpolation)
-    x        = cp + line;
-    sum      = x[-3] + x[-2] + x[-1] + x[0] + x[1] + x[2] + x[3] + 1.e-30f;
-    line_sum = (x[1]-x[-1]) + 2 * (x[2]-x[-2]) + 3 * (x[3]-x[-3]) + sum * line + 1.e-30f;
-
-    ref = cc[line-1] * cp[line-1]
-        + cc[line  ] * cp[line  ]
-        + cc[line+1] * cp[line+1];
-
-    printf ("ref=%5.3f line=%5.1f *res1=%7.3f f=%8.3f    ", ref, 0.5 * line, 0.5 * line_sum / sum, 44100. / (0.5 * line_sum / sum) );
-
-    if ( ref > LIMIT1 )
-        *res1 = line_sum / sum;
-
-    if ( CVD_used < 2 )
-        return;
-
-    // search for the (relative) maximum
-    ref  = 0.f;
-    line = MIN_ANALYZED_IDX;
-
-    for ( n = MED_ANALYZED_IDX; n >= MIN_ANALYZED_IDX; n-- ) {
-        if (
-             cc[n]                   > ref         &&
-             cp[n]                   > 0.00f
-           )
-         if ( REF(n) > LIMIT2 )
-            ref  = cc[line = n];
-    }
-
-    printf ("ref=%5.3f ", ref );
-
-    // Calculating the center of the maximum (Interpolation)
-    x        = cp + line;
-    sum      = x[-3] + x[-2] + x[-1] + x[0] + x[1] + x[2] + x[3] + 1.e-30f;
-    line_sum = (x[1]-x[-1]) + 2 * (x[2]-x[-2]) + 3 * (x[3]-x[-3]) + sum * line + 1.e-30f;
-
-
-    printf ("ref=%5.3f line=%5.1f *res2=%8.3f f=%8.3f\n", ref, 0.5 * line, 0.5 * line_sum / sum, 44100. / (0.5 * line_sum / sum) );
-
-    if ( ref >= LIMIT2 )
-        *res2 = line_sum / sum;
-
-    return;
-}
-
-#ifndef CVD_FASTLOG
-# define logfast(x)     ((float) log (x))
-#else
-
-static __inline float   /* This is a rough estimation with an accuracy of |x|<0.0037 */
-logfast ( float x )
-{
-    double  y = x * x;
-    y *= y;
-    y *= y;
-    return (((int*)(&y))[1] + (45127.5 - 1072693248.)) * ( M_LN2 / (1L<<23) );
-}
-
-#endif
-
-// ClearVoiceDetection for spectrum *spec
-// input : Spectrum *spec
-// output: Array *vocal contains information if the FFT-Line is a harmonic component
-int
-CVD2048 ( const float* spec, int* vocal )
-{
-    static float  cep [4096];     // cep[4096] -- array, which is also used for the 2048 FFT
-    const float*  win = CosWin;   // pointer to cos-roll-off
-    float         res1;
-    float         res2;
-    int           n;
-
-    ENTER(20);
-    // Calculating logarithmated, windowed spectrum cep[]
-    // cep[512...1024] = 0 -- cep[1025...2047] doesn't matter, because the first have to be filled by fft
-    for ( n =   0; n < 256; n++ )
-        cep[n] = logfast (*spec++);
-    for ( n = 256; n < 512; n++ )
-        cep[n] = logfast (*spec++) * *win++;
-
-    memset ( cep+512, 0, 513*sizeof(*cep) );
-
-    // Calculating cepstrum of cep[] (the function Cepstrum() outputs the cepstrum in-place)
-    Cepstrum2048 ( cep, MAX_ANALYZED_IDX );
-
-    // search the harmonic
-    CEP_Analyse2048 ( &res1, &res2, cep );
-//#include "cvd.h"
-    if ( res1 > 0.f  ||  res2 > 0.f ) {
-        if ( res1 > 0. ) SetVoiceLines ( vocal, res1, 10 );
-        if ( res2 > 0. ) SetVoiceLines ( vocal, res2,  2 );
-        LEAVE(20);
-        return 1;
-    }
-    LEAVE(20);
-    return 0;
-}
Index: penc/branches/zorg/cvd-old.c
===================================================================
--- /mppenc/branches/zorg/cvd-old.c	(revision 40)
+++ 	(revision )
@@ -1,237 +1,0 @@
-#include "mppenc.h"
-
-/* C O N S T A N T S */
-// from MatLab-Simulation (Fourier-transforms of the Cos-Rolloff)
-#if 0
-static const float  Puls [11] = {
-    -0.02724753942504f, -0.10670808991329f, -0.06198987803623f,  0.18006206051664f,
-     0.49549552704050f,  0.64201253447071f,  0.49549552704050f,  0.18006206051664f,
-    -0.06198987803623f, -0.10670808991329f, -0.02724753942504f
-};
-#endif
-
-static const float  Puls [ 9] = {
-    -0.10670808991329f, -0.06198987803623f,  0.18006206051664f,  0.49549552704050f,
-     0.64201253447071f,  0.49549552704050f,  0.18006206051664f, -0.06198987803623f,
-    -0.10670808991329f
-};
-
-/*
-// Generating the Cos-Rolloff of the Cepstral-analysis, Cos-Rolloff from 5512,5 Hz to 11025 Hz
-// for ( k = 0; k <= 1024; k++ ) {
-//     if      (k < 256) CosWin [k-256] = 1;
-//     else if (k < 512) CosWin [k-256] = 0.5 + 0.5*cos (M_PI*(k-256)/256);
-//     else              CosWin [k-256] = 0;
-// }
-*/
-static const float  CosWin [256] = {
-    1.0000000000000000f, 0.9999623298645020f, 0.9998494386672974f, 0.9996612071990967f, 0.9993977546691895f, 0.9990590810775757f, 0.9986452460289002f, 0.9981563091278076f, 0.9975923895835877f, 0.9969534873962402f, 0.9962397813796997f, 0.9954513311386108f, 0.9945882558822632f, 0.9936507344245911f, 0.9926388263702393f, 0.9915527701377869f, 0.9903926253318787f, 0.9891586899757385f, 0.9878510832786560f, 0.9864699840545654f, 0.9850156307220459f, 0.9834882616996765f, 0.9818880558013916f, 0.9802152514457703f, 0.9784701466560364f, 0.9766530394554138f, 0.9747641086578369f, 0.9728036522865295f, 0.9707720279693604f, 0.9686695337295532f, 0.9664964079856873f, 0.9642530679702759f, 0.9619397521018982f, 0.9595569372177124f, 0.9571048617362976f, 0.9545840024948120f, 0.9519946575164795f, 0.9493372440338135f, 0.9466121792793274f, 0.9438198208808899f, 0.9409606456756592f, 0.9380350708961487f, 0.9350435137748718f, 0.9319864511489868f, 0.9288643002510071f, 0.9256775975227356f, 0.9224267601966858f, 0.9191123247146606f, 0.9157348275184631f, 0.9122946262359619f, 0.9087924361228943f, 0.9052286148071289f, 0.9016037583351135f, 0.8979184627532959f, 0.8941732048988342f, 0.8903686404228210f, 0.8865052461624146f, 0.8825836181640625f, 0.8786044120788574f, 0.8745682239532471f, 0.8704755902290344f, 0.8663271069526672f, 0.8621235489845276f, 0.8578653931617737f,
-    0.8535534143447876f, 0.8491881489753723f, 0.8447702527046204f, 0.8403005003929138f, 0.8357794880867004f, 0.8312078714370728f, 0.8265864253044128f, 0.8219157457351685f, 0.8171966671943665f, 0.8124297261238098f, 0.8076158165931702f, 0.8027555346488953f, 0.7978496551513672f, 0.7928989529609680f, 0.7879040837287903f, 0.7828658819198608f, 0.7777851223945618f, 0.7726625204086304f, 0.7674987912178040f, 0.7622948288917542f, 0.7570513486862183f, 0.7517691850662231f, 0.7464491128921509f, 0.7410919070243835f, 0.7356983423233032f, 0.7302693724632263f, 0.7248056530952454f, 0.7193081378936768f, 0.7137775421142578f, 0.7082147598266602f, 0.7026206851005554f, 0.6969960331916809f, 0.6913416981697083f, 0.6856585741043091f, 0.6799474954605103f, 0.6742093563079834f, 0.6684449315071106f, 0.6626551747322083f, 0.6568408608436585f, 0.6510030031204224f, 0.6451423168182373f, 0.6392598152160645f, 0.6333563923835754f, 0.6274328231811523f, 0.6214900612831116f, 0.6155290603637695f, 0.6095505952835083f, 0.6035556793212891f, 0.5975451469421387f, 0.5915199518203735f, 0.5854809284210205f, 0.5794290900230408f, 0.5733652114868164f, 0.5672903656959534f, 0.5612053275108337f, 0.5551111102104187f, 0.5490085482597351f, 0.5428986549377441f, 0.5367822647094727f, 0.5306603908538818f, 0.5245338082313538f, 0.5184035897254944f, 0.5122706294059753f, 0.5061357617378235f,
-    0.5000000000000000f, 0.4938642382621765f, 0.4877294003963471f, 0.4815963804721832f, 0.4754661619663239f, 0.4693396389484406f, 0.4632177054882050f, 0.4571013450622559f, 0.4509914219379425f, 0.4448888897895813f, 0.4387946724891663f, 0.4327096343040466f, 0.4266347587108612f, 0.4205709397792816f, 0.4145190417766571f, 0.4084800481796265f, 0.4024548530578613f, 0.3964443206787109f, 0.3904493749141693f, 0.3844709396362305f, 0.3785099089145660f, 0.3725671768188477f, 0.3666436076164246f, 0.3607401549816132f, 0.3548576533794403f, 0.3489970266819000f, 0.3431591391563416f, 0.3373448550701141f, 0.3315550684928894f, 0.3257906734943390f, 0.3200524747371674f, 0.3143413960933685f, 0.3086582720279694f, 0.3030039668083191f, 0.2973793447017670f, 0.2917852103710175f, 0.2862224578857422f, 0.2806918919086456f, 0.2751943469047546f, 0.2697306573390961f, 0.2643016278743744f, 0.2589081227779388f, 0.2535509169101715f, 0.2482308149337769f, 0.2429486215114594f, 0.2377051562070847f, 0.2325011938810349f, 0.2273375093936920f, 0.2222148776054382f, 0.2171340882778168f, 0.2120959013700485f, 0.2071010768413544f, 0.2021503448486328f, 0.1972444802522659f, 0.1923841983079910f, 0.1875702589750290f, 0.1828033626079559f, 0.1780842244625092f, 0.1734135746955872f, 0.1687921136617661f, 0.1642205268144608f, 0.1596994996070862f, 0.1552297323942184f, 0.1508118808269501f,
-    0.1464466154575348f, 0.1421345919370651f, 0.1378764659166336f, 0.1336728632450104f, 0.1295244395732880f, 0.1254318058490753f, 0.1213955804705620f, 0.1174163669347763f, 0.1134947761893272f, 0.1096313893795013f, 0.1058267876505852f, 0.1020815446972847f, 0.0983962342143059f, 0.0947714000940323f, 0.0912075936794281f, 0.0877053514122963f, 0.0842651948332787f, 0.0808876454830170f, 0.0775732174515724f, 0.0743224024772644f, 0.0711356922984123f, 0.0680135712027550f, 0.0649565011262894f, 0.0619649514555931f, 0.0590393692255020f, 0.0561801902949810f, 0.0533878505229950f, 0.0506627671420574f, 0.0480053536593914f, 0.0454160086810589f, 0.0428951233625412f, 0.0404430739581585f, 0.0380602329969406f, 0.0357469581067562f, 0.0335035994648933f, 0.0313304923474789f, 0.0292279683053494f, 0.0271963365375996f, 0.0252359099686146f, 0.0233469791710377f, 0.0215298328548670f, 0.0197847411036491f, 0.0181119665503502f, 0.0165117643773556f, 0.0149843730032444f, 0.0135300243273377f, 0.0121489353477955f, 0.0108413146808743f, 0.0096073597669601f, 0.0084472559392452f, 0.0073611787520349f, 0.0063492907211185f, 0.0054117450490594f, 0.0045486823655665f, 0.0037602325901389f, 0.0030465149320662f, 0.0024076367262751f, 0.0018436938989908f, 0.0013547716662288f, 0.0009409435442649f, 0.0006022718735039f, 0.0003388077020645f, 0.0001505906548118f, 0.0000376490788767f,
-};
-
-
-// sets all the harmonics
-static void
-SetVoiceLines ( int* VoiceLine, const float base, int val )
-{
-    int    n;
-    int    max = (int) (MAX_CVD_LINE * base / 1024.f);  // harmonics up to Index MAX_CVD_LINE (spectral lines outside of that don't make sense)
-    int    line;
-    float  frq = 1024.f / base;                         // frq = 1024./i is the Index of the basic harmonic
-
-    // go through all harmonics
-    for ( n = 1; n <= max; n++ ) {
-        line = (int) (n * frq);
-        VoiceLine [line] = VoiceLine [line+1] = val;
-    }
-}
-
-
-// Analyze the Cepstrum, search for the basic harmonic
-static void
-CEP_Analyse2048 ( float* res1, float* res2, float *cep )
-{
-    int           n;
-    int           line;
-    float         cc [MAX_ANALYZED_IDX + 3];    // cross correlation
-    float         ref;
-    float         line_sum;
-    float         sum;
-    float         kkf;
-    float         norm;
-    const float*  x;
-
-    // cross-correlation with pulse shape
-    // Calculate idx = MIN_ANALYZED_IDX-2  to  MAX_ANALYZED_IDX+2,
-    // because they are read during search for maximum
-    // 50 -> 882 Hz, 700 -> 63 Hz base frequency
-
-    *res1 = *res2 = 0. ;
-    memset ( cc, 0, sizeof cc );
-
-    for ( n = MIN_ANALYZED_IDX - 2; n <= MAX_ANALYZED_IDX + 2; n++ ) {
-        x    = cep + n;
-        norm = x[-4] * x[-4] +
-               x[-3] * x[-3] +
-               x[-2] * x[-2] +
-               x[-1] * x[-1] +
-               x[ 0] * x[ 0] +
-               x[ 1] * x[ 1] +
-               x[ 2] * x[ 2] +
-               x[ 3] * x[ 3] +
-               x[ 4] * x[ 4];
-        kkf  = x[-4] * Puls [0] +
-               x[-3] * Puls [1] +
-               x[-2] * Puls [2] +
-               x[-1] * Puls [3] +
-               x[ 0] * Puls [4] +
-               x[ 1] * Puls [5] +
-               x[ 2] * Puls [6] +
-               x[ 3] * Puls [7] +
-               x[ 4] * Puls [8];
-        cc [n] = norm > 0. ?  kkf * kkf / norm  :  0.f;         // calculate the square of ncc to avoid sqrt()
-    }
-
-    // search for the (relative) maximum
-    ref  = 0.f;
-    line = MED_ANALYZED_IDX;
-    for ( n = MAX_ANALYZED_IDX; n >= MED_ANALYZED_IDX; n-- ) {
-        if (
-             cc[n] * cep[n] * cep[n] > ref      &&
-             cc[n]                   > 0.85f    &&      /* e33 (02) */
-             cep[n]                  > 0.00f    &&      /* e33 (02) */
-             cc[n  ]                >= cc[n+1]  &&
-             cc[n  ]                >= cc[n-1]  &&
-             cc[n+1]                >= cc[n+2]  &&
-             cc[n-1]                >= cc[n-2]
-           )
-        {
-            ref  = cc[n] * cep[n] * cep[n];
-            line = n;
-        }
-    }
-
-    // Calculating the center of the maximum (Interpolation)
-    x        = cep + line;
-    sum      = x[-3] + x[-2] + x[-1] + x[0] + x[1] + x[2] + x[3] + 1.e-30f;
-    line_sum = (x[1]-x[-1]) + 2 * (x[2]-x[-2]) + 3 * (x[3]-x[-3]) + sum * line + 1.e-30f;
-
-    /* e33 (04) */
-    ref = cc[line  ] * cep[line  ] * cep[line  ]
-        + cc[line-1] * cep[line-1] * cep[line-1]
-        + cc[line+1] * cep[line+1] * cep[line+1];
-
-    {
-        static unsigned int x = 0;
-
-        printf ("%7.3f s   ", (x/2)*1152./44100 );
-        x++;
-    }
-
-    printf ("ref=%5.3f *res1=%7.3f f=%8.3f    ", ref, line_sum / sum, 44100. / (line_sum / sum) );
-
-    if ( ref > 0.015f )
-        *res1 = line_sum / sum;
-
-    if ( CVD_used < 2 )
-        return;
-
-    // search for the (relative) maximum
-    ref  = 0.f;
-    line = MIN_ANALYZED_IDX;
-
-    for ( n = MED_ANALYZED_IDX + 1; n >= MIN_ANALYZED_IDX - 1; n-- ) {
-        cc  [2*n  ] += 0.5 * cc [n];
-        cc  [2*n+1] += 0.5 * (cc [n] + cc[n+1]);
-        cep [2*n  ] += 0.5 * cep [n];
-        cep [2*n+1] += 0.5 * (cep [n] + cep[n+1]);
-    }
-
-    for ( n = 2*MED_ANALYZED_IDX; n >= 2*MIN_ANALYZED_IDX; n-- ) {
-        if (
-             cc[n] * cep[n] * cep[n] > ref      &&
-             cc[n]                   > 0.85f    &&      /* e33 (02) */
-             cep[n]                  > 0.00f    &&      /* e33 (02) */
-             cc[n  ]                >= cc[n+1]  &&
-             cc[n  ]                >= cc[n-1]  &&
-             cc[n+1]                >= cc[n+2]  &&
-             cc[n-1]                >= cc[n-2]
-           )
-        {
-            ref  = cc[n] * cep[n] * cep[n];
-            line = n;
-        }
-    }
-
-    // Calculating the center of the maximum (Interpolation)
-    x        = cep + line;
-    sum      = x[-3] + x[-2] + x[-1] + x[0] + x[1] + x[2] + x[3] + 1.e-30f;
-    line_sum = (x[1]-x[-1]) + 2 * (x[2]-x[-2]) + 3 * (x[3]-x[-3]) + sum * line + 1.e-30f;
-
-    /* e33 (04) */
-    ref = cc[line  ] * cep[line  ] * cep[line  ]
-        + cc[line-1] * cep[line-1] * cep[line-1]
-        + cc[line+1] * cep[line+1] * cep[line+1];
-
-    printf ("ref=%5.3f *res2=%8.3f f=%8.3f\n", ref, 0.5 * line_sum / sum, 44100. / (0.5 * line_sum / sum) );
-
-    if ( ref >= 0.1f )
-        *res2 = 0.5 * line_sum / sum;
-
-    return;
-}
-
-#ifndef CVD_FASTLOG
-# define logfast(x)     ((float) log (x))
-#else
-
-static __inline float   /* This is a rough estimation with an accuracy of |x|<0.0037 */
-logfast ( float x )
-{
-    double  y = x * x;
-    y *= y;
-    y *= y;
-    return (((int*)(&y))[1] + (45127.5 - 1072693248.)) * ( M_LN2 / (1L<<23) );
-}
-
-#endif
-
-// ClearVoiceDetection for spectrum *spec
-// input : Spectrum *spec
-// output: Array *vocal contains information if the FFT-Line is a harmonic component
-int
-CVD2048 ( const float* spec, int* vocal )
-{
-    static float  cep [4096];     // cep[4096] -- array, which is also used for the 2048 FFT
-    const float*  win = CosWin;   // pointer to cos-roll-off
-    float         res1;
-    float         res2;
-    int           n;
-
-    ENTER(20);
-    // Calculating logarithmated, windowed spectrum cep[]
-    // cep[512...1024] = 0 -- cep[1025...2047] doesn't matter, because the first have to be filled by fft
-    for ( n =   0; n < 256; n++ )
-        cep[n] = logfast (*spec++);
-    for ( n = 256; n < 512; n++ )
-        cep[n] = logfast (*spec++) * *win++;
-
-    memset ( cep+512, 0, 513*sizeof(*cep) );
-
-    // Calculating cepstrum of cep[] (the function Cepstrum() outputs the cepstrum in-place)
-    Cepstrum2048 ( cep, MAX_ANALYZED_IDX );
-
-    // search the harmonic
-    CEP_Analyse2048 ( &res1, &res2, cep );
-#include "cvd.h"
-    if ( res1 > 0.f  ||  res2 > 0.f ) {
-        if ( res1 > 0. ) SetVoiceLines ( vocal, res1, 10 );
-        if ( res2 > 0. ) SetVoiceLines ( vocal, res2,  2 );
-        LEAVE(20);
-        return 1;
-    }
-    LEAVE(20);
-    return 0;
-}
Index: /mppenc/branches/zorg/cvd.c
===================================================================
--- /mppenc/branches/zorg/cvd.c	(revision 40)
+++ /mppenc/branches/zorg/cvd.c	(revision 41)
Index: penc/branches/zorg/cvd.h
===================================================================
--- /mppenc/branches/zorg/cvd.h	(revision 40)
+++ 	(revision )
@@ -1,9 +1,0 @@
-{
-    static FILE* fp = NULL;
-    static int   x = 0;
-
-    if ( fp == NULL ) fp = fopen ( "cvd.txt", "a" );
-    fprintf ( fp, "%7.3f  %6.2f %7.2f\n", (x>>1)*1152./44100, res1, res2 );
-
-    x++;
-}
Index: penc/branches/zorg/decode.c
===================================================================
--- /mppenc/branches/zorg/decode.c	(revision 40)
+++ 	(revision )
@@ -1,1088 +1,0 @@
-/*
- * Musepack audio compression
- * Copyright (C) 1999-2004 Buschmann/Klemm/Piecha/Wolf
- *
- * 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.1 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
- */
-
-#include <string.h>
-#include <assert.h>
-#include "mppdec.h"
-
-// Todo:
-// Intercept InputBuff-Buffer Overflows less frequently, but leave some headroom???
-// Cleanly number the functions...
-// Calculate_New_V: Save at all relevant places at the end
-// Make 3DNow!-Code (Assembler instructions) more independent from each other (reorder)
-// Determine bit-demand of the seperate bands to adjust RES/SFI/Q-bitdemand against each other
-
-#define BITS     (CHAR_BIT * sizeof(*InputBuff))      // Bits per InputBuff-Word
-#define INC      InputCnt = (InputCnt + 1) & IBUFMASK
-
-Ibuf_t           InputBuff [IBUFSIZE /* +128 */ ];  // contains the read-buffer
-static Uint32_t  mask      [32 + 1];
-size_t           InputCnt;             // current position in the read-buffer
-static Ibuf_t    dword;                // BITS Bit-Word for Bitstream-I/O
-static Uint      pos;                  // position in the currently decoded BITS-bit-Word
-static size_t    LastInputCnt = 0;
-static Uint      Wraps        = 0;
-
-
-/*
- *  Initialize all tables and variables
- */
-
-void
-Bitstream_init ( void )
-{
-    Int       i;
-    Uint32_t  val;
-
-    InputCnt     = (size_t)-1;
-    pos          = BITS;
-    dword        = 0;     // Values are initialized in a way that during the next read of at least 1 bit, the first DWORD is collected automatically
-    LastInputCnt = 0;
-    Wraps        = 0;
-
-    for ( val = 0, i = 0; i <= 32; i++, val += val+1 )
-        mask [i] = val;
-}
-
-
-/*
- *  Skip a given number of bits, only forward-skips possible
- */
-
-void
-Bitstream_skip ( Uint  bits )
-{
-    pos     += bits;
-    InputCnt = (InputCnt + pos/BITS) & IBUFMASK;
-    dword    = InputBuff [InputCnt];
-    pos     %= BITS;
-}
-
-
-/*
- *  Read a fixed number of bits from the bitstream. Guaranteed 0...16 bits can be read,
- *  with accesses aligned to 16 bits, it can be up to 32 bits.
- */
-
-Uint32_t
-Bitstream_read ( Int bits )
-{
-    Uint32_t  ret;
-
-    ENTER(78);
-
-    ret = dword;
-    if ( (pos += bits) < BITS ) {
-        ret >>= BITS - pos;
-    }
-    else {
-        pos  -= BITS;
-        INC; ReadLE32 ( dword,  InputBuff+ InputCnt );
-        if ( pos > 0 ) {
-            ret <<= pos;
-            ret  |= dword >> (BITS - pos);
-        }
-    }
-    ret &= mask [bits];
-
-    LEAVE(78);
-    REP (printf ( "read(%2u) = %u\n", bits, ret ));
-    return ret;
-}
-
-/*
- *  Fast form for Bitstream_read(1)
- */
-
-static Uint
-Bitstream_read1 ( void )
-{
-    Uint  ret;
-
-    ENTER(93);
-
-    ret = (Uint)( dword >> ( BITS - ++pos) ) & 1;
-    if ( pos >= BITS ) {
-        INC; ReadLE32 ( dword,  InputBuff+ InputCnt );
-        pos  -= BITS;
-    }
-
-    LEAVE(93);
-    REP (printf ( "read( 1) = %u\n", ret ));
-    return ret;
-}
-
-
-/*
- *  Read of n bits (Restrictions see Bitstream_read), without acknowledging them
- */
-
-Uint32_t
-Bitstream_preview ( Int bits )
-{
-    Uint      new_pos = pos + bits;
-    Uint32_t  ret     = dword;
-    Uint32_t  tmp;
-
-    if ( new_pos < BITS ) {
-        ret >>= BITS - new_pos;
-    }
-    else if ( new_pos > BITS ) {
-        ret <<= new_pos - BITS;
-        ReadLE32 ( tmp, & InputBuff [(InputCnt+1) & IBUFMASK] );
-        ret  |= tmp >> (2*BITS - new_pos);
-    }
-    return ret /* & mask[bits] */;
-}
-
-
-/*
- *  Decode Huffman-code, which can be a maximum of 14 bits long.
- *  Decoding simply scans the table.
- */
-
-static Int
-Huffman_Decode ( const Huffman_t* Table )
-{
-    Uint32_t  code;
-    Uint32_t  tmp;
-
-    ENTER(79);
-
-    code = dword << pos;
-    if ( pos > BITS - 14 ) {
-        ReadLE32 ( tmp, & InputBuff [(InputCnt+1) & IBUFMASK] );
-        code |= tmp >> (BITS - pos);
-    }
-
-    while ( code < Table->Code )
-        Table++;
-
-    // Set Bitstream-position without dummy-read
-    if ( (pos += Table->Length) >= BITS ) {
-        pos   -= BITS;
-        INC; ReadLE32 ( dword,  InputBuff+ InputCnt );
-    }
-
-    LEAVE(79);
-    REP (printf ( "decode() = %d\n", Table->Value ));
-    return Table->Value;
-}
-
-
-/*
- *  Decode Huffman-code, which can be a maximum of 14 bits long.
- *  Decoding works with rough positioning via a helper table (tab,unused_bits),
- *  after which it continues to scan until the value is reached.
- */
-
-static Int
-Huffman_Decode_faster ( const Huffman_t* Table, const Uint8_t* tab, Int unused_bits )
-{
-    Uint32_t  code;
-    Uint32_t  tmp;
-
-    ENTER(93);
-
-    code = dword << pos;
-    if ( pos > BITS - 14 ) {
-        ReadLE32 ( tmp, & InputBuff [(InputCnt+1) & IBUFMASK] );
-        code |= tmp >> (BITS - pos);
-    }
-
-    Table += tab [(size_t)(code >> unused_bits) ];
-
-    while ( code < Table->Code )
-        Table++;
-
-    // Set Bitstream-position without dummy-read
-    if ( (pos += Table->Length) >= BITS ) {
-        pos   -= BITS;
-        INC; ReadLE32 ( dword,  InputBuff+ InputCnt );
-    }
-
-    LEAVE(93);
-    REP (printf ( "decode() = %d\n", Table->Value ));
-    return Table->Value;
-}
-
-#define HUFFMAN_DECODE_FASTER(a,b,c)  Huffman_Decode_faster ( (a), (b), 32-(c) )
-
-
-/*
- *  Decode Huffman-code, which can be a maximum of 16 bits long.
- *  Decoding works with a table lookup, therefore only usable for "short" codes,
- *  otherwise we would need huge tables.
- */
-
-static Int
-Huffman_Decode_fastest ( const Huffman_t* Table, const Uint8_t* tab, Int unused_bits )
-{
-    Uint32_t  code;
-    Uint32_t  tmp;
-
-    ENTER(91);
-
-    code = dword << pos;
-    // is the following line optimal?
-    if ( pos > unused_bits + BITS - 32 ) {
-        ReadLE32 ( tmp, & InputBuff [(InputCnt+1) & IBUFMASK] );
-        code |= tmp >> (BITS - pos);
-    }
-
-    Table += tab [ (size_t) (code >> unused_bits) ];
-
-    // Set Bitstream-position without dummy-read
-    if ( (pos += Table->Length) >= BITS ) {
-        pos   -= BITS;
-        INC; ReadLE32 ( dword,  InputBuff+ InputCnt );
-    }
-
-    LEAVE(91);
-    REP (printf ( "decode() = %d\n", Table->Value ));
-    return Table->Value;
-}
-
-#define HUFFMAN_DECODE_FASTEST(a,b,c)  Huffman_Decode_fastest ( (a), (b), 32-(c) )
-
-
-/*
- * Decode huffmann-coded SCFI-Bundle (SV 4...6)
- * Not optimized.
- */
-
-static Uint
-SCFIBundle_read ( const Huffman_t* Table ) // is always called with Arg SCFI_Bundle
-{
-    Uint32_t   code;
-
-    ENTER(81);
-
-    code = dword << pos;
-    if (pos > BITS-6)
-        code |= InputBuff [(InputCnt+1) & IBUFMASK] >> (BITS-pos);
-
-    while ( code < Table->Code )
-        Table++;
-
-    // Set Bitstream-position without dummy-read
-    if ( (pos += Table->Length) >= BITS ) {
-        pos   -= BITS;
-        dword  = InputBuff [InputCnt = (InputCnt+1) & IBUFMASK];
-    }
-
-    LEAVE(81);
-    return (Uint)Table->Value;
-}
-
-
-Ulong
-BitsRead ( void )
-{
-    if (LastInputCnt > InputCnt) Wraps++;
-    LastInputCnt = InputCnt;
-
-    return ((Ulong)Wraps*IBUFSIZE + InputCnt) * BITS + pos;
-}
-
-#if  DUMPSELECT > 0
-# include "dump.c"
-Ulong              __x[8];
-# define BITPOS(x)  __x[x] = BitsRead ()
-#else
-# define BITPOS(x)
-#endif
-
-/*
- *  Own function or macro, so that one can centrally modify it
- */
-
-#define Decode_DSCF()   HUFFMAN_DECODE_FASTEST ( HuffDSCF, LUTDSCF, 6 )
-
-/*
- *  Higher resolutions (8 upwards) aren't huffman-coded anymore, number of bits that will then be read directly
- *  Bits per sample for selected resolution, only for the higher resolutions without huffman-coding
- */
-
-#define RES_BIT(x)      ((x)-1)
-
-/******************************************************************************************/
-/****************************************** SV 6 ******************************************/
-/******************************************************************************************/
-void
-Read_Bitstream_SV6 ( void )
-{
-    Int                Band;
-    Uint               k;
-    const Huffman_t*   Table;
-    const Huffman_t*   xL;
-    const Huffman_t*   xR;
-    Int                Max_Used_Band = 0;
-
-    ENTER(6);
-
-    /********* Read resolution and LR/MS for all Subbands and define last Subband *********************/
-
-    BITPOS(0);
-    for ( Band = 0; Band <= Max_Band; Band++ ) {
-        Table = Region [Band];
-
-        Res[Band].L = Q_res[Band][Bitrate <= 128  ?  Huffman_Decode(Table)  :  (Int) Bitstream_read(Q_bit[Band])];
-        Res[Band].R = 0;
-
-        // Don't read for IS for bands from MinBand+1 on
-        if ( !IS_used  ||  Band < Min_Band ) {
-            MS_Band[Band] = 0;
-            if (MS_used)
-                MS_Band[Band] = Bitstream_read1 ();
-            Res[Band].R = Q_res[Band][Bitrate <= 128  ?  Huffman_Decode(Table)  :  (Int) Bitstream_read(Q_bit[Band])];
-        }
-        // Define last used Subband (following operations are just executed up until this one)
-        if ( Res[Band].L  ||  Res[Band].R )
-            Max_Used_Band = Band;
-    }
-
-    /********* Read used Scalebandfactor-Splitting of the last 36 Samples per Subband and Value-addressing (abs./rel.) */
-
-    BITPOS(1);
-    for ( Band = 0; Band <= Max_Used_Band; Band++ ) {
-        if ( Res[Band].L )
-            SCFI[Band].L = SCFIBundle_read (SCFI_Bundle);
-        if ( Res[Band].R  ||  (Res[Band].L  &&  IS_used  &&  Band >= Min_Band) )
-            SCFI[Band].R = SCFIBundle_read (SCFI_Bundle);
-    }
-
-    /********* Read Scalefactors for all Subbands three times for 12 Samples each **************************/
-
-    BITPOS(2);
-    Table = DSCF_Entropie;
-    for ( Band = 0; Band <= Max_Used_Band; Band++ ) {
-        if ( Res[Band].L ) {
-            switch ( SCFI[Band].L ) {
-            case 0:                                     // without Differential SCF
-                SCF_Index[0][Band].L = (Int) Bitstream_read(6);
-                SCF_Index[1][Band].L = (Int) Bitstream_read(6);
-                SCF_Index[2][Band].L = (Int) Bitstream_read(6);
-                break;
-            case 2:
-                SCF_Index[0][Band].L = (Int) Bitstream_read(6);
-                SCF_Index[1][Band].L =
-                SCF_Index[2][Band].L = (Int) Bitstream_read(6);
-                break;
-            case 4:
-                SCF_Index[0][Band].L =
-                SCF_Index[1][Band].L = (Int) Bitstream_read(6);
-                SCF_Index[2][Band].L = (Int) Bitstream_read(6);
-                break;
-            case 6:
-                SCF_Index[0][Band].L =
-                SCF_Index[1][Band].L =
-                SCF_Index[2][Band].L = (Int) Bitstream_read(6);
-                break;
-            case 1:                                     // with Differential SCF
-                SCF_Index[0][Band].L = SCF_Index[2][Band].L + Huffman_Decode(Table);
-                SCF_Index[1][Band].L = SCF_Index[0][Band].L + Huffman_Decode(Table);
-                SCF_Index[2][Band].L = SCF_Index[1][Band].L + Huffman_Decode(Table);
-                break;
-            default:
-                assert (0);
-            case 3:
-                SCF_Index[0][Band].L = SCF_Index[2][Band].L + Huffman_Decode(Table);
-                SCF_Index[1][Band].L =
-                SCF_Index[2][Band].L = SCF_Index[0][Band].L + Huffman_Decode(Table);
-                break;
-            case 5:
-                SCF_Index[0][Band].L =
-                SCF_Index[1][Band].L = SCF_Index[2][Band].L + Huffman_Decode(Table);
-                SCF_Index[2][Band].L = SCF_Index[1][Band].L + Huffman_Decode(Table);
-                break;
-            case 7:
-                SCF_Index[0][Band].L =
-                SCF_Index[1][Band].L =
-                SCF_Index[2][Band].L = SCF_Index[2][Band].L + Huffman_Decode(Table);
-                break;
-            }
-        }
-
-        if ( Res[Band].R  ||  (Res[Band].L  &&  IS_used  &&  Band >= Min_Band) ) {
-            switch ( SCFI[Band].R ) {
-            case 0:
-                SCF_Index[0][Band].R = (Int) Bitstream_read(6);
-                SCF_Index[1][Band].R = (Int) Bitstream_read(6);
-                SCF_Index[2][Band].R = (Int) Bitstream_read(6);
-                break;
-            case 2:
-                SCF_Index[0][Band].R = (Int) Bitstream_read(6);
-                SCF_Index[1][Band].R =
-                SCF_Index[2][Band].R = (Int) Bitstream_read(6);
-                break;
-            case 4:
-                SCF_Index[0][Band].R =
-                SCF_Index[1][Band].R = (Int) Bitstream_read(6);
-                SCF_Index[2][Band].R = (Int) Bitstream_read(6);
-                break;
-            case 6:
-                SCF_Index[0][Band].R =
-                SCF_Index[1][Band].R =
-                SCF_Index[2][Band].R = (Int) Bitstream_read(6);
-                break;
-            case 1:
-                SCF_Index[0][Band].R = SCF_Index[2][Band].R + Huffman_Decode(Table);
-                SCF_Index[1][Band].R = SCF_Index[0][Band].R + Huffman_Decode(Table);
-                SCF_Index[2][Band].R = SCF_Index[1][Band].R + Huffman_Decode(Table);
-                break;
-            default:
-                assert (0);
-            case 3:
-                SCF_Index[0][Band].R = SCF_Index[2][Band].R + Huffman_Decode(Table);
-                SCF_Index[1][Band].R =
-                SCF_Index[2][Band].R = SCF_Index[0][Band].R + Huffman_Decode(Table);
-                break;
-            case 5:
-                SCF_Index[0][Band].R =
-                SCF_Index[1][Band].R = SCF_Index[2][Band].R + Huffman_Decode(Table);
-                SCF_Index[2][Band].R = SCF_Index[1][Band].R + Huffman_Decode(Table);
-                break;
-            case 7:
-                SCF_Index[0][Band].R =
-                SCF_Index[1][Band].R =
-                SCF_Index[2][Band].R = SCF_Index[2][Band].R + Huffman_Decode(Table);
-                break;
-            }
-        }
-    }
-
-    /********* Read the quantized Samples per Subband (without Offsets, i.e. values lie zero-symmetric) */
-
-    BITPOS(3);
-    for ( Band = 0; Band <= Max_Used_Band; Band++ ) {
-        xL = Entropie [Res[Band].L];
-        xR = Entropie [Res[Band].R];
-
-        if ( xL != NULL  ||  xR != NULL )
-            for (k=0; k<36; k++) {
-                if ( xL != NULL )
-                    Q[Band].L[k] = Huffman_Decode (xL);
-                if ( xR != NULL )
-                    Q[Band].R[k] = Huffman_Decode (xR);
-            }
-
-        if ( Res[Band].L >= 8  ||  Res[Band].R >= 8 )
-            for (k=0; k<36; k++) {
-                if ( Res[Band].L >= 8 )
-                    Q[Band].L[k] = (Int) Bitstream_read (RES_BIT(Res[Band].L)) - Dc[Res[Band].L];
-                if ( Res[Band].R >= 8 )
-                    Q[Band].R[k] = (Int) Bitstream_read (RES_BIT(Res[Band].R)) - Dc[Res[Band].R];
-            }
-    }
-
-    BITPOS(4);
-#if  DUMPSELECT > 0
-    Dump ( Max_Used_Band, MS_Band, Res, SCF_Index, Q, 6, __x );
-#endif
-
-    LEAVE(6);
-    return;
-}
-
-
-static Schar  tab30 [3*3*3] = { -1, 0,+1,-1, 0,+1,-1, 0,+1,-1, 0,+1,-1, 0,+1,-1, 0,+1,-1, 0,+1,-1, 0,+1,-1, 0,+1 };
-static Schar  tab31 [3*3*3] = { -1,-1,-1, 0, 0, 0,+1,+1,+1,-1,-1,-1, 0, 0, 0,+1,+1,+1,-1,-1,-1, 0, 0, 0,+1,+1,+1 };
-static Schar  tab32 [3*3*3] = { -1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0,+1,+1,+1,+1,+1,+1,+1,+1,+1 };
-static Schar  tab50 [5*5  ] = { -2,-1, 0,+1,+2,-2,-1, 0,+1,+2,-2,-1, 0,+1,+2,-2,-1, 0,+1,+2,-2,-1, 0,+1,+2 };
-static Schar  tab51 [5*5  ] = { -2,-2,-2,-2,-2,-1,-1,-1,-1,-1, 0, 0, 0, 0, 0,+1,+1,+1,+1,+1,+2,+2,+2,+2,+2 };
-#ifdef USE_SV8
-static Schar  tab70 [7*7  ] = { -3,-2,-1, 0,+1,+2,+3,-3,-2,-1, 0,+1,+2,+3,-3,-2,-1, 0,+1,+2,+3,-3,-2,-1, 0,+1,+2,+3,-3,-2,-1, 0,+1,+2,+3,-3,-2,-1, 0,+1,+2,+3,-3,-2,-1, 0,+1,+2,+3 };
-static Schar  tab71 [7*7  ] = { -3,-3,-3,-3,-3,-3,-3,-2,-2,-2,-2,-2,-2,-2,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, 0, 0, 0,+1,+1,+1,+1,+1,+1,+1,+2,+2,+2,+2,+2,+2,+2,+3,+3,+3,+3,+3,+3,+3 };
-#endif
-// 229 Bytes
-
-#if 0
-static void
-CalculateTNS ( Float* TNS, const CPair_t *Res, const Quant_t* Q, int Band )     // For a non-shaped output the vector should be all 65536 / 5 = 13170.2
-{
-    int    i;
-    int    j;
-    Float  Sum;
-
-    for ( i = 0; i < 36; i++ )
-        TNS [i] = 3.;
-
-    for ( j = (Band+1)/2; j-- > 0; ) {
-        do {
-            Q--;
-            if (Band-- == 0) goto cont;
-        } while ( (--Res) -> L <= 0 );
-        for ( i = 0; i < 36; i++ )
-            TNS [i] += Q->L [i] * Q->L [i];
-    }
-cont:
-
-    for ( j = 0; j < 3; j++ ) {
-        Sum = 0;
-        for ( i = 0; i < 12; i++ )
-            Sum += TNS [12*j + i];
-        Sum = sqrt (12. / Sum) * 13170.2;
-        for ( i = 0; i < 12; i++ )
-            TNS [12*j + i] = sqrt (TNS [12*j + i]) * Sum;
-    }
-}
-#endif
-
-/******************************************************************************************/
-/****************************************** SV 7 ******************************************/
-/******************************************************************************************/
-
-void
-Read_Bitstream_SV7 ( void )
-{
-//  Float               TNS [2] [36];
-    Int                 Band;
-    Uint                k;
-    Int*                p;
-    const Huffman_t*    Table;
-    Int                 diff;
-    Uint                idx;
-    Uint32_t            tmp;
-    Int                 Max_Used_Band = -1;
-
-    ENTER(7);
-
-    /********* Read resolution and LR/MS for Subband 0 *******************************************************/
-
-    BITPOS(0);
-    Res[0].L = (Int) Bitstream_read(4);
-    Res[0].R = 0;
-    if ( !IS_used  ||  Min_Band > 0 ) {
-        Res[0].R = (Int) Bitstream_read(4);
-        MS_Band[0] = 0;
-        if ( MS_used  &&  (Res[0].L  ||  Res[0].R) )
-            MS_Band[0] = Bitstream_read1 ();
-    }
-    if ( Res[0].L  ||  Res[0].R )
-        Max_Used_Band = 0;
-
-    /********* Read resolution and LR/MS for following subbands and determine last Subband *****************/
-
-    Table = HuffHdr;
-    for ( Band = 1; Band <= Max_Band; Band++ ) {
-
-        diff = Huffman_Decode (Table);
-        Res[Band].L = diff != 4  ?  Res[Band-1].L + diff  :  (Int) Bitstream_read(4);
-        Res[Band].R = 0;
-
-        // Don't read for IS for bands from MinBand+1 on
-        if ( !IS_used  ||  Min_Band > Band ) {
-            diff = Huffman_Decode (Table);
-            Res[Band].R = diff != 4  ?  Res[Band-1].R + diff  :  (Int) Bitstream_read(4);
-            MS_Band[Band] = 0;
-            if ( MS_used  &&  (Res[Band].L  ||  Res[Band].R) )
-                switch ( Res[Band].R ) {
-                case -3: MS_Band[Band] = Bitstream_read (2) << 2;
-                         break;
-                case -2: MS_Band[Band] = Bitstream_read (4) << 0;
-                         break;
-                default: MS_Band[Band] = Bitstream_read1 ();
-                         break;
-                }
-        }
-        // Define last used Subband (following operations are just executed up until this one)
-        if ( Res[Band].L  ||  Res[Band].R )
-            Max_Used_Band = Band;
-    }
-
-    /********* Read used Scalebandfactor-Splitting of the last 36 Samples per Subband ************************/
-
-    BITPOS(1);
-    Table = HuffSCFI;
-    for ( Band = 0; Band <= Max_Used_Band; Band++ ) {
-        if ( Res[Band].L > 0  ||  Res[Band].L == -1 )
-            SCFI[Band].L = Huffman_Decode (Table);
-        if ( (Res[Band].R > 0  ||  Res[Band].R == -1)  ||  (Res[Band].L  &&  IS_used  &&  Band >= Min_Band) )
-            SCFI[Band].R = Huffman_Decode (Table);
-    }
-
-    /********* Read Scalefaktors for all Subbands three times for 12 Samples each **************************/
-
-    BITPOS(2);
-    Table = HuffDSCF;
-    for ( Band = 0; Band <= Max_Used_Band; Band++ ) {
-
-        if ( Res[Band].L > 0  ||  Res[Band].L == -1 ) {
-
-            switch ( SCFI[Band].L ) {
-            case 0:
-                diff = Decode_DSCF ();
-                SCF_Index[0][Band].L = diff!=8  ?  SCF_Index[2][Band].L + diff  :  (Int) Bitstream_read(6);
-                diff = Decode_DSCF ();
-                SCF_Index[1][Band].L = diff!=8  ?  SCF_Index[0][Band].L + diff  :  (Int) Bitstream_read(6);
-                diff = Decode_DSCF ();
-                SCF_Index[2][Band].L = diff!=8  ?  SCF_Index[1][Band].L + diff  :  (Int) Bitstream_read(6);
-                break;
-            case 1:
-                diff = Decode_DSCF ();
-                SCF_Index[0][Band].L = diff!=8  ?  SCF_Index[2][Band].L + diff  :  (Int) Bitstream_read(6);
-                diff = Decode_DSCF ();
-                SCF_Index[1][Band].L =
-                SCF_Index[2][Band].L = diff!=8  ?  SCF_Index[0][Band].L + diff  :  (Int) Bitstream_read(6);
-                break;
-            case 2:
-                diff = Decode_DSCF ();
-                SCF_Index[0][Band].L =
-                SCF_Index[1][Band].L = diff!=8  ?  SCF_Index[2][Band].L + diff  :  (Int) Bitstream_read(6);
-                diff = Decode_DSCF ();
-                SCF_Index[2][Band].L = diff!=8  ?  SCF_Index[1][Band].L + diff  :  (Int) Bitstream_read(6);
-                break;
-            default:
-                assert (0);
-            case 3:
-                diff = Decode_DSCF ();
-                SCF_Index[0][Band].L =
-                SCF_Index[1][Band].L =
-                SCF_Index[2][Band].L = diff!=8  ?  SCF_Index[2][Band].L + diff  :  (Int) Bitstream_read(6);
-                break;
-            }
-        }
-
-        if ( ( Res[Band].R > 0  ||  Res[Band].R == -1 )  ||  ( Res[Band].L  &&  IS_used  &&  Band >= Min_Band ) ) {
-
-            switch ( SCFI[Band].R ) {
-            case 0:
-                diff = Decode_DSCF ();
-                SCF_Index[0][Band].R = diff!=8  ?  SCF_Index[2][Band].R + diff  :  (Int) Bitstream_read(6);
-                diff = Decode_DSCF ();
-                SCF_Index[1][Band].R = diff!=8  ?  SCF_Index[0][Band].R + diff  :  (Int) Bitstream_read(6);
-                diff = Decode_DSCF ();
-                SCF_Index[2][Band].R = diff!=8  ?  SCF_Index[1][Band].R + diff  :  (Int) Bitstream_read(6);
-                break;
-            case 1:
-                diff = Decode_DSCF ();
-                SCF_Index[0][Band].R = diff!=8  ?  SCF_Index[2][Band].R + diff  :  (Int) Bitstream_read(6);
-                diff = Decode_DSCF ();
-                SCF_Index[1][Band].R =
-                SCF_Index[2][Band].R = diff!=8  ?  SCF_Index[0][Band].R + diff  :  (Int) Bitstream_read(6);
-                break;
-            case 2:
-                diff = Decode_DSCF ();
-                SCF_Index[0][Band].R =
-                SCF_Index[1][Band].R = diff!=8  ?  SCF_Index[2][Band].R + diff  :  (Int) Bitstream_read(6);
-                diff = Decode_DSCF ();
-                SCF_Index[2][Band].R = diff!=8  ?  SCF_Index[1][Band].R + diff  :  (Int) Bitstream_read(6);
-                break;
-            default:
-                assert (0);
-            case 3:
-                diff = Decode_DSCF ();
-                SCF_Index[0][Band].R =
-                SCF_Index[1][Band].R =
-                SCF_Index[2][Band].R = diff!=8  ?  SCF_Index[2][Band].R + diff  :  (Int) Bitstream_read(6);
-                break;
-            }
-        }
-    }
-
-    /********* Read the quantized Samples per Subband (without Offsets, i.e. values lie zero-symmetric) */
-
-    BITPOS(3);
-    for ( Band = 0; Band <= Max_Used_Band; Band++ ) {
-
-        p = Q[Band].L;
-        switch ( Res[Band].L ) {
-        case  -2: case  -3:
-            for (k=0; k<36; k++)
-                *p++ = 0;
-            break;
-        case -1:
-#if 0
-            if ( Res[Band-1].L != -1 )
-                CalculateTNS ( TNS[0], (CPair_t *)&Res[Band].L, (Quant_t*)p, Band );
-            tmp = random_int ();
-            for (k=0; k<36/2; k++, tmp >>= 1)
-                *p++ = (int)(1 - (tmp & 2)) * TNS [0][k];
-            tmp = random_int ();
-            for (k=36/2; k<36; k++, tmp >>= 1)
-                *p++ = (int)(1 - (tmp & 2)) * TNS [0][k];
-#elif 0
-            tmp = random_int ();
-            for (k=0; k<36/2; k++, tmp >>= 1)
-                *p++ = (int)(1 - (tmp & 2));
-            tmp = random_int ();
-            for (k=36/2; k<36; k++, tmp >>= 1)
-                *p++ = (int)(1 - (tmp & 2));
-#else
-            for (k=0; k<36; k++ ) {
-                tmp  = random_int ();
-                *p++ = ((tmp >> 24) & 0xFF) + ((tmp >> 16) & 0xFF) + ((tmp >>  8) & 0xFF) + ((tmp >>  0) & 0xFF) - 510;
-            }
-#endif
-            break;
-        case 0:
-            // Subband samples are not used in this case, see Requant Routines
-            break;
-        case 1:
-            if ( Bitstream_read1 () )
-                for (k=0; k<36/3; k++) {
-                    idx  = HUFFMAN_DECODE_FASTEST ( HuffQ1[1], LUT1_1,  9 );
-                    *p++ = tab30[idx];
-                    *p++ = tab31[idx];
-                    *p++ = tab32[idx];
-                }
-            else
-                for (k=0; k<36/3; k++) {
-                    idx  = HUFFMAN_DECODE_FASTEST ( HuffQ1[0], LUT1_0,  6 );
-                    *p++ = tab30[idx];
-                    *p++ = tab31[idx];
-                    *p++ = tab32[idx];
-                }
-            break;
-        case 2:
-            if ( Bitstream_read1 () )
-                for (k=0; k<36/2; k++) {
-                    idx  = HUFFMAN_DECODE_FASTEST ( HuffQ2[1], LUT2_1, 10 );
-                    *p++ = tab50[idx];
-                    *p++ = tab51[idx];
-                }
-            else
-                for (k=0; k<36/2; k++) {
-                    idx  = HUFFMAN_DECODE_FASTEST ( HuffQ2[0], LUT2_0,  7 );
-                    *p++ = tab50[idx];
-                    *p++ = tab51[idx];
-                }
-            break;
-        case 3:
-            if ( Bitstream_read1 () )
-                for (k=0; k<36; k++)
-                    *p++ = HUFFMAN_DECODE_FASTEST ( HuffQ3[1], LUT3_1,  5 );
-            else
-                for (k=0; k<36; k++)
-                    *p++ = HUFFMAN_DECODE_FASTEST ( HuffQ3[0], LUT3_0,  4 );
-            break;
-        case 4:
-            if ( Bitstream_read1 () )
-                for (k=0; k<36; k++)
-                    *p++ = HUFFMAN_DECODE_FASTEST ( HuffQ4[1], LUT4_1,  5 );
-            else
-                for (k=0; k<36; k++)
-                    *p++ = HUFFMAN_DECODE_FASTEST ( HuffQ4[0], LUT4_0,  4 );
-            break;
-        case 5:
-            if ( Bitstream_read1 () )
-                for (k=0; k<36; k++)
-                    *p++ = HUFFMAN_DECODE_FASTEST ( HuffQ5[1], LUT5_1,  8 );
-            else
-                for (k=0; k<36; k++)
-                    *p++ = HUFFMAN_DECODE_FASTEST ( HuffQ5[0], LUT5_0,  6 );
-            break;
-        case 6:
-            if ( Bitstream_read1 () )
-                for (k=0; k<36; k++)
-                    *p++ = HUFFMAN_DECODE_FASTER  ( HuffQ6[1], LUT6_1,  7 );
-            else
-                for (k=0; k<36; k++)
-                    *p++ = HUFFMAN_DECODE_FASTEST ( HuffQ6[0], LUT6_0,  7 );
-            break;
-        case 7:
-            if ( Bitstream_read1 () )
-                for (k=0; k<36; k++)
-                    *p++ = HUFFMAN_DECODE_FASTER  ( HuffQ7[1], LUT7_1,  8 );
-            else
-                for (k=0; k<36; k++)
-                    *p++ = HUFFMAN_DECODE_FASTEST ( HuffQ7[0], LUT7_0,  8 );
-            break;
-#if 0
-            Table = HuffQ [Bitstream_read1 ()] [Res[Band].R];
-            for (k=0; k<36; k++)
-                *p++ = Huffman_Decode (Table);
-            break;
-#endif
-        case 8: case 9: case 10: case 11: case 12: case 13: case 14: case 15: case 16: case 17:
-            tmp = Dc[Res[Band].L];
-            for (k=0; k<36; k++)
-                *p++ = (Int) Bitstream_read (RES_BIT(Res[Band].L)) - tmp;
-            break;
-        default:
-            return;
-        }
-
-        p = Q[Band].R;
-        switch ( Res[Band].R ) {
-        case  -2: case  -3:
-            for (k=0; k<36; k++)
-                *p++ = 0;
-            break;
-        case -1:
-#if 0
-            if ( Res[Band-1].R != -1 )
-                CalculateTNS ( TNS[1], (CPair_t *)&Res[Band].R, (Quant_t*)p, Band );
-            tmp = random_int ();
-            for (k=0; k<36/2; k++, tmp >>= 1)
-                *p++ = (int)(1 - (tmp & 2)) * TNS [1][k];
-            tmp = random_int ();
-            for (k=36/2; k<36; k++, tmp >>= 1)
-                *p++ = (int)(1 - (tmp & 2)) * TNS [1][k];
-#elif 0
-            tmp = random_int ();
-            for (k=0; k<36/2; k++, tmp >>= 1)
-                *p++ = (int)(1 - (tmp & 2));
-            tmp = random_int ();
-            for (k=36/2; k<36; k++, tmp >>= 1)
-                *p++ = (int)(1 - (tmp & 2));
-#else
-            for (k=0; k<36; k++ ) {
-                tmp  = random_int ();
-                *p++ = ((tmp >> 24) & 0xFF) + ((tmp >> 16) & 0xFF) + ((tmp >>  8) & 0xFF) + ((tmp >>  0) & 0xFF) - 510;
-            }
-#endif
-            break;
-        case 0:
-            // Subband samples are not used in this case, see Requant Routines
-            break;
-        case 1:
-            if ( Bitstream_read1 () )
-                for (k=0; k<36/3; k++) {
-                    idx  = HUFFMAN_DECODE_FASTEST ( HuffQ1[1], LUT1_1,  9 );
-                    *p++ = tab30[idx];
-                    *p++ = tab31[idx];
-                    *p++ = tab32[idx];
-                }
-            else
-                for (k=0; k<36/3; k++) {
-                    idx  = HUFFMAN_DECODE_FASTEST ( HuffQ1[0], LUT1_0,  6 );
-                    *p++ = tab30[idx];
-                    *p++ = tab31[idx];
-                    *p++ = tab32[idx];
-                }
-            break;
-        case 2:
-            if ( Bitstream_read1 () )
-                for (k=0; k<36/2; k++) {
-                    idx  = HUFFMAN_DECODE_FASTEST ( HuffQ2[1], LUT2_1, 10 );
-                    *p++ = tab50[idx];
-                    *p++ = tab51[idx];
-                }
-            else
-                for (k=0; k<36/2; k++) {
-                    idx  = HUFFMAN_DECODE_FASTEST ( HuffQ2[0], LUT2_0,  7 );
-                    *p++ = tab50[idx];
-                    *p++ = tab51[idx];
-                }
-            break;
-        case 3:
-            if ( Bitstream_read1 () )
-                for (k=0; k<36; k++)
-                    *p++ = HUFFMAN_DECODE_FASTEST ( HuffQ3[1], LUT3_1,  5 );
-            else
-                for (k=0; k<36; k++)
-                    *p++ = HUFFMAN_DECODE_FASTEST ( HuffQ3[0], LUT3_0,  4 );
-            break;
-        case 4:
-            if ( Bitstream_read1 () )
-                for (k=0; k<36; k++)
-                    *p++ = HUFFMAN_DECODE_FASTEST ( HuffQ4[1], LUT4_1,  5 );
-            else
-                for (k=0; k<36; k++)
-                    *p++ = HUFFMAN_DECODE_FASTEST ( HuffQ4[0], LUT4_0,  4 );
-            break;
-        case 5:
-            if ( Bitstream_read1 () )
-                for (k=0; k<36; k++)
-                    *p++ = HUFFMAN_DECODE_FASTEST ( HuffQ5[1], LUT5_1,  8 );
-            else
-                for (k=0; k<36; k++)
-                    *p++ = HUFFMAN_DECODE_FASTEST ( HuffQ5[0], LUT5_0,  6 );
-            break;
-        case 6:
-            if ( Bitstream_read1 () )
-                for (k=0; k<36; k++)
-                    *p++ = HUFFMAN_DECODE_FASTER  ( HuffQ6[1], LUT6_1,  7 );
-            else
-                for (k=0; k<36; k++)
-                    *p++ = HUFFMAN_DECODE_FASTEST ( HuffQ6[0], LUT6_0,  7 );
-            break;
-        case 7:
-            if ( Bitstream_read1 () )
-                for (k=0; k<36; k++)
-                    *p++ = HUFFMAN_DECODE_FASTER  ( HuffQ7[1], LUT7_1,  8 );
-            else
-                for (k=0; k<36; k++)
-                    *p++ = HUFFMAN_DECODE_FASTEST ( HuffQ7[0], LUT7_0,  8 );
-            break;
-#if 0
-            Table = HuffQ [Bitstream_read1 ()] [Res[Band].R];
-            for (k=0; k<36; k++)
-                *p++ = Huffman_Decode (Table);
-            break;
-#endif
-        case 8: case 9: case 10: case 11: case 12: case 13: case 14: case 15: case 16: case 17:
-            tmp = Dc[Res[Band].R];
-            for (k=0; k<36; k++)
-                *p++ = (Int) Bitstream_read (RES_BIT(Res[Band].R)) - tmp;
-            break;
-        default:
-            return;
-        }
-    }
-
-    BITPOS(4);
-
-#if  DUMPSELECT > 0
-    Dump ( Max_Used_Band, MS_Band, Res, SCF_Index, Q, 7, __x );
-#endif
-
-    LEAVE(7);
-    return;
-}
-
-
-/******************************************************************************************/
-/****************************************** SV 8 ******************************************/
-/******************************************************************************************/
-
-#ifdef USE_SV8
-void
-Read_Bitstream_SV8 ( void )
-{
-    Int                Band;
-    Int                k;
-    Int                Channel;
-    Int                idx;
-    Int                Max_Channel;
-    Int                Max_Used_Band;
-    CPair_t*           Res_p;
-    CPairArray*        SCF_p;
-    Int*               p;
-    const Huffman_t*   Table;
-
-    ENTER(8);
-
-    memset ( Res    , 0, sizeof(Res)     );
-    memset ( MS_Band, 0, sizeof(MS_Band) );
-    memset ( Q      , 0, sizeof(Q)       );
-
-    /********************************* Header *****************************/
-    Max_Used_Band = (Int) Bitstream_read(6) - 1; // maximum non-zero band
-    if ( (Int)Max_Used_Band < 0 )
-        return;
-
-    Max_Channel   = (Int) Bitstream_read (3);    // number of channels
-    MS_used       = Bitstream_read1 ();          // M/S-coding
-
-    /******************************* Res ******************************/
-    for ( Channel = 0; Channel < Max_Channel; Channel++ ) {
-        Res_p = Channel  ?  (CPair_t*)&(Res[0].R)  :  (CPair_t*)&(Res[0].L);
-
-        for ( Band = 0; Band <= Max_Used_Band; Band++ )
-            Res_p[Band].L = (Int) Bitstream_read (4);
-    }
-
-    /******************************* MS *******************************/
-    if ( MS_used ) {
-        for ( Channel = 0; Channel < Max_Channel-1; Channel++) {
-            for ( Band = 0; Band <= Max_Used_Band; Band++ )
-                MS_Band[Band] = Bitstream_read1 ();
-        }
-    }
-
-    /**************************** SCF/DSCF ****************************/
-    for ( Channel = 0; Channel < Max_Channel; Channel++ ) {
-        if ( Channel == 0 ) {
-            SCF_p = (CPairArray*) &(SCF_Index [0][0].L);
-            Res_p = (CPair_t*) &(Res [0].L);
-        } else {
-            SCF_p = (CPairArray*) &(SCF_Index [0][0].R);
-            Res_p = (CPair_t*) &(Res [0].R);
-        }
-
-        for ( Band = 0; Band <= Max_Used_Band; Band++ ) {
-            if ( Res_p[Band].L ) {
-                SCF_p[0][Band].L = (Int) Bitstream_read (7);
-                SCF_p[1][Band].L = (Int) Bitstream_read (7);
-                SCF_p[2][Band].L = (Int) Bitstream_read (7);
-            }
-        }
-    }
-
-    /***************************** Samples ****************************/
-    for ( Channel = 0; Channel < Max_Channel; Channel++ ) {
-        if ( Channel == 0 ) {
-            p     = Q[0].L;
-            Res_p = (CPair_t*)&(Res[0].L);
-        } else {
-            p     = Q[0].R;
-            Res_p = (CPair_t*)&(Res[0].R);
-        }
-
-        for ( Band = 0; Band <= Max_Used_Band; Band++, p+=36 ) {
-            REP (printf ("Channel %u, Band %2u (%2u)\n", Channel, Band, Res_p[Band].L ));
-            switch ( Res_p[Band].L ) {
-            case 0:
-                p += 36;
-                break;
-            case 1:
-                Table = HuffN [(Int) Bitstream_read(1)] [1];
-                for (k=0; k<36/3; k++) {
-                    idx = Huffman_Decode (Table);
-                    *p++ = tab30[idx];
-                    *p++ = tab31[idx];
-                    *p++ = tab32[idx];
-                }
-                break;
-            case 2:
-                Table = HuffN [(Int) Bitstream_read(1)] [2];
-                for (k=0; k<36/2; k++) {
-                    idx = Huffman_Decode (Table);
-                    *p++ = tab50[idx];
-                    *p++ = tab51[idx];
-                }
-                break;
-            case 3:
-                Table = HuffN [(Int) Bitstream_read(1)] [3];
-                for (k=0; k<36/2; k++) {
-                    idx = Huffman_Decode (Table);
-                    *p++ = tab70[idx];
-                    *p++ = tab71[idx];
-                }
-                break;
-            case 4:
-            case 5:
-            case 6:
-            case 7:
-            case 8:
-                Table = HuffN [(Int) Bitstream_read(1)][Res_p[Band].L];
-                for (k=0; k<36; k++)
-                    *p++ = Huffman_Decode (Table);
-                break;
-            default:
-                for (k=0; k<36; k++)
-                    *p++ = (Int) Bitstream_read (RES_BIT(Res_p[Band].L)) - Dc[Res_p[Band].L];
-                break;
-            }
-        }
-    }
-
-# if  DUMPSELECT > 0
-    Dump ( Max_Used_Band, MS_Band, Res, SCF_Index, Q, 8, __x );
-#endif
-
-    LEAVE(8);
-    return;
-}
-#endif
-
-/* end of decode.c */
Index: penc/branches/zorg/dump.c
===================================================================
--- /mppenc/branches/zorg/dump.c	(revision 40)
+++ 	(revision )
@@ -1,203 +1,0 @@
-
-#if  DUMPSELECT > 0
-
-static Int
-digits ( Int no )
-{
-    if (no >= 0) {
-        if ( no <=     9 ) return 1;
-        if ( no <=    99 ) return 2;
-        if ( no <=   999 ) return 3;
-        if ( no <=  9999 ) return 4;
-        return 5;
-    } else {
-        if ( no >=    -9 ) return 2;
-        if ( no >=   -99 ) return 3;
-        if ( no >=  -999 ) return 4;
-        if ( no >= -9999 ) return 5;
-        return 6;
-    }
-}
-
-
-static void
-Dump ( Int                Max_Used_Band,
-       const Bool_t*      MS_Band,
-       const CPair_t*     Res,
-       const CPairArray*  SCF_Index,
-       const Quant_t*     Q,
-       Int                SV,
-       const Ulong*       bitpostab )
-{
-    static Ulong     Frame= 0;
-    static FILE*     fp0  = NULL;
-    static FILE*     fp1  = NULL;
-    static FILE*     fp2  = NULL;
-    static FILE*     fp3  = NULL;
-    static FILE*     fp4  = NULL;
-    static FILE*     fp5  = NULL;
-    static FILE*     fp6  = NULL;
-    static FILE*     fp7  = NULL;
-    static Int       Init = 0;
-    static Uint32_t  Bits = (Uint32_t)-1;
-    Int              Band;
-    Int              i;
-    Int              k;
-    Int              d;
-
-    if ( Init == 0 ) {
-        fp0  = fopen ( LOGPATH "report-maxband.txt", "a" );
-        fp1  = fopen ( LOGPATH "report-msbits.txt" , "a" );
-        fp2  = fopen ( LOGPATH "report-resol.txt"  , "a" );
-        fp3  = fopen ( LOGPATH "report-scf.txt"    , "a" );
-        fp4  = fopen ( LOGPATH "report-quant.txt"  , "a" );
-        fp5  = fopen ( LOGPATH "report-rate.txt"   , "a" );
-        fp6  = fopen ( LOGPATH "report-usage.txt"  , "a" );
-        fp7  = fopen ( LOGPATH "report-requant.txt", "a" );
-        Init = 1;
-    }
-
-    // Stop if 400 MByte has been dumped for each log file
-    if ( fp0 != NULL  &&  ftell (fp0) > 409600000 ) fp0 = NULL;
-    if ( fp1 != NULL  &&  ftell (fp1) > 409600000 ) fp1 = NULL;
-    if ( fp2 != NULL  &&  ftell (fp2) > 409600000 ) fp2 = NULL;
-    if ( fp3 != NULL  &&  ftell (fp3) > 409600000 ) fp3 = NULL;
-    if ( fp4 != NULL  &&  ftell (fp4) > 409600000 ) fp4 = NULL;
-    if ( fp5 != NULL  &&  ftell (fp5) > 409600000 ) fp5 = NULL;
-    if ( fp6 != NULL  &&  ftell (fp6) > 409600000 ) fp6 = NULL;
-
-    // last used band
-    if ((DUMPSELECT & 1)  &&  fp0 != NULL) {
-        fprintf ( fp0, "%4lu\t%2d\n", Frame, Max_Used_Band );
-    }
-
-    // last used band + MS bits for every band
-    if ((DUMPSELECT & 2)  &&  fp1 != NULL) {
-        fprintf ( fp1, "%4lu\t%2d\t", Frame, Max_Used_Band );
-        for ( Band = 0; Band <= Max_Used_Band; Band++ )
-            if ( Res[Band].L  ||  Res[Band].R )
-                fprintf ( fp1, MS_Band[Band] ? "#" : "." );
-            else
-                fprintf ( fp1, " " );
-        fprintf ( fp1, "\n" );
-    }
-
-    // Resolution for every band and channel AND also MS bits
-    if ((DUMPSELECT & 4)  &&  fp2 != NULL) {
-        fprintf ( fp2, "--- %4lu ---\n", Frame );
-        for ( Band = 0; Band <= Max_Used_Band; Band++ )
-            if ( Res[Band].L )
-                fprintf ( fp2, " %2d", Res[Band].L );
-            else
-                fprintf ( fp2, "   " );
-        fprintf ( fp2, "\n" );
-        for ( Band = 0; Band <= Max_Used_Band; Band++ )
-            if ( Res[Band].R )
-                fprintf ( fp2, " %2d", Res[Band].R );
-            else
-                fprintf ( fp2, "   " );
-        fprintf ( fp2, "\n" );
-        for ( Band = 0; Band <= Max_Used_Band; Band++ )
-            if ( Res[Band].L  ||  Res[Band].R )
-                fprintf ( fp2, "  %c", MS_Band[Band] ? '#' : '.' );
-            else
-                fprintf ( fp2, "   " );
-        fprintf ( fp2, "\n\n" );
-    }
-
-    // SCF for every channel, subframe and subband
-    if ((DUMPSELECT & 8)  &&  fp3 != NULL) {
-        fprintf ( fp3, "--- %4lu ---\n", Frame );
-        for ( i = 0; i < 3; i++ ) {
-            for ( Band = 0; Band <= Max_Used_Band; Band++ )
-                if ( Res[Band].L )
-                    fprintf ( fp3, " %2d", SV > 7  ?  SCF_Index[i][Band].L  :  63 - SCF_Index[i][Band].L );
-                else
-                    fprintf ( fp3, "   " );
-            fprintf ( fp3, "\n" );
-        }
-        for ( i = 0; i < 3; i++ ) {
-            for ( Band = 0; Band <= Max_Used_Band; Band++ )
-                if ( Res[Band].R )
-                    fprintf ( fp3, " %2d", SV > 7  ?  SCF_Index[i][Band].R  :  63 - SCF_Index[i][Band].R );
-                else
-                    fprintf ( fp3, "   " );
-            fprintf ( fp3, "\n" );
-        }
-        fprintf ( fp3, "\n" );
-    }
-
-    // quantized subband samples
-    if ((DUMPSELECT & 16)  &&  fp4 != NULL) {
-        int  max = 0;
-
-        fprintf ( fp4, "--- %4lu ---\n", Frame );
-        for (k=0; k<36; k++) {
-            d = digits (Q[0].L[k]); if ( d > max ) max = d;
-            d = digits (Q[0].R[k]); if ( d > max ) max = d;
-            for ( Band = 1; Band <= Max_Used_Band; Band++ ) {
-                d = 1+digits (Q[Band].L[k]); if ( d > max ) max = d;
-                d = 1+digits (Q[Band].R[k]); if ( d > max ) max = d;
-            }
-        }
-        for (k=0; k<36; k++) {
-            for ( Band = 0; Band <= Max_Used_Band; Band++ )
-                if ( Res[Band].L )
-                    fprintf ( fp4, "%*d", max, Q[Band].L[k] );
-                else
-                    fprintf ( fp4, "%*s", max, "" );
-            fprintf ( fp4, "\n");
-        }
-        fprintf ( fp4, "\n");
-        for ( k=0; k<36; k++) {
-            for ( Band = 0; Band <= Max_Used_Band; Band++ )
-                if ( Res[Band].R )
-                    fprintf ( fp4, "%*d", max, Q[Band].R[k] );
-                else
-                    fprintf ( fp4, "%*s", max, "" );
-            fprintf ( fp4, "\n");
-        }
-        fprintf ( fp4, "\n\n");
-    }
-
-    // block size and bitrate
-    if ((DUMPSELECT & 32)  &&  fp5 != NULL) {
-        if ( Bits > BitsRead () ) Bits = 200;
-        k    = BitsRead () - Bits;
-        Bits = BitsRead ();
-        fprintf ( fp5, "%4lu\t%5u bit\t%5.1f kbps\n", Frame, k, k * (44.1/1152) );
-    }
-
-    // used bits of the individual sections
-    if ((DUMPSELECT & 64)  &&  fp6 != NULL) {
-        fprintf ( fp6, "%4lu %4lu%5lu%5lu%6lu\n", Frame,
-                  bitpostab[1] - bitpostab[0], bitpostab[2] - bitpostab[1],
-                  bitpostab[3] - bitpostab[2], bitpostab[4] - bitpostab[3] );
-    }
-
-    // requantized subband samples
-    if ((DUMPSELECT & 128)  &&  fp7 != NULL) {
-        int  max = 0;
-
-        fprintf ( fp7, "--- %4lu ---\n", Frame );
-        for (k=0; k<36; k++) {
-            for ( Band = 0; Band <= Max_Used_Band; Band++ )
-                fprintf ( fp7, "%9.1f", Q[Band].L[k] * SCF[SCF_Index[k/12][Band].L] * Cc[Res[Band].L] );
-            fprintf ( fp7, "\n");
-        }
-        fprintf ( fp7, "\n");
-        for ( k=0; k<36; k++) {
-            for ( Band = 0; Band <= Max_Used_Band; Band++ )
-                fprintf ( fp7, "%9.1f", Q[Band].R[k] * SCF[SCF_Index[k/12][Band].R] * Cc[Res[Band].R] );
-            fprintf ( fp7, "\n");
-        }
-        fprintf ( fp7, "\n\n");
-    }
-
-    Frame++;
-    return;
-}
-
-#endif
-
-/* end of dump.c */
Index: /mppenc/branches/zorg/encode_sv7.c
===================================================================
--- /mppenc/branches/zorg/encode_sv7.c	(revision 40)
+++ /mppenc/branches/zorg/encode_sv7.c	(revision 41)
Index: penc/branches/zorg/gain_analysis.c
===================================================================
--- /mppenc/branches/zorg/gain_analysis.c	(revision 40)
+++ 	(revision )
@@ -1,460 +1,0 @@
-#define KLEMM
-/*
- *  ReplayGainAnalysis - analyzes input samples and give the recommended dB change
- *  Copyright (C) 2001 David Robinson and Glen Sawyer
- *
- *  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.1 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
- *
- *  concept and filter values by David Robinson (David@Robinson.org)
- *    -- blame him if you think the idea is flawed
- *  coding by Glen Sawyer (glensawyer@hotmail.com) 442 N 700 E, Provo, UT 84606 USA
- *    -- blame him if you think this runs too slowly, or the coding is otherwise flawed
- *
- *  For an explanation of the concepts and the basic algorithms involved, go to:
- *    http://www.replaygain.org/
- */
-
-/*
- *  Here's the deal. Call
- *
- *    InitGainAnalysis ( long double samplefreq );
- *
- *  to initialize everything. Call
- *
- *    AnalyzeSamples ( const Float_t*  left_samples,
- *                     const Float_t*  right_samples,
- *                     size_t          num_samples,
- *                     int             num_channels );
- *
- *  as many times as you want, with as many or as few samples as you want.
- *  If mono, pass the sample buffer in through left_samples, leave
- *  right_samples NULL, and make sure num_channels = 1.
- *
- *    GetTitleGain()
- *
- *  will return the recommended dB level change for all samples analyzed
- *  SINCE THE LAST TIME you called GetTitleGain() OR InitGainAnalysis().
- *
- *    GetAlbumGain()
- *
- *  will return the recommended dB level change for all samples analyzed
- *  since InitGainAnalysis() was called and finalized with GetTitleGain().
- *
- *  Pseudo-code to process an album:
- *
- *    Float_t       l_samples [4096];
- *    Float_t       r_samples [4096];
- *    size_t        num_samples;
- *    unsigned int  num_songs;
- *    unsigned int  i;
- *
- *    InitGainAnalysis ( 44100. );
- *    for ( i = 1; i <= num_songs; i++ ) {
- *        while ( ( num_samples = getSongSamples ( song[i], left_samples, right_samples ) ) > 0 )
- *            AnalyzeSamples ( left_samples, right_samples, num_samples, 2 );
- *        fprintf ("Recommended dB change for song %2d: %+6.2f dB\n", i, GetTitleGain() );
- *    }
- *    fprintf ("Recommended dB change for whole album: %+6.2f dB\n", GetAlbumGain() );
- */
-
-/*
- *  So here's the main source of potential code confusion:
- *
- *  The filters applied to the incoming samples are IIR filters,
- *  meaning they rely on up to <filter order> number of previous samples
- *  AND up to <filter order> number of previous filtered samples.
- *
- *  I set up the AnalyzeSamples routine to minimize memory usage and interface
- *  complexity. The speed isn't compromised too much (I don't think), but the
- *  internal complexity is higher than it should be for such a relatively
- *  simple routine.
- *
- *  Optimization/clarity suggestions are welcome.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-
-#include "gain_analysis.h"
-
-typedef unsigned short  Uint16_t;
-typedef signed short    Int16_t;
-typedef unsigned int    Uint32_t;
-typedef signed int      Int32_t;
-
-#define YULE_ORDER         10
-#define BUTTER_ORDER        2
-#define RMS_PERCENTILE      0.95        	// percentile which is louder than the proposed level
-#define MAX_SAMP_FREQ   48000.          	// maximum allowed sample frequency [Hz]
-#ifdef KLEMM
-# define RMS_WINDOW_TIME    0.01      		// Time slice length in [s], 10 ms, use post processing
-#else
-# define RMS_WINDOW_TIME    0.05      		// Time slice length in [s], 50 ms, Zwicker says something around 80 ms, see also DIN 45405
-#endif
-#define STEPS_per_dB      100.          // Table entries per dB
-#define MAX_dB            120.          // Table entries for 0...MAX_dB (normal max. values are 70...80 dB)
-
-#define MAX_ORDER               (BUTTER_ORDER > YULE_ORDER ? BUTTER_ORDER : YULE_ORDER)
-#define MAX_SAMPLES_PER_WINDOW  (size_t) (MAX_SAMP_FREQ * RMS_WINDOW_TIME + 0.99999999)      // max. Samples per Time slice
-#define PINK_REF                65.                                             // calibration value
-
-Float_t          linprebuf [MAX_ORDER * 2];
-Float_t*         linpre;                                          // left input samples, with pre-buffer
-Float_t          lstepbuf  [MAX_SAMPLES_PER_WINDOW + MAX_ORDER];
-Float_t*         lstep;                                           // left "first step" (i.e. post first filter) samples
-Float_t          loutbuf   [MAX_SAMPLES_PER_WINDOW + MAX_ORDER];
-Float_t*         lout;                                            // left "out" (i.e. post second filter) samples
-Float_t          rinprebuf [MAX_ORDER * 2];
-Float_t*         rinpre;                                          // right input samples ...
-Float_t          rstepbuf  [MAX_SAMPLES_PER_WINDOW + MAX_ORDER];
-Float_t*         rstep;
-Float_t          routbuf   [MAX_SAMPLES_PER_WINDOW + MAX_ORDER];
-Float_t*         rout;
-int              sampleWindow;                                    // number of samples required to reach number of milliseconds required for RMS window
-unsigned long    totsamp;
-double           lsum;
-double           rsum;
-int              freqindex;
-int              first;
-static Uint16_t  A [(size_t)(STEPS_per_dB * MAX_dB)];
-static Uint16_t  B [(size_t)(STEPS_per_dB * MAX_dB)];
-
-// for each filter:
-// [0] 48 kHz, [1] 44.1 kHz, [2] 32 kHz, [3] 24 kHz, [4] 22050 Hz, [5] 16 kHz, [6] 12 kHz, [7] is 11025 Hz, [8] 8 kHz
-
-#pragma warning ( disable : 4305 )
-
-const Float_t  AYule [9] [11] = {
-    { 1., -3.84664617118067,  7.81501653005538,-11.34170355132042, 13.05504219327545,-12.28759895145294,  9.48293806319790, -5.87257861775999,  2.75465861874613, -0.86984376593551, 0.13919314567432 },
-    { 1., -3.47845948550071,  6.36317777566148, -8.54751527471874,  9.47693607801280, -8.81498681370155,  6.85401540936998, -4.39470996079559,  2.19611684890774, -0.75104302451432, 0.13149317958808 },
-    { 1., -2.37898834973084,  2.84868151156327, -2.64577170229825,  2.23697657451713, -1.67148153367602,  1.00595954808547, -0.45953458054983,  0.16378164858596, -0.05032077717131, 0.02347897407020 },
-    { 1., -1.61273165137247,  1.07977492259970, -0.25656257754070, -0.16276719120440, -0.22638893773906,  0.39120800788284, -0.22138138954925,  0.04500235387352,  0.02005851806501, 0.00302439095741 },
-    { 1., -1.49858979367799,  0.87350271418188,  0.12205022308084, -0.80774944671438,  0.47854794562326, -0.12453458140019, -0.04067510197014,  0.08333755284107, -0.04237348025746, 0.02977207319925 },
-    { 1., -0.62820619233671,  0.29661783706366, -0.37256372942400,  0.00213767857124, -0.42029820170918,  0.22199650564824,  0.00613424350682,  0.06747620744683,  0.05784820375801, 0.03222754072173 },
-    { 1., -1.04800335126349,  0.29156311971249, -0.26806001042947,  0.00819999645858,  0.45054734505008, -0.33032403314006,  0.06739368333110, -0.04784254229033,  0.01639907836189, 0.01807364323573 },
-    { 1., -0.51035327095184, -0.31863563325245, -0.20256413484477,  0.14728154134330,  0.38952639978999, -0.23313271880868, -0.05246019024463, -0.02505961724053,  0.02442357316099, 0.01818801111503 },
-    { 1., -0.25049871956020, -0.43193942311114, -0.03424681017675, -0.04678328784242,  0.26408300200955,  0.15113130533216, -0.17556493366449, -0.18823009262115,  0.05477720428674, 0.04704409688120 }
-};
-
-const Float_t  BYule [9] [11] = {
-    { 0.03857599435200, -0.02160367184185, -0.00123395316851, -0.00009291677959, -0.01655260341619,  0.02161526843274, -0.02074045215285,  0.00594298065125,  0.00306428023191,  0.00012025322027,  0.00288463683916 },
-    { 0.05418656406430, -0.02911007808948, -0.00848709379851, -0.00851165645469, -0.00834990904936,  0.02245293253339, -0.02596338512915,  0.01624864962975, -0.00240879051584,  0.00674613682247, -0.00187763777362 },
-    { 0.15457299681924, -0.09331049056315, -0.06247880153653,  0.02163541888798, -0.05588393329856,  0.04781476674921,  0.00222312597743,  0.03174092540049, -0.01390589421898,  0.00651420667831, -0.00881362733839 },
-    { 0.30296907319327, -0.22613988682123, -0.08587323730772,  0.03282930172664, -0.00915702933434, -0.02364141202522, -0.00584456039913,  0.06276101321749, -0.00000828086748,  0.00205861885564, -0.02950134983287 },
-    { 0.33642304856132, -0.25572241425570, -0.11828570177555,  0.11921148675203, -0.07834489609479, -0.00469977914380, -0.00589500224440,  0.05724228140351,  0.00832043980773, -0.01635381384540, -0.01760176568150 },
-    { 0.44915256608450, -0.14351757464547, -0.22784394429749, -0.01419140100551,  0.04078262797139, -0.12398163381748,  0.04097565135648,  0.10478503600251, -0.01863887810927, -0.03193428438915,  0.00541907748707 },
-    { 0.56619470757641, -0.75464456939302,  0.16242137742230,  0.16744243493672, -0.18901604199609,  0.30931782841830, -0.27562961986224,  0.00647310677246,  0.08647503780351, -0.03788984554840, -0.00588215443421 },
-    { 0.58100494960553, -0.53174909058578, -0.14289799034253,  0.17520704835522,  0.02377945217615,  0.15558449135573, -0.25344790059353,  0.01628462406333,  0.06920467763959, -0.03721611395801, -0.00749618797172 },
-    { 0.53648789255105, -0.42163034350696, -0.00275953611929,  0.04267842219415, -0.10214864179676,  0.14590772289388, -0.02459864859345, -0.11202315195388, -0.04060034127000,  0.04788665548180, -0.02217936801134 }
-};
-
-const Float_t  AButter [9] [3] = {
-    { 1., -1.97223372919527, 0.97261396931306 },
-    { 1., -1.96977855582618, 0.97022847566350 },
-    { 1., -1.95835380975398, 0.95920349965459 },
-    { 1., -1.95002759149878, 0.95124613669835 },
-    { 1., -1.94561023566527, 0.94705070426118 },
-    { 1., -1.92783286977036, 0.93034775234268 },
-    { 1., -1.91858953033784, 0.92177618768381 },
-    { 1., -1.91542108074780, 0.91885558323625 },
-    { 1., -1.88903307939452, 0.89487434461664 }
-};
-
-const Float_t  BButter [9] [3] = {
-    { 0.98621192462708, -1.97242384925416, 0.98621192462708 },
-    { 0.98500175787242, -1.97000351574484, 0.98500175787242 },
-    { 0.97938932735214, -1.95877865470428, 0.97938932735214 },
-    { 0.97531843204928, -1.95063686409857, 0.97531843204928 },
-    { 0.97316523498161, -1.94633046996323, 0.97316523498161 },
-    { 0.96454515552826, -1.92909031105652, 0.96454515552826 },
-    { 0.96009142950541, -1.92018285901082, 0.96009142950541 },
-    { 0.95856916599601, -1.91713833199203, 0.95856916599601 },
-    { 0.94597685600279, -1.89195371200558, 0.94597685600279 }
-};
-
-#pragma warning ( default : 4305 )
-
-
-// set percentile
-
-static float  percentile      = 1. - RMS_PERCENTILE;
-static float  percentile_corr = 0.;
-
-void
-SetPercentile ( float value )
-{
-    percentile      = 1.f - value;
-    percentile_corr = ( log (0.05) - log (percentile) ) * 1.3;
-}
-
-
-// When calling this procedure, make sure that ip[-order] and op[-order] point to real data!
-
-static void
-Filter ( const Float_t* input, Float_t* output, size_t nSamples, const Float_t* a, const Float_t* b, size_t order )
-{
-    double  y;
-    size_t  i;
-    size_t  k;
-
-    for ( i = 0; i < nSamples; i++ ) {
-        y = input[i] * b[0];
-        for ( k = 1; k <= order; k++ )
-            y += input[i-k] * b[k] - output[i-k] * a[k];
-        output[i] = (Float_t)y;
-    }
-}
-
-// returns a INIT_GAIN_ANALYSIS_OK if successful, INIT_GAIN_ANALYSIS_ERROR if not
-
-int
-InitGainAnalysis ( long double samplefreq )
-{
-    int  i;
-
-    // zero out initial values
-    for ( i = 0; i < MAX_ORDER; i++ )
-        linprebuf[i] = lstepbuf[i] = loutbuf[i] = rinprebuf[i] = rstepbuf[i] = routbuf[i] = 0.;
-
-    switch ( (int)(samplefreq) ) {
-        case 48000: freqindex = 0; break;
-        case 44100: freqindex = 1; break;
-        case 32000: freqindex = 2; break;
-        case 24000: freqindex = 3; break;
-        case 22050: freqindex = 4; break;
-        case 16000: freqindex = 5; break;
-        case 12000: freqindex = 6; break;
-        case 11025: freqindex = 7; break;
-        case  8000: freqindex = 8; break;
-        default:    return INIT_GAIN_ANALYSIS_ERROR;
-    }
-
-    sampleWindow = (int) ceil (samplefreq * RMS_WINDOW_TIME);
-
-    linpre       = linprebuf + MAX_ORDER;
-    rinpre       = rinprebuf + MAX_ORDER;
-    lstep        = lstepbuf  + MAX_ORDER;
-    rstep        = rstepbuf  + MAX_ORDER;
-    lout         = loutbuf   + MAX_ORDER;
-    rout         = routbuf   + MAX_ORDER;
-
-    lsum         = 0.;
-    rsum         = 0.;
-    totsamp      = 0;
-    first        = !0;
-
-    memset ( A, 0, sizeof(A) );
-    memset ( B, 0, sizeof(B) );
-
-    return INIT_GAIN_ANALYSIS_OK;
-}
-
-
-// returns GAIN_ANALYSIS_OK if successful, GAIN_ANALYSIS_ERROR if not
-
-static float  val_last = -1.e+37f;
-static float  pwr_last = 0.f;
-
-int
-AnalyzeSamples ( const Float_t* left_samples, const Float_t* right_samples, size_t num_samples, int num_channels )
-{
-    const Float_t*  curleft;
-    const Float_t*  curright;
-    long            batchsamples;
-    long            cursamples;
-    long            cursamplepos;
-    int             i;
-
-    if ( num_samples == 0 )
-        return GAIN_ANALYSIS_OK;
-
-    cursamplepos = 0;
-    batchsamples = num_samples;
-
-    switch ( num_channels) {
-    case  1: right_samples = left_samples;
-    case  2: break;
-    default: return GAIN_ANALYSIS_ERROR;
-    }
-
-    if ( num_samples < MAX_ORDER ) {
-        memcpy ( linprebuf + MAX_ORDER, left_samples , num_samples * sizeof(Float_t) );
-        memcpy ( rinprebuf + MAX_ORDER, right_samples, num_samples * sizeof(Float_t) );
-    }
-    else {
-        memcpy ( linprebuf + MAX_ORDER, left_samples,  MAX_ORDER   * sizeof(Float_t) );
-        memcpy ( rinprebuf + MAX_ORDER, right_samples, MAX_ORDER   * sizeof(Float_t) );
-    }
-
-    while ( batchsamples > 0 ) {
-        cursamples = batchsamples > sampleWindow-totsamp  ?  sampleWindow - totsamp  :  batchsamples;
-        if ( cursamplepos < MAX_ORDER ) {
-            curleft  = linpre+cursamplepos;
-            curright = rinpre+cursamplepos;
-            if (cursamples > MAX_ORDER - cursamplepos )
-                cursamples = MAX_ORDER - cursamplepos;
-        }
-        else {
-            curleft  = left_samples  + cursamplepos;
-            curright = right_samples + cursamplepos;
-        }
-
-        Filter ( curleft , lstep + totsamp, cursamples, AYule[freqindex], BYule[freqindex], YULE_ORDER );
-        Filter ( curright, rstep + totsamp, cursamples, AYule[freqindex], BYule[freqindex], YULE_ORDER );
-
-        Filter ( lstep + totsamp, lout + totsamp, cursamples, AButter[freqindex], BButter[freqindex], BUTTER_ORDER );
-        Filter ( rstep + totsamp, rout + totsamp, cursamples, AButter[freqindex], BButter[freqindex], BUTTER_ORDER );
-
-        for ( i = 0; i < cursamples; i++ ) {             // Get the squared values
-            lsum += lout [totsamp+i] * lout [totsamp+i];
-            rsum += rout [totsamp+i] * rout [totsamp+i];
-        }
-
-        batchsamples -= cursamples;
-        cursamplepos += cursamples;
-        totsamp      += cursamples;
-        if ( totsamp == sampleWindow ) {  // Get the Root Mean Square (RMS) for this set of samples
-            double      val  = 0.5 * (lsum+rsum) / totsamp;
-            int         ival;
-
-
-#ifdef KLEMM
-            pwr_last = 0.875 * pwr_last + 0.125 * val;
-            val      = STEPS_per_dB * 10. * log10 ( pwr_last + 1.e-37 );
-#else
-            val      = STEPS_per_dB * 10. * log10 ( val + 1.e-37 );
-#endif
-            ival = (int) val;
-            if ( ival <                     0 ) ival = 0;
-            if ( ival >= sizeof(A)/sizeof(*A) ) ival = sizeof(A)/sizeof(*A) - 1;
-            A [ival]++;
-            lsum = rsum = 0.;
-            memmove ( loutbuf , loutbuf  + totsamp, MAX_ORDER * sizeof(Float_t) );
-            memmove ( routbuf , routbuf  + totsamp, MAX_ORDER * sizeof(Float_t) );
-            memmove ( lstepbuf, lstepbuf + totsamp, MAX_ORDER * sizeof(Float_t) );
-            memmove ( rstepbuf, rstepbuf + totsamp, MAX_ORDER * sizeof(Float_t) );
-            totsamp = 0;
-        }
-        if ( totsamp > sampleWindow )   // somehow I really screwed up: Error in programming! Contact author about totsamp > sampleWindow
-            return GAIN_ANALYSIS_ERROR;
-    }
-    if ( num_samples < MAX_ORDER ) {
-        memmove ( linprebuf,                           linprebuf + num_samples, (MAX_ORDER-num_samples) * sizeof(Float_t) );
-        memmove ( rinprebuf,                           rinprebuf + num_samples, (MAX_ORDER-num_samples) * sizeof(Float_t) );
-        memcpy  ( linprebuf + MAX_ORDER - num_samples, left_samples,          num_samples             * sizeof(Float_t) );
-        memcpy  ( rinprebuf + MAX_ORDER - num_samples, right_samples,         num_samples             * sizeof(Float_t) );
-    }
-    else {
-        memcpy  ( linprebuf, left_samples  + num_samples - MAX_ORDER, MAX_ORDER * sizeof(Float_t) );
-        memcpy  ( rinprebuf, right_samples + num_samples - MAX_ORDER, MAX_ORDER * sizeof(Float_t) );
-    }
-
-    return GAIN_ANALYSIS_OK;
-}
-
-
-static float
-AnalyzeResult ( Uint16_t* Array, size_t len )
-{
-    Uint32_t  elems;
-    Int32_t   upper;
-    size_t    i;
-
-    elems = 0;
-    for ( i = 0; i < len; i++ )
-        elems += Array[i];
-    if ( elems == 0 )
-        return 0.f;
-
-    upper = (Int32_t) ceil (elems * percentile);
-    for ( i = len; i-- > 0; ) {
-        if ( (upper -= Array[i]) <= 0 )
-            break;
-    }
-
-    return (float) (PINK_REF - (int)i / (float)STEPS_per_dB) + percentile_corr;
-}
-
-
-static float
-AnalyzeDynamic ( Uint16_t* Array, size_t len )
-{
-    Uint32_t  elems;
-    Int32_t   upper;
-    size_t    i;
-    size_t    j;
-
-    elems = 0;
-    for ( i = 0; i < len; i++ )
-        elems += Array[i];
-    if ( elems == 0 )
-        return 0.f;
-
-    upper = (Int32_t) ceil (elems * 0.05);
-    for ( i = len; i-- > 0; ) {
-        if ( (upper -= Array[i]) <= 0 )
-            break;
-    }
-
-    upper = (Int32_t) ceil (elems * 0.15);
-    for ( j = 0; j < len; j++ ) {
-        if ( (upper -= Array[j]) <= 0 )
-            break;
-    }
-    printf ("\n%5u %5u %6.2f dB\n", i, j, (i - j) / (float) STEPS_per_dB );
-    return (i - j) / (float) STEPS_per_dB;
-}
-
-
-float
-GetTitleDynamics ( void )
-{
-    return AnalyzeDynamic ( A, sizeof(A)/sizeof(*A) );
-}
-
-
-float
-GetTitleGain ( void )
-{
-    float  retval;
-    int    i;
-
-    retval = AnalyzeResult ( A, sizeof(A)/sizeof(*A) );
-
-    for ( i = 0; i < sizeof(A)/sizeof(*A); i++ ) {
-        B[i] += A[i];
-        A[i]  = 0;
-    }
-
-    for ( i = 0; i < MAX_ORDER; i++ )
-        linprebuf[i] = lstepbuf[i] = loutbuf[i] = rinprebuf[i] = rstepbuf[i] = routbuf[i] = 0.f;
-
-    totsamp  = 0;
-    lsum     = rsum = 0.;
-    val_last = -1.e+37;
-    pwr_last = 0.f;
-    return retval;
-}
-
-
-float
-GetAlbumGain ( void )
-{
-    return AnalyzeResult ( B, sizeof(B)/sizeof(*B) );
-}
-
-/* end of gain_analysis.c */
Index: penc/branches/zorg/gain_analysis.h
===================================================================
--- /mppenc/branches/zorg/gain_analysis.h	(revision 40)
+++ 	(revision )
@@ -1,57 +1,0 @@
-/*
- *  ReplayGainAnalysis - analyzes input samples and give the recommended dB change
- *  Copyright (C) 2001 David Robinson and Glen Sawyer
- *
- *  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.1 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
- *
- *  concept and filter values by David Robinson (David@Robinson.org)
- *    -- blame him if you think the idea is flawed
- *  coding by Glen Sawyer (glensawyer@hotmail.com) 442 N 700 E, Provo, UT 84606 USA
- *    -- blame him if you think this runs too slowly, or the coding is otherwise flawed
- *
- *  For an explanation of the concepts and the basic algorithms involved, go to:
- *    http://www.replaygain.org/
- */
-
-#ifndef GAIN_ANALYSIS_H
-#define GAIN_ANALYSIS_H
-
-#include <stddef.h>
-
-#define GAIN_NOT_ENOUGH_SAMPLES  -24601
-#define GAIN_ANALYSIS_ERROR           0
-#define GAIN_ANALYSIS_OK              1
-
-#define INIT_GAIN_ANALYSIS_ERROR      0
-#define INIT_GAIN_ANALYSIS_OK         1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef float  Float_t;         // Type used for filtering
-
-int     InitGainAnalysis ( long double samplefreq );
-int     AnalyzeSamples   ( const Float_t* left_samples, const Float_t* right_samples, size_t num_samples, int num_channels );
-float   GetTitleGain     ( void );
-float   GetAlbumGain     ( void );
-float   GetTitleDynamics ( void );
-void    SetPercentile    ( float value );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* GAIN_ANALYSIS_H */
Index: penc/branches/zorg/http.c
===================================================================
--- /mppenc/branches/zorg/http.c	(revision 40)
+++ 	(revision )
@@ -1,489 +1,0 @@
-/*
- *   http.c
- *   Adapted from: Oliver Fromme <oliver.fromme@heim3.tu-clausthal.de>
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <ctype.h>
-#include "mppdec.h"
-
-
-#ifdef USE_HTTP
-
-# define ACCEPT_HEAD  "Accept: audio/mpeg, audio/x-mpegurl, */*\r\n"
-# define PROGRAMNAME  "Mozilla/4.72P4"
-# define BUFFERLEN    1024
-
-
-typedef Uint32_t  IP_t;
-typedef Uint16_t  port_t;
-
-
-# ifdef ZEISS_PROXY
-char*         proxyurl       = "kdejenspi01.zeiss.de";
-IP_t          proxyip        = 0;
-char*         proxyport      = "8080";
-char*         proxyuser      = "zjfkl";
-char*         proxypasswd    = "hantel4";
-# else
-char*         proxyurl       = NULL;
-IP_t          proxyip        = 0;
-char*         proxyport      = NULL;
-char*         proxyuser      = NULL;
-char*         proxypasswd    = NULL;
-# endif /* ZEISS_PROXY */
-char*         httpauth       = NULL;
-char          httpauth1 [256];
-static char*  defaultportstr = "80";
-
-
-# ifndef _WIN32
-#  include <netdb.h>
-#  include <sys/param.h>
-#  include <sys/types.h>
-#  include <netinet/in.h>
-#  include <arpa/inet.h>
-# else
-#  include <sys/types.h>
-# endif /* _WIN32 */
-
-# ifndef INADDR_NONE
-#  define INADDR_NONE  (IP_t)(-1)
-# endif
-
-#ifdef _WIN32
-
-static int
-Init_WinSocket ( void )
-{
-    WORD     VersionRequested;
-    WSADATA  wsaData;
-    int      err;
-
-    VersionRequested = MAKEWORD (2, 2);
-
-    err = WSAStartup ( VersionRequested, &wsaData );
-    if ( err != 0 ) {                                     // Tell the user that we could not find a usable WinSock DLL
-        stderr_printf ("Can't find WinSock DLL\n");
-        return -1;
-    }
-
-    // Confirm that the WinSock DLL supports 2.2.
-    // Note that if the DLL supports versions greater than 2.2 in addition to 2.2,
-    // it will still return 2.2 in Version since that is the version we requested.
-
-    if ( LOBYTE (wsaData.wVersion)  != 2  ||  HIBYTE (wsaData.wVersion) != 2 ) {
-        // Tell the user that we could not find a usable WinSock DLL.
-        stderr_printf ("Wrong version of WinSock DLL: %d.%d\n", HIBYTE (wsaData.wVersion), LOBYTE (wsaData.wVersion) );
-        WSACleanup ();
-        return -1;
-    }
-    return 0;
-}
-
-#endif
-
-static char*
-secure_calloc ( size_t size )
-{
-    char*  p = (char*) calloc ( size, 1 );
-
-    if ( p == NULL ) {
-        stderr_printf ("\n"PROG_NAME": Out of memory, aborting...\n");
-        _exit (1);
-    }
-    return p;
-}
-
-
-static int
-writestring ( int fd, const char* string )
-{
-    int     result;
-    size_t  bytes = strlen (string);
-
-    while ( bytes > 0 ) {
-        if ( (result = WRITE_SOCKET (fd, string, bytes)) < 0  &&  errno != EINTR ) {
-            stderr_printf ("\n"PROG_NAME": write to socket: %s\n", strerror (errno) );
-            return -1;
-        }
-        else if (result == 0) {
-            stderr_printf ("\n"PROG_NAME": write to socket: %s\n", "socket closed unexpectedly");
-            return -1;
-        }
-        string += result;
-        bytes  -= result;
-    }
-    return 0;
-}
-
-static int
-readstring ( char* string, size_t maxlen, int fd )
-{
-    size_t  pos = 0;
-
-    while (1) {
-        if ( READ_SOCKET ( fd, string + pos, 1) == 1 ) {
-            if ( string [pos++] == '\n' ) {
-                string [pos]   = '\0';
-                return 0;
-            } else if ( pos+2 >= maxlen ) {
-                string [pos++] = '\n';
-                string [pos]   = '\0';
-                return 0;
-            }
-        }
-        else if ( errno != EINTR ) {
-            stderr_printf ("\n"PROG_NAME": read from socket: Error reading from socket or unexpected EOF\n");
-            return -1;
-        }
-    }
-    return 0;
-}
-
-
-static void
-encode64 ( const unsigned char* src, char* dst )
-{
-    static const char  Base64Digits [] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-    int                ssiz            = strlen (src);
-    int                i;
-    Uint32_t           buf;
-
-    for ( i = 0 ; i < ssiz ; i += 3 ) {
-        buf      = src [i+0] << 16;
-        if ( i+1 < ssiz )
-            buf |= src [i+1] <<  8;
-        if ( i+2 < ssiz )
-            buf |= src [i+2] <<  0;
-
-        *dst++ =                Base64Digits [(buf >> 18) & 63];
-        *dst++ =                Base64Digits [(buf >> 12) & 63];
-        *dst++ = i+1 < ssiz  ?  Base64Digits [(buf >>  6) & 63]  :  '=';
-        *dst++ = i+2 < ssiz  ?  Base64Digits [(buf >>  0) & 63]  :  '=';
-    }
-    *dst++ = '\0';
-    return;
-}
-
-
-/*
- *  Extracts a user name from URL while removing the user name from the string.
- *  Input  has the form "http://user@..."
- *  Output has the form "http://..."  and "user" is copied to auth
- */
-
-static int
-getauthfromURL ( char* url, char* auth )  /* VERY simple auth-from-URL grabber */
-{
-    char*  pos;
-    int    i;
-
-    *auth = '\0';
-
-    if      ( 0 == strncasecmp (url, "http://", 7) )
-        url += 7;
-    else if ( 0 == strncasecmp (url, "ftp://" , 6) )
-        url += 6;
-
-    if ( (pos = strchr (url, '@')) != NULL ) {
-        for ( i = 0; i < pos-url; i++ ) {
-            if ( url [i] == '/' )
-                return 0;
-        }
-        strncpy ( auth, url, pos-url );
-        auth [pos - url] = '\0';
-        strcpy ( url, pos+1 );
-        return 1;
-    }
-    return 0;
-}
-
-
-static char*
-url2hostport ( char* url, char** hostname, IP_t* hip, char** port )
-{
-    char*   h;
-    char*   p;
-    char*   hostptr;
-    char*   r_hostptr;
-    char*   pathptr;
-    char*   portptr;
-    char*   p0;
-    size_t  stringlength;
-
-    p = url;
-    if       ( 0 == strncasecmp (p, "http://", 7) )
-        p += 7;
-    else  if ( 0 == strncasecmp (p, "ftp://" , 6) )
-        p += 6;
-    hostptr = p;                                        // hostptr points to the hostname, usually a "www..." or "ftp...."
-
-    while ( *p != '\0'  &&  *p != '/' )
-        p++;
-    pathptr = p;                                        // pathptr points to the first '/' after the hostname, usually a "/pub/..."
-
-    r_hostptr = --p;
-    while ( p > hostptr  &&  *p != ':'  &&  *p != ']' ) // ']' for IPv6, IPv6 is separated by ':', so the host is encapsulated by "[]", i.e. "http://[1080::8:800:200C:417A]:80/"
-        p--;
-
-    if ( p == hostptr  ||  *p != ':' ) {                // "http:/1080::8:800:200C:417A/..." is wrong parsed
-        portptr   = NULL;
-    }
-    else {
-        portptr   = p + 1;
-        r_hostptr = p - 1;
-    }
-
-    if ( *hostptr == '['  &&  *r_hostptr == ']' ) {
-        hostptr  ++;
-        r_hostptr--;
-    }
-
-    stringlength = r_hostptr - hostptr + 1;
-    h = secure_calloc ( stringlength + 1 );
-    memcpy ( h, hostptr, stringlength );
-    *hostname = h;
-
-    if ( portptr != NULL ) {
-        stringlength = pathptr - portptr;
-        if (stringlength == 0)
-            portptr = NULL;
-    }
-
-    if ( portptr == NULL ) {
-        portptr      = defaultportstr;
-        stringlength = strlen (defaultportstr);
-    }
-
-    p0 = secure_calloc (stringlength + 1);
-    memcpy ( p0, portptr, stringlength );
-
-    for ( p = p0; *p != '\0'  &&  isdigit (*p); p++ )
-        ;
-
-    *p    = '\0';
-    *port = p0;
-
-    return pathptr;
-}
-
-
-int
-http_open ( const char* url )
-{
-    char*               purl;
-    char*               hostname  = NULL;
-    char*               request;
-    char*               sptr;
-    int                 linelength;
-    IP_t                myip;
-    char*               myport    = NULL;
-    int                 sock;
-    int                 relocate;
-    int                 numrelocs = 0;
-    int                 i;
-    int                 j;
-# ifdef USE_IPv4_6
-    struct addrinfo     hints;
-    struct addrinfo*    res;
-    struct addrinfo*    res0;
-    int                 error;
-# else
-    struct hostent*     hp;
-    struct sockaddr_in  sin;
-# endif
-
-#ifdef _WIN32
-    static int          init = 0;
-
-    if ( init == 0  &&  Init_WinSocket () != 0 )
-        return -1;
-    init = 1;
-#endif
-
-    if ( strchr ( url, '/' ) == NULL )
-        return -1;
-
-    proxyport = NULL;
-
-    if ( proxyip == 0L ) {
-        if ( proxyurl == NULL )
-            if ( (proxyurl = getenv ("MP3_HTTP_PROXY")) == NULL )
-                if ( (proxyurl = getenv ("http_proxy")) == NULL )
-                    proxyurl = getenv ("HTTP_PROXY");
-        if ( proxyurl != NULL  &&  proxyurl[0]  &&  strcmp (proxyurl, "none") ) {
-            if ( url2hostport (proxyurl, &hostname, &proxyip, &proxyport) == NULL ) {
-                stderr_printf ("\n"PROG_NAME": Unknown proxy host \"%s\".\n", hostname ? hostname : "" );
-                return -1;
-            }
-        }
-        else {
-            proxyip = INADDR_NONE;
-        }
-    }
-
-
-    if ( proxyip == INADDR_NONE )
-        if ( 0 == strncasecmp (url, "ftp://", 6) ) {
-            stderr_printf ("\n"PROG_NAME": Downloading from ftp servers without PROXY not allowed\n" );
-            return -1;
-        }
-
-    linelength = strlen (url) + BUFFERLEN;
-    request    = secure_calloc (linelength);
-    purl       = secure_calloc (BUFFERLEN);
-
-    // copying url to purl while converting special characters
-    i = j = 0;
-    do {
-        switch ( url[i] ) {
-        case ' ': purl [j++] = '%', purl [j++] = '2', purl [j++] = '0'; break;
-        default : purl [j++] = url [i];                                 break;
-        }
-    } while ( url [i++] != '\0' );
-
-    getauthfromURL ( purl, httpauth1 );
-
-    do {
-        strcpy ( request, "GET ");
-        if ( proxyip != INADDR_NONE ) {
-            if ( strncasecmp (url, "http://", 7) != 0  &&  strncasecmp (url, "ftp://", 6) != 0 )
-                strcat ( request, "http://");
-            strcat ( request, purl);
-            myport = proxyport;
-            myip   = proxyip;
-        }
-        else {
-            if ( hostname != NULL ) {
-                free (hostname);
-                hostname = NULL;
-            }
-            if ( proxyport != NULL ) {
-                free (proxyport);
-                proxyport = NULL;
-            }
-            if ( (sptr = url2hostport (purl, &hostname, &myip, &myport)) == NULL ) {
-                stderr_printf ("\n"PROG_NAME": Unknown host \"%s\".\n", hostname ? hostname : "");
-                return -1;
-            }
-            strcat ( request, sptr);
-        }
-        sprintf ( request + strlen (request), " HTTP/1.0\r\nUser-Agent: %s\r\n", PROGRAMNAME );
-        if ( hostname != NULL )
-            sprintf ( request + strlen(request), "Host: %s:%s\r\n", hostname, myport);
-
-        strcat ( request, ACCEPT_HEAD);
-
-# ifdef USE_IPv4_6
-
-        memset ( &hints, 0, sizeof(hints) );
-        hints.ai_socktype = SOCK_STREAM;
-        error = getaddrinfo ( hostname, myport, &hints, &res0 );
-        if ( error != 0 ) {
-            stderr_printf ("\n"PROG_NAME": getaddrinfo: %s\n", gai_strerror (error) );
-            return -1;
-        }
-
-        sock = -1;
-        for ( res = res0; res != NULL; res = res->ai_next ) {
-            if ((sock = socket (res->ai_family, res->ai_socktype, res->ai_protocol)) < 0)
-                continue;
-
-            if ( connect (sock, res->ai_addr, res->ai_addrlen) != 0 ) {
-                close (sock);
-                sock = -1;
-                continue;
-            }
-            break;
-        }
-
-        freeaddrinfo (res0);
-
-# else /* USE_IPv4_6 */
-
-        if ( (hp = gethostbyname (hostname)) == NULL )
-            goto fail;
-        if ( hp->h_length != sizeof (sin.sin_addr) )
-            goto fail;
-        if ( (sock = socket ( AF_INET, SOCK_STREAM, IPPROTO_TCP )) < 0 )
-            goto fail;
-        memset ( &sin, 0, sizeof(sin) );
-        sin.sin_family = AF_INET;
-        /* sin.sin_len = sizeof (struct sockaddr_in); */
-        memcpy ( &sin.sin_addr, hp->h_addr, hp->h_length );
-        sin.sin_port = htons ( (unsigned short) atoi (myport) );
-        if ( connect ( sock, (struct sockaddr*)&sin, sizeof (struct sockaddr_in) ) < 0 ) {
-            close (sock);
-            goto fail;
-        }
-
-# endif /* USE_IPv4_6 */
-
-        if ( sock < 0 ) {
-            fail:
-            stderr_printf ("\n"PROG_NAME": Could not open/connect socket: %s\n", strerror (errno) );
-            return -1;
-        }
-
-        if ( strlen (httpauth1) > 0  ||  httpauth != NULL ) {
-            char  buf [BUFFERLEN - 1];
-
-            strcat ( request, "Authorization: Basic ");
-            if ( strlen (httpauth1) > 0 )
-                encode64 ( httpauth1, buf );
-            else
-                encode64 ( httpauth , buf );
-            strcat ( request, buf );
-            strcat ( request, "\r\n" );
-        }
-        strcat ( request, "\r\n" );
-
-        writestring ( sock, request );
-        *purl = '\0';
-        readstring ( request, linelength-1, sock );
-        relocate = 0;
-        if ( (sptr = strchr ( request, ' ')) != NULL ) {
-            switch ( sptr [1] ) {
-            case '3':
-                relocate = 1;
-            case '2':
-                break;
-            default:
-                stderr_printf ("\n"PROG_NAME": HTTP request failed:%s", sptr ); /* ' ' and '\n' is included */
-                return -1;
-            }
-        }
-
-        do {
-            readstring ( request, linelength-1, sock );
-            if ( 0 == strncmp ( request, "Location:", 9) )
-                strncpy ( purl, request+10, BUFFERLEN - 1 );
-        } while ( request [0] != '\r'  &&  request [0] != '\n' );
-
-    } while ( relocate != 0  &&  purl[0] != '\0'  &&  numrelocs++ < 5 );
-
-    if ( relocate ) {
-        stderr_printf ("\n"PROG_NAME": Too many HTTP relocations.\n");
-        return -1;
-    }
-
-    free (purl);
-    free (request);
-    free (hostname);
-    free (proxyport);
-    free (myport);
-
-#ifdef _WIN32
-    return sock + 0x4000;
-#else
-    return sock;
-#endif
-}
-
-#endif /* USE_HTTP */
-
-/* end of http.c */
Index: penc/branches/zorg/huffman.c
===================================================================
--- /mppenc/branches/zorg/huffman.c	(revision 40)
+++ 	(revision )
@@ -1,463 +1,0 @@
-#include <stdio.h>
-#include <math.h>
-#include <memory.h>
-#include <stdlib.h>
-
-#define BASE    "website/sv8/"
-
-
-const char*  MemberOf   = "";
-const char*  ReturnLink = "";
-FILE*        fp_c;
-FILE*        fp_html;
-
-
-typedef struct _Code_t {
-    long double      Probability;
-    unsigned long    CodeWord;
-    unsigned long    Power;
-    unsigned short   CodeNumber;
-    unsigned char    Bits;
-    struct _Code_t*  l1;
-    struct _Code_t*  l2;
-} Code_t;
-
-
-static int
-cmpfn_1 ( const void* p1, const void* p2 )
-{
-    if ( ((const Code_t*)p1)->Probability < ((const Code_t*)p2)->Probability )
-        return +1;
-    if ( ((const Code_t*)p1)->Probability > ((const Code_t*)p2)->Probability )
-        return -1;
-    return 0;
-}
-
-
-static int
-cmpfn_2 ( const void* p1, const void* p2 )
-{
-    if ( ((const Code_t*)p1)->Bits < ((const Code_t*)p2)->Bits )
-        return -1;
-    if ( ((const Code_t*)p1)->Bits > ((const Code_t*)p2)->Bits )
-        return +1;
-    if ( ((const Code_t*)p1)->CodeNumber < ((const Code_t*)p2)->CodeNumber )
-        return -1;
-    if ( ((const Code_t*)p1)->CodeNumber > ((const Code_t*)p2)->CodeNumber )
-        return +1;
-    return 0;
-}
-
-
-static int
-cmpfn_3 ( const void* p1, const void* p2 )
-{
-    if ( ((const Code_t*)p1)->CodeNumber < ((const Code_t*)p2)->CodeNumber )
-        return -1;
-    if ( ((const Code_t*)p1)->CodeNumber > ((const Code_t*)p2)->CodeNumber )
-        return +1;
-    return 0;
-}
-
-
-static Code_t  Codes  [729 * 729 * 2];
-
-
-static void
-CountBits ( Code_t* p, int no )
-{
-    if ( p -> l1  &&  p -> l2 ) {
-        CountBits ( p -> l1, no+1 );
-        CountBits ( p -> l2, no+1 );
-    }
-    else if ( p -> l1  ||  p -> l2 ) {
-        fprintf ( stderr, "Error in Huffman Tree\n" );
-    }
-    else {
-        p -> Bits = no;
-    }
-}
-
-
-const char*
-Graph ( unsigned long x, int n )
-{
-    static char  buff [128];
-    char*        p = buff;
-    int          i;
-
-    for ( i = 0; i < n; i++ ) {
-        if ( (i & 7) == 7 )
-            *p++ = '<', *p++ = 'b', *p++ = '>';
-        *p++ = x & (0x80000000 >> i) ? '#' : '.';
-        if ( (i & 7) == 7 )
-            *p++ = '<', *p++ = '/', *p++ = 'b', *p++ = '>';
-    }
-    *p = '\0';
-    return buff;
-}
-
-
-void
-compute_type1 ( long double* p, int min, int max, int coupling, int maxcodes )
-{
-    int            i;
-    int            i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11;
-    int            cnt;
-    long double    Sum;
-    long double    ProbabilityS;
-    long double    ProbabilityH;
-    long double    Huffman;
-    long double    Shannon;
-    long double    Power;
-    unsigned long  Code;
-
-    for ( i = 0; i < sizeof(Codes)/sizeof(*Codes); i++ ) {
-        Codes [i].CodeNumber  = i;
-        Codes [i].Probability = 0.;
-        Codes [i].Bits        = 255;
-        Codes [i].CodeWord    = 0x00000000;
-        Codes [i].l1          = NULL;
-        Codes [i].l2          = NULL;
-    }
-
-    cnt = 0;
-    switch ( coupling ) {
-    case 12:
-        for ( i0 = min; i0 <= max; i0++ )
-            for ( i1 = min; i1 <= max; i1++ )
-                for ( i2 = min; i2 <= max; i2++ )
-                    for ( i3 = min; i3 <= max; i3++ )
-                        for ( i4 = min; i4 <= max; i4++ )
-                            for ( i5 = min; i5 <= max; i5++ )
-                                for ( i6 = min; i6 <= max; i6++ )
-                                    for ( i7 = min; i7 <= max; i7++ )
-                                        for ( i8 = min; i8 <= max; i8++ )
-                                            for ( i9 = min; i9 <= max; i9++ )
-                                                for ( i10 = min; i10 <= max; i10++ )
-                                                    for ( i11 = min; i11 <= max; i11++ ) {
-                                                    Codes [cnt].Probability = p[i0] * p[i1] * p[i2] * p[i3] * p[i4] * p[i5] * p[i6] * p[i7] * p[i8] * p[i9] * p [i10] * p[i11];
-                                                    Codes [cnt].Power       = i0*i0 + i1*i1 + i2*i2 + i3*i3 + i4*i4 + i5*i5 + i6*i6 + i7*i7 + i8*i8 + i9*i9 + i10*i10 + i11*i11;
-                                                    cnt++;
-                                                }
-        break;
-
-    case 11:
-        for ( i0 = min; i0 <= max; i0++ )
-            for ( i1 = min; i1 <= max; i1++ )
-                for ( i2 = min; i2 <= max; i2++ )
-                    for ( i3 = min; i3 <= max; i3++ )
-                        for ( i4 = min; i4 <= max; i4++ )
-                            for ( i5 = min; i5 <= max; i5++ )
-                                for ( i6 = min; i6 <= max; i6++ )
-                                    for ( i7 = min; i7 <= max; i7++ )
-                                        for ( i8 = min; i8 <= max; i8++ )
-                                            for ( i9 = min; i9 <= max; i9++ )
-                                                for ( i10 = min; i10 <= max; i10++ ) {
-                                                    Codes [cnt].Probability = p[i0] * p[i1] * p[i2] * p[i3] * p[i4] * p[i5] * p[i6] * p[i7] * p[i8] * p[i9] * p [i10];
-                                                    Codes [cnt].Power       = i0*i0 + i1*i1 + i2*i2 + i3*i3 + i4*i4 + i5*i5 + i6*i6 + i7*i7 + i8*i8 + i9*i9 + i10*i10;
-                                                    cnt++;
-                                                }
-        break;
-
-    case 10:
-        for ( i0 = min; i0 <= max; i0++ )
-            for ( i1 = min; i1 <= max; i1++ )
-                for ( i2 = min; i2 <= max; i2++ )
-                    for ( i3 = min; i3 <= max; i3++ )
-                        for ( i4 = min; i4 <= max; i4++ )
-                            for ( i5 = min; i5 <= max; i5++ )
-                                for ( i6 = min; i6 <= max; i6++ )
-                                    for ( i7 = min; i7 <= max; i7++ )
-                                        for ( i8 = min; i8 <= max; i8++ )
-                                            for ( i9 = min; i9 <= max; i9++ ) {
-                                                Codes [cnt].Probability = p[i0] * p[i1] * p[i2] * p[i3] * p[i4] * p[i5] * p[i6] * p[i7] * p[i8] * p[i9];
-                                                Codes [cnt].Power       = i0*i0 + i1*i1 + i2*i2 + i3*i3 + i4*i4 + i5*i5 + i6*i6 + i7*i7 + i8*i8 + i9*i9;
-                                                cnt++;
-                                            }
-        break;
-
-    case 9:
-        for ( i0 = min; i0 <= max; i0++ )
-            for ( i1 = min; i1 <= max; i1++ )
-                for ( i2 = min; i2 <= max; i2++ )
-                    for ( i3 = min; i3 <= max; i3++ )
-                        for ( i4 = min; i4 <= max; i4++ )
-                            for ( i5 = min; i5 <= max; i5++ )
-                                for ( i6 = min; i6 <= max; i6++ )
-                                    for ( i7 = min; i7 <= max; i7++ )
-                                        for ( i8 = min; i8 <= max; i8++ ) {
-                                            Codes [cnt].Probability = p[i0] * p[i1] * p[i2] * p[i3] * p[i4] * p[i5] * p[i6] * p[i7] * p[i8];
-                                            Codes [cnt].Power       = i0*i0 + i1*i1 + i2*i2 + i3*i3 + i4*i4 + i5*i5 + i6*i6 + i7*i7 + i8*i8;
-                                            cnt++;
-                                        }
-        break;
-
-    case 8:
-        for ( i0 = min; i0 <= max; i0++ )
-            for ( i1 = min; i1 <= max; i1++ )
-                for ( i2 = min; i2 <= max; i2++ )
-                    for ( i3 = min; i3 <= max; i3++ )
-                        for ( i4 = min; i4 <= max; i4++ )
-                            for ( i5 = min; i5 <= max; i5++ )
-                                for ( i6 = min; i6 <= max; i6++ )
-                                    for ( i7 = min; i7 <= max; i7++ ) {
-                                        Codes [cnt].Probability = p[i0] * p[i1] * p[i2] * p[i3] * p[i4] * p[i5] * p[i6] * p[i7];
-                                        Codes [cnt].Power       = i0*i0 + i1*i1 + i2*i2 + i3*i3 + i4*i4 + i5*i5 + i6*i6 + i7*i7;
-                                        cnt++;
-                                    }
-        break;
-
-    case 7:
-        for ( i0 = min; i0 <= max; i0++ )
-            for ( i1 = min; i1 <= max; i1++ )
-                for ( i2 = min; i2 <= max; i2++ )
-                    for ( i3 = min; i3 <= max; i3++ )
-                        for ( i4 = min; i4 <= max; i4++ )
-                            for ( i5 = min; i5 <= max; i5++ )
-                                for ( i6 = min; i6 <= max; i6++ ) {
-                                    Codes [cnt].Probability = p[i0] * p[i1] * p[i2] * p[i3] * p[i4] * p[i5] * p[i6];
-                                    Codes [cnt].Power       = i0*i0 + i1*i1 + i2*i2 + i3*i3 + i4*i4 + i5*i5 + i6*i6;
-                                    cnt++;
-                                }
-        break;
-
-    case 6:
-        for ( i0 = min; i0 <= max; i0++ )
-            for ( i1 = min; i1 <= max; i1++ )
-                for ( i2 = min; i2 <= max; i2++ )
-                    for ( i3 = min; i3 <= max; i3++ )
-                        for ( i4 = min; i4 <= max; i4++ )
-                            for ( i5 = min; i5 <= max; i5++ ) {
-                                Codes [cnt].Probability = p[i0] * p[i1] * p[i2] * p[i3] * p[i4] * p[i5];
-                                Codes [cnt].Power       = i0*i0 + i1*i1 + i2*i2 + i3*i3 + i4*i4 + i5*i5;
-                                cnt++;
-                            }
-        break;
-
-    case 5:
-        for ( i0 = min; i0 <= max; i0++ )
-            for ( i1 = min; i1 <= max; i1++ )
-                for ( i2 = min; i2 <= max; i2++ )
-                    for ( i3 = min; i3 <= max; i3++ )
-                        for ( i4 = min; i4 <= max; i4++ ) {
-                            Codes [cnt].Probability = p[i0] * p[i1] * p[i2] * p[i3] * p[i4];
-                            Codes [cnt].Power       = i0*i0 + i1*i1 + i2*i2 + i3*i3 + i4*i4;
-                            cnt++;
-                        }
-        break;
-
-    case 4:
-        for ( i0 = min; i0 <= max; i0++ )
-            for ( i1 = min; i1 <= max; i1++ )
-                for ( i2 = min; i2 <= max; i2++ )
-                    for ( i3 = min; i3 <= max; i3++ ) {
-                        Codes [cnt].Probability = p[i0] * p[i1] * p[i2] * p[i3];
-                        Codes [cnt].Power       = i0*i0 + i1*i1 + i2*i2 + i3*i3;
-                        cnt++;
-                    }
-        break;
-
-    case 3:
-        for ( i0 = min; i0 <= max; i0++ )
-            for ( i1 = min; i1 <= max; i1++ )
-                for ( i2 = min; i2 <= max; i2++ ) {
-                    Codes [cnt].Probability = p[i0] * p[i1] * p[i2];
-                    Codes [cnt].Power       = i0*i0 + i1*i1 + i2*i2;
-                    cnt++;
-                }
-        break;
-
-    case 2:
-        for ( i0 = min; i0 <= max; i0++ )
-            for ( i1 = min; i1 <= max; i1++ ) {
-                Codes [cnt].Probability = p[i0] * p[i1];
-                Codes [cnt].Power       = i0*i0 + i1*i1;
-                cnt++;
-            }
-        break;
-
-    case 1:
-        for ( i0 = min; i0 <= max; i0++ ) {
-            Codes [cnt].Probability = p[i0];
-            Codes [cnt].Power       = i0*i0;
-            cnt++;
-        }
-        break;
-    }
-
-    qsort ( Codes, cnt, sizeof(*Codes), cmpfn_1 );
-
-    if ( cnt < maxcodes )
-        fprintf ( stderr, "Error: Too less codes generated: max possible: %u, requested: %u\n", cnt, maxcodes );
-
-    for ( Sum = 0., i = maxcodes; --i >= 0; )
-        Sum += Codes [i].Probability;
-
-    for ( i = maxcodes; --i >= 0; )
-        Codes [i].Probability /= Sum;
-
-    for ( Sum = 0., i = maxcodes; --i >= 1; )
-        Sum += Codes [i].Probability;
-
-    Codes [0].Probability = 1. - Sum;
-
-    for ( i = maxcodes-2; i >= 0; i-- ) {
-        //fprintf ( stderr, "Merge %3u and %3u -> %3u (%7.3f%% + %7.3f%% = %7.3f%%)\n", i+0, i+1, i+0, 100 * Codes [i+0].Probability, 100 * Codes [i+1].Probability, 100 * Codes [i+0].Probability + 100 * Codes [i+1].Probability );
-        Codes [i+i+2]            = Codes   [i+0];
-        Codes [i+i+3]            = Codes   [i+1];
-        Codes [i+0].Probability += Codes   [i+1].Probability;
-        Codes [i+0].l1           = Codes + (i+i+2);
-        Codes [i+0].l2           = Codes + (i+i+3);
-        qsort ( Codes, i+1, sizeof(*Codes), cmpfn_1 );
-    }
-    CountBits ( Codes, 0 );
-
-    qsort ( Codes, 2*maxcodes, sizeof(*Codes), cmpfn_2 );
-
-    ProbabilityS = 0.;
-    ProbabilityH = 0.;
-    Huffman      = 0.;
-    Shannon      = 0.;
-    Power        = 0.;
-    for ( i = 0; i < maxcodes; i++ ) {
-        double  ps = Codes [i].Probability;
-        double  ph = 1. / ( 1LU << Codes [i].Bits );
-
-        ProbabilityS += ps;
-        Shannon      -= ps * log (ps) / log (2.);
-        Power        += Codes [i].Power * ps;
-        ProbabilityH += ph;
-        Huffman      -= ps * log (ph) / log (2.);
-    }
-    fprintf ( fp_c, "    //\n" );
-    fprintf ( fp_c, "    // Probability = %9.5f%% (Huffman), %9.5f%% (Shannon)\n", (double)(100 * ProbabilityH), (double)(100 * ProbabilityS) );
-    fprintf ( fp_c, "    // Huffman     = %9.5f bit/sample\n", (double)(Huffman/coupling)  );
-    fprintf ( fp_c, "    // Shannon     = %9.5f bit/sample\n", (double)(Shannon/coupling)  );
-    fprintf ( fp_c, "    // Huffman Loss= %9.5f bit/sample\n", (double)((Huffman-Shannon)/coupling)  );
-    fprintf ( fp_c, "    // Effective V = %9.5f\n",            sqrt (Power/coupling)  );
-    fprintf ( fp_c, "    //\n" );
-
-    fprintf ( stderr, "Huffman %9.5f  ", (double)(Huffman/coupling)  );
-    fprintf ( stderr, "Shannon %9.5f  ", (double)(Shannon/coupling)  );
-    fprintf ( stderr, "Loss %10.3f  ",   (double)(1000*(Huffman-Shannon)/coupling)  );
-    fprintf ( stderr, "Eff %9.5f  ",     (double)(sqrt (Power/coupling))  );
-
-    Code = 0;
-    for ( i = 0; i < maxcodes; i++ ) {
-        Codes [i].CodeWord = Code;
-        Code              += 0x80000000 >> (Codes [i].Bits - 1);
-    }
-
-    qsort ( Codes, maxcodes, sizeof(*Codes), cmpfn_3 );
-
-    for ( i = 0; i < maxcodes; i++ ) {
-        fprintf ( fp_c, "    { 0x%08lX, %2u },\t// Code %3u, %2u bits, %8.5f%%\n", Codes[i].CodeWord, Codes [i].Bits, Codes [i].CodeNumber, Codes [i].Bits, (double)(100 * Codes [i].Probability) );
-        fprintf ( fp_html, "    <tr> <td align=\"right\"> %3d&nbsp;</td> <td align=\"right\"> <tt><b> %08lX&nbsp;</b></tt> </td> <td align=\"right\"> %2u&nbsp;</td> <td align=\"right\"> %5.2f%%&nbsp;</td> <td><font color=\"#DDDDDD\">&nbsp;<tt>%s</tt>&nbsp;</font></td> </tr>\n",
-                  Codes [i].CodeNumber, Codes[i].CodeWord, Codes [i].Bits, (double)(100 * Codes [i].Probability), Graph (Codes[i].CodeWord, Codes [i].Bits) );
-    }
-}
-
-
-void
-generate_type1 ( const char* basename, int min, int max, double deviation, double exponent, double offset, int coupling, int maxcodes )
-{
-    long double    table [513];
-    char           FileName [128];
-    int            i;
-
-    sprintf ( FileName, BASE "%s.html", basename );
-    fp_html = fopen ( FileName, "wb" );
-
-    memset ( table, 0, sizeof table );
-    for ( i = min; i <= max; i++ ) {
-        long double  tmp = i ? pow (fabs ((i+offset)/deviation), exponent) : 0.;
-        table [i + 256] = tmp <= 200. ? exp (-tmp) : 0.;
-        fprintf ( stderr, "%5.2f ", (double)(99.99*table [i + 256]) );
-    }
-    fprintf ( stderr, "\n");
-    fprintf (fp_c, "const HuffmanCode_t  %s [%3u] = {\n", basename, maxcodes );
-    fprintf (stderr, "%-10.10s: ", basename );
-
-    fprintf (fp_html,
-        "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\n"
-        "<html>\n"
-        "<head>\n"
-        "    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n"
-        "    <meta name=\"Author\" content=\"Frank Klemm\">\n"
-        "    <title>Huffman Code table: %s</title>\n"
-        "</head>\n"
-        "<body text=\"#FFFFFF\" bgcolor=\"#254E31\" link=\"#33CCFF\" vlink=\"#33CCFF\" alink=\"#FF0000\" background=\"../img/back-2.gif\">\n"
-        "\n"
-        "<br>\n", basename );
-
-    fprintf (fp_html,
-        "<font size=\"+1\" color=\"#FFD486\"><b>Huffman Code table: &nbsp; %s</b></font><br>\n"
-        "\n"
-        "<p><p>Member of <a href=\"%s.html\">%s</a>\n"
-        "\n"
-        "<p>\n"
-        "\n"
-        "<hr align=\"left\" width=\"512\"> <!------------------------------------------------------------->\n"
-        "\n", basename, ReturnLink, MemberOf );
-
-    fprintf (fp_html, "<p><table border=\"3\" bgcolor=\"20442B\">\n" );
-
-    fprintf (fp_html, "    <tr> <td> &nbsp; Code &nbsp; </td> <td> &nbsp; Huffman code &nbsp; </td> <td> &nbsp; Bits &nbsp; </td> <td> &nbsp; Probability &nbsp; </td> <td> &nbsp; Encoded bits &nbsp; </td> </tr>\n" );
-    fprintf (fp_html, "    <tr> </tr>\n" );
-
-
-    compute_type1 ( table+256, min, max, coupling, maxcodes );
-
-    fprintf (fp_html, "</table>" );
-
-    fprintf (fp_html,
-        "<p>\n"
-        "\n"
-        "<hr align=\"left\" width=\"512\"> <!------------------------------------------------------------->\n"
-        "\n"
-        "<a href=\"mailto:pfk@uni-jena.de\"><img alt=\"[eMail]\" SRC=\"../img/E-Mail.gif\" BORDER=0 height=60 width=55 align=CENTER></a>&nbsp;<a href=\"mailto:pfk@uni-jena.de\">Frank.Klemm@uni-jena.de</a>\n"
-        "\n"
-        "</body>\n"
-        "</html>\n" );
-
-    fprintf (stderr, "\n" );
-    fprintf (fp_c, "};\n\n" );
-    fflush (fp_c);
-
-    fclose (fp_html);
-}
-
-
-int
-main ( void )
-{
-    fp_c = fopen ( BASE "huffman_codes.c", "wb" );
-
-    MemberOf   = "Quantized Subband Samples";
-    ReturnLink = "subbandsample";
-
-    fprintf ( fp_c, "\n#include \"huffman_codes.h\"\n\n\n" );
-
-    generate_type1 ( "table_0X",  -1,  +1, 0.5600, 2.0, 0.0, 9, 163 );
-    generate_type1 ( "table_03",  -1,  +1, 0.6024, 2.0, 0.0, 6,  73 );
-    generate_type1 ( "table_04",  -1,  +1, 0.7650, 2.0, 0.0, 4,  81 );
-    generate_type1 ( "table_05",  -1,  +1, 0.9200, 1.5, 0.0, 3,  27 );
-    generate_type1 ( "table_06",  -2,  +2, 1.0000, 2.0, 0.0, 3, 125 );
-    generate_type1 ( "table_07",  -2,  +2, 1.0000, 1.5, 0.0, 2,  25 );
-    generate_type1 ( "table_08",  -3,  +3, 1.8700, 2.9, 0.0, 2,  49 );
-    generate_type1 ( "table_09",  -4,  +4, 2.6100, 3.0, 0.0, 2,  81 );
-    generate_type1 ( "table_10",  -5,  +5, 3.8000, 3.0, 0.0, 2, 121 );
-    generate_type1 ( "table_01", -16, +15, 5.2000, 3.0, 0.5, 1,  32 );
-    generate_type1 ( "table_02", -16, +15, 6.4000, 2.0, 0.5, 1,  32 );
-    generate_type1 ( "table_11",  -6,  +6, 2.6700, 2.8, 0.0, 1,  13 );
-
-    MemberOf   = "Allocation";
-    ReturnLink = "allocation";
-    generate_type1 ( "table_20", -16, +16, 1.4800, 1.0, 0.0, 1,  33 );
-
-    fprintf (fp_c, "/* end of huffman_codes.c */\n" );
-    fclose (fp_c);
-
-    return 0;
-}
Index: penc/branches/zorg/huffman.vcproj
===================================================================
--- /mppenc/branches/zorg/huffman.vcproj	(revision 40)
+++ 	(revision )
@@ -1,166 +1,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="huffman"
-	SccProjectName=""
-	SccLocalPath="">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\Release"
-			IntermediateDirectory=".\Release"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Release/huffman.pch"
-				AssemblerListingLocation=".\Release/"
-				ObjectFile=".\Release/"
-				ProgramDataBaseFileName=".\Release/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=".\Release/huffman.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				ProgramDatabaseFile=".\Release/huffman.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Release/huffman.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\Debug"
-			IntermediateDirectory=".\Debug"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Debug/huffman.pch"
-				AssemblerListingLocation=".\Debug/"
-				ObjectFile=".\Debug/"
-				ProgramDataBaseFileName=".\Debug/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=".\Debug/huffman.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile=".\Debug/huffman.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Debug/huffman.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
-			<File
-				RelativePath="huffman.c">
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: penc/branches/zorg/huffsv46.c
===================================================================
--- /mppenc/branches/zorg/huffsv46.c	(revision 40)
+++ 	(revision )
@@ -1,152 +1,0 @@
-/*
- * Musepack audio compression
- * Copyright (C) 1999-2004 Buschmann/Klemm/Piecha/Wolf
- *
- * 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.1 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
- */
-
-#include "mppdec.h"
-
-static Huffman_t   Entropie_1    [ 3];
-static Huffman_t   Entropie_2    [ 5];
-static Huffman_t   Entropie_3    [ 7];
-static Huffman_t   Entropie_4    [ 9];
-static Huffman_t   Entropie_5    [15];
-static Huffman_t   Entropie_6    [31];
-static Huffman_t   Entropie_7    [63];
-Huffman_t          SCFI_Bundle   [ 8];
-Huffman_t          DSCF_Entropie [13];
-static Huffman_t   Region_A      [16];
-static Huffman_t   Region_B      [ 8];
-static Huffman_t   Region_C      [ 4];
-
-const Huffman_t*  Entropie      [18] = {
-    NULL      , Entropie_1, Entropie_2, Entropie_3, Entropie_4, Entropie_5,
-    Entropie_6, Entropie_7, NULL      , NULL      , NULL      , NULL      ,
-    NULL      , NULL      , NULL      , NULL      , NULL      , NULL      ,
-};
-
-const Huffman_t*  Region        [32] = {
-    Region_A, Region_A, Region_A, Region_A, Region_A, Region_A, Region_A, Region_A,
-    Region_A, Region_A, Region_A, Region_B, Region_B, Region_B, Region_B, Region_B,
-    Region_B, Region_B, Region_B, Region_B, Region_B, Region_B, Region_B, Region_C,
-    Region_C, Region_C, Region_C, Region_C, Region_C, Region_C, Region_C, Region_C
-};
-
-static const HuffSrc_t   SCFI_Bundle_src [8] = {
-    { 11, 6 }, { 7, 5 }, { 6, 5 }, { 1, 2 }, { 4, 5 }, { 0, 3 }, { 10, 6 }, { 1, 1 },
-};
-
-static const HuffSrc_t   Region_A_src [16] = {
-    {   2, 3 }, {   1, 1 }, {   0,  2 }, {  15,  5 }, {   29,  6 }, {   13,  5 }, {   12,  5 }, {   57,  7 },
-    { 113, 8 }, { 225, 9 }, { 449, 10 }, { 897, 11 }, { 1793, 12 }, { 3585, 13 }, { 7169, 14 }, { 7168, 14 },
-};
-
-static const HuffSrc_t   Region_B_src [ 8] = {
-    { 1, 2 }, { 1, 1 }, { 1, 3 }, { 1, 4 }, { 1, 5 }, { 1, 6 }, { 1, 7 }, { 0, 7 },
-};
-
-static const HuffSrc_t   Region_C_src [ 4] = {
-    { 1, 1 }, { 1, 2 }, { 1, 3 }, { 0, 3 },
-};
-
-static const HuffSrc_t   DSCF_Entropie_src [13] = {
-    { 20, 6 }, { 11, 5 }, {  4, 4 }, { 24, 5 }, { 11, 4 }, {  4, 3 }, { 0, 2 },
-    {  7, 3 }, {  3, 3 }, { 13, 4 }, { 10, 4 }, { 25, 5 }, { 21, 6 },
-};
-
-static const HuffSrc_t   Entropie_1_src [3] = {
-    { 1, 2 }, { 1, 1 }, { 0, 2 },
-};
-
-static const HuffSrc_t   Entropie_2_src [5] = {
-    { 4, 3 }, { 0, 2 }, { 3, 2 }, { 1, 2 }, { 5, 3 },
-};
-
-static const HuffSrc_t   Entropie_3_src [7] = {
-    { 17, 5 }, { 5, 3 }, { 1, 2 }, { 3, 2 }, { 0, 2 }, { 9, 4 }, { 16, 5 },
-};
-
-static const HuffSrc_t   Entropie_4_src [9] = {
-    { 5, 4 }, { 14, 4 }, { 3, 3 }, { 5, 3 }, { 0, 2 }, { 6, 3 }, { 4, 3 }, { 15, 4 }, { 4, 4 },
-};
-
-static const HuffSrc_t   Entropie_5_src [15] = {
-    { 57, 6 }, { 23, 5 }, { 29, 5 }, {  3, 4 }, { 13, 4 }, { 15, 4 }, {  2, 3 }, { 4, 3 },
-    {  3, 3 }, {  0, 3 }, { 12, 4 }, { 10, 4 }, {  2, 4 }, { 22, 5 }, { 56, 6 },
-};
-
-static const HuffSrc_t   Entropie_6_src [31] = {
-    {  8, 7 }, { 88, 7 }, { 40, 6 }, {  5, 6 }, { 45, 6 }, { 56, 6 }, {  9, 5 }, { 23, 5 },
-    { 24, 5 }, { 27, 5 }, { 29, 5 }, { 31, 5 }, {  3, 4 }, {  2, 4 }, {  7, 4 }, {  9, 4 },
-    {  8, 4 }, {  5, 4 }, {  6, 4 }, {  0, 4 }, { 30, 5 }, { 26, 5 }, { 25, 5 }, { 21, 5 },
-    {  3, 5 }, { 57, 6 }, { 41, 6 }, { 17, 6 }, { 16, 6 }, { 89, 7 }, {  9, 7 },
-};
-
-static const HuffSrc_t   Entropie_7_src [63] = {
-    {  17, 8 }, { 151, 8 }, { 212, 8 }, {   9, 7 }, {  80, 7 }, {  10, 7 }, { 11, 7 }, { 63, 7 },
-    {  89, 7 }, {  97, 7 }, { 107, 7 }, { 126, 7 }, {  18, 6 }, {  36, 6 }, { 38, 6 }, { 42, 6 },
-    {  43, 6 }, {  45, 6 }, {  51, 6 }, {  50, 6 }, {  56, 6 }, {  57, 6 }, { 60, 6 }, { 61, 6 },
-    {   6, 5 }, {   0, 5 }, {   8, 5 }, {   7, 5 }, {  14, 5 }, {  10, 5 }, { 17, 5 }, { 11, 5 },
-    {  16, 5 }, {   5, 5 }, {  13, 5 }, {   4, 5 }, {  12, 5 }, {   1, 5 }, {  3, 5 }, { 62, 6 },
-    {  59, 6 }, {  55, 6 }, {  54, 6 }, {  49, 6 }, {  52, 6 }, {  47, 6 }, { 46, 6 }, { 41, 6 },
-    {  39, 6 }, {  30, 6 }, {  19, 6 }, { 117, 7 }, { 116, 7 }, {  96, 7 }, { 88, 7 }, { 74, 7 },
-    {  62, 7 }, { 254, 8 }, {  81, 7 }, { 255, 8 }, { 213, 8 }, { 150, 8 }, { 16, 8 },
-};
-
-
-#define MAKE(d,s)    Make_HuffTable   ( (d), (s), sizeof(s)/sizeof(*(s)) )
-#define SORT(x,o)    Resort_HuffTable ( (x), sizeof(x)/sizeof(*(x)), -(Int)(o) )
-#define LOOKUP(x,q)  Make_LookupTable ( (q), sizeof(q), (x), sizeof(x)/sizeof(*(x)) )
-
-
-static void
-Init_Huffman_Encoder_SV4_6 ( void )
-{
-    MAKE ( SCFI_Bundle  , SCFI_Bundle_src   );  // SCFI-Bundle
-    MAKE ( Region_A     , Region_A_src      );  // Region A (Subbands  0...10)
-    MAKE ( Region_B     , Region_B_src      );  // Region B (Subbands 11...22)
-    MAKE ( Region_C     , Region_C_src      );  // Region C (Subbands 23...31)
-    MAKE ( DSCF_Entropie, DSCF_Entropie_src );  // DSCF
-    MAKE ( Entropie_1   , Entropie_1_src    );  // first Quantizer
-    MAKE ( Entropie_2   , Entropie_2_src    );  // second Quantizer
-    MAKE ( Entropie_3   , Entropie_3_src    );  // third Quantizer
-    MAKE ( Entropie_4   , Entropie_4_src    );  // fourth Quantizer
-    MAKE ( Entropie_5   , Entropie_5_src    );  // fifth Quantizer
-    MAKE ( Entropie_6   , Entropie_6_src    );  // sixth Quantizer
-    MAKE ( Entropie_7   , Entropie_7_src    );  // seventh Quantizer
-}
-
-
-void
-Init_Huffman_Decoder_SV4_6 ( void )
-{
-    Init_Huffman_Encoder_SV4_6 ();
-
-    SORT ( Entropie_1   , Dc[1] );
-    SORT ( Entropie_2   , Dc[2] );
-    SORT ( Entropie_3   , Dc[3] );
-    SORT ( Entropie_4   , Dc[4] );
-    SORT ( Entropie_5   , Dc[5] );
-    SORT ( Entropie_6   , Dc[6] );
-    SORT ( Entropie_7   , Dc[7] );
-    SORT ( SCFI_Bundle  ,    0  );
-    SORT ( DSCF_Entropie,    6  );
-    SORT ( Region_A     ,    0  );
-    SORT ( Region_B     ,    0  );
-    SORT ( Region_C     ,    0  );
-}
-
-/* end of huffsv46.c */
Index: penc/branches/zorg/id3tag.c
===================================================================
--- /mppenc/branches/zorg/id3tag.c	(revision 40)
+++ 	(revision )
@@ -1,244 +1,0 @@
-/*
- * Musepack audio compression
- * Copyright (C) 1999-2004 Buschmann/Klemm/Piecha/Wolf
- *
- * 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.1 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
- */
-
-#include <string.h>
-#include "mppdec.h"
-
-/*
- *  List of known Genres. 256 genres are possible with version 1/1.1 tags,
- *  but not yet used.
- */
-
-static const char*  GenreList [] = {
-    "Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge",
-    "Hip-Hop", "Jazz", "Metal", "New Age", "Oldies", "Other", "Pop", "R&B",
-    "Rap", "Reggae", "Rock", "Techno", "Industrial", "Alternative", "Ska",
-    "Death Metal", "Pranks", "Soundtrack", "Euro-Techno", "Ambient",
-    "Trip-Hop", "Vocal", "Jazz+Funk", "Fusion", "Trance", "Classical",
-    "Instrumental", "Acid", "House", "Game", "Sound Clip", "Gospel", "Noise",
-    "AlternRock", "Bass", "Soul", "Punk", "Space", "Meditative",
-    "Instrumental Pop", "Instrumental Rock", "Ethnic", "Gothic", "Darkwave",
-    "Techno-Industrial", "Electronic", "Pop-Folk", "Eurodance", "Dream",
-    "Southern Rock", "Comedy", "Cult", "Gangsta", "Top 40", "Christian Rap",
-    "Pop/Funk", "Jungle", "Native American", "Cabaret", "New Wave",
-    "Psychadelic", "Rave", "Showtunes", "Trailer", "Lo-Fi", "Tribal",
-    "Acid Punk", "Acid Jazz", "Polka", "Retro", "Musical", "Rock & Roll",
-    "Hard Rock", "Folk", "Folk/Rock", "National Folk", "Swing", "Fast-Fusion",
-    "Bebob", "Latin", "Revival", "Celtic", "Bluegrass", "Avantgarde",
-    "Gothic Rock", "Progressive Rock", "Psychedelic Rock", "Symphonic Rock",
-    "Slow Rock", "Big Band", "Chorus", "Easy Listening", "Acoustic", "Humour",
-    "Speech", "Chanson", "Opera", "Chamber Music", "Sonata", "Symphony",
-    "Booty Bass", "Primus", "Porn Groove", "Satire", "Slow Jam", "Club",
-    "Tango", "Samba", "Folklore", "Ballad", "Power Ballad", "Rhythmic Soul",
-    "Freestyle", "Duet", "Punk Rock", "Drum Solo", "A capella", "Euro-House",
-    "Dance Hall", "Goa", "Drum & Bass", "Club House", "Hardcore", "Terror",
-    "Indie", "BritPop", "NegerPunk", "Polsk Punk", "Beat", "Christian Gangsta",
-    "Heavy Metal", "Black Metal", "Crossover", "Contemporary C",
-    "Christian Rock", "Merengue", "Salsa", "Thrash Metal", "Anime", "JPop",
-    "SynthPop"
-};
-
-
-/*
- *  Copies src to dst. Copying is stopped at `\0' char is detected or if
- *  len chars are copied.
- *  Trailing blanks are removed and the string is `\0` terminated.
- */
-
-static void
-memcpy_crop ( char* dst, const char* src, size_t len )
-{
-    size_t  i;
-
-    for ( i = 0; i < len; i++ )
-        if  ( src[i] != '\0' )
-            dst[i] = src[i];
-        else
-            break;
-
-    // dst[i] points behind the string contents
-
-    while ( i > 0  &&  dst [i-1] == ' ' )
-        i--;
-    dst [i] = '\0';
-}
-
-
-/*
- *  Evaluate ID version 1/1.1 tags of a file given by 'fp' and fills out Tag
- *  information in 'tip'. Tag information also contains the effective file
- *  length (without the tags if tags are present). Return 1 if there is
- *  usable information inside the file. Note that there's also a possible case
- *  where the file contains empty tags, the file size is truncated by the
- *  128 bytes but the function returns 0.
- *
- *  If there's no tags, all strings containing '\0', the Genre pointer is
- *  NULL and GenreNo and TrackNo are -1.
- */
-
-Int
-Read_ID3V1_Tags ( FILE_T fp, TagInfo_t* tip )
-{
-    Uint8_t  tmp [128];
-    OFF_T    file_pos;
-
-    memset ( tip, 0, sizeof(*tip) );
-    tip->GenreNo = -1;
-    tip->TrackNo = -1;
-
-    if ( -1 == (file_pos = FILEPOS (fp)) )
-        return 0;
-    if ( -1 == SEEK ( fp, -128L, SEEK_END ) )
-        return 0;
-
-    tip->FileSize = FILEPOS (fp);
-    if ( 128 != READ ( fp, tmp, 128 ) )
-        return 0;
-    SEEK ( fp, file_pos, SEEK_SET );
-
-    if ( 0 != memcmp ( tmp, "TAG", 3 ) ) {
-        tip->FileSize += 128;
-        return 0;
-    }
-
-    if ( !tmp[3]  &&  !tmp[33]  &&  !tmp[63]  &&  !tmp[93]  &&  !tmp[97] )
-        return 0;
-
-    memcpy_crop  ( tip->Title  , tmp +  3, 30 );
-    memcpy_crop  ( tip->Artist , tmp + 33, 30 );
-    memcpy_crop  ( tip->Album  , tmp + 63, 30 );
-    memcpy_crop  ( tip->Year   , tmp + 93,  4 );
-    memcpy_crop  ( tip->Comment, tmp + 97, 30 );
-
-    strcpy ( tip->Genre, tmp[127] < sizeof(GenreList)/sizeof(*GenreList)  ?
-                         GenreList [tip->GenreNo = tmp[127]]  :  "???" );
-
-    // Index 0 may be true if file is very short
-    if ( tmp[125] == 0  &&  (tmp[126] != 0  ||  tip->FileSize < 66000 ) )
-        sprintf ( tip->Track, "[%02d]", tip->TrackNo = tmp[126] );
-    else
-        strcpy ( tip->Track, "    " );
-
-    return 1;
-}
-
-
-struct APETagFooterStruct {
-    Uint8_t   ID       [8];    // should equal 'APETAGEX'
-    Uint8_t   Version  [4];    // currently 1000 (version 1.000)
-    Uint8_t   Length   [4];    // the complete size of the tag, including this footer
-    Uint8_t   TagCount [4];    // the number of fields in the tag
-    Uint8_t   Flags    [4];    // the tag flags (none currently defined)
-    Uint8_t   Reserved [8];    // reserved for later use
-};
-
-
-static Uint32_t
-Read_LE_Uint32 ( const Uint8_t* p )
-{
-    return ((Uint32_t)p[0] <<  0) |
-           ((Uint32_t)p[1] <<  8) |
-           ((Uint32_t)p[2] << 16) |
-           ((Uint32_t)p[3] << 24);
-}
-
-
-#define TAG_ANALYZE(item,elem)                      \
-    if ( 0 == memcmp (p, #item, sizeof #item ) ) {  \
-        p += sizeof #item;                          \
-        memcpy ( tip->elem, p, len );               \
-        p += len;                                   \
-    } else
-
-
-Int
-Read_APE_Tags ( FILE_T fp, TagInfo_t* tip )
-{
-    OFF_T                      file_pos;
-    Uint32_t                   len;
-    Uint32_t                   flags;
-    unsigned char              buff [8192];
-    unsigned char*             p;
-    unsigned char*             end;
-    struct APETagFooterStruct  T;
-    Uint32_t                   TagLen;
-    Uint32_t                   TagCount;
-    Uint32_t                   tmp;
-
-    memset ( tip, 0, sizeof(*tip) );
-    tip->GenreNo = -1;
-    tip->TrackNo = -1;
-
-    if ( -1 == (file_pos = FILEPOS (fp)) )
-        goto notag;
-    if ( -1 == SEEK ( fp, 0L, SEEK_END ) )
-        goto notag;
-    tip->FileSize = FILEPOS (fp);
-    if ( -1 == SEEK ( fp, -(long)sizeof T, SEEK_END ) )
-        goto notag;
-    if ( sizeof(T) != READ ( fp, &T, sizeof T ) )
-        goto notag;
-    if ( memcmp ( T.ID, "APETAGEX", sizeof(T.ID) ) != 0 )
-        goto notag;
-    tmp = Read_LE_Uint32 (T.Version);
-    if (  tmp != 1000  &&  tmp != 2000 )
-        goto notag;
-    TagLen = Read_LE_Uint32 (T.Length);
-    if ( TagLen <= sizeof T )
-        goto notag;
-    if ( -1 == SEEK ( fp, -(long)TagLen, SEEK_END ) )
-        goto notag;
-    tip->FileSize = FILEPOS (fp);
-    memset ( buff, 0, sizeof(buff) );
-    if ( TagLen - sizeof T != READ ( fp, buff, TagLen - sizeof T ) )
-        goto notag;
-    SEEK ( fp, file_pos, SEEK_SET );
-
-    TagCount = Read_LE_Uint32 (T.TagCount);
-    end = buff + TagLen - sizeof T;
-    for ( p = buff; p < end  &&  TagCount--; ) {
-        len   = Read_LE_Uint32 ( p ); p += 4;
-        flags = Read_LE_Uint32 ( p ); p += 4;
-        TAG_ANALYZE ( Title  , Title   )
-        TAG_ANALYZE ( Album  , Album   )
-        TAG_ANALYZE ( Artist , Artist  )
-        TAG_ANALYZE ( Album  , Album   )
-        TAG_ANALYZE ( Comment, Comment )
-        TAG_ANALYZE ( Track  , Track   )
-        TAG_ANALYZE ( Year   , Year    )
-        TAG_ANALYZE ( Genre  , Genre   )
-        {
-            p += strlen(p) + 1 + len;
-        }
-    }
-
-    if ( tip->Track[0] != '\0' )
-        sprintf ( tip->Track, "[%02d]", tip->TrackNo = atoi (tip->Track) );
-    else
-        strcpy ( tip->Track, "    " );
-
-    /* genre is not yet entirely decoded */
-    return 1;
-
-notag:
-    SEEK ( fp, file_pos, SEEK_SET );
-    return 0;
-}
-
-/* end of id3tag.c */
Index: penc/branches/zorg/install
===================================================================
--- /mppenc/branches/zorg/install	(revision 40)
+++ 	(revision )
@@ -1,101 +1,0 @@
-How to compile the MPEGplus decoder?
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-First step on all Operating Systems and all compilers:
-
-    - Edit mpp.h and select features
-    - Install NASM if you want to use enhanced assembler routines on 32 bit
-      Intel CPUs
-    - If you are using a Pentium Classic (P54) or Pentium MMX (P55),
-      setting %USE_FXCH in synthasm.nas increase performance by 5...10%. 
-      For other CPUs it decreases performance.
-
-
-MS-DOS:
-    Turbo-C:
-        Command line:
-            maketcc.bat
-        Turbo-C IDE:
-            Open Project "mpp.prj" and compile it
-
-    Zortech-C:
-        Command line:
-            makeztc.bat
-
-    DJGCC:
-        Command line:
-
-    WATCOM C/C++:
-
-Windows:
-
-    Microsoft C/C++:
-        NasmW.exe should be installed in "C:\Program Files\Nasm\NasmW.exe"
-        Command line:
-            Compile Project "config.mak"
-            run config.exe
-            Compile Project "mppdec.mak"
-
-        Microsoft Developer Studio:
-            open workspace mpp.dsw
-            select project config.dsp
-            compile it and execute it (config.exe)
-            select project mpp.dsp
-            compile release version.
-
-    Intel C/C++
-        NasmW.exe should be installed in "C:\Program Files\Nasm\NasmW.exe"
-        Command line:
-            Compile Project "config.mak"
-            run config.exe
-            Compile Project "mppdec.mak"
-
-        Microsoft Developer Studio:
-            open workspace mpp.dsw
-            select project config.dsp
-            compile it and execute it (config.exe)
-            select project mpp.dsp
-            compile release version.
-
-    Cygnus C/C++
-        NasmW.exe should be installed in the %PATH% as nasm.exe
-        See Linux GNU gcc
-
-Linux:
-    GNU gcc:
-
-        make
-        make install
-
-
-Sun (Solaris 2.7):
-    make -f Makefile.sun
-    make -f Makefile.sun install
-
-    Notes:
-
-    librt.a is needed for option USE_REALTIME on Solaris. If your system
-    is lacking librt.a you are unable to build a static executable with
-    realtime-support. Although you can still perfectly use the dynamic
-    executable.
-
-    Volume, Balance and Audio-Port (Line-Out, Speaker or Headphone) can be
-    adjusted with Sun's gaintool.
-
-
-Other Unices:
-    make -f Makefile.nol
-    make -f Makefile.nol install
-
-
-Note:
-    You can safely ignore all warnings during compiling config.c
-
-
------------------------------------------------------------------------------
-
-Report any problem to:
-        <pfk@schnecke.offl.uni-jena.de>
-
-Report any problem on Sun workstations to:
-        <patrick.piecha@micronas.com>
Index: /mppenc/branches/zorg/keyboard.c
===================================================================
--- /mppenc/branches/zorg/keyboard.c	(revision 40)
+++ /mppenc/branches/zorg/keyboard.c	(revision 41)
@@ -26,5 +26,5 @@
 WaitKey ( void )
 {
-    return getch ();
+    return _getch ();
 }
 
@@ -34,9 +34,9 @@
     int  ch;
 
-    if ( !kbhit () )
+    if ( !_kbhit () )
         return -1;
 
-    ch = getch ();
-    ungetch (ch);
+    ch = _getch ();
+    _ungetch (ch);
     return ch;
 }
@@ -45,8 +45,8 @@
 CheckKey ( void )
 {
-    if ( !kbhit () )
+    if ( !_kbhit () )
         return -1;
 
-    return getch ();
+    return _getch ();
 }
 
Index: penc/branches/zorg/list.c
===================================================================
--- /mppenc/branches/zorg/list.c	(revision 40)
+++ 	(revision )
@@ -1,352 +1,0 @@
-/* list, wp, wav_korr, replaygain */
-/* RKAU + APE */
-
-#include <stdio.h>
-#include "mppdec.h"
-
-int  html = 0;
-
-
-const char*
-color ( int bitrate )
-{
-    if ( bitrate <   8000 )
-        return "<font color=\"#1111FF\">";
-    if ( bitrate <  72000 )
-        return "<font color=\"#33CCFF\">";
-    if ( bitrate <= 320000 )
-        return "";
-    if ( bitrate < 1400000 )
-        return "<font color=\"#FFD468\">";
-    return "<font color=\"#FF1100\">";
-}
-
-
-const char*
-colorend ( int bitrate )
-{
-    if ( bitrate <  72000  ||  bitrate > 320000 )
-        return "</font>";
-    return "";
-}
-
-
-void
-report ( const char*  name,
-         Int64_t      orglen,
-         Int64_t      packlen,
-         long double  duration,
-         int          bits,
-         int          chan,
-         double       freq )
-{
-    static Int64_t      orgtotlen   = 0;
-    static Int64_t      packtotlen  = 0;
-    static long double  totduration = 0.;
-    static unsigned int filecnt = 0;
-    Int64_t             ms;
-    double              tmp;
-    const char*         html2;
-    char                files [128];
-
-    if ( name == NULL ) {
-        name = files;
-        sprintf ( files, "--- %u files ---", filecnt), orglen = orgtotlen, packlen = packtotlen, duration = totduration;
-    }
-    else {
-        orgtotlen += orglen, packtotlen += packlen, totduration += duration;
-    }
-
-    ms = floor ( 1000 * duration + 0.5 );
-
-    if ( html ) printf ("  <tr> <td align=\"right\">" );
-
-    // Report of original length and compressed length in MByte (works up to 10^15 Byte)
-    html2 = html ? "</td> <td align=\"right\">" : " ";
-
-    if ( orglen < 99999999500  &&  packlen < 99999999500 )
-        printf ("%5u.%03u%s%5u.%03u", (int)(orglen/1000000), (int)(orglen/1000%1000), html2, (int)(packlen/1000000), (int)(packlen/1000%1000) );
-    else if ( orglen < 999999995000  &&  packlen < 999999995000 )
-        printf ("%6u.%02u%s%6u.%02u", (int)(orglen/1000000), (int)(orglen/10000%100), html2, (int)(packlen/1000000), (int)(packlen/10000%100) );
-    else if ( orglen < 9999999950000  &&  packlen < 9999999950000 )
-        printf ("%7u.%01u%s%7u.%01u", (int)(orglen/1000000), (int)(orglen/100000%10), html2, (int)(packlen/1000000), (int)(packlen/100000%10) );
-    else
-        printf ("%9u%s%9u", (int)(orglen/1000000), html2, (int)(packlen/1000000) );
-
-    if ( html ) printf ("</td> <td align=\"right\">" );
-
-    // Compression ratio (if ratio < 10)
-    if ( packlen > 0 ) {
-        tmp = (double) orglen / packlen;
-        if ( fabs (tmp - 1.) < 0.0005 )
-            printf ("  1.0  ");
-        else
-            printf ( tmp < 9.9995  ?  "%7.3f"  :  "       ", tmp );
-    }
-    else {
-        printf ("       ");
-    }
-
-
-    if ( html ) printf ("</td> <td align=\"right\">%s", color (packlen * 8 / duration) );
-
-    // Bitrate (kbps) (works up to 100 Mbps)
-    if ( duration > 0 ) {
-        tmp = packlen * 0.008 / duration;
-        printf ( tmp < 99.95  ?  tmp < 9.995  ?  "  %4.2f"  :  "  %4.1f"  :  " %5.0f", tmp );
-    }
-    else {
-        printf ("      ");
-    }
-
-    if ( html ) printf ("%s</font></td> <td align=\"right\">", colorend (packlen * 8 / duration) );
-
-    // Duration (works up to
-    if      ( ms <  600000000 )
-        printf (" %4u:%02u.%03u  ", (int)(ms/60000), (int)(ms/1000%60), (int)(ms%1000) );
-    else if ( ms < 6000000000 )
-        printf (" %5u:%02u.%02u  ", (int)(ms/60000), (int)(ms/1000%60), (int)(ms%1000/10) );
-    else if ( ms < 60000000000 )
-        printf (" %6u:%02u.%01u  ", (int)(ms/60000), (int)(ms/1000%60), (int)(ms%1000/100) );
-    else
-        printf (" %8u:%02u  ", (int)(ms/60000), (int)(ms/1000%60) );
-
-    if ( html ) printf ("</td> <td align=\"right\"><tt>" );
-
-    // technical parameters
-    if ( chan > 1  &&  bits > 0  )
-        printf ("(%ux%2u", chan, bits );
-    else if ( chan == 1  &&  bits > 0  )
-        printf ("(  %2u", bits );
-    else
-        printf ("     ");
-
-    // scanning frequency
-    if ( freq <= 0 )
-        printf ("%c           ", chan>0  && bits > 0  ?  ')'  :  ' ' );
-    else if ( freq / 1000 == (int)(freq/1000) )
-        printf ("%5.0f kHz)  ", freq/1000. );
-    else if ( freq / 100 == (int)(freq/100) )
-        printf ("%5.1f kHz)  ", freq/1000. );
-    else
-        printf ("%6.0f Hz)  ", freq );
-
-    if ( html ) printf ("</tt></td> <td align=\"left\">" );
-
-    // Name
-    printf ("%s", name );
-
-    if ( html ) printf ("</td> </tr>" );
-
-    printf ("\n" );
-    fflush (stdout);
-    filecnt ++;
-}
-
-
-#define EXT(x)  (0 == strcasecmp (ext+1, #x))
-
-
-static int
-analyse ( const char* name )
-{
-    const char*    ext = strrchr ( name, '.');
-    FILE*          fp;
-    unsigned char  buff [44];
-    unsigned long  freq;
-    unsigned long  len;             // length of the file on the disk
-    unsigned long  pcmlen;
-    unsigned int   channels;
-    unsigned int   bits;
-
-    pcmlen = -1;
-
-    if ( ext == NULL ) {
-        goto noext;
-
-    }
-    else if ( EXT(wav) ) { wave:
-        fp = fopen ( name, "rb" );
-    }
-    else if ( EXT(raw)  ||  EXT(cdr)  ||  EXT(pcm) ) {
-        fp = fopen ( name, "rb" );
-        channels = 2;
-        bits     = 16;
-        freq     = 44100;
-        goto skip;
-    }
-    else if ( EXT(pac)  ||  EXT(lpac)  ||  EXT(lpa) ) { lpac:
-        fp = pipeopen ( "lpac -x -o #", name );
-    }
-    else if ( EXT(fla)  ||  EXT(flac) ) { flac:
-        fp = pipeopen ( "flac -d -s -c - < #", name );
-    }
-    else if ( EXT(rka)  ||  EXT(rkau) ) { rkau:
-        fp = pipeopen ( "rkau # -", name );
-    }
-    else if ( EXT(sz) ) {
-        fp = pipeopen ( "szip -d < #", name );
-    }
-    else if ( EXT(sz2) ) { szip2:
-        fp = pipeopen ( "szip2 -d < #", name );
-        if ( fp == NULL )
-            fp = pipeopen ( "szip -d < #", name );
-    }
-    else if ( EXT(ofr) ) { optimfrog:
-        fp = pipeopen ( "optimfrog d # -", name );
-    }
-    else if ( EXT(ape)  ||  EXT(mac) ) { ape:
-        fp = pipeopen ( "mac # - -d", name );
-    }
-    else if ( EXT(la) ) {
-        fp = pipeopen ( "la -console #", name );
-    }
-    else if ( EXT(shn)  ||  EXT(shorten) ) { shorten:
-        fp = pipeopen ( "shorten -x # -", name );           // test if it's okay !!!!
-        if ( fp == NULL )
-            fp = pipeopen ( "shortn32 -x # -", name );
-    }
-    else if ( EXT(mp3)  ||  EXT(mp1)  ||  EXT(mp2)  ||  EXT(mpt)  ||  EXT(mp3pro) ) {
-        fp = pipeopen ( "madplay --output=wave:/dev/fd/1 # 2> /dev/null", name );
-    }
-    else if ( EXT(mpc)  ||  EXT(mp+)  ||  EXT(mpp) ) {
-        fp = pipeopen ( "mppdec --silent --scale 0 # -", name );
-    }
-    else if ( EXT(ogg) ) {
-        fp = pipeopen ( "ogg123 -q -d wav -f /dev/fd/1 #", name );
-        pcmlen = -2;
-    }
-    else if ( EXT(mod) ) {
-        fp = pipeopen ( "xmp -b16 -c -f44100 --stereo -o- #", name );
-        channels = 2;
-        bits     = 16;
-        freq     = 44100;
-        goto skip;
-    }
-    else if ( EXT(ac3) ) {
-        fp = pipeopen ( "ac3dec #", name );
-    }
-    else if ( EXT(aac) ) {
-        fp = pipeopen ( "faad -w # 2> /dev/null", name );
-        pcmlen = -2;
-    }
-    else {
-        char buff [512];
-noext:
-        fp = fopen ( name, "rb" );
-        if ( fp == NULL )
-            return 0;
-        memset ( buff, 0, sizeof buff );
-        fread ( buff, 1, sizeof buff, fp );
-        fclose (fp);
-        if ( 0 == memcmp (buff, "MAC ", 4)  &&  0 == memcmp (buff+40, "RIFF", 4) ) goto ape;
-        if ( 0 == memcmp (buff, "fLaC", 4)                                       ) goto flac;
-        if ( 0 == memcmp (buff, "*"   , 1)  &&  0 == memcmp (buff+ 1, "RIFF", 4) ) goto optimfrog;
-        if ( 0 == memcmp (buff, "LPAC", 4)  &&  0 == memcmp (buff+14, "RIFF", 4) ) goto lpac;
-        if ( 0 == memcmp (buff, "RKA7", 4)                                       ) goto rkau;
-        if ( 0 == memcmp (buff, "ajkg", 4)                                       ) goto shorten;
-        if ( 0 == memcmp (buff, "SZ\012\004", 4)                                 ) goto szip2;
-        if ( 0 == memcmp (buff, "RIFF", 4)  &&  0 == memcmp (buff+44, "wvpk", 4) ) goto wavepack;
-        if ( 0 == memcmp (buff, "RIFF", 4)                                       ) goto wave;
-
-        wavepack:
-        fp = NULL;
-    }
-
-    if ( fp == NULL )
-        return 0;
-
-    if ( sizeof(buff) != fread ( buff, 1, sizeof(buff), fp ) ) {
-        PCLOSE (fp);
-        return 0;
-    }
-    if ( pcmlen != -2 )
-        pcmlen   = buff[40]+(buff[41]<<8)+(buff[42]<<16)+(buff[43]<<24);
-
-    freq     = buff[24]+(buff[25]<<8)+(buff[26]<<16)+(buff[27]<<24);
-    bits     = buff[34] + (buff[35]<<8);
-    channels = buff[22] + (buff[23]<<8);
-
-skip:
-    if ( (unsigned long)pcmlen >= 0x7FFFFFFF  ||  pcmlen == 0 ) {
-        int   tmp;
-        char  buff [4096];
-
-        pcmlen = 0;
-        while ( (tmp = fread (buff, 1, sizeof(buff), fp)) > 0 )
-            pcmlen += tmp;
-    }
-    PCLOSE (fp);
-
-    if (memcmp (buff, "RIFF", 4) != 0 )
-        return 0;
-
-    fp = fopen ( name, "rb" );
-    if ( fp == NULL )
-        return 0;
-    fseek ( fp, 0l, SEEK_END );
-    len = ftell (fp);
-    fclose (fp);
-
-    if ( freq > 0  &&  bits > 0  &&  channels > 0 ) {
-        report ( name, pcmlen+44, len, pcmlen/channels/((bits+7)/8)/(double)freq, bits, channels, freq );
-        return 1;
-    }
-    return 0;
-}
-
-
-int
-main ( int argc, char** argv )
-{
-    static const char*  extentions [] = {
-        ".mpc", ".mpp", ".mp+", ".mp1", ".mp2", ".mp3", ".mpg", ".mpeg", ".lqt", ".aac",
-        ".wav", ".raw", ".cdr", ".lpac", ".lpa", ".pac", ".fla", ".flac",
-        ".rka", ".rkau", ".sz", ".sz2", ".ofr", ".mac", ".ape", ".shn", ".ogg",
-        ".mid", ".ac3", ".vqf", ".dts", ".sdds", ".mpv", ".mp3pro", ".wv", ".mod",
-        ".la",
-        NULL
-    };
-
-    if ( argv[1] != NULL  &&  0 == strcmp (argv[1], "--html") )
-        html++, argv++, argc--;
-
-    if ( !html ) {
-        printf ( " PCM size File size  Ratio  kbps    Duration  Param Frequency  Name\n");
-    }
-    else {
-        printf ( "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\n"
-                 "<html>\n"
-                 "<head>\n"
-                 "    <title>File List</title>\n"
-                 "</head>\n\n"
-                 "<body text=\"#FFFFFF\" bgcolor=\"#254E31\" link=\"#33CCFF\" vlink=\"#33CCFF\" alink=\"#FF0000\" background=\"img/back-2.gif\">\n\n" );
-
-        printf ( "<table border=\"1\" bgcolor=\"20442B\">\n" );
-        printf ( "  <tr> <td>PCM size</td><td>File size</td><td>Ratio</td><td>kbps</td><td>Duration</td><td>Param&nbsp;Frequency</td><td>Name</td> </tr>\n");
-        printf ( "  <tr></tr>\n" );
-    }
-    fflush (stdout);
-
-#if   defined _OS2
-    _wildcard ( &argc, &argv );
-#elif defined USE_ARGV
-    mysetargv ( &argc, &argv, extentions );
-#endif
-
-    while ( *++argv )
-        analyse (*argv);
-
-    if ( html )
-        printf ( "  <tr></tr>\n" );
-
-    report ( NULL, 0, 0, 0., 0, 0, 0 );
-
-    if (html) {
-        printf ( "</table>\n\n</body>\n</html>\n" );
-    }
-
-    return 0;
-}
-
-/* end of list.c */
Index: penc/branches/zorg/list.dsp
===================================================================
--- /mppenc/branches/zorg/list.dsp	(revision 40)
+++ 	(revision )
@@ -1,114 +1,0 @@
-# Microsoft Developer Studio Project File - Name="list" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=list - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "list.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "list.mak" CFG="list - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "list - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "list - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "list - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "list___Win32_Release"
-# PROP BASE Intermediate_Dir "list___Win32_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "MPP_ENCODER" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "list - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "list___Win32_Debug"
-# PROP BASE Intermediate_Dir "list___Win32_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "MPP_ENCODER" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  setargv.obj /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "list - Win32 Release"
-# Name "list - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\_setargv.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\list.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\pipeopen.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\stderr.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
Index: penc/branches/zorg/list.vcproj
===================================================================
--- /mppenc/branches/zorg/list.vcproj	(revision 40)
+++ 	(revision )
@@ -1,222 +1,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="list"
-	SccProjectName=""
-	SccLocalPath="">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\Debug"
-			IntermediateDirectory=".\Debug"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;MPP_ENCODER"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Debug/list.pch"
-				AssemblerListingLocation=".\Debug/"
-				ObjectFile=".\Debug/"
-				ProgramDataBaseFileName=".\Debug/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="odbc32.lib odbccp32.lib setargv.obj"
-				OutputFile=".\Debug/list.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile=".\Debug/list.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Debug/list.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\Release"
-			IntermediateDirectory=".\Release"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;MPP_ENCODER"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Release/list.pch"
-				AssemblerListingLocation=".\Release/"
-				ObjectFile=".\Release/"
-				ProgramDataBaseFileName=".\Release/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="odbc32.lib odbccp32.lib setargv.obj"
-				OutputFile=".\Release/list.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				ProgramDatabaseFile=".\Release/list.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Release/list.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
-			<File
-				RelativePath="_setargv.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="list.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="pipeopen.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="stderr.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: penc/branches/zorg/list_korr.c
===================================================================
--- /mppenc/branches/zorg/list_korr.c	(revision 40)
+++ 	(revision )
@@ -1,234 +1,0 @@
-/*
-   nasm -f elf wav_korr_asm.asm; gcc -O2 -s -o wav_korr wav_korr.c wav_korr_asm.o -lm
-     or:
-   gcc -DNONASM -O2 -s -o wav_korr wav_korr.c -lm
-*/
-
-#include <stdio.h>
-#include <unistd.h>
-#include <math.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <memory.h>
-
-typedef signed short stereo [2];
-typedef signed short mono;
-typedef struct {
-    unsigned long long  n;
-    long double         x;
-    long double         x2;
-    long double         y;
-    long double         y2;
-    long double         xy;
-} korr_t;
-
-#ifdef NONASM
-
-void analyze_stereo ( const stereo* p, size_t len, korr_t* k )
-{
-    long double  _x = 0, _x2 = 0, _y = 0, _y2 = 0, _xy = 0;
-    double       t1;
-    double       t2;
-
-    k -> n  += len;
-
-    for ( ; len--; p++ ) {
-        _x  += (t1 = (*p)[0]); _x2 += t1 * t1;
-        _y  += (t2 = (*p)[1]); _y2 += t2 * t2;
-                               _xy += t1 * t2;
-    }
-
-    k -> x  += _x ;
-    k -> x2 += _x2;
-    k -> y  += _y ;
-    k -> y2 += _y2;
-    k -> xy += _xy;
-}
-
-void analyze_dstereo ( const stereo* p, size_t len, korr_t* k )
-{
-    static double l0 = 0;
-    static double l1 = 0;
-    long double   _x = 0, _x2 = 0, _y = 0, _y2 = 0, _xy = 0;
-    double        t1;
-    double        t2;
-
-    k -> n  += len;
-
-    for ( ; len--; p++ ) {
-        _x  += (t1 = (*p)[0] - l0);  _x2 += t1 * t1;
-        _y  += (t2 = (*p)[1] - l1);  _y2 += t2 * t2;
-                                     _xy += t1 * t2;
-        l0   = (*p)[0];
-        l1   = (*p)[1];
-    }
-
-    k -> x  += _x ;
-    k -> x2 += _x2;
-    k -> y  += _y ;
-    k -> y2 += _y2;
-    k -> xy += _xy;
-}
-
-
-void analyze_mono   ( const mono* p, size_t len, korr_t* k )
-{
-    long double   _x = 0, _x2 = 0;
-    double        t1;
-
-    k -> n  += len;
-
-    for ( ; len--; p++ ) {
-        _x  += (t1 = (*p)); _x2 += t1 * t1;
-    }
-
-    k -> x  += _x ;
-    k -> x2 += _x2;
-    k -> y  += _x ;
-    k -> y2 += _x2;
-    k -> xy += _x2;
-}
-
-void analyze_dmono   ( const mono* p, size_t len, korr_t* k )
-{
-    static double l0 = 0;
-    long double   _x = 0, _x2 = 0;
-    double        t1;
-
-    k -> n  += len;
-
-    for ( ; len--; p++ ) {
-        _x  += (t1 = (*p) - l0); _x2 += t1 * t1;
-        l0   = *p;
-    }
-
-    k -> x  += _x ;
-    k -> x2 += _x2;
-    k -> y  += _x ;
-    k -> y2 += _x2;
-    k -> xy += _x2;
-}
-
-#else
-
-extern void __analyze_stereo ( const stereo* p, size_t len, korr_t* dst );
-extern void __analyze_mono   ( const mono*   p, size_t len, korr_t* dst );
-
-#define analyze_stereo(ptr,len,k)       __analyze_stereo ( ptr, len, k )
-#define analyze_mono(ptr,len,k)         __analyze_mono   ( ptr, len, k )
-
-#endif
-
-
-void report_init ( void )
-{
-    printf ( " x[AC]     y[AC]     r         type        x[DC]     y[DC]   sy/sx  File\n");
-}
-
-int sgn ( long double x )
-{
-    if ( x > 0 ) return +1;
-    if ( x < 0 ) return -1;
-    return 0;
-}
-
-
-void report ( int channels, korr_t* k, int supress_DC_report )
-{
-    long double  scale = sqrt ( 1.e5 / (1<<29) ); // Sine Full Scale is +10 dB, 7327 = 100%
-    long double  r;
-    long double  sx;
-    long double  sy;
-    long double  x;
-    long double  y;
-    long double  b;
-
-    // printf ("n=%Lu (7036596)\nx=%Lf (-1136345)\ny=%Lf (-783749)\nxy=%Lf (103252784558988)\nx²=%Lf (182857029624921)\ny²=%Lf (201045032621475)\n\n",k.n,k.x,k.y,k.xy,k.x2,k.y2);
-
-    r  = (k->x2*k->n - k->x*k->x) * (k->y2*k->n - k->y*k->y);
-    r  = r  > 0.l  ?  (k->xy*k->n - k->x*k->y) / sqrt (r)  :  1.l;
-    sx = k->n > 1  ?  sqrt ( (k->x2 - k->x*k->x/k->n) / (k->n - 1) )  :  0.l;
-    sy = k->n > 1  ?  sqrt ( (k->y2 - k->y*k->y/k->n) / (k->n - 1) )  :  0.l;
-    x  = k->n > 0  ?  k->x/k->n  :  0.l;
-    y  = k->n > 0  ?  k->y/k->n  :  0.l;
-
-    b  = sx != 0   ?  sy/sx * sgn(r)  :  0.l;
-
-    printf ( "%7.3Lf%%%9.3Lf%%%9.3Lf%%   ",
-             sx * scale, sy * scale, 100. * r );
-    if ( supress_DC_report )
-        printf ( "                  " );
-    else
-        printf ( "%7.3Lf%%%9.3Lf%%%", x * scale, y * scale );
-    printf ( "  %6.3Lf\n", b );
-    fflush ( stdout );
-}
-
-
-void readfile ( const char* name, int fd )
-{
-    unsigned short  header [22];
-    stereo          s [1152];
-    mono            m [1152];
-    size_t          samples;
-    korr_t          k0;
-    korr_t          k1;
-    korr_t          kd;
-
-
-    memset ( &k0, 0, sizeof(k0) );
-    memset ( &k1, 0, sizeof(k1) );
-
-    read ( fd, header, sizeof(header) );
-
-    switch ( header[11] ) {
-    case 1:
-        printf ("\n%s\n", name);
-        while  ( ( samples = read (fd, m, sizeof(m)) ) > 0 ) {
-            analyze_mono    ( m, samples / sizeof (*m), &k0 );
-            analyze_dmono   ( m, samples / sizeof (*m), &k1 );
-        }
-        report ( header[11], &k0, 0 );
-        report ( header[11], &k1, 1 );
-        break;
-
-    case 2:
-        printf ("\n%s\n", name);
-        while  ( ( samples = read (fd, s, sizeof(s)) ) > 0 ) {
-            analyze_stereo  ( s, samples / sizeof (*s), &k0 );
-            analyze_dstereo ( s, samples / sizeof (*s), &k1 );
-            memset ( &kd, 0, sizeof(kd) );
-            analyze_dstereo ( s, samples / sizeof (*s), &kd );
-        }
-        report ( header[11], &k0, 0 );
-        report ( header[11], &k1, 1 );
-        break;
-
-    default:
-        fprintf ( stderr, "%u Channels not supported: %s\n", header[11], name );
-        break;
-    }
-}
-
-int main ( int argc, char** argv )
-{
-    char*  name;
-    int    fd;
-
-    report_init ();
-
-    if (argc < 2)
-        readfile ( "<stdin>", 0 );
-    else
-        while ( (name = *++argv) != NULL ) {
-            if ( (fd = open ( name, O_RDONLY )) >= 0 ) {
-                readfile ( name, fd );
-                close ( fd );
-            } else {
-                fprintf ( stderr, "Can't open: %s\n", name );
-            }
-        }
-
-    return 0;
-}
Index: penc/branches/zorg/lpc.c-new
===================================================================
--- /mppenc/branches/zorg/lpc.c-new	(revision 40)
+++ 	(revision )
@@ -1,114 +1,0 @@
-/******************************************************************************
-*                                                                             *
-*       Copyright (C) 1992-1995 Tony Robinson                                 *
-*                                                                             *
-*       See the file LICENSE for conditions on distribution and usage         *
-*                                                                             *
-******************************************************************************/
-
-/*
- * $Id: lpc.c-new,v 1.1 2004/03/17 22:17:54 robux4 Exp $
- */
-
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "../include/shorten.h"
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#define log2(x)                         ( log (x) * (1./M_LN2) )
-#define E_BITS_PER_COEF         ( 2 + LPCQUANT )                // watch out, these are all 0 .. order inclusive arrays
-
-
-int                                                             // best prediction order model
-wav2lpc ( slong*  buf,                  // Samples
-                  int     nbuf,                 // Number of samples
-                  slong   offset,               //
-                  int*    qlpc,                 // quantized prediction coefficients
-                  int     nlpc,                 // max. prediction order
-                  int     version,              // some strange version information
-          float*  psigbit,              // expected number of bits per original signal sample
-          float*  presbit )             // expected number of bits per residual signal sample
-{
-        static double*  fbuf  = NULL;
-        static int      nflpc = 0;
-        static int      nfbuf = 0;
-        int             i;
-        int             j;
-        int             bestnbit;
-        int             bestnlpc;
-        double          e;
-        double          bestesize;
-        double          ci;
-        double          esize;
-        double          acf [MAX_LPC_ORDER + 1];
-        double          ref [MAX_LPC_ORDER + 1];
-        double          lpc [MAX_LPC_ORDER + 1];
-        double          tmp [MAX_LPC_ORDER + 1];
-        double          escale = 0.5 * M_LN2 * M_LN2 / nbuf;
-        double          sum;
-
-        if ( nlpc >= nbuf )                                                             // if necessary, limit the LPC order to the number of samples available
-                nlpc = nbuf - 1;
-
-        if ( nlpc > nflpc  ||  nbuf > nfbuf ) {                 // grab some space for a 'zero mean' buffer of floats if needed
-                if ( fbuf != NULL )
-                        free ( fbuf - nflpc );
-                fbuf  = nlpc + ((double*) pmalloc ( (nlpc+nbuf) * sizeof (*fbuf) ));
-                nfbuf = nbuf;
-                nflpc = nlpc;
-        }
-
-        e = 0.;
-        for ( j = 0; j < nbuf; j++ ) {                                  // zero mean signal and compute energy
-                sum = fbuf [j] -= offset;
-                e  += sum * sum;
-        }
-
-        esize     = e > 0.  ?  0.5 * log2 (escale * e)  :  0.;
-        *psigbit  = esize;                                                              // return the expected number of bits per original signal sample
-
-        acf [0]   = e;                                                                  // store the best values so far (the zeroth order predictor)
-        bestnlpc  = 0;
-        bestnbit  = (int) floor (nbuf * esize);
-        bestesize = esize;
-
-        // check all linear predictors up to and including length nlpc if version is 2 or greater, just check two more than bestnlpc
-        // AJR:  8 May 1996: the code used to read "version < 12", it should read "bestnlpc + 2" but
-        //       changed to "bestnlpc + 3" to be more conservative (and more in line with old behaviour
-
-        for ( i = 1; i <= nlpc  &&  e > 0.  &&  (version < 2  ||  i <= bestnlpc + 3); i++ ) {
-
-                sum = 0.;
-                for ( j = i; j < nbuf; j++ )                                                                                    // compute the jth autocorrelation coefficient
-                        sum += fbuf [j] * fbuf [j-i];
-                acf [i] = sum;
-
-                ci = 0.;                                                                                                                                // compute the reflection and LP coeffients for order j predictor
-                for ( j = 1; j < i; j++ )
-                        ci += lpc [j] * acf [i-j];
-                lpc [i] = ref [i] = ci = (acf [i] - ci) / e;
-                for ( j = 1; j < i; j++ )
-                        tmp [j] = lpc [j] - ci * lpc [i-j];
-                for ( j = 1; j < i; j++ )
-                        lpc [j] = tmp [j];
-
-                e    *= 1 - ci*ci;                                                                                                              // compute the new energy in the prediction residual
-                esize = e > 0.  ?  0.5 * log2 (escale * e)  :  0.;
-
-                if ( nbuf * esize + i * E_BITS_PER_COEF < bestnbit ) {                                  // store this model if it is the best so far
-                        bestnlpc  = i;                                                                                                          // store best model order
-                        bestnbit  = (int) floor ( nbuf * esize + i * E_BITS_PER_COEF );
-                        bestesize = esize;
-
-                        for ( j = 0; j < bestnlpc; j++ )                                                                        // store the quantised LP coefficients
-                                qlpc [j] = (int) floor ( lpc [j+1] * (1 << LPCQUANT) + 0.5 );
-                }
-        }
-
-        *presbit = bestesize;                                           // return the expected number of bits per residual signal sample
-        return bestnlpc;                                                        // return the best model order
-}
Index: penc/branches/zorg/mmm.bat
===================================================================
--- /mppenc/branches/zorg/mmm.bat	(revision 40)
+++ 	(revision )
@@ -1,7 +1,0 @@
-@echo off
-echo.
-echo.
-Release\mppdec 1.mpc nul
-echo.
-Release\mppdec 1.mpc 2.wav
-.\wavcmp 2.wav 9.wav
Index: penc/branches/zorg/mpc-darwin.diff
===================================================================
--- /mppenc/branches/zorg/mpc-darwin.diff	(revision 40)
+++ 	(revision )
@@ -1,43 +1,0 @@
- 
- //// Macros typical for special conformances
-@@ -67,7 +69,7 @@
- # include <time.h>
- # include <sys/types.h>
- # include <sys/stat.h>
--#elif defined __unix__  ||  defined __linux__
-+#elif defined __unix__  ||  defined __linux__ || defined __APPLE__
- # include <fcntl.h>
- # include <unistd.h>
- # include <sys/time.h>
-@@ -100,6 +102,16 @@
- #if defined __TURBOC__
- # undef USE_OSS_AUDIO
- # undef USE_ESD_AUDIO
-@@ -439,14 +451,14 @@
- # endif
- #endif /* !S_ISDIR */
- 
--#if defined __unix__  ||  defined __bsdi__  ||  defined __FreeBSD__  ||  defined __OpenBSD__  ||  defined __NetBSD__  ||  defined __TURBOC__  ||  defined _WIN32
-+#if defined __unix__  ||  defined __bsdi__  ||  defined __FreeBSD__  ||  defined __OpenBSD__  ||  defined __NetBSD__  ||  defined __TURBOC__  ||  defined _WIN32 || defined __APPLE__
- # define ISATTY(fd)             isatty (fd)
- #else
- # define ISATTY(fd)             0
- #endif
- 
- // Path separator
--#if defined __unix__  ||  defined __bsdi__  ||  defined __FreeBSD__  ||  defined __OpenBSD__  ||  defined __NetBSD__
-+#if defined __unix__  ||  defined __bsdi__  ||  defined __FreeBSD__  ||  defined __OpenBSD__  ||  defined __NetBSD__ || defined __APPLE__
- # define PATH_SEP               '/'
- # define DRIVE_SEP              '\0'
- # define EXE_EXT                ""
-diff -NauX ../diffignore ../mppdec-1.1/wave_out.c ./wave_out.c
---- ../mppdec-1.1/wave_out.c	Fri Apr  4 15:23:12 2003
-+++ ./wave_out.c	Fri Apr  4 12:02:32 2003
-@@ -742,6 +742,7 @@
-     int                  aif;
- 
-     (void) dummyFile;
-+    output_endianess = machine_endianess;
- 
-     if ( esd_rate == 0 ) {
-         if ( (esd = esd_open_sound (NULL)) >= 0 ) {
Index: penc/branches/zorg/mpp.dsw
===================================================================
--- /mppenc/branches/zorg/mpp.dsw	(revision 40)
+++ 	(revision )
@@ -1,245 +1,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "Remove.tab"=.\Remove.tab.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "clipboard"=.\clipboard.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "clipstat"=.\clipstat.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "codepage"=.\codepage.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "config"=.\config.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "huffman"=.\huffman.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "list"=.\list.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "mppdec"=.\mppdec.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "mppenc"=.\mppenc.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "mppsplit"=.\mppsplit.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "name"=.\name.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "pns"=.\pns.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "pulse"=.\pulse.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "replaygain"=.\replaygain.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "seekspeed"=.\seekspeed.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "streamserver"=.\streamserver.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "tagger"=.\tagger.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "tonality"=.\tonality.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "wp"=.\wp.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
Index: penc/branches/zorg/mpp.h
===================================================================
--- /mppenc/branches/zorg/mpp.h	(revision 40)
+++ 	(revision )
@@ -1,194 +1,0 @@
-/*
- * Musepack audio compression
- * Copyright (C) 1999-2004 Buschmann/Klemm/Piecha/Wolf
- *
- * 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.1 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
- */
-
-/******************************************************
- *                                                    *
- *            Source Compile configuration            *
- *                                                    *
- ******************************************************/
-
-
-#if !defined(__APPLE__)
-// use optimized assembler routines for Pentium III/K6-2/Athlon (only 32 bit OS, Intel x86 and no MAKE_xxBITS)
-// you need the NASM assembler on your system, the program becomes a little bit larger and decoding
-// on AMD K6-2 (x3), AMD K6-III (x3), AMD Duron (x1.7), AMD Athlon (x1.7), Pentium III (x2) and Pentium 4 (x1.8) becomes faster
-#define USE_ASM
-
-// Open Sound System support (only Unix with OSS support)
-// If your Operating System supports the Open Sound System, you can output to /dev/dsp* and
-// instead of writing a file the program plays the file via this sound device.
-// on some systems you also must link the libossaudio library, so maybe you also must edit the Makefile
-#define USE_OSS_AUDIO
-
-// Enlightenment Sound Daemon support (only Unix with ESD support)
-// If your Operating System supports the Enlightenment Sound Daemon you can output to /dev/esd and
-// instead of writing a file the program plays the file via this sound device.
-// you also must link the libesd library, so maybe you also must edit the Makefile
-//#define USE_ESD_AUDIO
-
-#endif
-
-// native Sun Onboard-Audio support (only SunOS)
-// If you have a Sun Workstation with Onboard-Audio, you can output to /dev/audio and
-// instead of writing a file the program plays the file via this sound device.
-// Some machines lacking librt.a so you are unable to link a static executable with realtime-support.
-// Although you can still perfectly use the dynamic executable.
-//#define USE_SUN_AUDIO
-
-// Sound support for SGI Irix
-// If you have a SGI Workstation running IRIX, you can output to /dev/audio and
-// instead of writing a file the program plays the file via this sound device.
-//#define USE_IRIX_AUDIO
-
-// Audio support for Windows (WAVE OUT) (only Windows)
-// If you have a Windows based system and if you also want to play files directly instead of only writing audio files,
-// then define the next item
-#define USE_WIN_AUDIO
-
-// Buffersize for Windows Audio in 4.5 KByte units
-// Only needed for Windows+USE_WIN_AUDIO
-// Good values are 8...32 for fast machines and 128...512 for slow machines
-// large values decrease average performance a little bit, increase memory
-// consumption (1 Block = 4.5 KByte), but increase buffering, so it takes a
-// longer time to get a dropout. Note that I don't have a 486/80...133, so
-// I don't know anything about their performance.
-// (Attention: 512 = additional 2.3 MByte of memory)
-#define MAX_WAVEBLOCKS    40
-
-// increase priority if destination is an audio device
-// this increases the priority of the decoder when playing the file directly to a sound card to reduce/prevent
-// dropouts during the playback due to CPU time shortage
-#define USE_NICE
-
-// use realtime scheduling if destination is an audio device
-// This sets the program to real time priority when playing the file directly to a sound card.
-// Now it should be really difficult to get dropouts (file IO and other realtime programs are the remaining weak points)
-#define USE_REALTIME
-
-// use ANSI-Escape sequences to structure output
-#define USE_ANSI_ESCAPE
-
-// Use termios for reading values from keyboard without echo and ENTER
-#define USE_TERMIOS
-
-// if none of the next three macros MAKE_xxBIT is defined,
-// normal non-dithered and non-shaped 16 bit PCM output is generated
-
-// create 16 bit Output
-// output is 16 bit wide, you can also dither and noise shape
-//#define MAKE_16BIT
-
-// create 24 bit Output
-// output is 24 bit wide instead of 16 bit wide, you can also dither and noise shape
-//#define MAKE_24BIT
-
-// create 32 bit Output
-// output is 32 bit wide instead of 16 bit wide, you can also dither and noise shape
-//#define MAKE_32BIT
-
-// Select subset of function used for file I/O:
-//   1: ANSI via file pointer (FILE*)
-//   2: POSIX via file handle (int or HANDLE)
-//   3: POSIX like lowest level function of Turbo/Borland C
-//   4: WinAMP 3: running inside WinAMP
-// Try to use '2', if this doesn't work, try '1'. '3' is for Borland compilers.
-#ifndef FILEIO
-# if   defined MPP_ENCODER
-#  define FILEIO      1             // mppenc still uses buffered ANSI-I/O
-# elif defined MPP_DECODER
-#  define FILEIO      2
-# else
-#   error Neigher MPP_DECODER nor MPP_ENCODER is defined. Abort.
-# endif
-#endif
-
-// the POSIX function read() can return less bytes than requested not only at the end of the file.
-// if this happens, the following macro must be defined:
-#define HAVE_INCOMPLETE_READ
-
-// use a shorter Huffman_t  representation, may be faster
-// use for performance tuning
-#define USE_HUFF_PACK
-
-// use shorter representation for SCF_Index[][] and Res[], may be faster
-// use for performance tuning
-#define USE_ARRAY_PACK
-
-// use the System 5 timer for profiling
-// otherwise a special piece of code for Turbo-C is used or the Timestamp Counter on Intel IA32/gcc systems.
-// Both is highly non-portable. This solution is more portable (you only need a SYS 5 compatible system,
-// but also much much more inaccurate.
-//#define USE_SYSV_TIMER
-
-// do a memory shift every n subband samples, otherwise only increment pointer (6, 12, 18 and 36 are good values)
-// use for performance tuning
-#define VIRT_SHIFT    18
-
-// selects InputBuff size, size is 4 * 2^IBUFLOG2 bytes (11...14 are good values)
-// use for performance tuning
-// can also be used to eliminate disk performance issue while tuning the program
-// (set to a value, so the test cases are fully read before decoding
-#define IBUFLOG2      14
-
-// Dump contents of MPEGplus files (only for development), 0x00 no dump
-// Bit 0: maxband, Bit 1: msbits, Bit 2: allocation/resolution, Bit 3: SCF
-// Bit 4: Subsamples, Bit 5: Datenrate, Bit 6: Bitusage der Sektionen
-//#define DUMPSELECT    0xFF
-
-// 16 bit and 32 bit accesses must be aligned, otherwise a bus error occures.
-// try this if you get bus errors
-//#define MUST_ALIGNED
-
-// Experimental: use http/ftp streaming
-#define USE_HTTP
-
-// _use setargv module
-#define USE_ARGV
-
-
-// Use IPv4 and IPv6
-//#define USE_IPv4_6
-// Use only IPv6
-//#define USE_IPv6
-
-// compile StreamVersion 8 decoding (always disable, no usabiltity)
-// do not edit
-//#define USE_SV8
-
-// disables assert()
-// assert() is for development only and decreases speed and increases the size of the program
-#ifndef NDEBUG
-# define NDEBUG
-#endif
-
-// Some other tracing (only for development)
-// do not edit
-//#define DEBUG
-
-// Some tracings of popen()
-// do not edit
-//#define DEBUG2
-
-// activate simple profiler
-//#define PROFILE
-
-// make debug output in tags.c stfu
-#define STFU
-
-/* end of mpp.h */
Index: penc/branches/zorg/mpp.sln
===================================================================
--- /mppenc/branches/zorg/mpp.sln	(revision 40)
+++ 	(revision )
@@ -1,185 +1,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Remove.tab", "Remove.tab.vcproj", "{82E5E7C7-5B12-468E-9B26-0E908424F48D}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Project("{059D6162-CD51-11D0-AE1F-00A0C90FFFC3}") = "ape", "ape\Source\mac.dsp", "{8BA31963-BF9D-4DDD-BAFB-56CA3CE32615}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "clipboard", "clipboard.vcproj", "{2E9C3213-F034-4779-955D-B2145631DBE3}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "clipstat", "clipstat.vcproj", "{4820B013-A83A-4114-9F42-C6487A6C0A15}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "codepage", "codepage.vcproj", "{6C38893E-26E6-453A-9670-C071160504F6}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "config", "config.vcproj", "{CAED069E-64E0-4713-BC2E-DEFFA994DB2B}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "huffman", "huffman.vcproj", "{C58B5912-27C3-4B8F-B468-827C9CE83510}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Project("{059D6162-CD51-11D0-AE1F-00A0C90FFFC3}") = "in_mpc", "winamp\in_mpc.dsp", "{2032F666-EA09-4E51-8FCD-757FC983E277}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "list", "list.vcproj", "{6B8B6B82-7165-4565-B8CA-804DEC297E57}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mppdec", "mppdec.vcproj", "{8579438D-C1B0-46E1-BC7F-EF98641E8E0D}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mppenc", "mppenc.vcproj", "{84F7FF0B-3105-4860-97CC-D3CD6B307496}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mppsplit", "mppsplit.vcproj", "{8C82164E-8365-43E0-8479-861F61D4866D}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "name", "name.vcproj", "{CE86999E-6BDA-4D61-8A51-0D117B553F39}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pns", "pns.vcproj", "{4335D2F8-0555-4A8A-89D5-519A7E97DDAF}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pulse", "pulse.vcproj", "{5A1C93B8-91E3-49B6-975A-2DAD0B18D4A3}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "replaygain", "replaygain.vcproj", "{9A212394-02F5-420B-AFE4-81239AF881A2}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "seekspeed", "seekspeed.vcproj", "{D3300F87-AEED-4F66-B23B-F6EA8AD3E17A}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Project("{059D6162-CD51-11D0-AE1F-00A0C90FFFC3}") = "shorten", "shorten-3.4\shorten.dsp", "{014C9B8E-AC38-4BCF-970C-5A2FB9F212D9}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "streamserver", "streamserver.vcproj", "{078863D1-11CA-4E25-B207-77E7949EA83F}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tagger", "tagger.vcproj", "{EDFCC693-F562-4180-BE51-B22A917A26B7}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tonality", "tonality.vcproj", "{9E232A7C-755D-4BEC-B542-9F0DDC629AE7}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wp", "wp.vcproj", "{6DEF3BDF-44AA-454F-B445-457CA52B7B80}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xmms", "xmms\xmms.vcproj", "{9C5E451F-A9C1-49FA-99B3-BE3EF6E87038}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Global
-	GlobalSection(SolutionConfiguration) = preSolution
-		Debug = Debug
-		Release = Release
-	EndGlobalSection
-	GlobalSection(ProjectConfiguration) = postSolution
-		{82E5E7C7-5B12-468E-9B26-0E908424F48D}.Debug.ActiveCfg = Debug|Win32
-		{82E5E7C7-5B12-468E-9B26-0E908424F48D}.Debug.Build.0 = Debug|Win32
-		{82E5E7C7-5B12-468E-9B26-0E908424F48D}.Release.ActiveCfg = Release|Win32
-		{82E5E7C7-5B12-468E-9B26-0E908424F48D}.Release.Build.0 = Release|Win32
-		{2E9C3213-F034-4779-955D-B2145631DBE3}.Debug.ActiveCfg = Debug|Win32
-		{2E9C3213-F034-4779-955D-B2145631DBE3}.Debug.Build.0 = Debug|Win32
-		{2E9C3213-F034-4779-955D-B2145631DBE3}.Release.ActiveCfg = Release|Win32
-		{2E9C3213-F034-4779-955D-B2145631DBE3}.Release.Build.0 = Release|Win32
-		{4820B013-A83A-4114-9F42-C6487A6C0A15}.Debug.ActiveCfg = Debug|Win32
-		{4820B013-A83A-4114-9F42-C6487A6C0A15}.Debug.Build.0 = Debug|Win32
-		{4820B013-A83A-4114-9F42-C6487A6C0A15}.Release.ActiveCfg = Release|Win32
-		{4820B013-A83A-4114-9F42-C6487A6C0A15}.Release.Build.0 = Release|Win32
-		{6C38893E-26E6-453A-9670-C071160504F6}.Debug.ActiveCfg = Debug|Win32
-		{6C38893E-26E6-453A-9670-C071160504F6}.Debug.Build.0 = Debug|Win32
-		{6C38893E-26E6-453A-9670-C071160504F6}.Release.ActiveCfg = Release|Win32
-		{6C38893E-26E6-453A-9670-C071160504F6}.Release.Build.0 = Release|Win32
-		{CAED069E-64E0-4713-BC2E-DEFFA994DB2B}.Debug.ActiveCfg = Debug|Win32
-		{CAED069E-64E0-4713-BC2E-DEFFA994DB2B}.Debug.Build.0 = Debug|Win32
-		{CAED069E-64E0-4713-BC2E-DEFFA994DB2B}.Release.ActiveCfg = Release|Win32
-		{CAED069E-64E0-4713-BC2E-DEFFA994DB2B}.Release.Build.0 = Release|Win32
-		{C58B5912-27C3-4B8F-B468-827C9CE83510}.Debug.ActiveCfg = Debug|Win32
-		{C58B5912-27C3-4B8F-B468-827C9CE83510}.Debug.Build.0 = Debug|Win32
-		{C58B5912-27C3-4B8F-B468-827C9CE83510}.Release.ActiveCfg = Release|Win32
-		{C58B5912-27C3-4B8F-B468-827C9CE83510}.Release.Build.0 = Release|Win32
-		{6B8B6B82-7165-4565-B8CA-804DEC297E57}.Debug.ActiveCfg = Debug|Win32
-		{6B8B6B82-7165-4565-B8CA-804DEC297E57}.Debug.Build.0 = Debug|Win32
-		{6B8B6B82-7165-4565-B8CA-804DEC297E57}.Release.ActiveCfg = Release|Win32
-		{6B8B6B82-7165-4565-B8CA-804DEC297E57}.Release.Build.0 = Release|Win32
-		{8579438D-C1B0-46E1-BC7F-EF98641E8E0D}.Debug.ActiveCfg = Debug|Win32
-		{8579438D-C1B0-46E1-BC7F-EF98641E8E0D}.Debug.Build.0 = Debug|Win32
-		{8579438D-C1B0-46E1-BC7F-EF98641E8E0D}.Release.ActiveCfg = Release|Win32
-		{8579438D-C1B0-46E1-BC7F-EF98641E8E0D}.Release.Build.0 = Release|Win32
-		{84F7FF0B-3105-4860-97CC-D3CD6B307496}.Debug.ActiveCfg = Debug|Win32
-		{84F7FF0B-3105-4860-97CC-D3CD6B307496}.Debug.Build.0 = Debug|Win32
-		{84F7FF0B-3105-4860-97CC-D3CD6B307496}.Release.ActiveCfg = Release|Win32
-		{84F7FF0B-3105-4860-97CC-D3CD6B307496}.Release.Build.0 = Release|Win32
-		{8C82164E-8365-43E0-8479-861F61D4866D}.Debug.ActiveCfg = Debug|Win32
-		{8C82164E-8365-43E0-8479-861F61D4866D}.Debug.Build.0 = Debug|Win32
-		{8C82164E-8365-43E0-8479-861F61D4866D}.Release.ActiveCfg = Release|Win32
-		{8C82164E-8365-43E0-8479-861F61D4866D}.Release.Build.0 = Release|Win32
-		{CE86999E-6BDA-4D61-8A51-0D117B553F39}.Debug.ActiveCfg = Debug|Win32
-		{CE86999E-6BDA-4D61-8A51-0D117B553F39}.Debug.Build.0 = Debug|Win32
-		{CE86999E-6BDA-4D61-8A51-0D117B553F39}.Release.ActiveCfg = Release|Win32
-		{CE86999E-6BDA-4D61-8A51-0D117B553F39}.Release.Build.0 = Release|Win32
-		{4335D2F8-0555-4A8A-89D5-519A7E97DDAF}.Debug.ActiveCfg = Debug|Win32
-		{4335D2F8-0555-4A8A-89D5-519A7E97DDAF}.Debug.Build.0 = Debug|Win32
-		{4335D2F8-0555-4A8A-89D5-519A7E97DDAF}.Release.ActiveCfg = Release|Win32
-		{4335D2F8-0555-4A8A-89D5-519A7E97DDAF}.Release.Build.0 = Release|Win32
-		{5A1C93B8-91E3-49B6-975A-2DAD0B18D4A3}.Debug.ActiveCfg = Debug|Win32
-		{5A1C93B8-91E3-49B6-975A-2DAD0B18D4A3}.Debug.Build.0 = Debug|Win32
-		{5A1C93B8-91E3-49B6-975A-2DAD0B18D4A3}.Release.ActiveCfg = Release|Win32
-		{5A1C93B8-91E3-49B6-975A-2DAD0B18D4A3}.Release.Build.0 = Release|Win32
-		{9A212394-02F5-420B-AFE4-81239AF881A2}.Debug.ActiveCfg = Debug|Win32
-		{9A212394-02F5-420B-AFE4-81239AF881A2}.Debug.Build.0 = Debug|Win32
-		{9A212394-02F5-420B-AFE4-81239AF881A2}.Release.ActiveCfg = Release|Win32
-		{9A212394-02F5-420B-AFE4-81239AF881A2}.Release.Build.0 = Release|Win32
-		{D3300F87-AEED-4F66-B23B-F6EA8AD3E17A}.Debug.ActiveCfg = Debug|Win32
-		{D3300F87-AEED-4F66-B23B-F6EA8AD3E17A}.Debug.Build.0 = Debug|Win32
-		{D3300F87-AEED-4F66-B23B-F6EA8AD3E17A}.Release.ActiveCfg = Release|Win32
-		{D3300F87-AEED-4F66-B23B-F6EA8AD3E17A}.Release.Build.0 = Release|Win32
-		{078863D1-11CA-4E25-B207-77E7949EA83F}.Debug.ActiveCfg = Debug|Win32
-		{078863D1-11CA-4E25-B207-77E7949EA83F}.Debug.Build.0 = Debug|Win32
-		{078863D1-11CA-4E25-B207-77E7949EA83F}.Release.ActiveCfg = Release|Win32
-		{078863D1-11CA-4E25-B207-77E7949EA83F}.Release.Build.0 = Release|Win32
-		{EDFCC693-F562-4180-BE51-B22A917A26B7}.Debug.ActiveCfg = Debug|Win32
-		{EDFCC693-F562-4180-BE51-B22A917A26B7}.Debug.Build.0 = Debug|Win32
-		{EDFCC693-F562-4180-BE51-B22A917A26B7}.Release.ActiveCfg = Release|Win32
-		{EDFCC693-F562-4180-BE51-B22A917A26B7}.Release.Build.0 = Release|Win32
-		{9E232A7C-755D-4BEC-B542-9F0DDC629AE7}.Debug.ActiveCfg = Debug|Win32
-		{9E232A7C-755D-4BEC-B542-9F0DDC629AE7}.Debug.Build.0 = Debug|Win32
-		{9E232A7C-755D-4BEC-B542-9F0DDC629AE7}.Release.ActiveCfg = Release|Win32
-		{9E232A7C-755D-4BEC-B542-9F0DDC629AE7}.Release.Build.0 = Release|Win32
-		{6DEF3BDF-44AA-454F-B445-457CA52B7B80}.Debug.ActiveCfg = Debug|Win32
-		{6DEF3BDF-44AA-454F-B445-457CA52B7B80}.Debug.Build.0 = Debug|Win32
-		{6DEF3BDF-44AA-454F-B445-457CA52B7B80}.Release.ActiveCfg = Release|Win32
-		{6DEF3BDF-44AA-454F-B445-457CA52B7B80}.Release.Build.0 = Release|Win32
-		{9C5E451F-A9C1-49FA-99B3-BE3EF6E87038}.Debug.ActiveCfg = Debug|Win32
-		{9C5E451F-A9C1-49FA-99B3-BE3EF6E87038}.Debug.Build.0 = Debug|Win32
-		{9C5E451F-A9C1-49FA-99B3-BE3EF6E87038}.Release.ActiveCfg = Release|Win32
-		{9C5E451F-A9C1-49FA-99B3-BE3EF6E87038}.Release.Build.0 = Release|Win32
-	EndGlobalSection
-	GlobalSection(ExtensibilityGlobals) = postSolution
-	EndGlobalSection
-	GlobalSection(ExtensibilityAddIns) = postSolution
-	EndGlobalSection
-EndGlobal
Index: penc/branches/zorg/mppdec.c
===================================================================
--- /mppenc/branches/zorg/mppdec.c	(revision 40)
+++ 	(revision )
@@ -1,1417 +1,0 @@
-/*
- * Musepack audio compression
- * Copyright (C) 1999-2004 Buschmann/Klemm/Piecha/Wolf
- *
- * 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.1 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
- */
-
-//
-// Still to do:
-//
-//   * documentation (need a reader to find difficult to understand comments or unclear code
-//   * removal of the huge amount of global variables
-//   * multithreading support
-//   * fast forward using skip information instead of decoding
-//   * Makefile dependencies are broken
-//   * lame --alt-preset xxx - outputfile.mp3          (mit xxx = 80, 103, 132)
-
-
-#include <time.h>
-#include <string.h>
-#include <errno.h>
-#include "mppdec.h"
-
-
-// global variables (ugly, not killed yet)
-
-Quant_t           Q             [32];       // quantized matrixed subband samples
-
-FloatArray        Y_L           [36];       // scaled dematrixed subband samples
-FloatArray        Y_R           [36];
-
-Float             V_L           [1024 + 64*(VIRT_SHIFT-1)];     // 1st stage of the subband synthesizer
-Float             V_R           [1024 + 64*(VIRT_SHIFT-1)];
-
-CPair_t           SCF_Index [3] [32];       // scale factors for transforming Q -> Y
-CPair_t           Res           [32];       // sample resolution for decoding Bitstream -> Q
-
-CPair_t           SCFI          [32];       // grouping of SCF, needed for SCF decoding
-Bool_t            MS_Band       [32];       // dematrixing information for transforming Q -> Y
-
-static Int        V_L_offset;
-static Int        V_R_offset;
-
-Bool_t            MS_used            =  0;  // 0: all is LR coded, 1: MS or LR coding per subband
-Bool_t            IS_used            =  0;  // is IS used (if yes, a fixed number of subbands is IS coded)
-static Float      Scale              =  1.; // user defined scale factor
-static Bool_t     ClipPrev           =  0;  // if set, clipping is prevented if needed information is available
-static int        ReplayGainType     =  0;  // 0: no additional gain, 1: CD based gain correction, 2: title based gain correction
-
-Bool_t            TrueGaplessPresent =  0;  // is true gapless used?
-Int               LastValidSamples   =  0;  // number of valid samples within last frame
-unsigned int      SampleFreq         =  44100;
-static const Uint16_t
-                  sftable [4] = { 44100, 48000, 37800, 32000 };
-
-#if defined MAKE_16BIT  ||  defined MAKE_24BIT  ||  defined MAKE_32BIT
-static int        Bits               = SAMPLE_SIZE;
-static int        NoiseShapeType     =  0;
-static Float      Dither             = -1;  // Dithering if not Noise shaping
-#endif
-
-static Uint       StreamVersion;
-static Uint       Blockgroesse;
-static Ulong      InputBuffRead;
-#ifdef USE_ASM
-static SyntheseFilter16_t
-                  Synthese_Filter_16;
-#endif
-const char        About        []    = "MPC Decoder  " MAX_SV "  " MPPDEC_VERSION "  " BUILD "   " COPYRIGHT;
-const char        CompileFlags []    = COMPILER_FLAGS;
-const char        Date         []    = __DATE__ " " __TIME__;
-
-Bool_t            output_endianess   = LITTLE;
-
-
-static void
-usage ( void )
-{
-    stderr_printf (
-        "\n"
-        "\x1B[1m\rusage:\n"
-        "\x1B[0m\r  "PROG_NAME" [--options] <Input_File> <Output_File>\n"
-        "  "PROG_NAME" [--options] <List_of_Input_Files> <Output_File>\n"
-        "  "PROG_NAME" [--options] <List_of_Input_Files> <Output_Directory>\n"
-        "\n"
-        "\x1B[1m\roptions:\n"
-        "\x1B[0m\r  --start x   start decoding at x sec (x>0) or at |x|%% of the file (x<0)\n"
-        "  --dur x     decode a sequence of x sec duration (dflt: 100%%)\n"
-        "  --prev      activate clipping prevention (gain=0,2:title based; 1,3:album based)\n"
-        "  --noprev    deactivate clipping prevention (dflt)\n"
-        "  --scale x   additional scale signal by x (dflt: 1)\n"
-        "  --gain x    replay gain control (0,1:off (dflt), 2:title, 3:album)\n"
-        "  --silent    no messages to the terminal\n"
-        "  --wav       write Microsoft's WAVE file (dflt)\n"
-        "  --aiff      write Apple's AIFF file\n"
-        "  --raw       write RAW file in native byte order\n"
-        "  --raw-le    write RAW file in little endian byte order\n"
-        "  --raw-be    write RAW file in big endian byte order\n"
-        "  --random    random play order (don't use options after this one)\n"
-#if defined MAKE_16BIT  ||  defined MAKE_24BIT  ||  defined MAKE_32BIT
-        "  --bits x    output with x bits (dflt: " STR(SAMPLE_SIZE) ")\n"
-        "  --dither x  dithering factor (dflt: auto, useful 0.00...1.00)\n"
-        "  --shape x   set shaping type (0:off (dflt), 1:light, 2:medium, 3:heavy)\n"
-#endif
-        "\n"
-        "\x1B[1m\rspecial files:\n"
-        "\x1B[0m\r  -           standard input or standard output\n"
-        "  /dev/null   device null, the trash can\n"
-#ifdef USE_OSS_AUDIO
-        "  /dev/dsp*   use Open Sound System (OSS)" SAMPLE_SIZE_STRING "\n"
-#endif
-#ifdef USE_ESD_AUDIO
-        "  /dev/esd    use Enlightenment Sound Daemon (EsounD)" SAMPLE_SIZE_STRING "\n"
-#endif
-#ifdef USE_SUN_AUDIO
-        "  /dev/audio  use Sun Onboard-Audio" SAMPLE_SIZE_STRING "\n"
-#endif
-#ifdef USE_IRIX_AUDIO
-        "  /dev/audio  use SGI IRIX Onboard-Audio" SAMPLE_SIZE_STRING "\n"
-#endif
-#ifdef USE_WIN_AUDIO
-        "  /dev/audio  use Windows WAVEOUT Audio" SAMPLE_SIZE_STRING "\n"
-#endif
-#ifdef USE_HTTP
-        "  protocol://[username[:password]@]servername[:port]/directories/file\n"
-        "              file addressed via URL; username, password and port are optional,\n"
-        "              protocol can be ftp, http, rtp. servername can be DNS, IP4 or IP6\n"
-        // other interesting protocols are file:// und https://
-#endif
-        "\n"
-        "\x1B[1m\rexamples:\n"
-        "\x1B[0m\r  "PROG_NAME" Overtune.mpc Overtune.wav\n"
-#if PATH_SEP == '/'
-        "  "PROG_NAME" \"/Archive/Rossini/Wilhelm Tell -- [01] Overtune.mpc\" Overtune.wav\n"
-        "  "PROG_NAME" \"/Archive/Rossini/*.mpc\" - | wavplay -\n"
-
-        "  "PROG_NAME" --start -50%% --duration -5%% *.mpc - | wavplay -\n"
-        "  "PROG_NAME" --prev *.mp+ .  &&  cdrecord -v -dao dev=sony -audio *.wav\n"
-#else
-        "  cd \\Archive\\Rossini; "PROG_NAME" \"Wilhelm Tell -- [01] Overtune.mpc\" Overtune.wav\n"
-        "  cd \\Archive\\Rossini; "PROG_NAME" *.mpc - | wavplay -\n"
-
-        "  "PROG_NAME" --start -50%% --duration -5%% *.mpc - | wavplay -\n"
-        "  "PROG_NAME" --prev *.mp+ . ; cdrecord -v -dao dev=sony -audio *.wav\n"
-#endif
-#if defined MAKE_16BIT  ||  defined MAKE_24BIT  ||  defined MAKE_32BIT
-        "  "PROG_NAME" --bits " STR(SAMPLE_SIZE) " --shape 2 *.mpc .\n"
-#endif
-#ifdef USE_OSS_AUDIO
-        "  "PROG_NAME" */*.mpc /dev/dsp ; "PROG_NAME" */*.mpc /dev/dsp1\n"
-#endif
-#ifdef USE_SUN_AUDIO
-        "  "PROG_NAME" */*.mpc /dev/audio\n"
-#endif
-#ifdef USE_IRIX_AUDIO
-        "  "PROG_NAME" */*.mpc /dev/audio\n"
-#endif
-#ifdef USE_WIN_AUDIO
-        "  "PROG_NAME" *.mpc /dev/audio\n"
-#endif
-#ifdef USE_HTTP
-        "  "PROG_NAME" http://www.uni-jena.de/~pfk/mpp/audio/Maire_10bit_48kHz_Dithered.mpc\n"
-#endif
-#ifdef USE_ARGV
-# if PATH_SEP == '/'
-        "  "PROG_NAME" --gain 2 --prev --random /Archive/Audio/  /dev/audio\n"
-# else
-        "  "PROG_NAME" --gain 2 --prev --random C:\\AUDIO\\ D:\\AUDIO\\  /dev/audio\n"
-# endif
-#endif
-        "  "PROG_NAME" playlist.m3u  /dev/audio\n"
-        "\n"
-        "For further information see the file \"MANUAL.TXT\".\n" );
-}
-
-
-static const char*
-ProfileName ( Uint profile )        // profile is 0...15, where 1, 5...15 is used
-{
-    static const char   na    [] = "n.a.";
-    static const char*  Names [] = {
-        na, "Unstable/Experimental", na, na,
-        na, "below 'Telephone'", "below 'Telephone'", "'Telephone'",
-        "'Thumb'", "'Radio'", "'Standard'", "'Xtreme'",
-        "'Insane'", "'BrainDead'", "above 'BrainDead'", "above 'BrainDead'"
-    };
-
-    return profile >= sizeof(Names)/sizeof(*Names)  ?  na  :  Names [profile];
-}
-
-
-/*
- *  Print out the time to stderr with a precision of 10 ms always using
- *  12 characters. Time is represented by the sample count. An additional
- *  prefix character (normally ' ' or '-') is prepended before the first
- *  digit.
- */
-
-static const char*
-Print_Time ( Ulong samples, char sgn )
-{
-    static char  ret [16];
-    Ulong        csec = (Ulong)(samples/(SampleFreq/100.));
-    Uint         hour = (Uint) (csec/360000L);
-    Uint         min  = (Uint) (csec/6000 % 60);
-    Uint         sec  = (Uint) (csec/100  % 60);
-
-    if      ( hour > 9 )
-        sprintf ( ret,  "%c%2u:%02u", sgn, hour, min );
-    else if ( hour > 0 )
-        sprintf ( ret, " %c%1u:%02u", sgn, hour, min );
-    else if ( min  > 9 )
-        sprintf ( ret,    "   %c%2u", sgn,       min );
-    else
-        sprintf ( ret,   "    %c%1u", sgn,       min );
-
-    sprintf ( ret+6,   ":%02u.%02u", sec, (Uint)(csec % 100) );
-    return ret;
-}
-
-
-static double
-TestForGap ( Int2xSample_t* p, int valid )       // Rough estimation of bug error effect, too late starts can't be detected anytime
-{
-    double  sum1 = 2000;
-    double  sum2 = 2000;
-    double  tmp1;
-    double  tmp2;
-    double  ret;
-    int     i;
-
-    for ( i = 0; i < valid; i++ ) {
-        tmp1  = (double) p[i][0]*p[i][0] + (double) p[i][1]*p[i][1];
-        tmp1  = sqrt ( sqrt (tmp1) );
-        tmp2  = 1. + exp ( (i-240.) / 30. );
-
-        sum1 += tmp1;
-        sum2 += tmp1 / tmp2;
-    }
-    // fprintf ( stderr, "\n\n******** %4u: %.0f %.0f\n", valid, sum1, sum2 );
-    ret = sum1 / sum2 - 0.99999999;
-    ret = log (100 * ret);
-
-    return ret;
-}
-
-
-static Uint32_t
-Decode ( FILE_T OutputFile, FILE_T InputFile, Uint32_t TotalFrames, Uint32_t Start, Uint32_t Duration )
-{
-    Int2xSample_t  Stream [BLK_SIZE];
-    Ulong          StartBitPos;
-    size_t         valid;
-    size_t         ring;
-    Uint32_t       FrameNo;
-    Uint32_t       ret         = 0;
-    Uint32_t       CurrBlkSize = 0;
-    time_t         T           = time (NULL);
-
-    ENTER(3);
-
-    // decode frame by frame, note some differences in decoding the last frame (TotalFrames-1)
-    memset ( Stream, 0, sizeof(Stream) );
-    for ( FrameNo = 0; FrameNo < TotalFrames  &&  Duration > 0; FrameNo++ ) {
-        ring = InputCnt;
-
-        REP ((printf ("\nFrame %lu\n", (Ulong)FrameNo), fflush (stdout)));
-
-        // read skip information (designed for rewind/fast forward, but here used for checking purpose)
-        if ( FrameNo % Blockgroesse == 0 )
-            CurrBlkSize = Bitstream_read (20);
-        StartBitPos = BitsRead ();
-
-        // decode bitstream (see decode.c)
-        switch ( StreamVersion ) {
-        case 0x04:
-        case 0x05:
-        case 0x06:  Read_Bitstream_SV6 (); break;
-        case 0x17:
-        case 0x07:  Read_Bitstream_SV7 (); break;
-#ifdef USE_SV8
-        case 8:  Read_Bitstream_SV8 (); break;
-#endif
-        default: assert (0);
-        }
-
-        REP (printf ("Frame end\n"));
-
-        // check skip information against value determined by decoding (buggy for CBR)
-        if ( (FrameNo+1) % Blockgroesse == 0  &&  BitsRead () - StartBitPos != CurrBlkSize )
-            if ( FrameNo != TotalFrames-1  ||  StreamVersion > 5 ) {
-                if ( BitsRead() < InputBuffRead * (Ulong)(CHAR_BIT * sizeof(*InputBuff)) )
-                    stderr_printf ("\n\n"PROG_NAME": broken frame %lu/%lu (decoded size=%lu, size in stream=%lu)\n\n", (Ulong)FrameNo, (Ulong)TotalFrames, (Ulong)(BitsRead () - StartBitPos), (Ulong)CurrBlkSize );
-                else
-                    stderr_printf ("\n\n"PROG_NAME": unexpected end of file after frame %lu/%lu\n\n", (Ulong)FrameNo, (Ulong)TotalFrames );
-                LEAVE(3);
-                return ret;
-            }
-
-        // reload data if more than 50% of the buffer is decoded
-        if ( (ring ^ InputCnt) & IBUFSIZE2 )
-            InputBuffRead += Read_LittleEndians ( InputFile, InputBuff + (ring & IBUFSIZE2), IBUFSIZE2 );
-
-        // Subband synthesizer
-        if ( Start <= BLK_SIZE ) {
-            if ( Scale != 0. ) {
-                if (IS_used) {
-                    Requantize_MidSideStereo   ( Min_Band-1, MS_Band );
-                    Requantize_IntensityStereo ( Min_Band,  Max_Band );
-                } else {
-                    Requantize_MidSideStereo   ( Max_Band,   MS_Band );
-                }
-                Synthese_Filter ( (Int2xSample_t*)&Stream[0][0], &V_L_offset, V_L, Y_L, 0 );
-                Synthese_Filter ( (Int2xSample_t*)&Stream[0][1], &V_R_offset, V_R, Y_R, 1 );
-            }
-
-            // write PCM data to destination (except the data in the last frame, this is done behind the for loop
-            if ( FrameNo < TotalFrames-1 ) {
-                valid     = BLK_SIZE - Start;
-                if ( valid > Duration )
-                    valid = Duration;
-                ret      += Write_PCM ( OutputFile, Stream + Start, valid );
-                Duration -= valid;
-                Start     = 0;
-            }
-        } else {
-            Start -= BLK_SIZE;
-        }
-
-        // output report if a real time second is over sinse the last report
-        if ( (Int)(time (NULL) - T) >= 0 ) {
-            T += 1;
-            stderr_printf ("\r%s/", Print_Time ( Start  ?  Start  :  ret, (char)(Start ? '-' : ' ') ) );
-            stderr_printf ("%s %s (%4.1f%%)", Print_Time ( TotalFrames * BLK_SIZE, ' ') + 1, Start  ?  "jumping"  :  "decoded", 100.* FrameNo / TotalFrames );
-        }
-    }
-
-    // write PCM data to destination for the last frame
-    if ( Duration > 0 ) {
-        // reconstruct exact size for SV6 and higher (for SV4...5 this is unknown)
-        switch ( StreamVersion ) {
-        default:
-            assert (0);
-        case 0x04:
-        case 0x05:
-            valid = 0;
-            break;
-        case 0x06:
-        case 0x07:
-        case 0x17:
-#ifdef USE_SV8
-        case 0x08:
-#endif
-            valid = (Int) Bitstream_read (11);
-            if (valid == 0) valid = BLK_SIZE;               // Old encoder writes a 0 instead of a 1152, Bugfix
-            valid += DECODER_DELAY - Start;
-            if ( valid > Duration ) valid = Duration;
-
-            if ( Start + valid > BLK_SIZE ) {
-                // write out data for the last frame
-                if ( Start < BLK_SIZE ) {
-                    ret   += Write_PCM ( OutputFile, Stream + Start, BLK_SIZE - Start );
-                    valid -= BLK_SIZE - Start;
-                    Start  = 0;
-                } else {
-                    Start -= BLK_SIZE;
-                }
-
-                if ( ! TrueGaplessPresent ) {
-                    // due to the subband synthesizer latency there may up to 481 data samples still in the pipeline, synthesize it (this comment is wrong!)
-                    // is it better to clear or to leave the next two statements (???)
-                    memset ( Y_L, 0, sizeof Y_L );
-                    memset ( Y_R, 0, sizeof Y_R );
-                } else {
-                    // new feature for true gapless encoding/decoding delivers the true
-                    // quantized values needed for gapless playback!!
-                    CurrBlkSize = Bitstream_read (20);
-                    StartBitPos = BitsRead ();
-                    Read_Bitstream_SV7 ();
-
-                    // check skip information against value determined by decoding (buggy for CBR)
-                    if ( BitsRead () - StartBitPos != CurrBlkSize ) {
-                        if ( BitsRead() < InputBuffRead * (Ulong)(CHAR_BIT * sizeof(*InputBuff)) )
-                            stderr_printf ("\n\n"PROG_NAME": broken frame %lu/%lu (decoded size=%lu, size in stream=%lu)\n\n", (Ulong)FrameNo, (Ulong)TotalFrames, (Ulong)(BitsRead () - StartBitPos), (Ulong)CurrBlkSize );
-                        else
-                            stderr_printf ("\n\n"PROG_NAME": unexpected end of file after frame %lu/%lu\n\n", (Ulong)FrameNo, (Ulong)TotalFrames );
-                        LEAVE(3);
-                        return ret;
-                    }
-
-                    if ( Scale != 0. ) {
-                        if (IS_used) {
-                            Requantize_MidSideStereo   ( Min_Band-1, MS_Band );
-                            Requantize_IntensityStereo ( Min_Band,  Max_Band );
-                        } else {
-                            Requantize_MidSideStereo   ( Max_Band,   MS_Band );
-                        }
-                    }
-                }
-                Synthese_Filter ( (Int2xSample_t*)&Stream[0][0], &V_L_offset, V_L, Y_L, 0 );
-                Synthese_Filter ( (Int2xSample_t*)&Stream[0][1], &V_R_offset, V_R, Y_R, 1 );
-            }
-            break;
-        }
-        // write PCM data to destination from the "very last" frame
-        ret += Write_PCM ( OutputFile, Stream + Start, valid );
-    }
-
-    // time report
-    stderr_printf ("\r%s", Print_Time ( ret, (char)' ' ) );
-
-    LEAVE(3);
-    return ret;
-}
-
-
-//   0: No ID3v2 tag
-//  >0: ID2v2 tag with this length
-
-static Int32_t
-JumpID3v2 ( void )
-{
-    Int32_t   ret = 10;
-
-    if ( (Bitstream_read (32) & 0xFFFFFF) != 0x334449L )
-        return 0;
-
-    if ( Bitstream_read (1) )
-        return 0;
-    ret += Bitstream_read (7) << 14;
-    if ( Bitstream_read (1) )
-        return 0;
-    ret += Bitstream_read (7) << 21;
-    Bitstream_read (1);
-    if ( Bitstream_read (1) )
-        ret += 10;
-    Bitstream_read (14);
-    Bitstream_read (16);
-    if ( Bitstream_read (1) )
-        return 0;
-    ret += Bitstream_read (7) <<  0;
-    if ( Bitstream_read (1) )
-        return 0;
-    ret += Bitstream_read (7) <<  7;
-
-    return ret;
-}
-
-const char*
-EncoderName ( int encoderno )
-{
-    static char Name [32];
-
-    if ( encoderno <= 0 )
-        Name [0] = '\0';
-    else if ( encoderno % 10 == 0 )
-        sprintf ( Name, " (Release %u.%u)", encoderno/100, encoderno/10%10 );
-    else if ( (encoderno & 1) == 0 )
-        sprintf ( Name, " (Beta %u.%02u)", encoderno/100, encoderno%100 );
-    else
-        sprintf ( Name, " (--Alpha-- %u.%02u)", encoderno/100, encoderno%100 );
-    return Name;
-}
-
-
-/**************************** Decode a file *****************************/
-static Ulong
-DecodeFile ( FILE_T OutputFile, FILE_T InputFile, Double Start, Double Duration )
-{
-    Int        MaxBandDesired = 0;
-    Uint32_t   TotalFrames    = 0;
-    Ulong      DecodedSamples = 0;
-    Uint       Profile        = (Uint)-1;
-    Double     AverageBitrate;
-    TagInfo_t  taginfo;
-    clock_t    T;
-    Int32_t    ID3v2;
-    Uint16_t   PeakTitle = 0;
-    Uint16_t   PeakAlbum = 0;
-    Uint16_t   Peak;
-    Uint16_t   tmp;
-    Int16_t    GainTitle = 0;
-    Int16_t    GainAlbum = 0;
-    Int16_t    Gain;
-    int        Encoder;
-    Bool_t     SecurePeakTitle = 0;
-    Float      ReplayGain;       // 0...1...+oo
-    Float      ClipCorr;         // 0...1
-
-    ENTER(2);
-
-    // Fill the bitstream buffer for the first time
-resume:
-    Bitstream_init ();
-    InputBuffRead = Read_LittleEndians ( InputFile, InputBuff, IBUFSIZE );
-
-    // Test the first 4 bytes ("MP+": SV7+, "ID3": ID3V2, other: may be SV4...6)
-    switch ( Bitstream_preview(32) ) {
-    case (Uint32_t)0x01334449L:                                         /* ID3 V2.1...2.4 */
-    case (Uint32_t)0x02334449L:
-    case (Uint32_t)0x03334449L:
-    case (Uint32_t)0x04334449L:
-        stderr_printf ("\n"PROG_NAME": Stream was corrupted by an ID3 Version 2 tagger\n\n" );
-        ID3v2 = JumpID3v2 ();
-        if ( SEEK ( InputFile, ID3v2, SEEK_SET ) < 0 ) {
-            stderr_printf ( "\n\nSorry, recovering fails.\n\a" );
-            return 0;
-        }
-        sleep (1);
-        stderr_printf ("\b\b\b\b, ignore %lu words and %u bits ...\n\a", (unsigned long)ID3v2 >> 2, (int)(ID3v2&3) << 3 );
-        goto resume;
-
-    case (Uint32_t)0x072B504DL:                                         /* MP+ SV7 */
-    case (Uint32_t)0x172B504DL:                                         /* MP+ SV7.1 */
-#ifdef USE_SV8
-    case (Uint32_t)0x082B504DL:                                         /* MP+ SV8 */
-#endif
-        StreamVersion  = (Int) Bitstream_read (8);
-        if ( (Uint)StreamVersion < 7 ) {
-            stderr_printf ("\n"PROG_NAME": StreamVersion 7+ like header with SV0...6\n" );
-            return 0;
-        }
-        (void) Bitstream_read (24);
-        break;
-
-
-    case (Uint32_t)0x2043414DL:                                         /* MAC  */
-        stderr_printf ("\n"PROG_NAME": Input File is a %s file\n", "Monkey's Audio" );
-        return 0;
-
-    case (Uint32_t)0x7961722E:                                         /* Real Audio */
-        stderr_printf ("\n"PROG_NAME": Input File is a %s file\n", "Real Audio" );
-        return 0;
-
-    case (Uint32_t)0x46464952L:                                         /* WAV  */
-        stderr_printf ("\n"PROG_NAME": Input File is a %s file\n", "Microsoft WAVE" );
-        return 0;
-
-    case (Uint32_t)0x43614C66L:                                         /* FLAC */
-        stderr_printf ("\n"PROG_NAME": Input File is a %s file\n", "FLAC" );
-        return 0;
-
-    case (Uint32_t)0x4341504CL:                                         /* LPAC */
-        stderr_printf ("\n"PROG_NAME": Input File is a %s file\n", "LPAC" );
-        return 0;
-
-    case (Uint32_t)0x37414B52L:                                         /* RKAU */
-        stderr_printf ("\n"PROG_NAME": Input File is a %s file\n", "RKAU" );
-        return 0;
-
-    case (Uint32_t)0x676B6A61L:                                         /* Shorten */
-        stderr_printf ("\n"PROG_NAME": Input File is a %s file\n", "Shorten" );
-        return 0;
-
-    case (Uint32_t)0x040A5A53L:                                         /* SZIP 1.12 */
-        stderr_printf ("\n"PROG_NAME": Input File is a %s file\n", "szip" );
-        return 0;
-
-    case (Uint32_t)0x5367674FL:                                         /* OggS */
-        stderr_printf ("\n"PROG_NAME": Input File is a %s file\n", "Ogg Stream" );
-        return 0;
-
-    case (Uint32_t)0x46494441L:                                         /* AAC-ADIF */
-        stderr_printf ("\n"PROG_NAME": Input File is a %s file\n", "AAC Audio Data Interchange Format" );
-        return 0;
-
-    default:
-        StreamVersion = (Uint32_t) Bitstream_preview(32);
-        if ( ( StreamVersion & 0x00FFFFFF ) == (Uint32_t)0x002B504DL ) {
-            StreamVersion >>= 24;
-            if ( StreamVersion >= 0x72 ) {
-                stderr_printf ( "\n"PROG_NAME": Input File seems to be a MPC file StreamVersion %u.%u\nVisit http://www.uni-jena.de/~pfk/mpc/ and update your software.\n\n", StreamVersion & 15, StreamVersion >> 4 );
-                return 0;
-            }
-        }
-
-        StreamVersion = (Int)(Bitstream_preview(21) & 0x3FF);
-        if ( StreamVersion < 4  ||  StreamVersion > 6 ) {
-            stderr_printf ("\n"PROG_NAME": Input File is not a MPC file, neither SV 4...6 nor SV 7 (SV %u)\n", StreamVersion );
-            return 0;
-        }
-        break;
-    }
-
-
-    // decode the header for SV4...6 or SV7 or SV8
-    switch ( StreamVersion ) {
-    case 0x04:
-    case 0x05:
-    case 0x06:
-        Bitrate        = (Int) Bitstream_read (9);
-        IS_used        = (Int) Bitstream_read (1);
-        MS_used        = (Int) Bitstream_read (1);
-        StreamVersion  = (Int) Bitstream_read(10);
-        MaxBandDesired = (Int) Bitstream_read (5);
-        Blockgroesse   = (Int) Bitstream_read (6);
-        TotalFrames    = Bitstream_read (StreamVersion < 5  ?  16  :  32);
-        SampleFreq     = 44100;
-        Encoder        = -1;
-
-        if ( StreamVersion >= 4  &&  StreamVersion <= 6 )
-            break;
-
-    default:  // it should be impossible to execute the following code
-        stderr_printf ("\n"PROG_NAME": Internal error\n" );
-        stderr_printf ("\n"PROG_NAME": Not a MPC file, neither SV 4...6 nor SV 7 (SV %u.%u)\n", StreamVersion & 15, StreamVersion >> 4 );
-        return 0;
-
-    case 0x07:
-    case 0x17:
-#ifdef USE_SV8
-    case 0x08:
-#endif
-        Bitrate        = 0;
-        Blockgroesse   = 1;
-        TotalFrames    = Bitstream_read (32);
-        IS_used        = (Int) Bitstream_read (1);
-        MS_used        = (Int) Bitstream_read (1);
-        MaxBandDesired = (Int) Bitstream_read (6);
-
-        // reading the profile
-        Profile = (Int) Bitstream_read (4);
-        (void) Bitstream_read ( 2);
-        SampleFreq = sftable [ Bitstream_read ( 2) ];
-
-        // reading peak and gain values from the file (or use useful values if they are absent)
-        PeakTitle = (Uint16_t)(1.18 * (Uint32_t)Bitstream_read (16));
-        GainTitle = Bitstream_read (16);
-        tmp       = Bitstream_read (16);
-        if ( SecurePeakTitle = (tmp != 0) )
-            PeakTitle = tmp;
-        GainAlbum = Bitstream_read (16);
-        PeakAlbum = Bitstream_read (16);
-        if ( PeakAlbum == 0 )
-            PeakAlbum = PeakTitle;
-
-        // reading true gapless
-        TrueGaplessPresent = Bitstream_read ( 1);
-        LastValidSamples   = Bitstream_read (11);
-        (void) Bitstream_read (20);
-
-        // reserved bytes for future use
-        Encoder = Bitstream_read ( 8);
-        break;
-    }
-
-
-    // check for ID3V1(.1) tags or APE tags, output information if available
-    if ( Read_ID3V1_Tags ( InputFile, &taginfo )  ||  Read_APE_Tags ( InputFile, &taginfo ) ) {
-        stderr_printf ("\n         %s: %s  ", taginfo.Artist, taginfo.Album );
-        stderr_printf ( taginfo.Genre[0] != '?'  ||  taginfo.Year[0] != '\0'  ?  "  (" : "" );
-        stderr_printf ( taginfo.Genre[0] == '?'  ?  "%0.0s"  : "%s", taginfo.Genre );
-        stderr_printf ( taginfo.Genre[0] != '?'  &&  taginfo.Year[0]  ?  ", "  :  "" );
-        stderr_printf ( "%s", taginfo.Year );
-        stderr_printf ( taginfo.Genre[0] != '?'  ||  taginfo.Year[0] != '\0'  ?  ")\n" : "\n" );
-        stderr_printf ("    %s %s", taginfo.Track, taginfo.Title );
-        stderr_printf ( taginfo.Comment[0] != '\0'  ?  "  (%s)\n"  :  "%s\n", taginfo.Comment );
-    }
-
-    // calculate bitrate for informational purpose
-    if ( Bitrate == 0 ) {
-        AverageBitrate = ( SampleFreq / 1000. / BLK_SIZE * 8 ) * taginfo.FileSize / TotalFrames  ;
-    } else {
-        AverageBitrate = Bitrate;
-    }
-    stderr_printf ("\n");
-    if ( AverageBitrate > 0. )
-        stderr_printf ("%7.1f kbps,", AverageBitrate );
-
-    // Output total time, Streamversion, Profile
-    stderr_printf ("%s, SV %u.%u, Profile %s%s", Print_Time (TotalFrames * BLK_SIZE, ' ') + 1, StreamVersion & 15, StreamVersion >> 4, ProfileName(Profile), EncoderName(Encoder) );
-
-    // Choose the select type of Peak and Gain values
-    switch ( ReplayGainType ) {
-    case  0: // no replay gain, use title peak for clipping prevention
-        Gain = 0;
-        Peak = PeakTitle;
-        break;
-    case  1: // no replay gain, use album peak for clipping prevention
-        Gain = 0;
-        Peak = PeakAlbum;
-        break;
-    default: // title replay gain
-        Gain = GainTitle;
-        Peak = PeakTitle;
-        break;
-    case  3: // album replay gain
-        Gain = GainAlbum;
-        Peak = PeakAlbum;
-        break;
-    }
-
-    // calculate the multiplier from the original integer peak and gain data
-    ReplayGain = (Float) exp ( (M_LN10/2000.) * (Int16_t)Gain );
-    ClipCorr   = (Float) (32767. / ( (Uint32_t)Peak + 1 ));             // avoid divide by 0
-
-    // Perform or not perform clipping prevention, this is the question here 
-    if ( ClipPrev ) {
-        stderr_printf (", ClipDamp " );
-        if        ( Peak == 0 ) {
-            stderr_printf ("1 ???" );
-            ClipCorr = 1.f;
-        } else if ( ReplayGain * fabs(Scale) > ClipCorr ) {
-            stderr_printf (".%04d%s", (int)(1.e4 * ClipCorr / (ReplayGain * Scale) + 0.5), SecurePeakTitle  ?  ""  :  "?" );
-            ClipCorr = ClipCorr / (ReplayGain * Scale);
-        } else {
-            stderr_printf ("1%s", SecurePeakTitle  ?  ""  :  "?" );
-            ClipCorr = 1.f;
-        }
-    }
-    else {
-        ClipCorr = 1.f;
-    }
-
-    // report replay gain if != 1.
-    if ( ReplayGain != 1. )
-        stderr_printf (", Gain %.4f", ReplayGain );
-    stderr_printf ("\n\n");
-
-    // init subband structure (MaxBandDesired, StreamVersion, bitrate) and Scale factors
-    Init_QuantTab ( MaxBandDesired, IS_used, ClipCorr * ReplayGain * Scale, StreamVersion );
-
-    // calculate Start and Duration if they are given in percent as negative values
-    if ( Start    < 0. )
-        Start    *= TotalFrames * -(0.01 * BLK_SIZE / SampleFreq);
-    if ( Duration < 0. )
-        Duration *= TotalFrames * -(0.01 * BLK_SIZE / SampleFreq);
-
-
-    // reset arrays to avoid HF noise if recent MaxBand > current MaxBand
-    memset ( Y_L, 0, sizeof(Y_L) );
-    memset ( Y_R, 0, sizeof(Y_R) );
-    memset ( Q  , 0, sizeof(Q  ) );
-    memset ( V_L, 0, sizeof(V_L) );
-    memset ( V_R, 0, sizeof(V_R) );
-    V_L_offset = V_R_offset = 0;
-
-    // decoding kernel with time measurement
-    T = clock ();
-    DecodedSamples  = Decode ( OutputFile, InputFile, TotalFrames,
-                               (Uint32_t) (Start * (double)SampleFreq + 0.5) + DECODER_DELAY,
-                               Duration <= 0.  ||  Duration > 0xFFFFFFFFL/SampleFreq  ?  (Uint32_t)0xFFFFFFFFL  :  (Uint32_t)(Duration * (double)SampleFreq + 0.5)
-                             );
-    T = clock () - T;
-#ifdef __TURBOC__       // wraps around at midnight
-    if ( (Long)T < 0 ) {
-        T += (time_t) (86400. * CLOCKS_PER_SEC);
-    }
-#endif
-
-    // output at the end of a decoded title
-    (void) stderr_printf (" (runtime: %.2f s  speed: %.2fx)\n", (Double) (T * (1. / CLOCKS_PER_SEC )),
-                     T  ?  (Double) ((CLOCKS_PER_SEC/(Float)SampleFreq) * DecodedSamples / T)  :  (Double)0. );
-
-    LEAVE(2);
-
-    return DecodedSamples;
-}
-
-
-/*
-*   LAME and numerous decoders only append a '.wav' to make it harder to overwrite the binary source
- *  It will probably be changed if i can think of a better mechanism
- */
-
-// Create a useful output name for automatic output file mode (destination is only a directory name)
-// The destination directory and the file name is merged together with the new file extensions.
-// This gives file names as directory/filename.mpc.wav which can be distinguished from the
-// original .wav file. This is the way most programs do it (including "Lame").
-
-static char*
-Create_Extention ( const char* Path, const char* Name, const char* Extention )
-{
-    static char  ret [PATHLEN_MAX + 3];
-    char*        p = strrchr ( Name, PATH_SEP );
-
-    if ( p != NULL )
-        Name = p + 1;
-    if ( strlen(Path) + strlen(Name) + strlen(Extention) > sizeof(ret) - 3 ) {
-        stderr_printf (PROG_NAME":\tTarget buffer for new file name too short,\n\tincrease PATHLEN_MAX and recompile\n\a" );
-        exit (4);
-    }
-    sprintf ( ret, "%s%c%s.%s", Path, PATH_SEP, Name, Extention );
-    return ret;
-}
-
-// It should refuse to output WAV-content into existing '.mp?'-files,
-// in this case the file shouldn't be the output file,
-// but an (additional) input file, and all should be written to <stdout>.
-// This is non-orthogonal and dirty, but it should prevent quite some data loss.
-//
-// Maybe it should only overwrite files if it's stated by '--forceoverwrite',
-// got to think about that some more.
-
-static Int
-Unintended_OutputFile ( const char* Name )
-{
-    FILE_T  fp;
-    char    buff [4];
-
-#ifdef USE_HTTP
-    if ( 0 == strncasecmp (Name, "http://", 7)  ||  0 == strncasecmp (Name, "ftp://", 6) )
-        return 1;
-#endif
-    if ( (fp = OPEN ( Name )) == INVALID_FILEDESC )
-        return 0;
-    READ ( fp, buff, 4 );
-    CLOSE (fp);
-    if ( memcmp (buff, "MP+\007", 4) == 0 )
-        return 1;
-    if ( strlen (Name) <= 4 )
-        return 0;
-    Name += strlen (Name) - 4;
-    if ( Name[0] == '.'  &&  (Name[1] & 0xDF) == 'M'  &&  (Name[2] & 0xDF) == 'P' )
-        return 1;
-    if ( Name[0] == '.'  &&  (Name[1] & 0xDF) == 'M'  &&  Name[2] == '3'  &&  (Name[3] & 0xDF) == 'U' )
-        return 1;
-    if ( Name[0] == '.'  &&  (Name[1] & 0xDF) == 'P'  &&  Name[2] == 'A'  &&  (Name[3] & 0xDF) == 'C' )
-        return 1;
-    if ( Name[0] == '.'  &&  (Name[1] & 0xDF) == 'A'  &&  Name[2] == 'P'  &&  (Name[3] & 0xDF) == 'E' )
-        return 1;
-    if ( Name[0] == '.'  &&  (Name[1] & 0xDF) == 'O'  &&  Name[2] == 'F'  &&  (Name[3] & 0xDF) == 'R' )
-        return 1;
-    if ( Name[0] == '.'  &&  (Name[1] & 0xDF) == 'R'  &&  Name[2] == 'K'  &&  (Name[3] & 0xDF) == 'A' )
-        return 1;
-    if ( Name[3] == PATH_SEP )
-        return 1;
-    return 0;
-}
-
-
-enum NameMode_t  {
-    automode,
-    nullmode,
-    filemode, filemode_noinit,
-    pipemode, pipemode_noinit,
-    dspmode , dspmode_noinit ,
-    esdmode , esdmode_noinit ,
-    sunmode , sunmode_noinit ,
-    winmode , winmode_noinit ,
-    irixmode, irixmode_noinit,
-};
-
-/**************************** main interpreter loop ******************/
-
-
-static void
-randomize ( const char** argv )
-{
-    int          argc;
-    int          i;
-    int          j;
-    const char*  tmp;
-
-    for ( argc = 0; argv[argc] != NULL; argc++ )
-        ;
-    srand ( time (NULL) );
-    for ( i = 0; i < argc; i++ ) {
-        j       = rand() % argc;
-        tmp     = argv[i];
-        argv[i] = argv[j];
-        argv[j] = tmp;
-    }
-}
-
-
-static int
-hexdigit ( const char s )
-{
-    if ( (unsigned char)(s-'0') < 10u )
-        return s-'0';
-    if ( (unsigned char)(s-'A') <  6u )
-        return s-'A'+10;
-    return -1;
-}
-
-
-static void
-decode_html ( FILE_T fp, const char* src )
-{
-    char  ch;
-
-    if ( GetStderrSilent () )
-        return;
-
-    for ( ; src[0] != '\0' ; src++) {
-        if      ( src[0] == '_' )
-            WRITE (fp, " ", 1 );
-        else if ( src[0] != '%'  ||  hexdigit(src[1]) < 0  ||  hexdigit(src[2]) < 0 ) {
-            WRITE ( fp, src, 1);
-        }
-        else {
-            ch = hexdigit(src[1]) * 16 + hexdigit(src[2]), src += 2;
-            WRITE ( fp, &ch, 1 );
-        }
-    }
-}
-
-
-static void
-Analyze_fs ( const char* filename )
-{
-    FILE_T         f = OPEN (filename);
-    unsigned char  buff [28];
-    int            bytes;
-
-    SampleFreq = 44100;
-
-    if ( f == INVALID_FILEDESC )
-        return;
-
-    bytes = READ ( f, buff, sizeof buff );
-    CLOSE (f);
-
-    if ( sizeof buff != bytes )
-        return;
-
-    if ( buff[0] != 'M' || buff[1] != 'P' || buff[2] != '+' )
-        return;
-
-    SampleFreq = sftable [ buff[10] & 3 ];
-}
-
-
-static int
-mainloop ( int argc, char** argv )
-{
-    enum NameMode_t  OutputMode;
-    FILE_T           InputFile;
-    FILE_T           OutputFile;
-    const char*      OutputName;
-    const char*      OutputDir;
-    const char*      OutputComment  = "";
-    Double           Start          = 0.;   // Starting time when > 0
-    Double           Duration       = 0.;   // length to decode when > 0
-    Ulong            DecodedSamples = 0;
-#ifdef USE_ESD_AUDIO
-    int              ESDFileHandle;
-#endif
-    HeaderWriter_t   HeaderWriter  = Write_WAVE_Header;
-    const char*      OutputFileExt = "wav";
-    const char*      arg;
-
-    // take care of the output file (need to rethink this)
-    OutputName = argv [argc-1];
-    if      ( 0 == strcmp (OutputName, "-")  ||  0 == strcmp (OutputName, "/dev/stdout") ) {
-        if ( argc > 2  ||  ISATTY (FILENO(STDIN)) )
-            argv [argc-1]  = NULL;
-  pipe: if ( ISATTY (FILENO (STDOUT)) ) {
-            argc++;
-#if   defined USE_OSS_AUDIO
-            OutputName = "/dev/audio";
-            goto ossjump;
-#elif defined USE_ESD_AUDIO
-            goto esdjump;
-#elif defined USE_SUN_AUDIO
-            OutputName = "/dev/audio";
-            goto sunjump;
-#elif defined USE_IRIX_AUDIO
-            OutputName = "/dev/audio";
-            goto irixjump;
-#elif defined USE_WIN_AUDIO
-            OutputName = "/dev/audio";
-            goto winjump;
-#endif
-        }
-        OutputMode = pipemode_noinit;
-        OutputName = "/dev/stdout";
-    }
-    else if ( 0 == strcmp (OutputName, "/dev/null") ) {
-        OutputMode = nullmode;
-        OutputFile = NULL_FD;
-        OutputComment = " (Null Device)";
-        argv [argc-1]  = NULL;
-    }
-#ifdef USE_SUN_AUDIO
-    else if ( 0 == strcmp (OutputName, "/dev/audio") ) { sunjump:
-        OutputMode       = sunmode_noinit;
-        argv [argc-1]  = NULL;
-    }
-#endif /* USE_SUN_AUDIO */
-#ifdef USE_IRIX_AUDIO
-    else if ( 0 == strcmp (OutputName, "/dev/audio") ) { irixjump:
-        OutputMode       = irixmode_noinit;
-        argv [argc-1]  = NULL;
-    }
-#endif /* USE_IRIX_AUDIO */
-#ifdef USE_ESD_AUDIO
-    else if ( 0 == strcmp (OutputName, "/dev/esd") ) { esdjump:
-        OutputMode = esdmode_noinit;
-        output_endianess = ENDIAN == HAVE_LITTLE_ENDIAN  ?  LITTLE  :  BIG;
-        argv [argc-1]  = NULL;
-    }
-#endif /* USE_ESD_AUDIO */
-#ifdef USE_OSS_AUDIO
-    else if ( 0 == strncmp (OutputName, "/dev/", 5) ) { ossjump:
-        OutputMode = dspmode_noinit;
-        argv [argc-1]  = NULL;
-    }
-#endif /* USE_OSS_AUDIO */
-#ifdef USE_WIN_AUDIO
-    else if ( 0 == strcmp (OutputName, "/dev/audio") ) { winjump:
-        OutputMode = winmode_noinit;
-        argv [argc-1]  = NULL;
-    }
-#endif /* USE_WIN_AUDIO */
-    else if ( Unintended_OutputFile (OutputName) ) {
-        goto pipe;
-    }
-    else {
-        OutputMode = filemode_noinit;
-        if ( (OutputFile = CREATE ( OutputName )) != INVALID_FILEDESC ) {
-            UNBUFFER ( OutputFile );
-            argv [argc-1]  = NULL;
-        }
-        else if ( isdir ( OutputName ) ) {
-            OutputMode = automode;
-            OutputFile = INVALID_FILEDESC;
-            OutputDir  = OutputName;
-            argv [argc-1]  = NULL;
-        }
-        else {
-            stderr_printf ("\n"PROG_NAME": Can't create output file '%s': %s\n", OutputName, strerror(errno) );
-            return 3;
-        }
-    }
-
-
-    while ( *++argv != NULL ) {
-
-        // decode options
-        if ( argv[0][0] == '-'  &&  argv[0][1] == '-' ) {
-            arg = argv[0] + 2;
-
-            if ( 0 == strncmp (arg, "random", 3) ) {
-                randomize ( argv + 1 );
-                continue;
-            }
-            else if ( 0 == strncmp (arg, "start", 2)  ||  0 == strncmp (arg, "skip", 2) ) {     // Start
-                if ( *++argv == NULL ) {
-                    stderr_printf ("\n"PROG_NAME": --%s x?\n\n", "start" );
-                    return 1;
-                } else {
-                    if ( 0 == strncmp (*argv, "mid", 1) )
-                        Start = -50.f;      // 50%, negative values are percentages
-                    else
-                        Start = atof (*argv);
-                    continue;
-                }
-            }
-            else if ( 0 == strncmp (arg, "duration", 2) ) {  // Duration
-                if ( *++argv == NULL ) {
-                    stderr_printf ("\n"PROG_NAME": --%s x?\n\n", "duration" );
-                    return 1;
-                } else {
-                    Duration = atof (*argv);
-                    continue;
-                }
-            }
-            else if ( 0 == strncmp (arg, "scale", 2) ) {     // Level scaling
-                if ( *++argv == NULL ) {
-                    stderr_printf ("\n"PROG_NAME": --%s x?\n\n", "scale" );
-                    return 1;
-                } else {
-                    Scale = (Float) atof (*argv);
-                    continue;
-                }
-            }
-            else if ( 0 == strncmp (arg, "noprev", 3)  ||  0 == strncmp (arg, "noclip", 3) ) {    // Clipping prevention disabled
-                ClipPrev = 0;
-                continue;
-            }
-            else if ( 0 == strncmp (arg, "prev"  , 1)  ||  0 == strncmp (arg, "clip"  , 1) ) {    // Clipping prevention enabled
-                ClipPrev = 1;
-                continue;
-            }
-            else if ( 0 == strncmp (arg, "gain", 1) ) {      // Disable replay gain
-                if ( *++argv == NULL ) {
-                    stderr_printf ("\n"PROG_NAME": --%s x?\n\n", "gain" );
-                    return 1;
-                } else {
-                    ReplayGainType = atoi (*argv);
-                    continue;
-                }
-            }
-            else if ( 0 == strncmp (arg, "silent", 2)  ||  0 == strncmp (arg, "quiet", 1) ) {    // Disable display
-                SetStderrSilent (1);
-                continue;
-            }
-#if defined MAKE_16BIT  ||  defined MAKE_24BIT  ||  defined MAKE_32BIT
-            else if ( 0 == strncmp (arg, "bits", 1) ) {      // Output bits
-                if ( *++argv == NULL ) {
-                    stderr_printf ("\n"PROG_NAME": --%s x?\n\n", "bits" );
-                    return 1;
-                } else {
-                    Init_Dither ( Bits = atoi (*argv), NoiseShapeType, Dither );
-                    continue;
-                }
-            }
-            else if ( 0 == strncmp (arg, "dither", 2) ) {    // Output bits
-                if ( *++argv == NULL ) {
-                    stderr_printf ("\n"PROG_NAME": --%s x?\n\n", "dither" );
-                    return 1;
-                } else {
-                    Init_Dither ( Bits, NoiseShapeType, Dither = (Float)atof (*argv) );
-                    continue;
-                }
-            }
-            else if ( 0 == strncmp (arg, "shape", 2) ) {     // Noise shaping type
-                if ( *++argv == NULL ) {
-                    stderr_printf ("\n"PROG_NAME": --%s x?\n\n", "shape" );
-                    return 1;
-                } else {
-                    Init_Dither ( Bits, NoiseShapeType = atoi(*argv), Dither );
-                    continue;
-                }
-            }
-#endif
-            else if ( 0 == strncmp (arg, "wav", 1) ) {       // Microsoft's WAVE
-                HeaderWriter     = Write_WAVE_Header;
-                output_endianess = LITTLE;
-                OutputFileExt    = "wav";
-                continue;
-            }
-            else if ( 0 == strncmp (arg, "aiff", 1) ) {      // Apple's AIFF
-                HeaderWriter     = Write_AIFF_Header;
-                output_endianess = BIG;
-                OutputFileExt    = "aiff";
-                continue;
-            }
-            else if ( 0 == strncmp (arg, "raw-le", 5) ) {    // Raw PCM, little endian
-                HeaderWriter     = Write_Raw_Header;
-                output_endianess = LITTLE;
-                OutputFileExt    = "pcm.le";
-                continue;
-            }
-            else if ( 0 == strncmp (arg, "raw-be", 5) ) {    // Raw PCM big endian
-                HeaderWriter     = Write_Raw_Header;
-                output_endianess = BIG;
-                OutputFileExt    = "pcm.be";
-                continue;
-            }
-            else if ( 0 == strcmp (arg, "raw") ) {           // Raw PCM native endian
-                HeaderWriter     = Write_Raw_Header;
-                output_endianess = ENDIAN == HAVE_LITTLE_ENDIAN  ?  LITTLE  :  BIG;
-                OutputFileExt    = "pcm";
-                continue;
-            }
-        }
-
-        // open input-file
-        if ( 0 == strcmp (*argv, "-")  ||  0 == strcmp (*argv, "/dev/stdin") ) {
-            InputFile = SETBINARY_IN (STDIN);
-            if ( ISATTY (FILENO(InputFile)) ) {
-                stderr_printf ("\n"PROG_NAME": Can't decode data from a terminal\n" );
-                return 2;
-            }
-            TitleBar ("<stdin>");
-            Analyze_fs ("");
-            stderr_printf ("\ndecoding of <stdin>\n");
-        } else {
-            if ( (InputFile = OPEN (*argv)) == INVALID_FILEDESC ) {
-#if defined USE_HTTP
-                if ( (InputFile = FDOPEN ( http_open (*argv), "rb" )) == INVALID_FILEDESC ) {
-#endif
-
-                    stderr_printf ("\n"PROG_NAME": Can't open input file '%s': %s\n", *argv, strerror(errno) );
-                    return 1;
-#if defined USE_HTTP
-                }
-#endif
-            }
-            stderr_printf ("\ndecoding of file '");
-            decode_html ( STDERR, *argv);
-            TitleBar (*argv);
-            Analyze_fs (*argv);
-            if ( SampleFreq != 44100 )
-                stderr_printf ("' (%g kHz)\n", 1.e-3*SampleFreq );
-            else
-                stderr_printf ("'\n");
-        }
-        UNBUFFER ( InputFile );
-
-        // open output-file or continue to use it
-        switch ( OutputMode ) {
-        case automode:
-            OutputName = Create_Extention ( OutputDir, *argv, OutputFileExt );
-            if ( (OutputFile = CREATE ( OutputName )) == INVALID_FILEDESC ) {
-                stderr_printf ("\n"PROG_NAME": Can't create output file '%s': %s\n", OutputName, strerror(errno) );
-                return 3;
-            }
-            DecodedSamples = 0;
-            goto filemode2;
-        case filemode_noinit:
-            OutputMode = filemode;
-        filemode2:
-            UNBUFFER ( OutputFile );
-            HeaderWriter ( OutputFile, SampleFreq, SAMPLE_SIZE, 2, 0xFFFFFFFFL );
-        case filemode:
-            stderr_printf ("         to file '%s'" SAMPLE_SIZE_STRING "\n", OutputName );
-            break;
-        case pipemode_noinit:
-            OutputMode = pipemode;
-            OutputFile = SETBINARY_OUT (STDOUT);
-            UNBUFFER ( OutputFile );
-
-#if defined USE_OSS_AUDIO
-            if ( 0 == Set_DSP_OSS_Params ( OutputFile, SampleFreq, SAMPLE_SIZE, 2 ) )
-                OutputComment = " (Open Sound System)";
-            else
-#elif defined USE_SUN_AUDIO
-            if ( 0 == Set_DSP_Sun_Params ( OutputFile, SampleFreq, SAMPLE_SIZE, 2 ) )
-                OutputComment = " (Sun Onboard-Audio)";
-            else
-#endif
-
-            HeaderWriter ( OutputFile, SampleFreq, SAMPLE_SIZE, 2, 0xFFFFFFFFL );
-        case pipemode:
-            stderr_printf ("         to <stdout>%s" SAMPLE_SIZE_STRING "\n", OutputComment );
-            break;
-        case sunmode_noinit:
-#ifdef USE_SUN_AUDIO
-            output_endianess = BIG;
-            if ( (OutputFile = CREATE ( OutputName )) == INVALID_FILEDESC ) {
-                stderr_printf ("\n"PROG_NAME": Can't access device %s: %s\n", OutputName, strerror(errno) );
-                return 3;
-            }
-            UNBUFFER ( OutputFile );
-            if ( 0 == Set_DSP_Sun_Params ( OutputFile, SampleFreq, SAMPLE_SIZE, 2 ) )
-                OutputComment = " (Sun Onboard-Audio)";
-#endif
-            OutputMode = sunmode;
-            goto init_done;
-        case dspmode_noinit:
-#ifdef USE_OSS_AUDIO
-            output_endianess = ENDIAN == HAVE_LITTLE_ENDIAN  ?  LITTLE  :  BIG;
-            if ( (OutputFile = CREATE ( OutputName )) == INVALID_FILEDESC ) {
-                stderr_printf ("\n"PROG_NAME": Can't access device %s: %s\n", OutputName, strerror(errno) );
-                return 3;
-            }
-            UNBUFFER ( OutputFile );
-            if ( 0 == Set_DSP_OSS_Params ( OutputFile, SampleFreq, SAMPLE_SIZE, 2 ) )
-                OutputComment = " (Open Sound System)";
-            OutputMode = dspmode;
-#endif
-            goto init_done;
-        case esdmode_noinit:
-#ifdef USE_ESD_AUDIO
-            output_endianess = ENDIAN == HAVE_LITTLE_ENDIAN  ?  LITTLE  :  BIG;
-            OutputComment = (ESDFileHandle = Set_ESD_Params ( INVALID_FILEDESC, SampleFreq, SAMPLE_SIZE, 2 )) < 0  ?  ""  :  " (Enlightenment Sound Daemon)";
-            if ( (OutputFile = FDOPEN ( ESDFileHandle, "wb" )) == INVALID_FILEDESC ) {
-                stderr_printf ("\n"PROG_NAME": Can't access %s: %s\n", OutputName, strerror(errno) );
-                return 3;
-            }
-            UNBUFFER ( OutputFile );
-            OutputMode = esdmode;
-#endif
-            goto init_done;
-        case winmode_noinit:
-#ifdef USE_WIN_AUDIO
-            output_endianess = ENDIAN == HAVE_LITTLE_ENDIAN  ?  LITTLE  :  BIG;
-            if ( Set_WIN_Params ( INVALID_FILEDESC, SampleFreq, SAMPLE_SIZE, 2 ) < 0 ) {
-                stderr_printf ("\n"PROG_NAME": Can't access %s: %s\n", "WAVE OUT", strerror(errno) );
-                return 3;
-            }
-            OutputFile = WINAUDIO_FD;
-            OutputComment = " (Windows WAVEOUT Audio)";
-            OutputMode = winmode;
-#endif
-            goto init_done;
-        case irixmode_noinit:
-#ifdef USE_IRIX_AUDIO
-            output_endianess = BIG;
-            if ( Set_IRIX_Params ( INVALID_FILEDESC, SampleFreq, SAMPLE_SIZE, 2 ) < 0 ) {
-                stderr_printf ("\n"PROG_NAME": Can't access %s: %s\n", "SGI Irix Audio", strerror(errno) );
-                return 3;
-            }
-            OutputFile = IRIXAUDIO_FD;
-            OutputComment = " (SGI IRIX Audio)";
-            OutputMode = irixmode;
-#endif
-            goto init_done;
-
-        case sunmode:
-        case dspmode:
-        case esdmode:
-        case winmode:
-        case irixmode:
-        case nullmode:
-init_done:  stderr_printf ("         to device %s%s" SAMPLE_SIZE_STRING "\n", OutputName, OutputComment );
-            break;
-        }
-
-        // Decode
-        DecodedSamples += DecodeFile ( OutputFile, InputFile, Start, Duration );
-
-        // close output-file if necessary (inner loop)
-        switch ( OutputMode ) {
-        case automode:
-            if ( SEEK (OutputFile, 0L, SEEK_SET) != -1 )
-                HeaderWriter ( OutputFile, SampleFreq, SAMPLE_SIZE, 2, DecodedSamples );
-            CLOSE ( OutputFile );
-            break;
-        case filemode:
-        case pipemode:
-        case pipemode_noinit:
-        case filemode_noinit:
-        case dspmode:
-        case esdmode:
-        case sunmode:
-        case winmode:
-        case nullmode:
-        case irixmode:
-            break;
-        }
-
-    }
-
-    // close output-file if necessary (final)
-    switch ( OutputMode ) {
-    case pipemode:
-    case filemode:
-        if ( SEEK (OutputFile, 0L, SEEK_SET) != -1 ) {
-            HeaderWriter ( OutputFile, SampleFreq, SAMPLE_SIZE, 2, DecodedSamples );
-        }
-        // fall through
-    case pipemode_noinit:
-    case filemode_noinit:
-    case dspmode:
-    case esdmode:
-        CLOSE ( OutputFile );
-        break;
-    case sunmode:
-    case automode:
-    case nullmode:
-        break;
-    case winmode:
-#ifdef USE_WIN_AUDIO
-        WIN_Audio_close ();
-#endif
-        break;
-    case irixmode:
-#ifdef USE_IRIX_AUDIO
-        IRIX_Audio_close ();
-#endif
-        break;
-    }
-
-    TitleBar ("");
-    return 0;
-}
-
-
-/************ The main() function *****************************/
-int Cdecl
-main ( int argc, char** argv )
-{
-    static const char*  extentions [] = { ".mpc", ".mpp", ".mp+", NULL };
-    int                 ret;
-
-#if (defined USE_OSS_AUDIO  ||  defined USE_ESD_AUDIO  ||  defined USE_SUN_AUDIO)  &&  (defined USE_REALTIME  ||  defined USE_NICE)
-    DisableSUID ();
-#endif
-
-#if   defined _OS2
-    _wildcard ( &argc, &argv );
-#elif defined USE_ARGV
-    mysetargv ( &argc, &argv, extentions );
-#endif
-
-    START();
-    ENTER(1);
-
-    // Welcome message
-    if ( argc < 2  ||  (0 != strcmp (argv[1], "--silent")  &&  0 != strcmp (argv[1], "--quiet")) )
-        (void) stderr_printf ("\r\x1B[1m\r%s\n\x1B[0m\r     \r", About );
-
-    // no arguments or call for help
-    if ( argc < 2  ||  0==strcmp (argv[1],"-h")  ||  0==strcmp (argv[1],"-?")  ||  0==strcmp (argv[1],"--help") ) {
-        usage ();
-        return 1;
-    }
-
-    // initialize tables which must be initialized once and only once
-    Init_Huffman_Decoder_SV4_6 ();
-    Init_Huffman_Decoder_SV7   ();
-
-#ifdef USE_ASM
-    Synthese_Filter_16 = Get_Synthese_Filter ();
-#endif
-
-#if defined MAKE_16BIT  ||  defined MAKE_24BIT  ||  defined MAKE_32BIT
-    Init_Dither ( Bits, NoiseShapeType, Dither );       // initialize dither parameter with standard settings
-#endif
-
-    ret = mainloop ( argc, argv );                      // analyze command line and do the requested work
-
-    OverdriveReport ();                                 // output a report if clipping was necessary
-
-    LEAVE(1);
-    REPORT();
-    return ret;
-}
-
-/* end of mppdec.c */
Index: penc/branches/zorg/mppdec.dsp
===================================================================
--- /mppenc/branches/zorg/mppdec.dsp	(revision 40)
+++ 	(revision )
@@ -1,245 +1,0 @@
-# Microsoft Developer Studio Project File - Name="mppdec" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=mppdec - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "mppdec.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "mppdec.mak" CFG="mppdec - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "mppdec - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "mppdec - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "mppdec - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /G6 /Gr /Zp4 /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MPP_DECODER" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG MPP_DECODER"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ws2_32.lib setargv.obj /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "mppdec - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /G6 /Zp16 /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MPP_DECODER" /FR /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409
-# ADD RSC /l 0x409 /d "_DEBUG MPP_DECODER"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib setargv.obj /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# SUBTRACT LINK32 /profile
-
-!ENDIF 
-
-# Begin Target
-
-# Name "mppdec - Win32 Release"
-# Name "mppdec - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\_setargv.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\cpu_feat.nas
-
-!IF  "$(CFG)" == "mppdec - Win32 Release"
-
-# Begin Custom Build - Assembling $(InputPath)
-InputPath=.\cpu_feat.nas
-InputName=cpu_feat
-
-"Release/$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	"C:/PROGRAM FILES/NASM/NASMW" -f win32 -o Release/$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF  "$(CFG)" == "mppdec - Win32 Debug"
-
-# Begin Custom Build - Assembling $(InputPath)
-InputPath=.\cpu_feat.nas
-InputName=cpu_feat
-
-"Debug/$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	"NASMW" -f win32 -o Debug/$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\decode.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\http.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\huffsv7.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\huffsv46.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\id3tag.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\mppdec.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\profile.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\requant.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\stderr.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\synth.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\synthasm.nas
-
-!IF  "$(CFG)" == "mppdec - Win32 Release"
-
-# Begin Custom Build - Assembling $(InputPath)
-InputPath=.\synthasm.nas
-InputName=synthasm
-
-"Release/$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	"C:/PROGRAM FILES/NASM/NASMW" -d WIN32 -f win32 -o Release/$(InputName).obj $(InputPath) -l $(InputName).lst
-
-# End Custom Build
-
-!ELSEIF  "$(CFG)" == "mppdec - Win32 Debug"
-
-# Begin Custom Build - Assembling $(InputPath)
-InputPath=.\synthasm.nas
-InputName=synthasm
-
-"Debug/$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	"NASMW" -d WIN32 -f win32 -o Debug/$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\synthtab.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\tools.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\wave_out.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\config.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Makefile
-# End Source File
-# Begin Source File
-
-SOURCE=.\mpp.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\mppdec.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\profile.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV7.txt
-# End Source File
-# Begin Source File
-
-SOURCE=.\tools.inc
-# End Source File
-# Begin Source File
-
-SOURCE=.\version
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
Index: penc/branches/zorg/mppdec.h
===================================================================
--- /mppenc/branches/zorg/mppdec.h	(revision 40)
+++ 	(revision )
@@ -1,1172 +1,0 @@
-/*
- * Musepack audio compression
- * Copyright (C) 1999-2004 Buschmann/Klemm/Piecha/Wolf
- *
- * 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.1 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
- */
-
-//// Macros typical for Compilers:
-//
-//  __TURBOC__          Turbo-C, Borland-C
-//  __BORLANDC__        Borland-C
-//  __ZTC__             Zortech-C
-//  _MSC_VER            Microsoft-C
-//  __EMX__             Eberhard Mattes EMX (GNU based)
-//  __GNUC__            GNU C based compiler (also Cygwin)
-//  __CYGWIN__          Cygnus Windows C-Compiler (GNU based)
-//  __APPLE_CC__        Apple GCC (GNU based)
-
-
-//// Macros typical for Operating Systems
-//
-//  __linux__           Linux
-//  __bsdi__            BSDi
-//  __FreeBSD__         FreeBSD
-//  __NetBSD__          NetBSD
-//  __OpenBSD__         OpenBSD
-//  __unix__            Unix ????????
-//  _WIN16              16 bit-Windows
-//  _WIN32              32 bit-Windows (WIN32 is wrong, not defined by not MSC) (also __GNUC__ + _WIN32 is possible)
-//  _HPUX_SOURCE        HP-UX
-//  __BEOS__            BeOS
-//  __APPLE__           Apple Mac OS X (only when using Apple GCC)
-//  ???????             MS-DOS and relatives
-
-
-//// Macros typical for special conformances
-//                      System 5 Release 4 (SVr4)
-//                      System 5 ID     (SVID)
-//                      POSIX 1.0
-//                      POSIX 1.0b
-//                      X/OPEN
-//                      BSD 4.3
-//                      BSD 4.4
-//                      ANSI
-
-
-// Macros to manipulate Sockets + Files in one, in (+0x4000)
-// output times TIME/TIME_T/DTIME
-
-#ifndef MPPDEC_MPPDEC_H
-#define MPPDEC_MPPDEC_H
-
-//// optimization/feature defines //////////////////////////////////
-#ifndef NOT_INCLUDE_CONFIG_H
-# include "config.h"
-#endif
-#include "./mpp.h"
-
-
-//// portable system includes //////////////////////////////////////
-#include <stdio.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <stdarg.h>
-#include <string.h>
-#include <limits.h>
-#include <assert.h>
-#include <math.h>
-
-
-//// system dependent system includes //////////////////////////////
-// low level I/O, where are prototypes and constants?
-#if   defined _WIN32  ||  defined __TURBOC__  ||  defined __ZTC__  ||  defined _MSC_VER
-# include <io.h>
-# include <fcntl.h>
-# include <time.h>
-# include <sys/types.h>
-# include <sys/stat.h>
-#elif defined __unix__  ||  defined __linux__  ||  defined __APPLE__
-# include <fcntl.h>
-# include <unistd.h>
-# include <sys/time.h>
-# include <sys/ioctl.h>
-# include <sys/types.h>
-# include <sys/stat.h>
-#else
-// .... add Includes for new Operating System here (with prefix: #elif defined)
-# include <fcntl.h>
-# include <unistd.h>
-# include <sys/ioctl.h>
-# include <sys/stat.h>
-#endif
-
-
-#if   defined __linux__
-#  include <fpu_control.h>
-#elif defined __FreeBSD__
-# include <machine/floatingpoint.h>
-#elif defined _MSC_VER
-# include <float.h>
-#endif
-
-
-#if defined _WIN32
-# undef USE_OSS_AUDIO
-# undef USE_ESD_AUDIO
-# undef USE_SUN_AUDIO
-#else
-# undef USE_WIN_AUDIO
-#endif
-
-#if defined __APPLE__
-# undef USE_OSS_AUDIO
-# undef USE_SUN_AUDIO
-# undef USE_WIN_AUDIO
-# undef USE_NICE
-# undef USE_REALTIME
-# undef USE_ASM
-# undef USE_ESD_AUDIO
-# define NO_DEV_AUDIO
-# undef ENDIAN
-# define ENDIAN HAVE_BIG_ENDIAN
-#endif
-
-#if defined __TURBOC__
-# undef USE_OSS_AUDIO
-# undef USE_ESD_AUDIO
-# undef USE_SUN_AUDIO
-# undef USE_NICE
-# undef USE_REALTIME
-#endif
-
-#if defined USE_DIET  ||  defined MAKE_24BIT  ||  defined MAKE_32BIT
-# undef USE_ESD_AUDIO
-#endif
-
-#if defined MAKE_16BIT  ||  defined MAKE_24BIT  ||  defined MAKE_32BIT
-# undef USE_ASM
-#endif
-
-#if INT_MAX < 2147483647L
-# undef USE_ASM
-#endif
-
-// sound card
-#if defined USE_OSS_AUDIO
-# include <sys/ioctl.h>
-# include <sys/time.h>
-# if   defined __linux__        // the standard is that this file is stored somewhere on the hard disk
-#  include <linux/soundcard.h>
-# elif defined __bsdi__
-#  include <sys/soundcard.h>
-# elif defined __FreeBSD__
-#  include <machine/soundcard.h>
-# elif defined __NetBSD__  ||  defined __OpenBSD__
-#  include <soundcard.h>
-# elif defined __APPLE__  &&  defined __MACH__
-#  include <pleasepatchheretherightpathofsoundcard.hforMacOSX/soundcard.h>
-# else
-#  include <pleasepatchheretherightpathof/soundcard.h>
-# endif
-#endif /* USE_OSS_AUDIO */
-
-#if defined USE_ESD_AUDIO
-# include <esd.h>
-#endif
-
-#if defined USE_SUN_AUDIO
-# include <sys/audioio.h>
-#endif
-
-#ifdef MPP_ENCODER
-# undef USE_HTTP
-#endif
-
-#ifdef USE_HTTP
-# ifdef _WIN32
-#  include <winsock2.h>
-# else
-#  include <sys/socket.h>
-# endif
-#endif
-
-#if   defined USE_WIN_AUDIO
-# include <windows.h>
-# define WINAUDIO_FD            ((FILE_T)-128)
-#elif defined USE_IRIX_AUDIO
-# define IRIXAUDIO_FD           ((FILE_T)-127)
-#endif
-#define  NULL_FD                ((FILE_T)-126)
-
-#if defined USE_NICE  &&  !defined _WIN32
-# include <sys/resource.h>
-#endif
-
-// scheduler stuff
-#if defined USE_REALTIME  &&  !defined _WIN32
-# include <sched.h>
-#endif
-
-#ifndef O_BINARY
-# ifdef _O_BINARY
-#  define O_BINARY              _O_BINARY
-# else
-#  define O_BINARY              0
-# endif
-#endif
-
-#if defined _WIN32  ||  defined __TURBOC__
-# define strncasecmp(__s1,__s2,__n) strnicmp ((__s1), (__s2), (__n))
-# define strcasecmp(__s1,__s2)      stricmp  ((__s1), (__s2))
-# define MKDIR(__dir,__attr)        mkdir ((__dir))
-#else
-# define MKDIR(__dir,__attr)        mkdir ((__dir), (__attr))
-#endif
-
-#if defined _WIN32
-# include <direct.h>
-# define snprintf                   _snprintf
-# define getcwd(__buff,__len)       _getcwd ((__buff), (__len))
-# define sleep(__sec)               Sleep ((__sec) * 1000)
-#endif
-
-#if defined _WIN32
-# define TIME_T                     long
-# define TIME(__x)                  time ( &(__x) )
-# define DTIME(__x,__y)             ( (double)(__y) - (__x) )
-#else
-# define TIME_T                     struct timeval
-# define TIME(__x)                  gettimeofday ( &(__x), NULL )
-# define DTIME(__x,__y)             ( ((double)(__y).tv_sec - (__x).tv_sec) + 1.e-6 * ((double)(__y).tv_usec - (__x).tv_usec) )
-#endif
-
-#if   defined __GNUC__
-# define inline                 __inline__
-# define restrict
-#elif defined _WIN32
-# define inline                 __inline
-# define restrict
-#else
-# define inline
-# define restrict
-#endif
-
-
-//// Binary/Low-Level-IO ///////////////////////////////////////////
-//
-// All file I/O is basicly handled via an ANSI file pointer (type: FILE*) in
-// FILEIO-Mode 1 and via a POSIX file descriptor (type: int) in
-// FILEIO-Mode 2 and 3.
-//
-// Some operations are only available via the POSIX interface (fcntl, setmode,
-// ...) so we need a function to get the file descriptor from a file pointer.
-// In FILEIO-Mode 2 and 3 this is a dummy function because we are always working
-// with these file descriptors.
-//
-
-#if  FILEIO == 1
-# if   defined __BORLANDC__  ||  defined _WIN32
-#  define FILENO(__fp)          _fileno ((__fp))
-# elif defined __CYGWIN__  ||  defined __TURBOC__  ||  defined __unix__  ||  defined __EMX__  ||  defined _MSC_VER
-#  define FILENO(__fp)          fileno  ((__fp))
-# else
-#  define FILENO(__fp)          fileno  ((__fp))
-# endif
-#else
-#  define FILENO(__fd)          (__fd)
-#endif
-
-
-//
-// If we have access to a file via file name, we can open the file with an
-// additional "b" or a O_BINARY within the (f)open function to get a
-// transparent untranslated data stream which is necessary for audio bitstream
-// data and also for PCM data. If we are working with
-// stdin/stdout/FILENO_STDIN/FILENO_STDOUT we can't open the file with these
-// attributes, because the files are already open. So we need a non
-// standardized sequence to switch to this mode (not necessary for Unix).
-// Mostly the sequence is the same for incoming and outgoing streams, but only
-// mostly so we need one for IN and one for OUT.
-// Macros are called with the file pointer and you get back the untransalted file
-// pointer which can be equal or different from the original.
-//
-
-#if   defined __EMX__
-# define SETBINARY_IN(__fp)     (_fsetmode ( (__fp), "b" ), (__fp))
-# define SETBINARY_OUT(__fp)    (_fsetmode ( (__fp), "b" ), (__fp))
-#elif defined __TURBOC__ || defined __BORLANDC__
-# define SETBINARY_IN(__fp)     (setmode   ( FILENO ((__fp)),  O_BINARY ), (__fp))
-# define SETBINARY_OUT(__fp)    (setmode   ( FILENO ((__fp)),  O_BINARY ), (__fp))
-#elif defined __CYGWIN__
-# define SETBINARY_IN(__fp)     (setmode   ( FILENO ((__fp)), _O_BINARY ), (__fp))
-# define SETBINARY_OUT(__fp)    (setmode   ( FILENO ((__fp)), _O_BINARY ), (__fp))
-#elif defined _WIN32
-# define SETBINARY_IN(__fp)     (_setmode  ( FILENO ((__fp)), _O_BINARY ), (__fp))
-# define SETBINARY_OUT(__fp)    (_setmode  ( FILENO ((__fp)), _O_BINARY ), (__fp))
-#elif defined _MSC_VER
-# define SETBINARY_IN(__fp)     (setmode   ( FILENO ((__fp)),  O_BINARY ), (__fp))
-# define SETBINARY_OUT(__fp)    (setmode   ( FILENO ((__fp)),  O_BINARY ), (__fp))
-#elif defined __unix__
-# define SETBINARY_IN(__fp)     (__fp)
-# define SETBINARY_OUT(__fp)    (__fp)
-#elif 0
-# define SETBINARY_IN(__fp)     (freopen   ( NULL, "rb", (__fp) ), (__fp))
-# define SETBINARY_OUT(__fp)    (freopen   ( NULL, "wb", (__fp) ), (__fp))
-#else
-# define SETBINARY_IN(__fp)     (__fp)
-# define SETBINARY_OUT(__fp)    (__fp)
-#endif
-
-// file I/O using ANSI buffered file I/O via file pointer FILE* (fopen, fread, fwrite, fclose)
-#if  FILEIO == 1
-# define OFF_T                  signed long
-# define FILE_T                 FILE*
-# define OPEN(name)             fopen  (name, "rb" )
-# define OPENRW(name)           fopen  (name, "r+b")
-# define CREATE(name)           fopen  (name, "wb" )
-# define INVALID_FILEDESC       NULL
-# define CLOSE(fp)              fclose (fp)                  // CLOSE   returns -1 on error, otherwise 0
-# define READ(fp,ptr,len)       fread  (ptr, 1, len, fp)     // READ    returns -1 or 0 on error/EOF, otherwise > 0
-# define READ1(fp,ptr)          fread  (ptr, 1, 1, fp)       // READ    returns -1 or 0 on error/EOF, otherwise > 0
-# define WRITE(fp,ptr,len)      fwrite (ptr, 1, len, fp)     // WRITE   returns -1 or 0 on error/EOF, otherwise > 0
-# define SEEK(fp,offs,lbl)      fseek  (fp, offs, lbl)       // SEEK    returns -1 on error, otherwise >= 0
-# define FILEPOS(fp)            ftell  (fp)                  // FILEPOS returns -1 on error, otherwise >= 0
-# define STDIN                  stdin
-# define STDOUT                 stdout
-# define STDERR                 stderr
-# define FDOPEN(fd,mode)        fdopen (fd, mode)
-# define UNBUFFER(fp)           setvbuf(fp, NULL, _IONBF, 0 )
-# define FLUSH(fp)              fflush (fp)
-#endif /* FILEIO==1 */
-
-// file I/O using POSIX unbuffered file I/O via file descriptors (open, read, write, close)
-#if  FILEIO == 2
-# ifdef WIN32
-#  define OFF_T                 _off_t
-# else
-#  define OFF_T                 off_t
-# endif
-# define FILE_T                 int
-# define OPEN(name)             open  (name, O_RDONLY|O_BINARY)
-# define OPENRW(name)           open  (name, O_RDWR  |O_BINARY)
-# define CREATE(name)           open  (name, O_WRONLY|O_BINARY|O_TRUNC|O_CREAT, 0644)
-# define INVALID_FILEDESC       (-1)
-# define CLOSE(fd)              close (fd)                   // CLOSE   returns -1 on error, otherwise 0
-# if defined HAVE_INCOMPLETE_READ
-#  define READ(fd,ptr,len)      complete_read (fd, ptr, len) // READ    returns -1 or 0 on error/EOF, otherwise > 0
-# else
-#  define READ(fd,ptr,len)      (size_t)read   (fd, ptr, len)// READ    returns -1 or 0 on error/EOF, otherwise > 0
-# endif
-# define READ1(fd,ptr)          (size_t)read   (fd, ptr, 1)  // READ    returns -1 or 0 on error/EOF, otherwise > 0
-# define WRITE(fd,ptr,len)      (size_t)write  (fd, ptr, len)// WRITE   returns -1 or 0 on error/EOF, otherwise > 0
-# define SEEK(fd,offs,lbl)      lseek  (fd, offs, lbl)       // SEEK    returns -1 on error, otherwise >= 0
-# define FILEPOS(fd)            lseek  (fd, 0L, SEEK_CUR)    // FILEPOS returns -1 on error, otherwise >= 0
-# define STDIN                  0
-# define STDOUT                 1
-# define STDERR                 2
-# define FDOPEN(fd,mode)        (fd)
-# define UNBUFFER(fd)           (void)(fd)
-# define FLUSH(fd)              (void)(fd)
-#endif /* FILEIO==2 */
-
-// file I/O using Turbo-C lowest level unbuffered file I/O via file descriptors (_open, _read, _write, _close)
-#if  FILEIO == 3
-# define OFF_T                  signed long
-# define FILE_T                 int
-# define OPEN(name)             _open (name, O_RDONLY)
-# define OPENRW(name)           _open (name, O_RDWR  )
-# define CREATE(name)           _creat(name, 0)
-# define INVALID_FILEDESC       (-1)
-# define CLOSE(fd)              _close (fd)                  // CLOSE   returns -1 on error, otherwise 0
-# define READ(fd,ptr,len)       (size_t)_read  (fd, ptr, len)// READ    returns -1 or 0 on error/EOF, otherwise > 0
-# define READ1(fd,ptr)          (size_t)_read  (fd, ptr, 1)  // READ    returns -1 or 0 on error/EOF, otherwise > 0
-# define WRITE(fd,ptr,len)      (size_t)_write (fd, ptr, len)// WRITE   returns -1 or 0 on error/EOF, otherwise > 0
-# define SEEK(fd,offs,lbl)      lseek  (fd, offs, lbl)       // SEEK    returns -1 on error, otherwise >= 0
-# define FILEPOS(fd)            lseek  (fd, 0L, SEEK_CUR)    // FILEPOS returns -1 on error, otherwise >= 0
-# define STDIN                  0
-# define STDOUT                 1
-# define STDERR                 2
-# undef  SETBINARY_IN
-# undef  SETBINARY_OUT
-# define SETBINARY_IN(fd)       (fd)
-# define SETBINARY_OUT(fd)      (fd)
-# define FDOPEN(fd,mode)        (fd)
-# define UNBUFFER(fd)           (void)(fd)
-# define FLUSH(fd)              (void)(fd)
-#endif /* FILEIO==3 */
-
-#if FILEIO != 2  &&  defined USE_HTTP
-# error HTTP can only be used by FILEIO==2
-#endif
-
-#if defined _WIN32  ||  defined __BEOS__
-# define WRITE_SOCKET(sock,ptr,len)     send (sock, ptr, len, 0)
-# define READ_SOCKET(sock,ptr,len)      recv (sock, ptr, len, 0)
-#else
-# define WRITE_SOCKET(sock,ptr,len)     write (sock, ptr, len)
-# define READ_SOCKET(sock,ptr,len)      read  (sock, ptr, len)
-#endif
-
-#ifdef _WIN32
-# define POPEN_READ_BINARY_OPEN(cmd)    _popen ((cmd), "rb")
-# define POPEN_WRITE_BINARY_OPEN(cmd)   _popen ((cmd), "wb")
-# define PCLOSE(fp)                     _pclose(fp)
-#else
-# define POPEN_READ_BINARY_OPEN(cmd)    popen ((cmd), "r")
-# define POPEN_WRITE_BINARY_OPEN(cmd)   popen ((cmd), "w")
-# define PCLOSE(fp)                     pclose(fp)
-#endif
-
-#if defined _WIN32
-# define STRUCT_STAT            struct _stat
-# define STAT_CMD(f,s)          _stat (f, s)
-#else
-# define STRUCT_STAT            struct stat
-# define STAT_CMD(f,s)          stat (f, s)
-#endif /* WIN32 */
-
-#ifndef S_ISDIR
-# if   defined S_IFDIR
-#  define S_ISDIR(x)            ((x) &   S_IFDIR)
-# elif defined _S_IFDIR
-#  define S_ISDIR(x)            ((x) &  _S_IFDIR)
-# elif defined __S_IFDIR
-#  define S_ISDIR(x)            ((x) & __S_IFDIR)
-# else
-#  error Cannot find a way to test for a directory
-# endif
-#endif /* !S_ISDIR */
-
-#if defined __unix__  ||  defined __bsdi__  ||  defined __FreeBSD__  ||  defined __OpenBSD__  ||  defined __NetBSD__  ||  defined __TURBOC__  ||  defined _WIN32  ||  defined __APPLE__
-# define ISATTY(fd)             isatty (fd)
-#else
-# define ISATTY(fd)             0
-#endif
-
-// Path separator
-#if defined __unix__  ||  defined __bsdi__  ||  defined __FreeBSD__  ||  defined __OpenBSD__  ||  defined __NetBSD__  ||  defined __APPLE__
-# define PATH_SEP               '/'
-# define DRIVE_SEP              '\0'
-# define EXE_EXT                ""
-# define DEV_NULL               "/dev/null"
-# define ENVPATH_SEP            ':'
-#elif defined _WIN32  ||  defined __TURBOC__  ||  defined __ZTC__  ||  defined _MSC_VER
-# define PATH_SEP               '\\'
-# define DRIVE_SEP              ':'
-# define EXE_EXT                ".exe"
-# define DEV_NULL               "\\nul"
-# define ENVPATH_SEP            ';'
-#else
-# define PATH_SEP               '/'         // Amiga: C:/
-# define DRIVE_SEP              ':'
-# define EXE_EXT                ""
-# define DEV_NULL               "nul"
-# define ENVPATH_SEP            ';'
-#endif
-
-// maximum length of file names
-#ifndef PATHLEN_MAX
-# if   defined FILENAME_MAX
-#  define PATHLEN_MAX           FILENAME_MAX
-# elif INT_MAX < 2147483647L
-#  define PATHLEN_MAX            128
-# else
-#  define PATHLEN_MAX           1024
-# endif
-#endif /* !PATHLEN_MAX */
-
-#ifdef _WIN32
-# define TitleBar(text)   SetConsoleTitle (text)
-#else
-# define TitleBar(text)   (void) (text)
-#endif
-
-
-//// constants /////////////////////////////////////////////////////
-#ifdef USE_SV8
-# define MAX_SV          "SV8"
-#else
-# define MAX_SV          "SV7"
-#endif
-
-#ifdef USE_ASM
-# define BUILD           "3DNOW!/SSE"
-#else
-# define BUILD           ""
-#endif
-
-
-#define COPYRIGHT        "(C) 1999-2003 Buschmann/Klemm/Piecha/Wolf"
-
-#define DECODER_DELAY    (512 - 32 + 1)
-#define BLK_SIZE         (36 * 32)
-
-
-//// logging defines, for development only /////////////////////////
-#if defined _WIN32  ||  defined __TURBOC__
-# define LOGPATH         ".\\"
-# define MUSICPATH       "D:\\AUDIO\\"
-#else
-# define LOGPATH         "./"
-# define MUSICPATH       "/Archive/Audio/"
-#endif
-#define _(x)             (void)(fprintf(stderr,"<%d>\n",(x)),fflush(stderr))
-
-#ifdef DEBUG
-# define REP(x)          (void)(x)
-#else
-# define REP(x)
-#endif
-
-
-//// numerical constants ///////////////////////////////////////////
-#define C00              (Float) 0.500000000000000000000000L    // Cxx = 0.5 / cos (xx*M_PI/64)
-#define C01              (Float) 0.500602998235196301334178L
-#define C02              (Float) 0.502419286188155705518560L
-#define C03              (Float) 0.505470959897543659956626L
-#define C04              (Float) 0.509795579104159168925062L
-#define C05              (Float) 0.515447309922624546962323L
-#define C06              (Float) 0.522498614939688880640101L
-#define C07              (Float) 0.531042591089784174473998L
-#define C08              (Float) 0.541196100146196984405269L
-#define C09              (Float) 0.553103896034444527838540L
-#define C10              (Float) 0.566944034816357703685831L
-#define C11              (Float) 0.582934968206133873665654L
-#define C12              (Float) 0.601344886935045280535340L
-#define C13              (Float) 0.622504123035664816182728L
-#define C14              (Float) 0.646821783359990129535794L
-#define C15              (Float) 0.674808341455005746033820L
-#define C16              (Float) 0.707106781186547524436104L
-#define C17              (Float) 0.744536271002298449773679L
-#define C18              (Float) 0.788154623451250224773056L
-#define C19              (Float) 0.839349645415527038721463L
-#define C20              (Float) 0.899976223136415704611808L
-#define C21              (Float) 0.972568237861960693780520L
-#define C22              (Float) 1.060677685990347471323668L
-#define C23              (Float) 1.169439933432884955134476L
-#define C24              (Float) 1.306562964876376527851784L
-#define C25              (Float) 1.484164616314166277319733L
-#define C26              (Float) 1.722447098238333927796261L
-#define C27              (Float) 2.057781009953411550808880L
-#define C28              (Float) 2.562915447741506178719328L
-#define C29              (Float) 3.407608418468718785698107L
-#define C30              (Float) 5.101148618689163857960189L
-#define C31              (Float)10.190008123548056810994678L
-
-#define SS05             (Float) 0.840896415253714543018917L      // 0.5^0.25
-
-
-#ifndef M_PI
-# define M_PI            3.1415926535897932384626433832795029     // 4*atan(1)
-# define M_PIl           3.1415926535897932384626433832795029L
-# define M_LN2           0.6931471805599453094172321214581766     // ln(2)
-# define M_LN2l          0.6931471805599453094172321214581766L
-# define M_LN10          2.3025850929940456840179914546843642     // ln 10 */
-# define M_LN10l         2.3025850929940456840179914546843642L
-#endif
-
-
-//// 'Cdecl' forces the use of standard C/C++ calling convention ///////
-#if   defined _WIN32
-# define Cdecl           __cdecl
-#elif defined __ZTC__
-# define Cdecl           _cdecl
-#elif defined __TURBOC__
-# define Cdecl           cdecl
-#else
-# define Cdecl
-#endif
-
-//// expect handling of GCC ////////////////////////////////////////
-#ifdef __GNUC__
-# if __GNUC__ < 3
-#  define __builtin_expect(cond,exp)  (cond)
-#  ifndef expect
-#    define expect(cond,exp)          __builtin_expect(cond,exp)
-#  endif
-# else
-#  ifndef expect
-#   define expect(cond,exp)           __builtin_expect(cond,exp)
-#  endif
-# endif
-#else
-# define __builtin_expect(cond,exp)   (cond)
-# ifndef expect
-#  define expect(cond,exp)            __builtin_expect(cond,exp)
-# endif
-#endif
-
-#define if0(x)                        if (expect(x,0))
-#define if1(x)                        if (expect(x,1))
-#define while0(x)                     while (expect(x,0))
-#define while1(x)                     while (expect(x,1))
-
-#ifndef __GNUC__
-# define __attribute__(x)
-#else
-# define __attribute__(x)
-#endif
-
-//// Remaining macros //////////////////////////////////////////////
-// selects input buffer size and some constants needed for input buffer handling
-#ifndef IBUFLOG2                 // must be at least 10 (bitrate always <626 kbps) or better 11 ( <1253 kbps)
-# if INT_MAX < 2147483647L
-#  define IBUFLOG2       11      // 8 KByte buffer, possible 11...13 (32 KByte limit)
-# else
-#  define IBUFLOG2       21      // 8 MByte buffer, possible 11...29 ( 2 GByte limit)
-# endif
-#endif
-#define IBUFSIZE         ((size_t)(1LU<<(IBUFLOG2)))
-#define IBUFSIZE2        ((size_t)((IBUFSIZE)/2))
-#define IBUFMASK         ((size_t)((IBUFSIZE)-1))
-
-// save memory space for 16 bit compiler (data + stack < 64 KByte)
-#if INT_MAX < 2147483647L
-# if VIRT_SHIFT     >  6
-#  undef  VIRT_SHIFT
-#  define VIRT_SHIFT   6
-# endif
-# if      IBUFLOG2  > 11
-#  undef  IBUFLOG2
-#  define IBUFLOG2    11
-# endif
-# define USE_HUFF_PACK
-# define USE_ARRAY_PACK
-#endif
-
-// generate a macro which contains information about compile time settings
-#define STR(x)   _STR(x)
-#define _STR(x)  #x
-#ifdef NDEBUG
-# define T1  ""
-#else
-# define T1  "DEBUG "
-#endif
-#if  defined USE_OSS_AUDIO  ||  defined USE_ESD_AUDIO  ||  defined USE_SUN_AUDIO  ||  defined USE_WIN_AUDIO
-# define T2  "SND "
-#else
-# define T2  ""
-#endif
-#ifdef USE_NICE
-# define T3  "NICE "
-#else
-# define T3  ""
-#endif
-#if defined USE_REALTIME
-# define T4  "RT "
-#else
-# define T4  ""
-#endif
-#ifdef HAVE_IEEE754_FLOAT
-# define T5  "IEEE "
-#else
-# define T5  ""
-#endif
-#define T6  "IO=" STR(FILEIO) " "
-#ifdef USE_HUFF_PACK
-# define T7  "H-PCK "
-#else
-# define T7  ""
-#endif
-#ifdef USE_ARRAY_PACK
-# define T8  "A-PCK "
-#else
-# define T8  ""
-#endif
-#define T9  "SHFT=" STR(VIRT_SHIFT) " "
-#define T10 "IBUF=" STR(IBUFLOG2) " "
-
-#define COMPILER_FLAGS  T1 T2 T3 T4 T5 T6 T7 T8 T9 T10
-
-// align a pointer by maybe incrementing it
-#define ALIGN(ptr,alignment) \
-                    (void*)((((ptrdiff_t)(ptr)) & (-(ptrdiff_t)(alignment))) + (alignment))   // aligns a pointer with alignment, the source array should be at least alignment-1 Bytes longer than the needed length
-
-
-//// Simple types //////////////////////////////////////////////////
-
-#if   CHAR_BIT == 8  &&  SCHAR_MAX == 127L
-typedef unsigned char       Uint8_t;    // guaranteed  8 bit unsigned integer type with range 0...255
-typedef signed   char       Int8_t;     // guaranteed  8 bit signed   integer type with range -128...127
-#else
-# error No  8 bit int type found. Tested: char
-#endif
-
-#if   SHRT_MAX == 32767L
-typedef unsigned short int  Uint16_t;   // guaranteed 16 bit unsigned integer type with range 0...65535
-typedef signed   short int  Int16_t;    // guaranteed 16 bit signed   integer type with range -32768...32767
-#else
-# error No 16 bit int type found. Tested: short
-#endif
-
-#if   INT_MAX == 2147483647L
-typedef unsigned int        Uint32_t;   // guaranteed 32 bit unsigned integer type with range 0...4294967295
-typedef signed   int        Int32_t;    // guaranteed 32 bit signed   integer type with range -2147483648...2147483647
-#elif LONG_MAX == 2147483647L
-typedef unsigned long int   Uint32_t;   // guaranteed 32 bit unsigned integer type with range 0...4294967295
-typedef signed   long int   Int32_t;    // guaranteed 32 bit signed   integer type with range -2147483648...2147483647
-#else
-# error No 32 bit int type found. Tested: int, long
-#endif
-
-#if    defined __C99__                 // C9x has a type which is exact 64 bit
-typedef int64_t             Int64_t;
-typedef uint64_t            Uint64_t;
-typedef intmax_t            IntMax_t;
-typedef uintmax_t           UintMax_t;
-# define IntMax_MIN        -9223372036854775808
-# define IntMax_MAX         9223372036854775807
-# define UintMax_MAX       18446744073709551615
-# define UintMAX_FP(x)      (long double)(x)
-#elif  defined __GNUC__                // GCC uses long long as 64 bit
-typedef signed   long long  Int64_t;
-typedef unsigned long long  Uint64_t;
-typedef signed   long long  IntMax_t;
-typedef unsigned long long  UintMax_t;
-# define IntMax_MIN        -9223372036854775808LL
-# define IntMax_MAX         9223372036854775807LL
-# define UintMax_MAX       18446744073709551615LLU
-# define UintMAX_FP(x)      (long double)(x)
-#elif defined _MSC_VER
-typedef signed   __int64    Int64_t;
-typedef unsigned __int64    Uint64_t;
-typedef signed   __int64    IntMax_t;
-typedef unsigned __int64    UintMax_t;
-# define IntMax_MIN        -9223372036854775808I64
-# define IntMax_MAX         9223372036854775807I64
-# define UintMax_MAX       18446744073709551615UI64
-# define UintMAX_FP(x)      (long double)(IntMax_t)(x)
-#elif defined LLONG_MAX               // long long (when existing) is normally 64 bit
-typedef signed   long long  Int64_t;
-typedef unsigned long long  Uint64_t;
-typedef signed   long long  IntMax_t;
-typedef unsigned long long  UintMax_t;
-# define IntMax_MIN        -9223372036854775808LL
-# define IntMax_MAX         9223372036854775807LL
-# define UintMax_MAX       18446744073709551615LLU
-# define UintMAX_FP(x)      (long double)(x)
-#elif  LONG_MAX > 0xFFFFFFFFLU         // long is longer than 33 bit, assume 64 bit
-typedef signed   long       Int64_t;
-typedef unsigned long       Uint64_t;
-typedef signed   long       IntMax_t;
-typedef unsigned long       UintMax_t;
-# define IntMax_MIN        -9223372036854775808L
-# define IntMax_MAX         9223372036854775807L
-# define UintMax_MAX       18446744073709551615LU
-# define UintMAX_FP(x)      (long double)(x)
-#elif  defined _WIN32                  // Microsoft and Intel call it __int64
-typedef signed   __int64    Int64_t;
-typedef unsigned __int64    Uint64_t;
-typedef signed   __int64    IntMax_t;
-typedef unsigned __int64    UintMax_t;
-# define IntMax_MIN        -9223372036854775808I64
-# define IntMax_MAX         9223372036854775807I64
-# define UintMax_MAX       18446744073709551615UI64
-# define UintMAX_FP(x)      (long double)(IntMax_t)(x)
-#else
-# define NO_INT64_T                    // no type mapped to 64 bit integer
-typedef signed   long       IntMax_t;
-typedef unsigned long       UintMax_t;
-# define IntMax_MIN        -2147483648L
-# define IntMax_MAX         2147483647L
-# define UintMax_MAX        4294967295LU
-# define UintMAX_FP(x)      (long double)(x)
-#endif
-
-
-#if defined _WIN32  &&  !defined __GNUC__  &&  !defined __C99__
-typedef signed long         ssize_t;
-#endif
-
-#ifdef USE_ARRAY_PACK
-typedef signed char         Bool_t;     // ==0: false, !=0: true
-#else
-typedef signed int          Bool_t;     // ==0: false, !=0: true
-#endif
-typedef Uint32_t            Ibuf_t;     // type for input buffer, currently this type must be 32 bit
-typedef signed   char       Schar;      // at least -127...+127
-typedef unsigned char       Uchar;      // at least 0...255
-typedef signed   short int  Short;      // at least -32767...+32767, memory economic type
-typedef unsigned short int  Ushort;     // at least 0...65535, memory economic type
-typedef signed   int        Int;        // at least -32767...+32767, fast type
-typedef unsigned int        Uint;       // at least 0...65535, fast type
-typedef signed   long int   Long;       // at least -2147483647...+2147483647, but more is better
-typedef unsigned long int   Ulong;      // at least 0...4294967295, but more is better
-//                          size_t;     // size of memory objects
-//                          ptrdiff_t;  // pointer differences, may be larger than size_t
-typedef float               Float32_t;  // guaranteed 32 bit floating point type
-typedef double              Float64_t;  // guaranteed 64 bit floating point type
-typedef float               Float;      // fastest floating point type, memory economic (used for all PCM calculations)
-#define SIZEOF_Float  4                 // size of the type 'Float' in sizeof units
-typedef double              Double;     // floating point with extended precision (more than 32 bit mantissa)
-typedef long double         Ldouble;    // most exact floating point format
-typedef Int16_t             Int2x16_t [2];
-typedef Int32_t             Int2x32_t [2];
-
-#if   defined MAKE_16BIT  ||  defined MAKE_24BIT  ||  defined MAKE_32BIT
-# ifdef NO_INT64_T
-#   error No 64 bit int type found, needed for HQ 16...32 bit output
-# endif
-typedef Int2x32_t           Int2xSample_t;
-# if defined MAKE_32BIT
-#  define SAMPLE_SIZE        32
-#  define PROG_NAME          "mppdec32"
-#  define SAMPLE_SIZE_STRING " (32 bit HQ)"
-#  define Write_PCM(fd,p,b)  Write_PCM_HQ_2x32bit ( fd, p, b )
-#  define Synthese_Filter(Stream,offset,Vi,Yi,ch) \
-                            Synthese_Filter_32_C ( Stream, offset, Vi, Yi, ch )
-#  undef  USE_ESD_AUDIO
-# elif defined MAKE_24BIT
-#  define SAMPLE_SIZE        24
-#  define PROG_NAME          "mppdec24"
-#  define SAMPLE_SIZE_STRING " (24 bit HQ)"
-#  define Write_PCM(fd,p,b)  Write_PCM_HQ_2x24bit ( fd, p, b )
-#  define Synthese_Filter(Stream,offset,Vi,Yi,ch) \
-                            Synthese_Filter_32_C ( Stream, offset, Vi, Yi, ch )
-#  undef  USE_ESD_AUDIO
-# elif defined MAKE_16BIT
-#  define SAMPLE_SIZE        16
-#  define PROG_NAME          "mppdec16"
-#  define SAMPLE_SIZE_STRING " (16 bit HQ)"
-#  define Write_PCM(fd,p,b)  Write_PCM_HQ_2x16bit ( fd, p, b )
-#  define Synthese_Filter(Stream,offset,Vi,Yi,ch) \
-                            Synthese_Filter_32_C ( Stream, offset, Vi, Yi, ch )
-# endif
-#else
-typedef Int2x16_t           Int2xSample_t;
-# define SAMPLE_SIZE        16
-# define PROG_NAME          "mppdec"
-# define SAMPLE_SIZE_STRING ""
-# define Write_PCM(fd,p,b)  Write_PCM_2x16bit ( fd, p, b )
-# ifdef USE_ASM
-#  define Synthese_Filter(Stream,offset,Vi,Yi,ch) \
-                            Synthese_Filter_16 ( Stream, offset, Vi, Yi )
-# else
-#  define Synthese_Filter(Stream,offset,Vi,Yi,ch) \
-                            Synthese_Filter_16_C ( Stream, offset, Vi, Yi )
-# endif /* USE_ASM */
-#endif
-
-
-//// More complex types ////////////////////////////////////////////
-typedef struct {
-    Int    L [36];
-    Int    R [36];
-} Quant_t ;
-
-typedef struct {
-    Uint   L;
-    Uint   R;
-} UPair_t ;
-
-typedef struct {
-    Int    L;
-    Int    R;
-} Pair_t ;
-
-typedef struct {
-#ifdef USE_ARRAY_PACK
-    Schar  L;
-    Schar  R;
-#else
-    Int    L;
-    Int    R;
-#endif
-} CPair_t ;
-
-typedef Float     FloatArray [32];
-typedef UPair_t   UPairArray [32];
-typedef Pair_t    PairArray  [32];
-typedef CPair_t   CPairArray [32];
-typedef Float     SCFTriple   [3];
-typedef struct {
-#ifndef MPP_ENCODER
-    Uint32_t      Code;         // >=32 bit
-# ifdef USE_HUFF_PACK
-    Schar         Value;        // >= 7 bit
-    Uchar         Length;       // >= 4 bit
-# else
-    Int           Value;
-    Uint          Length;
-# endif
-#else
-# ifdef USE_HUFF_PACK
-    Uint8_t       Length;      // >=  4 bit
-    Uint8_t       ___;
-    Uint16_t      Code;        // >= 14 bit
-# else
-    Uint          Code;
-    Uint          Length;
-# endif
-#endif
-} Huffman_t ;
-
-typedef struct {
-    Uint          Code   : 16;  // >= 14 bit
-    Uint          Length :  8;  // >=  4 bit
-} HuffSrc_t ;
-
-typedef struct {
-    OFF_T         FileSize;
-    Int           GenreNo;
-    Int           TrackNo;
-    char          Genre   [128];
-    char          Year    [ 20];
-    char          Track   [  8];
-    char          Title   [256];
-    char          Artist  [256];
-    char          Album   [256];
-    char          Comment [512];
-} TagInfo_t ;
-
-typedef void  (*SyntheseFilter16_t) ( Int2x16_t* Stream, Int* const offset, Float* Vi, const FloatArray* Yi );
-typedef void  (*SyntheseFilter32_t) ( Int2x32_t* Stream, Int* const offset, Float* Vi, const FloatArray* Yi, int ch );
-typedef Int   (*HeaderWriter_t)     ( FILE_T outputFile, Ldouble  SampleFreq, Uint BitsPerSample, Uint Channels, Ulong SamplesPerChannel );
-
-#if defined MAKE_16BIT  ||  defined MAKE_24BIT  ||  defined MAKE_32BIT
-typedef struct {
-    const Float*  FilterCoeff;
-    Uint64_t      Mask;
-    Float64_t     Add;
-    Float         Dither;
-    Uint32_t      Overdrives;
-    Int64_t       MaxLevel;
-    Bool_t        NoShaping;
-    Float         ErrorHistory     [2] [16];       // max. 2 channels, 16th order Noise shaping
-    Float         DitherHistory    [2] [16];
-    Int32_t       LastRandomNumber [2];
-} dither_t;
-#else
-typedef struct {
-    Uint32_t      Overdrives;
-    Int32_t       MaxLevel;
-} dither_t;
-#endif
-
-
-//// Variables /////////////////////////////////////////////////////
-
-// decode.c
-extern Ibuf_t             InputBuff [IBUFSIZE]; // read buffer for the MP+ data stream
-extern size_t             InputCnt;             // current offset in this buffer
-
-// huffsv7.c
-extern Huffman_t          HuffHdr    [10];
-extern Huffman_t          HuffSCFI   [ 4];
-extern Huffman_t          HuffDSCF   [16];
-extern Huffman_t          HuffQ1 [2] [ 3*3*3];
-extern Huffman_t          HuffQ2 [2] [ 5*5];
-extern Huffman_t          HuffQ3 [2] [ 7];
-extern Huffman_t          HuffN3 [2] [ 7*7];
-extern Huffman_t          HuffQ4 [2] [ 9];
-extern Huffman_t          HuffQ5 [2] [15];
-extern Huffman_t          HuffQ6 [2] [31];
-extern Huffman_t          HuffQ7 [2] [63];
-extern Huffman_t          HuffN8 [2][127];
-extern const Huffman_t*   HuffQ  [2] [ 8];
-extern const Huffman_t*   HuffN  [2] [ 9];
-extern Uint8_t            LUT1_0  [1<< 6];
-extern Uint8_t            LUT1_1  [1<< 9];
-extern Uint8_t            LUT2_0  [1<< 7];
-extern Uint8_t            LUT2_1  [1<<10];
-extern Uint8_t            LUT3_0  [1<< 4];
-extern Uint8_t            LUT3_1  [1<< 5];
-extern Uint8_t            LUT4_0  [1<< 4];
-extern Uint8_t            LUT4_1  [1<< 5];
-extern Uint8_t            LUT5_0  [1<< 6];
-extern Uint8_t            LUT5_1  [1<< 8];
-extern Uint8_t            LUT6_0  [1<< 7];
-extern Uint8_t            LUT6_1  [1<< 7];
-extern Uint8_t            LUT7_0  [1<< 8];
-extern Uint8_t            LUT7_1  [1<< 8];
-extern Uint8_t            LUTDSCF [1<< 6];
-
-// huffsv46.c
-extern const Huffman_t*   Entropie      [18];
-extern const Huffman_t*   Region        [32];
-extern Huffman_t          SCFI_Bundle   [ 8];
-extern Huffman_t          DSCF_Entropie [13];
-
-// mppdec.c
-extern Float              Y_L      [36] [32];
-extern Float              Y_R      [36] [32];
-extern CPair_t            SCF_Index [3] [32];      // Scalefactor
-extern CPair_t            Res           [32];      // resolution steps of the subbands
-extern Quant_t            Q             [32];      // quantized samples
-extern CPair_t            SCFI          [32];      // transfer order of the SCF
-extern Bool_t             MS_Band       [32];      // subband-wise flag for M/S-signal guidance
-extern Bool_t             MS_used;                 // global flag for M/S-signal guidance
-extern Bool_t             IS_used;
-
-#define LITTLE                  0
-#define BIG                     1
-extern Bool_t                   output_endianess;
-#if   ENDIAN == HAVE_LITTLE_ENDIAN
-# define machine_endianess      LITTLE
-#elif ENDIAN == HAVE_BIG_ENDIAN
-# define machine_endianess      BIG
-#endif
-
-// requant.c
-extern Float              __SCF    [6 + 128];       // tabulated Scalefactors from -6 to +127
-#define SCF             ( __SCF + 6 )
-extern Int8_t             Q_bit         [32];       // number of bits to save the resolution (SV6)
-extern Int8_t             Q_res         [32] [16];  // Index -> resolution (SV6)
-extern Uint               Bitrate;
-extern Int                Min_Band;
-extern Int                Max_Band;
-extern Float              __Cc          [1 + 18];
-extern const Uint         __Dc          [1 + 18];
-#define Cc              ( __Cc + 1 )
-#define Dc              ( __Dc + 1 )
-
-// synthtab.c
-extern const Float        Cos64         [32];
-extern const Float        Di_opt        [32] [16];
-
-// stderr.c
-
-
-//// procedures/functions //////////////////////////////////////////
-// cpu_feat.c
-Bool_t Cdecl  Has_MMX                 ( void );
-Bool_t Cdecl  Has_SIMD                ( void );
-Bool_t Cdecl  Has_SIMD2               ( void );
-Bool_t Cdecl  Has_3DNow               ( void );
-
-// decode.c
-void       Bitstream_init             ( void );
-Ulong      BitsRead                   ( void );
-Uint32_t   Bitstream_read             ( Int  bits );
-Uint32_t   Bitstream_peek             ( Uint pos, Int bits );
-void       Bitstream_skip             ( Uint bits );
-Uint32_t   Bitstream_preview          ( Int  bits );  // same as above, but data doesn't get receipted yet
-void       Read_Bitstream_SV6         ( void );
-void       Read_Bitstream_SV7         ( void );
-void       Read_Bitstream_SV8         ( void );
-
-// http.c
-int        http_open                  ( const char* URL );
-
-// huffsv7.c
-void       Init_Huffman_Decoder_SV7   ( void );
-void       Init_Huffman_Encoder_SV7   ( void );
-
-// huffsv46.c
-void       Init_Huffman_Decoder_SV4_6 ( void );
-
-// id3tag.c
-Int        Read_ID3V1_Tags            ( FILE_T fp, TagInfo_t* tip );
-Int        Read_APE_Tags              ( FILE_T fp, TagInfo_t* tip );
-
-// requant.c
-void       Init_QuantTab              ( Int maximum_Band, Bool_t used_IS, Double amplification, Uint StreamVersion );
-
-// synth.c
-Uint32_t   random_int                 ( void );
-
-void Cdecl Calculate_New_V_i387       ( const Float* Sample, Float* V );
-void Cdecl Calculate_New_V_3DNow      ( const Float* Sample, Float* V );
-void Cdecl New_V_Helper2              ( Float* A, const Float* Sample );
-void Cdecl New_V_Helper3              ( Float* A, const Float* Sample );
-void Cdecl New_V_Helper4              ( Float* V );
-
-void Cdecl VectorMult_i387            ( void* buff, const Float* V );
-void Cdecl VectorMult_3DNow           ( void* buff, const Float* V );
-void Cdecl VectorMult_SIMD            ( void* buff, const Float* V );
-
-void       Synthese_Filter_16_C       ( Int2x16_t* Stream, Int* const offset, Float* Vi, const FloatArray* Yi );
-void       Synthese_Filter_32_C       ( Int2x32_t* Stream, Int* const offset, Float* Vi, const FloatArray* Yi, Uint channel );
-
-void Cdecl Reset_FPU                  ( void );
-void Cdecl Reset_FPU_3DNow            ( void );
-void Cdecl memcpy_dn_MMX              ( void* dst, const void* src, size_t words64byte  );
-void Cdecl memcpy_dn_SIMD             ( void* dst, const void* src, size_t words128byte );
-
-void       Init_Dither                ( Int bits, int shapingtype, Double dither );
-void       OverdriveReport            ( void );
-SyntheseFilter16_t
-           Get_Synthese_Filter        ( void );
-
-// tools.c
-size_t     Read_LittleEndians         ( FILE_T fp, Uint32_t* dst, size_t words32bit );
-void       Requantize_MidSideStereo   ( Int Stop_Band, const Bool_t* used_MS );
-void       Requantize_IntensityStereo ( Int Start_Band, Int Stop_Band );
-void       Resort_HuffTable           ( Huffman_t* const Table, const size_t elements, Int offset );
-void       Make_HuffTable             ( Huffman_t* dst, const HuffSrc_t* src, size_t len );
-void       Make_LookupTable           ( Uint8_t* LUT, size_t LUT_len, const Huffman_t* const Table, const size_t elements );
-size_t     complete_read              ( int fd, void* dest, size_t bytes );
-int        isdir                      ( const char* Name );
-void       Init_FPU                   ( void );
-
-// wave_out.c
-Int        Write_WAVE_Header          ( FILE_T outputFile, Ldouble SampleFreq, Uint BitsPerSample, Uint Channels, Ulong SamplesPerChannel );
-Int        Write_AIFF_Header          ( FILE_T outputFile, Ldouble SampleFreq, Uint BitsPerSample, Uint Channels, Ulong SamplesPerChannel );
-Int        Write_Raw_Header           ( FILE_T outputFile, Ldouble SampleFreq, Uint BitsPerSample, Uint Channels, Ulong SamplesPerChannel );
-Int        Set_DSP_OSS_Params         ( FILE_T outputFile, Ldouble SampleFreq, Uint BitsPerSample, Uint Channels );
-Int        Set_DSP_Sun_Params         ( FILE_T outputFile, Ldouble SampleFreq, Uint BitsPerSample, Uint Channels );
-Int        Set_ESD_Params             ( FILE_T dummyFile , Ldouble SampleFreq, Uint BitsPerSample, Uint Channels );
-Int        Set_WIN_Params             ( FILE_T dummyFile , Ldouble SampleFreq, Uint BitsPerSample, Uint Channels );
-Int        Set_IRIX_Params            ( FILE_T dummyFile , Ldouble SampleFreq, Uint BitsPerSample, Uint Channels );
-size_t     Write_PCM_2x16bit          ( FILE_T outputFile, Int2x16_t* data, size_t len );
-size_t     Write_PCM_HQ_2x16bit       ( FILE_T outputFile, Int2x32_t* data, size_t len );
-size_t     Write_PCM_HQ_2x24bit       ( FILE_T outputFile, Int2x32_t* data, size_t len );
-size_t     Write_PCM_HQ_2x32bit       ( FILE_T outputFile, Int2x32_t* data, size_t len );
-int        WIN_Play_Samples           ( const void* buff, size_t len );
-int        IRIX_Play_Samples          ( const void* buff, size_t len );
-int        WIN_Audio_close            ( void );
-int        IRIX_Audio_close           ( void );
-void       DisableSUID                ( void );
-void       EnableSUID                 ( void );
-
-// pipeopen.c
-FILE*      pipeopen                   ( const char* command, const char* filename );
-
-// stderr.c
-void       SetStderrSilent            ( Bool_t state );
-Bool_t     GetStderrSilent            ( void );
-int Cdecl  stderr_printf              ( const char* format, ... );
-
-// _setargv.c
-long       treewalk                   ( const char* start, const char** mask, int (*fn)(const char* filename, void* aux), void* aux );
-void       mysetargv                  ( int* argc, char*** argv, const char** extentions );
-
-#if ENDIAN == HAVE_BIG_ENDIAN
-
-# define ReadLE32(dst,psrc)       dst = *(Uint32_t*)(psrc)
-# define ReadBE32(dst,psrc)                           \
-       ((Uint8_t*)&(dst))[0] = ((Uint8_t*)(psrc))[3], \
-       ((Uint8_t*)&(dst))[1] = ((Uint8_t*)(psrc))[2], \
-       ((Uint8_t*)&(dst))[2] = ((Uint8_t*)(psrc))[1], \
-       ((Uint8_t*)&(dst))[3] = ((Uint8_t*)(psrc))[0]
-
-
-#elif defined __i386__           /* 486+ */
-
-#  define ReadBE32(dst,psrc)      __asm__ ( "bswap %0" : "=r" (dst) : "0" (*(Uint32_t*)(psrc)) )
-#  define ReadLE32(dst,psrc)       dst = *(Uint32_t*)(psrc)
-
-# else
-
-#  define ReadBE32(dst,psrc)                          \
-       ((Uint8_t*)&(dst))[0] = ((Uint8_t*)(psrc))[3], \
-       ((Uint8_t*)&(dst))[1] = ((Uint8_t*)(psrc))[2], \
-       ((Uint8_t*)&(dst))[2] = ((Uint8_t*)(psrc))[1], \
-       ((Uint8_t*)&(dst))[3] = ((Uint8_t*)(psrc))[0]
-#  define ReadLE32(dst,psrc)       dst = *(Uint32_t*)(psrc)
-
-# endif
-
-//// Profiler include //////////////////////////////////////////////
-#include "profile.h"
-
-#ifdef _MSC_VER
-#pragma warning ( disable : 4244 )
-#endif
-
-#endif /* MPPDEC_MPPDEC_H */
-
-/* end of mppdec.h */
Index: penc/branches/zorg/mppdec.vcproj
===================================================================
--- /mppenc/branches/zorg/mppdec.vcproj	(revision 40)
+++ 	(revision )
@@ -1,485 +1,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="mppdec"
-	SccProjectName=""
-	SccLocalPath="">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\Debug"
-			IntermediateDirectory=".\Debug"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				OptimizeForProcessor="2"
-				PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;MPP_DECODER"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				StructMemberAlignment="5"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Debug/mppdec.pch"
-				AssemblerListingLocation=".\Debug/"
-				ObjectFile=".\Debug/"
-				ProgramDataBaseFileName=".\Debug/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="ws2_32.lib odbc32.lib odbccp32.lib winmm.lib setargv.obj"
-				OutputFile=".\Debug/mppdec.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile=".\Debug/mppdec.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Debug/mppdec.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG MPP_DECODER"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\Release"
-			IntermediateDirectory=".\Release"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OptimizeForProcessor="2"
-				PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;MPP_DECODER"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				StructMemberAlignment="3"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Release/mppdec.pch"
-				AssemblerListingLocation=".\Release/"
-				ObjectFile=".\Release/"
-				ProgramDataBaseFileName=".\Release/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				CallingConvention="1"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="odbc32.lib odbccp32.lib winmm.lib ws2_32.lib setargv.obj"
-				OutputFile=".\Release/mppdec.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				ProgramDatabaseFile=".\Release/mppdec.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Release/mppdec.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG MPP_DECODER"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
-			<File
-				RelativePath="_setargv.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"
-						BrowseInformation="1"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="cpu_feat.nas">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCustomBuildTool"
-						Description="Assembling $(InputPath)"
-						CommandLine="NASMW -f win32 -o Debug/&quot;$(InputName)&quot;.obj &quot;$(InputPath)&quot;
-"
-						Outputs="Debug/$(InputName).obj"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCustomBuildTool"
-						Description="Assembling $(InputPath)"
-						CommandLine="&quot;NASMW&quot; -f win32 -o Release/&quot;$(InputName)&quot;.obj &quot;$(InputPath)&quot;
-"
-						Outputs="Release/$(InputName).obj"/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="decode.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"
-						BrowseInformation="1"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="http.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"
-						BrowseInformation="1"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="huffsv46.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"
-						BrowseInformation="1"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="huffsv7.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"
-						BrowseInformation="1"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="id3tag.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"
-						BrowseInformation="1"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="mppdec.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"
-						BrowseInformation="1"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="profile.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"
-						BrowseInformation="1"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="requant.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"
-						BrowseInformation="1"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="stderr.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"
-						BrowseInformation="1"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="synth.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"
-						BrowseInformation="1"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="synthasm.nas">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCustomBuildTool"
-						Description="Assembling $(InputPath)"
-						CommandLine="NASMW -d WIN32 -f win32 -o Debug/&quot;$(InputName)&quot;.obj &quot;$(InputPath)&quot;
-"
-						Outputs="Debug/$(InputName).obj"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCustomBuildTool"
-						Description="Assembling $(InputPath)"
-						CommandLine="&quot;NASMW&quot; -d WIN32 -f win32 -o Release/&quot;$(InputName)&quot;.obj &quot;$(InputPath)&quot; -l &quot;$(InputName)&quot;.lst
-"
-						Outputs="Release/$(InputName).obj"/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="synthtab.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"
-						BrowseInformation="1"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="tools.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"
-						BrowseInformation="1"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="wave_out.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"
-						BrowseInformation="1"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl">
-			<File
-				RelativePath="config.h">
-			</File>
-			<File
-				RelativePath="Makefile">
-			</File>
-			<File
-				RelativePath="mpp.h">
-			</File>
-			<File
-				RelativePath="mppdec.h">
-			</File>
-			<File
-				RelativePath="profile.h">
-			</File>
-			<File
-				RelativePath="tools.inc">
-			</File>
-			<File
-				RelativePath="version">
-			</File>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: /mppenc/branches/zorg/mppenc.c
===================================================================
--- /mppenc/branches/zorg/mppenc.c	(revision 40)
+++ /mppenc/branches/zorg/mppenc.c	(revision 41)
@@ -128,5 +128,5 @@
 
     fflush (stdout);
-    while ( (c = getch() ) <= ' ' )
+    while ( (c = _getch() ) <= ' ' )
         ;
     return c;
@@ -1929,5 +1929,5 @@
     if ( argc < 2  ||  0==strcmp (argv[1],"-h")  ||  0==strcmp (argv[1],"-?")  ||  0==strcmp (argv[1],"--help") ) {
         SetQualityParams (5.0);
-        dup2 ( 1, 2 );
+        _dup2 ( 1, 2 );
         shorthelp ();
         return 1;
@@ -1936,5 +1936,5 @@
     if ( 0==strcmp (argv[1],"--longhelp")  ||  0==strcmp (argv[1],"-??") ) {
         SetQualityParams (5.0);
-        dup2 ( 1, 2 );
+        _dup2 ( 1, 2 );
         longhelp ();
         return 1;
Index: penc/branches/zorg/mppenc.dsp
===================================================================
--- /mppenc/branches/zorg/mppenc.dsp	(revision 40)
+++ 	(revision )
@@ -1,254 +1,0 @@
-# Microsoft Developer Studio Project File - Name="mppenc" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=mppenc - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "mppenc.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "mppenc.mak" CFG="mppenc - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "mppenc - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "mppenc - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "mppenc - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /Gr /MT /W3 /O2 /Ob2 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MPP_ENCODER" /FD /GM /GL /c
-# ADD BASE RSC /l 0x407 /d "NDEBUG"
-# ADD RSC /l 0x407 /d "NDEBUG MPP_ENCODER"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib setargv.obj winmm.lib /nologo /subsystem:console /machine:IX86 /LTCG
-# SUBTRACT LINK32 /pdb:none
-
-!ELSEIF  "$(CFG)" == "mppenc - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /G5 /W3 /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MPP_ENCODER" /YX /FD /c
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG MPP_ENCODER"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj winmm.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "mppenc - Win32 Release"
-# Name "mppenc - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\analy_filter.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\ans.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\bitstream.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\cvd.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\encode_sv7.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\fastmath.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\fft4g.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\fft4gasm.nas
-
-!IF  "$(CFG)" == "mppenc - Win32 Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "mppenc - Win32 Debug"
-
-# PROP Exclude_From_Build 1
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\fft_routines.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\huffsv7.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\keyboard.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\mppenc.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\pipeopen.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\psy.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\psy_tab.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\quant.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\stderr.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\tags.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\tools.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\wave_in.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\winmsg.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\fastmath.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Makefile
-# End Source File
-# Begin Source File
-
-SOURCE=.\minimax.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\mppenc.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\predict.h
-# End Source File
-# End Group
-# Begin Group "Design Proposal"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=".\A-frame.txt"
-# End Source File
-# Begin Source File
-
-SOURCE=".\A-gedanken.txt"
-# End Source File
-# Begin Source File
-
-SOURCE=".\A-num.txt"
-# End Source File
-# Begin Source File
-
-SOURCE=".\A-pflichtenheft.txt"
-# End Source File
-# Begin Source File
-
-SOURCE=".\A-psycho.txt"
-# End Source File
-# Begin Source File
-
-SOURCE=".\A-quant.txt"
-# End Source File
-# Begin Source File
-
-SOURCE=".\A-sample.txt"
-# End Source File
-# Begin Source File
-
-SOURCE=".\A-stereo.txt"
-# End Source File
-# Begin Source File
-
-SOURCE=.\website\coupling.txt
-# End Source File
-# Begin Source File
-
-SOURCE=.\website\sv8file.txt
-# End Source File
-# End Group
-# End Target
-# End Project
Index: /mppenc/branches/zorg/mppenc.h
===================================================================
--- /mppenc/branches/zorg/mppenc.h	(revision 40)
+++ /mppenc/branches/zorg/mppenc.h	(revision 41)
Index: penc/branches/zorg/mppenc.mak
===================================================================
--- /mppenc/branches/zorg/mppenc.mak	(revision 40)
+++ 	(revision )
@@ -1,334 +1,0 @@
-# Microsoft Developer Studio Generated NMAKE File, Based on mppenc.dsp
-!IF "$(CFG)" == ""
-CFG=mppenc - Win32 Debug
-!MESSAGE No configuration specified. Defaulting to mppenc - Win32 Debug.
-!ENDIF
-
-!IF "$(CFG)" != "mppenc - Win32 Release" && "$(CFG)" != "mppenc - Win32 Debug"
-!MESSAGE Invalid configuration "$(CFG)" specified.
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "mppenc.mak" CFG="mppenc - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "mppenc - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "mppenc - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-!ERROR An invalid configuration is specified.
-!ENDIF
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE
-NULL=nul
-!ENDIF
-
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "mppenc - Win32 Release"
-
-OUTDIR=.\Release
-INTDIR=.\Release
-# Begin Custom Macros
-OutDir=.\Release
-# End Custom Macros
-
-ALL : "$(OUTDIR)\mppenc.exe"
-
-
-CLEAN :
-        -@erase "$(INTDIR)\analy_filter.obj"
-        -@erase "$(INTDIR)\ans.obj"
-        -@erase "$(INTDIR)\bitstream.obj"
-        -@erase "$(INTDIR)\cvd.obj"
-        -@erase "$(INTDIR)\fastmath.obj"
-        -@erase "$(INTDIR)\fft4g.obj"
-        -@erase "$(INTDIR)\fft_routines.obj"
-        -@erase "$(INTDIR)\huffsv7.obj"
-        -@erase "$(INTDIR)\mppenc.obj"
-        -@erase "$(INTDIR)\pipeopen.obj"
-        -@erase "$(INTDIR)\psy.obj"
-        -@erase "$(INTDIR)\psy_tab.obj"
-        -@erase "$(INTDIR)\quant.obj"
-        -@erase "$(INTDIR)\stderr.obj"
-        -@erase "$(INTDIR)\encode_sv7.obj"
-        -@erase "$(INTDIR)\tools.obj"
-        -@erase "$(INTDIR)\vc60.idb"
-        -@erase "$(INTDIR)\wave_in.obj"
-        -@erase "$(INTDIR)\winmsg.obj"
-        -@erase "$(OUTDIR)\mppenc.exe"
-
-"$(OUTDIR)" :
-    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-CPP_PROJ=/nologo /Gr /Zp4 /ML /W3 /O2 /Ob2 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MPP_ENCODER" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GM /c
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(OUTDIR)\mppenc.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj winmm.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\mppenc.pdb" /machine:I386 /out:"$(OUTDIR)\mppenc.exe"
-LINK32_OBJS= \
-        "$(INTDIR)\analy_filter.obj" \
-        "$(INTDIR)\ans.obj" \
-        "$(INTDIR)\bitstream.obj" \
-        "$(INTDIR)\cvd.obj" \
-        "$(INTDIR)\fastmath.obj" \
-        "$(INTDIR)\fft4g.obj" \
-        "$(INTDIR)\fft_routines.obj" \
-        "$(INTDIR)\huffsv7.obj" \
-        "$(INTDIR)\mppenc.obj" \
-        "$(INTDIR)\pipeopen.obj" \
-        "$(INTDIR)\psy.obj" \
-        "$(INTDIR)\psy_tab.obj" \
-        "$(INTDIR)\quant.obj" \
-        "$(INTDIR)\stderr.obj" \
-        "$(INTDIR)\encode_sv7.obj" \
-        "$(INTDIR)\tools.obj" \
-        "$(INTDIR)\wave_in.obj" \
-        "$(INTDIR)\winmsg.obj" \
-        "$(INTDIR)\fft4gasm.obj"
-
-"$(OUTDIR)\mppenc.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
-    $(LINK32) @<<
-  $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF  "$(CFG)" == "mppenc - Win32 Debug"
-
-OUTDIR=.\Debug
-INTDIR=.\Debug
-# Begin Custom Macros
-OutDir=.\Debug
-# End Custom Macros
-
-ALL : "$(OUTDIR)\mppenc.exe"
-
-
-CLEAN :
-        -@erase "$(INTDIR)\analy_filter.obj"
-        -@erase "$(INTDIR)\ans.obj"
-        -@erase "$(INTDIR)\bitstream.obj"
-        -@erase "$(INTDIR)\cvd.obj"
-        -@erase "$(INTDIR)\fastmath.obj"
-        -@erase "$(INTDIR)\fft4g.obj"
-        -@erase "$(INTDIR)\fft_routines.obj"
-        -@erase "$(INTDIR)\huffsv7.obj"
-        -@erase "$(INTDIR)\mppenc.obj"
-        -@erase "$(INTDIR)\pipeopen.obj"
-        -@erase "$(INTDIR)\psy.obj"
-        -@erase "$(INTDIR)\psy_tab.obj"
-        -@erase "$(INTDIR)\quant.obj"
-        -@erase "$(INTDIR)\stderr.obj"
-        -@erase "$(INTDIR)\encode_sv7.obj"
-        -@erase "$(INTDIR)\tools.obj"
-        -@erase "$(INTDIR)\vc60.idb"
-        -@erase "$(INTDIR)\vc60.pdb"
-        -@erase "$(INTDIR)\wave_in.obj"
-        -@erase "$(INTDIR)\winmsg.obj"
-        -@erase "$(OUTDIR)\mppenc.exe"
-        -@erase "$(OUTDIR)\mppenc.ilk"
-        -@erase "$(OUTDIR)\mppenc.pdb"
-
-"$(OUTDIR)" :
-    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-CPP_PROJ=/nologo /G5 /MLd /W3 /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MPP_ENCODER" /Fp"$(INTDIR)\mppenc.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(OUTDIR)\mppenc.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj winmm.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\mppenc.pdb" /debug /machine:I386 /out:"$(OUTDIR)\mppenc.exe" /pdbtype:sept
-LINK32_OBJS= \
-        "$(INTDIR)\analy_filter.obj" \
-        "$(INTDIR)\ans.obj" \
-        "$(INTDIR)\bitstream.obj" \
-        "$(INTDIR)\cvd.obj" \
-        "$(INTDIR)\fastmath.obj" \
-        "$(INTDIR)\fft4g.obj" \
-        "$(INTDIR)\fft_routines.obj" \
-        "$(INTDIR)\huffsv7.obj" \
-        "$(INTDIR)\mppenc.obj" \
-        "$(INTDIR)\pipeopen.obj" \
-        "$(INTDIR)\psy.obj" \
-        "$(INTDIR)\psy_tab.obj" \
-        "$(INTDIR)\quant.obj" \
-        "$(INTDIR)\stderr.obj" \
-        "$(INTDIR)\encode_sv7.obj" \
-        "$(INTDIR)\tools.obj" \
-        "$(INTDIR)\wave_in.obj" \
-        "$(INTDIR)\winmsg.obj" \
-        "$(INTDIR)\fft4gasm.obj"
-
-"$(OUTDIR)\mppenc.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
-    $(LINK32) @<<
-  $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ENDIF
-
-.c{$(INTDIR)}.obj::
-   $(CPP) @<<
-   $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.obj::
-   $(CPP) @<<
-   $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.obj::
-   $(CPP) @<<
-   $(CPP_PROJ) $<
-<<
-
-.c{$(INTDIR)}.sbr::
-   $(CPP) @<<
-   $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.sbr::
-   $(CPP) @<<
-   $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.sbr::
-   $(CPP) @<<
-   $(CPP_PROJ) $<
-<<
-
-
-!IF "$(NO_EXTERNAL_DEPS)" != "1"
-!IF EXISTS("mppenc.dep")
-!INCLUDE "mppenc.dep"
-!ELSE
-!MESSAGE Warning: cannot find "mppenc.dep"
-!ENDIF
-!ENDIF
-
-
-!IF "$(CFG)" == "mppenc - Win32 Release" || "$(CFG)" == "mppenc - Win32 Debug"
-SOURCE=.\analy_filter.c
-
-"$(INTDIR)\analy_filter.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\ans.c
-
-"$(INTDIR)\ans.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\bitstream.c
-
-"$(INTDIR)\bitstream.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\cvd.c
-
-"$(INTDIR)\cvd.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\fastmath.c
-
-"$(INTDIR)\fastmath.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\fft4g.c
-
-"$(INTDIR)\fft4g.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\fft4gasm.nas
-
-!IF  "$(CFG)" == "mppenc - Win32 Release"
-
-InputPath=.\fft4gasm.nas
-InputName=fft4gasm
-
-"$(INTDIR)\fft4gasm.obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-        <<tempfile.bat
-        @echo off
-        "C:/PROGRAM FILES/NASM/NASMW" -d WIN32 -f win32 -o Release/$(InputName).obj $(InputPath) -l $(InputName).lst
-<<
-
-
-!ELSEIF  "$(CFG)" == "mppenc - Win32 Debug"
-
-InputPath=.\fft4gasm.nas
-InputName=fft4gasm
-
-"$(INTDIR)\fft4gasm.obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-        <<tempfile.bat
-        @echo off
-        "C:/PROGRAM FILES/NASM/NASMW" -d WIN32 -f win32 -o Debug/$(InputName).obj $(InputPath)
-<<
-
-
-!ENDIF
-
-SOURCE=.\fft_routines.c
-
-"$(INTDIR)\fft_routines.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\huffsv7.c
-
-"$(INTDIR)\huffsv7.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\mppenc.c
-
-"$(INTDIR)\mppenc.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\pipeopen.c
-
-"$(INTDIR)\pipeopen.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\psy.c
-
-"$(INTDIR)\psy.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\psy_tab.c
-
-"$(INTDIR)\psy_tab.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\quant.c
-
-"$(INTDIR)\quant.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\stderr.c
-
-"$(INTDIR)\stderr.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\encode_sv7.c
-
-"$(INTDIR)\encode_sv7.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\tools.c
-
-"$(INTDIR)\tools.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\wave_in.c
-
-"$(INTDIR)\wave_in.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\winmsg.c
-
-"$(INTDIR)\winmsg.obj" : $(SOURCE) "$(INTDIR)"
-
-
-
-!ENDIF
Index: penc/branches/zorg/mppenc.plg
===================================================================
--- /mppenc/branches/zorg/mppenc.plg	(revision 40)
+++ 	(revision )
@@ -1,16 +1,0 @@
-<html>
-<body>
-<pre>
-<h1>Build Log</h1>
-<h3>
---------------------Configuration: mppenc - Win32 Release--------------------
-</h3>
-<h3>Command Lines</h3>
-
-
-
-<h3>Results</h3>
-mppenc.exe - 0 error(s), 0 warning(s)
-</pre>
-</body>
-</html>
Index: penc/branches/zorg/mppenc.vcproj
===================================================================
--- /mppenc/branches/zorg/mppenc.vcproj	(revision 40)
+++ 	(revision )
@@ -1,556 +1,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="mppenc"
-	SccProjectName=""
-	SccLocalPath="">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\Debug"
-			IntermediateDirectory=".\Debug"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				OptimizeForProcessor="1"
-				PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;MPP_ENCODER"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Debug/mppenc.pch"
-				AssemblerListingLocation=".\Debug/"
-				ObjectFile=".\Debug/"
-				ProgramDataBaseFileName=".\Debug/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="odbc32.lib odbccp32.lib setargv.obj winmm.lib"
-				OutputFile=".\Debug/mppenc.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile=".\Debug/mppenc.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Debug/mppenc.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG MPP_ENCODER"
-				Culture="1031"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\Release"
-			IntermediateDirectory=".\Release"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/GM "
-				Optimization="2"
-				InlineFunctionExpansion="2"
-				PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;MPP_ENCODER"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				StructMemberAlignment="3"
-				EnableFunctionLevelLinking="TRUE"
-				PrecompiledHeaderFile=".\Release/mppenc.pch"
-				AssemblerListingLocation=".\Release/"
-				ObjectFile=".\Release/"
-				ProgramDataBaseFileName=".\Release/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				CallingConvention="1"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="odbc32.lib odbccp32.lib setargv.obj winmm.lib"
-				OutputFile=".\Release/mppenc.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				ProgramDatabaseFile=".\Release/mppenc.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Release/mppenc.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG MPP_ENCODER"
-				Culture="1031"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="">
-			<File
-				RelativePath="analy_filter.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="ans.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="bitstream.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="cvd.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="encode_sv7.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="fastmath.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="fft4g.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="fft4gasm.nas">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&quot;NASMW.exe&quot; -d WIN32 -f win32 -o Debug/&quot;$(InputName)&quot;.obj &quot;$(InputPath)&quot;
-"
-						Outputs="Debug/$(InputName).obj"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCustomBuildTool"
-						CommandLine="&quot;NASMW&quot; -d WIN32 -f win32 -o Release/&quot;$(InputName)&quot;.obj &quot;$(InputPath)&quot; -l &quot;$(InputName)&quot;.lst
-"
-						Outputs="Release/$(InputName).obj"/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="fft_routines.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="huffsv7.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="keyboard.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="mppenc.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="pipeopen.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="psy.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="psy_tab.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="quant.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="stderr.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="tags.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="tools.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="wave_in.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="winmsg.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="">
-			<File
-				RelativePath="fastmath.h">
-			</File>
-			<File
-				RelativePath="Makefile">
-			</File>
-			<File
-				RelativePath="minimax.h">
-			</File>
-			<File
-				RelativePath="mppenc.h">
-			</File>
-			<File
-				RelativePath="predict.h">
-			</File>
-		</Filter>
-		<Filter
-			Name="Design Proposal"
-			Filter="">
-			<File
-				RelativePath="A-frame.txt">
-			</File>
-			<File
-				RelativePath="A-gedanken.txt">
-			</File>
-			<File
-				RelativePath="A-num.txt">
-			</File>
-			<File
-				RelativePath="A-pflichtenheft.txt">
-			</File>
-			<File
-				RelativePath="A-psycho.txt">
-			</File>
-			<File
-				RelativePath="A-quant.txt">
-			</File>
-			<File
-				RelativePath="A-sample.txt">
-			</File>
-			<File
-				RelativePath="A-stereo.txt">
-			</File>
-			<File
-				RelativePath="website\coupling.txt">
-			</File>
-			<File
-				RelativePath="website\sv8file.txt">
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: penc/branches/zorg/mppsplit.dsp
===================================================================
--- /mppenc/branches/zorg/mppsplit.dsp	(revision 40)
+++ 	(revision )
@@ -1,100 +1,0 @@
-# Microsoft Developer Studio Project File - Name="mppsplit" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=mppsplit - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "mppsplit.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "mppsplit.mak" CFG="mppsplit - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "mppsplit - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "mppsplit - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "mppsplit - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "mppsplit___Win32_Release"
-# PROP BASE Intermediate_Dir "mppsplit___Win32_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "mppsplit___Win32_Release"
-# PROP Intermediate_Dir "mppsplit___Win32_Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "mppsplit - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "mppsplit___Win32_Debug"
-# PROP BASE Intermediate_Dir "mppsplit___Win32_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ  /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ  /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "mppsplit - Win32 Release"
-# Name "mppsplit - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\mppsplit.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
Index: penc/branches/zorg/mppsplit.vcproj
===================================================================
--- /mppenc/branches/zorg/mppsplit.vcproj	(revision 40)
+++ 	(revision )
@@ -1,166 +1,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="mppsplit"
-	SccProjectName=""
-	SccLocalPath="">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\Debug"
-			IntermediateDirectory=".\Debug"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Debug/mppsplit.pch"
-				AssemblerListingLocation=".\Debug/"
-				ObjectFile=".\Debug/"
-				ProgramDataBaseFileName=".\Debug/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=".\Debug/mppsplit.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile=".\Debug/mppsplit.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Debug/mppsplit.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\mppsplit___Win32_Release"
-			IntermediateDirectory=".\mppsplit___Win32_Release"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\mppsplit___Win32_Release/mppsplit.pch"
-				AssemblerListingLocation=".\mppsplit___Win32_Release/"
-				ObjectFile=".\mppsplit___Win32_Release/"
-				ProgramDataBaseFileName=".\mppsplit___Win32_Release/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=".\mppsplit___Win32_Release/mppsplit.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				ProgramDatabaseFile=".\mppsplit___Win32_Release/mppsplit.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\mppsplit___Win32_Release/mppsplit.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
-			<File
-				RelativePath="mppsplit.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: penc/branches/zorg/msr.h
===================================================================
--- /mppenc/branches/zorg/msr.h	(revision 40)
+++ 	(revision )
@@ -1,10 +1,0 @@
-/* You only need this if your gcc doesn't have this file */
-
-#define rdmsr(msr,val1,val2)     __asm__ __volatile__ ("rdmsr" : "=a" (val1), "=d" (val2) : "c" (msr))
-#define wrmsr(msr,val1,val2)     __asm__ __volatile__ ("wrmsr" : /* no outputs */ : "c" (msr), "a" (val1), "d" (val2))
-#define rdtsc(low,high)          __asm__ __volatile__ ("rdtsc" : "=a" (low), "=d" (high))
-#define rdtscl(low)              __asm__ __volatile__ ("rdtsc" : "=a" (low) : : "edx")
-#define rdtscll(val)             __asm__ __volatile__ ("rdtsc" : "=A" (val))
-#define rdpmc(counter,low,high)  __asm__ __volatile__ ("rdpmc" : "=a" (low), "=d" (high)  : "c" (counter))
-
-/* end of msr.h */
Index: penc/branches/zorg/name.c
===================================================================
--- /mppenc/branches/zorg/name.c	(revision 40)
+++ 	(revision )
@@ -1,250 +1,0 @@
-#define MPP_ENCODER
-#include "mppdec.h"
-#include <ctype.h>
-
-
-typedef struct {
-    unsigned char  Artist [512];
-    unsigned char  Title  [512];
-    unsigned char  Album  [512];
-    unsigned char  Year   [  5];
-    unsigned int   Number;
-} taginfo_t;
-
-
-static int
-xdigit ( char c )
-{
-    if ( (unsigned int )(c-'0') < 10 )
-        return c-'0';
-    if ( (unsigned int )(c-'A') < 6 )
-        return c-'A'+10;
-    return -1;
-}
-
-
-static void
-percent ( char* p )
-{
-    char* q = p;
-
-    for (; *p; ) {
-        if ( p[0] == '%'  &&  xdigit(p[1]) >= 0  &&  xdigit(p[2]) >= 0 )
-            *q++ = 16*xdigit(p[1]) + xdigit(p[2]), p += 3;
-        else if (p[0] == '_')
-            *q++ = ' ', p++;
-        else
-            *q++ = *p++;
-    }
-    *q = '\0';
-}
-
-
-static char*
-separator ( char* s )
-{
-    while (*s) {
-        if ( s[0] == PATH_SEP ) {
-            s[0] = '\0';
-            return s+1;
-        }
-        if ( (s[0]==' ' || s[0]=='_') && s[1]=='-' && s[2]=='-' && (s[3]==' ' || s[3]=='_') ) {
-            s[0] = '\0';
-            return s+4;
-        }
-        s++;
-    }
-    return NULL;
-}
-
-
-static int
-IsIndexType1 ( const char* s )
-{
-    if ( s[0]=='[' && isdigit(s[1])  && isdigit(s[2]) && s[3]==']' && (s[4]==' ' || s[4]=='_') )
-        return 10*s[1]+s[2]-11*'0';
-    if ( 0 == strcmp (s, "[00]") )
-        return 0;
-    return -1;
-}
-
-
-static int
-IsIndexType2 ( const char* s )
-{
-    if ( isdigit(s[0])  && isdigit(s[1]) && s[2] == '\0' )
-        return 10*s[0]+s[1]-11*'0';
-    return -1;
-}
-
-typedef int (*idxfn) (const char*);
-
-int
-ParseName ( const char* filename, taginfo_t* const T )
-{
-    unsigned char*  Components    [64];
-    idxfn           fn             [2] = { IsIndexType1, IsIndexType2 };
-    int             Ci                 = 0;
-    char            Path [PATHLEN_MAX] = "";
-    char            Name [PATHLEN_MAX];
-    char*           p;
-    int             i;
-    int             j;
-#if DRIVE_SEP != '\0'
-    char            Drive           = '@';
-#endif
-
-
-#if DRIVE_SEP != '\0'
-    // drive specified?
-    if ( isalpha (filename[0])  &&  filename[1] == DRIVE_SEP ) {
-        Drive = filename[0];
-        filename += 2;
-    }
-#endif
-
-    if ( filename[0] != PATH_SEP ) {
-        // no absolute path, so get the current folder for this drive
-        p = Path;
-#if DRIVE_SEP != '\0'
-# if defined _WIN32
-        _getdcwd  ( Drive & 0x1F, Path, sizeof Path );
-# else
-        getcurdir ( Drive & 0x1F, Path );
-# endif
-        if ( isalpha (p[0])  &&  p[1] == DRIVE_SEP )
-            p += 2;
-#else
-        getcwd ( Path, sizeof Path );
-#endif
-        // parse the current folder
-        while ( p != NULL  &&  *p != '\0' ) {
-            Components [Ci++] = p;
-            p = separator ( p );
-        }
-    }
-
-    // parse the filename
-    strcpy ( Name, filename );
-    p = Name;
-    while ( p != NULL  &&  *p != '\0' ) {
-        Components [Ci++] = p;
-        p = separator ( p );
-    }
-
-    // remove ".", ".." and names from file formats
-    for ( i = j = 0; i < Ci; i++ )
-        if      ( 0 == strcmp (Components [i], ""   ) )
-            ;
-        else if ( 0 == strcmp (Components [i], "."  ) )
-            ;
-        else if ( 0 == strcmp (Components [i], "wav") )
-            ;
-        else if ( 0 == strcmp (Components [i], "pac") )
-            ;
-        else if ( 0 == strcmp (Components [i], "mpc") )
-            ;
-        else if ( 0 == strcmp (Components [i], "mpp") )
-            ;
-        else if ( 0 == strcmp (Components [i], "mp+") )
-            ;
-        else if ( 0 == strcmp (Components [i], "mp3") )
-            ;
-        else if ( 0 == strcmp (Components [i], ".." ) )
-            j -= j ? 1 : 0;
-        else
-             Components [j++] = Components [i];
-    Ci = j;
-
-    // remove file extension
-    p = strrchr ( Components [Ci-1], '.');
-    if ( p != NULL )
-        *p = '\0';
-
-    // Merging of (CD 1), (CD 1/7), (CD 1/12) is still missing
-    // Decoding of %XX and "_" is still missing
-
-    T->Year  [0] = '\0';
-    T->Artist[0] = '\0';
-    T->Album [0] = '\0';
-    T->Title [0] = '\0';
-    T->Number    = -1;
-
-    if ( fn[0] ( Components [Ci-1]) >= 0 ) {
-        strcpy ( T->Album , Components [Ci-2] );
-        strcpy ( T->Artist, Components [Ci-3] );
-        strcpy ( T->Title , strlen (Components [Ci-1]) >= 5  ?  Components [Ci-1]+5  :  (unsigned char*)"" );
-        T->Number = fn[0] ( Components [Ci-1]);
-        goto okay;
-    }
-    if ( fn[0] ( Components [Ci-2]) >= 0 ) {
-        strcpy ( T->Album , Components [Ci-3] );
-        strcpy ( T->Artist, Components [Ci-2]+5 );
-        strcpy ( T->Title , Components [Ci-1] );
-        T->Number = fn[0] ( Components [Ci-2]);
-        goto okay;
-    }
-
-
-    if ( fn[1] ( Components [Ci-1]) == 0 ) {
-        strcpy ( T->Album , Components [Ci-2] );
-        strcpy ( T->Artist, Components [Ci-3] );
-        strcpy ( T->Title , ""                );
-        T->Number = 0;
-        goto okay;
-    }
-    if ( fn[1] ( Components [Ci-2]) >= 0 ) {
-        strcpy ( T->Album , Components [Ci-3] );
-        strcpy ( T->Artist, Components [Ci-4] );
-        strcpy ( T->Title , Components [Ci-1] );
-        T->Number = fn[1] ( Components [Ci-2]);
-        goto okay;
-    }
-    if ( fn[1] ( Components [Ci-3]) >= 0 ) {
-        strcpy ( T->Album , Components [Ci-4] );
-        strcpy ( T->Artist, Components [Ci-2] );
-        strcpy ( T->Title , Components [Ci-1] );
-        T->Number = fn[1] ( Components [Ci-3]);
-        goto okay;
-    }
-
-    for ( i = 0; i < Ci; i++)
-        printf ( "'%s' ", Components [i] );
-    printf ( "\n" );
-    return 1;
-
-okay:
-    T->Year[0] = '\0';
-    if ( strlen (T->Album) >= 8 ) {
-        p = T->Album + strlen (T->Album) - 7;
-        if (p[0] == ' ' && p[1]=='(' && p[6]=='1') {
-            i = atoi (p+2);
-            if ( i >= 1900 && i <= 2019 ) {
-                sprintf (T->Year, "%4u", i);
-                p[0] = '\0';
-            }
-        }
-    }
-    percent (T->Album);
-    percent (T->Artist);
-    percent (T->Title);
-    return 0;
-}
-
-
-int
-main ( int argc, char** argv )
-{
-    taginfo_t     T;
-    const char*   extentions [] = { ".mpc", ".mp+", ".mpp", ".wav", ".ape", ".pac", NULL };
-
-    mysetargv ( &argc, &argv, extentions );
-
-    while ( *++argv ) {
-        fprintf ( stderr, "%s\n", *argv );
-        ParseName (*argv, &T);
-        printf ( "%-40.40s %-40.40s %4.4s [%02d] %s\n", T.Artist, T.Album, T.Year, T.Number, T.Title );
-    }
-
-    return 0;
-}
Index: penc/branches/zorg/name.dsp
===================================================================
--- /mppenc/branches/zorg/name.dsp	(revision 40)
+++ 	(revision )
@@ -1,112 +1,0 @@
-# Microsoft Developer Studio Project File - Name="name" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=name - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "name.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "name.mak" CFG="name - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "name - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "name - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "name - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "name - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "name - Win32 Release"
-# Name "name - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\_setargv.c
-# ADD CPP /D "MPP_DECODER"
-# End Source File
-# Begin Source File
-
-SOURCE=.\name.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\tools.c
-# ADD CPP /D "MPP_DECODER"
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
Index: penc/branches/zorg/name.vcproj
===================================================================
--- /mppenc/branches/zorg/name.vcproj	(revision 40)
+++ 	(revision )
@@ -1,202 +1,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="name"
-	SccProjectName=""
-	SccLocalPath="">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\Release"
-			IntermediateDirectory=".\Release"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Release/name.pch"
-				AssemblerListingLocation=".\Release/"
-				ObjectFile=".\Release/"
-				ProgramDataBaseFileName=".\Release/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=".\Release/name.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				ProgramDatabaseFile=".\Release/name.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Release/name.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\Debug"
-			IntermediateDirectory=".\Debug"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Debug/name.pch"
-				AssemblerListingLocation=".\Debug/"
-				ObjectFile=".\Debug/"
-				ProgramDataBaseFileName=".\Debug/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=".\Debug/name.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile=".\Debug/name.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Debug/name.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
-			<File
-				RelativePath="_setargv.c">
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions="MPP_DECODER"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions="MPP_DECODER"
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="name.c">
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="tools.c">
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions="MPP_DECODER"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions="MPP_DECODER"
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: penc/branches/zorg/pns.c
===================================================================
--- /mppenc/branches/zorg/pns.c	(revision 40)
+++ 	(revision )
@@ -1,201 +1,0 @@
-#include <stdio.h>
-#include <math.h>
-
-float X [18] = {
-    18.000000f,         // 0.
-    11.981016f,
-     8.965634f,
-     7.172353f,
-     5.962646f,
-     5.109376f,
-     4.470957f,
-     3.966050f,
-     3.569583f,
-     3.241481f,
-     2.970905f,
-     2.740498f,
-     2.547215f,
-     2.374246f,
-     2.224069f,
-     2.092965f,
-     1.978325f,
-     1.873230f,         // 1.
-} ;
-
-#define M_PI    3.14159265358979
-
-static const  unsigned char    Parity [256] = {  // parity
-    0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,
-    1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,
-    1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,
-    0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,
-    1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,
-    0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,
-    0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,
-    1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0
-};
-
-static unsigned int  __r1 = 1;
-static unsigned int  __r2 = 1;
-
-static void
-set_seed ( unsigned int  seed )
-{
-    __r1 = seed != 0 ? seed : 1;                // 0 is a forbidden value which locks the generator
-    __r2 = 1;                                   // there are several (8389119) forbidden codes. 1 is not one of them
-}
-
-
-unsigned int
-random_int ( void )
-{
-    unsigned int  t1, t2, t3, t4;
-
-    t3   = t1 = __r1;   t4   = t2 = __r2;       // Parity calculation is done via table lookup, this is also available
-    t1  &= 0xF5;        t2 >>= 25;              // on CPUs without parity, can be implemented in C and avoid unpredictable
-    t1   = Parity [t1]; t2  &= 0x63;            // jumps and slow rotate through the carry flag operations.
-    t1 <<= 31;          t2   = Parity [t2];
-
-    return (__r1 = (t3 >> 1) | t1 ) ^ (__r2 = (t4 + t4) | t2 );
-}
-
-
-
-int  usePlevel;
-int  MinPNSSubband;
-
-static float  A [36] [36];
-static float  B [1801];
-
-static void
-Init ( void )
-{
-        int     i;
-        int     j;
-        double  w;
-
-        for ( i = 0; i < 36; i += 2 ) {
-                for ( j = 0; j < 36; j++ ) {
-                        w = 2 * M_PI * (i+1) / 36 * j;
-                        A [i+0] [j] = cos (w);
-                        A [i+1] [j] = sin (w);
-                }
-        }
-        for ( i = 0; i <= 1800; i++ )
-                B [i] = 1.0 ;
-        for ( i = 0; i < 18000; i++ ) {
-                j     =
-                B [j] = 0.01
-        }
-}
-
-
-        static double T [4];
-        static short k;
-
-
-static float
-Penalties ( float x, int n )                                            // Value between 1 and 18
-{                                                                                                       //             =>1    =>0
-// Values between 1.0 and 2.0 are noise       -> return 0.0 to 0.1
-// Values between 6.0 und 18.0 are not noise  -> return 0.9 to 1.0
-
-//      static double T [4];
-        //static short k;
-
-
-        T [n+0] += x;
-        T [n+2] += 1;
-
-        if ( k++ )
-                return 0.;
-        printf ( "%8.6f%c", T[n]/T[n+2], n ? '\n' : '\t'  );
-        return B [ (int) (100. * x) ] ;
-}
-
-
-int
-TestForPNSUsage ( int          Subband,
-                                  float        SMR,                                     // 1 = 0 dB, 4 = 6 dB
-                                  const float  Samples[36] )            // Samples are freed of SCF and decolored upon prediction
-{
-        float  x;
-        float  xx;
-        float  tmp;
-        int    i;
-        int    j;
-        float  Result [36];
-        float  Ptime;
-        float  Pfreq;
-        float  Plevel;
-
-        if ( Subband < MinPNSSubband )
-                return 0;
-
-        x = xx = 0. ;
-        for ( i = 0; i < 36; i += 2 ) {
-                tmp = Samples[i] * Samples[i] + Samples[i+1] * Samples[i+1];
-                x  += tmp;
-                xx += tmp * tmp;
-        }
-        if ( x == 0. )
-                return 0;
-
-        Plevel = fabs (x / 18.) - 1. ;
-        Ptime  = Penalties ( 18.*xx / (x*x), 0 );       // possible values between 1 and 18
-
-        return 0;
-        for ( i = 0; i < 36; i++ ) {
-                x = 0. ;
-                for ( j = 0; j < 36; j++ )
-                        x += Samples[j] * A[i][j];
-                Result [i] = x;
-        }
-
-        x = xx = 0. ;
-        for ( i = 0; i < 36; i += 2 ) {
-                tmp = Result[i] * Result[i] + Result[i+1] * Result[i+1];
-                x  += tmp;
-                xx += tmp * tmp;
-        }
-
-        Pfreq  = Penalties ( 18.*xx / (x*x), 1 );       // possible values between 1 and 18
-
-        if ( usePlevel ) {
-                tmp = (1. - Plevel) * Ptime * Pfreq ;
-        }
-        else {
-                tmp = 1. * Ptime * Pfreq ;
-        }
-
-        if ( tmp < 1 - 1. / SMR )
-                return 0;
-
-        return 1;
-}
-
-
-int
-main ( void )
-{
-        int           i;
-        int           j;
-        static float  X [36];
-        int l;
-
-        Init ();
-        for ( l = 2; l <= 36; l+=2 ) {
-                printf ("%2u: ", l );
-                memset ( T, 0, sizeof(T) );
-        for ( i = 0; i < 0x60000; i++ ) {
-                for ( j = 0; j < l; j++ ) {
-                        X [j] = ((double) (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int () + (int) random_int ()) * 1.e-10 ;
-                        //X[j] = j;
-                }
-                TestForPNSUsage ( 0, 1, X );
-        }
-        printf ("\n");
-        }
-
-        return 0 ;
-}
Index: penc/branches/zorg/pns.dsp
===================================================================
--- /mppenc/branches/zorg/pns.dsp	(revision 40)
+++ 	(revision )
@@ -1,100 +1,0 @@
-# Microsoft Developer Studio Project File - Name="pns" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=pns - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "pns.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "pns.mak" CFG="pns - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "pns - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "pns - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "pns - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "pns___Win32_Release"
-# PROP BASE Intermediate_Dir "pns___Win32_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "pns___Win32_Release"
-# PROP Intermediate_Dir "pns___Win32_Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "pns - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "pns___Win32_Debug"
-# PROP BASE Intermediate_Dir "pns___Win32_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "pns___Win32_Debug"
-# PROP Intermediate_Dir "pns___Win32_Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ  /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ  /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "pns - Win32 Release"
-# Name "pns - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\pns.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
Index: penc/branches/zorg/pns.vcproj
===================================================================
--- /mppenc/branches/zorg/pns.vcproj	(revision 40)
+++ 	(revision )
@@ -1,166 +1,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="pns"
-	SccProjectName=""
-	SccLocalPath="">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\pns___Win32_Debug"
-			IntermediateDirectory=".\pns___Win32_Debug"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\pns___Win32_Debug/pns.pch"
-				AssemblerListingLocation=".\pns___Win32_Debug/"
-				ObjectFile=".\pns___Win32_Debug/"
-				ProgramDataBaseFileName=".\pns___Win32_Debug/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=".\pns___Win32_Debug/pns.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile=".\pns___Win32_Debug/pns.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\pns___Win32_Debug/pns.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\pns___Win32_Release"
-			IntermediateDirectory=".\pns___Win32_Release"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\pns___Win32_Release/pns.pch"
-				AssemblerListingLocation=".\pns___Win32_Release/"
-				ObjectFile=".\pns___Win32_Release/"
-				ProgramDataBaseFileName=".\pns___Win32_Release/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=".\pns___Win32_Release/pns.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				ProgramDatabaseFile=".\pns___Win32_Release/pns.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\pns___Win32_Release/pns.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
-			<File
-				RelativePath="pns.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: penc/branches/zorg/profile.c
===================================================================
--- /mppenc/branches/zorg/profile.c	(revision 40)
+++ 	(revision )
@@ -1,174 +1,0 @@
-/*
- * Musepack audio compression
- * Copyright (C) 1999-2004 Buschmann/Klemm/Piecha/Wolf
- *
- * 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.1 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
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <string.h>
-#include "mppdec.h"
-#include "profile.h"
-
-/*
- *  For every architecture you want to profile/checkpoint you need the following items:
- *
- *  uintmax_t:
- *      A type which is used for time calculation, mostly 32 bit or 64 bit,
- *      should be large enough so that no overruns occures during the measurement
- *  STD_TIMER_CLK:
- *      Clock frequency of the used timer in MHz
- *  RDTSC():
- *      A macro reading the current time into a local variable timetemp with the type uintmax_t,
- *      Time is in 1.e-6/STD_TIMER_CLK seconds.
- *
- *  Places:
- *      typedef of uintmax_t:     profile.h
- *      RDTSC():                  profile.h
- *      STD_TIMER_CLK:            profile.c
- *      no-inline functions maybe needed by RDTSC():
- *                                profile.c
- */
-
-#ifdef PROFILE
-
-#ifdef __TURBOC__
-# define STD_TIMER_CLK  1.193181667 /* MHz */
-
-uintmax_t
-readtime ( void )               /* PC onboard timer */
-{
-    asm  XOR   AX, AX
-    asm  MOV   ES, AX
-    asm  OUT   67, AL
-    asm  MOV   DX, ES:[46Ch]
-    asm  IN    AL, 64
-    asm  XCHG  AL, AH
-    asm  IN    AL, 64
-    asm  XCHG  AL, AH
-    asm  NEG   AX
-}
-
-#elif defined USE_SYSV_TIMER
-# define STD_TIMER_CLK    1.0000000 /* MHz */
-
-# include <sys/time.h>
-# include <unistd.h>
-
-uintmax_t
-readtime ( void )               /* System V timer */
-{
-    struct timeval  tv;
-
-    gettimeofday ( &tv, NULL );
-    return tv.tv_sec * (uintmax_t)1000000LU + tv.tv_usec;
-}
-
-#else
-# define STD_TIMER_CLK  233.3333333 /* MHz */
-#endif
-
-
-uintmax_t       timecounter    [256];
-const char*     timename       [256];
-unsigned char   functionstack [1024];
-unsigned char*  functionstack_pointer = functionstack;
-
-
-static void Cdecl
-signal_handler ( int signum )
-{
-    char            name [128];
-    char            file [128];
-    char            no   [ 32];
-    unsigned char*  f;
-
-    (void) stderr_printf ( "\n\nSignal %d detected. Call stack:\n", signum );
-    for ( f = functionstack+1; f <= functionstack_pointer; f++ ) {
-        (void) sscanf        ( timename[*f], "%128[^|]|%128[^|]|%32[0-9]", name, file, no );
-        (void) stderr_printf ( "%-24.24s%12.12s:%s\n", name, file, no );
-    }
-    _exit ( 128+signum );
-}
-
-
-void
-set_signal ( void )
-{
-    signal ( SIGILL , signal_handler );
-    signal ( SIGINT , signal_handler );
-    signal ( SIGSEGV, signal_handler );
-    signal ( SIGFPE , signal_handler );
-}
-
-
-void
-report ( void )
-{
-    static char  dash [] = "---------------------------------------";
-    uintmax_t    sum;
-    uintmax_t    max;
-    int          i;
-    int          j;
-    int          k;
-    char         name [128];
-    char         file [128];
-    char         no   [ 32];
-    size_t       filelen;
-    double       MHz = STD_TIMER_CLK;
-
-#ifdef __linux__
-    FILE*        fp;
-
-    // read out CPU frequency if proc-FS is present
-    if ( (fp = fopen ("/proc/cpuinfo", "r")) != NULL ) {
-        while ( fgets(name, sizeof(name), fp) )
-            if ( 1 == sscanf ( name, "cpu MHz : %lf", &MHz ) )
-                break;
-        (void) fclose (fp);
-    }
-#endif
-
-    // calculate total time
-    for ( sum = 0, i = 1; i < sizeof(timecounter)/sizeof(*timecounter); i++ )
-        sum += timecounter [i];
-
-    (void) fprintf ( stderr, "\n%s%s\n", dash, dash );
-    (void) fprintf ( stderr, "100.0%%   %13.6f ms   *** TOTAL ***%25s[%.1f MHz]\n", sum/(MHz*1000.), "", MHz );
-
-    // output sorted
-    while ( 1 ) {
-        for ( max = 0, j = 1; j < sizeof(timecounter)/sizeof(*timecounter); j++ )
-            if ( timecounter [j] > max )
-                max = timecounter [k = j];
-        if (max == 0)
-            break;
-        sscanf ( timename [k], "%128[^|]|%128[^|]|%32[0-9]", name, file, no );
-        filelen = strlen (file);
-        (void) fprintf ( stderr, "%6.2f%%  %13.6f ms   %-28.28s%18.18s:%s\n",
-                         100. * timecounter[k] / sum, timecounter[k] / (MHz*1000.),
-                         name, filelen < 18 ? file : file+filelen-18, no );
-        timecounter [k] = 0;
-    }
-
-    (void) fprintf ( stderr, "%s%s\n", dash, dash );
-    (void) fflush  ( stderr );
-}
-
-#endif /* PROFILE */
-
-/* end of profile.c */
Index: penc/branches/zorg/profile.h
===================================================================
--- /mppenc/branches/zorg/profile.h	(revision 40)
+++ 	(revision )
@@ -1,98 +1,0 @@
-/*
- * Musepack audio compression
- * Copyright (C) 1999-2004 Buschmann/Klemm/Piecha/Wolf
- *
- * 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.1 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
- */
-
-#ifndef MPPDEC_PROFILE_H
-#define MPPDEC_PROFILE_H
-
-#ifdef PROFILE
-
-/* T I M E C O U N T - F U N C T I O N */
-# if   defined _WIN32
-typedef /*unsigned*/ __int64  uintmax_t;
-#pragma warning ( disable: 4035 )
-static __inline uintmax_t  rdtscll ( void ) { __asm { rdtsc }; }
-#pragma warning ( default: 4035 )
-#  define RDTSC()  timetemp = rdtscll ()
-#  define __FUNCTION__  "?"
-# elif defined __TURBOC__
-typedef signed long  uintmax_t;
-uintmax_t readtime ( void );
-#  define RDTSC()  timetemp = readtime ()
-#  define __FUNCTION__  "?"
-# else
-typedef unsigned long long  uintmax_t;
-#  include <asm/msr.h>
-#  define RDTSC()  rdtscll (timetemp)
-# endif /* _WIN32 */
-
-
-/* M A C R O S */
-# define _STR(x)    #x
-# define __STR(x)   _STR(x)
-
-# define ENTER(x)  do {                                                             \
-                     uintmax_t  timetemp;                                           \
-                     RDTSC();                                                       \
-                     timecounter[*functionstack_pointer]       += timetemp;         \
-                     timecounter[*++functionstack_pointer = x] -= timetemp;         \
-                     timename[x] = __FUNCTION__ "()|" __FILE__ "|" __STR(__LINE__); \
-                   } while (0)
-
-# define NEXT(x,n) do {                                                      \
-                     uintmax_t  timetemp;                                    \
-                     RDTSC();                                                \
-                     timecounter[*functionstack_pointer]     += timetemp;    \
-                     timecounter[*functionstack_pointer = x] -= timetemp;    \
-                     timename[x] = __FUNCTION__ "-" __STR(n) "|" __FILE__ "|" __STR(__LINE__); \
-                   } while (0)
-
-# define LEAVE(x)  do {                                                  \
-                     uintmax_t  timetemp;                                \
-                     RDTSC();                                            \
-                     timecounter[x]                        += timetemp;  \
-                     timecounter[*--functionstack_pointer] -= timetemp;  \
-                   } while (0)
-
-# define START()   set_signal ()
-# define REPORT()  report ()
-
-/* V A R I A B L E S */
-extern uintmax_t       timecounter    [256];
-extern const char*     timename       [256];
-extern unsigned char   functionstack [1024];
-extern unsigned char*  functionstack_pointer;
-
-/* F U N C T I O N S */
-void  set_signal ( void );
-void  report     ( void );
-
-#else
-
-/* M A C R O S */
-# define START()
-# define ENTER(x)
-# define NEXT(x,n)
-# define LEAVE(x)
-# define REPORT()
-
-#endif /* PROFILE */
-
-#endif /* MPPDEC_PROFILE_H */
-
-/* end of profile.h */
Index: /mppenc/branches/zorg/psy.c
===================================================================
--- /mppenc/branches/zorg/psy.c	(revision 40)
+++ /mppenc/branches/zorg/psy.c	(revision 41)
Index: penc/branches/zorg/pulse.c
===================================================================
--- /mppenc/branches/zorg/pulse.c	(revision 40)
+++ 	(revision )
@@ -1,192 +1,0 @@
-#define FILE_IO 0
-#include "mppdec.h"
-
-Bool_t            output_endianess   = LITTLE;
-
-#define SAMP    44100
-#define DUR     4
-
-/********************************************************************/
-
-typedef void (*fn_t) ( float* );
-
-static void
-sin1 ( float* A )
-{
-    int  i;
-
-    for ( i = 0; i < SAMP*DUR; i++ ) {
-        *A++ = sin (i * (2 * M_PI * 1000 / SAMP) );
-    }
-}
-
-static void
-sin5 ( float* A )
-{
-    int  i;
-
-    for ( i = 0; i < SAMP*DUR; i++ )
-        *A++ = sin (i * (2 * M_PI * 5000 / SAMP) );
-}
-
-static void
-sinfou ( float* A )
-{
-    int  i;
-
-    for ( i = 0; i < SAMP*DUR; i++ )
-        *A++ = sin (i * (2 * M_PI * 1000 / SAMP) ) / 1
-             + sin (i * (2 * M_PI * 3000 / SAMP) ) / 3
-             + sin (i * (2 * M_PI * 5000 / SAMP) ) / 5
-             + sin (i * (2 * M_PI * 7000 / SAMP) ) / 7
-             + sin (i * (2 * M_PI * 9000 / SAMP) ) / 9
-             + sin (i * (2 * M_PI *11000 / SAMP) ) /11
-             + sin (i * (2 * M_PI *13000 / SAMP) ) /13
-             + sin (i * (2 * M_PI *15000 / SAMP) ) /15;
-}
-
-static void
-noise1 ( float* A )
-{
-    int  i;
-
-    for ( i = 0; i < SAMP*DUR; i++ )
-        *A++ = rand() * (2./RAND_MAX) - 1.;
-}
-
-static void
-noise2 ( float* A )
-{
-    long  last;
-    long  curr = RAND_MAX / 2;
-    int   i;
-
-    for ( i = 0; i < SAMP*DUR; i++ ) {
-        last = curr;
-        curr = rand ();
-        *A++ = (last - curr) * (1./RAND_MAX);
-    }
-}
-
-static void
-noise3 ( float* A )
-{
-    double  last = 0.;
-    double  curr;
-    int     i;
-
-    for ( i = 0; i < SAMP*DUR; i++ ) {
-        curr = rand() * (2./RAND_MAX) - 1.;
-        *A++ = last = 0.9 * last + 0.1 * curr;
-    }
-}
-
-/********************************************************************/
-
-static void
-writeFile ( const char* cmd, const float* A, const float* B )
-{
-    static short   Data [SAMP*DUR] [2];
-    int            i;
-    double         max = 0.;
-    FILE_T         fp;
-
-    for ( i = 0; i < SAMP*DUR; i++ )
-        if ( fabs ( A[i] * B[i] ) > max )
-             max = fabs ( A[i] * B[i] );
-
-    for ( i = 0; i < SAMP*DUR; i++ )
-        Data [i][0] = Data [i][1] = (short) floor ( A[i] * B[i] / max * 24576 + 0.5 );
-
-    stderr_printf ( "%s\n", cmd );
-    fp = POPEN_WRITE_BINARY_OPEN ( cmd );
-    Write_WAVE_Header ( fp, 44100., 16, 2, 10*44100 );
-    WRITE ( fp, Data, sizeof(Data) );
-    PCLOSE ( fp );
-}
-
-/*********************************************************************/
-
-static void
-env ( float* A, double expo, double mult, int ie )
-{
-    static double  x [SAMP*DUR];
-    int            i;
-    int            j;
-    int            k;
-    double         tmp;
-    double         max = 0.;
-
-    for ( i = 0; i < SAMP*DUR; i++ )
-        x [i] = pow (i+0.5, expo) * pow ( mult, i );
-
-    for ( i = 0; i < SAMP*DUR; i++ )
-        if ( x[i] > max )
-             max = x[i];
-
-    for ( i = 0; i < SAMP*DUR; i++ )
-        x [i] /= max;
-
-    for ( j = 0; j < ie; j++ ) {
-        tmp = x[j];
-        for ( k = 1; j+k*ie < SAMP*DUR  &&  x[j+k*ie] > 1.e-20; k++ )
-            tmp += x[j + k*ie];
-        A[j] = tmp;
-    }
-
-    for ( j = ie; j < SAMP*DUR; j++ ) {
-        A[j] = A[j-ie];
-    }
-}
-
-static float   A [6] [SAMP*DUR];
-
-
-void
-Writefiles ( const float* B, const char* base )
-{
-    char  cmd [128];
-    int   j;
-
-    for ( j = 0; j < 6; j++ ) {
-        sprintf ( cmd, "mppenc - %s_%c.mpc -xtreme", base, 'a'+j );
-        writeFile ( cmd, A[j], B );
-    }
-}
-
-
-/*********************************************************************/
-int
-main ( void )
-{
-    static fn_t    F [6] = { sin1, sin5, sinfou, noise1, noise2, noise3 };
-    static float   B [SAMP*DUR];
-    int            i;
-    int            p;
-    int            s;
-    int            d;
-    char           name [32];
-
-    stderr_printf ("Calculating noises...\n");
-    for ( i = 0; i < sizeof(F)/sizeof(*F); i++ ) {
-        stderr_printf ("[%u] ", i);
-        F [i] (&(A[i][0]));
-    }
-
-    stderr_printf ("\nCalculating envelopes...\n");
-    for ( i = 0; i < SAMP*DUR; i++ ) {
-         B[i] = 1.;
-    }
-    Writefiles ( B, "const" );
-
-    for ( p = 2; p >= 0; p-- )                  // rise
-        for ( s = 3; s < 14; s++ )              // duration
-            for ( d = 25; d <= 400; d *= 2 ) {  // Pulse sequence
-                env ( B, p, 1. - pow (0.5,s), d*SAMP/1000 );
-                sprintf ( name, "%04u_%03u_%1u", 1<<s, d, p );
-                stderr_printf ("\n\n*** %s ***\n", name );
-                Writefiles ( B, name );
-            }
-
-    return 0;
-}
Index: penc/branches/zorg/pulse.dsp
===================================================================
--- /mppenc/branches/zorg/pulse.dsp	(revision 40)
+++ 	(revision )
@@ -1,110 +1,0 @@
-# Microsoft Developer Studio Project File - Name="pulse" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=pulse - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "pulse.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "pulse.mak" CFG="pulse - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "pulse - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "pulse - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "pulse - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "pulse___Win32_Release"
-# PROP BASE Intermediate_Dir "pulse___Win32_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MPP_ENCODER" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib setargv.obj /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "pulse - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "pulse___Win32_Debug"
-# PROP BASE Intermediate_Dir "pulse___Win32_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MPP_ENCODER" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib setargv.obj /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "pulse - Win32 Release"
-# Name "pulse - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\pulse.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\stderr.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\wave_out.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
Index: penc/branches/zorg/pulse.vcproj
===================================================================
--- /mppenc/branches/zorg/pulse.vcproj	(revision 40)
+++ 	(revision )
@@ -1,204 +1,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="pulse"
-	SccProjectName=""
-	SccLocalPath="">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\Release"
-			IntermediateDirectory=".\Release"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;MPP_ENCODER"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Release/pulse.pch"
-				AssemblerListingLocation=".\Release/"
-				ObjectFile=".\Release/"
-				ProgramDataBaseFileName=".\Release/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="odbc32.lib odbccp32.lib winmm.lib setargv.obj"
-				OutputFile=".\Release/pulse.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				ProgramDatabaseFile=".\Release/pulse.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Release/pulse.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\Debug"
-			IntermediateDirectory=".\Debug"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;MPP_ENCODER"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Debug/pulse.pch"
-				AssemblerListingLocation=".\Debug/"
-				ObjectFile=".\Debug/"
-				ProgramDataBaseFileName=".\Debug/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="odbc32.lib odbccp32.lib winmm.lib setargv.obj"
-				OutputFile=".\Debug/pulse.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile=".\Debug/pulse.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Debug/pulse.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
-			<File
-				RelativePath="pulse.c">
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="stderr.c">
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="wave_out.c">
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: penc/branches/zorg/quant.c-backup
===================================================================
--- /mppenc/branches/zorg/quant.c-backup	(revision 40)
+++ 	(revision )
@@ -1,267 +1,0 @@
-#include "mppenc.h"
-
-/* V A R I A B L E N */
-float  __SCF    [128 + 6];   // tabellierte Skalenfaktoren
-float  __invSCF [128 + 6];   // invertierte Skalenfaktoren
-
-
-// Quantisierungs-Koeffizienten: step/65536 bzw. (2*D[Res]+1)/65536
-static const float  __A [1 + 18] = {
-    0.0000762939453125f,
-    0.0000000000000000f, 0.0000457763671875f, 0.0000762939453125f, 0.0001068115234375f,
-    0.0001373291015625f, 0.0002288818359375f, 0.0004730224609375f, 0.0009613037109375f,
-    0.0019378662109375f, 0.0038909912109375f, 0.0077972412109375f, 0.0156097412109375f,
-    0.0312347412109375f, 0.0624847412109375f, 0.1249847412109375f, 0.2499847412109375f,
-    0.4999847412109375f
-};
-
-
-// Requantisierungs-Koeffizienten: 65536/step bzw. 1/A[Res]
-static const float  __C [1 + 18] = {
-    13107.200000000001f,
-    65535.000000000000f, 21845.333333333332f, 13107.200000000001f, 9362.285714285713f,
-     7281.777777777777f,  4369.066666666666f,  2114.064516129032f, 1040.253968253968f,
-      516.031496062992f,   257.003921568627f,   128.250489236790f,   64.062561094819f,
-       32.015632633121f,    16.003907203907f,     8.000976681723f,    4.000244155527f,
-        2.000061037018f,     1.000015259022f
-};
-
-
-// Requantisierungs-Offset: 2*D+1 = steps of quantizer
-static const int  __D [1 + 18] = {
-    2,
-    0,     1,     2,     3,     4,     7,    15,    31,    63,
-  127,   255,   511,  1023,  2047,  4095,  8191, 16383, 32767
-};
-
-#define A   (__A + 1)
-#define C   (__C + 1)
-#define D   (__D + 1)
-
-// Generierung der Skalenfaktoren und ihrer Inversen
-void
-Init_Skalenfaktoren ( void )
-{
-    int  n;
-
-    for ( n = -6; n < 128; n++ ) {
-        SCF[n]    = (float) ( pow(10.,-0.1*(n-1)/1.26) );
-        invSCF[n] = (float) ( pow(10., 0.1*(n-1)/1.26) );
-    }
-}
-
-#pragma warning ( disable : 4305 )
-
-static float  NoiseInjectionCompensation1D [18] = {
-#if 1
-    1.f,
-    0.884621,
-    0.935711,
-    0.970829,
-    0.987941,
-    0.994315,
-    0.997826,
-    0.999744,
-    1., 1., 1., 1., 1., 1., 1., 1., 1., 1.
-#else
-    1.,
-    0.907073,   //  -1...+1
-    0.946334,   //  -2...+2
-    0.974793,   //  -3...+3
-    0.987647,   //  -4...+4
-    0.994330,   //  -7...+7
-    0.997846,   // -15...+15
-    1.,         // -31...+31
-    1.,
-    1.,
-    1.,
-    1.,
-    1.,
-    1.,
-    1.,
-    1.,
-    1.,
-    1.,
-#endif
-} ;
-
-static float  NoiseInjectionCompensation2D [18] [32] = {
-    { 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000,  },
-    { 0.931595, 0.891390, 0.852494, 0.872420, 0.904053, 0.933716, 0.958976, 0.977719, 0.993979, 1.009011, 1.020961, 1.029564, 1.026582, 1.026753, 1.035573, 1.053251, 1.073429, 1.096344, 1.096344, 1.096344, 1.096344, 1.096344, 1.096344, 1.096344, 1.096344, 1.096344, 1.096344, 1.096344, 1.096344, 1.096344, 1.096344, 1.096344,  },
-    { 0.878264, 0.882351, 0.904261, 0.930843, 0.949243, 0.966741, 0.980500, 0.988182, 0.993361, 0.997112, 0.998918, 0.999501, 1.003179, 1.007445, 1.008678, 0.995890, 0.991015, 0.988019, 0.985479, 0.987646, 1.003605, 1.029301, 1.040511, 1.061531, 1.083302, 1.083302, 1.083302, 1.083302, 1.083302, 1.083302, 1.083302, 1.083302,  },
-    { 0.866977, 0.943500, 0.941561, 0.953049, 0.967274, 0.980476, 0.988678, 0.993240, 0.996376, 0.998513, 0.999545, 0.999775, 1.000898, 1.003954, 1.006308, 1.004932, 1.002867, 1.002922, 1.003624, 1.005487, 1.003919, 1.008022, 0.987693, 1.000358, 1.017461, 1.039166, 1.056053, 1.068191, 1.068191, 1.068191, 1.068191, 1.068191,  },
-    { 0.880390, 0.976713, 0.976180, 0.976596, 0.982011, 0.988786, 0.993619, 0.996641, 0.998824, 1.000297, 1.001195, 1.001718, 1.002395, 1.003503, 1.005617, 1.005072, 1.002409, 1.003703, 1.003412, 1.003318, 1.005290, 1.007112, 1.014370, 1.010040, 1.000780, 1.005700, 1.020505, 1.030123, 1.030123, 1.030123, 1.030123, 1.030123,  },
-    { 0.916894, 0.987164, 0.988734, 0.992318, 0.995268, 0.996932, 0.998141, 0.999072, 0.999674, 1.000104, 1.000292, 1.000386, 1.000399, 1.000222, 1.000671, 1.002127, 1.000137, 1.000046, 0.999644, 0.999156, 1.000568, 1.000098, 0.993764, 0.993954, 0.998971, 1.002835, 1.002972, 0.995376, 1.001643, 1.001643, 1.001643, 1.001643,  },
-    { 0.982771, 0.995034, 0.997118, 0.998294, 0.998652, 0.999016, 0.999382, 0.999598, 0.999746, 0.999851, 0.999837, 0.999881, 0.999847, 1.000154, 0.999885, 1.000222, 0.999963, 1.000934, 0.999804, 0.999927, 1.000379, 0.997574, 0.997943, 0.998748, 0.998151, 0.997458, 1.000319, 1.001091, 0.998461, 0.996151, 1.005969, 1.005969,  },
-    { 0.997150, 0.999903, 0.999424, 0.999537, 0.999661, 0.999753, 0.999851, 0.999903, 0.999928, 0.999963, 0.999969, 0.999941, 0.999974, 0.999967, 0.999996, 0.999975, 0.999966, 0.999704, 0.999946, 0.999894, 0.999905, 1.000840, 1.000716, 1.000799, 1.000406, 0.999912, 1.000153, 0.999789, 1.000495, 1.000495, 1.001167, 1.001347,  },
-    { 0.995524, 0.999983, 1.000044, 0.999965, 0.999970, 0.999974, 0.999986, 0.999995, 0.999996, 1.000011, 0.999997, 1.000010, 1.000010, 1.000026, 1.000006, 1.000148, 1.000048, 0.999999, 1.000161, 1.000193, 0.999797, 1.000145, 0.999974, 1.000039, 0.999731, 0.999985, 1.000563, 1.000256, 1.000637, 1.000050, 1.002013, 1.001053,  },
-    { 0.994796, 0.999833, 1.000003, 1.000012, 0.999986, 0.999991, 0.999991, 1.000000, 1.000004, 0.999999, 1.000005, 1.000004, 1.000008, 0.999996, 1.000027, 1.000097, 0.999951, 0.999938, 0.999989, 1.000001, 1.000048, 0.999935, 1.000068, 1.000134, 0.999961, 1.000198, 0.999956, 0.999957, 0.999844, 1.000087, 0.999708, 1.000198,  },
-    { 0.996046, 0.999902, 1.000019, 1.000017, 0.999983, 0.999997, 1.000002, 0.999993, 0.999999, 1.000003, 1.000001, 1.000015, 1.000004, 1.000006, 0.999987, 0.999993, 0.999992, 1.000029, 1.000064, 0.999997, 1.000044, 1.000044, 0.999919, 0.999875, 1.000011, 0.999897, 0.999905, 0.999996, 0.999934, 0.999968, 1.000008, 0.999902,  },
-    { 0.998703, 0.999963, 1.000021, 1.000006, 1.000008, 1.000000, 1.000003, 0.999994, 0.999990, 0.999990, 1.000003, 1.000009, 1.000001, 0.999999, 1.000001, 1.000009, 0.999999, 0.999988, 1.000003, 0.999971, 1.000005, 1.000042, 0.999924, 0.999995, 0.999998, 0.999988, 0.999961, 0.999942, 1.000046, 1.000061, 1.000112, 1.000052,  },
-    { 0.999872, 1.000001, 1.000004, 0.999998, 0.999999, 0.999998, 0.999992, 0.999990, 0.999991, 1.000000, 1.000000, 1.000000, 1.000002, 0.999996, 1.000004, 1.000011, 0.999963, 1.000016, 1.000050, 0.999996, 0.999998, 1.000006, 0.999990, 0.999948, 0.999974, 1.000060, 1.000014, 0.999987, 0.999986, 0.999917, 0.999973, 1.000035,  },
-    { 1.000366, 1.000006, 0.999996, 0.999995, 0.999998, 0.999996, 0.999991, 1.000001, 0.999990, 0.999996, 1.000010, 0.999999, 1.000002, 1.000000, 0.999996, 0.999990, 1.000014, 0.999978, 1.000011, 0.999983, 0.999988, 0.999971, 0.999997, 0.999989, 0.999986, 0.999958, 1.000005, 0.999992, 0.999975, 0.999975, 0.999975, 0.999975,  },
-    { 0.999736, 0.999995, 1.000002, 1.000004, 0.999999, 1.000000, 1.000003, 1.000000, 1.000007, 0.999992, 0.999997, 0.999998, 0.999998, 0.999997, 1.000007, 1.000012, 1.000004, 0.999995, 0.999996, 1.000009, 1.000003, 1.000008, 1.000001, 1.000003, 1.000011, 1.000019, 0.999991, 0.999970, 0.999970, 0.999970, 0.999970, 0.999965,  },
-    { 0.999970, 1.000000, 1.000000, 1.000000, 1.000001, 1.000000, 1.000000, 0.999999, 1.000001, 1.000000, 0.999999, 0.999999, 0.999999, 1.000007, 1.000005, 1.000002, 0.999999, 0.999999, 1.000000, 0.999997, 0.999999, 1.000001, 1.000001, 0.999988, 0.999988, 0.999984, 0.999995, 0.999986, 0.999986, 0.999986, 0.999986, 0.999986,  },
-    { 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000,  },
-    { 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000,  },
-};
-
-#pragma warning ( default : 4305 )
-
-
-void
-NoiseInjectionComp ( void )
-{
-    int  i;
-
-    for ( i = 0; i < sizeof(NoiseInjectionCompensation1D)/sizeof(*NoiseInjectionCompensation1D); i++ )
-        NoiseInjectionCompensation1D [i] = 1.f;
-    for ( i = 0; i < sizeof(NoiseInjectionCompensation2D)/sizeof(**NoiseInjectionCompensation2D); i++ )
-        NoiseInjectionCompensation2D [0][i] = 1.f;
-}
-
-
-// Quantisiert ein Subband und berechnet iSNR
-float
-ISNR_Schaetzer ( const float* input, const float SNRcomp, const int res )
-{
-    int    k;
-    float  fac    = A [res];
-    float  invfac = C [res];
-    float  Signal = 1.e-30f;
-    float  Fehler = 1.e-30f;
-    float  tmp ;
-    float  tmp2 ;
-
-    // Summation der absoluten Leistung und des quadratischen Fehlers
-    for ( k = 0; k < 36; k++ ) {
-        tmp2    = input[k] * NoiseInjectionCompensation1D [res];
-        Signal += tmp2 * tmp2;
-
-        // q = ftol(in), korrektes Runden
-        tmp = tmp2 * fac + 0xFF8000;
-        tmp = (*(int*) & tmp - 0x4B7F8000) * invfac - tmp2;
-
-        Fehler += tmp * tmp;
-    }
-
-    // Anwendung von SNRcomp nur, falls SNR > 1 !!
-    return Signal > Fehler  ?  Fehler / (SNRcomp * Signal)  :  Fehler / Signal;
-}
-
-
-#ifdef BUGBUG
-double _old;
-double _new;
-double _tmp;
-
-double _Sum [18];
-long   _Cnt [18];
-
-double __Sum [18][33];
-long   __Cnt [18][33];
-
-void rep ( double _old, double _new, int res )
-{
-    int    i;
-    _Sum [res] += sqrt (_old / _new );
-    _Cnt [res] ++ ;
-    i = _old * (  32. / 36 / 32767 / 32767);
-    // printf ("Res=%u, old=%f, new=%f, X=%f, %3u:", res, _old, _new, X[res], i ); fflush (stdout);
-    __Sum [res][i] += sqrt (_old / _new );
-    __Cnt [res][i] ++ ;
-}
-
-void reppr ( void )
-{
-    int i, j;
-    printf ("\n\n==================\n");
-    for ( i = 0; i < 18; i++ )
-        if ( _Cnt[i] )
-            printf ("%2u: %12.6f\n", i, _Sum[i]/_Cnt[i] );
-    for ( i = 0; i < 18; i++ )
-        for ( j = 0; j <= 32; j++ )
-            if ( __Cnt[i][j] )
-                printf ("%2u[%2u]: %9.6f (%8lu)\n", i, j, __Sum[i][j]/__Cnt[i][j], __Cnt[i][j] );
-
-}
-#endif
-
-// Linearer Quantisierer für ein Subband
-void
-QuantizeSubband ( unsigned int* qu_output, const float* input, const int res, float* errors )
-{
-    int    n;
-    int    offset = D [res];
-    float  mult   = A [res] * NoiseInjectionCompensation1D [res];
-    float  tmp;
-
-    for ( n = 0; n < 36; n++, input++, qu_output++ ) {
-        // q = ftol(in), korrektes Runden
-        tmp = *input * mult + 0xFF8000;
-        *qu_output  = (unsigned int)(*(int*) & tmp - 0x4B7F8000 + offset);
-
-        // Begrenzung auf 0...2D
-        if ((unsigned int)*qu_output > (unsigned int)2*offset ) {
-            *qu_output = mini( *qu_output, 2*offset);
-            *qu_output = maxi( *qu_output,        0);
-        }
-#ifdef BUGBUG
-        _old += *input * *input;
-        _tmp  = (int)(*qu_output - offset) * C[res];
-        _new += _tmp * _tmp;
-#endif
-    }
-#ifdef BUGBUG
-    rep ( _old, _new, res );
-    _old = _new = 0;
-#endif
-}
-
-
-// NoiseShaper für ein Subband
-void
-QuantizeSubbandWithNoiseShaping ( unsigned int* qu_output, const float* input, const int res, float* errors, const float* FIR )
-{
-#define E(x) *((int*)errors+(x))
-
-    float  signal;
-    float  tmp;
-    float  mult    = A [res];
-    float  invmult = C [res];
-    int    offset  = D [res];
-    int    n;
-    int    quant;
-
-    E(0) = E(1) = E(2) = E(3) = E(4) = E(5) = 0;       // arghh, das gibt ja Knackser an jeder Framegrenze
-
-    for ( n = 0; n < 36; n++, input++, qu_output++ ) {
-        signal = *input * NoiseInjectionCompensation1D [res] - (FIR[5]*errors[n+0] + FIR[4]*errors[n+1] + FIR[3]*errors[n+2] + FIR[2]*errors[n+3] + FIR[1]*errors[n+4] + FIR[0]*errors[n+5]);
-
-        // quant = ftol(signal), korrektes Runden
-        tmp   = signal * mult + 0xFF8000;
-        quant = *(int*) & tmp - 0x4B7F8000;
-
-        // Berechnung des aktuellen Fehlers und Speichern für Fehlerrückführung
-        errors [n + 6] = invmult * quant - signal * NoiseInjectionCompensation1D [res];
-
-        // Begrenzung auf +/-D
-        quant = minf ( quant, +offset );
-        quant = maxf ( quant, -offset );
-
-        *qu_output = (unsigned int)(quant + offset);
-#ifdef BUGBUG
-        _old += *input * *input;
-        _tmp  = invmult * quant;
-        _new += _tmp * _tmp;
-#endif
-    }
-#ifdef BUGBUG
-    rep ( _old, _new, res );
-    _old = _new = 0;
-#endif
-}
-
-/* end of quant.c */
-
-// pfk@schnecke.offl.uni-jena.de@EMAIL, Andree.Buschmann@web.de@EMAIL, BuschmannA@becker.de@EMAIL, miyaguch@eskimo.com@EMAIL, r3mix@irc.openprojects.net@EMAIL, dibrom@users.sourceforge.net@EMAIL, m.p.bakker-10@student.utwente.nl@EMAIL, djmrob@essex.ac.uk@EMAIL, dim@psytel-research.co.yu@EMAIL, lerch@zplane.de@EMAIL, takehiro@users.sourceforge.net@EMAIL, aleidinger@users.sourceforge.net@EMAIL, Robert.Hegemann@gmx.de@EMAIL, bouvigne@mp3-tech.org@EMAIL, monty@xiph.org@EMAIL, Pumpkinz99@aol.com@EMAIL, spase@outerspase.net@EMAIL, mt@wildpuppy.com@EMAIL, juha.laaksonheimo@tut.fi@EMAIL, speek@myrealbox.com@EMAIL, w.speek@12move.nl@EMAIL, martin@spueler.de@EMAIL, nicolaus.berglmeir@t-online.de@EMAIL, thomas.a.juerges@ruhr-uni-bochum.de@EMAIL, HelH@mpex.net@EMAIL, garf@roadum.demon.co.uk@EMAIL, gcp@sjeng.org@EMAIL, mike@naivesoftware.com@EMAIL, case@mobiili.net@EMAIL, steve.lhomme@free.fr@EMAIL, walter@binity.com@EMAIL
Index: penc/branches/zorg/quant_2d.c
===================================================================
--- /mppenc/branches/zorg/quant_2d.c	(revision 40)
+++ 	(revision )
@@ -1,287 +1,0 @@
-#include "mppenc.h"
-
-#define QUANT   256
-
-/* V A R I A B L E S */
-float  __SCF    [128 + 6];   // tabulated scalefactors
-float  __invSCF [128 + 6];   // inverted scalefactors
-
-
-// Quantization-coefficients: step/65536 bzw. (2*D[Res]+1)/65536
-static const float  __A [1 + 18] = {
-    0.0000762939453125f,
-    0.0000000000000000f, 0.0000457763671875f, 0.0000762939453125f, 0.0001068115234375f,
-    0.0001373291015625f, 0.0002288818359375f, 0.0004730224609375f, 0.0009613037109375f,
-    0.0019378662109375f, 0.0038909912109375f, 0.0077972412109375f, 0.0156097412109375f,
-    0.0312347412109375f, 0.0624847412109375f, 0.1249847412109375f, 0.2499847412109375f,
-    0.4999847412109375f
-};
-
-
-// Requantization-coefficients: 65536/step bzw. 1/A[Res]
-static const float  __C [1 + 18] = {
-    13107.200000000001f,
-    65535.000000000000f, 21845.333333333332f, 13107.200000000001f, 9362.285714285713f,
-     7281.777777777777f,  4369.066666666666f,  2114.064516129032f, 1040.253968253968f,
-      516.031496062992f,   257.003921568627f,   128.250489236790f,   64.062561094819f,
-       32.015632633121f,    16.003907203907f,     8.000976681723f,    4.000244155527f,
-        2.000061037018f,     1.000015259022f
-};
-
-
-// Requantization-Offset: 2*D+1 = steps of quantizer
-static const int  __D [1 + 18] = {
-    2,
-    0,     1,     2,     3,     4,     7,    15,    31,    63,
-  127,   255,   511,  1023,  2047,  4095,  8191, 16383, 32767
-};
-
-#define A   (__A + 1)
-#define C   (__C + 1)
-#define D   (__D + 1)
-
-// generation of scalefactors and their inverses
-void
-Init_Skalenfaktoren ( void )
-{
-    int  n;
-
-    for ( n = -6; n < 128; n++ ) {
-        SCF[n]    = (float) ( pow(10.,-0.1*(n-1)/1.26) );
-        invSCF[n] = (float) ( pow(10., 0.1*(n-1)/1.26) );
-    }
-}
-
-
-static float  NoiseInjectionCompensation1D [18] = {
-    1.f,
-    0.884621,
-    0.935711,
-    0.970829,
-    0.987941,
-    0.994315,
-    0.997826,
-    0.999744,
-    1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f
-} ;
-
-static float  NoiseInjectionCompensation2D [18] [QUANT] = {
-#if 0
-    { 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000,  },
-    { 1.000000, 0.759249, 0.811836, 0.887331, 0.928149, 0.979971, 1.007421, 0.991449, 0.973947, 0.947925, 0.936421, 0.916337, 0.906686, 0.897296, 0.884270, 0.875419, 0.876278, 0.868250, 0.865214, 0.861756, 0.857050, 0.854532, 0.853627, 0.851695, 0.852243, 0.849346, 0.851076, 0.850652, 0.853719, 0.853392, 0.855967, 0.855529, 0.866884, 0.868897, 0.872451, 0.874693, 0.876086, 0.878925, 0.881002, 0.883748, 0.896915, 0.902294, 0.904282, 0.908025, 0.909089, 0.911731, 0.914048, 0.916787, 0.931141, 0.933261, 0.936990, 0.938510, 0.941108, 0.944846, 0.945569, 0.945446, 0.960741, 0.961310, 0.961236, 0.963485, 0.965850, 0.968487, 0.967972, 0.970880, 0.982873, 0.984252, 0.986016, 0.987185, 0.990836, 0.990069, 0.991684, 0.995063, 1.005844, 1.007861, 1.008456, 1.009472, 1.007765, 1.015780, 1.013161, 1.014316, 1.025401, 1.030166, 1.026138, 1.035660, 1.038433, 1.036167, 1.044260, 1.039487, 1.053740, 1.056427, 1.059859, 1.058788, 1.057076, 1.064166, 1.068220, 1.074360, 1.073819, 1.070236, 1.052957, 1.073170, 1.078512, 1.088742, 1.087788, 1.083055, 1.089437, 1.080983, 1.078256, 1.080718, 1.075766, 1.080217, 1.074016, 1.068206, 1.070925, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545, 1.074545,  },
-    { 0.734415, 0.857080, 0.896985, 0.910291, 0.919858, 0.932150, 0.900508, 0.884923, 0.888104, 0.897810, 0.904629, 0.932746, 0.941313, 0.950723, 0.939135, 0.940385, 0.932144, 0.929118, 0.929208, 0.923236, 0.920199, 0.919320, 0.918495, 0.915762, 0.919277, 0.918830, 0.919762, 0.920036, 0.921206, 0.923291, 0.926169, 0.927089, 0.935140, 0.937440, 0.939327, 0.940953, 0.943766, 0.945858, 0.948038, 0.950245, 0.956156, 0.958724, 0.960530, 0.962402, 0.963945, 0.966367, 0.967490, 0.968064, 0.973955, 0.975495, 0.976424, 0.977624, 0.978177, 0.979428, 0.980549, 0.981283, 0.984267, 0.985143, 0.984633, 0.985154, 0.985831, 0.986632, 0.987966, 0.987271, 0.989323, 0.990228, 0.989934, 0.990184, 0.992097, 0.991417, 0.992013, 0.990068, 0.993321, 0.991961, 0.991686, 0.995233, 0.993092, 0.993147, 0.992993, 0.994349, 0.991502, 0.994954, 0.992521, 0.993046, 0.992133, 0.991579, 0.991394, 0.995659, 0.992520, 0.991381, 0.993217, 0.994709, 0.998368, 0.995523, 1.003331, 0.998391, 1.002294, 1.003448, 1.006459, 1.003872, 1.003000, 1.005899, 1.008900, 1.014621, 1.012585, 1.008313, 1.012377, 1.017555, 1.014297, 1.018404, 1.018644, 1.009129, 1.023010, 1.018520, 1.015460, 1.031318, 1.039789, 1.024658, 1.014159, 1.017848, 1.028665, 1.024441, 1.019322, 1.007162, 1.007162, 1.021388, 1.020239, 1.021447, 1.007240, 1.011620, 1.021348, 1.021348, 1.021348, 1.021348, 1.021348, 1.021348, 1.021494, 1.021494, 1.015500, 1.001597, 0.993681, 0.993681, 0.993008, 0.993008, 0.993008, 0.993008, 0.993008, 0.993008, 0.993008, 0.993008, 0.993008, 0.993008, 0.993008, 0.993008, 0.993008, 0.993008, 0.993008, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075, 0.986075,  },
-    { 0.777484, 0.849836, 0.881361, 0.906465, 0.865617, 0.848642, 0.858126, 0.889807, 0.906461, 0.928171, 0.938043, 0.949200, 0.962016, 0.969692, 0.961996, 0.966335, 0.963620, 0.961296, 0.958598, 0.962175, 0.962153, 0.961676, 0.958766, 0.960732, 0.959639, 0.961035, 0.960171, 0.960211, 0.960824, 0.961096, 0.961811, 0.962648, 0.963659, 0.964758, 0.965506, 0.966180, 0.967860, 0.969656, 0.970947, 0.971804, 0.975079, 0.976889, 0.978841, 0.979762, 0.981165, 0.981223, 0.982393, 0.983519, 0.985742, 0.986475, 0.986982, 0.987372, 0.988212, 0.989504, 0.989625, 0.989468, 0.991613, 0.993127, 0.991807, 0.993039, 0.992993, 0.993200, 0.994565, 0.994514, 0.994432, 0.996018, 0.995668, 0.996518, 0.996332, 0.996290, 0.996889, 0.995703, 0.996524, 0.995743, 0.999119, 0.998416, 0.999294, 0.998272, 0.999494, 1.000412, 0.998035, 0.996419, 0.998664, 0.998506, 0.997501, 1.001344, 0.999698, 0.994570, 0.995807, 0.993660, 0.998871, 0.996257, 0.997309, 0.995666, 0.990570, 0.995626, 0.999845, 0.998833, 0.997052, 0.996709, 0.999286, 1.002197, 1.002416, 1.000137, 1.003978, 1.004382, 1.009287, 1.008551, 1.013763, 1.008605, 1.004756, 1.012969, 1.010815, 1.010876, 1.015383, 1.017933, 1.019132, 1.021530, 1.013514, 1.024877, 1.015756, 1.013125, 1.015566, 1.021405, 1.013578, 1.014014, 1.018532, 1.018532, 1.020123, 1.027448, 1.027448, 1.027448, 1.027448, 1.027448, 1.027448, 1.019614, 1.019614, 1.019614, 1.019614, 1.019614, 1.019614, 1.021124, 1.023807, 1.023807, 1.023807, 1.023807, 1.023807, 1.023807, 1.023807, 1.023807, 1.023807, 1.023807, 1.023807, 1.023807, 1.023807, 1.023807, 1.023807, 1.023807, 1.023807, 1.023807, 1.023807, 1.023807, 1.023807, 1.023807, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142, 1.017142,  },
-    { 0.768899, 0.859566, 0.868660, 0.852532, 0.872490, 0.892725, 0.881562, 0.866837, 0.925723, 0.945194, 0.959959, 0.971813, 0.968389, 0.967759, 0.981668, 0.978640, 0.982425, 0.982213, 0.976421, 0.977012, 0.982413, 0.977864, 0.976401, 0.976838, 0.977443, 0.976589, 0.977748, 0.976002, 0.976800, 0.975999, 0.977034, 0.975927, 0.977154, 0.977273, 0.978960, 0.980006, 0.979935, 0.979307, 0.980530, 0.982598, 0.983128, 0.984904, 0.985876, 0.987222, 0.987732, 0.988199, 0.989208, 0.989228, 0.991007, 0.991598, 0.992215, 0.993467, 0.993710, 0.994069, 0.993981, 0.994361, 0.995747, 0.996312, 0.995699, 0.995950, 0.996376, 0.996878, 0.997838, 0.996955, 0.998374, 0.998594, 0.999679, 0.998351, 0.999414, 0.999537, 0.998618, 0.999754, 1.000731, 0.998966, 1.002234, 1.001931, 0.999167, 1.001205, 1.002779, 1.002699, 1.000894, 1.000027, 1.001136, 0.998800, 0.999445, 1.003775, 1.001074, 1.002857, 1.002555, 0.998466, 0.999644, 0.997879, 1.002654, 1.003206, 0.998430, 1.000023, 1.001060, 1.001502, 0.996861, 1.000298, 1.001281, 0.997420, 1.001959, 0.999228, 1.000719, 1.001420, 0.997701, 0.998687, 1.002896, 1.002422, 1.001887, 1.011236, 1.012831, 1.006676, 1.009851, 1.010054, 1.010092, 1.011967, 1.007694, 1.011416, 1.015280, 1.019717, 1.021681, 1.024486, 1.022072, 1.013151, 1.013151, 1.013151, 1.013151, 1.013151, 1.015019, 1.015019, 1.015019, 1.015019, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.015317, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125, 1.017125,  },
-    { 0.839956, 0.865961, 0.912298, 0.937921, 0.968516, 0.968353, 0.962645, 0.963233, 0.979847, 0.984981, 0.988644, 0.990501, 0.987910, 0.989468, 0.988971, 0.988646, 0.988633, 0.987577, 0.988624, 0.988283, 0.988830, 0.989202, 0.990099, 0.989453, 0.990223, 0.990880, 0.991825, 0.992900, 0.992541, 0.993117, 0.993645, 0.993637, 0.994247, 0.994249, 0.995051, 0.994991, 0.995080, 0.995882, 0.995747, 0.996192, 0.996023, 0.996544, 0.996112, 0.997431, 0.996826, 0.996992, 0.998046, 0.997116, 0.997843, 0.997358, 0.997824, 0.998115, 0.998831, 0.998957, 0.997734, 0.998225, 0.998536, 0.998704, 0.998530, 0.999574, 0.998465, 0.998008, 0.999279, 0.999366, 0.999454, 0.999361, 0.999275, 0.998270, 0.998416, 0.999956, 1.000144, 1.002339, 1.002544, 1.000509, 1.001264, 1.000063, 0.999302, 0.996942, 1.000912, 1.000050, 1.000915, 0.999449, 0.997133, 1.000205, 1.000240, 0.999976, 1.000236, 1.003088, 1.000793, 1.001628, 1.003462, 1.001988, 1.000440, 0.998254, 1.003483, 1.001957, 0.997312, 0.998684, 0.999162, 1.002331, 1.004931, 0.996815, 0.997753, 0.997029, 0.997681, 0.995262, 0.995683, 0.995347, 0.995537, 0.995855, 0.992675, 0.992999, 0.999251, 0.994313, 0.997785, 1.000656, 1.003728, 1.004030, 1.005151, 1.006796, 1.008584, 1.008584, 1.008584, 1.008584, 1.008584, 1.005319, 1.005319, 1.005319, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048, 1.004048,  },
-    { 0.861658, 0.925399, 0.971516, 0.982990, 0.992434, 0.991670, 0.999973, 1.000043, 0.993083, 0.995639, 0.995057, 0.994765, 0.995116, 0.995923, 0.996336, 0.996430, 0.995870, 0.996637, 0.996606, 0.997476, 0.997240, 0.998162, 0.998235, 0.998083, 0.997596, 0.998039, 0.998771, 0.998811, 0.998454, 0.998627, 0.998150, 0.998736, 0.998806, 0.998505, 0.998143, 0.998593, 0.998706, 0.998098, 0.998872, 0.998888, 0.998844, 0.998687, 0.999085, 0.998703, 0.999004, 0.999388, 0.999620, 0.999266, 0.998804, 0.998950, 0.999404, 0.999814, 0.999143, 1.000488, 0.998742, 0.999974, 1.000739, 0.999638, 0.999379, 0.998059, 0.998744, 0.998998, 0.999441, 1.000469, 1.000281, 0.999614, 0.998420, 0.999277, 0.998442, 1.000233, 0.999099, 0.999995, 1.000365, 1.000578, 1.000795, 0.997980, 0.999078, 0.998692, 1.000042, 1.001127, 0.999597, 1.000944, 0.998729, 1.000249, 1.002022, 1.001158, 1.001404, 0.999505, 0.999044, 1.000293, 1.001153, 0.998334, 1.001352, 1.003395, 1.001892, 1.001279, 0.999643, 0.999199, 0.999447, 0.997067, 0.997998, 1.000928, 1.000157, 1.000559, 1.000173, 0.999746, 0.999867, 1.000447, 1.001589, 1.001497, 1.002821, 1.001103, 1.001643, 1.000214, 1.000987, 1.000282, 1.002714, 1.003704, 1.003704, 1.004103, 1.004103, 1.004103, 1.003721, 1.001320, 1.001320, 1.000950, 1.000627, 0.999960, 0.997901, 0.997901, 0.997901, 0.997901, 0.997901, 0.997901, 0.997901, 0.997901, 0.997901, 0.997901, 0.997901, 0.997901, 0.997901, 0.997901, 0.997901, 0.997901, 0.997901, 0.999925, 0.999925, 0.999925, 1.000831, 1.000831, 1.000831, 1.000831, 1.000831, 1.000831, 1.000831, 1.000831, 1.000831, 1.000831, 1.000831, 1.000831, 1.000831, 1.000831, 1.000831, 1.000831, 1.000831, 1.000831, 1.002081, 1.002081, 1.002081, 1.002081, 1.002081, 1.002081, 1.002081, 1.002081, 1.002081, 1.002081, 1.002081, 1.002081, 1.002081, 1.002081, 1.002081, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370, 1.001370,  },
-    { 0.888012, 0.888012, 0.976153, 0.992298, 0.998194, 1.000647, 0.999943, 1.001850, 1.000058, 1.001049, 1.000415, 1.000445, 0.999754, 0.999602, 0.999038, 0.999360, 0.999352, 0.999436, 0.999568, 0.999189, 0.999526, 0.999854, 0.999661, 0.999592, 0.999705, 0.999757, 0.999562, 0.999328, 0.999065, 0.999693, 0.999667, 0.999524, 0.999433, 0.999448, 0.999285, 0.999274, 0.999776, 0.999271, 1.000119, 0.999198, 0.999772, 1.000295, 0.999845, 0.999724, 0.999606, 0.999950, 0.999794, 0.999597, 0.999305, 0.999749, 0.999644, 0.999705, 0.999882, 0.999665, 0.999794, 1.000224, 0.999795, 0.999888, 0.999818, 0.999782, 1.000380, 0.999894, 1.000021, 1.000553, 1.000501, 1.000478, 0.999858, 1.000275, 1.000135, 1.000516, 1.000148, 0.999943, 1.000052, 0.999137, 1.000090, 1.000529, 0.999132, 0.998689, 1.000216, 1.000217, 1.000034, 1.000121, 1.000197, 0.998887, 1.000615, 0.999998, 0.999232, 0.998459, 1.000808, 0.999540, 0.999216, 0.998480, 0.999391, 1.001703, 0.999803, 0.999429, 1.001745, 0.999870, 1.000718, 1.000747, 0.996927, 1.000126, 0.999562, 0.997671, 0.997870, 1.001165, 1.001102, 1.000046, 1.000708, 1.001004, 1.000856, 1.000705, 1.000177, 1.001061, 0.999174, 0.999368, 0.999040, 0.999040, 1.000290, 0.999860, 0.998796, 0.998993, 0.998926, 0.997532, 0.997532, 0.997532, 0.997532, 0.997532, 0.997532, 0.997083, 0.997083, 0.997083, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414, 0.997414,  },
-    { 0.958439, 0.980896, 0.986292, 0.995460, 0.998478, 0.998143, 0.998741, 1.000420, 1.000390, 1.000282, 1.000941, 0.999899, 0.999658, 0.999880, 1.001323, 1.000942, 1.000966, 1.000292, 0.999813, 1.000177, 0.999448, 1.000041, 1.000118, 0.999570, 1.000439, 0.999770, 0.999341, 0.999963, 0.999964, 0.999458, 1.000023, 1.000060, 1.000155, 0.999964, 1.000191, 0.999619, 1.000167, 1.000044, 0.999825, 0.999902, 0.999925, 1.000143, 1.000025, 0.999873, 0.999936, 1.000027, 0.999925, 1.000038, 0.999952, 0.999899, 0.999997, 0.999940, 0.999993, 1.000095, 0.999888, 1.000105, 0.999878, 0.999830, 0.999957, 1.000073, 1.000024, 1.000097, 0.999882, 1.000041, 1.000012, 0.999845, 1.000008, 0.999899, 1.000071, 0.999875, 0.999937, 0.999826, 1.000039, 0.999879, 0.999985, 1.000118, 0.999893, 0.999673, 1.000376, 1.000346, 1.000074, 1.000109, 1.000228, 0.999908, 0.999992, 1.000085, 1.000146, 0.999856, 0.999994, 1.000121, 0.999061, 1.000332, 1.000196, 0.999850, 0.999403, 0.999475, 0.998438, 0.999499, 0.999726, 0.999579, 0.999913, 0.999626, 0.999549, 0.999581, 1.000025, 1.000519, 1.000716, 0.999857, 1.000405, 1.000931, 1.000229, 0.999823, 0.999984, 1.000652, 1.000086, 0.999971, 0.999104, 0.999585, 1.000595, 0.999333, 0.999842, 0.999031, 0.999704, 0.999704, 0.999301, 0.999830, 0.999695, 0.999542, 1.000159, 1.000417, 1.000110, 1.000110, 1.000017, 1.000017, 1.000017, 1.000637, 1.000637, 1.000153, 1.000153, 1.000153, 1.000153, 1.000404, 1.000404, 1.000404, 1.000404, 1.000404, 1.000404, 1.000404, 1.000780, 1.000780, 1.000780, 1.000780, 1.000780, 1.000780, 1.000780, 1.000780, 1.000780, 1.000780, 1.000780, 1.000780, 1.000780, 1.000780, 1.000780, 1.000780, 1.000780, 1.000220, 1.000220, 1.000220, 1.000220, 1.000326, 1.000326, 1.000326, 1.000326, 1.000066, 1.000066, 1.000078, 1.000091, 1.000091, 1.000091, 1.000091, 0.999682, 0.999682, 0.999682, 0.999682, 1.000359, 1.000576, 1.000576, 1.000576, 1.000576, 1.000576, 1.000576, 1.000576, 1.000576, 1.000576, 1.001357, 1.001357, 1.001357, 1.001357, 1.001357, 1.001357, 1.001357, 1.000684, 1.000684, 1.000684, 1.000684, 1.000684, 1.000684, 1.000684, 1.000684, 1.000684, 1.000684, 1.000684, 1.000684, 1.000684, 1.000684, 1.000684, 1.000684, 1.000684, 1.000684, 1.000684, 1.000684, 1.000684, 1.000684, 1.000684, 1.000684, 1.000684, 1.000684, 1.000684, 1.000684, 1.000394, 1.000394, 1.000394, 1.000394, 1.000394, 1.000394, 1.000394, 1.000394, 1.000394, 1.000394, 1.000394, 1.000394, 1.000394, 1.000394, 1.000394, 1.000394, 1.000394, 1.000394, 1.000394, 1.000394, 1.000394, 1.000394, 1.000394, 1.000394, 1.000394, 1.000394, 1.000394,  },
-    { 0.944965, 0.944965, 0.944965, 0.944965, 0.944965, 0.944965, 0.966881, 0.986033, 0.991892, 0.996405, 0.998322, 1.000154, 0.999697, 1.000262, 1.000323, 0.999933, 0.999551, 0.999867, 0.999910, 1.000066, 1.000620, 1.000105, 1.000308, 0.999734, 1.000108, 0.999844, 0.999806, 0.999652, 0.999982, 0.999906, 1.000015, 0.999880, 0.999729, 0.999963, 0.999786, 0.999917, 0.999756, 1.000028, 0.999854, 1.000070, 0.999969, 1.000092, 0.999666, 0.999958, 1.000054, 0.999872, 0.999901, 1.000070, 0.999904, 0.999958, 0.999941, 1.000017, 0.999970, 0.999901, 1.000156, 0.999956, 0.999996, 0.999868, 0.999849, 1.000034, 0.999826, 0.999900, 1.000018, 1.000045, 0.999931, 1.000022, 1.000078, 1.000018, 1.000118, 1.000235, 0.999987, 0.999758, 0.999765, 1.000121, 0.999940, 0.999707, 0.999862, 0.999903, 1.000216, 1.000211, 1.000152, 1.000181, 0.999979, 0.999721, 0.999863, 0.999737, 1.000034, 0.999674, 1.000281, 1.000399, 1.000296, 1.000299, 1.000124, 1.000082, 1.000306, 1.000057, 0.999740, 0.999842, 0.999829, 0.999918, 1.000016, 0.999204, 0.999476, 0.999756, 1.000143, 1.000383, 0.999942, 1.000134, 1.000132, 1.000204, 0.999867, 1.000072, 1.000066, 1.000167, 0.999971, 0.999706, 0.999531, 0.999722, 1.000031, 1.000123, 1.000701, 1.000530, 1.000339, 1.000240, 0.999823, 1.000075, 1.000122, 1.000202, 1.000020, 0.999771, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 0.999538, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048,  },
-    { 0.959841, 0.959841, 0.959841, 0.959841, 0.959841, 0.971405, 0.991069, 0.996331, 0.997500, 0.999523, 0.999033, 1.000030, 0.999960, 0.999803, 0.999719, 0.999968, 1.000139, 1.000104, 1.000096, 1.000045, 1.000033, 1.000075, 0.999997, 0.999958, 0.999890, 1.000051, 1.000052, 0.999951, 1.000100, 1.000154, 0.999983, 1.000075, 1.000198, 1.000173, 0.999903, 0.999898, 0.999951, 0.999970, 1.000196, 1.000154, 0.999989, 0.999829, 1.000132, 1.000080, 1.000026, 0.999949, 0.999788, 1.000058, 1.000135, 1.000127, 0.999912, 0.999970, 1.000062, 1.000131, 0.999988, 0.999950, 1.000113, 1.000016, 1.000027, 1.000001, 1.000113, 0.999860, 1.000142, 1.000008, 0.999977, 1.000269, 1.000245, 0.999972, 1.000018, 0.999952, 0.999987, 0.999940, 1.000007, 1.000001, 1.000090, 1.000006, 1.000017, 0.999902, 1.000133, 1.000035, 0.999949, 0.999737, 0.999803, 0.999850, 1.000085, 1.000198, 1.000111, 1.000228, 0.999878, 0.999962, 0.999991, 1.000120, 0.999840, 1.000209, 1.000227, 0.999937, 0.999899, 0.999865, 1.000047, 1.000078, 0.999774, 1.000111, 0.999939, 0.999761, 0.999814, 1.000362, 1.000362, 1.000206, 1.000215, 1.000465, 1.000288, 1.000104, 1.000206, 1.000154, 1.000154, 1.000154, 1.000154, 1.000058, 1.000058, 0.999760, 0.999638, 0.999638, 0.999638, 0.999638, 0.999498, 0.999498, 0.999828, 1.000688, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768, 0.999768,  },
-    { 0.977692, 0.977692, 0.977692, 0.977692, 0.977692, 0.977692, 0.992476, 0.996357, 0.998241, 0.999482, 0.999859, 1.000138, 1.000226, 1.000218, 1.000160, 1.000172, 1.000060, 0.999980, 0.999946, 0.999932, 0.999926, 0.999999, 1.000090, 1.000081, 1.000105, 1.000194, 1.000172, 1.000139, 1.000181, 1.000103, 1.000137, 1.000114, 0.999955, 0.999993, 0.999908, 0.999965, 1.000107, 1.000065, 0.999976, 1.000006, 0.999907, 1.000030, 0.999984, 1.000043, 1.000072, 1.000039, 0.999933, 1.000049, 1.000029, 1.000097, 1.000074, 1.000127, 1.000054, 0.999979, 0.999896, 0.999792, 0.999908, 0.999799, 0.999940, 0.999930, 0.999971, 1.000126, 0.999884, 0.999817, 0.999802, 1.000000, 0.999999, 0.999916, 0.999937, 0.999856, 0.999865, 0.999974, 0.999856, 0.999901, 0.999796, 0.999769, 0.999882, 0.999759, 0.999964, 0.999877, 0.999942, 0.999844, 0.999942, 0.999757, 0.999862, 0.999852, 0.999795, 1.000173, 0.999926, 0.999926, 0.999895, 0.999852, 0.999933, 0.999928, 0.999783, 0.999745, 0.999664, 0.999785, 0.999941, 0.999882, 1.000006, 0.999662, 0.999713, 0.999866, 0.999961, 0.999754, 0.999928, 0.999938, 1.000214, 0.999984, 1.000157, 1.000079, 1.000119, 1.000119, 0.999842, 1.000085, 0.999930, 1.000032, 0.999928, 0.999928, 0.999928, 1.000185, 1.000185, 0.999894, 0.999918, 0.999918, 0.999918, 0.999918, 1.000264, 1.000264, 1.000264, 1.000264, 1.000264, 1.000264, 1.000264, 1.000264, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375, 1.000375,  },
-    { 0.995891, 0.995891, 0.995891, 0.995891, 0.995891, 0.997098, 0.998660, 0.999597, 0.999820, 0.999820, 0.999904, 0.999960, 1.000008, 1.000012, 1.000043, 1.000136, 1.000030, 0.999990, 0.999912, 0.999912, 1.000009, 1.000000, 1.000030, 1.000069, 1.000035, 1.000062, 1.000029, 0.999970, 0.999942, 0.999957, 0.999964, 1.000010, 0.999967, 1.000050, 1.000013, 0.999899, 0.999934, 0.999995, 0.999999, 1.000017, 1.000008, 0.999999, 1.000051, 1.000036, 1.000045, 1.000012, 1.000023, 1.000006, 1.000031, 0.999981, 0.999915, 0.999953, 1.000002, 1.000029, 1.000043, 1.000002, 1.000001, 1.000009, 1.000025, 1.000025, 1.000025, 1.000021, 1.000003, 1.000003, 1.000018, 1.000018, 0.999998, 0.999998, 0.999998, 0.999998, 0.999994, 0.999994, 1.000055, 1.000055, 1.000055, 1.000055, 1.000036, 1.000036, 1.000036, 1.000036, 1.000036, 1.000036, 1.000036, 1.000036, 1.000036, 1.000036, 1.000036, 1.000036, 1.000036, 1.000061, 0.999877, 0.999984, 0.999808, 0.999715, 0.999831, 0.999831, 0.999930, 0.999893, 0.999904, 0.999891, 0.999933, 0.999963, 1.000090, 1.000060, 0.999985, 1.000026, 1.000038, 1.000038, 1.000027, 1.000027, 1.000148, 1.000320, 1.000320, 1.000165, 1.000165, 1.000268, 1.000206, 1.000116, 1.000116, 1.000116, 1.000116, 1.000116, 1.000046, 1.000061, 1.000061, 1.000201, 1.000201, 1.000201, 1.000201, 0.999988, 0.999988, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052, 1.000052,  },
-    { 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 0.999989, 1.000000, 0.999982, 0.999982, 1.000037, 1.000009, 1.000009, 0.999996, 1.000007, 1.000016, 1.000016, 1.000003, 1.000003, 1.000003, 0.999991, 0.999977, 1.000018, 1.000003, 0.999986, 0.999986, 1.000000, 1.000015, 1.000013, 1.000013, 0.999972, 0.999957, 0.999974, 1.000016, 0.999993, 1.000004, 0.999991, 1.000008, 1.000019, 0.999983, 0.999992, 1.000007, 0.999979, 0.999997, 1.000014, 1.000003, 1.000003, 0.999989, 1.000003, 1.000013, 1.000015, 1.000006, 0.999993, 1.000026, 0.999998, 0.999990, 0.999991, 0.999991, 0.999982, 1.000006, 1.000006, 1.000013, 1.000013, 1.000013, 1.000013, 1.000013, 1.000007, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 0.999955, 0.999892, 1.000013, 1.000013, 0.999958, 0.999970, 1.000042, 1.000095, 1.000189, 1.000057, 1.000033, 1.000033, 1.000060, 1.000058, 1.000055, 0.999980, 0.999949, 0.999949, 0.999949, 0.999845, 0.999845, 0.999919, 0.999919, 0.999919, 0.999919, 0.999919, 0.999987, 0.999895, 0.999895, 0.999953, 0.999953, 0.999953, 0.999891, 0.999891, 0.999936, 1.000008, 1.000039, 1.000039, 1.000065, 0.999986, 0.999986, 0.999977, 0.999977, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950, 0.999950,  },
-    { 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 0.999992, 0.999992, 1.000010, 1.000010, 1.000021, 1.000023, 1.000005, 0.999999, 1.000015, 1.000022, 1.000022, 1.000022, 1.000022, 1.000004, 0.999980, 0.999978, 0.999969, 0.999988, 0.999981, 0.999995, 1.000013, 1.000008, 1.000008, 1.000014, 1.000015, 1.000012, 1.000000, 0.999999, 1.000003, 1.000006, 1.000000, 1.000000, 0.999991, 1.000004, 1.000003, 0.999998, 0.999998, 1.000003, 1.000000, 0.999997, 0.999982, 1.000000, 0.999988, 0.999988, 0.999995, 1.000000, 0.999999, 1.000002, 1.000002, 1.000005, 1.000003, 1.000003, 1.000003, 1.000000, 1.000002, 0.999996, 0.999997, 0.999997, 0.999997, 0.999997, 0.999997, 0.999997, 0.999997, 0.999997, 0.999997, 0.999997, 0.999997, 0.999997, 0.999997, 0.999997, 0.999997, 0.999997, 0.999997, 0.999997, 0.999997, 0.999997, 0.999997, 0.999997, 0.999997, 0.999997, 0.999997, 0.999997, 1.000040, 1.000004, 1.000004, 1.000006, 0.999967, 0.999967, 0.999967, 0.999995, 0.999995, 0.999995, 1.000045, 1.000045, 1.000045, 1.000045, 1.000045, 1.000045, 1.000050, 1.000050, 1.000050, 1.000027, 0.999987, 0.999998, 1.000003, 0.999999, 0.999985, 1.000003, 0.999962, 0.999979, 0.999966, 0.999996, 1.000018, 1.000018, 1.000018, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048, 1.000048,  },
-    { 0.999921, 0.999995, 0.999984, 1.000001, 0.999993, 1.000002, 1.000005, 1.000001, 1.000003, 1.000004, 0.999999, 0.999999, 0.999996, 0.999999, 1.000003, 0.999999, 0.999998, 0.999997, 1.000000, 1.000001, 0.999998, 0.999997, 0.999998, 1.000002, 1.000001, 1.000001, 0.999990, 0.999994, 1.000001, 1.000001, 0.999995, 0.999996, 0.999998, 0.999998, 1.000008, 0.999999, 0.999996, 0.999997, 0.999994, 0.999999, 0.999995, 0.999994, 0.999996, 0.999995, 1.000002, 0.999995, 1.000002, 0.999997, 0.999995, 1.000001, 1.000004, 1.000002, 0.999991, 0.999999, 1.000003, 1.000004, 0.999997, 0.999999, 0.999999, 0.999995, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 1.000000, 0.999993, 0.999993, 0.999990, 0.999990, 0.999990, 0.999990, 0.999990, 0.999990, 0.999990, 0.999992, 0.999992, 0.999992, 0.999992, 0.999992, 0.999992, 0.999992, 0.999996, 0.999996, 0.999996, 0.999996, 1.000000, 1.000000, 1.000000, 0.999998, 0.999998, 0.999998, 0.999988, 0.999988, 0.999988, 0.999988, 0.999988, 0.999988, 0.999988, 0.999988, 0.999988, 0.999988, 0.999988, 0.999988, 0.999988, 0.999988, 0.999988, 0.999988, 0.999985, 0.999985, 0.999985, 0.999985, 0.999985, 0.999985, 0.999985, 0.999985, 0.999985, 0.999993, 0.999993, 0.999993, 0.999993, 0.999993, 0.999993, 0.999993, 0.999993, 0.999993, 0.999993, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999998, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999, 0.999999,  },
-    { 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000,  },
-    { 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000,  },
-#else
-    { 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, },
-    { 0.616131, 0.616131, 0.734747, 0.886817, 0.980358, 0.954706, 0.950045, 0.960931, 0.959150, 0.943952, 0.930077, 0.918955, 0.908105, 0.900059, 0.890206, 0.882758, 0.876392, 0.871656, 0.867785, 0.864705, 0.862837, 0.860063, 0.858112, 0.855724, 0.854318, 0.853730, 0.854255, 0.854730, 0.856689, 0.858025, 0.859946, 0.861590, 0.865622, 0.868217, 0.870760, 0.873500, 0.876042, 0.878973, 0.882292, 0.885696, 0.892888, 0.897370, 0.900918, 0.905012, 0.907881, 0.911784, 0.914552, 0.918197, 0.927057, 0.930175, 0.934090, 0.936766, 0.940359, 0.944065, 0.946316, 0.947698, 0.958108, 0.960000, 0.961662, 0.964533, 0.967846, 0.971715, 0.972701, 0.976633, 0.986332, 0.988553, 0.991205, 0.994059, 0.998284, 0.999573, 1.001752, 1.006336, 1.016049, 1.018810, 1.020155, 1.022868, 1.023305, 1.030555, 1.030578, 1.032943, 1.043712, 1.047066, 1.047879, 1.054832, 1.057873, 1.060241, 1.068205, 1.063556, 1.076127, 1.080065, 1.084100, 1.082207, 1.083114, 1.087343, 1.093541, 1.093648, 1.091946, 1.094561, 1.080420, 1.098269, 1.110210, 1.127212, 1.112505, 1.115807, 1.128031, 1.110317, 1.106405, 1.115765, 1.108560, 1.100118, 1.096582, 1.097625, 1.094705, 1.112193, 1.098206, 1.111359, 1.102994, 1.102994, 1.113800, 1.109949, 1.109949, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, 1.112013, },
-    { 0.682484, 0.880496, 0.933150, 0.958092, 0.920851, 0.914449, 0.893873, 0.876759, 0.876373, 0.899515, 0.913776, 0.922544, 0.923000, 0.920533, 0.926424, 0.922544, 0.922558, 0.922367, 0.921105, 0.922131, 0.922986, 0.922701, 0.921832, 0.918927, 0.917866, 0.916825, 0.916769, 0.916389, 0.917947, 0.919901, 0.922736, 0.925191, 0.929896, 0.933066, 0.935910, 0.938847, 0.941973, 0.945050, 0.947802, 0.950800, 0.954503, 0.957288, 0.959916, 0.962157, 0.964407, 0.966783, 0.968470, 0.970027, 0.973132, 0.974853, 0.976195, 0.977813, 0.978842, 0.980216, 0.981274, 0.982492, 0.984145, 0.985066, 0.985370, 0.986200, 0.986943, 0.987840, 0.988997, 0.989405, 0.990457, 0.991030, 0.991626, 0.992166, 0.993854, 0.993865, 0.994239, 0.993748, 0.995467, 0.995010, 0.995235, 0.997263, 0.996522, 0.996437, 0.998079, 0.997185, 0.995883, 0.997825, 0.995797, 0.996259, 0.995685, 0.994869, 0.993122, 0.994995, 0.995255, 0.992955, 0.993960, 0.995288, 0.998428, 0.997589, 1.000767, 0.998583, 1.000946, 1.001708, 1.005122, 1.004659, 1.004930, 1.007516, 1.010077, 1.015583, 1.011771, 1.013571, 1.016376, 1.022755, 1.020342, 1.020257, 1.019837, 1.022947, 1.028265, 1.012395, 1.011431, 1.024815, 1.032472, 1.025095, 1.025829, 1.025144, 1.031136, 1.032366, 1.014361, 1.015134, 1.021166, 1.006008, 1.014564, 1.008802, 0.986902, 1.013066, 1.015823, 1.003702, 1.008200, 1.000433, 1.008661, 0.993279, 1.025083, 1.008555, 1.016568, 0.989536, 0.975502, 0.993166, 0.992309, 0.979477, 0.963696, 0.966868, 0.976616, 0.969930, 0.983457, 0.983457, 1.000261, 0.996421, 0.992135, 0.982932, 0.979702, 0.980815, 0.991218, 0.992173, 1.006269, 0.993281, 0.991224, 0.992747, 0.989325, 0.987845, 0.987845, 0.989084, 0.997563, 0.997563, 1.003053, 1.002884, 1.003967, 1.007797, 1.009997, 1.016264, 1.020943, 1.020943, 1.025365, 1.025365, 1.025365, 1.027905, 1.027905, 1.027905, 1.027905, 1.034669, 1.041676, 1.041676, 1.041676, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, 1.045761, },
-    { 0.789151, 0.895977, 0.899902, 0.888249, 0.863900, 0.849525, 0.855401, 0.884939, 0.891570, 0.910757, 0.920988, 0.913430, 0.944910, 0.947936, 0.948704, 0.950504, 0.953459, 0.956819, 0.956571, 0.954463, 0.954719, 0.955415, 0.955631, 0.955920, 0.956659, 0.957066, 0.957613, 0.957999, 0.958500, 0.959206, 0.960202, 0.961279, 0.962476, 0.963613, 0.964988, 0.966308, 0.967875, 0.969465, 0.971099, 0.972745, 0.974691, 0.976501, 0.978060, 0.979447, 0.980996, 0.981924, 0.983243, 0.984302, 0.985790, 0.986402, 0.987427, 0.988074, 0.988790, 0.989732, 0.990233, 0.990590, 0.991629, 0.992656, 0.992510, 0.992951, 0.993348, 0.993670, 0.994681, 0.994879, 0.995219, 0.996306, 0.996527, 0.996819, 0.997100, 0.996882, 0.998285, 0.997338, 0.997747, 0.997374, 0.999004, 0.999430, 0.999085, 0.998994, 1.000086, 1.000515, 0.999084, 0.999072, 0.997866, 0.997644, 0.997072, 0.999242, 0.998522, 0.997645, 0.996785, 0.995702, 0.998996, 0.996993, 0.996306, 0.997134, 0.994041, 0.996872, 0.995996, 0.997920, 0.997196, 0.997764, 0.999380, 1.000592, 1.001749, 1.001423, 1.004040, 1.003727, 1.007266, 1.008974, 1.011074, 1.011305, 1.008859, 1.014175, 1.011539, 1.018990, 1.016312, 1.018360, 1.016701, 1.024859, 1.019605, 1.021984, 1.017429, 1.013235, 1.010488, 1.016077, 1.015345, 1.013296, 1.011784, 1.006059, 1.029704, 1.019436, 1.029598, 1.013764, 1.020913, 1.021190, 1.014372, 1.011797, 1.012959, 1.020472, 1.016675, 1.015356, 1.010937, 1.015670, 1.019325, 1.017865, 1.025488, 1.025650, 1.025650, 1.025650, 1.020218, 1.029207, 1.030376, 1.024211, 1.023268, 1.023268, 1.023268, 1.023268, 1.028098, 1.027407, 1.032736, 1.032736, 1.030909, 1.030909, 1.030909, 1.030909, 1.025261, 1.013170, 1.013170, 1.014094, 1.014094, 1.014094, 1.015222, 1.015222, 1.015222, 1.015222, 1.022498, 1.022498, 1.022498, 1.022498, 1.022498, 1.007050, 1.007050, 1.004453, 1.004453, 1.004453, 1.004453, 1.004453, 1.006778, 1.010545, 1.010545, 1.010545, 1.010545, 1.010545, 1.010545, 1.010545, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, 1.018806, },
-    { 0.814332, 0.896248, 0.876293, 0.844228, 0.834564, 0.870821, 0.895009, 0.927252, 0.945764, 0.945946, 0.961786, 0.968900, 0.970908, 0.979862, 0.980358, 0.979291, 0.978855, 0.976864, 0.977286, 0.976420, 0.977588, 0.976528, 0.976966, 0.976470, 0.976110, 0.975982, 0.976006, 0.975435, 0.975317, 0.975288, 0.975882, 0.976030, 0.976923, 0.977154, 0.978024, 0.978862, 0.979845, 0.979924, 0.981186, 0.982767, 0.983479, 0.984747, 0.985991, 0.987061, 0.987816, 0.988622, 0.989690, 0.990369, 0.991295, 0.991780, 0.992481, 0.993135, 0.993882, 0.994527, 0.994501, 0.995248, 0.995907, 0.996427, 0.996390, 0.996621, 0.997259, 0.997409, 0.998096, 0.997957, 0.998541, 0.998584, 0.999439, 0.998592, 0.999987, 0.999972, 0.999644, 1.000285, 1.000988, 1.000139, 1.001206, 1.001282, 1.000188, 1.001359, 1.001694, 1.001627, 1.000789, 1.000912, 1.001981, 1.000228, 1.000351, 1.002311, 1.002417, 1.002421, 1.002071, 1.000903, 1.000191, 1.001110, 1.000952, 0.999693, 1.001240, 1.000438, 1.000509, 1.001116, 0.999694, 0.999756, 1.001231, 1.000523, 1.001255, 1.000204, 1.001585, 1.003166, 1.000129, 1.000272, 1.005635, 1.003530, 1.001516, 1.008032, 1.012237, 1.006608, 1.009053, 1.011160, 1.013107, 1.012571, 1.008652, 1.013285, 1.013899, 1.009900, 1.022898, 1.020338, 1.022302, 1.013907, 1.011245, 1.015492, 1.012694, 1.007702, 1.018534, 1.008326, 1.017731, 1.014660, 1.019608, 1.005804, 1.010028, 1.013225, 1.007712, 1.009375, 1.011659, 1.011659, 1.005437, 1.008122, 1.008122, 1.006613, 1.003185, 1.007230, 1.005147, 1.005147, 1.007733, 1.004279, 1.004279, 1.004279, 1.008603, 1.008603, 1.008603, 1.002206, 1.012225, 1.011828, 1.011174, 1.011174, 1.011174, 1.020357, 1.020357, 1.020357, 1.020357, 1.020357, 1.020357, 1.021572, 1.021572, 1.021572, 1.021572, 1.021572, 1.021572, 1.019650, 1.019650, 1.019650, 1.019650, 1.019650, 1.019650, 1.019650, 1.019650, 1.019650, 1.019650, 1.019650, 1.010059, 1.010059, 1.010059, 1.010059, 1.010059, 1.005427, 1.005427, 1.005427, 1.013256, 1.013256, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, 1.009970, },
-    { 0.858227, 0.835587, 0.909241, 0.955173, 0.961592, 0.973367, 0.978602, 0.983938, 0.984539, 0.987252, 0.985549, 0.986137, 0.987582, 0.987367, 0.987766, 0.987784, 0.987745, 0.988689, 0.988358, 0.988600, 0.988875, 0.989293, 0.989705, 0.990029, 0.990470, 0.991156, 0.991551, 0.992208, 0.992572, 0.993020, 0.993576, 0.993856, 0.994439, 0.994666, 0.994902, 0.995232, 0.995428, 0.995635, 0.995890, 0.996078, 0.996244, 0.996496, 0.996496, 0.996914, 0.997054, 0.997226, 0.997453, 0.997607, 0.997668, 0.997852, 0.997987, 0.997985, 0.998166, 0.998320, 0.998163, 0.998626, 0.998849, 0.999001, 0.998870, 0.999212, 0.998890, 0.999065, 0.999312, 0.999570, 0.999283, 0.999392, 0.999472, 0.999559, 1.000136, 0.999971, 1.000137, 1.000171, 1.000619, 0.999684, 1.000420, 1.000286, 0.999898, 0.999951, 1.000012, 0.999540, 1.000046, 1.000230, 1.000375, 1.000555, 1.000350, 0.999877, 1.000192, 1.001255, 1.000443, 1.000823, 1.000760, 1.000983, 1.000327, 0.999792, 1.000579, 0.999569, 1.000239, 0.999329, 0.998884, 1.000581, 1.000055, 0.999467, 1.000162, 0.998296, 0.997568, 0.997628, 0.998421, 0.998911, 0.997357, 0.998709, 0.997042, 0.996396, 0.999556, 1.000073, 0.999243, 1.000316, 1.000907, 0.999008, 1.004315, 1.002645, 1.004206, 1.007813, 1.008300, 1.004697, 1.005047, 1.004431, 0.998737, 1.001784, 1.000455, 1.001740, 1.001106, 1.002817, 1.003844, 1.003530, 1.000599, 0.994017, 1.001614, 1.000397, 0.996718, 0.997037, 0.998441, 1.000001, 0.993741, 1.000908, 1.000908, 1.001036, 1.001036, 1.003975, 1.003975, 1.008938, 1.008785, 1.005417, 1.004545, 0.998832, 0.999253, 1.000662, 0.996537, 0.995415, 0.997241, 0.990184, 0.992132, 0.992132, 1.000281, 1.000281, 1.000447, 0.999427, 0.999427, 0.999427, 1.000596, 1.000596, 1.000596, 1.000596, 1.000596, 1.000596, 1.003926, 1.003926, 1.003926, 1.003926, 1.003926, 1.002241, 1.002241, 1.002241, 1.002241, 1.002241, 0.999984, 0.999984, 0.999984, 0.999984, 0.999984, 0.999984, 0.999984, 0.999984, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, 1.004992, },
-    { 0.849514, 0.967738, 0.982055, 0.985196, 0.988990, 0.992610, 0.989578, 0.990533, 0.994646, 0.994194, 0.994784, 0.995109, 0.995116, 0.995406, 0.995684, 0.996098, 0.996242, 0.996673, 0.996910, 0.997312, 0.997416, 0.997589, 0.997800, 0.998024, 0.998077, 0.998168, 0.998279, 0.998397, 0.998475, 0.998393, 0.998379, 0.998509, 0.998463, 0.998637, 0.998609, 0.998689, 0.998628, 0.998793, 0.998716, 0.998763, 0.998837, 0.999005, 0.999017, 0.999103, 0.999218, 0.999230, 0.999159, 0.999138, 0.999170, 0.999117, 0.999173, 0.999350, 0.999440, 0.999405, 0.999402, 0.999642, 0.999779, 0.999514, 0.999587, 0.999662, 0.999539, 0.999542, 0.999493, 0.999791, 0.999788, 0.999623, 0.999436, 0.999813, 0.999996, 0.999789, 0.999788, 0.999908, 0.999775, 0.999595, 0.999552, 0.999594, 0.999823, 0.999817, 0.999720, 0.999997, 1.000167, 1.000052, 1.000043, 0.999362, 0.999311, 0.999809, 0.999453, 0.999422, 0.999543, 1.000417, 0.999728, 0.999776, 1.000459, 1.000544, 0.999527, 0.999973, 0.999542, 0.999629, 0.999543, 0.999983, 0.999980, 0.999725, 0.999206, 0.998993, 0.999610, 0.999988, 0.999857, 1.000845, 1.000643, 0.999988, 0.999580, 0.998932, 0.999068, 1.000619, 0.999884, 0.999302, 0.999250, 1.002150, 0.999881, 0.999011, 0.998997, 1.000695, 1.000825, 1.000397, 1.002974, 0.998637, 0.997673, 0.997554, 0.998931, 1.001232, 1.000958, 1.001564, 0.999779, 1.000649, 0.999308, 1.000964, 1.001280, 1.002232, 1.000503, 0.998577, 0.998245, 1.001079, 1.001291, 0.999071, 0.999071, 1.000005, 1.001124, 1.001384, 1.001663, 1.003587, 1.003587, 1.003079, 1.002593, 1.001578, 1.000020, 1.001489, 1.001913, 1.000311, 1.001327, 1.002771, 1.002771, 1.002579, 0.998380, 0.998380, 0.998947, 0.998947, 1.003311, 1.002575, 1.002575, 1.001160, 1.001160, 1.001160, 1.001160, 1.001160, 1.001160, 1.001160, 1.001160, 1.001160, 1.001160, 1.001160, 1.001026, 1.001031, 1.001031, 1.001329, 1.001329, 1.001329, 1.000726, 1.000726, 1.000726, 1.000726, 1.002521, 1.001268, 1.001268, 1.001268, 1.001268, 0.999547, 0.999547, 0.999547, 1.000632, 1.000632, 1.000632, 1.000632, 1.000082, 1.000082, 1.000082, 1.000082, 1.000082, 1.000082, 1.000082, 1.000082, 1.000082, 1.000082, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, 1.001154, },
-    { 0.920871, 0.989518, 0.996647, 0.997549, 0.998742, 1.000943, 1.000874, 1.001488, 1.001089, 1.000924, 1.000418, 1.000218, 0.999888, 0.999827, 0.999459, 0.999532, 0.999514, 0.999490, 0.999290, 0.999342, 0.999446, 0.999536, 0.999412, 0.999405, 0.999531, 0.999554, 0.999526, 0.999648, 0.999569, 0.999591, 0.999564, 0.999553, 0.999626, 0.999667, 0.999671, 0.999539, 0.999683, 0.999676, 0.999702, 0.999697, 0.999717, 0.999760, 0.999754, 0.999807, 0.999786, 0.999830, 0.999758, 0.999716, 0.999755, 0.999823, 0.999932, 0.999887, 0.999905, 0.999868, 0.999858, 0.999822, 0.999884, 1.000041, 0.999881, 0.999880, 1.000030, 0.999878, 0.999975, 0.999914, 0.999847, 0.999974, 0.999851, 0.999855, 0.999881, 1.000058, 0.999940, 1.000075, 0.999833, 0.999786, 0.999887, 0.999897, 0.999671, 1.000026, 0.999860, 0.999627, 0.999917, 0.999961, 0.999614, 0.999897, 0.999509, 0.999874, 1.000254, 0.999772, 0.999761, 1.000059, 0.999613, 0.999925, 0.999479, 0.999945, 0.999423, 0.999651, 1.000066, 0.999763, 1.000078, 0.999873, 0.999871, 1.000126, 0.999602, 0.999646, 0.999434, 0.999696, 0.999213, 1.000221, 1.000273, 0.999856, 1.000287, 1.000048, 0.999923, 0.999587, 0.999996, 0.998859, 0.999870, 1.000013, 1.000513, 0.999477, 0.999637, 1.000142, 0.999760, 0.999749, 0.999794, 1.000090, 0.999062, 0.998599, 0.999196, 0.998599, 0.999449, 1.000884, 1.001418, 1.001911, 1.000091, 0.999568, 0.998772, 0.998567, 1.000621, 0.999673, 1.000687, 1.002959, 0.999669, 0.999334, 1.000141, 0.998551, 0.999158, 0.999158, 0.999158, 0.998715, 0.999914, 1.000906, 1.000649, 1.000755, 1.000378, 1.000378, 0.999512, 0.999759, 0.999759, 0.999425, 0.998542, 0.999474, 0.999610, 0.999685, 1.000120, 1.000120, 1.000669, 1.000669, 1.000547, 1.000547, 1.000547, 1.000547, 0.999443, 0.999911, 0.999911, 0.999911, 1.001443, 1.001443, 1.000810, 1.000810, 1.000810, 0.999297, 0.999297, 0.999297, 0.999297, 0.999950, 0.999950, 0.999188, 0.999188, 0.999188, 0.999188, 0.999188, 0.999188, 0.999188, 0.999188, 0.999188, 0.999188, 0.999188, 0.999188, 0.999188, 1.000086, 1.000086, 1.000086, 1.000086, 1.000086, 1.000086, 1.000086, 1.000086, 1.000086, 1.000086, 1.000164, 1.000164, 1.000164, 1.000164, 1.000164, 1.000164, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, 0.999236, },
-    { 0.983884, 1.009527, 0.998399, 0.998548, 0.998817, 0.999316, 0.999543, 0.996498, 0.999865, 1.000339, 0.999933, 0.999915, 0.999840, 1.000045, 1.000348, 1.000024, 0.999951, 1.000038, 0.999801, 1.000194, 1.000213, 1.000145, 1.000086, 1.000056, 1.000119, 0.999890, 0.999941, 0.999898, 0.999950, 0.999867, 1.000043, 0.999971, 0.999986, 1.000027, 1.000016, 0.999969, 0.999999, 0.999975, 0.999970, 0.999990, 0.999974, 0.999990, 1.000003, 0.999955, 0.999985, 0.999990, 0.999973, 0.999986, 0.999996, 1.000011, 1.000029, 0.999961, 0.999968, 1.000010, 0.999949, 0.999984, 0.999970, 0.999959, 0.999986, 1.000006, 0.999956, 1.000019, 0.999980, 0.999974, 1.000037, 1.000024, 0.999996, 0.999963, 1.000020, 0.999996, 1.000023, 1.000038, 1.000023, 0.999969, 0.999985, 0.999986, 1.000033, 0.999991, 1.000006, 1.000031, 0.999973, 1.000074, 0.999942, 0.999926, 0.999948, 1.000055, 0.999984, 0.999867, 0.999994, 0.999941, 1.000031, 0.999998, 1.000054, 1.000011, 1.000009, 0.999933, 0.999837, 1.000151, 0.999973, 1.000008, 1.000081, 0.999886, 1.000129, 1.000051, 0.999748, 0.999908, 1.000367, 1.000060, 1.000032, 1.000296, 1.000238, 1.000135, 1.000086, 1.000070, 0.999961, 0.999999, 0.999738, 0.999696, 1.000215, 1.000302, 1.000066, 1.000019, 0.999921, 0.999859, 0.999876, 0.999814, 0.999672, 0.999922, 1.000232, 1.000249, 1.000077, 0.999522, 0.999170, 1.000412, 1.000480, 1.000544, 1.000280, 0.999999, 1.000061, 1.000291, 1.000023, 0.999751, 0.999210, 0.999799, 0.999731, 1.000166, 0.999796, 1.000074, 0.999907, 0.999443, 1.000727, 1.000373, 0.999860, 1.000092, 0.999796, 1.000332, 0.999885, 1.000012, 1.000141, 0.999420, 1.000435, 0.999961, 1.000131, 0.999702, 0.999281, 0.999257, 1.000092, 0.999929, 1.000442, 1.000034, 0.999452, 0.999570, 0.999108, 0.999829, 0.999834, 0.999734, 0.999914, 0.999008, 0.998763, 0.999507, 0.999716, 0.999819, 1.000297, 0.999654, 1.000330, 1.000227, 1.000450, 1.000444, 1.000000, 1.000000, 1.000000, 1.000899, 0.999760, 0.999760, 1.000840, 1.000459, 0.999433, 0.999433, 0.999933, 0.999753, 1.000344, 1.000348, 1.000501, 1.000219, 1.000771, 1.000624, 1.000413, 1.000203, 0.999734, 1.000613, 1.000494, 0.999514, 1.000282, 1.000038, 1.000317, 1.000192, 0.999972, 0.999738, 0.999804, 1.000320, 1.000031, 1.000031, 1.000031, 1.000031, 1.000031, 1.000031, 1.000031, 1.000013, 0.999737, 0.999692, 0.999692, 0.999692, 0.999692, 0.999692, 0.999692, 0.999692, 0.999692, 0.999692, 0.999692, 0.999692, 0.999692, 0.999692, 0.999692, 0.999692, 0.999692, 0.999692, 0.999692, 0.999692, 0.999692, 0.999692, 0.999692, 0.999692, 0.999692, 0.999692, 0.999692, 0.999692, },
-    { 0.972613, 1.005636, 1.000563, 1.000465, 0.999341, 1.000017, 0.999630, 0.999826, 1.000067, 1.000026, 0.999776, 1.000350, 1.000098, 0.999771, 1.000017, 0.999927, 1.000153, 1.000053, 1.000045, 1.000025, 1.000057, 1.000000, 0.999953, 0.999978, 0.999879, 1.000067, 1.000001, 1.000033, 1.000003, 1.000129, 1.000133, 0.999988, 1.000043, 1.000061, 0.999960, 1.000029, 1.000011, 1.000043, 0.999970, 0.999969, 1.000078, 1.000021, 0.999938, 0.999995, 1.000016, 0.999960, 0.999931, 0.999965, 0.999993, 1.000002, 0.999980, 0.999972, 0.999960, 0.999952, 1.000024, 0.999992, 0.999965, 1.000005, 0.999979, 0.999994, 0.999951, 0.999982, 0.999927, 0.999977, 0.999969, 0.999953, 1.000000, 1.000026, 1.000007, 1.000084, 1.000018, 0.999933, 0.999953, 1.000088, 0.999969, 1.000011, 1.000112, 0.999922, 1.000015, 1.000099, 0.999974, 1.000027, 1.000068, 1.000036, 1.000059, 1.000073, 0.999891, 0.999927, 1.000089, 1.000148, 1.000019, 1.000053, 0.999965, 1.000004, 1.000009, 1.000013, 1.000036, 0.999920, 0.999922, 1.000045, 0.999952, 0.999985, 0.999909, 0.999912, 1.000083, 1.000111, 0.999937, 0.999965, 1.000067, 0.999992, 1.000182, 1.000169, 1.000110, 0.999965, 0.999937, 0.999688, 1.000110, 0.999912, 1.000067, 1.000033, 0.999755, 0.999927, 1.000160, 1.000469, 1.000122, 1.000154, 1.000144, 1.000154, 0.999902, 0.999619, 0.999788, 0.999892, 0.999974, 0.999919, 1.000067, 1.000289, 0.999877, 0.999938, 1.000251, 1.000306, 1.000398, 1.000140, 0.999697, 1.000048, 0.999990, 1.000091, 0.999976, 1.000639, 1.000194, 1.000138, 1.000310, 0.999639, 0.999651, 0.999889, 0.999977, 1.000589, 1.000297, 1.000558, 1.000342, 0.999972, 1.000066, 0.999743, 0.999917, 0.999895, 0.999860, 1.000289, 1.000542, 1.000366, 0.999994, 0.999970, 0.999884, 1.000112, 0.999925, 0.999863, 1.000140, 1.000035, 0.999967, 1.000013, 0.999705, 1.000061, 0.999820, 1.000120, 1.000329, 0.999935, 0.999759, 1.000075, 0.999780, 0.999872, 1.000153, 0.999895, 0.999917, 0.999848, 0.999907, 0.999650, 0.999864, 1.000030, 0.999972, 0.999892, 1.000175, 0.999824, 0.999844, 1.000162, 0.999860, 0.999860, 0.999860, 0.999931, 0.999865, 1.000174, 1.000353, 1.000186, 1.000186, 1.000101, 1.000069, 0.999987, 1.000273, 1.000374, 1.000190, 0.999860, 0.999860, 0.999860, 0.999860, 0.999790, 1.000435, 1.000435, 1.000435, 1.000482, 1.000482, 1.000417, 1.000319, 1.000286, 1.000353, 1.000574, 1.000574, 1.000371, 1.000371, 1.000371, 1.000371, 1.000371, 1.000371, 1.000371, 1.000371, 1.000371, 1.000371, 1.000371, 1.000371, 1.000371, 1.000371, 1.000371, 1.000371, 1.000371, 1.000371, 1.000371, 1.000371, 1.000371, 1.000371, 1.000371, },
-    { 0.969643, 0.995186, 0.999637, 1.000524, 0.999958, 0.999958, 1.000003, 0.999882, 0.999914, 1.000140, 0.999899, 0.999910, 1.000087, 0.999961, 1.000175, 0.999951, 0.999953, 1.000086, 1.000040, 1.000061, 1.000059, 1.000057, 1.000023, 0.999947, 0.999984, 1.000004, 1.000044, 0.999992, 1.000007, 1.000009, 1.000021, 1.000054, 1.000038, 1.000030, 0.999997, 1.000020, 0.999975, 1.000000, 0.999983, 1.000027, 1.000026, 1.000042, 1.000023, 1.000009, 1.000054, 0.999938, 1.000027, 0.999986, 0.999916, 0.999953, 0.999992, 0.999979, 1.000049, 0.999955, 0.999968, 1.000013, 0.999996, 0.999961, 1.000015, 0.999975, 0.999987, 0.999966, 1.000013, 0.999965, 0.999989, 0.999976, 0.999998, 1.000023, 1.000043, 1.000031, 0.999963, 0.999975, 0.999964, 0.999953, 1.000050, 1.000048, 1.000004, 1.000007, 0.999973, 0.999938, 0.999985, 1.000016, 0.999983, 1.000007, 1.000065, 1.000030, 1.000012, 0.999927, 0.999978, 0.999998, 1.000026, 1.000004, 1.000014, 0.999979, 0.999934, 1.000009, 1.000060, 1.000016, 0.999951, 1.000031, 1.000074, 0.999946, 1.000027, 1.000027, 0.999956, 0.999998, 0.999914, 1.000032, 0.999988, 1.000005, 0.999905, 0.999891, 1.000047, 0.999804, 0.999948, 1.000019, 0.999941, 1.000052, 1.000015, 0.999903, 0.999844, 0.999907, 1.000020, 1.000077, 0.999830, 1.000096, 1.000254, 0.999959, 0.999860, 1.000008, 0.999844, 1.000119, 1.000277, 1.000211, 1.000230, 0.999929, 1.000405, 1.000142, 1.000270, 1.000255, 1.000137, 1.000228, 0.999847, 0.999916, 0.999787, 0.999866, 1.000208, 0.999924, 1.000359, 1.000178, 1.000075, 1.000027, 1.000003, 0.999950, 1.000024, 1.000054, 1.000042, 0.999851, 1.000153, 1.000090, 0.999910, 1.000029, 1.000052, 1.000131, 1.000080, 1.000192, 1.000076, 1.000029, 1.000209, 1.000044, 0.999959, 0.999974, 0.999847, 0.999951, 1.000046, 0.999922, 1.000044, 0.999857, 0.999907, 0.999974, 1.000027, 1.000016, 1.000086, 1.000045, 1.000058, 1.000000, 0.999747, 0.999829, 0.999894, 0.999832, 0.999818, 0.999790, 0.999954, 1.000020, 0.999994, 1.000041, 0.999971, 1.000042, 1.000043, 1.000025, 1.000088, 0.999924, 0.999881, 0.999942, 1.000044, 0.999982, 0.999825, 1.000037, 1.000019, 1.000103, 1.000011, 1.000004, 0.999973, 0.999980, 0.999997, 1.000004, 0.999952, 1.000045, 1.000048, 1.000048, 1.000048, 1.000048, 1.000105, 1.000111, 1.000089, 1.000089, 1.000089, 1.000089, 1.000106, 1.000106, 1.000106, 1.000106, 1.000106, 1.000106, 1.000106, 1.000106, 1.000106, 1.000106, 1.000106, 1.000106, 1.000106, 1.000106, 1.000106, 1.000106, 1.000106, 1.000106, 1.000106, 1.000106, 1.000106, 1.000106, 1.000106, 1.000106, 1.000106, 1.000106, 1.000106, 1.000106, },
-    { 0.993031, 1.003014, 0.999715, 0.999715, 0.999715, 0.999945, 0.999993, 1.000025, 0.999986, 0.999976, 1.000036, 1.000081, 1.000039, 0.999983, 0.999929, 0.999946, 0.999991, 1.000067, 1.000040, 1.000040, 1.000016, 1.000029, 1.000012, 1.000033, 0.999997, 1.000045, 1.000016, 1.000057, 1.000028, 1.000021, 1.000007, 1.000023, 0.999971, 1.000047, 0.999960, 1.000017, 0.999967, 1.000008, 1.000007, 0.999969, 0.999993, 1.000043, 1.000023, 1.000030, 0.999991, 0.999995, 1.000001, 1.000036, 1.000003, 0.999981, 1.000031, 1.000027, 1.000033, 1.000000, 0.999931, 0.999958, 1.000011, 1.000004, 1.000012, 1.000008, 1.000023, 1.000075, 1.000014, 1.000033, 1.000072, 1.000052, 1.000039, 0.999999, 1.000060, 1.000013, 1.000001, 1.000033, 1.000006, 1.000052, 1.000036, 0.999992, 0.999966, 0.999977, 1.000008, 1.000014, 0.999963, 1.000022, 0.999981, 0.999970, 0.999988, 0.999998, 1.000002, 1.000023, 1.000015, 0.999974, 0.999990, 0.999978, 1.000011, 0.999977, 1.000008, 1.000042, 1.000017, 1.000012, 0.999998, 1.000041, 1.000032, 0.999981, 1.000063, 1.000000, 1.000017, 0.999949, 0.999952, 0.999963, 0.999961, 1.000037, 0.999985, 1.000009, 1.000075, 1.000029, 1.000030, 1.000046, 0.999920, 0.999930, 1.000005, 0.999908, 0.999880, 1.000008, 1.000111, 1.000044, 0.999912, 1.000011, 1.000090, 1.000026, 0.999871, 0.999857, 0.999971, 1.000252, 1.000148, 1.000154, 1.000110, 1.000110, 1.000153, 1.000022, 1.000170, 1.000071, 1.000021, 1.000024, 1.000022, 0.999902, 0.999962, 0.999925, 1.000006, 1.000006, 1.000006, 1.000030, 1.000030, 0.999999, 0.999952, 0.999952, 0.999952, 0.999952, 1.000013, 0.999988, 1.000027, 1.000014, 1.000014, 1.000014, 1.000014, 1.000014, 1.000014, 1.000014, 1.000059, 1.000059, 1.000059, 0.999999, 0.999999, 0.999969, 0.999969, 0.999969, 0.999955, 0.999955, 0.999981, 0.999981, 0.999995, 0.999995, 0.999995, 0.999995, 0.999995, 0.999995, 0.999995, 0.999995, 0.999995, 0.999964, 0.999964, 0.999964, 0.999964, 0.999964, 0.999964, 0.999964, 0.999964, 1.000012, 0.999992, 1.000015, 1.000002, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, },
-    { 0.998593, 1.002169, 0.999993, 0.999993, 0.999993, 0.999993, 1.000001, 1.000005, 1.000023, 1.000007, 1.000019, 1.000017, 1.000002, 1.000024, 1.000000, 1.000031, 1.000005, 1.000006, 1.000024, 0.999972, 0.999952, 1.000000, 1.000028, 1.000031, 1.000016, 1.000006, 1.000005, 1.000000, 0.999994, 0.999994, 1.000021, 1.000012, 0.999990, 1.000005, 0.999996, 0.999990, 0.999971, 0.999997, 0.999989, 1.000009, 0.999998, 0.999990, 0.999966, 1.000010, 1.000015, 0.999989, 1.000003, 1.000000, 1.000024, 1.000003, 0.999990, 0.999979, 1.000020, 0.999932, 0.999972, 0.999973, 0.999964, 0.999936, 0.999924, 0.999951, 1.000024, 1.000024, 0.999983, 1.000005, 1.000026, 0.999964, 1.000050, 1.000011, 0.999988, 0.999928, 0.999972, 0.999991, 0.999970, 0.999946, 0.999956, 0.999923, 0.999969, 1.000032, 1.000037, 1.000071, 1.000031, 0.999988, 1.000004, 0.999989, 1.000034, 0.999981, 1.000016, 0.999999, 1.000039, 0.999984, 0.999970, 1.000029, 0.999987, 1.000014, 0.999996, 0.999993, 0.999968, 0.999994, 0.999982, 0.999971, 0.999975, 0.999956, 0.999966, 1.000079, 1.000025, 1.000022, 1.000018, 0.999850, 0.999961, 0.999955, 0.999996, 0.999997, 1.000061, 0.999991, 0.999957, 1.000009, 1.000001, 1.000042, 1.000002, 1.000025, 0.999935, 1.000025, 1.000028, 0.999935, 1.000019, 0.999984, 1.000034, 1.000019, 1.000070, 0.999994, 0.999993, 0.999993, 0.999983, 0.999983, 0.999942, 0.999985, 0.999988, 1.000059, 1.000035, 0.999973, 0.999975, 1.000004, 1.000019, 1.000019, 1.000000, 0.999986, 0.999947, 0.999947, 0.999947, 0.999966, 0.999966, 1.000014, 1.000014, 1.000014, 1.000019, 1.000032, 1.000032, 1.000034, 1.000034, 1.000029, 1.000029, 1.000029, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, 1.000258, },
-    { 1.008129, 0.999989, 0.999989, 0.999989, 0.999989, 0.999989, 0.999988, 1.000001, 0.999985, 0.999992, 0.999998, 0.999985, 0.999980, 1.000013, 0.999993, 1.000005, 0.999978, 0.999975, 0.999990, 1.000001, 1.000002, 1.000004, 0.999995, 1.000006, 0.999986, 1.000003, 0.999995, 0.999992, 0.999995, 0.999988, 0.999998, 0.999996, 0.999991, 1.000002, 1.000006, 0.999996, 0.999997, 1.000005, 0.999984, 0.999991, 1.000004, 1.000000, 1.000002, 1.000008, 1.000015, 0.999996, 0.999976, 0.999983, 1.000013, 1.000001, 0.999984, 1.000007, 0.999998, 1.000004, 0.999983, 0.999979, 0.999964, 0.999977, 1.000041, 1.000075, 1.000015, 1.000020, 1.000025, 1.000071, 0.999968, 0.999994, 1.000008, 0.999938, 0.999969, 0.999996, 1.000016, 0.999966, 0.999935, 0.999973, 0.999970, 0.999950, 1.000004, 0.999986, 1.000021, 1.000066, 1.000004, 1.000031, 0.999954, 1.000035, 1.000018, 1.000041, 0.999997, 1.000004, 1.000050, 1.000059, 1.000012, 0.999986, 1.000012, 1.000017, 0.999953, 0.999981, 1.000027, 1.000002, 1.000030, 0.999960, 1.000021, 0.999991, 1.000008, 1.000018, 0.999994, 0.999986, 1.000042, 0.999968, 0.999986, 0.999971, 1.000005, 1.000015, 1.000025, 0.999999, 1.000033, 1.000003, 0.999995, 1.000037, 1.000022, 0.999998, 1.000006, 1.000047, 1.000012, 0.999965, 0.999983, 0.999954, 1.000019, 0.999976, 0.999996, 1.000003, 0.999958, 0.999998, 0.999992, 1.000010, 1.000010, 1.000006, 1.000003, 1.000003, 1.000033, 1.000006, 0.999984, 0.999980, 0.999971, 0.999961, 0.999998, 1.000033, 1.000044, 1.000016, 1.000007, 1.000048, 1.000009, 1.000009, 0.999991, 0.999944, 0.999960, 0.999952, 1.000004, 1.000007, 1.000007, 1.000021, 1.000009, 1.000054, 1.000008, 1.000018, 1.000011, 1.000011, 1.000011, 1.000030, 1.000045, 1.000045, 1.000101, 1.000085, 1.000043, 1.000020, 1.000029, 0.999964, 0.999964, 0.999964, 0.999964, 1.000050, 1.000018, 1.000018, 1.000018, 1.000010, 1.000043, 1.000043, 1.000043, 1.000043, 1.000018, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, 1.000017, },
-    { 0.981024, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 0.999999, 1.000004, 0.999994, 0.999995, 1.000007, 1.000003, 1.000003, 0.999996, 0.999997, 1.000001, 0.999991, 0.999990, 0.999997, 1.000007, 1.000000, 1.000001, 1.000002, 1.000002, 1.000005, 1.000006, 1.000006, 1.000006, 1.000003, 1.000001, 1.000004, 1.000001, 1.000000, 0.999998, 0.999999, 1.000006, 1.000006, 0.999994, 1.000000, 0.999997, 0.999993, 0.999995, 0.999995, 1.000003, 1.000001, 1.000000, 1.000000, 0.999998, 1.000005, 1.000002, 1.000010, 1.000000, 1.000002, 0.999999, 0.999999, 1.000002, 0.999996, 0.999994, 0.999989, 0.999994, 0.999986, 0.999995, 1.000006, 0.999998, 1.000002, 1.000010, 1.000009, 1.000002, 1.000017, 1.000004, 1.000011, 1.000021, 0.999997, 0.999997, 0.999997, 0.999969, 0.999989, 0.999999, 0.999989, 0.999984, 1.000037, 1.000029, 1.000001, 0.999936, 0.999952, 0.999994, 0.999973, 0.999987, 1.000006, 1.000039, 0.999993, 0.999990, 1.000004, 1.000015, 0.999996, 1.000020, 0.999999, 0.999991, 0.999977, 0.999999, 1.000023, 0.999983, 1.000004, 1.000000, 0.999980, 0.999990, 1.000009, 0.999986, 0.999978, 0.999970, 0.999996, 0.999985, 1.000005, 0.999988, 0.999992, 1.000019, 1.000006, 1.000000, 1.000005, 1.000007, 1.000009, 1.000018, 1.000015, 1.000022, 1.000017, 1.000023, 1.000010, 0.999993, 1.000010, 1.000005, 1.000023, 0.999990, 1.000007, 1.000008, 0.999996, 0.999976, 0.999967, 0.999985, 0.999982, 0.999993, 0.999998, 1.000006, 0.999987, 0.999995, 0.999986, 1.000005, 1.000006, 1.000019, 1.000010, 0.999996, 1.000033, 1.000019, 1.000003, 1.000013, 0.999991, 0.999997, 0.999992, 0.999995, 0.999990, 0.999998, 0.999996, 0.999983, 0.999984, 0.999989, 0.999996, 0.999998, 1.000019, 1.000056, 1.000006, 1.000018, 1.000018, 1.000018, 1.000012, 1.000032, 1.000001, 1.000001, 1.000001, 0.999961, 0.999961, 0.999961, 0.999979, 0.999979, 0.999979, 0.999979, 0.999979, 0.999998, 0.999998, 0.999998, 0.999992, 0.999992, 0.999986, 0.999986, 0.999986, 0.999986, 0.999986, 0.999996, 0.999996, 0.999996, 0.999996, 0.999996, 0.999996, 0.999996, 0.999996, 0.999996, 0.999996, 0.999996, 0.999996, 0.999996, 0.999996, 0.999996, 0.999996, 0.999992, 0.999992, 0.999992, 0.999992, 0.999992, 0.999992, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, 1.000006, },
-    { 0.993343, 0.999978, 1.000002, 0.999995, 0.999998, 1.000002, 0.999999, 1.000000, 1.000001, 1.000001, 1.000001, 1.000001, 0.999999, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000000, 1.000000, 1.000001, 1.000002, 1.000000, 1.000001, 0.999999, 0.999999, 1.000000, 0.999999, 0.999999, 0.999999, 0.999999, 1.000001, 1.000001, 1.000000, 1.000000, 0.999999, 1.000000, 1.000003, 1.000000, 0.999999, 1.000000, 1.000000, 1.000004, 0.999998, 1.000000, 0.999996, 0.999998, 1.000003, 0.999999, 1.000000, 0.999998, 1.000002, 1.000001, 1.000003, 0.999998, 1.000000, 1.000000, 1.000002, 1.000002, 1.000000, 0.999997, 0.999998, 0.999998, 1.000000, 0.999998, 0.999992, 0.999997, 0.999997, 0.999996, 0.999996, 0.999992, 0.999982, 0.999994, 1.000000, 0.999996, 0.999999, 1.000006, 0.999998, 0.999991, 0.999999, 1.000015, 1.000015, 1.000001, 1.000010, 1.000005, 0.999994, 1.000003, 0.999995, 0.999989, 0.999996, 1.000010, 1.000014, 1.000000, 1.000007, 1.000001, 1.000008, 1.000002, 0.999999, 1.000003, 1.000002, 0.999997, 1.000002, 1.000012, 1.000008, 1.000009, 0.999999, 1.000001, 0.999998, 0.999995, 0.999994, 0.999998, 1.000002, 0.999999, 0.999991, 0.999985, 0.999998, 1.000001, 0.999993, 0.999999, 1.000007, 0.999998, 0.999995, 1.000006, 1.000004, 1.000007, 0.999997, 1.000001, 0.999999, 1.000001, 0.999996, 0.999977, 0.999978, 0.999986, 0.999996, 0.999995, 0.999994, 0.999991, 0.999992, 0.999997, 1.000002, 1.000003, 1.000001, 1.000009, 0.999996, 1.000003, 1.000003, 1.000011, 1.000011, 1.000011, 1.000011, 1.000008, 1.000007, 1.000001, 1.000000, 0.999993, 0.999993, 0.999995, 0.999995, 1.000004, 1.000004, 1.000004, 1.000004, 1.000004, 1.000004, 0.999996, 0.999996, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, 1.000001, },
-    { 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, },
-    { 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, },
-#endif
-};
-
-
-void
-NoiseInjectionComp ( void )
-{
-    int  i;
-
-    for ( i = 0; i < sizeof(NoiseInjectionCompensation1D)/sizeof(*NoiseInjectionCompensation1D); i++ )
-        NoiseInjectionCompensation1D [i] = 1.f;
-    for ( i = 0; i < sizeof(NoiseInjectionCompensation2D)/sizeof(**NoiseInjectionCompensation2D); i++ )
-        NoiseInjectionCompensation2D [0][i] = 1.f;
-}
-
-
-// Quantizes a subband and calculates iSNR
-float
-ISNR_Schaetzer ( const float* input, const float SNRcomp, const int res )
-{
-    int    k;
-    float  fac    = A [res];
-    float  invfac = C [res];
-    float  Signal = 1.e-30f;
-    float  Fehler = 1.e-30f;
-    float  tmp ;
-    float  tmp2 ;
-    int    idx;
-
-    tmp = 0.;
-    for ( k = 0; k < 36; k++ )
-        tmp += input[k] * input[k];
-    tmp *= QUANT / 36. / 32768 / 32768 ;
-    idx  = tmp;
-
-    // Summation of the absolute power and the quadratic error
-    for ( k = 0; k < 36; k++ ) {
-        tmp2    = input[k] * NoiseInjectionCompensation2D [res] [idx];
-        Signal += tmp2 * tmp2;
-
-        // q = ftol(in), correct rounding
-        tmp = tmp2 * fac + 0xFF8000;
-        tmp = (*(int*) & tmp - 0x4B7F8000) * invfac - tmp2;
-
-        Fehler += tmp * tmp;
-    }
-
-    // Utilization of SNRcomp only if SNR > 1 !!!
-    return Signal > Fehler  ?  Fehler / (SNRcomp * Signal)  :  Fehler / Signal;
-}
-
-
-#ifdef BUGBUG
-double _old;
-double _new;
-double _tmp;
-
-double _Sum [18];
-long   _Cnt [18];
-
-double __Sum [18] [QUANT];
-long   __Cnt [18] [QUANT];
-
-void rep ( double _old, double _new, int res )
-{
-    int    i;
-    _Sum [res] += sqrt (_old / _new );
-    _Cnt [res] ++ ;
-    i = _old * (  QUANT / 36. / 32768 / 32768 );
-    // printf ("Res=%u, old=%f, new=%f, X=%f, %3u:", res, _old, _new, X[res], i ); fflush (stdout);
-    __Sum [res][i] += sqrt (_old / _new );
-    __Cnt [res][i] ++ ;
-}
-
-void reppr ( void )
-{
-    int i, j;
-    printf ("\n\n==================\n");
-    for ( i = 0; i < 18; i++ )
-        if ( _Cnt[i] )
-            printf ("%2u: %12.6f\n", i, _Sum[i]/_Cnt[i] * NoiseInjectionCompensation1D[i] );
-    for ( i = 0; i < 18; i++ )
-        for ( j = 0; j < QUANT; j++ )
-            if ( __Cnt[i][j] )
-                printf ("%2u[%3u]: %9.6f (%8lu)\n", i, j, __Sum[i][j]/__Cnt[i][j] * NoiseInjectionCompensation2D [i][j], __Cnt[i][j] );
-
-}
-#endif
-
-// Linear quantizer for a subband
-void
-QuantizeSubband ( unsigned int* qu_output, const float* input, const int res )
-{
-    int    n;
-    int    offset = D [res];
-    float  mult   = A [res];
-    float  tmp;
-    int    idx;
-
-    tmp = 0.;
-    for ( n = 0; n < 36; n++ )
-        tmp += input[n] * input[n];
-    tmp *=  QUANT / 36. / 32768 / 32768 ;
-    idx = tmp;
-
-    mult   *= NoiseInjectionCompensation2D [res][idx];
-
-    for ( n = 0; n < 36; n++, input++, qu_output++ ) {
-        // q = ftol(in), correct rounding
-        tmp = *input * mult + 0xFF8000;
-        *qu_output  = (unsigned int)(*(int*) & tmp - 0x4B7F8000 + offset);
-
-        // Limitation to 0...2D
-        if ((unsigned int)*qu_output > (unsigned int)2*offset ) {
-            *qu_output = mini( *qu_output, 2*offset);
-            *qu_output = maxi( *qu_output,        0);
-        }
-#ifdef BUGBUG
-        _old += *input * *input;
-        _tmp  = (int)(*qu_output - offset) * C[res];
-        _new += _tmp * _tmp;
-#endif
-    }
-#ifdef BUGBUG
-    rep ( _old, _new, res );
-    _old = _new = 0;
-#endif
-}
-
-
-// NoiseShaper for a subband
-void
-QuantizeSubbandWithNoiseShaping ( unsigned int* qu_output, const float* input, const int res, const float* FIR, float* errors )
-{
-#define E(x) *((int*)errors+(x))
-
-    float  signal;
-    float  tmp;
-    float  mult    = A [res];
-    float  invmult = C [res];
-    int    offset  = D [res];
-    int    n;
-    int    quant;
-    int    idx;
-
-    tmp = 0.;
-    for ( n = 0; n < 36; n++ )
-        tmp += input[n] * input[n];
-    tmp *=  QUANT / 36. / 32768 / 32768 ;
-    idx = tmp;
-
-    E(0) = E(1) = E(2) = E(3) = E(4) = 0;       // arghh, it produces pops on each frame boundary!
-
-    for ( n = 0; n < 36; n++, input++, qu_output++ ) {
-        signal = *input * NoiseInjectionCompensation2D [res][idx] - (FIR[4]*errors[n+0] + FIR[3]*errors[n+1] + FIR[2]*errors[n+2] + FIR[1]*errors[n+3] + FIR[0]*errors[n+4]);
-
-        // quant = ftol(signal), correct rounding
-        tmp   = signal * mult + 0xFF8000;
-        quant = *(int*) & tmp - 0x4B7F8000;
-
-        // calculate the current error and save it for error refeeding
-        errors [n + 5] = invmult * quant - signal;
-
-        //  limitation to +/-D
-        quant = minf ( quant, +offset );
-        quant = maxf ( quant, -offset );
-
-        *qu_output = (unsigned int)(quant + offset);
-#ifdef BUGBUG
-        _old += *input * *input;
-        _tmp  = invmult * quant;
-        _new += _tmp * _tmp;
-#endif
-    }
-#ifdef BUGBUG
-    rep ( _old, _new, res );
-    _old = _new = 0;
-#endif
-}
-
-/* end of quant.c */
Index: penc/branches/zorg/regress.c
===================================================================
--- /mppenc/branches/zorg/regress.c	(revision 40)
+++ 	(revision )
@@ -1,125 +1,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-
-#define _x(i)       (p[i])
-#define _y(i)       (q[i])
-#define _x2(i)      (p[i]*p[i])
-#define _y2(i)      (q[i]*q[i])
-#define _xy(i)      (p[i]*q[i])
-
-#define EXPR36(x)   x( 0)+x( 1)+x( 2)+x( 3)+x( 4)+x( 5)+x( 6)+x( 7)+x( 8)+x( 9)+x(10)+x(11)+\
-                    x(12)+x(13)+x(14)+x(15)+x(16)+x(17)+x(18)+x(19)+x(20)+x(21)+x(22)+x(23)+\
-                    x(24)+x(25)+x(26)+x(27)+x(28)+x(29)+x(30)+x(31)+x(32)+x(33)+x(34)+x(35)
-
-#define n           36
-
-
-static inline float
-atan2i ( float x, float y )       // maximum 0.915° error between -0.82765 ... +2.39845 radian
-{
-    if      ( x < y ) {
-        x  = x / y;
-        y  = x * x;
-        x *= 1. - (1 - M_PI/4) * y;
-    }
-    else if ( x > y ) {
-        x  = y / x;
-        y  = x * x;
-        x *= 1. - (1 - M_PI/4) * y;
-        x  = M_PI/2 - x;
-    }
-    else {
-        x  = M_PI/4;
-    }
-
-    return x;
-}
-
-
-void
-Regression ( float* const  _r,
-             float* const  _b,
-             const float*  p ,
-             const float*  q )
-{
-    float  x  = EXPR36 (_x );
-    float  y  = EXPR36 (_y );
-    float  x2 = EXPR36 (_x2);
-    float  y2 = EXPR36 (_y2);
-    float  xy = EXPR36 (_xy);
-    float  r;
-    float  sx;
-    float  sy;
-    float  b;
-
-    r  = (x2*n - x*x) * (y2*n - y*y);
-    r  = r > 0.  ?  (xy*n - x*y) / sqrt (r)  :  1.;
-    sx = sqrt ( (x2 - x*x/n) / (n - 1) );
-    sy = sqrt ( (y2 - y*y/n) / (n - 1) );
-    x  = x/n;
-    y  = y/n;
-
-    b  = atan2 ( sy, sx );
-    if ( r < 0 )
-        b = M_PI - b;
-
-    *_r = r;
-    *_b = b;
-
-    printf ( "r=%6.3f  sx=%6.3f  sy=%6.3f  b=%6.3f\n", r, sx, sy, b );
-}
-
-
-
-
-/*
-int
-main ( void )
-{
-    float  p[36];
-    float  q[36];
-    float  r;
-    float  b;
-    int    i;
-    int    j;
-
-    float  w;
-    float  c;
-    float  s;
-    float  rnd;
-    float  rnd1;
-    float  rnd2;
-
-    for ( i = 0; i <= 200; i++ ) {
-        w = 2 * M_PI / 200. * i;
-        c = cos (w);
-        s = sin (w);
-        for ( j = 0; j < 36; j++ ) {
-            rnd  = 2. * rand() / RAND_MAX - 1;
-            p[j] = c * rnd;
-            q[j] = s * rnd;
-        }
-        printf ( "i=%3u: ", i );
-        Regression ( &r, &b, p, q );
-    }
-    printf ( "\n" );
-
-    for ( i = 0; i <= 200; i++ ) {
-        w = M_PI / 200. * i;
-        c = cos(w);
-        s = sin(w);
-        for ( j = 0; j < 36; j++ ) {
-            rnd1 = 2. * rand() / RAND_MAX - 1;
-            rnd2 = 2. * rand() / RAND_MAX - 1;
-            p[j] = rnd1;
-            q[j] = rnd1 * c + rnd2 * s;
-        }
-        printf ( "i=%3u: (%6.4f) ", i, s/c );
-        Regression ( &r, &b, p, q );
-    }
-    printf ( "\n" );
-
-    return 0;
-}
-*/
Index: penc/branches/zorg/replaygain.c
===================================================================
--- /mppenc/branches/zorg/replaygain.c	(revision 40)
+++ 	(revision )
@@ -1,679 +1,0 @@
-/*
- *   Should also set the ClipPrev Header by means of decoding
- *   Should clipprev automatically activated for ReplayGain != 0.0 dB ?
- *
- *   TODO:
- *     - better filter with more bass (bass is currently understimated)
- *     - clear up gain_analysis
- *     - mppdec: also blends between 0, 1 and 2
- *     - Output of album values with --list and --listdB only if they are identical!
- *     - ID3v2 Tags must be ignored
- * Ability to suppress automatic Album classification  ?????
- * Error with /[] with list or listall ??? however, auto is working ??????
- *
- * --smart does some stupid stuff
- *
- * Output of the dynamics of a track
- * Special treatment for short tracks < 30 seconds (determine the values from the neighboring tracks)
- * Combine tracks that have no Pause/Silence
- * Allow different album naming
- *
- * madplay -d -o wav:- -a -6.0205999132796239042 -q dateiname > 11.wav
- */
-
-// Bugs: Assume fs=44.1 kHz, which is not true anymore for MPC
-
-#define VERSION "0.84"
-
-#define CD_SAMPLE_FREQ   44100.
-
-#include <ctype.h>
-#include <math.h>
-#include "mppdec.h"
-#include "gain_analysis.h"
-
-#define LEVEL_THR       0.f
-
-int dBp     = 0;
-int smart   = 0;
-int Kreport = 0;
-
-typedef struct {
-    const char*   FileName;
-    float         TitleGain;
-    float         AlbumGain;
-    Uint32_t      TitlePeak;
-    Uint32_t      AlbumPeak;
-    unsigned int  Silence;
-} gain_info_t;
-
-
-#define AUTO      (Int32_t)0x80000000
-#define LIST      (Int32_t)0x80000001
-#define LISTALL   (Int32_t)0x80000002
-
-#if defined HAVE_INCOMPLETE_READ  &&  FILEIO != 1
-
-size_t
-complete_read ( int fd, void* dest, size_t bytes )
-{
-    size_t  bytesread = 0;
-    size_t  ret;
-
-    while ( bytes > 0 ) {
-        ret = read ( fd, dest, bytes );
-        if ( ret == 0  ||  ret == (size_t)-1 )
-            break;
-        dest       = (void*)(((char*)dest) + ret);
-        bytes     -= ret;
-        bytesread += ret;
-    }
-    return bytesread;
-}
-
-#endif
-
-
-static Float_t
-OverSample ( Int16_t* src, size_t len )
-{
-    size_t  i;
-    float   S;
-    float   max = 0.;
-
-#if 1
-    // Legato Link
-    for ( i = 3; i < len-4; i++ ) {
-        S = + 0.597025167f    * (src[i  ] + src[i+1])
-            - 0.117586444f    * (src[i-1] + src[i+2])
-            + 0.0228418825f   * (src[i-2] + src[i+3])
-            - 0.002280605625f * (src[i-3] + src[i+4]);
-        S = fabs (S);
-        if ( S > max )
-            max = S;
-    }
-#else
-
-/*
-constant gain factor     3.4736680887566E-02
-z plane Denominator      Numerator
- 0   1.000000000E+00   3.473668089E-02
- 1  -9.080904743E-01   1.516197951E-01
- 2   1.325659333E+00   2.841012960E-01
- 3  -7.693859648E-01   2.841012960E-01
- 4   3.797256375E-01   1.516197951E-01
- 5  -8.699298700E-02   3.473668089E-02
-
----------------------------------------------
-constant gain factor     1.1780713261043E-02
-z plane Denominator      Numerator
- 0   1.000000000E+00   1.178071326E-02
- 1  -1.802715403E+00   5.120893530E-02
- 2   3.025911944E+00   1.163859288E-01
- 3  -2.988454267E+00   1.697423622E-01
- 4   2.358550858E+00   1.697423622E-01
- 5  -1.273440642E+00   1.163859288E-01
- 6   4.710392622E-01   5.120893530E-02
- 7  -9.265587323E-02   1.178071326E-02
- */
-
-/*
-    0.0000000000, -0.0004061767, -0.0006554074, -0.0005603479,
-    0.0000000000, +0.0010332072, +0.0024067306, +0.0038511274, +0.0049972718, +0.0054446460, +0.0048504364, +0.0030230276,
-    0.0000000000, -0.0039090311, -0.0081300062, -0.0118895363, -0.0143338396, -0.0146862233, -0.0124177060, -0.0073988790,
-    0.0000000000, +0.0088885044, +0.0179316783, +0.0255223974, +0.0300328067, +0.0301098647, +0.0249669378, +0.0146174761,
-    0.0000000000, -0.0170435762, -0.0339530545, -0.0477884869, -0.0556838859, -0.0553529653, -0.0455668957, -0.0265189851,
-    0.0000000000, +0.0306695549, +0.0609699140, +0.0857542392, +0.1000000000, +0.0996415654, +0.0823628662, +0.0482228773,
-    0.0000000000, -0.0568263967, -0.1144916118, -0.1637363938, -0.1948936008, -0.1991420526, -0.1697652726, -0.1032409730,
-    0.0000000000, +0.1352696593, +0.2938416526, +0.4636919170, +0.6306889405, +0.7800976241, +0.8982140690, +0.9739261298,
-    1.0000000000, +0.9739261298, +0.8982140690, +0.7800976241, +0.6306889405, +0.4636919170, +0.2938416526, +0.1352696593,
-    0.0000000000, -0.1032409730, -0.1697652726, -0.1991420526, -0.1948936008, -0.1637363938, -0.1144916118, -0.0568263967,
-    0.0000000000, +0.0482228773, +0.0823628662, +0.0996415654, +0.1000000000, +0.0857542392, +0.0609699140, +0.0306695549,
-    0.0000000000, -0.0265189851, -0.0455668957, -0.0553529653, -0.0556838859, -0.0477884869, -0.0339530545, -0.0170435762,
-    0.0000000000, +0.0146174761, +0.0249669378, +0.0301098647, +0.0300328067, +0.0255223974, +0.0179316783, +0.0088885044,
-    0.0000000000, -0.0073988790, -0.0124177060, -0.0146862233, -0.0143338396, -0.0118895363, -0.0081300062, -0.0039090311,
-    0.0000000000, +0.0030230276, +0.0048504364, +0.0054446460, +0.0049972718, +0.0038511274, +0.0024067306, +0.0010332072,
-    0.0000000000, -0.0005603479, -0.0006554074, -0.0004061767,
-    0.0000000000,
-
- */
-
-    for ( i = 7; i < len-8; i++ ) {
-        S = + 0.50000f * (src[i  ] + src[i+1])
-            - 0.00000f * (src[i-1] + src[i+2])
-            + 0.00000f * (src[i-2] + src[i+3])
-            - 0.00000f * (src[i-3] + src[i+4])
-            + 0.00000f * (src[i-4] + src[i+5])
-            - 0.00000f * (src[i-5] + src[i+6])
-            + 0.00000f * (src[i-6] + src[i+7])
-            - 0.00000f * (src[i-7] + src[i+8]);
-        S = fabs (S);
-        if ( S > max )
-            max = S;
-    }
-#endif
-    return S;
-}
-
-static Int32_t
-ReadReplayGain ( const char* p )
-{
-    Int32_t  ret =  0;
-    int      sgn = +1;
-
-    if ( 0 == strcmp ( p, "--auto") )
-        return AUTO;
-    if ( 0 == strcmp ( p, "--list") )
-        return LIST;
-    if ( 0 == strcmp ( p, "--listall") )
-        return LISTALL;
-    if ( 0 == strcmp ( p, "--listreport") )
-        return Kreport = 1, LIST;
-    if ( 0 == strcmp ( p, "--listallreport") )
-        return Kreport = 1, LISTALL;
-    if ( 0 == strcmp ( p, "--autodB") )
-        return dBp = 1, AUTO;
-    if ( 0 == strcmp ( p, "--listdB") )
-        return dBp = 1, LIST;
-    if ( 0 == strcmp ( p, "--listalldB") )
-        return dBp = 1, LISTALL;
-    if ( 0 == strcmp ( p, "--listreportdB") )
-        return dBp = 1, Kreport = 1, LIST;
-    if ( 0 == strcmp ( p, "--listallreportdB") )
-        return dBp = 1, Kreport = 1, LISTALL;
-
-    if (*p == '+')
-        p++;
-    else if (*p == '-')
-        sgn = -sgn, p++;
-
-    while ( (unsigned int)(*p - '0') < 10u )
-        ret = 10 * ret + (unsigned int)(*p++ - '0');
-
-    ret *= 100;
-    switch (*p) {
-    case '.':
-        if ( p[1] == '\0' )
-            break;
-        else if ( (unsigned int)(p[1] - '0') < 10u )
-            ret += (p[1] - '0') * 10;
-        else
-            goto error;
-
-        if ( p[2] == '\0' )
-            break;
-        else if ( (unsigned int)(p[2] - '0') < 10u )
-            ret += (p[2] - '0');
-        else
-            goto error;
-
-        if ( p[3] == '\0' )
-            break;
-        else if ( (unsigned int)(p[3] - '0') < 10u )
-            ret += (p[2] >= '5');
-        else
-            goto error;
-        break;
-
-    default:
-    error:
-        stderr_printf ("Illegal string in number: %s\n", p );
-        exit (1);
-
-    case '\0':
-        break;
-    }
-
-    return ret * sgn;
-}
-
-
-void sh ( const char* name, float level)
-{
-#if 0
-    FILE* fp = fopen ("/tmp/silence", "a+");
-    if ( fp == NULL ) {
-        fprintf (stderr, "Can't append on '/tmp/silence'\n");
-        return;
-    }
-    if (name)
-        fprintf (fp, "%8.2f  %s\n", level, name );
-    else
-        fprintf (fp, "%8.2f ", level );
-    fclose (fp);
-#endif
-}
-
-#define NO   (size_t)(44100 * 0.05)
-
-static void
-CalcReplayGain ( const char* filename, gain_info_t* G )
-{
-    FILE*    fp;
-    float    buffl [NO];
-    float    buffr [NO];
-    Int16_t  buff  [NO] [2];
-    size_t   i;
-    size_t   len;
-    size_t   lastlen = 0;
-    unsigned int max = 0;
-    float    level;
-    float    mult;
-
-    if ((fp = pipeopen ( "mppdec --silent --scale 0.5 --gain 0 --raw - - < #", filename)) == NULL) {
-        stderr_printf ( "Can't decode '%s'\n", filename );
-        exit (9);
-    }
-
-    memset ( buff, 0, sizeof(buff) );
-    G->Silence = 0;
-
-    lastlen = len = fread (buff, 4, NO, fp);
-    for ( i = 0; i < len; i++ ) {
-        buffl [i] = 2. * buff [i] [0];
-        buffr [i] = 2. * buff [i] [1];
-        if ( abs(buff[i][0]) > max ) max = abs(buff[i][0]);
-        if ( abs(buff[i][1]) > max ) max = abs(buff[i][1]);
-    }
-    AnalyzeSamples ( buffl, buffr, len, 2 );
-
-    level = 0.;
-    mult  = 1.;
-    for ( i = 0; i < len; i++ ) {
-        level += mult * (buff [i] [0] * buff [i] [0] + buff [i] [1] * buff [i] [1]);
-        mult  *= 0.95;
-    }
-    level = 2*sqrt(level * 0.05);
-    if ( level > LEVEL_THR )
-        G->Silence |= 2;
-
-    sh ( NULL, level );
-
-    while (( len = fread (buff, 4, NO, fp) ) > 0 ) {
-        lastlen = len;
-        for ( i = 0; i < len; i++ ) {
-            buffl [i] = 2. * buff [i] [0];
-            buffr [i] = 2. * buff [i] [1];
-            if ( abs(buff[i][0]) > max ) max = abs(buff[i][0]);
-            if ( abs(buff[i][1]) > max ) max = abs(buff[i][1]);
-        }
-        AnalyzeSamples ( buffl, buffr, len, 2 );
-    }
-
-    level = 0.;
-    mult  = 1.;
-    for ( i = 1; i <= NO; i++ ) {
-        int  idx = (lastlen + NO - i) % NO;
-        level += mult * (buff [idx] [0] * buff [idx] [0] + buff [idx] [1] * buff [idx] [1]);
-        mult  *= 0.95;
-    }
-    level = 2*sqrt(level * 0.05);
-    if ( level > LEVEL_THR )
-        G->Silence |= 1;
-
-    sh(filename,level);
-
-    PCLOSE (fp);
-#if 0
-    GetTitleDynamics ();
-#endif
-    G -> FileName  = filename;
-    G -> TitleGain = GetTitleGain ();
-    G -> TitlePeak = 2 * max + 1;
-    G -> AlbumGain = GetAlbumGain ();
-    G -> AlbumPeak = G->AlbumPeak < G->TitlePeak  ?  G->TitlePeak  :  G->AlbumPeak;
-    return;
-}
-
-
-int
-ModifyFile ( const gain_info_t* G, unsigned int mask )
-{
-    unsigned char  buff [20];
-    Int32_t        val;
-    FILE_T         fd = OPENRW ( G -> FileName );
-
-    if ( fd == INVALID_FILEDESC ) {
-        stderr_printf ("Can't patch '%s'\n", G -> FileName );
-        return 1;
-    }
-    if ( READ ( fd, buff, sizeof(buff) ) != sizeof(buff) ) {
-        stderr_printf ("Can't read header of '%s'\n", G -> FileName );
-        return 2;
-    }
-    if ( 0 != memcmp ( buff, "MP+", 3)  ||  (buff[3] & 15) != 7 ) {
-        stderr_printf ("Not a MPC file SV7: '%s'\n", G -> FileName );
-        return 3;
-    }
-
-    if ( mask & 1 ) {   // Title Peak level
-        val       = G -> TitlePeak;
-        buff [12] = (Uint8_t)(val >> 0);
-        buff [13] = (Uint8_t)(val >> 8);
-        val       = (Int32_t)(G -> TitlePeak / 1.18);
-        buff [ 8] = (Uint8_t)(val >> 0);
-        buff [ 9] = (Uint8_t)(val >> 8);
-    }
-    if ( mask & 2 ) {   // Album Peak level
-        val       = G -> AlbumPeak;
-        buff [16] = (Uint8_t)(val >> 0);
-        buff [17] = (Uint8_t)(val >> 8);
-    }
-    if ( mask & 4 ) {   // Title RMS
-        val       = 100. * G -> TitleGain;
-        buff [14] = (Uint8_t)(val >> 0);
-        buff [15] = (Uint8_t)(val >> 8);
-    }
-    if ( mask & 8 ) {   // Album RMS
-        val       = 100. * G -> AlbumGain;
-        buff [18] = (Uint8_t)(val >> 0);
-        buff [19] = (Uint8_t)(val >> 8);
-    }
-
-    if ( SEEK  ( fd, 0L, SEEK_SET ) < 0 ) {
-        stderr_printf ("Seek error in '%s'\n", G -> FileName );
-        return 4;
-    }
-    if ( WRITE ( fd, buff, sizeof(buff) ) != sizeof(buff) ) {
-        stderr_printf ("Can't write data in '%s'\n", G -> FileName );
-        return 5;
-    }
-    if ( CLOSE (fd) < 0 ) {
-        stderr_printf ("Error closing '%s'\n", G -> FileName );
-        return 6;
-    }
-    return 0;
-}
-
-
-char* dB ( double val )
-{
-    static unsigned int x = 0;
-    static char buff[8][12];
-
-    x = (x+1) & 7;
-
-    if (dBp) {
-        double dB = 20. * log10 (val/32767.);
-        if (dB <= -60)
-            return "     ";
-        sprintf ( buff[x], fabs(dB) < 9.995 ? "%+5.2f" : "%+5.1f", dB  );
-    }
-    else {
-        sprintf ( buff[x], "%5u", (int)val );
-    }
-    return buff[x];
-}
-
-
-// " -- [xx] "          9
-// " -- [xx]."          9
-// "/[xx] -- "          9
-// "/[xx] --."          9
-// " -- xx -- "        10
-// " -- xx --."        10
-// "/xx -- "            7
-// "/xx --."            7
-
-static size_t
-AlbumNameLen ( const char* filename )
-{
-    const char*  p = filename + strlen (filename) - 9;
-
-    while ( p >= filename ) {
-        if ( 0 == memcmp ( p, " -- [", 5)  &&  isdigit (p[5])  &&  isdigit(p[6])  &&  p[7] == ']'  &&  (p[8]=='.' || p[8]==' ') )
-            return p - filename;
-        if ( (p[0]=='/' || p[0]=='\\')  &&  p[1] == '[' &&  isdigit (p[2])  &&  isdigit(p[3])  &&  0 == memcmp (p+4, "] --", 4)  &&  (p[8]=='.' || p[8]==' ') )
-            return p - filename;
-        if ( 0 == memcmp ( p, " -- ", 4)  &&  isdigit (p[4])  &&  isdigit(p[5])  &&  0 == memcmp (p+6, " --", 3)  &&  (p[9]=='.' || p[9]==' ') )
-            return p - filename;
-        if ( (p[0]=='/' || p[0]=='\\')  &&  isdigit (p[1])  &&  isdigit(p[2])  &&  0 == memcmp (p+3, " --", 3)  &&  (p[6]=='.' || p[6]==' ') )
-            return p - filename;
-        p--;
-    }
-
-    return 0;
-}
-
-
-int Cdecl
-main ( int argc, char** argv )
-{
-    static const char*
-                 extentions [] = { ".mpc", ".mpp", ".mp+", NULL };
-    Int32_t      mode;
-    Int32_t      title_gain;
-    Int32_t      title_peak;
-    Int32_t      album_gain;
-    Int32_t      album_peak;
-    double       title_peak_max     = 0.;
-    double       title_peak_adj_max = 0.;
-    double       album_peak_max     = 0.;
-    double       album_peak_adj_max = 0.;
-    FILE_T       fd;
-    Uint8_t      buff [20];
-    const char*  name;
-    gain_info_t  Gain;
-    int          i;
-    int          ilast;
-
-#ifdef USE_ARGV
-    mysetargv ( &argc, &argv, extentions );
-#endif
-
-    stderr_printf ( "Replaygain " VERSION "     (C) 2001-2002 Klemm/Robinson/Sawyer\n\n" );
-
-    if ( argv[1] != NULL  &&  0 == strncmp (argv[1], "--9", 3) )
-        SetPercentile (0.01 * atoi (*++argv + 2) );
-
-    if ( argv[1] != NULL  &&  0 == strcmp (argv[1], "--smart" ) )
-        smart++, argv++;
-
-    memset ( &Gain, 0, sizeof(Gain) );
-    InitGainAnalysis  ( CD_SAMPLE_FREQ );
-
-    if ( argc < 3 ) {
-        stderr_printf ("usage: ReplayGain level MPC_Title_01 [MPC_Title_02 MPC_Title_03 ...]\n"
-                       "\n"
-                       "percentile can be:\n"
-                       "  --92 | --93 | --94 | --95 | --96 | --97 | --98\n"
-                       "\n"
-                       "level can be:\n"
-                       "  * value in the range -300 dB...+300 dB, set as title based replay gain\n"
-                       "  * --auto   | --autodB    : auto determine gains and peak values\n"
-                       "  * --list   | --listdB    : list title based values\n"
-                       "  * --listall| --listalldB : list title and album based values\n"
-                       "  * --listreport           : list title based values + K suggestion\n"
-                       "  * --listallreport        : list title and album based values + K suggestion\n" );
-        return 1;
-    }
-
-    argv++;
-    mode = ReadReplayGain (*argv);
-    if ( mode != AUTO  &&  mode != LIST  &&  mode != LISTALL ) {
-        if ( mode != (Int16_t) mode ) {
-            stderr_printf ("level can only be in the range -327.68 dB...+327.67 dB\n" );
-            return 2;
-        }
-        Gain.TitleGain = 0.01 * mode;
-    }
-
-    switch (mode) {
-    case AUTO:
-    default:
-        printf ("   Level Adjustment   |   Peak Level   (Adjst)|  Filename\n"
-                "----------------------+-----------------------+-------------------------------\n");
-        break;
-    case LIST:
-        printf ("  Level-  |       (Peak+)|\n"
-                "Adjustment|  Peak (Adjst)|  Filename\n"
-                "----------+--------------+-----------------------------------------------------\n");
-        break;
-    case LISTALL:
-        printf ("        Title            |        Album            |\n"
-                "  Level-  |       (Peak+)|  Level-  |       (Peak+)|\n"
-                "Adjustment|  Peak (Adjst)|Adjustment|  Peak (Adjst)|  Filename\n"
-                "----------+--------------+----------+--------------+---------------------------\n");
-        break;
-    }
-    argv++;
-
-repeat:
-    ilast = -1;
-    for ( i = 0; argv[i]  &&  (mode != AUTO || (AlbumNameLen (argv[0])==AlbumNameLen (argv[i])  &&  0 == memcmp (argv[0], argv[i], AlbumNameLen (argv[0])))); i++ ) {
-        ilast = i;
-        name = argv [i];
-        Gain.FileName = name;
-        if ( mode == AUTO ) {
-            if (smart) {
-                fd = OPEN (name);
-                if ( fd == INVALID_FILEDESC ) {
-                    stderr_printf ("Can't open: %s\n", name );
-                    continue;
-                }
-                if ( READ ( fd, buff, sizeof(buff) ) != sizeof(buff) ) {
-                    stderr_printf ("Can't read header: %s\n", name );
-                    continue;
-                }
-                if ( CLOSE (fd) < 0 ) {
-                    stderr_printf ("Error closing file: %s\n", name );
-                    continue;
-                }
-                if ( buff[12] || buff[13] || buff[14] || buff[15] || buff[16] || buff[17] || buff[18] || buff[19])
-                    continue;
-            }
-            if ( ISATTY (FILENO(STDOUT)) ) {
-                printf ("%s\r", name );
-                FLUSH (stdout);
-                fflush (stdout);
-            }
-            fd = OPENRW (name);
-            if ( fd == INVALID_FILEDESC ) {
-                stderr_printf ("Can't patch '%s'\n", name );
-                goto nopatch;
-            }
-            if ( CLOSE (fd) < 0 ) {
-                stderr_printf ("Error closing '%s'\n", name );
-                return 6;
-            }
-            CalcReplayGain ( name, &Gain );
-            if ( Gain.TitleGain > +36. )
-                Gain.TitleGain = 0.;
-            if ( Gain.AlbumGain > +24. )
-                Gain.AlbumGain = 0.;
-        }
-        fd = OPEN (name);
-        if ( fd == INVALID_FILEDESC ) {
-            stderr_printf ("Can't open: %s\n", name );
-            continue;
-        }
-        if ( READ ( fd, buff, sizeof(buff) ) != sizeof(buff) ) {
-            stderr_printf ("Can't read header: %s\n", name );
-            continue;
-        }
-        if ( CLOSE (fd) < 0 ) {
-            stderr_printf ("Error closing file: %s\n", name );
-            continue;
-        }
-        if ( 0 != memcmp ( buff, "MP+", 3)  ||  (buff[3] & 15) != 7 ) {
-            stderr_printf ("Not a MPC file SV7: '%s'\n", name );
-            continue;
-        }
-
-        title_gain = (Uint8_t)buff[14] + 256 * (Int8_t) buff[15];
-        album_gain = (Uint8_t)buff[18] + 256 * (Int8_t) buff[19];
-        title_peak = (Uint8_t)buff[12] + 256 * (Uint8_t)buff[13];
-        album_peak = (Uint8_t)buff[16] + 256 * (Uint8_t)buff[17];
-
-        switch (mode) {
-        case LIST:
-            printf ("%+6.2f dB | %s (%s)| %s\n",
-                    0.01 * title_gain, dB(title_peak), dB(title_peak * pow (10., title_gain/2000.)),
-                    name );
-            if ( argv[i+1] == NULL  ||  0 != memcmp (argv[i], argv[i+1], AlbumNameLen (argv[i])) )  {
-                int len = AlbumNameLen (argv[i]);
-                printf ("%+6.2f dB | %s (%s)| %*.*s\n"
-                        "----------+--------------+-----------------------------------------------------\n",
-                    0.01 * album_gain, dB(album_peak), dB(album_peak * pow (10., album_gain/2000.)),
-                    len, len, argv[i] );
-            }
-            break;
-        case LISTALL:
-            printf ("%+6.2f dB | %s (%s)|%+6.2f dB | %s (%s)| %s\n",
-                    0.01 * title_gain, dB(title_peak), dB(title_peak * pow (10., title_gain/2000.)),
-                    0.01 * album_gain, dB(album_peak), dB(album_peak * pow (10., album_gain/2000.)),
-                    name );
-            break;
-        default:
-            Gain.TitlePeak = title_peak;
-        case AUTO:
-            ModifyFile ( &Gain, mode==AUTO  ?  4|1  :  4);
-            printf ("%+6.2f dB =>%+6.2f dB | %s => %s (%s)| %s\n",
-                    0.01 * title_gain, Gain.TitleGain,
-                    dB(title_peak), dB(Gain.TitlePeak),
-                    dB(Gain.TitlePeak * pow (10., Gain.TitleGain/20.)),
-                    name );
-            break;
-        }
-        fflush (stdout);
-
-        if (mode == LIST || mode == LISTALL) {
-            if (title_peak > title_peak_max) title_peak_max = title_peak;
-            if (album_peak > album_peak_max) album_peak_max = album_peak;
-            if (title_peak * pow (10., title_gain/2000.) > title_peak_adj_max) title_peak_adj_max = title_peak * pow (10., title_gain/2000.);
-            if (album_peak * pow (10., album_gain/2000.) > album_peak_adj_max) album_peak_adj_max = album_peak * pow (10., album_gain/2000.);
-        }
-	nopatch: ;
-    }
-
-    if ( mode == AUTO ) {
-        int len = AlbumNameLen (argv[0]);
-        printf ("          =>%+6.2f dB |       => %s (%s)| %*.*s\n",
-                Gain.AlbumGain,
-                dB(Gain.AlbumPeak),
-                dB(Gain.AlbumPeak * pow (10., Gain.AlbumGain/20.)), len, len, *argv );
-        fflush (stdout);
-        for ( i = 0; i <= ilast; i++ ) {
-            name = argv [i];
-            Gain.FileName = name;
-            ModifyFile ( &Gain, 2|8 );
-        }
-        argv += ilast + 1;
-        if ( argv[0] != NULL ) {
-            printf ( "----------------------+-----------------------+-------------------------------\n");
-            memset ( &Gain, 0, sizeof(Gain) );
-            InitGainAnalysis  ( CD_SAMPLE_FREQ );
-            goto repeat;
-        }
-    }
-
-    switch (mode) {
-    case LIST:
-        printf ("          | %s (%s)| %s\n",
-                dB(title_peak_max), dB(title_peak_adj_max),
-                "--- maximum (title based) ---" );
-        printf ("          | %s (%s)| %s\n",
-                dB(album_peak_max), dB(album_peak_adj_max),
-                "--- maximum (album based) ---" );
-        break;
-    case LISTALL:
-        printf ("          | %s (%s)|          | %s (%s)| %s\n",
-                dB(title_peak_max), dB(title_peak_adj_max),
-                dB(album_peak_max), dB(album_peak_adj_max),
-                "--- maximum ---" );
-        break;
-    }
-
-    if ( Kreport ) {
-        printf ("\n\nSuggested mode for\n");
-        printf ("  title based replay gain:   K%+d\n", -14 - (int) ceil (20.*log10(title_peak_adj_max/32767.)) );
-        printf ("  album based replay gain:   K%+d\n", -14 - (int) ceil (20.*log10(album_peak_adj_max/32767.)) );
-        printf ("  title based clipping prev: K%+d\n", -14 - (int) ceil (20.*log10(title_peak_max    /32767.)) );
-        printf ("  album based clipping prev: K%+d\n", -14 - (int) ceil (20.*log10(album_peak_max    /32767.)) );
-        printf ("\nLast two setting only possible in plugins using K setting also for\nnon-replaygain modes.\n");
-    }
-
-    return 0;
-}
-
-/* end of replaygain.c */
Index: penc/branches/zorg/replaygain.c.new
===================================================================
--- /mppenc/branches/zorg/replaygain.c.new	(revision 40)
+++ 	(revision )
@@ -1,730 +1,0 @@
-/*
- *   Should also set the ClipPrev Header by means of decoding
- *   Should clipprev automatically activated for ReplayGain != 0.0 dB ?
- *
- *   TODO:
- *     - better filter with more bass (bass is currently understimated)
- *     - clear up gain_analysis
- *     - mppdec: also blends between 0, 1 and 2
- *     - Output of album values with --list and --listdB only if they are identical!
- *     - ID3v2 Tags must be ignored
- * Ability to suppress automatic Album classification  ?????
- * Error with /[] with list or listall ??? however, auto is working ??????
- *
- * --smart does some stupid stuff
- *
- * Output of the dynamics of a track
- * Special treatment for short tracks < 30 seconds (determine the values from the neighboring tracks)
- * Combine tracks that have no Pause/Silence
- * Allow different album naming
- *
- * madplay -d -o wav:- -a -6.0205999132796239042 -q dateiname > 11.wav
- */
-
-// Bugs: Assume fs=44.1 kHz, which is not true anymore for MPC
-
-#define VERSION "0.84"
-
-#include <ctype.h>
-#include <math.h>
-#include "mppdec.h"
-#include "gain_analysis.h"
-
-#define LEVEL_THR       0.f
-
-int dBp     = 0;
-int smart   = 0;
-int Kreport = 0;
-
-typedef struct {
-    const char*   FileName;
-    float         TitleGain;
-    float         AlbumGain;
-    Uint32_t      TitlePeak;
-    Uint32_t      AlbumPeak;
-    unsigned int  Silence;
-} gain_info_t;
-
-
-#define AUTO      (Int32_t)0x80000000
-#define LIST      (Int32_t)0x80000001
-#define LISTALL   (Int32_t)0x80000002
-
-#if defined HAVE_INCOMPLETE_READ  &&  FILEIO != 1
-
-size_t
-complete_read ( int fd, void* dest, size_t bytes )
-{
-    size_t  bytesread = 0;
-    size_t  ret;
-
-    while ( bytes > 0 ) {
-        ret = read ( fd, dest, bytes );
-        if ( ret == 0  ||  ret == (size_t)-1 )
-            break;
-        dest       = (void*)(((char*)dest) + ret);
-        bytes     -= ret;
-        bytesread += ret;
-    }
-    return bytesread;
-}
-
-#endif
-
-
-static Float_t
-OverSample ( Int16_t* src, size_t len )
-{
-    size_t  i;
-    float   S;
-    float   max = 0.;
-
-#if 1
-    // Legato Link
-    for ( i = 3; i < len-4; i++ ) {
-        S = + 0.597025167f    * (src[i  ] + src[i+1])
-            - 0.117586444f    * (src[i-1] + src[i+2])
-            + 0.0228418825f   * (src[i-2] + src[i+3])
-            - 0.002280605625f * (src[i-3] + src[i+4]);
-        S = fabs (S);
-        if ( S > max )
-            max = S;
-    }
-#else
-
-/*
-constant gain factor     3.4736680887566E-02
-z plane Denominator      Numerator
- 0   1.000000000E+00   3.473668089E-02
- 1  -9.080904743E-01   1.516197951E-01
- 2   1.325659333E+00   2.841012960E-01
- 3  -7.693859648E-01   2.841012960E-01
- 4   3.797256375E-01   1.516197951E-01
- 5  -8.699298700E-02   3.473668089E-02
-
----------------------------------------------
-constant gain factor     1.1780713261043E-02
-z plane Denominator      Numerator
- 0   1.000000000E+00   1.178071326E-02
- 1  -1.802715403E+00   5.120893530E-02
- 2   3.025911944E+00   1.163859288E-01
- 3  -2.988454267E+00   1.697423622E-01
- 4   2.358550858E+00   1.697423622E-01
- 5  -1.273440642E+00   1.163859288E-01
- 6   4.710392622E-01   5.120893530E-02
- 7  -9.265587323E-02   1.178071326E-02
- */
-
-/*
-    0.0000000000, -0.0004061767, -0.0006554074, -0.0005603479,
-    0.0000000000, +0.0010332072, +0.0024067306, +0.0038511274, +0.0049972718, +0.0054446460, +0.0048504364, +0.0030230276,
-    0.0000000000, -0.0039090311, -0.0081300062, -0.0118895363, -0.0143338396, -0.0146862233, -0.0124177060, -0.0073988790,
-    0.0000000000, +0.0088885044, +0.0179316783, +0.0255223974, +0.0300328067, +0.0301098647, +0.0249669378, +0.0146174761,
-    0.0000000000, -0.0170435762, -0.0339530545, -0.0477884869, -0.0556838859, -0.0553529653, -0.0455668957, -0.0265189851,
-    0.0000000000, +0.0306695549, +0.0609699140, +0.0857542392, +0.1000000000, +0.0996415654, +0.0823628662, +0.0482228773,
-    0.0000000000, -0.0568263967, -0.1144916118, -0.1637363938, -0.1948936008, -0.1991420526, -0.1697652726, -0.1032409730,
-    0.0000000000, +0.1352696593, +0.2938416526, +0.4636919170, +0.6306889405, +0.7800976241, +0.8982140690, +0.9739261298,
-    1.0000000000, +0.9739261298, +0.8982140690, +0.7800976241, +0.6306889405, +0.4636919170, +0.2938416526, +0.1352696593,
-    0.0000000000, -0.1032409730, -0.1697652726, -0.1991420526, -0.1948936008, -0.1637363938, -0.1144916118, -0.0568263967,
-    0.0000000000, +0.0482228773, +0.0823628662, +0.0996415654, +0.1000000000, +0.0857542392, +0.0609699140, +0.0306695549,
-    0.0000000000, -0.0265189851, -0.0455668957, -0.0553529653, -0.0556838859, -0.0477884869, -0.0339530545, -0.0170435762,
-    0.0000000000, +0.0146174761, +0.0249669378, +0.0301098647, +0.0300328067, +0.0255223974, +0.0179316783, +0.0088885044,
-    0.0000000000, -0.0073988790, -0.0124177060, -0.0146862233, -0.0143338396, -0.0118895363, -0.0081300062, -0.0039090311,
-    0.0000000000, +0.0030230276, +0.0048504364, +0.0054446460, +0.0049972718, +0.0038511274, +0.0024067306, +0.0010332072,
-    0.0000000000, -0.0005603479, -0.0006554074, -0.0004061767,
-    0.0000000000,
-
- */
-
-    for ( i = 7; i < len-8; i++ ) {
-        S = + 0.50000f * (src[i  ] + src[i+1])
-            - 0.00000f * (src[i-1] + src[i+2])
-            + 0.00000f * (src[i-2] + src[i+3])
-            - 0.00000f * (src[i-3] + src[i+4])
-            + 0.00000f * (src[i-4] + src[i+5])
-            - 0.00000f * (src[i-5] + src[i+6])
-            + 0.00000f * (src[i-6] + src[i+7])
-            - 0.00000f * (src[i-7] + src[i+8]);
-        S = fabs (S);
-        if ( S > max )
-            max = S;
-    }
-#endif
-    return S;
-}
-
-static Int32_t
-ReadReplayGain ( const char* p )
-{
-    Int32_t  ret =  0;
-    int      sgn = +1;
-
-    if ( 0 == strcmp ( p, "--auto") )
-        return AUTO;
-    if ( 0 == strcmp ( p, "--list") )
-        return LIST;
-    if ( 0 == strcmp ( p, "--listall") )
-        return LISTALL;
-    if ( 0 == strcmp ( p, "--listreport") )
-        return Kreport = 1, LIST;
-    if ( 0 == strcmp ( p, "--listallreport") )
-        return Kreport = 1, LISTALL;
-    if ( 0 == strcmp ( p, "--autodB") )
-        return dBp = 1, AUTO;
-    if ( 0 == strcmp ( p, "--listdB") )
-        return dBp = 1, LIST;
-    if ( 0 == strcmp ( p, "--listalldB") )
-        return dBp = 1, LISTALL;
-    if ( 0 == strcmp ( p, "--listreportdB") )
-        return dBp = 1, Kreport = 1, LIST;
-    if ( 0 == strcmp ( p, "--listallreportdB") )
-        return dBp = 1, Kreport = 1, LISTALL;
-
-    if (*p == '+')
-        p++;
-    else if (*p == '-')
-        sgn = -sgn, p++;
-
-    while ( (unsigned int)(*p - '0') < 10u )
-        ret = 10 * ret + (unsigned int)(*p++ - '0');
-
-    ret *= 100;
-    switch (*p) {
-    case '.':
-        if ( p[1] == '\0' )
-            break;
-        else if ( (unsigned int)(p[1] - '0') < 10u )
-            ret += (p[1] - '0') * 10;
-        else
-            goto error;
-
-        if ( p[2] == '\0' )
-            break;
-        else if ( (unsigned int)(p[2] - '0') < 10u )
-            ret += (p[2] - '0');
-        else
-            goto error;
-
-        if ( p[3] == '\0' )
-            break;
-        else if ( (unsigned int)(p[3] - '0') < 10u )
-            ret += (p[2] >= '5');
-        else
-            goto error;
-        break;
-
-    default:
-    error:
-        stderr_printf ("Illegal string in number: %s\n", p );
-        exit (1);
-
-    case '\0':
-        break;
-    }
-
-    return ret * sgn;
-}
-
-
-void sh ( const char* name, float level)
-{
-#if 0
-    FILE* fp = fopen ("/tmp/silence", "a+");
-    if ( fp == NULL ) {
-        fprintf (stderr, "Can't append on '/tmp/silence'\n");
-        return;
-    }
-    if (name)
-        fprintf (fp, "%8.2f  %s\n", level, name );
-    else
-        fprintf (fp, "%8.2f ", level );
-    fclose (fp);
-#endif
-}
-
-#define NO   (size_t)(44100 * 0.05)
-
-static void
-CalcReplayGain ( const char* filename, gain_info_t* G )
-{
-    FILE*    fp;
-    float    buffl [NO];
-    float    buffr [NO];
-    Int16_t  buff  [NO] [2];
-    size_t   i;
-    size_t   len;
-    size_t   lastlen = 0;
-    unsigned int max = 0;
-    float    level;
-    float    mult;
-
-    if ((fp = pipeopen ( "mppdec --silent --scale 0.5 --gain 0 --raw - - < #", filename)) == NULL) {
-        stderr_printf ( "Can't decode '%s'\n", filename );
-        exit (9);
-    }
-
-    memset ( buff, 0, sizeof(buff) );
-    G->Silence = 0;
-
-    lastlen = len = fread (buff, 4, NO, fp);
-    for ( i = 0; i < len; i++ ) {
-        buffl [i] = 2. * buff [i] [0];
-        buffr [i] = 2. * buff [i] [1];
-        if ( abs(buff[i][0]) > max ) max = abs(buff[i][0]);
-        if ( abs(buff[i][1]) > max ) max = abs(buff[i][1]);
-    }
-    AnalyzeSamples ( buffl, buffr, len, 2 );
-
-    level = 0.;
-    mult  = 1.;
-    for ( i = 0; i < len; i++ ) {
-        level += mult * (buff [i] [0] * buff [i] [0] + buff [i] [1] * buff [i] [1]);
-        mult  *= 0.95;
-    }
-    level = 2*sqrt(level * 0.05);
-    if ( level > LEVEL_THR )
-        G->Silence |= 2;
-
-    sh ( NULL, level );
-
-    while (( len = fread (buff, 4, NO, fp) ) > 0 ) {
-        lastlen = len;
-        for ( i = 0; i < len; i++ ) {
-            buffl [i] = 2. * buff [i] [0];
-            buffr [i] = 2. * buff [i] [1];
-            if ( abs(buff[i][0]) > max ) max = abs(buff[i][0]);
-            if ( abs(buff[i][1]) > max ) max = abs(buff[i][1]);
-        }
-        AnalyzeSamples ( buffl, buffr, len, 2 );
-    }
-
-    level = 0.;
-    mult  = 1.;
-    for ( i = 1; i <= NO; i++ ) {
-        int  idx = (lastlen + NO - i) % NO;
-        level += mult * (buff [idx] [0] * buff [idx] [0] + buff [idx] [1] * buff [idx] [1]);
-        mult  *= 0.95;
-    }
-    level = 2*sqrt(level * 0.05);
-    if ( level > LEVEL_THR )
-        G->Silence |= 1;
-
-    sh(filename,level);
-
-    PCLOSE (fp);
-#if 0
-    GetTitleDynamics ();
-#endif
-    G -> FileName  = filename;
-    G -> TitleGain = GetTitleGain ();
-    G -> TitlePeak = 2 * max + 1;
-    G -> AlbumGain = GetAlbumGain ();
-    G -> AlbumPeak = G->AlbumPeak < G->TitlePeak  ?  G->TitlePeak  :  G->AlbumPeak;
-    return;
-}
-
-
-int
-ModifyFile ( const gain_info_t* G, unsigned int mask )
-{
-    unsigned char  buff [20];
-    Int32_t        val;
-    FILE_T         fd = OPENRW ( G -> FileName );
-
-    if ( fd == INVALID_FILEDESC ) {
-        stderr_printf ("Can't patch '%s'\n", G -> FileName );
-        return 1;
-    }
-    if ( READ ( fd, buff, sizeof(buff) ) != sizeof(buff) ) {
-        stderr_printf ("Can't read header of '%s'\n", G -> FileName );
-        return 2;
-    }
-    if ( 0 != memcmp ( buff, "MP+", 3)  ||  (buff[3] & 15) != 7 ) {
-        stderr_printf ("Not a MPC file SV7: '%s'\n", G -> FileName );
-        return 3;
-    }
-
-    if ( mask & 1 ) {   // Title Peak level
-        val       = G -> TitlePeak;
-        buff [12] = (Uint8_t)(val >> 0);
-        buff [13] = (Uint8_t)(val >> 8);
-        val       = (Int32_t)(G -> TitlePeak / 1.18);
-        buff [ 8] = (Uint8_t)(val >> 0);
-        buff [ 9] = (Uint8_t)(val >> 8);
-    }
-    if ( mask & 2 ) {   // Album Peak level
-        val       = G -> AlbumPeak;
-        buff [16] = (Uint8_t)(val >> 0);
-        buff [17] = (Uint8_t)(val >> 8);
-    }
-    if ( mask & 4 ) {   // Title RMS
-        val       = 100. * G -> TitleGain;
-        buff [14] = (Uint8_t)(val >> 0);
-        buff [15] = (Uint8_t)(val >> 8);
-    }
-    if ( mask & 8 ) {   // Album RMS
-        val       = 100. * G -> AlbumGain;
-        buff [18] = (Uint8_t)(val >> 0);
-        buff [19] = (Uint8_t)(val >> 8);
-    }
-
-    if ( SEEK  ( fd, 0L, SEEK_SET ) < 0 ) {
-        stderr_printf ("Seek error in '%s'\n", G -> FileName );
-        return 4;
-    }
-    if ( WRITE ( fd, buff, sizeof(buff) ) != sizeof(buff) ) {
-        stderr_printf ("Can't write data in '%s'\n", G -> FileName );
-        return 5;
-    }
-    if ( CLOSE (fd) < 0 ) {
-        stderr_printf ("Error closing '%s'\n", G -> FileName );
-        return 6;
-    }
-    return 0;
-}
-
-
-char* dB ( double val )
-{
-    static unsigned int x = 0;
-    static char buff[8][12];
-
-    x = (x+1) & 7;
-
-    if (dBp) {
-        double dB = 20. * log10 (val/32767.);
-        if (dB <= -60)
-            return "     ";
-        sprintf ( buff[x], fabs(dB) < 9.995 ? "%+5.2f" : "%+5.1f", dB  );
-    }
-    else {
-        sprintf ( buff[x], "%5u", (int)val );
-    }
-    return buff[x];
-}
-
-
-// " -- [xx] "          9
-// " -- [xx]."          9
-// "/[xx] -- "          9
-// "/[xx] --."          9
-// " -- xx -- "        10
-// " -- xx --."        10
-// "/xx -- "            7
-// "/xx --."            7
-
-static size_t
-AlbumNameLen ( const char* filename )
-{
-    const char*  p = filename + strlen (filename) - 9;
-
-    while ( p >= filename ) {
-        if ( 0 == memcmp ( p, " -- [", 5)  &&  isdigit (p[5])  &&  isdigit(p[6])  &&  p[7] == ']'  &&  (p[8]=='.' || p[8]==' ') )
-            return p - filename;
-        if ( (p[0]=='/' || p[0]=='\\')  &&  p[1] == '[' &&  isdigit (p[2])  &&  isdigit(p[3])  &&  0 == memcmp (p+4, "] --", 4)  &&  (p[8]=='.' || p[8]==' ') )
-            return p - filename;
-        if ( 0 == memcmp ( p, " -- ", 4)  &&  isdigit (p[4])  &&  isdigit(p[5])  &&  0 == memcmp (p+6, " --", 3)  &&  (p[9]=='.' || p[9]==' ') )
-            return p - filename;
-        if ( (p[0]=='/' || p[0]=='\\')  &&  isdigit (p[1])  &&  isdigit(p[2])  &&  0 == memcmp (p+3, " --", 3)  &&  (p[6]=='.' || p[6]==' ') )
-            return p - filename;
-        p--;
-    }
-
-    return 0;
-}
-
-
-int Cdecl
-main ( int argc, char** argv )
-{
-    static const char*
-                 extentions [] = { ".mpc", ".mpp", ".mp+", NULL };
-    Int32_t      mode;
-    Int32_t      title_gain;
-    Int32_t      title_peak;
-    Int32_t      album_gain;
-    Int32_t      album_peak;
-    double       title_peak_max     = 0.;
-    double       title_peak_adj_max = 0.;
-    double       album_peak_max     = 0.;
-    double       album_peak_adj_max = 0.;
-    FILE_T       fd;
-    Uint8_t      buff [20];
-    const char*  name;
-    gain_info_t  Gain;
-    int          i;
-    int          ilast;
-    int          smartskip;
-
-#ifdef USE_ARGV
-    mysetargv ( &argc, &argv, extentions );
-#endif
-
-    stderr_printf ( "Replaygain " VERSION "     (C) 2001-2002 Klemm/Robinson/Sawyer\n\n" );
-
-    if ( argv[1] != NULL  &&  0 == strncmp (argv[1], "--9", 3) )
-        SetPercentile (0.01 * atoi (*++argv + 2) );
-
-    if ( argv[1] != NULL  &&  0 == strcmp (argv[1], "--smart" ) )
-        smart++, argv++;
-
-    memset ( &Gain, 0, sizeof(Gain) );
-    InitGainAnalysis  ( 44100 /*CD_SAMPLE_FREQ*/ );
-
-    if ( argc < 3 ) {
-        stderr_printf ("usage: ReplayGain level MPC_Title_01 [MPC_Title_02 MPC_Title_03 ...]\n"
-                       "\n"
-                       "percentile can be:\n"
-                       "  --92 | --93 | --94 | --95 | --96 | --97 | --98\n"
-                       "\n"
-                       "level can be:\n"
-                       "  * value in the range -300 dB...+300 dB, set as title based replay gain\n"
-                       "  * --auto   | --autodB    : auto determine gains and peak values\n"
-                       "  * --list   | --listdB    : list title based values\n"
-                       "  * --listall| --listalldB : list title and album based values\n"
-                       "  * --listreport           : list title based values + K suggestion\n"
-                       "  * --listallreport        : list title and album based values + K suggestion\n" );
-        return 1;
-    }
-
-    argv++;
-    mode = ReadReplayGain (*argv);
-    if ( mode != AUTO  &&  mode != LIST  &&  mode != LISTALL ) {
-        if ( mode != (Int16_t) mode ) {
-            stderr_printf ("level can only be in the range -327.68 dB...+327.67 dB\n" );
-            return 2;
-        }
-        Gain.TitleGain = 0.01 * mode;
-    }
-
-    switch (mode) {
-    case AUTO:
-    default:
-        printf ("   Level Adjustment   |   Peak Level   (Adjst)|  Filename\n"
-                "----------------------+-----------------------+-------------------------------\n");
-        break;
-    case LIST:
-        printf ("  Level-  |       (Peak+)|\n"
-                "Adjustment|  Peak (Adjst)|  Filename\n"
-                "----------+--------------+-----------------------------------------------------\n");
-        break;
-    case LISTALL:
-        printf ("        Title            |        Album            |\n"
-                "  Level-  |       (Peak+)|  Level-  |       (Peak+)|\n"
-                "Adjustment|  Peak (Adjst)|Adjustment|  Peak (Adjst)|  Filename\n"
-                "----------+--------------+----------+--------------+---------------------------\n");
-        break;
-    }
-    argv++;
-
-repeat:
-    ilast = -1;
-    smartskip = 0;
-    if ( smart ) {
-        for ( i = 0; argv[i]  &&  (mode != AUTO || (AlbumNameLen (argv[0])==AlbumNameLen (argv[i])  &&  0 == memcmp (argv[0], argv[i], AlbumNameLen (argv[0])))); i++ ) {
-            ilast = i;
-            name = argv [i];
-            Gain.FileName = name;
-            if ( mode == AUTO ) {
-                fd = OPEN (name);
-                if ( fd == INVALID_FILEDESC ) {
-                    stderr_printf ("Can't open: %s\n", name );
-                    //break;
-                }
-                if ( READ ( fd, buff, sizeof(buff) ) != sizeof(buff) ) {
-                    stderr_printf ("Can't read header: %s\n", name );
-                    //break;
-                }
-                if ( CLOSE (fd) < 0 ) {
-                    stderr_printf ("Error closing file: %s\n", name );
-                    //break;
-                }
-                if ( buff[12] || buff[13] || buff[14] || buff[15] || buff[16] || buff[17] || buff[18] || buff[19]) {
-                    smartskip = 1;
-                    //break;
-                } else {
-                    smartskip = 0;
-                    break;
-                }
-            }
-        }
-    }
-    for ( i = 0; argv[i]  &&  (mode != AUTO || (AlbumNameLen (argv[0])==AlbumNameLen (argv[i])  &&  0 == memcmp (argv[0], argv[i], AlbumNameLen (argv[0])))); i++ ) {
-        ilast = i;
-        name = argv [i];
-        Gain.FileName = name;
-        if ( mode == AUTO ) {
-            if ( smartskip == 0 ) {
-            /*
-            if (smart) {
-                fd = OPEN (name);
-                if ( fd == INVALID_FILEDESC ) {
-                    stderr_printf ("Can't open: %s\n", name );
-                    continue;
-                }
-                if ( READ ( fd, buff, sizeof(buff) ) != sizeof(buff) ) {
-                    stderr_printf ("Can't read header: %s\n", name );
-                    continue;
-                }
-                if ( CLOSE (fd) < 0 ) {
-                    stderr_printf ("Error closing file: %s\n", name );
-                    continue;
-                }
-                if ( buff[12] || buff[13] || buff[14] || buff[15] || buff[16] || buff[17] || buff[18] || buff[19])
-                    continue;
-            }
-            */
-            if ( ISATTY (FILENO(STDOUT)) ) {
-                printf ("%s\r", name );
-                FLUSH (stdout);
-                fflush (stdout);
-            }
-            fd = OPENRW (name);
-            if ( fd == INVALID_FILEDESC ) {
-                stderr_printf ("Can't patch '%s'\n", name );
-                return 1;
-            }
-            if ( CLOSE (fd) < 0 ) {
-                stderr_printf ("Error closing '%s'\n", name );
-                return 6;
-            }
-            CalcReplayGain ( name, &Gain );
-            if ( Gain.TitleGain > +36. )
-                Gain.TitleGain = 0.;
-            if ( Gain.AlbumGain > +24. )
-                Gain.AlbumGain = 0.;
-            }
-        }
-        fd = OPEN (name);
-        if ( fd == INVALID_FILEDESC ) {
-            stderr_printf ("Can't open: %s\n", name );
-            continue;
-        }
-        if ( READ ( fd, buff, sizeof(buff) ) != sizeof(buff) ) {
-            stderr_printf ("Can't read header: %s\n", name );
-            continue;
-        }
-        if ( CLOSE (fd) < 0 ) {
-            stderr_printf ("Error closing file: %s\n", name );
-            continue;
-        }
-        if ( 0 != memcmp ( buff, "MP+", 3)  ||  (buff[3] & 15) != 7 ) {
-            stderr_printf ("Not a MPC file SV7: '%s'\n", name );
-            continue;
-        }
-
-        title_gain = (Uint8_t)buff[14] + 256 * (Int8_t) buff[15];
-        album_gain = (Uint8_t)buff[18] + 256 * (Int8_t) buff[19];
-        title_peak = (Uint8_t)buff[12] + 256 * (Uint8_t)buff[13];
-        album_peak = (Uint8_t)buff[16] + 256 * (Uint8_t)buff[17];
-
-        switch (mode) {
-        case LIST:
-            printf ("%+6.2f dB | %s (%s)| %s\n",
-                    0.01 * title_gain, dB(title_peak), dB(title_peak * pow (10., title_gain/2000.)),
-                    name );
-            if ( argv[i+1] == NULL  ||  0 != memcmp (argv[i], argv[i+1], AlbumNameLen (argv[i])) )  {
-                int len = AlbumNameLen (argv[i]);
-                printf ("%+6.2f dB | %s (%s)| %*.*s\n"
-                        "----------+--------------+-----------------------------------------------------\n",
-                    0.01 * album_gain, dB(album_peak), dB(album_peak * pow (10., album_gain/2000.)),
-                    len, len, argv[i] );
-            }
-            break;
-        case LISTALL:
-            printf ("%+6.2f dB | %s (%s)|%+6.2f dB | %s (%s)| %s\n",
-                    0.01 * title_gain, dB(title_peak), dB(title_peak * pow (10., title_gain/2000.)),
-                    0.01 * album_gain, dB(album_peak), dB(album_peak * pow (10., album_gain/2000.)),
-                    name );
-            break;
-        default:
-            Gain.TitlePeak = title_peak;
-            if ( mode == 0 ) {
-                Gain.TitleGain = 0;
-                Gain.TitlePeak = 0;
-                Gain.AlbumPeak = 0;
-                Gain.AlbumGain = 0;
-            }
-        case AUTO:
-            if ( !smartskip ) {
-                if ( mode == 0 )
-                    ModifyFile ( &Gain, 15);
-                else
-                    ModifyFile ( &Gain, mode==AUTO  ?  4|1  :  4);
-                printf ("%+6.2f dB =>%+6.2f dB | %s => %s (%s)| %s\n",
-                        0.01 * title_gain, Gain.TitleGain,
-                        dB(title_peak), dB(Gain.TitlePeak),
-                        dB(Gain.TitlePeak * pow (10., Gain.TitleGain/20.)),
-                        name );
-            } else {
-                printf ("skipped: %s\n", name );
-            }
-            break;
-        }
-        fflush (stdout);
-
-        if (mode == LIST || mode == LISTALL) {
-            if (title_peak > title_peak_max) title_peak_max = title_peak;
-            if (album_peak > album_peak_max) album_peak_max = album_peak;
-            if (title_peak * pow (10., title_gain/2000.) > title_peak_adj_max) title_peak_adj_max = title_peak * pow (10., title_gain/2000.);
-            if (album_peak * pow (10., album_gain/2000.) > album_peak_adj_max) album_peak_adj_max = album_peak * pow (10., album_gain/2000.);
-        }
-
-    }
-
-    if ( mode == AUTO ) {
-        int len = AlbumNameLen (argv[0]);
-        if ( !smartskip ) {
-            printf ("          =>%+6.2f dB |       => %s (%s)| %*.*s\n",
-                    Gain.AlbumGain,
-                    dB(Gain.AlbumPeak),
-                    dB(Gain.AlbumPeak * pow (10., Gain.AlbumGain/20.)), len, len, *argv );
-        } else {
-            printf ( "          skipped...\n" );
-        }
-        fflush (stdout);
-        for ( i = 0; i <= ilast; i++ ) {
-            name = argv [i];
-            Gain.FileName = name;
-            if ( !smartskip )
-                ModifyFile ( &Gain, 2|8 );
-        }
-        argv += ilast + 1;
-        if ( argv[0] != NULL ) {
-            printf ( "----------------------+-----------------------+-------------------------------\n");
-            memset ( &Gain, 0, sizeof(Gain) );
-            InitGainAnalysis  ( 44100 /*CD_SAMPLE_FREQ*/ );
-            goto repeat;
-        }
-    }
-
-    switch (mode) {
-    case LIST:
-        printf ("          | %s (%s)| %s\n",
-                dB(title_peak_max), dB(title_peak_adj_max),
-                "--- maximum (title based) ---" );
-        printf ("          | %s (%s)| %s\n",
-                dB(album_peak_max), dB(album_peak_adj_max),
-                "--- maximum (album based) ---" );
-        break;
-    case LISTALL:
-        printf ("          | %s (%s)|          | %s (%s)| %s\n",
-                dB(title_peak_max), dB(title_peak_adj_max),
-                dB(album_peak_max), dB(album_peak_adj_max),
-                "--- maximum ---" );
-        break;
-    }
-
-    if ( Kreport ) {
-        printf ("\n\nSuggested mode for\n");
-        printf ("  title based replay gain:   K%+d\n", -14 - (int) ceil (20.*log10(title_peak_adj_max/32767.)) );
-        printf ("  album based replay gain:   K%+d\n", -14 - (int) ceil (20.*log10(album_peak_adj_max/32767.)) );
-        printf ("  title based clipping prev: K%+d\n", -14 - (int) ceil (20.*log10(title_peak_max    /32767.)) );
-        printf ("  album based clipping prev: K%+d\n", -14 - (int) ceil (20.*log10(album_peak_max    /32767.)) );
-        printf ("\nLast two setting only possible in plugins using K setting also for\nnon-replaygain modes.\n");
-    }
-
-    return 0;
-}
-
-/* end of replaygain.c */
Index: penc/branches/zorg/replaygain.dsp
===================================================================
--- /mppenc/branches/zorg/replaygain.dsp	(revision 40)
+++ 	(revision )
@@ -1,122 +1,0 @@
-# Microsoft Developer Studio Project File - Name="replaygain" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=replaygain - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "replaygain.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "replaygain.mak" CFG="replaygain - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "replaygain - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "replaygain - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "replaygain - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MPP_ENCODER" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "replaygain - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "MPP_ENCODER" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "replaygain - Win32 Release"
-# Name "replaygain - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\_setargv.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\gain_analysis.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\gain_analysis.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\pipeopen.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\replaygain.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\stderr.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
Index: penc/branches/zorg/replaygain.vcproj
===================================================================
--- /mppenc/branches/zorg/replaygain.vcproj	(revision 40)
+++ 	(revision )
@@ -1,243 +1,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="replaygain"
-	SccProjectName=""
-	SccLocalPath="">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\Release"
-			IntermediateDirectory=".\Release"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;MPP_ENCODER"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Release/replaygain.pch"
-				AssemblerListingLocation=".\Release/"
-				ObjectFile=".\Release/"
-				ProgramDataBaseFileName=".\Release/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="odbc32.lib odbccp32.lib setargv.obj"
-				OutputFile=".\Release/replaygain.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				ProgramDatabaseFile=".\Release/replaygain.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Release/replaygain.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\Debug"
-			IntermediateDirectory=".\Debug"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="_DEBUG;MPP_ENCODER;WIN32;_CONSOLE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Debug/replaygain.pch"
-				AssemblerListingLocation=".\Debug/"
-				ObjectFile=".\Debug/"
-				ProgramDataBaseFileName=".\Debug/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="odbc32.lib odbccp32.lib setargv.obj"
-				OutputFile=".\Debug/replaygain.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile=".\Debug/replaygain.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Debug/replaygain.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
-			<File
-				RelativePath="_setargv.c">
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="gain_analysis.c">
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="gain_analysis.h">
-			</File>
-			<File
-				RelativePath="pipeopen.c">
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="replaygain.c">
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="stderr.c">
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: penc/branches/zorg/requant.c
===================================================================
--- /mppenc/branches/zorg/requant.c	(revision 40)
+++ 	(revision )
@@ -1,154 +1,0 @@
-/*
- * Musepack audio compression
- * Copyright (C) 1999-2004 Buschmann/Klemm/Piecha/Wolf
- *
- * 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.1 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
- */
-
-#include "mppdec.h"
-
-Int8_t      Q_bit [32];         // Number of bits to save the resolution (SV6)
-Int8_t      Q_res [32] [16];    // Index -> resolution (SV6)
-Float       __SCF [6 + 128];    // tabulated scalefactors with safety margin
-Float       __Cc  [1 + 18];     // Requantization-coefficients
-const Uint  __Dc  [1 + 18] = {  // Requantization-Offset
-      2,
-      0,     1,     2,     3,     4,     7,    15,    31,    63,
-    127,   255,   511,  1023,  2047,  4095,  8191, 16383, 32767
-};
-Uint        Bitrate;
-Int         Min_Band;
-Int         Max_Band;
-
-
-// Initialize Min_Band, Max_Band; Input is function-parameter and bitrate
-
-static void
-Set_BandLimits ( Int Max_Band_desired, Bool_t used_IS )
-{
-    if ( Max_Band_desired > 0 ) {   // Bandwidth as chosen by user
-        Max_Band = Max_Band_desired;
-    } else {                        // Default-Bandwidth
-        if      ( Bitrate > 384 ) Max_Band = 31;        // 22.05 kHz
-        else if ( Bitrate > 160 ) Max_Band = 29;        // 20.67 kHz
-        else if ( Bitrate >  64 ) Max_Band = 26;        // 18.60 kHz
-        else if ( Bitrate >   0 ) Max_Band = 20;        // 14.47 kHz
-        else                      Max_Band = 31;        // 22.05 kHz
-    }
-
-    if ( used_IS ) {
-        if      ( Bitrate > 384 ) assert (0);
-        else if ( Bitrate > 160 ) Min_Band = 16;        // 11.02 kHz
-        else if ( Bitrate > 112 ) Min_Band = 12;        //  8.27 kHz
-        else if ( Bitrate > 64  ) Min_Band =  8;        //  5.51 kHz
-        else                      Min_Band =  4;        //  2.76 kHz
-
-        if ( Min_Band >= Max_Band )
-            Min_Band = Max_Band /* + 1 ????? */;
-    } else {
-        Min_Band = Max_Band + 1;
-    }
-}
-
-
-// Initialize Q_bit and Q_res
-
-static void
-Set_QuantizeMode_SV4_6 ( void )
-{
-    Int  Band;
-    Int  i;
-
-    for ( Band = 0; Band < 11; Band++ ) {
-        Q_bit [Band] = 4;
-        for ( i = 0; i < (1<<4)-1; i++ )
-            Q_res [Band] [i] = (Uint8_t)i;
-        Q_res [Band] [(1<<4)-1] = 17;
-    }
-    for ( Band = 11; Band < 23; Band++ ) {
-        Q_bit [Band] = 3;
-        for ( i = 0; i < (1<<3)-1; i++ )
-            Q_res [Band] [i] = (Uint8_t)i;
-        Q_res [Band] [(1<<3)-1] = 17;
-    }
-    for ( Band = 23; Band < 32; Band++ ) {
-        Q_bit [Band] = 2;
-        for ( i = 0; i < (1<<2)-1; i++ )
-            Q_res [Band] [i] = (Uint8_t)i;
-        Q_res [Band] [(1<<2)-1] = 17;
-    }
-}
-
-
-// Initialize table SCF
-
-static void
-Calc_ScaleFactors ( Ldouble start, Ldouble mult )
-{
-    size_t  i;
-
-    for ( i = 0; i < sizeof(__SCF)/sizeof(*__SCF); i++ ) {
-        __SCF [i] = (Float) start;
-        start    *= mult;
-    }
-}
-
-
-// Initialize Cc, needs table Dc
-
-static void
-Calc_RequantTab_SV4_7 ( void )
-{
-    size_t  i;
-
-    __Cc [0] = 111.28596247532739441973f;                                       // 16384 / 255 * sqrt(3)
-    for ( i = 1; i < sizeof(__Cc)/sizeof(*__Cc); i++ )
-        __Cc [i] = (Float) (32768. / (__Dc [i] + 0.5));
-}
-
-
-static void
-Calc_RequantTab_SV8 ( void )
-{
-    size_t  i;
-
-    for ( i = 0; i < sizeof(__Cc)/sizeof(*__Cc); i++ )
-        __Cc [i] = (Float) 1.;
-}
-
-
-#define C1  1.20050805774840750476L
-#define C2  0.83298066476582673961L
-#define C3  0.501187233627272285285L
-#define C4  1.122018454301963435591L
-
-void
-Init_QuantTab ( Int maximum_Band, Bool_t used_IS, Double amplification, Uint StreamVersion )
-{
-    // Initializations are independent from each other, order is arbitrary
-    Set_BandLimits ( maximum_Band, used_IS );
-    Set_QuantizeMode_SV4_6 ();
-
-    if ( (StreamVersion & 15) < 8 ) {
-        Calc_RequantTab_SV4_7 ();
-        // Covers the range +7.936...-98.4127 dB, where scf[n]/scf[n-1] = 1.20050805774840750476
-        Calc_ScaleFactors ( amplification * C1/(C2*C2*C2*C2*C2*C2), C2 );
-    } else {
-        Calc_RequantTab_SV8 ();
-        Calc_ScaleFactors ( amplification * C3/(C4*C4*C4*C4*C4*C4), C4 );
-    }
-}
-
-/* end of requant.c */
Index: penc/branches/zorg/seekspeed.c
===================================================================
--- /mppenc/branches/zorg/seekspeed.c	(revision 40)
+++ 	(revision )
@@ -1,543 +1,0 @@
-/*
-
-Pentium-4/1.7, Windows 2000, VS 6.0, 80 GB HD, 7200 rpm        Athlon/0.7, Linux 2.2.17, gcc 2.95.3, 60 GB HD, 5400 rpm
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-                               222.9x     normal decode (from Cache)                                              156.8x
-                               631.1x     decode with --scale 0 (from Cache)                                      493.0x
-3600.0 s :    1.1204 ms =  3213228.3x     FastCached, notoptimized                3600.0 s :    1.0078 ms =  3571982.0x
-3600.0 s :    0.4342 ms =  8290771.0x     FastCached, Addition optimized          3600.0 s :    0.1972 ms = 18253801.0x
-3599.7 s : 1417.5366 ms =     2539.4x     FAT32/ext2,  fseek/fread                1464.3 s :  181.8882 ms =     8050.7x
-3599.7 s : 1242.3945 ms =     2897.4x     FAT32/ext2,  lseek/read                 1464.3 s :  109.3096 ms =    13396.1x
-3599.7 s :  180.8211 ms =    19907.4x     FAT32/ext2,  fread                      1464.3 s :  101.8035 ms =    14383.8x
-3599.7 s :  159.8485 ms =    22519.3x     FAT32/ext2,  read                       1464.3 s :  101.4027 ms =    14440.6x
-3599.7 s : 1431.0977 ms =     2515.3x     NTFS/reiser, fseek/fread                1464.3 s :  183.1137 ms =     7996.8x
-3599.7 s : 1251.7135 ms =     2875.8x     NTFS/reiser, lseek/read                 1464.3 s :  127.6082 ms =    11475.1x
-3599.7 s :  186.2180 ms =    19330.4x     NTFS/reiser, fread                      1464.3 s :  103.0833 ms =    14205.2x
-3599.7 s :  163.7307 ms =    21985.3x     NTFS/reiser, read                       1464.3 s :  102.6841 ms =    14260.4x
-3599.7 s :22066.5936 ms =      163.1x     NTFS/reiser, uncached, fseek/fread    1464.3 s : 1671.0040 ms =      876.3x
-3599.7 s :23131.4043 ms =      155.6x     NTFS/reiser, uncached, lseek/read     1464.3 s : 1519.3631 ms =      963.8x
-                                          NTFS/reiser, uncached, fread          1464.3 s : 1515.6563 ms =      966.1x
-3599.7 s : 9520.1631 ms =      378.1x     NTFS/reiser, uncached, read           1464.3 s : 1516.3300 ms =      965.7x
-                                          FAT32, uncached, fseek/fread
-                                          FAT32, uncached, lseek/read
-                                          FAT32, uncached, fread
-                                          FAT32, uncached, read
-
-*/
-
-#include "mppdec.h"
-
-
-#ifdef _WIN32
-Int64_t  __rdtscll ( void )
-{
-    __asm { rdtsc };
-}
-# define rdtscll(__var)     (__var = __rdtscll() )
-#else
-# include <asm/msr.h>
-#endif
-
-
-#ifdef _WIN32
-# define TESTDATEI1       "D:\\AUDIO\\MIKE OLDFIELD\\AMAROK -- [01] Amarok.mpc"         // FAT32
-# define TESTDATEI2       "C:\\AUDIO\\AMAROK.mpc"                                       // NTFS
-# define TESTDATEIFRAMES  137800
-# define FLUSHCMD         "copy /B \"D:\\AUDIO\\Tangerine Dream\\*\" nul 1> nul"        // should read RAM size of data
-# define RAMSIZE          512                                                           // RAM size in MByte
-#else
-# define TESTDATEI1       "CD.mpc"                                                      // ext2
-# define TESTDATEI2       "/Archive/CD.mpc"                                             // reiserFS
-# define TESTDATEIFRAMES  56056
-# define FLUSHCMD         "cat /Archive/Audio/Sting/Nada*.pac > /dev/null"              // should read RAM size of data
-# define RAMSIZE          128                                                           // RAM size in MByte
-#endif
-
-static void
-flushing ( void )
-{
-    size_t  len = 1048576L * RAMSIZE;
-    long*   p;
-    int     i;
-    int     j;
-    time_t  t1;
-    time_t  t2;
-
-    fprintf ( stderr, "Flushing system cache ...   ");
-    p = malloc ( len );
-    for ( i = 0; i <= 64; i++ ) {
-        fprintf ( stderr, "\b\b%2u", i );
-        time (&t1);
-        for ( j = 0; j < len/256*i; j += 1024 )
-            p[j] = i;
-        time (&t2);
-        if (t2-t1 > 8)
-            break;
-    }
-    free (p);
-    for ( i = 0; i < 2; i++ ) {
-        fprintf ( stderr, ".", i );
-        system  ( FLUSHCMD );
-    }
-    p = malloc ( len );
-    fprintf ( stderr, "  ");
-    for ( i = 0; i <= 64; i++ ) {
-        fprintf ( stderr, "\b\b%2u", i );
-        time (&t1);
-        for ( j = 0; j < len/256*i; j += 1024 )
-            p[j] = i;
-        time (&t2);
-        if (t2-t1 > 8)
-            break;
-    }
-    free (p);
-    fprintf ( stderr, "\n\n");
-}
-
-
-
-unsigned int  mask [33] = {
-    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
-};
-
-#define MEMSIZE   8192
-#define MEMSIZE2  (MEMSIZE/2)
-#define MEMMASK   (MEMSIZE-1)
-
-
-unsigned short  tab [137812];
-unsigned long   Speicher [MEMSIZE];
-unsigned long   dword;
-unsigned int    Zaehler;
-unsigned int    pos;
-
-
-static Uint32_t
-Bitstream_read ( Int bits )
-{
-    unsigned int  out = dword;
-
-    pos += bits;
-
-    if ( pos < 32 ) {
-        out >>= 32 - pos;
-    }
-    else {
-        dword = Speicher [Zaehler = (Zaehler+1) & MEMMASK];
-        pos  -= 32;
-        if ( pos ) {
-            out <<= pos;
-            out  |= dword >> (32-pos);
-        }
-    }
-
-    return out & mask [bits];
-}
-
-
-unsigned long
-test1 ( unsigned short* tab, unsigned int len )
-{
-    unsigned long  sum = 0;
-    unsigned int   i;
-
-    for ( i = 0; i < len; i++ )
-        if ( tab[i] != 0 )
-            sum += tab [i];
-        else
-            printf ("%u\n", i );
-    return sum;
-}
-
-
-unsigned long
-test2 ( unsigned short* tab, unsigned int len )
-{
-    unsigned long   sum1 = 0;
-    unsigned long   sum2 = 0;
-    int             i;
-    unsigned long*  p = (unsigned long*) tab;
-
-    i = len >> 1;
-
-    for ( ; i--; p++ ) {
-        sum1 += *p;
-        sum2 += *p >> 16;
-    }
-
-    sum2 += (sum1 - (sum2 << 16));
-
-    if (len & 1)
-        sum2 += tab[len-1];
-
-    return sum2;
-}
-
-
-static void
-Helper1 ( FILE* fp, unsigned long fpos )
-{
-    fseek ( fp, (fpos>>5) * 4, SEEK_SET );
-    fread ( Speicher, sizeof(int), 2, fp );
-    dword = Speicher [ Zaehler = 0];
-    pos   = fpos & 31;
-}
-
-
-unsigned long
-test3 ( FILE* fp, unsigned int len )
-{
-    unsigned long  fpos = 200;
-    unsigned int   i;
-
-    for ( i = 0; i < len; i++ ) {
-        Helper1 ( fp, fpos );
-        fpos += 20 + Bitstream_read (20);
-    }
-    return fpos;
-}
-
-
-static void
-Helper2 ( int fd, unsigned long fpos )
-{
-    lseek ( fd, (fpos>>5) * 4, SEEK_SET );
-    read ( fd, Speicher, sizeof(int)*2 );
-    dword = Speicher [ Zaehler = 0];
-    pos   = fpos & 31;
-}
-
-
-unsigned long
-test4 ( FILE* fp, unsigned int len )
-{
-    unsigned long  fpos = 200;
-    unsigned int   i;
-    int            fd = fileno(fp);
-
-    for ( i = 0; i < len; i++ ) {
-        Helper2 ( fd, fpos );
-        fpos += 20 + Bitstream_read (20);
-    }
-    return fpos;
-}
-
-
-static unsigned int  RING;
-
-
-static void
-Helper3 ( FILE* fp, unsigned long fpos )
-{
-    unsigned int  NEWRING = (fpos>>5) & MEMSIZE2;
-
-    if ( RING != NEWRING ) {
-        fread ( Speicher+RING, 1, sizeof(Speicher)/2, fp );
-        RING = NEWRING;
-    }
-
-    dword = Speicher [Zaehler = (fpos>>5) & MEMMASK];
-    pos   = fpos & 31;
-}
-
-
-unsigned long
-test5 ( FILE* fp, unsigned int len )
-{
-    unsigned long  fpos = 200;
-    unsigned int   i;
-
-    rewind (fp);
-    fread ( Speicher, 1, sizeof(Speicher), fp );
-    RING = 0;
-
-    for ( i = 0; i < len; i++ ) {
-        Helper3 ( fp, fpos );
-        fpos += 20 + Bitstream_read (20);
-    }
-
-    return fpos;
-}
-
-
-static void
-Helper4 ( int fd, unsigned long fpos )
-{
-    unsigned int  NEWRING = (fpos>>5) & MEMSIZE2;
-
-    if ( RING != NEWRING ) {
-        read ( fd, Speicher+RING, sizeof(Speicher)/2 );
-        RING = NEWRING;
-    }
-
-    dword = Speicher [Zaehler = (fpos>>5) & MEMMASK];
-    pos   = fpos & 31;
-}
-
-
-unsigned long
-test6 ( FILE* fp, unsigned int len )
-{
-    unsigned long  fpos = 200;
-    unsigned int   i;
-    int            fd = fileno(fp);
-
-    lseek (fd, 0l, SEEK_SET );
-    read ( fd, Speicher, sizeof(Speicher) );
-    RING = 0;
-
-    for ( i = 0; i < len; i++ ) {
-        Helper4 ( fd, fpos );
-        fpos += 20 + Bitstream_read (20);
-    }
-
-    return fpos;
-}
-
-
-int
-main ( void )
-{
-    Int64_t   t1;
-    Int64_t   t2;
-    int       i;
-    double    TIME1;
-    double    TIME2;
-    FILE*     fp;
-
-    fp = fopen ( TESTDATEI1, "rb" );
-    if ( fp == NULL ) {
-        fprintf ( stderr, "\nCan't open '%s'\n\n", TESTDATEI1 );
-        return 1;
-    }
-
-    for ( i = 0; i < sizeof(tab)/sizeof(*tab); i++ )
-        tab[i] = sqrt ( i+1 );
-    memset ( Speicher, 0, sizeof Speicher );
-
-    if ( test1 ( tab, sizeof(tab)/sizeof(*tab) ) != test2 ( tab, sizeof(tab)/sizeof(*tab) )) {
-        printf ("1=%lu 2=%lu\n", test1 ( tab, sizeof(tab)/sizeof(*tab) ), test2 ( tab, sizeof(tab)/sizeof(*tab) ) );
-    }
-
-    if ( test3 ( fp, TESTDATEIFRAMES ) != test4 ( fp, TESTDATEIFRAMES )) {
-        printf ("3=%lu 4=%lu\n", test3 ( fp, TESTDATEIFRAMES ), test4 ( fp, TESTDATEIFRAMES ) );
-    }
-
-    if ( test3 ( fp, TESTDATEIFRAMES ) != test5 ( fp, TESTDATEIFRAMES )) {
-        printf ("3=%lu 5=%lu\n", test3 ( fp, TESTDATEIFRAMES ), test5 ( fp, TESTDATEIFRAMES ) );
-    }
-
-    if ( test3 ( fp, TESTDATEIFRAMES ) != test6 ( fp, TESTDATEIFRAMES )) {
-        printf ("3=%lu 6=%lu\n", test3 ( fp, TESTDATEIFRAMES ), test6 ( fp, TESTDATEIFRAMES ) );
-    }
-
-    //--------------------------------------------------------------
-    test1 ( tab, sizeof(tab)/sizeof(*tab) );
-    rdtscll (t1);
-    for ( i = 0; i < 5000; i++ )
-        test1 ( tab, sizeof(tab)/sizeof(*tab) );
-    rdtscll (t2);
-    TIME1 = sizeof(tab)/sizeof(*tab)*1152. / 44100.;
-    TIME2 = (t2-t1) / 700.e6 / 5000;
-    printf ("%6.1f s : %9.4f ms = %10.1fx\n", TIME1, 1.e3*TIME2, TIME1/TIME2 );
-
-    //---------------------------------------------------------------
-    test2 ( tab, sizeof(tab)/sizeof(*tab) );
-    rdtscll (t1);
-    for ( i = 0; i < 25000; i++ )
-        test2 ( tab, sizeof(tab)/sizeof(*tab) );
-    rdtscll (t2);
-    TIME1 = sizeof(tab)/sizeof(*tab)*1152. / 44100.;
-    TIME2 = (t2-t1) / 700.e6 / 25000;
-    printf ("%6.1f s : %9.4f ms = %10.1fx\n", TIME1, 1.e3*TIME2, TIME1/TIME2 );
-
-    //---------------------------------------------------------------
-    test3 ( fp, TESTDATEIFRAMES );
-    rdtscll (t1);
-    for ( i = 0; i < 25; i++ )
-        test3 ( fp, TESTDATEIFRAMES );
-    rdtscll (t2);
-    TIME1 = TESTDATEIFRAMES*1152. / 44100.;
-    TIME2 = (t2-t1) / 700.e6 / 25;
-    printf ("%6.1f s : %9.4f ms = %10.1fx\n", TIME1, 1.e3*TIME2, TIME1/TIME2 );
-
-    //---------------------------------------------------------------
-    test4 ( fp, TESTDATEIFRAMES );
-    rdtscll (t1);
-    for ( i = 0; i < 50; i++ )
-        test4 ( fp, TESTDATEIFRAMES );
-    rdtscll (t2);
-    TIME1 = TESTDATEIFRAMES*1152. / 44100.;
-    TIME2 = (t2-t1) / 700.e6 / 50;
-    printf ("%6.1f s : %9.4f ms = %10.1fx\n", TIME1, 1.e3*TIME2, TIME1/TIME2 );
-
-    //---------------------------------------------------------------
-    test5 ( fp, TESTDATEIFRAMES );
-    rdtscll (t1);
-    for ( i = 0; i < 50; i++ )
-        test5 ( fp, TESTDATEIFRAMES );
-    rdtscll (t2);
-    TIME1 = TESTDATEIFRAMES*1152. / 44100.;
-    TIME2 = (t2-t1) / 700.e6 / 50;
-    printf ("%6.1f s : %9.4f ms = %10.1fx\n", TIME1, 1.e3*TIME2, TIME1/TIME2 );
-
-    //---------------------------------------------------------------
-    test6 ( fp, TESTDATEIFRAMES );
-    rdtscll (t1);
-    for ( i = 0; i < 50; i++ )
-        test6 ( fp, TESTDATEIFRAMES );
-    rdtscll (t2);
-    TIME1 = TESTDATEIFRAMES*1152. / 44100.;
-    TIME2 = (t2-t1) / 700.e6 / 50;
-    printf ("%6.1f s : %9.4f ms = %10.1fx\n", TIME1, 1.e3*TIME2, TIME1/TIME2 );
-
-    fclose (fp);
-    fp = fopen ( TESTDATEI2, "rb" );
-    if ( fp == NULL ) {
-        fprintf ( stderr, "\nCan't open '%s'\n\n", TESTDATEI2 );
-        return 1;
-    }
-
-    //---------------------------------------------------------------
-    test3 ( fp, TESTDATEIFRAMES );
-    rdtscll (t1);
-    for ( i = 0; i < 25; i++ )
-        test3 ( fp, TESTDATEIFRAMES );
-    rdtscll (t2);
-    TIME1 = TESTDATEIFRAMES*1152. / 44100.;
-    TIME2 = (t2-t1) / 700.e6 / 25;
-    printf ("%6.1f s : %9.4f ms = %10.1fx\n", TIME1, 1.e3*TIME2, TIME1/TIME2 );
-
-    //---------------------------------------------------------------
-    test4 ( fp, TESTDATEIFRAMES );
-    rdtscll (t1);
-    for ( i = 0; i < 50; i++ )
-        test4 ( fp, TESTDATEIFRAMES );
-    rdtscll (t2);
-    TIME1 = TESTDATEIFRAMES*1152. / 44100.;
-    TIME2 = (t2-t1) / 700.e6 / 50;
-    printf ("%6.1f s : %9.4f ms = %10.1fx\n", TIME1, 1.e3*TIME2, TIME1/TIME2 );
-
-    //---------------------------------------------------------------
-    test5 ( fp, TESTDATEIFRAMES );
-    rdtscll (t1);
-    for ( i = 0; i < 50; i++ )
-        test5 ( fp, TESTDATEIFRAMES );
-    rdtscll (t2);
-    TIME1 = TESTDATEIFRAMES*1152. / 44100.;
-    TIME2 = (t2-t1) / 700.e6 / 50;
-    printf ("%6.1f s : %9.4f ms = %10.1fx\n", TIME1, 1.e3*TIME2, TIME1/TIME2 );
-
-    //---------------------------------------------------------------
-    test6 ( fp, TESTDATEIFRAMES );
-    rdtscll (t1);
-    for ( i = 0; i < 50; i++ )
-        test6 ( fp, TESTDATEIFRAMES );
-    rdtscll (t2);
-    TIME1 = TESTDATEIFRAMES*1152. / 44100.;
-    TIME2 = (t2-t1) / 700.e6 / 50;
-    printf ("%6.1f s : %9.4f ms = %10.1fx\n", TIME1, 1.e3*TIME2, TIME1/TIME2 );
-
-    fclose (fp);
-
-    //------------------------------------------------------------------
-    flushing ();
-    fp = fopen ( TESTDATEI1, "rb" );
-    if ( fp == NULL ) {
-        fprintf ( stderr, "\nCan't open '%s'\n\n", TESTDATEI1 );
-        return 1;
-    }
-    test3 ( fp, TESTDATEIFRAMES );
-    test3 ( fp, TESTDATEIFRAMES );
-    fclose (fp);
-    fp = fopen ( TESTDATEI2, "rb" );
-    if ( fp == NULL ) {
-        fprintf ( stderr, "\nCan't open '%s'\n\n", TESTDATEI2 );
-        return 1;
-    }
-    rdtscll (t1);
-    test3 ( fp, TESTDATEIFRAMES );
-    rdtscll (t2);
-    TIME1 = TESTDATEIFRAMES*1152. / 44100.;
-    TIME2 = (t2-t1) / 700.e6 / 1;
-    printf ("%6.1f s : %9.4f ms = %10.1fx\n", TIME1, 1.e3*TIME2, TIME1/TIME2 );
-
-    fclose (fp);
-
-    //------------------------------------------------------------------
-    flushing ();
-    fp = fopen ( TESTDATEI1, "rb" );
-    if ( fp == NULL ) {
-        fprintf ( stderr, "\nCan't open '%s'\n\n", TESTDATEI2 );
-        return 1;
-    }
-    test4 ( fp, TESTDATEIFRAMES );
-    test4 ( fp, TESTDATEIFRAMES );
-    fclose (fp);
-    fp = fopen ( TESTDATEI2, "rb" );
-    if ( fp == NULL ) {
-        fprintf ( stderr, "\nCan't open '%s'\n\n", TESTDATEI2 );
-        return 1;
-    }
-    rdtscll (t1);
-    test4 ( fp, TESTDATEIFRAMES );
-    rdtscll (t2);
-    TIME1 = TESTDATEIFRAMES*1152. / 44100.;
-    TIME2 = (t2-t1) / 700.e6 / 1;
-    printf ("%6.1f s : %9.4f ms = %10.1fx\n", TIME1, 1.e3*TIME2, TIME1/TIME2 );
-
-    fclose (fp);
-    //------------------------------------------------------------------
-    flushing ();
-    fp = fopen ( TESTDATEI1, "rb" );
-    if ( fp == NULL ) {
-        fprintf ( stderr, "\nCan't open '%s'\n\n", TESTDATEI1 );
-        return 1;
-    }
-    test5 ( fp, TESTDATEIFRAMES );
-    test5 ( fp, TESTDATEIFRAMES );
-    fclose (fp);
-    fp = fopen ( TESTDATEI2, "rb" );
-    if ( fp == NULL ) {
-        fprintf ( stderr, "\nCan't open '%s'\n\n", TESTDATEI2 );
-        return 1;
-    }
-    rdtscll (t1);
-    test5 ( fp, TESTDATEIFRAMES );
-    rdtscll (t2);
-    TIME1 = TESTDATEIFRAMES*1152. / 44100.;
-    TIME2 = (t2-t1) / 700.e6 / 1;
-    printf ("%6.1f s : %9.4f ms = %10.1fx\n", TIME1, 1.e3*TIME2, TIME1/TIME2 );
-
-    //------------------------------------------------------------------
-    flushing ();
-    fp = fopen ( TESTDATEI1, "rb" );
-    if ( fp == NULL ) {
-        fprintf ( stderr, "\nCan't open '%s'\n\n", TESTDATEI1 );
-        return 1;
-    }
-    test6 ( fp, TESTDATEIFRAMES );
-    test6 ( fp, TESTDATEIFRAMES );
-    fclose (fp);
-    fp = fopen ( TESTDATEI2, "rb" );
-    if ( fp == NULL ) {
-        fprintf ( stderr, "\nCan't open '%s'\n\n", TESTDATEI2 );
-        return 1;
-    }
-    rdtscll (t1);
-    test6 ( fp, TESTDATEIFRAMES );
-    rdtscll (t2);
-    TIME1 = TESTDATEIFRAMES*1152. / 44100.;
-    TIME2 = (t2-t1) / 700.e6 / 1;
-    printf ("%6.1f s : %9.4f ms = %10.1fx\n", TIME1, 1.e3*TIME2, TIME1/TIME2 );
-
-    return 0;
-}
Index: penc/branches/zorg/seekspeed.dsp
===================================================================
--- /mppenc/branches/zorg/seekspeed.dsp	(revision 40)
+++ 	(revision )
@@ -1,102 +1,0 @@
-# Microsoft Developer Studio Project File - Name="seekspeed" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=seekspeed - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "seekspeed.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "seekspeed.mak" CFG="seekspeed - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "seekspeed - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "seekspeed - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "seekspeed - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MPP_DECODER" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "seekspeed - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "seekspeed___Win32_Debug"
-# PROP BASE Intermediate_Dir "seekspeed___Win32_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ  /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MPP_DECODER" /YX /FD /GZ  /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "seekspeed - Win32 Release"
-# Name "seekspeed - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\seekspeed.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
Index: penc/branches/zorg/seekspeed.vcproj
===================================================================
--- /mppenc/branches/zorg/seekspeed.vcproj	(revision 40)
+++ 	(revision )
@@ -1,166 +1,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="seekspeed"
-	SccProjectName=""
-	SccLocalPath="">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\Release"
-			IntermediateDirectory=".\Release"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;MPP_DECODER"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Release/seekspeed.pch"
-				AssemblerListingLocation=".\Release/"
-				ObjectFile=".\Release/"
-				ProgramDataBaseFileName=".\Release/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=".\Release/seekspeed.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				ProgramDatabaseFile=".\Release/seekspeed.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Release/seekspeed.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\Debug"
-			IntermediateDirectory=".\Debug"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;MPP_DECODER"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Debug/seekspeed.pch"
-				AssemblerListingLocation=".\Debug/"
-				ObjectFile=".\Debug/"
-				ProgramDataBaseFileName=".\Debug/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=".\Debug/seekspeed.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile=".\Debug/seekspeed.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Debug/seekspeed.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
-			<File
-				RelativePath="seekspeed.c">
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: penc/branches/zorg/streamserver.c
===================================================================
--- /mppenc/branches/zorg/streamserver.c	(revision 40)
+++ 	(revision )
@@ -1,327 +1,0 @@
-/* struct linger zu ein- ausschalten von Lingering */
-
-/*
- *  Missing:
- *      Can't handle multiple clients
- *      UDP support
- *      Client can't choose audio file
- *      unbind/unconnect on signals
- *      change send and receiver buffers for TCP/IP
- */
-
-#include "mppdec.h"
-
-#ifndef _WIN32
-# include <arpa/inet.h>
-# include <netdb.h>      /* gethostbyaddr()              */
-# include <netinet/tcp.h>
-#endif
-
-
-#ifndef _WIN32
-# include <signal.h>
-#endif
-
-
-#define PORT        1088                        /* port of server */
-#ifdef _WIN32
-# define FILENAME    "D:\\Archive\\1.mpc"       /* default file   */
-#else
-# define FILENAME    "/Archive/1.mpc"           /* default file   */
-#endif
-#define BUFFERSIZE  (40 * 1452)
-#define TIME_OUT    300
-
-
-#undef REPORT
-#ifdef VERBOSE
-# define REPORT(x)      (x)
-#else
-# define REPORT(x)
-#endif
-
-
-#ifdef _WIN32
-
-static int
-InitWinSocket ( void )
-{
-    WORD     VersionRequested;
-    WSADATA  wsaData;
-    int      err;
-
-    VersionRequested = MAKEWORD (2, 2);
-
-    err = WSAStartup ( VersionRequested, &wsaData );
-    if ( err != 0 ) {                                     // Tell the user that we could not find a usable WinSock DLL
-        fprintf ( stderr, "Can't find WinSock DLL\n");
-        return -1;
-    }
-
-    // Confirm that the WinSock DLL supports 2.2.
-    // Note that if the DLL supports versions greater than 2.2 in addition to 2.2,
-    // it will still return 2.2 in Version since that is the version we requested.
-
-    if ( LOBYTE (wsaData.wVersion)  != 2  ||  HIBYTE (wsaData.wVersion) != 2 ) {
-        // Tell the user that we could not find a usable WinSock DLL.
-        fprintf ( stderr, "Wrong version of WinSock DLL: %d.%d\n", HIBYTE (wsaData.wVersion), LOBYTE (wsaData.wVersion) );
-        WSACleanup ();
-        return -1;
-    }
-    return 0;
-}
-
-#endif
-
-
-
-
-int rc, cs;
-
-static void
-handler ( int signalno )
-{
-    fprintf (stderr, "\nSignal %2d captured\a\n\n", signalno );
-    shutdown (cs, 2);
-    shutdown (rc, 2);
-    _exit (1);
-}
-
-
-int
-main ( int argc, char** argv )
-{
-    static char         okay []  = "HTTP/1.0 200 OK\r\nContent-Type: application/octet-stream\r\n\r\n";
-    char                timestring [sizeof("2000-00-00 00:00:00")];
-    int                 tries;     /* used for timeout (2 min.) */
-
-    int                 socket_fd; /* socket descriptor */
-#if 0
-    int                 cs;        /* new connection's socket descriptor */
-    int                 rc;        /* system calls return value storage */
-#endif
-    struct sockaddr_in  sa;        /* internet address struct */
-    struct sockaddr_in  csa;       /* client's address struct */
-    size_t              size_csa;  /* size of client's address struct */
-
-    struct hostent*     entry;     /* host entry */
-
-    time_t              epoch;
-    struct tm*          tm;
-
-    FILE*               fp;
-    const char*         file;
-    unsigned char       buff1 [BUFFERSIZE];
-    unsigned char       buff2 [1024];
-    ssize_t             bytes_read;
-    ssize_t             bytes_wrote;
-    Int64_t             total_bytes_written;
-    int                 state;
-
-#ifndef _WIN32
-    struct sigaction    act;
-    struct sigaction    oact;
-#endif
-
-    TIME_T              start;
-    TIME_T              end;
-    double              dur;
-
-    int                 opt;
-    size_t              len;
-
-#ifdef _WIN32
-    LINGER              ling;
-#else
-    struct linger       ling;
-#endif
-
-#ifdef _WIN32
-    static int          init = 0;
-
-    if ( init == 0  &&  InitWinSocket () != 0 )
-        return -1;
-    init = 1;
-#endif
-
-
-
-#ifndef _WIN32
-    act.sa_handler = handler;
-    if ( 0 != sigaction (SIGPIPE, &act, &oact) ) {
-        fprintf ( stderr, "*** Fatal Error: Installation of SIGPIPE handler failed.\n");
-        return -1;
-    }
-    act.sa_handler = handler;
-    if ( 0 != sigaction (SIGINT, &act, &oact) ) {
-        fprintf ( stderr, "*** Fatal Error: Installation of SIGINT handler failed.\n");
-        return -1;
-    }
-#endif
-
-    switch ( argc ) {
-    case 1:
-        file = FILENAME;
-        break;
-    case 2:
-        file = argv[1];
-        break;
-    default:
-        fprintf ( stderr, "usage: %s [filename]\n", argv[0] );
-        return 1;
-    }
-
-    setvbuf ( stdout, NULL, _IONBF, 0 );
-    setvbuf ( stderr, NULL, _IONBF, 0 );
-
-    /* initiate machine's internet address structure */
-
-    memset ( &sa, 0, sizeof (sa) );     /* first clear out the struct, to avoid garbage */
-    sa.sin_family      = AF_INET;       /* using internet address family */
-    sa.sin_port        = htons (PORT);  /* copy port number in network byte order */
-    sa.sin_addr.s_addr = INADDR_ANY;    /* we will accept connections coming through any IP address that belongs to our host, using the INADDR_ANY wild-card */
-
-    /* allocate a free socket, internet address family, stream socket */
-    tries = 120;
-    while ( (socket_fd = socket (AF_INET, SOCK_STREAM, 0)) < 0 ) {
-        perror ("socket: allocation failed");
-        sleep (1);
-        if (--tries <= 0)
-            return -1;
-    }
-
-    opt = 1;
-    if (setsockopt ( socket_fd, IPPROTO_TCP, TCP_NODELAY, (const char*)&opt, sizeof(opt) ) != 0 ) {
-        perror ("setsockopt NODELAY");
-    }
-
-    opt = 1;
-    if (setsockopt ( socket_fd, SOL_SOCKET, SO_REUSEADDR, (const char*)&opt, sizeof(opt) ) != 0 ) {
-        perror ("setsockopt REUSE");
-    }
-#if 0
-    ling.l_onoff  = 1;
-    ling.l_linger = 1;
-
-    if (setsockopt ( socket_fd, SOL_SOCKET, SO_LINGER, (const char*)&ling, sizeof(ling) ) != 0 ) {
-        perror ("setsockopt LINGER");
-    }
-#endif
-    opt = 1;
-    if (setsockopt ( socket_fd, SOL_SOCKET, SO_KEEPALIVE, (const char*)&opt, sizeof(opt) ) != 0 ) {
-        perror ("setsockopt KEEP");
-    }
-
-    /* bind the socket to the newly formed address */
-    tries = 3600;
-    while ( (rc = bind (socket_fd, (struct sockaddr*)&sa, sizeof (sa))) != 0 ) {
-        perror ("bind");
-        sleep (1);
-        if (--tries <= 0)
-            return -1;
-    }
-
-    /*
-     *  ask the system to listen for incoming connections to the address we just bound. specify that up to 5 pending connection
-     *  requests will be queued by the system, if we are not directly awaiting them using the accept() system call, when they arrive.
-     */
-
-    tries = 120;
-    while ( (rc = listen (socket_fd, 5)) != 0 ) {
-        perror ("listen");
-        sleep (1);
-        if (--tries <= 0)
-            return -1;
-    }
-
-    /* remember size for later usage */
-    size_csa = sizeof (csa);
-
-    printf ( "Serving file '%s' at port %d.\n", file, PORT );
-    printf ( "Server running.\n\n");
-
-    while ( 1 ) {
-        /*
-         * the accept() system call will wait for a connection, and when one is established, a new socket will be created to form
-         * it, and the csa variable will hold the address of the client that just connected to us. the old socket, s, will still
-         * be available for future accept() statements.
-         */
-        /* check for errors -- if any, enter accept mode again */
-        if ( (cs = accept (socket_fd, (struct sockaddr*)&csa, &size_csa)) < 0 ) {
-            continue;
-        }
-
-#if 1
-        len = READ_SOCKET (cs, buff2, sizeof(buff2) );
-        write (2, "-------------------------------------------------------------------------------\n", 80 );
-        write (2, buff2, len );
-        write (2, "-------------------------------------------------------------------------------\n", 80 );
-#endif
-
-        TIME ( start );
-
-        /* ok, we got a new connection. do the job ...  */
-        time ( &epoch );            /* time since 1970  */
-        tm = localtime ( &epoch );  /* fill time-struct */
-        snprintf ( timestring, sizeof (timestring), "%04d-%02d-%02d %02d:%02d:%02d",
-                   tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
-                   tm->tm_hour,        tm->tm_min,     tm->tm_sec );
-
-        /* log connection */
-        printf ( "%s Connection from %s ", timestring, inet_ntoa ( /*(struct in_addr)*/ csa.sin_addr ) );
-
-        /* get the host entry */
-        if ( NULL == ( entry = gethostbyaddr ( (char*)&csa.sin_addr, sizeof (csa.sin_addr), AF_INET ) ) ) {
-#ifdef __linux__
-            herror ("gethostbyaddr"          );
-#else
-            printf ("(no host address info).");
-#endif
-        } else {
-            printf ( "(%s) ... ", entry->h_name );
-        }
-
-        WRITE_SOCKET ( cs, okay, sizeof (okay)-1 );
-
-        /* service connection */
-        total_bytes_written = 0;
-
-        if ( ( fp = fopen (file, "rb") ) == NULL ) {
-            fprintf (stderr, "*** Fatal Error: Could not open file %s.\n", file);
-        }
-        else {
-            do {
-                state      = 0;
-                bytes_read = fread (buff1, 1, sizeof (buff1), fp);
-
-                if ( bytes_read > 0 ) {
-                    total_bytes_written += bytes_wrote = WRITE_SOCKET (cs, buff1, (size_t)bytes_read );
-                    REPORT (fprintf (stderr, " %s: %lld bytes sent.\r", inet_ntoa ((struct in_addr)csa.sin_addr), total_bytes_written));
-                    if (bytes_wrote == bytes_read) {
-                        state = 1;
-                    } else {
-                        REPORT (fprintf (stderr, " Connection closed by foreign host (%d out of %d written).\n", bytes_wrote, bytes_read ));
-                    }
-                }
-
-            } while ( state );
-
-            fclose (fp);
-        }
-
-        /* now close the connection */
-        shutdown (cs, 0);
-        while ( READ_SOCKET (cs, buff2, sizeof(buff2)) > 0 )
-            ;
-        close (cs);
-        TIME ( end );
-
-        dur = DTIME (start, end);
-
-        printf ("\b\b\b\b\b, done. (%ld KBytes sent in %.2f sec = %.2f KB/s)\a\n", (long)(total_bytes_written >> 10), dur, total_bytes_written / dur * 1.e-3 );
-    }
-
-    return 0;
-}
-
-/* end of streamserver.c */
Index: penc/branches/zorg/streamserver.dsp
===================================================================
--- /mppenc/branches/zorg/streamserver.dsp	(revision 40)
+++ 	(revision )
@@ -1,102 +1,0 @@
-# Microsoft Developer Studio Project File - Name="streamserver" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=streamserver - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "streamserver.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "streamserver.mak" CFG="streamserver - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "streamserver - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "streamserver - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "streamserver - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MPP_ENCODER" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "streamserver - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MPP_ENCODER" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "streamserver - Win32 Release"
-# Name "streamserver - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\streamserver.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
Index: penc/branches/zorg/streamserver.vcproj
===================================================================
--- /mppenc/branches/zorg/streamserver.vcproj	(revision 40)
+++ 	(revision )
@@ -1,168 +1,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="streamserver"
-	SccProjectName=""
-	SccLocalPath="">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\Release"
-			IntermediateDirectory=".\Release"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;MPP_ENCODER"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Release/streamserver.pch"
-				AssemblerListingLocation=".\Release/"
-				ObjectFile=".\Release/"
-				ProgramDataBaseFileName=".\Release/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="odbc32.lib odbccp32.lib ws2_32.lib"
-				OutputFile=".\Release/streamserver.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				ProgramDatabaseFile=".\Release/streamserver.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Release/streamserver.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\Debug"
-			IntermediateDirectory=".\Debug"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;MPP_ENCODER"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Debug/streamserver.pch"
-				AssemblerListingLocation=".\Debug/"
-				ObjectFile=".\Debug/"
-				ProgramDataBaseFileName=".\Debug/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="odbc32.lib odbccp32.lib ws2_32.lib"
-				OutputFile=".\Debug/streamserver.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile=".\Debug/streamserver.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Debug/streamserver.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
-			<File
-				RelativePath="streamserver.c">
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: penc/branches/zorg/synth.c
===================================================================
--- /mppenc/branches/zorg/synth.c	(revision 40)
+++ 	(revision )
@@ -1,1004 +1,0 @@
-/*
- * Musepack audio compression
- * Copyright (C) 1999-2004 Buschmann/Klemm/Piecha/Wolf
- *
- * 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.1 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
- */
-
-/*
- *  PCM Synthesis (quantized subband samples => PCM output)
- *  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *  - synth.c/synth.h
- *      portable synthesis routines
- *      nonportable synthesis routines using subroutines in synth_asm.nas
- *
- *  - synth_tab.c/synth_tab.h
- *      2 tables for synthesis routines in C
- *
- *  - synth_asm.nas/synth.h
- *      special subroutines for AMD's 3DNow! and Intel's SIMD
- *      2 more tables for synthesis routines (reordered tables from synth_tab.c)
- *
- *  Note: To fully understand this module you must understand the math behind
- *  subband analysis and subband synthesis.
- */
-
-#include <string.h>
-#include "mppdec.h"
-
-
-#ifdef HAVE_IEEE754_FLOAT
-# define ROUND32(x)   ( floattmp = (x) + (Int32_t)0x00FD8000L, *(Int32_t*)(&floattmp) - (Int32_t)0x4B7D8000L )
-#else
-# define ROUND32(x)   ( (Int32_t) floor ((x) + 0.5) )
-#endif
-
-#ifdef HAVE_IEEE754_DOUBLE
-# define ROUND64(x)   ( doubletmp = (x) + Dither.Add + (Int64_t)0x001FFFFD80000000L, *(Int64_t*)(&doubletmp) - (Int64_t)0x433FFFFD80000000L )
-#else
-# define ROUND64(x)   ( (Int64_t) floor ((x) + Dither.Add) )
-#endif
-
-
-static dither_t  Dither;
-
-#if !defined USE_ASM  ||  defined MAKE_16BIT  ||  defined MAKE_24BIT  ||  defined MAKE_32BIT
-
-static void
-Calculate_New_V ( register const Float* Sample, register Float* V )
-{
-    // Calculating of new V-buffer values for left channel (see ISO-11172-3, p. 39)
-    // based on an algorithm by Byeong Gi Lee
-
-    register const Float*  C = Cos64;
-    Float         A00, A01, A02, A03, A04, A05, A06, A07, A08, A09, A10, A11, A12, A13, A14, A15;
-    Float         B00, B01, B02, B03, B04, B05, B06, B07, B08, B09, B10, B11, B12, B13, B14, B15;
-    Float         tmp;
-    Float         tmp2;
-    Uint32_t      togg;
-
-    ENTER(163);
-
-    V += 32;
-
-    A00 = Sample[ 0] + Sample[31];
-    A01 = Sample[ 1] + Sample[30];
-    A02 = Sample[ 3] + Sample[28];
-    A03 = Sample[ 2] + Sample[29];
-    A04 = Sample[ 7] + Sample[24];
-    A05 = Sample[ 6] + Sample[25];
-    A06 = Sample[ 4] + Sample[27];
-    A07 = Sample[ 5] + Sample[26];
-    A08 = Sample[15] + Sample[16];
-    A09 = Sample[14] + Sample[17];
-    A10 = Sample[12] + Sample[19];
-    A11 = Sample[13] + Sample[18];
-    A12 = Sample[ 8] + Sample[23];
-    A13 = Sample[ 9] + Sample[22];
-    A14 = Sample[11] + Sample[20];
-    A15 = Sample[10] + Sample[21];
-
-    B00 =  A00 + A08;
-    B01 =  A01 + A09;
-    B02 =  A02 + A10;
-    B03 =  A03 + A11;
-    B04 =  A04 + A12;
-    B05 =  A05 + A13;
-    B06 =  A06 + A14;
-    B07 =  A07 + A15;
-    B08 = (A00 - A08) * C[ 2];
-    B09 = (A01 - A09) * C[ 6];
-    B10 = (A02 - A10) * C[14];
-    B11 = (A03 - A11) * C[10];
-    B12 = (A04 - A12) * C[30];
-    B13 = (A05 - A13) * C[26];
-    B14 = (A06 - A14) * C[18];
-    B15 = (A07 - A15) * C[22];
-
-    A00 =  B00 + B04;
-    A01 =  B01 + B05;
-    A02 =  B02 + B06;
-    A03 =  B03 + B07;
-    A04 = (B00 - B04) * C[ 4];
-    A05 = (B01 - B05) * C[12];
-    A06 = (B02 - B06) * C[28];
-    A07 = (B03 - B07) * C[20];
-    A08 =  B08 + B12;
-    A09 =  B09 + B13;
-    A10 =  B10 + B14;
-    A11 =  B11 + B15;
-    A12 = (B08 - B12) * C[ 4];
-    A13 = (B09 - B13) * C[12];
-    A14 = (B10 - B14) * C[28];
-    A15 = (B11 - B15) * C[20];
-
-    B00 =  A00 + A02;
-    B01 =  A01 + A03;
-    B02 = (A00 - A02) * C[ 8];
-    B03 = (A01 - A03) * C[24];
-    B04 =  A04 + A06;
-    B05 =  A05 + A07;
-    B06 = (A04 - A06) * C[ 8];
-    B07 = (A05 - A07) * C[24];
-    B08 =  A08 + A10;
-    B09 =  A09 + A11;
-    B10 = (A08 - A10) * C[ 8];
-    B11 = (A09 - A11) * C[24];
-    B12 =  A12 + A14;
-    B13 =  A13 + A15;
-    B14 = (A12 - A14) * C[ 8];
-    B15 = (A13 - A15) * C[24];
-
-    A00 =  B00 + B01;
-    A01 = (B00 - B01) * C[16];
-    A02 =  B02 + B03;
-    A03 = (B02 - B03) * C[16];
-    A04 =  B04 + B05;
-    A05 = (B04 - B05) * C[16];
-    A06 =  B06 + B07;
-    A07 = (B06 - B07) * C[16];
-    A08 =  B08 + B09;
-    A09 = (B08 - B09) * C[16];
-    A10 =  B10 + B11;
-    A11 = (B10 - B11) * C[16];
-    A12 =  B12 + B13;
-    A13 = (B12 - B13) * C[16];
-    A14 =  B14 + B15;
-    A15 = (B14 - B15) * C[16];
-
-    V[48-32] = -A00;
-    V[ 0-32] =  A01;
-    V[40-32] = -A02 - (V[ 8-32] = A03);
-
-    V[36-32] = -((V[ 4-32] = A05 + (V[12-32] = A07)) + A06);
-    V[44-32] = - A04 - A06 - A07;
-
-    V[ 6-32] = (V[10-32] = A11 + (V[14-32] = A15)) + A13;
-    V[38-32] = (V[34-32] = -(V[ 2-32] = A09 + A13 + A15) - A14) + A09 - A10 - A11;
-    V[46-32] = (tmp = -(A12 + A14 + A15)) - A08;
-    V[42-32] = tmp - A10 - A11;
-
-    A00 = (Sample[ 0] - Sample[31]) * C[ 1];
-    A01 = (Sample[ 1] - Sample[30]) * C[ 3];
-    A02 = (Sample[ 3] - Sample[28]) * C[ 7];
-    A03 = (Sample[ 2] - Sample[29]) * C[ 5];
-    A04 = (Sample[ 7] - Sample[24]) * C[15];
-    A05 = (Sample[ 6] - Sample[25]) * C[13];
-    A06 = (Sample[ 4] - Sample[27]) * C[ 9];
-    A07 = (Sample[ 5] - Sample[26]) * C[11];
-    A08 = (Sample[15] - Sample[16]) * C[31];
-    A09 = (Sample[14] - Sample[17]) * C[29];
-    A10 = (Sample[12] - Sample[19]) * C[25];
-    A11 = (Sample[13] - Sample[18]) * C[27];
-    A12 = (Sample[ 8] - Sample[23]) * C[17];
-    A13 = (Sample[ 9] - Sample[22]) * C[19];
-    A14 = (Sample[11] - Sample[20]) * C[23];
-    A15 = (Sample[10] - Sample[21]) * C[21];
-
-    B00 =  A00 + A08;
-    B01 =  A01 + A09;
-    B02 =  A02 + A10;
-    B03 =  A03 + A11;
-    B04 =  A04 + A12;
-    B05 =  A05 + A13;
-    B06 =  A06 + A14;
-    B07 =  A07 + A15;
-    B08 = (A00 - A08) * C[ 2];
-    B09 = (A01 - A09) * C[ 6];
-    B10 = (A02 - A10) * C[14];
-    B11 = (A03 - A11) * C[10];
-    B12 = (A04 - A12) * C[30];
-    B13 = (A05 - A13) * C[26];
-    B14 = (A06 - A14) * C[18];
-    B15 = (A07 - A15) * C[22];
-
-    A00 =  B00 + B04;
-    A01 =  B01 + B05;
-    A02 =  B02 + B06;
-    A03 =  B03 + B07;
-    A04 = (B00 - B04) * C[ 4];
-    A05 = (B01 - B05) * C[12];
-    A06 = (B02 - B06) * C[28];
-    A07 = (B03 - B07) * C[20];
-    A08 =  B08 + B12;
-    A09 =  B09 + B13;
-    A10 =  B10 + B14;
-    A11 =  B11 + B15;
-    A12 = (B08 - B12) * C[ 4];
-    A13 = (B09 - B13) * C[12];
-    A14 = (B10 - B14) * C[28];
-    A15 = (B11 - B15) * C[20];
-
-    B00 =  A00 + A02;
-    B01 =  A01 + A03;
-    B02 = (A00 - A02) * C[ 8];
-    B03 = (A01 - A03) * C[24];
-    B04 =  A04 + A06;
-    B05 =  A05 + A07;
-    B06 = (A04 - A06) * C[ 8];
-    B07 = (A05 - A07) * C[24];
-    B08 =  A08 + A10;
-    B09 =  A09 + A11;
-    B10 = (A08 - A10) * C[ 8];
-    B11 = (A09 - A11) * C[24];
-    B12 =  A12 + A14;
-    B13 =  A13 + A15;
-    B14 = (A12 - A14) * C[ 8];
-    B15 = (A13 - A15) * C[24];
-
-    A00 =  B00 + B01;
-    A01 = (B00 - B01) * C[16];
-    A02 =  B02 + B03;
-    A03 = (B02 - B03) * C[16];
-    A04 =  B04 + B05;
-    A05 = (B04 - B05) * C[16];
-    A06 =  B06 + B07;
-    A07 = (B06 - B07) * C[16];
-    A08 =  B08 + B09;
-    A09 = (B08 - B09) * C[16];
-    A10 =  B10 + B11;
-    A11 = (B10 - B11) * C[16];
-    A12 =  B12 + B13;
-    A13 = (B12 - B13) * C[16];
-    A14 =  B14 + B15;
-    A15 = (B14 - B15) * C[16];
-
-    V[ 5-32] = (V[11-32] = (V[13-32] = A07 + (V[15-32] = A15)) + A11) + A05 + A13;
-    V[ 7-32] = (V[ 9-32] = A03 + A11 + A15) + A13;
-    V[33-32] = -(V[ 1-32] = A01 + (tmp = A09 + A13 + A15)) - A14;
-    V[35-32] = -(V[ 3-32] = A05 + A07 + tmp) - A06 - A14;
-
-    V[37-32] = (tmp = -(A10 + A11 + A13 + A14 + A15)) - A05 - A06 - A07;
-    V[39-32] = tmp - A02 - A03;
-    V[41-32] = (tmp += A13 - A12) - A02 - A03;
-    V[43-32] = tmp - (tmp2 = A04 + A06 + A07);
-
-    V[47-32] = (tmp = -(A08 + A12 + A14 + A15)) - A00;
-    V[45-32] = tmp - tmp2;
-
-#if 1  &&  (SIZEOF_Float == 4)
-    // a little improvement in speed is possible if both values directly stored by the code above
-    // this would make this code unnecessary, but enlarges code above.
-    togg = (Uint32_t)0x80000000L;
-    ((Uint32_t*)V)[32-32] = togg + ((Uint32_t*)V)[ 0-32];
-    ((Uint32_t*)V)[31-32] = togg + ((Uint32_t*)V)[ 1-32];
-    ((Uint32_t*)V)[30-32] = togg + ((Uint32_t*)V)[ 2-32];
-    ((Uint32_t*)V)[29-32] = togg + ((Uint32_t*)V)[ 3-32];
-    ((Uint32_t*)V)[28-32] = togg + ((Uint32_t*)V)[ 4-32];
-    ((Uint32_t*)V)[27-32] = togg + ((Uint32_t*)V)[ 5-32];
-    ((Uint32_t*)V)[26-32] = togg + ((Uint32_t*)V)[ 6-32];
-    ((Uint32_t*)V)[25-32] = togg + ((Uint32_t*)V)[ 7-32];
-    ((Uint32_t*)V)[24-32] = togg + ((Uint32_t*)V)[ 8-32];
-    ((Uint32_t*)V)[23-32] = togg + ((Uint32_t*)V)[ 9-32];
-    ((Uint32_t*)V)[22-32] = togg + ((Uint32_t*)V)[10-32];
-    ((Uint32_t*)V)[21-32] = togg + ((Uint32_t*)V)[11-32];
-    ((Uint32_t*)V)[20-32] = togg + ((Uint32_t*)V)[12-32];
-    ((Uint32_t*)V)[19-32] = togg + ((Uint32_t*)V)[13-32];
-    ((Uint32_t*)V)[18-32] = togg + ((Uint32_t*)V)[14-32];
-    ((Uint32_t*)V)[17-32] = togg + ((Uint32_t*)V)[15-32];
-
-    ((Uint32_t*)V)[63-32] = ((Uint32_t*)V)[33-32];
-    ((Uint32_t*)V)[62-32] = ((Uint32_t*)V)[34-32];
-    ((Uint32_t*)V)[61-32] = ((Uint32_t*)V)[35-32];
-    ((Uint32_t*)V)[60-32] = ((Uint32_t*)V)[36-32];
-    ((Uint32_t*)V)[59-32] = ((Uint32_t*)V)[37-32];
-    ((Uint32_t*)V)[58-32] = ((Uint32_t*)V)[38-32];
-    ((Uint32_t*)V)[57-32] = ((Uint32_t*)V)[39-32];
-    ((Uint32_t*)V)[56-32] = ((Uint32_t*)V)[40-32];
-    ((Uint32_t*)V)[55-32] = ((Uint32_t*)V)[41-32];
-    ((Uint32_t*)V)[54-32] = ((Uint32_t*)V)[42-32];
-    ((Uint32_t*)V)[53-32] = ((Uint32_t*)V)[43-32];
-    ((Uint32_t*)V)[52-32] = ((Uint32_t*)V)[44-32];
-    ((Uint32_t*)V)[51-32] = ((Uint32_t*)V)[45-32];
-    ((Uint32_t*)V)[50-32] = ((Uint32_t*)V)[46-32];
-    ((Uint32_t*)V)[49-32] = ((Uint32_t*)V)[47-32];
-#else
-    V[32-32] = -V[ 0-32];
-    V[31-32] = -V[ 1-32];
-    V[30-32] = -V[ 2-32];
-    V[29-32] = -V[ 3-32];
-    V[28-32] = -V[ 4-32];
-    V[27-32] = -V[ 5-32];
-    V[26-32] = -V[ 6-32];
-    V[25-32] = -V[ 7-32];
-    V[24-32] = -V[ 8-32];
-    V[23-32] = -V[ 9-32];
-    V[22-32] = -V[10-32];
-    V[21-32] = -V[11-32];
-    V[20-32] = -V[12-32];
-    V[19-32] = -V[13-32];
-    V[18-32] = -V[14-32];
-    V[17-32] = -V[15-32];
-
-    V[63-32] =  V[33-32];
-    V[62-32] =  V[34-32];
-    V[61-32] =  V[35-32];
-    V[60-32] =  V[36-32];
-    V[59-32] =  V[37-32];
-    V[58-32] =  V[38-32];
-    V[57-32] =  V[39-32];
-    V[56-32] =  V[40-32];
-    V[55-32] =  V[41-32];
-    V[54-32] =  V[42-32];
-    V[53-32] =  V[43-32];
-    V[52-32] =  V[44-32];
-    V[51-32] =  V[45-32];
-    V[50-32] =  V[46-32];
-    V[49-32] =  V[47-32];
-#endif
-    LEAVE(163);
-}
-
-#endif
-
-
-#if !defined USE_ASM  &&  !defined MAKE_16BIT  &&  !defined MAKE_24BIT  &&  !defined MAKE_32BIT
-
-
-void
-Synthese_Filter_16_C ( register Int2x16_t* Stream, Int* const offset, Float* Vi, const FloatArray* Yi )
-{
-    Int               n;
-    register Int      k;
-    register Int32_t  Sum;
-    const Float       (*D)[16];
-    const Float*      V;
-#ifdef HAVE_IEEE754_FLOAT
-    Float32_t         floattmp;
-#endif
-
-    ENTER(164);
-    for ( n = 0; n < 36; n++, Yi++ ) {
-        // shifting 64 indices upwards
-        if ( (*offset -= 64) < 0 ) {
-            *offset += 64*VIRT_SHIFT;
-            ENTER(170);
-            memmove ( Vi+64*VIRT_SHIFT, Vi, (16-1)*64*sizeof(*Vi) );
-            LEAVE(170);
-        }
-
-        Calculate_New_V ( *Yi, (Float*)(V = Vi + *offset) );
-
-        // vectoring & windowing & calculating PCM-Output
-        D = Di_opt;
-        for ( k = 0; k < 32; k++, V++, D++ ) {
-            Sum = ROUND32 ( V [  0] * D [0][ 0]
-                          + V [ 96] * D [0][ 1]
-                          + V [128] * D [0][ 2]
-                          + V [224] * D [0][ 3]
-                          + V [256] * D [0][ 4]
-                          + V [352] * D [0][ 5]
-                          + V [384] * D [0][ 6]
-                          + V [480] * D [0][ 7]
-                          + V [512] * D [0][ 8]
-                          + V [608] * D [0][ 9]
-                          + V [640] * D [0][10]
-                          + V [736] * D [0][11]
-                          + V [768] * D [0][12]
-                          + V [864] * D [0][13]
-                          + V [896] * D [0][14]
-                          + V [992] * D [0][15] );
-
-            // copy to PCM
-            if (Sum != (Int16_t)Sum ) {            // prevent from wrap around
-                Dither.Overdrives++;
-                if ( Sum > +Dither.MaxLevel ) Dither.MaxLevel = +Sum;
-                if ( Sum < -Dither.MaxLevel ) Dither.MaxLevel = -Sum;
-                Sum = (Sum >> 31) ^ 0x7FFF;
-            }
-
-            Stream [0] [0] = (Int16_t)Sum;
-            Stream++;
-        }
-    }
-    LEAVE(164);
-    return;
-}
-
-
-#endif
-
-
-#if defined USE_ASM  &&  !defined MAKE_16BIT  &&  !defined MAKE_24BIT  &&  !defined MAKE_32BIT
-
-static void
-Synthese_Filter_16_i387 ( Int2x16_t* Stream, Int* const offset, Float* Vi, const Float Yi[][32] )
-{
-    Int           n;
-    Int           k;
-    register Int32_t  Sum;
-    const Float*  V;
-    Int32_t       scratch [32+8];
-    Int32_t*      scratchptr = (Int32_t*) ALIGN ( scratch, 0x20 );
-
-    ENTER(171);
-    for ( n = 0; n < 36; n++, Yi++ ) {
-        // shifting 64 indices upwards
-        if ( (*offset -= 64) < 0 ) {
-            *offset += 64*VIRT_SHIFT;
-            ENTER(170);
-            memmove ( Vi+64*VIRT_SHIFT, Vi, (16-1)*64*sizeof(*Vi) );
-            LEAVE(170);
-        }
-
-        ENTER(172);
-        Calculate_New_V_i387 ( *Yi, (Float*)(V = Vi + *offset) );
-        LEAVE(172);
-
-        // vectoring & windowing & calculating PCM-Output
-        VectorMult_i387 ( scratchptr, V );
-        for ( k = 0; k < 32; k++ ) {
-            Sum = scratchptr[k] - (Int32_t)0x4B7D8000L;
-            if (Sum != (Int16_t)Sum ) {            // prevent from wrap-around
-                Dither.Overdrives++;
-                if ( Sum > +Dither.MaxLevel ) Dither.MaxLevel = +Sum;
-                if ( Sum < -Dither.MaxLevel ) Dither.MaxLevel = -Sum;
-                Sum = (Sum >> 31) ^ 0x7FFF;
-            }
-
-            Stream [0] [0] = (Int16_t) Sum;
-            Stream++;
-        }
-    }
-
-    LEAVE(171);
-    return;
-}
-
-
-static void
-Synthese_Filter_16_3DNow ( Int2x16_t* Stream, Int* const offset, Float* Vi, const Float Yi[][32] )
-{
-    Int           n;
-    Int           k;
-    const Float*  V;
-    Int32_t       scratch [32+8];
-    Int32_t*      scratchptr = (Int32_t*) ALIGN ( scratch, 0x20 );
-
-    ENTER(171);
-    for ( n = 0; n < 36; n++, Yi++ ) {
-        // shifting 64 indices upwards
-        if ( (*offset -= 64) < 0 ) {
-            *offset += 64*VIRT_SHIFT;
-            ENTER(170);
-            memcpy_dn_MMX ( Vi+64*VIRT_SHIFT, Vi, (16-1)*sizeof(*Vi) );
-            //memmove ( Vi+64*VIRT_SHIFT, Vi, (16-1)*64*sizeof(*Vi) );
-            LEAVE(170);
-        }
-
-        ENTER(172);
-        Calculate_New_V_3DNow ( *Yi, (Float*)(V = Vi + *offset) );
-        LEAVE(172);
-
-        // vectoring & windowing & calculating PCM-Output
-        VectorMult_3DNow ( scratchptr, V );
-        for ( k = 0; k < 32; k++ ) {
-            Stream [0] [0] = (Int16_t)(scratchptr[k] >> 16);  // access differently to make shifts obsolete ???
-            Stream++;
-        }
-    }
-    Reset_FPU_3DNow ();
-
-    LEAVE(171);
-    return;
-}
-
-
-static void
-Calculate_New_V_SIMD ( const Float* Sample, Float* V )
-{
-    // Calculating of new V-buffer values for left channel (see ISO-11172-3, p. 39)
-    // based on an algorithm by Byeong Gi Lee
-
-    Float     __A [32 + 8];
-    Float*    A = (Float*) ALIGN ( __A, 0x20 );
-    Float     tmp;
-    Float     tmp2;
-    Uint32_t  togg;
-
-    ENTER(163);
-
-    V += 32;
-
-    New_V_Helper2 ( A, Sample );
-
-    V[48-32] = -A[ 0];
-    V[ 0-32] =  A[ 1];
-    V[40-32] = -A[ 2] - (V[ 8-32] = A[ 3]);
-
-    V[36-32] = -((V[ 4-32] = A[ 5] + (V[12-32] = A[ 7])) + A[ 6]);
-    V[44-32] = - A[ 4] - A[ 6] - A[ 7];
-
-    V[ 6-32] = (V[10-32] = A[11] + (V[14-32] = A[15])) + A[13];
-    V[38-32] = (V[34-32] = -(V[ 2-32] = A[ 9] + A[13] + A[15]) - A[14]) + A[ 9] - A[10] - A[11];
-    V[46-32] = (tmp = -(A[12] + A[14] + A[15])) - A[ 8];
-    V[42-32] = tmp - A[10] - A[11];
-
-    New_V_Helper3 ( A, Sample );
-
-    V[ 5-32] = (V[11-32] = (V[13-32] = A[ 7] + (V[15-32] = A[15])) + A[11]) + A[ 5] + A[13];
-    V[ 7-32] = (V[ 9-32] = A[ 3] + A[11] + A[15]) + A[13];
-    V[33-32] = -(V[ 1-32] = A[ 1] + (tmp = A[ 9] + A[13] + A[15])) - A[14];
-    V[35-32] = -(V[ 3-32] = A[ 5] + A[ 7] + tmp) - A[ 6] - A[14];
-
-    V[37-32] = (tmp = -(A[10] + A[11] + A[13] + A[14] + A[15])) - A[ 5] - A[ 6] - A[ 7];
-    V[39-32] = tmp - A[ 2] - A[ 3];
-    V[41-32] = (tmp += A[13] - A[12]) - A[ 2] - A[ 3];
-    V[43-32] = tmp - (tmp2 = A[ 4] + A[ 6] + A[ 7]);
-
-    V[47-32] = (tmp = -(A[ 8] + A[12] + A[14] + A[15])) - A[ 0];
-    V[45-32] = tmp - tmp2;
-
-#if 0
-    New_V_Helper4 ( V );                                            // slower
-#elif 1
-    // a little improvement in speed is possible if both values directly stored by the code above
-    // this would make this code unnecessary, but enlarges code above.
-    togg = (Uint32_t)0x80000000L;
-    ((Uint32_t*)V)[32-32] = togg + ((Uint32_t*)V)[ 0-32];
-    ((Uint32_t*)V)[31-32] = togg + ((Uint32_t*)V)[ 1-32];
-    ((Uint32_t*)V)[30-32] = togg + ((Uint32_t*)V)[ 2-32];
-    ((Uint32_t*)V)[29-32] = togg + ((Uint32_t*)V)[ 3-32];
-    ((Uint32_t*)V)[28-32] = togg + ((Uint32_t*)V)[ 4-32];
-    ((Uint32_t*)V)[27-32] = togg + ((Uint32_t*)V)[ 5-32];
-    ((Uint32_t*)V)[26-32] = togg + ((Uint32_t*)V)[ 6-32];
-    ((Uint32_t*)V)[25-32] = togg + ((Uint32_t*)V)[ 7-32];
-    ((Uint32_t*)V)[24-32] = togg + ((Uint32_t*)V)[ 8-32];
-    ((Uint32_t*)V)[23-32] = togg + ((Uint32_t*)V)[ 9-32];
-    ((Uint32_t*)V)[22-32] = togg + ((Uint32_t*)V)[10-32];
-    ((Uint32_t*)V)[21-32] = togg + ((Uint32_t*)V)[11-32];
-    ((Uint32_t*)V)[20-32] = togg + ((Uint32_t*)V)[12-32];
-    ((Uint32_t*)V)[19-32] = togg + ((Uint32_t*)V)[13-32];
-    ((Uint32_t*)V)[18-32] = togg + ((Uint32_t*)V)[14-32];
-    ((Uint32_t*)V)[17-32] = togg + ((Uint32_t*)V)[15-32];
-
-    ((Uint32_t*)V)[63-32] = ((Uint32_t*)V)[33-32];
-    ((Uint32_t*)V)[62-32] = ((Uint32_t*)V)[34-32];
-    ((Uint32_t*)V)[61-32] = ((Uint32_t*)V)[35-32];
-    ((Uint32_t*)V)[60-32] = ((Uint32_t*)V)[36-32];
-    ((Uint32_t*)V)[59-32] = ((Uint32_t*)V)[37-32];
-    ((Uint32_t*)V)[58-32] = ((Uint32_t*)V)[38-32];
-    ((Uint32_t*)V)[57-32] = ((Uint32_t*)V)[39-32];
-    ((Uint32_t*)V)[56-32] = ((Uint32_t*)V)[40-32];
-    ((Uint32_t*)V)[55-32] = ((Uint32_t*)V)[41-32];
-    ((Uint32_t*)V)[54-32] = ((Uint32_t*)V)[42-32];
-    ((Uint32_t*)V)[53-32] = ((Uint32_t*)V)[43-32];
-    ((Uint32_t*)V)[52-32] = ((Uint32_t*)V)[44-32];
-    ((Uint32_t*)V)[51-32] = ((Uint32_t*)V)[45-32];
-    ((Uint32_t*)V)[50-32] = ((Uint32_t*)V)[46-32];
-    ((Uint32_t*)V)[49-32] = ((Uint32_t*)V)[47-32];
-#else
-    V[32-32] = -V[ 0-32];
-    V[31-32] = -V[ 1-32];
-    V[30-32] = -V[ 2-32];
-    V[29-32] = -V[ 3-32];
-    V[28-32] = -V[ 4-32];
-    V[27-32] = -V[ 5-32];
-    V[26-32] = -V[ 6-32];
-    V[25-32] = -V[ 7-32];
-    V[24-32] = -V[ 8-32];
-    V[23-32] = -V[ 9-32];
-    V[22-32] = -V[10-32];
-    V[21-32] = -V[11-32];
-    V[20-32] = -V[12-32];
-    V[19-32] = -V[13-32];
-    V[18-32] = -V[14-32];
-    V[17-32] = -V[15-32];
-
-    V[63-32] =  V[33-32];
-    V[62-32] =  V[34-32];
-    V[61-32] =  V[35-32];
-    V[60-32] =  V[36-32];
-    V[59-32] =  V[37-32];
-    V[58-32] =  V[38-32];
-    V[57-32] =  V[39-32];
-    V[56-32] =  V[40-32];
-    V[55-32] =  V[41-32];
-    V[54-32] =  V[42-32];
-    V[53-32] =  V[43-32];
-    V[52-32] =  V[44-32];
-    V[51-32] =  V[45-32];
-    V[50-32] =  V[46-32];
-    V[49-32] =  V[47-32];
-#endif
-    LEAVE(163);
-}
-
-
-static void
-Synthese_Filter_16_SIMD ( Int2x16_t* Stream, Int* const offset, Float* Vi, const Float Yi[][32] )
-{
-    Int           n;
-    Int           k;
-    Int32_t       Sum;
-    const Float*  V;
-    Int32_t       scratch [32+8];
-    Int32_t*      scratchptr = (Int32_t*) ALIGN ( scratch, 0x20 );
-
-    ENTER(241);
-    for ( n = 0; n < 36; n++, Yi++ ) {
-        // shifting 64 indices upwards
-        if ( (*offset -= 64) < 0 ) {
-            *offset += 64*VIRT_SHIFT;
-            ENTER(240);
-#if 0
-            memcpy_dn_SIMD ( Vi+64*VIRT_SHIFT, Vi, (16-1)*sizeof(*Vi)/2 );  // is slower!!!
-#else
-            memcpy_dn_MMX ( Vi+64*VIRT_SHIFT, Vi, (16-1)*sizeof(*Vi) );
-            Reset_FPU ();
-#endif
-            LEAVE(240);
-        }
-
-        ENTER(242);
-        Calculate_New_V_SIMD ( *Yi, (Float*)(V = Vi + *offset) );
-        LEAVE(242);
-
-        // vectoring & windowing & calculating PCM-Output
-        VectorMult_SIMD ( scratchptr, V );
-        for ( k = 0; k < 32; k++ ) {
-            Sum = scratchptr [k] - (Int32_t)0x537D8000L;
-            if (Sum != (Int16_t)Sum ) {            // prevent from wrap around
-                Dither.Overdrives++;
-                if ( Sum > +Dither.MaxLevel ) Dither.MaxLevel = +Sum;
-                if ( Sum < -Dither.MaxLevel ) Dither.MaxLevel = -Sum;
-                Sum = (Sum >> 31) ^ 0x7FFF;
-            }
-
-            Stream [0] [0] = (Int16_t)Sum;
-            Stream++;
-        }
-    }
-
-    LEAVE(241);
-    return;
-}
-
-#pragma warning ( disable: 4550 )
-SyntheseFilter16_t
-Get_Synthese_Filter ( void )
-{
-#ifdef USE_ASM
-    if ( Has_3DNow () )
-        return Synthese_Filter_16_3DNow;
-    if ( Has_SIMD  () )
-        return Synthese_Filter_16_SIMD;
-    return Synthese_Filter_16_i387;
-#else
-    return Synthese_Filter_16_C;
-#endif
-}
-#pragma warning ( default: 4550 )
-
-
-#endif
-
-
-static const  Uchar    Parity [256] = {  // parity
-    0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,
-    1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,
-    1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,
-    0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,
-    1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,
-    0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,
-    0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,
-    1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0
-};
-
-static Uint32_t  __r1 = 1;
-static Uint32_t  __r2 = 1;
-
-
-/*
- *  This is a simple random number generator with good quality for audio purposes.
- *  It consists of two polycounters with opposite rotation direction and different
- *  periods. The periods are coprime, so the total period is the product of both.
- *
- *     -------------------------------------------------------------------------------------------------
- * +-> |31:30:29:28:27:26:25:24:23:22:21:20:19:18:17:16:15:14:13:12:11:10: 9: 8: 7: 6: 5: 4: 3: 2: 1: 0|
- * |   -------------------------------------------------------------------------------------------------
- * |                                                                             |  |  |  |     |     |
- * |                                                                             +--+--+-XOR----+-----+
- * |                                                                                      |
- * +--------------------------------------------------------------------------------------+
- *
- *     -------------------------------------------------------------------------------------------------
- *     |31:30:29:28:27:26:25:24:23:22:21:20:19:18:17:16:15:14:13:12:11:10: 9: 8: 7: 6: 5: 4: 3: 2: 1: 0| <-+
- *     -------------------------------------------------------------------------------------------------   |
- *       |  |           |  |                                                                               |
- *       +--+----XOR----+--+                                                                               |
- *                |                                                                                        |
- *                +----------------------------------------------------------------------------------------+
- *
- *
- *  The first has a period of 3*5*17*257*65537, the second of 7*47*73*178481,
- *  which gives a period of 18.410.713.077.675.721.215. The result is the
- *  XORed values of both generators.
- */
-
-static void
-set_seed ( Uint32_t  seed )
-{
-    __r1 = seed != 0 ? seed : 1;                // 0 is a forbidden value which locks the generator
-    __r2 = 1;                                   // the are several (8389119) forbidden codes. 1 is not one of them
-}
-
-
-Uint32_t
-random_int ( void )
-{
-#if 1
-    Uint32_t  t1, t2, t3, t4;
-
-    t3   = t1 = __r1;   t4   = t2 = __r2;       // Parity calculation is done via table lookup, this is also available
-    t1  &= 0xF5;        t2 >>= 25;              // on CPUs without parity, can be implemented in C and avoid unpredictable
-    t1   = Parity [t1]; t2  &= 0x63;            // jumps and slow rotate through the carry flag operations.
-    t1 <<= 31;          t2   = Parity [t2];
-
-    return (__r1 = (t3 >> 1) | t1 ) ^ (__r2 = (t4 + t4) | t2 );
-#else
-    return (__r1 = (__r1 >> 1) | ((Uint32_t)Parity [__r1 & 0xF5] << 31) ) ^
-           (__r2 = (__r2 << 1) |  (Uint32_t)Parity [(__r2 >> 25) & 0x63] );
-#endif
-}
-
-
-#if defined MAKE_16BIT  ||  defined MAKE_24BIT  ||  defined MAKE_32BIT
-
-/***********************************************************************************************************************/
-
-static Double
-Random_Equi ( Double mult )                     // gives an equally distributed random number
-{                                               // between -2^31*mult and +2^31*mult
-    return mult * (Int32_t) random_int ();
-}
-
-static Double
-Random_Triangular ( Double mult )               // gives a triangular-distributed random number
-{                                               // between -2^32*mult and +2^32*mult
-    return mult * ( (Double) (Int32_t) random_int () + (Double) (Int32_t) random_int () );
-}
-
-
-/*********************************************************************************************************************/
-
-static const Float  F44_0 [16 + 32] = {
-    (Float)0, (Float)0, (Float)0, (Float)0, (Float)0, (Float)0, (Float)0, (Float)0,
-    (Float)0, (Float)0, (Float)0, (Float)0, (Float)0, (Float)0, (Float)0, (Float)0,
-
-    (Float)0, (Float)0, (Float)0, (Float)0, (Float)0, (Float)0, (Float)0, (Float)0,
-    (Float)0, (Float)0, (Float)0, (Float)0, (Float)0, (Float)0, (Float)0, (Float)0,
-
-    (Float)0, (Float)0, (Float)0, (Float)0, (Float)0, (Float)0, (Float)0, (Float)0,
-    (Float)0, (Float)0, (Float)0, (Float)0, (Float)0, (Float)0, (Float)0, (Float)0
-};
-
-
-static const Float  F44_1 [16 + 32] = {  /* SNR(w) = 4.843163 dB, SNR = -3.192134 dB */
-    (Float) 0.85018292704024355931, (Float) 0.29089597350995344721, (Float)-0.05021866022121039450, (Float)-0.23545456294599161833,
-    (Float)-0.58362726442227032096, (Float)-0.67038978965193036429, (Float)-0.38566861572833459221, (Float)-0.15218663390367969967,
-    (Float)-0.02577543084864530676, (Float) 0.14119295297688728127, (Float) 0.22398848581628781612, (Float) 0.15401727203382084116,
-    (Float) 0.05216161232906000929, (Float)-0.00282237820999675451, (Float)-0.03042794608323867363, (Float)-0.03109780942998826024,
-
-    (Float) 0.85018292704024355931, (Float) 0.29089597350995344721, (Float)-0.05021866022121039450, (Float)-0.23545456294599161833,
-    (Float)-0.58362726442227032096, (Float)-0.67038978965193036429, (Float)-0.38566861572833459221, (Float)-0.15218663390367969967,
-    (Float)-0.02577543084864530676, (Float) 0.14119295297688728127, (Float) 0.22398848581628781612, (Float) 0.15401727203382084116,
-    (Float) 0.05216161232906000929, (Float)-0.00282237820999675451, (Float)-0.03042794608323867363, (Float)-0.03109780942998826024,
-
-    (Float) 0.85018292704024355931, (Float) 0.29089597350995344721, (Float)-0.05021866022121039450, (Float)-0.23545456294599161833,
-    (Float)-0.58362726442227032096, (Float)-0.67038978965193036429, (Float)-0.38566861572833459221, (Float)-0.15218663390367969967,
-    (Float)-0.02577543084864530676, (Float) 0.14119295297688728127, (Float) 0.22398848581628781612, (Float) 0.15401727203382084116,
-    (Float) 0.05216161232906000929, (Float)-0.00282237820999675451, (Float)-0.03042794608323867363, (Float)-0.03109780942998826024,
-};
-
-
-static const Float  F44_2 [16 + 32] = {  /* SNR(w) = 10.060213 dB, SNR = -12.766730 dB */
-    (Float) 1.78827593892108555290, (Float) 0.95508210637394326553, (Float)-0.18447626783899924429, (Float)-0.44198126506275016437,
-    (Float)-0.88404052492547413497, (Float)-1.42218907262407452967, (Float)-1.02037566838362314995, (Float)-0.34861755756425577264,
-    (Float)-0.11490230170431934434, (Float) 0.12498899339968611803, (Float) 0.38065885268563131927, (Float) 0.31883491321310506562,
-    (Float) 0.10486838686563442765, (Float)-0.03105361685110374845, (Float)-0.06450524884075370758, (Float)-0.02939198261121969816,
-
-    (Float) 1.78827593892108555290, (Float) 0.95508210637394326553, (Float)-0.18447626783899924429, (Float)-0.44198126506275016437,
-    (Float)-0.88404052492547413497, (Float)-1.42218907262407452967, (Float)-1.02037566838362314995, (Float)-0.34861755756425577264,
-    (Float)-0.11490230170431934434, (Float) 0.12498899339968611803, (Float) 0.38065885268563131927, (Float) 0.31883491321310506562,
-    (Float) 0.10486838686563442765, (Float)-0.03105361685110374845, (Float)-0.06450524884075370758, (Float)-0.02939198261121969816,
-
-    (Float) 1.78827593892108555290, (Float) 0.95508210637394326553, (Float)-0.18447626783899924429, (Float)-0.44198126506275016437,
-    (Float)-0.88404052492547413497, (Float)-1.42218907262407452967, (Float)-1.02037566838362314995, (Float)-0.34861755756425577264,
-    (Float)-0.11490230170431934434, (Float) 0.12498899339968611803, (Float) 0.38065885268563131927, (Float) 0.31883491321310506562,
-    (Float) 0.10486838686563442765, (Float)-0.03105361685110374845, (Float)-0.06450524884075370758, (Float)-0.02939198261121969816,
-};
-
-
-static const Float  F44_3 [16 + 32] = {  /* SNR(w) = 15.382598 dB, SNR = -29.402334 dB */
-    (Float) 2.89072132015058161445, (Float) 2.68932810943698754106, (Float) 0.21083359339410251227, (Float)-0.98385073324997617515,
-    (Float)-1.11047823227097316719, (Float)-2.18954076314139673147, (Float)-2.36498032881953056225, (Float)-0.95484132880101140785,
-    (Float)-0.23924057925542965158, (Float)-0.13865235703915925642, (Float) 0.43587843191057992846, (Float) 0.65903257226026665927,
-    (Float) 0.24361815372443152787, (Float)-0.00235974960154720097, (Float) 0.01844166574603346289, (Float) 0.01722945988740875099,
-
-    (Float) 2.89072132015058161445, (Float) 2.68932810943698754106, (Float) 0.21083359339410251227, (Float)-0.98385073324997617515,
-    (Float)-1.11047823227097316719, (Float)-2.18954076314139673147, (Float)-2.36498032881953056225, (Float)-0.95484132880101140785,
-    (Float)-0.23924057925542965158, (Float)-0.13865235703915925642, (Float) 0.43587843191057992846, (Float) 0.65903257226026665927,
-    (Float) 0.24361815372443152787, (Float)-0.00235974960154720097, (Float) 0.01844166574603346289, (Float) 0.01722945988740875099,
-
-    (Float) 2.89072132015058161445, (Float) 2.68932810943698754106, (Float) 0.21083359339410251227, (Float)-0.98385073324997617515,
-    (Float)-1.11047823227097316719, (Float)-2.18954076314139673147, (Float)-2.36498032881953056225, (Float)-0.95484132880101140785,
-    (Float)-0.23924057925542965158, (Float)-0.13865235703915925642, (Float) 0.43587843191057992846, (Float) 0.65903257226026665927,
-    (Float) 0.24361815372443152787, (Float)-0.00235974960154720097, (Float) 0.01844166574603346289, (Float) 0.01722945988740875099
-};
-
-
-static Double
-scalar16 ( const Float* x, const Float* y )
-{
-    return x[ 0]*y[ 0] + x[ 1]*y[ 1] + x[ 2]*y[ 2] + x[ 3]*y[ 3]
-         + x[ 4]*y[ 4] + x[ 5]*y[ 5] + x[ 6]*y[ 6] + x[ 7]*y[ 7]
-         + x[ 8]*y[ 8] + x[ 9]*y[ 9] + x[10]*y[10] + x[11]*y[11]
-         + x[12]*y[12] + x[13]*y[13] + x[14]*y[14] + x[15]*y[15];
-}
-
-
-void
-Init_Dither ( Int bits, int shapingtype, Double dither )
-{
-    static Uint8_t        default_dither [] = { 92, 92, 88, 84, 81, 78, 74, 67,  0,  0 };
-    static const Float*   F              [] = { F44_0, F44_1, F44_2, F44_3 };
-    int                   index;
-
-    if (bits > SAMPLE_SIZE)
-        bits = SAMPLE_SIZE;
-
-    if (shapingtype < 0) shapingtype = 0;
-    if (shapingtype > 3) shapingtype = 3;
-    index = bits - 11 - shapingtype;
-    if (index < 0) index = 0;
-    if (index > 9) index = 9;
-
-    memset ( Dither.ErrorHistory , 0, sizeof (Dither.ErrorHistory ) );
-    memset ( Dither.DitherHistory, 0, sizeof (Dither.DitherHistory) );
-
-    Dither.FilterCoeff = F [shapingtype];
-    Dither.Mask   = ((Uint64_t)-1) << (32 - bits);
-#ifdef HAVE_IEEE754_DOUBLE
-    Dither.Add    = 0.5     * ((1L << (32 - bits)) - 1);
-#else
-    Dither.Add    = 0.5     * ((1L << (32 - bits)) - 0);
-#endif
-    Dither.Dither = (dither >= 0.00 ? dither : 0.01*default_dither[index]) / (((Int64_t)1) << bits);
-    Dither.NoShaping = shapingtype == 0;
-}
-
-
-void
-Synthese_Filter_32_C ( register Int2x32_t* Stream, Int* const offset, Float* Vi, const FloatArray* Yi, Uint channel )
-{
-    Int               n;
-    register Int      k;
-    Double            Sum;
-    Double            Sum2;
-    Int64_t           val;
-    const Float       (*D)[16];
-    const Float*      V;
-#ifdef HAVE_IEEE754_DOUBLE
-    Float64_t         doubletmp;
-#endif
-
-    ENTER(167);
-    for ( n = 0; n < 36; n++, Yi++ ) {
-
-        // shifting upwards by 64 Indices
-        if ( (*offset -= 64) < 0 ) {
-            *offset += 64*VIRT_SHIFT;
-            ENTER(170);
-            memmove ( Vi+64*VIRT_SHIFT, Vi, (16-1)*64*sizeof(*Vi) );
-            LEAVE(170);
-        }
-
-        Calculate_New_V ( *Yi, (Float*)(V = Vi + *offset) );
-
-        // vectoring & windowing & calculating PCM-Output
-        D = Di_opt;
-        for ( k = 0; k < 32; k++, V++, D++ ) {
-            Sum = ( V [  0] * D [0][ 0]
-                  + V [ 96] * D [0][ 1]
-                  + V [128] * D [0][ 2]
-                  + V [224] * D [0][ 3]
-                  + V [256] * D [0][ 4]
-                  + V [352] * D [0][ 5]
-                  + V [384] * D [0][ 6]
-                  + V [480] * D [0][ 7]
-                  + V [512] * D [0][ 8]
-                  + V [608] * D [0][ 9]
-                  + V [640] * D [0][10]
-                  + V [736] * D [0][11]
-                  + V [768] * D [0][12]
-                  + V [864] * D [0][13]
-                  + V [896] * D [0][14]
-                  + V [992] * D [0][15] ) * 65536.;
-
-#if 1
-            // Noise shaping and dithering
-            if ( Dither.NoShaping ) {
-                Double  tmp = Random_Equi ( Dither.Dither );
-                Sum2 = tmp - Dither.LastRandomNumber [channel];
-                Dither.LastRandomNumber [channel] = tmp;
-                Sum2 = Sum += Sum2;
-            }
-            else {
-                Sum2  = Random_Triangular ( Dither.Dither ) - scalar16 ( Dither.DitherHistory[channel], Dither.FilterCoeff + k );
-                Sum  += Dither.DitherHistory [channel] [(-1-k)&15] = Sum2;
-                Sum2  = Sum + scalar16 ( Dither.ErrorHistory [channel], Dither.FilterCoeff + k );
-            }
-
-            val = ROUND64 (Sum2)  &  Dither.Mask;
-            if ( val != (Int32_t) val ) {
-                memset ( Dither.ErrorHistory [channel], 0, sizeof (Dither.ErrorHistory[0]) );
-                Dither.Overdrives++;
-                if ( val > +Dither.MaxLevel ) Dither.MaxLevel = +val;
-                if ( val < -Dither.MaxLevel ) Dither.MaxLevel = -val;
-                val = (val >> 63) ^ 0x7FFFFFFF;
-            } else {
-                Dither.ErrorHistory [channel] [(-1-k)&15] = (Float)(Sum - val);
-            }
-#else
-            // Noise shaping and dithering
-            Sum2  = Random ( Dither.Dither ) - scalar16 ( Dither.DitherHistory[channel], Dither.FilterCoeff );
-            memmove ( Dither.DitherHistory [channel] + 1, Dither.DitherHistory [channel] + 0, sizeof(Dither.DitherHistory[0]) - sizeof(Dither.DitherHistory[0][0]) );
-            Dither.DitherHistory [channel] [0] = Sum2;
-
-            Sum   = Sum + Dither.DitherHistory [channel] [0];
-            Sum2  = Sum + scalar16 ( Dither.ErrorHistory [channel], Dither.FilterCoeff );
-            val   = (Int64_t) (floor ( Sum2 + Dither.Add ))  &  Dither.Mask;
-            if ( val != (Int32_t) val ) {
-                memset ( Dither.ErrorHistory [channel], 0, sizeof (Dither.ErrorHistory[0]) );
-                Dither.Overdrives++;
-                if ( val > +Dither.MaxLevel ) Dither.MaxLevel = +val;
-                if ( val < -Dither.MaxLevel ) Dither.MaxLevel = -val;
-                val = (val >> 63) ^ 0x7FFFFFFF;
-            } else {
-                memmove ( Dither.ErrorHistory [channel] + 1, Dither.ErrorHistory [channel] + 0, sizeof(Dither.ErrorHistory[0]) - sizeof(Dither.ErrorHistory[0][0]) );
-                Dither.ErrorHistory [channel] [0] = Sum - val;
-            }
-#endif
-
-            // copy to PCM
-            Stream [0] [0] = (Int32_t)val;
-            Stream++;
-        }
-    }
-    LEAVE(167);
-    return;
-}
-
-#endif /* defined MAKE_16BIT  ||  defined MAKE_24BIT  ||  defined MAKE_32BIT */
-
-
-void
-OverdriveReport ( void )
-{
-    if ( Dither.Overdrives > 0 ) {
-#if defined MAKE_16BIT  ||  defined MAKE_24BIT  ||  defined MAKE_32BIT
-        stderr_printf ( "\n%5lu Overdrive%s, maximum level %.1f, rerun with --scale %.5f\n",
-                        (Ulong)Dither.Overdrives, Dither.Overdrives==1 ? "" : "s", (Double)(Int64_t)Dither.MaxLevel*(1/65536.), (Int64_t)(Dither.Mask & 0x7FFFFFFFL)/((Double)(Int64_t)Dither.MaxLevel+1) - 0.5e-5 );
-#else
-        stderr_printf ( "\n%5lu Overdrive%s, maximum level %lu, rerun with --scale %.5f\n",
-                        (Ulong)Dither.Overdrives, Dither.Overdrives==1 ? "" : "s", (Ulong)Dither.MaxLevel, (Double)0x7FFF/(Dither.MaxLevel+1) - 0.5e-5 );
-#endif
-        Dither.Overdrives = 0;
-        Dither.MaxLevel   = 0;
-    }
-}
-
-/* end of synth.c */
Index: penc/branches/zorg/synthtab.c
===================================================================
--- /mppenc/branches/zorg/synthtab.c	(revision 40)
+++ 	(revision )
@@ -1,80 +1,0 @@
-/*
- * Musepack audio compression
- * Copyright (C) 1999-2004 Buschmann/Klemm/Piecha/Wolf
- *
- * 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.1 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
- */
-
-#include "mppdec.h"
-
-/*
- *  Description
- *  Cos64[i] = 0.5 / cos (pi*i/64)
- */
-
-const Float  Cos64 [32] = {
-    C00, C01, C02, C03, C04, C05, C06, C07, C08, C09, C10, C11, C12, C13, C14, C15,
-    C16, C17, C18, C19, C20, C21, C22, C23, C24, C25, C26, C27, C28, C29, C30, C31
-};
-
-
-/*
- *  Synthesis-filter-coefficients for the normal C-Code.
- *  Values are all multiples of 1/65536.
- *  Values are between  -1.144... und +1.144...
- *  16 adjoined (side by side) coefficients make up one filter.
- */
-
-#undef _
-#define _(value)  (Float)(value##.##L / 0x10000)
-
-const Float  Di_opt [32] [16] = {
-   { _(  0), _( -29), _( 213), _( -459), _( 2037), _(-5153), _(  6574), _(-37489), _(75038), _(37489), _(6574), _( 5153), _(2037), _( 459), _(213), _(29) },
-   { _( -1), _( -31), _( 218), _( -519), _( 2000), _(-5517), _(  5959), _(-39336), _(74992), _(35640), _(7134), _( 4788), _(2063), _( 401), _(208), _(26) },
-   { _( -1), _( -35), _( 222), _( -581), _( 1952), _(-5879), _(  5288), _(-41176), _(74856), _(33791), _(7640), _( 4425), _(2080), _( 347), _(202), _(24) },
-   { _( -1), _( -38), _( 225), _( -645), _( 1893), _(-6237), _(  4561), _(-43006), _(74630), _(31947), _(8092), _( 4063), _(2087), _( 294), _(196), _(21) },
-   { _( -1), _( -41), _( 227), _( -711), _( 1822), _(-6589), _(  3776), _(-44821), _(74313), _(30112), _(8492), _( 3705), _(2085), _( 244), _(190), _(19) },
-   { _( -1), _( -45), _( 228), _( -779), _( 1739), _(-6935), _(  2935), _(-46617), _(73908), _(28289), _(8840), _( 3351), _(2075), _( 197), _(183), _(17) },
-   { _( -1), _( -49), _( 228), _( -848), _( 1644), _(-7271), _(  2037), _(-48390), _(73415), _(26482), _(9139), _( 3004), _(2057), _( 153), _(176), _(16) },
-   { _( -2), _( -53), _( 227), _( -919), _( 1535), _(-7597), _(  1082), _(-50137), _(72835), _(24694), _(9389), _( 2663), _(2032), _( 111), _(169), _(14) },
-   { _( -2), _( -58), _( 224), _( -991), _( 1414), _(-7910), _(    70), _(-51853), _(72169), _(22929), _(9592), _( 2330), _(2001), _(  72), _(161), _(13) },
-   { _( -2), _( -63), _( 221), _(-1064), _( 1280), _(-8209), _(  -998), _(-53534), _(71420), _(21189), _(9750), _( 2006), _(1962), _(  36), _(154), _(11) },
-   { _( -2), _( -68), _( 215), _(-1137), _( 1131), _(-8491), _( -2122), _(-55178), _(70590), _(19478), _(9863), _( 1692), _(1919), _(   2), _(147), _(10) },
-   { _( -3), _( -73), _( 208), _(-1210), _(  970), _(-8755), _( -3300), _(-56778), _(69679), _(17799), _(9935), _( 1388), _(1870), _( -29), _(139), _( 9) },
-   { _( -3), _( -79), _( 200), _(-1283), _(  794), _(-8998), _( -4533), _(-58333), _(68692), _(16155), _(9966), _( 1095), _(1817), _( -57), _(132), _( 8) },
-   { _( -4), _( -85), _( 189), _(-1356), _(  605), _(-9219), _( -5818), _(-59838), _(67629), _(14548), _(9959), _(  814), _(1759), _( -83), _(125), _( 7) },
-   { _( -4), _( -91), _( 177), _(-1428), _(  402), _(-9416), _( -7154), _(-61289), _(66494), _(12980), _(9916), _(  545), _(1698), _(-106), _(117), _( 7) },
-   { _( -5), _( -97), _( 163), _(-1498), _(  185), _(-9585), _( -8540), _(-62684), _(65290), _(11455), _(9838), _(  288), _(1634), _(-127), _(111), _( 6) },
-   { _( -5), _(-104), _( 146), _(-1567), _(  -45), _(-9727), _( -9975), _(-64019), _(64019), _( 9975), _(9727), _(   45), _(1567), _(-146), _(104), _( 5) },
-   { _( -6), _(-111), _( 127), _(-1634), _( -288), _(-9838), _(-11455), _(-65290), _(62684), _( 8540), _(9585), _( -185), _(1498), _(-163), _( 97), _( 5) },
-   { _( -7), _(-117), _( 106), _(-1698), _( -545), _(-9916), _(-12980), _(-66494), _(61289), _( 7154), _(9416), _( -402), _(1428), _(-177), _( 91), _( 4) },
-   { _( -7), _(-125), _(  83), _(-1759), _( -814), _(-9959), _(-14548), _(-67629), _(59838), _( 5818), _(9219), _( -605), _(1356), _(-189), _( 85), _( 4) },
-   { _( -8), _(-132), _(  57), _(-1817), _(-1095), _(-9966), _(-16155), _(-68692), _(58333), _( 4533), _(8998), _( -794), _(1283), _(-200), _( 79), _( 3) },
-   { _( -9), _(-139), _(  29), _(-1870), _(-1388), _(-9935), _(-17799), _(-69679), _(56778), _( 3300), _(8755), _( -970), _(1210), _(-208), _( 73), _( 3) },
-   { _(-10), _(-147), _(  -2), _(-1919), _(-1692), _(-9863), _(-19478), _(-70590), _(55178), _( 2122), _(8491), _(-1131), _(1137), _(-215), _( 68), _( 2) },
-   { _(-11), _(-154), _( -36), _(-1962), _(-2006), _(-9750), _(-21189), _(-71420), _(53534), _(  998), _(8209), _(-1280), _(1064), _(-221), _( 63), _( 2) },
-   { _(-13), _(-161), _( -72), _(-2001), _(-2330), _(-9592), _(-22929), _(-72169), _(51853), _(  -70), _(7910), _(-1414), _( 991), _(-224), _( 58), _( 2) },
-   { _(-14), _(-169), _(-111), _(-2032), _(-2663), _(-9389), _(-24694), _(-72835), _(50137), _(-1082), _(7597), _(-1535), _( 919), _(-227), _( 53), _( 2) },
-   { _(-16), _(-176), _(-153), _(-2057), _(-3004), _(-9139), _(-26482), _(-73415), _(48390), _(-2037), _(7271), _(-1644), _( 848), _(-228), _( 49), _( 1) },
-   { _(-17), _(-183), _(-197), _(-2075), _(-3351), _(-8840), _(-28289), _(-73908), _(46617), _(-2935), _(6935), _(-1739), _( 779), _(-228), _( 45), _( 1) },
-   { _(-19), _(-190), _(-244), _(-2085), _(-3705), _(-8492), _(-30112), _(-74313), _(44821), _(-3776), _(6589), _(-1822), _( 711), _(-227), _( 41), _( 1) },
-   { _(-21), _(-196), _(-294), _(-2087), _(-4063), _(-8092), _(-31947), _(-74630), _(43006), _(-4561), _(6237), _(-1893), _( 645), _(-225), _( 38), _( 1) },
-   { _(-24), _(-202), _(-347), _(-2080), _(-4425), _(-7640), _(-33791), _(-74856), _(41176), _(-5288), _(5879), _(-1952), _( 581), _(-222), _( 35), _( 1) },
-   { _(-26), _(-208), _(-401), _(-2063), _(-4788), _(-7134), _(-35640), _(-74992), _(39336), _(-5959), _(5517), _(-2000), _( 519), _(-218), _( 31), _( 1) }
-};
-
-#undef  _
-
-/* end of synthtab.c */
Index: penc/branches/zorg/tagger.c
===================================================================
--- /mppenc/branches/zorg/tagger.c	(revision 40)
+++ 	(revision )
@@ -1,295 +1,0 @@
-/*
-
-" "
-"."                             .
-"/"                             /
-" -- "                          _
-"[#0]"                          0
-"[#n]"  [number]                n
-"(#N)"  (CD x)                  N
-"#A"    Artist                  A
-"#C"    CD                      C
-"#T"    Title                   T
-"#x"    extention               x
-
-
-/#C -- [#n] #A -- #T#x      | Acid Jazz/100% Acid Jazz -- [04] Leena Conquest (and Hip Hop Fingers) -- Boundaries (Radio Edit).pac
-/#A/#C -- [#n] #T#x         | Andreas Vollenweider/Eolian Minstrel -- [02] Across the Iron River.pac
-/#A/#C#N -- [#n] #T#x       | Barbra Streisand/The Concert (CD 1) -- [01] Overture
-/#A -- #C -- [#n] #T#x      | Friedemann/Friedemann -- Aquamarin -- [09] In the Court of the Mermaid.pac
-/#C/[#n] #A -- #T#x         | Jazz Lyrik Prosa/[11] Eberhard Esche -- Anektode.pac
-/#A -- #T#x                 | Lais/Lais -- 06.pac
-/#C/(#N) -- [#n] #A -- #T#x | Tanz- und Folkfest 2001 -- Klingende Post/(CD 2) -- [09] Andy Irvine -- Gladiators.pac
-/#A -- #C -- [#0]#x         | Friedemann/Friedemann -- Aquamarin -- [00].pac
-/#A/#C (#N) -- [#0]#x       | Tangerine Dream/The Warsaw Concert (CD 2) -- [00].pac
-/#A/#T#x                    | Heinz-Rudolf Kunze/Dein ist mein ganzes Herz.pac
-/#A/#C -- [#0]#x            | Sting/Nada como el Sol -- [00].mpc
-
-*/
-
-#include <ctype.h>
-#include "mppdec.h"
-
-
-#if defined HAVE_INCOMPLETE_READ  &&  FILEIO != 1
-
-size_t
-complete_read ( int fd, void* dest, size_t bytes )
-{
-    size_t  bytesread = 0;
-    size_t  ret;
-
-    while ( bytes > 0 ) {
-        ret = read ( fd, dest, bytes );
-        if ( ret == 0  ||  ret == (size_t)-1 )
-            break;
-        dest       = (void*)(((char*)dest) + ret);
-        bytes     -= ret;
-        bytesread += ret;
-    }
-    return bytesread;
-}
-
-#endif
-
-
-
-static int
-tag ( const char* filename, const char* Artist, const char* CD, const char* Title, int no )
-{
-    FILE_T      fp;
-    char        tmp [128];
-
-    // sleep (1);
-    fp = OPENRW (filename);
-    if ( fp == INVALID_FILEDESC )
-        return -1;
-    if ( -1 == SEEK ( fp, -128L, SEEK_END ) )
-        return -1;
-    if ( 128 != READ ( fp, tmp, 128 ) )
-        return 0;
-
-    if ( 0 != memcmp ( tmp, "TAG", 3 ) ) {
-        SEEK ( fp,   -0L, SEEK_END );
-        printf ("*** Add Tag ***\n");
-        memset (tmp, 0, sizeof(tmp));
-    } else {
-        SEEK ( fp, -128L, SEEK_END );
-        printf ("*** Modify Tag ***\n");
-    }
-    printf ("------------------\nArtist=%s\nCD    =%s\nTitle =%s\nNo    =%u\n-----------------\n", Artist, CD, Title, no );
-
-    strncpy  ( tmp +  0, "TAG" ,  3 );
-    strncpy  ( tmp +  3, Title , 30 );
-    strncpy  ( tmp + 33, Artist, 30 );
-    strncpy  ( tmp + 63, CD    , 30 );
-    strncpy  ( tmp + 93, "    ",  4 );
-    // memcpy  ( tip->Comment, tmp + 97, 30 );
-    tmp[125] = '\0';
-    tmp[126] = no;
-    tmp[127] = (char)-1;
-
-    if ( 128 != WRITE ( fp, tmp, 128 ) )
-        return 0;
-    CLOSE (fp);
-    printf ( "Okay\n\n");
-
-    return 0;
-}
-
-
-static void
-copy ( char* dst, const char* src, size_t len )
-{
-   memcpy ( dst, src, len );
-   dst[len] = '\0';
-}
-
-/*
- *    dst[0] = Artist
- *    dst[1] = CD
- *    dst[2] = Title
- *    dst[3] = +CD
- *    dst[4] = number
- *    dst[5] = ext
- */
-
-static int
-parse ( char** dst, const char* src, const char* format )
-{
-    int          i;
-    const char*  srcend = src + strlen(src);
-    const char*  p;
-    char*        q;
-
-    for ( i = 0; i < 6; i++)
-        dst[i][0] = '\0';
-
-    for ( i = strlen(format); i-- > 0; ) {
-        p = srcend;
-        printf ("%c: ", format[i] );
-
-        switch ( format[i] ) {
-        case '.':
-        case ' ':
-        case '/':                               // !!!!!!!
-            if (p[-1] != format[i])
-                return 1;
-            p--;
-            break;
-        case '_':
-            if (0 != memcmp (p-4, " -- ", 4))
-                return 1;
-            p -= 4;
-            break;
-        case '0':
-            if (p[-1] != ']' || p[-2] != '0' || p[-3] != '0' || p[-4] != '[')
-                return 1;
-            p -= 4;
-            break;
-        case 'n':
-            if (p[-1] != ']' || !isdigit(p[-2]) || !isdigit(p[-3]) || p[-4] != '[')
-                return 1;
-            copy (dst[4], p-3, 2);
-            p -= 4;
-            break;
-        case 'N':
-            if (p[-1] != ')' || !isdigit(p[-2]) || p[-3] != ' ' || p[-4] != 'D' || p[-5] != 'C' || p[-6] != '(')
-                return 1;
-            dst[3][0] = ' ';
-            copy (dst[3]+1, p-6, 6);
-            p -= 6;
-            break;
-        case 'A':
-            q = dst[0]; goto big;
-        case 'C':
-            q = dst[1]; goto big;
-        case 'T':
-            q = dst[2]; goto big;
-        big:
-            while ( 0 == memcmp (p-4, "/mpc", 4)  ||
-                    0 == memcmp (p-4, "/mp3", 4)  ||
-                    0 == memcmp (p-4, "/pac", 4)
-                  )
-                srcend -= 4, p -= 4;
-            while ( p[-1] != PATH_SEP  &&
-                    p[-1] != DRIVE_SEP &&
-                    0 != memcmp (p-4, " -- ", 4 )  &&
-                    (p[-1] != ')' || !isdigit(p[-2]) || p[-3] != ' ' || p[-4] != 'D' || p[-5] != 'C' || p[-6] != '(')  &&
-                    (p[-1] != ' ' || p[-2] != ']' || !isdigit(p[-3]) || !isdigit(p[-4]) || p[-5] != '[') &&
-                    (p[-1] != ']' || p[-2] != '0' || p[-3] != '0' || p[-4] != '[')
-                  )
-                p--;
-            copy ( q, p, srcend - p );
-            break;
-        case 'x':
-            do {
-                p--;
-                if (p[0] == PATH_SEP || p[0] == DRIVE_SEP)
-                    return -1;
-            } while (*p != '.');
-            copy (dst[5], p, srcend-p );
-            break;
-        }
-        printf ("%*.*s\033[7m%*.*s\033[0m\n", p-src, p-src, src, srcend-p, srcend-p, p );
-        srcend = p;
-    }
-    return 0;
-}
-
-static int
-hexdigit ( const char s )
-{
-    if ( (unsigned char)(s-'0') < 10u )
-        return s-'0';
-    if ( (unsigned char)(s-'A') <  6u )
-        return s-'A'+10;
-    return -1;
-}
-
-static void
-spaceconverting ( char* dst, const char* src )
-{
-    for ( ; src[0] != '\0' ; src++) {
-        if      ( src[0] == '_' )
-            *dst++ = ' ';
-        else if ( src[0] == '%'  &&  hexdigit(src[1]) >= 0  &&  hexdigit(src[2]) >= 0 )
-            *dst++ = hexdigit(src[1]) * 16 + hexdigit(src[2]), src += 2;
-        else
-            *dst++ = *src;
-    }
-    *dst = '\0';
-}
-
-void doitwith ( const char* filename, const char* src )
-{
-    static const char*  parser [] = {
-        "/A_Tx",
-        "/A/Tx",
-        "/A_C_0x",
-        "/C_n A_Tx",
-        "/A/C_n Tx",
-        "/A/C#N_n Tx",
-        "/A_C_n Tx",
-        "/C/n A_Tx",
-        "/C/N_n A_Tx",
-        "/A/C N_0x",
-        "/A/C_0x",
-};
-    size_t  i;
-    int     no  =  0;
-    int     idx = -1;
-    char    tmp  [6] [1024];
-    char*   buff [6] = { tmp[0], tmp[1], tmp[2], tmp[3], tmp[4], tmp[5] };
-
-    printf ("  »%s«\n", src );
-    for ( i = 0; i < sizeof(parser)/sizeof(*parser); i++ ) {
-        if ( 0 == parse ( buff, src, parser[i] ) ) {
-            no++;
-            idx = i;
-            printf ("Artist = »%s«\n", tmp[0]);
-            printf ("CD     = »%s%s«\n", tmp[1], tmp[3]);
-            printf ("Title  = »%s«\n", tmp[2]);
-            printf ("No#    = »%s«\n", tmp[4]);
-            printf ("Extent = »%s«\n", tmp[5]);
-        }
-        printf ("\n");
-    }
-
-    if ( no != 1 ) {
-        printf ("%u matches\a\n\n", no ), sleep (2);
-    }
-    {
-        char  merge [1024];
-        parse ( buff, src, parser[idx] );
-        sprintf (merge,"%s%s", tmp[1], tmp[3]);
-        tag ( filename, tmp[0], merge, tmp[2], atoi(tmp[4]));
-    }
-
-    printf ("\n");
-}
-
-int Cdecl
-main ( int argc, char** argv )
-{
-    char  buff1 [32768];
-    char  buff2 [32768];
-    char  buff3 [32768];
-
-    getcwd ( buff1, sizeof(buff1) );
-
-    while ( *++argv ) {
-        spaceconverting ( buff3, *argv );
-        if (**argv == PATH_SEP)
-            sprintf ( buff2, "%s", buff3 );
-        else if (buff3[0] == '.' && buff3[1] == PATH_SEP)
-            sprintf ( buff2, "%s%c%s", buff1, PATH_SEP, buff3+2 );
-        else
-            sprintf ( buff2, "%s%c%s", buff1, PATH_SEP, buff3 );
-        doitwith ( *argv, buff2 );
-    }
-
-    return 0;
-}
-
-/* end of tagger.c */
Index: penc/branches/zorg/tagger.dsp
===================================================================
--- /mppenc/branches/zorg/tagger.dsp	(revision 40)
+++ 	(revision )
@@ -1,101 +1,0 @@
-# Microsoft Developer Studio Project File - Name="tagger" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=tagger - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "tagger.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "tagger.mak" CFG="tagger - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "tagger - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "tagger - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "tagger - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MPP_ENCODER" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "tagger - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "MPP_ENCODER" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "tagger - Win32 Release"
-# Name "tagger - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\tagger.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
Index: penc/branches/zorg/tagger.vcproj
===================================================================
--- /mppenc/branches/zorg/tagger.vcproj	(revision 40)
+++ 	(revision )
@@ -1,167 +1,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="tagger"
-	SccProjectName=""
-	SccLocalPath="">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\Release"
-			IntermediateDirectory=".\Release"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;MPP_ENCODER"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Release/tagger.pch"
-				AssemblerListingLocation=".\Release/"
-				ObjectFile=".\Release/"
-				ProgramDataBaseFileName=".\Release/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=".\Release/tagger.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				ProgramDatabaseFile=".\Release/tagger.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Release/tagger.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\Debug"
-			IntermediateDirectory=".\Debug"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;MPP_ENCODER"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Debug/tagger.pch"
-				AssemblerListingLocation=".\Debug/"
-				ObjectFile=".\Debug/"
-				ProgramDataBaseFileName=".\Debug/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="odbc32.lib odbccp32.lib setargv.obj"
-				OutputFile=".\Debug/tagger.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile=".\Debug/tagger.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Debug/tagger.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
-			<File
-				RelativePath="tagger.c">
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: /mppenc/branches/zorg/tags.c
===================================================================
--- /mppenc/branches/zorg/tags.c	(revision 40)
+++ /mppenc/branches/zorg/tags.c	(revision 41)
Index: penc/branches/zorg/tags.c-old
===================================================================
--- /mppenc/branches/zorg/tags.c-old	(revision 40)
+++ 	(revision )
@@ -1,1283 +1,0 @@
-/*
- *  Encoder tag handling
- *
- *  (C) Frank Klemm 2002. Janne Hyvärinen 2002. All rights reserved.
- *
- *  Principles:
- *
- *
- *  History:
- *    2002-06     created
- *    2002-08-12  added translation method 5 to addtag()
- *                Tags taken from source file can't overwrite already existing items
- *                added Init_Tags()
- *    2002-08-13  Added all windows code pages
- *    2002-10-09  Added code to parse tags from filename
- *
- *  Global functions:
- *    - addtag()
- *
- *  TODO:
- *    - '/' and '\' should be possible as PATH_SEP
- */
-
-#include "mppenc.h"
-
-#ifdef USE_WIDECHAR
-# include <wchar.h>
-#endif
-
-
-static const char*  GenreList [] = {
-    "Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge",
-    "Hip-Hop", "Jazz", "Metal", "New Age", "Oldies", "Other", "Pop", "R&B",
-    "Rap", "Reggae", "Rock", "Techno", "Industrial", "Alternative", "Ska",
-    "Death Metal", "Pranks", "Soundtrack", "Euro-Techno", "Ambient",
-    "Trip-Hop", "Vocal", "Jazz+Funk", "Fusion", "Trance", "Classical",
-    "Instrumental", "Acid", "House", "Game", "Sound Clip", "Gospel", "Noise",
-    "AlternRock", "Bass", "Soul", "Punk", "Space", "Meditative",
-    "Instrumental Pop", "Instrumental Rock", "Ethnic", "Gothic", "Darkwave",
-    "Techno-Industrial", "Electronic", "Pop-Folk", "Eurodance", "Dream",
-    "Southern Rock", "Comedy", "Cult", "Gangsta", "Top 40", "Christian Rap",
-    "Pop/Funk", "Jungle", "Native American", "Cabaret", "New Wave",
-    "Psychadelic", "Rave", "Showtunes", "Trailer", "Lo-Fi", "Tribal",
-    "Acid Punk", "Acid Jazz", "Polka", "Retro", "Musical", "Rock & Roll",
-    "Hard Rock", "Folk", "Folk/Rock", "National Folk", "Swing", "Fast-Fusion",
-    "Bebob", "Latin", "Revival", "Celtic", "Bluegrass", "Avantgarde",
-    "Gothic Rock", "Progressive Rock", "Psychedelic Rock", "Symphonic Rock",
-    "Slow Rock", "Big Band", "Chorus", "Easy Listening", "Acoustic", "Humour",
-    "Speech", "Chanson", "Opera", "Chamber Music", "Sonata", "Symphony",
-    "Booty Bass", "Primus", "Porn Groove", "Satire", "Slow Jam", "Club",
-    "Tango", "Samba", "Folklore", "Ballad", "Power Ballad", "Rhythmic Soul",
-    "Freestyle", "Duet", "Punk Rock", "Drum Solo", "A capella", "Euro-House",
-    "Dance Hall", "Goa", "Drum & Bass", "Club House", "Hardcore", "Terror",
-    "Indie", "BritPop", "NegerPunk", "Polsk Punk", "Beat", "Christian Gangsta",
-    "Heavy Metal", "Black Metal", "Crossover", "Contemporary C",
-    "Christian Rock", "Merengue", "Salsa", "Thrash Metal", "Anime", "JPop",
-    "SynthPop"
-};
-
-
-struct APETagFooterStruct {
-    Uint8_t   ID       [8];    // should equal 'APETAGEX'
-    Uint8_t   Version  [4];    // currently 1000 (version 1.000)
-    Uint8_t   Length   [4];    // the complete size of the tag, including this footer
-    Uint8_t   TagCount [4];    // the number of fields in the tag
-    Uint8_t   Flags    [4];    // the tag flags (none currently defined)
-    Uint8_t   Reserved [8];    // reserved for later use
-};
-
-
-typedef struct {
-    char*           key;
-    size_t          keylen;
-    unsigned char*  value;
-    size_t          valuelen;
-    unsigned int    flags;
-} TagItem_t;
-
-
-static TagItem_t       T [256];                        // up to 256 items, otherwise program crashs
-static unsigned int    TagCount = 0;
-
-#if defined __TURBOC__
-
-static unsigned short  CP_850 [256] = {
-    0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
-    0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
-    0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
-    0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
-    0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
-    0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
-    0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
-    0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
-    0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7, 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5,
-    0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9, 0x00FF, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x00D7, 0x0192,
-    0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA, 0x00BF, 0x00AE, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
-    0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00C1, 0x00C2, 0x00C0, 0x00A9, 0x2563, 0x2551, 0x2557, 0x255D, 0x00A2, 0x00A5, 0x2510,
-    0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x00E3, 0x00C3, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4,
-    0x00F0, 0x00D0, 0x00CA, 0x00CB, 0x00C8, 0x0131, 0x00CD, 0x00CE, 0x00CF, 0x2518, 0x250C, 0x2588, 0x2584, 0x00A6, 0x00CC, 0x2580,
-    0x00D3, 0x00DF, 0x00D4, 0x00D2, 0x00F5, 0x00D5, 0x00B5, 0x00FE, 0x00DE, 0x00DA, 0x00DB, 0x00D9, 0x00FD, 0x00DD, 0x00AF, 0x00B4,
-    0x00AD, 0x00B1, 0x2017, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x00B8, 0x00B0, 0x00A8, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0,
-};
-
-#elif defined _WIN32
-
-static unsigned short  CP_37 [256] = {  // ???
-    0x0000, 0x0001, 0x0002, 0x0003, 0x009C, 0x0009, 0x0086, 0x007F, 0x0097, 0x008D, 0x008E, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
-    0x0010, 0x0011, 0x0012, 0x0013, 0x009D, 0x0085, 0x0008, 0x0087, 0x0018, 0x0019, 0x0092, 0x008F, 0x001C, 0x001D, 0x001E, 0x001F,
-    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x000A, 0x0017, 0x001B, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x0005, 0x0006, 0x0007,
-    0x0090, 0x0091, 0x0016, 0x0093, 0x0094, 0x0095, 0x0096, 0x0004, 0x0098, 0x0099, 0x009A, 0x009B, 0x0014, 0x0015, 0x009E, 0x001A,
-    0x0020, 0x00A0, 0x00E2, 0x00E4, 0x00E0, 0x00E1, 0x00E3, 0x00E5, 0x00E7, 0x00F1, 0x00A2, 0x002E, 0x003C, 0x0028, 0x002B, 0x007C,
-    0x0026, 0x00E9, 0x00EA, 0x00EB, 0x00E8, 0x00ED, 0x00EE, 0x00EF, 0x00EC, 0x00DF, 0x0021, 0x0024, 0x002A, 0x0029, 0x003B, 0x00AC,
-    0x002D, 0x002F, 0x00C2, 0x00C4, 0x00C0, 0x00C1, 0x00C3, 0x00C5, 0x00C7, 0x00D1, 0x00A6, 0x002C, 0x0025, 0x005F, 0x003E, 0x003F,
-    0x00F8, 0x00C9, 0x00CA, 0x00CB, 0x00C8, 0x00CD, 0x00CE, 0x00CF, 0x00CC, 0x0060, 0x003A, 0x0023, 0x0040, 0x0027, 0x003D, 0x0022,
-    0x00D8, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x00AB, 0x00BB, 0x00F0, 0x00FD, 0x00FE, 0x00B1,
-    0x00B0, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F, 0x0070, 0x0071, 0x0072, 0x00AA, 0x00BA, 0x00E6, 0x00B8, 0x00C6, 0x00A4,
-    0x00B5, 0x007E, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x00A1, 0x00BF, 0x00D0, 0x00DD, 0x00DE, 0x00AE,
-    0x005E, 0x00A3, 0x00A5, 0x00B7, 0x00A9, 0x00A7, 0x00B6, 0x00BC, 0x00BD, 0x00BE, 0x005B, 0x005D, 0x00AF, 0x00A8, 0x00B4, 0x00D7,
-    0x007B, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x00AD, 0x00F4, 0x00F6, 0x00F2, 0x00F3, 0x00F5,
-    0x007D, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, 0x0050, 0x0051, 0x0052, 0x00B9, 0x00FB, 0x00FC, 0x00F9, 0x00FA, 0x00FF,
-    0x005C, 0x00F7, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x00B2, 0x00D4, 0x00D6, 0x00D2, 0x00D3, 0x00D5,
-    0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x00B3, 0x00DB, 0x00DC, 0x00D9, 0x00DA, 0x009F,
-};
-
-static unsigned short  CP_42 [256] = { // CP_SYMBOLS
-    0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
-    0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
-    0xF020, 0xF021, 0xF022, 0xF023, 0xF024, 0xF025, 0xF026, 0xF027, 0xF028, 0xF029, 0xF02A, 0xF02B, 0xF02C, 0xF02D, 0xF02E, 0xF02F,
-    0xF030, 0xF031, 0xF032, 0xF033, 0xF034, 0xF035, 0xF036, 0xF037, 0xF038, 0xF039, 0xF03A, 0xF03B, 0xF03C, 0xF03D, 0xF03E, 0xF03F,
-    0xF040, 0xF041, 0xF042, 0xF043, 0xF044, 0xF045, 0xF046, 0xF047, 0xF048, 0xF049, 0xF04A, 0xF04B, 0xF04C, 0xF04D, 0xF04E, 0xF04F,
-    0xF050, 0xF051, 0xF052, 0xF053, 0xF054, 0xF055, 0xF056, 0xF057, 0xF058, 0xF059, 0xF05A, 0xF05B, 0xF05C, 0xF05D, 0xF05E, 0xF05F,
-    0xF060, 0xF061, 0xF062, 0xF063, 0xF064, 0xF065, 0xF066, 0xF067, 0xF068, 0xF069, 0xF06A, 0xF06B, 0xF06C, 0xF06D, 0xF06E, 0xF06F,
-    0xF070, 0xF071, 0xF072, 0xF073, 0xF074, 0xF075, 0xF076, 0xF077, 0xF078, 0xF079, 0xF07A, 0xF07B, 0xF07C, 0xF07D, 0xF07E, 0xF07F,
-    0xF080, 0xF081, 0xF082, 0xF083, 0xF084, 0xF085, 0xF086, 0xF087, 0xF088, 0xF089, 0xF08A, 0xF08B, 0xF08C, 0xF08D, 0xF08E, 0xF08F,
-    0xF090, 0xF091, 0xF092, 0xF093, 0xF094, 0xF095, 0xF096, 0xF097, 0xF098, 0xF099, 0xF09A, 0xF09B, 0xF09C, 0xF09D, 0xF09E, 0xF09F,
-    0xF0A0, 0xF0A1, 0xF0A2, 0xF0A3, 0xF0A4, 0xF0A5, 0xF0A6, 0xF0A7, 0xF0A8, 0xF0A9, 0xF0AA, 0xF0AB, 0xF0AC, 0xF0AD, 0xF0AE, 0xF0AF,
-    0xF0B0, 0xF0B1, 0xF0B2, 0xF0B3, 0xF0B4, 0xF0B5, 0xF0B6, 0xF0B7, 0xF0B8, 0xF0B9, 0xF0BA, 0xF0BB, 0xF0BC, 0xF0BD, 0xF0BE, 0xF0BF,
-    0xF0C0, 0xF0C1, 0xF0C2, 0xF0C3, 0xF0C4, 0xF0C5, 0xF0C6, 0xF0C7, 0xF0C8, 0xF0C9, 0xF0CA, 0xF0CB, 0xF0CC, 0xF0CD, 0xF0CE, 0xF0CF,
-    0xF0D0, 0xF0D1, 0xF0D2, 0xF0D3, 0xF0D4, 0xF0D5, 0xF0D6, 0xF0D7, 0xF0D8, 0xF0D9, 0xF0DA, 0xF0DB, 0xF0DC, 0xF0DD, 0xF0DE, 0xF0DF,
-    0xF0E0, 0xF0E1, 0xF0E2, 0xF0E3, 0xF0E4, 0xF0E5, 0xF0E6, 0xF0E7, 0xF0E8, 0xF0E9, 0xF0EA, 0xF0EB, 0xF0EC, 0xF0ED, 0xF0EE, 0xF0EF,
-    0xF0F0, 0xF0F1, 0xF0F2, 0xF0F3, 0xF0F4, 0xF0F5, 0xF0F6, 0xF0F7, 0xF0F8, 0xF0F9, 0xF0FA, 0xF0FB, 0xF0FC, 0xF0FD, 0xF0FE, 0xF0FF,
-};
-
-static unsigned short  CP_437 [256] = { // MS-DOS: US
-    0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
-    0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
-    0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
-    0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
-    0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
-    0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
-    0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
-    0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
-    0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7, 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5,
-    0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9, 0x00FF, 0x00D6, 0x00DC, 0x00A2, 0x00A3, 0x00A5, 0x20A7, 0x0192,
-    0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA, 0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
-    0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
-    0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
-    0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
-    0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4, 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
-    0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0,
-};
-
-static unsigned short  CP_500 [256] = { // ???
-    0x0000, 0x0001, 0x0002, 0x0003, 0x009C, 0x0009, 0x0086, 0x007F, 0x0097, 0x008D, 0x008E, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
-    0x0010, 0x0011, 0x0012, 0x0013, 0x009D, 0x0085, 0x0008, 0x0087, 0x0018, 0x0019, 0x0092, 0x008F, 0x001C, 0x001D, 0x001E, 0x001F,
-    0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x000A, 0x0017, 0x001B, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x0005, 0x0006, 0x0007,
-    0x0090, 0x0091, 0x0016, 0x0093, 0x0094, 0x0095, 0x0096, 0x0004, 0x0098, 0x0099, 0x009A, 0x009B, 0x0014, 0x0015, 0x009E, 0x001A,
-    0x0020, 0x00A0, 0x00E2, 0x00E4, 0x00E0, 0x00E1, 0x00E3, 0x00E5, 0x00E7, 0x00F1, 0x005B, 0x002E, 0x003C, 0x0028, 0x002B, 0x0021,
-    0x0026, 0x00E9, 0x00EA, 0x00EB, 0x00E8, 0x00ED, 0x00EE, 0x00EF, 0x00EC, 0x00DF, 0x005D, 0x0024, 0x002A, 0x0029, 0x003B, 0x005E,
-    0x002D, 0x002F, 0x00C2, 0x00C4, 0x00C0, 0x00C1, 0x00C3, 0x00C5, 0x00C7, 0x00D1, 0x00A6, 0x002C, 0x0025, 0x005F, 0x003E, 0x003F,
-    0x00F8, 0x00C9, 0x00CA, 0x00CB, 0x00C8, 0x00CD, 0x00CE, 0x00CF, 0x00CC, 0x0060, 0x003A, 0x0023, 0x0040, 0x0027, 0x003D, 0x0022,
-    0x00D8, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x00AB, 0x00BB, 0x00F0, 0x00FD, 0x00FE, 0x00B1,
-    0x00B0, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F, 0x0070, 0x0071, 0x0072, 0x00AA, 0x00BA, 0x00E6, 0x00B8, 0x00C6, 0x00A4,
-    0x00B5, 0x007E, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x00A1, 0x00BF, 0x00D0, 0x00DD, 0x00DE, 0x00AE,
-    0x00A2, 0x00A3, 0x00A5, 0x00B7, 0x00A9, 0x00A7, 0x00B6, 0x00BC, 0x00BD, 0x00BE, 0x00AC, 0x007C, 0x00AF, 0x00A8, 0x00B4, 0x00D7,
-    0x007B, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x00AD, 0x00F4, 0x00F6, 0x00F2, 0x00F3, 0x00F5,
-    0x007D, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, 0x0050, 0x0051, 0x0052, 0x00B9, 0x00FB, 0x00FC, 0x00F9, 0x00FA, 0x00FF,
-    0x005C, 0x00F7, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x00B2, 0x00D4, 0x00D6, 0x00D2, 0x00D3, 0x00D5,
-    0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x00B3, 0x00DB, 0x00DC, 0x00D9, 0x00DA, 0x009F,
-};
-
-static unsigned short  CP_850 [256] = { // MS-DOS Latin 1
-    0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
-    0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
-    0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
-    0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
-    0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
-    0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
-    0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
-    0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
-    0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7, 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5,
-    0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9, 0x00FF, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x00D7, 0x0192,
-    0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA, 0x00BF, 0x00AE, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
-    0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00C1, 0x00C2, 0x00C0, 0x00A9, 0x2563, 0x2551, 0x2557, 0x255D, 0x00A2, 0x00A5, 0x2510,
-    0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x00E3, 0x00C3, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4,
-    0x00F0, 0x00D0, 0x00CA, 0x00CB, 0x00C8, 0x0131, 0x00CD, 0x00CE, 0x00CF, 0x2518, 0x250C, 0x2588, 0x2584, 0x00A6, 0x00CC, 0x2580,
-    0x00D3, 0x00DF, 0x00D4, 0x00D2, 0x00F5, 0x00D5, 0x00B5, 0x00FE, 0x00DE, 0x00DA, 0x00DB, 0x00D9, 0x00FD, 0x00DD, 0x00AF, 0x00B4,
-    0x00AD, 0x00B1, 0x2017, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x00B8, 0x00B0, 0x00A8, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0,
-};
-
-static unsigned short  CP_860 [256] = { // MS-DOS: Portugese
-    0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
-    0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
-    0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
-    0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
-    0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
-    0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
-    0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
-    0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
-    0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E3, 0x00E0, 0x00C1, 0x00E7, 0x00EA, 0x00CA, 0x00E8, 0x00CD, 0x00D4, 0x00EC, 0x00C3, 0x00C2,
-    0x00C9, 0x00C0, 0x00C8, 0x00F4, 0x00F5, 0x00F2, 0x00DA, 0x00F9, 0x00CC, 0x00D5, 0x00DC, 0x00A2, 0x00A3, 0x00D9, 0x20A7, 0x00D3,
-    0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA, 0x00BF, 0x00D2, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
-    0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
-    0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
-    0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
-    0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4, 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
-    0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0,
-};
-
-static unsigned short  CP_861 [256] = { // MS-DOS: Iceland
-    0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
-    0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
-    0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
-    0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
-    0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
-    0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
-    0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
-    0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
-    0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7, 0x00EA, 0x00EB, 0x00E8, 0x00D0, 0x00F0, 0x00DE, 0x00C4, 0x00C5,
-    0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00FE, 0x00FB, 0x00DD, 0x00FD, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x20A7, 0x0192,
-    0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00C1, 0x00CD, 0x00D3, 0x00DA, 0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
-    0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
-    0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
-    0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
-    0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4, 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
-    0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0,
-};
-
-static unsigned short  CP_863 [256] = { // MS-DOS: Canadian French
-    0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
-    0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
-    0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
-    0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
-    0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
-    0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
-    0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
-    0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
-    0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00C2, 0x00E0, 0x00B6, 0x00E7, 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x2017, 0x00C0, 0x00A7,
-    0x00C9, 0x00C8, 0x00CA, 0x00F4, 0x00CB, 0x00CF, 0x00FB, 0x00F9, 0x00A4, 0x00D4, 0x00DC, 0x00A2, 0x00A3, 0x00D9, 0x00DB, 0x0192,
-    0x00A6, 0x00B4, 0x00F3, 0x00FA, 0x00A8, 0x00B8, 0x00B3, 0x00AF, 0x00CE, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00BE, 0x00AB, 0x00BB,
-    0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
-    0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
-    0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
-    0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4, 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
-    0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0,
-};
-
-static unsigned short  CP_865 [256] = { // MS-DOS: Nordic
-    0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
-    0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
-    0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
-    0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
-    0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
-    0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
-    0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
-    0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
-    0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7, 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5,
-    0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9, 0x00FF, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x20A7, 0x0192,
-    0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA, 0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00A4,
-    0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
-    0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
-    0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
-    0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4, 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
-    0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0,
-};
-
-static unsigned short  CP_874 [256] = { // MSDOS: Thai
-    0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
-    0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
-    0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
-    0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
-    0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
-    0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
-    0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
-    0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
-    0x20AC, 0x0081, 0x0082, 0x0083, 0x0084, 0x2026, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
-    0x0090, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
-    0x00A0, 0x0E01, 0x0E02, 0x0E03, 0x0E04, 0x0E05, 0x0E06, 0x0E07, 0x0E08, 0x0E09, 0x0E0A, 0x0E0B, 0x0E0C, 0x0E0D, 0x0E0E, 0x0E0F,
-    0x0E10, 0x0E11, 0x0E12, 0x0E13, 0x0E14, 0x0E15, 0x0E16, 0x0E17, 0x0E18, 0x0E19, 0x0E1A, 0x0E1B, 0x0E1C, 0x0E1D, 0x0E1E, 0x0E1F,
-    0x0E20, 0x0E21, 0x0E22, 0x0E23, 0x0E24, 0x0E25, 0x0E26, 0x0E27, 0x0E28, 0x0E29, 0x0E2A, 0x0E2B, 0x0E2C, 0x0E2D, 0x0E2E, 0x0E2F,
-    0x0E30, 0x0E31, 0x0E32, 0x0E33, 0x0E34, 0x0E35, 0x0E36, 0x0E37, 0x0E38, 0x0E39, 0x0E3A, 0xF8C1, 0xF8C2, 0xF8C3, 0xF8C4, 0x0E3F,
-    0x0E40, 0x0E41, 0x0E42, 0x0E43, 0x0E44, 0x0E45, 0x0E46, 0x0E47, 0x0E48, 0x0E49, 0x0E4A, 0x0E4B, 0x0E4C, 0x0E4D, 0x0E4E, 0x0E4F,
-    0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57, 0x0E58, 0x0E59, 0x0E5A, 0x0E5B, 0xF8C5, 0xF8C6, 0xF8C7, 0xF8C8,
-};
-
-static unsigned short  CP_1250 [256] = { // Windows: Latin 2
-    0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
-    0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
-    0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
-    0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
-    0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
-    0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
-    0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
-    0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
-    0x20AC, 0x0081, 0x201A, 0x0083, 0x201E, 0x2026, 0x2020, 0x2021, 0x0088, 0x2030, 0x0160, 0x2039, 0x015A, 0x0164, 0x017D, 0x0179,
-    0x0090, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x0098, 0x2122, 0x0161, 0x203A, 0x015B, 0x0165, 0x017E, 0x017A,
-    0x00A0, 0x02C7, 0x02D8, 0x0141, 0x00A4, 0x0104, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x015E, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x017B,
-    0x00B0, 0x00B1, 0x02DB, 0x0142, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x0105, 0x015F, 0x00BB, 0x013D, 0x02DD, 0x013E, 0x017C,
-    0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7, 0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E,
-    0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7, 0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF,
-    0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7, 0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F,
-    0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7, 0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9,
-};
-
-static unsigned short  CP_1251 [256] = { // Windows: Cyrillic
-    0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
-    0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
-    0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
-    0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
-    0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
-    0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
-    0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
-    0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
-    0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021, 0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F,
-    0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x0098, 0x2122, 0x0459, 0x203A, 0x045A, 0x045C, 0x045B, 0x045F,
-    0x00A0, 0x040E, 0x045E, 0x0408, 0x00A4, 0x0490, 0x00A6, 0x00A7, 0x0401, 0x00A9, 0x0404, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x0407,
-    0x00B0, 0x00B1, 0x0406, 0x0456, 0x0491, 0x00B5, 0x00B6, 0x00B7, 0x0451, 0x2116, 0x0454, 0x00BB, 0x0458, 0x0405, 0x0455, 0x0457,
-    0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
-    0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
-    0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
-    0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
-};
-
-static unsigned short  CP_1252 [256] = { // Windows: Latin 1
-    0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
-    0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
-    0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
-    0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
-    0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
-    0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
-    0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
-    0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
-    0x20AC, 0x0081, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x008D, 0x017D, 0x008F,
-    0x0090, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x009D, 0x017E, 0x0178,
-    0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
-    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
-    0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
-    0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
-    0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
-    0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF,
-};
-
-static unsigned short  CP_1253 [256] = { // Windows: Greek
-    0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
-    0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
-    0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
-    0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
-    0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
-    0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
-    0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
-    0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
-    0x20AC, 0x0081, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x0088, 0x2030, 0x008A, 0x2039, 0x008C, 0x008D, 0x008E, 0x008F,
-    0x0090, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x0098, 0x2122, 0x009A, 0x203A, 0x009C, 0x009D, 0x009E, 0x009F,
-    0x00A0, 0x0385, 0x0386, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0xF8F9, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x2015,
-    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x00B5, 0x00B6, 0x00B7, 0x0388, 0x0389, 0x038A, 0x00BB, 0x038C, 0x00BD, 0x038E, 0x038F,
-    0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
-    0x03A0, 0x03A1, 0xF8FA, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF,
-    0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
-    0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0xF8FB,
-};
-
-static unsigned short  CP_1254 [256] = { // Windows: Latin 5
-    0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
-    0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
-    0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
-    0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
-    0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
-    0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
-    0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
-    0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
-    0x20AC, 0x0081, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x008D, 0x008E, 0x008F,
-    0x0090, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x009D, 0x009E, 0x0178,
-    0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
-    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
-    0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
-    0x011E, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x0130, 0x015E, 0x00DF,
-    0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
-    0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF,
-};
-
-static unsigned short  CP_1255 [256] = { // Windows: Hebrew
-    0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
-    0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
-    0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
-    0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
-    0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
-    0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
-    0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
-    0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
-    0x20AC, 0x0081, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x02C6, 0x2030, 0x008A, 0x2039, 0x008C, 0x008D, 0x008E, 0x008F,
-    0x0090, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x02DC, 0x2122, 0x009A, 0x203A, 0x009C, 0x009D, 0x009E, 0x009F,
-    0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AA, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x00D7, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
-    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x00B9, 0x00F7, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
-    0x05B0, 0x05B1, 0x05B2, 0x05B3, 0x05B4, 0x05B5, 0x05B6, 0x05B7, 0x05B8, 0x05B9, 0x05BA, 0x05BB, 0x05BC, 0x05BD, 0x05BE, 0x05BF,
-    0x05C0, 0x05C1, 0x05C2, 0x05C3, 0x05F0, 0x05F1, 0x05F2, 0x05F3, 0x05F4, 0xF88D, 0xF88E, 0xF88F, 0xF890, 0xF891, 0xF892, 0xF893,
-    0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7, 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
-    0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7, 0x05E8, 0x05E9, 0x05EA, 0xF894, 0xF895, 0x200E, 0x200F, 0xF896,
-};
-
-static unsigned short  CP_1256 [256] = { // Windows: Arabic
-    0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
-    0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
-    0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
-    0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
-    0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
-    0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
-    0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
-    0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
-    0x20AC, 0x067E, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x02C6, 0x2030, 0x0679, 0x2039, 0x0152, 0x0686, 0x0698, 0x0688,
-    0x06AF, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x06A9, 0x2122, 0x0691, 0x203A, 0x0153, 0x200C, 0x200D, 0x06BA,
-    0x00A0, 0x060C, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x06BE, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
-    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x00B9, 0x061B, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x061F,
-    0x06C1, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, 0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F,
-    0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x00D7, 0x0637, 0x0638, 0x0639, 0x063A, 0x0640, 0x0641, 0x0642, 0x0643,
-    0x00E0, 0x0644, 0x00E2, 0x0645, 0x0646, 0x0647, 0x0648, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0649, 0x064A, 0x00EE, 0x00EF,
-    0x064B, 0x064C, 0x064D, 0x064E, 0x00F4, 0x064F, 0x0650, 0x00F7, 0x0651, 0x00F9, 0x0652, 0x00FB, 0x00FC, 0x200E, 0x200F, 0x06D2,
-};
-
-static unsigned short  CP_1257 [256] = { // Windows: Baltic
-    0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
-    0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
-    0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
-    0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
-    0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
-    0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
-    0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
-    0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
-    0x20AC, 0x0081, 0x201A, 0x0083, 0x201E, 0x2026, 0x2020, 0x2021, 0x0088, 0x2030, 0x008A, 0x2039, 0x008C, 0x00A8, 0x02C7, 0x00B8,
-    0x0090, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x0098, 0x2122, 0x009A, 0x203A, 0x009C, 0x00AF, 0x02DB, 0x009F,
-    0x00A0, 0xF8FC, 0x00A2, 0x00A3, 0x00A4, 0xF8FD, 0x00A6, 0x00A7, 0x00D8, 0x00A9, 0x0156, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00C6,
-    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00F8, 0x00B9, 0x0157, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00E6,
-    0x0104, 0x012E, 0x0100, 0x0106, 0x00C4, 0x00C5, 0x0118, 0x0112, 0x010C, 0x00C9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012A, 0x013B,
-    0x0160, 0x0143, 0x0145, 0x00D3, 0x014C, 0x00D5, 0x00D6, 0x00D7, 0x0172, 0x0141, 0x015A, 0x016A, 0x00DC, 0x017B, 0x017D, 0x00DF,
-    0x0105, 0x012F, 0x0101, 0x0107, 0x00E4, 0x00E5, 0x0119, 0x0113, 0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C,
-    0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7, 0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x02D9,
-};
-
-static unsigned short  CP_1258 [256] = { // Windows: Vietnam
-    0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
-    0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
-    0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
-    0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
-    0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
-    0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
-    0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
-    0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
-    0x20AC, 0x0081, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x02C6, 0x2030, 0x008A, 0x2039, 0x0152, 0x008D, 0x008E, 0x008F,
-    0x0090, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x02DC, 0x2122, 0x009A, 0x203A, 0x0153, 0x009D, 0x009E, 0x0178,
-    0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
-    0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
-    0x00C0, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x00C5, 0x00C6, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x0300, 0x00CD, 0x00CE, 0x00CF,
-    0x0110, 0x00D1, 0x0309, 0x00D3, 0x00D4, 0x01A0, 0x00D6, 0x00D7, 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x01AF, 0x0303, 0x00DF,
-    0x00E0, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x00E5, 0x00E6, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0301, 0x00ED, 0x00EE, 0x00EF,
-    0x0111, 0x00F1, 0x0323, 0x00F3, 0x00F4, 0x01A1, 0x00F6, 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x01B0, 0x20AB, 0x00FF,
-};
-
-static unsigned short  CP_10000 [256] = { // Apple Macintosh
-    0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
-    0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
-    0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
-    0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
-    0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
-    0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
-    0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
-    0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
-    0x00C4, 0x00C5, 0x00C7, 0x00C9, 0x00D1, 0x00D6, 0x00DC, 0x00E1, 0x00E0, 0x00E2, 0x00E4, 0x00E3, 0x00E5, 0x00E7, 0x00E9, 0x00E8,
-    0x00EA, 0x00EB, 0x00ED, 0x00EC, 0x00EE, 0x00EF, 0x00F1, 0x00F3, 0x00F2, 0x00F4, 0x00F6, 0x00F5, 0x00FA, 0x00F9, 0x00FB, 0x00FC,
-    0x2020, 0x00B0, 0x00A2, 0x00A3, 0x00A7, 0x2022, 0x00B6, 0x00DF, 0x00AE, 0x00A9, 0x2122, 0x00B4, 0x00A8, 0x2260, 0x00C6, 0x00D8,
-    0x221E, 0x00B1, 0x2264, 0x2265, 0x00A5, 0x00B5, 0x2202, 0x2211, 0x220F, 0x03C0, 0x222B, 0x00AA, 0x00BA, 0x2126, 0x00E6, 0x00F8,
-    0x00BF, 0x00A1, 0x00AC, 0x221A, 0x0192, 0x2248, 0x2206, 0x00AB, 0x00BB, 0x2026, 0x00A0, 0x00C0, 0x00C3, 0x00D5, 0x0152, 0x0153,
-    0x2013, 0x2014, 0x201C, 0x201D, 0x2018, 0x2019, 0x00F7, 0x25CA, 0x00FF, 0x0178, 0x2044, 0x20AC, 0x2039, 0x203A, 0xFB01, 0xFB02,
-    0x2021, 0x00B7, 0x201A, 0x201E, 0x2030, 0x00C2, 0x00CA, 0x00C1, 0x00CB, 0x00C8, 0x00CD, 0x00CE, 0x00CF, 0x00CC, 0x00D3, 0x00D4,
-    0xF8FF, 0x00D2, 0x00DA, 0x00DB, 0x00D9, 0x0131, 0x02C6, 0x02DC, 0x00AF, 0x02D8, 0x02D9, 0x02DA, 0x00B8, 0x02DD, 0x02DB, 0x02C7,
-};
-
-static unsigned short  CP_10079 [256] = { // ???
-    0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
-    0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
-    0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
-    0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
-    0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
-    0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
-    0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
-    0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
-    0x00C4, 0x00C5, 0x00C7, 0x00C9, 0x00D1, 0x00D6, 0x00DC, 0x00E1, 0x00E0, 0x00E2, 0x00E4, 0x00E3, 0x00E5, 0x00E7, 0x00E9, 0x00E8,
-    0x00EA, 0x00EB, 0x00ED, 0x00EC, 0x00EE, 0x00EF, 0x00F1, 0x00F3, 0x00F2, 0x00F4, 0x00F6, 0x00F5, 0x00FA, 0x00F9, 0x00FB, 0x00FC,
-    0x00DD, 0x00B0, 0x00A2, 0x00A3, 0x00A7, 0x2022, 0x00B6, 0x00DF, 0x00AE, 0x00A9, 0x2122, 0x00B4, 0x00A8, 0x2260, 0x00C6, 0x00D8,
-    0x221E, 0x00B1, 0x2264, 0x2265, 0x00A5, 0x00B5, 0x2202, 0x2211, 0x220F, 0x03C0, 0x222B, 0x00AA, 0x00BA, 0x2126, 0x00E6, 0x00F8,
-    0x00BF, 0x00A1, 0x00AC, 0x221A, 0x0192, 0x2248, 0x2206, 0x00AB, 0x00BB, 0x2026, 0x00A0, 0x00C0, 0x00C3, 0x00D5, 0x0152, 0x0153,
-    0x2013, 0x2014, 0x201C, 0x201D, 0x2018, 0x2019, 0x00F7, 0x25CA, 0x00FF, 0x0178, 0x2044, 0x00A4, 0x00D0, 0x00F0, 0x00DE, 0x00FE,
-    0x00FD, 0x00B7, 0x201A, 0x201E, 0x2030, 0x00C2, 0x00CA, 0x00C1, 0x00CB, 0x00C8, 0x00CD, 0x00CE, 0x00CF, 0x00CC, 0x00D3, 0x00D4,
-    0xF8FF, 0x00D2, 0x00DA, 0x00DB, 0x00D9, 0x0131, 0x02C6, 0x02DC, 0x00AF, 0x02D8, 0x02D9, 0x02DA, 0x00B8, 0x02DD, 0x02DB, 0x02C7,
-};
-
-#endif
-
-
-/*
- *  Resets Item Counter
- *  Do not frees any memory.
- */
-
-void
-Init_Tags ( void )
-{
-    TagCount = 0;
-}
-
-
-static unsigned char*
-utf8char ( unsigned char* dst, unsigned long value )
-{
-    if      ( value == '\r'  ||  value == 0xFFFE  ||  value == 0xFFFF ) {
-        ;
-    }
-    else if ( value < 0x80 ) {
-        *dst++ = value;
-    }
-    else if ( value < 0x800 ) {
-        *dst++ = 0xC0 + ((value >>  6) & 0x1F);
-        *dst++ = 0x80 + ((value >>  0) & 0x3F);
-    }
-    else if ( value < 0x10000 ) {
-        *dst++ = 0xE0 + ((value >> 12) & 0x0F);
-        *dst++ = 0x80 + ((value >>  6) & 0x3F);
-        *dst++ = 0x80 + ((value >>  0) & 0x3F);
-    }
-    else if ( value < 0x200000 ) {
-        *dst++ = 0xF0 + ((value >> 18) & 0x07);
-        *dst++ = 0x80 + ((value >> 12) & 0x3F);
-        *dst++ = 0x80 + ((value >>  6) & 0x3F);
-        *dst++ = 0x80 + ((value >>  0) & 0x3F);
-    }
-    else if ( value < 0x4000000 ) {
-        *dst++ = 0xF8 + ((value >> 24) & 0x03);
-        *dst++ = 0x80 + ((value >> 18) & 0x3F);
-        *dst++ = 0x80 + ((value >> 12) & 0x3F);
-        *dst++ = 0x80 + ((value >>  6) & 0x3F);
-        *dst++ = 0x80 + ((value >>  0) & 0x3F);
-    }
-    else if ( value < 0x80000000 ) {
-        *dst++ = 0xFC + ((value >> 30) & 0x01);
-        *dst++ = 0x80 + ((value >> 24) & 0x3F);
-        *dst++ = 0x80 + ((value >> 18) & 0x3F);
-        *dst++ = 0x80 + ((value >> 12) & 0x3F);
-        *dst++ = 0x80 + ((value >>  6) & 0x3F);
-        *dst++ = 0x80 + ((value >>  0) & 0x3F);
-    }
-
-    return dst;
-}
-
-
-/*
- *  IsUnicode()
- *
- *  Gets a memory block and tries to find out whether this is binary data or a valid Windows Unicode file.
- *  When return 1, it is very likely (but not 100% secure) that the contents is Unicode encoded.
- */
-
-static int
-IsUnicode ( const unsigned char* src, size_t len )
-{
-    if ( len <= 2 )
-        return 0;
-
-    if ( len & 1 )                                              // odd number of bytes?
-        return 0;
-
-    if ( src [0] != 0xFF  ||  src [1] != 0xFE )                 // Microsoft Unicode preample (also useful to detect endianess, but currently only little endian is supported)
-        return 0;
-
-    for ( len >>= 1; len > 0; len--, src += 2 ) {               // Check for invalid codes (FFFE, FFFF, DC00...DFFF without a prepend D800...DBFF, D800...DBFF without a n appended DC00...DFFF)
-        if ( ( src [1] & 0xFC ) == 0xDC )
-            return 0;
-        if ( src [1] == 0xFF  &&  ( src [0] & 0xFE ) == 0xFE )
-            return 0;
-        if ( ( src [1] & 0xFC ) == 0xD8 )
-            if ( len < 2  ||  ( src [3] & 0xFC ) != 0xDC )
-                return 0;
-        else
-            len--, src += 2;
-    }
-
-    return 1;                                                   // good chance to be a UTF-8
-}
-
-/*
- *  addtag()
- *
- *  Add a item to the item list of a tag. Item key is given by (key,keylen), item value by (value,valuelen).
- *
- *  The following value translation modes are possible:
- *    0: no translation at all
- *    1: translate from console charset to UTF-8 (currently ISO-8859-1 for non-Windows and non-DOS OS)
- *    2: auto detect: contents is a valid Window Unicode File => translate to UTF-8, else no translation at all
- *    3: like 1), but convert ';' to null character
- *    4: UTF-16 LE => translate to UTF-8
- *    5: translate from ISO-8859-1 to UTF-8
- *    6: like 1), but convert from OEM codepage (Win32)
- *  (should become an enum)
- *
- *  Note:
- *    Windows 95/98/ME has no usable NLS support
- *
- */
-
-int
-addtag ( const char*           key,             // the item key
-         size_t                keylen,          // length of item key, or 0 for auto-determine
-         const unsigned char*  value,           // the item value
-         size_t                valuelen,        // the length of the item value (before any possible translation)
-         int                   converttoutf8,   // convert flags of item value
-         int                   flags )          // item flags proposal
-{
-    unsigned char*  p;
-    unsigned char*  q;
-    unsigned char   ch;
-    size_t          i;
-#ifdef _WIN32
-    const unsigned short*  CP_ptr;
-    unsigned int           Codepage;
-
-    if ( converttoutf8 == 6 ) {
-        Codepage      = GetOEMCP ();
-        converttoutf8 = 1;
-    } else {
-        Codepage      = GetACP ();
-    }
-
-    switch ( Codepage ) {
-    case CP_ACP:        CP_ptr =  CP_1252; break;
-    case CP_OEMCP:      CP_ptr =   CP_850; break;
-    case CP_MACCP:      CP_ptr = CP_10000; break;
-    case CP_THREAD_ACP: CP_ptr =  CP_1252; break;
-    default:    CP_ptr =   CP_850; break;
-    case    37: CP_ptr =    CP_37; break;
-    case    42: CP_ptr =    CP_42; break;
-    case   437: CP_ptr =   CP_437; break;
-    case   500: CP_ptr =   CP_500; break;
-    case   850: CP_ptr =   CP_850; break;
-    case   860: CP_ptr =   CP_860; break;
-    case   861: CP_ptr =   CP_861; break;
-    case   863: CP_ptr =   CP_863; break;
-    case   865: CP_ptr =   CP_865; break;
-    case   874: CP_ptr =   CP_874; break;
-    case  1250: CP_ptr =  CP_1250; break;
-    case  1251: CP_ptr =  CP_1251; break;
-    case  1252: CP_ptr =  CP_1252; break;
-    case  1253: CP_ptr =  CP_1253; break;
-    case  1254: CP_ptr =  CP_1254; break;
-    case  1255: CP_ptr =  CP_1255; break;
-    case  1256: CP_ptr =  CP_1256; break;
-    case  1257: CP_ptr =  CP_1257; break;
-    case  1258: CP_ptr =  CP_1258; break;
-    case 10000: CP_ptr = CP_10000; break;
-    case 10079: CP_ptr = CP_10079; break;
-    }
-#endif
-
-
-    if ( converttoutf8 == 2  &&  IsUnicode ( value, valuelen ) ) {
-        converttoutf8 = 4;
-        value        += 2;                      // remove first two bytes (zero width space 0xFEFF)
-        valuelen      = ( valuelen - 2) >> 1;
-        flags        &= ~2;                     // reset binary flag (it's now text)
-    }
-
-    if ( keylen == 0 )
-        keylen = strlen ( key );
-
-    p = malloc ( keylen );
-    memcpy ( p, key, keylen );
-    T [TagCount] . key    = p;
-    T [TagCount] . keylen = keylen;
-
-    switch ( converttoutf8 ) {
-    default:
-        p = malloc ( 1 * valuelen );    // copy
-        break;
-    case 1:                             // at most 1 native character => 3 UTF bytes
-    case 4:                             // at 1 wide => 3, 2 wide => 4
-        p = malloc ( 3 * valuelen );
-        break;
-    }
-
-    q = p;
-
-    for ( i = 0; i < valuelen; i++ ) {
-        ch = value [i];
-        switch ( converttoutf8 ) {
-        default:                        // 0: no translation at all --or-- 2: auto detect: contents is a valid Window Unicode File => translate to UTF-8, else no translation at all
-            *q++ = ch;
-            break;
-
-        case 5:                         // 5: translate from ISO-8859-1 to UTF-8
-            q = utf8char ( q, ch );
-            break;
-
-        case 3:                         // 3: like 1), but convert ';' to null character
-            if ( ch == ';' )
-                ch = '\0';
-            /* fall through */
-
-        case 1:                         // 1: translate from console charset to UTF-8 (currently ISO-8859-1 for non-Windows and non-DOS OS)
-#if defined __TURBOC__
-            q = utf8char ( q, CP_850 [ch] );
-#elif defined _WIN32
-            // fprintf ( stderr, "%c  %02X  U+%04X\n", ch, ch, CP_ptr [ch] );
-            q = utf8char ( q, CP_ptr [ch] );
-#elif defined USE_WIDECHAR
-            {
-            int      ret;
-            wchar_t  wch = 0;
-            ret = mbtowc ( &wch, value + i, valuelen - i );
-            if ( ret > 0 )
-                q = utf8char ( q, wch ), i += ret - 1;
-            }
-#else
-            q = utf8char ( q, ch );
-#endif
-            break;
-
-        case 4:                         // 4: UTF-16 LE => translate to UTF-8
-            if ( (value [i+i+1] & 0xFC ) == 0xD8  &&  (value [i+i+3] & 0xFC ) == 0xDC ) {   // UTF-16 code (2x16 bit for Unicodes 0x010000...0x10FFFF)
-                q = utf8char ( q, ((value [i+i] + (value [i+i+1] << 8) - 0xD800) << 10) + (value [i+i+2] + (value [i+i+3] << 8) - 0xDC00) + 0x10000 );
-                i++;
-            }
-            else {
-                q = utf8char ( q, value [i+i] + (value [i+i+1] << 8) );
-            }
-            break;
-        }
-    }
-
-    p = realloc ( p, valuelen = q-p );
-
-    for ( i = 0; i < TagCount; i++ )
-        if ( T [i].keylen == T [TagCount].keylen  &&  0 == memcmp (T [i].key, T [TagCount].key, T [i].keylen ) ) {    // found old tag with the same name => replace
-            free ( T [TagCount].key   );
-            free ( T [i].value );
-            goto set;
-        }
-
-    i = TagCount++;
-set:
-    T [i] . value    = p;
-    T [i] . valuelen = valuelen;
-    T [i] . flags    = flags;
-    return 0;
-}
-
-
-static int Cdecl
-cmpfn2 ( const void* p1, const void* p2 )
-{
-    const TagItem_t*  q1 = (TagItem_t*) p1;
-    const TagItem_t*  q2 = (TagItem_t*) p2;
-
-    return q1 -> valuelen - q2 -> valuelen;
-}
-
-/*
- *  Writes collect tag items and write it to a file.
- *  Items are destroyed, so tags can only be written once.
- */
-
-int
-FinalizeTags ( FILE* fp, unsigned int Version )
-{
-    static unsigned char  H [32] = "APETAGEX";
-    unsigned char         dw [8];
-    unsigned long         estimatedbytes =  32; // 32 byte footer + all items, these are the 32 bytes footer, the items are added later
-    unsigned long         writtenbytes   = -32; // actually writtenbytes-32, which should be equal to estimatedbytes (= footer + all items)
-    unsigned int          i;
-
-    if ( TagCount == 0 )
-        return 0;
-
-    qsort ( T, TagCount, sizeof (*T), cmpfn2 );
-
-    for ( i = 0; i < TagCount; i++ )
-        estimatedbytes += 9 + T[i] . keylen + T[i] . valuelen;
-
-    if ( estimatedbytes >= 8192 + 103 )
-        stderr_printf ( "\nTag is %.1f Kbyte long. This is longer than the maximum recommended 8 KByte.\n\a", estimatedbytes/1024. );
-
-    H [ 8] = Version >>  0;
-    H [ 9] = Version >>  8;
-    H [10] = Version >> 16;
-    H [11] = Version >> 24;
-    H [12] = estimatedbytes >>  0;
-    H [13] = estimatedbytes >>  8;
-    H [14] = estimatedbytes >> 16;
-    H [15] = estimatedbytes >> 24;
-    H [16] = TagCount >>  0;
-    H [17] = TagCount >>  8;
-    H [18] = TagCount >> 16;
-    H [19] = TagCount >> 24;
-
-    H [23] = 0x80 | 0x20;
-    writtenbytes += fwrite ( H, 1, 32, fp );
-
-    for ( i = 0; i < TagCount; i++ ) {
-        dw [0] = T [i] . valuelen >>  0;
-        dw [1] = T [i] . valuelen >>  8;
-        dw [2] = T [i] . valuelen >> 16;
-        dw [3] = T [i] . valuelen >> 24;
-        dw [4] = T [i] . flags >>  0;
-        dw [5] = T [i] . flags >>  8;
-        dw [6] = T [i] . flags >> 16;
-        dw [7] = T [i] . flags >> 24;
-        writtenbytes += fwrite ( dw        , 1, 8            , fp );
-        writtenbytes += fwrite ( T[i].key  , 1, T[i].keylen  , fp );
-        writtenbytes += fwrite ( ""        , 1, 1            , fp );
-        if ( T[i].valuelen > 0 )
-            writtenbytes += fwrite ( T[i].value, 1, T[i].valuelen, fp );
-        if ( T[i].key != NULL )
-            free ( T[i].key   );
-        if ( T[i].value != NULL )
-            free ( T[i].value );
-    }
-
-    H [23] = 0x80;
-    writtenbytes += fwrite ( H, 1, 32, fp );
-
-    if ( estimatedbytes != writtenbytes )
-        stderr_printf ( "\nError writing APE tag.\n" );
-
-    TagCount = 0;
-    return 0;
-}
-
-
-static int
-TagKeyExists ( const char* key, size_t keylen )
-{
-    unsigned int  i;
-
-    if ( keylen == 0 )
-        keylen = strlen ( key );
-
-    for ( i = 0; i < TagCount; i++ )
-        if ( T [i].keylen == keylen  &&  0 == memcmp (T [i].key, key, keylen ) )
-            return 1;
-
-    return 0;
-}
-
-
-/*
- *  Copies src to dst. Copying is stopped at `\0' char is detected or if
- *  len chars are copied.
- *  Trailing blanks are removed and the string is `\0` terminated.
- */
-
-static void
-memcpy_crop ( const char* key, char* src, size_t len, int flags )
-{
-    while ( len > 0  &&  ( src [len-1] == ' '  ||  src [len-1] == '\0' ) )
-        len--;
-
-    if ( len > 0 )
-        if ( ! TagKeyExists ( key, 0 ) )
-            addtag ( key, 0, src, len, 1, flags );
-}
-
-
-static int
-CopyTags_ID3 ( FILE* fp )
-{
-    Uint8_t  tmp [128];
-
-    if ( -1 == SEEK ( fp, -128L, SEEK_END ) )
-        return -1;
-
-    if ( 128 != READ ( fp, tmp, 128 ) )
-        return -1;
-
-    if ( 0 != memcmp ( tmp, "TAG", 3 ) ) {
-        return -1;
-    }
-
-    if ( !tmp[3]  &&  !tmp[33]  &&  !tmp[63]  &&  !tmp[93]  &&  !tmp[97] )
-        return -1;
-
-    memcpy_crop  ( "Title"  , tmp +  3, 30, 0 );
-    memcpy_crop  ( "Artist" , tmp + 33, 30, 0 );
-    memcpy_crop  ( "Album"  , tmp + 63, 30, 0 );
-    memcpy_crop  ( "Year"   , tmp + 93,  4, 0 );
-    memcpy_crop  ( "Comment", tmp + 97, 30, 0 );
-
-    if ( tmp[127] < sizeof(GenreList)/sizeof(*GenreList) )
-        if ( ! TagKeyExists ( "Genre", 0 ) )
-            addtag ("Genre", 0, GenreList [tmp[127]], strlen (GenreList [tmp[127]]), 0, 0 );
-
-    if ( tmp[125] == 0  &&  tmp[126] != 0 )
-        if ( ! TagKeyExists ( "Track", 0 ) ) {
-            sprintf ( tmp, "%u",  tmp[126] );
-            addtag ("Track", 0, tmp, strlen (tmp), 0, 0 );
-        }
-
-    return 0;
-}
-
-
-static unsigned int
-Read_LE_Uint32 ( const unsigned char* p )
-{
-    return ((Uint32_t)p[0] <<  0) |
-           ((Uint32_t)p[1] <<  8) |
-           ((Uint32_t)p[2] << 16) |
-           ((Uint32_t)p[3] << 24);
-}
-
-
-static int
-CopyTags_APE ( FILE* fp )
-{
-    Uint32_t                   len;
-    Uint32_t                   flags;
-    unsigned char              buff [32768];
-    unsigned char              key [257];
-    unsigned char*             p;
-    struct APETagFooterStruct  T;
-    Uint32_t                   TagLen;
-    Uint32_t                   TagCount;
-    Uint32_t                   tmp;
-
-    if ( -1 == SEEK ( fp, -(long)sizeof T, SEEK_END ) )
-        return -1;
-    if ( sizeof(T) != READ ( fp, &T, sizeof T ) )
-        return -1;
-    if ( memcmp ( T.ID, "APETAGEX", sizeof(T.ID) ) != 0 )
-        return -1;
-    tmp = Read_LE_Uint32 (T.Version);
-    if (  tmp != 1000  &&  tmp != 2000 )
-        return -1;
-    TagLen = Read_LE_Uint32 (T.Length);
-    if ( TagLen <= sizeof T )
-        return -1;
-    if ( -1 == SEEK ( fp, -(long)TagLen, SEEK_END ) )
-        return -1;
-    memset ( buff, 0, sizeof(buff) );
-    if ( TagLen - sizeof T != READ ( fp, buff, TagLen - sizeof T ) )
-        return -1;
-
-    TagCount = Read_LE_Uint32 (T.TagCount);
-    for ( p = buff; TagCount--; ) {
-        len   = Read_LE_Uint32 ( p );        p += 4;
-        flags = Read_LE_Uint32 ( p );        p += 4;
-        strcpy ( key, p );                   p += strlen (key) + 1;
-        if ( ! TagKeyExists ( key, 0 ) )
-            addtag ( key, 0, p, len > 0  &&  p [len-1] == '\0'  ?  len-1  :  len, 5, flags );
-                                             p += len;
-    }
-
-    return 0;
-}
-
-static void
-FullPathName ( char* dst, size_t dstlen, const char* filename )         // Can contain stuff like ".." and "."
-{
-    const char*  p;
-    char*        q     = dst;
-
-#if DRIVE_SEP != '\0'
-    int          drive = 0;
-
-    if ( isalpha (filename[0])  &&  filename[1] == DRIVE_SEP  &&  filename[2] != PATH_SEP ) {
-        drive     = filename[0] & 0x1F;
-        filename += 2;
-    }
-#endif
-
-    if ( filename[0] != PATH_SEP ) {
-#ifdef _WIN32
-        _getdcwd( drive, dst, dstlen );
-#else
-        getcwd ( dst, dstlen );
-#endif
-        q += strlen (q);
-#ifdef _WIN32
-        if ( dst[0] != PATH_SEP  ||  dst[1] != '\0' )
-#else
-        if ( dst[2] != PATH_SEP  ||  dst[3] != '\0' )
-#endif
-            *q++ = PATH_SEP;
-    }
-
-    strcpy ( q, filename );
-    return;
-}
-
-/********************************************************************************************/
-
-/*
-
-" "                             ' '
-" - "                           '-'
-"."                             '.'
-"/"                             '/'
-" -- "                          '_'
-"[#0]"                          '0'
-"[#n]"  [number]                'n'
-"#n"    number                  'M'
-"(#N)"  (CD x)                  'N'             it should also be possible: (CD x/x), (DVD x), (DVD x/x)
-"#A"    Artist                  'A'
-"#C"    CD/Album                'C'
-"#T"    Title                   'T'
-"#x"    extention               'x'
-
-
-/#C -- [#n] #A -- #T#x      | Acid Jazz/100% Acid Jazz -- [04] Leena Conquest (and Hip Hop Fingers) -- Boundaries (Radio Edit).pac
-/#A/#C -- [#n] #T#x         | Andreas Vollenweider/Eolian Minstrel -- [02] Across the Iron River.pac
-/#A/#C#N -- [#n] #T#x       | Barbra Streisand/The Concert (CD 1) -- [01] Overture
-/#A -- #C -- [#n] #T#x      | Friedemann/Friedemann -- Aquamarin -- [09] In the Court of the Mermaid.pac
-/#C/[#n] #A -- #T#x         | Jazz Lyrik Prosa/[11] Eberhard Esche -- Anektode.pac
-/#A -- #T#x                 | Lais/Lais -- 06.pac
-/#C/(#N) -- [#n] #A -- #T#x | Tanz- und Folkfest 2001 -- Klingende Post/(CD 2) -- [09] Andy Irvine -- Gladiators.pac
-/#A -- #C -- [#0]#x         | Friedemann/Friedemann -- Aquamarin -- [00].pac
-/#A/#C (#N) -- [#0]#x       | Tangerine Dream/The Warsaw Concert (CD 2) -- [00].pac
-/#A/#T#x                    | Heinz-Rudolf Kunze/Dein ist mein ganzes Herz.pac
-/#A/#C -- [#0]#x            | Sting/Nada como el Sol -- [00].mpc
-
-*/
-
-static const char* const  parser_strings [] = {
-    "/A_Tx",
-    "/A/Tx",
-    "/A_C_0x",
-    "/C_n A_Tx",
-    "/A/C_n Tx",
-    "/A/C N_n Tx",
-    "/A_C_n Tx",
-    "/C/n A_Tx",
-    "/C/N_n A_Tx",
-    "/A/C N_0x",
-    "/A/C_0x",
-};
-
-
-static void
-copy ( char* dst, const char* src, size_t len )
-{
-    memcpy ( dst, src, len );
-    dst [len] = '\0';
-}
-
-/*
- *    dst[0] = Artist
- *    dst[1] = CD
- *    dst[2] = Title
- *    dst[3] = +CD
- *    dst[4] = number
- *    dst[5] = ext
- */
-
-static int
-parse ( char** dst, const char* src, const char* format )
-{
-    int          i;
-    const char*  srcend = src + strlen(src);
-    const char*  p;
-    char*        q;
-
-    for ( i = 0; i < 6; i++)
-        dst[i][0] = '\0';
-
-    for ( i = strlen(format); i-- > 0; ) {
-        p = srcend;
-        stderr_printf ( "%c: ", format[i] );
-
-        switch ( format[i] ) {
-        case '.':
-        case ' ':
-        case '/':                               // !!!!!!!
-            if (p[-1] != format[i])
-                return 1;
-            p--;
-            break;
-        case '_':
-            if (0 != memcmp (p-4, " -- ", 4))
-                return 1;
-            p -= 4;
-            break;
-        case '-':
-            if (0 != memcmp (p-3, " - ", 3))
-                return 1;
-            p -= 3;
-            break;
-        case '0':
-            if (p[-1] != ']' || p[-2] != '0' || p[-3] != '0' || p[-4] != '[')
-                return 1;
-            p -= 4;
-            break;
-        case 'n':
-            if (p[-1] != ']' || !isdigit(p[-2]) || !isdigit(p[-3]) || p[-4] != '[')
-                return 1;
-            copy (dst[4], p-3, 2);
-            p -= 4;
-            break;
-        case 'M':
-            if ( !isdigit(p[-1]) || !isdigit(p[-2]) )
-                return 1;
-            copy (dst[4], p-2, 2);
-            p -= 2;
-            break;
-        case 'N':
-            if (p[-1] != ')' || !isdigit(p[-2]) || p[-3] != ' ' || p[-4] != 'D' || p[-5] != 'C' || p[-6] != '(')
-                return 1;
-            dst[3][0] = ' ';
-            copy (dst[3]+1, p-6, 6);
-            p -= 6;
-            break;
-        case 'A':
-            q = dst[0]; goto big;
-        case 'C':
-            q = dst[1]; goto big;
-        case 'T':
-            q = dst[2]; goto big;
-        big:
-            while ( 0 == memcmp (p-4, "/mpc", 4)  ||
-                    0 == memcmp (p-4, "/mp3", 4)  ||
-                    0 == memcmp (p-4, "/pac", 4)  ||
-                    0 == memcmp (p-4, "/ape", 4)  ||
-                    0 == memcmp (p-4, "/pac", 4)  ||
-                    0 == memcmp (p-3, "/.." , 3)  ||
-                    0 == memcmp (p-2, "/."  , 2)
-                  ) {
-                      do {
-                          p--;
-                          srcend--;
-                      } while ( *p != PATH_SEP );
-                }
-            while ( p[-1] != PATH_SEP  &&
-                    p[-1] != DRIVE_SEP &&
-                    0 != memcmp (p-4, " -- ", 4 )  &&
-                    (p[-1] != ')' || !isdigit(p[-2]) || p[-3] != ' ' || p[-4] != 'D' || p[-5] != 'C' || p[-6] != '(')  &&
-                    (p[-1] != ' ' || p[-2] != ']' || !isdigit(p[-3]) || !isdigit(p[-4]) || p[-5] != '[') &&
-                    (p[-1] != ']' || p[-2] != '0' || p[-3] != '0' || p[-4] != '[')
-                  )
-                p--;
-            copy ( q, p, srcend - p );
-            break;
-        case 'x':
-            do {
-                p--;
-                if (p[0] == PATH_SEP || p[0] == DRIVE_SEP)
-                    return -1;
-            } while (*p != '.');
-            copy (dst[5], p, srcend-p );
-            break;
-        }
-        stderr_printf ( "%*.*s\033[7m%*.*s\033[0m\n", p-src, p-src, src, srcend-p, srcend-p, p );
-        srcend = p;
-    }
-    return 0;
-}
-
-static int
-hexdigit ( const char s )
-{
-    if ( (unsigned char)(s-'0') < 10u )
-        return s-'0';
-    if ( (unsigned char)(s-'A') <  6u )
-        return s-'A'+10;
-    return -1;
-}
-
-static void
-spaceconverting ( char* dst, const char* src )          // can work inplace
-{
-    for ( ; src[0] != '\0' ; src++) {
-        if      ( src[0] == '_' )
-            *dst++ = ' ';
-        else if ( src[0] == '%'  &&  hexdigit(src[1]) >= 0  &&  hexdigit(src[2]) >= 0 )
-            *dst++ = hexdigit(src[1]) * 16 + hexdigit(src[2]), src += 2;
-        else
-            *dst++ = *src;
-    }
-    *dst = '\0';
-}
-
-
-static void
-Parser ( const char* src )
-{
-    size_t  i;
-    char    tmp  [6] [1024];
-    char*   buff [6] = { tmp[0], tmp[1], tmp[2], tmp[3], tmp[4], tmp[5] };
-    char    merge [1024];
-    char*   q;
-
-    stderr_printf ( "\n  »%s«\n", src );
-    for ( i = 0; i < sizeof(parser_strings)/sizeof(*parser_strings); i++ ) {
-        if ( 0 == parse ( buff, src, parser_strings[i] ) ) {
-            sprintf ( merge, "%s%s", tmp[1], tmp[3] );
-            q = merge + strlen (merge);
-
-            if ( q-7 >= merge  &&  q[-7]==' '  &&  q[-6]=='('  && atoi(q-5) >= 1900  &&  atoi(q-5) < 2050  &&  q[-1] == ')' ) {
-                q[-1] = '\0';
-                q[-7] = '\0';
-                q -= 5;
-            }
-            else {
-                q = NULL;
-            }
-
-            spaceconverting ( tmp[0], tmp[0] );
-            spaceconverting ( merge , merge );
-            spaceconverting ( tmp[2], tmp[2] );
-            spaceconverting ( tmp[4], tmp[4] );
-            spaceconverting ( tmp[5], tmp[5] );
-
-            stderr_printf ("\n");
-            stderr_printf ("Artist = »%s«\n", tmp[0] );
-            stderr_printf ("CD     = »%s«\n", merge  );
-            stderr_printf ("Title  = »%s«\n", tmp[2] );
-            stderr_printf ("No#    = »%s«\n", tmp[4] );
-            stderr_printf ("Extent = »%s«\n", tmp[5] );
-            stderr_printf ("Year   = »%s«\n", q  ?  q  :  "????" );
-#if 1
-            if ( tmp[0][0]  &&  ! TagKeyExists ( "Artist", 0 ) ) addtag ( "Artist", 0, tmp[0], strlen (tmp[0]), 5, 0 );
-            if ( merge[0]   &&  ! TagKeyExists ( "Album" , 0 ) ) addtag ( "Album" , 0, merge , strlen (merge) , 5, 0 );
-            if ( tmp[2][0]  &&  ! TagKeyExists ( "Title" , 0 ) ) addtag ( "Title" , 0, tmp[2], strlen (tmp[2]), 5, 0 );
-            if ( tmp[4][0]  &&  ! TagKeyExists ( "Track" , 0 ) ) addtag ( "Track" , 0, tmp[4], strlen (tmp[4]), 5, 0 );
-            if ( q != NULL  &&  ! TagKeyExists ( "Year"  , 0 ) ) addtag ( "Year"  , 0, q     , 4              , 5, 0 );
-#endif
-            return 1;
-        }
-        stderr_printf ("???\n--\n");
-    }
-
-    return 0;
-}
-
-
-/*******************************************************************************/
-
-
-static int
-CopyTags_Name ( const char* filename )
-{
-    char         buff [4096];
-
-    FullPathName  ( buff, sizeof buff, filename );
-    Parser        ( buff );
-    return 0;
-}
-
-
-int
-CopyTags ( const char* filename )
-{
-    FILE*  fp;
-
-    if ( 0 == strncmp (filename, "/dev/", 5 ) )
-        return 0;
-
-    fp = fopen ( filename, "rb" );
-    if ( fp == NULL )
-        return -1;
-
-    CopyTags_APE  (fp);                 // APE tags have higher priority than ID3V1 tags
-    CopyTags_ID3  (fp);
-    CopyTags_Name (filename);
-
-    fclose (fp);
-    return 0;
-}
-
-/* end of tags.c */
Index: penc/branches/zorg/timefreq.c
===================================================================
--- /mppenc/branches/zorg/timefreq.c	(revision 40)
+++ 	(revision )
@@ -1,497 +1,0 @@
-// dts, NPR
-// dts, PR
-
-#include <stdio.h>
-#include <string.h>
-#include <math.h>
-
-#ifndef M_PI
-# define M_PI    3.1415926535897932384626433832795029
-#endif
-#define MAX     8192
-#define TYPE    double
-
-//////////////////////////////
-//
-// BesselI0 -- Regular Modified Cylindrical Bessel Function (Bessel I).
-//
-
-static double
-Bessel_I_0 ( double x )
-{
-    double  denominator;
-    double  numerator;
-    double  z;
-
-    if (x == 0.)
-        return 1.;
-
-    z = x * x;
-    numerator = z* (z* (z* (z* (z* (z* (z* (z* (z* (z* (z* (z* (z* (z*
-                   0.210580722890567e-22  + 0.380715242345326e-19 ) +
-                   0.479440257548300e-16) + 0.435125971262668e-13 ) +
-                   0.300931127112960e-10) + 0.160224679395361e-07 ) +
-                   0.654858370096785e-05) + 0.202591084143397e-02 ) +
-                   0.463076284721000e+00) + 0.754337328948189e+02 ) +
-                   0.830792541809429e+04) + 0.571661130563785e+06 ) +
-                   0.216415572361227e+08) + 0.356644482244025e+09 ) +
-                   0.144048298227235e+10;
-
-    denominator = z* (z* (z - 0.307646912682801e+04) + 0.347626332405882e+07) - 0.144048298227235e+10;
-
-    return - numerator / denominator;
-}
-
-static double
-residual ( double x )
-{
-    return sqrt ( 1. - x*x );
-}
-
-//////////////////////////////
-//
-// KBDWindow -- Kaiser Bessel Derived Window
-//      fills the input window array with size samples of the
-//      KBD window with the given tuning parameter alpha.
-//
-
-
-static void
-KBDWindow ( TYPE* window, unsigned int size, TYPE alpha )
-{
-    double        sumvalue = 0.;
-    unsigned int  i;
-
-    for ( i = 0; i < size/2; i++ )
-        window [i] = sumvalue += Bessel_I_0 ( M_PI * alpha * residual (4.*i/size - 1.) );
-
-    // need to add one more value to the nomalization factor at size/2:
-    sumvalue += Bessel_I_0 ( M_PI * alpha * residual (4.*(size/2)/size-1.) );
-
-    // normalize the window and fill in the righthand side of the window:
-    for ( i = 0; i < size/2; i++ )
-        window [size-1-i] = window [i] = sqrt ( window [i] / sumvalue );
-}
-
-
-static void
-CosWindow ( TYPE* window, unsigned int size )
-{
-    double        x;
-    unsigned int  i;
-
-    for ( i = 0; i < size/2; i++ ) {
-        x = cos ( (i+0.5) * (M_PI / size) );
-        window [size/2-1-i] = window [size/2+i] = x;
-    }
-}
-
-
-static void
-CosSinWindow ( TYPE* window, unsigned int size )
-{
-    double        x;
-    unsigned int  i;
-
-    for ( i = 0; i < size/2; i++ ) {
-        x = sin ( (i+0.5) * (M_PI / size) );
-        x = cos (x * x * M_PI/2);
-        window [size/2-1-i] = window [size/2+i] = x;
-    }
-}
-
-
-static void
-SincWindow ( TYPE* window, unsigned int size )
-{
-        static long  W [] = {
-            0,   -1,   -1,   -1,   -1,   -1,   -1,   -2,   -2,   -2,   -2,   -3,   -3,   -4,   -4,   -5,
-           -5,   -6,   -7,   -7,   -8,   -9,  -10,  -11,  -13,  -14,  -16,  -17,  -19,  -21,  -24,  -26,
-          -29,  -31,  -35,  -38,  -41,  -45,  -49,  -53,  -58,  -63,  -68,  -73,  -79,  -85,  -91,  -97,
-         -104, -111, -117, -125, -132, -139, -147, -154, -161, -169, -176, -183, -190, -196, -202, -208,
-         -213, -218, -222, -225, -227, -228, -228, -227, -224, -221, -215, -208, -200, -189, -177, -163,
-         -146, -127, -106,  -83,  -57,  -29,    2,   36,   72,  111,  153,  197,  244,  294,  347,  401,
-          459,  519,  581,  645,  711,  779,  848,  919,  991, 1064, 1137, 1210, 1283, 1356, 1428, 1498,
-         1567, 1634, 1698, 1759, 1817, 1870, 1919, 1962, 2001, 2032, 2057, 2075, 2085, 2087, 2080, 2063,
-         2037, 2000, 1952, 1893, 1822, 1739, 1644, 1535, 1414, 1280, 1131,  970,  794,  605,  402,  185,
-          -45, -288, -545, -814,-1095,-1388,-1692,-2006,-2330,-2663,-3004,-3351,-3705,-4063,-4425,-4788,
-        -5153,-5517,-5879,-6237,-6589,-6935,-7271,-7597,-7910,-8209,-8491,-8755,-8998,-9219,-9416,-9585,
-        -9727,-9838,-9916,-9959,-9966,-9935,-9863,-9750,-9592,-9389,-9139,-8840,-8492,-8092,-7640,-7134,
-        -6574,-5959,-5288,-4561,-3776,-2935,-2037,-1082,  -70,  998, 2122, 3300, 4533, 5818, 7154, 8540,
-         9975,11455,12980,14548,16155,17799,19478,21189,22929,24694,26482,28289,30112,31947,33791,35640,
-        37489,39336,41176,43006,44821,46617,48390,50137,51853,53534,55178,56778,58333,59838,61289,62684,
-        64019,65290,66494,67629,68692,69679,70590,71420,72169,72835,73415,73908,74313,74630,74856,74992,
-        75038,    0 };
-
-    double        x;
-    unsigned int  i;
-    unsigned int  j;
-
-    for ( i = 0; i <= size/2; i++ ) {
-        x  = i * 512. / size;
-        j  = (int) x;
-        x  = W [j] * (1 - x + j) + W [j+1] * (x - j);
-        x /= 75038.;
-        window [size-1-i] = window [i] = x;
-    }
-
-}
-
-#pragma warning ( disable: 4035 )
-
-
-static void
-Multiply ( TYPE* z, const TYPE* x, const TYPE* y )
-{
-    double X [MAX];
-    int    i;
-    int    j;
-    int    maxx = 0;
-    int    maxy = 0;
-
-    for ( i = 0; i < MAX; i++ ) {
-        if ( x[i] != 0. )
-            maxx = i+1;
-        if ( y[i] != 0. )
-            maxy = i+1;
-    }
-
-    memset ( X, 0, sizeof X );
-
-    for ( i = 0; i < maxx; i++ )
-        for ( j = 0; j < maxy; j++ )
-            X [i+j] += (double)x[i] * y[j];
-
-    for ( i = 0; i < MAX; i++ )
-        z [i] = X [i];
-}
-
-double
-dB ( double x )
-{
-    return 10 * log10 (1.e-99 + x*x);
-}
-
-
-const char*  dir;
-int          flag;
-float        xmin1;
-float        xmax1;
-float        ymin1;
-float        ymax1;
-float        xmin2;
-float        xmax2;
-float        ymin2;
-float        ymax2;
-float        xmin3;
-float        xmax3;
-float        ymin3;
-float        ymax3;
-
-
-void
-Setup ( FILE* fp, float xmin, float xmax, float ymin, float ymax )
-{
-    fprintf ( fp,
-        "@    world xmin %f\n"
-        "@    world xmax %f\n"
-        "@    world ymin %f\n"
-        "@    world ymax %f\n"
-        "@    view xmin 0.08\n"
-        "@    view xmax 0.96\n"
-        "@    view ymin 0.08\n"
-        "@    view ymax 0.96\n", xmin, xmax, ymin, ymax );
-
-}
-
-
-static void
-Message ( const char* name, TYPE* x, const TYPE sf, int fftsize )
-{
-    char    filename [128];
-    TYPE    y [MAX/2 + 1];
-    TYPE    S [MAX + 1];
-    TYPE    C [MAX + 1];
-    double  tmpc;
-    double  tmps;
-    double  tmp;
-    FILE*   fp;
-    TYPE    maxx = 0.;
-    int     maxi = 0;
-    int     maxu = 0;
-    int     i;
-    int     j;
-    int     w;
-
-    if ( fftsize == 0 )
-        fftsize = MAX;
-
-    fprintf ( stderr, "Impulse   response: %s\n", name );
-    for ( i = 0; i < MAX; i++ ) {
-        if ( fabs (x[i]) > maxx ) {
-            maxi = i;
-            maxx = fabs (x[i]);
-        }
-        if ( x[i] != 0. )
-            maxu = i + 1;
-    }
-
-    mkdir (dir, 0777);
-    sprintf ( filename, "%s/%s time.txt", dir, name );
-    if ( flag & 1 ) {
-        fp = fopen ( filename, "w" );
-        Setup ( fp, xmin1, xmax1, ymin1, ymax1 );
-        for ( i = 0; i < maxu; i++ )
-            fprintf ( fp, "%8.4f\t%12.9f\n", (i - maxi) * 1000. / sf , x[i] / maxx );
-        fclose ( fp );
-    }
-
-    fprintf ( stderr, "Frequency response: %s\n", name );
-    for ( j = 0; j <= fftsize/4; j++ ) {
-        tmp =  2. * M_PI / fftsize * j;
-        C[fftsize/2-j] = C[fftsize/2+j] = - ( C[fftsize  -j] = C[j] = cos (tmp) );
-        S[fftsize  -j] = S[fftsize/2+j] = - ( S[fftsize/2-j] = S[j] = sin (tmp) );
-    }
-    for ( i = 0; i <= fftsize/2; i++ ) {
-        tmpc = 0.;
-        tmps = 0.;
-        for ( j = 0; j < maxu; j++ ) {
-            w     = i*j  &  (fftsize - 1);
-            tmpc += x[j] * C[w];
-            tmps += x[j] * S[w];
-        }
-        tmp = tmpc*tmpc + tmps*tmps;
-        y [i] = sqrt ( tmp );
-    }
-
-    sprintf ( filename, "%s/%s freq.txt", dir, name );
-    if ( flag & 2 ) {
-        fp = fopen ( filename, "w" );
-        Setup ( fp, xmin2, xmax2, ymin2, ymax2 );
-        for ( i = 0; i <= fftsize/2; i++ )
-            fprintf ( fp, "%8.2f\t%12.9f\n", i * sf / fftsize, y[i] / y[0] );
-        fclose ( fp );
-    }
-    sprintf ( filename, "%s/%s frq log.txt", dir, name );
-    if ( flag & 4 ) {
-        fp = fopen ( filename, "w" );
-        Setup ( fp, xmin3, xmax3, ymin3, ymax3 );
-        for ( i = 0; i <= fftsize/2; i++ )
-            fprintf ( fp, "%8.2f\t%12.9f\n", i * sf / fftsize, dB (y[i] / y[0]) );
-        fclose ( fp );
-    }
-}
-
-
-int
-#ifdef _WIN32
-_cdecl
-#endif
-main ( int argc, char** argv )
-{
-    TYPE  A [MAX];
-    TYPE  B [MAX];
-    TYPE  sf = argc == 1  ?  44100.  :  atof (argv[1]);
-
-    if ( sf <= 192. ) sf *=  1000.;
-    if ( sf < 3000. ) sf  = 44100.;
-
-    dir  = "Overall impulse response";
-    flag = 7;
-
-
-    memset ( A, 0, sizeof A );
-    CosWindow ( A, 512 );
-    Multiply ( A, A, A );
-    Message ( "Klemm1", A, sf, 0 );
-    memset ( A, 0, sizeof A );
-    KBDWindow ( A, 512, 2 );
-    Multiply ( A, A, A );
-    Message ( "Klemm2", A, sf, 0 );
-    memset ( A, 0, sizeof A );
-    KBDWindow ( A, 512, 2.5 );
-    Multiply ( A, A, A );
-    Message ( "Klemm2.5", A, sf, 0 );
-    memset ( A, 0, sizeof A );
-    KBDWindow ( A, 512, 3 );
-    Multiply ( A, A, A );
-    Message ( "Klemm3", A, sf, 0 );
-
-
-    memset ( A, 0, sizeof A );
-    SincWindow ( A, 512 );
-    Multiply ( A, A, A );
-    Message ( "Layer 1, Layer 2, MPC, dts (NPR)", A, sf, 0 );
-
-    memset ( A, 0, sizeof A );
-    CosSinWindow ( A, 2048 );
-    Multiply ( A, A, A );
-    Message ( "Ogg Vorbis (Long)", A, sf, 0 );
-
-    memset ( A, 0, sizeof A );
-    CosSinWindow ( A, 256 );
-    Multiply ( A, A, A );
-    Message ( "Ogg Vorbis (Short)", A, sf, 0 );
-
-    memset ( A, 0, sizeof A );
-    KBDWindow ( A, 512, 5.0 );
-    Multiply ( A, A, A );
-    Message ( "AC-3 (Long)", A, sf, 0 );
-
-    memset ( A, 0, sizeof A );
-    KBDWindow ( A, 256, 5.0 );
-    Multiply ( A, A, A );
-    Message ( "AC-3 (Short)", A, sf, 0 );
-
-    memset ( A, 0, sizeof A );
-    CosWindow ( A, 2048 );
-    Multiply ( A, A, A );
-    Message ( "AAC (Long, Cos)", A, sf, 0 );
-
-    memset ( A, 0, sizeof A );
-    CosWindow ( A, 256 );
-    Multiply ( A, A, A );
-    Message ( "AAC (Short, Cos)", A, sf, 0 );
-
-    memset ( A, 0, sizeof A );
-    KBDWindow ( A, 2048, 4.0 );
-    Multiply ( A, A, A );
-    Message ( "AAC (Long, KBD)", A, sf, 0 );
-
-    memset ( A, 0, sizeof A );
-    KBDWindow ( A, 256, 6.0 );
-    Multiply ( A, A, A );
-    Message ( "AAC (Short, KBD)", A, sf, 0 );
-
-    memset ( A, 0, sizeof A );
-    SincWindow ( A, 512 );
-    Multiply ( A, A, A );
-    memset ( B, 0, sizeof B );
-    CosWindow ( B, 1152 );
-    Multiply ( B, B, B );
-    Multiply ( A, A, B );
-    Message ( "MP3 (Long)", A, sf, 0 );
-
-    memset ( A, 0, sizeof A );
-    SincWindow ( A, 512 );
-    Multiply ( A, A, A );
-    memset ( B, 0, sizeof B );
-    CosWindow ( B, 384 );
-    Multiply ( B, B, B );
-    Multiply ( A, A, B );
-    Message ( "MP3 (Short)", A, sf, 0 );
-
-    memset ( A, 0, sizeof A );
-    SincWindow ( A, 1024 );
-    Multiply ( A, A, A );
-    memset ( B, 0, sizeof B );
-    CosWindow ( B, 2304 );
-    Multiply ( B, B, B );
-    Multiply ( A, A, B );
-    Message ( "MP3Pro (Long)", A, sf, 0 );
-
-    memset ( A, 0, sizeof A );
-    SincWindow ( A, 1024 );
-    Multiply ( A, A, A );
-    memset ( B, 0, sizeof B );
-    CosWindow ( B, 768 );
-    Multiply ( B, B, B );
-    Multiply ( A, A, B );
-    Message ( "MP3Pro (Short)", A, sf, 0 );
-
-
-    dir  = "Frequency resolution (long)";
-    flag = 6;
-    memset ( A, 0, sizeof A );
-    SincWindow ( A, 512 );
-    Message ( "Layer 1 + 2", A, sf, 0 );
-    memset ( A, 0, sizeof A );
-    CosSinWindow ( A, 2048 );
-    Message ( "Ogg Vorbis", A, sf, 0 );
-    memset ( A, 0, sizeof A );
-    CosWindow ( A, 2048 );
-    Message ( "AAC cos"   , A, sf, 0 );
-    memset ( A, 0, sizeof A );
-    KBDWindow ( A, 2048, 4.0 );
-    Message ( "AAC KBD",  A, sf, 0 );
-    memset ( A, 0, sizeof A );
-    KBDWindow ( A, 2048, 5.0 );
-    Message ( "AC-3",  A, sf, 0 );
-
-
-    dir  = "Frequency resolution (short)";
-    flag = 6;
-    memset ( A, 0, sizeof A );
-    SincWindow ( A, 512 );
-    Message ( "Layer 1 + 2", A, sf, 0 );
-    memset ( A, 0, sizeof A );
-    CosSinWindow ( A, 256 );
-    Message ( "Ogg Vorbis", A, sf, 0 );
-    memset ( A, 0, sizeof A );
-    CosWindow ( A, 256 );
-    Message ( "AAC cos"   , A, sf, 0 );
-    memset ( A, 0, sizeof A );
-    KBDWindow ( A, 256, 6.0 );
-    Message ( "AAC KBD",  A, sf, 0 );
-    memset ( A, 0, sizeof A );
-    KBDWindow ( A, 256, 5.0 );
-    Message ( "AC-3",  A, sf, 0 );
-
-    dir  = "Generic Shape";
-    flag = 1;
-    xmin2 = -500;
-    xmax2 = 500;
-    ymin2 = 0;
-    ymax2 = 1;
-    memset ( A, 0, sizeof A );
-    SincWindow ( A, 4096 );
-    Message ( "Sinc", A, 4096, 0 );
-    memset ( A, 0, sizeof A );
-    CosSinWindow ( A, 4096  );
-    Message ( "CosSin", A, 4096, 0 );
-    memset ( A, 0, sizeof A );
-    CosWindow ( A, 4096 );
-    Message ( "Cos"   , A, 4096, 0 );
-    memset ( A, 0, sizeof A );
-    KBDWindow ( A, 4096, 4.0 );
-    Message ( "KBD-4",  A, 4096, 0 );
-    memset ( A, 0, sizeof A );
-    KBDWindow ( A, 4096, 5.0 );
-    Message ( "KBD-5",  A, 4096, 0 );
-    memset ( A, 0, sizeof A );
-    KBDWindow ( A, 4096, 6.0 );
-    Message ( "KBD-6",  A, 4096, 0 );
-
-
-    dir  = "Generic Frequency Resolution";
-    flag = 6;
-    xmin2 = 0;
-    xmax2 = 500;
-    ymin2 = 0;
-    ymax2 = 1;
-    xmin3 = 0;
-    xmax3 = 1000;
-    ymin3 = -100;
-    ymax3 = 0;
-    memset ( A, 0, sizeof A );
-    SincWindow ( A, 512 );
-    Message ( "Sinc", A, 48000, 512 );
-    memset ( A, 0, sizeof A );
-    CosSinWindow ( A, 512  );
-    Message ( "CosSin", A, 48000, 512 );
-    memset ( A, 0, sizeof A );
-    CosWindow ( A, 512 );
-    Message ( "Cos"   , A, 48000, 512 );
-    memset ( A, 0, sizeof A );
-    KBDWindow ( A, 512, 4.0 );
-    Message ( "KBD-4",  A, 48000, 512 );
-    memset ( A, 0, sizeof A );
-    KBDWindow ( A, 512, 5.0 );
-    Message ( "KBD-5",  A, 48000, 512 );
-    memset ( A, 0, sizeof A );
-    KBDWindow ( A, 512, 6.0 );
-    Message ( "KBD-6",  A, 48000, 512 );
-
-
-    return 0;
-}
Index: penc/branches/zorg/timefreq.dsp
===================================================================
--- /mppenc/branches/zorg/timefreq.dsp	(revision 40)
+++ 	(revision )
@@ -1,121 +1,0 @@
-# Microsoft Developer Studio Project File - Name="timefreq" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=timefreq - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "timefreq.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "timefreq.mak" CFG="timefreq - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "timefreq - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "timefreq - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "timefreq - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "timefreq___Win32_Release"
-# PROP BASE Intermediate_Dir "timefreq___Win32_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "timefreq___Win32_Release"
-# PROP Intermediate_Dir "timefreq___Win32_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /G6 /Gr /Zp4 /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x407 /d "NDEBUG"
-# ADD RSC /l 0x407 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "timefreq - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "timefreq___Win32_Debug"
-# PROP BASE Intermediate_Dir "timefreq___Win32_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "timefreq___Win32_Debug"
-# PROP Intermediate_Dir "timefreq___Win32_Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "timefreq - Win32 Release"
-# Name "timefreq - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\synthasm.nas
-
-!IF  "$(CFG)" == "timefreq - Win32 Release"
-
-# Begin Custom Build
-InputPath=.\synthasm.nas
-InputName=synthasm
-
-"Release/$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	"C:/PROGRAM FILES/NASM/NASMW" -d WIN32 -f win32 -o Release/$(InputName).obj $(InputPath) -l $(InputName).lst
-
-# End Custom Build
-
-!ELSEIF  "$(CFG)" == "timefreq - Win32 Debug"
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\timefreq.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
Index: penc/branches/zorg/tonality.c
===================================================================
--- /mppenc/branches/zorg/tonality.c	(revision 40)
+++ 	(revision )
@@ -1,362 +1,0 @@
-/*
- *  Generate graph with palette
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <memory.h>
-#include <math.h>
-
-#define FS          44100
-
-#ifndef MAX
-# define MAX        2048                // max. elements
-#endif
-#ifndef M_PI
-# define M_PI       3.1415926535897932384626433832795029L
-#endif
-
-
-#define FFT_NORM        0                   // y(t)     -> y(f)
-#define FFT_INVS        1                   // y(f)     -> y(t)
-
-#define FFT_ERR_OK      0                   // no error
-#define FFT_ERR_LD      1                   // len is not a power of 2
-#define FFT_ERR_MAX     2                   // len too large
-
-
-typedef float   compl   [2];
-compl           root    [MAX >> 1];                 // Sine-/cosine-table
-size_t          shuffle [MAX >> 1] [2];             // Shuffle-table
-size_t          shuffle_len;
-
-
-static long double
-sinus ( long double x )
-{
-    x -= floor (x);
-
-    switch ( (int)(8 * x) ) {
-    case 0: return +sin (2*M_PI*      x );
-    case 1: return +cos (2*M_PI*(0.25-x));
-    case 2: return +cos (2*M_PI*(x-0.25));
-    case 3: return +sin (2*M_PI*(0.50-x));
-    case 4: return -sin (2*M_PI*(x-0.50));
-    case 5: return -cos (2*M_PI*(0.75-x));
-    case 6: return -cos (2*M_PI*(x-0.75));
-    case 7: return -sin (2*M_PI*(1.00-x));
-    }
-}
-
-static long double
-cosinus ( long double x )
-{
-    x -= floor (x);
-
-    switch ( (int)(8 * x) ) {
-    case 0: return +cos (2*M_PI*      x );
-    case 1: return +sin (2*M_PI*(0.25-x));
-    case 2: return -sin (2*M_PI*(x-0.25));
-    case 3: return -cos (2*M_PI*(0.50-x));
-    case 4: return -cos (2*M_PI*(x-0.50));
-    case 5: return -sin (2*M_PI*(0.75-x));
-    case 6: return +sin (2*M_PI*(x-0.75));
-    case 7: return +cos (2*M_PI*(1.00-x));
-    }
-}
-
-// Bitinversion
-
-static size_t
-swap ( size_t number, int bits )
-{
-    size_t  ret;
-    for ( ret = 0; bits--; number >>= 1 ) {
-        ret = ret + ret + (number & 1);
-    }
-    return ret;
-}
-
-
-// Determine the logarithmus dualis
-
-static int
-ld ( size_t number )
-{
-    int i;
-
-    for ( i = 0; i < (int) (sizeof(size_t) * CHAR_BIT); i++ )
-        if ( ((size_t)1 << i) == number )
-            return i;
-
-    return -1;
-}
-
-// The actual FFT
-
-int
-fft ( compl* fn, const size_t newlen, const int direction )
-{
-    static size_t    len  = 0;
-    static int       bits = 0;
-    static int       last = 0;
-    register size_t  i;
-    register size_t  j;
-    register size_t  k;
-    float*           p;
-    size_t           pp;
-
-    /* initialize tables */
-
-    if ( newlen != len ) {
-        len  = newlen;
-
-        last = FFT_INVS;
-
-        if ( (bits = ld(len)) == -1 )
-            return FFT_ERR_LD;
-
-        for ( i = 0; i < len; i++ ) {
-            j = swap ( i, bits );
-            if ( i < j ) {
-                shuffle [shuffle_len] [0] = i;
-                shuffle [shuffle_len] [1] = j;
-                shuffle_len++;
-            }
-        }
-
-        for ( i = 0; i < (len>>1); i++ ) {
-            long double  x = (long double) swap ( i+i, bits ) / len;
-            root [i] [0] = cosinus (x);
-            root [i] [1] = sinus   (x);
-        }
-    }
-
-    if ( last != (direction & FFT_INVS) ) {
-        last = direction & FFT_INVS;
-
-        p = (float*) (&root[0][1]);
-
-        for ( i = len>>1; i--; p += 2 )
-            *p = -*p;
-    }
-
-    /* Actual transformation */
-
-    pp = len >> 1;
-    do {
-        float*  bp = (float*) root;
-        float*  si = (float*) fn;
-        float*  di = (float*) fn+pp+pp;
-
-        do {
-            k = pp;
-            do {
-                float  mulr = bp[0]*di[0] - bp[1]*di[1];
-                float  muli = bp[1]*di[0] + bp[0]*di[1];
-                float  addr = si[0];
-                float  addi = si[1];
-
-                si [0] = addr + mulr;
-                si [1] = addi + muli;
-                di [0] = addr - mulr;
-                di [1] = addi - muli;
-
-                si += 2, di += 2;
-            } while ( --k );
-            si += pp+pp, di += pp+pp, bp += 2;
-        } while ( si < &fn[len][0] );
-    } while ( pp >>= 1 );
-
-    /* Bitinversion */
-
-    for ( k = 0; k < shuffle_len; k++ ) {
-        float  tmp;
-        i   = shuffle [k] [0];
-        j   = shuffle [k] [1];
-        tmp = fn [i][0]; fn [i][0] = fn [j][0]; fn [j][0] = tmp;
-        tmp = fn [i][1]; fn [i][1] = fn [j][1]; fn [j][1] = tmp;
-    }
-
-    return FFT_ERR_OK;
-}
-
-
-#define S             8
-#if   FS == 44100
-# define USED_BANDS  203
-#elif FS == 48000
-# define USED_BANDS  205
-#else
-# error
-#endif
-
-float  bands [] = {
-       0,  100,  200,   300,   400,   510,   630,  770,  920, 1080,
-    1270, 1480, 1720,  2000,  2320,  2700,  3150, 3700, 4400, 5300,
-    6400, 7700, 9500, 12000, 15500, 20500, 27000
-};
-
-
-void
-procedure ( float* _A, FILE* fp )
-{
-    static int    init = 0;
-    static float  tab [USED_BANDS] [1024];
-    float         A [2048];
-    float         B [2048] [2];
-    float         C [2048] [2];
-    float         D [2048];
-    int           i;
-    unsigned int  band;
-    double        Sum;
-    double        Diff;
-
-    if ( init == 0 ) {  // +/- 0.5 bark = -6 dB, +/- 1 bark = -96 dB
-
-        // Center the bands differently, so that the 0. Band starts at the bottom?
-        for ( band = 0; band < USED_BANDS; band++ ) {
-            double  f1  = ( (S - band%S)*bands [band/S+0] + (band%S)*bands [band/S+1] ) * (2048. / FS / S);
-            double  f2  = ( (S - band%S)*bands [band/S+1] + (band%S)*bands [band/S+2] ) * (2048. / FS / S);
-            double  tmp = 2. / ( f2 - f1 );
-
-            for ( i = 0; i < 1024; i++ ) {
-                double  w    = (i - f1) * tmp - 1;
-                double  mult = exp ( -0.69314718055994530941723212145818 * w * w * w * w);
-                tab [band] [i] = mult;
-            }
-        }
-        init = 1;
-    }
-
-
-    for ( i = 0; i < 2048; i++ ) {
-        A [i]     = _A [i];
-        B [i] [0] = A[i];
-        B [i] [1] = 0.;
-    }
-
-    fft ( B, 2048, FFT_NORM );
-
-    for ( band = 0; band < USED_BANDS; band++ ) {
-
-        memset ( C [1024], 0, 1024 * sizeof(*C) );
-        for ( i = 0; i < 1024; i++ ) {
-            C [i] [0] = B [i] [0] * tab [band] [i];
-            C [i] [1] = B [i] [1] * tab [band] [i];
-        }
-        fft ( C, 2048, FFT_INVS );
-
-        for ( i = 0; i < 2048; i++ ) {
-            D [i] = sqrt (C[i][0] * C[i][0] + C[i][1] * C[i][1]);
-        }
-
-        Sum = 1.e-70;
-        for ( i = 0; i < 2048; i++ ) {
-            Sum += D[i];
-        }
-        Sum /= 2048.;
-
-        Diff = 1.e-70;
-        for ( i = 0; i < 2048; i++ ) {
-            D[i]  = D[i] / Sum - 1;
-            Diff += D[i] * D[i];
-        }
-        Diff = 1 - 2 * sqrt ( Diff / 2048.);        // 1 for sine signals, ~0 for noise
-
-        printf ("%4.0f", Diff*100 );
-
-        Diff = 170 * Diff + 85;
-        if ( Diff >= 0 )
-            putc ( (int)Diff, fp );
-        else
-            putc ( 0, fp );
-    }
-
-    printf ("\n");
-    return;
-}
-
-
-int
-main ( int argc, char** argv )
-{
-    static char          buff [1 << 18];
-    static float         A [4000000];
-    static signed short  b [35 * FS] [2];
-    float*               p = A;
-    int                  i;
-    int                  len;
-    long double          w = 0.L;
-    FILE*                graph;
-    FILE*                fp;
-    char                 name [256];
-
-    freopen ( "report", "w", stdout );
-    setvbuf ( stdout, buff, _IOFBF, sizeof buff );
-
-    // Calculate tone
-    while ( *++argv ) {
-
-        p = A;
-
-        if ( 0 ) {
-            for ( i = 0; i < 10000; i++ )
-                *p++ = (rand () + rand ()) / (double) RAND_MAX - 1;
-
-            for ( i = 0; i < 200000; i++ ) {
-                w   +=  i / 200000. * M_PI;
-                *p++ = sin (w);
-            }
-            for ( i = 0; i < 20000; i++ ) {
-                w   +=  i / 20000. * M_PI;
-                *p++ = sin (w);
-            }
-            for ( i = 0; i < 2000; i++ ) {
-                w   +=  i / 2000. * M_PI;
-                *p++ = sin (w);
-            }
-
-            for ( i = 0; i < 200000; i++ ) {
-                w   +=  i / 200000. * M_PI;
-                *p++ = sin (w) + (rand () + rand ()) / (double) RAND_MAX - 1;
-            }
-            for ( i = 0; i < 20000; i++ ) {
-                w   +=  i / 20000. * M_PI;
-                *p++ = sin (w) + (rand () + rand ()) / (double) RAND_MAX - 1;
-            }
-            for ( i = 0; i < 2000; i++ ) {
-                w   +=  i / 2000. * M_PI;
-                *p++ = sin (w) + (rand () + rand ()) / (double) RAND_MAX - 1;
-            }
-        }
-        else {
-
-            fp = fopen ( *argv, "rb" );
-            fread ( b, 1, 44, fp );
-            len = fread ( b, sizeof(*b), sizeof(b)/sizeof(*b), fp );
-            fclose (fp);
-            fprintf ( stderr, "Add WAV file: %u\n", len );
-            for ( i = 0; i < len; i++ )
-                *p++ = b[i][0] * 1.e-4;
-        }
-
-        fprintf ( stderr, "Total length: %u\n", p - A );
-        sprintf ( name, "%s.ppm", *argv );
-        graph = fopen ( name, "wb" );
-        fprintf ( graph, "P5\n%u %u\n255\n", USED_BANDS, (p - A - MAX) / 256 );
-
-        // Analyze tone
-        for ( i = 0; i < p - A - MAX; i += 256 ) {
-            fprintf ( stderr, "Proceed: %7u %3.0f%%\r", i, 100.*i/(p - A - MAX) );
-            printf ( "%7u: ", i );
-            procedure ( A + i, graph );
-        }
-
-        fclose (graph);
-
-    }
-
-    return 0;
-}
Index: penc/branches/zorg/tonality.dsp
===================================================================
--- /mppenc/branches/zorg/tonality.dsp	(revision 40)
+++ 	(revision )
@@ -1,108 +1,0 @@
-# Microsoft Developer Studio Project File - Name="tonality" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=tonality - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "tonality.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "tonality.mak" CFG="tonality - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "tonality - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "tonality - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "tonality - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "tonality - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "tonality - Win32 Release"
-# Name "tonality - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\tonality.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# Begin Group "Debug"
-
-# PROP Default_Filter ".txt"
-# Begin Source File
-
-SOURCE=.\report
-# End Source File
-# End Group
-# End Target
-# End Project
Index: penc/branches/zorg/tonality.vcproj
===================================================================
--- /mppenc/branches/zorg/tonality.vcproj	(revision 40)
+++ 	(revision )
@@ -1,173 +1,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="tonality"
-	SccProjectName=""
-	SccLocalPath="">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\Release"
-			IntermediateDirectory=".\Release"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Release/tonality.pch"
-				AssemblerListingLocation=".\Release/"
-				ObjectFile=".\Release/"
-				ProgramDataBaseFileName=".\Release/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=".\Release/tonality.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				ProgramDatabaseFile=".\Release/tonality.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Release/tonality.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\Debug"
-			IntermediateDirectory=".\Debug"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Debug/tonality.pch"
-				AssemblerListingLocation=".\Debug/"
-				ObjectFile=".\Debug/"
-				ProgramDataBaseFileName=".\Debug/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=".\Debug/tonality.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile=".\Debug/tonality.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Debug/tonality.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
-			<File
-				RelativePath="tonality.c">
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-		<Filter
-			Name="Debug"
-			Filter=".txt">
-			<File
-				RelativePath="report">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: /mppenc/branches/zorg/tools.c
===================================================================
--- /mppenc/branches/zorg/tools.c	(revision 40)
+++ /mppenc/branches/zorg/tools.c	(revision 41)
@@ -44,5 +44,5 @@
     while ( bytes > 0 ) {
 #if defined _WIN32  &&  defined USE_HTTP  &&  !defined MPP_ENCODER
-        ret = fd & 0x4000  ?  recv ( fd & 0x3FFF, dest, bytes, 0)  :  read ( fd, dest, bytes );
+        ret = fd & 0x4000  ?  recv ( fd & 0x3FFF, dest, bytes, 0)  :  _read ( fd, dest, bytes );
 #else
         ret = read ( fd, dest, bytes );
Index: penc/branches/zorg/udp_server_client.c
===================================================================
--- /mppenc/branches/zorg/udp_server_client.c	(revision 40)
+++ 	(revision )
@@ -1,481 +1,0 @@
-/*====================================================================
- *
- *                          Copyright (C) 1999 by
- *             Digital Equipment Corporation, Maynard, Massachusetts
- *
- * This software is furnished under a license and may be used and  copied
- * only  in  accordance  with  the  terms  of  such  license and with the
- * inclusion of the above copyright notice.  This software or  any  other
- * copies  thereof may not be provided or otherwise made available to any
- * other person.  No title to and ownership of  the  software  is  hereby
- * transferred.
- *
- * The information in this software is subject to change  without  notice
- * and  should  not  be  construed  as  a commitment by Digital Equipment
- * Corporation.
- *
- * DIGITAL assumes no responsibility for the use or  reliability  of  its
- * software on equipment that is not supplied by DIGITAL.
- *
- *
- *
- *  FACILITY:
- *        INSTALL
- *
- *
- *  ABSTRACT:
- *        This is an example of a UDP/IP server using the IPC
- *        socket interface.
- *
- *
- *  ENVIRONMENT:
- *        UCX V1.2 or higher, VMS V5.2 or higher
- *
- *        This example is portable to ULTRIX. The include
- *        files are conditionally defined for both systems, and
- *        "perror" is used for error reporting.
- *  BUILD INSTRUCTIONS:
- *
- *       To link in VAXC/VMS you must have the following
- *       entries in your .opt file:
- *          sys$library:ucx$ipc.olb/lib
- *          sys$share:vaxcrtl.exe/share
- *
- *       For Compaq C or Compaq C++, compile /PREFIX=ALL and link via
- *          $ link UCX$UDP_SERVER_IPC
- *
- *    To build this example program, use commands of the following form:
- *
- *        using the Compaq C compiler:
- *
- *            $ cc/prefix=all UCX$UDP_SERVER_IPC.C
- *            $ link UCX$UDP_SERVER_IPC
- *
- *        using the Compaq C++ compiler:
- *
- *            $ cxx/prefix=all/define=VMS UCX$UDP_SERVER_IPC.C
- *            $ link UCX$UDP_SERVER_IPC
- *        using the VAX C compiler:
- *
- *            $  cc /vaxc UCX$UDP_SERVER_IPC.C
- *            $  link UCX$UDP_SERVER_IPC, -
- *                    SYS$LIBRARY:UCX$IPC/LIB, -
- *                    SYS$INPUT/OPTIONS
- *            SYS$SHARE:UCX$IPC_SHR/SHARE
- *            SYS$SHARE:VAXCRTL.EXE/SHARE
- *
- *
- *  AUTHORS:
- *        UCX Developer
- *
- *  CREATION DATE: May 23, 1989
- *
- *  MODIFICATION HISTORY:
- *
- *       16 May 1996 Joseph J. Vlcek
- *       Make compatible with the Compaq C and Compaq C++ compilers.
- *       Add directions on how to build this example modules.
- *
- */
-
-/*
- *
- *  INCLUDE FILES
- *
- */
-
-#ifdef VMS
-# include <descrip.h>        /* VMS descriptor stuff */
-# include <errno.h>          /* Unix style error codes for IO routines. */
-# include <in.h>             /* internet system Constants and structures. */
-# include <inet.h>           /* Network address info. */
-# include <iodef.h>          /* I/O FUNCTION CODE DEFS */
-# include <lib$routines.h>   /* LIB$ RTL-routine signatures. */
-# include <netdb.h>          /* Network database library info. */
-# include <signal.h>         /* UNIX style Signal Value Definitions */
-# include <socket.h>         /* TCP/IP socket definitions. */
-# include <ssdef.h>          /* SS$_<xyz> sys ser return statistics */
-# include <starlet.h>        /* Sys ser calls */
-# include <stdio.h>          /* UNIX 'Standard I/O' Definitions   */
-# include <stdlib.h>         /* General Utilities */
-# include <string.h>         /* String handling function definitions */
-# include <ucx$inetdef.h>    /* UCX network definitions */
-# include <unixio.h>         /* Prototypes for UNIX emulation functions */
-#else
-# include <errno.h>
-# include <sys/types.h>
-# include <stdio.h>
-# include <sys/socket.h>
-# include <netinet/in.h>
-# include <netdb.h>
-# include <arpa/inet.h>
-# include <sys/uio.h>
-# include <time.h>               /* timeval declared here */
-#endif
-
-static void
-cleanup ( int socket )
-{
-    int  retval;
-
-    /* Shutdown socket completely */
-    retval = shutdown ( socket, 2 );
-    if ( retval == -1 )
-        perror ("shutdown");
-
-    /* Close socket */
-    retval = close (socket);
-    if (retval)
-        perror ("close");
-
-    return 1;
-} /* end cleanup */
-
-/*
- * Functional Description
- *
- *        This example creates a socket of type SOCK_DGRAM (UDP), binds
- *        it, and selects to receive a message on the socket.
- *        Error messages are printed to the screen.
- *
- *        IPC calls used:
- *        bind
- *        close
- *        gethostbyname
- *        recvfrom
- *        select
- *        shutdown
- *        socket
- *
- *
- * Formal Parameters
- *        The server program expects one parameter:
- *        portnumber ... port where it is listening
- *
- *
- * Routine Value
- *
- *        Status
- */
-
-/*--------------------------------------------------------------------*/
-int
-main ( int argc, char** argv )
-{
-    struct sockaddr_in  sock1_name;       /* Address struct for socket1 */
-    struct sockaddr_in  sock2_name;       /* Address struct for socket2 */
-    struct hostent      hostentstruct;    /* Storage for hostent data.  */
-    struct hostent*     hostentptr;       /* Pointer to hostent data.   */
-    struct timeval      timeout;
-    int     rmask;
-    int     wmask;
-    int     emask;
-    int     sock_2;                       /* Socket2  descriptor.       */
-    int     buflen;
-    int     fromlen;
-    char    recvbuf [BUFSIZ];
-    int     namelength;
-    char    hostname [256];               /* Name of local host.        */
-    int     retval;
-    int     flag;
-
-    /* Check input parameters */
-    if ( argc != 2 ) {
-        fprintf ( stderr, "Usage: server portnumber.\n");
-        return 1;
-    }
-
-    /* Open socket 2: AF_INET, SOCK_DGRAM. */
-    if ((sock_2 = socket (AF_INET, SOCK_DGRAM, 0)) == -1) {
-        perror( "socket");
-        return 1;
-    }
-
-    /* Get the local host name. */
-    retval = gethostname ( hostname, sizeof hostname );
-    if ( retval != 0 ) {
-        perror ("gethostname");
-        return cleanup ( sock_2 );
-    }
-
-    /* Get pointer to network data structure for local host. */
-    if ( (hostentptr = gethostbyname (hostname)) == NULL ) {
-        perror ("gethostbyname");
-        return cleanup (sock_2);
-    }
-
-    /* Copy hostent data to safe storage. */
-    hostentstruct = *hostentptr;
-
-    /* Fill in the address structure for socket 2 */
-    sock2_name.sin_family = hostentstruct.h_addrtype;
-    sock2_name.sin_port   = htons(atoi(argv[1]));
-    sock2_name.sin_addr   = *((struct in_addr*) hostentstruct.h_addr);
-
-    /* Bind name to socket 2. */
-    retval = bind ( sock_2, (struct sockaddr*) & sock2_name, sizeof sock2_name );
-    if ( retval != 0 ) {
-        perror ("bind");
-        return cleanup (sock_2);
-    }
-
-    /*
-     * Select socket to receive message.
-     */
-    emask           = 0;
-    wmask           = 0;
-    rmask           = 1 << sock_2;  /* set read mask */
-    timeout.tv_sec  = 30;
-    timeout.tv_usec =  0;
-
-    retval = select ( 32, &rmask, &wmask, &emask, &timeout );
-    switch ( retval ) {
-    case -1:
-        perror ("select");
-        return cleanup (sock_2);
-    case 0:
-        fprintf ( stderr,  "Select timed out with status 0.\n" );
-        return cleanup ( sock_2 );
-    default:
-        if ( (rmask & (1 << sock_2)) == 0 ) {
-            fprintf ( stderr, "Select not reading on sock_2.\n");
-            return cleanup (sock_2);
-        }
-    } /* switch */
-
-    /* Recvfrom buffer - from sock1 on sock2. */
-    buflen  = sizeof recvbuf;
-    fromlen = sizeof sock1_name;
-    flag    = 0;        /* flag may be MSG_OOB and/or MSG_PEEK */
-
-    retval = recvfrom ( sock_2, recvbuf, buflen, flag, (struct sockaddr*) & sock1_name, &fromlen );
-    if ( retval == -1 )
-        perror ( "recvfrom" );
-    else
-        fprintf ( stderr, " %s\n", recvbuf);
-
-    /* Call cleanup to shut down and close socket. */
-    return cleanup (sock_2);
-
-} /* end main */
-
-
-
-
-
-/*====================================================================
- *
- *                          Copyright (C) 1999 by
- *             Digital Equipment Corporation, Maynard, Massachusetts
- *
- * This software is furnished under a license and may be used and  copied
- * only  in  accordance  with  the  terms  of  such  license and with the
- * inclusion of the above copyright notice.  This software or  any  other
- * copies  thereof may not be provided or otherwise made available to any
- * other person.  No title to and ownership of  the  software  is  hereby
- * transferred.
- *
- * The information in this software is subject to change  without  notice
- * and  should  not  be  construed  as  a commitment by Digital Equipment
- * Corporation.
- *
- * DIGITAL assumes no responsibility for the use or  reliability  of  its
- * software on equipment that is not supplied by DIGITAL.
- *
- *
- *
- *  FACILITY:
- *        INSTALL
- *
- *
- *  ABSTRACT:
- *        This is an example of a UDP/IP client using the IPC
- *        socket interface.
- *
- *
- *  ENVIRONMENT:
- *        UCX V1.2 or higher, VMS V5.2 or higher
- *
- *        This example is portable to ULTRIX. The include
- *        files are conditionally defined for both systems, and
- *        "perror" is used for error reporting.
- *
- *  BUILD INSTRUCTIONS:
- *
- *       To link in VAXC/VMS you must have the following
- *       entries in your .opt file:
- *          sys$library:ucx$ipc.olb/lib
- *          sys$share:vaxcrtl.exe/share
- *
- *       For Compaq C or Compaq C++, compile /PREFIX=ALL and link via
- *          $ link UCX$UDP_CLIENT_IPC
- *
- *    To build this example program, use commands of the following form:
- *
- *        using the Compaq C compiler:
- *
- *            $ cc/prefix=all UCX$UDP_CLIENT_IPC.C
- *            $ link UCX$UDP_CLIENT_IPC
- *
- *        using the Compaq C++ compiler:
- *
- *            $ cxx/prefix=all/define=VMS UCX$UDP_CLIENT_IPC.C
- *            $ link UCX$UDP_CLIENT_IPC
- *        using the VAX C compiler:
- *
- *            $  cc /vaxc UCX$UDP_CLIENT_IPC.C
- *            $  link UCX$UDP_CLIENT_IPC, -
- *                    SYS$LIBRARY:UCX$IPC/LIB, -
- *                    SYS$INPUT/OPTIONS
- *            SYS$SHARE:UCX$IPC_SHR/SHARE
- *            SYS$SHARE:VAXCRTL.EXE/SHARE
- *
- *  AUTHORS:
- *        UCX Developer
- *
- *  CREATION DATE: May 23, 1989
- *
- *  MODIFICATION HISTORY:
- *
- *       16 May 1996 Joseph J. Vlcek
- *       Make compatible with the Compaq C and Compaq C++ compilers.
- *       Add directions on how to build this example modules.
- */
-
-/*
- *
- *  INCLUDE FILES
- *
- */
-
-#ifdef VMS
-# include <descrip.h>        /* VMS descriptor stuff */
-# include <errno.h>          /* Unix style error codes for IO routines. */
-# include <in.h>             /* internet system Constants and structures. */
-# include <inet.h>           /* Network address info. */
-# include <iodef.h>          /* I/O FUNCTION CODE DEFS */
-# include <lib$routines.h>   /* LIB$ RTL-routine signatures. */
-# include <netdb.h>          /* Network database library info. */
-# include <signal.h>         /* UNIX style Signal Value Definitions */
-# include <socket.h>         /* TCP/IP socket definitions. */
-# include <ssdef.h>          /* SS$_<xyz> sys ser return statistics */
-# include <starlet.h>        /* Sys ser calls */
-# include <stdio.h>          /* UNIX 'Standard I/O' Definitions   */
-# include <stdlib.h>         /* General Utilities */
-# include <string.h>         /* String handling function definitions */
-# include <ucx$inetdef.h>    /* UCX network definitions */
-# include <unixio.h>         /* Prototypes for UNIX emulation functions */
-#else
-# include <errno.h>
-# include <sys/types.h>
-# include <stdio.h>
-# include <sys/socket.h>
-# include <netinet/in.h>
-# include <netdb.h>
-# include <arpa/inet.h>
-# include <sys/uio.h>
-#endif
-
-/*-----------------------------------------------------------*/
-static void
-cleanup ( int socket )
-{
-    int  retval;
-
-    /* Shutdown socket completely */
-    retval = shutdown ( socket, 2 );
-    if ( retval == -1 )
-        perror ("shutdown");
-
-    /* Close socket */
-    retval = close (socket);
-    if (retval)
-        perror ("close");
-
-    return 1;
-} /* end cleanup */
-
-/*
- * Functional Description
- *
- *        This example creates a socket of type SOCK_DGRAM (UDP),
- *        binds it, and sends a message to the given host and port number.
- *        Error messages are printed to the screen.
- *
- *        IPC calls used:
- *        bind
- *        close
- *        gethostbyname
- *        sendto
- *        shutdown
- *        socket
- *
- * Formal Parameters
- *        The client program expects two parameters:
- *        hostname ... name of remote host
- *        portnumber ... port where remote host(server) is listening
- *
- *
- * Routine Value
- *
- *        Status
- */
-
-/*--------------------------------------------------------------------*/
-int
-main ( int argc, char **argv )
-{
-    static  char         sendbuf[] = "Hi there.";
-    struct  hostent      hostentstruct;      /* Storage for hostent data.  */
-    struct  hostent*     hostentptr;         /* Pointer to hostent data.   */
-    struct  sockaddr_in  sock2_name;         /* Address struct for socket2.*/
-    int     sock_1;                          /* Socket 1 descriptor.       */
-    int     sendlen;
-    int     tolen;
-    int     namelength;
-    char    hostname[256];                   /* Name of local host.        */
-    int     flag;
-    int     retval;
-
-    /* Check input parameters. */
-    if (argc != 3 ) {
-        fprintf ( stderr, "Usage: client hostname portnumber.\n");
-        return 1;
-    }
-
-    /* Open socket 1: AF_INET, SOCK_DGRAM. */
-    if ((sock_1 = socket (AF_INET, SOCK_DGRAM, 0)) == -1) {
-        perror( "socket");
-        return 1;
-    }
-
-    /* Get pointer to network data structure for given host. */
-    if ( (hostentptr = gethostbyname (argv[1])) == NULL ) {
-        perror( "gethostbyname");
-        return cleanup (sock_1);
-    }
-
-    /* Copy hostent data to safe storage. */
-    hostentstruct         = *hostentptr;
-
-    /* Fill in the address structure for socket 2 (to receive message). */
-    sock2_name.sin_family = hostentstruct.h_addrtype;
-    sock2_name.sin_port   = htons ( atoi (argv[2]) );
-    sock2_name.sin_addr   = *((struct in_addr*) hostentstruct.h_addr);
-
-    /* Initialize send block. */
-    sendlen = sizeof sendbuf;
-    tolen   = sizeof sock2_name;
-    flag    = 0;                /* flag may be MSG_OOB */
-
-    /* Send message from socket 1 to socket 2. */
-    retval = sendto ( sock_1, sendbuf, sendlen, flag, (struct sockaddr*) & sock2_name, tolen );
-    if ( retval == -1 ) {
-        perror ( "sendto");
-        return cleanup (sock_1);
-    }
-
-    /* Call cleanup to shut down and close socket. */
-    return cleanup (sock_1);
-
-} /* end main */
Index: penc/branches/zorg/version
===================================================================
--- /mppenc/branches/zorg/version	(revision 40)
+++ 	(revision )
@@ -1,6 +1,0 @@
-MPPDEC_VERSION=1.15v
-MPPENC_VERSION=1.15v
-WINAMP_VERSION=0.96
-XMMS_VERSION=0.96
-REPLAY_VERSION=0.84
-MONKEY_VERSION=3.96b8
Index: penc/branches/zorg/wavcmp.c
===================================================================
--- /mppenc/branches/zorg/wavcmp.c	(revision 40)
+++ 	(revision )
@@ -1,151 +1,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-
-#ifndef __TURBOC__
-# define MB      1
-# define SIZE    ((MB)*256*1024)
-#else
-# include <io.h>
-# define KB      48
-# define SIZE    ((KB)*256)
-#endif
-
-
-static signed short   buff1 [SIZE];
-static signed short   buff2 [SIZE];
-
-
-const char* diff ( unsigned long x1, unsigned long x2, unsigned long mult )     // x1*mult/x2
-{
-    static char    tmp [128];
-    int            expo = -16;
-    unsigned long  val;
-    unsigned long  integ;
-    unsigned long  fract;
-
-    if (x2 == 0)
-        return "?";
-
-    while ( x1    &&  x1   < 0x8000000 ) x1   <<= 1, expo++;
-    while ( mult  &&  mult < 0x8000000 ) mult <<= 1, expo++;
-    while ( x2    &&  x2   < 0x8000000 ) x2   <<= 1, expo--;
-
-    val = (x1 >> 16) * (mult >> 16)
-        + ((x1 & 0xFFFF) * (mult >> 16) >> 16)
-        + ((x1 >> 16) * (mult & 0xFFFF) >> 16);
-    while ( val   &&  val  < 0x8000000 ) val  <<= 1, expo++;
-    val = val / ((x2+0x8000) >> 16);
-    while ( val   &&  val  < 0x8000000 ) val  <<= 1, expo++;
-
-    integ = val >> expo/2 >> (expo-expo/2);
-    fract = val - (integ << expo/2 << (expo - expo/2));
-    fract = ((fract >> 10) * 1000 + (1LU << (expo-11))) >> (expo-10);
-    sprintf ( tmp, "%lu.%03lu", integ, fract );
-    return tmp;
-}
-
-void  compare ( FILE* fp1, FILE* fp2 )
-{
-    unsigned char  char1 [44];
-    unsigned char  char2 [44];
-    size_t         i;
-    unsigned long  error1 = 0;
-    unsigned long  errorn = 0;
-    size_t         len1;
-    size_t         len2;
-    size_t         len;
-    long           size1 = 0;
-    long           size2 = 0;
-    long           offs  = 0;
-
-    fread ( char1, 1, 44, fp1 );
-    fread ( char2, 1, 44, fp2 );
-    for ( i = 0; i < 44; i++ )
-        if ( char1[i] != char2[i] )
-            printf ( "%2u: %3u %3u\n", i, char1[i], char2[i] );
-
-
-    while ( 1 ) {
-#ifdef __TURBOC__
-        len1 = _read ( fileno(fp1), buff1, 2*SIZE ) / 2;
-        len2 = _read ( fileno(fp2), buff2, 2*SIZE ) / 2;
-#else
-        len1 = fread ( buff1, 2, SIZE, fp1 );
-        len2 = fread ( buff2, 2, SIZE, fp2 );
-#endif
-        size1 += len1;
-        size2 += len2;
-        if ( len1==0  &&  len2==0 )
-            break;
-        len = len1 < len2  ?  len1  :  len2;
-
-        for ( i = 0; i < len; i++ ) {
-            if ( buff1 [i] == buff2 [i] )
-                continue;
-            if ( abs (buff1 [i] - buff2 [i]) == 1 ) {
-                error1++;
-                continue;
-            }
-            printf ( "%8lu %6d %6d\n", offs + i, buff1 [i], buff2 [i] );
-            fflush (stdout);
-            errorn++;
-        }
-        offs += len;
-    }
-
-    if ( error1 + errorn )
-        printf ("\n");
-
-    if ( size1 != size2 )
-        printf ("file sizes are different: %lu bytes <-> %lu bytes (%s%%)\n", (long)size1, (long)size2, diff (labs(size1-size2),size1+size2,200) );
-    if ( error1 )
-        printf ("%lu samples are differing by 1 (%s%%).\n", error1, diff (error1,offs,100) );
-    if ( errorn ) {
-        printf ("%lu samples are differing by more than 1 (%s ppm).\n", errorn, diff (errorn,offs,1000000) );
-        fprintf (stderr, "\a");
-    }
-    if ( error1 + errorn )
-        printf ("\n");
-
-    fflush (stdout);
-    return;
-}
-
-int  main ( int argc, char** argv )
-{
-    FILE*  fp1;
-    FILE*  fp2;
-
-    switch (argc) {
-    case 2:
-        fp2 = stdin;
-        break;
-    case 3:
-        if ( (fp2 = fopen ( argv[2], "rb" )) == NULL ) {
-            fprintf ( stderr, "Can't open '%s'\n", argv[2] );
-            return 2;
-        }
-        break;
-    default:
-        fprintf (stderr, "usage: wavcmp file       \tcompares file and <stdin>\n"
-                         "         or\n"
-                         "       wavcmp file1 file2\tcompares 2 files\n\n" );
-        return 1;
-    }
-    if ( (fp1 = fopen ( argv[1], "rb" )) == NULL ) {
-        fprintf ( stderr, "Can't open '%s'\n", argv[1] );
-        return 3;
-    }
-
-    setvbuf ( fp1, NULL, _IONBF, 0 );
-    setvbuf ( fp2, NULL, _IONBF, 0 );
-
-    compare ( fp1, fp2 );
-
-    fclose ( fp1 );
-    fclose ( fp2 );
-
-    return 0;
-}
-
-/* end of wavcmp.c */
Index: /mppenc/branches/zorg/wave_in.c
===================================================================
--- /mppenc/branches/zorg/wave_in.c	(revision 40)
+++ /mppenc/branches/zorg/wave_in.c	(revision 41)
Index: penc/branches/zorg/wave_out.c
===================================================================
--- /mppenc/branches/zorg/wave_out.c	(revision 40)
+++ 	(revision )
@@ -1,1135 +1,0 @@
-/*
- * Musepack audio compression
- * Copyright (C) 1999-2004 Buschmann/Klemm/Piecha/Wolf
- *
- * 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.1 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
- */
-
-#include <string.h>
-#include <errno.h>
-#include "mppdec.h"
-
-#define MAXWAVESIZE     4294967040LU
-
-
-/*
- *  Write 'len' Bytes to a Stream.
- *  Output Error Message if write fails
- */
-
-static size_t
-write_with_test ( FILE_T outputFile, const void* data, size_t len )
-{
-    ssize_t  written;
-    size_t   done = 0;
-
-    ENTER(200);
-
-#ifdef USE_WIN_AUDIO
-    if ( outputFile == WINAUDIO_FD ) {
-        WIN_Play_Samples ( data, len );
-    } else
-#endif
-#ifdef USE_IRIX_AUDIO
-    if ( outputFile == IRIXAUDIO_FD ) {
-        IRIX_Play_Samples ( data, len );
-    } else
-#endif
-    if ( outputFile != NULL_FD )
-        while ( len != done ) {
-            written = (size_t) WRITE (outputFile, (char*)data+done, len-done);
-            if ( written <= 0 ) {
-                stderr_printf ( "\n"PROG_NAME": write error: %s, repeat once more...\a\r", strerror(errno) );
-                sleep (10);
-                continue;
-            }
-            done += written;
-        }
-
-    LEAVE(200);
-    return len;
-}
-
-
-/*
- *  Write a WAV header for a simple RIFF-WAV file with 1 PCM-Chunk. Settings are passed via function parameters.
- */
-
-Int
-Write_WAVE_Header ( FILE_T   outputFile,
-                    Ldouble  SampleFreq,
-                    Uint     BitsPerSample,
-                    Uint     Channels,
-                    Ulong    SamplesPerChannel )
-{
-    Uint8_t   Header [44];
-    Uint8_t*  p             = Header;
-    Uint      Bytes         = (BitsPerSample + 7) / 8;
-    Double    PCMdataLength = (Double) Channels * Bytes * SamplesPerChannel;
-    Uint32_t  word32;
-    size_t    ret;
-
-    ENTER(201);
-
-    *p++ = 'R';
-    *p++ = 'I';
-    *p++ = 'F';
-    *p++ = 'F';                                   // "RIFF" label
-
-    word32 = PCMdataLength + (44 - 8) < (Double)MAXWAVESIZE  ?
-             (Uint32_t)PCMdataLength + (44 - 8)  :  (Uint32_t)MAXWAVESIZE;
-    *p++ = (Uint8_t)(word32 >>  0);
-    *p++ = (Uint8_t)(word32 >>  8);
-    *p++ = (Uint8_t)(word32 >> 16);
-    *p++ = (Uint8_t)(word32 >> 24);               // Size of the next chunk
-
-    *p++ = 'W';
-    *p++ = 'A';
-    *p++ = 'V';
-    *p++ = 'E';                                   // "WAVE" label
-
-    *p++ = 'f';
-    *p++ = 'm';
-    *p++ = 't';
-    *p++ = ' ';                                   // "fmt " label
-
-    *p++ = 0x10;
-    *p++ = 0x00;
-    *p++ = 0x00;
-    *p++ = 0x00;                                  // length of the PCM data declaration = 2+2+4+4+2+2
-
-    *p++ = 0x01;
-    *p++ = 0x00;                                  // ACM type 0x0001 = uncompressed linear PCM
-
-    *p++ = (Uint8_t)(Channels >> 0);
-    *p++ = (Uint8_t)(Channels >> 8);              // Channels
-
-    word32 = (Uint32_t) (SampleFreq + 0.5);
-    *p++ = (Uint8_t)(word32 >>  0);
-    *p++ = (Uint8_t)(word32 >>  8);
-    *p++ = (Uint8_t)(word32 >> 16);
-    *p++ = (Uint8_t)(word32 >> 24);               // Sample frequency
-
-    word32 *= Bytes * Channels;
-    *p++ = (Uint8_t)(word32 >>  0);
-    *p++ = (Uint8_t)(word32 >>  8);
-    *p++ = (Uint8_t)(word32 >> 16);
-    *p++ = (Uint8_t)(word32 >> 24);               // Bytes per second in the data stream
-
-    word32 = Bytes * Channels;
-    *p++ = (Uint8_t)(word32 >>  0);
-    *p++ = (Uint8_t)(word32 >>  8);               // Bytes per sample time
-
-    *p++ = (Uint8_t)(BitsPerSample >> 0);
-    *p++ = (Uint8_t)(BitsPerSample >> 8);         // Bits per single sample
-
-    *p++ = 'd';
-    *p++ = 'a';
-    *p++ = 't';
-    *p++ = 'a';                                   // "data" label
-
-    word32 = PCMdataLength < MAXWAVESIZE  ?  (Uint32_t)PCMdataLength  :  (Uint32_t)MAXWAVESIZE;
-    *p++ = (Uint8_t)(word32 >>  0);
-    *p++ = (Uint8_t)(word32 >>  8);
-    *p++ = (Uint8_t)(word32 >> 16);
-    *p++ = (Uint8_t)(word32 >> 24);               // Size of raw PCM-data
-
-    assert ( p == Header + (sizeof(Header) ) );   // nothing forgotten or too much?
-
-    ret = write_with_test ( outputFile, Header, sizeof(Header) );
-    LEAVE(201);
-    return ret;
-}
-
-
-/*
- *  Write a header for a headerless RAW PCM file. Settings are passed via function parameters.
- *  Of course this is only a dummy function.
- */
-
-Int
-Write_Raw_Header ( FILE_T   outputFile,
-                   Ldouble  SampleFreq,
-                   Uint     BitsPerSample,
-                   Uint     Channels,
-                   Ulong    SamplesPerChannel )
-{
-    (void) outputFile;
-    (void) SampleFreq;
-    (void) BitsPerSample;
-    (void) Channels;
-    (void) SamplesPerChannel;
-    return 0;
-}
-
-
-/*
- *  Write a 80 bit IEEE854 big endian number as 10 octets. Destination is passed as pointer,
- *  End of destination (p+10) is returned.
- */
-
-static Uint8_t*
-Convert_to_80bit_BE_IEEE854_Float ( Uint8_t* p, Ldouble val )
-{
-#ifndef HAVE_IEEE854_LONGDOUBLE
-    Uint32_t  word32 = 0x401E;
-
-    if ( val > 0.L )
-        while ( val < (Ldouble)0x80000000 )                    // scales value in the range 2^31...2^32
-            word32--, val *= 2.L;                              // so you have the exponent
-
-    *p++   = (Uint8_t)(word32 >>  8);
-    *p++   = (Uint8_t)(word32 >>  0);                          // write exponent, sign is assumed as '+'
-    word32 = (Uint32_t) val;
-    *p++   = (Uint8_t)(word32 >> 24);
-    *p++   = (Uint8_t)(word32 >> 16);
-    *p++   = (Uint8_t)(word32 >>  8);
-    *p++   = (Uint8_t)(word32 >>  0);                          // write the upper 32 bit of the mantissa
-    word32 = (Uint32_t) ( (val - word32) * 4294967296.L );
-    *p++   = (Uint8_t)(word32 >> 24);
-    *p++   = (Uint8_t)(word32 >> 16);
-    *p++   = (Uint8_t)(word32 >>  8);
-    *p++   = (Uint8_t)(word32 >>  0);                          // write the lower 32 bit of the mantissa
-#elif ENDIAN == HAVE_LITTLE_ENDIAN
-    const Uint8_t*  q = (Uint8_t*) &val;
-
-    *p++ = q[9];                                               // only change the endianess
-    *p++ = q[8];
-    *p++ = q[7];
-    *p++ = q[6];
-    *p++ = q[5];
-    *p++ = q[4];
-    *p++ = q[3];
-    *p++ = q[2];
-    *p++ = q[1];
-    *p++ = q[0];
-#elif defined MUST_ALIGNED
-    const Uint8_t*  q = (Uint8_t*) &val;
-
-    *p++ = q[0];                                               // only copy
-    *p++ = q[1];
-    *p++ = q[2];
-    *p++ = q[3];
-    *p++ = q[4];
-    *p++ = q[5];
-    *p++ = q[6];
-    *p++ = q[7];
-    *p++ = q[8];
-    *p++ = q[9];
-#else
-    *(Ldouble*)p = val;                                        // copy directly
-    p += 10;
-#endif /* HAVE_IEEE854_LONGDOUBLE */
-
-    return p;
-}
-
-
-/*
- *  Write an AIFF header for a simple AIFF file with 1 PCM-Chunk. Settings are passed via function parameters.
- */
-
-Int
-Write_AIFF_Header ( FILE_T   outputFile,
-                    Ldouble  SampleFreq,
-                    Uint     BitsPerSample,
-                    Uint     Channels,
-                    Ulong    SamplesPerChannel )
-{
-    Uint8_t      Header [54];
-    Uint8_t*     p             = Header;
-    Uint         Bytes         = (BitsPerSample + 7) / 8;
-    Double       PCMdataLength = (Double) Channels * Bytes * SamplesPerChannel;
-    Uint32_t     word32;
-    size_t       ret;
-
-    ENTER(203);
-
-    // FORM chunk
-    *p++ = 'F';
-    *p++ = 'O';
-    *p++ = 'R';
-    *p++ = 'M';
-
-    word32 = (Uint32_t) PCMdataLength + 0x2E;  // size of the AIFF chunk
-    *p++ = (Uint8_t)(word32 >> 24);
-    *p++ = (Uint8_t)(word32 >> 16);
-    *p++ = (Uint8_t)(word32 >>  8);
-    *p++ = (Uint8_t)(word32 >>  0);
-
-    *p++ = 'A';
-    *p++ = 'I';
-    *p++ = 'F';
-    *p++ = 'F';
-    // end of FORM chunk
-
-    // COMM chunk
-    *p++ = 'C';
-    *p++ = 'O';
-    *p++ = 'M';
-    *p++ = 'M';
-
-    word32 = 0x12;                             // size of this chunk
-    *p++ = (Uint8_t)(word32 >> 24);
-    *p++ = (Uint8_t)(word32 >> 16);
-    *p++ = (Uint8_t)(word32 >>  8);
-    *p++ = (Uint8_t)(word32 >>  0);
-
-    word32 = Channels;                         // channels
-    *p++ = (Uint8_t)(word32 >>  8);
-    *p++ = (Uint8_t)(word32 >>  0);
-
-    word32 = SamplesPerChannel < 0xFFFFFFFFLU  ?  (Uint32_t)SamplesPerChannel  :  (Uint32_t)0xFFFFFFFFLU;  // so called "frames"
-    *p++ = (Uint8_t)(word32 >> 24);
-    *p++ = (Uint8_t)(word32 >> 16);
-    *p++ = (Uint8_t)(word32 >>  8);
-    *p++ = (Uint8_t)(word32 >>  0);
-
-    word32 = BitsPerSample;                    // bits
-    *p++ = (Uint8_t)(word32 >>  8);
-    *p++ = (Uint8_t)(word32 >>  0);
-
-    p = Convert_to_80bit_BE_IEEE854_Float ( p, SampleFreq );  // sample frequency as big endian 80 bit IEEE854 float
-    // End of COMM chunk
-
-    // SSND chunk
-    *p++ = 'S';
-    *p++ = 'S';
-    *p++ = 'N';
-    *p++ = 'D';
-
-    word32 = (Uint32_t) PCMdataLength + 0x08;  // chunk length
-    *p++ = (Uint8_t)(word32 >> 24);
-    *p++ = (Uint8_t)(word32 >> 16);
-    *p++ = (Uint8_t)(word32 >>  8);
-    *p++ = (Uint8_t)(word32 >>  0);
-
-    *p++ = 0;                                  // offset
-    *p++ = 0;
-    *p++ = 0;
-    *p++ = 0;
-
-    *p++ = 0;                                  // block size
-    *p++ = 0;
-    *p++ = 0;
-    *p++ = 0;
-
-    assert ( p == Header + (sizeof(Header) ) );// nothing forgotten or too much?
-
-    ret = write_with_test ( outputFile, Header, sizeof(Header) );
-    LEAVE(203);
-    return ret;
-}
-
-
-/***********************************************************************************
- *
- *  Write 16 bit PCM samples from 16 bit PCM data, needed if no MAKE_xxBIT is defined
- *
- ***********************************************************************************/
-
-#if !defined MAKE_16BIT  &&  !defined MAKE_24BIT  &&  !defined MAKE_32BIT
-
-static void
-Change_Endian2x16 ( Int2x16_t* dst, size_t words2x16bit )
-{
-    ENTER(202);
-
-    for ( ; words2x16bit--; dst++ ) {
-# if  INT_MAX >= 2147483647L  &&  !defined MUST_ALIGNED
-        Uint32_t  tmp = *(Uint32_t*)dst;
-        *(Uint32_t*)dst = ((tmp << 0x08) & 0xFF00FF00) | ((tmp >> 0x08) & 0x00FF00FF);
-# else
-        Uint8_t  tmp;
-        tmp                = ((Uint8_t*)dst)[0];
-        ((Uint8_t*)dst)[0] = ((Uint8_t*)dst)[1];
-        ((Uint8_t*)dst)[1] = tmp;
-        tmp                = ((Uint8_t*)dst)[2];
-        ((Uint8_t*)dst)[2] = ((Uint8_t*)dst)[3];
-        ((Uint8_t*)dst)[3] = tmp;
-# endif
-    }
-
-    LEAVE(202);
-    return;
-}
-
-
-size_t
-Write_PCM_2x16bit ( FILE_T fp, Int2x16_t* data, size_t len )
-{
-    size_t  ret;
-
-    ENTER(203);
-
-    if ( output_endianess != machine_endianess )
-        Change_Endian2x16 ( data, len );
-
-    ret = write_with_test ( fp, data, 16/8 * 2 * len ) / (16/8 * 2);
-    LEAVE(203);
-    return ret;
-}
-
-#endif
-
-
-/***********************************************************************************
- *
- *  Write 16 bit PCM samples from 32 bit PCM data, needed if MAKE_16BIT is defined
- *
- ***********************************************************************************/
-
-#ifdef MAKE_16BIT
-
-size_t
-Write_PCM_HQ_2x16bit ( FILE_T fp, Int2x32_t* data, size_t len )
-{
-    size_t          ret;
-    Uint8_t         buff [1152 * 2 * 2];
-    Uint8_t*        p = buff;
-    const Uint8_t*  q = (const Uint8_t*) data;
-    size_t          i;
-
-    ENTER(213);
-
-# if ENDIAN == HAVE_LITTLE_ENDIAN
-    if ( output_endianess == LITTLE ) {
-        for ( i = 0; i < len; i++, q += 8 ) {
-            ((Int16_t*)p)[0] = ((Int16_t*)q)[1];
-            ((Int16_t*)p)[1] = ((Int16_t*)q)[3];
-            p += 4;
-        }
-    } else {
-        for ( i = 0; i < len; i++, q += 8 ) {
-            *p++ = q[3];
-            *p++ = q[2];
-            *p++ = q[7];
-            *p++ = q[6];
-        }
-    }
-# else
-    if ( output_endianess == LITTLE ) {
-        for ( i = 0; i < len; i++, q += 8 ) {
-            *p++ = q[1];
-            *p++ = q[0];
-            *p++ = q[5];
-            *p++ = q[4];
-        }
-    } else {
-        for ( i = 0; i < len; i++, q += 8 ) {
-            ((Int16_t*)p)[0] = ((Int16_t*)q)[0];
-            ((Int16_t*)p)[1] = ((Int16_t*)q)[2];
-            p += 4;
-        }
-    }
-# endif
-
-    ret = write_with_test ( fp, buff, 16/8 * 2 * len ) / (16/8 * 2);
-    LEAVE(213);
-    return ret;
-}
-
-#endif /* MAKE_16BIT */
-
-
-/***********************************************************************************
- *
- *  Write 24 bit PCM samples from 32 bit PCM data, needed if MAKE_24BIT is defined
- *
- ***********************************************************************************/
-
-#ifdef MAKE_24BIT
-
-size_t
-Write_PCM_HQ_2x24bit ( FILE_T fp, Int2x32_t* data, size_t len )
-{
-    size_t          ret;
-    Uint8_t         buff [1152 * 2 * 3];
-    Uint8_t*        p = buff;
-    const Uint8_t*  q = (const Uint8_t*) data;
-    size_t          i;
-
-    ENTER(213);
-
-# if ENDIAN == HAVE_LITTLE_ENDIAN
-    if ( output_endianess == LITTLE ) {
-        for ( i = 0; i < len; i++, q += 8 ) {
-            *p++ = q[1];
-            *p++ = q[2];
-            *p++ = q[3];
-            *p++ = q[5];
-            *p++ = q[6];
-            *p++ = q[7];
-        }
-    } else {
-        for ( i = 0; i < len; i++, q += 8 ) {
-            *p++ = q[3];
-            *p++ = q[2];
-            *p++ = q[1];
-            *p++ = q[7];
-            *p++ = q[6];
-            *p++ = q[5];
-        }
-    }
-# else
-    if ( output_endianess == LITTLE ) {
-        for ( i = 0; i < len; i++, q += 8 ) {
-            *p++ = q[2];
-            *p++ = q[1];
-            *p++ = q[0];
-            *p++ = q[6];
-            *p++ = q[5];
-            *p++ = q[4];
-        }
-    } else {
-        for ( i = 0; i < len; i++, q += 8 ) {
-            *p++ = q[0];
-            *p++ = q[1];
-            *p++ = q[2];
-            *p++ = q[4];
-            *p++ = q[5];
-            *p++ = q[6];
-        }
-    }
-# endif
-
-    ret = write_with_test ( fp, buff, 24/8 * 2 * len ) / (24/8 * 2);
-    LEAVE(213);
-    return ret;
-}
-
-#endif /* MAKE_24BIT */
-
-
-/***********************************************************************************
- *
- *  Write 32 bit PCM samples from 32 bit PCM data, needed if MAKE_32BIT is defined
- *
- ***********************************************************************************/
-
-#ifdef MAKE_32BIT
-
-static void
-Change_Endian2x32 ( Int2x32_t* dst, size_t words2x32bit )
-{
-    ENTER(212);
-
-    for ( ; words2x32bit--; dst++ ) {
-# if  INT_MAX >= 2147483647L
-        Uint32_t  tmp;
-        tmp                 = ((Uint32_t*)dst)[0];
-        tmp                 = ((tmp << 0x10) & 0xFFFF0000) | ((tmp >> 0x10) & 0x0000FFFF);
-        ((Uint32_t*)dst)[0] = ((tmp << 0x08) & 0xFF00FF00) | ((tmp >> 0x08) & 0x00FF00FF);
-        tmp                 = ((Uint32_t*)dst)[1];
-        tmp                 = ((tmp << 0x10) & 0xFFFF0000) | ((tmp >> 0x10) & 0x0000FFFF);
-        ((Uint32_t*)dst)[1] = ((tmp << 0x08) & 0xFF00FF00) | ((tmp >> 0x08) & 0x00FF00FF);
-# else
-        Uint8_t  tmp;
-        tmp                 = ((Uint8_t*)dst)[0];
-        ((Uint8_t*)dst)[0]  = ((Uint8_t*)dst)[3];
-        ((Uint8_t*)dst)[3]  = tmp;
-        tmp                 = ((Uint8_t*)dst)[1];
-        ((Uint8_t*)dst)[1]  = ((Uint8_t*)dst)[2];
-        ((Uint8_t*)dst)[2]  = tmp;
-        tmp                 = ((Uint8_t*)dst)[4];
-        ((Uint8_t*)dst)[4]  = ((Uint8_t*)dst)[7];
-        ((Uint8_t*)dst)[7]  = tmp;
-        tmp                 = ((Uint8_t*)dst)[5];
-        ((Uint8_t*)dst)[5]  = ((Uint8_t*)dst)[6];
-        ((Uint8_t*)dst)[6]  = tmp;
-# endif
-    }
-
-    LEAVE(212);
-    return;
-}
-
-
-size_t
-Write_PCM_HQ_2x32bit ( FILE_T fp, Int2x32_t* data, size_t len )
-{
-    size_t  ret;
-
-    ENTER(213);
-
-    if ( output_endianess != machine_endianess )
-        Change_Endian2x32 ( data, len );
-
-    ret = write_with_test ( fp, data, 32/8 * 2 * len ) / (32/8 * 2);
-    LEAVE(213);
-    return ret;
-}
-
-#endif /* MAKE_32BIT */
-
-
-#if defined USE_OSS_AUDIO  ||  defined USE_ESD_AUDIO  ||  defined USE_SUN_AUDIO
-
-# if defined USE_REALTIME  ||  defined USE_NICE
-
-static uid_t
-GetUID ( void )
-{
-#  if defined _HPUX_SOURCE
-    uid_t  user;
-    gid_t  group;
-    uid_t  saved;
-
-    getresuid ( &user, &group, &saved );
-    return user;
-#  else
-    return getuid ();
-#  endif
-}
-
-static void
-SetEUID ( uid_t uid )
-{
-#  if defined _HPUX_SOURCE
-    setresuid (-1, uid, -1);
-#  else
-    seteuid (uid);
-#  endif
-}
-
-void
-DisableSUID ( void )
-{
-    SetEUID (GetUID());
-}
-
-void
-EnableSUID ( void )
-{
-    SetEUID (0);
-}
-
-# endif
-
-
-static void
-Set_Realtime ( void )
-{
-# if defined USE_REALTIME               // works for all POSIX 1b-conform systems, also the memory should be locked
-    struct sched_param  sp;
-    int                 ret;
-    int                 err;
-
-    memset      ( &sp, 0, sizeof(sp) );
-    EnableSUID  ();
-    sp.sched_priority = sched_get_priority_min ( SCHED_FIFO );
-    ret               = sched_setscheduler ( 0, SCHED_RR, &sp );
-    err               = errno;
-    DisableSUID ();
-# endif
-
-# if defined USE_NICE
-    EnableSUID  ();
-    setpriority ( PRIO_PROCESS, getpid(), -20 );
-    DisableSUID ();
-# endif
-}
-
-#endif /* USE_OSS_AUDIO || USE_ESD_AUDIO || USE_SUN_AUDIO */
-
-
-#if defined USE_OSS_AUDIO
-
-Int
-Set_DSP_OSS_Params ( FILE_T   outputFile,
-                     Ldouble  SampleFreq,
-                     Uint     BitsPerSample,
-                     Uint     Channels )
-{
-    int  arg;
-    int  org;
-    int  fd = FILENO (outputFile);
-
-    org = arg = Channels;
-    if ( -1 == ioctl ( fd, SOUND_PCM_WRITE_CHANNELS, &arg ) )
-        return -1;
-    if (arg != org)
-        return -1;
-
-    org = arg = BitsPerSample;
-    if ( -1 == ioctl ( fd, SOUND_PCM_WRITE_BITS, &arg ) )
-        return -1;
-    if (arg != org)
-        return -1;
-
-    org = arg = AFMT_S16_LE;
-    if ( -1 == ioctl ( fd, SNDCTL_DSP_SETFMT, &arg ) )
-        return -1;
-    if ((arg & org) == 0)
-        return -1;
-
-    org = arg = SampleFreq + 0.5;
-    if ( -1 == ioctl ( fd, SOUND_PCM_WRITE_RATE, &arg ) )
-        return -1;
-    if ( 23.609375 * fabs(arg-SampleFreq) > fabs(arg+SampleFreq) )    // Sample frequency: Accept 40.5...48.0 kHz for 44.1 kHz
-        return -1;
-
-    Set_Realtime ();
-    return 0;
-}
-
-#endif /* USE_OSS_AUDIO */
-
-
-#if defined USE_SUN_AUDIO
-
-Int
-Set_DSP_Sun_Params ( FILE_T   outputFile,
-                     Ldouble  SampleFreq,
-                     Uint     BitsPerSample,
-                     Uint     Channels )
-{
-    audio_info_t  audio_info;
-    int           fd = FILENO (outputFile);
-
-
-    AUDIO_INITINFO ( &audio_info );
-    audio_info.play.sample_rate = (unsigned int) (SampleFreq + 0.5);
-    audio_info.play.channels    = Channels;
-    audio_info.play.precision   = BitsPerSample;
-    audio_info.play.encoding    = AUDIO_ENCODING_LINEAR;
-
-    if ( 0 != ioctl (fd, AUDIO_SETINFO, &audio_info) )
-        return -1;
-    if ( audio_info.play.channels  != Channels )
-        return -1;
-    if ( audio_info.play.precision != BitsPerSample )
-        return -1;
-    if ( audio_info.play.encoding  != AUDIO_ENCODING_LINEAR )
-        return -1;
-    if ( 23.609375 * fabs(audio_info.play.sample_rate-SampleFreq) > fabs(audio_info.play.sample_rate+SampleFreq) )    // Sample frequency: Accept 40.5...48.0 kHz for 44.1 kHz
-        return -1;
-
-    Set_Realtime ();
-    return 0;
-}
-
-#endif /* USE_SUN_AUDIO */
-
-
-#ifdef __TURBOC__
-/*
- *  Turbo-C assigns stdin/stdout with 512 byte buffers if they are
- *  associated with regular files and pipes. This links a lot of code (ca.
- *  6 KByte) which is not used in this program, because FILE I/O buffering
- *  is done by the program itself (8/4 Kbyte for input, 4.5 KByte for
- *  output). Defining the next two functions as dummy functions breaks this
- *  linking chain. This is especially important because we only have limited
- *  space for Code and Data/Stack (each 64 KByte).
- */
-# pragma argsused
-int  pascal near  __IOerror ( int no ) { return -1; }
-void near         _setupio  ( void )   {}
-#endif /* __TURBOC__ */
-
-
-#ifdef USE_ESD_AUDIO
-
-# define AUDIO_FORMAT_UNSIGNED_8       1
-# define AUDIO_FORMAT_SIGNED_16        2
-
-int
-Set_ESD_Params ( FILE_T   dummyFile,
-                 Ldouble  SampleFreq,
-                 Uint     BitsPerSample,
-                 Uint     Channels )
-{
-    static unsigned int  esd_rate     = 0;
-    static unsigned int  esd_format   = 0;
-    static unsigned int  esd_channels = 0;
-    esd_server_info_t*   info;
-    esd_format_t         format = ESD_STREAM | ESD_PLAY;
-    esd_format_t         fmt;
-    int                  esd;
-    int                  aif;
-
-    (void) dummyFile;
-
-    if ( esd_rate == 0 ) {
-        if ( (esd = esd_open_sound (NULL)) >= 0 ) {
-            info     = esd_get_server_info (esd);
-            esd_rate = info -> rate;
-            fmt      = info -> format;
-            esd_free_server_info (info);
-            esd_close (esd);
-        } else {
-            esd_rate = esd_audio_rate;
-            fmt      = esd_audio_format;
-        }
-        esd_format = AUDIO_FORMAT_UNSIGNED_8;
-        if ( (fmt & ESD_MASK_BITS) == ESD_BITS16 )
-            esd_format |= AUDIO_FORMAT_SIGNED_16;
-        esd_channels = fmt & ESD_MASK_CHAN;
-    }
-
-    switch ( (BitsPerSample + 7) / 8 ) {
-    case  1:
-        aif = AUDIO_FORMAT_UNSIGNED_8;
-        break;
-    case  2:
-        aif = AUDIO_FORMAT_SIGNED_16;
-        break;
-    default:
-        stderr_printf ( "audio: Wrong number of bits: %d\n", BitsPerSample );
-        return -1;
-    }
-
-    if ( (aif & esd_format) == 0 ) {
-        stderr_printf ( "audio: Wrong number of bits: %d\n", BitsPerSample );
-        return -1;
-    }
-    if      ( aif & AUDIO_FORMAT_SIGNED_16  )
-        format |= ESD_BITS16;
-    else if ( aif & AUDIO_FORMAT_UNSIGNED_8 )
-        format |= ESD_BITS8;
-    else
-        assert (0);
-
-    if ( Channels <= 0 )
-        Channels = 2;
-    else if ( Channels > esd_channels ) {
-        stderr_printf ( "audio: Unsupported number of channels: %d\n", Channels );
-        return -1;
-    }
-
-    if ( Channels == 1 )
-        format |= ESD_MONO;
-    else if ( Channels == 2 )
-        format |= ESD_STEREO;
-    else
-        assert (0);
-
-    if ( SampleFreq == -1 )
-        SampleFreq = esd_rate;
-    else if ( SampleFreq > esd_rate )
-        return -1;
-
-    Set_Realtime ();
-    return esd_play_stream_fallback ( format, (int)(SampleFreq + 0.5), NULL, PROG_NAME );
-}
-
-#endif /* USE_ESD_AUDIO */
-
-
-#ifdef USE_WIN_AUDIO
-
-static CRITICAL_SECTION  cs;
-static HWAVEOUT          dev                    = NULL;
-static int               ScheduledBlocks        = 0;
-static int               PlayedWaveHeadersCount = 0;          // free index
-static WAVEHDR*          PlayedWaveHeaders [MAX_WAVEBLOCKS];
-
-/* This whole thing should be rearranged to a fixed memory pool that doesn't have to be allocated and deallocated all the time */
-
-static int
-Box ( const char* msg )
-{
-    MessageBox ( NULL, msg, " "PROG_NAME": Error Message . . .", MB_OK | MB_ICONEXCLAMATION );
-    return -1;
-}
-
-
-/*
- *  This function registers already played WAVE chunks. Freeing is done by free_memory(),
- */
-
-static void CALLBACK
-wave_callback ( HWAVE hWave, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2 )
-{
-    if ( uMsg == WOM_DONE ) {
-        EnterCriticalSection ( &cs );
-        PlayedWaveHeaders [PlayedWaveHeadersCount++] = (WAVEHDR*) dwParam1;
-        LeaveCriticalSection ( &cs );
-    }
-}
-
-
-static void
-free_memory ( void )
-{
-    WAVEHDR*  wh;
-    HGLOBAL   hg;
-
-    EnterCriticalSection ( &cs );
-    wh = PlayedWaveHeaders [--PlayedWaveHeadersCount];
-    ScheduledBlocks--;                               // decrease the number of USED blocks
-    LeaveCriticalSection ( &cs );
-
-    waveOutUnprepareHeader ( dev, wh, sizeof (WAVEHDR) );
-
-    hg = GlobalHandle ( wh -> lpData );       // Deallocate the buffer memory
-    GlobalUnlock (hg);
-    GlobalFree   (hg);
-
-    hg = GlobalHandle ( wh );                 // Deallocate the header memory
-    GlobalUnlock (hg);
-    GlobalFree   (hg);
-}
-
-
-Int
-Set_WIN_Params ( FILE_T   dummyFile ,
-                 Ldouble  SampleFreq,
-                 Uint     BitsPerSample,
-                 Uint     Channels )
-{
-    WAVEFORMATEX  outFormat;
-    UINT          deviceID = WAVE_MAPPER;
-
-    (void) dummyFile;
-
-    if ( waveOutGetNumDevs () == 0 )
-        return Box ( "No audio device present." );
-
-    outFormat.wFormatTag      = WAVE_FORMAT_PCM;
-    outFormat.wBitsPerSample  = BitsPerSample;
-    outFormat.nChannels       = Channels;
-    outFormat.nSamplesPerSec  = (unsigned long)(SampleFreq + 0.5);
-    outFormat.nBlockAlign     = (outFormat.wBitsPerSample + 7) / 8 * outFormat.nChannels;
-    outFormat.nAvgBytesPerSec = outFormat.nSamplesPerSec * outFormat.nBlockAlign;
-
-    switch ( waveOutOpen ( &dev, deviceID, &outFormat, (DWORD)wave_callback, 0, CALLBACK_FUNCTION ) ) {
-    case MMSYSERR_ALLOCATED:   return Box ( "Device is already open." );
-    case MMSYSERR_BADDEVICEID: return Box ( "The specified device is out of range." );
-    case MMSYSERR_NODRIVER:    return Box ( "There is no audio driver in this system." );
-    case MMSYSERR_NOMEM:       return Box ( "Unable to allocate sound memory." );
-    case WAVERR_BADFORMAT:     return Box ( "This audio format is not supported." );
-    case WAVERR_SYNC:          return Box ( "The device is synchronous." );
-    default:                   return Box ( "Unknown media error." );
-    case MMSYSERR_NOERROR:     break;
-    }
-
-    waveOutReset ( dev );
-    InitializeCriticalSection ( &cs );
-#if   defined USE_REALTIME
-    SetPriorityClass ( GetCurrentProcess (), REALTIME_PRIORITY_CLASS );
-#elif defined USE_NICE
-    SetPriorityClass ( GetCurrentProcess (), HIGH_PRIORITY_CLASS );
-#endif
-    return 0;
-}
-
-
-int
-WIN_Play_Samples ( const void* data, size_t len )
-{
-    HGLOBAL    hg;
-    HGLOBAL    hg2;
-    LPWAVEHDR  wh;
-    void*      allocptr;
-
-    do {
-        while ( PlayedWaveHeadersCount > 0 )                        // free used blocks ...
-            free_memory ();
-
-        if ( ScheduledBlocks < sizeof(PlayedWaveHeaders)/sizeof(*PlayedWaveHeaders) ) // wait for a free block ...
-            break;
-        Sleep (26);
-    } while (1);
-
-    if ( (hg2 = GlobalAlloc ( GMEM_MOVEABLE, len )) == NULL )   // allocate some memory for a copy of the buffer
-        return Box ( "GlobalAlloc failed." );
-
-    allocptr = GlobalLock (hg2);
-    CopyMemory ( allocptr, data, len );                         // Here we can call any modification output functions we want....
-
-    if ( (hg = GlobalAlloc (GMEM_MOVEABLE | GMEM_ZEROINIT, sizeof (WAVEHDR))) == NULL ) // now make a header and WRITE IT!
-        return -1;
-
-    wh                   = GlobalLock (hg);
-    wh -> dwBufferLength = len;
-    wh -> lpData         = allocptr;
-
-    if ( waveOutPrepareHeader ( dev, wh, sizeof (WAVEHDR)) != MMSYSERR_NOERROR ) {
-        GlobalUnlock (hg);
-        GlobalFree   (hg);
-        return -1;
-    }
-
-    if ( waveOutWrite ( dev, wh, sizeof (WAVEHDR)) != MMSYSERR_NOERROR ) {
-        GlobalUnlock (hg);
-        GlobalFree   (hg);
-        return -1;
-    }
-
-    EnterCriticalSection ( &cs );
-    ScheduledBlocks++;
-    LeaveCriticalSection ( &cs );
-
-    return len;
-}
-
-
-int
-WIN_Audio_close ( void )
-{
-    if ( dev != NULL ) {
-
-        while ( ScheduledBlocks > 0 ) {
-            Sleep (ScheduledBlocks);
-            while ( PlayedWaveHeadersCount > 0 )                        // free used blocks ...
-                free_memory ();
-        }
-
-        waveOutReset (dev);      // reset the device
-        waveOutClose (dev);      // close the device
-        dev = NULL;
-    }
-
-    DeleteCriticalSection ( &cs );
-    ScheduledBlocks = 0;
-    return 0;
-}
-
-#endif /* USE_WIN_AUDIO */
-
-
-#ifdef USE_IRIX_AUDIO
-
-/*
- *  output_irix.c
- *
- *      Copyright (C) Aaron Holtzman - May 1999
- *      Port to IRIX by Jim Miller, SGI - Nov 1999
- *
- *  You should have received a copy of the GNU General Public License
- *  along with GNU Make; see the file COPYING.  If not, write to
- *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <math.h>
-#include <audio.h>
-
-
-static int       init         = 0;
-static ALport    alport       = 0;
-static ALconfig  alconfig     = 0;
-static int       bytesPerWord = 1;
-static int       nChannels    = 2;
-
-
-// open the audio device for writing to
-
-int
-Set_IRIX_Params ( FILE_T dummyFile , Ldouble SampleFreq, Uint BitsPerSample, Uint Channels );
-{
-    ALpv  params [2];
-    int   dev   = AL_DEFAULT_OUTPUT;
-    int   wsize = AL_SAMPLE_16;
-
-    nChannels = Channels;
-
-    if ( init == 0 ) {
-        init     = 1;
-        alconfig = alNewConfig ();
-
-        if ( alSetQueueSize ( alconfig, BUFFER_SIZE) < 0 ) {
-            stderr_printf ( "alSetQueueSize failed: %s\n", alGetErrorString(oserror()) );
-            return -1;
-        }
-
-        if ( alSetChannels ( alconfig, Channels) < 0 ) {
-            stderr_printf ( "alSetChannels(%d) failed: %s\n", Channels, alGetErrorString(oserror()) );
-            return -1;
-        }
-
-        if ( alSetDevice ( alconfig, dev) < 0 ) {
-            stderr_printf ( "alSetDevice failed: %s\n", alGetErrorString(oserror()) );
-            return -1;
-        }
-
-        if ( alSetSampFmt ( alconfig, AL_SAMPFMT_TWOSCOMP) < 0 ) {
-            stderr_printf ( "alSetSampFmt failed: %s\n", alGetErrorString(oserror()) );
-            return -1;
-        }
-
-        alport = alOpenPort ("mppdec", "w", 0 );
-        if ( alport == 0 ) {
-            stderr_printf ( "alOpenPort failed: %s\n", alGetErrorString(oserror()) );
-            return -1;
-        }
-
-        switch ( BitsPerSample ) {
-        case 8:
-            bytesPerWord = 1;
-            wsize        = AL_SAMPLE_8;
-            break;
-        case 16:
-            bytesPerWord = 2;
-            wsize        = AL_SAMPLE_16;
-            break;
-        case 24:
-            bytesPerWord = 4;
-            wsize        = AL_SAMPLE_24;
-            break;
-        default:
-            stderr_printf ( "Irix audio: unsupported bit with %d\n", BitsPerSample );
-            return -1;
-        }
-
-        if ( alSetWidth ( alconfig, wsize) < 0 ) {
-            stderr_printf ( "alSetWidth failed: %s\n", alGetErrorString(oserror()) );
-            return -1;
-        }
-
-        params [0].param    = AL_RATE;
-        params [0].value.ll = alDoubleToFixed ((double) SampleFreq);
-        params [1].param    = AL_MASTER_CLOCK;
-        params [1].value.i  = AL_CRYSTAL_MCLK_TYPE;
-        if ( alSetParams ( dev, params, 1) < 0 ) {
-            stderr_printf ( "alSetParams() failed: %s\n", alGetErrorString(oserror()) );
-            return -1;
-        }
-    }
-
-    return 0;
-}
-
-
-// play the sample to the already opened file descriptor
-
-int
-IRIX_Play_Samples ( const void* buff, size_t len )
-{
-    alWriteFrames ( alport, buff, len );
-    return len;
-}
-
-
-int
-IRIX_Audio_close ( void )
-{
-    alClosePort  ( alport );
-    alFreeConfig ( alconfig );
-    alport   = 0;
-    alconfig = 0;
-    init     = 0;
-    return 0;
-}
-
-#endif /* USE_IRIX_AUDIO */
-
-
-/* end of wave_out.c */
Index: penc/branches/zorg/wp.c
===================================================================
--- /mppenc/branches/zorg/wp.c	(revision 40)
+++ 	(revision )
@@ -1,684 +1,0 @@
-
-/*
-   Performance (ReiserFS Disk IO)
-   Test of all extensions
-   Determine file length at the beginning
-   Keyboard shortcuts
-   Too early abort with unfiltered WAVs
-   No Wait for Coprocesses
-   AAC doesn't work
-   Process ID3 Tags V1/1.1
-   Playlength is only correct with 4 Bytes per Sample (2*16 bit)
-   No support of 24 or 32 bit
- */
-
-#define USE_OSS_AUDIO
-#define USE_NICE
-#define USE_REALTIME
-#define BLOCK             1024
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <assert.h>
-#include <memory.h>
-#include <math.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <sys/mman.h>
-#include <sys/wait.h>
-#include <unistd.h>
-#include <fcntl.h>
-
-typedef struct {
-    const char* const  ext;
-    const char* const  argv [8];
-} decoder_t;
-
-// ogg, mpc, mp3, mp2,
-
-
-#define PATH      "/usr/local/bin/"
-#define STDERR    " 2> /dev/null"
-
-const decoder_t  decoder [] = {
-    { ".mp1"    , { PATH"mpg123" , "-w", "-", "/dev/fd/0"                                  , NULL }},  // MPEG Layer I         : www.iis.fhg.de, www.mpeg.org
-    { ".mp2"    , { PATH"mpg123" , "-w", "-", "/dev/fd/0"                                  , NULL }},  // MPEG Layer II        : www.iis.fhg.de, www.uq.net.au/~zzmcheng, www.mpeg.org
-    { ".mp3"    , { PATH"mpg123" , "-w", "-", "/dev/fd/0"                                  , NULL }},  // MPEG Layer III       : www.iis.fhg.de, www.mp3dev.org/mp3, www.mpeg.org
-    { ".mp3pro" , { PATH"mpg123" , "-w", "-", "/dev/fd/0"                                  , NULL }},  // MPEG Layer III       : www.iis.fhg.de, www.mp3dev.org/mp3, www.mpeg.org
-    { ".mpt"    , { PATH"mpg123" , "-w", "-", "/dev/fd/0"                                  , NULL }},  // MPEG Layer III       : www.iis.fhg.de, www.mp3dev.org/mp3, www.mpeg.org
-    { ".mpp"    , { PATH"mppdec" , "-", "-"                                                , NULL }},  // MPEGplus             : www.stud.uni-hannover.de/user/73884
-    { ".mpc"    , { PATH"mppdec" , "-", "-"                                                , NULL }},  // MPEGplus             : www.stud.uni-hannover.de/user/73884
-    { ".mp+"    , { PATH"mppdec" , "-", "-"                                                , NULL }},  // MPEGplus             : www.stud.uni-hannover.de/user/73884
-    { ".aac"    , { PATH"faad"   , "-t.wav", "-w", "/dev/fd/0"                             , NULL }},  // Advanced Audio Coding: psytel.hypermart.net, www.aac-tech.com, sourceforge.net/projects/faac, www.aac-audio.com, www.mpeg.org
-    { ".mp4"    , { PATH"faad"   , "-t.wav", "-w", "/dev/fd/0"                             , NULL }},  // Advanced Audio Coding: psytel.hypermart.net, www.aac-tech.com, sourceforge.net/projects/faac, www.aac-audio.com, www.mpeg.org
-    { "aac.lqt" , { PATH"faad"   , "-t.wav", "-w", "/dev/fd/0"                             , NULL }},  // Advanced Audio Coding: psytel.hypermart.net, www.aac-tech.com, sourceforge.net/projects/faac, www.aac-audio.com, www.mpeg.org
-    { ".ac3"    , { PATH"ac3dec" , "/dev/fd/0"                                             , NULL }},  // Dolby AC3            : www.att.com
-    { "ac3.lqt" , { PATH"ac3dec" , "/dev/fd/0"                                             , NULL }},  // Dolby AC3            : www.att.com
-//  { ".ogg"    , { PATH"ogg123" , "-d", "wav", "-o", "file:/dev/fd/1", "/dev/fd/0"        , NULL }},  // Ogg Vorbis           : www.xiph.org/ogg/vorbis/index.html
-    { ".ogg"    , { PATH"ogg123" , "-d", "wav", "-f", "/dev/fd/1", "/dev/fd/0"             , NULL }},  // Ogg Vorbis           : www.xiph.org/ogg/vorbis/index.html
-    { ".pac"    , { PATH"lpac"   , "-x", "-o", "/dev/fd/0"                                 , NULL }},  // Lossless predictive Audio Compression: www-ft.ee.tu-berlin.de/~liebchen/lpac.html (liebchen@ft.ee.tu-berlin.de)
-    { ".shn"    , { PATH"shorten", "-x"                                                    , NULL }},  // Shorten              : shnutils.freeshell.org, www.softsound.com/Shorten.html (shnutils@freeshell.org, shorten@softsound.com)
-    { ".gz"     , { "gzip"       , "-d"                                                    , NULL }},  // gziped WAV
-    { ".sz"     , { PATH"szip"   , "-d"                                                    , NULL }},  // sziped WAV
-    { ".sz2"    , { PATH"szip2"  , "-d"                                                    , NULL }},  // sziped WAV
-    { ".bz"     , { PATH"bzip"   , "-d", "-"                                               , NULL }},  // bziped WAV
-    { ".bz2"    , { "bzip2"      , "-d", "-"                                               , NULL }},  // bziped WAV
-    { ".raw"    , { "sox"        , "-r44100 -sw -c2 -traw /dev/fd/0 -twav -sw -"           , NULL }},  // raw files are treated as CD like audio
-    { ".cdr"    , { "sox"        , "-r44100 -sw -c2 -traw /dev/fd/0 -twav -sw -"           , NULL }},  // CD-DA files are treated as CD like audio, no preemphasis info available
-    { ".flac"   , { PATH"flac"   , "-c", "-d", "/dev/fd/0"                                 , NULL }},  // Free Lossless Audio Coder: flac.sourceforge.net/
-    { ".fla"    , { PATH"flac"   , "-c", "-d", "/dev/fd/0"                                 , NULL }},  // Free Lossless Audio Coder: flac.sourceforge.net/
-    { ".ape"    , { PATH"mac"    , "/dev/stdin", "/dev/stdout", "-d"                       , NULL }},  // APE
-    { ".ofr"    , { PATH"optimfrog", "d", "/dev/fd/0", "-"                                 , NULL }},  // OFR
-    { ".la"     , { PATH"la"     , "-console", "/dev/fd/0"                                 , NULL }},  // LA
-    { ".mod"    , { "xmp"        , "-b16", "-c", "-f44100", "--stereo", "-o-", "/dev/fd/0" , NULL }},  // Amiga's Music on Disk:
-//  { ""        , { "sox"        , "/dev/fd/0", "-twav", "-sw", "-"                        , NULL }},  // Rest, maybe SOX can handle it
-};
-
-#undef PATH
-
-#if defined USE_OSS_AUDIO
-# include <sys/ioctl.h>
-# include <sys/time.h>
-# if   defined __linux__
-#  include <linux/soundcard.h>
-# elif defined __bsdi__
-#  include <sys/soundcard.h>
-# elif defined __FreeBSD__
-#  include <machine/soundcard.h>
-# elif defined __NetBSD__  ||  defined __OpenBSD__
-#  include <soundcard.h>
-# else
-#  include <soundcard.h>
-# endif
-#endif /* USE_OSS_AUDIO */
-
-#if defined USE_ESD_AUDIO
-# include <esd.h>
-#endif
-
-#if defined USE_SUN_AUDIO
-# include <sys/audioio.h>
-#endif
-
-#if defined USE_NICE
-# include <sys/resource.h>
-#endif
-
-// scheduler stuff
-#if defined USE_REALTIME
-# include <sched.h>
-#endif
-
-#ifndef O_BINARY
-# ifdef _O_BINARY
-#  define O_BINARY              _O_BINARY
-# else
-#  define O_BINARY              0
-# endif
-#endif
-
-#if defined _WIN32  ||  defined __TURBOC__
-# define strncasecmp(s1,s2,n)   strnicmp (s1, s2, n)
-# define strcasecmp(s1,s2,n)    stricmp (s1, s2)
-#endif
-
-static void
-Set_Realtime ( void )
-{
-# if defined USE_REALTIME               // works for all POSIX 1b-conform systems, also the memory should be locked
-    struct sched_param  sp;
-
-    memset      ( &sp, 0, sizeof(sp) );
-    seteuid     ( 0 );
-    sp.sched_priority = sched_get_priority_min ( SCHED_FIFO );
-    sched_setscheduler ( 0, SCHED_RR, &sp );
-    seteuid     ( getuid() );
-# endif
-
-# if defined USE_NICE
-    seteuid     ( 0 );
-    setpriority ( PRIO_PROCESS, getpid(), -20 );
-    seteuid     ( getuid() );
-# endif
-}
-
-
-
-
-/*
- *
- *  Manpages of pipe(2), fork(2), dup2(2), execve(2) respectively exec(3), including waitpid(2) respectively sigaction(2)+signal(7).
- *
- *   1) create a pipe with pipe(2)
- *   2) fork(2)
- *
- *  if fork successful:
- *
- *  Parent process:
- *   E3) close the write end of the pipe
- *   E4) read the data from the pipe, wait for the end of the child and process errors
- *   E5) clean up
- *
- *  Child process:
- *   K3) close the write end of the pipe
- *   K4) dup2(2)licate fd on stdin
- *   K5) dup2(2)licate the write end of the pipe on stdout
- *   K6) think of something good for stderr ;-)
- *   K7) exec(2/3)ute A
- *
- */
-
-
-int
-filter ( int fdi, char** argv )
-{
-    int    fd [2];
-    pid_t  pid;
-    int    i;
-
-    if ( 0 != pipe (fd) )
-        exit (1);
-
-    pid = fork ();
-
-    switch ( pid ) {
-    case -1: /* error */
-        exit (2);
-
-    case  0: /* child process */
-        dup2   ( fdi   , STDIN_FILENO  );
-        dup2   ( fd [1], STDOUT_FILENO );
-        close  ( STDERR_FILENO );
-        for ( i = 3; i < 256; i++ )
-           close (i);
-        Set_Realtime ();
-        execvp ( argv [0], argv );
-        break;
-
-    default: /* parent process */
-        close (fd [1]);
-        break;
-    }
-//    fcntl ( fd [0], F_SETFD, FD_CLOEXEC);
-
-    return fd [0];
-}
-
-
-int
-test_for_filters ( int fd, const char* name )
-{
-    const char*  nameend = name + strlen(name);
-    size_t       i;
-    size_t       sl;
-
-rep:
-    for ( i = 0; i < sizeof(decoder)/sizeof(*decoder); i++ ) {
-        sl = strlen(decoder[i].ext);
-        if (nameend - sl >= name  &&
-            0 == strncasecmp (nameend - sl, decoder[i].ext, sl) ) {
-            nameend -= sl;
-            fd = filter (fd, decoder[i].argv );
-            goto rep;
-        }
-    }
-    return fd;
-}
-
-
-
-typedef unsigned long  u32;
-typedef unsigned short u16;
-typedef unsigned char  label[4];
-
-typedef struct {
-    label riff;
-    u32   File_Length;
-} Prefix;
-
-typedef struct {
-    u16 is_PCM;
-    u16 Channels;
-    u32 Sample_Frequency;
-    u32 Bytes_per_sec;
-    u16 Bytes_per_Sample;
-    u16 Bits;
-} Format;
-
-typedef struct {
-    Prefix P;
-    label  wave;
-    label  fmt;
-    u32    fmt_Length;
-    Format F;
-    label  data;
-    u32    Sample_Length;
-} Header;
-
-
-
-static long
-defaults ( long val, long std )
-{
-    return val ? val : std;
-}
-
-static void
-message ( unsigned long samples, unsigned long samptot, unsigned long sampfreq )
-{
-    if ( samptot > 0  &&  samptot < 100*60*sampfreq )
-        fprintf ( stderr, "%2u:%02u.%03u/%2u:%02u.%03u\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b",
-                  samples/sampfreq/60, samples/sampfreq%60, samples%sampfreq*1000/sampfreq,
-                  samptot/sampfreq/60, samptot/sampfreq%60, samptot%sampfreq*1000/sampfreq );
-    else
-        fprintf ( stderr, "%2u:%02u.%03u\b\b\b\b\b\b\b\b\b",
-                  samples/sampfreq/60, samples/sampfreq%60, samples%sampfreq*1000/sampfreq );
-}
-
-
-static int    last_channels = -1;
-static int    last_freq     = -1;
-static int    last_fmt      = -1;
-static int    last_size     = -1;
-
-static int    channels;
-static int    freq;
-static int    fmt;
-static int    size;
-
-static unsigned char       A [BLOCK * 8 * 4];
-static signed short        B [BLOCK] [2];
-
-
-static void
-play ( int fdd, int fd, const char* name )
-{
-    Header              H;
-    int                 org;      /* argument for ioctl calls */
-    int                 arg;      /* argument for ioctl calls */
-    int                 status;   /* return status of system calls */
-    unsigned long       filelen;
-    unsigned long long  toplay;
-    unsigned long       totalsamples;
-    size_t              len;
-    size_t              tmp;
-    ssize_t             bytesread;
-    ssize_t             byteswrote;
-    size_t              samples;
-    size_t              totalread;
-    int                 i;
-    int                 finish;
-    unsigned char*      p;
-
-
-    if ( sizeof (H) != 44 ) {
-        fprintf ( stderr,"%s: program malfunction: Header struct not 44 bytes long.\nCompile without struct alignment and try again.\a\n", "wp" );
-        exit (1);
-    }
-
-    fd = test_for_filters ( fd, name );
-
-    if ( sizeof(H)-8 != read ( fd, &H, sizeof (H)-8 ))
-        return;
-
-    fprintf (stderr, "\r\033[7m\r%s\033[0m\033[K\n", name );
-    if ( 0 != memcmp (H.P.riff, "RIFF", 4) ) {
-        fprintf (stderr, "not a WAV file\n");
-        return;
-    }
-
-    do {
-        memmove (H.data+0, H.data+1, 3);
-        if (read (fd, H.data+3, 1) != 1)
-            return;
-    } while ( 0 != memcmp (H.data, "data", 4) );
-    read ( fd, &H.Sample_Length, 4 );
-
-    freq     = defaults (H.F.Sample_Frequency, 44100);  /* set sampling parameters: sampling rate */
-    channels = defaults (H.F.Channels, 2);              /* set sampling parameters: mono or stereo */
-    size     = defaults (H.F.Channels ? 8*H.F.Bytes_per_Sample/H.F.Channels : 0, 16);      /* set sampling parameters: sample size */
-
-#if 0
-    // Moved to front
-    if ( -1 == (status = ioctl (fdd, SOUND_PCM_SYNC, 0)) )
-        perror ("SOUND_PCM_SYNC ioctl failed");
-#endif
-
-    org = arg = 2;
-    if ( arg != last_channels  &&  -1 == (status = ioctl (fdd, SOUND_PCM_WRITE_CHANNELS, &arg)) )
-        perror ("SOUND_PCM_WRITE_CHANNELS ioctl failed");
-    if (arg != org)
-        perror ("unable to set number of channels");
-    last_channels = arg;
-
-    org = arg = 16;
-    if ( arg != last_size  &&  -1 == (status = ioctl (fdd, SOUND_PCM_WRITE_BITS, &arg)) )
-        perror ("SOUND_PCM_WRITE_BITS ioctl failed");
-    if (arg != org)
-        perror ("unable to set sample size");
-    last_size = arg;
-
-    org = arg = org <= 8  ?  AFMT_U8  :  AFMT_S16_LE;
-    if ( arg != last_fmt  &&  -1 == ioctl (fdd, SNDCTL_DSP_SETFMT, &arg) )
-        perror ("SNDCTL_DSP_SETFMT ioctl failed");
-    if ((arg & org) == 0)
-        perror ("unable to set data format");
-    last_fmt = arg;
-
-    org = arg = freq;                   /* set sampling parameters: sampling rate */
-    if ( arg != last_freq  &&  -1 == (status = ioctl (fdd, SOUND_PCM_WRITE_RATE, &arg)) )
-        perror ("SOUND_PCM_WRITE_WRITE ioctl failed");
-    last_freq = arg;
-
-    fprintf (stderr, "\r%1u*%2u bit %5u Hz:   ", channels, size, freq );
-    fflush (stderr);
-
-    toplay = H.Sample_Length < 0x7FFFFFFF  &&  H.Sample_Length > 0
-           ? H.Sample_Length / (channels*(size/8))
-           : 0xFFFFFFFFFFFFFFFF;
-
-    totalread    = 0;
-    totalsamples = 0;
-
-    message ( totalsamples, toplay, freq );
-
-    for ( finish = 0; !finish; ) {
-
-        if ( toplay-totalsamples <= BLOCK )
-            len = (toplay-totalsamples) * channels * (size/8), finish = 1;
-        else
-            len = BLOCK * channels * (size/8);
-
-        bytesread = 0;
-        do {
-            tmp = read ( fd, A+bytesread, len-bytesread );
-            if ( tmp <= 0 ) {
-                finish = 1;
-                break;
-            }
-            bytesread += tmp;
-        } while ( bytesread < len );
-
-        totalread    += bytesread;
-        samples       = bytesread / (channels * (size/8));
-        totalsamples += samples;
-
-        message ( totalsamples, toplay, freq );
-
-        p = A;
-        switch (channels) {
-        case 1:
-            switch (size) {
-            case  8:
-                for ( i = 0; i < samples; i++, p++ )
-                    B [i][0] = B [i][1] = (*p-128) << 8;
-                break;
-            case 16:
-                for ( i = 0; i < samples; i++, p+=2 )
-                    B [i][0] = B [i][1] = *(short*)(p);
-                break;
-            case 24:
-                for ( i = 0; i < samples; i++, p+=3 )
-                    B [i][0] = B [i][1] = *(short*)(p+1);
-                break;
-            case 32:
-                for ( i = 0; i < samples; i++, p+=4 )
-                    B [i][0] = B [i][1] = *(short*)(p+2);
-                break;
-            }
-            break;
-
-        case 2:
-            switch (size) {
-            case  8:
-                for ( i = 0; i < samples; i++, p+=2 )
-                    B [i][0] = (p[0]-128) << 8,
-                    B [i][1] = (p[1]-128) << 8;
-                break;
-            case 16:
-                for ( i = 0; i < samples; i++, p+=4 )
-                    B [i][0] = *(short*)(p+0),
-                    B [i][1] = *(short*)(p+2);
-                break;
-            case 24:
-                for ( i = 0; i < samples; i++, p+=6 )
-                    B [i][0] = *(short*)(p+1),
-                    B [i][1] = *(short*)(p+4);
-                break;
-            case 32:
-                for ( i = 0; i < samples; i++, p+=8 )
-                    B [i][0] = *(short*)(p+2),
-                    B [i][1] = *(short*)(p+6);
-                break;
-            }
-            break;
-
-        default:
-            switch (size) {
-            case  8:
-                for ( i = 0; i < samples; i++, p+=1*channels )
-                    B [i][0] = (p[0]-128) << 8,
-                    B [i][0] = (p[1]-128) << 8;
-                break;
-            case 16:
-                for ( i = 0; i < samples; i++, p+=2*channels )
-                    B [i][0] = *(short*)(p+0),
-                    B [i][0] = *(short*)(p+2);
-                break;
-            case 24:
-                for ( i = 0; i < samples; i++, p+=3*channels )
-                    B [i][0] = *(short*)(p+1),
-                    B [i][0] = *(short*)(p+4);
-                break;
-            case 32:
-                for ( i = 0; i < samples; i++, p+=4*channels )
-                    B [i][0] = *(short*)(p+2),
-                    B [i][0] = *(short*)(p+6);
-                break;
-            }
-            break;
-        }
-
-        len = samples * (16/8 * 2);
-        byteswrote = 0;
-
-        while ( byteswrote < len ) {
-            tmp = write ( fdd, B+byteswrote, len-byteswrote );
-            if ( tmp <= 0 ) {
-                perror ("Wrote wrong number of bytes");
-                finish = 1;
-                break;
-            }
-            byteswrote += tmp;
-        }
-    }
-
-    return;
-}
-
-
-int
-main ( int argc, char** argv )
-{
-    int           fds;
-    int           fdd;
-    int           fdm;
-    int           org;      /* argument for ioctl calls */
-    int           arg;      /* argument for ioctl calls */
-    int           status;   /* return status of system calls */
-    const char*   name;
-
-    seteuid     ( getuid() );
-
-#if 0
-    if ( (fdd = open ("/dev/audio0", O_WRONLY)) < 0 ) {  /* open sound device */
-        perror ("open of /dev/audio0 failed");
-        return 1;
-    }
-    if ( (fdm = open ("/dev/mixer0", O_RDWR)) < 0 ) {    /* open mixer device */
-        perror ("open of /dev/mixer0 failed");
-        return 1;
-    }
-
-    org = arg = 0x6060;
-    if ( -1 == (status = ioctl (fdm, SOUND_MIXER_WRITE_VOLUME, &arg)) )
-        perror ("SOUND_MIXER_WRITE_VOLUME ioctl failed");
-    org = arg = 0x5A5A;
-    if ( -1 == (status = ioctl (fdm, SOUND_MIXER_WRITE_PCM, &arg)) )
-        perror ("SOUND_MIXER_WRITE_PCM ioctl failed");
-    org = arg = 0x0000;
-    if ( -1 == (status = ioctl (fdm, SOUND_MIXER_WRITE_MIC, &arg)) )
-        perror ("SOUND_MIXER_WRITE_MIC ioctl failed");
-    org = arg = 0x0000;
-    if ( -1 == (status = ioctl (fdm, SOUND_MIXER_WRITE_SYNTH, &arg)) )
-        perror ("SOUND_MIXER_WRITE_SYNTH ioctl failed");
-    org = arg = 0x0000;
-    if ( -1 == (status = ioctl (fdm, SOUND_MIXER_WRITE_IMIX, &arg)) )
-        perror ("SOUND_MIXER_WRITE_IMIX ioctl failed");
-    org = arg = 0x0000;
-    if ( -1 == (status = ioctl (fdm, SOUND_MIXER_WRITE_LINE1, &arg)) )
-        perror ("SOUND_MIXER_WRITE_LINE1 ioctl failed");
-    org = arg = 0x0000;
-    if ( -1 == (status = ioctl (fdm, SOUND_MIXER_WRITE_LINE2, &arg)) )
-        perror ("SOUND_MIXER_WRITE_LINE2 ioctl failed");
-    org = arg = 0x0000;
-    if ( -1 == (status = ioctl (fdm, SOUND_MIXER_WRITE_LINE3, &arg)) )
-        perror ("SOUND_MIXER_WRITE_LINE3 ioctl failed");
-    close (fdm);
-#else
-    if ( (fdd = open ("/dev/audio2", O_WRONLY)) < 0 ) {  /* open sound device */
-        perror ("open of /dev/audio2 failed");
-        return 1;
-    }
-    if ( (fdm = open ("/dev/mixer1", O_RDWR)) < 0 ) {    /* open mixer device */
-        perror ("open of /dev/mixer1 failed");
-        return 1;
-    }
-
-    org = arg = 0x6060;
-    if ( -1 == (status = ioctl (fdm, SOUND_MIXER_WRITE_VOLUME, &arg)) )
-        perror ("SOUND_MIXER_WRITE_VOLUME ioctl failed");
-    org = arg = 0x5A5A;
-    if ( -1 == (status = ioctl (fdm, SOUND_MIXER_WRITE_PCM, &arg)) )
-        perror ("SOUND_MIXER_WRITE_PCM ioctl failed");
-    org = arg = 0x0000;
-    if ( -1 == (status = ioctl (fdm, SOUND_MIXER_WRITE_MIC, &arg)) )
-        perror ("SOUND_MIXER_WRITE_MIC ioctl failed");
-    org = arg = 0x0000;
-    if ( -1 == (status = ioctl (fdm, SOUND_MIXER_WRITE_SYNTH, &arg)) )
-        perror ("SOUND_MIXER_WRITE_SYNTH ioctl failed");
-    org = arg = 0x0000;
-    if ( -1 == (status = ioctl (fdm, SOUND_MIXER_WRITE_IMIX, &arg)) )
-        perror ("SOUND_MIXER_WRITE_IMIX ioctl failed");
-    org = arg = 0x0000;
-    if ( -1 == (status = ioctl (fdm, SOUND_MIXER_WRITE_LINE1, &arg)) )
-        perror ("SOUND_MIXER_WRITE_LINE1 ioctl failed");
-    org = arg = 0x0000;
-    if ( -1 == (status = ioctl (fdm, SOUND_MIXER_WRITE_LINE2, &arg)) )
-        perror ("SOUND_MIXER_WRITE_LINE2 ioctl failed");
-    org = arg = 0x0000;
-    if ( -1 == (status = ioctl (fdm, SOUND_MIXER_WRITE_LINE3, &arg)) )
-        perror ("SOUND_MIXER_WRITE_LINE3 ioctl failed");
-    close (fdm);
-#endif    
-
-#if 0
-
-#define SOUND_MIXER_SPEAKER      5
-#define SOUND_MIXER_LINE         6
-#define SOUND_MIXER_CD           8
-#define SOUND_MIXER_ALTPCM      10
-#define SOUND_MIXER_RECLEV      11      /* Recording level */
-#define SOUND_MIXER_IGAIN       12      /* Input gain */
-#define SOUND_MIXER_OGAIN       13      /* Output gain */
-#define SOUND_MIXER_DIGITAL1    17      /* Digital (input) 1 */
-#define SOUND_MIXER_DIGITAL2    18      /* Digital (input) 2 */
-#define SOUND_MIXER_DIGITAL3    19      /* Digital (input) 3 */
-#define SOUND_MIXER_PHONEIN     20      /* Phone input */
-#define SOUND_MIXER_PHONEOUT    21      /* Phone output */
-#define SOUND_MIXER_VIDEO       22      /* Video/TV (audio) in */
-#define SOUND_MIXER_RADIO       23      /* Radio in */
-#define SOUND_MIXER_MONITOR     24      /* Monitor (usually mic) volume */
-
-#endif
-
-    mlock (A, sizeof (A) );
-    mlock (B, sizeof (B) );
-    Set_Realtime ();
-
-    if ( argc <= 1 )
-        play ( fdd, 0, "<stdin>" );
-    else
-        while ( (name = *++argv) != NULL ) {
-            if ( (fds = open (*argv, O_RDONLY)) < 0 ) {
-                perror ("open of file failed");
-                continue;
-            }
-            play  ( fdd, fds, name );
-            close ( fds );
-        }
-
-    write (fdd, "\0\0\0\0\0\0\0\0\0\0\0\0", 12);
-    close (fdd);
-    fprintf (stderr, "\n");
-    return 0;
-}
-
-
-#if 0
-
-static struct termios stored_settings;
-
-
-void reset ( void )
-{
-    tcsetattr ( 0, TCSANOW, &stored_settings );
-}
-
-
-void set ( void )
-{
-    struct termios new_settings;
-
-    tcgetattr ( 0, &stored_settings );
-    new_settings = stored_settings;
-
-    new_settings.c_lflag    &= ~ECHO;
-    /* Disable canonical mode, and set buffer size to 1 byte */
-    new_settings.c_lflag    &= ~ICANON;
-    new_settings.c_cc[VTIME] = 0;
-    new_settings.c_cc[VMIN]  = 1;
-
-    tcsetattr(0,TCSANOW,&new_settings);
-    return;
-}
-
-
-int sel ( void )
-{
-    struct timeval  t;
-    fd_set          fd [1];
-    int             ret;
-    unsigned char   c;
-
-    FD_SET (0, fd);
-    t.tv_sec  = 0;
-    t.tv_usec = 0;
-
-    ret = select ( 1, fd, NULL, NULL, &t );
-
-    switch ( ret ) {
-    case  0:
-        return -1;
-    case  1:
-        ret = read (0, &c, 1);
-        return ret == 1  ?  c  :  -1;
-    default:
-        return -2;
-    }
-}
-
-#endif
Index: penc/branches/zorg/wp.c-
===================================================================
--- /mppenc/branches/zorg/wp.c-	(revision 40)
+++ 	(revision )
@@ -1,680 +1,0 @@
-
-/*
-   Performance (ReiserFS Disk IO)
-   Test of all extensions
-   Determine file length at the beginning
-   Keyboard shortcuts
-   Too early abort with unfiltered WAVs
-   No Wait for Coprocesses
-   AAC doesn't work
-   Process ID3 Tags V1/1.1
-   Playlength is only correct with 4 Bytes per Sample (2*16 bit)
-   No support of 24 or 32 bit
- */
-
-#define USE_OSS_AUDIO
-#define USE_NICE
-#define USE_REALTIME
-#define BLOCK             1024
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <assert.h>
-#include <memory.h>
-#include <math.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <sys/mman.h>
-#include <sys/wait.h>
-#include <unistd.h>
-#include <fcntl.h>
-
-typedef struct {
-    const char* const  ext;
-    const char* const  argv [8];
-} decoder_t;
-
-// ogg, mpc, mp3, mp2,
-
-
-#define PATH      "/usr/local/bin/"
-#define STDERR    " 2> /dev/null"
-
-const decoder_t  decoder [] = {
-    { ".mp1"    , { PATH"mpg123" , "-w", "-", "/dev/fd/0"                                  , NULL }},  // MPEG Layer I         : www.iis.fhg.de, www.mpeg.org
-    { ".mp2"    , { PATH"mpg123" , "-w", "-", "/dev/fd/0"                                  , NULL }},  // MPEG Layer II        : www.iis.fhg.de, www.uq.net.au/~zzmcheng, www.mpeg.org
-    { ".mp3"    , { PATH"mpg123" , "-w", "-", "/dev/fd/0"                                  , NULL }},  // MPEG Layer III       : www.iis.fhg.de, www.mp3dev.org/mp3, www.mpeg.org
-    { ".mp3pro" , { PATH"mpg123" , "-w", "-", "/dev/fd/0"                                  , NULL }},  // MPEG Layer III       : www.iis.fhg.de, www.mp3dev.org/mp3, www.mpeg.org
-    { ".mpt"    , { PATH"mpg123" , "-w", "-", "/dev/fd/0"                                  , NULL }},  // MPEG Layer III       : www.iis.fhg.de, www.mp3dev.org/mp3, www.mpeg.org
-    { ".mpp"    , { PATH"mppdec" , "-", "-"                                                , NULL }},  // MPEGplus             : www.stud.uni-hannover.de/user/73884
-    { ".mpc"    , { PATH"mppdec" , "-", "-"                                                , NULL }},  // MPEGplus             : www.stud.uni-hannover.de/user/73884
-    { ".mp+"    , { PATH"mppdec" , "-", "-"                                                , NULL }},  // MPEGplus             : www.stud.uni-hannover.de/user/73884
-    { ".aac"    , { PATH"faad"   , "-t.wav", "-w", "/dev/fd/0"                             , NULL }},  // Advanced Audio Coding: psytel.hypermart.net, www.aac-tech.com, sourceforge.net/projects/faac, www.aac-audio.com, www.mpeg.org
-    { ".mp4"    , { PATH"faad"   , "-t.wav", "-w", "/dev/fd/0"                             , NULL }},  // Advanced Audio Coding: psytel.hypermart.net, www.aac-tech.com, sourceforge.net/projects/faac, www.aac-audio.com, www.mpeg.org
-    { "aac.lqt" , { PATH"faad"   , "-t.wav", "-w", "/dev/fd/0"                             , NULL }},  // Advanced Audio Coding: psytel.hypermart.net, www.aac-tech.com, sourceforge.net/projects/faac, www.aac-audio.com, www.mpeg.org
-    { ".ac3"    , { PATH"ac3dec" , "/dev/fd/0"                                             , NULL }},  // Dolby AC3            : www.att.com
-    { "ac3.lqt" , { PATH"ac3dec" , "/dev/fd/0"                                             , NULL }},  // Dolby AC3            : www.att.com
-//  { ".ogg"    , { PATH"ogg123" , "-d", "wav", "-o", "file:/dev/fd/1", "/dev/fd/0"        , NULL }},  // Ogg Vorbis           : www.xiph.org/ogg/vorbis/index.html
-    { ".ogg"    , { PATH"ogg123" , "-d", "wav", "-f", "/dev/fd/1", "/dev/fd/0"             , NULL }},  // Ogg Vorbis           : www.xiph.org/ogg/vorbis/index.html
-    { ".pac"    , { PATH"lpac"   , "-x", "-o", "/dev/fd/0"                                 , NULL }},  // Lossless predictive Audio Compression: www-ft.ee.tu-berlin.de/~liebchen/lpac.html (liebchen@ft.ee.tu-berlin.de)
-    { ".shn"    , { PATH"shorten", "-x"                                                    , NULL }},  // Shorten              : shnutils.freeshell.org, www.softsound.com/Shorten.html (shnutils@freeshell.org, shorten@softsound.com)
-    { ".gz"     , { "gzip"       , "-d"                                                    , NULL }},  // gziped WAV
-    { ".sz"     , { PATH"szip"   , "-d"                                                    , NULL }},  // sziped WAV
-    { ".sz2"    , { PATH"szip2"  , "-d"                                                    , NULL }},  // sziped WAV
-    { ".bz"     , { PATH"bzip"   , "-d", "-"                                               , NULL }},  // bziped WAV
-    { ".bz2"    , { "bzip2"      , "-d", "-"                                               , NULL }},  // bziped WAV
-    { ".raw"    , { "sox"        , "-r44100 -sw -c2 -traw /dev/fd/0 -twav -sw -"           , NULL }},  // raw files are treated as CD like audio
-    { ".cdr"    , { "sox"        , "-r44100 -sw -c2 -traw /dev/fd/0 -twav -sw -"           , NULL }},  // CD-DA files are treated as CD like audio, no preemphasis info available
-    { ".flac"   , { PATH"flac"   , "-c", "-d", "/dev/fd/0"                                 , NULL }},  // Free Lossless Audio Coder: flac.sourceforge.net/
-    { ".fla"    , { PATH"flac"   , "-c", "-d", "/dev/fd/0"                                 , NULL }},  // Free Lossless Audio Coder: flac.sourceforge.net/
-    { ".ape"    , { PATH"mac"    , "/dev/stdin", "/dev/stdout", "-d"                       , NULL }},  // APE
-    { ".ofr"    , { PATH"optimfrog", "d", "/dev/fd/0", "-"                                 , NULL }},  // OFR
-    { ".la"     , { PATH"la"     , "-console", "/dev/fd/0"                                 , NULL }},  // LA
-    { ".mod"    , { "xmp"        , "-b16", "-c", "-f44100", "--stereo", "-o-", "/dev/fd/0" , NULL }},  // Amiga's Music on Disk:
-//  { ""        , { "sox"        , "/dev/fd/0", "-twav", "-sw", "-"                        , NULL }},  // Rest, may be sox can handle it
-};
-
-#undef PATH
-
-#if defined USE_OSS_AUDIO
-# include <sys/ioctl.h>
-# include <sys/time.h>
-# if   defined __linux__
-#  include <linux/soundcard.h>
-# elif defined __bsdi__
-#  include <sys/soundcard.h>
-# elif defined __FreeBSD__
-#  include <machine/soundcard.h>
-# elif defined __NetBSD__  ||  defined __OpenBSD__
-#  include <soundcard.h>
-# else
-#  include <soundcard.h>
-# endif
-#endif /* USE_OSS_AUDIO */
-
-#if defined USE_ESD_AUDIO
-# include <esd.h>
-#endif
-
-#if defined USE_SUN_AUDIO
-# include <sys/audioio.h>
-#endif
-
-#if defined USE_NICE
-# include <sys/resource.h>
-#endif
-
-// scheduler stuff
-#if defined USE_REALTIME
-# include <sched.h>
-#endif
-
-#ifndef O_BINARY
-# ifdef _O_BINARY
-#  define O_BINARY              _O_BINARY
-# else
-#  define O_BINARY              0
-# endif
-#endif
-
-#if defined _WIN32  ||  defined __TURBOC__
-# define strncasecmp(s1,s2,n)   strnicmp (s1, s2, n)
-# define strcasecmp(s1,s2,n)    stricmp (s1, s2)
-#endif
-
-static void
-Set_Realtime ( void )
-{
-# if defined USE_REALTIME               // works for all POSIX 1b-conform systems, also the memory should be locked
-    struct sched_param  sp;
-
-    memset      ( &sp, 0, sizeof(sp) );
-    seteuid     ( 0 );
-    sp.sched_priority = sched_get_priority_min ( SCHED_FIFO );
-    sched_setscheduler ( 0, SCHED_RR, &sp );
-    seteuid     ( getuid() );
-# endif
-
-# if defined USE_NICE
-    seteuid     ( 0 );
-    setpriority ( PRIO_PROCESS, getpid(), -20 );
-    seteuid     ( getuid() );
-# endif
-}
-
-
-
-
-/*
- *
- *  Manpages of pipe(2), fork(2), dup2(2), execve(2) respectively exec(3), including waitpid(2) respectively sigaction(2)+signal(7).
- *
- *   1) create a pipe with pipe(2)
- *   2) fork(2)
- *
- *  if fork successful:
- *
- *  Parent process:
- *   E3) close the write end of the pipe
- *   E4) read the data from the pipe, wait for the end of the child and process errors
- *   E5) clean up
- *
- *  Child process:
- *   K3) close the write end of the pipe
- *   K4) dup2(2)licate fd on stdin
- *   K5) dup2(2)licate the write end of the pipe on stdout
- *   K6) think of something good for stderr ;-)
- *   K7) exec(2/3)ute A
- *
- */
-
-
-int
-filter ( int fdi, char** argv )
-{
-    int    fd [2];
-    pid_t  pid;
-    int    i;
-
-    if ( 0 != pipe (fd) )
-        exit (1);
-
-    pid = fork ();
-
-    switch ( pid ) {
-    case -1: /* error */
-        exit (2);
-
-    case  0: /* child process */
-        dup2   ( fdi   , STDIN_FILENO  );
-        dup2   ( fd [1], STDOUT_FILENO );
-        close  ( STDERR_FILENO );
-        for ( i = 3; i < 256; i++ )
-           close (i);
-        Set_Realtime ();
-        execvp ( argv [0], argv );
-        break;
-
-    default: /* parent process */
-        close (fd [1]);
-        break;
-    }
-//    fcntl ( fd [0], F_SETFD, FD_CLOEXEC);
-
-    return fd [0];
-}
-
-
-int
-test_for_filters ( int fd, const char* name )
-{
-    const char*  nameend = name + strlen(name);
-    size_t       i;
-    size_t       sl;
-
-rep:
-    for ( i = 0; i < sizeof(decoder)/sizeof(*decoder); i++ ) {
-        sl = strlen(decoder[i].ext);
-        if (nameend - sl >= name  &&
-            0 == strncasecmp (nameend - sl, decoder[i].ext, sl) ) {
-            nameend -= sl;
-            fd = filter (fd, decoder[i].argv );
-            goto rep;
-        }
-    }
-    return fd;
-}
-
-
-
-typedef unsigned long  u32;
-typedef unsigned short u16;
-typedef unsigned char  label[4];
-
-typedef struct {
-    label riff;
-    u32   File_Length;
-} Prefix;
-
-typedef struct {
-    u16 is_PCM;
-    u16 Channels;
-    u32 Sample_Frequency;
-    u32 Bytes_per_sec;
-    u16 Bytes_per_Sample;
-    u16 Bits;
-} Format;
-
-typedef struct {
-    Prefix P;
-    label  wave;
-    label  fmt;
-    u32    fmt_Length;
-    Format F;
-    label  data;
-    u32    Sample_Length;
-} Header;
-
-
-
-static long
-defaults ( long val, long std )
-{
-    return val ? val : std;
-}
-
-static void
-message ( unsigned long samples, unsigned long samptot, unsigned long sampfreq )
-{
-    if ( samptot > 0  &&  samptot < 100*60*sampfreq )
-        fprintf ( stderr, "%2u:%02u.%03u/%2u:%02u.%03u\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b",
-                  samples/sampfreq/60, samples/sampfreq%60, samples%sampfreq*1000/sampfreq,
-                  samptot/sampfreq/60, samptot/sampfreq%60, samptot%sampfreq*1000/sampfreq );
-    else
-        fprintf ( stderr, "%2u:%02u.%03u\b\b\b\b\b\b\b\b\b",
-                  samples/sampfreq/60, samples/sampfreq%60, samples%sampfreq*1000/sampfreq );
-}
-
-
-static int    last_channels = -1;
-static int    last_freq     = -1;
-static int    last_fmt      = -1;
-static int    last_size     = -1;
-
-static int    channels;
-static int    freq;
-static int    fmt;
-static int    size;
-
-static unsigned char       A [BLOCK * 8 * 4];
-static signed short        B [BLOCK] [2];
-
-
-static inline int
-r ( double x )
-{
-    long  l = (long) floor ( x + 0.5 );
-
-    if ( (short)l == l )
-        return (short)l;
-    return (short) ( (l << 31) ^ 0x7FFF );
-}
-
-
-static void
-play ( int fdd, int fd, const char* name )
-{
-    Header              H;
-    int                 org;      /* argument for ioctl calls */
-    int                 arg;      /* argument for ioctl calls */
-    int                 status;   /* return status of system calls */
-    unsigned long       filelen;
-    unsigned long long  toplay;
-    unsigned long       totalsamples;
-    size_t              len;
-    size_t              tmp;
-    ssize_t             bytesread;
-    ssize_t             byteswrote;
-    size_t              samples;
-    size_t              totalread;
-    int                 i;
-    int                 j;
-    int                 finish;
-    unsigned char*      p;
-    short               ch [8];
-
-
-    if ( sizeof (H) != 44 ) {
-        fprintf ( stderr,"%s: program malfunction: Header struct not 44 bytes long.\nCompile without struct alignment and try again.\a\n", "wp" );
-        exit (1);
-    }
-
-    fd = test_for_filters ( fd, name );
-
-    if ( sizeof(H)-8 != read ( fd, &H, sizeof (H)-8 ))
-        return;
-
-    fprintf (stderr, "\r\033[7m\r%s\033[0m\033[K\n", name );
-    if ( 0 != memcmp (H.P.riff, "RIFF", 4) ) {
-        fprintf (stderr, "not a WAV file\n");
-        return;
-    }
-
-    do {
-        memmove (H.data+0, H.data+1, 3);
-        if (read (fd, H.data+3, 1) != 1)
-            return;
-    } while ( 0 != memcmp (H.data, "data", 4) );
-    read ( fd, &H.Sample_Length, 4 );
-
-    freq     = defaults (H.F.Sample_Frequency, 44100);  /* set sampling parameters: sampling rate */
-    channels = defaults (H.F.Channels, 2);              /* set sampling parameters: mono or stereo */
-    size     = defaults (H.F.Channels ? 8*H.F.Bytes_per_Sample/H.F.Channels : 0, 16);      /* set sampling parameters: sample size */
-
-#if 0
-    // Moved to front
-    if ( -1 == (status = ioctl (fdd, SOUND_PCM_SYNC, 0)) )
-        perror ("SOUND_PCM_SYNC ioctl failed");
-#endif
-
-    org = arg = 2;
-    if ( arg != last_channels  &&  -1 == (status = ioctl (fdd, SOUND_PCM_WRITE_CHANNELS, &arg)) )
-        perror ("SOUND_PCM_WRITE_CHANNELS ioctl failed");
-    if (arg != org)
-        perror ("unable to set number of channels");
-    last_channels = arg;
-
-    org = arg = 16;
-    if ( arg != last_size  &&  -1 == (status = ioctl (fdd, SOUND_PCM_WRITE_BITS, &arg)) )
-        perror ("SOUND_PCM_WRITE_BITS ioctl failed");
-    if (arg != org)
-        perror ("unable to set sample size");
-    last_size = arg;
-
-    org = arg = org <= 8  ?  AFMT_U8  :  AFMT_S16_LE;
-    if ( arg != last_fmt  &&  -1 == ioctl (fdd, SNDCTL_DSP_SETFMT, &arg) )
-        perror ("SNDCTL_DSP_SETFMT ioctl failed");
-    if ((arg & org) == 0)
-        perror ("unable to set data format");
-    last_fmt = arg;
-
-    org = arg = freq;                   /* set sampling parameters: sampling rate */
-    if ( arg != last_freq  &&  -1 == (status = ioctl (fdd, SOUND_PCM_WRITE_RATE, &arg)) )
-        perror ("SOUND_PCM_WRITE_WRITE ioctl failed");
-    last_freq = arg;
-
-    fprintf (stderr, "\r%1u*%2u bit %5u Hz:   ", channels, size, freq );
-    fflush (stderr);
-
-    toplay = H.Sample_Length < 0x7FFFFFFF  &&  H.Sample_Length > 0
-           ? H.Sample_Length / (channels*(size/8))
-           : 0xFFFFFFFFFFFFFFFF;
-
-    totalread    = 0;
-    totalsamples = 0;
-
-    message ( totalsamples, toplay, freq );
-
-    for ( finish = 0; !finish; ) {
-
-        if ( toplay-totalsamples <= BLOCK )
-            len = (toplay-totalsamples) * channels * (size/8), finish = 1;
-        else
-            len = BLOCK * channels * (size/8);
-
-        bytesread = 0;
-        do {
-            tmp = read ( fd, A+bytesread, len-bytesread );
-            if ( tmp <= 0 ) {
-                finish = 1;
-                break;
-            }
-            bytesread += tmp;
-        } while ( bytesread < len );
-
-        totalread    += bytesread;
-        samples       = bytesread / (channels * (size/8));
-        totalsamples += samples;
-
-        message ( totalsamples, toplay, freq );
-
-        p = A;
-        switch (channels) {
-        case 1:
-            switch (size) {
-            case  8:
-                for ( i = 0; i < samples; i++, p++ )
-                    B [i][0] = B [i][1] = (*p-128) << 8;
-                break;
-            case 16:
-                for ( i = 0; i < samples; i++, p+=2 )
-                    B [i][0] = B [i][1] = *(short*)(p);
-                break;
-            case 24:
-                for ( i = 0; i < samples; i++, p+=3 )
-                    B [i][0] = B [i][1] = *(short*)(p+1);
-                break;
-            case 32:
-                for ( i = 0; i < samples; i++, p+=4 )
-                    B [i][0] = B [i][1] = *(short*)(p+2);
-                break;
-            }
-            break;
-
-        case 2:
-            switch (size) {
-            case  8:
-                for ( i = 0; i < samples; i++, p+=2 )
-                    B [i][0] = (p[0]-128) << 8,
-                    B [i][1] = (p[1]-128) << 8;
-                break;
-            case 16:
-                for ( i = 0; i < samples; i++, p+=4 )
-                    B [i][0] = *(short*)(p+0),
-                    B [i][1] = *(short*)(p+2);
-                break;
-            case 24:
-                for ( i = 0; i < samples; i++, p+=6 )
-                    B [i][0] = *(short*)(p+1),
-                    B [i][1] = *(short*)(p+4);
-                break;
-            case 32:
-                for ( i = 0; i < samples; i++, p+=8 )
-                    B [i][0] = *(short*)(p+2),
-                    B [i][1] = *(short*)(p+6);
-                break;
-            }
-            break;
-
-        default:
-            for ( i = 0; i < samples; i++ ) {
-
-                switch (size) {
-                case  8:
-                    for ( j = 0; j < channels; j++, p+=1 )
-                        ch [j] = (p[0]-128) << 8;
-                    break;
-                case 16:
-                    for ( j = 0; j < channels; j++, p+=2 )
-                        ch [j] = *(short*)(p+0);
-                    break;
-                case 24:
-                    for ( j = 0; j < channels; j++, p+=3 )
-                        ch [j] = *(short*)(p+1);
-                    break;
-                case 32:
-                    for ( j = 0; j < channels; j++, p+=4 )
-                        ch [j] = *(short*)(p+2);
-                    break;
-                }
-
-                switch (channels) {
-                case 3:
-                    B [i][0] = r ( ch[0] + 0.707*ch[2] );
-                    B [i][1] = r ( ch[1] + 0.707*ch[2] );
-                    break;
-                case 4:
-                    B [i][0] = r ( ch[0] + 0.707*ch[2] );
-                    B [i][1] = r ( ch[1] + 0.707*ch[3] );
-                    break;
-                case 5:
-                    B [i][0] = r ( ch[0] + 0.707*ch[2] + 0.707*ch[3] );
-                    B [i][1] = r ( ch[1] + 0.707*ch[2] + 0.707*ch[4] );
-                    break;
-                case 6:
-                case 7:
-                case 8:
-                    B [i][0] = r ( ch[0] + 0.707*ch[2] + 3.16*ch[3] + 0.707*ch[4] );
-                    B [i][1] = r ( ch[1] + 0.707*ch[2] + 3.16*ch[3] + 0.707*ch[5] );
-                    break;
-                }
-            }
-            break;
-        }
-
-        len = samples * (16/8 * 2);
-        byteswrote = 0;
-
-        while ( byteswrote < len ) {
-            tmp = write ( fdd, B+byteswrote, len-byteswrote );
-            if ( tmp <= 0 ) {
-                perror ("Wrote wrong number of bytes");
-                finish = 1;
-                break;
-            }
-            byteswrote += tmp;
-        }
-    }
-
-    return;
-}
-
-
-int
-main ( int argc, char** argv )
-{
-    int           fds;
-    int           fdd;
-    int           fdm;
-    int           org;      /* argument for ioctl calls */
-    int           arg;      /* argument for ioctl calls */
-    int           status;   /* return status of system calls */
-    const char*   name;
-
-    seteuid     ( getuid() );
-
-    if ( (fdd = open ("/dev/audio", O_WRONLY)) < 0 ) {  /* open sound device */
-        perror ("open of /dev/dsp failed");
-        return 1;
-    }
-    if ( (fdm = open ("/dev/mixer", O_RDWR)) < 0 ) {    /* open mixer device */
-        perror ("open of /dev/mixer failed");
-        return 1;
-    }
-
-    org = arg = 0x6060;
-    if ( -1 == (status = ioctl (fdm, SOUND_MIXER_WRITE_VOLUME, &arg)) )
-        perror ("SOUND_MIXER_WRITE_VOLUME ioctl failed");
-    org = arg = 0x5A5A;
-    if ( -1 == (status = ioctl (fdm, SOUND_MIXER_WRITE_PCM, &arg)) )
-        perror ("SOUND_MIXER_WRITE_PCM ioctl failed");
-    org = arg = 0x0000;
-    if ( -1 == (status = ioctl (fdm, SOUND_MIXER_WRITE_MIC, &arg)) )
-        perror ("SOUND_MIXER_WRITE_MIC ioctl failed");
-    org = arg = 0x0000;
-    if ( -1 == (status = ioctl (fdm, SOUND_MIXER_WRITE_SYNTH, &arg)) )
-        perror ("SOUND_MIXER_WRITE_SYNTH ioctl failed");
-    org = arg = 0x0000;
-    if ( -1 == (status = ioctl (fdm, SOUND_MIXER_WRITE_IMIX, &arg)) )
-        perror ("SOUND_MIXER_WRITE_IMIX ioctl failed");
-    org = arg = 0x0000;
-    if ( -1 == (status = ioctl (fdm, SOUND_MIXER_WRITE_LINE1, &arg)) )
-        perror ("SOUND_MIXER_WRITE_LINE1 ioctl failed");
-    org = arg = 0x0000;
-    if ( -1 == (status = ioctl (fdm, SOUND_MIXER_WRITE_LINE2, &arg)) )
-        perror ("SOUND_MIXER_WRITE_LINE2 ioctl failed");
-    org = arg = 0x0000;
-    if ( -1 == (status = ioctl (fdm, SOUND_MIXER_WRITE_LINE3, &arg)) )
-        perror ("SOUND_MIXER_WRITE_LINE3 ioctl failed");
-    close (fdm);
-
-#if 0
-
-#define SOUND_MIXER_SPEAKER      5
-#define SOUND_MIXER_LINE         6
-#define SOUND_MIXER_CD           8
-#define SOUND_MIXER_ALTPCM      10
-#define SOUND_MIXER_RECLEV      11      /* Recording level */
-#define SOUND_MIXER_IGAIN       12      /* Input gain */
-#define SOUND_MIXER_OGAIN       13      /* Output gain */
-#define SOUND_MIXER_DIGITAL1    17      /* Digital (input) 1 */
-#define SOUND_MIXER_DIGITAL2    18      /* Digital (input) 2 */
-#define SOUND_MIXER_DIGITAL3    19      /* Digital (input) 3 */
-#define SOUND_MIXER_PHONEIN     20      /* Phone input */
-#define SOUND_MIXER_PHONEOUT    21      /* Phone output */
-#define SOUND_MIXER_VIDEO       22      /* Video/TV (audio) in */
-#define SOUND_MIXER_RADIO       23      /* Radio in */
-#define SOUND_MIXER_MONITOR     24      /* Monitor (usually mic) volume */
-
-#endif
-
-    mlock (A, sizeof (A) );
-    mlock (B, sizeof (B) );
-    Set_Realtime ();
-
-    if ( argc <= 1 )
-        play ( fdd, 0, "<stdin>" );
-    else
-        while ( (name = *++argv) != NULL ) {
-            if ( (fds = open (*argv, O_RDONLY)) < 0 ) {
-                perror ("open of file failed");
-                continue;
-            }
-            play  ( fdd, fds, name );
-            close ( fds );
-        }
-
-    write (fdd, "\0\0\0\0\0\0\0\0\0\0\0\0", 12);
-    close (fdd);
-    fprintf (stderr, "\n");
-    return 0;
-}
-
-
-#if 0
-
-static struct termios stored_settings;
-
-
-void reset ( void )
-{
-    tcsetattr ( 0, TCSANOW, &stored_settings );
-}
-
-
-void set ( void )
-{
-    struct termios new_settings;
-
-    tcgetattr ( 0, &stored_settings );
-    new_settings = stored_settings;
-
-    new_settings.c_lflag    &= ~ECHO;
-    /* Disable canonical mode, and set buffer size to 1 byte */
-    new_settings.c_lflag    &= ~ICANON;
-    new_settings.c_cc[VTIME] = 0;
-    new_settings.c_cc[VMIN]  = 1;
-
-    tcsetattr(0,TCSANOW,&new_settings);
-    return;
-}
-
-
-int sel ( void )
-{
-    struct timeval  t;
-    fd_set          fd [1];
-    int             ret;
-    unsigned char   c;
-
-    FD_SET (0, fd);
-    t.tv_sec  = 0;
-    t.tv_usec = 0;
-
-    ret = select ( 1, fd, NULL, NULL, &t );
-
-    switch ( ret ) {
-    case  0:
-        return -1;
-    case  1:
-        ret = read (0, &c, 1);
-        return ret == 1  ?  c  :  -1;
-    default:
-        return -2;
-    }
-}
-
-#endif
Index: penc/branches/zorg/wp.dsp
===================================================================
--- /mppenc/branches/zorg/wp.dsp	(revision 40)
+++ 	(revision )
@@ -1,100 +1,0 @@
-# Microsoft Developer Studio Project File - Name="wp" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=wp - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "wp.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "wp.mak" CFG="wp - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "wp - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "wp - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "wp - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "wp___Win32_Release"
-# PROP BASE Intermediate_Dir "wp___Win32_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "wp - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "wp___Win32_Debug"
-# PROP BASE Intermediate_Dir "wp___Win32_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ  /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ  /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "wp - Win32 Release"
-# Name "wp - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\wp.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
Index: penc/branches/zorg/wp.vcproj
===================================================================
--- /mppenc/branches/zorg/wp.vcproj	(revision 40)
+++ 	(revision )
@@ -1,166 +1,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="wp"
-	SccProjectName=""
-	SccLocalPath="">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\Debug"
-			IntermediateDirectory=".\Debug"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Debug/wp.pch"
-				AssemblerListingLocation=".\Debug/"
-				ObjectFile=".\Debug/"
-				ProgramDataBaseFileName=".\Debug/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=".\Debug/wp.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile=".\Debug/wp.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Debug/wp.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\Release"
-			IntermediateDirectory=".\Release"
-			ConfigurationType="1"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderFile=".\Release/wp.pch"
-				AssemblerListingLocation=".\Release/"
-				ObjectFile=".\Release/"
-				ProgramDataBaseFileName=".\Release/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile=".\Release/wp.exe"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				ProgramDatabaseFile=".\Release/wp.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Release/wp.tlb"
-				HeaderFileName=""/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1033"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
-			<File
-				RelativePath="wp.c">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="0"
-						PreprocessorDefinitions=""
-						BasicRuntimeChecks="3"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						Optimization="2"
-						PreprocessorDefinitions=""/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
