home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 2 / RISC_DISC_2.iso / resources / mpeg / mpegdec / audiompeg / !AudioMPEG_h_decoder < prev    next >
Encoding:
Text File  |  1995-05-23  |  6.5 KB  |  147 lines

  1. /**********************************************************************
  2. Copyright (c) 1991 MPEG/audio software simulation group, All Rights Reserved
  3. decoder.h
  4. **********************************************************************/
  5. /**********************************************************************
  6.  * MPEG/audio coding/decoding software, work in progress              *
  7.  *   NOT for public distribution until verified and approved by the   *
  8.  *   MPEG/audio committee.  For further information, please contact   *
  9.  *   Davis Pan, 508-493-2241, e-mail: pan@gauss.enet.dec.com          *
  10.  *                                                                    *
  11.  * VERSION 3.5                                                       *
  12.  *   changes made since last update:                                  *
  13.  *   date   programmers         comment                               *
  14.  * 2/25/91  Doulas Wong,        start of version 1.0 records          *
  15.  *          Davis Pan                                                 *
  16.  * 5/10/91  Vish (PRISM)        Renamed and regrouped all ".h" files  *
  17.  *                              into "common.h" and "decoder.h".      *
  18.  *                              Ported to Macintosh and Unix.         *
  19.  * 27jun91  dpwe (Aware)        New prototype for out_fifo()          *
  20.  *                              Moved "alloc_*" stuff to common.h     *
  21.  *                              Use ifdef PROTO_ARGS for prototypes   *
  22.  *                              prototypes reflect frame_params struct*
  23.  * 10/3/91  Don H. Lee          implemented CRC-16 error protection   *
  24.  * 2/11/92  W. Joseph Carter    Ported new code to Macintosh.  Most   *
  25.  *                              important fixes involved changing     *
  26.  *                              16-bit ints to long or unsigned in    *
  27.  *                              bit alloc routines for quant of 65535 *
  28.  *                              and passing proper function args.     *
  29.  *                              Removed "Other Joint Stereo" option   *
  30.  *                              and made bitrate be total channel     *
  31.  *                              bitrate, irrespective of the mode.    *
  32.  *                              Fixed many small bugs & reorganized.  *
  33.  *                              Modified some function prototypes.    *
  34.  * 08/07/92 Mike Coleman        Made small changes for portability    *
  35.  **********************************************************************/
  36.  
  37. /***********************************************************************
  38. *
  39. *  Decoder Include Files
  40. *
  41. ***********************************************************************/
  42.  
  43. /***********************************************************************
  44. *
  45. *  Decoder Definitions
  46. *
  47. ***********************************************************************/
  48.  
  49. #define   DFLT_OPEXT        ".dec"  /* default output file name extension */
  50. /*
  51.  NOTE: The value of a multiple-character constant is
  52.  implementation-defined.
  53. */
  54.  
  55. #define   SYNC_WORD         (long) 0xfff
  56. #define   SYNC_WORD_LNGTH   12
  57.  
  58. #define   MUTE              0
  59.  
  60. /***********************************************************************
  61. *
  62. *  Decoder Type Definitions
  63. *
  64. ***********************************************************************/
  65.  
  66. /***********************************************************************
  67. *
  68. *  Decoder Variable External Declarations
  69. *
  70. ***********************************************************************/
  71.  
  72. /***********************************************************************
  73. *
  74. *  Decoder Function Prototype Declarations
  75. *
  76. ***********************************************************************/
  77.  
  78. /* The following functions are in the file "musicout.c" */
  79.  
  80. #ifdef   PROTO_ARGS
  81. extern void   usage(void);
  82. #else
  83. extern void   usage();
  84. #endif
  85.  
  86. /* The following functions are in the file "decode.c" */
  87.  
  88. #ifdef   PROTO_ARGS
  89. extern void   decode_info(Bit_stream_struc*, frame_params*);
  90. extern void   II_decode_bitalloc(Bit_stream_struc*, unsigned int[2][SBLIMIT],
  91.                        frame_params*);
  92. extern void   I_decode_bitalloc(Bit_stream_struc*, unsigned int[2][SBLIMIT],
  93.                        frame_params*);
  94. extern void   I_decode_scale(Bit_stream_struc*, unsigned int[2][SBLIMIT],
  95.                        unsigned int[2][3][SBLIMIT], frame_params*);
  96. extern void   II_decode_scale(Bit_stream_struc*, unsigned int[2][SBLIMIT],
  97.                        unsigned int[2][SBLIMIT], unsigned int[2][3][SBLIMIT],
  98.                        frame_params*);
  99. extern void   I_buffer_sample(Bit_stream_struc*, unsigned int[2][3][SBLIMIT],
  100.                        unsigned int[2][SBLIMIT], frame_params*);
  101. extern void   II_buffer_sample(Bit_stream_struc*, unsigned int[2][3][SBLIMIT],
  102.                        unsigned int[2][SBLIMIT], frame_params*);
  103. extern void   read_quantizer_table(double[17], double[17]);
  104. extern void   II_dequantize_sample(unsigned int[2][3][SBLIMIT], 
  105.                        unsigned int[2][SBLIMIT], double[2][3][SBLIMIT],
  106.                        frame_params*);
  107. extern void   I_dequantize_sample(unsigned int[2][3][SBLIMIT],
  108.                        double[2][3][SBLIMIT], unsigned int[2][SBLIMIT],
  109.                        frame_params*);
  110. extern void   read_scale_factor(double[SCALE_RANGE]);
  111. extern void   II_denormalize_sample(double[2][3][SBLIMIT],
  112.                        unsigned int[2][3][SBLIMIT], frame_params*, int);
  113. extern void   I_denormalize_sample(double[2][3][SBLIMIT],
  114.                        unsigned int[2][3][SBLIMIT], frame_params*);
  115. extern void   create_syn_filter(double[64][SBLIMIT]);
  116. extern int    SubBandSynthesis (double*, int, short*);
  117. extern void   read_syn_window(double[HAN_SIZE]);
  118. extern void   window_sample(double*, double*);
  119. extern void   out_fifo(short[2][3][SBLIMIT], int, frame_params*, int, FILE*,
  120.                        unsigned long*);
  121. extern void   buffer_CRC(Bit_stream_struc*, unsigned int*);
  122. extern void   recover_CRC_error(short[2][3][SBLIMIT], int, frame_params*,
  123.                        FILE*, unsigned long*);
  124. #else
  125. extern void   decode_info();
  126. extern void   II_decode_bitalloc();
  127. extern void   I_decode_bitalloc();
  128. extern void   I_decode_scale();
  129. extern void   II_decode_scale();
  130. extern void   I_buffer_sample();
  131. extern void   II_buffer_sample();
  132. extern void   read_quantizer_table();
  133. extern void   II_dequantize_sample();
  134. extern void   I_dequantize_sample();
  135. extern void   read_scale_factor();
  136. extern void   II_denormalize_sample();
  137. extern void   I_denormalize_sample();
  138. extern void   create_syn_filter();
  139. extern int    SubBandSynthesis ();
  140. extern void   read_syn_window();
  141. extern void   window_sample();
  142. extern void   out_fifo();
  143. extern void   buffer_CRC();
  144. extern void   recover_CRC_error();
  145. #endif
  146.  
  147.