mpeglayer2.cpp
上传用户:sun1608
上传日期:2007-02-02
资源大小:6116k
文件大小:36k
源码类别:

流媒体/Mpeg4/MP4

开发平台:

Visual C++

  1. /* MPEG/WAVE Sound library
  2.    (C) 1997 by Jung woo-jae */
  3. // Mpeglayer2.cc
  4. // It's for MPEG Layer 2
  5. #ifdef HAVE_CONFIG_H
  6. #include "config.h"
  7. #endif
  8. #if defined(_WIN32) && defined(_MSC_VER)
  9. // disable warnings about double to float conversions
  10. #pragma warning(disable: 4244 4305)
  11. #endif
  12. #include "MPEGaudio.h"
  13. #define MAXTABLE 2
  14. // Tables for layer 2
  15. static const int bitalloclengthtable[MAXTABLE][MAXSUBBAND]=
  16. {{4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3},
  17.  {4,4,4,4,4,4,4,4,4,4,4,3,3,3,3,3, 3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2}};
  18. static const REAL group5bits[27*3]=
  19. {
  20.   -2.0/3.0, -2.0/3.0, -2.0/3.0,
  21.        0.0, -2.0/3.0, -2.0/3.0,
  22.    2.0/3.0, -2.0/3.0, -2.0/3.0,
  23.   -2.0/3.0,      0.0, -2.0/3.0,
  24.        0.0,      0.0, -2.0/3.0,
  25.    2.0/3.0,      0.0, -2.0/3.0,
  26.   -2.0/3.0,  2.0/3.0, -2.0/3.0,
  27.        0.0,  2.0/3.0, -2.0/3.0,
  28.    2.0/3.0,  2.0/3.0, -2.0/3.0,
  29.   -2.0/3.0, -2.0/3.0,      0.0,
  30.        0.0, -2.0/3.0,      0.0,
  31.    2.0/3.0, -2.0/3.0,      0.0,
  32.   -2.0/3.0,      0.0,      0.0,
  33.        0.0,      0.0,      0.0,
  34.    2.0/3.0,      0.0,      0.0,
  35.   -2.0/3.0,  2.0/3.0,      0.0,
  36.        0.0,  2.0/3.0,      0.0,
  37.    2.0/3.0,  2.0/3.0,      0.0,
  38.   -2.0/3.0, -2.0/3.0,  2.0/3.0,
  39.        0.0, -2.0/3.0,  2.0/3.0,
  40.    2.0/3.0, -2.0/3.0,  2.0/3.0,
  41.   -2.0/3.0,      0.0,  2.0/3.0,
  42.        0.0,      0.0,  2.0/3.0,
  43.    2.0/3.0,      0.0,  2.0/3.0,
  44.   -2.0/3.0,  2.0/3.0,  2.0/3.0,
  45.        0.0,  2.0/3.0,  2.0/3.0,
  46.    2.0/3.0,  2.0/3.0,  2.0/3.0
  47. };
  48. static const REAL group7bits[125*3]=
  49. {
  50.  -0.8,-0.8,-0.8, -0.4,-0.8,-0.8, 0.0,-0.8,-0.8, 0.4,-0.8,-0.8, 0.8,-0.8,-0.8,
  51.  -0.8,-0.4,-0.8, -0.4,-0.4,-0.8, 0.0,-0.4,-0.8, 0.4,-0.4,-0.8, 0.8,-0.4,-0.8,
  52.  -0.8, 0.0,-0.8, -0.4, 0.0,-0.8, 0.0, 0.0,-0.8, 0.4, 0.0,-0.8, 0.8, 0.0,-0.8,
  53.  -0.8, 0.4,-0.8, -0.4, 0.4,-0.8, 0.0, 0.4,-0.8, 0.4, 0.4,-0.8, 0.8, 0.4,-0.8,
  54.  -0.8, 0.8,-0.8, -0.4, 0.8,-0.8, 0.0, 0.8,-0.8, 0.4, 0.8,-0.8, 0.8, 0.8,-0.8,
  55.  -0.8,-0.8,-0.4, -0.4,-0.8,-0.4, 0.0,-0.8,-0.4, 0.4,-0.8,-0.4, 0.8,-0.8,-0.4,
  56.  -0.8,-0.4,-0.4, -0.4,-0.4,-0.4, 0.0,-0.4,-0.4, 0.4,-0.4,-0.4, 0.8,-0.4,-0.4,
  57.  -0.8, 0.0,-0.4, -0.4, 0.0,-0.4, 0.0, 0.0,-0.4, 0.4, 0.0,-0.4, 0.8, 0.0,-0.4,
  58.  -0.8, 0.4,-0.4, -0.4, 0.4,-0.4, 0.0, 0.4,-0.4, 0.4, 0.4,-0.4, 0.8, 0.4,-0.4,
  59.  -0.8, 0.8,-0.4, -0.4, 0.8,-0.4, 0.0, 0.8,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, 0.8, 0.0, 0.0, 0.8, 0.4, 0.0, 0.8, 0.8, 0.0, 0.8,
  73.  -0.8, 0.4, 0.8, -0.4, 0.4, 0.8, 0.0, 0.4, 0.8, 0.4, 0.4, 0.8, 0.8, 0.4, 0.8,
  74.  -0.8, 0.8, 0.8, -0.4, 0.8, 0.8, 0.0, 0.8, 0.8, 0.4, 0.8, 0.8, 0.8, 0.8, 0.8
  75. };
  76. static const REAL group10bits[729*3]=
  77. {
  78.  -8.0/9.0,-8.0/9.0,-8.0/9.0, -6.0/9.0,-8.0/9.0,-8.0/9.0, -4.0/9.0,-8.0/9.0,-8.0/9.0,
  79.  -2.0/9.0,-8.0/9.0,-8.0/9.0,      0.0,-8.0/9.0,-8.0/9.0,  2.0/9.0,-8.0/9.0,-8.0/9.0,
  80.   4.0/9.0,-8.0/9.0,-8.0/9.0,  6.0/9.0,-8.0/9.0,-8.0/9.0,  8.0/9.0,-8.0/9.0,-8.0/9.0,
  81.  -8.0/9.0,-6.0/9.0,-8.0/9.0, -6.0/9.0,-6.0/9.0,-8.0/9.0, -4.0/9.0,-6.0/9.0,-8.0/9.0,
  82.  -2.0/9.0,-6.0/9.0,-8.0/9.0,      0.0,-6.0/9.0,-8.0/9.0,  2.0/9.0,-6.0/9.0,-8.0/9.0,
  83.   4.0/9.0,-6.0/9.0,-8.0/9.0,  6.0/9.0,-6.0/9.0,-8.0/9.0,  8.0/9.0,-6.0/9.0,-8.0/9.0,
  84.  -8.0/9.0,-4.0/9.0,-8.0/9.0, -6.0/9.0,-4.0/9.0,-8.0/9.0, -4.0/9.0,-4.0/9.0,-8.0/9.0,
  85.  -2.0/9.0,-4.0/9.0,-8.0/9.0,      0.0,-4.0/9.0,-8.0/9.0,  2.0/9.0,-4.0/9.0,-8.0/9.0,
  86.   4.0/9.0,-4.0/9.0,-8.0/9.0,  6.0/9.0,-4.0/9.0,-8.0/9.0,  8.0/9.0,-4.0/9.0,-8.0/9.0,
  87.  -8.0/9.0,-2.0/9.0,-8.0/9.0, -6.0/9.0,-2.0/9.0,-8.0/9.0, -4.0/9.0,-2.0/9.0,-8.0/9.0,
  88.  -2.0/9.0,-2.0/9.0,-8.0/9.0,      0.0,-2.0/9.0,-8.0/9.0,  2.0/9.0,-2.0/9.0,-8.0/9.0,
  89.   4.0/9.0,-2.0/9.0,-8.0/9.0,  6.0/9.0,-2.0/9.0,-8.0/9.0,  8.0/9.0,-2.0/9.0,-8.0/9.0,
  90.  -8.0/9.0,     0.0,-8.0/9.0, -6.0/9.0,     0.0,-8.0/9.0, -4.0/9.0,     0.0,-8.0/9.0,
  91.  -2.0/9.0,     0.0,-8.0/9.0,      0.0,     0.0,-8.0/9.0,  2.0/9.0,     0.0,-8.0/9.0,
  92.   4.0/9.0,     0.0,-8.0/9.0,  6.0/9.0,     0.0,-8.0/9.0,  8.0/9.0,     0.0,-8.0/9.0,
  93.  -8.0/9.0, 2.0/9.0,-8.0/9.0, -6.0/9.0, 2.0/9.0,-8.0/9.0, -4.0/9.0, 2.0/9.0,-8.0/9.0,
  94.  -2.0/9.0, 2.0/9.0,-8.0/9.0,      0.0, 2.0/9.0,-8.0/9.0,  2.0/9.0, 2.0/9.0,-8.0/9.0,
  95.   4.0/9.0, 2.0/9.0,-8.0/9.0,  6.0/9.0, 2.0/9.0,-8.0/9.0,  8.0/9.0, 2.0/9.0,-8.0/9.0,
  96.  -8.0/9.0, 4.0/9.0,-8.0/9.0, -6.0/9.0, 4.0/9.0,-8.0/9.0, -4.0/9.0, 4.0/9.0,-8.0/9.0,
  97.  -2.0/9.0, 4.0/9.0,-8.0/9.0,      0.0, 4.0/9.0,-8.0/9.0,  2.0/9.0, 4.0/9.0,-8.0/9.0,
  98.   4.0/9.0, 4.0/9.0,-8.0/9.0,  6.0/9.0, 4.0/9.0,-8.0/9.0,  8.0/9.0, 4.0/9.0,-8.0/9.0,
  99.  -8.0/9.0, 6.0/9.0,-8.0/9.0, -6.0/9.0, 6.0/9.0,-8.0/9.0, -4.0/9.0, 6.0/9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
  112.  -2.0/9.0,-4.0/9.0,-6.0/9.0,      0.0,-4.0/9.0,-6.0/9.0,  2.0/9.0,-4.0/9.0,-6.0/9.0,
  113.   4.0/9.0,-4.0/9.0,-6.0/9.0,  6.0/9.0,-4.0/9.0,-6.0/9.0,  8.0/9.0,-4.0/9.0,-6.0/9.0,
  114.  -8.0/9.0,-2.0/9.0,-6.0/9.0, -6.0/9.0,-2.0/9.0,-6.0/9.0, -4.0/9.0,-2.0/9.0,-6.0/9.0,
  115.  -2.0/9.0,-2.0/9.0,-6.0/9.0,      0.0,-2.0/9.0,-6.0/9.0,  2.0/9.0,-2.0/9.0,-6.0/9.0,
  116.   4.0/9.0,-2.0/9.0,-6.0/9.0,  6.0/9.0,-2.0/9.0,-6.0/9.0,  8.0/9.0,-2.0/9.0,-6.0/9.0,
  117.  -8.0/9.0,     0.0,-6.0/9.0, -6.0/9.0,     0.0,-6.0/9.0, -4.0/9.0,     0.0,-6.0/9.0,
  118.  -2.0/9.0,     0.0,-6.0/9.0,      0.0,     0.0,-6.0/9.0,  2.0/9.0,     0.0,-6.0/9.0,
  119.   4.0/9.0,     0.0,-6.0/9.0,  6.0/9.0,     0.0,-6.0/9.0,  8.0/9.0,     0.0,-6.0/9.0,
  120.  -8.0/9.0, 2.0/9.0,-6.0/9.0, -6.0/9.0, 2.0/9.0,-6.0/9.0, -4.0/9.0, 2.0/9.0,-6.0/9.0,
  121.  -2.0/9.0, 2.0/9.0,-6.0/9.0,      0.0, 2.0/9.0,-6.0/9.0,  2.0/9.0, 2.0/9.0,-6.0/9.0,
  122.   4.0/9.0, 2.0/9.0,-6.0/9.0,  6.0/9.0, 2.0/9.0,-6.0/9.0,  8.0/9.0, 2.0/9.0,-6.0/9.0,
  123.  -8.0/9.0, 4.0/9.0,-6.0/9.0, -6.0/9.0, 4.0/9.0,-6.0/9.0, -4.0/9.0, 4.0/9.0,-6.0/9.0,
  124.  -2.0/9.0, 4.0/9.0,-6.0/9.0,      0.0, 4.0/9.0,-6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9.0,-6.0/9.0,-4.0/9.0,
  137.   4.0/9.0,-6.0/9.0,-4.0/9.0,  6.0/9.0,-6.0/9.0,-4.0/9.0,  8.0/9.0,-6.0/9.0,-4.0/9.0,
  138.  -8.0/9.0,-4.0/9.0,-4.0/9.0, -6.0/9.0,-4.0/9.0,-4.0/9.0, -4.0/9.0,-4.0/9.0,-4.0/9.0,
  139.  -2.0/9.0,-4.0/9.0,-4.0/9.0,      0.0,-4.0/9.0,-4.0/9.0,  2.0/9.0,-4.0/9.0,-4.0/9.0,
  140.   4.0/9.0,-4.0/9.0,-4.0/9.0,  6.0/9.0,-4.0/9.0,-4.0/9.0,  8.0/9.0,-4.0/9.0,-4.0/9.0,
  141.  -8.0/9.0,-2.0/9.0,-4.0/9.0, -6.0/9.0,-2.0/9.0,-4.0/9.0, -4.0/9.0,-2.0/9.0,-4.0/9.0,
  142.  -2.0/9.0,-2.0/9.0,-4.0/9.0,      0.0,-2.0/9.0,-4.0/9.0,  2.0/9.0,-2.0/9.0,-4.0/9.0,
  143.   4.0/9.0,-2.0/9.0,-4.0/9.0,  6.0/9.0,-2.0/9.0,-4.0/9.0,  8.0/9.0,-2.0/9.0,-4.0/9.0,
  144.  -8.0/9.0,     0.0,-4.0/9.0, -6.0/9.0,     0.0,-4.0/9.0, -4.0/9.0,     0.0,-4.0/9.0,
  145.  -2.0/9.0,     0.0,-4.0/9.0,      0.0,     0.0,-4.0/9.0,  2.0/9.0,     0.0,-4.0/9.0,
  146.   4.0/9.0,     0.0,-4.0/9.0,  6.0/9.0,     0.0,-4.0/9.0,  8.0/9.0,     0.0,-4.0/9.0,
  147.  -8.0/9.0, 2.0/9.0,-4.0/9.0, -6.0/9.0, 2.0/9.0,-4.0/9.0, -4.0/9.0, 2.0/9.0,-4.0/9.0,
  148.  -2.0/9.0, 2.0/9.0,-4.0/9.0,      0.0, 2.0/9.0,-4.0/9.0,  2.0/9.0, 2.0/9.0,-4.0/9.0,
  149.   4.0/9.0, 2.0/9.0,-4.0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0,-8.0/9.0,-2.0/9.0,  8.0/9.0,-8.0/9.0,-2.0/9.0,
  162.  -8.0/9.0,-6.0/9.0,-2.0/9.0, -6.0/9.0,-6.0/9.0,-2.0/9.0, -4.0/9.0,-6.0/9.0,-2.0/9.0,
  163.  -2.0/9.0,-6.0/9.0,-2.0/9.0,      0.0,-6.0/9.0,-2.0/9.0,  2.0/9.0,-6.0/9.0,-2.0/9.0,
  164.   4.0/9.0,-6.0/9.0,-2.0/9.0,  6.0/9.0,-6.0/9.0,-2.0/9.0,  8.0/9.0,-6.0/9.0,-2.0/9.0,
  165.  -8.0/9.0,-4.0/9.0,-2.0/9.0, -6.0/9.0,-4.0/9.0,-2.0/9.0, -4.0/9.0,-4.0/9.0,-2.0/9.0,
  166.  -2.0/9.0,-4.0/9.0,-2.0/9.0,      0.0,-4.0/9.0,-2.0/9.0,  2.0/9.0,-4.0/9.0,-2.0/9.0,
  167.   4.0/9.0,-4.0/9.0,-2.0/9.0,  6.0/9.0,-4.0/9.0,-2.0/9.0,  8.0/9.0,-4.0/9.0,-2.0/9.0,
  168.  -8.0/9.0,-2.0/9.0,-2.0/9.0, -6.0/9.0,-2.0/9.0,-2.0/9.0, -4.0/9.0,-2.0/9.0,-2.0/9.0,
  169.  -2.0/9.0,-2.0/9.0,-2.0/9.0,      0.0,-2.0/9.0,-2.0/9.0,  2.0/9.0,-2.0/9.0,-2.0/9.0,
  170.   4.0/9.0,-2.0/9.0,-2.0/9.0,  6.0/9.0,-2.0/9.0,-2.0/9.0,  8.0/9.0,-2.0/9.0,-2.0/9.0,
  171.  -8.0/9.0,     0.0,-2.0/9.0, -6.0/9.0,     0.0,-2.0/9.0, -4.0/9.0,     0.0,-2.0/9.0,
  172.  -2.0/9.0,     0.0,-2.0/9.0,      0.0,     0.0,-2.0/9.0,  2.0/9.0,     0.0,-2.0/9.0,
  173.   4.0/9.0,     0.0,-2.0/9.0,  6.0/9.0,     0.0,-2.0/9.0,  8.0/9.0,     0.0,-2.0/9.0,
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,-8.0/9.0,     0.0, -6.0/9.0,-8.0/9.0,     0.0, -4.0/9.0,-8.0/9.0,     0.0,
  187.  -2.0/9.0,-8.0/9.0,     0.0,      0.0,-8.0/9.0,     0.0,  2.0/9.0,-8.0/9.0,     0.0,
  188.   4.0/9.0,-8.0/9.0,     0.0,  6.0/9.0,-8.0/9.0,     0.0,  8.0/9.0,-8.0/9.0,     0.0,
  189.  -8.0/9.0,-6.0/9.0,     0.0, -6.0/9.0,-6.0/9.0,     0.0, -4.0/9.0,-6.0/9.0,     0.0,
  190.  -2.0/9.0,-6.0/9.0,     0.0,      0.0,-6.0/9.0,     0.0,  2.0/9.0,-6.0/9.0,     0.0,
  191.   4.0/9.0,-6.0/9.0,     0.0,  6.0/9.0,-6.0/9.0,     0.0,  8.0/9.0,-6.0/9.0,     0.0,
  192.  -8.0/9.0,-4.0/9.0,     0.0, -6.0/9.0,-4.0/9.0,     0.0, -4.0/9.0,-4.0/9.0,     0.0,
  193.  -2.0/9.0,-4.0/9.0,     0.0,      0.0,-4.0/9.0,     0.0,  2.0/9.0,-4.0/9.0,     0.0,
  194.   4.0/9.0,-4.0/9.0,     0.0,  6.0/9.0,-4.0/9.0,     0.0,  8.0/9.0,-4.0/9.0,     0.0,
  195.  -8.0/9.0,-2.0/9.0,     0.0, -6.0/9.0,-2.0/9.0,     0.0, -4.0/9.0,-2.0/9.0,     0.0,
  196.  -2.0/9.0,-2.0/9.0,     0.0,      0.0,-2.0/9.0,     0.0,  2.0/9.0,-2.0/9.0,     0.0,
  197.   4.0/9.0,-2.0/9.0,     0.0,  6.0/9.0,-2.0/9.0,     0.0,  8.0/9.0,-2.0/9.0,     0.0,
  198.  -8.0/9.0,     0.0,     0.0, -6.0/9.0,     0.0,     0.0, -4.0/9.0,     0.0,     0.0,
  199.  -2.0/9.0,     0.0,     0.0,      0.0,     0.0,     0.0,  2.0/9.0,     0.0,     0.0,
  200.   4.0/9.0,     0.0,     0.0,  6.0/9.0,     0.0,     0.0,  8.0/9.0,     0.0,     0.0,
  201.  -8.0/9.0, 2.0/9.0,     0.0, -6.0/9.0, 2.0/9.0,     0.0, -4.0/9.0, 2.0/9.0,     0.0,
  202.  -2.0/9.0, 2.0/9.0,     0.0,      0.0, 2.0/9.0,     0.0,  2.0/9.0, 2.0/9.0,     0.0,
  203.   4.0/9.0, 2.0/9.0,     0.0,  6.0/9.0, 2.0/9.0,     0.0,  8.0/9.0, 2.0/9.0,     0.0,
  204.  -8.0/9.0, 4.0/9.0,     0.0, -6.0/9.0, 4.0/9.0,     0.0, -4.0/9.0, 4.0/9.0,     0.0,
  205.  -2.0/9.0, 4.0/9.0,     0.0,      0.0, 4.0/9.0,     0.0,  2.0/9.0, 4.0/9.0,     0.0,
  206.   4.0/9.0, 4.0/9.0,     0.0,  6.0/9.0, 4.0/9.0,     0.0,  8.0/9.0, 4.0/9.0,     0.0,
  207.  -8.0/9.0, 6.0/9.0,     0.0, -6.0/9.0, 6.0/9.0,     0.0, -4.0/9.0, 6.0/9.0,     0.0,
  208.  -2.0/9.0, 6.0/9.0,     0.0,      0.0, 6.0/9.0,     0.0,  2.0/9.0, 6.0/9.0,     0.0,
  209.   4.0/9.0, 6.0/9.0,     0.0,  6.0/9.0, 6.0/9.0,     0.0,  8.0/9.0, 6.0/9.0,     0.0,
  210.  -8.0/9.0, 8.0/9.0,     0.0, -6.0/9.0, 8.0/9.0,     0.0, -4.0/9.0, 8.0/9.0,     0.0,
  211.  -2.0/9.0, 8.0/9.0,     0.0,      0.0, 8.0/9.0,     0.0,  2.0/9.0, 8.0/9.0,     0.0,
  212.   4.0/9.0, 8.0/9.0,     0.0,  6.0/9.0, 8.0/9.0,     0.0,  8.0/9.0, 8.0/9.0,     0.0,
  213.  -8.0/9.0,-8.0/9.0, 2.0/9.0, -6.0/9.0,-8.0/9.0, 2.0/9.0, -4.0/9.0,-8.0/9.0, 2.0/9.0,
  214.  -2.0/9.0,-8.0/9.0, 2.0/9.0,      0.0,-8.0/9.0, 2.0/9.0,  2.0/9.0,-8.0/9.0, 2.0/9.0,
  215.   4.0/9.0,-8.0/9.0, 2.0/9.0,  6.0/9.0,-8.0/9.0, 2.0/9.0,  8.0/9.0,-8.0/9.0, 2.0/9.0,
  216.  -8.0/9.0,-6.0/9.0, 2.0/9.0, -6.0/9.0,-6.0/9.0, 2.0/9.0, -4.0/9.0,-6.0/9.0, 2.0/9.0,
  217.  -2.0/9.0,-6.0/9.0, 2.0/9.0,      0.0,-6.0/9.0, 2.0/9.0,  2.0/9.0,-6.0/9.0, 2.0/9.0,
  218.   4.0/9.0,-6.0/9.0, 2.0/9.0,  6.0/9.0,-6.0/9.0, 2.0/9.0,  8.0/9.0,-6.0/9.0, 2.0/9.0,
  219.  -8.0/9.0,-4.0/9.0, 2.0/9.0, -6.0/9.0,-4.0/9.0, 2.0/9.0, -4.0/9.0,-4.0/9.0, 2.0/9.0,
  220.  -2.0/9.0,-4.0/9.0, 2.0/9.0,      0.0,-4.0/9.0, 2.0/9.0,  2.0/9.0,-4.0/9.0, 2.0/9.0,
  221.   4.0/9.0,-4.0/9.0, 2.0/9.0,  6.0/9.0,-4.0/9.0, 2.0/9.0,  8.0/9.0,-4.0/9.0, 2.0/9.0,
  222.  -8.0/9.0,-2.0/9.0, 2.0/9.0, -6.0/9.0,-2.0/9.0, 2.0/9.0, -4.0/9.0,-2.0/9.0, 2.0/9.0,
  223.  -2.0/9.0,-2.0/9.0, 2.0/9.0,      0.0,-2.0/9.0, 2.0/9.0,  2.0/9.0,-2.0/9.0, 2.0/9.0,
  224.   4.0/9.0,-2.0/9.0, 2.0/9.0,  6.0/9.0,-2.0/9.0, 2.0/9.0,  8.0/9.0,-2.0/9.0, 2.0/9.0,
  225.  -8.0/9.0,     0.0, 2.0/9.0, -6.0/9.0,     0.0, 2.0/9.0, -4.0/9.0,     0.0, 2.0/9.0,
  226.  -2.0/9.0,     0.0, 2.0/9.0,      0.0,     0.0, 2.0/9.0,  2.0/9.0,     0.0, 2.0/9.0,
  227.   4.0/9.0,     0.0, 2.0/9.0,  6.0/9.0,     0.0, 2.0/9.0,  8.0/9.0,     0.0, 2.0/9.0,
  228.  -8.0/9.0, 2.0/9.0, 2.0/9.0, -6.0/9.0, 2.0/9.0, 2.0/9.0, -4.0/9.0, 2.0/9.0, 2.0/9.0,
  229.  -2.0/9.0, 2.0/9.0, 2.0/9.0,      0.0, 2.0/9.0, 2.0/9.0,  2.0/9.0, 2.0/9.0, 2.0/9.0,
  230.   4.0/9.0, 2.0/9.0, 2.0/9.0,  6.0/9.0, 2.0/9.0, 2.0/9.0,  8.0/9.0, 2.0/9.0, 2.0/9.0,
  231.  -8.0/9.0, 4.0/9.0, 2.0/9.0, -6.0/9.0, 4.0/9.0, 2.0/9.0, -4.0/9.0, 4.0/9.0, 2.0/9.0,
  232.  -2.0/9.0, 4.0/9.0, 2.0/9.0,      0.0, 4.0/9.0, 2.0/9.0,  2.0/9.0, 4.0/9.0, 2.0/9.0,
  233.   4.0/9.0, 4.0/9.0, 2.0/9.0,  6.0/9.0, 4.0/9.0, 2.0/9.0,  8.0/9.0, 4.0/9.0, 2.0/9.0,
  234.  -8.0/9.0, 6.0/9.0, 2.0/9.0, -6.0/9.0, 6.0/9.0, 2.0/9.0, -4.0/9.0, 6.0/9.0, 2.0/9.0,
  235.  -2.0/9.0, 6.0/9.0, 2.0/9.0,      0.0, 6.0/9.0, 2.0/9.0,  2.0/9.0, 6.0/9.0, 2.0/9.0,
  236.   4.0/9.0, 6.0/9.0, 2.0/9.0,  6.0/9.0, 6.0/9.0, 2.0/9.0,  8.0/9.0, 6.0/9.0, 2.0/9.0,
  237.  -8.0/9.0, 8.0/9.0, 2.0/9.0, -6.0/9.0, 8.0/9.0, 2.0/9.0, -4.0/9.0, 8.0/9.0, 2.0/9.0,
  238.  -2.0/9.0, 8.0/9.0, 2.0/9.0,      0.0, 8.0/9.0, 2.0/9.0,  2.0/9.0, 8.0/9.0, 2.0/9.0,
  239.   4.0/9.0, 8.0/9.0, 2.0/9.0,  6.0/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, 4.0/9.0,  8.0/9.0,-2.0/9.0, 4.0/9.0,
  252.  -8.0/9.0,     0.0, 4.0/9.0, -6.0/9.0,     0.0, 4.0/9.0, -4.0/9.0,     0.0, 4.0/9.0,
  253.  -2.0/9.0,     0.0, 4.0/9.0,      0.0,     0.0, 4.0/9.0,  2.0/9.0,     0.0, 4.0/9.0,
  254.   4.0/9.0,     0.0, 4.0/9.0,  6.0/9.0,     0.0, 4.0/9.0,  8.0/9.0,     0.0, 4.0/9.0,
  255.  -8.0/9.0, 2.0/9.0, 4.0/9.0, -6.0/9.0, 2.0/9.0, 4.0/9.0, -4.0/9.0, 2.0/9.0, 4.0/9.0,
  256.  -2.0/9.0, 2.0/9.0, 4.0/9.0,      0.0, 2.0/9.0, 4.0/9.0,  2.0/9.0, 2.0/9.0, 4.0/9.0,
  257.   4.0/9.0, 2.0/9.0, 4.0/9.0,  6.0/9.0, 2.0/9.0, 4.0/9.0,  8.0/9.0, 2.0/9.0, 4.0/9.0,
  258.  -8.0/9.0, 4.0/9.0, 4.0/9.0, -6.0/9.0, 4.0/9.0, 4.0/9.0, -4.0/9.0, 4.0/9.0, 4.0/9.0,
  259.  -2.0/9.0, 4.0/9.0, 4.0/9.0,      0.0, 4.0/9.0, 4.0/9.0,  2.0/9.0, 4.0/9.0, 4.0/9.0,
  260.   4.0/9.0, 4.0/9.0, 4.0/9.0,  6.0/9.0, 4.0/9.0, 4.0/9.0,  8.0/9.0, 4.0/9.0, 4.0/9.0,
  261.  -8.0/9.0, 6.0/9.0, 4.0/9.0, -6.0/9.0, 6.0/9.0, 4.0/9.0, -4.0/9.0, 6.0/9.0, 4.0/9.0,
  262.  -2.0/9.0, 6.0/9.0, 4.0/9.0,      0.0, 6.0/9.0, 4.0/9.0,  2.0/9.0, 6.0/9.0, 4.0/9.0,
  263.   4.0/9.0, 6.0/9.0, 4.0/9.0,  6.0/9.0, 6.0/9.0, 4.0/9.0,  8.0/9.0, 6.0/9.0, 4.0/9.0,
  264.  -8.0/9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 6.0/9.0, -6.0/9.0,-2.0/9.0, 6.0/9.0, -4.0/9.0,-2.0/9.0, 6.0/9.0,
  277.  -2.0/9.0,-2.0/9.0, 6.0/9.0,      0.0,-2.0/9.0, 6.0/9.0,  2.0/9.0,-2.0/9.0, 6.0/9.0,
  278.   4.0/9.0,-2.0/9.0, 6.0/9.0,  6.0/9.0,-2.0/9.0, 6.0/9.0,  8.0/9.0,-2.0/9.0, 6.0/9.0,
  279.  -8.0/9.0,     0.0, 6.0/9.0, -6.0/9.0,     0.0, 6.0/9.0, -4.0/9.0,     0.0, 6.0/9.0,
  280.  -2.0/9.0,     0.0, 6.0/9.0,      0.0,     0.0, 6.0/9.0,  2.0/9.0,     0.0, 6.0/9.0,
  281.   4.0/9.0,     0.0, 6.0/9.0,  6.0/9.0,     0.0, 6.0/9.0,  8.0/9.0,     0.0, 6.0/9.0,
  282.  -8.0/9.0, 2.0/9.0, 6.0/9.0, -6.0/9.0, 2.0/9.0, 6.0/9.0, -4.0/9.0, 2.0/9.0, 6.0/9.0,
  283.  -2.0/9.0, 2.0/9.0, 6.0/9.0,      0.0, 2.0/9.0, 6.0/9.0,  2.0/9.0, 2.0/9.0, 6.0/9.0,
  284.   4.0/9.0, 2.0/9.0, 6.0/9.0,  6.0/9.0, 2.0/9.0, 6.0/9.0,  8.0/9.0, 2.0/9.0, 6.0/9.0,
  285.  -8.0/9.0, 4.0/9.0, 6.0/9.0, -6.0/9.0, 4.0/9.0, 6.0/9.0, -4.0/9.0, 4.0/9.0, 6.0/9.0,
  286.  -2.0/9.0, 4.0/9.0, 6.0/9.0,      0.0, 4.0/9.0, 6.0/9.0,  2.0/9.0, 4.0/9.0, 6.0/9.0,
  287.   4.0/9.0, 4.0/9.0, 6.0/9.0,  6.0/9.0, 4.0/9.0, 6.0/9.0,  8.0/9.0, 4.0/9.0, 6.0/9.0,
  288.  -8.0/9.0, 6.0/9.0, 6.0/9.0, -6.0/9.0, 6.0/9.0, 6.0/9.0, -4.0/9.0, 6.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.0,
  301.  -2.0/9.0,-4.0/9.0, 8.0/9.0,      0.0,-4.0/9.0, 8.0/9.0,  2.0/9.0,-4.0/9.0, 8.0/9.0,
  302.   4.0/9.0,-4.0/9.0, 8.0/9.0,  6.0/9.0,-4.0/9.0, 8.0/9.0,  8.0/9.0,-4.0/9.0, 8.0/9.0,
  303.  -8.0/9.0,-2.0/9.0, 8.0/9.0, -6.0/9.0,-2.0/9.0, 8.0/9.0, -4.0/9.0,-2.0/9.0, 8.0/9.0,
  304.  -2.0/9.0,-2.0/9.0, 8.0/9.0,      0.0,-2.0/9.0, 8.0/9.0,  2.0/9.0,-2.0/9.0, 8.0/9.0,
  305.   4.0/9.0,-2.0/9.0, 8.0/9.0,  6.0/9.0,-2.0/9.0, 8.0/9.0,  8.0/9.0,-2.0/9.0, 8.0/9.0,
  306.  -8.0/9.0,     0.0, 8.0/9.0, -6.0/9.0,     0.0, 8.0/9.0, -4.0/9.0,     0.0, 8.0/9.0,
  307.  -2.0/9.0,     0.0, 8.0/9.0,      0.0,     0.0, 8.0/9.0,  2.0/9.0,     0.0, 8.0/9.0,
  308.   4.0/9.0,     0.0, 8.0/9.0,  6.0/9.0,     0.0, 8.0/9.0,  8.0/9.0,     0.0, 8.0/9.0,
  309.  -8.0/9.0, 2.0/9.0, 8.0/9.0, -6.0/9.0, 2.0/9.0, 8.0/9.0, -4.0/9.0, 2.0/9.0, 8.0/9.0,
  310.  -2.0/9.0, 2.0/9.0, 8.0/9.0,      0.0, 2.0/9.0, 8.0/9.0,  2.0/9.0, 2.0/9.0, 8.0/9.0,
  311.   4.0/9.0, 2.0/9.0, 8.0/9.0,  6.0/9.0, 2.0/9.0, 8.0/9.0,  8.0/9.0, 2.0/9.0, 8.0/9.0,
  312.  -8.0/9.0, 4.0/9.0, 8.0/9.0, -6.0/9.0, 4.0/9.0, 8.0/9.0, -4.0/9.0, 4.0/9.0, 8.0/9.0,
  313.  -2.0/9.0, 4.0/9.0, 8.0/9.0,      0.0, 4.0/9.0, 8.0/9.0,  2.0/9.0, 4.0/9.0, 8.0/9.0,
  314.   4.0/9.0, 4.0/9.0, 8.0/9.0,  6.0/9.0, 4.0/9.0, 8.0/9.0,  8.0/9.0, 4.0/9.0, 8.0/9.0,
  315.  -8.0/9.0, 6.0/9.0, 8.0/9.0, -6.0/9.0, 6.0/9.0, 8.0/9.0, -4.0/9.0, 6.0/9.0, 8.0/9.0,
  316.  -2.0/9.0, 6.0/9.0, 8.0/9.0,      0.0, 6.0/9.0, 8.0/9.0,  2.0/9.0, 6.0/9.0, 8.0/9.0,
  317.   4.0/9.0, 6.0/9.0, 8.0/9.0,  6.0/9.0, 6.0/9.0, 8.0/9.0,  8.0/9.0, 6.0/9.0, 8.0/9.0,
  318.  -8.0/9.0, 8.0/9.0, 8.0/9.0, -6.0/9.0, 8.0/9.0, 8.0/9.0, -4.0/9.0, 8.0/9.0, 8.0/9.0,
  319.  -2.0/9.0, 8.0/9.0, 8.0/9.0,      0.0, 8.0/9.0, 8.0/9.0,  2.0/9.0, 8.0/9.0, 8.0/9.0,
  320.   4.0/9.0, 8.0/9.0, 8.0/9.0,  6.0/9.0, 8.0/9.0, 8.0/9.0,  8.0/9.0, 8.0/9.0, 8.0/9.0
  321. };
  322. static const REAL *grouptableA[16] =
  323. { 0,group5bits,group7bits,group10bits,0,0,0,0,0,0,0,0,0,0,0,0};
  324. static const REAL *grouptableB1[16] =
  325. { 0,group5bits,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
  326. static const REAL *grouptableB234[16] =
  327. { 0,group5bits,group7bits,0,group10bits,0,0,0,0,0,0,0,0,0,0,0};
  328. static const int codelengthtableA[16] =
  329. { 0, 5, 7, 10, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
  330. static const int codelengthtableB1[16] =
  331. { 0, 5, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
  332. static const int codelengthtableB2[16] =
  333. { 0, 5, 7, 3, 10, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16 };
  334. static const int codelengthtableB3[8] = { 0, 5, 7, 3, 10, 4, 5, 16 };
  335. static const int codelengthtableB4[4] = { 0, 5, 7, 16 };
  336. static const REAL factortableA[16] =
  337. { 0.0,        1.0/2.0,    1.0/4.0,    1.0/8.0,
  338.   1.0/8.0,    1.0/16.0,   1.0/32.0,   1.0/64.0,
  339.   1.0/128.0,  1.0/256.0,  1.0/512.0,  1.0/1024.0,
  340.   1.0/2048.0, 1.0/4096.0, 1.0/8192.0, 1.0/16384.0 };
  341. static const REAL factortableB1[16] =
  342. { 0.0,        1.0/2.0,    1.0/4.0,     1.0/8.0, 
  343.   1.0/16.0,   1.0/32.0,   1.0/64.0,    1.0/128.0, 
  344.   1.0/256.0,  1.0/512.0,  1.0/1024.0,  1.0/2048.0,
  345.   1.0/4096.0, 1.0/8192.0, 1.0/16384.0, 1.0/32768.0 };
  346. static const REAL factortableB2[16] =
  347. { 0.0,        1.0/2.0,    1.0/4.0,    1.0/4.0,
  348.   1.0/8.0,    1.0/8.0,    1.0/16.0,   1.0/32.0,
  349.   1.0/64.0,   1.0/128.0,  1.0/256.0,  1.0/512.0,
  350.   1.0/1024.0, 1.0/2048.0, 1.0/4096.0, 1.0/32768.0 };
  351. static const REAL factortableB3[8] =
  352. { 0.0, 1.0/2.0, 1.0/4.0, 1.0/4.0, 1.0/8.0, 1.0/8.0, 1.0/16.0, 1.0/32768.0 };
  353. static const REAL factortableB4[4] = { 0.0, 1.0/2.0, 1.0/4.0, 1.0/32768.0 };
  354. static const REAL ctableA[16]=
  355. {           0.0, 1.33333333333, 1.60000000000, 1.77777777777,
  356.   1.06666666666, 1.03225806452, 1.01587301587, 1.00787401575,
  357.   1.00392156863, 1.00195694716, 1.00097751711, 1.00048851979,
  358.   1.00024420024, 1.00012208522, 1.00006103888, 1.00003051851};
  359. static const REAL ctableB1[16]=
  360. {           0.0, 1.33333333333, 1.14285714286, 1.06666666666,
  361.   1.03225806452, 1.01587301587, 1.00787401575, 1.00392156863,
  362.   1.00195694716, 1.00097751711, 1.00048851979, 1.00024420024,
  363.   1.00012208522, 1.00006103888, 1.00003051851, 1.00001525902};
  364. static const REAL ctableB2[16] =
  365. {           0.0, 1.33333333333, 1.60000000000, 1.14285714286,
  366.   1.77777777777, 1.06666666666, 1.03225806452, 1.01587301587,
  367.   1.00787401575, 1.00392156863, 1.00195694716, 1.00097751711,
  368.   1.00048851979, 1.00024420024, 1.00012208522, 1.00001525902};
  369. static const REAL ctableB3[8] =
  370. {           0.0, 1.33333333333, 1.60000000000, 1.14285714286,
  371.   1.77777777777, 1.06666666666, 1.03225806452, 1.00001525902 };
  372. static const REAL ctableB4[4] = 
  373. { 0.0, 1.33333333333, 1.60000000000, 1.00001525902 };
  374. static const REAL dtableA[16]=
  375. {           0.0, 0.50000000000, 0.50000000000, 0.50000000000,
  376.   0.12500000000, 0.06250000000, 0.03125000000, 0.01562500000,
  377.   0.00781250000, 0.00390625000, 0.00195312500, 0.00097656250,
  378.   0.00048828125, 0.00024414063, 0.00012207031, 0.00006103516};
  379. static const REAL dtableB1[16]=
  380. {           0.0, 0.50000000000, 0.25000000000, 0.12500000000,
  381.   0.06250000000, 0.03125000000, 0.01562500000, 0.00781250000,
  382.   0.00390625000, 0.00195312500, 0.00097656250, 0.00048828125,
  383.   0.00024414063, 0.00012207031, 0.00006103516, 0.00003051758};
  384. static const REAL dtableB2[16]=
  385. { 0.0,           0.50000000000, 0.50000000000, 0.25000000000,
  386.   0.50000000000, 0.12500000000, 0.06250000000, 0.03125000000,
  387.   0.01562500000, 0.00781250000, 0.00390625000, 0.00195312500,
  388.   0.00097656250, 0.00048828125, 0.00024414063, 0.00003051758};
  389. static const REAL dtableB3[8]=
  390. {           0.0, 0.50000000000, 0.50000000000, 0.25000000000,
  391.   0.50000000000, 0.12500000000, 0.06250000000, 0.00003051758};
  392. static const REAL dtableB4[4]=
  393. {0.0, 0.50000000000, 0.50000000000, 0.00003051758};
  394. // Mpeg layer 2
  395. void MPEGaudio::extractlayer2(void)
  396. {
  397.   REAL fraction[MAXCHANNEL][3][MAXSUBBAND];
  398.   unsigned int bitalloc[MAXCHANNEL][MAXSUBBAND],
  399.                scaleselector[MAXCHANNEL][MAXSUBBAND];
  400.   REAL scalefactor[2][3][MAXSUBBAND];
  401.   const REAL *group[MAXCHANNEL][MAXSUBBAND];
  402.   unsigned int codelength[MAXCHANNEL][MAXSUBBAND];
  403.   REAL factor[MAXCHANNEL][MAXSUBBAND];
  404.   REAL c[MAXCHANNEL][MAXSUBBAND],d[MAXCHANNEL][MAXSUBBAND];
  405.   int s=stereobound,n=subbandnumber;
  406. // Bitalloc
  407.   {
  408.     register int i;
  409.     register const int *t=bitalloclengthtable[tableindex];
  410.     for(i=0;i<s;i++,t++)
  411.     {
  412.       bitalloc[LS][i]=getbits(*t);
  413.       bitalloc[RS][i]=getbits(*t);
  414.     }
  415.     for(;i<n;i++,t++)
  416.       bitalloc[LS][i]=bitalloc[RS][i]=getbits(*t);
  417.   }
  418.   // Scale selector
  419.   if(inputstereo)
  420.     for(register int i=0;i<n;i++)
  421.     {
  422.       if(bitalloc[LS][i])scaleselector[LS][i]=getbits(2);
  423.       if(bitalloc[RS][i])scaleselector[RS][i]=getbits(2);
  424.     }
  425.   else
  426.     for(register int i=0;i<n;i++)
  427.       if(bitalloc[LS][i])scaleselector[LS][i]=getbits(2);
  428.   // Scale index
  429.   {
  430.     register int i,j;
  431.     for(i=0;i<n;i++)
  432.     {
  433.       if((j=bitalloc[LS][i]))
  434.       {
  435. if(!tableindex)
  436. {
  437.   group[LS][i]=grouptableA[j];
  438.   codelength[LS][i]=codelengthtableA[j];
  439.   factor[LS][i]=factortableA[j];
  440.   c[LS][i]=ctableA[j];
  441.   d[LS][i]=dtableA[j];
  442. }
  443. else
  444. {
  445.   if(i<=2)
  446.   {
  447.     group[LS][i]=grouptableB1[j];
  448.     codelength[LS][i]=codelengthtableB1[j];
  449.     factor[LS][i]=factortableB1[j];
  450.     c[LS][i]=ctableB1[j];
  451.     d[LS][i]=dtableB1[j];
  452.   }
  453.   else
  454.   {
  455.     group[LS][i]=grouptableB234[j];
  456.     if(i<=10)
  457.     {
  458.       codelength[LS][i]=codelengthtableB2[j];
  459.       factor[LS][i]=factortableB2[j];
  460.       c[LS][i]=ctableB2[j];
  461.       d[LS][i]=dtableB2[j];
  462.     }
  463.     else if(i<=22)
  464.     {
  465.       codelength[LS][i]=codelengthtableB3[j];
  466.       factor[LS][i]=factortableB3[j];
  467.       c[LS][i]=ctableB3[j];
  468.       d[LS][i]=dtableB3[j];
  469.     }
  470.     else
  471.     {
  472.       codelength[LS][i]=codelengthtableB4[j];
  473.       factor[LS][i]=factortableB4[j];
  474.       c[LS][i]=ctableB4[j];
  475.       d[LS][i]=dtableB4[j];
  476.     }
  477.   }
  478. }
  479. switch(scaleselector[LS][i])
  480. {
  481.   case 0:scalefactor[LS][0][i]=scalefactorstable[getbits(6)];
  482.  scalefactor[LS][1][i]=scalefactorstable[getbits(6)];
  483.  scalefactor[LS][2][i]=scalefactorstable[getbits(6)];
  484.  break;
  485.   case 1:scalefactor[LS][0][i]=
  486.  scalefactor[LS][1][i]=scalefactorstable[getbits(6)];
  487.  scalefactor[LS][2][i]=scalefactorstable[getbits(6)];
  488.  break;
  489.   case 2:scalefactor[LS][0][i]=
  490.  scalefactor[LS][1][i]=
  491.  scalefactor[LS][2][i]=scalefactorstable[getbits(6)];
  492.  break;
  493.   case 3:scalefactor[LS][0][i]=scalefactorstable[getbits(6)];
  494.  scalefactor[LS][1][i]=
  495.  scalefactor[LS][2][i]=scalefactorstable[getbits(6)];
  496.  break;
  497. }
  498.       }
  499.       if(inputstereo && (j=bitalloc[RS][i]))
  500.       {
  501. if(!tableindex)
  502. {
  503.   group[RS][i]=grouptableA[j];
  504.   codelength[RS][i]=codelengthtableA[j];
  505.   factor[RS][i]=factortableA[j];
  506.   c[RS][i]=ctableA[j];
  507.   d[RS][i]=dtableA[j];
  508. }
  509. else
  510. {
  511.   if(i<=2)
  512.   {
  513.     group[RS][i]=grouptableB1[j];
  514.     codelength[RS][i]=codelengthtableB1[j];
  515.     factor[RS][i]=factortableB1[j];
  516.     c[RS][i]=ctableB1[j];
  517.     d[RS][i]=dtableB1[j];
  518.   }
  519.   else
  520.   {
  521.     group[RS][i]=grouptableB234[j];
  522.     if(i<=10)
  523.     {
  524.       codelength[RS][i]=codelengthtableB2[j];
  525.       factor[RS][i]=factortableB2[j];
  526.       c[RS][i]=ctableB2[j];
  527.       d[RS][i]=dtableB2[j];
  528.     }
  529.     else if(i<=22)
  530.     {
  531.       codelength[RS][i]=codelengthtableB3[j];
  532.       factor[RS][i]=factortableB3[j];
  533.       c[RS][i]=ctableB3[j];
  534.       d[RS][i]=dtableB3[j];
  535.     }
  536.     else
  537.     {
  538.       codelength[RS][i]=codelengthtableB4[j];
  539.       factor[RS][i]=factortableB4[j];
  540.       c[RS][i]=ctableB4[j];
  541.       d[RS][i]=dtableB4[j];
  542.     }
  543.   }
  544. }
  545. switch(scaleselector[RS][i])
  546. {
  547.   case 0 : scalefactor[RS][0][i]=scalefactorstable[getbits(6)];
  548.    scalefactor[RS][1][i]=scalefactorstable[getbits(6)];
  549.    scalefactor[RS][2][i]=scalefactorstable[getbits(6)];
  550.    break;
  551.   case 1 : scalefactor[RS][0][i]=
  552.    scalefactor[RS][1][i]=scalefactorstable[getbits(6)];
  553.    scalefactor[RS][2][i]=scalefactorstable[getbits(6)];
  554.    break;
  555.   case 2 : scalefactor[RS][0][i]=
  556.    scalefactor[RS][1][i]=
  557.    scalefactor[RS][2][i]=scalefactorstable[getbits(6)];
  558.    break;
  559.   case 3 : scalefactor[RS][0][i]=scalefactorstable[getbits(6)];
  560.    scalefactor[RS][1][i]=
  561.    scalefactor[RS][2][i]=scalefactorstable[getbits(6)];
  562.    break;
  563. }
  564.       }
  565.     }
  566.   }
  567. // Read Sample
  568.   {
  569.     register int i;
  570.     for(int l=0;l<SCALEBLOCK;l++)
  571.     {
  572.       // Read Sample
  573.       for(i=0;i<s;i++)
  574.       {
  575. if(bitalloc[LS][i])
  576. {
  577.   if(group[LS][i])
  578.   {
  579.     register const REAL *s;
  580.     int code=getbits(codelength[LS][i]);
  581.     code+=code<<1;
  582.             if (code > 2184) {
  583. //printf("fraction LS OverFlow code %d -> 2184 (1)n", code);
  584.               code=2184;
  585.             }
  586.     s=group[LS][i]+code;
  587.     fraction[LS][0][i]=s[0];
  588.     fraction[LS][1][i]=s[1];
  589.     fraction[LS][2][i]=s[2];
  590.   }
  591.   else
  592.   {
  593.     fraction[LS][0][i]=
  594.       REAL(getbits(codelength[LS][i]))*factor[LS][i]-1.0;
  595.     fraction[LS][1][i]=
  596.       REAL(getbits(codelength[LS][i]))*factor[LS][i]-1.0;
  597.     fraction[LS][2][i]=
  598.       REAL(getbits(codelength[LS][i]))*factor[LS][i]-1.0;
  599.   }
  600. }
  601. else fraction[LS][0][i]=fraction[LS][1][i]=fraction[LS][2][i]=0.0;
  602. if(inputstereo && bitalloc[RS][i])
  603. {
  604.   if(group[RS][i])
  605.   {
  606.     const REAL *s;
  607.     int code=getbits(codelength[RS][i]);
  608.     code+=code<<1;
  609.             if (code > 2184) {
  610. //printf("fraction LS OverFlow code %d -> 2184 (2)n", code);
  611.               code=2184;
  612.             }
  613.     s=group[RS][i]+code;
  614.     fraction[RS][0][i]=s[0];
  615.     fraction[RS][1][i]=s[1];
  616.     fraction[RS][2][i]=s[2];
  617.   }
  618.   else
  619.   {
  620.     fraction[RS][0][i]=
  621.       REAL(getbits(codelength[RS][i]))*factor[RS][i]-1.0;
  622.     fraction[RS][1][i]=
  623.       REAL(getbits(codelength[RS][i]))*factor[RS][i]-1.0;
  624.     fraction[RS][2][i]=
  625.       REAL(getbits(codelength[RS][i]))*factor[RS][i]-1.0;
  626.   }
  627. }
  628. else fraction[RS][0][i]=fraction[RS][1][i]=fraction[RS][2][i]=0.0;
  629.       }
  630.       for(;i<n;i++)
  631.       {
  632. if(bitalloc[LS][i])
  633. {
  634.   if(group[LS][i])
  635.   {
  636.     register const REAL *s;
  637.     int code=getbits(codelength[LS][i]);
  638.     code+=code<<1;
  639.     s=group[LS][i]+code;
  640.     fraction[LS][0][i]=fraction[RS][0][i]=s[0];
  641.     fraction[LS][1][i]=fraction[RS][1][i]=s[1];
  642.     fraction[LS][2][i]=fraction[RS][2][i]=s[2];
  643.   }
  644.   else
  645.   {
  646.     fraction[LS][0][i]=fraction[RS][0][i]=
  647.       REAL(getbits(codelength[LS][i]))*factor[LS][i]-1.0;
  648.     fraction[LS][1][i]=fraction[RS][1][i]=
  649.       REAL(getbits(codelength[LS][i]))*factor[LS][i]-1.0;
  650.     fraction[LS][2][i]=fraction[RS][2][i]=
  651.       REAL(getbits(codelength[LS][i]))*factor[LS][i]-1.0;
  652.   }
  653. }
  654. else fraction[LS][0][i]=fraction[LS][1][i]=fraction[LS][2][i]=
  655.      fraction[RS][0][i]=fraction[RS][1][i]=fraction[RS][2][i]=0.0;
  656.       }
  657.       //Fraction
  658.       if(outputstereo)
  659. for(i=0;i<n;i++)
  660. {
  661.   if(bitalloc[LS][i])
  662.   {
  663.     if(!group[LS][i])
  664.     {
  665.       fraction[LS][0][i]=(fraction[LS][0][i]+d[LS][i])*c[LS][i];
  666.       fraction[LS][1][i]=(fraction[LS][1][i]+d[LS][i])*c[LS][i];
  667.       fraction[LS][2][i]=(fraction[LS][2][i]+d[LS][i])*c[LS][i];
  668.     }
  669.     register REAL t=scalefactor[LS][l>>2][i];
  670.     fraction[LS][0][i]*=t;
  671.     fraction[LS][1][i]*=t;
  672.     fraction[LS][2][i]*=t;
  673.   }
  674.   if(bitalloc[RS][i])
  675.   {
  676.     if(!group[RS][i])
  677.     {
  678.       fraction[RS][0][i]=(fraction[RS][0][i]+d[RS][i])*c[RS][i];
  679.       fraction[RS][1][i]=(fraction[RS][1][i]+d[RS][i])*c[RS][i];
  680.       fraction[RS][2][i]=(fraction[RS][2][i]+d[RS][i])*c[RS][i];
  681.     }
  682.     register REAL t=scalefactor[RS][l>>2][i];
  683.     fraction[RS][0][i]*=t;
  684.     fraction[RS][1][i]*=t;
  685.     fraction[RS][2][i]*=t;
  686.   }
  687. }
  688.       else
  689. for(i=0;i<n;i++)
  690.   if(bitalloc[LS][i])
  691.   {
  692.     if(!group[LS][i])
  693.     {
  694.       fraction[LS][0][i]=(fraction[LS][0][i]+d[LS][i])*c[LS][i];
  695.       fraction[LS][1][i]=(fraction[LS][1][i]+d[LS][i])*c[LS][i];
  696.       fraction[LS][2][i]=(fraction[LS][2][i]+d[LS][i])*c[LS][i];
  697.     }
  698.     register REAL t=scalefactor[LS][l>>2][i];
  699.     fraction[LS][0][i]*=t;
  700.     fraction[LS][1][i]*=t;
  701.     fraction[LS][2][i]*=t;
  702.   }
  703.       for(;i<MAXSUBBAND;i++)
  704. fraction[LS][0][i]=fraction[LS][1][i]=fraction[LS][2][i]=
  705. fraction[RS][0][i]=fraction[RS][1][i]=fraction[RS][2][i]=0.0;
  706.       for(i=0;i<3;i++)
  707. subbandsynthesis(fraction[LS][i],fraction[RS][i]);
  708.     }
  709.   }
  710. }