+ /**
+ * Constructor.
+ */
+ // REVIEW: these constructor arguments should be moved to the
+ // decodeFrame() method, where possible, so that one
+ // @LATTICE("THIS<VAR,THIS<I,THIS<J,J<CH,I*,J*,CH*,THISLOC=THIS,GLOBALLOC=THIS")
+ // public LayerIIIDecoder(@LOC("VAR") Header header0, @LOC("VAR")
+ // SynthesisFilter filtera,
+ // @LOC("VAR") SynthesisFilter filterb, @LOC("VAR") int which_ch0) {
+ //
+ // huffcodetab.inithuff();
+ // is_1d = new int[SBLIMIT * SSLIMIT + 4];
+ // ro = new float[2][SBLIMIT][SSLIMIT];
+ // lr = new float[2][SBLIMIT][SSLIMIT];
+ // out_1d = new float[SBLIMIT * SSLIMIT];
+ // prevblck = new float[2][SBLIMIT * SSLIMIT];
+ // k = new float[2][SBLIMIT * SSLIMIT];
+ // nonzero = new int[2];
+ //
+ // // removes unnecessary aliases
+ // // III_scalefact_t
+ // // III_scalefac_t = new temporaire2[2];
+ // // III_scalefac_t[0] = new temporaire2();
+ // // III_scalefac_t[1] = new temporaire2();
+ // // scalefac = III_scalefac_t;
+ //
+ // scalefac = new temporaire2[2];
+ // scalefac[0] = new temporaire2();
+ // scalefac[1] = new temporaire2();
+ //
+ // // L3TABLE INIT
+ //
+ // sfBandIndex = new SBI[9]; // SZD: MPEG2.5 +3 indices
+ // @LOC("VAR") int[] l0 =
+ // { 0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238,
+ // 284, 336, 396,
+ // 464, 522, 576 };
+ // @LOC("VAR") int[] s0 = { 0, 4, 8, 12, 18, 24, 32, 42, 56, 74, 100, 132,
+ // 174, 192 };
+ // @LOC("VAR") int[] l1 =
+ // { 0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 114, 136, 162, 194, 232,
+ // 278, 330, 394,
+ // 464, 540, 576 };
+ // @LOC("VAR") int[] s1 = { 0, 4, 8, 12, 18, 26, 36, 48, 62, 80, 104, 136,
+ // 180, 192 };
+ // @LOC("VAR") int[] l2 =
+ // { 0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238,
+ // 284, 336, 396,
+ // 464, 522, 576 };
+ // @LOC("VAR") int[] s2 = { 0, 4, 8, 12, 18, 26, 36, 48, 62, 80, 104, 134,
+ // 174, 192 };
+ //
+ // @LOC("VAR") int[] l3 =
+ // { 0, 4, 8, 12, 16, 20, 24, 30, 36, 44, 52, 62, 74, 90, 110, 134, 162, 196,
+ // 238, 288, 342,
+ // 418, 576 };
+ // @LOC("VAR") int[] s3 = { 0, 4, 8, 12, 16, 22, 30, 40, 52, 66, 84, 106, 136,
+ // 192 };
+ // @LOC("VAR") int[] l4 =
+ // { 0, 4, 8, 12, 16, 20, 24, 30, 36, 42, 50, 60, 72, 88, 106, 128, 156, 190,
+ // 230, 276, 330,
+ // 384, 576 };
+ // @LOC("VAR") int[] s4 = { 0, 4, 8, 12, 16, 22, 28, 38, 50, 64, 80, 100, 126,
+ // 192 };
+ // @LOC("VAR") int[] l5 =
+ // { 0, 4, 8, 12, 16, 20, 24, 30, 36, 44, 54, 66, 82, 102, 126, 156, 194, 240,
+ // 296, 364, 448,
+ // 550, 576 };
+ // @LOC("VAR") int[] s5 = { 0, 4, 8, 12, 16, 22, 30, 42, 58, 78, 104, 138,
+ // 180, 192 };
+ // // SZD: MPEG2.5
+ // @LOC("VAR") int[] l6 =
+ // { 0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238,
+ // 284, 336, 396,
+ // 464, 522, 576 };
+ // @LOC("VAR") int[] s6 = { 0, 4, 8, 12, 18, 26, 36, 48, 62, 80, 104, 134,
+ // 174, 192 };
+ // @LOC("VAR") int[] l7 =
+ // { 0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238,
+ // 284, 336, 396,
+ // 464, 522, 576 };
+ // @LOC("VAR") int[] s7 = { 0, 4, 8, 12, 18, 26, 36, 48, 62, 80, 104, 134,
+ // 174, 192 };
+ // @LOC("VAR") int[] l8 =
+ // { 0, 12, 24, 36, 48, 60, 72, 88, 108, 132, 160, 192, 232, 280, 336, 400,
+ // 476, 566, 568,
+ // 570, 572, 574, 576 };
+ // @LOC("VAR") int[] s8 = { 0, 8, 16, 24, 36, 52, 72, 96, 124, 160, 162, 164,
+ // 166, 192 };
+ //
+ // sfBandIndex[0] = new SBI(l0, s0);
+ // sfBandIndex[1] = new SBI(l1, s1);
+ // sfBandIndex[2] = new SBI(l2, s2);
+ //
+ // sfBandIndex[3] = new SBI(l3, s3);
+ // sfBandIndex[4] = new SBI(l4, s4);
+ // sfBandIndex[5] = new SBI(l5, s5);
+ // // SZD: MPEG2.5
+ // sfBandIndex[6] = new SBI(l6, s6);
+ // sfBandIndex[7] = new SBI(l7, s7);
+ // sfBandIndex[8] = new SBI(l8, s8);
+ // // END OF L3TABLE INIT
+ //
+ // if (reorder_table == null) { // SZD: generate LUT
+ // reorder_table = new int[9][];
+ // for (@LOC("I") int i = 0; i < 9; i++)
+ // reorder_table[i] = reorder(sfBandIndex[i].s);
+ // }
+ //
+ // // Sftable
+ // @LOC("VAR") int[] ll0 = { 0, 6, 11, 16, 21 };
+ // @LOC("VAR") int[] ss0 = { 0, 6, 12 };
+ // sftable = new Sftable(ll0, ss0);
+ // // END OF Sftable
+ //
+ // // scalefac_buffer
+ // scalefac_buffer = new int[54];
+ // // END OF scalefac_buffer
+ //
+ // // header = header0;
+ // filter1 = filtera;
+ // filter2 = filterb;
+ // // buffer = buffer0;
+ // which_channels = which_ch0;
+ //
+ // frame_start = 0;
+ // channels = (header.mode() == Header.SINGLE_CHANNEL) ? 1 : 2;
+ // max_gr = (header.version() == Header.MPEG1) ? 2 : 1;
+ //
+ // sfreq =
+ // header.sample_frequency()
+ // + ((header.version() == Header.MPEG1) ? 3 : (header.version() ==
+ // Header.MPEG25_LSF) ? 6
+ // : 0); // SZD
+ //
+ // if (channels == 2) {
+ // switch (which_channels) {
+ // case OutputChannels.LEFT_CHANNEL:
+ // case OutputChannels.DOWNMIX_CHANNELS:
+ // first_channel = last_channel = 0;
+ // break;
+ //
+ // case OutputChannels.RIGHT_CHANNEL:
+ // first_channel = last_channel = 1;
+ // break;
+ //
+ // case OutputChannels.BOTH_CHANNELS:
+ // default:
+ // first_channel = 0;
+ // last_channel = 1;
+ // break;
+ // }
+ // } else {
+ // first_channel = last_channel = 0;
+ // }
+ //
+ // for (@LOC("CH") int ch = 0; ch < 2; ch++)
+ // for (@LOC("J") int j = 0; j < 576; j++)
+ // prevblck[ch][j] = 0.0f;
+ //
+ // nonzero[0] = nonzero[1] = 576;
+ //
+ // br = new BitReserve();
+ // si = new III_side_info_t();
+ // }
+