home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / a / audiompeg / !AudioMPEG / !Release < prev    next >
Internet Message Format  |  1995-05-23  |  12KB

  1. From:    US1RMC::"seymour@m31.dgbt.doc.ca" "Seymour Shlien"  1-SEP-1993 11:59:36.73
  2. To:    3d::pan
  3. CC:
  4. Subj:    release3.9 guide
  5.  
  6.  
  7.           INTERNATIONAL ORGANIZATION FOR STANDARDIZATION
  8.            ORGANISATION INTERNATIONALE DE NORMALISATION
  9.                                ISO/IEC JTC1/SC29/WG 11
  10.             CODING OF MOVING PICTURES AND ASSOCIATED AUDIO
  11.  
  12.                                 MPEG92/
  13.                                 Nov. 1992
  14.  
  15. Source: Davis Pan (Digital Equipment Corporation),
  16.             Chairman of the MPEG/audio ad hoc committee on software
  17.             simulation
  18. Title: Working Draft of MPEG/Audio Technical Report
  19.  
  20. Disclaimer of Warranty
  21.     These software programs are available to the user without any
  22. license fee or royalty on an "as is" basis.  ISO disclaims any and all
  23. warranties,  whether express, implied, or statuary, including any
  24. implied warranties or merchantability or of fitness for a particular
  25. purpose.  In no event shall ISO be liable for any incidental, punitive,
  26. or consequential damages of any kind whatsoever arising from the
  27. use of these programs.
  28.  
  29.     This disclaimer of warranty extends to the user of these
  30. programs and user's customers, employees, agents, transferees,
  31. successors, and assigns,
  32.  
  33.     ISO does not represent or warrant that the programs furnished
  34. hereunder are free of infringement or any third-party patents,
  35. copyrights or trade secrets.
  36.  
  37.     The purpose of this software is to provide a tool to help in the
  38. learning and understanding of the MPEG/audio compression and
  39. decompression algorithm.  It is not an efficient implementation.
  40.  
  41.  
  42.  
  43. Organization of this Report
  44.  
  45.     The main body of this report describes the organization and
  46. use of the software.  The listings of the software, sample makefiles,
  47. and test bitstreams are contained in the appendices:
  48.  
  49.  
  50.  
  51. Software Limitations
  52.  
  53.     The software implements levels I and II and psychophysical
  54. auditory models I and II as described in the ISO 3-11171 rev 1
  55. standard. There are future plans to implement level III.
  56. The input/output audio data may either be headerless raw 16 bit data
  57. or alternatively an AIFF formatted file (Audio Interchange File
  58. Format) with certain limitations. (For more information on the AIFF
  59. format see the postscript file /sgi/aiff-c.9.26.91.ps at the
  60. anonymous ftp site FTP.SGI.COM (192.48.153.1)).  The AIFF formatted
  61. file is a convenient way for storing sampling rate of the audio file.
  62.  
  63.     The encoder and decoder software are configured to output the
  64. coded audio bitstreams as a string of hexadecimal ascii characters.
  65. For greater compression efficiency,  compile flag, BS_FORMAT, in
  66. common.h can be switched to configure the bitstream reading and
  67. writing routines to process raw binary bitstreams.
  68.  
  69.     This software has been run and verified on a large variety of
  70. computers and operating systems. In particular UNIX, MS_DOS (with
  71. MicroSoft C version 6), Macintosh, AIX Platform (RS6000) and Convex.
  72.  
  73.  
  74. Organization of the Code
  75.  
  76. The MPEG/audio Layer 1 and Layer 2 ** software package consists
  77. of:
  78.     21 data files tables
  79.     8 source files (*.c)
  80.     3 definitions files (*.h)
  81.     3 test bitstreams
  82.     * makefiles
  83.  
  84.  
  85. Table 1 illustrates how the encoder and decoder is formed from the
  86. component files.  In this table the definition files are enclosed in
  87. parenthesis and listed immediately below the primary source file
  88. which uses them.  The data file names are listed within braces and
  89. also placed immediately below the source file which uses them.
  90.  
  91.             Table 1
  92.  
  93. encoder            common            decoder
  94. files            files            files
  95. ----------      ------------    ------------
  96. musicin.c        common.c        musicout.c
  97. encode.c        (common.h)        decode.c
  98. (encoder.h)         {alloc_0}          (decoder.h)
  99. {enwindow}        {alloc_1}        {dewindow}
  100. psy.c, subs.c        {alloc_2}
  101. {absthr_0}        {alloc_3}
  102. {absthr_1}
  103. {absthr_2}
  104. tonal.c
  105. {1cb0}, {1cb1}, {1cb2}
  106. {2cb0}, {2cb1}, {2cb2}
  107. {1th0}, {1th1}, {1th2}
  108. {2th0}, {2th1}, {2th2}
  109.  
  110. The test files orig.mpg and sine.dec are approximately
  111. 129026 and 387072 bytes. (Small variations are due to the blocking
  112. structures imposed by various disk operating systems.)
  113.  
  114.  
  115.  
  116. Software Installation
  117.  
  118.     Place are the 21 tables (absthr_*, *cb*, *th*, alloc_*)
  119. in a subdirectory called tables. Modify the common.h to reflect
  120. the compiler and machine you are using. (ie. uncomment one of the
  121. defs UNIX, MACINTOSH, MS_DOS, MSC60, AIX or CONVEX). Compile and
  122. link the files using one of the makefiles provided as a guideline.
  123. Note that the compiler may issue warning messages such as
  124.  
  125. common.c: In function `aiff_read_headers':
  126. common.c:686: warning: multi-character character constant
  127. common.c:687: warning: multi-character character constant
  128. common.c:703: warning: multi-character character constant
  129. common.c:735: warning: multi-character character constant
  130. common.c: In function `aiff_write_headers':
  131. common.c:825: warning: multi-character character constant
  132. common.c:826: warning: multi-character character constant
  133. common.c:827: warning: multi-character character constant
  134.  
  135. musicin.c:920: warning: static declaration for `usage' follows non-static
  136. musicin.c: In function `aiff_check':
  137. musicin.c:960: warning: multi-character character constant
  138.  
  139. These messages are dependent on the preprocessor directives specified
  140. in the common.h file.
  141.  
  142.  
  143. Usuage
  144.  
  145.     To run the code type the name of the file followed by a
  146. carriage return.  The programs will prompt you to input the
  147. appropriate parameters.  The sound input file for the encoder should
  148. be sound data, monophonic or stereophonic, sampled at 32, 44.1, or
  149. 48 kHz with 16 bits per sample.  For stereophonic data the left
  150. channel sample should precede the right channel sample.  The sound
  151. output file of the decoder will be the same format as the sound input
  152. file used by the decoder,  except for possible byte order differences
  153. if the encoder and decoder programs are run on different computer
  154. systems which have different byte ordering conventions.
  155.  
  156.     Assuming the program musicin produces the MPEG coded file
  157. and musicout decodes the MPEG coded file, the programs can be run
  158. in either commandline mode or user prompt mode.  For example, on a
  159. UNIX operating system, entering
  160.  
  161. musicin sine.dec sine.mpg
  162.  
  163. will run the program with the current built in defaults. The output
  164. from the program should appear as below.
  165.  
  166. Encoding configuration:
  167. Layer=II   mode=stereo   extn=0   psy model=2
  168. samp frq=44.1 kHz   total bitrate=384 kbps
  169. de-emph=0   c/right=0   orig=0   errprot=0
  170. input file: 'sine.dec'   output file: 'sine.mpg'
  171. using bit allocation table alloc_1
  172. slots/frame = 1253
  173. frac SpF=0.878, tot bitrate=384 kbps, s freq=44.1 kHz
  174. Fractional number of slots, padding required
  175. {   0}absthr[][] sampling frequency index: 1
  176. {   1}{   2}{   3}{   4}{   5}{   6}{   7}...
  177.  
  178.  
  179. Alternatively, if you enter
  180.  
  181. musicin -help
  182.  
  183. The program will respond with the correct command-line usuage
  184. as shown below and then exit.
  185.  
  186. musicin: unrec option h
  187. musicin: -l layer must be 1 or 2, not p
  188. usage: musicin                         queries for all arguments, or
  189.        musicin [-l lay][-m mode][-p psy][-s sfrq][-b br][-d emp]
  190.           [-c][-o][-e] inputPCM [outBS]
  191. where
  192.  -l lay   use layer <lay> coding   (dflt    2)
  193.  -m mode  channel mode : s/d/j/m   (dflt    s)
  194.  -p psy   psychoacoustic model 1/2 (dflt    2)
  195.  -s sfrq  input smpl rate in kHz   (dflt 44.1)
  196.  -b br    total bitrate in kbps    (dflt  384)
  197.  -d emp   de-emphasis n/5/c        (dflt    n)
  198.  -c       mark as copyright
  199.  -o       mark as original
  200.  -e       add error protection
  201.  inputPCM input PCM sound file (standard or AIFF)
  202.  outBS    output bit stream of encoded audio (dflt inName+.mpg)
  203.  
  204.  
  205.  
  206. Finally, if you just enter
  207.  
  208. musicin
  209.  
  210. Then the program will prompt you for all the coding parameters before
  211. executing.
  212.  
  213. Enter PCM input file name <required>: sine.dec
  214. >>> PCM input file name is: sine.dec
  215. Enter MPEG encoded output file name <sine.dec.mpg>: sine.mpg
  216. >>> MPEG encoded output file name is: sine.mpg
  217. What is the sampling frequency? <44100>[Hz]:
  218. >>> Default 44.1 kHz samp freq selected
  219. Which layer do you want to use?
  220. Available: Layer (1), Layer (<2>):
  221. >>> Using default Layer 2
  222. Which mode do you want?
  223. Available: (<s>)tereo, (j)oint stereo, (d)ual channel, s(i)ngle Channel:
  224. >>> Using default stereo mode
  225. Which psychoacoustic model do you want to use? <2>:
  226. >>> Default model 2 selected
  227. What is the tota