#ifndef MPG123_H
#define MPG123_H

#include "mp3ctx.h"

struct gr_info_s {
	  int scfsi;
	  unsigned part2_3_length;
	  unsigned big_values;
	  unsigned scalefac_compress;
	  unsigned block_type;
	  unsigned mixed_block_flag;
	  unsigned table_select[3];
	  unsigned subblock_gain[3];
	  unsigned maxband[3];
	  unsigned maxbandl;
	  unsigned maxb;
	  unsigned region1start;
	  unsigned region2start;
	  unsigned preflag;
	  unsigned scalefac_scale;
	  unsigned count1table_select;
	  int full_gain[3];
	  int pow2gain;
};

struct III_sideinfo
{
  unsigned main_data_begin;
  unsigned private_bits;
  struct {
		 struct gr_info_s gr[2];
  } ch[2];
};

/*
 * RO, in sr1.c
 */
extern long freqs[9];

/*
 * RW, 'scaleval'-based (tabinit.c); can live with (scaleval is constant)
 */
extern real decwin[(512+32)];

/*
 * RO, in tabinit.c
 */
extern real *pnts[];

static int do_layer2(MP3_context_p ctx,struct frame *fr,int single);
static int do_layer3(MP3_context_p ctx,struct frame *fr,int single);
static int synth_1to1(MP3_context_p ctx,real *bandPtr,int channel,unsigned char *out,int *pnt);
extern void dct64(real *a,real *b,real *c);

#endif /* MPG123_H */
