* 18/06/01 Michael Scheerer, Fixed bugs which causes
* negative indexes in method huffmann_decode and in method
* dequanisize_sample.
- *\r
+ *
* 16/07/01 Michael Scheerer, Catched a bug in method
* huffmann_decode, which causes an outOfIndexException.
* Cause : Indexnumber of 24 at SfBandIndex,
*----------------------------------------------------------------------
*/
-
/**
* Class Implementing Layer 3 Decoder.
*
* @since 0.0
*/
-@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,NS<SI,SI<CH,SFREQ<H,MAX<H,H<CH,FLCH<CH,FLCH<WC,SF<SFT,SFT<NS,NS<C,TS<RAW,O<TS,LY<F,NZ<VAR,C*,FS*,IP*,IR*,LR*,K*,O*,TS*,TS<BT,BT<GR,GR<SI,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*,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*,VAR<HD3,HD3<HD2,HD2<HD1,HD1<SI,HD1<SFREQ,HD1<RAW,HD2*,HD3*,SFB<GLSFD5,GLSFD5<NS,GLSFD5<GLSFD4,NS<GLSFD3,GLSFD4<GLSFD3,GLSFD3<GLSFD2,GLSFD2<GLSFD1,GLSFD1<SI,GLSFD5*,SF<GLSFF4,GLSFF4<GLSFF3,GLSFF3<GLSFF2,GLSFF2<GLSFF1,GLSFF1<SI,GLSFF4*,GLSFF3*,GLSFF2*,SF<GSF5,GSF5<GSF4,GSF4<GSF3,GSF3<GSF2,GSF2<GSF1,GSF1<SI,GSF5*,GSF4*,O<D3,D3<D2,D2<D1,D1<FLCH,D1*,D2*")
-//4th line added for hybrid.
-//5th added for stereo
-//6th added for reorder method
-//7th added for huffman_decode method
-//8th added for get_LSF_scale_data
-//9th added for get_LSF_scale_factors
-//10th added for get_scale_factors
-//llth added for decode
+// @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,NS<SI,SI<CH,SFREQ<H,MAX<H,H<CH,FLCH<CH,FLCH<WC,SF<SFT,SFT<NS,NS<C,TS<RAW,O<TS,LY<F,NZ<VAR,C*,FS*,IP*,IR*,LR*,K*,O*,TS*,TS<BT,BT<GR,GR<SI,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*,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*,VAR<HD3,HD3<HD2,HD2<HD1,HD1<SI,HD1<SFREQ,HD1<RAW,HD2*,HD3*,SFB<GLSFD5,GLSFD5<NS,GLSFD5<GLSFD4,NS<GLSFD3,GLSFD4<GLSFD3,GLSFD3<GLSFD2,GLSFD2<GLSFD1,GLSFD1<SI,GLSFD5*,SF<GLSFF4,GLSFF4<GLSFF3,GLSFF3<GLSFF2,GLSFF2<GLSFF1,GLSFF1<SI,GLSFF4*,GLSFF3*,GLSFF2*,SF<GSF5,GSF5<GSF4,GSF4<GSF3,GSF3<GSF2,GSF2<GSF1,GSF1<SI,GSF5*,GSF4*,O<D3,D3<D2,D2<D1,D1<FLCH,D1*,D2*")
+// 4th line added for hybrid.
+// 5th added for stereo
+// 6th added for reorder method
+// 7th added for huffman_decode method
+// 8th added for get_LSF_scale_data
+// 9th added for get_LSF_scale_factors
+// 10th added for get_scale_factors
+// llth added for decode
+// @LATTICE("IS1D*,RO<IS1D,IS1D<SI2,SI2<SI1,SI<P2S,SF1<CH0,SF0*,SFB_SH<NS,NS<SI,SFB_SH*,SFB<SFB_SH,C,C*,SI1<SF2,SF2<SFB,SF1<BR,LR*,OUT<LR,LR<RO,NZ*,SI<SF1,SI1<NZ,NZ<SI,SI1<SBI,SBI<SI,BUF<FT,SF1<SF0,SF0<HD1,BR<ST,ST,FT<SP,SP<OUT,OUT<SI1,SI1<SI,P2S<CH0,CH0<MAX0,MAX0<BR1,FS<BR1,BR1<BR,BR<HD1,HD1<HD,OUT*,BR1*,SI1*,MAX0*,CH0*,RAW,TS,F,C,K,LY,VAR,IR,IP,CSH,GLSFD3,GLSFD4,GLSFD5,GLSFF4,GLSFF2,GLSFF3,GLSFF1,GSF4,GSF5,GSF1,GSF2,GSF3,HD2,HD3,BT,GR,RO6,RO5,RO9,RO8,RO7,RO4,RO1,RO3,RO2,SH,ME,TMP2,S,LSF,J")
+@LATTICE("ISR*,ISP*,LR<ISR,ISR<ISP,SI1<SF2,NS*,HD<ST,IS1D*,RO1<RO,RO1*,RO<IS1D,IS1D<SI2,SI2<SI1,BR<NS,NS<SI,SFB_SH*,SFB<SFB_SH,C,C*,SF2<SFB,LR*,OUT<LR,ISP<RO1,NZ*,SI<SF1,BR1<NZ,NZ<BR,SI1<RT,RT<SBI,SBI<SI,BUF<FT,SF1<CH0,CH0<HD1,FT<SP,SP<OUT,OUT<SI1,SI1<SI,SFB_SH<BR1,BR1<BR,HD1<HD,OUT*,BR1*,SI1*,CH0*,RAW,TS,F,C,K,LY,VAR,IR,IP,CSH,GLSFD3,GLSFD4,GLSFD5,GLSFF4,GLSFF2,GLSFF3,GLSFF1,GSF4,GSF5,GSF1,GSF2,GSF3,HD2,HD3,BT,GR,RO6,RO5,RO9,RO8,RO7,RO4,RO1,RO3,RO2,SH,ME,TMP2,S,LSF,J")
@METHODDEFAULT("OUT<V,V<THIS,THIS<SH,SH<IN,SH*,THISLOC=THIS,GLOBALLOC=IN")
final class LayerIIIDecoder implements FrameDecoder {
- @LOC("F") final double d43 = (4.0 / 3.0);
- @LOC("SFT") public int[] scalefac_buffer;
+ static final double d43 = (4.0 / 3.0);
+ @LOC("SFB")
+ public int[] scalefac_buffer;
// MDM: removed, as this wasn't being used.
// private float CheckSumOut1d = 0.0f;
- @LOC("CSH") private int CheckSumHuff = 0;
- @LOC("VAR") private int[] is_1d;
- @LOC("VAR") private float[][][] ro;
- @LOC("LR") private float[][][] lr;
- @LOC("O") private float[] out_1d; // 576 samples
- @LOC("VAR") private float[][] prevblck;
- @LOC("K") private float[][] k;
- @LOC("NZ") private int[] nonzero;
- @LOC("F") private Bitstream stream;
- @LOC("H") private Header header;
- @LOC("F") private SynthesisFilter filter1;
- @LOC("F") private SynthesisFilter filter2;
- @LOC("F") private Obuffer buffer; // output buffer
- @LOC("WC") private int which_channels;
- @LOC("BR") private BitReserve br;
- @LOC("SI") private III_side_info_t si;
-
-// @LOC("SBT") private temporaire2[] III_scalefac_t;
- @LOC("SF") private temporaire2[] scalefac;
+ @LOC("SI1")
+ private int CheckSumHuff = 0;
+ @LOC("IS1D")
+ private int[] is_1d;
+ @LOC("RO")
+ private float[][][] ro;
+ @LOC("LR")
+ private float[][][] lr;
+ @LOC("OUT")
+ private float[] out_1d; // 576 samples
+ @LOC("OUT")
+ private float[][] prevblck;
+ @LOC("LR")
+ private float[][] k;
+ @LOC("NZ")
+ private int[] nonzero;
+ @LOC("ST")
+ private Bitstream stream;
+ @LOC("HD")
+ private Header header;
+ @LOC("FT")
+ private SynthesisFilter filter1;
+ @LOC("FT")
+ private SynthesisFilter filter2;
+ @LOC("SP")
+ private Obuffer buffer; // output buffer
+ @LOC("CH0")
+ private int which_channels;
+ @LOC("BR")
+ private BitReserve br;
+ @LOC("SI")
+ private III_side_info_t si;
+
+ // @LOC("SBT") private temporaire2[] III_scalefac_t;
+ @LOC("SF2")
+ private temporaire2[] scalefac;
// private III_scalefac_t scalefac;
- @LOC("MAX") private int max_gr;
- @LOC("FS") private int frame_start;
- @LOC("F") private int part2_start;
- @LOC("CH") private int channels;
- @LOC("FLCH") private int first_channel;
- @LOC("FLCH") private int last_channel;
- @LOC("SFREQ") private int sfreq;
+ @LOC("CH0")
+ private int max_gr;
+ @LOC("CH0")
+ private int frame_start;
+ // @LOC("SI1") private int part2_start;
+ @LOC("CH0")
+ private int channels;
+ @LOC("CH0")
+ private int first_channel;
+ @LOC("CH0")
+ private int last_channel;
+ @LOC("SBI")
+ private int sfreq;
/**
* 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") Bitstream stream0, @LOC("VAR") Header header0, @LOC("VAR") SynthesisFilter filtera,
- @LOC("VAR") SynthesisFilter filterb, @LOC("VAR") Obuffer buffer0, @LOC("VAR") int which_ch0) {
-
+ @LATTICE("THIS<VAR,THIS<I,THIS<J,J<CH,I*,J*,CH*,THISLOC=THIS,GLOBALLOC=THIS")
+ public LayerIIIDecoder(@LOC("VAR") Bitstream stream0, @LOC("VAR") Header header0,
+ @LOC("VAR") SynthesisFilter filtera, @LOC("VAR") SynthesisFilter filterb,
+ @LOC("VAR") Obuffer buffer0, @LOC("VAR") int which_ch0) {
+
huffcodetab.inithuff();
is_1d = new int[SBLIMIT * SSLIMIT + 4];
ro = new float[2][SBLIMIT][SSLIMIT];
k = new float[2][SBLIMIT * SSLIMIT];
nonzero = new int[2];
- //removes unnecessary aliases
+ // 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];
+ // 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
/**
* Notify decoder that a seek is being made.
*/
- @LATTICE("THIS<J,J<CH,J*,CH*,THISLOC=THIS,GLOBALLOC=THIS")
+ @LATTICE("THIS<J,J<CH,J*,CH*,THISLOC=THIS,GLOBALLOC=THIS")
public void seek_notify() {
frame_start = 0;
for (@LOC("CH") int ch = 0; ch < 2; ch++)
// subband samples are buffered and passed to the
// SynthesisFilter in one go.
- @LOC("SAM") private float[] samples1 = new float[32];
- @LOC("SAM") private float[] samples2 = new float[32];
-
- /* location hierarchy of decode()
-{header} {stream} {si}
-{br, flush_main, main_data_end,frame_start,nSlots,bytes_to_discard}*
-{gr,max_gr} // granule
-{ch,channels,first_channel, last_channel, which_channels} // channel
-{part2_start}
-{sb18, ss}
-{out_1d}*
-{sb}*
-{samples1,sample2} {filter1,filter2}
+ @LOC("SP")
+ private float[] samples1 = new float[32];
+ @LOC("SP")
+ private float[] samples2 = new float[32];
+
+ /*
+ * location hierarchy of decode() {header} {stream} {si} {br, flush_main,
+ * main_data_end,frame_start,nSlots,bytes_to_discard}* {gr,max_gr} // granule
+ * {ch,channels,first_channel, last_channel, which_channels} // channel
+ * {part2_start} {sb18, ss} {out_1d}* {sb}* {samples1,sample2}
+ * {filter1,filter2}
*/
- @LATTICE("BYTE<THIS,THIS<MAIN,MAIN<VAR,THIS<GR,GR<VAR,BYTE*,GR*,THISLOC=THIS,GLOBALLOC=VAR")
+ // @LATTICE("BYTE<THIS,THIS<MAIN,MAIN<VAR,THIS<GR,GR<VAR,BYTE*,GR*,THISLOC=THIS,GLOBALLOC=VAR")
+ @LATTICE("VAR<THIS,C<THIS,THIS<IN,THISLOC=THIS,C*,VAR*")
public void decode() {
- @LOC("VAR") int nSlots = header.slots();
- @LOC("VAR") int flush_main;
- @LOC("GR") int gr;
- @LOC("THIS,LayerIIIDecoder.D1") int ch;
- @LOC("THIS,LayerIIIDecoder.D2") int ss;
- @LOC("THIS,LayerIIIDecoder.D3") int sb;
- @LOC("THIS,LayerIIIDecoder.D2") int sb18;
- @LOC("MAIN") int main_data_end;
- @LOC("BYTE") int bytes_to_discard;
- @LOC("VAR") int i;
+
+ @LOC("THIS,LayerIIIDecoder.HD1") int nSlots = header.slots();
+
+ @LOC("THIS,LayerIIIDecoder.CH0") int gr;
+ @LOC("THIS,LayerIIIDecoder.CH0") int ch;
+
+ @LOC("THIS,LayerIIIDecoder.CH0") int ss;
+ @LOC("THIS,LayerIIIDecoder.CH0") int sb;
+ @LOC("THIS,LayerIIIDecoder.CH0") int sb18;
+
+ @LOC("THIS,LayerIIIDecoder.BR,BitReserve.BIT") int main_data_end;
+ @LOC("THIS,LayerIIIDecoder.BR,BitReserve.BIT") int flush_main;
+
+ @LOC("THIS,LayerIIIDecoder.BR,BitReserve.BIT") int bytes_to_discard;
+ @LOC("C") int i;
get_side_info();
- for (i = 0; i < nSlots; i++)
- br.hputbuf(stream.get_bits(8)); // br < stream
+ for (i = 0; i < nSlots; i++) {
+ br.hputbuf(stream.get_bits(8));
+ // LOC(stream.get_bits)=DELTA[Loc[decode.THIS],Loc[LayerIIIDecoder.ST]]
+ // param should be higher than br
+ }
- // br < main_data_end
- main_data_end = br.hsstell() >>> 3; // of previous frame
-
+ main_data_end = br.hsstell() >>> 3;
if ((flush_main = (br.hsstell() & 7)) != 0) { // flush_main < br
br.hgetbits(8 - flush_main); // br < flush_main
- main_data_end++; // main_data_end*
+ main_data_end++; // main_data_end*
}
// bytes_to_discard < GLB(frame_start,main_data_end,si)
- // TODO does bytes_to_discard need to go back to si???
bytes_to_discard = frame_start - main_data_end - si.main_data_begin;
// frame_start should be *
frame_start += nSlots;
- if (bytes_to_discard < 0)
+ if (bytes_to_discard < 0) {
return;
+ }
- if (main_data_end > 4096) { // main_data_end should be > than 'frame_start' and 'br'
+ if (main_data_end > 4096) { // main_data_end should be > than 'frame_start'
+ // and 'br'
frame_start -= 4096;
br.rewindNbytes(4096);
}
- for (; bytes_to_discard > 0; bytes_to_discard--) // bytes_to_discard > br
+ for (; bytes_to_discard > 0; bytes_to_discard--) {
+ // bytes_to_discard > br
br.hgetbits(8);
-
+ }
+
// doing something from here
-
+
// here 'gr' and 'max_gr' should be higher than 'ch','channels', and more
- for (gr = 0; gr < max_gr; gr++) { // two granules per channel
- // in the loop body, access set={part2_start}
-
+ for (gr = 0; gr < max_gr; gr++) { // two granules per channel
+ // in the loop body, access set={part2_start}
+
// 'ch', 'channels' should be higher than all locs in the below body
- for (ch = 0; ch < channels; ch++) {
- part2_start = br.hsstell(); // part2_start < br
+ for (ch = 0; ch < channels; ch++) {
+ @LOC("THIS,LayerIIIDecoder.BR,BitReserve.BIT") int part2_start = br.hsstell(); // part2_start
+ // <
+ // br
- // grab scale factors from the main data.
+ // grab scale factors from the main data.
// following the scale factors is the actual compressed data
if (header.version() == Header.MPEG1)
get_scale_factors(ch, gr); // no need to care from this side
- // here move scale factor data from 'br' buffer to 'scalefac' field
+ // here move scale factor data from 'br' buffer to 'scalefac' field
else
// MPEG-2 LSF, SZD: MPEG-2.5 LSF
get_LSF_scale_factors(ch, gr); // no need to care from this side
- // here, decoding the compressed audio data
- huffman_decode(ch, gr); // no need to care from this side
+ // here, decoding the compressed audio data
+ huffman_decode(part2_start, ch, gr); // no need to care from this side
// System.out.println("CheckSum HuffMan = " + CheckSumHuff);
- dequantize_sample(ro[ch], ch, gr); // no need to care from this side
+ dequantize_sample(/* ro[ch], */ch, gr); // no need to care from this
+ // side
}
stereo(gr); // no need to care from this side
- if ((which_channels == OutputChannels.DOWNMIX_CHANNELS) && (channels > 1))
+ if ((which_channels == OutputChannels.DOWNMIX_CHANNELS) && (channels > 1)) {
do_downmix();
+ }
- for (ch = first_channel; ch <= last_channel; ch++) { // 'ch' and 'first_channel' > the body
+ for (ch = first_channel; ch <= last_channel; ch++) { // 'ch' and
+ // 'first_channel' >
+ // the body
// in the body
// read set= lr,ch,gr,out_1d, sb18, ss, SSLIMIT, out_1d
// write set= out_1d
-
- reorder(lr[ch], ch, gr);
+
+ reorder(/* lr[ch], */ch, gr);
antialias(ch, gr);
// for (int hb = 0;hb<576;hb++) CheckSumOut1d = CheckSumOut1d +
// out_1d[hb];
// out_1d[hb];
// System.out.println("CheckSumOut1d = "+CheckSumOut1d);
- for (sb18 = 18; sb18 < 576; sb18 += 36) // sb18 > ss, SSLIMIT, out1d
+ for (sb18 = 18; sb18 < 576; sb18 += 36) {
+ // sb18 > ss, SSLIMIT, out1d
// Frequency inversion
- for (ss = 1; ss < SSLIMIT; ss += 2) // 'ss','SSLIMIT' > out_1d
+ for (ss = 1; ss < SSLIMIT; ss += 2) {
+ // 'ss','SSLIMIT' > out_1d
out_1d[sb18 + ss] = -out_1d[sb18 + ss]; // out1d*
+ }
+ }
// 'ch', 'which_channels' should be higher than if/else body!
- // location set written by if/else body
- // = {samples1, samples2, filter1, filter2}
+ // location set written by if/else body
+ // = {samples1, samples2, filter1, filter2}
if ((ch == 0) || (which_channels == OutputChannels.RIGHT_CHANNEL)) {
for (ss = 0; ss < SSLIMIT; ss++) { // Polyphase synthesis
sb = 0;
* Reads the side info from the stream, assuming the entire. frame has been
* read already. Mono : 136 bits (= 17 bytes) Stereo : 256 bits (= 32 bytes)
*/
- @RETURNLOC("OUT")
+ @LATTICE("OUT<THIS,THISLOC=THIS,RETURNLOC=OUT")
private boolean get_side_info() {
- @LOC("IN") int ch;
- @LOC("IN") int gr;
+
+ @LOC("THIS,LayerIIIDecoder.CH0") int ch;
+ @LOC("THIS,LayerIIIDecoder.CH0") int gr;
+
if (header.version() == Header.MPEG1) {
si.main_data_begin = stream.get_bits(9);
- if (channels == 1)
+ if (channels == 1) {
si.private_bits = stream.get_bits(5);
- else
+ } else {
si.private_bits = stream.get_bits(3);
+ }
for (ch = 0; ch < channels; ch++) {
si.ch[ch].scfsi[0] = stream.get_bits(1);
*
*/
@LATTICE("THIS<IN,THISLOC=THIS,GLOBALLOC=IN")
- private void get_scale_factors(@LOC("IN") int ch, @LOC("IN") int gr) {
- @LOC("THIS,LayerIIIDecoder.GSF4") int sfb;
- @LOC("THIS,LayerIIIDecoder.GSF5") int window;
- @LOC("THIS,LayerIIIDecoder.GSF1") gr_info_s gr_info = (si.ch[ch].gr[gr]);
- @LOC("THIS,LayerIIIDecoder.GSF2") int scale_comp = gr_info.scalefac_compress;
- @LOC("THIS,LayerIIIDecoder.GSF3") int length0 = slen[0][scale_comp];
- @LOC("THIS,LayerIIIDecoder.GSF3") int length1 = slen[1][scale_comp];
-
- if ((gr_info.window_switching_flag != 0) && (gr_info.block_type == 2)) {
- if ((gr_info.mixed_block_flag) != 0) { // MIXED
+ private void get_scale_factors(@LOC("THIS,LayerIIIDecoder.CH0") int ch,
+ @LOC("THIS,LayerIIIDecoder.CH0") int gr) {
+
+ // gr_info_s gr_info = (si.ch[ch].gr[gr]); remove alias
+
+ @LOC("THIS,LayerIIIDecoder.NS") int sfb;
+ @LOC("THIS,LayerIIIDecoder.NS") int window;
+ @LOC("THIS,LayerIIIDecoder.NS") int scale_comp = si.ch[ch].gr[gr].scalefac_compress;
+ @LOC("THIS,LayerIIIDecoder.NS") int length0 = slen[0][scale_comp];
+ @LOC("THIS,LayerIIIDecoder.NS") int length1 = slen[1][scale_comp];
+
+ if ((si.ch[ch].gr[gr].window_switching_flag != 0) && (si.ch[ch].gr[gr].block_type == 2)) {
+ if ((si.ch[ch].gr[gr].mixed_block_flag) != 0) { // MIXED
for (sfb = 0; sfb < 8; sfb++)
- scalefac[ch].l[sfb] = br.hgetbits(slen[0][gr_info.scalefac_compress]);
+ scalefac[ch].l[sfb] = br.hgetbits(slen[0][si.ch[ch].gr[gr].scalefac_compress]);
for (sfb = 3; sfb < 6; sfb++)
for (window = 0; window < 3; window++)
- scalefac[ch].s[window][sfb] = br.hgetbits(slen[0][gr_info.scalefac_compress]);
+ scalefac[ch].s[window][sfb] = br.hgetbits(slen[0][si.ch[ch].gr[gr].scalefac_compress]);
for (sfb = 6; sfb < 12; sfb++)
for (window = 0; window < 3; window++)
- scalefac[ch].s[window][sfb] = br.hgetbits(slen[1][gr_info.scalefac_compress]);
+ scalefac[ch].s[window][sfb] = br.hgetbits(slen[1][si.ch[ch].gr[gr].scalefac_compress]);
for (sfb = 12, window = 0; window < 3; window++)
scalefac[ch].s[window][sfb] = 0;
*/
// MDM: new_slen is fully initialized before use, no need
// to reallocate array.
- @LOC("NS") private final int[] new_slen = new int[4];
-
- @LATTICE("THIS<IN,THIS<I,THIS<X,THIS<M,I*,X*,M*,THISLOC=THIS,GLOBALLOC=THIS")
- private void get_LSF_scale_data(@LOC("IN") int ch, @LOC("IN") int gr) {
+ @LOC("NS")
+ private final int[] new_slen = new int[4];
+
+ // ssjava
+ @LATTICE("M<THIS,THIS<IN,THIS<C,C*,M*,THISLOC=THIS,GLOBALLOC=THIS")
+ private void get_LSF_scale_data(@LOC("THIS,LayerIIIDecoder.CH0") int ch,
+ @LOC("THIS,LayerIIIDecoder.CH0") int gr) {
- @LOC("THIS,LayerIIIDecoder.GLSFD2") int scalefac_comp;
- @LOC("THIS,LayerIIIDecoder.GLSFD3") int int_scalefac_comp;
- @LOC("IN") int mode_ext = header.mode_extension();
- @LOC("M") int m;
- @LOC("THIS,LayerIIIDecoder.GLSFD4") int blocktypenumber;
- @LOC("THIS,LayerIIIDecoder.GLSFD4") int blocknumber = 0;
+ @LOC("THIS,LayerIIIDecoder.HD1") int mode_ext = header.mode_extension();
+ // @LOC("THIS,LayerIIIDecoder.GLSFD1") gr_info_s gr_info =
+ // (si.ch[ch].gr[gr]); // remove alias
- @LOC("THIS,LayerIIIDecoder.GLSFD1") gr_info_s gr_info = (si.ch[ch].gr[gr]);
+ @LOC("THIS,LayerIIIDecoder.SI,LayerIIIDecoder$III_side_info_t.CH,LayerIIIDecoder$temporaire.GR,LayerIIIDecoder$gr_info_s.V") int scalefac_comp =
+ si.ch[ch].gr[gr].scalefac_compress;
+ @LOC("THIS,LayerIIIDecoder.SI") int blocktypenumber;
- scalefac_comp = gr_info.scalefac_compress;
+ @LOC("THIS,LayerIIIDecoder.SI,LayerIIIDecoder$III_side_info_t.CH,LayerIIIDecoder$temporaire.GR,LayerIIIDecoder$gr_info_s.V") int int_scalefac_comp;
+ @LOC("THIS,LayerIIIDecoder.SFB_SH") int m;
+ @LOC("THIS,LayerIIIDecoder.SI,LayerIIIDecoder$III_side_info_t.CH,LayerIIIDecoder$temporaire.GR,LayerIIIDecoder$gr_info_s.V") int blocknumber =
+ 0;
- if (gr_info.block_type == 2) {
- if (gr_info.mixed_block_flag == 0)
+ if (si.ch[ch].gr[gr].block_type == 2) {
+ if (si.ch[ch].gr[gr].mixed_block_flag == 0) {
blocktypenumber = 1;
- else if (gr_info.mixed_block_flag == 1)
+ } else if (si.ch[ch].gr[gr].mixed_block_flag == 1) {
blocktypenumber = 2;
- else
+ } else {
blocktypenumber = 0;
+ }
} else {
blocktypenumber = 0;
}
}
}
- for (@LOC("X") int x = 0; x < 45; x++)
+ for (@LOC("C") int x = 0; x < 45; x++)
// why 45, not 54?
scalefac_buffer[x] = 0;
m = 0;
- for (@LOC("I") int i = 0; i < 4; i++) {
- for (@LOC("THIS,LayerIIIDecoder.GLSFD5") int j = 0; j < nr_of_sfb_block[blocknumber][blocktypenumber][i]; j++) {
+ for (@LOC("C") int i = 0; i < 4; i++) {
+ for (@LOC("THIS,LayerIIIDecoder.NS") int j = 0; j < nr_of_sfb_block[blocknumber][blocktypenumber][i]; j++) {
scalefac_buffer[m] = (new_slen[i] == 0) ? 0 : br.hgetbits(new_slen[i]);
m++;
*
*/
@LATTICE("THIS<IN,THISLOC=THIS,GLOBALLOC=IN")
- private void get_LSF_scale_factors(@LOC("IN") int ch, @LOC("IN") int gr) {
- @LOC("THIS,LayerIIIDecoder.GLSFF4") int m = 0;
- @LOC("THIS,LayerIIIDecoder.GLSFF2") int sfb;
- @LOC("THIS,LayerIIIDecoder.GLSFF3") int window;
- @LOC("THIS,LayerIIIDecoder.GLSFF1") gr_info_s gr_info = (si.ch[ch].gr[gr]);
+ private void get_LSF_scale_factors(@LOC("THIS,LayerIIIDecoder.CH0") int ch,
+ @LOC("THIS,LayerIIIDecoder.CH0") int gr) {
+
+ @LOC("THIS,LayerIIIDecoder.SFB_SH") int sfb;
+ @LOC("THIS,LayerIIIDecoder.SFB_SH") int m = 0;
+ @LOC("THIS,LayerIIIDecoder.SFB_SH") int window;
+ // gr_info_s gr_info = (si.ch[ch].gr[gr]); // remove alias
get_LSF_scale_data(ch, gr);
- if ((gr_info.window_switching_flag != 0) && (gr_info.block_type == 2)) {
- if (gr_info.mixed_block_flag != 0) { // MIXED
+ if ((si.ch[ch].gr[gr].window_switching_flag != 0) && (si.ch[ch].gr[gr].block_type == 2)) {
+ if (si.ch[ch].gr[gr].mixed_block_flag != 0) { // MIXED
for (sfb = 0; sfb < 8; sfb++) {
scalefac[ch].l[sfb] = scalefac_buffer[m];
m++;
/**
*
*/
- @LOC("LY") int[] x = { 0 };
- @LOC("F") int[] y = { 0 };
- @LOC("LY") int[] v = { 0 };
- @LOC("LY") int[] w = { 0 };
-
- @LATTICE("H<I,I<R,R<B1,B1<B,B<THIS,THIS<IN,I*,THISLOC=THIS,GLOBALLOC=IN")
- private void huffman_decode(@LOC("IN") int ch, @LOC("IN") int gr) {
- x[0] = 0;
- y[0] = 0;
- v[0] = 0;
- w[0] = 0;
-
- @LOC("THIS,LayerIIIDecoder.HD1") int part2_3_end = part2_start + si.ch[ch].gr[gr].part2_3_length;
- @LOC("THIS,LayerIIIDecoder.HD2") int num_bits;
- @LOC("R") int region1Start;
- @LOC("R") int region2Start;
- @LOC("THIS,LayerIIIDecoder.HD3") int index;
-
- @LOC("B") int buf;
- @LOC("B1") int buf1;
-
- @LOC("H") huffcodetab h;
+ // @LOC("SI1")
+ // int[] x = { 0 };
+ // @LOC("SI1")
+ // int[] y = { 0 };
+ // @LOC("SI1")
+ // int[] v = { 0 };
+ // @LOC("SI1")
+ // int[] w = { 0 };
+ @LOC("SI1")
+ int x = 0;
+ @LOC("SI1")
+ int y = 0;
+ @LOC("SI1")
+ int v = 0;
+ @LOC("SI1")
+ int w = 0;
+
+ // @LATTICE("H<I,I<R,R<B1,B1<B,B<THIS,THIS<IN,I*,THISLOC=THIS,GLOBALLOC=IN")
+ @LATTICE("BUF<THIS,BUF*,R,B,B1,H,I,THIS<IN,I*,THISLOC=THIS,GLOBALLOC=THIS")
+ private void huffman_decode(@LOC("THIS,LayerIIIDecoder.BR,BitReserve.BIT") int part2_start,
+ @LOC("THIS,LayerIIIDecoder.CH0") int ch, @LOC("THIS,LayerIIIDecoder.CH0") int gr) {
+
+ // @LOC("THIS,LayerIIIDecoder.IS1D") int x;
+ // @LOC("THIS,LayerIIIDecoder.IS1D") int y;
+ // @LOC("THIS,LayerIIIDecoder.IS1D") int v;
+ // @LOC("THIS,LayerIIIDecoder.IS1D") int w;
+
+ x = 0;
+ y = 0;
+ v = 0;
+ w = 0;
+
+ @LOC("THIS,LayerIIIDecoder.BR,BitReserve.BIT") int part2_3_end =
+ part2_start + si.ch[ch].gr[gr].part2_3_length;
+
+ @LOC("THIS,LayerIIIDecoder.BR,BitReserve.BIT") int num_bits;
+ @LOC("THIS,LayerIIIDecoder.SI1") int region1Start;
+ @LOC("THIS,LayerIIIDecoder.SI1") int region2Start;
+ @LOC("THIS,LayerIIIDecoder.BR,BitReserve.BIT") int index;
+
+ @LOC("THIS,LayerIIIDecoder.SI1") int buf;
+ @LOC("THIS,LayerIIIDecoder.SI1") int buf1;
// Find region boundary for short block case
buf = si.ch[ch].gr[gr].region0_count + 1;
buf1 = buf + si.ch[ch].gr[gr].region1_count + 1;
- if (buf1 > sfBandIndex[sfreq].l.length - 1)
+ if (buf1 > sfBandIndex[sfreq].l.length - 1) {
buf1 = sfBandIndex[sfreq].l.length - 1;
+ }
region1Start = sfBandIndex[sfreq].l[buf];
region2Start = sfBandIndex[sfreq].l[buf1]; /* MI */
}
index = 0;
+ @LOC("THIS,LayerIIIDecoder.SI1") int h;
// Read bigvalues area
- for (@LOC("I") int i = 0; i < (si.ch[ch].gr[gr].big_values << 1); i += 2) {
- if (i < region1Start)
- h = huffcodetab.ht[si.ch[ch].gr[gr].table_select[0]];
- else if (i < region2Start)
- h = huffcodetab.ht[si.ch[ch].gr[gr].table_select[1]];
- else
- h = huffcodetab.ht[si.ch[ch].gr[gr].table_select[2]];
+ for (@LOC("THIS,LayerIIIDecoder.BR,BitReserve.BIT") int i = 0; i < (si.ch[ch].gr[gr].big_values << 1); i +=
+ 2) {
+ if (i < region1Start) {
+ // huffcodetab.huffman_decoder(h, x, y, v, w, br);
+ h = si.ch[ch].gr[gr].table_select[0];
+ } else if (i < region2Start) {
+ h = si.ch[ch].gr[gr].table_select[1];
+ // h = huffcodetab.ht[si.ch[ch].gr[gr].table_select[1]];
+ } else {
+ h = si.ch[ch].gr[gr].table_select[2];
+ // h = huffcodetab.ht[si.ch[ch].gr[gr].table_select[2]];
+ }
+
+ // @LOC("THIS,LayerIIIDecoder.SI2") HuffData huffData =
+ // huffcodetab.huffman_decoder(h, new HuffData(x, y, v, w, br));
+ // x = huffData.x;
+ // y = huffData.y;
+ // v = huffData.v;
+ // w = huffData.w;
+ // br = huffData.br;
+ huffcodetab_huffman_decoder(h);
- huffcodetab.huffman_decoder(h, x, y, v, w, br);
// if (index >= is_1d.length)
// System.out.println("i0="+i+"/"+(si.ch[ch].gr[gr].big_values<<1)+" Index="+index+" is_1d="+is_1d.length);
- is_1d[index++] = x[0];
- is_1d[index++] = y[0];
+ is_1d[index++] = x;
+ is_1d[index++] = y;
- CheckSumHuff = CheckSumHuff + x[0] + y[0];
+ CheckSumHuff = CheckSumHuff + x + y;
// System.out.println("x = "+x[0]+" y = "+y[0]);
}
// Read count1 area
- h = huffcodetab.ht[si.ch[ch].gr[gr].count1table_select + 32];
+ // h = huffcodetab.ht[si.ch[ch].gr[gr].count1table_select + 32];
num_bits = br.hsstell();
while ((num_bits < part2_3_end) && (index < 576)) {
- huffcodetab.huffman_decoder(h, x, y, v, w, br);
-
- is_1d[index++] = v[0];
- is_1d[index++] = w[0];
- is_1d[index++] = x[0];
- is_1d[index++] = y[0];
- CheckSumHuff = CheckSumHuff + v[0] + w[0] + x[0] + y[0];
+ // huffcodetab.huffman_decoder(h, x, y, v, w, br);
+ // @LOC("I") HuffData huffData2 =
+ // huffcodetab.huffman_decoder(si.ch[ch].gr[gr].count1table_select + 32,
+ // new HuffData(x, y,
+ // v, w, br));
+ // x = huffData2.x;
+ // y = huffData2.y;
+ // v = huffData2.v;
+ // w = huffData2.w;
+ // br = huffData2.br;
+ huffcodetab_huffman_decoder(h);
+
+ is_1d[index++] = v;
+ is_1d[index++] = w;
+ is_1d[index++] = x;
+ is_1d[index++] = y;
+ CheckSumHuff = CheckSumHuff + v + w + x + y;
// System.out.println("v = "+v[0]+" w = "+w[0]);
// System.out.println("x = "+x[0]+" y = "+y[0]);
num_bits = br.hsstell();
is_1d[index] = 0;
}
+ @LATTICE("THIS,IN,THISLOC=THIS,RETURNLOC=THIS")
+ private int huffcodetab_huffman_decoder(@LOC("IN") int h) {
+ // TODO need to move huffmancodetab implementation here
+ return 0;
+ }
+
/**
*
*/
- private void i_stereo_k_values(@LOC("IN") int is_pos, @LOC("IN") int io_type, @LOC("IN") int i) {
+ private void i_stereo_k_values(@LOC("THIS,LayerIIIDecoder.LR") int is_pos,
+ @LOC("THIS,LayerIIIDecoder.LR") int io_type, @LOC("THIS,LayerIIIDecoder.LR") int i) {
if (is_pos == 0) {
k[0][i] = 1.0f;
k[1][i] = 1.0f;
/**
*
*/
- @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")
- private void dequantize_sample(@LOC("OUT") float xr[][], @LOC("IN") int ch, @LOC("IN") int gr) {
- @LOC("GR") gr_info_s gr_info = (si.ch[ch].gr[gr]);
- @LOC("CB") int cb = 0;
- @LOC("CB") int next_cb_boundary;
- @LOC("CB") int cb_begin = 0;
- @LOC("CB") int cb_width = 0;
- @LOC("IN") int index = 0;
- @LOC("VAR") int t_index;
- @LOC("J") int j;
- @LOC("VAR") float g_gain;
- //float[][] xr_1d = xr;//substituted xr for instances of xr_1d to decrease number of areas
+ // @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")
+ @LATTICE("THIS,THISLOC=THIS,GLOBALLOC=THIS")
+ // ssjava
+ private void dequantize_sample(
+ /* @LOC("OUT") float xr[][], */@LOC("THIS,LayerIIIDecoder.SI") int ch,
+ @LOC("THIS,LayerIIIDecoder.SI") int gr) {
+
+ // @LOC("GR") gr_info_s gr_info = (si.ch[ch].gr[gr]); remove alias!
+ @LOC("THIS,LayerIIIDecoder.SI1") int cb = 0;
+
+ @LOC("THIS,LayerIIIDecoder.SI1") int next_cb_boundary;
+ @LOC("THIS,LayerIIIDecoder.SI1") int cb_begin = 0;
+ @LOC("THIS,LayerIIIDecoder.SI1") int cb_width = 0;
+ @LOC("THIS,LayerIIIDecoder.SI1") float g_gain;
+
+ @LOC("THIS,LayerIIIDecoder.SI1") int index = 0;
+ @LOC("THIS,LayerIIIDecoder.SI1") int t_index;
+ @LOC("THIS,LayerIIIDecoder.NZ") int j;
+
+ // float[][] xr_1d = xr;//substituted xr for instances of xr_1d to decrease
+ // number of areas
// choose correct scalefactor band per block type, initalize boundary
- if ((gr_info.window_switching_flag != 0) && (gr_info.block_type == 2)) {
- if (gr_info.mixed_block_flag != 0)
+ if ((si.ch[ch].gr[gr].window_switching_flag != 0) && (si.ch[ch].gr[gr].block_type == 2)) {
+ if (si.ch[ch].gr[gr].mixed_block_flag != 0)
next_cb_boundary = sfBandIndex[sfreq].l[1]; // LONG blocks: 0,1,3
else {
cb_width = sfBandIndex[sfreq].s[1];
// Compute overall (global) scaling.
- g_gain = (float) Math.pow(2.0, (0.25 * (gr_info.global_gain - 210.0)));
+ g_gain = (float) Math.pow(2.0, (0.25 * (si.ch[ch].gr[gr].global_gain - 210.0)));
for (j = 0; j < nonzero[ch]; j++) {
// Modif E.B 02/22/99
- @LOC("REST") int reste = j % SSLIMIT;
- @LOC("QUO") int quotien = (int) ((j - reste) / SSLIMIT);
- if (is_1d[j] == 0)
- xr[quotien][reste] = 0.0f;
- else {
- @LOC("VAR") int abv = is_1d[j];
+ @LOC("THIS,LayerIIIDecoder.NZ") int reste = j % SSLIMIT;
+ @LOC("THIS,LayerIIIDecoder.NZ") int quotien = (int) ((j - reste) / SSLIMIT);
+ if (is_1d[j] == 0) {
+ ro[ch][quotien][reste] = 0.0f;
+ } else {
+ @LOC("THIS,LayerIIIDecoder.IS1D") int abv = is_1d[j];
// Pow Array fix (11/17/04)
if (abv < t_43.length) {
if (is_1d[j] > 0)
- xr[quotien][reste] = g_gain * t_43[abv];
+ ro[ch][quotien][reste] = g_gain * t_43[abv];
else {
if (-abv < t_43.length)
- xr[quotien][reste] = -g_gain * t_43[-abv];
+ ro[ch][quotien][reste] = -g_gain * t_43[-abv];
else
- xr[quotien][reste] = -g_gain * (float) Math.pow(-abv, d43);
+ ro[ch][quotien][reste] = -g_gain * (float) Math.pow(-abv, d43);
}
} else {
if (is_1d[j] > 0)
- xr[quotien][reste] = g_gain * (float) Math.pow(abv, d43);
+ ro[ch][quotien][reste] = g_gain * (float) Math.pow(abv, d43);
else
- xr[quotien][reste] = -g_gain * (float) Math.pow(-abv, d43);
+ ro[ch][quotien][reste] = -g_gain * (float) Math.pow(-abv, d43);
}
}
}
// apply formula per block type
for (j = 0; j < nonzero[ch]; j++) {
// Modif E.B 02/22/99
- @LOC("REST") int reste = j % SSLIMIT;
- @LOC("QUO") int quotien = (int) ((j - reste) / SSLIMIT);
+ @LOC("THIS,LayerIIIDecoder.NZ") int reste = j % SSLIMIT;
+ @LOC("THIS,LayerIIIDecoder.NZ") int quotien = (int) ((j - reste) / SSLIMIT);
if (index == next_cb_boundary) { /* Adjust critical band boundary */
- if ((gr_info.window_switching_flag != 0) && (gr_info.block_type == 2)) {
- if (gr_info.mixed_block_flag != 0) {
+ if ((si.ch[ch].gr[gr].window_switching_flag != 0) && (si.ch[ch].gr[gr].block_type == 2)) {
+ if (si.ch[ch].gr[gr].mixed_block_flag != 0) {
if (index == sfBandIndex[sfreq].l[8]) {
next_cb_boundary = sfBandIndex[sfreq].s[4];
// Do long/short dependent scaling operations
- if ((gr_info.window_switching_flag != 0)
- && (((gr_info.block_type == 2) && (gr_info.mixed_block_flag == 0)) || ((gr_info.block_type == 2)
- && (gr_info.mixed_block_flag != 0) && (j >= 36)))) {
+ if ((si.ch[ch].gr[gr].window_switching_flag != 0)
+ && (((si.ch[ch].gr[gr].block_type == 2) && (si.ch[ch].gr[gr].mixed_block_flag == 0)) || ((si.ch[ch].gr[gr].block_type == 2)
+ && (si.ch[ch].gr[gr].mixed_block_flag != 0) && (j >= 36)))) {
t_index = (index - cb_begin) / cb_width;
/*
* xr[sb][ss] *= pow(2.0, ((-2.0 * gr_info.subblock_gain[t_index]) -(0.5
* * (1.0 + gr_info.scalefac_scale) scalefac[ch].s[t_index][cb])));
*/
- @LOC("IDX") int idx = scalefac[ch].s[t_index][cb] << gr_info.scalefac_scale;
- idx += (gr_info.subblock_gain[t_index] << 2);
+ @LOC("THIS,LayerIIIDecoder.SI1") int idx =
+ scalefac[ch].s[t_index][cb] << si.ch[ch].gr[gr].scalefac_scale;
+ idx += (si.ch[ch].gr[gr].subblock_gain[t_index] << 2);
- xr[quotien][reste] *= two_to_negative_half_pow[idx];
+ ro[ch][quotien][reste] *= two_to_negative_half_pow[idx];
} else { // LONG block types 0,1,3 & 1st 2 subbands of switched blocks
/*
* xr[sb][ss] *= pow(2.0, -0.5 * (1.0+gr_info.scalefac_scale)
* (scalefac[ch].l[cb] + gr_info.preflag * pretab[cb]));
*/
- @LOC("IDX") int idx = scalefac[ch].l[cb];
+ @LOC("THIS,LayerIIIDecoder.SI1") int idx = scalefac[ch].l[cb];
- if (gr_info.preflag != 0)
+ if (si.ch[ch].gr[gr].preflag != 0)
idx += pretab[cb];
- idx = idx << gr_info.scalefac_scale;
- xr[quotien][reste] *= two_to_negative_half_pow[idx];
+ idx = idx << si.ch[ch].gr[gr].scalefac_scale;
+ ro[ch][quotien][reste] *= two_to_negative_half_pow[idx];
}
index++;
}
for (j = nonzero[ch]; j < 576; j++) {
// Modif E.B 02/22/99
- @LOC("REST") int reste = j % SSLIMIT;
- @LOC("QUO") int quotien = (int) ((j - reste) / SSLIMIT);
+ @LOC("THIS,LayerIIIDecoder.NZ") int reste = j % SSLIMIT;
+ @LOC("THIS,LayerIIIDecoder.NZ") int quotien = (int) ((j - reste) / SSLIMIT);
if (reste < 0)
reste = 0;
if (quotien < 0)
quotien = 0;
- xr[quotien][reste] = 0.0f;
+ ro[ch][quotien][reste] = 0.0f;
}
return;
/**
*
*/
- @LATTICE("THIS<I,I<GR,GR<IN,I*,THISLOC=THIS,GLOBALLOC=IN")
- private void reorder(@LOC("IN") float xr[][], @LOC("IN") int ch, @LOC("IN") int gr) {
- // the purpose of reordering: move 'short samples' back to their original position
+ // ssjava
+ // @LATTICE("THIS<I,I<GR,GR<IN,I*,THISLOC=THIS,GLOBALLOC=IN")
+ @LATTICE("THIS,THISLOC=THIS,GLOBALLOC=THIS")
+ private void reorder(/* @LOC("IN") float xr[][], */@LOC("THIS,LayerIIIDecoder.CH0") int ch,
+ @LOC("THIS,LayerIIIDecoder.CH0") int gr) {
+ // the purpose of reordering: move 'short samples' back to their original
+ // position
// after reorder, the samples are no long ordered by frequency
-
- // the format of input data to reorder:
- // three small chunks of 192 samples each are combined to 576 samples ordered by frequency
-
- @LOC("GR") gr_info_s gr_info = (si.ch[ch].gr[gr]);
- @LOC("THIS,LayerIIIDecoder.RO6") int freq;
- @LOC("THIS,LayerIIIDecoder.RO5") int freq3;
- @LOC("I") int index;
- @LOC("THIS,LayerIIIDecoder.RO9") int sfb;
- @LOC("THIS,LayerIIIDecoder.RO8") int sfb_start;
- @LOC("THIS,LayerIIIDecoder.RO7") int sfb_lines;
- @LOC("THIS,LayerIIIDecoder.RO4") int src_line;
- @LOC("THIS,LayerIIIDecoder.RO1") int des_line;
- //float[][] xr_1d = xr; subbed in xr for xr_1d so as not to create extra areas
-
- if ((gr_info.window_switching_flag != 0) && (gr_info.block_type == 2)) {
-
- for (index = 0; index < 576; index++)
+
+ // the format of input data to reorder:
+ // three small chunks of 192 samples each are combined to 576 samples
+ // ordered by frequency
+
+ // gr_info_s gr_info = (si.ch[ch].gr[gr]); //remove alias
+
+ @LOC("THIS,LayerIIIDecoder.SI1") int index;
+
+ @LOC("THIS,LayerIIIDecoder.SI1") int freq;
+ @LOC("THIS,LayerIIIDecoder.SI1") int freq3;
+ @LOC("THIS,LayerIIIDecoder.SI1") int sfb;
+ @LOC("THIS,LayerIIIDecoder.SI1") int sfb_start;
+ @LOC("THIS,LayerIIIDecoder.SI1") int sfb_lines;
+ @LOC("THIS,LayerIIIDecoder.SI1") int src_line;
+ @LOC("THIS,LayerIIIDecoder.SI1") int des_line;
+ // float[][] xr_1d = xr; subbed in xr for xr_1d so as not to create extra
+ // areas
+
+ if ((si.ch[ch].gr[gr].window_switching_flag != 0) && (si.ch[ch].gr[gr].block_type == 2)) {
+
+ for (index = 0; index < 576; index++) {
out_1d[index] = 0.0f;
+ }
- if (gr_info.mixed_block_flag != 0) {
+ if (si.ch[ch].gr[gr].mixed_block_flag != 0) {
// NO REORDER FOR LOW 2 SUBBANDS
for (index = 0; index < 36; index++) {
// Modif E.B 02/22/99
- @LOC("THIS,LayerIIIDecoder.RO3") int reste = index % SSLIMIT;
- @LOC("THIS,LayerIIIDecoder.RO2") int quotien = (int) ((index - reste) / SSLIMIT);
- out_1d[index] = xr[quotien][reste];
+ @LOC("THIS,LayerIIIDecoder.SI1") int reste = index % SSLIMIT;
+ @LOC("THIS,LayerIIIDecoder.SI1") int quotien = (int) ((index - reste) / SSLIMIT);
+ out_1d[index] = lr[ch][quotien][reste];
}
// REORDERING FOR REST SWITCHED SHORT
/*
sfb_start = sfBandIndex[sfreq].s[sfb];
sfb_lines = sfBandIndex[sfreq].s[sfb + 1] - sfb_start;
- @LOC("THIS,LayerIIIDecoder.RO7") int sfb_start3 = (sfb_start << 2) - sfb_start;
+ @LOC("THIS,LayerIIIDecoder.SI1") int sfb_start3 = (sfb_start << 2) - sfb_start;
for (freq = 0, freq3 = 0; freq < sfb_lines; freq++, freq3 += 3) {
src_line = sfb_start3 + freq;
des_line = sfb_start3 + freq3;
// Modif E.B 02/22/99
- @LOC("THIS,LayerIIIDecoder.RO3") int reste = src_line % SSLIMIT;
- @LOC("THIS,LayerIIIDecoder.RO2") int quotien = (int) ((src_line - reste) / SSLIMIT);
+ @LOC("THIS,LayerIIIDecoder.SI1") int reste = src_line % SSLIMIT;
+ @LOC("THIS,LayerIIIDecoder.SI1") int quotien = (int) ((src_line - reste) / SSLIMIT);
- out_1d[des_line] = xr[quotien][reste];
+ out_1d[des_line] = lr[ch][quotien][reste];
src_line += sfb_lines;
des_line++;
reste = src_line % SSLIMIT;
quotien = (int) ((src_line - reste) / SSLIMIT);
- out_1d[des_line] = xr[quotien][reste];
+ out_1d[des_line] = lr[ch][quotien][reste];
src_line += sfb_lines;
des_line++;
reste = src_line % SSLIMIT;
quotien = (int) ((src_line - reste) / SSLIMIT);
- out_1d[des_line] = xr[quotien][reste];
+ out_1d[des_line] = lr[ch][quotien][reste];
}
}
} else { // pure short
for (index = 0; index < 576; index++) {
- @LOC("THIS,LayerIIIDecoder.RO8") int j = reorder_table[sfreq][index];
- @LOC("THIS,LayerIIIDecoder.RO3") int reste = j % SSLIMIT;
- @LOC("THIS,LayerIIIDecoder.RO2") int quotien = (int) ((j - reste) / SSLIMIT);
- out_1d[index] = xr[quotien][reste];
+ @LOC("THIS,LayerIIIDecoder.SI1") int j = reorder_table[sfreq][index];
+ @LOC("THIS,LayerIIIDecoder.SI1") int reste = j % SSLIMIT;
+ @LOC("THIS,LayerIIIDecoder.SI1") int quotien = (int) ((j - reste) / SSLIMIT);
+ out_1d[index] = lr[ch][quotien][reste];
}
}
} else { // long blocks
for (index = 0; index < 576; index++) {
// Modif E.B 02/22/99
- @LOC("THIS,LayerIIIDecoder.RO3") int reste = index % SSLIMIT;
- @LOC("THIS,LayerIIIDecoder.RO2") int quotien = (int) ((index - reste) / SSLIMIT);
- out_1d[index] = xr[quotien][reste];
+ @LOC("THIS,LayerIIIDecoder.SI1") int reste = index % SSLIMIT;
+ @LOC("THIS,LayerIIIDecoder.SI1") int quotien = (int) ((index - reste) / SSLIMIT);
+ out_1d[index] = lr[ch][quotien][reste];
}
}
}
*
*/
- @LOC("IP") int[] is_pos = new int[576];
- @LOC("IR") float[] is_ratio = new float[576];
+ @LOC("ISP")
+ int[] is_pos = new int[576];
+ @LOC("ISR")
+ float[] is_ratio = new float[576];
- @LATTICE("IO<THIS,THIS<IN,THISLOC=THIS,GLOBALLOC=IN")
- private void stereo(@LOC("IN") int gr) {
- @LOC("THIS,LayerIIIDecoder.SH") int sb;
- @LOC("THIS,LayerIIIDecoder.SH") int ss;
+ // ssjava
+ @LATTICE("IO<THIS,THIS<IN,THISLOC=THIS,GLOBALLOC=IN")
+ private void stereo(@LOC("THIS,LayerIIIDecoder.CH0") int gr) {
+ @LOC("THIS,LayerIIIDecoder.RO1") int sb;
+ @LOC("THIS,LayerIIIDecoder.RO1") int ss;
if (channels == 1) { // mono , bypass xr[0][][] to lr[0][][]
} else {
- @LOC("THIS,LayerIIIDecoder.ME") gr_info_s gr_info = (si.ch[0].gr[gr]);
- @LOC("THIS,LayerIIIDecoder.ME") int mode_ext = header.mode_extension();
- @LOC("THIS,LayerIIIDecoder.SH") int sfb;
- @LOC("THIS,LayerIIIDecoder.SH") int i;
- @LOC("THIS,LayerIIIDecoder.SH") int lines;
- @LOC("THIS,LayerIIIDecoder.SH") int temp;
- @LOC("THIS,LayerIIIDecoder.TMP2") int temp2;
-
- @LOC("THIS,LayerIIIDecoder.S") boolean ms_stereo = ((header.mode() == Header.JOINT_STEREO) && ((mode_ext & 0x2) != 0));
- @LOC("THIS,LayerIIIDecoder.S") boolean i_stereo = ((header.mode() == Header.JOINT_STEREO) && ((mode_ext & 0x1) != 0));
- @LOC("THIS,LayerIIIDecoder.LSF") boolean lsf =
+ // gr_info_s gr_info = (si.ch[0].gr[gr]); remove alias
+ @LOC("THIS,LayerIIIDecoder.HD1") int mode_ext = header.mode_extension();
+
+ @LOC("THIS,LayerIIIDecoder.RO1") int sfb;
+ @LOC("THIS,LayerIIIDecoder.RO1") int i;
+ @LOC("THIS,LayerIIIDecoder.RO1") int lines;
+ @LOC("THIS,LayerIIIDecoder.RO1") int temp;
+ @LOC("THIS,LayerIIIDecoder.RO1") int temp2;
+
+ @LOC("THIS,LayerIIIDecoder.CH0") boolean ms_stereo =
+ ((header.mode() == Header.JOINT_STEREO) && ((mode_ext & 0x2) != 0));
+ @LOC("THIS,LayerIIIDecoder.CH0") boolean i_stereo =
+ ((header.mode() == Header.JOINT_STEREO) && ((mode_ext & 0x1) != 0));
+ @LOC("THIS,LayerIIIDecoder.CH0") boolean lsf =
((header.version() == Header.MPEG2_LSF || header.version() == Header.MPEG25_LSF)); // SZD
- @LOC("IO") int io_type = (gr_info.scalefac_compress & 1);
+ @LOC("THIS,LayerIIIDecoder.LR") int io_type = (si.ch[0].gr[gr].scalefac_compress & 1);
// initialization
}
if (i_stereo) {
- if ((gr_info.window_switching_flag != 0) && (gr_info.block_type == 2)) {
- if (gr_info.mixed_block_flag != 0) {
+ if ((si.ch[0].gr[gr].window_switching_flag != 0) && (si.ch[0].gr[gr].block_type == 2)) {
+ if (si.ch[0].gr[gr].mixed_block_flag != 0) {
- @LOC("THIS,LayerIIIDecoder.SH") int max_sfb = 0;
+ @LOC("THIS,LayerIIIDecoder.RO1") int max_sfb = 0;
- for (@LOC("THIS,LayerIIIDecoder.J") int j = 0; j < 3; j++) {
- @LOC("THIS,LayerIIIDecoder.SH") int sfbcnt;
+ for (@LOC("THIS,LayerIIIDecoder.RO1") int j = 0; j < 3; j++) {
+ @LOC("THIS,LayerIIIDecoder.RO1") int sfbcnt;
sfbcnt = 2;
for (sfb = 12; sfb >= 3; sfb--) {
i = sfBandIndex[sfreq].s[sfb];
} // for (; sfb<8 ...
} // for (j=0 ...
} else { // if (gr_info.mixed_block_flag)
- for (@LOC("THIS,LayerIIIDecoder.J") int j = 0; j < 3; j++) {
- @LOC("THIS,LayerIIIDecoder.SH") int sfbcnt;
+ for (@LOC("THIS,LayerIIIDecoder.RO1") int j = 0; j < 3; j++) {
+ @LOC("THIS,LayerIIIDecoder.RO1") int sfbcnt;
sfbcnt = -1;
for (sfb = 12; sfb >= 0; sfb--) {
temp = sfBandIndex[sfreq].s[sfb];
/**
*
*/
- @LATTICE("THIS<SRC,SRC<SS,SS<SB18,SB18<SB18LIM,SB18LIM<GR,GR<IN,SB18*,SS*,THISLOC=THIS")
- private void antialias(@LOC("IN") int ch, @LOC("IN") int gr) {
- @LOC("SB18") int sb18;
- @LOC("SS") int ss;
- @LOC("SB18LIM") int sb18lim;
- @LOC("GR") gr_info_s gr_info = (si.ch[ch].gr[gr]);
+ // @LATTICE("THIS<SRC,SRC<SS,SS<SB18,SB18<SB18LIM,SB18LIM<GR,GR<IN,SB18*,SS*,THISLOC=THIS")
+ @LATTICE("VAR<THIS,THIS<C,C<IN,THISLOC=THIS,C*")
+ private void antialias(@LOC("THIS,LayerIIIDecoder.SI") int ch,
+ @LOC("THIS,LayerIIIDecoder.SI") int gr) {
+
+ @LOC("THIS,LayerIIIDecoder.SI,LayerIIIDecoder$III_side_info_t.CH,LayerIIIDecoder$temporaire.GR2") int sb18;
+ @LOC("THIS,LayerIIIDecoder.SI1") int ss;
+ @LOC("THIS,LayerIIIDecoder.SI,LayerIIIDecoder$III_side_info_t.CH,LayerIIIDecoder$temporaire.GR2") int sb18lim;
+
+ @LOC("THIS,LayerIIIDecoder.SI,LayerIIIDecoder$III_side_info_t.CH,LayerIIIDecoder$temporaire.GR1") gr_info_s gr_info =
+ (si.ch[ch].gr[gr]);
// 31 alias-reduction operations between each pair of sub-bands
// with 8 butterflies between each pair
for (sb18 = 0; sb18 < sb18lim; sb18 += 18) {
for (ss = 0; ss < 8; ss++) {
- @LOC("SRC") int src_idx1 = sb18 + 17 - ss;
- @LOC("SRC") int src_idx2 = sb18 + 18 + ss;
- @LOC("THIS,LayerIIIDecoder.O") float bu = out_1d[src_idx1];
- @LOC("THIS,LayerIIIDecoder.O") float bd = out_1d[src_idx2];
+ @LOC("THIS,LayerIIIDecoder.SI1") int src_idx1 = sb18 + 17 - ss;
+ @LOC("THIS,LayerIIIDecoder.SI1") int src_idx2 = sb18 + 18 + ss;
+ @LOC("THIS,LayerIIIDecoder.OUT") float bu = out_1d[src_idx1];
+ @LOC("THIS,LayerIIIDecoder.OUT") float bd = out_1d[src_idx2];
out_1d[src_idx1] = (bu * cs[ss]) - (bd * ca[ss]);
out_1d[src_idx2] = (bd * cs[ss]) + (bu * ca[ss]);
}
// MDM: tsOutCopy and rawout do not need initializing, so the arrays
// can be reused.
- @LOC("TS") float[] tsOutCopy = new float[18];
- @LOC("RAW") float[] rawout = new float[36];
-
- @LATTICE("THIS<SB,THIS<SH,SH<IN,IN<GLOBAL,SB*,SH*,THISLOC=THIS,GLOBALLOC=GLOBAL")
- private void hybrid(@LOC("IN") int ch, @LOC("IN") int gr) {
- @LOC("THIS,LayerIIIDecoder.BT") int bt;
- @LOC("SB") int sb18;
- @LOC("THIS,LayerIIIDecoder.GR") gr_info_s gr_info = (si.ch[ch].gr[gr]);
- @LOC("THIS,LayerIIIDecoder.TS") float[] tsOut;
-
- //float[][] prvblk;
-
- for (sb18 = 0; sb18 < 576; sb18 += 18) {
- bt =
- ((gr_info.window_switching_flag != 0) && (gr_info.mixed_block_flag != 0) && (sb18 < 36))
- ? 0 : gr_info.block_type;
-
- tsOut = out_1d;
- // Modif E.B 02/22/99
- for (@LOC("SH") int cc = 0; cc < 18; cc++)
- tsOutCopy[cc] = tsOut[cc + sb18];
-
- inv_mdct(tsOutCopy, rawout, bt);
-
- for (@LOC("SH") int cc = 0; cc < 18; cc++)
- tsOut[cc + sb18] = tsOutCopy[cc];
- // Fin Modif
-
- // overlap addition
- //prvblk = prevblck; //eliminated unnecessary areas
-
- tsOut[0 + sb18] = rawout[0] + prevblck[ch][sb18 + 0];
- prevblck[ch][sb18 + 0] = rawout[18];
- tsOut[1 + sb18] = rawout[1] + prevblck[ch][sb18 + 1];
- prevblck[ch][sb18 + 1] = rawout[19];
- tsOut[2 + sb18] = rawout[2] + prevblck[ch][sb18 + 2];
- prevblck[ch][sb18 + 2] = rawout[20];
- tsOut[3 + sb18] = rawout[3] + prevblck[ch][sb18 + 3];
- prevblck[ch][sb18 + 3] = rawout[21];
- tsOut[4 + sb18] = rawout[4] + prevblck[ch][sb18 + 4];
- prevblck[ch][sb18 + 4] = rawout[22];
- tsOut[5 + sb18] = rawout[5] + prevblck[ch][sb18 + 5];
- prevblck[ch][sb18 + 5] = rawout[23];
- tsOut[6 + sb18] = rawout[6] + prevblck[ch][sb18 + 6];
- prevblck[ch][sb18 + 6] = rawout[24];
- tsOut[7 + sb18] = rawout[7] + prevblck[ch][sb18 + 7];
- prevblck[ch][sb18 + 7] = rawout[25];
- tsOut[8 + sb18] = rawout[8] + prevblck[ch][sb18 + 8];
- prevblck[ch][sb18 + 8] = rawout[26];
- tsOut[9 + sb18] = rawout[9] + prevblck[ch][sb18 + 9];
- prevblck[ch][sb18 + 9] = rawout[27];
- tsOut[10 + sb18] = rawout[10] + prevblck[ch][sb18 + 10];
- prevblck[ch][sb18 + 10] = rawout[28];
- tsOut[11 + sb18] = rawout[11] + prevblck[ch][sb18 + 11];
- prevblck[ch][sb18 + 11] = rawout[29];
- tsOut[12 + sb18] = rawout[12] + prevblck[ch][sb18 + 12];
- prevblck[ch][sb18 + 12] = rawout[30];
- tsOut[13 + sb18] = rawout[13] + prevblck[ch][sb18 + 13];
- prevblck[ch][sb18 + 13] = rawout[31];
- tsOut[14 + sb18] = rawout[14] + prevblck[ch][sb18 + 14];
- prevblck[ch][sb18 + 14] = rawout[32];
- tsOut[15 + sb18] = rawout[15] + prevblck[ch][sb18 + 15];
- prevblck[ch][sb18 + 15] = rawout[33];
- tsOut[16 + sb18] = rawout[16] + prevblck[ch][sb18 + 16];
- prevblck[ch][sb18 + 16] = rawout[34];
- tsOut[17 + sb18] = rawout[17] + prevblck[ch][sb18 + 17];
- prevblck[ch][sb18 + 17] = rawout[35];
+ @LOC("OUT")
+ float[] tsOutCopy = new float[18];
+ @LOC("OUT")
+ float[] rawout = new float[36];
+
+ @LATTICE("THIS<SB,SB*,THISLOC=THIS")
+ private void hybrid(@LOC("THIS,LayerIIIDecoder.SI") int ch, @LOC("THIS,LayerIIIDecoder.SI") int gr) {
+
+ @LOC("THIS,LayerIIIDecoder.SI1") int bt;
+ @LOC("SB") int sb18;
+ // gr_info_s gr_info = (si.ch[ch].gr[gr]); //remove alias
+ // @LOC("THIS,LayerIIIDecoder.TS") float[] tsOut; //remove alias
+
+ // float[][] prvblk;
+
+ for (sb18 = 0; sb18 < 576; sb18 += 18) {
+ bt =
+ ((si.ch[ch].gr[gr].window_switching_flag != 0)
+ && (si.ch[ch].gr[gr].mixed_block_flag != 0) && (sb18 < 36)) ? 0
+ : si.ch[ch].gr[gr].block_type;
+
+ // tsOut = out_1d;
+ // Modif E.B 02/22/99
+ for (@LOC("SB") int cc = 0; cc < 18; cc++)
+ tsOutCopy[cc] = out_1d[cc + sb18];
+
+ inv_mdct(bt);
+
+ for (@LOC("SB") int cc = 0; cc < 18; cc++)
+ out_1d[cc + sb18] = tsOutCopy[cc];
+ // Fin Modif
+
+ // overlap addition
+ // prvblk = prevblck; //eliminated unnecessary areas
+
+ out_1d[0 + sb18] = rawout[0] + prevblck[ch][sb18 + 0];
+ prevblck[ch][sb18 + 0] = rawout[18];
+ out_1d[1 + sb18] = rawout[1] + prevblck[ch][sb18 + 1];
+ prevblck[ch][sb18 + 1] = rawout[19];
+ out_1d[2 + sb18] = rawout[2] + prevblck[ch][sb18 + 2];
+ prevblck[ch][sb18 + 2] = rawout[20];
+ out_1d[3 + sb18] = rawout[3] + prevblck[ch][sb18 + 3];
+ prevblck[ch][sb18 + 3] = rawout[21];
+ out_1d[4 + sb18] = rawout[4] + prevblck[ch][sb18 + 4];
+ prevblck[ch][sb18 + 4] = rawout[22];
+ out_1d[5 + sb18] = rawout[5] + prevblck[ch][sb18 + 5];
+ prevblck[ch][sb18 + 5] = rawout[23];
+ out_1d[6 + sb18] = rawout[6] + prevblck[ch][sb18 + 6];
+ prevblck[ch][sb18 + 6] = rawout[24];
+ out_1d[7 + sb18] = rawout[7] + prevblck[ch][sb18 + 7];
+ prevblck[ch][sb18 + 7] = rawout[25];
+ out_1d[8 + sb18] = rawout[8] + prevblck[ch][sb18 + 8];
+ prevblck[ch][sb18 + 8] = rawout[26];
+ out_1d[9 + sb18] = rawout[9] + prevblck[ch][sb18 + 9];
+ prevblck[ch][sb18 + 9] = rawout[27];
+ out_1d[10 + sb18] = rawout[10] + prevblck[ch][sb18 + 10];
+ prevblck[ch][sb18 + 10] = rawout[28];
+ out_1d[11 + sb18] = rawout[11] + prevblck[ch][sb18 + 11];
+ prevblck[ch][sb18 + 11] = rawout[29];
+ out_1d[12 + sb18] = rawout[12] + prevblck[ch][sb18 + 12];
+ prevblck[ch][sb18 + 12] = rawout[30];
+ out_1d[13 + sb18] = rawout[13] + prevblck[ch][sb18 + 13];
+ prevblck[ch][sb18 + 13] = rawout[31];
+ out_1d[14 + sb18] = rawout[14] + prevblck[ch][sb18 + 14];
+ prevblck[ch][sb18 + 14] = rawout[32];
+ out_1d[15 + sb18] = rawout[15] + prevblck[ch][sb18 + 15];
+ prevblck[ch][sb18 + 15] = rawout[33];
+ out_1d[16 + sb18] = rawout[16] + prevblck[ch][sb18 + 16];
+ prevblck[ch][sb18 + 16] = rawout[34];
+ out_1d[17 + sb18] = rawout[17] + prevblck[ch][sb18 + 17];
+ prevblck[ch][sb18 + 17] = rawout[35];
}
}
/**
* Fast INV_MDCT.
*/
-@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")
-public void inv_mdct(@LOC("SH") float[] in, @LOC("OUT") float[] out, @LOC("IN") int block_type) {
- //float[] win_bt;
- @LOC("I") int i;
-
- @LOC("TMPF") float tmpf_0;
- @LOC("TMPF") float tmpf_1;
- @LOC("TMPF") float tmpf_2;
- @LOC("TMPF") float tmpf_3;
- @LOC("TMPF") float tmpf_4;
- @LOC("TMPF") float tmpf_5;
- @LOC("TMPF") float tmpf_6;
- @LOC("TMPF") float tmpf_7;
- @LOC("TMPF") float tmpf_8;
- @LOC("TMPF") float tmpf_9;
- @LOC("TMPF") float tmpf_10;
- @LOC("TMPF") float tmpf_11;
- @LOC("TMPF") float tmpf_12;
- @LOC("TMPF") float tmpf_13;
- @LOC("TMPF") float tmpf_14;
- @LOC("TMPF") float tmpf_15;
- @LOC("TMPF") float tmpf_16;
- @LOC("TMPF") float tmpf_17;
+ // @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,THISLOC=IN")
+ // public void inv_mdct(@LOC("SH") float[] in, @LOC("OUT") float[] out,
+ // @LOC("IN") int block_type) {//remove alias
+ // ssjava
+ @LATTICE("THIS,THISLOC=THIS")
+ public void inv_mdct(@LOC("THIS,LayerIIIDecoder.OUT") int block_type) {
+ // float[] win_bt;
+ @LOC("THIS,LayerIIIDecoder.OUT") int i;
+
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmpf_0;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmpf_1;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmpf_2;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmpf_3;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmpf_4;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmpf_5;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmpf_6;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmpf_7;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmpf_8;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmpf_9;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmpf_10;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmpf_11;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmpf_12;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmpf_13;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmpf_14;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmpf_15;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmpf_16;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmpf_17;
tmpf_0 =
tmpf_1 =
* out[p+1] = out[p+2] = out[p+3] = out[p+4] = out[p+5] = out[p+6] =
* out[p+7] = out[p+8] = 0.0f; }
*/
- out[0] = 0.0f;
- out[1] = 0.0f;
- out[2] = 0.0f;
- out[3] = 0.0f;
- out[4] = 0.0f;
- out[5] = 0.0f;
- out[6] = 0.0f;
- out[7] = 0.0f;
- out[8] = 0.0f;
- out[9] = 0.0f;
- out[10] = 0.0f;
- out[11] = 0.0f;
- out[12] = 0.0f;
- out[13] = 0.0f;
- out[14] = 0.0f;
- out[15] = 0.0f;
- out[16] = 0.0f;
- out[17] = 0.0f;
- out[18] = 0.0f;
- out[19] = 0.0f;
- out[20] = 0.0f;
- out[21] = 0.0f;
- out[22] = 0.0f;
- out[23] = 0.0f;
- out[24] = 0.0f;
- out[25] = 0.0f;
- out[26] = 0.0f;
- out[27] = 0.0f;
- out[28] = 0.0f;
- out[29] = 0.0f;
- out[30] = 0.0f;
- out[31] = 0.0f;
- out[32] = 0.0f;
- out[33] = 0.0f;
- out[34] = 0.0f;
- out[35] = 0.0f;
-
- @LOC("6I") int six_i = 0;
+ rawout[0] = 0.0f;
+ rawout[1] = 0.0f;
+ rawout[2] = 0.0f;
+ rawout[3] = 0.0f;
+ rawout[4] = 0.0f;
+ rawout[5] = 0.0f;
+ rawout[6] = 0.0f;
+ rawout[7] = 0.0f;
+ rawout[8] = 0.0f;
+ rawout[9] = 0.0f;
+ rawout[10] = 0.0f;
+ rawout[11] = 0.0f;
+ rawout[12] = 0.0f;
+ rawout[13] = 0.0f;
+ rawout[14] = 0.0f;
+ rawout[15] = 0.0f;
+ rawout[16] = 0.0f;
+ rawout[17] = 0.0f;
+ rawout[18] = 0.0f;
+ rawout[19] = 0.0f;
+ rawout[20] = 0.0f;
+ rawout[21] = 0.0f;
+ rawout[22] = 0.0f;
+ rawout[23] = 0.0f;
+ rawout[24] = 0.0f;
+ rawout[25] = 0.0f;
+ rawout[26] = 0.0f;
+ rawout[27] = 0.0f;
+ rawout[28] = 0.0f;
+ rawout[29] = 0.0f;
+ rawout[30] = 0.0f;
+ rawout[31] = 0.0f;
+ rawout[32] = 0.0f;
+ rawout[33] = 0.0f;
+ rawout[34] = 0.0f;
+ rawout[35] = 0.0f;
+
+ @LOC("THIS,LayerIIIDecoder.OUT") int six_i = 0;
for (i = 0; i < 3; i++) {
// 12 point IMDCT
// Begin 12 point IDCT
// Input aliasing for 12 pt IDCT
- in[15 + i] += in[12 + i];
- in[12 + i] += in[9 + i];
- in[9 + i] += in[6 + i];
- in[6 + i] += in[3 + i];
- in[3 + i] += in[0 + i];
+ tsOutCopy[15 + i] += tsOutCopy[12 + i];
+ tsOutCopy[12 + i] += tsOutCopy[9 + i];
+ tsOutCopy[9 + i] += tsOutCopy[6 + i];
+ tsOutCopy[6 + i] += tsOutCopy[3 + i];
+ tsOutCopy[3 + i] += tsOutCopy[0 + i];
// Input aliasing on odd indices (for 6 point IDCT)
- in[15 + i] += in[9 + i];
- in[9 + i] += in[3 + i];
+ tsOutCopy[15 + i] += tsOutCopy[9 + i];
+ tsOutCopy[9 + i] += tsOutCopy[3 + i];
// 3 point IDCT on even indices
- @LOC("PP") float pp1;
- @LOC("PP") float pp2;
- @LOC("SUM") float sum;
- pp2 = in[12 + i] * 0.500000000f;
- pp1 = in[6 + i] * 0.866025403f;
- sum = in[0 + i] + pp2;
- tmpf_1 = in[0 + i] - in[12 + i];
+ @LOC("THIS,LayerIIIDecoder.OUT") float pp1;
+ @LOC("THIS,LayerIIIDecoder.OUT") float pp2;
+ @LOC("THIS,LayerIIIDecoder.OUT") float sum;
+ pp2 = tsOutCopy[12 + i] * 0.500000000f;
+ pp1 = tsOutCopy[6 + i] * 0.866025403f;
+ sum = tsOutCopy[0 + i] + pp2;
+ tmpf_1 = tsOutCopy[0 + i] - tsOutCopy[12 + i];
tmpf_0 = sum + pp1;
tmpf_2 = sum - pp1;
// End 3 point IDCT on even indices
// 3 point IDCT on odd indices (for 6 point IDCT)
- pp2 = in[15 + i] * 0.500000000f;
- pp1 = in[9 + i] * 0.866025403f;
- sum = in[3 + i] + pp2;
- tmpf_4 = in[3 + i] - in[15 + i];
+ pp2 = tsOutCopy[15 + i] * 0.500000000f;
+ pp1 = tsOutCopy[9 + i] * 0.866025403f;
+ sum = tsOutCopy[3 + i] + pp2;
+ tmpf_4 = tsOutCopy[3 + i] - tsOutCopy[15 + i];
tmpf_5 = sum + pp1;
tmpf_3 = sum - pp1;
// End 3 point IDCT on odd indices
tmpf_5 *= 0.517638090f;
// Output butterflies on 2 3 point IDCT's (for 6 point IDCT)
- @LOC("SH") float save = tmpf_0;
+ @LOC("THIS,LayerIIIDecoder.OUT") float save = tmpf_0;
tmpf_0 += tmpf_5;
tmpf_5 = save - tmpf_5;
save = tmpf_1;
tmpf_0 *= 0.130526192f;
- out[six_i + 6] += tmpf_0;
- out[six_i + 7] += tmpf_1;
- out[six_i + 8] += tmpf_2;
- out[six_i + 9] += tmpf_3;
- out[six_i + 10] += tmpf_4;
- out[six_i + 11] += tmpf_5;
- out[six_i + 12] += tmpf_6;
- out[six_i + 13] += tmpf_7;
- out[six_i + 14] += tmpf_8;
- out[six_i + 15] += tmpf_9;
- out[six_i + 16] += tmpf_10;
- out[six_i + 17] += tmpf_11;
+ rawout[six_i + 6] += tmpf_0;
+ rawout[six_i + 7] += tmpf_1;
+ rawout[six_i + 8] += tmpf_2;
+ rawout[six_i + 9] += tmpf_3;
+ rawout[six_i + 10] += tmpf_4;
+ rawout[six_i + 11] += tmpf_5;
+ rawout[six_i + 12] += tmpf_6;
+ rawout[six_i + 13] += tmpf_7;
+ rawout[six_i + 14] += tmpf_8;
+ rawout[six_i + 15] += tmpf_9;
+ rawout[six_i + 16] += tmpf_10;
+ rawout[six_i + 17] += tmpf_11;
six_i += 6;
}
} else {
// 36 point IDCT
// input aliasing for 36 point IDCT
- in[17] += in[16];
- in[16] += in[15];
- in[15] += in[14];
- in[14] += in[13];
- in[13] += in[12];
- in[12] += in[11];
- in[11] += in[10];
- in[10] += in[9];
- in[9] += in[8];
- in[8] += in[7];
- in[7] += in[6];
- in[6] += in[5];
- in[5] += in[4];
- in[4] += in[3];
- in[3] += in[2];
- in[2] += in[1];
- in[1] += in[0];
+ tsOutCopy[17] += tsOutCopy[16];
+ tsOutCopy[16] += tsOutCopy[15];
+ tsOutCopy[15] += tsOutCopy[14];
+ tsOutCopy[14] += tsOutCopy[13];
+ tsOutCopy[13] += tsOutCopy[12];
+ tsOutCopy[12] += tsOutCopy[11];
+ tsOutCopy[11] += tsOutCopy[10];
+ tsOutCopy[10] += tsOutCopy[9];
+ tsOutCopy[9] += tsOutCopy[8];
+ tsOutCopy[8] += tsOutCopy[7];
+ tsOutCopy[7] += tsOutCopy[6];
+ tsOutCopy[6] += tsOutCopy[5];
+ tsOutCopy[5] += tsOutCopy[4];
+ tsOutCopy[4] += tsOutCopy[3];
+ tsOutCopy[3] += tsOutCopy[2];
+ tsOutCopy[2] += tsOutCopy[1];
+ tsOutCopy[1] += tsOutCopy[0];
// 18 point IDCT for odd indices
// input aliasing for 18 point IDCT
- in[17] += in[15];
- in[15] += in[13];
- in[13] += in[11];
- in[11] += in[9];
- in[9] += in[7];
- in[7] += in[5];
- in[5] += in[3];
- in[3] += in[1];
-
- @LOC("TMP") float tmp0;
- @LOC("TMP") float tmp1;
- @LOC("TMP") float tmp2;
- @LOC("TMP") float tmp3;
- @LOC("TMP") float tmp4;
- @LOC("TMP") float tmp0_;
- @LOC("TMP") float tmp1_;
- @LOC("TMP") float tmp2_;
- @LOC("TMP") float tmp3_;
- @LOC("TMP") float tmp0o;
- @LOC("TMP") float tmp1o;
- @LOC("TMP") float tmp2o;
- @LOC("TMP") float tmp3o;
- @LOC("TMP") float tmp4o;
- @LOC("TMP") float tmp0_o;
- @LOC("TMP") float tmp1_o;
- @LOC("TMP") float tmp2_o;
- @LOC("TMP") float tmp3_o;
+ tsOutCopy[17] += tsOutCopy[15];
+ tsOutCopy[15] += tsOutCopy[13];
+ tsOutCopy[13] += tsOutCopy[11];
+ tsOutCopy[11] += tsOutCopy[9];
+ tsOutCopy[9] += tsOutCopy[7];
+ tsOutCopy[7] += tsOutCopy[5];
+ tsOutCopy[5] += tsOutCopy[3];
+ tsOutCopy[3] += tsOutCopy[1];
+
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmp0;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmp1;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmp2;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmp3;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmp4;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmp0_;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmp1_;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmp2_;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmp3_;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmp0o;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmp1o;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmp2o;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmp3o;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmp4o;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmp0_o;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmp1_o;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmp2_o;
+ @LOC("THIS,LayerIIIDecoder.OUT") float tmp3_o;
// Fast 9 Point Inverse Discrete Cosine Transform
//
// 9 point IDCT on even indices
// 5 points on odd indices (not realy an IDCT)
- @LOC("I00") float i00 = in[0] + in[0];
- @LOC("IIP") float iip12 = i00 + in[12];
+ @LOC("THIS,LayerIIIDecoder.OUT") float i00 = tsOutCopy[0] + tsOutCopy[0];
+ @LOC("THIS,LayerIIIDecoder.OUT") float iip12 = i00 + tsOutCopy[12];
tmp0 =
- iip12 + in[4] * 1.8793852415718f + in[8] * 1.532088886238f + in[16] * 0.34729635533386f;
- tmp1 = i00 + in[4] - in[8] - in[12] - in[12] - in[16];
+ iip12 + tsOutCopy[4] * 1.8793852415718f + tsOutCopy[8] * 1.532088886238f + tsOutCopy[16]
+ * 0.34729635533386f;
+ tmp1 = i00 + tsOutCopy[4] - tsOutCopy[8] - tsOutCopy[12] - tsOutCopy[12] - tsOutCopy[16];
tmp2 =
- iip12 - in[4] * 0.34729635533386f - in[8] * 1.8793852415718f + in[16] * 1.532088886238f;
+ iip12 - tsOutCopy[4] * 0.34729635533386f - tsOutCopy[8] * 1.8793852415718f
+ + tsOutCopy[16] * 1.532088886238f;
tmp3 =
- iip12 - in[4] * 1.532088886238f + in[8] * 0.34729635533386f - in[16] * 1.8793852415718f;
- tmp4 = in[0] - in[4] + in[8] - in[12] + in[16];
+ iip12 - tsOutCopy[4] * 1.532088886238f + tsOutCopy[8] * 0.34729635533386f - tsOutCopy[16]
+ * 1.8793852415718f;
+ tmp4 = tsOutCopy[0] - tsOutCopy[4] + tsOutCopy[8] - tsOutCopy[12] + tsOutCopy[16];
// 4 points on even indices
- @LOC("I00") float i66_ = in[6] * 1.732050808f; // Sqrt[3]
+ @LOC("THIS,LayerIIIDecoder.OUT") float i66_ = tsOutCopy[6] * 1.732050808f; // Sqrt[3]
tmp0_ =
- in[2] * 1.9696155060244f + i66_ + in[10] * 1.2855752193731f + in[14] * 0.68404028665134f;
- tmp1_ = (in[2] - in[10] - in[14]) * 1.732050808f;
+ tsOutCopy[2] * 1.9696155060244f + i66_ + tsOutCopy[10] * 1.2855752193731f + tsOutCopy[14]
+ * 0.68404028665134f;
+ tmp1_ = (tsOutCopy[2] - tsOutCopy[10] - tsOutCopy[14]) * 1.732050808f;
tmp2_ =
- in[2] * 1.2855752193731f - i66_ - in[10] * 0.68404028665134f + in[14] * 1.9696155060244f;
+ tsOutCopy[2] * 1.2855752193731f - i66_ - tsOutCopy[10] * 0.68404028665134f
+ + tsOutCopy[14] * 1.9696155060244f;
tmp3_ =
- in[2] * 0.68404028665134f - i66_ + in[10] * 1.9696155060244f - in[14] * 1.2855752193731f;
+ tsOutCopy[2] * 0.68404028665134f - i66_ + tsOutCopy[10] * 1.9696155060244f
+ - tsOutCopy[14] * 1.2855752193731f;
// 9 point IDCT on odd indices
// 5 points on odd indices (not realy an IDCT)
- @LOC("I00") float i0 = in[0 + 1] + in[0 + 1];
- @LOC("IIP") float i0p12 = i0 + in[12 + 1];
+ @LOC("THIS,LayerIIIDecoder.OUT") float i0 = tsOutCopy[0 + 1] + tsOutCopy[0 + 1];
+ @LOC("THIS,LayerIIIDecoder.OUT") float i0p12 = i0 + tsOutCopy[12 + 1];
tmp0o =
- i0p12 + in[4 + 1] * 1.8793852415718f + in[8 + 1] * 1.532088886238f + in[16 + 1]
- * 0.34729635533386f;
- tmp1o = i0 + in[4 + 1] - in[8 + 1] - in[12 + 1] - in[12 + 1] - in[16 + 1];
+ i0p12 + tsOutCopy[4 + 1] * 1.8793852415718f + tsOutCopy[8 + 1] * 1.532088886238f
+ + tsOutCopy[16 + 1] * 0.34729635533386f;
+ tmp1o =
+ i0 + tsOutCopy[4 + 1] - tsOutCopy[8 + 1] - tsOutCopy[12 + 1] - tsOutCopy[12 + 1]
+ - tsOutCopy[16 + 1];
tmp2o =
- i0p12 - in[4 + 1] * 0.34729635533386f - in[8 + 1] * 1.8793852415718f + in[16 + 1]
- * 1.532088886238f;
+ i0p12 - tsOutCopy[4 + 1] * 0.34729635533386f - tsOutCopy[8 + 1] * 1.8793852415718f
+ + tsOutCopy[16 + 1] * 1.532088886238f;
tmp3o =
- i0p12 - in[4 + 1] * 1.532088886238f + in[8 + 1] * 0.34729635533386f - in[16 + 1]
- * 1.8793852415718f;
- tmp4o = (in[0 + 1] - in[4 + 1] + in[8 + 1] - in[12 + 1] + in[16 + 1]) * 0.707106781f; // Twiddled
+ i0p12 - tsOutCopy[4 + 1] * 1.532088886238f + tsOutCopy[8 + 1] * 0.34729635533386f
+ - tsOutCopy[16 + 1] * 1.8793852415718f;
+ tmp4o =
+ (tsOutCopy[0 + 1] - tsOutCopy[4 + 1] + tsOutCopy[8 + 1] - tsOutCopy[12 + 1] + tsOutCopy[16 + 1]) * 0.707106781f; // Twiddled
// 4 points on even indices
- @LOC("I00") float i6_ = in[6 + 1] * 1.732050808f; // Sqrt[3]
+ @LOC("THIS,LayerIIIDecoder.OUT") float i6_ = tsOutCopy[6 + 1] * 1.732050808f; // Sqrt[3]
tmp0_o =
- in[2 + 1] * 1.9696155060244f + i6_ + in[10 + 1] * 1.2855752193731f + in[14 + 1]
- * 0.68404028665134f;
- tmp1_o = (in[2 + 1] - in[10 + 1] - in[14 + 1]) * 1.732050808f;
+ tsOutCopy[2 + 1] * 1.9696155060244f + i6_ + tsOutCopy[10 + 1] * 1.2855752193731f
+ + tsOutCopy[14 + 1] * 0.68404028665134f;
+ tmp1_o = (tsOutCopy[2 + 1] - tsOutCopy[10 + 1] - tsOutCopy[14 + 1]) * 1.732050808f;
tmp2_o =
- in[2 + 1] * 1.2855752193731f - i6_ - in[10 + 1] * 0.68404028665134f + in[14 + 1]
- * 1.9696155060244f;
+ tsOutCopy[2 + 1] * 1.2855752193731f - i6_ - tsOutCopy[10 + 1] * 0.68404028665134f
+ + tsOutCopy[14 + 1] * 1.9696155060244f;
tmp3_o =
- in[2 + 1] * 0.68404028665134f - i6_ + in[10 + 1] * 1.9696155060244f - in[14 + 1]
- * 1.2855752193731f;
+ tsOutCopy[2 + 1] * 0.68404028665134f - i6_ + tsOutCopy[10 + 1] * 1.9696155060244f
+ - tsOutCopy[14 + 1] * 1.2855752193731f;
// Twiddle factors on odd indices
// and
// and
// twiddle factors for 36 point IDCT
- @LOC("EO") float e;
- @LOC("EO") float o;
+ @LOC("THIS,LayerIIIDecoder.OUT") float e;
+ @LOC("THIS,LayerIIIDecoder.OUT") float o;
e = tmp0 + tmp0_;
o = (tmp0o + tmp0_o) * 0.501909918f;
tmpf_0 = e + o;
// end 36 point IDCT */
// shift to modified IDCT
- //win_bt = win[block_type]; //substituted this so that a new area does not become created
-
- out[0] = -tmpf_9 * win[block_type][0];
- out[1] = -tmpf_10 * win[block_type][1];
- out[2] = -tmpf_11 * win[block_type][2];
- out[3] = -tmpf_12 * win[block_type][3];
- out[4] = -tmpf_13 * win[block_type][4];
- out[5] = -tmpf_14 * win[block_type][5];
- out[6] = -tmpf_15 * win[block_type][6];
- out[7] = -tmpf_16 * win[block_type][7];
- out[8] = -tmpf_17 * win[block_type][8];
- out[9] = tmpf_17 * win[block_type][9];
- out[10] = tmpf_16 * win[block_type][10];
- out[11] = tmpf_15 * win[block_type][11];
- out[12] = tmpf_14 * win[block_type][12];
- out[13] = tmpf_13 * win[block_type][13];
- out[14] = tmpf_12 * win[block_type][14];
- out[15] = tmpf_11 * win[block_type][15];
- out[16] = tmpf_10 * win[block_type][16];
- out[17] = tmpf_9 * win[block_type][17];
- out[18] = tmpf_8 * win[block_type][18];
- out[19] = tmpf_7 * win[block_type][19];
- out[20] = tmpf_6 * win[block_type][20];
- out[21] = tmpf_5 * win[block_type][21];
- out[22] = tmpf_4 * win[block_type][22];
- out[23] = tmpf_3 * win[block_type][23];
- out[24] = tmpf_2 * win[block_type][24];
- out[25] = tmpf_1 * win[block_type][25];
- out[26] = tmpf_0 * win[block_type][26];
- out[27] = tmpf_0 * win[block_type][27];
- out[28] = tmpf_1 * win[block_type][28];
- out[29] = tmpf_2 * win[block_type][29];
- out[30] = tmpf_3 * win[block_type][30];
- out[31] = tmpf_4 * win[block_type][31];
- out[32] = tmpf_5 * win[block_type][32];
- out[33] = tmpf_6 * win[block_type][33];
- out[34] = tmpf_7 * win[block_type][34];
- out[35] = tmpf_8 * win[block_type][35];
+ // win_bt = win[block_type]; //substituted this so that a new area does
+ // not become created
+
+ rawout[0] = -tmpf_9 * win[block_type][0];
+ rawout[1] = -tmpf_10 * win[block_type][1];
+ rawout[2] = -tmpf_11 * win[block_type][2];
+ rawout[3] = -tmpf_12 * win[block_type][3];
+ rawout[4] = -tmpf_13 * win[block_type][4];
+ rawout[5] = -tmpf_14 * win[block_type][5];
+ rawout[6] = -tmpf_15 * win[block_type][6];
+ rawout[7] = -tmpf_16 * win[block_type][7];
+ rawout[8] = -tmpf_17 * win[block_type][8];
+ rawout[9] = tmpf_17 * win[block_type][9];
+ rawout[10] = tmpf_16 * win[block_type][10];
+ rawout[11] = tmpf_15 * win[block_type][11];
+ rawout[12] = tmpf_14 * win[block_type][12];
+ rawout[13] = tmpf_13 * win[block_type][13];
+ rawout[14] = tmpf_12 * win[block_type][14];
+ rawout[15] = tmpf_11 * win[block_type][15];
+ rawout[16] = tmpf_10 * win[block_type][16];
+ rawout[17] = tmpf_9 * win[block_type][17];
+ rawout[18] = tmpf_8 * win[block_type][18];
+ rawout[19] = tmpf_7 * win[block_type][19];
+ rawout[20] = tmpf_6 * win[block_type][20];
+ rawout[21] = tmpf_5 * win[block_type][21];
+ rawout[22] = tmpf_4 * win[block_type][22];
+ rawout[23] = tmpf_3 * win[block_type][23];
+ rawout[24] = tmpf_2 * win[block_type][24];
+ rawout[25] = tmpf_1 * win[block_type][25];
+ rawout[26] = tmpf_0 * win[block_type][26];
+ rawout[27] = tmpf_0 * win[block_type][27];
+ rawout[28] = tmpf_1 * win[block_type][28];
+ rawout[29] = tmpf_2 * win[block_type][29];
+ rawout[30] = tmpf_3 * win[block_type][30];
+ rawout[31] = tmpf_4 * win[block_type][31];
+ rawout[32] = tmpf_5 * win[block_type][32];
+ rawout[33] = tmpf_6 * win[block_type][33];
+ rawout[34] = tmpf_7 * win[block_type][34];
+ rawout[35] = tmpf_8 * win[block_type][35];
}
+
}
- @LOC("C") private int counter = 0;
- @LOC("F") private static final int SSLIMIT = 18;
- @LOC("F") private static final int SBLIMIT = 32;
+ @LOC("C")
+ private int counter = 0;
+ private static final int SSLIMIT = 18;
+ private static final int SBLIMIT = 32;
// Size of the table of whole numbers raised to 4/3 power.
// This may be adjusted for performance without any problems.
@LATTICE("N<VAR")
static class SBI {
- @LOC("VAR") public int[] l;
- @LOC("VAR") public int[] s;
+ @LOC("VAR")
+ public int[] l;
+ @LOC("VAR")
+ public int[] s;
public SBI() {
l = new int[23];
s = new int[14];
}
+
@LATTICE("THIS<IN,THISLOC=THIS")
public SBI(@LOC("IN") int[] thel, @LOC("IN") int[] thes) {
l = thel;
s = thes;
}
}
- @LATTICE("N<VAR")
+
+ @LATTICE("V,V*")
static class gr_info_s {
- @LOC("VAR") public int part2_3_length = 0;
- @LOC("VAR") public int big_values = 0;
- @LOC("VAR") public int global_gain = 0;
- @LOC("VAR") public int scalefac_compress = 0;
- @LOC("VAR") public int window_switching_flag = 0;
- @LOC("VAR") public int block_type = 0;
- @LOC("VAR") public int mixed_block_flag = 0;
- @LOC("VAR") public int[] table_select;
- @LOC("VAR") public int[] subblock_gain;
- @LOC("VAR") public int region0_count = 0;
- @LOC("VAR") public int region1_count = 0;
- @LOC("VAR") public int preflag = 0;
- @LOC("VAR") public int scalefac_scale = 0;
- @LOC("VAR") public int count1table_select = 0;
+ @LOC("V")
+ public int part2_3_length = 0;
+ @LOC("V")
+ public int big_values = 0;
+ @LOC("V")
+ public int global_gain = 0;
+ @LOC("V")
+ public int scalefac_compress = 0;
+ @LOC("V")
+ public int window_switching_flag = 0;
+ @LOC("V")
+ public int block_type = 0;
+ @LOC("V")
+ public int mixed_block_flag = 0;
+ @LOC("V")
+ public int[] table_select;
+ @LOC("V")
+ public int[] subblock_gain;
+ @LOC("V")
+ public int region0_count = 0;
+ @LOC("V")
+ public int region1_count = 0;
+ @LOC("V")
+ public int preflag = 0;
+ @LOC("V")
+ public int scalefac_scale = 0;
+ @LOC("V")
+ public int count1table_select = 0;
/**
* Dummy Constructor
subblock_gain = new int[3];
}
}
-
- @LATTICE("N<VAR")
+
+ @LATTICE("GR2<GR1,GR1<GR,GR2*")
static class temporaire {
- @LOC("VAR") public int[] scfsi;
- @LOC("VAR") public gr_info_s[] gr;
+ @LOC("GR")
+ public int[] scfsi;
+ @LOC("GR")
+ public gr_info_s[] gr;
/**
* Dummy Constructor
}
}
- @LATTICE("N<VAR")
+ @LATTICE("CH")
static class III_side_info_t {
- @LOC("VAR") public int main_data_begin = 0;
- @LOC("VAR") public int private_bits = 0;
- @LOC("VAR") public temporaire[] ch;
+ @LOC("CH")
+ public int main_data_begin = 0;
+ @LOC("CH")
+ public int private_bits = 0;
+ @LOC("CH")
+ public temporaire[] ch;
/**
* Dummy Constructor
@LATTICE("N<VAR")
static class temporaire2 {
- @LOC("VAR") public int[] l; /* [cb] */
- @LOC("VAR") public int[][] s; /* [window][cb] */
+ @LOC("VAR")
+ public int[] l; /* [cb] */
+ @LOC("VAR")
+ public int[][] s; /* [window][cb] */
/**
* Dummy Constructor
// }
// }
- @LOC("F") private static final int slen[][] = { { 0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4 },
+ private static final int slen[][] = { { 0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4 },
{ 0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3 } };
- @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,
+ 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,
2, 0 };
- @LOC("F") private SBI[] sfBandIndex; // Init in the constructor.
+ @LOC("SBI")
+ private SBI[] sfBandIndex; // Init in the constructor.
- @LOC("F") public static final float two_to_negative_half_pow[] = { 1.0000000000E+00f, 7.0710678119E-01f,
+ public static final float two_to_negative_half_pow[] = { 1.0000000000E+00f, 7.0710678119E-01f,
5.0000000000E-01f, 3.5355339059E-01f, 2.5000000000E-01f, 1.7677669530E-01f,
1.2500000000E-01f, 8.8388347648E-02f, 6.2500000000E-02f, 4.4194173824E-02f,
3.1250000000E-02f, 2.2097086912E-02f, 1.5625000000E-02f, 1.1048543456E-02f,
1.8626451492E-09f, 1.3170890160E-09f, 9.3132257462E-10f, 6.5854450798E-10f,
4.6566128731E-10f, 3.2927225399E-10f };
- @LOC("F") public static final float t_43[] = create_t_43();
+ public static final float t_43[] = create_t_43();
@RETURNLOC("OUT")
static private float[] create_t_43() {
- @LOC("OUT") float[] t43 = new float[8192];
+ @LOC("OUT") float[] t43 = new float[8192];
final double d43 = (4.0 / 3.0);
for (@LOC("SH") int i = 0; i < 8192; i++) {
return t43;
}
- @LOC("F") public static final float io[][] = {
+ public static final float io[][] = {
{ 1.0000000000E+00f, 8.4089641526E-01f, 7.0710678119E-01f, 5.9460355751E-01f,
5.0000000001E-01f, 4.2044820763E-01f, 3.5355339060E-01f, 2.9730177876E-01f,
2.5000000001E-01f, 2.1022410382E-01f, 1.7677669530E-01f, 1.4865088938E-01f,
2.4414062501E-04f, 1.7263349151E-04f, 1.2207031251E-04f, 8.6316745755E-05f,
6.1035156254E-05f, 4.3158372878E-05f, 3.0517578127E-05f, 2.1579186439E-05f } };
- @LOC("F") public static final float TAN12[] = { 0.0f, 0.26794919f, 0.57735027f, 1.0f, 1.73205081f,
+ public static final float TAN12[] = { 0.0f, 0.26794919f, 0.57735027f, 1.0f, 1.73205081f,
3.73205081f, 9.9999999e10f, -3.73205081f, -1.73205081f, -1.0f, -0.57735027f, -0.26794919f,
0.0f, 0.26794919f, 0.57735027f, 1.0f };
* 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
* 12, 13, 14, 15, 16, 17 };
*/
- @LOC("F") private static/* final */int reorder_table[][]/* = loadReorderTable() */; // SZD:
- // will
- // be
- // generated
- // on
- // demand
+ @LOC("RT")
+ private static/* final */int reorder_table[][]/* = loadReorderTable() */; // SZD:
+
+ // will
+ // be
+ // generated
+ // on
+ // demand
/**
* Loads the data for the reorder
* ExceptionInInitializerError(ex); } }
*/
@LATTICE("OUT<J,J<I,I<SE,I<WIN,SE<SF,SE<SFB,WIN<SFB,J*,I*,WIN*,SFB*")
- static int[] reorder(@LOC("SF") int scalefac_band[]) { // SZD: converted from LAME
+ static int[] reorder(@LOC("SF") int scalefac_band[]) { // SZD: converted from
+ // LAME
@LOC("J") int j = 0;
@LOC("OUT") int ix[] = new int[576];
for (int sfb = 0; sfb < 13; sfb++) {
* 570,547,559,571,548,560,572,549,561,573,550,562,574,551,563,575} };
*/
- @LOC("F") private static final float cs[] = { 0.857492925712f, 0.881741997318f, 0.949628649103f,
+ private static final float cs[] = { 0.857492925712f, 0.881741997318f, 0.949628649103f,
0.983314592492f, 0.995517816065f, 0.999160558175f, 0.999899195243f, 0.999993155067f };
- @LOC("F") private static final float ca[] = { -0.5144957554270f, -0.4717319685650f, -0.3133774542040f,
+ private static final float ca[] = { -0.5144957554270f, -0.4717319685650f, -0.3133774542040f,
-0.1819131996110f, -0.0945741925262f, -0.0409655828852f, -0.0141985685725f,
-0.00369997467375f };
/***************************************************************/
/* INV_MDCT */
/***************************************************************/
- @LOC("F") public static final float win[][] = {
+ public static final float win[][] = {
{ -1.6141214951E-02f, -5.3603178919E-02f, -1.0070713296E-01f, -1.6280817573E-01f,
-4.9999999679E-01f, -3.8388735032E-01f, -6.2061144372E-01f, -1.1659756083E+00f,
-3.8720752656E+00f, -4.2256286556E+00f, -1.5195289984E+00f, -9.7416483388E-01f,
/***************************************************************/
@LATTICE("N<VAR")
class Sftable {
- @LOC("VAR") public int[] l;
- @LOC("VAR") public int[] s;
+ @LOC("VAR")
+ public int[] l;
+ @LOC("VAR")
+ public int[] s;
public Sftable() {
l = new int[5];
s = new int[3];
}
+
@LATTICE("THIS<IN,THISLOC=THIS")
- public Sftable(@LOC("IN") int[] thel, @LOC("IN") int[] thes) {
+ public Sftable(@LOC("IN") int[] thel, @LOC("IN") int[] thes) {
l = thel;
s = thes;
}
}
- @LOC("F") public Sftable sftable;
+ @LOC("F")
+ public Sftable sftable;
- @LOC("NS") public static final int nr_of_sfb_block[][][] = {
+ public static final int nr_of_sfb_block[][][] = {
{ { 6, 5, 5, 5 }, { 9, 9, 9, 9 }, { 6, 9, 9, 9 } },
{ { 6, 5, 7, 3 }, { 9, 9, 12, 6 }, { 6, 9, 12, 6 } },
{ { 11, 10, 0, 0 }, { 18, 18, 0, 0 }, { 15, 18, 0, 0 } },
{ { 8, 8, 5, 0 }, { 15, 12, 9, 0 }, { 6, 18, 9, 0 } } };
}
-