annotated
authordavid <david>
Mon, 11 Jul 2011 22:57:35 +0000 (22:57 +0000)
committerdavid <david>
Mon, 11 Jul 2011 22:57:35 +0000 (22:57 +0000)
15 files changed:
Robust/src/Tests/ssJava/mp3decoder/BitReserve.java
Robust/src/Tests/ssJava/mp3decoder/Crc16.java
Robust/src/Tests/ssJava/mp3decoder/Decoder.java
Robust/src/Tests/ssJava/mp3decoder/Equalizer.java
Robust/src/Tests/ssJava/mp3decoder/Header.java
Robust/src/Tests/ssJava/mp3decoder/JavaLayerUtils.java
Robust/src/Tests/ssJava/mp3decoder/LayerIDecoder.java
Robust/src/Tests/ssJava/mp3decoder/LayerIIDecoder.java
Robust/src/Tests/ssJava/mp3decoder/LayerIIIDecoder.java
Robust/src/Tests/ssJava/mp3decoder/Obuffer.java
Robust/src/Tests/ssJava/mp3decoder/OutputChannels.java
Robust/src/Tests/ssJava/mp3decoder/Player.java
Robust/src/Tests/ssJava/mp3decoder/SampleBuffer.java
Robust/src/Tests/ssJava/mp3decoder/SynthesisFilter.java
Robust/src/Tests/ssJava/mp3decoder/huffcodetab.java

index 24794c1aecfeee440410a1a4639469ede4c62af4..bd57b6ea834aba884c534609fd6ce316b90f1d1e 100644 (file)
@@ -38,6 +38,8 @@
 \r
 // REVIEW: there is no range checking, so buffer underflow or overflow\r
 // can silently occur.\r
