having new variable 'inter' in-between "reorder/antialias" and "hybrid" in order...
[IRC.git] / Robust / src / Tests / ssJava / mp3decoder / LayerIDecoder.java
index 37839b07c28f7ae0480ab8b84fb9c0e2d9335a1d..ef79a880fa275793e234d15ee4cfed8b835fdb17 100644 (file)
 /**
  * Implements decoding of MPEG Audio Layer I frames.
  */
-@LATTICE("SB<H,H<SH,SH*,SB*")
+@LATTICE("SB1<SB,SB<F,F<H,H<SH,SH*,SB1*")
 @METHODDEFAULT("MODE<THIS,THIS<C,C<IN,THISLOC=THIS,C*")
 class LayerIDecoder implements FrameDecoder {
 
-  @LOC("H")
+  @LOC("SH")
   protected Bitstream stream;
   @LOC("SH")
   protected Header header;
-  @LOC("H")
+  @LOC("F")
   protected SynthesisFilter filter1;
-  @LOC("H")
+  @LOC("F")
   protected SynthesisFilter filter2;
-  @LOC("SB")
+  @LOC("H")
   protected Obuffer buffer;
   @LOC("H")
   protected int which_channels;
-  @LOC("SH")
+  @LOC("H")
   protected int mode;
 
-  @LOC("SB")
+  @LOC("H")
   protected int num_subbands;
   @LOC("SB")
   protected Subband[] subbands;
@@ -90,7 +90,7 @@ class LayerIDecoder implements FrameDecoder {
   }
 
   protected void createSubbands() {
-    @LOC("THIS,LayerIDecoder.SB") int i;
+    @LOC("THIS,LayerIDecoder.H") int i;
     if (mode == Header.SINGLE_CHANNEL) {
       for (i = 0; i < num_subbands; ++i) {
         subbands[i] = new SubbandLayer1(i);
@@ -128,13 +128,13 @@ class LayerIDecoder implements FrameDecoder {
   @LATTICE("MODE<THIS,THIS<C,THISLOC=THIS,C*")
   protected void readSampleData() {
 
-    @LOC("THIS,LayerIDecoder.SB") boolean read_ready = false;
-    @LOC("THIS,LayerIDecoder.SB") boolean write_ready = false;
+    @LOC("THIS,LayerIDecoder.SB1") boolean read_ready = false;
+    @LOC("THIS,LayerIDecoder.SB1") boolean write_ready = false;
 
     @LOC("MODE") int mode = header.mode(); // header.mode() will return
                                            // DELTA(THIS)
 
-    @LOC("THIS,LayerIDecoder.SB") int i;
+    @LOC("THIS,LayerIDecoder.SB1") int i;
     do {
 
       for (i = 0; i < num_subbands; ++i) {
@@ -161,12 +161,11 @@ class LayerIDecoder implements FrameDecoder {
    * Class for layer I subbands in single channel mode. Used for single channel
    * mode and in derived class for intensity stereo mode
    */
-  @LATTICE("S<L,L<H,H<SH,SH*,S*")
+  @LATTICE("S<L,L<H,H<SH,SH<SH0,SH*,L*")
   @METHODDEFAULT("OUT<V,V<THIS,THIS<C,C<IN,C*,THISLOC=THIS,RETURNLOC=OUT")
   static class SubbandLayer1 extends Subband {
 
     // Factors and offsets for sample requantization
-    @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),
@@ -176,7 +175,6 @@ class LayerIDecoder implements FrameDecoder {
         (1.0f / 4096.0f) * (8192.0f / 8191.0f), (1.0f / 8192.0f) * (16384.0f / 16383.0f),
         (1.0f / 16384.0f) * (32768.0f / 32767.0f) };
 
-    @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),
@@ -199,7 +197,7 @@ class LayerIDecoder implements FrameDecoder {
     protected float scalefactor;
     @LOC("L")
     protected int samplelength;
-    @LOC("S")
+    @LOC("L")
     protected float sample;
     @LOC("L")
     protected float factor;
@@ -250,8 +248,8 @@ class LayerIDecoder implements FrameDecoder {
     }
 
     // ssjava
-    @LATTICE("THIS<IN,THISLOC=THIS,RETURNLOC=THIS")
-    // THIS,LayerIDecoder$SubbandLayer1.S
+    @LATTICE("THIS<IN,THISLOC=THIS")
+    @RETURNLOC("THIS,LayerIDecoder$SubbandLayer1.S")
     public boolean read_sampledata(@LOC("THIS,LayerIDecoder$SubbandLayer1.S") Bitstream stream) {
       if (allocation != 0) {
         sample = (float) (stream.get_bits(samplelength));
@@ -263,10 +261,14 @@ class LayerIDecoder implements FrameDecoder {
       return false;
     }
 
-    public boolean put_next_sample(@LOC("IN") int channels, @LOC("IN") SynthesisFilter filter1,
-        @LOC("IN") SynthesisFilter filter2) {
+    // @METHODDEFAULT("OUT<V,V<THIS,THIS<C,C<IN,C*,THISLOC=THIS,RETURNLOC=OUT")
+    @LATTICE("THIS<IN,OUT,THISLOC=THIS,RETURNLOC=OUT")
+    public boolean put_next_sample(@LOC("IN") int channels,
+        @LOC("THIS,LayerIDecoder$SubbandLayer1.S") SynthesisFilter filter1,
+        @LOC("THIS,LayerIDecoder$SubbandLayer1.S") SynthesisFilter filter2) {
       if ((allocation != 0) && (channels != OutputChannels.RIGHT_CHANNEL)) {
-        @LOC("OUT") float scaled_sample = (sample * factor + offset) * scalefactor;
+        @LOC("THIS,LayerIDecoder$SubbandLayer1.L") float scaled_sample =
+            (sample * factor + offset) * scalefactor;
         filter1.input_sample(scaled_sample, subbandnumber);
       }
       return true;
@@ -276,7 +278,7 @@ class LayerIDecoder implements FrameDecoder {
   /**
    * Class for layer I subbands in joint stereo mode.
    */
-  @LATTICE("S<L,L<H,H<SH,SH*")
+  @LATTICE("S<L,L<H,H<SH,SH<SH0,SH*")
   @METHODDEFAULT("OUT<V,V<THIS,THIS<C,C<IN,C*,THISLOC=THIS,RETURNLOC=OUT")
   static class SubbandLayer1IntensityStereo extends SubbandLayer1 {
     @LOC("L")
@@ -292,8 +294,9 @@ class LayerIDecoder implements FrameDecoder {
     /**
           *
           */
-    public void read_allocation(@LOC("IN") Bitstream stream, @LOC("IN") Header header,
-        @LOC("IN") Crc16 crc) throws DecoderException {
+    @LATTICE("THIS<IN2,IN2<IN1,IN1<IN0,THISLOC=THIS")
+    public void read_allocation(@LOC("IN1") Bitstream stream, @LOC("IN0") Header header,
+        @LOC("IN2") Crc16 crc) throws DecoderException {
       super.read_allocation(stream, header, crc);
     }
 
@@ -335,7 +338,7 @@ class LayerIDecoder implements FrameDecoder {
   /**
    * Class for layer I subbands in stereo mode.
    */
-  @LATTICE("S<L,L<H,H<SH,SH*,S*")
+  @LATTICE("S<L,L<H,H<SH,SH<SH0,SH*,S*")
   @METHODDEFAULT("OUT<V,V<THIS,THIS<C,C<IN,C*,THISLOC=THIS,RETURNLOC=OUT")
   static class SubbandLayer1Stereo extends SubbandLayer1 {
     @LOC("H")
@@ -361,8 +364,10 @@ class LayerIDecoder implements FrameDecoder {
     /**
           *
           */
-    public void read_allocation(@LOC("IN") Bitstream stream, @LOC("IN") Header header,
-        @LOC("IN") Crc16 crc) throws DecoderException {
+    // ssjava
+    public void read_allocation(@LOC("THIS,LayerIDecoder$SubbandLayer1Stereo.SH") Bitstream stream,
+        @LOC("IN") Header header, @LOC("THIS,LayerIDecoder$SubbandLayer1Stereo.L") Crc16 crc)
+        throws DecoderException {
       allocation = stream.get_bits(4);
       channel2_allocation = stream.get_bits(4);
       if (crc != null) {
@@ -394,9 +399,10 @@ class LayerIDecoder implements FrameDecoder {
     /**
           *
           */
-    @RETURNLOC("OUT")
-    public boolean read_sampledata(@LOC("IN") Bitstream stream) {
-      @LOC("OUT") boolean returnvalue = super.read_sampledata(stream);
+    @RETURNLOC("THIS,LayerIDecoder$SubbandLayer1Stereo.S")
+    public boolean read_sampledata(@LOC("THIS,LayerIDecoder$SubbandLayer1Stereo.S") Bitstream stream) {
+      @LOC("THIS,LayerIDecoder$SubbandLayer1Stereo.S") boolean returnvalue =
+          super.read_sampledata(stream);
       if (channel2_allocation != 0) {
         channel2_sample = (float) (stream.get_bits(channel2_samplelength));
       }