ClassDescriptor cd = md.getClassDesc();
- // check arguments
- Set<CompositeLocation> glbInputSet = new HashSet<CompositeLocation>();
- for (int i = 0; i < con.numArgs(); i++) {
- ExpressionNode en = con.getArg(i);
- CompositeLocation argLoc =
- checkLocationFromExpressionNode(md, nametable, en, new CompositeLocation());
- glbInputSet.add(argLoc);
- addLocationType(en.getType(), argLoc);
- }
-
- // check array initializers
- // if ((con.getArrayInitializer() != null)) {
- // checkLocationFromArrayInitializerNode(md, nametable,
- // con.getArrayInitializer());
- // }
-
- if (glbInputSet.size() > 0) {
- return CompositeLattice.calculateGLB(glbInputSet);
- }
-
CompositeLocation compLoc = new CompositeLocation();
compLoc.addLocation(Location.createTopLocation(md));
return compLoc;
srcLocation = new CompositeLocation();
srcLocation = checkLocationFromExpressionNode(md, nametable, an.getSrc(), srcLocation);
- // System.out.println(" an= " + an.printNode(0) + " an.getSrc()=" +
- // an.getSrc().getClass()
- // + " at " + cd.getSourceFileName() + "::" + an.getNumLine());
- // System.out.println("srcLocation=" + srcLocation);
- // System.out.println("dstLocation=" + destLocation);
+ System.out.println("\n an= " + an.printNode(0) + " an.getSrc()=" +
+ an.getSrc().getClass()
+ + " at " + cd.getSourceFileName() + "::" + an.getNumLine());
+ System.out.println("srcLocation=" + srcLocation);
+ System.out.println("dstLocation=" + destLocation);
if (!CompositeLattice.isGreaterThan(srcLocation, destLocation, generateErrorMessage(cd, an))) {
throw new Error("The value flow from " + srcLocation + " to " + destLocation
* @version 0.0.7 12/12/99\r
* @since 0.0.5\r
*/\r
-@LATTICE("ST,OUT,FIL,DE,O,EQ,PA,INIT,DE*")\r
+@LATTICE("ST,OUT,FIL,DE<LA,O,EQ,PA,INIT,DE*")\r
public class Decoder implements DecoderErrors\r
{\r
static private final Params DEFAULT_PARAMS = new Params();\r
// initialize(header,stream);\r
// }\r
\r
- @LOC("DELTA(TH)") int layer = header.layer();\r
+ @LOC("TH") int layer = header.layer();\r
\r
output.clear_buffer();\r
\r
- @LOC("TH,Decoder.DE") FrameDecoder decoder = retrieveDecoder(header, stream, layer);\r
- decoder.decodeFrame();\r
+// @LOC("DE,Decoder.DE") FrameDecoder decoder = retrieveDecoder(header, stream, layer); // return ceil=DELTA(TH)\r
+// decoder.decodeFrame();\r
\r
if(layer==3){\r
- l3decoder=(LayerIIIDecoder)decoder;\r
+ if (l3decoder==null)\r
+ {\r
+ l3decoder = new LayerIIIDecoder(stream, \r
+ header, filter1, filter2, \r
+ output, OutputChannels.BOTH_CHANNELS);\r
+ } \r
+ l3decoder.decodeFrame();\r
}else if(layer==2){\r
- l2decoder=(LayerIIDecoder)decoder;\r
+ if (l2decoder==null)\r
+ {\r
+ l2decoder = new LayerIIDecoder();\r
+ l2decoder.create(stream, \r
+ header, filter1, filter2, \r
+ output, OutputChannels.BOTH_CHANNELS); \r
+ }\r
+ l2decoder.decodeFrame();\r
}else{\r
- l1decoder=(LayerIDecoder)decoder;\r
+ if (l1decoder==null)\r
+ {\r
+ l1decoder = new LayerIDecoder();\r
+ l1decoder.create(stream, \r
+ header, filter1, filter2, \r
+ output, OutputChannels.BOTH_CHANNELS); \r
+ }\r
+ l1decoder.decodeFrame();\r
}\r
- \r
+\r
output.write_buffer(1);\r
\r
return output; \r
return new DecoderException(errorcode, throwable);\r
}\r
\r
- @LATTICE("DE<IN,THISLOC=IN")\r
- @RETURNLOC("DE")\r
+ @LATTICE("IN,TH,THISLOC=TH")\r
+ @RETURNLOC("TH")\r
protected FrameDecoder retrieveDecoder(@LOC("IN") Header header, @LOC("IN") Bitstream stream, @LOC("IN") int layer)\r
throws DecoderException\r
{\r
- @LOC("DE") FrameDecoder decoder = null;\r
+// @LOC("DE") FrameDecoder decoder = null;\r
\r
// REVIEW: allow channel output selection type\r
// (LEFT, RIGHT, BOTH, DOWNMIX)\r
output, OutputChannels.BOTH_CHANNELS);\r
} \r
\r
- decoder = l3decoder;\r
+ return l3decoder;\r
+// decoder = l3decoder;\r
break;\r
case 2:\r
if (l2decoder==null)\r
header, filter1, filter2, \r
output, OutputChannels.BOTH_CHANNELS); \r
}\r
- decoder = l2decoder;\r
+ return l2decoder;\r
+// decoder = l2decoder;\r
break;\r
case 1:\r
if (l1decoder==null)\r
header, filter1, filter2, \r
output, OutputChannels.BOTH_CHANNELS); \r
}\r
- decoder = l1decoder;\r
+ return l1decoder;\r
+// decoder = l1decoder;\r
break;\r
}\r
- \r
- if (decoder==null)\r
- {\r
- throw newDecoderException(UNSUPPORTED_LAYER, null);\r
- }\r
- \r
- return decoder;\r
+// \r
+// if (decoder==null)\r
+// {\r
+// throw newDecoderException(UNSUPPORTED_LAYER, null);\r
+// }\r
+// \r
+// return decoder;\r
}\r
\r
public void initialize(Header header, Bitstream stream)\r
@LOC("H") protected SynthesisFilter filter2;
@LOC("H") protected Obuffer buffer;
@LOC("H") protected int which_channels;
- @LOC("H") protected int mode;
+ @LOC("SH") protected int mode;
@LOC("SH") protected int num_subbands;
@LOC("L") protected Subband[] subbands;
protected void readSampleData()
{
- @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)
- read_ready = subbands[i].read_sampledata(stream);
- do
- {
- for (i = 0; i < num_subbands; ++i)
- write_ready = subbands[i].put_next_sample(which_channels,filter1, filter2);
+ @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)
+ read_ready = subbands[i].read_sampledata(stream); // DELTA[Loc[readSampleData.V],Loc[LayerIDecoder.L]]
+ do
+ {
+ for (i = 0; i < num_subbands; ++i)
+ write_ready = subbands[i].put_next_sample(which_channels,filter1, filter2);
+
+ filter1.calculate_pcm_samples(buffer);
+ if ((which_channels == OutputChannels.BOTH_CHANNELS) && (mode != Header.SINGLE_CHANNEL))
+ filter2.calculate_pcm_samples(buffer);
+ } while (!write_ready);
+ } while (!read_ready);
- filter1.calculate_pcm_samples(buffer);
- if ((which_channels == OutputChannels.BOTH_CHANNELS) && (mode != Header.SINGLE_CHANNEL))
- filter2.calculate_pcm_samples(buffer);
- } while (!write_ready);
- } while (!read_ready);
-
}
// /**
/**
*
*/
- @LATTICE("OUT<V,V<SH,SH<TEMP,TEMP<TMP,TMP<THIS,THIS<IN,SH*,TEMP*,TMP*,THISLOC=THIS,GLOBALLOC=IN")
+ @LATTICE("OUT<V,V<TEMP,TEMP<SH,TEMP<TMP,TMP<THIS,THIS<IN,SH*,TEMP*,TMP*,THISLOC=THIS,GLOBALLOC=IN")
@RETURNLOC("V")
public boolean read_sampledata (@LOC("IN") Bitstream stream)
{
get_side_info();
for (i = 0; i < nSlots; i++)
- br.hputbuf(stream.get_bits(8)); // br < stream
-
- // br < main_data_end
- main_data_end = br.hsstell() >>> 3; // of previous frame
-
+ br.hputbuf(stream.get_bits(8));
+
+ main_data_end = br.hsstell() >>> 3;
if ((flush_main = (br.hsstell() & 7)) != 0) { // flush_main < br
br.hgetbits(8 - flush_main); // br < flush_main
new_v15 = p15;\r
new_v13 = p15 + p7;\r
new_v11 = p15 + p7 + p11;\r
- new_v5 = new_v11 + p5 + p13;\r
+ new_v5 = p15 + p7 + p11 + p5 + p13;\r
\r
// new_v7 = (new_v9 = p15 + p11 + p3) + p13;\r
new_v9 = p15 + p11 + p3;\r