+@LATTICE("SH<V,V<T,TOT<OFF,OFF<T,SH*,TOT*,OFF*")\r
+@METHODDEFAULT("OUT<V,V<C,C<IN,C*,THISLOC=V,GLOBALLOC=V")\r
 final class BitReserve\r
 {\r
    /**\r
@@ -45,30 +47,34 @@ final class BitReserve
     * Must be a power of 2. And x8, as each bit is stored as a single\r
     * entry.\r
     */\r
-       private static final int                BUFSIZE = 4096*8;\r
+    @LOC("T") private static final int BUFSIZE = 4096*8;\r
        \r
        /**\r
         * Mask that can be used to quickly implement the\r
         * modulus operation on BUFSIZE.\r
         */\r
-       private static final int                BUFSIZE_MASK = BUFSIZE-1;\r
+    @LOC("V") private static final int BUFSIZE_MASK = BUFSIZE-1;\r
        \r
-       private int                                     offset, totbit, buf_byte_idx;\r
-       private final int[]                     buf = new int[BUFSIZE];\r
-       private int                                     buf_bit_idx;\r
+    @LOC("OFF") private int offset;\r
+    @LOC("TOT") private int totbit;\r
+    @LOC("SH") private int buf_byte_idx;\r
+    @LOC("V") private final int[] buf;\r
+    @LOC("T") private int buf_bit_idx;\r
        \r
    BitReserve()\r
-   {\r
-         \r
-         offset = 0;\r
+   {     \r
+      offset = 0;\r
       totbit = 0;\r
-      buf_byte_idx = 0;          \r
+      buf_byte_idx = 0;\r
+      buf = new int[BUFSIZE];\r
    }\r
       \r
    \r
    /**\r
     * Return totbit Field.\r
        */\r
+\r
+   @RETURNLOC("OUT")\r
    public int hsstell() \r
    { \r
           return(totbit); \r
@@ -78,13 +84,15 @@ final class BitReserve
     * Read a number bits from the bit stream.\r
     * @param N the number of\r
        */\r
-   public int hgetbits(int N)\r
+   @LATTICE("OUT<SH,SH<THIS,THIS<C,C<GLOBAL,C*,SH*,THISLOC=THIS,GLOBALLOC=GLOBAL")\r
+   @RETURNLOC("OUT") \r
+   public int hgetbits(@LOC("C") int N)\r
    {\r
         totbit += N;\r
         \r
-        int val = 0;\r
+        @LOC("SH") int val = 0;\r
         \r
-        int pos = buf_byte_idx;\r
+        @LOC("THIS,BitReserve.SH") int pos = buf_byte_idx;\r
         if (pos+N < BUFSIZE)\r
         {\r
                while (N-- > 0)\r
@@ -133,11 +141,12 @@ final class BitReserve
     * Returns next bit from reserve.\r
     * @returns 0 if next bit is reset, or 1 if next bit is set.\r
     */\r
+   @RETURNLOC("OUT")\r
    public int hget1bit()\r
    {             \r
-         totbit++;       \r
-         int val = buf[buf_byte_idx];\r
-         buf_byte_idx = (buf_byte_idx+1) & BUFSIZE_MASK;\r
+      totbit++;          \r
+      @LOC("OUT") int val = buf[buf_byte_idx];\r
+      buf_byte_idx = (buf_byte_idx+1) & BUFSIZE_MASK;\r
       return val;\r
    }\r
    \r
@@ -177,9 +186,10 @@ final class BitReserve
    /**\r
     * Write 8 bits into the bit stream.\r
        */\r
-   public void hputbuf(int val)\r
+   @LATTICE("OUT<THIS,THIS<IN,THISLOC=THIS,GLOBALLOC=IN")\r
+   public void hputbuf(@LOC("IN") int val)\r
    {             \r
-          int ofs = offset;\r
+           @LOC("THIS,BitReserve.OFF") int ofs = offset;\r
           buf[ofs++] = val & 0x80;\r
           buf[ofs++] = val & 0x40;\r
           buf[ofs++] = val & 0x20;\r
@@ -210,9 +220,10 @@ final class BitReserve
    /**\r
     * Rewind N bytes in Stream.\r
        */\r
-   public void rewindNbytes(int N)\r
+   @LATTICE("THIS<BIT,BIT<N,THISLOC=THIS,GLOBALLOC=N")\r
+   public void rewindNbytes(@LOC("N") int N)\r
    {\r
-      int bits = (N << 3);\r
+          @LOC("BIT") int bits = (N << 3);\r
          totbit -= bits;\r
          buf_byte_idx -= bits;   \r
          if (buf_byte_idx<0)\r
index 058896af586df805013ad92beada1851db862d10..ae35b481f87a6c35878cd2ebe406ab79a2b6ba2c 100644 (file)
 /**\r
  * 16-Bit CRC checksum\r
  */\r
+@LATTICE("B<T,B*")\r
+@METHODDEFAULT("OUT<V,V<SH,SH<IN,SH*,THISLOC=V,GLOBALLOC=V")\r
 public final class Crc16\r
 {\r
-  private static       short polynomial=(short)0x8005;\r
-  private                      short crc;\r
+  @LOC("T") private static     short polynomial=(short)0x8005;\r
+  @LOC("B") private                    short crc;\r
 \r
   /**\r
    * Dummy Constructor\r
@@ -42,9 +44,9 @@ public final class Crc16
   /**\r
    * Feed a bitstring to the crc calculation (0 < length <= 32).\r
    */\r
-  public void add_bits (int bitstring, int length)\r
+  public void add_bits (@LOC("IN") int bitstring, @LOC("IN") int length)\r
   {\r
-       int bitmask = 1 << (length - 1);\r
+        @LOC("SH") int bitmask = 1 << (length - 1);\r
        do\r
         if (((crc & 0x8000) == 0) ^ ((bitstring & bitmask) == 0 ))\r
         {\r
@@ -60,9 +62,10 @@ public final class Crc16
    * Return the calculated checksum.\r
    * Erase it for next calls to add_bits().\r
    */\r
+  @RETURNLOC("OUT")\r
   public short checksum()\r
   {\r
-    short sum = crc;\r
+    @LOC("OUT") short sum = crc;\r
     crc = (short) 0xFFFF;\r
     return sum;\r
   }\r
index ffafed306bd0d687aa6e6cae2d8e60563ae8a28a..4d0643597566c589f0be1a28abdebc9c0fc3ecaa 100644 (file)
@@ -34,7 +34,7 @@ public class Decoder implements DecoderErrors
        /**\r
         * The Bistream from which the MPEG audio frames are read.\r
         */\r
-       //private Bitstream                             stream;\r
+       private Bitstream                               stream;\r
        \r
        /**\r
         * The Obuffer instance that will receive the decoded\r
@@ -134,7 +134,7 @@ public class Decoder implements DecoderErrors
        {\r
                if (!initialized)\r
                {\r
-                       initialize(header);\r
+                   initialize(header,stream);\r
                }\r
                \r
                int layer = header.layer();\r
@@ -262,7 +262,7 @@ public class Decoder implements DecoderErrors
                return decoder;\r
        }\r
        \r
-       private void initialize(Header header)\r
+        public void initialize(Header header, Bitstream stream)\r
                throws DecoderException\r
        {\r
                \r
@@ -287,7 +287,17 @@ public class Decoder implements DecoderErrors
 \r
                outputChannels = channels;\r
                outputFrequency = header.frequency();\r
-               \r
+\r
+               l3decoder = new LayerIIIDecoder(stream, header, filter1, filter2, \r
+                                               output, OutputChannels.BOTH_CHANNELS);\r
+               l2decoder = new LayerIIDecoder();\r
+               l2decoder.create(stream, header, filter1, filter2, \r
+                                output, OutputChannels.BOTH_CHANNELS);\r
+\r
+               l1decoder = new LayerIDecoder();\r
+               l1decoder.create(stream,header, filter1, filter2, \r
+                                output, OutputChannels.BOTH_CHANNELS); \r
+\r
                initialized = true;\r
        }\r
        \r
index 1dc88f42de9bdd820ef8c76ce8340ecbc709cefc..f0eb618501149290791fac587ea409ba4ffeef24 100644 (file)
  * \r
  * @author MDM\r
  */\r
+@LATTICE("B<T")\r
+@METHODDEFAULT("OUT<V,V<SH,SH<C,C<IN,SH*,THISLOC=IN,GLOBALLOC=IN")\r
 public final class Equalizer\r
 {              \r
        /**\r
         * Equalizer setting to denote that a given band will not be\r
         * present in the output signal.\r
         */\r
-       static public final float BAND_NOT_PRESENT = Float.NEGATIVE_INFINITY;\r
+        @LOC("T") static public final float BAND_NOT_PRESENT = Float.NEGATIVE_INFINITY;\r
                \r
-       static public final Equalizer   PASS_THRU_EQ = new Equalizer();\r
+        @LOC("T") static public final Equalizer        PASS_THRU_EQ = new Equalizer();\r
        \r
-       private static final int BANDS = 32;\r
+        @LOC("T") private static final int BANDS = 32;\r
        \r
-       private final float[]   settings = new float[BANDS];\r
+        @LOC("B") private final float[]        settings = new float[BANDS];\r
        \r
        /**\r
         * Creates a new <code>Equalizer</code> instance. \r
@@ -178,10 +180,12 @@ public final class Equalizer
         * @return      an array of factors that can be applied to the\r
         *                      subbands.\r
         */\r
+        @RETURNLOC("OUT") \r
        float[] getBandFactors()\r
        {\r
-               float[] factors = new float[BANDS];\r
-               for (int i=0, maxCount=BANDS; i<maxCount; i++)\r
+               @LOC("OUT") float[] factors = new float[BANDS];\r
+               @LOC("C") int maxCount = BANDS;\r
+               for (@LOC("SH") int i=0; i<maxCount; i++)\r
                {\r
                        factors[i] = getBandFactor(settings[i]);\r
                }\r
@@ -195,12 +199,13 @@ public final class Equalizer
         * n is the equalizer band setting in the range [-1.0,1.0].\r
         *       \r
         */\r
-       float getBandFactor(float eq)\r
+        @RETURNLOC("C")\r
+        float getBandFactor(@LOC("IN") float eq)\r
        {\r
                if (eq==BAND_NOT_PRESENT)\r
                        return 0.0f;\r
                \r
-               float f = (float)Math.pow(2.0, eq);\r
+               @LOC("C") float f = (float)Math.pow(2.0, eq);\r
                return f;\r
        }\r
        \r
index b0dd1001f05f981f8dab18e7f55a5076c3b8ebfc..09f1b2316730910310fc58675727a16404e6833d 100644 (file)
 /**\r
  * Class for extracting information from a frame header.\r
  */\r
+@LATTICE("HI<HNS,HNS<H,C<H,NS<FS,FS<H,FS<HV,H<SYNC,HV<SYNC,HV<T,SYNC*,HV*,FS*,HI*")\r
+@METHODDEFAULT("OUT<V,V<THIS,THIS<SH,SH<IN,SH*,THISLOC=THIS,GLOBALLOC=IN")\r
 public final class Header\r
 {\r
-       public  static final int[][]    frequencies =\r
+        @LOC("T") public  static final int[][] frequencies =\r
                                                {{22050, 24000, 16000, 1},\r
                                                {44100, 48000, 32000, 1},\r
                                                {11025, 12000, 8000, 1}};       // SZD: MPEG25\r
@@ -43,45 +45,50 @@ public final class Header
        /**\r
         * Constant for MPEG-2 LSF version\r
         */\r
-       public static final int         MPEG2_LSF = 0;\r
-       public static final int         MPEG25_LSF = 2; // SZD\r
+        @LOC("T") public static final int              MPEG2_LSF = 0;\r
+        @LOC("T") public static final int              MPEG25_LSF = 2; // SZD\r
 \r
        /**\r
         * Constant for MPEG-1 version\r
         */\r
-       public static final int         MPEG1 = 1;\r
-\r
-       public static final int         STEREO = 0;\r
-       public static final int         JOINT_STEREO = 1;\r
-       public static final int         DUAL_CHANNEL = 2;\r
-       public static final int         SINGLE_CHANNEL = 3;\r
-       public static final int         FOURTYFOUR_POINT_ONE = 0;\r
-       public static final int         FOURTYEIGHT=1;\r
-       public static final int         THIRTYTWO=2;\r
-\r
-       private int                             h_layer, h_protection_bit, h_bitrate_index,\r
-                                                       h_padding_bit, h_mode_extension;\r
-       private int                             h_version;\r
-       private int                             h_mode;\r
-       private int                             h_sample_frequency;\r
-       private int                             h_number_of_subbands, h_intensity_stereo_bound;\r
-       private boolean                 h_copyright, h_original;\r
+        @LOC("T") public static final int              MPEG1 = 1;\r
+\r
+        @LOC("T") public static final int              STEREO = 0;\r
+        @LOC("T") public static final int              JOINT_STEREO = 1;\r
+        @LOC("T") public static final int              DUAL_CHANNEL = 2;\r
+        @LOC("T") public static final int              SINGLE_CHANNEL = 3;\r
+        @LOC("T") public static final int              FOURTYFOUR_POINT_ONE = 0;\r
+        @LOC("T") public static final int              FOURTYEIGHT=1;\r
+        @LOC("T") public static final int              THIRTYTWO=2;\r
+\r
+    @LOC("H") private int                              h_layer;\r
+    @LOC("H") private int  h_protection_bit;\r
+    @LOC("H") private int h_bitrate_index;\r
+    @LOC("H") private int h_padding_bit;\r
+    @LOC("H") private int h_mode_extension;\r
+    @LOC("HV") private int                             h_version;\r
+    @LOC("H") private int                              h_mode;\r
+    @LOC("H") private int                              h_sample_frequency;\r
+    @LOC("HNS") private int                            h_number_of_subbands;\r
+    @LOC("HI") private int h_intensity_stereo_bound;\r
+    @LOC("H") private boolean                  h_copyright;\r
+    @LOC("H") private int h_original;\r
        // VBR support added by E.B\r
-       private double[]                h_vbr_time_per_frame = {-1, 384, 1152, 1152};\r
-       private boolean                 h_vbr;\r
-       private int                             h_vbr_frames;\r
-       private int                             h_vbr_scale;\r
-       private int                             h_vbr_bytes;\r
-       private byte[]                  h_vbr_toc;\r
+    @LOC("T") private double[]                 h_vbr_time_per_frame = {-1, 384, 1152, 1152};\r
+    @LOC("T") private boolean                  h_vbr;\r
+    @LOC("T") private int                              h_vbr_frames;\r
+    @LOC("T") private int                              h_vbr_scale;\r
+    @LOC("T") private int                              h_vbr_bytes;\r
+    @LOC("T") private byte[]                   h_vbr_toc;\r
        \r
-       private byte                    syncmode = Bitstream.INITIAL_SYNC;\r
-       private Crc16                   crc;\r
+    @LOC("SYNC") private byte                  syncmode = Bitstream.INITIAL_SYNC;\r
+    @LOC("C") private Crc16                    crc;\r
 \r
-       public short                    checksum;\r
-       public int                              framesize;\r
-       public int                              nSlots;\r
+    @LOC("C") public short                     checksum;\r
+    @LOC("FS") public int                              framesize;\r
+    @LOC("NS") public int                              nSlots;\r
 \r
-       private int                             _headerstring = -1; // E.B\r
+    @LOC("T") private int                              _headerstring = -1; // E.B\r
 \r
        Header()\r
        {\r
@@ -437,7 +444,7 @@ public final class Header
        public int mode_extension() { return h_mode_extension; }\r
 \r
        // E.B -> private to public\r
-       public static final int bitrates[][][] = {\r
+    @LOC("T") public static final int bitrates[][][] = {\r
                {{0 /*free format*/, 32000, 48000, 56000, 64000, 80000, 96000,\r
          112000, 128000, 144000, 160000, 176000, 192000 ,224000, 256000, 0},\r
                {0 /*free format*/, 8000, 16000, 24000, 32000, 40000, 48000,\r
@@ -597,7 +604,7 @@ public final class Header
        }\r
 \r
        // E.B -> private to public\r
-       public static final String bitrate_str[][][] = {\r
+    @LOC("T") public static final String bitrate_str[][][] = {\r
                {{"free format", "32 kbit/s", "48 kbit/s", "56 kbit/s", "64 kbit/s",\r
          "80 kbit/s", "96 kbit/s", "112 kbit/s", "128 kbit/s", "144 kbit/s",\r
          "160 kbit/s", "176 kbit/s", "192 kbit/s", "224 kbit/s", "256 kbit/s",\r
index 2156e3dbecdff5c606f612de3888655b35dcb8df..9a32c5b8763642fae19309b5910cd1e2ef5a0c86 100644 (file)
@@ -117,9 +117,10 @@ public class JavaLayerUtils
                \r
                Object obj = deserialize(in);\r
                \r
+               //SSJava will never throw exceptions as it is so this code is meaningless\r
+               /*\r
                Class cls = obj.getClass();\r
                \r
-               \r
                if (!cls.isArray())\r
                        throw new InvalidObjectException("object is not an array");\r
                \r
@@ -133,7 +134,7 @@ public class JavaLayerUtils
                        if (arrayLength!=length)\r
                                throw new InvalidObjectException("array length mismatch");\r
                }\r
-               \r
+               */\r
                return obj;\r
        }\r
 \r
index 97363a97410173a51d20b3287b8955a580b9d597..89eb5decf432062c9b6125d050f913d9b75bc4ce 100644 (file)
 /**
  * Implements decoding of MPEG Audio Layer I frames. 
  */
-class LayerIDecoder implements FrameDecoder
+@LATTICE("L<SH,SH<H,SH*")
+@METHODDEFAULT("OUT<V,V<SH,SH<IN,SH*,THISLOC=V,GLOBALLOC=IN")
+    class LayerIDecoder //implements FrameDecoder //compiler cannot do interfaces
 {
-       protected Bitstream                     stream;
-    protected Header                           header;
-    protected SynthesisFilter          filter1, filter2;
-    protected Obuffer                          buffer;
-    protected int                                      which_channels;
-       protected int                                   mode;
+    @LOC("H") protected Bitstream                              stream;
+    @LOC("H") protected Header                                         header;
+    @LOC("H") protected SynthesisFilter                        filter1;
+    @LOC("H") protected SynthesisFilter                         filter2;
+    @LOC("H") protected Obuffer                                buffer;
+    @LOC("H") protected int                                    which_channels;
+    @LOC("H") protected int                                    mode;
        
-       protected int                                   num_subbands;
-       protected Subband[]                             subbands;
-       protected Crc16                                 crc     = null; // new Crc16[1] to enable CRC checking.
+    @LOC("H") protected int                                    num_subbands;
+    @LOC("L") protected Subband[]                              subbands;
+    @LOC("H") protected Crc16                                  crc     = null; // new Crc16[1] to enable CRC checking.
        
        public LayerIDecoder()
        {
                crc = new Crc16();
        }
        
-       public void create(Bitstream stream0, Header header0,
-               SynthesisFilter filtera, SynthesisFilter filterb,
-               Obuffer buffer0, int which_ch0)
+    public void create(@LOC("IN") Bitstream stream0, @LOC("IN") Header header0,
+               @LOC("IN") SynthesisFilter filtera, @LOC("IN") SynthesisFilter filterb,
+               @LOC("IN") Obuffer buffer0, @LOC("IN") int which_ch0)
        {               
                stream         = stream0;
                header         = header0;
@@ -82,7 +85,7 @@ class LayerIDecoder implements FrameDecoder
 
        protected void createSubbands()
        {               
-               int i;
+               @LOC("V,LayerIDecoder.SH") int i;
                if (mode == Header.SINGLE_CHANNEL)
                  for (i = 0; i < num_subbands; ++i)
                    subbands[i] = new SubbandLayer1(i);
@@ -103,7 +106,7 @@ class LayerIDecoder implements FrameDecoder
        protected void readAllocation() throws DecoderException
        {
                // start to read audio data:
-           for (int i = 0; i < num_subbands; ++i)
+           for (@LOC("V,LayerIDecoder.SH") int i = 0; i < num_subbands; ++i)
              subbands[i].read_allocation(stream, header, crc);
                
        }
@@ -115,16 +118,16 @@ class LayerIDecoder implements FrameDecoder
        
        protected void readScaleFactors()
        {
-               for (int i = 0; i < num_subbands; ++i)
+             for (@LOC("SH") int i = 0; i < num_subbands; ++i)
                  subbands[i].read_scalefactor(stream, header);                 
        }
        
        protected void readSampleData()
        {
-               boolean read_ready = false;
-               boolean write_ready = false;
-               int mode = header.mode();
-               int i;
+               @LOC("SH") boolean read_ready = false;
+               @LOC("SH") boolean write_ready = false;
+               @LOC("OUT") int mode = header.mode();
+               @LOC("SH") int i;
                do
                {
                  for (i = 0; i < num_subbands; ++i)
@@ -145,6 +148,7 @@ class LayerIDecoder implements FrameDecoder
        /**
         * Abstract base class for subband classes of layer I and II
         */
+        @LATTICE("L<H")
        static abstract class Subband
        {
         /*
@@ -153,7 +157,7 @@ class LayerIDecoder implements FrameDecoder
          *      is illegal (to prevent segmentation faults)
          */
          // Scalefactors for layer I and II, Annex 3-B.1 in ISO/IEC DIS 11172:
-         public static final float scalefactors[] =
+         @LOC("H") public static final float scalefactors[] =
          {
          2.00000000000000f, 1.58740105196820f, 1.25992104989487f, 1.00000000000000f,
          0.79370052598410f, 0.62996052494744f, 0.50000000000000f, 0.39685026299205f,
@@ -184,11 +188,13 @@ class LayerIDecoder implements FrameDecoder
         * Used for single channel mode
         * and in derived class for intensity stereo mode
         */
+        @LATTICE("S<L,L<H,H<SH,SH*,S*")
+       @METHODDEFAULT("OUT<V,V<SH,SH<IN,SH*,THISLOC=V,GLOBALLOC=IN")
        static class SubbandLayer1 extends Subband
        {
 
          // Factors and offsets for sample requantization
-         public static final float table_factor[] = {
+         @LOC("H") public static final float table_factor[] = {
           0.0f, (1.0f/2.0f) * (4.0f/3.0f), (1.0f/4.0f) * (8.0f/7.0f), (1.0f/8.0f) * (16.0f/15.0f),
          (1.0f/16.0f) * (32.0f/31.0f), (1.0f/32.0f) * (64.0f/63.0f), (1.0f/64.0f) * (128.0f/127.0f),
          (1.0f/128.0f) * (256.0f/255.0f), (1.0f/256.0f) * (512.0f/511.0f),
@@ -197,7 +203,7 @@ class LayerIDecoder implements FrameDecoder
          (1.0f/8192.0f) * (16384.0f/16383.0f), (1.0f/16384.0f) * (32768.0f/32767.0f)
          };
 
-         public static final float table_offset[] = {
+         @LOC("H") public static final float table_offset[] = {
           0.0f, ((1.0f/2.0f)-1.0f) * (4.0f/3.0f), ((1.0f/4.0f)-1.0f) * (8.0f/7.0f), ((1.0f/8.0f)-1.0f) * (16.0f/15.0f),
          ((1.0f/16.0f)-1.0f) * (32.0f/31.0f), ((1.0f/32.0f)-1.0f) * (64.0f/63.0f), ((1.0f/64.0f)-1.0f) * (128.0f/127.0f),
          ((1.0f/128.0f)-1.0f) * (256.0f/255.0f), ((1.0f/256.0f)-1.0f) * (512.0f/511.0f),
@@ -206,18 +212,19 @@ class LayerIDecoder implements FrameDecoder
          ((1.0f/8192.0f)-1.0f) * (16384.0f/16383.0f), ((1.0f/16384.0f)-1.0f) * (32768.0f/32767.0f)
          };
 
-         protected int                  subbandnumber;
-         protected int                  samplenumber;
-         protected int                  allocation;
-         protected float                scalefactor;
-         protected int                  samplelength;
-         protected float                sample;
-         protected float                factor, offset;
+         @LOC("H") protected int                subbandnumber;
+         @LOC("SH") protected int               samplenumber;
+         @LOC("H") protected int                allocation;
+         @LOC("L") protected float              scalefactor;
+         @LOC("L") protected int                samplelength;
+         @LOC("S")protected float               sample;
+         @LOC("L") protected float              factor;
+         @LOC("L") protected float              offset;
 
          /**
           * Construtor.
           */
-         public SubbandLayer1(int subbandnumber)
+         public SubbandLayer1(@LOC("IN")int subbandnumber)
          {
            this.subbandnumber = subbandnumber;
            samplenumber = 0;  
@@ -226,9 +233,10 @@ class LayerIDecoder implements FrameDecoder
          /**
           *
           */
-         public void read_allocation(Bitstream stream, Header header, Crc16 crc) throws DecoderException
+           public void read_allocation(@LOC("IN") Bitstream stream, @LOC("IN") Header header, 
+                                        @LOC("IN") Crc16 crc) throws DecoderException
          {
-           if ((allocation = stream.get_bits (4)) == 15) 
+           if ((allocation = stream.get_bits(4)) == 15) 
            {
                // CGJ: catch this condition and throw appropriate exception
                throw new DecoderException(DecoderErrors.ILLEGAL_SUBBAND_ALLOCATION, null);     
@@ -236,19 +244,19 @@ class LayerIDecoder implements FrameDecoder
                        // MPEG-stream is corrupted!
            }
 
-               if (crc != null) crc.add_bits (allocation, 4);
+               if (crc != null) crc.add_bits(allocation, 4);
                if (allocation != 0)
            {
                 samplelength = allocation + 1;
                 factor = table_factor[allocation];
-            offset = table_offset[allocation];
+                offset = table_offset[allocation];
            }
          }
 
          /**
           *
           */
-         public void read_scalefactor(Bitstream stream, Header header)
+           public void read_scalefactor(@LOC("IN") Bitstream stream, @LOC("IN") Header header)
          {
            if (allocation != 0) scalefactor = scalefactors[stream.get_bits(6)];
          }
@@ -256,7 +264,8 @@ class LayerIDecoder implements FrameDecoder
          /**
           *
           */
-         public boolean read_sampledata(Bitstream stream)
+         @RETURNLOC("OUT") 
+         public boolean read_sampledata(@LOC("IN") Bitstream stream)
          {
            if (allocation != 0)
            {
@@ -273,11 +282,13 @@ class LayerIDecoder implements FrameDecoder
          /**
           *
           */
-         public boolean put_next_sample(int channels, SynthesisFilter filter1, SynthesisFilter filter2)
+         @RETURNLOC("OUT")
+         public boolean put_next_sample(@LOC("IN") int channels, @LOC("IN") SynthesisFilter filter1, 
+                                         @LOC("IN") SynthesisFilter filter2)
          {
            if ((allocation !=0) && (channels != OutputChannels.RIGHT_CHANNEL))
            {
-                  float scaled_sample = (sample * factor + offset) * scalefactor;
+                  @LOC("OUT") float scaled_sample = (sample * factor + offset) * scalefactor;
                   filter1.input_sample (scaled_sample, subbandnumber);
            }
            return true;
@@ -287,14 +298,16 @@ class LayerIDecoder implements FrameDecoder
        /**
         * Class for layer I subbands in joint stereo mode.
         */
+        @LATTICE("L<H,H<SH,SH*")
+       @METHODDEFAULT("OUT<V,V<SH,SH<IN,SH*,THISLOC=V,GLOBALLOC=IN")
        static class SubbandLayer1IntensityStereo extends SubbandLayer1
        {
-         protected float               channel2_scalefactor;
+         @LOC("L") protected float             channel2_scalefactor;
 
          /**
           * Constructor
           */
-         public SubbandLayer1IntensityStereo(int subbandnumber)
+         public SubbandLayer1IntensityStereo(@LOC("IN") int subbandnumber)
          {
                super(subbandnumber);  
          }
@@ -302,7 +315,8 @@ class LayerIDecoder implements FrameDecoder
          /**
           *
           */
-         public void read_allocation(Bitstream stream, Header header, Crc16 crc) throws DecoderException
+         public void read_allocation(@LOC("IN") Bitstream stream, @LOC("IN") Header header, 
+                                      @LOC("IN") Crc16 crc) throws DecoderException
          {
            super.read_allocation (stream, header, crc);
          }
@@ -310,7 +324,7 @@ class LayerIDecoder implements FrameDecoder
          /**
           *
           */
-         public void read_scalefactor (Bitstream stream, Header header)
+         public void read_scalefactor (@LOC("IN") Bitstream stream, @LOC("IN") Header header)
          {
            if (allocation != 0)
            {
@@ -322,7 +336,8 @@ class LayerIDecoder implements FrameDecoder
          /**
           *
           */
-         public boolean read_sampledata(Bitstream stream)
+         @RETURNLOC("OUT")
+         public boolean read_sampledata(@LOC("IN") Bitstream stream)
          {
                 return super.read_sampledata (stream);
          }
@@ -330,26 +345,28 @@ class LayerIDecoder implements FrameDecoder
          /**
           *
           */
-         public boolean put_next_sample (int channels, SynthesisFilter filter1, SynthesisFilter filter2)
+         @RETURNLOC("OUT")
+         public boolean put_next_sample(@LOC("IN") int channels, @LOC("IN") SynthesisFilter filter1, 
+                                         @LOC("IN") SynthesisFilter filter2)
          {
            if (allocation !=0 )
            {
              sample = sample * factor + offset;                // requantization
                  if (channels == OutputChannels.BOTH_CHANNELS)
              {
-                       float sample1 = sample * scalefactor,
-                       sample2 = sample * channel2_scalefactor;
+                       @LOC("OUT") float sample1 = sample * scalefactor;
+                       @LOC("OUT") float sample2 = sample * channel2_scalefactor;
                        filter1.input_sample(sample1, subbandnumber);
                        filter2.input_sample(sample2, subbandnumber);
                  }
                  else if (channels == OutputChannels.LEFT_CHANNEL)
                  {
-                       float sample1 = sample * scalefactor;
+                       @LOC("OUT") float sample1 = sample * scalefactor;
                        filter1.input_sample(sample1, subbandnumber);
                  }
                  else
                  {
-                       float sample2 = sample * channel2_scalefactor;
+                       @LOC("OUT") float sample2 = sample * channel2_scalefactor;
                        filter1.input_sample(sample2, subbandnumber);
                  }
            }
@@ -360,19 +377,22 @@ class LayerIDecoder implements FrameDecoder
        /**
         * Class for layer I subbands in stereo mode.
         */
+        @LATTICE("L<H,H<SH,SH*")
+       @METHODDEFAULT("OUT<V,V<SH,SH<IN,SH*,THISLOC=V,GLOBALLOC=IN")
        static class SubbandLayer1Stereo extends SubbandLayer1
        {
-         protected int                 channel2_allocation;
-         protected float               channel2_scalefactor;
-         protected int                 channel2_samplelength;
-         protected float               channel2_sample;
-         protected float               channel2_factor, channel2_offset;
+         @LOC("H") protected int               channel2_allocation;
+         @LOC("L") protected float             channel2_scalefactor;
+         @LOC("L") protected int               channel2_samplelength;
+         @LOC("S") protected float             channel2_sample;
+         @LOC("L") protected float             channel2_factor;
+         @LOC("L") protected float             channel2_offset;
 
 
          /**
           * Constructor
           */
-         public SubbandLayer1Stereo(int subbandnumber)
+         public SubbandLayer1Stereo(@LOC("IN") int subbandnumber)
          {
            super(subbandnumber);
          }
@@ -380,33 +400,34 @@ class LayerIDecoder implements FrameDecoder
          /**
           *
           */
-         public void read_allocation (Bitstream stream, Header header, Crc16 crc) throws DecoderException
+         public void read_allocation (@LOC("IN") Bitstream stream, @LOC("IN") Header header, 
+          @LOC("IN") Crc16 crc) throws DecoderException
          {
-                allocation = stream.get_bits(4);
+            allocation = stream.get_bits(4);
             channel2_allocation = stream.get_bits(4);
             if (crc != null)
             {
-                  crc.add_bits (allocation, 4);
-              crc.add_bits (channel2_allocation, 4);
+               crc.add_bits (allocation, 4);
+               crc.add_bits (channel2_allocation, 4);
             }
             if (allocation != 0)
             {
-                   samplelength = allocation + 1;
+               samplelength = allocation + 1;
                factor = table_factor[allocation];
                offset = table_offset[allocation];
             }
             if (channel2_allocation != 0)
             {
                channel2_samplelength = channel2_allocation + 1;
-                   channel2_factor = table_factor[channel2_allocation];
-                   channel2_offset = table_offset[channel2_allocation];
+               channel2_factor = table_factor[channel2_allocation];
+               channel2_offset = table_offset[channel2_allocation];
             }
          }
          
          /**
           *
           */
-         public void read_scalefactor(Bitstream stream, Header header)
+         public void read_scalefactor(@LOC("IN") Bitstream stream, @LOC("IN") Header header)
          {
            if (allocation != 0) scalefactor = scalefactors[stream.get_bits(6)];
            if (channel2_allocation != 0) channel2_scalefactor = scalefactors[stream.get_bits(6)];
@@ -415,7 +436,8 @@ class LayerIDecoder implements FrameDecoder
          /**
           *
           */
-         public boolean read_sampledata (Bitstream stream)
+         @RETURNLOC("OUT")
+         public boolean read_sampledata (@LOC("IN")Bitstream stream)
          {
             boolean returnvalue = super.read_sampledata(stream);
             if (channel2_allocation != 0)
@@ -428,12 +450,14 @@ class LayerIDecoder implements FrameDecoder
          /**
           *
           */
-         public boolean put_next_sample(int channels, SynthesisFilter filter1, SynthesisFilter filter2)
+         @RETURNLOC("OUT")
+         public boolean put_next_sample(@LOC("IN") int channels, @LOC("IN") SynthesisFilter filter1, 
+                                         @LOC("IN") SynthesisFilter filter2)
          {
             super.put_next_sample (channels, filter1, filter2);
             if ((channel2_allocation != 0) && (channels != OutputChannels.LEFT_CHANNEL))
             {
-                   float sample2 = (channel2_sample * channel2_factor + channel2_offset) *
+                   @LOC("OUT") float sample2 = (channel2_sample * channel2_factor + channel2_offset) *
                                          channel2_scalefactor;
                    if (channels == OutputChannels.BOTH_CHANNELS)
                           filter2.input_sample (sample2, subbandnumber);
index 0872aaa09ba9bbcf829e2423a40a9c253807e625..fe2b0060e7637a81ec8408869dce3492bb63445e 100644 (file)
@@ -31,7 +31,9 @@
 /**
  * Implements decoding of MPEG Audio Layer II frames. 
  */
-class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
+@LATTICE("L<SH,SH<H,SH*")
+@METHODDEFAULT("OUT<V,V<SH,SH<IN,SH*,THISLOC=V,GLOBALLOC=IN")
+class LayerIIDecoder extends LayerIDecoder //implements FrameDecoder  //compiler cannot do interfaces
 {
 
        public LayerIIDecoder()
@@ -41,7 +43,7 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
        
        protected void createSubbands()
        {               
-               int i;
+               @LOC("V,LayerIIDecoder.SH") int i;
                if (mode == Header.SINGLE_CHANNEL)
                  for (i = 0; i < num_subbands; ++i)
                    subbands[i] = new SubbandLayer2(i);
@@ -62,7 +64,7 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
        
        protected void readScaleFactorSelection()
        {
-               for (int i = 0; i < num_subbands; ++i)
+             for (@LOC("V,layerIIDecoder.SH") int i = 0; i < num_subbands; ++i)
                  ((SubbandLayer2)subbands[i]).read_scalefactor_selection(stream, crc);         
        }
        
@@ -71,11 +73,13 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
         /**
          * Class for layer II subbands in single channel mode.
          */
+        @LATTICE("L<H,L<ARR,ARR<F,SN<F,GN<F,F<H,SN*,GN*")
+       @METHODDEFAULT("OUT<V,V<SH,SH<THIS,THIS<IN,SH*,THISLOC=THIS,GLOBALLOC=IN")
        static class SubbandLayer2 extends Subband
        {
          // this table contains 3 requantized samples for each legal codeword
          // when grouped in 5 bits, i.e. 3 quantizationsteps per sample
-       public static final float grouping_5bits[] = new float[]
+       @LOC("H") public static final float grouping_5bits[] = new float[]
        {
          -2.0f/3.0f, -2.0f/3.0f, -2.0f/3.0f,
                         0.0f, -2.0f/3.0f, -2.0f/3.0f,
@@ -108,7 +112,7 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
 
        // this table contains 3 requantized samples for each legal codeword
        // when grouped in 7 bits, i.e. 5 quantizationsteps per sample
-       public static final float grouping_7bits[] = new float[]
+       @LOC("H") public static final float grouping_7bits[] = new float[]
        {
          -0.8f, -0.8f, -0.8f,   -0.4f, -0.8f, -0.8f,    0.0f, -0.8f, -0.8f,    0.4f, -0.8f, -0.8f,    0.8f, -0.8f, -0.8f,
          -0.8f, -0.4f, -0.8f,   -0.4f, -0.4f, -0.8f,    0.0f, -0.4f, -0.8f,    0.4f, -0.4f, -0.8f,    0.8f, -0.4f, -0.8f,
@@ -139,7 +143,7 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
 
        // this table contains 3 requantized samples for each legal codeword
        // when grouped in 10 bits, i.e. 9 quantizationsteps per sample
-       public static final float grouping_10bits[] =
+       @LOC("H") public static final float grouping_10bits[] =
        {
          -8.0f/9.0f, -8.0f/9.0f, -8.0f/9.0f,   -6.0f/9.0f, -8.0f/9.0f, -8.0f/9.0f,   -4.0f/9.0f, -8.0f/9.0f, -8.0f/9.0f,
          -2.0f/9.0f, -8.0f/9.0f, -8.0f/9.0f,        0.0f, -8.0f/9.0f, -8.0f/9.0f,    2.0f/9.0f, -8.0f/9.0f, -8.0f/9.0f,
@@ -389,28 +393,28 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
        // data taken from ISO/IEC DIS 11172, Annexes 3-B.2[abcd] and 3-B.4:
 
        // subbands 0-2 in tables 3-B.2a and 2b: (index is allocation)
-       public static final int table_ab1_codelength[] =
+       @LOC("F") public static final int table_ab1_codelength[] =
          // bits per codeword
        { 0, 5, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
 
-       public static final float table_ab1_groupingtables[][] =
+       @LOC("F") public static final float table_ab1_groupingtables[][] =
          // pointer to sample grouping table, or NULL-pointer if ungrouped
        { null, grouping_5bits, null, null, null, null, null, null, null, null, null, null, null, null, null, null };
 
-       public static final float table_ab1_factor[] =
+       @LOC("F") public static final float table_ab1_factor[] =
          // factor for requantization: (real)sample * factor - 1.0 gives requantized sample
        { 0.0f, 1.0f/2.0f, 1.0f/4.0f, 1.0f/8.0f, 1.0f/16.0f, 1.0f/32.0f, 1.0f/64.0f,
          1.0f/128.0f, 1.0f/256.0f, 1.0f/512.0f, 1.0f/1024.0f, 1.0f/2048.0f,
          1.0f/4096.0f, 1.0f/8192.0f, 1.0f/16384.0f, 1.0f/32768.0f };
 
-       public static final float table_ab1_c[] =
+       @LOC("F") public static final float table_ab1_c[] =
          // factor c for requantization from table 3-B.4
        { 0.0f,           1.33333333333f, 1.14285714286f, 1.06666666666f, 1.03225806452f,
          1.01587301587f, 1.00787401575f, 1.00392156863f, 1.00195694716f, 1.00097751711f,
          1.00048851979f, 1.00024420024f, 1.00012208522f, 1.00006103888f, 1.00003051851f,
          1.00001525902f };
 
-       public static final float table_ab1_d[] =
+       @LOC("F") public static final float table_ab1_d[] =
          // addend d for requantization from table 3-B.4
        { 0.0f,           0.50000000000f, 0.25000000000f, 0.12500000000f, 0.06250000000f,
          0.03125000000f, 0.01562500000f, 0.00781250000f, 0.00390625000f, 0.00195312500f,
@@ -418,59 +422,59 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
          0.00003051758f };
 
        // subbands 3-... tables 3-B.2a and 2b:
-       public static final float[] table_ab234_groupingtables[] =
+       @LOC("F") public static final float[] table_ab234_groupingtables[] =
        { null, grouping_5bits, grouping_7bits, null, grouping_10bits, null, null, null, null, null, null, null, null, null, null, null };
 
        // subbands 3-10 in tables 3-B.2a and 2b:
-       public static final int table_ab2_codelength[] =
+       @LOC("F") public static final int table_ab2_codelength[] =
        { 0, 5, 7, 3, 10, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16 };
-       public static final float table_ab2_factor[] =
+       @LOC("F") public static final float table_ab2_factor[] =
        { 0.0f, 1.0f/2.0f, 1.0f/4.0f, 1.0f/4.0f, 1.0f/8.0f, 1.0f/8.0f, 1.0f/16.0f,
          1.0f/32.0f, 1.0f/64.0f, 1.0f/128.0f, 1.0f/256.0f, 1.0f/512.0f,
          1.0f/1024.0f, 1.0f/2048.0f, 1.0f/4096.0f, 1.0f/32768.0f };
-       public static final float table_ab2_c[] =
+       @LOC("F") public static final float table_ab2_c[] =
        { 0.0f,           1.33333333333f, 1.60000000000f, 1.14285714286f, 1.77777777777f,
          1.06666666666f, 1.03225806452f, 1.01587301587f, 1.00787401575f, 1.00392156863f,
          1.00195694716f, 1.00097751711f, 1.00048851979f, 1.00024420024f, 1.00012208522f,
          1.00001525902f };
-       public static final float table_ab2_d[] =
+       @LOC("F") public static final float table_ab2_d[] =
        { 0.0f,           0.50000000000f, 0.50000000000f, 0.25000000000f, 0.50000000000f,
          0.12500000000f, 0.06250000000f, 0.03125000000f, 0.01562500000f, 0.00781250000f,
          0.00390625000f, 0.00195312500f, 0.00097656250f, 0.00048828125f, 0.00024414063f,
          0.00003051758f };
 
        // subbands 11-22 in tables 3-B.2a and 2b:
-       public static final int table_ab3_codelength[] = { 0, 5, 7, 3, 10, 4, 5, 16 };
-       public static final float table_ab3_factor[] =
+       @LOC("F") public static final int table_ab3_codelength[] = { 0, 5, 7, 3, 10, 4, 5, 16 };
+       @LOC("F") public static final float table_ab3_factor[] =
        { 0.0f, 1.0f/2.0f, 1.0f/4.0f, 1.0f/4.0f, 1.0f/8.0f, 1.0f/8.0f, 1.0f/16.0f, 1.0f/32768.0f };
-       public static final float table_ab3_c[] =
+       @LOC("F") public static final float table_ab3_c[] =
        { 0.0f,           1.33333333333f, 1.60000000000f, 1.14285714286f, 1.77777777777f,
          1.06666666666f, 1.03225806452f, 1.00001525902f };
-       public static final float table_ab3_d[] =
+       @LOC("F") public static final float table_ab3_d[] =
        { 0.0f,           0.50000000000f, 0.50000000000f, 0.25000000000f, 0.50000000000f,
          0.12500000000f, 0.06250000000f, 0.00003051758f };
 
        // subbands 23-... in tables 3-B.2a and 2b:
-       public static final int table_ab4_codelength[] = { 0, 5, 7, 16 };
-       public static final float table_ab4_factor[] = { 0.0f, 1.0f/2.0f, 1.0f/4.0f, 1.0f/32768.0f };
-       public static final float table_ab4_c[] = { 0.0f, 1.33333333333f, 1.60000000000f, 1.00001525902f };
-       public static final float table_ab4_d[] = { 0.0f, 0.50000000000f, 0.50000000000f, 0.00003051758f };
+       @LOC("F") public static final int table_ab4_codelength[] = { 0, 5, 7, 16 };
+        @LOC("F") public static final float table_ab4_factor[] = { 0.0f, 1.0f/2.0f, 1.0f/4.0f, 1.0f/32768.0f };
+       @LOC("F") public static final float table_ab4_c[] = { 0.0f, 1.33333333333f, 1.60000000000f, 1.00001525902f };
+       @LOC("F") public static final float table_ab4_d[] = { 0.0f, 0.50000000000f, 0.50000000000f, 0.00003051758f };
 
        // subbands in tables 3-B.2c and 2d:
-       public static final int table_cd_codelength[] =
+       @LOC("F") public static final int table_cd_codelength[] =
        { 0, 5, 7, 10, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
-       public static final float table_cd_groupingtables[][] =
+       @LOC("F") public static final float table_cd_groupingtables[][] =
        { null, grouping_5bits, grouping_7bits, grouping_10bits, null, null, null, null, null, null, null, null, null, null, null, null };
-       public static final float table_cd_factor[] =
+       @LOC("F") public static final float table_cd_factor[] =
        { 0.0f, 1.0f/2.0f, 1.0f/4.0f, 1.0f/8.0f, 1.0f/8.0f, 1.0f/16.0f, 1.0f/32.0f, 1.0f/64.0f,
          1.0f/128.0f, 1.0f/256.0f, 1.0f/512.0f, 1.0f/1024.0f, 1.0f/2048.0f, 1.0f/4096.0f,
          1.0f/8192.0f, 1.0f/16384.0f };
-       public static final float table_cd_c[] =
+       @LOC("F") public static final float table_cd_c[] =
        { 0.0f,           1.33333333333f, 1.60000000000f, 1.77777777777f, 1.06666666666f,
          1.03225806452f, 1.01587301587f, 1.00787401575f, 1.00392156863f, 1.00195694716f,
          1.00097751711f, 1.00048851979f, 1.00024420024f, 1.00012208522f, 1.00006103888f,
          1.00003051851f };
-       public static final float table_cd_d[] =
+       @LOC("F") public static final float table_cd_d[] =
        { 0.0f,           0.50000000000f, 0.50000000000f, 0.50000000000f, 0.12500000000f,
          0.06250000000f, 0.03125000000f, 0.01562500000f, 0.00781250000f, 0.00390625000f,
          0.00195312500f, 0.00097656250f, 0.00048828125f, 0.00024414063f, 0.00012207031f,
@@ -478,23 +482,25 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
 
 
 
-         protected int                     subbandnumber;
-         protected int                         allocation;
-         protected int                         scfsi;
-         protected float                       scalefactor1, scalefactor2, scalefactor3;
-         protected int[]                       codelength = {0}; 
-         protected float groupingtable[][] = new float[2][]; 
+         @LOC("F") protected int                       subbandnumber;
+         @LOC("F") protected int                               allocation;
+         @LOC("ARR") protected int                             scfsi;
+         @LOC("L") protected float                     scalefactor1;
+         @LOC("L") protected float                     scalefactor2;
+         @LOC("L") protected float                     scalefactor3;
+         @LOC("ARR") protected int[]                   codelength = {0}; 
+         @LOC("ARR") protected float                       groupingtable[][] = new float[2][]; 
          //protected float[][]                 groupingtable = {{0},{0}} ;
-         protected float[]                     factor = {0.0f};
-         protected int                         groupnumber;
-         protected int                         samplenumber;
-         protected float[]                     samples = new float[3];
-         protected float[]                     c = {0};
-         protected float[]                 d = {0};
+         @LOC("ARR") protected float[]                 factor = {0.0f};
+         @LOC("GN") protected int                              groupnumber;
+         @LOC("SN") protected int                      samplenumber;
+         @LOC("L") protected float[]                   samples = new float[3];
+         @LOC("ARR") protected float[]                 c = {0};
+         @LOC("ARR") protected float[]                 d = {0};
          /**
           * Constructor
           */
-         public SubbandLayer2(int subbandnumber)
+         public SubbandLayer2(@LOC("IN") int subbandnumber)
          {     
                this.subbandnumber = subbandnumber;
            groupnumber = samplenumber = 0;  
@@ -504,11 +510,12 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
          /**
           *
           */
-         protected int get_allocationlength (Header header)
+         @RETURNLOC("OUT") 
+         protected int get_allocationlength (@LOC("IN") Header header)
          {
                if (header.version() == Header.MPEG1)
                {
-                 int channel_bitrate = header.bitrate_index();
+                 @LOC("SH") int channel_bitrate = header.bitrate_index();
 
                  // calculate bitrate per channel:
                  if (header.mode() != Header.SINGLE_CHANNEL)
@@ -548,13 +555,13 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
          /**
           *
           */
-          protected void prepare_sample_reading(Header header, int allocation,
-                                                                                        //float[][] groupingtable,
-                                                                                          int channel,
-                                                float[] factor, int[] codelength,
-                                                float[] c, float[] d)
+           protected void prepare_sample_reading(@LOC("IN") Header header, @LOC("IN") int allocation,
+                                                 //float[][] groupingtable,
+                                                 @LOC("IN") int channel,
+                                                 @LOC("V") float[] factor, @LOC("V") int[] codelength,
+                                                 @LOC("V") float[] c, @LOC("V") float[] d)
           {
-                       int channel_bitrate = header.bitrate_index();
+                       @LOC("SH")int channel_bitrate = header.bitrate_index();
                        // calculate bitrate per channel:
                        if (header.mode() != Header.SINGLE_CHANNEL)
                                if (channel_bitrate == 4)
@@ -614,9 +621,10 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
          /**
           *
           */
-         public void read_allocation(Bitstream stream, Header header, Crc16 crc)
+          @LATTICE("OUT<V,V<SH,SH<IN,SH*,THISLOC=OUT,GLOBALLOC=IN")
+         public void read_allocation(@LOC("IN") Bitstream stream, @LOC("IN") Header header, @LOC("IN") Crc16 crc)
          {
-                int length = get_allocationlength(header);
+                @LOC("V") int length = get_allocationlength(header);
                 allocation = stream.get_bits(length);
                 if (crc != null) 
                         crc.add_bits(allocation, length);  
@@ -625,7 +633,7 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
          /**
           *
           */
-         public void read_scalefactor_selection (Bitstream stream, Crc16 crc)
+         public void read_scalefactor_selection (@LOC("IN") Bitstream stream, @LOC("IN") Crc16 crc)
          {
                if (allocation != 0)
                {
@@ -637,13 +645,13 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
          /**
           *
           */
-         public void read_scalefactor (Bitstream stream, Header header)
+         public void read_scalefactor (@LOC("IN") Bitstream stream, @LOC("IN") Header header)
          {
                if (allocation != 0)
                {
                   switch (scfsi)
-              {
-               case 0:
+                  {
+                  case 0:
                         scalefactor1 = scalefactors[stream.get_bits(6)];
                         scalefactor2 = scalefactors[stream.get_bits(6)];
                         scalefactor3 = scalefactors[stream.get_bits(6)];
@@ -652,13 +660,13 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
                         scalefactor1 = scalefactor2 = scalefactors[stream.get_bits(6)];
                         scalefactor3 = scalefactors[stream.get_bits(6)];
                         break;
-               case 2:
+                  case 2:
                         scalefactor1 = scalefactor2 = scalefactor3 = scalefactors[stream.get_bits(6)];
                         break;
-                   case 3:
+                  case 3:
                         scalefactor1 = scalefactors[stream.get_bits(6)];
-                    scalefactor2 = scalefactor3 = scalefactors[stream.get_bits(6)];
-                    break;
+                        scalefactor2 = scalefactor3 = scalefactors[stream.get_bits(6)];
+                        break;
                }
                prepare_sample_reading(header, allocation, 0,
                                    factor, codelength, c, d);
@@ -668,16 +676,18 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
          /**
           *
           */
-         public boolean read_sampledata (Bitstream stream)
+          @LATTICE("OUT<V,V<SH,SH<TEMP,TEMP<TMP,TMP<THIS,THIS<IN,SH*,TEMP*,TMP*,THISLOC=THIS,GLOBALLOC=IN")
+         @RETURNLOC("V")
+         public boolean read_sampledata (@LOC("IN") Bitstream stream)
          {
                if (allocation != 0)
                 if (groupingtable[0] != null)
                 {
-                       int samplecode = stream.get_bits(codelength[0]);
+                       @LOC("SH") int samplecode = stream.get_bits(codelength[0]);
                        // create requantized samples:
                        samplecode += samplecode << 1;
-                       float[] target = samples;
-                       float[] source = groupingtable[0];
+                       //float[] target = samples;  //subbed in variable to reduce areas
+                       //float[] source = groupingtable[0];  //subbed in variable to reduce areas
                  /*
                  int tmp = 0;
                        int temp = 0;
@@ -688,16 +698,16 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
                        target[tmp] = source[samplecode + temp];
                        */
                        //Bugfix:
-                       int tmp = 0;
-                       int temp = samplecode;
+                       @LOC("TMP") int tmp = 0;
+                       @LOC("TEMP") int temp = samplecode;
                        
                        if(temp > source.length - 3) temp = source.length - 3;
                        
-                       target[tmp] = source[temp];
+                       samples[tmp] = groupingtable[0][temp];
                        temp++;tmp++;
-                       target[tmp] = source[temp];
+                       samples[tmp] = groupingtable[0][temp];
                        temp++;tmp++;
-                       target[tmp] = source[temp];
+                       samples[tmp] = groupingtable[0][temp];
                        
                        // memcpy (samples, groupingtable + samplecode, 3 * sizeof (real));
                 }
@@ -718,11 +728,11 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
          /**
           *
           */
-         public boolean put_next_sample(int channels, SynthesisFilter filter1, SynthesisFilter filter2)
+         public boolean put_next_sample(@LOC("IN") int channels, @LOC("IN") SynthesisFilter filter1, @LOC("IN") SynthesisFilter filter2)
          {
            if ((allocation != 0) && (channels != OutputChannels.RIGHT_CHANNEL))
            {
-                float sample = samples[samplenumber];
+                @LOC("SH") float sample = samples[samplenumber];
          
                 if (groupingtable[0] == null)
                        sample = (sample + d[0]) * c[0];
@@ -745,15 +755,19 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
         /**
          * Class for layer II subbands in joint stereo mode.
          */
+        @LATTICE("L<H,L<ARR,ARR<F,SN<F,GN<F,F<H,SN*,GN*")
+       @METHODDEFAULT("OUT<V,V<SH,SH<THIS,THIS<IN,SH*,THISLOC=THIS,GLOBALLOC=IN")
        static class SubbandLayer2IntensityStereo extends SubbandLayer2
        {
-         protected int          channel2_scfsi;
-         protected float        channel2_scalefactor1, channel2_scalefactor2, channel2_scalefactor3;
+         @LOC("ARR") protected int              channel2_scfsi;
+         @LOC("L") protected float      channel2_scalefactor1; 
+         @LOC("L") protected float        channel2_scalefactor2;
+         @LOC("L") protected float        channel2_scalefactor3;
 
          /**
           * Constructor
           */
-         public SubbandLayer2IntensityStereo (int subbandnumber)
+         public SubbandLayer2IntensityStereo (@LOC("IN") int subbandnumber)
          {
                super(subbandnumber);
          }
@@ -761,7 +775,7 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
          /**
           *
           */
-         public void read_allocation(Bitstream stream, Header header, Crc16 crc)
+         public void read_allocation(@LOC("IN") Bitstream stream, @LOC("IN") Header header, @LOC("IN") Crc16 crc)
          {
            super.read_allocation (stream, header, crc);
          }
@@ -769,7 +783,7 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
          /**
           *
           */
-         public void read_scalefactor_selection(Bitstream stream, Crc16 crc)
+         public void read_scalefactor_selection(@LOC("IN") Bitstream stream, @LOC("IN") Crc16 crc)
          {
            if (allocation != 0)
            {
@@ -786,7 +800,7 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
          /**
           *
           */
-         public void read_scalefactor(Bitstream stream, Header header)
+           public void read_scalefactor(@LOC("IN") Bitstream stream, @LOC("IN") Header header)
          {
            if (allocation != 0)
            {
@@ -821,7 +835,8 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
          /**
           *
           */
-         public boolean read_sampledata(Bitstream stream)
+         @RETURNLOC("V")
+         public boolean read_sampledata(@LOC("IN") Bitstream stream)
          {
                 return super.read_sampledata (stream);
          }
@@ -829,17 +844,19 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
          /**
           *
           */
-         public boolean put_next_sample(int channels, SynthesisFilter filter1, SynthesisFilter filter2)
+          @LATTICE("S2<S1,S1<THIS,THIS<GLOBAL,S1*,THISLOC=THIS,GLOBALLOC=GLOBAL")
+         @RETURNLOC("S2")
+         public boolean put_next_sample(@LOC("IN") int channels, @LOC("IN") SynthesisFilter filter1, @LOC("IN") SynthesisFilter filter2)
          {
                  if (allocation != 0)
                  {
-                        float sample = samples[samplenumber];
+                       @LOC("S1") float sample = samples[samplenumber];
                
                         if (groupingtable[0] == null)
                                sample = (sample + d[0]) * c[0];
                       if (channels == OutputChannels.BOTH_CHANNELS)
                           {
-                                 float sample2 = sample;
+                             @LOC("S2") float sample2 = sample;
                              if (groupnumber <= 4)
                              {
                                        sample *= scalefactor1;
@@ -890,23 +907,27 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
         /**
          * Class for layer II subbands in stereo mode.
          */
+        @LATTICE("L<H,L<ARR,ARR<F,SN<F,GN<F,F<H,SN*,GN*")
+       @METHODDEFAULT("OUT<V,V<SH,SH<THIS,THIS<IN,SH*,THISLOC=THIS,GLOBALLOC=IN")
        static class SubbandLayer2Stereo extends SubbandLayer2
        {
-         protected int                 channel2_allocation;
-         protected int                 channel2_scfsi;
-         protected float               channel2_scalefactor1, channel2_scalefactor2, channel2_scalefactor3;
+         @LOC("F")protected int                        channel2_allocation;
+         @LOC("ARR") protected int             channel2_scfsi;
+         @LOC("L") protected float             channel2_scalefactor1;
+         @LOC("L") protected float channel2_scalefactor2;
+         @LOC("L") protected float channel2_scalefactor3;
          //protected boolean           channel2_grouping;  ???? Never used!
-         protected int[]               channel2_codelength = {0};
+         @LOC("ARR") protected int[]           channel2_codelength = {0};
          //protected float[][]         channel2_groupingtable = {{0},{0}};
-         protected float[]             channel2_factor = {0};
-         protected float[]     channel2_samples;
-         protected float[]             channel2_c = {0};
-         protected float[]             channel2_d = {0};
+         @LOC("ARR") protected float[]         channel2_factor = {0};
+         @LOC("L") protected float[]   channel2_samples;
+         @LOC("ARR") protected float[]         channel2_c = {0};
+         @LOC("ARR") protected float[]         channel2_d = {0};
          
          /**
           * Constructor
           */
-         public SubbandLayer2Stereo(int subbandnumber)
+         public SubbandLayer2Stereo(@LOC("IN") int subbandnumber)
          {
                super(subbandnumber);
                channel2_samples = new float[3];
@@ -915,9 +936,10 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
          /**
           *
           */
-         public void read_allocation (Bitstream stream, Header header, Crc16 crc)
+          @LATTICE("OUT<SH,SH<THIS,THIS<V,V<IN,SH*,THISLOC=THIS,GLOBALLOC=IN")
+         public void read_allocation(@LOC("IN") Bitstream stream, @LOC("IN") Header header, @LOC("IN") Crc16 crc)
          {
-           int length = get_allocationlength(header);
+           @LOC("V") int length = get_allocationlength(header);
            allocation = stream.get_bits(length);
            channel2_allocation = stream.get_bits(length);
            if (crc != null)
@@ -930,7 +952,7 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
          /**
           *
           */
-         public void read_scalefactor_selection(Bitstream stream, Crc16 crc)
+         public void read_scalefactor_selection(@LOC("IN") Bitstream stream, @LOC("IN") Crc16 crc)
          {
                  if (allocation != 0)
                  {
@@ -949,7 +971,7 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
          /**
           *
           */
-         public void read_scalefactor(Bitstream stream, Header header)
+           public void read_scalefactor(@LOC("IN") Bitstream stream, @LOC("IN") Header header)
          {
            super.read_scalefactor(stream, header);
            if (channel2_allocation != 0)
@@ -988,14 +1010,16 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
          /**
           *
           */
-         public boolean read_sampledata (Bitstream stream)
+          @LATTICE("OUT<V,V<SH,SH<TEMP,TEMP<TMP,TMP<THIS,THIS<IN,SH*,TEMP*,TMP*,THISLOC=THIS,GLOBALLOC=IN")
+         @RETURNLOC("V")
+         public boolean read_sampledata (@LOC("IN") Bitstream stream)
          {
-           boolean returnvalue = super.read_sampledata(stream);
+           @LOC("V")boolean returnvalue = super.read_sampledata(stream);
          
            if (channel2_allocation != 0)
                 if (groupingtable[1] != null)
                 {
-                       int samplecode = stream.get_bits(channel2_codelength[0]);
+                       @LOC("SH") int samplecode = stream.get_bits(channel2_codelength[0]);
                        // create requantized samples:
                        samplecode += samplecode << 1;
                /*
@@ -1010,10 +1034,10 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
                        target[tmp] = source[samplecode + temp];
                        // memcpy (channel2_samples, channel2_groupingtable + samplecode, 3 * sizeof (real));
                */
-               float[] target = channel2_samples;
-           float[] source = groupingtable[1];
-                       int tmp = 0;
-                       int temp = samplecode;
+                       @LOC("V") float[] target = channel2_samples;
+                       @LOC("V") float[] source = groupingtable[1];
+                       @LOC("TMP") int tmp = 0;
+                       @LOC("TEMP") int temp = samplecode;
                target[tmp] = source[temp];
                        temp++;tmp++;
                target[tmp] = source[temp];
@@ -1036,12 +1060,13 @@ class LayerIIDecoder extends LayerIDecoder implements FrameDecoder
          /**
           *
           */
-         public boolean put_next_sample(int channels, SynthesisFilter filter1, SynthesisFilter filter2)
+         @RETURNLOC("V")
+         public boolean put_next_sample(@LOC("IN") int channels, @LOC("IN") SynthesisFilter filter1, @LOC("IN") SynthesisFilter filter2)
          {
-           boolean returnvalue = super.put_next_sample(channels, filter1, filter2);
+           @LOC("V") boolean returnvalue = super.put_next_sample(channels, filter1, filter2);
            if ((channel2_allocation != 0) && (channels != OutputChannels.LEFT_CHANNEL))
            {
-                float sample = channel2_samples[samplenumber - 1];
+               @LOC("SH") float sample = channel2_samples[samplenumber - 1];
          
                 if (groupingtable[1] == null)
                        sample = (sample + channel2_d[0]) * channel2_c[0];
index 056d744c5c825fb3e6a60866fae2b5d675f615ef..3a0e36c8bf46ffaceeb76ef7bb6e2e99f86e54de 100644 (file)
  * \r
  * @since 0.0\r
  */\r
+@LATTICE("FS<BR,BR<SF,LR<IR,IR<IP,IP<SF,LR<K,K<F,LR<VAR,LR<RO,RO<F,VAR<F,VAR<RAW,CSH<F,SAM<O,O<F,\r
+SF<SI,SI<CH,SFREQ<H,MAX<H,H<CH,FLCH<CH,FLCH<WCH,SF<SFT,SFT<NS,NS<C,TS<RAW,O<TS,LY<F,\r
+C*,FS*,SI*,IP*,IR*,LR*,K*,O*,TS*,\r
+TS<BT,BT<GR,GR<SI,\r
+LR<S,S<ME,ME<CH,K<SH,K<LSF,LSF<H,LSF<CH,IP<SH,SH<J,J<S,S<ME,SH<SFREQ,SH<RO,IP<TMP2,LSF<H,TMP2<F,J*,SH*,\r
+O<RO2,RO2<RO3,RO3<RO4,RO4<RO5,O<RO1,RO1<RO5,RO5<RO6,RO6<RO7,RO7<RO8,RO8<RO9,RO9<SFREQ,RO9<F,RO1*,RO4*,RO5*,RO6*,RO9*")\r
+//4th: added for hybrid.\r
+//5th added for stereo\r
+//6th added for reorder method\r
+\r
+@METHODDEFAULT("OUT<V,V<THIS,THIS<SH,SH<IN,SH*,THISLOC=THIS,GLOBALLOC=IN")\r
 final class LayerIIIDecoder implements FrameDecoder {\r
-  final double d43 = (4.0 / 3.0);\r
-\r
-  public int[] scalefac_buffer;\r
+  @LOC("F") final double d43 = (4.0 / 3.0);\r
+  @LOC("SFT") public int[] scalefac_buffer;\r
 \r
   // MDM: removed, as this wasn't being used.\r
   // private float CheckSumOut1d = 0.0f;\r
-  private int CheckSumHuff = 0;\r
-  private int[] is_1d;\r
-  private float[][][] ro;\r
-  private float[][][] lr;\r
-  private float[] out_1d; // 576 samples\r
-  private float[][] prevblck;\r
-  private float[][] k;\r
-  private int[] nonzero;\r
-  private Bitstream stream;\r
-  private Header header;\r
-  private SynthesisFilter filter1, filter2;\r
-  private Obuffer buffer; // output buffer\r
-  private int which_channels;\r
-  private BitReserve br;\r
-  private III_side_info_t si;\r
-\r
-  private temporaire2[] III_scalefac_t;\r
-  private temporaire2[] scalefac;\r
+  @LOC("CSH") private int CheckSumHuff = 0;\r
+  @LOC("VAR") private int[] is_1d;\r
+  @LOC("VAR") private float[][][] ro;\r
+  @LOC("LR") private float[][][] lr;\r
+  @LOC("O") private float[] out_1d; // 576 samples\r
+  @LOC("VAR") private float[][] prevblck;\r
+  @LOC("K") private float[][] k;\r
+  @LOC("F") private int[] nonzero;\r
+  @LOC("F")private Bitstream stream;\r
+  @LOC("H") private Header header;\r
+  @LOC("F") private SynthesisFilter filter1;\r
+  @LOC("F") private SynthesisFilter filter2;\r
+  @LOC("F") private Obuffer buffer; // output buffer\r
+  @LOC("WC") private int which_channels;\r
+  @LOC("BR") private BitReserve br;\r
+  @LOC("SI") private III_side_info_t si;\r
+\r
+  @LOC("SBT") private temporaire2[] III_scalefac_t;\r
+  @LOC("SF") private temporaire2[] scalefac;\r
   // private III_scalefac_t scalefac;\r
 \r
-  private int max_gr;\r
-  private int frame_start;\r
-  private int part2_start;\r
-  private int channels;\r
-  private int first_channel;\r
-  private int last_channel;\r
-  private int sfreq;\r
+  @LOC("MAX") private int max_gr;\r
+  @LOC("FS") private int frame_start;\r
+  @LOC("F") private int part2_start;\r
+  @LOC("CH") private int channels;\r
+  @LOC("FLCH") private int first_channel;\r
+  @LOC("FLCH") private int last_channel;\r
+  @LOC("SFREQ") private int sfreq;\r
 \r
   /**\r
    * Constructor.\r
@@ -233,8 +244,8 @@ final class LayerIIIDecoder implements FrameDecoder {
 \r
   // subband samples are buffered and passed to the\r
   // SynthesisFilter in one go.\r
-  private float[] samples1 = new float[32];\r
-  private float[] samples2 = new float[32];\r
+  @LOC("SAM") private float[] samples1 = new float[32];\r
+  @LOC("SAM") private float[] samples2 = new float[32];\r
 \r
   /* location hierarchy of decode()\r
 {header} {stream} {si}\r
@@ -614,7 +625,7 @@ final class LayerIIIDecoder implements FrameDecoder {
         */\r
   // MDM: new_slen is fully initialized before use, no need\r
   // to reallocate array.\r
-  private final int[] new_slen = new int[4];\r
+  @LOC("NS") private final int[] new_slen = new int[4];\r
 \r
   private void get_LSF_scale_data(int ch, int gr) {\r
 \r
@@ -762,10 +773,10 @@ final class LayerIIIDecoder implements FrameDecoder {
   /**\r
         *\r
         */\r
-  int[] x = { 0 };\r
-  int[] y = { 0 };\r
-  int[] v = { 0 };\r
-  int[] w = { 0 };\r
+  @LOC("LY") int[] x = { 0 };\r
+  @LOC("F") int[] y = { 0 };\r
+  @LOC("LY") int[] v = { 0 };\r
+  @LOC("LY") int[] w = { 0 };\r
 \r
   private void huffman_decode(int ch, int gr) {\r
     x[0] = 0;\r
@@ -779,7 +790,8 @@ final class LayerIIIDecoder implements FrameDecoder {
     int region2Start;\r
     int index;\r
 \r
-    int buf, buf1;\r
+    int buf;\r
+    int buf1;\r
 \r
     huffcodetab h;\r
 \r
@@ -873,7 +885,7 @@ final class LayerIIIDecoder implements FrameDecoder {
   /**\r
         *\r
         */\r
-  private void i_stereo_k_values(int is_pos, int io_type, int i) {\r
+  private void i_stereo_k_values(@LOC("IN") int is_pos, @LOC("IN") int io_type, @LOC("IN") int i) {\r
     if (is_pos == 0) {\r
       k[0][i] = 1.0f;\r
       k[1][i] = 1.0f;\r
@@ -889,15 +901,18 @@ final class LayerIIIDecoder implements FrameDecoder {
   /**\r
         *\r
         */\r
-  private void dequantize_sample(float xr[][], int ch, int gr) {\r
-    gr_info_s gr_info = (si.ch[ch].gr[gr]);\r
-    int cb = 0;\r
-    int next_cb_boundary;\r
-    int cb_begin = 0;\r
-    int cb_width = 0;\r
-    int index = 0, t_index, j;\r
-    float g_gain;\r
-    float[][] xr_1d = xr;\r
+  @LATTICE("OUT<QUO,QUO<REST,REST<IDX,IDX<VAR,VAR<CB,CB<J,CB<GR,GR<IN,J<IN,QUO*,REST*,IDX*,CB*,J*,THISLOC=IN,GLOBALLOC=IN")\r
+  private void dequantize_sample(@LOC("OUT") float xr[][], @LOC("IN") int ch, @LOC("IN") int gr) {\r
+    @LOC("GR") gr_info_s gr_info = (si.ch[ch].gr[gr]);\r
+    @LOC("CB") int cb = 0;\r
+    @LOC("CB") int next_cb_boundary;\r
+    @LOC("CB") int cb_begin = 0;\r
+    @LOC("CB") int cb_width = 0;\r
+    @LOC("IN") int index = 0;\r
+    @LOC("VAR") int t_index;\r
+    @LOC("J") int j;\r
+    @LOC("VAR") float g_gain;\r
+    //float[][] xr_1d = xr;//substituted xr for instances of xr_1d to decrease number of areas\r
 \r
     // choose correct scalefactor band per block type, initalize boundary\r
 \r
@@ -919,27 +934,27 @@ final class LayerIIIDecoder implements FrameDecoder {
 \r
     for (j = 0; j < nonzero[ch]; j++) {\r
       // Modif E.B 02/22/99\r
-      int reste = j % SSLIMIT;\r
-      int quotien = (int) ((j - reste) / SSLIMIT);\r
+      @LOC("REST") int reste = j % SSLIMIT;\r
+      @LOC("QUO") int quotien = (int) ((j - reste) / SSLIMIT);\r
       if (is_1d[j] == 0)\r
-        xr_1d[quotien][reste] = 0.0f;\r
+        xr[quotien][reste] = 0.0f;\r
       else {\r
-        int abv = is_1d[j];\r
+       @LOC("VAR") int abv = is_1d[j];\r
         // Pow Array fix (11/17/04)\r
         if (abv < t_43.length) {\r
           if (is_1d[j] > 0)\r
-            xr_1d[quotien][reste] = g_gain * t_43[abv];\r
+            xr[quotien][reste] = g_gain * t_43[abv];\r
           else {\r
             if (-abv < t_43.length)\r
-              xr_1d[quotien][reste] = -g_gain * t_43[-abv];\r
+              xr[quotien][reste] = -g_gain * t_43[-abv];\r
             else\r
-              xr_1d[quotien][reste] = -g_gain * (float) Math.pow(-abv, d43);\r
+              xr[quotien][reste] = -g_gain * (float) Math.pow(-abv, d43);\r
           }\r
         } else {\r
           if (is_1d[j] > 0)\r
-            xr_1d[quotien][reste] = g_gain * (float) Math.pow(abv, d43);\r
+            xr[quotien][reste] = g_gain * (float) Math.pow(abv, d43);\r
           else\r
-            xr_1d[quotien][reste] = -g_gain * (float) Math.pow(-abv, d43);\r
+            xr[quotien][reste] = -g_gain * (float) Math.pow(-abv, d43);\r
         }\r
       }\r
     }\r
@@ -947,8 +962,8 @@ final class LayerIIIDecoder implements FrameDecoder {
     // apply formula per block type\r
     for (j = 0; j < nonzero[ch]; j++) {\r
       // Modif E.B 02/22/99\r
-      int reste = j % SSLIMIT;\r
-      int quotien = (int) ((j - reste) / SSLIMIT);\r
+      @LOC("REST") int reste = j % SSLIMIT;\r
+      @LOC("QUO") int quotien = (int) ((j - reste) / SSLIMIT);\r
 \r
       if (index == next_cb_boundary) { /* Adjust critical band boundary */\r
         if ((gr_info.window_switching_flag != 0) && (gr_info.block_type == 2)) {\r
@@ -1005,36 +1020,36 @@ final class LayerIIIDecoder implements FrameDecoder {
          * xr[sb][ss] *= pow(2.0, ((-2.0 * gr_info.subblock_gain[t_index]) -(0.5\r
          * * (1.0 + gr_info.scalefac_scale) scalefac[ch].s[t_index][cb])));\r
          */\r
-        int idx = scalefac[ch].s[t_index][cb] << gr_info.scalefac_scale;\r
+        @LOC("IDX") int idx = scalefac[ch].s[t_index][cb] << gr_info.scalefac_scale;\r
         idx += (gr_info.subblock_gain[t_index] << 2);\r
 \r
-        xr_1d[quotien][reste] *= two_to_negative_half_pow[idx];\r
+        xr[quotien][reste] *= two_to_negative_half_pow[idx];\r
 \r
       } else { // LONG block types 0,1,3 & 1st 2 subbands of switched blocks\r
         /*\r
          * xr[sb][ss] *= pow(2.0, -0.5 * (1.0+gr_info.scalefac_scale)\r
          * (scalefac[ch].l[cb] + gr_info.preflag * pretab[cb]));\r
          */\r
-        int idx = scalefac[ch].l[cb];\r
+       @LOC("IDX") int idx = scalefac[ch].l[cb];\r
 \r
         if (gr_info.preflag != 0)\r
           idx += pretab[cb];\r
 \r
         idx = idx << gr_info.scalefac_scale;\r
-        xr_1d[quotien][reste] *= two_to_negative_half_pow[idx];\r
+        xr[quotien][reste] *= two_to_negative_half_pow[idx];\r
       }\r
       index++;\r
     }\r
 \r
     for (j = nonzero[ch]; j < 576; j++) {\r
       // Modif E.B 02/22/99\r
-      int reste = j % SSLIMIT;\r
-      int quotien = (int) ((j - reste) / SSLIMIT);\r
+      @LOC("REST") int reste = j % SSLIMIT;\r
+      @LOC("QUO") int quotien = (int) ((j - reste) / SSLIMIT);\r
       if (reste < 0)\r
         reste = 0;\r
       if (quotien < 0)\r
         quotien = 0;\r
-      xr_1d[quotien][reste] = 0.0f;\r
+      xr[quotien][reste] = 0.0f;\r
     }\r
 \r
     return;\r
@@ -1043,19 +1058,24 @@ final class LayerIIIDecoder implements FrameDecoder {
   /**\r
         *\r
         */\r
-  private void reorder(float xr[][], int ch, int gr) {\r
+  @LATTICE("THIS<I,I<GR,GR<IN,I*,THISLOC=THIS,GLOBALLOC=IN")\r
+  private void reorder(@LOC("IN") float xr[][], @LOC("IN") int ch, @LOC("IN") int gr) {\r
     // the purpose of reordering: move 'short samples' back to their original position\r
     // after reorder, the samples are no long ordered by frequency\r
     \r
     // the format of input data to reorder: \r
     // three small chunks of 192 samples each are combined to 576 samples ordered by frequency \r
     \r
-    gr_info_s gr_info = (si.ch[ch].gr[gr]);\r
-    int freq, freq3;\r
-    int index;\r
-    int sfb, sfb_start, sfb_lines;\r
-    int src_line, des_line;\r
-    float[][] xr_1d = xr;\r
+    @LOC("GR") gr_info_s gr_info = (si.ch[ch].gr[gr]);\r
+    @LOC("THIS,LayerIIIDecoder.RO6") int freq;\r
+    @LOC("THIS,LayerIIIDecoder.RO5") int freq3;\r
+    @LOC("I") int index;\r
+    @LOC("THIS,LayerIIIDecoder.RO9") int sfb;\r
+    @LOC("THIS,LayerIIIDecoder.RO8") int sfb_start;\r
+    @LOC("THIS,LayerIIIDecoder.RO7") int sfb_lines;\r
+    @LOC("THIS,LayerIIIDecoder.RO4") int src_line;\r
+    @LOC("THIS,LayerIIIDecoder.RO1") int des_line;\r
+    //float[][] xr_1d = xr;  subbed in xr for xr_1d so as not to create extra areas\r
 \r
     if ((gr_info.window_switching_flag != 0) && (gr_info.block_type == 2)) {\r
 \r
@@ -1066,9 +1086,9 @@ final class LayerIIIDecoder implements FrameDecoder {
         // NO REORDER FOR LOW 2 SUBBANDS\r
         for (index = 0; index < 36; index++) {\r
           // Modif E.B 02/22/99\r
-          int reste = index % SSLIMIT;\r
-          int quotien = (int) ((index - reste) / SSLIMIT);\r
-          out_1d[index] = xr_1d[quotien][reste];\r
+         @LOC("THIS,LayerIIIDecoder.RO3") int reste = index % SSLIMIT;\r
+          @LOC("THIS,LayerIIIDecoder.RO2") int quotien = (int) ((index - reste) / SSLIMIT);\r
+          out_1d[index] = xr[quotien][reste];\r
         }\r
         // REORDERING FOR REST SWITCHED SHORT\r
         /*\r
@@ -1082,48 +1102,48 @@ final class LayerIIIDecoder implements FrameDecoder {
           sfb_start = sfBandIndex[sfreq].s[sfb];\r
           sfb_lines = sfBandIndex[sfreq].s[sfb + 1] - sfb_start;\r
 \r
-          int sfb_start3 = (sfb_start << 2) - sfb_start;\r
+          @LOC("THIS,LayerIIIDecoder.RO7") int sfb_start3 = (sfb_start << 2) - sfb_start;\r
 \r
           for (freq = 0, freq3 = 0; freq < sfb_lines; freq++, freq3 += 3) {\r
 \r
             src_line = sfb_start3 + freq;\r
             des_line = sfb_start3 + freq3;\r
             // Modif E.B 02/22/99\r
-            int reste = src_line % SSLIMIT;\r
-            int quotien = (int) ((src_line - reste) / SSLIMIT);\r
+            @LOC("THIS,LayerIIIDecoder.RO3") int reste = src_line % SSLIMIT;\r
+            @LOC("THIS,LayerIIIDecoder.RO2") int quotien = (int) ((src_line - reste) / SSLIMIT);\r
 \r
-            out_1d[des_line] = xr_1d[quotien][reste];\r
+            out_1d[des_line] = xr[quotien][reste];\r
             src_line += sfb_lines;\r
             des_line++;\r
 \r
             reste = src_line % SSLIMIT;\r
             quotien = (int) ((src_line - reste) / SSLIMIT);\r
 \r
-            out_1d[des_line] = xr_1d[quotien][reste];\r
+            out_1d[des_line] = xr[quotien][reste];\r
             src_line += sfb_lines;\r
             des_line++;\r
 \r
             reste = src_line % SSLIMIT;\r
             quotien = (int) ((src_line - reste) / SSLIMIT);\r
 \r
-            out_1d[des_line] = xr_1d[quotien][reste];\r
+            out_1d[des_line] = xr[quotien][reste];\r
           }\r
         }\r
 \r
       } else { // pure short\r
         for (index = 0; index < 576; index++) {\r
-          int j = reorder_table[sfreq][index];\r
-          int reste = j % SSLIMIT;\r
-          int quotien = (int) ((j - reste) / SSLIMIT);\r
-          out_1d[index] = xr_1d[quotien][reste];\r
+         @LOC("THIS,LayerIIIDecoder.RO8") int j = reorder_table[sfreq][index];\r
+          @LOC("THIS,LayerIIIDecoder.RO3") int reste = j % SSLIMIT;\r
+          @LOC("THIS,LayerIIIDecoder.RO2") int quotien = (int) ((j - reste) / SSLIMIT);\r
+          out_1d[index] = xr[quotien][reste];\r
         }\r
       }\r
     } else { // long blocks\r
       for (index = 0; index < 576; index++) {\r
         // Modif E.B 02/22/99\r
-        int reste = index % SSLIMIT;\r
-        int quotien = (int) ((index - reste) / SSLIMIT);\r
-        out_1d[index] = xr_1d[quotien][reste];\r
+       @LOC("THIS,LayerIIIDecoder.RO3") int reste = index % SSLIMIT;\r
+        @LOC("THIS,LayerIIIDecoder.RO2") int quotien = (int) ((index - reste) / SSLIMIT);\r
+        out_1d[index] = xr[quotien][reste];\r
       }\r
     }\r
   }\r
@@ -1132,11 +1152,13 @@ final class LayerIIIDecoder implements FrameDecoder {
         *\r
         */\r
 \r
-  int[] is_pos = new int[576];\r
-  float[] is_ratio = new float[576];\r
+  @LOC("IP") int[] is_pos = new int[576];\r
+  @LOC("IR") float[] is_ratio = new float[576];\r
 \r
-  private void stereo(int gr) {\r
-    int sb, ss;\r
+  @LATTICE("IO<THIS,THIS<IN,THISLOC=THIS,GLOBALLOC=IN") \r
+  private void stereo(@LOC("IN") int gr) {\r
+    @LOC("SH") int sb;\r
+    @LOC("SH") int ss;\r
 \r
     if (channels == 1) { // mono , bypass xr[0][][] to lr[0][][]\r
 \r
@@ -1149,18 +1171,20 @@ final class LayerIIIDecoder implements FrameDecoder {
 \r
     } else {\r
 \r
-      gr_info_s gr_info = (si.ch[0].gr[gr]);\r
-      int mode_ext = header.mode_extension();\r
-      int sfb;\r
-      int i;\r
-      int lines, temp, temp2;\r
-\r
-      boolean ms_stereo = ((header.mode() == Header.JOINT_STEREO) && ((mode_ext & 0x2) != 0));\r
-      boolean i_stereo = ((header.mode() == Header.JOINT_STEREO) && ((mode_ext & 0x1) != 0));\r
-      boolean lsf =\r
+      @LOC("THIS,LayerIIIDecoder.ME") gr_info_s gr_info = (si.ch[0].gr[gr]);\r
+      @LOC("THIS,LayerIIIDecoder.ME") int mode_ext = header.mode_extension();\r
+      @LOC("THIS,LayerIIIDecoder.SH") int sfb;\r
+      @LOC("THIS,LayerIIIDecoder.SH") int i;\r
+      @LOC("THIS,LayerIIIDecoder.SH") int line;\r
+      @LOC("THIS,LayerIIIDecoder.SH") int temp;\r
+      @LOC("THIS,LayerIIIDecoder.TMP2") int temp2;\r
+\r
+      @LOC("THIS,LayerIIIDecoder.S") boolean ms_stereo = ((header.mode() == Header.JOINT_STEREO) && ((mode_ext & 0x2) != 0));\r
+      @LOC("THIS,LayerIIIDecoder.S") boolean i_stereo = ((header.mode() == Header.JOINT_STEREO) && ((mode_ext & 0x1) != 0));\r
+      @LOC("THIS,LayerIIIDecoder.LSF") boolean lsf =\r
           ((header.version() == Header.MPEG2_LSF || header.version() == Header.MPEG25_LSF)); // SZD\r
 \r
-      int io_type = (gr_info.scalefac_compress & 1);\r
+      @LOC("IO") int io_type = (gr_info.scalefac_compress & 1);\r
 \r
       // initialization\r
 \r
@@ -1174,10 +1198,10 @@ final class LayerIIIDecoder implements FrameDecoder {
         if ((gr_info.window_switching_flag != 0) && (gr_info.block_type == 2)) {\r
           if (gr_info.mixed_block_flag != 0) {\r
 \r
-            int max_sfb = 0;\r
+           @LOC("THIS,LayerIIIDecoder.SH") int max_sfb = 0;\r
 \r
-            for (int j = 0; j < 3; j++) {\r
-              int sfbcnt;\r
+            for (@LOC("THIS,LayerIIIDecoder.J") int j = 0; j < 3; j++) {\r
+             @LOC("THIS,LayerIIIDecoder.SH") int sfbcnt;\r
               sfbcnt = 2;\r
               for (sfb = 12; sfb >= 3; sfb--) {\r
                 i = sfBandIndex[sfreq].s[sfb];\r
@@ -1276,8 +1300,8 @@ final class LayerIIIDecoder implements FrameDecoder {
               } // for (; sfb<8 ...\r
             } // for (j=0 ...\r
           } else { // if (gr_info.mixed_block_flag)\r
-            for (int j = 0; j < 3; j++) {\r
-              int sfbcnt;\r
+           for (@LOC("THIS,LayerIIIDecoder.J") int j = 0; j < 3; j++) {\r
+             @LOC("THIS,LayerIIIDecoder.SH") int sfbcnt;\r
               sfbcnt = -1;\r
               for (sfb = 12; sfb >= 0; sfb--) {\r
                 temp = sfBandIndex[sfreq].s[sfb];\r
@@ -1418,9 +1442,12 @@ final class LayerIIIDecoder implements FrameDecoder {
   /**\r
         *\r
         */\r
-  private void antialias(int ch, int gr) {\r
-    int sb18, ss, sb18lim;\r
-    gr_info_s gr_info = (si.ch[ch].gr[gr]);\r
+  @LATTICE("THIS<SRC<SS,SS<SB18,SB18<SB18LIM,SB18LIM<GR,GR<IN,SB18*,SS*,THISLOC=THIS")\r
+  private void antialias(@LOC("IN") int ch, @LOC("IN") int gr) {\r
+    @LOC("SB18") int sb18;\r
+    @LOC("SS") int ss;\r
+    @LOC("SB18LIM") int sb18lim;\r
+    @LOC("GR") gr_info_s gr_info = (si.ch[ch].gr[gr]);\r
     // 31 alias-reduction operations between each pair of sub-bands\r
     // with 8 butterflies between each pair\r
 \r
@@ -1437,10 +1464,10 @@ final class LayerIIIDecoder implements FrameDecoder {
 \r
     for (sb18 = 0; sb18 < sb18lim; sb18 += 18) {\r
       for (ss = 0; ss < 8; ss++) {\r
-        int src_idx1 = sb18 + 17 - ss;\r
-        int src_idx2 = sb18 + 18 + ss;\r
-        float bu = out_1d[src_idx1];\r
-        float bd = out_1d[src_idx2];\r
+       @LOC("SRC") int src_idx1 = sb18 + 17 - ss;\r
+        @LOC("SRC") int src_idx2 = sb18 + 18 + ss;\r
+        @LOC("THIS,LayerIIIDecoder.O") float bu = out_1d[src_idx1];\r
+        @LOC("THIS,LayerIIIDecoder.0") float bd = out_1d[src_idx2];\r
         out_1d[src_idx1] = (bu * cs[ss]) - (bd * ca[ss]);\r
         out_1d[src_idx2] = (bd * cs[ss]) + (bu * ca[ss]);\r
       }\r
@@ -1453,16 +1480,17 @@ final class LayerIIIDecoder implements FrameDecoder {
 \r
   // MDM: tsOutCopy and rawout do not need initializing, so the arrays\r
   // can be reused.\r
-  float[] tsOutCopy = new float[18];\r
-  float[] rawout = new float[36];\r
-\r
-  private void hybrid(int ch, int gr) {\r
-    int bt;\r
-    int sb18;\r
-    gr_info_s gr_info = (si.ch[ch].gr[gr]);\r
-    float[] tsOut;\r
-\r
-    float[][] prvblk;\r
+  @LOC("TS") float[] tsOutCopy = new float[18];\r
+  @LOC("RAW") float[] rawout = new float[36];\r
+  \r
+@LATTICE("THIS<SB,THIS<SH,SH<IN,IN<GLOBAL,SB*,SH*,THISLOC=THIS,GLOBALLOC=GLOBAL")\r
+    private void hybrid(@LOC("IN") int ch, @LOC("IN") int gr) {\r
+    @LOC("THIS,LayerIIIDecoder.BT") int bt;\r
+    @LOC("SB") int sb18;\r
+    @LOC("THIS,LayerIIIDecoder.GR") gr_info_s gr_info = (si.ch[ch].gr[gr]);\r
+    @LOC("THIS,LayerIIIDecoder.TS") float[] tsOut;\r
+\r
+    //float[][] prvblk;\r
 \r
     for (sb18 = 0; sb18 < 576; sb18 += 18) {\r
       bt =\r
@@ -1471,63 +1499,64 @@ final class LayerIIIDecoder implements FrameDecoder {
 \r
       tsOut = out_1d;\r
       // Modif E.B 02/22/99\r
-      for (int cc = 0; cc < 18; cc++)\r
+      for (@LOC("SH") int cc = 0; cc < 18; cc++)\r
         tsOutCopy[cc] = tsOut[cc + sb18];\r
 \r
       inv_mdct(tsOutCopy, rawout, bt);\r
 \r
-      for (int cc = 0; cc < 18; cc++)\r
+      for (@LOC("SH") int cc = 0; cc < 18; cc++)\r
         tsOut[cc + sb18] = tsOutCopy[cc];\r
       // Fin Modif\r
 \r
       // overlap addition\r
-      prvblk = prevblck;\r
-\r
-      tsOut[0 + sb18] = rawout[0] + prvblk[ch][sb18 + 0];\r
-      prvblk[ch][sb18 + 0] = rawout[18];\r
-      tsOut[1 + sb18] = rawout[1] + prvblk[ch][sb18 + 1];\r
-      prvblk[ch][sb18 + 1] = rawout[19];\r
-      tsOut[2 + sb18] = rawout[2] + prvblk[ch][sb18 + 2];\r
-      prvblk[ch][sb18 + 2] = rawout[20];\r
-      tsOut[3 + sb18] = rawout[3] + prvblk[ch][sb18 + 3];\r
-      prvblk[ch][sb18 + 3] = rawout[21];\r
-      tsOut[4 + sb18] = rawout[4] + prvblk[ch][sb18 + 4];\r
-      prvblk[ch][sb18 + 4] = rawout[22];\r
-      tsOut[5 + sb18] = rawout[5] + prvblk[ch][sb18 + 5];\r
-      prvblk[ch][sb18 + 5] = rawout[23];\r
-      tsOut[6 + sb18] = rawout[6] + prvblk[ch][sb18 + 6];\r
-      prvblk[ch][sb18 + 6] = rawout[24];\r
-      tsOut[7 + sb18] = rawout[7] + prvblk[ch][sb18 + 7];\r
-      prvblk[ch][sb18 + 7] = rawout[25];\r
-      tsOut[8 + sb18] = rawout[8] + prvblk[ch][sb18 + 8];\r
-      prvblk[ch][sb18 + 8] = rawout[26];\r
-      tsOut[9 + sb18] = rawout[9] + prvblk[ch][sb18 + 9];\r
-      prvblk[ch][sb18 + 9] = rawout[27];\r
-      tsOut[10 + sb18] = rawout[10] + prvblk[ch][sb18 + 10];\r
-      prvblk[ch][sb18 + 10] = rawout[28];\r
-      tsOut[11 + sb18] = rawout[11] + prvblk[ch][sb18 + 11];\r
-      prvblk[ch][sb18 + 11] = rawout[29];\r
-      tsOut[12 + sb18] = rawout[12] + prvblk[ch][sb18 + 12];\r
-      prvblk[ch][sb18 + 12] = rawout[30];\r
-      tsOut[13 + sb18] = rawout[13] + prvblk[ch][sb18 + 13];\r
-      prvblk[ch][sb18 + 13] = rawout[31];\r
-      tsOut[14 + sb18] = rawout[14] + prvblk[ch][sb18 + 14];\r
-      prvblk[ch][sb18 + 14] = rawout[32];\r
-      tsOut[15 + sb18] = rawout[15] + prvblk[ch][sb18 + 15];\r
-      prvblk[ch][sb18 + 15] = rawout[33];\r
-      tsOut[16 + sb18] = rawout[16] + prvblk[ch][sb18 + 16];\r
-      prvblk[ch][sb18 + 16] = rawout[34];\r
-      tsOut[17 + sb18] = rawout[17] + prvblk[ch][sb18 + 17];\r
-      prvblk[ch][sb18 + 17] = rawout[35];\r
+      //prvblk = prevblck; //eliminated unnecessary areas\r
+\r
+      tsOut[0 + sb18] = rawout[0] + prevblk[ch][sb18 + 0];\r
+      prevblk[ch][sb18 + 0] = rawout[18];\r
+      tsOut[1 + sb18] = rawout[1] + prevblk[ch][sb18 + 1];\r
+      prevblk[ch][sb18 + 1] = rawout[19];\r
+      tsOut[2 + sb18] = rawout[2] + prevblk[ch][sb18 + 2];\r
+      prevblk[ch][sb18 + 2] = rawout[20];\r
+      tsOut[3 + sb18] = rawout[3] + prevblk[ch][sb18 + 3];\r
+      prevblk[ch][sb18 + 3] = rawout[21];\r
+      tsOut[4 + sb18] = rawout[4] + prevblk[ch][sb18 + 4];\r
+      prevblk[ch][sb18 + 4] = rawout[22];\r
+      tsOut[5 + sb18] = rawout[5] + prevblk[ch][sb18 + 5];\r
+      prevblk[ch][sb18 + 5] = rawout[23];\r
+      tsOut[6 + sb18] = rawout[6] + prevblk[ch][sb18 + 6];\r
+      prevblk[ch][sb18 + 6] = rawout[24];\r
+      tsOut[7 + sb18] = rawout[7] + prevblk[ch][sb18 + 7];\r
+      prevblk[ch][sb18 + 7] = rawout[25];\r
+      tsOut[8 + sb18] = rawout[8] + prevblk[ch][sb18 + 8];\r
+      prevblk[ch][sb18 + 8] = rawout[26];\r
+      tsOut[9 + sb18] = rawout[9] + prevblk[ch][sb18 + 9];\r
+      prevblk[ch][sb18 + 9] = rawout[27];\r
+      tsOut[10 + sb18] = rawout[10] + prevblk[ch][sb18 + 10];\r
+      prevblk[ch][sb18 + 10] = rawout[28];\r
+      tsOut[11 + sb18] = rawout[11] + prevblk[ch][sb18 + 11];\r
+      prevblk[ch][sb18 + 11] = rawout[29];\r
+      tsOut[12 + sb18] = rawout[12] + prevblk[ch][sb18 + 12];\r
+      prevblk[ch][sb18 + 12] = rawout[30];\r
+      tsOut[13 + sb18] = rawout[13] + prevblk[ch][sb18 + 13];\r
+      prevblk[ch][sb18 + 13] = rawout[31];\r
+      tsOut[14 + sb18] = rawout[14] + prevblk[ch][sb18 + 14];\r
+      prevblk[ch][sb18 + 14] = rawout[32];\r
+      tsOut[15 + sb18] = rawout[15] + prevblk[ch][sb18 + 15];\r
+      prevblk[ch][sb18 + 15] = rawout[33];\r
+      tsOut[16 + sb18] = rawout[16] + prevblk[ch][sb18 + 16];\r
+      prevblk[ch][sb18 + 16] = rawout[34];\r
+      tsOut[17 + sb18] = rawout[17] + prevblk[ch][sb18 + 17];\r
+      prevblk[ch][sb18 + 17] = rawout[35];\r
     }\r
   }\r
 \r
   /**\r
         *\r
         */\r
+  @LATTICE("THIS<SB,THIS<SS,SB<GLOBAL,SS<GLOBAL,SS*,SB*,THISLOC=THIS,GLOBALLOC=GLOBAL")\r
   private void do_downmix() {\r
-    for (int sb = 0; sb < SSLIMIT; sb++) {\r
-      for (int ss = 0; ss < SSLIMIT; ss += 3) {\r
+    for (@LOC("SB") int sb = 0; sb < SSLIMIT; sb++) {\r
+      for (@LOC("SS") int ss = 0; ss < SSLIMIT; ss += 3) {\r
         lr[0][sb][ss] = (lr[0][sb][ss] + lr[1][sb][ss]) * 0.5f;\r
         lr[0][sb][ss + 1] = (lr[0][sb][ss + 1] + lr[1][sb][ss + 1]) * 0.5f;\r
         lr[0][sb][ss + 2] = (lr[0][sb][ss + 2] + lr[1][sb][ss + 2]) * 0.5f;\r
@@ -1538,13 +1567,29 @@ final class LayerIIIDecoder implements FrameDecoder {
   /**\r
    * Fast INV_MDCT.\r
    */\r
-\r
-  public void inv_mdct(float[] in, float[] out, int block_type) {\r
-    float[] win_bt;\r
-    int i;\r
-\r
-    float tmpf_0, tmpf_1, tmpf_2, tmpf_3, tmpf_4, tmpf_5, tmpf_6, tmpf_7, tmpf_8, tmpf_9;\r
-    float tmpf_10, tmpf_11, tmpf_12, tmpf_13, tmpf_14, tmpf_15, tmpf_16, tmpf_17;\r
+@LATTICE("OUT<6I,OUT<TMPF,TMPF<EO,EO<TMP,TMP<SUM,TMP<IIP,IIP<I00,I00<SH,SUM<PP,PP<SH,SH<I,I<IN,TMPF*,SH*,I*,6I*,GLOBALLOC=IN")\r
+public void inv_mdct(@LOC("SH") float[] in, @LOC("OUT") float[] out, @LOC("IN") int block_type) {\r
+    //float[] win_bt;\r
+    @LOC("I") int i;\r
+\r
+    @LOC("TMPF") float tmpf_0;\r
+    @LOC("TMPF") float tmpf_1;\r
+    @LOC("TMPF") float tmpf_2;\r
+    @LOC("TMPF") float tmpf_3;\r
+    @LOC("TMPF") float tmpf_4;\r
+    @LOC("TMPF") float tmpf_5;\r
+    @LOC("TMPF") float tmpf_6;\r
+    @LOC("TMPF") float tmpf_7;\r
+    @LOC("TMPF") float tmpf_8;\r
+    @LOC("TMPF") float tmpf_9;\r
+    @LOC("TMPF") float tmpf_10;\r
+    @LOC("TMPF") float tmpf_11;\r
+    @LOC("TMPF") float tmpf_12;\r
+    @LOC("TMPF") float tmpf_13;\r
+    @LOC("TMPF") float tmpf_14;\r
+    @LOC("TMPF") float tmpf_15;\r
+    @LOC("TMPF") float tmpf_16;\r
+    @LOC("TMPF") float tmpf_17;\r
 \r
     tmpf_0 =\r
         tmpf_1 =\r
@@ -1609,7 +1654,7 @@ final class LayerIIIDecoder implements FrameDecoder {
       out[34] = 0.0f;\r
       out[35] = 0.0f;\r
 \r
-      int six_i = 0;\r
+      @LOC("6I") int six_i = 0;\r
 \r
       for (i = 0; i < 3; i++) {\r
         // 12 point IMDCT\r
@@ -1626,7 +1671,9 @@ final class LayerIIIDecoder implements FrameDecoder {
         in[9 + i] += in[3 + i];\r
 \r
         // 3 point IDCT on even indices\r
-        float pp1, pp2, sum;\r
+        @LOC("PP") float pp1;\r
+       @LOC("PP") float pp2;\r
+        @LOC("SUM") float sum;\r
         pp2 = in[12 + i] * 0.500000000f;\r
         pp1 = in[6 + i] * 0.866025403f;\r
         sum = in[0 + i] + pp2;\r
@@ -1650,7 +1697,7 @@ final class LayerIIIDecoder implements FrameDecoder {
         tmpf_5 *= 0.517638090f;\r
 \r
         // Output butterflies on 2 3 point IDCT's (for 6 point IDCT)\r
-        float save = tmpf_0;\r
+        @LOC("SH") float save = tmpf_0;\r
         tmpf_0 += tmpf_5;\r
         tmpf_5 = save - tmpf_5;\r
         save = tmpf_1;\r
@@ -1737,8 +1784,24 @@ final class LayerIIIDecoder implements FrameDecoder {
       in[5] += in[3];\r
       in[3] += in[1];\r
 \r
-      float tmp0, tmp1, tmp2, tmp3, tmp4, tmp0_, tmp1_, tmp2_, tmp3_;\r
-      float tmp0o, tmp1o, tmp2o, tmp3o, tmp4o, tmp0_o, tmp1_o, tmp2_o, tmp3_o;\r
+      @LOC("TMP") float tmp0;\r
+      @LOC("TMP") float tmp1;\r
+      @LOC("TMP") float tmp2;\r
+      @LOC("TMP") float tmp3;\r
+      @LOC("TMP") float tmp4;\r
+      @LOC("TMP") float tmp0_;\r
+      @LOC("TMP") float tmp1_;\r
+      @LOC("TMP") float tmp2_;\r
+      @LOC("TMP") float tmp3_;\r
+      @LOC("TMP") float tmp0o;\r
+      @LOC("TMP") float tmp1o;\r
+      @LOC("TMP") float tmp2o;\r
+      @LOC("TMP") float tmp3o;\r
+      @LOC("TMP") float tmp4o;\r
+      @LOC("TMP") float tmp0_o;\r
+      @LOC("TMP") float tmp1_o;\r
+      @LOC("TMP") float tmp2_o;\r
+      @LOC("TMP") float tmp3_o;\r
 \r
       // Fast 9 Point Inverse Discrete Cosine Transform\r
       //\r
@@ -1755,8 +1818,8 @@ final class LayerIIIDecoder implements FrameDecoder {
       // 9 point IDCT on even indices\r
 \r
       // 5 points on odd indices (not realy an IDCT)\r
-      float i00 = in[0] + in[0];\r
-      float iip12 = i00 + in[12];\r
+      @LOC("I00") float i00 = in[0] + in[0];\r
+      @LOC("IIP") float iip12 = i00 + in[12];\r
 \r
       tmp0 =\r
           iip12 + in[4] * 1.8793852415718f + in[8] * 1.532088886238f + in[16] * 0.34729635533386f;\r
@@ -1768,7 +1831,7 @@ final class LayerIIIDecoder implements FrameDecoder {
       tmp4 = in[0] - in[4] + in[8] - in[12] + in[16];\r
 \r
       // 4 points on even indices\r
-      float i66_ = in[6] * 1.732050808f; // Sqrt[3]\r
+      @LOC("I00") float i66_ = in[6] * 1.732050808f; // Sqrt[3]\r
 \r
       tmp0_ =\r
           in[2] * 1.9696155060244f + i66_ + in[10] * 1.2855752193731f + in[14] * 0.68404028665134f;\r
@@ -1780,8 +1843,8 @@ final class LayerIIIDecoder implements FrameDecoder {
 \r
       // 9 point IDCT on odd indices\r
       // 5 points on odd indices (not realy an IDCT)\r
-      float i0 = in[0 + 1] + in[0 + 1];\r
-      float i0p12 = i0 + in[12 + 1];\r
+      @LOC("I00") float i0 = in[0 + 1] + in[0 + 1];\r
+      @LOC("IIP") float i0p12 = i0 + in[12 + 1];\r
 \r
       tmp0o =\r
           i0p12 + in[4 + 1] * 1.8793852415718f + in[8 + 1] * 1.532088886238f + in[16 + 1]\r
@@ -1796,7 +1859,7 @@ final class LayerIIIDecoder implements FrameDecoder {
       tmp4o = (in[0 + 1] - in[4 + 1] + in[8 + 1] - in[12 + 1] + in[16 + 1]) * 0.707106781f; // Twiddled\r
 \r
       // 4 points on even indices\r
-      float i6_ = in[6 + 1] * 1.732050808f; // Sqrt[3]\r
+      @LOC("I00") float i6_ = in[6 + 1] * 1.732050808f; // Sqrt[3]\r
 \r
       tmp0_o =\r
           in[2 + 1] * 1.9696155060244f + i6_ + in[10 + 1] * 1.2855752193731f + in[14 + 1]\r
@@ -1815,7 +1878,8 @@ final class LayerIIIDecoder implements FrameDecoder {
       // and\r
       // twiddle factors for 36 point IDCT\r
 \r
-      float e, o;\r
+      @LOC("EO") float e;\r
+      @LOC("EO") float o;\r
       e = tmp0 + tmp0_;\r
       o = (tmp0o + tmp0_o) * 0.501909918f;\r
       tmpf_0 = e + o;\r
@@ -1853,50 +1917,50 @@ final class LayerIIIDecoder implements FrameDecoder {
 \r
       // end 36 point IDCT */\r
       // shift to modified IDCT\r
-      win_bt = win[block_type];\r
-\r
-      out[0] = -tmpf_9 * win_bt[0];\r
-      out[1] = -tmpf_10 * win_bt[1];\r
-      out[2] = -tmpf_11 * win_bt[2];\r
-      out[3] = -tmpf_12 * win_bt[3];\r
-      out[4] = -tmpf_13 * win_bt[4];\r
-      out[5] = -tmpf_14 * win_bt[5];\r
-      out[6] = -tmpf_15 * win_bt[6];\r
-      out[7] = -tmpf_16 * win_bt[7];\r
-      out[8] = -tmpf_17 * win_bt[8];\r
-      out[9] = tmpf_17 * win_bt[9];\r
-      out[10] = tmpf_16 * win_bt[10];\r
-      out[11] = tmpf_15 * win_bt[11];\r
-      out[12] = tmpf_14 * win_bt[12];\r
-      out[13] = tmpf_13 * win_bt[13];\r
-      out[14] = tmpf_12 * win_bt[14];\r
-      out[15] = tmpf_11 * win_bt[15];\r
-      out[16] = tmpf_10 * win_bt[16];\r
-      out[17] = tmpf_9 * win_bt[17];\r
-      out[18] = tmpf_8 * win_bt[18];\r
-      out[19] = tmpf_7 * win_bt[19];\r
-      out[20] = tmpf_6 * win_bt[20];\r
-      out[21] = tmpf_5 * win_bt[21];\r
-      out[22] = tmpf_4 * win_bt[22];\r
-      out[23] = tmpf_3 * win_bt[23];\r
-      out[24] = tmpf_2 * win_bt[24];\r
-      out[25] = tmpf_1 * win_bt[25];\r
-      out[26] = tmpf_0 * win_bt[26];\r
-      out[27] = tmpf_0 * win_bt[27];\r
-      out[28] = tmpf_1 * win_bt[28];\r
-      out[29] = tmpf_2 * win_bt[29];\r
-      out[30] = tmpf_3 * win_bt[30];\r
-      out[31] = tmpf_4 * win_bt[31];\r
-      out[32] = tmpf_5 * win_bt[32];\r
-      out[33] = tmpf_6 * win_bt[33];\r
-      out[34] = tmpf_7 * win_bt[34];\r
-      out[35] = tmpf_8 * win_bt[35];\r
+      //win_bt = win[block_type]; //substituted this so that a new area does not become created\r
+\r
+      out[0] = -tmpf_9 * win[block_type][0];\r
+      out[1] = -tmpf_10 * win[block_type][1];\r
+      out[2] = -tmpf_11 * win[block_type][2];\r
+      out[3] = -tmpf_12 * win[block_type][3];\r
+      out[4] = -tmpf_13 * win[block_type][4];\r
+      out[5] = -tmpf_14 * win[block_type][5];\r
+      out[6] = -tmpf_15 * win[block_type][6];\r
+      out[7] = -tmpf_16 * win[block_type][7];\r
+      out[8] = -tmpf_17 * win[block_type][8];\r
+      out[9] = tmpf_17 * win[block_type][9];\r
+      out[10] = tmpf_16 * win[block_type][10];\r
+      out[11] = tmpf_15 * win[block_type][11];\r
+      out[12] = tmpf_14 * win[block_type][12];\r
+      out[13] = tmpf_13 * win[block_type][13];\r
+      out[14] = tmpf_12 * win[block_type][14];\r
+      out[15] = tmpf_11 * win[block_type][15];\r
+      out[16] = tmpf_10 * win[block_type][16];\r
+      out[17] = tmpf_9 * win[block_type][17];\r
+      out[18] = tmpf_8 * win[block_type][18];\r
+      out[19] = tmpf_7 * win[block_type][19];\r
+      out[20] = tmpf_6 * win[block_type][20];\r
+      out[21] = tmpf_5 * win[block_type][21];\r
+      out[22] = tmpf_4 * win[block_type][22];\r
+      out[23] = tmpf_3 * win[block_type][23];\r
+      out[24] = tmpf_2 * win[block_type][24];\r
+      out[25] = tmpf_1 * win[block_type][25];\r
+      out[26] = tmpf_0 * win[block_type][26];\r
+      out[27] = tmpf_0 * win[block_type][27];\r
+      out[28] = tmpf_1 * win[block_type][28];\r
+      out[29] = tmpf_2 * win[block_type][29];\r
+      out[30] = tmpf_3 * win[block_type][30];\r
+      out[31] = tmpf_4 * win[block_type][31];\r
+      out[32] = tmpf_5 * win[block_type][32];\r
+      out[33] = tmpf_6 * win[block_type][33];\r
+      out[34] = tmpf_7 * win[block_type][34];\r
+      out[35] = tmpf_8 * win[block_type][35];\r
     }\r
   }\r
 \r
-  private int counter = 0;\r
-  private static final int SSLIMIT = 18;\r
-  private static final int SBLIMIT = 32;\r
+  @LOC("C") private int counter = 0;\r
+  @LOC("F") private static final int SSLIMIT = 18;\r
+  @LOC("F") private static final int SBLIMIT = 32;\r
 \r
   // Size of the table of whole numbers raised to 4/3 power.\r
   // This may be adjusted for performance without any problems.\r
@@ -2002,15 +2066,15 @@ final class LayerIIIDecoder implements FrameDecoder {
   // }\r
   // }\r
 \r
-  private static final int slen[][] = { { 0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4 },\r
+  @LOC("F") private static final int slen[][] = { { 0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4 },\r
       { 0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3 } };\r
 \r
-  public static final int pretab[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 3,\r
+  @LOC("F") public static final int pretab[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 3,\r
       2, 0 };\r
 \r
-  private SBI[] sfBandIndex; // Init in the constructor.\r
+  @LOC("F") private SBI[] sfBandIndex; // Init in the constructor.\r
 \r
-  public static final float two_to_negative_half_pow[] = { 1.0000000000E+00f, 7.0710678119E-01f,\r
+  @LOC("F") public static final float two_to_negative_half_pow[] = { 1.0000000000E+00f, 7.0710678119E-01f,\r
       5.0000000000E-01f, 3.5355339059E-01f, 2.5000000000E-01f, 1.7677669530E-01f,\r
       1.2500000000E-01f, 8.8388347648E-02f, 6.2500000000E-02f, 4.4194173824E-02f,\r
       3.1250000000E-02f, 2.2097086912E-02f, 1.5625000000E-02f, 1.1048543456E-02f,\r
@@ -2028,19 +2092,20 @@ final class LayerIIIDecoder implements FrameDecoder {
       1.8626451492E-09f, 1.3170890160E-09f, 9.3132257462E-10f, 6.5854450798E-10f,\r
       4.6566128731E-10f, 3.2927225399E-10f };\r
 \r
-  public static final float t_43[] = create_t_43();\r
+  @LOC("F") public static final float t_43[] = create_t_43();\r
 \r
+  @RETURNLOC("OUT")\r
   static private float[] create_t_43() {\r
-    float[] t43 = new float[8192];\r
+      @LOC("OUT") float[] t43 = new float[8192];\r
     final double d43 = (4.0 / 3.0);\r
 \r
-    for (int i = 0; i < 8192; i++) {\r
+    for (@LOC("SH") int i = 0; i < 8192; i++) {\r
       t43[i] = (float) Math.pow(i, d43);\r
     }\r
     return t43;\r
   }\r
 \r
-  public static final float io[][] = {\r
+  @LOC("F") public static final float io[][] = {\r
       { 1.0000000000E+00f, 8.4089641526E-01f, 7.0710678119E-01f, 5.9460355751E-01f,\r
           5.0000000001E-01f, 4.2044820763E-01f, 3.5355339060E-01f, 2.9730177876E-01f,\r
           2.5000000001E-01f, 2.1022410382E-01f, 1.7677669530E-01f, 1.4865088938E-01f,\r
@@ -2058,7 +2123,7 @@ final class LayerIIIDecoder implements FrameDecoder {
           2.4414062501E-04f, 1.7263349151E-04f, 1.2207031251E-04f, 8.6316745755E-05f,\r
           6.1035156254E-05f, 4.3158372878E-05f, 3.0517578127E-05f, 2.1579186439E-05f } };\r
 \r
-  public static final float TAN12[] = { 0.0f, 0.26794919f, 0.57735027f, 1.0f, 1.73205081f,\r
+   @LOC("F") public static final float TAN12[] = { 0.0f, 0.26794919f, 0.57735027f, 1.0f, 1.73205081f,\r
       3.73205081f, 9.9999999e10f, -3.73205081f, -1.73205081f, -1.0f, -0.57735027f, -0.26794919f,\r
       0.0f, 0.26794919f, 0.57735027f, 1.0f };\r
 \r
@@ -2125,7 +2190,7 @@ final class LayerIIIDecoder implements FrameDecoder {
    * 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,\r
    * 12, 13, 14, 15, 16, 17 };\r
    */\r
-  private static/* final */int reorder_table[][]/* = loadReorderTable() */; // SZD:\r
+  @LOC("F") private static/* final */int reorder_table[][]/* = loadReorderTable() */; // SZD:\r
                                                                             // will\r
                                                                             // be\r
                                                                             // generated\r
@@ -2142,10 +2207,10 @@ final class LayerIIIDecoder implements FrameDecoder {
    * return (int[][])o; } catch (IOException ex) { throw new\r
    * ExceptionInInitializerError(ex); } }\r
    */\r
-\r
-  static int[] reorder(int scalefac_band[]) { // SZD: converted from LAME\r
-    int j = 0;\r
-    int ix[] = new int[576];\r
+  @LATTICE("OUT<J,J<I,I<SE,I<WIN,SE<SF,SE<SFB,WIN<SFB,J*,I*,WIN*,SFB*")\r
+  static int[] reorder(@LOC("SF") int scalefac_band[]) { // SZD: converted from LAME\r
+    @LOC("J") int j = 0;\r
+    @LOC("OUT") int ix[] = new int[576];\r
     for (int sfb = 0; sfb < 13; sfb++) {\r
       int start = scalefac_band[sfb];\r
       int end = scalefac_band[sfb + 1];\r
@@ -2370,10 +2435,10 @@ final class LayerIIIDecoder implements FrameDecoder {
    * 570,547,559,571,548,560,572,549,561,573,550,562,574,551,563,575} };\r
    */\r
 \r
-  private static final float cs[] = { 0.857492925712f, 0.881741997318f, 0.949628649103f,\r
+  @LOC("F") private static final float cs[] = { 0.857492925712f, 0.881741997318f, 0.949628649103f,\r
       0.983314592492f, 0.995517816065f, 0.999160558175f, 0.999899195243f, 0.999993155067f };\r
 \r
-  private static final float ca[] = { -0.5144957554270f, -0.4717319685650f, -0.3133774542040f,\r
+  @LOC("F") private static final float ca[] = { -0.5144957554270f, -0.4717319685650f, -0.3133774542040f,\r
       -0.1819131996110f, -0.0945741925262f, -0.0409655828852f, -0.0141985685725f,\r
       -0.00369997467375f };\r
 \r
@@ -2392,7 +2457,7 @@ final class LayerIIIDecoder implements FrameDecoder {
   /***************************************************************/\r
   /* INV_MDCT */\r
   /***************************************************************/\r
-  public static final float win[][] = {\r
+  @LOC("F") public static final float win[][] = {\r
       { -1.6141214951E-02f, -5.3603178919E-02f, -1.0070713296E-01f, -1.6280817573E-01f,\r
           -4.9999999679E-01f, -3.8388735032E-01f, -6.2061144372E-01f, -1.1659756083E+00f,\r
           -3.8720752656E+00f, -4.2256286556E+00f, -1.5195289984E+00f, -9.7416483388E-01f,\r
@@ -2452,9 +2517,9 @@ final class LayerIIIDecoder implements FrameDecoder {
     }\r
   }\r
 \r
-  public Sftable sftable;\r
+  @LOC("F") public Sftable sftable;\r
 \r
-  public static final int nr_of_sfb_block[][][] = {\r
+  @LOC("F") public static final int nr_of_sfb_block[][][] = {\r
       { { 6, 5, 5, 5 }, { 9, 9, 9, 9 }, { 6, 9, 9, 9 } },\r
       { { 6, 5, 7, 3 }, { 9, 9, 12, 6 }, { 6, 9, 12, 6 } },\r
       { { 11, 10, 0, 0 }, { 18, 18, 0, 0 }, { 15, 18, 0, 0 } },\r
index d05900d06dd811604f9e088eeab5ab07e9255045..339f3ac9a775c9e169fdba49eadcfb82fdf2223e 100644 (file)
 /**
  * Base Class for audio output.
  */
-@METHODDEFAULT("D<IN,D<C")
+@LATTICE("B<T")
+@METHODDEFAULT("D<IN,D<C,C*")
 public abstract class Obuffer
 {
-  public static final int     OBUFFERSIZE = 2 * 1152;  // max. 2 * 1152 samples per frame
-  public static final int   MAXCHANNELS = 2;        // max. number of channels
+  @LOC("T") public static final int     OBUFFERSIZE = 2 * 1152;  // max. 2 * 1152 samples per frame
+  @LOC("T") public static final int   MAXCHANNELS = 2;        // max. number of channels
 
   /**
    * Takes a 16 Bit PCM sample.
@@ -63,6 +64,7 @@ public abstract class Obuffer
   /**
    * Clip Sample to 16 Bits
    */
+  @RETURNLOC("IN")
   private final short clip(@LOC("IN") float sample)
   {
     return ((sample > 32767.0f) ? 32767 :
index 914588596148597c412436553b766ab5afadcf1e..edf00278af07bd6b00f337c1495bb3398130c752 100644 (file)
  * @author     Mat McGowan 12/12/99 \r
  * @since      0.0.7\r
  */\r
+@LATTICE("B<T")\r
+@METHODDEFAULT("OUT<IN")\r
 public class OutputChannels\r
 {              \r
        /**\r
         * Flag to indicate output should include both channels. \r
         */\r
-       public static final int BOTH_CHANNELS = 0;\r
+        @LOC("T") public static final int      BOTH_CHANNELS = 0;\r
                \r
        /**\r
         * Flag to indicate output should include the left channel only. \r
         */\r
-       public static final int LEFT_CHANNEL = 1;\r
+        @LOC("T") public static final int      LEFT_CHANNEL = 1;\r
 \r
        /**\r
         * Flag to indicate output should include the right channel only. \r
         */\r
-       public static final int RIGHT_CHANNEL = 2;\r
+        @LOC("T") public static final int      RIGHT_CHANNEL = 2;\r
                \r
        /**\r
         * Flag to indicate output is mono. \r
         */\r
-       public static final int DOWNMIX_CHANNELS = 3;\r
+        @LOC("T") public static final int      DOWNMIX_CHANNELS = 3;\r
 \r
        \r
-       public static final OutputChannels LEFT = new OutputChannels(LEFT_CHANNEL);\r
-       public static final OutputChannels RIGHT = new OutputChannels(RIGHT_CHANNEL);\r
-       public static final OutputChannels BOTH = new OutputChannels(BOTH_CHANNELS);\r
-       public static final OutputChannels DOWNMIX = new OutputChannels(DOWNMIX_CHANNELS);\r
+        @LOC("B") public static final OutputChannels LEFT = new OutputChannels(LEFT_CHANNEL);\r
+        @LOC("B") public static final OutputChannels RIGHT = new OutputChannels(RIGHT_CHANNEL);\r
+        @LOC("B") public static final OutputChannels BOTH = new OutputChannels(BOTH_CHANNELS);\r
+        @LOC("B") public static final OutputChannels DOWNMIX = new OutputChannels(DOWNMIX_CHANNELS);\r
                                \r
        \r
-       private /*final*/ int   outputChannels;\r
+        @LOC("T") private /*final*/ int        outputChannels;\r
                        \r
        /**\r
         * Creates an <code>OutputChannels</code> instance\r
@@ -85,8 +87,8 @@ public class OutputChannels
                        throw new IllegalArgumentException("Invalid channel code: "+code);\r
                }\r
        }\r
-               \r
-       private OutputChannels(int channels)\r
+       \r
+        private OutputChannels(@LOC("IN") int channels)\r
        {\r
                outputChannels = channels;\r
                        \r
index 406876e29d014782df961ed279abef4304855e25..b4048110abcf6530a85506b18686c9ab9b4597df 100644 (file)
@@ -110,7 +110,7 @@ public class Player
        {\r
                boolean ret = true;\r
                \r
-               \r
+           SSJAVA:\r
                while (frames-- > 0 && ret)\r
                {\r
                        ret = decodeFrame();                    \r
index a1e20aa1780a27ad27bbb38bc778880edef8c5b5..913b8b02bcdc1e6535199029645d042c56a8324e 100644 (file)
  * The <code>SampleBuffer</code> class implements an output buffer
  * that provides storage for a fixed size block of samples. 
  */
-@LATTICE("BUF<BUFP,BUFP<CONT,BUFP*")
+@LATTICE("BUF<BUFP,BUFP<IDX,IDX<CONT,BUFP*,IDX*")
 @METHODDEFAULT("D<IN,D<C,C*,THISLOC=D")
 public class SampleBuffer extends Obuffer
 {
   @LOC("BUF") private short[]           buffer;
-  @LOC("BUFP") private int[]       bufferp;
+  @LOC("BUFP") private int[]            bufferp;
   @LOC("CONT") private int              channels;
   @LOC("CONT") private int              frequency;
+  @LOC("IDX") private int               idx;
 
   /**
    * Constructor
@@ -94,7 +95,7 @@ public class SampleBuffer extends Obuffer
   public void appendSamples(@LOC("IN") int channel, @LOC("IN") float[] f)
   {
     @LOC("D, SampleBuffer.BUFP") int pos = bufferp[channel]; 
-    // LOC(bufferp[channel])=[D,SampleBuffer.BUF]
+    // LOC(bufferp[channel])=[D,SampleBuffer.BUFP]
     // LOC(pos)=[D,SampleBuffer.BUFP]
 
     @LOC("D,SampleBuffer.BUFP") short s;    
@@ -153,10 +154,11 @@ public class SampleBuffer extends Obuffer
   /**
    *
    */
+
   public void clear_buffer()
   {
-    for (int i = 0; i < channels; ++i
-      bufferp[i] = (short)i;
+    for (idx = 0; idx < channels; ++idx
+      bufferp[idx] = (short)idx;
   }
 
   /**
index 61d06aeb8e0953e034d2a0846e1c1f8fac97350f..2fd98ff68541a9bb9a9930bf375f9a71090a7098 100644 (file)
  *----------------------------------------------------------------------\r
  */\r
 \r
-import java.io.IOException;\r
+//import java.io.IOException; //Compiler does not support imports\r
 \r
 /**\r
  * A class for the synthesis filter bank.\r
  * This class does a fast downsampling from 32, 44.1 or 48 kHz to 8 kHz, if ULAW is defined.\r
  * Frequencies above 4 kHz are removed by ignoring higher subbands.\r
  */\r
+@LATTICE("TMP<PCM,PCM<AV,AV<V2,V2<V1,V1<L1,L1<L2,L2<L3,L3<L4,L4<LSH,LSH<S,S<SA,SA<EQ,EQ<SH,SH*,LSH*,V1*")\r
+@METHODDEFAULT("OUT<V,V<SH,SH<IN,IN<GLOBAL,SH*,THISLOC=IN,GLOBALLOC=GLOBAL")\r
 final class SynthesisFilter\r
 {\r
-  private float[]                       v1;\r
-  private float[]                       v2;\r
-  private float[]                       actual_v;                      // v1 or v2\r
-  private int                           actual_write_pos;      // 0-15\r
-  private float[]                       samples;                       // 32 new subband samples\r
-  private int                           channel;\r
-  private float                         scalefactor;\r
-  private float[]                       eq;\r
+  @LOC("V1") private float[]                    v1;\r
+  @LOC("V2") private float[]                    v2;\r
+  @LOC("AV") private float[]                    actual_v;                      // v1 or v2\r
+  @LOC("SH") private int                        actual_write_pos;      // 0-15\r
+  @LOC("SA") private float[]                    samples;                       // 32 new subband samples\r
+  @LOC("V2") private int                                channel;\r
+  @LOC("V2") private float                      scalefactor;\r
+  @LOC("EQ") private float[]                    eq;\r
        \r
        /**\r
         * Quality value for controlling CPU usage/quality tradeoff. \r
@@ -152,7 +154,7 @@ final class SynthesisFilter
   /**\r
    * Inject Sample.\r
    */\r
-  public void input_sample(float sample, int subbandnumber)\r
+    public void input_sample(@LOC("V") float sample, @LOC("V") int subbandnumber)\r
   {                              \r
          samples[subbandnumber] = eq[subbandnumber]*sample;\r
   }\r
@@ -188,10 +190,38 @@ final class SynthesisFilter
         }\r
          */\r
          \r
-       float new_v0, new_v1, new_v2, new_v3, new_v4, new_v5, new_v6, new_v7, new_v8, new_v9;\r
-       float new_v10, new_v11, new_v12, new_v13, new_v14, new_v15, new_v16, new_v17, new_v18, new_v19;\r
-       float new_v20, new_v21, new_v22, new_v23, new_v24, new_v25, new_v26, new_v27, new_v28, new_v29;\r
-       float new_v30, new_v31;\r
+      @LOC("IN,SynthesisFilter.L4") float new_v0;\r
+      @LOC("IN,SynthesisFilter.L2") float new_v1;\r
+      @LOC("IN,SynthesisFilter.L4") float new_v2;\r
+      @LOC("IN,SynthesisFilter.L2") float new_v3;\r
+      @LOC("IN,SynthesisFilter.L3") float new_v4;\r
+      @LOC("IN,SynthesisFilter.L4") float new_v5;\r
+      @LOC("IN,SynthesisFilter.L2") float new_v6;\r
+      @LOC("IN,SynthesisFilter.L3") float new_v7;\r
+      @LOC("IN,SynthesisFilter.L4") float new_v8;\r
+      @LOC("IN,SynthesisFilter.L4") float new_v9;\r
+      @LOC("IN,SynthesisFilter.L3") float new_v10;\r
+      @LOC("IN,SynthesisFilter.L2") float new_v11;\r
+      @LOC("IN,SynthesisFilter.L4") float new_v12;\r
+      @LOC("IN,SynthesisFilter.L3") float new_v13;\r
+      @LOC("IN,SynthesisFilter.L4") float new_v14;\r
+      @LOC("IN,SynthesisFilter.L4") float new_v15;\r
+      @LOC("IN,SynthesisFilter.L1") float new_v16;\r
+      @LOC("IN,SynthesisFilter.L3") float new_v17;\r
+      @LOC("IN,SynthesisFilter.L1") float new_v18;\r
+      @LOC("IN,SynthesisFilter.L2") float new_v19;\r
+      @LOC("IN,SynthesisFilter.L2") float new_v20;\r
+      @LOC("IN,SynthesisFilter.L2") float new_v21;\r
+      @LOC("IN,SynthesisFilter.L2") float new_v22;\r
+      @LOC("IN,SynthesisFilter.L3") float new_v23;\r
+      @LOC("IN,SynthesisFilter.L2") float new_v24;\r
+      @LOC("IN,SynthesisFilter.L2") float new_v25;\r
+      @LOC("IN,SynthesisFilter.L2") float new_v26;\r
+      @LOC("IN,SynthesisFilter.L4") float new_v27;\r
+      @LOC("IN,SynthesisFilter.L2") float new_v28;\r
+      @LOC("IN,SynthesisFilter.L4") float new_v29;\r
+      @LOC("IN,SynthesisFilter.L2") float new_v30;\r
+      @LOC("IN,SynthesisFilter.L4") float new_v31;\r
          \r
        new_v0 = new_v1 = new_v2 = new_v3 = new_v4 = new_v5 = new_v6 = new_v7 = new_v8 = new_v9 = \r
        new_v10 = new_v11 = new_v12 = new_v13 = new_v14 = new_v15 = new_v16 = new_v17 = new_v18 = new_v19 = \r
@@ -203,74 +233,74 @@ final class SynthesisFilter
 //     float[] p = new float[16];\r
 //     float[] pp = new float[16];\r
 \r
-    float[] s = samples;\r
-       \r
-       float s0 = s[0];\r
-       float s1 = s[1];\r
-       float s2 = s[2];\r
-       float s3 = s[3];\r
-       float s4 = s[4];\r
-       float s5 = s[5];\r
-       float s6 = s[6];\r
-       float s7 = s[7];\r
-       float s8 = s[8];\r
-       float s9 = s[9];\r
-       float s10 = s[10];      \r
-       float s11 = s[11];\r
-       float s12 = s[12];\r
-       float s13 = s[13];\r
-       float s14 = s[14];\r
-       float s15 = s[15];\r
-       float s16 = s[16];\r
-       float s17 = s[17];\r
-       float s18 = s[18];\r
-       float s19 = s[19];\r
-       float s20 = s[20];      \r
-       float s21 = s[21];\r
-       float s22 = s[22];\r
-       float s23 = s[23];\r
-       float s24 = s[24];\r
-       float s25 = s[25];\r
-       float s26 = s[26];\r
-       float s27 = s[27];\r
-       float s28 = s[28];\r
-       float s29 = s[29];\r
-       float s30 = s[30];      \r
-       float s31 = s[31];\r
+       //float[] s = samples; // subbed in samples directly below to reduce uneccesary areas\r
+       \r
+       @LOC("IN,SynthesisFilter.S") float s0 = samples[0];\r
+       @LOC("IN,SynthesisFilter.S") float s1 = samples[1];\r
+       @LOC("IN,SynthesisFilter.S") float s2 = samples[2];\r
+       @LOC("IN,SynthesisFilter.S") float s3 = samples[3];\r
+       @LOC("IN,SynthesisFilter.S") float s4 = samples[4];\r
+       @LOC("IN,SynthesisFilter.S") float s5 = samples[5];\r
+       @LOC("IN,SynthesisFilter.S") float s6 = samples[6];\r
+       @LOC("IN,SynthesisFilter.S") float s7 = samples[7];\r
+       @LOC("IN,SynthesisFilter.S") float s8 = samples[8];\r
+       @LOC("IN,SynthesisFilter.S") float s9 = samples[9];\r
+       @LOC("IN,SynthesisFilter.S") float s10 = samples[10];   \r
+       @LOC("IN,SynthesisFilter.S") float s11 = samples[11];\r
+       @LOC("IN,SynthesisFilter.S") float s12 = samples[12];\r
+       @LOC("IN,SynthesisFilter.S") float s13 = samples[13];\r
+       @LOC("IN,SynthesisFilter.S") float s14 = samples[14];\r
+       @LOC("IN,SynthesisFilter.S") float s15 = samples[15];\r
+       @LOC("IN,SynthesisFilter.S") float s16 = samples[16];\r
+       @LOC("IN,SynthesisFilter.S") float s17 = samples[17];\r
+       @LOC("IN,SynthesisFilter.S") float s18 = samples[18];\r
+       @LOC("IN,SynthesisFilter.S") float s19 = samples[19];\r
+       @LOC("IN,SynthesisFilter.S") float s20 = samples[20];   \r
+       @LOC("IN,SynthesisFilter.S") float s21 = samples[21];\r
+       @LOC("IN,SynthesisFilter.S") float s22 = samples[22];\r
+       @LOC("IN,SynthesisFilter.S") float s23 = samples[23];\r
+       @LOC("IN,SynthesisFilter.S") float s24 = samples[24];\r
+       @LOC("IN,SynthesisFilter.S") float s25 = samples[25];\r
+       @LOC("IN,SynthesisFilter.S") float s26 = samples[26];\r
+       @LOC("IN,SynthesisFilter.S") float s27 = samples[27];\r
+       @LOC("IN,SynthesisFilter.S") float s28 = samples[28];\r
+       @LOC("IN,SynthesisFilter.S") float s29 = samples[29];\r
+       @LOC("IN,SynthesisFilter.S") float s30 = samples[30];   \r
+       @LOC("IN,SynthesisFilter.S") float s31 = samples[31];\r
                \r
-       float p0 = s0 + s31;\r
-       float p1 = s1 + s30;\r
-       float p2 = s2 + s29;\r
-       float p3 = s3 + s28;\r
-       float p4 = s4 + s27;\r
-       float p5 = s5 + s26;\r
-       float p6 = s6 + s25;\r
-       float p7 = s7 + s24;\r
-       float p8 = s8 + s23;\r
-       float p9 = s9 + s22;\r
-       float p10 = s10 + s21;\r
-       float p11 = s11 + s20;\r
-       float p12 = s12 + s19;\r
-       float p13 = s13 + s18;\r
-       float p14 = s14 + s17;\r
-       float p15 = s15 + s16;\r
-       \r
-       float pp0 = p0 + p15;\r
-       float pp1 = p1 + p14;\r
-       float pp2 = p2 + p13;\r
-       float pp3 = p3 + p12;\r
-       float pp4 = p4 + p11;\r
-       float pp5 = p5 + p10;\r
-       float pp6 = p6 + p9;\r
-       float pp7 = p7 + p8;\r
-       float pp8 = (p0 - p15) * cos1_32;\r
-       float pp9 = (p1 - p14) * cos3_32;\r
-       float pp10 = (p2 - p13) * cos5_32;\r
-       float pp11 = (p3 - p12) * cos7_32;\r
-       float pp12 = (p4 - p11) * cos9_32;\r
-       float pp13 = (p5 - p10) * cos11_32;\r
-       float pp14 = (p6 - p9) * cos13_32;\r
-       float pp15 = (p7 - p8) * cos15_32;\r
+       @LOC("IN,SynthesisFilter.LSH") float p0 = s0 + s31;\r
+       @LOC("IN,SynthesisFilter.LSH") float p1 = s1 + s30;\r
+       @LOC("IN,SynthesisFilter.LSH") float p2 = s2 + s29;\r
+       @LOC("IN,SynthesisFilter.LSH") float p3 = s3 + s28;\r
+       @LOC("IN,SynthesisFilter.LSH") float p4 = s4 + s27;\r
+       @LOC("IN,SynthesisFilter.LSH") float p5 = s5 + s26;\r
+       @LOC("IN,SynthesisFilter.LSH") float p6 = s6 + s25;\r
+       @LOC("IN,SynthesisFilter.LSH") float p7 = s7 + s24;\r
+       @LOC("IN,SynthesisFilter.LSH") float p8 = s8 + s23;\r
+       @LOC("IN,SynthesisFilter.LSH") float p9 = s9 + s22;\r
+       @LOC("IN,SynthesisFilter.LSH") float p10 = s10 + s21;\r
+       @LOC("IN,SynthesisFilter.LSH") float p11 = s11 + s20;\r
+       @LOC("IN,SynthesisFilter.LSH") float p12 = s12 + s19;\r
+       @LOC("IN,SynthesisFilter.LSH") float p13 = s13 + s18;\r
+       @LOC("IN,SynthesisFilter.LSH") float p14 = s14 + s17;\r
+       @LOC("IN,SynthesisFilter.LSH") float p15 = s15 + s16;\r
+       \r
+       @LOC("IN,SynthesisFilter.LSH") float pp0 = p0 + p15;\r
+       @LOC("IN,SynthesisFilter.LSH") float pp1 = p1 + p14;\r
+       @LOC("IN,SynthesisFilter.LSH") float pp2 = p2 + p13;\r
+       @LOC("IN,SynthesisFilter.LSH") float pp3 = p3 + p12;\r
+       @LOC("IN,SynthesisFilter.LSH") float pp4 = p4 + p11;\r
+       @LOC("IN,SynthesisFilter.LSH") float pp5 = p5 + p10;\r
+       @LOC("IN,SynthesisFilter.LSH") float pp6 = p6 + p9;\r
+       @LOC("IN,SynthesisFilter.LSH") float pp7 = p7 + p8;\r
+       @LOC("IN,SynthesisFilter.LSH") float pp8 = (p0 - p15) * cos1_32;\r
+       @LOC("IN,SynthesisFilter.LSH") float pp9 = (p1 - p14) * cos3_32;\r
+       @LOC("IN,SynthesisFilter.LSH") float pp10 = (p2 - p13) * cos5_32;\r
+       @LOC("IN,SynthesisFilter.LSH") float pp11 = (p3 - p12) * cos7_32;\r
+       @LOC("IN,SynthesisFilter.LSH") float pp12 = (p4 - p11) * cos9_32;\r
+       @LOC("IN,SynthesisFilter.LSH") float pp13 = (p5 - p10) * cos11_32;\r
+       @LOC("IN,SynthesisFilter.LSH") float pp14 = (p6 - p9) * cos13_32;\r
+       @LOC("IN,SynthesisFilter.LSH") float pp15 = (p7 - p8) * cos15_32;\r
 \r
        p0 = pp0 + pp7;\r
        p1 = pp1 + pp6;\r
@@ -326,7 +356,7 @@ final class SynthesisFilter
        p15 = (pp14 - pp15) * cos1_4;\r
 \r
        // this is pretty insane coding\r
-       float tmp1;\r
+       @LOC("IN,SynthesisFilter.L3") float tmp1;\r
        new_v19/*36-17*/ = -(new_v4 = (new_v12 = p7) + p5) - p6;\r
        new_v27/*44-17*/ = -p6 - p7 - p4;\r
        new_v6 = (new_v10 = (new_v14 = p15) + p11) + p13;\r
@@ -430,7 +460,7 @@ final class SynthesisFilter
 \r
        // manually doing something that a compiler should handle sucks\r
        // coding like this is hard to read\r
-       float tmp2;\r
+       @LOC("IN,SynthesisFilter.L4") float tmp2;\r
        new_v5 = (new_v11 = (new_v13 = (new_v15 = p15) + p7) + p11)\r
                                                        + p5 + p13;\r
        new_v7 = (new_v9 = p15 + p11 + p3) + p13;\r
@@ -447,85 +477,122 @@ final class SynthesisFilter
 \r
        // insert V[0-15] (== new_v[0-15]) into actual v:       \r
        // float[] x2 = actual_v + actual_write_pos;\r
-       float dest[] = actual_v;\r
-       \r
-       int pos = actual_write_pos;\r
-       \r
-       dest[0 + pos] = new_v0;\r
-       dest[16 + pos] = new_v1;\r
-       dest[32 + pos] = new_v2;\r
-       dest[48 + pos] = new_v3;\r
-       dest[64 + pos] = new_v4;\r
-       dest[80 + pos] = new_v5;\r
-       dest[96 + pos] = new_v6;\r
-       dest[112 + pos] = new_v7;\r
-       dest[128 + pos] = new_v8;\r
-       dest[144 + pos] = new_v9;\r
-       dest[160 + pos] = new_v10;\r
-       dest[176 + pos] = new_v11;\r
-       dest[192 + pos] = new_v12;\r
-       dest[208 + pos] = new_v13;\r
-       dest[224 + pos] = new_v14;\r
-       dest[240 + pos] = new_v15;\r
+       //float dest[] = actual_v; //actual_v subbed in so as not to create a new area\r
+       \r
+       //int pos = actual_write_pos; //substituted to simplify location relations\r
+       \r
+       actual_v[0 + actual_write_pos] = new_v0;\r
+       actual_v[16 + actual_write_pos] = new_v1;\r
+       actual_v[32 + actual_write_pos] = new_v2;\r
+       actual_v[48 + actual_write_pos] = new_v3;\r
+       actual_v[64 + actual_write_pos] = new_v4;\r
+       actual_v[80 + actual_write_pos] = new_v5;\r
+       actual_v[96 + actual_write_pos] = new_v6;\r
+       actual_v[112 + actual_write_pos] = new_v7;\r
+       actual_v[128 + actual_write_pos] = new_v8;\r
+       actual_v[144 + actual_write_pos] = new_v9;\r
+       actual_v[160 + actual_write_pos] = new_v10;\r
+       actual_v[176 + actual_write_pos] = new_v11;\r
+       actual_v[192 + actual_write_pos] = new_v12;\r
+       actual_v[208 + actual_write_pos] = new_v13;\r
+       actual_v[224 + actual_write_pos] = new_v14;\r
+       actual_v[240 + actual_write_pos] = new_v15;\r
 \r
        // V[16] is always 0.0:\r
-       dest[256 + pos] = 0.0f;\r
+       actual_v[256 + actual_write_pos] = 0.0f;\r
 \r
        // insert V[17-31] (== -new_v[15-1]) into actual v:\r
-       dest[272 + pos] = -new_v15;\r
-       dest[288 + pos] = -new_v14;\r
-       dest[304 + pos] = -new_v13;\r
-       dest[320 + pos] = -new_v12;\r
-       dest[336 + pos] = -new_v11;\r
-       dest[352 + pos] = -new_v10;\r
-       dest[368 + pos] = -new_v9;\r
-       dest[384 + pos] = -new_v8;\r
-       dest[400 + pos] = -new_v7;\r
-       dest[416 + pos] = -new_v6;\r
-       dest[432 + pos] = -new_v5;\r
-       dest[448 + pos] = -new_v4;\r
-       dest[464 + pos] = -new_v3;\r
-       dest[480 + pos] = -new_v2;\r
-       dest[496 + pos] = -new_v1;\r
+       actual_v[272 + actual_write_pos] = -new_v15;\r
+       actual_v[288 + actual_write_pos] = -new_v14;\r
+       actual_v[304 + actual_write_pos] = -new_v13;\r
+       actual_v[320 + actual_write_pos] = -new_v12;\r
+       actual_v[336 + actual_write_pos] = -new_v11;\r
+       actual_v[352 + actual_write_pos] = -new_v10;\r
+       actual_v[368 + actual_write_pos] = -new_v9;\r
+       actual_v[384 + actual_write_pos] = -new_v8;\r
+       actual_v[400 + actual_write_pos] = -new_v7;\r
+       actual_v[416 + actual_write_pos] = -new_v6;\r
+       actual_v[432 + actual_write_pos] = -new_v5;\r
+       actual_v[448 + actual_write_pos] = -new_v4;\r
+       actual_v[464 + actual_write_pos] = -new_v3;\r
+       actual_v[480 + actual_write_pos] = -new_v2;\r
+       actual_v[496 + actual_write_pos] = -new_v1;\r
 \r
        // insert V[32] (== -new_v[0]) into other v:\r
-       dest = (actual_v==v1) ? v2 : v1;\r
-       \r
-       dest[0 + pos] = -new_v0;\r
+       //dest = (actual_v==v1) ? v2 : v1;  //assignment replaced with if statement so that new areas are not created\r
+       if(actual_v == v1){\r
+           v2[0 + actual_write_pos] = -new_v0;\r
        // insert V[33-48] (== new_v[16-31]) into other v:\r
-       dest[16 + pos] = new_v16;\r
-       dest[32 + pos] = new_v17;\r
-       dest[48 + pos] = new_v18;\r
-       dest[64 + pos] = new_v19;\r
-       dest[80 + pos] = new_v20;\r
-       dest[96 + pos] = new_v21;\r
-       dest[112 + pos] = new_v22;\r
-       dest[128 + pos] = new_v23;\r
-       dest[144 + pos] = new_v24;\r
-       dest[160 + pos] = new_v25;\r
-       dest[176 + pos] = new_v26;\r
-       dest[192 + pos] = new_v27;\r
-       dest[208 + pos] = new_v28;\r
-       dest[224 + pos] = new_v29;\r
-       dest[240 + pos] = new_v30;\r
-       dest[256 + pos] = new_v31;\r
+           v2[16 + actual_write_pos] = new_v16;\r
+           v2[32 + actual_write_pos] = new_v17;\r
+           v2[48 + actual_write_pos] = new_v18;\r
+           v2[64 + actual_write_pos] = new_v19;\r
+           v2[80 + actual_write_pos] = new_v20;\r
+           v2[96 + actual_write_pos] = new_v21;\r
+           v2[112 + actual_write_pos] = new_v22;\r
+           v2[128 + actual_write_pos] = new_v23;\r
+           v2[144 + actual_write_pos] = new_v24;\r
+           v2[160 + actual_write_pos] = new_v25;\r
+           v2[176 + actual_write_pos] = new_v26;\r
+           v2[192 + actual_write_pos] = new_v27;\r
+           v2[208 + actual_write_pos] = new_v28;\r
+           v2[224 + actual_write_pos] = new_v29;\r
+           v2[240 + actual_write_pos] = new_v30;\r
+           v2[256 + actual_write_pos] = new_v31;\r
        \r
        // insert V[49-63] (== new_v[30-16]) into other v:\r
-       dest[272 + pos] = new_v30;\r
-       dest[288 + pos] = new_v29;\r
-       dest[304 + pos] = new_v28;\r
-       dest[320 + pos] = new_v27;\r
-       dest[336 + pos] = new_v26;\r
-       dest[352 + pos] = new_v25;\r
-       dest[368 + pos] = new_v24;\r
-       dest[384 + pos] = new_v23;\r
-       dest[400 + pos] = new_v22;\r
-       dest[416 + pos] = new_v21;\r
-       dest[432 + pos] = new_v20;\r
-       dest[448 + pos] = new_v19;\r
-       dest[464 + pos] = new_v18;\r
-       dest[480 + pos] = new_v17;\r
-       dest[496 + pos] = new_v16;                      \r
+           v2[272 + actual_write_pos] = new_v30;\r
+           v2[288 + actual_write_pos] = new_v29;\r
+           v2[304 + actual_write_pos] = new_v28;\r
+           v2[320 + actual_write_pos] = new_v27;\r
+           v2[336 + actual_write_pos] = new_v26;\r
+           v2[352 + actual_write_pos] = new_v25;\r
+           v2[368 + actual_write_pos] = new_v24;\r
+           v2[384 + actual_write_pos] = new_v23;\r
+           v2[400 + actual_write_pos] = new_v22;\r
+           v2[416 + actual_write_pos] = new_v21;\r
+           v2[432 + actual_write_pos] = new_v20;\r
+           v2[448 + actual_write_pos] = new_v19;\r
+           v2[464 + actual_write_pos] = new_v18;\r
+           v2[480 + actual_write_pos] = new_v17;\r
+           v2[496 + actual_write_pos] = new_v16;\r
+       } \r
+       else{\r
+           v1[0 + actual_write_pos] = -new_v0;\r
+           v1[16 + actual_write_pos] = new_v16;\r
+           v1[32 + actual_write_pos] = new_v17;\r
+           v1[48 + actual_write_pos] = new_v18;\r
+           v1[64 + actual_write_pos] = new_v19;\r
+           v1[80 + actual_write_pos] = new_v20;\r
+           v1[96 + actual_write_pos] = new_v21;\r
+           v1[112 + actual_write_pos] = new_v22;\r
+           v1[128 + actual_write_pos] = new_v23;\r
+           v1[144 + actual_write_pos] = new_v24;\r
+           v1[160 + actual_write_pos] = new_v25;\r
+           v1[176 + actual_write_pos] = new_v26;\r
+           v1[192 + actual_write_pos] = new_v27;\r
+           v1[208 + actual_write_pos] = new_v28;\r
+           v1[224 + actual_write_pos] = new_v29;\r
+           v1[240 + actual_write_pos] = new_v30;\r
+           v1[256 + actual_write_pos] = new_v31;\r
+       \r
+       // insert V[49-63] (== new_v[30-16]) into other v:\r
+           v1[272 + actual_write_pos] = new_v30;\r
+           v1[288 + actual_write_pos] = new_v29;\r
+           v1[304 + actual_write_pos] = new_v28;\r
+           v1[320 + actual_write_pos] = new_v27;\r
+           v1[336 + actual_write_pos] = new_v26;\r
+           v1[352 + actual_write_pos] = new_v25;\r
+           v1[368 + actual_write_pos] = new_v24;\r
+           v1[384 + actual_write_pos] = new_v23;\r
+           v1[400 + actual_write_pos] = new_v22;\r
+           v1[416 + actual_write_pos] = new_v21;\r
+           v1[432 + actual_write_pos] = new_v20;\r
+           v1[448 + actual_write_pos] = new_v19;\r
+           v1[464 + actual_write_pos] = new_v18;\r
+           v1[480 + actual_write_pos] = new_v17;\r
+           v1[496 + actual_write_pos] = new_v16;\r
+       }\r
 /*\r
        }\r
        else\r
@@ -853,396 +920,398 @@ final class SynthesisFilter
    * Compute PCM Samples.\r
    */\r
   \r
-  private float[] _tmpOut = new float[32];\r
+  @LOC("TMP") private float[] _tmpOut = new float[32];\r
   \r
-  \r
-  private void compute_pcm_samples0(Obuffer buffer)\r
+  @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
+  private void compute_pcm_samples0(@LOC("THIS") Obuffer buffer)\r
   {\r
-       final float[] vp = actual_v;    \r
+      //final float[] vp = actual_v;  //subbed in variable name instead to reduce areas        \r
        //int inc = v_inc;\r
-       final float[] tmpOut = _tmpOut;\r
-        int dvp =0;\r
+       //final float[] tmpOut = _tmpOut; //subbed in variable name instread to reduce areas\r
+        @LOC("DVP") int dvp =0;\r
        \r
                        // fat chance of having this loop unroll\r
-                       for( int i=0; i<32; i++)\r
-                       {\r
-               float pcm_sample;\r
-               final float[] dp = d16[i];\r
-               pcm_sample = (float)(((vp[0 + dvp] * dp[0]) +\r
-                       (vp[15 + dvp] * dp[1]) +\r
-                       (vp[14 + dvp] * dp[2]) +\r
-                       (vp[13 + dvp] * dp[3]) +\r
-                       (vp[12 + dvp] * dp[4]) +\r
-                       (vp[11 + dvp] * dp[5]) +\r
-                       (vp[10 + dvp] * dp[6]) +\r
-                       (vp[9 + dvp] * dp[7]) +\r
-                       (vp[8 + dvp] * dp[8]) +\r
-                       (vp[7 + dvp] * dp[9]) +\r
-                       (vp[6 + dvp] * dp[10]) +\r
-                       (vp[5 + dvp] * dp[11]) +\r
-                       (vp[4 + dvp] * dp[12]) +\r
-                       (vp[3 + dvp] * dp[13]) +\r
-                       (vp[2 + dvp] * dp[14]) +\r
-                       (vp[1 + dvp] * dp[15])\r
+               for(@LOC("I") int i=0; i<32; i++)\r
+               {\r
+               @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+               //final float[] dp = d16[i]; //subbed in variable name instead to reduce areas\r
+               pcm_sample = (float)(((actual_v[0 + dvp] * d16[0]) +\r
+                       (actual_v[15 + dvp] * d16[1]) +\r
+                       (actual_v[14 + dvp] * d16[2]) +\r
+                       (actual_v[13 + dvp] * d16[3]) +\r
+                       (actual_v[12 + dvp] * d16[4]) +\r
+                       (actual_v[11 + dvp] * d16[5]) +\r
+                       (actual_v[10 + dvp] * d16[6]) +\r
+                       (actual_v[9 + dvp] * d16[7]) +\r
+                       (actual_v[8 + dvp] * d16[8]) +\r
+                       (actual_v[7 + dvp] * d16[9]) +\r
+                       (actual_v[6 + dvp] * d16[10]) +\r
+                       (actual_v[5 + dvp] * d16[11]) +\r
+                       (actual_v[4 + dvp] * d16[12]) +\r
+                       (actual_v[3 + dvp] * d16[13]) +\r
+                       (actual_v[2 + dvp] * d16[14]) +\r
+                       (actual_v[1 + dvp] * d16[15])\r
                        ) * scalefactor);\r
 \r
-            tmpOut[i] = pcm_sample;\r
+            _tmpOut[i] = pcm_sample;\r
                        \r
                        dvp += 16;\r
        } // for\r
   }\r
-  \r
-  private void compute_pcm_samples1(Obuffer buffer)\r
+  @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
+  private void compute_pcm_samples1(@LOC("THIS") Obuffer buffer)\r
   {\r
-       final float[] vp = actual_v;    \r
+      //final float[] vp = actual_v;   \r
        //int inc = v_inc;\r
-       final float[] tmpOut = _tmpOut;\r
-        int dvp =0;\r
+       //final float[] tmpOut = _tmpOut;\r
+        @LOC("DVP") int dvp =0;\r
        \r
                        // fat chance of having this loop unroll\r
-                       for( int i=0; i<32; i++)\r
+                       for(@LOC("I") int i=0; i<32; i++)\r
                        {\r
-                               final float[] dp = d16[i];\r
-                               float pcm_sample;\r
-\r
-                               pcm_sample = (float)(((vp[1 + dvp] * dp[0]) +\r
-                                       (vp[0 + dvp] * dp[1]) +\r
-                                       (vp[15 + dvp] * dp[2]) +\r
-                                       (vp[14 + dvp] * dp[3]) +\r
-                                       (vp[13 + dvp] * dp[4]) +\r
-                                       (vp[12 + dvp] * dp[5]) +\r
-                                       (vp[11 + dvp] * dp[6]) +\r
-                                       (vp[10 + dvp] * dp[7]) +\r
-                                       (vp[9 + dvp] * dp[8]) +\r
-                                       (vp[8 + dvp] * dp[9]) +\r
-                                       (vp[7 + dvp] * dp[10]) +\r
-                                       (vp[6 + dvp] * dp[11]) +\r
-                                       (vp[5 + dvp] * dp[12]) +\r
-                                       (vp[4 + dvp] * dp[13]) +\r
-                                       (vp[3 + dvp] * dp[14]) +\r
-                                       (vp[2 + dvp] * dp[15])\r
+                           //final float[] dp = d16[i];\r
+                               @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+                               pcm_sample = (float)(((actual_v[1 + dvp] * d16[0]) +\r
+                                                     (actual_v[0 + dvp] * d16[1]) +\r
+                                       (actual_v[15 + dvp] * d16[2]) +\r
+                                       (actual_v[14 + dvp] * d16[3]) +\r
+                                       (actual_v[13 + dvp] * d16[4]) +\r
+                                       (actual_v[12 + dvp] * d16[5]) +\r
+                                       (actual_v[11 + dvp] * d16[6]) +\r
+                                       (actual_v[10 + dvp] * d16[7]) +\r
+                                       (actual_v[9 + dvp] * d16[8]) +\r
+                                       (actual_v[8 + dvp] * d16[9]) +\r
+                                       (actual_v[7 + dvp] * d16[10]) +\r
+                                       (actual_v[6 + dvp] * d16[11]) +\r
+                                       (actual_v[5 + dvp] * d16[12]) +\r
+                                       (actual_v[4 + dvp] * d16[13]) +\r
+                                       (actual_v[3 + dvp] * d16[14]) +\r
+                                       (actual_v[2 + dvp] * d16[15])\r
                                        ) * scalefactor);\r
 \r
-            tmpOut[i] = pcm_sample;\r
-                       \r
+            _tmpOut[i] = pcm_sample;\r
+                       actual_v\r
                        dvp += 16;\r
          } // for\r
   }\r
-    private void compute_pcm_samples2(Obuffer buffer)\r
+  @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
+  private void compute_pcm_samples2(@LOC("THIS") Obuffer buffer)\r
   {\r
-       final float[] vp = actual_v;\r
+      //final float[] vp = actual_v;\r
        \r
        //int inc = v_inc;\r
-       final float[] tmpOut = _tmpOut;\r
-        int dvp =0;\r
+       //final float[] tmpOut = _tmpOut;\r
+        @LOC("DVP") int dvp =0;\r
        \r
                        // fat chance of having this loop unroll\r
-                       for( int i=0; i<32; i++)\r
+                       for(@LOC("I") int i=0; i<32; i++)\r
                        {\r
-                               final float[] dp = d16[i];\r
-                               float pcm_sample;\r
-\r
-                               pcm_sample = (float)(((vp[2 + dvp] * dp[0]) +\r
-                                       (vp[1 + dvp] * dp[1]) +\r
-                                       (vp[0 + dvp] * dp[2]) +\r
-                                       (vp[15 + dvp] * dp[3]) +\r
-                                       (vp[14 + dvp] * dp[4]) +\r
-                                       (vp[13 + dvp] * dp[5]) +\r
-                                       (vp[12 + dvp] * dp[6]) +\r
-                                       (vp[11 + dvp] * dp[7]) +\r
-                                       (vp[10 + dvp] * dp[8]) +\r
-                                       (vp[9 + dvp] * dp[9]) +\r
-                                       (vp[8 + dvp] * dp[10]) +\r
-                                       (vp[7 + dvp] * dp[11]) +\r
-                                       (vp[6 + dvp] * dp[12]) +\r
-                                       (vp[5 + dvp] * dp[13]) +\r
-                                       (vp[4 + dvp] * dp[14]) +\r
-                                       (vp[3 + dvp] * dp[15])\r
+                           //final float[] dp = d16[i];\r
+                               @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+                               pcm_sample = (float)(((actual_v[2 + dvp] * d16[0]) +\r
+                                       (actual_v[1 + dvp] * d16[1]) +\r
+                                       (actual_v[0 + dvp] * d16[2]) +\r
+                                       (actual_v[15 + dvp] * d16[3]) +\r
+                                       (actual_v[14 + dvp] * d16[4]) +\r
+                                       (actual_v[13 + dvp] * d16[5]) +\r
+                                       (actual_v[12 + dvp] * d16[6]) +\r
+                                       (actual_v[11 + dvp] * d16[7]) +\r
+                                       (actual_v[10 + dvp] * d16[8]) +\r
+                                       (actual_v[9 + dvp] * d16[9]) +\r
+                                       (actual_v[8 + dvp] * d16[10]) +\r
+                                       (actual_v[7 + dvp] * d16[11]) +\r
+                                       (actual_v[6 + dvp] * d16[12]) +\r
+                                       (actual_v[5 + dvp] * d16[13]) +\r
+                                       (actual_v[4 + dvp] * d16[14]) +\r
+                                       (actual_v[3 + dvp] * d16[15])\r
                                        ) * scalefactor);\r
 \r
-            tmpOut[i] = pcm_sample;\r
+            _tmpOut[i] = pcm_sample;\r
                        \r
                        dvp += 16;\r
                        } // for\r
-       }\r
-       \r
-         private void compute_pcm_samples3(Obuffer buffer)\r
+  }\r
+  @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")      \r
+  private void compute_pcm_samples3(@LOC("THIS") Obuffer buffer)\r
   {\r
-       final float[] vp = actual_v;\r
+      //final float[] vp = actual_v;\r
        \r
        int idx = 0;\r
        //int inc = v_inc;\r
-       final float[] tmpOut = _tmpOut;\r
-        int dvp =0;\r
+       //final float[] tmpOut = _tmpOut;\r
+        @LOC("DVP") int dvp =0;\r
        \r
                        // fat chance of having this loop unroll\r
-                       for( int i=0; i<32; i++)\r
+                       for(@LOC("I") int i=0; i<32; i++)\r
                        {\r
-                               final float[] dp = d16[i];\r
-                               float pcm_sample;\r
-\r
-                               pcm_sample = (float)(((vp[3 + dvp] * dp[0]) +\r
-                                       (vp[2 + dvp] * dp[1]) +\r
-                                       (vp[1 + dvp] * dp[2]) +\r
-                                       (vp[0 + dvp] * dp[3]) +\r
-                                       (vp[15 + dvp] * dp[4]) +\r
-                                       (vp[14 + dvp] * dp[5]) +\r
-                                       (vp[13 + dvp] * dp[6]) +\r
-                                       (vp[12 + dvp] * dp[7]) +\r
-                                       (vp[11 + dvp] * dp[8]) +\r
-                                       (vp[10 + dvp] * dp[9]) +\r
-                                       (vp[9 + dvp] * dp[10]) +\r
-                                       (vp[8 + dvp] * dp[11]) +\r
-                                       (vp[7 + dvp] * dp[12]) +\r
-                                       (vp[6 + dvp] * dp[13]) +\r
-                                       (vp[5 + dvp] * dp[14]) +\r
-                                       (vp[4 + dvp] * dp[15])\r
+                           //final float[] dp = d16[i];\r
+                               @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+                               pcm_sample = (float)(((actual_v[3 + dvp] * d16[0]) +\r
+                                       (actual_v[2 + dvp] * d16[1]) +\r
+                                       (actual_v[1 + dvp] * d16[2]) +\r
+                                       (actual_v[0 + dvp] * d16[3]) +\r
+                                       (actual_v[15 + dvp] * d16[4]) +\r
+                                       (actual_v[14 + dvp] * d16[5]) +\r
+                                       (actual_v[13 + dvp] * d16[6]) +\r
+                                       (actual_v[12 + dvp] * d16[7]) +\r
+                                       (actual_v[11 + dvp] * d16[8]) +\r
+                                       (actual_v[10 + dvp] * d16[9]) +\r
+                                       (actual_v[9 + dvp] * d16[10]) +\r
+                                       (actual_v[8 + dvp] * d16[11]) +\r
+                                       (actual_v[7 + dvp] * d16[12]) +\r
+                                       (actual_v[6 + dvp] * d16[13]) +\r
+                                       (actual_v[5 + dvp] * d16[14]) +\r
+                                       (actual_v[4 + dvp] * d16[15])\r
                                        ) * scalefactor);\r
 \r
-            tmpOut[i] = pcm_sample;\r
+            _tmpOut[i] = pcm_sample;\r
                        \r
                        dvp += 16;\r
                        } // for\r
-         }\r
-                       \r
-  private void compute_pcm_samples4(Obuffer buffer)\r
+  }\r
+  @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")                      \r
+  private void compute_pcm_samples4(@LOC("THIS") Obuffer buffer)\r
   {\r
-       final float[] vp = actual_v;\r
+      //final float[] vp = actual_v;\r
        \r
        //int inc = v_inc;\r
-       final float[] tmpOut = _tmpOut;\r
-        int dvp =0;\r
+       //final float[] tmpOut = _tmpOut;\r
+        @LOC("DVP") int dvp =0;\r
        \r
                        // fat chance of having this loop unroll\r
-                       for( int i=0; i<32; i++)\r
+                       for(@LOC("I") int i=0; i<32; i++)\r
                        {\r
-                               final float[] dp = d16[i];\r
-                               float pcm_sample;\r
-\r
-                               pcm_sample = (float)(((vp[4 + dvp] * dp[0]) +\r
-                                       (vp[3 + dvp] * dp[1]) +\r
-                                       (vp[2 + dvp] * dp[2]) +\r
-                                       (vp[1 + dvp] * dp[3]) +\r
-                                       (vp[0 + dvp] * dp[4]) +\r
-                                       (vp[15 + dvp] * dp[5]) +\r
-                                       (vp[14 + dvp] * dp[6]) +\r
-                                       (vp[13 + dvp] * dp[7]) +\r
-                                       (vp[12 + dvp] * dp[8]) +\r
-                                       (vp[11 + dvp] * dp[9]) +\r
-                                       (vp[10 + dvp] * dp[10]) +\r
-                                       (vp[9 + dvp] * dp[11]) +\r
-                                       (vp[8 + dvp] * dp[12]) +\r
-                                       (vp[7 + dvp] * dp[13]) +\r
-                                       (vp[6 + dvp] * dp[14]) +\r
-                                       (vp[5 + dvp] * dp[15])\r
+                           //final float[] dp = d16[i];\r
+                               @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+                               pcm_sample = (float)(((actual_v[4 + dvp] * d16[0]) +\r
+                                       (actual_v[3 + dvp] * d16[1]) +\r
+                                       (actual_v[2 + dvp] * d16[2]) +\r
+                                       (actual_v[1 + dvp] * d16[3]) +\r
+                                       (actual_v[0 + dvp] * d16[4]) +\r
+                                       (actual_v[15 + dvp] * d16[5]) +\r
+                                       (actual_v[14 + dvp] * d16[6]) +\r
+                                       (actual_v[13 + dvp] * d16[7]) +\r
+                                       (actual_v[12 + dvp] * d16[8]) +\r
+                                       (actual_v[11 + dvp] * d16[9]) +\r
+                                       (actual_v[10 + dvp] * d16[10]) +@LOC("I")\r
+                                       (actual_v[9 + dvp] * d16[11]) +\r
+                                       (actual_v[8 + dvp] * d16[12]) +\r
+                                       (actual_v[7 + dvp] * d16[13]) +\r
+                                       (actual_v[6 + dvp] * d16[14]) +\r
+                                       (actual_v[5 + dvp] * d16[15])\r
                                        ) * scalefactor);\r
 \r
-            tmpOut[i] = pcm_sample;\r
+            _tmpOut[i] = pcm_sample;\r
                        \r
                        dvp += 16;\r
                        } // for\r
   }\r
-  \r
-  private void compute_pcm_samples5(Obuffer buffer)\r
+  @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
+  private void compute_pcm_samples5(@LOC("THIS") Obuffer buffer)\r
   {\r
-       final float[] vp = actual_v;\r
+      //final float[] vp = actual_v;\r
        \r
        //int inc = v_inc;\r
-       final float[] tmpOut = _tmpOut;\r
-        int dvp =0;\r
+       //final float[] tmpOut = _tmpOut;\r
+        @LOC("DVP") int dvp =0;\r
        \r
                        // fat chance of having this loop unroll\r
-                       for( int i=0; i<32; i++)\r
+                       for(@LOC("I") int i=0; i<32; i++)\r
                        {\r
-                               final float[] dp = d16[i];\r
-                               float pcm_sample;\r
-\r
-                               pcm_sample = (float)(((vp[5 + dvp] * dp[0]) +\r
-                                       (vp[4 + dvp] * dp[1]) +\r
-                                       (vp[3 + dvp] * dp[2]) +\r
-                                       (vp[2 + dvp] * dp[3]) +\r
-                                       (vp[1 + dvp] * dp[4]) +\r
-                                       (vp[0 + dvp] * dp[5]) +\r
-                                       (vp[15 + dvp] * dp[6]) +\r
-                                       (vp[14 + dvp] * dp[7]) +\r
-                                       (vp[13 + dvp] * dp[8]) +\r
-                                       (vp[12 + dvp] * dp[9]) +\r
-                                       (vp[11 + dvp] * dp[10]) +\r
-                                       (vp[10 + dvp] * dp[11]) +\r
-                                       (vp[9 + dvp] * dp[12]) +\r
-                                       (vp[8 + dvp] * dp[13]) +\r
-                                       (vp[7 + dvp] * dp[14]) +\r
-                                       (vp[6 + dvp] * dp[15])\r
+                           //  final float[] dp = d16[i];\r
+                               @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+                               pcm_sample = (float)(((actual_v[5 + dvp] * d16[0]) +\r
+                                       (actual_v[4 + dvp] * d16[1]) +\r
+                                       (actual_v[3 + dvp] * d16[2]) +\r
+                                       (actual_v[2 + dvp] * d16[3]) +\r
+                                       (actual_v[1 + dvp] * d16[4]) +\r
+                                       (actual_v[0 + dvp] * d16[5]) +\r
+                                       (actual_v[15 + dvp] * d16[6]) +\r
+                                       (actual_v[14 + dvp] * d16[7]) +\r
+                                       (actual_v[13 + dvp] * d16[8]) +\r
+                                       (actual_v[12 + dvp] * d16[9]) +\r
+                                       (actual_v[11 + dvp] * d16[10]) +\r
+                                       (actual_v[10 + dvp] * d16[11]) +\r
+                                       (actual_v[9 + dvp] * d16[12]) +\r
+                                       (actual_v[8 + dvp] * d16[13]) +\r
+                                       (actual_v[7 + dvp] * d16[14]) +\r
+                                       (actual_v[6 + dvp] * d16[15])\r
                                        ) * scalefactor);\r
 \r
-            tmpOut[i] = pcm_sample;\r
+            _tmpOut[i] = pcm_sample;\r
                        \r
                        dvp += 16;\r
                        } // for\r
   }\r
-  \r
-  private void compute_pcm_samples6(Obuffer buffer)\r
+  @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
+  private void compute_pcm_samples6(@LOC("THIS") Obuffer buffer)\r
   {\r
-       final float[] vp = actual_v;    \r
+      //final float[] vp = actual_v;   \r
        //int inc = v_inc;\r
-       final float[] tmpOut = _tmpOut;\r
-        int dvp =0;\r
+       //final float[] tmpOut = _tmpOut;\r
+        @LOC("DVP") int dvp =0;\r
        \r
                        // fat chance of having this loop unroll\r
-                       for( int i=0; i<32; i++)\r
+                       for(@LOC("I") int i=0; i<32; i++)\r
                        {\r
-                               final float[] dp = d16[i];\r
-                               float pcm_sample;\r
-\r
-                               pcm_sample = (float)(((vp[6 + dvp] * dp[0]) +\r
-                                       (vp[5 + dvp] * dp[1]) +\r
-                                       (vp[4 + dvp] * dp[2]) +\r
-                                       (vp[3 + dvp] * dp[3]) +\r
-                                       (vp[2 + dvp] * dp[4]) +\r
-                                       (vp[1 + dvp] * dp[5]) +\r
-                                       (vp[0 + dvp] * dp[6]) +\r
-                                       (vp[15 + dvp] * dp[7]) +\r
-                                       (vp[14 + dvp] * dp[8]) +\r
-                                       (vp[13 + dvp] * dp[9]) +\r
-                                       (vp[12 + dvp] * dp[10]) +\r
-                                       (vp[11 + dvp] * dp[11]) +\r
-                                       (vp[10 + dvp] * dp[12]) +\r
-                                       (vp[9 + dvp] * dp[13]) +\r
-                                       (vp[8 + dvp] * dp[14]) +\r
-                                       (vp[7 + dvp] * dp[15])\r
+                           //final float[] dp = d16[i];\r
+                               @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+                               pcm_sample = (float)(((actual_v[6 + dvp] * d16[0]) +\r
+                                       (actual_v[5 + dvp] * d61[1]) +\r
+                                       (actual_v[4 + dvp] * d16[2]) +\r
+                                       (actual_v[3 + dvp] * d16[3]) +\r
+                                       (actual_v[2 + dvp] * d16[4]) +\r
+                                       (actual_v[1 + dvp] * d16[5]) +\r
+                                       (actual_v[0 + dvp] * d16[6]) +\r
+                                       (actual_v[15 + dvp] * d16[7]) +\r
+                                       (actual_v[14 + dvp] * d16[8]) +\r
+                                       (actual_v[13 + dvp] * d16[9]) +\r
+                                       (actual_v[12 + dvp] * d16[10]) +\r
+                                       (actual_v[11 + dvp] * d16[11]) +\r
+                                       (actual_v[10 + dvp] * d16[12]) +\r
+                                       (actual_v[9 + dvp] * d16[13]) +\r
+                                       (actual_v[8 + dvp] * d16[14]) +\r
+                                       (actual_v[7 + dvp] * d16[15])\r
                                        ) * scalefactor);\r
 \r
-            tmpOut[i] = pcm_sample;\r
+            _tmpOut[i] = pcm_sample;\r
                        \r
                        dvp += 16;\r
                        } // for\r
   }\r
-  \r
-    private void compute_pcm_samples7(Obuffer buffer)\r
+  @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
+  private void compute_pcm_samples7(@LOC("THIS") Obuffer buffer)\r
   {\r
-       final float[] vp = actual_v;\r
+      //final float[] vp = actual_v;\r
        \r
        //int inc = v_inc;\r
-       final float[] tmpOut = _tmpOut;\r
-        int dvp =0;\r
+       //final float[] tmpOut = _tmpOut;\r
+        @LOC("DVP") int dvp =0;\r
        \r
                        // fat chance of having this loop unroll\r
-                       for( int i=0; i<32; i++)\r
+                       for(@LOC("I") int i=0; i<32; i++)\r
                        {\r
-                               final float[] dp = d16[i];\r
-                               float pcm_sample;\r
-\r
-                               pcm_sample = (float)(((vp[7 + dvp] * dp[0]) +\r
-                                       (vp[6 + dvp] * dp[1]) +\r
-                                       (vp[5 + dvp] * dp[2]) +\r
-                                       (vp[4 + dvp] * dp[3]) +\r
-                                       (vp[3 + dvp] * dp[4]) +\r
-                                       (vp[2 + dvp] * dp[5]) +\r
-                                       (vp[1 + dvp] * dp[6]) +\r
-                                       (vp[0 + dvp] * dp[7]) +\r
-                                       (vp[15 + dvp] * dp[8]) +\r
-                                       (vp[14 + dvp] * dp[9]) +\r
-                                       (vp[13 + dvp] * dp[10]) +\r
-                                       (vp[12 + dvp] * dp[11]) +\r
-                                       (vp[11 + dvp] * dp[12]) +\r
-                                       (vp[10 + dvp] * dp[13]) +\r
-                                       (vp[9 + dvp] * dp[14]) +\r
-                                       (vp[8 + dvp] * dp[15])\r
+                           //final float[] dp = d16[i];\r
+                               @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+                               pcm_sample = (float)(((actual_v[7 + dvp] * d16[0]) +\r
+                                       (actual_v[6 + dvp] * d16[1]) +\r
+                                       (actual_v[5 + dvp] * d16[2]) +\r
+                                       (actual_v[4 + dvp] * d16[3]) +\r
+                                       (actual_v[3 + dvp] * d16[4]) +\r
+                                       (actual_v[2 + dvp] * d16[5]) +\r
+                                       (actual_v[1 + dvp] * d16[6]) +\r
+                                       (actual_v[0 + dvp] * d16[7]) +\r
+                                       (actual_v[15 + dvp] * d16[8]) +\r
+                                       (actual_v[14 + dvp] * d16[9]) +\r
+                                       (actual_v[13 + dvp] * d16[10]) +\r
+                                       (actual_v[12 + dvp] * d16[11]) +\r
+                                       (actual_v[11 + dvp] * d16[12]) +\r
+                                       (actual_v[10 + dvp] * d16[13]) +\r
+                                       (actual_v[9 + dvp] * d16[14]) +\r
+                                       (actual_v[8 + dvp] * d16[15])\r
                                        ) * scalefactor);\r
 \r
-            tmpOut[i] = pcm_sample;\r
+            _tmpOut[i] = pcm_sample;\r
                        \r
                        dvp += 16;\r
                        } // for\r
-       }\r
-  private void compute_pcm_samples8(Obuffer buffer)\r
+  }\r
+  @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
+  private void compute_pcm_samples8(@LOC("THIS") Obuffer buffer)\r
   {\r
-       final float[] vp = actual_v;\r
+      //final float[] vp = actual_v;\r
        \r
        //int inc = v_inc;\r
-       final float[] tmpOut = _tmpOut;\r
-        int dvp =0;\r
+       //final float[] tmpOut = _tmpOut;\r
+        @LOC("DVP") int dvp =0;\r
        \r
                        // fat chance of having this loop unroll\r
-                       for( int i=0; i<32; i++)\r
+                       for(@LOC("I") int i=0; i<32; i++)\r
                        {\r
-                               final float[] dp = d16[i];\r
-                               float pcm_sample;\r
-\r
-                               pcm_sample = (float)(((vp[8 + dvp] * dp[0]) +\r
-                                       (vp[7 + dvp] * dp[1]) +\r
-                                       (vp[6 + dvp] * dp[2]) +\r
-                                       (vp[5 + dvp] * dp[3]) +\r
-                                       (vp[4 + dvp] * dp[4]) +\r
-                                       (vp[3 + dvp] * dp[5]) +\r
-                                       (vp[2 + dvp] * dp[6]) +\r
-                                       (vp[1 + dvp] * dp[7]) +\r
-                                       (vp[0 + dvp] * dp[8]) +\r
-                                       (vp[15 + dvp] * dp[9]) +\r
-                                       (vp[14 + dvp] * dp[10]) +\r
-                                       (vp[13 + dvp] * dp[11]) +\r
-                                       (vp[12 + dvp] * dp[12]) +\r
-                                       (vp[11 + dvp] * dp[13]) +\r
-                                       (vp[10 + dvp] * dp[14]) +\r
-                                       (vp[9 + dvp] * dp[15])\r
+                           //final float[] dp = d16[i];\r
+                               @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+                               pcm_sample = (float)(((actual_v[8 + dvp] * d16[0]) +\r
+                                       (actual_v[7 + dvp] * d16[1]) +\r
+                                       (actual_v[6 + dvp] * d16[2]) +\r
+                                       (actual_v[5 + dvp] * d16[3]) +\r
+                                       (actual_v[4 + dvp] * d16[4]) +\r
+                                       (actual_v[3 + dvp] * d16[5]) +\r
+                                       (actual_v[2 + dvp] * d16[6]) +\r
+                                       (actual_v[1 + dvp] * d16[7]) +\r
+                                       (actual_v[0 + dvp] * d16[8]) +\r
+                                       (actual_v[15 + dvp] * d16[9]) +\r
+                                       (actual_v[14 + dvp] * d16[10]) +\r
+                                       (actual_v[13 + dvp] * d16[11]) +\r
+                                       (actual_v[12 + dvp] * d16[12]) +\r
+                                       (actual_v[11 + dvp] * d16[13]) +\r
+                                       (actual_v[10 + dvp] * d16[14]) +\r
+                                       (actual_v[9 + dvp] * d16[15])\r
                                        ) * scalefactor);\r
 \r
-            tmpOut[i] = pcm_sample;\r
+            _tmpOut[i] = pcm_sample;\r
                        \r
                        dvp += 16;\r
                        } // for\r
   }\r
-  \r
-  private void compute_pcm_samples9(Obuffer buffer)\r
+  @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
+  private void compute_pcm_samples9(@LOC("THIS") Obuffer buffer)\r
   {\r
-       final float[] vp = actual_v;\r
+      //final float[] vp = actual_v;\r
        \r
        //int inc = v_inc;\r
-       final float[] tmpOut = _tmpOut;\r
-        int dvp =0;\r
+       //final float[] tmpOut = _tmpOut;\r
+        @LOC("DVP") int dvp =0;\r
        \r
                        // fat chance of having this loop unroll\r
-                       for( int i=0; i<32; i++)\r
+                       for(@LOC("I") int i=0; i<32; i++)\r
                        {\r
-                               final float[] dp = d16[i];\r
-                               float pcm_sample;\r
-\r
-                               pcm_sample = (float)(((vp[9 + dvp] * dp[0]) +\r
-                                       (vp[8 + dvp] * dp[1]) +\r
-                                       (vp[7 + dvp] * dp[2]) +\r
-                                       (vp[6 + dvp] * dp[3]) +\r
-                                       (vp[5 + dvp] * dp[4]) +\r
-                                       (vp[4 + dvp] * dp[5]) +\r
-                                       (vp[3 + dvp] * dp[6]) +\r
-                                       (vp[2 + dvp] * dp[7]) +\r
-                                       (vp[1 + dvp] * dp[8]) +\r
-                                       (vp[0 + dvp] * dp[9]) +\r
-                                       (vp[15 + dvp] * dp[10]) +\r
-                                       (vp[14 + dvp] * dp[11]) +\r
-                                       (vp[13 + dvp] * dp[12]) +\r
-                                       (vp[12 + dvp] * dp[13]) +\r
-                                       (vp[11 + dvp] * dp[14]) +\r
-                                       (vp[10 + dvp] * dp[15])\r
+                           //final float[] dp = d16[i];\r
+                               @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+                               pcm_sample = (float)(((actual_v[9 + dvp] * d16[0]) +\r
+                                       (actual_v[8 + dvp] * d16[1]) +\r
+                                       (actual_v[7 + dvp] * d16[2]) +\r
+                                       (actual_v[6 + dvp] * d16[3]) +\r
+                                       (actual_v[5 + dvp] * d16[4]) +\r
+                                       (actual_v[4 + dvp] * d16[5]) +\r
+                                       (actual_v[3 + dvp] * d16[6]) +\r
+                                       (actual_v[2 + dvp] * d16[7]) +\r
+                                       (actual_v[1 + dvp] * d16[8]) +\r
+                                       (actual_v[0 + dvp] * d16[9]) +\r
+                                       (actual_v[15 + dvp] * d16[10]) +\r
+                                       (actual_v[14 + dvp] * d16[11]) +\r
+                                       (actual_v[13 + dvp] * d16[12]) +\r
+                                       (actual_v[12 + dvp] * d16[13]) +\r
+                                       (actual_v[11 + dvp] * d16[14]) +\r
+                                       (actual_v[10 + dvp] * d16[15])\r
                                        ) * scalefactor);\r
 \r
-            tmpOut[i] = pcm_sample;\r
+            _tmpOut[i] = pcm_sample;\r
                        \r
                        dvp += 16;\r
                        } // for\r
   }\r
-  \r
-  private void compute_pcm_samples10(Obuffer buffer)\r
+  @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
+  private void compute_pcm_samples10(@LOC("THIS") Obuffer buffer)\r
   {\r
-       final float[] vp = actual_v;    \r
+      //final float[] vp = actual_v;   \r
        //int inc = v_inc;\r
-       final float[] tmpOut = _tmpOut;\r
-        int dvp =0;\r
+       //final float[] tmpOut = _tmpOut;\r
+        @LOC("DVP") int dvp =0;\r
        \r
                        // fat chance of having this loop unroll\r
-                       for( int i=0; i<32; i++)\r
+                       for(@LOC("I") int i=0; i<32; i++)\r
                        {\r
-                               final float[] dp = d16[i];\r
-                               float pcm_sample;\r
+                           //final float[] dp = d16[i];\r
+                               @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
 \r
                                pcm_sample = (float)(((vp[10 + dvp] * dp[0]) +\r
                                        (vp[9 + dvp] * dp[1]) +\r
@@ -1267,36 +1336,37 @@ final class SynthesisFilter
                        dvp += 16;\r
                        } // for\r
   }\r
-  private void compute_pcm_samples11(Obuffer buffer)\r
+  @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
+  private void compute_pcm_samples11(@LOC("THIS") Obuffer buffer)\r
   {\r
-       final float[] vp = actual_v;\r
+      //final float[] vp = actual_v;\r
        \r
        //int inc = v_inc;\r
-       final float[] tmpOut = _tmpOut;\r
-        int dvp =0;\r
+       //final float[] tmpOut = _tmpOut;\r
+        @LOC("DVP") int dvp =0;\r
        \r
                        // fat chance of having this loop unroll\r
-                       for( int i=0; i<32; i++)\r
+                       for(@LOC("I") int i=0; i<32; i++)\r
                        {\r
-                               final float[] dp = d16[i];\r
-                               float pcm_sample;\r
-\r
-                               pcm_sample = (float)(((vp[11 + dvp] * dp[0]) +\r
-                                       (vp[10 + dvp] * dp[1]) +\r
-                                       (vp[9 + dvp] * dp[2]) +\r
-                                       (vp[8 + dvp] * dp[3]) +\r
-                                       (vp[7 + dvp] * dp[4]) +\r
-                                       (vp[6 + dvp] * dp[5]) +\r
-                                       (vp[5 + dvp] * dp[6]) +\r
-                                       (vp[4 + dvp] * dp[7]) +\r
-                                       (vp[3 + dvp] * dp[8]) +\r
-                                       (vp[2 + dvp] * dp[9]) +\r
-                                       (vp[1 + dvp] * dp[10]) +\r
-                                       (vp[0 + dvp] * dp[11]) +\r
-                                       (vp[15 + dvp] * dp[12]) +\r
-                                       (vp[14 + dvp] * dp[13]) +\r
-                                       (vp[13 + dvp] * dp[14]) +\r
-                                       (vp[12 + dvp] * dp[15])\r
+                           //final float[] dp = d16[i];\r
+                               @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+                               pcm_sample = (float)(((actual_v[11 + dvp] * d16[0]) +\r
+                                       (actual_v[10 + dvp] * d16[1]) +\r
+                                       (actual_v[9 + dvp] * d16[2]) +\r
+                                       (actual_v[8 + dvp] * d16[3]) +\r
+                                       (actual_v[7 + dvp] * d16[4]) +\r
+                                       (actual_v[6 + dvp] * d16[5]) +\r
+                                       (actual_v[5 + dvp] * d16[6]) +\r
+                                       (actual_v[4 + dvp] * d16[7]) +\r
+                                       (actual_v[3 + dvp] * d16[8]) +\r
+                                       (actual_v[2 + dvp] * d16[9]) +\r
+                                       (actual_v[1 + dvp] * d16[10]) +\r
+                                       (actual_v[0 + dvp] * d16[11]) +\r
+                                       (actual_v[15 + dvp] * d16[12]) +\r
+                                       (actual_v[14 + dvp] * d16[13]) +\r
+                                       (actual_v[13 + dvp] * d16[14]) +\r
+                                       (actual_v[12 + dvp] * d16[15])\r
                                        ) * scalefactor);\r
 \r
             tmpOut[i] = pcm_sample;\r
@@ -1304,153 +1374,157 @@ final class SynthesisFilter
                        dvp += 16;\r
                        } // for\r
   }\r
-    private void compute_pcm_samples12(Obuffer buffer)\r
+  @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
+  private void compute_pcm_samples12(@LOC("THIS") Obuffer buffer)\r
   {\r
-       final float[] vp = actual_v;    \r
+      //final float[] vp = actual_v;   \r
        //int inc = v_inc;\r
-       final float[] tmpOut = _tmpOut;\r
-        int dvp =0;\r
+       //final float[] tmpOut = _tmpOut;\r
+        @LOC("DVP") int dvp =0;\r
        \r
                        // fat chance of having this loop unroll\r
-                       for( int i=0; i<32; i++)\r
+                       for(@LOC("I") int i=0; i<32; i++)\r
                        {\r
-                           final float[] dp = d16[i];\r
-                               float pcm_sample;\r
-\r
-                               pcm_sample = (float)(((vp[12 + dvp] * dp[0]) +\r
-                                       (vp[11 + dvp] * dp[1]) +\r
-                                       (vp[10 + dvp] * dp[2]) +\r
-                                       (vp[9 + dvp] * dp[3]) +\r
-                                       (vp[8 + dvp] * dp[4]) +\r
-                                       (vp[7 + dvp] * dp[5]) +\r
-                                       (vp[6 + dvp] * dp[6]) +\r
-                                       (vp[5 + dvp] * dp[7]) +\r
-                                       (vp[4 + dvp] * dp[8]) +\r
-                                       (vp[3 + dvp] * dp[9]) +\r
-                                       (vp[2 + dvp] * dp[10]) +\r
-                                       (vp[1 + dvp] * dp[11]) +\r
-                                       (vp[0 + dvp] * dp[12]) +\r
-                                       (vp[15 + dvp] * dp[13]) +\r
-                                       (vp[14 + dvp] * dp[14]) +\r
-                                       (vp[13 + dvp] * dp[15])\r
+                           //final float[] dp = d16[i];\r
+                               @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+                               pcm_sample = (float)(((actual_v[12 + dvp] * d16[0]) +\r
+                                       (actual_v[11 + dvp] * d16[1]) +\r
+                                       (actual_v[10 + dvp] * d16[2]) +\r
+                                       (actual_v[9 + dvp] * d16[3]) +\r
+                                       (actual_v[8 + dvp] * d16[4]) +\r
+                                       (actual_v[7 + dvp] * d16[5]) +\r
+                                       (actual_v[6 + dvp] * d16[6]) +\r
+                                       (actual_v[5 + dvp] * d16[7]) +\r
+                                       (actual_v[4 + dvp] * d16[8]) +\r
+                                       (actual_v[3 + dvp] * d16[9]) +\r
+                                       (actual_v[2 + dvp] * d16[10]) +\r
+                                       (actual_v[1 + dvp] * d16[11]) +\r
+                                       (actual_v[0 + dvp] * d16[12]) +\r
+                                       (actual_v[15 + dvp] * d16[13]) +\r
+                                       (actual_v[14 + dvp] * d16[14]) +\r
+                                       (actual_v[13 + dvp] * d16[15])\r
                                        ) * scalefactor);\r
 \r
-            tmpOut[i] = pcm_sample;\r
+            _tmpOut[i] = pcm_sample;\r
                        \r
                        dvp += 16;\r
                        } // for\r
-       }\r
-  private void compute_pcm_samples13(Obuffer buffer)\r
+  }\r
+  @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
+  private void compute_pcm_samples13(@LOC("THIS") Obuffer buffer)\r
   {\r
-       final float[] vp = actual_v;\r
+      //final float[] vp = actual_v;\r
        \r
        //int inc = v_inc;\r
-       final float[] tmpOut = _tmpOut;\r
-        int dvp =0;\r
+       //final float[] tmpOut = _tmpOut;\r
+        @LOC("DVP") int dvp =0;\r
        \r
                        // fat chance of having this loop unroll\r
-                       for( int i=0; i<32; i++)\r
+                       for(@LOC("I") int i=0; i<32; i++)\r
                        {\r
-                               final float[] dp = d16[i];\r
-                               float pcm_sample;\r
-\r
-                               pcm_sample = (float)(((vp[13 + dvp] * dp[0]) +\r
-                                       (vp[12 + dvp] * dp[1]) +\r
-                                       (vp[11 + dvp] * dp[2]) +\r
-                                       (vp[10 + dvp] * dp[3]) +\r
-                                       (vp[9 + dvp] * dp[4]) +\r
-                                       (vp[8 + dvp] * dp[5]) +\r
-                                       (vp[7 + dvp] * dp[6]) +\r
-                                       (vp[6 + dvp] * dp[7]) +\r
-                                       (vp[5 + dvp] * dp[8]) +\r
-                                       (vp[4 + dvp] * dp[9]) +\r
-                                       (vp[3 + dvp] * dp[10]) +\r
-                                       (vp[2 + dvp] * dp[11]) +\r
-                                       (vp[1 + dvp] * dp[12]) +\r
-                                       (vp[0 + dvp] * dp[13]) +\r
-                                       (vp[15 + dvp] * dp[14]) +\r
-                                       (vp[14 + dvp] * dp[15])\r
+                           //final float[] dp = d16[i];\r
+                               @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+                               pcm_sample = (float)(((actual_v[13 + dvp] * d16[0]) +\r
+                                       (actual_v[12 + dvp] * d16[1]) +\r
+                                       (actual_v[11 + dvp] * d16[2]) +\r
+                                       (actual_v[10 + dvp] * d16[3]) +\r
+                                       (actual_v[9 + dvp] * d16[4]) +\r
+                                       (actual_v[8 + dvp] * d16[5]) +\r
+                                       (actual_v[7 + dvp] * d16[6]) +\r
+                                       (actual_v[6 + dvp] * d16[7]) +\r
+                                       (actual_v[5 + dvp] * d16[8]) +\r
+                                       (actual_v[4 + dvp] * d16[9]) +\r
+                                       (actual_v[3 + dvp] * d16[10]) +\r
+                                       (actual_v[2 + dvp] * d16[11]) +\r
+                                       (actual_v[1 + dvp] * d16[12]) +\r
+                                       (actual_v[0 + dvp] * d16[13]) +\r
+                                       (actual_v[15 + dvp] * d16[14]) +\r
+                                       (actual_v[14 + dvp] * d16[15])\r
                                        ) * scalefactor);\r
 \r
-            tmpOut[i] = pcm_sample;\r
+            _tmpOut[i] = pcm_sample;\r
                        \r
                        dvp += 16;\r
                        } // for\r
   }\r
-  private void compute_pcm_samples14(Obuffer buffer)\r
+  @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
+  private void compute_pcm_samples14(@LOC("THIS") Obuffer buffer)\r
   {\r
-       final float[] vp = actual_v;\r
+      //final float[] vp = actual_v;\r
        \r
        //int inc = v_inc;\r
-       final float[] tmpOut = _tmpOut;\r
-        int dvp =0;\r
+       //final float[] tmpOut = _tmpOut;\r
+        @LOC("DVP") int dvp =0;\r
        \r
                        // fat chance of having this loop unroll\r
-                       for( int i=0; i<32; i++)\r
+                       for(@LOC("I") int i=0; i<32; i++)\r
                        {\r
-                               final float[] dp = d16[i];\r
-                               float pcm_sample;\r
-\r
-                               pcm_sample = (float)(((vp[14 + dvp] * dp[0]) +\r
-                                       (vp[13 + dvp] * dp[1]) +\r
-                                       (vp[12 + dvp] * dp[2]) +\r
-                                       (vp[11 + dvp] * dp[3]) +\r
-                                       (vp[10 + dvp] * dp[4]) +\r
-                                       (vp[9 + dvp] * dp[5]) +\r
-                                       (vp[8 + dvp] * dp[6]) +\r
-                                       (vp[7 + dvp] * dp[7]) +\r
-                                       (vp[6 + dvp] * dp[8]) +\r
-                                       (vp[5 + dvp] * dp[9]) +\r
-                                       (vp[4 + dvp] * dp[10]) +\r
-                                       (vp[3 + dvp] * dp[11]) +\r
-                                       (vp[2 + dvp] * dp[12]) +\r
-                                       (vp[1 + dvp] * dp[13]) +\r
-                                       (vp[0 + dvp] * dp[14]) +\r
-                                       (vp[15 + dvp] * dp[15])\r
+                           //final float[] dp = d16[i];\r
+                               @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+                               pcm_sample = (float)(((actual_v[14 + dvp] * d16[0]) +\r
+                                       (actual_v[13 + dvp] * d16[1]) +\r
+                                       (actual_v[12 + dvp] * d16[2]) +\r
+                                       (actual_v[11 + dvp] * d16[3]) +\r
+                                       (actual_v[10 + dvp] * d16[4]) +\r
+                                       (actual_v[9 + dvp] * d16[5]) +\r
+                                       (actual_v[8 + dvp] * d16[6]) +\r
+                                       (actual_v[7 + dvp] * d16[7]) +\r
+                                       (actual_v[6 + dvp] * d16[8]) +\r
+                                       (actual_v[5 + dvp] * d16[9]) +\r
+                                       (actual_v[4 + dvp] * d16[10]) +\r
+                                       (actual_v[3 + dvp] * d16[11]) +\r
+                                       (actual_v[2 + dvp] * d16[12]) +\r
+                                       (actual_v[1 + dvp] * d16[13]) +\r
+                                       (actual_v[0 + dvp] * d16[14]) +\r
+                                       (actual_v[15 + dvp] * d16[15])\r
                                        ) * scalefactor);\r
 \r
-            tmpOut[i] = pcm_sample;\r
+            _tmpOut[i] = pcm_sample;\r
                        \r
                        dvp += 16;\r
                        } // for\r
   }\r
-  private void compute_pcm_samples15(Obuffer buffer)\r
+  @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
+  private void compute_pcm_samples15(@LOC("THIS") Obuffer buffer)\r
   {\r
-       final float[] vp = actual_v;\r
+      //final float[] vp = actual_v;\r
                \r
        //int inc = v_inc;\r
-       final float[] tmpOut = _tmpOut;\r
-        int dvp =0;\r
+       //final float[] tmpOut = _tmpOut;\r
+      @LOC("DVP") int dvp =0;\r
        \r
                        // fat chance of having this loop unroll\r
-                       for( int i=0; i<32; i++)\r
+                       for(@LOC("I") int i=0; i<32; i++)\r
                        {\r
-                               float pcm_sample;\r
-                               final float dp[] = d16[i];\r
-                               pcm_sample = (float)(((vp[15 + dvp] * dp[0]) +\r
-                                       (vp[14 + dvp] * dp[1]) +\r
-                                       (vp[13 + dvp] * dp[2]) +\r
-                                       (vp[12 + dvp] * dp[3]) +\r
-                                       (vp[11 + dvp] * dp[4]) +\r
-                                       (vp[10 + dvp] * dp[5]) +\r
-                                       (vp[9 + dvp] * dp[6]) +\r
-                                       (vp[8 + dvp] * dp[7]) +\r
-                                       (vp[7 + dvp] * dp[8]) +\r
-                                       (vp[6 + dvp] * dp[9]) +\r
-                                       (vp[5 + dvp] * dp[10]) +\r
-                                       (vp[4 + dvp] * dp[11]) +\r
-                                       (vp[3 + dvp] * dp[12]) +\r
-                                       (vp[2 + dvp] * dp[13]) +\r
-                                       (vp[1 + dvp] * dp[14]) +\r
-                                       (vp[0 + dvp] * dp[15])\r
+                               @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+                               //final float dp[] = d16[i];\r
+                               pcm_sample = (float)(((vp[15 + dvp] * d16[0]) +\r
+                                       (actual_v[14 + dvp] * d16[1]) +\r
+                                       (actual_v[13 + dvp] * d16[2]) +\r
+                                       (actual_v[12 + dvp] * d16[3]) +\r
+                                       (actual_v[11 + dvp] * d16[4]) +\r
+                                       (actual_v[10 + dvp] * d16[5]) +\r
+                                       (actual_v[9 + dvp] * d16[6]) +\r
+                                       (actual_v[8 + dvp] * d16[7]) +\r
+                                       (actual_v[7 + dvp] * d16[8]) +\r
+                                       (actual_v[6 + dvp] * d16[9]) +\r
+                                       (actual_v[5 + dvp] * d16[10]) +\r
+                                       (actual_v[4 + dvp] * d16[11]) +\r
+                                       (actual_v[3 + dvp] * d16[12]) +\r
+                                       (actual_v[2 + dvp] * d16[13]) +\r
+                                       (actual_v[1 + dvp] * d16[14]) +\r
+                                       (actual_v[0 + dvp] * d16[15])\r
                                        ) * scalefactor);\r
 \r
-            tmpOut[i] = pcm_sample;                    \r
+            _tmpOut[i] = pcm_sample;                   \r
                        dvp += 16;\r
                        } // for\r
                }\r
                                 \r
-private void compute_pcm_samples(Obuffer buffer)\r
+private void compute_pcm_samples(@LOC("GLOBAL") Obuffer buffer)\r
 {\r
        \r
        switch (actual_write_pos)\r
@@ -1543,8 +1617,9 @@ private void compute_pcm_samples(Obuffer buffer)
   /**\r
    * Calculate 32 PCM samples and put the into the Obuffer-object.\r
    */\r
-       \r
-  public void calculate_pcm_samples(Obuffer buffer)\r
+  \r
+  @LATTICE("V<THIS,THIS<SH,SH*,THISLOC=THIS")  \r
+  public void calculate_pcm_samples(@LOC("V") Obuffer buffer)\r
   {\r
        compute_new_v();        \r
        compute_pcm_samples(buffer);\r
@@ -1558,56 +1633,56 @@ private void compute_pcm_samples(Obuffer buffer)
        \r
        // MDM: this may not be necessary. The Layer III decoder always\r
        // outputs 32 subband samples, but I haven't checked layer I & II.\r
-       for (int p=0;p<32;p++) \r
+       for (@LOC("SH") int p=0;p<32;p++) \r
                samples[p] = 0.0f;\r
   }\r
   \r
   \r
-  private static final double MY_PI = 3.14159265358979323846;\r
-  private static final float cos1_64  =(float) (1.0 / (2.0 * Math.cos(MY_PI        / 64.0)));\r
-  private static final float cos3_64  =(float) (1.0 / (2.0 * Math.cos(MY_PI * 3.0  / 64.0)));\r
-  private static final float cos5_64  =(float) (1.0 / (2.0 * Math.cos(MY_PI * 5.0  / 64.0)));\r
-  private static final float cos7_64  =(float) (1.0 / (2.0 * Math.cos(MY_PI * 7.0  / 64.0)));\r
-  private static final float cos9_64  =(float) (1.0 / (2.0 * Math.cos(MY_PI * 9.0  / 64.0)));\r
-  private static final float cos11_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 11.0 / 64.0)));\r
-  private static final float cos13_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 13.0 / 64.0)));\r
-  private static final float cos15_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 15.0 / 64.0)));\r
-  private static final float cos17_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 17.0 / 64.0)));\r
-  private static final float cos19_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 19.0 / 64.0)));\r
-  private static final float cos21_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 21.0 / 64.0)));\r
-  private static final float cos23_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 23.0 / 64.0)));\r
-  private static final float cos25_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 25.0 / 64.0)));\r
-  private static final float cos27_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 27.0 / 64.0)));\r
-  private static final float cos29_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 29.0 / 64.0)));\r
-  private static final float cos31_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 31.0 / 64.0)));\r
-  private static final float cos1_32  =(float) (1.0 / (2.0 * Math.cos(MY_PI        / 32.0)));\r
-  private static final float cos3_32  =(float) (1.0 / (2.0 * Math.cos(MY_PI * 3.0  / 32.0)));\r
-  private static final float cos5_32  =(float) (1.0 / (2.0 * Math.cos(MY_PI * 5.0  / 32.0)));\r
-  private static final float cos7_32  =(float) (1.0 / (2.0 * Math.cos(MY_PI * 7.0  / 32.0)));\r
-  private static final float cos9_32  =(float) (1.0 / (2.0 * Math.cos(MY_PI * 9.0  / 32.0)));\r
-  private static final float cos11_32 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 11.0 / 32.0)));\r
-  private static final float cos13_32 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 13.0 / 32.0)));\r
-  private static final float cos15_32 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 15.0 / 32.0)));\r
-  private static final float cos1_16  =(float) (1.0 / (2.0 * Math.cos(MY_PI        / 16.0)));\r
-  private static final float cos3_16  =(float) (1.0 / (2.0 * Math.cos(MY_PI * 3.0  / 16.0)));\r
-  private static final float cos5_16  =(float) (1.0 / (2.0 * Math.cos(MY_PI * 5.0  / 16.0)));\r
-  private static final float cos7_16  =(float) (1.0 / (2.0 * Math.cos(MY_PI * 7.0  / 16.0)));\r
-  private static final float cos1_8   =(float) (1.0 / (2.0 * Math.cos(MY_PI        / 8.0)));\r
-  private static final float cos3_8   =(float) (1.0 / (2.0 * Math.cos(MY_PI * 3.0  / 8.0)));\r
-  private static final float cos1_4   =(float) (1.0 / (2.0 * Math.cos(MY_PI / 4.0)));\r
+  @LOC("EQ") private static final double MY_PI = 3.14159265358979323846;\r
+  @LOC("SA") private static final float cos1_64  =(float) (1.0 / (2.0 * Math.cos(MY_PI        / 64.0)));\r
+  @LOC("SA") private static final float cos3_64  =(float) (1.0 / (2.0 * Math.cos(MY_PI * 3.0  / 64.0)));\r
+  @LOC("SA") private static final float cos5_64  =(float) (1.0 / (2.0 * Math.cos(MY_PI * 5.0  / 64.0)));\r
+  @LOC("SA") private static final float cos7_64  =(float) (1.0 / (2.0 * Math.cos(MY_PI * 7.0  / 64.0)));\r
+  @LOC("SA") private static final float cos9_64  =(float) (1.0 / (2.0 * Math.cos(MY_PI * 9.0  / 64.0)));\r
+  @LOC("SA") private static final float cos11_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 11.0 / 64.0)));\r
+  @LOC("SA") private static final float cos13_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 13.0 / 64.0)));\r
+  @LOC("SA") private static final float cos15_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 15.0 / 64.0)));\r
+  @LOC("SA") private static final float cos17_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 17.0 / 64.0)));\r
+  @LOC("SA") private static final float cos19_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 19.0 / 64.0)));\r
+  @LOC("SA") private static final float cos21_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 21.0 / 64.0)));\r
+  @LOC("SA") private static final float cos23_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 23.0 / 64.0)));\r
+  @LOC("SA") private static final float cos25_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 25.0 / 64.0)));\r
+  @LOC("SA") private static final float cos27_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 27.0 / 64.0)));\r
+  @LOC("SA") private static final float cos29_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 29.0 / 64.0)));\r
+  @LOC("SA") private static final float cos31_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 31.0 / 64.0)));\r
+  @LOC("SA") private static final float cos1_32  =(float) (1.0 / (2.0 * Math.cos(MY_PI        / 32.0)));\r
+  @LOC("SA") private static final float cos3_32  =(float) (1.0 / (2.0 * Math.cos(MY_PI * 3.0  / 32.0)));\r
+  @LOC("SA") private static final float cos5_32  =(float) (1.0 / (2.0 * Math.cos(MY_PI * 5.0  / 32.0)));\r
+  @LOC("SA") private static final float cos7_32  =(float) (1.0 / (2.0 * Math.cos(MY_PI * 7.0  / 32.0)));\r
+  @LOC("SA") private static final float cos9_32  =(float) (1.0 / (2.0 * Math.cos(MY_PI * 9.0  / 32.0)));\r
+  @LOC("SA") private static final float cos11_32 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 11.0 / 32.0)));\r
+  @LOC("SA") private static final float cos13_32 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 13.0 / 32.0)));\r
+  @LOC("SA") private static final float cos15_32 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 15.0 / 32.0)));\r
+  @LOC("SA") private static final float cos1_16  =(float) (1.0 / (2.0 * Math.cos(MY_PI        / 16.0)));\r
+  @LOC("SA") private static final float cos3_16  =(float) (1.0 / (2.0 * Math.cos(MY_PI * 3.0  / 16.0)));\r
+  @LOC("SA") private static final float cos5_16  =(float) (1.0 / (2.0 * Math.cos(MY_PI * 5.0  / 16.0)));\r
+  @LOC("SA") private static final float cos7_16  =(float) (1.0 / (2.0 * Math.cos(MY_PI * 7.0  / 16.0)));\r
+  @LOC("SA") private static final float cos1_8   =(float) (1.0 / (2.0 * Math.cos(MY_PI        / 8.0)));\r
+  @LOC("SA") private static final float cos3_8   =(float) (1.0 / (2.0 * Math.cos(MY_PI * 3.0  / 8.0)));\r
+  @LOC("SA") private static final float cos1_4   =(float) (1.0 / (2.0 * Math.cos(MY_PI / 4.0)));\r
   \r
   // Note: These values are not in the same order\r
   // as in Annex 3-B.3 of the ISO/IEC DIS 11172-3 \r
   // private float d[] = {0.000000000, -4.000442505};\r
   \r
-  private static float d[] = null;\r
+  @LOC("V2") private static float d[] = null;\r
   \r
   /** \r
    * d[] split into subarrays of length 16. This provides for\r
    * more faster access by allowing a block of 16 to be addressed\r
    * with constant offset. \r
    **/\r
-  private static float d16[][] = null; \r
+  @LOC("V2") private static float d16[][] = null;      \r
   \r
   /**\r
    * Loads the data for the d[] from the resource SFd.ser. \r
index d64d1f25d4aec10e6ab5d5ea88fba90888182fea..17b665a826c60d37636de93c9e8c67f07714c1df 100644 (file)
 /**\r
  * Class to implements Huffman decoder.\r
  */\r
+@LATTICE("FIELD<FINAL")\r
+@METHODDEFAULT("OUT<V,V<SH,SH<IN,SH*,THISLOC=IN,GLOBALLOC=IN");\r
 final class huffcodetab\r
 {\r
-  private static final int      MXOFF=250;\r
-  private static final int      HTN=34;\r
+  @LOC("FINAL") private static final int        MXOFF=250;\r
+  @LOC("FINAL") private static final int        HTN=34;\r
   \r
-  private char                          tablename0 = ' ';      /* string, containing table_description   */\r
-  private char                          tablename1 = ' ';      /* string, containing table_description   */\r
-  private char                          tablename2 = ' ';      /* string, containing table_description   */\r
+  @LOC("FIELD") private char                            tablename0 = ' ';      /* string, containing table_description   */\r
+  @LOC("FIELD") private char                            tablename1 = ' ';      /* string, containing table_description   */\r
+  @LOC("FIELD") private char                            tablename2 = ' ';      /* string, containing table_description   */\r
   \r
-  private int                           xlen;                          /* max. x-index+                          */\r
-  private int                           ylen;                  /* max. y-index+                                          */\r
-  private int                           linbits;                       /* number of linbits                      */\r
-  private int                           linmax;                        /* max number to be stored in linbits     */\r
-  private int                           ref;                           /* a positive value indicates a reference */\r
-  private int[]                                 table=null;            /* pointer to array[xlen][ylen]               */\r
-  private int[]                         hlen=null;             /* pointer to array[xlen][ylen]               */\r
-  private int[][]                       val=null;                      /* decoder tree                               */\r
-  private int                           treelen;                   /* length of decoder tree                 */\r
+  @LOC("FIELD") private int                             xlen;                          /* max. x-index+                          */\r
+  @LOC("FIELD") private int                             ylen;                  /* max. y-index+                                          */\r
+  @LOC("FIELD") private int                             linbits;                       /* number of linbits                      */\r
+  @LOC("FIELD") private int                             linmax;                        /* max number to be stored in linbits     */\r
+  @LOC("FIELD") private int                             ref;                           /* a positive value indicates a reference */\r
+  @LOC("FIELD") private int[]                           table=null;            /* pointer to array[xlen][ylen]               */\r
+  @LOC("FIELD") private int[]                           hlen=null;             /* pointer to array[xlen][ylen]               */\r
+  @LOC("FIELD") private int[][]                         val=null;                      /* decoder tree                               */\r
+  @LOC("FIELD") private int                             treelen;                   /* length of decoder tree                 */\r
 \r
-  private static int ValTab0[][] = {\r
+  @LOC("FINAL") private static int ValTab0[][] = {\r
        {0,0}   // dummy\r
        };\r
 \r
-  private static int ValTab1[][] = {\r
+  @LOC("FINAL") private static int ValTab1[][] = {\r
        {2,1},{0,0},{2,1},{0,16},{2,1},{0,1},{0,17},\r
        };\r
        \r
-  private static int ValTab2[][] = {\r
+  @LOC("FINAL") private static int ValTab2[][] = {\r
        {2,1},{0,0},{4,1},{2,1},{0,16},{0,1},{2,1},{0,17},{4,1},{2,1},\r
        {0,32},{0,33},{2,1},{0,18},{2,1},{0,2},{0,34},\r
        };\r
        \r
-  private static int ValTab3[][] = {\r
+  @LOC("FINAL") private static int ValTab3[][] = {\r
        {4,1},{2,1},{0,0},{0,1},{2,1},{0,17},{2,1},{0,16},{4,1},{2,1},\r
        {0,32},{0,33},{2,1},{0,18},{2,1},{0,2},{0,34},\r
        };\r
 \r
-  private static int ValTab4[][] = {{0,0}};    // dummy\r
+  @LOC("FINAL") private static int ValTab4[][] = {{0,0}};      // dummy\r
 \r
-  private static int ValTab5[][] = {\r
+  @LOC("FINAL") private static int ValTab5[][] = {\r
        {2,1},{0,0},{4,1},{2,1},{0,16},{0,1},{2,1},{0,17},{8,1},{4,1},\r
        {2,1},{0,32},{0,2},{2,1},{0,33},{0,18},{8,1},{4,1},{2,1},{0,34},\r
        {0,48},{2,1},{0,3},{0,19},{2,1},{0,49},{2,1},{0,50},{2,1},{0,35},\r
        {0,51},\r
        };\r
 \r
-  private static int ValTab6[][] = {\r
+  @LOC("FINAL") private static int ValTab6[][] = {\r
        {6,1},{4,1},{2,1},{0,0},{0,16},{0,17},{6,1},{2,1},{0,1},{2,1},\r
        {0,32},{0,33},{6,1},{2,1},{0,18},{2,1},{0,2},{0,34},{4,1},{2,1},\r
        {0,49},{0,19},{4,1},{2,1},{0,48},{0,50},{2,1},{0,35},{2,1},{0,3},\r
        {0,51},\r
        };\r
        \r
-  private static int ValTab7[][] = {\r
+  @LOC("FINAL") private static int ValTab7[][] = {\r
        {2,1},{0,0},{4,1},{2,1},{0,16},{0,1},{8,1},{2,1},{0,17},{4,1},\r
        {2,1},{0,32},{0,2},{0,33},{18,1},{6,1},{2,1},{0,18},{2,1},{0,34},\r
        {0,48},{4,1},{2,1},{0,49},{0,19},{4,1},{2,1},{0,3},{0,50},{2,1},\r
@@ -105,7 +107,7 @@ final class huffcodetab
        {0,85},\r
        };\r
        \r
-  private static int ValTab8[][] = {\r
+  @LOC("FINAL") private static int ValTab8[][] = {\r
        {6,1},{2,1},{0,0},{2,1},{0,16},{0,1},{2,1},{0,17},{4,1},{2,1},\r
        {0,33},{0,18},{14,1},{4,1},{2,1},{0,32},{0,2},{2,1},{0,34},{4,1},\r
        {2,1},{0,48},{0,3},{2,1},{0,49},{0,19},{14,1},{8,1},{4,1},{2,1},\r
@@ -116,7 +118,7 @@ final class huffcodetab
        {0,85},\r
        };\r
        \r
-  private static int ValTab9[][] = {\r
+  @LOC("FINAL") private static int ValTab9[][] = {\r
        {8,1},{4,1},{2,1},{0,0},{0,16},{2,1},{0,1},{0,17},{10,1},{4,1},\r
        {2,1},{0,32},{0,33},{2,1},{0,18},{2,1},{0,2},{0,34},{12,1},{6,1},\r
        {4,1},{2,1},{0,48},{0,3},{0,49},{2,1},{0,19},{2,1},{0,50},{0,35},\r
@@ -127,7 +129,7 @@ final class huffcodetab
        {0,85},\r
        };\r
        \r
-  private static int ValTab10[][] = {\r
+  @LOC("FINAL") private static int ValTab10[][] = {\r
        {2,1},{0,0},{4,1},{2,1},{0,16},{0,1},{10,1},{2,1},{0,17},{4,1},\r
        {2,1},{0,32},{0,2},{2,1},{0,33},{0,18},{28,1},{8,1},{4,1},{2,1},\r
        {0,34},{0,48},{2,1},{0,49},{0,19},{8,1},{4,1},{2,1},{0,3},{0,50},\r
@@ -143,7 +145,7 @@ final class huffcodetab
        {4,1},{2,1},{0,87},{0,118},{2,1},{0,103},{0,119},\r
        };\r
 \r
-  private static int ValTab11[][] = {\r
+  @LOC("FINAL") private static int ValTab11[][] = {\r
        {6,1},{2,1},{0,0},{2,1},{0,16},{0,1},{8,1},{2,1},{0,17},{4,1},\r
        {2,1},{0,32},{0,2},{0,18},{24,1},{8,1},{2,1},{0,33},{2,1},{0,34},\r
        {2,1},{0,48},{0,3},{4,1},{2,1},{0,49},{0,19},{4,1},{2,1},{0,50},\r
@@ -159,7 +161,7 @@ final class huffcodetab
        {4,1},{2,1},{0,117},{0,118},{2,1},{0,103},{0,119},\r
        };\r
 \r
-  private static int ValTab12[][] = {\r
+  @LOC("FINAL") private static int ValTab12[][] = {\r
        {12,1},{4,1},{2,1},{0,16},{0,1},{2,1},{0,17},{2,1},{0,0},{2,1},\r
        {0,32},{0,2},{16,1},{4,1},{2,1},{0,33},{0,18},{4,1},{2,1},{0,34},\r
        {0,49},{2,1},{0,19},{2,1},{0,48},{2,1},{0,3},{0,64},{26,1},{8,1},\r
@@ -175,7 +177,7 @@ final class huffcodetab
        {0,117},{0,87},{2,1},{0,118},{2,1},{0,103},{0,119},\r
        };\r
 \r
-  private static int ValTab13[][] = {\r
+  @LOC("FINAL") private static int ValTab13[][] = {\r
        {2,1},{0,0},{6,1},{2,1},{0,16},{2,1},{0,1},{0,17},{28,1},{8,1},\r
        {4,1},{2,1},{0,32},{0,2},{2,1},{0,33},{0,18},{8,1},{4,1},{2,1},\r
        {0,34},{0,48},{2,1},{0,3},{0,49},{6,1},{2,1},{0,19},{2,1},{0,50},\r
@@ -230,11 +232,11 @@ final class huffcodetab
        {0,254},\r
        };\r
 \r
-  private static int ValTab14[][] = {\r
+  @LOC("FINAL") private static int ValTab14[][] = {\r
        {0,0}  // dummy\r
        };\r
 \r
-  private static int ValTab15[][] = {\r
+  @LOC("FINAL") private static int ValTab15[][] = {\r
        {16,1},{6,1},{2,1},{0,0},{2,1},{0,16},{0,1},{2,1},{0,17},{4,1},\r
        {2,1},{0,32},{0,2},{2,1},{0,33},{0,18},{50,1},{16,1},{6,1},{2,1},\r
        {0,34},{2,1},{0,48},{0,49},{6,1},{2,1},{0,19},{2,1},{0,3},{0,64},\r
@@ -289,7 +291,7 @@ final class huffcodetab
        {0,255},\r
        };\r
 \r
-  private static int  ValTab16[][] = {\r
+  @LOC("FINAL") private static int  ValTab16[][] = {\r
        {2,1},{0,0},{6,1},{2,1},{0,16},{2,1},{0,1},{0,17},{42,1},{8,1},\r
        {4,1},{2,1},{0,32},{0,2},{2,1},{0,33},{0,18},{10,1},{6,1},{2,1},\r
        {0,34},{2,1},{0,48},{0,3},{2,1},{0,49},{0,19},{10,1},{4,1},{2,1},\r
@@ -344,7 +346,7 @@ final class huffcodetab
        {0,239},\r
        };\r
        \r
-  private static int ValTab24[][] = {\r
+  @LOC("FINAL") private static int ValTab24[][] = {\r
        {60,1},{8,1},{4,1},{2,1},{0,0},{0,16},{2,1},{0,1},{0,17},{14,1},\r
        {6,1},{4,1},{2,1},{0,32},{0,2},{0,33},{2,1},{0,18},{2,1},{0,34},\r
        {2,1},{0,48},{0,3},{14,1},{4,1},{2,1},{0,49},{0,19},{4,1},{2,1},\r
@@ -399,14 +401,14 @@ final class huffcodetab
        {0,254},{0,239},\r
        };\r
        \r
-  private static int ValTab32[][] = {\r
+  @LOC("FINAL") private static int ValTab32[][] = {\r
        {2,1},{0,0},{8,1},{4,1},{2,1},{0,8},{0,4},{2,1},{0,1},{0,2},\r
        {8,1},{4,1},{2,1},{0,12},{0,10},{2,1},{0,3},{0,6},{6,1},{2,1},\r
        {0,9},{2,1},{0,5},{0,7},{4,1},{2,1},{0,14},{0,13},{2,1},{0,15},\r
        {0,11},\r
        };\r
 \r
-  private static int ValTab33[][] = {\r
+  @LOC("FINAL") private static int ValTab33[][] = {\r
        {16,1},{8,1},{4,1},{2,1},{0,0},{0,1},{2,1},{0,2},{0,3},{4,1},\r
        {2,1},{0,4},{0,5},{2,1},{0,6},{0,7},{8,1},{4,1},{2,1},{0,8},\r
        {0,9},{2,1},{0,10},{0,11},{4,1},{2,1},{0,12},{0,13},{2,1},{0,14},\r
@@ -414,15 +416,16 @@ final class huffcodetab
        };\r
 \r
 \r
-  public static huffcodetab[]  ht = null;     /* Simulate extern struct                 */\r
+  @LOC("FINAL") public static huffcodetab[]  ht = null;     /* Simulate extern struct                 */\r
 \r
-  private static int[] bitbuf = new int[32];\r
+  @LOC("FINAL") private static int[] bitbuf = new int[32];\r
   \r
   /**\r
    * Big Constructor : Computes all Huffman Tables.\r
    */\r
-  private huffcodetab(String S,int XLEN, int YLEN, int LINBITS, int LINMAX, int REF,\r
-                     int[] TABLE, int[] HLEN, int[][] VAL, int TREELEN)                     \r
+  private huffcodetab(@LOC("V") String S,@LOC("V") int XLEN, @LOC("V") int YLEN, @LOC("V") int LINBITS,\r
+                     @LOC("V") int LINMAX, @LOC("V") int REF,@LOC("V") int[] TABLE, @LOC("V") int[] HLEN, \r
+                      @LOC("V") int[][] VAL, @LOC("V") int TREELEN)                     \r
   {\r
     tablename0 = S.charAt(0);\r
        tablename1 = S.charAt(1);\r
@@ -433,8 +436,11 @@ final class huffcodetab
     linmax = LINMAX;\r
     ref = REF;\r
     table = TABLE;\r
+    TABLE = null;\r
     hlen = HLEN;\r
+    HLEN = null;\r
     val = VAL;\r
+    VAL = null;\r
     treelen = TREELEN;\r
   }\r
 \r
@@ -445,25 +451,28 @@ final class huffcodetab
    * note! for counta,countb -the 4 bit value is returned in y,\r
    * discard x.\r
    */\r
-  public static int huffman_decoder(huffcodetab h, int[] x, int[] y, int[] v, int[] w, BitReserve br)\r
+  @LATTICE("X<Y,V<Y,W<Y,Y<VAR,VAR<IN,OUT<IN,VAR*,Y*,X*,V*,W*,THISLOC=IN,GLOBALLOC=IN")\r
+  @RETURNLOC("OUT")\r
+  public static int huffman_decoder(@LOC("IN") huffcodetab h, @LOC("X") int[] x, @LOC("Y") int[] y, @LOC("V") int[] v, @LOC("W") int[] w, @LOC("IN") BitReserve br)\r
   {\r
        // array of all huffcodtable headers\r
        // 0..31 Huffman code table 0..31\r
        // 32,33 count1-tables\r
 \r
-       int dmask = 1 << ((4 * 8) - 1);\r
-       int hs    = 4 * 8;\r
-       int level;\r
-       int point = 0;\r
-       int error = 1;\r
+        @LOC("IN") int dmask = 1 << ((4 * 8) - 1);\r
+       @LOC("IN") int hs    = 4 * 8;\r
+       @LOC("VAR") int level;\r
+       @LOC("VAR") int point = 0;\r
+       @LOC("OUT") int error = 1;\r
        level = dmask;\r
 \r
        if (h.val == null) return 2;\r
 \r
      /* table 0 needs no bits */\r
      if ( h.treelen == 0)\r
-        { \r
-          x[0] = y[0] = 0;\r
+        {   \r
+          y[0] = 0;\r
+          x[0] = 0;\r
           return 0;\r
      }\r
 \r
@@ -476,7 +485,7 @@ final class huffcodetab
         do \r
         {\r
            if (h.val[point][0]==0)\r
-               {   /*end of tree*/\r
+           {   /*end of tree*/\r
                   x[0] = h.val[point][1] >>> 4;\r
                   y[0] = h.val[point][1] & 0xf;\r
                   error = 0;\r
@@ -533,7 +542,7 @@ final class huffcodetab
                  if (br.hget1bit() != 0) x[0] = -x[0];\r
                if (y[0]!=0)\r
                  if (br.hget1bit() != 0) y[0] = -y[0];\r
-       }\r
+           }\r
           else\r
           {\r
                  // Process sign and escape encodings for dual tables.\r
@@ -560,7 +569,7 @@ final class huffcodetab
        if (ht!=null)\r
                return;\r
        \r
-       ht = new huffcodetab[HTN];\r
+    ht = new huffcodetab[HTN];\r
     ht[0] = new huffcodetab("0  ",0,0,0,0,-1,null,null,ValTab0,0);\r
     ht[1] = new huffcodetab("1  ",2,2,0,0,-1,null,null,ValTab1,7);\r
     ht[2] = new huffcodetab("2  ",3,3,0,0,-1,null,null,ValTab2,17);\r
@@ -589,7 +598,7 @@ final class huffcodetab
     ht[25] = new huffcodetab("25 ",16,16,5,31,24,null,null,ValTab24,512);\r
     ht[26] = new huffcodetab("26 ",16,16,6,63,24,null,null,ValTab24,512);\r
     ht[27] = new huffcodetab("27 ",16,16,7,127,24,null,null,ValTab24,512);\r
-       ht[28] = new huffcodetab("28 ",16,16,8,255,24,null,null,ValTab24,512);  \r
+    ht[28] = new huffcodetab("28 ",16,16,8,255,24,null,null,ValTab24,512);  \r
     ht[29] = new huffcodetab("29 ",16,16,9,511,24,null,null,ValTab24,512);\r
     ht[30] = new huffcodetab("30 ",16,16,11,2047,24,null,null,ValTab24,512);\r
     ht[31] = new huffcodetab("31 ",16,16,13,8191,24,null,null,ValTab24,512);\r