home *** CD-ROM | disk | FTP | other *** search
/ ftp.pasteur.org/FAQ/ / ftp-pasteur-org-FAQ.zip / FAQ / mpeg-faq / part2 / text0000.txt < prev   
Encoding:
Text File  |  1996-11-10  |  61.1 KB  |  1,306 lines

  1. Archive-name: mpeg-faq/part2
  2. Last-modified: 1996/06/02
  3. Version: v 4.1 96/06/02
  4. Posting-Frequency: bimonthly
  5.  
  6. perceptual audio codecs. If you need more informations about the Noise-to-
  7. Mask-Ratio (NMR) technology, feel free to contact nmr@iis.fhg.de.
  8.  
  9. Q: O.K., back to these listening tests. Come on, tell me some results.
  10. A: Well, for details you should study one of those AES papers or MPEG 
  11. documents listed above. The main result is that for low bitrates (64 kbps 
  12. per channel or below), Layer-3 always scored significantly better than 
  13. Layer-2. Another important conclusion is the draft recommendation of the 
  14. task group TG 10/2 within the ITU-R. It recommends the use of low bit-
  15. rate audio coding schemes for digital sound-broadcasting applications 
  16. (doc. BS.1115).
  17.  
  18. Q: Very interesting! Tell me more about this recommendation!
  19. A: The task group TG 10/2 concluded its work in October 93. The draft 
  20. recommendation defines three fields of broadcast applications:
  21. - distribution and contribution links (20 kHz bandwidth, no audible 
  22. impairments with up to 5 cascaded codecs)
  23. Recommendation: Layer-2 with 180 kbps per channel
  24. - emission (20 kHz bandwidth)
  25. Recommendation: Layer-2 with 128 kbps per channel
  26. - commentary links (15 kHz bandwidth)
  27. Recommendation: Layer-3 with 60 kbps for monophonic and 120 kbps
  28. for stereophonic signals
  29.  
  30. Q: I see. Medium bitrates - Layer-2, low bitrates - Layer-3. What's about a 
  31. bitrate of 96 kbps per channel that seems to be "somewhere in between" 
  32. Layer-2 and Layer-3 domains?
  33. A: Interesting question. In fact, a total bitrate of 192 kbps for stereo music is 
  34. useful for real applications, e.g. emission via satellite channels. The ITU-R 
  35. required that emission codecs should score at least 4.0 on the CCIR 
  36. impairment scale, even for the most critical material. At 128 kbps per 
  37. channel, Dolby's AC-2, Layer-2 and Layer-3 fulfilled this requirement. 
  38. Finally, Layer-2 got the recommendation mainly because of its 
  39. "commonality with the distribution and contribution application".
  40. Further tests for emission were performed at 192 kbps joint-stereo coding. 
  41. Layer-3 clearly met the requirements, Layer-2 fulfilled them only 
  42. marginally, with doubts remaining during further tests with cascaded 
  43. codecs in 1993. In the end, the task group decided to pronounce no 
  44. recommendation for emission at 192 kbps.
  45.  
  46. Q: Someone told me that in the ITU-R tests, there was some trouble with 
  47. Layer-3, specifically on male voice in the German language. Still, Layer-3 
  48. got the recommendation for "commentary links". Can you explain that?
  49. A: Yes. For commentary links, the quality requirements for speech were to be 
  50. equivalent to 14-bit linear PCM, and for music, some perceptible 
  51. impairments were to be tolerated. In the test in 1992, Layer-3 was by far 
  52. the only codec that fulfilled these requirements (e.g. overall monophonic, 
  53. Layer-3 scored 3.6 in contrast to Layer-2 at 2.05 - and for male German 
  54. speech, Layer-3 scored 4.4 in contrast to Layer-2 at 2.4).
  55. Further tests were performed in 1993 using headphones. They showed that 
  56. MPEG-1 Layer-3 with monophonic speech (the test item is German male
  57. voice) at 60 kbps did not fully meet the quality requirements. The ITU 
  58. decided to recommend Layer-3 and to include a temporary footnote that 
  59. will be removed as soon as an improved Layer-3 codec fulfills the 
  60. requirements completely, i.e. even with that well-known critical male 
  61. German speech item (for many other speech items, Layer-3 has no trouble 
  62. at all).
  63.  
  64. Q: O.K., a Layer-2 codec at low bitrates may sound poor today, but couldn't 
  65. that be improved in the future? I guess you just told me before that the 
  66. encoder is not fixed in the standard.
  67. A: Good thinking! As the sound quality mainly depends on the encoder 
  68. implementation, it is true that there is no such thing as a "Layer-N"- 
  69. quality. So we definitely only know the performance of the reference 
  70. codecs used during the international tests. Who knows what will happen in 
  71. the future? What we do know now, is:
  72. Today, in MPEG-1 and MPEG-2, Layer-3 provides the best sound quality 
  73. at low bitrates, by far better than Layer-2.
  74. Tomorrow, both Layers may improve. Layer-2 has been designed as a 
  75. trade-off between quality and complexity, so the bitstream format allows 
  76. only limited innovations. In contrast, even the current reference Layer-3-
  77. codec does not exploit all of the powerful mechanisms inside the Layer-3 
  78. bitstream format.  
  79.  
  80. Q: What other topics do I have to keep in mind? Tell me about the complexity 
  81. of Layer-3.
  82. A: O.K. First, we have to separate between decoder and encoder, as the 
  83. workload is distributed asymmetrically between them, i.e. the encoder 
  84. needs much more computation power than the decoder.
  85. For a stereo Layer-3-decoder, you may either use a DSP (e.g. one 
  86. DSP56002 from Motorola) or an "ASIC", like the masc-programmed DSP 
  87. chip MAS 3503 C from Intermetall, ITT. Some rough requirements are:
  88. computation power around 12 MIPs
  89. Data ROM 2.5 Kwords
  90. Data RAM 4.5 Kwords
  91. Programm ROM 2 to 4 Kwords
  92. word length at least 20 bit
  93. Intermetall (ITT) estimated an overhead of around 30 % chip area for 
  94. adding the necessary Layer-3 modules to a Layer-2-decoder. So you need 
  95. not worry too much about decoder complexity.
  96. For a stereo Layer-3-encoder achieving reference quality, our current real-
  97. time implementations use two DSP32C (AT&T) and one     DSP56002. With 
  98. the advent of the 21060 (Analog Devices), even a single-chip stereo 
  99. encoder comes into view.
  100.  
  101. Q: Quality, complexity - what about the codec delay?
  102. A: Well, the standard gives some figures of the theoretical minimum delay:
  103.    Layer-1:     19 ms (<50 ms)
  104.    Layer-2:     35 ms (100 ms)
  105.    Layer-3:     59 ms (150 ms)
  106. The practical values are significantly above that. As they depend on the 
  107. implementation, exact figures are hard to give. So the figures in brackets 
  108. are just rough thumb values - real codecs may show significant higher 
  109. values.
  110.  
  111. Q: For some applications, a very short delay is of critical importance: e.g. in a 
  112. feedback link, a reporter can only talk intelligibly if the overall delay is 
  113. below around 10 ms. Here, do I have to forget about MPEG audio at all?
  114.  
  115. A: Not necessarily. In this application, broadcasters may use "N-1" switches 
  116. in the studio to overcome this problem - or they may use equipment with 
  117. appropriate echo-cancellers. 
  118. But with many applications, these delay figures are small enough to 
  119. present no extra problem. At least, if one can accept a Layer-2 delay, one 
  120. can most likely also accept the higher Layer-3 delay.
  121.  
  122. Q: Someone told me that, with Layer-3, the codec delay would depend on the 
  123. actual audio signal, varying over the time. Is this really true? 
  124. A: No. The codec delay does not depend on the audio signal.With all Layers, 
  125. the delay depends on the actual implementation used in a specific codec, so 
  126. different codecs may have different delays. Furthermore, the delay depends 
  127. on the actual sample rate and bitrate of your codec.   
  128.    
  129.  Q: All in all, you sound as if anybody should use Layer-3 for low bitrates. 
  130. Why on earth do some vendors still offer only Layer-2 equipment for these 
  131. applications?
  132. A: Well, maybe because they started to design and develop their systems 
  133. rather early, e.g. in 1990. As Layer-2 is identical with MUSICAM, it has 
  134. been available since summer of 1990, at latest. In that year, Layer-3 
  135. development started and could be successfully finished at the end of 1991. 
  136. So, for a certain time, vendors could only exploit the already existing part 
  137. of the new MPEG standard.   
  138. Now the situation has changed. All Layers are available, the standard is 
  139. completed, and new systems may capitalize on the full features of MPEG 
  140. audio.
  141.  
  142. 4. Products
  143.  
  144. Q: What are the main fields of application for Layer-3?
  145. A: Simply put: all applications that need high-quality sound at very low 
  146. bitrates to store or transmit music signals. Some examples are:
  147. - high-quality music links via ISDN phone lines (basic rate)
  148. - sound broadcasting via low bitrate satellite channels
  149. - music distribution in computer networks with low demands for channel 
  150. bandwidth and memory capacity
  151. - music memories for solid state recorders based on ROM chips
  152.         
  153. Q: What kind of Layer-3 products are already available?
  154. A: An increasing number of applications benefit from the advanced features 
  155. of MPEG audio Layer-3. Here is a list of companies that currently sell 
  156. Layer-3 products. For further informations, please contact these companies 
  157. directly.
  158.  
  159. Layer-3 Codecs for Telecommunication:
  160. -    AETA, 361 Avenue du Gal de Gaulle (*)
  161.     F-92140 Clamart, France
  162.     Fax: +33-1-4136-1213 (Mr. Fric)
  163. (*)    products announced for 1995
  164. -         Dialog 4 System Engineering GmbH, Monreposstr. 57
  165.          D-71634 Ludwigsburg, Germany
  166.          Fax: +49-7141-22667 (Mr. Burkhardtsmaier)
  167. -    PKI Philips Kommunikations Industrie, Thurn-und-Taxis-Str. 14
  168.          D-90411 Nuernberg, Germany
  169.          Fax: +49-911-526-3795 (Mr. Konrad)
  170. -    Telos Systems, 2101 Superior Avenue
  171.          Cleveland, OH 44114, USA
  172.          Fax: +1-216-241-4103 (Mr. Church)
  173.  
  174. Speech Announcement Systems:
  175. -    Meister Electronic GmbH, Koelner Str. 37
  176.          D-51149 Koeln, Germany
  177.     Fax: +49-2203-1701-30 (Mr. Seifert)
  178.  
  179. PC Cards (Hardware and/or Software):
  180. -         Dialog 4 System Engineering GmbH, Monreposstr. 57
  181.          D-71634 Ludwigsburg, Germany
  182.          Fax: +49-7141-22667 (Mr. Burkhardtsmaier)
  183. -    Proton Data, Marrensdamm 12 b
  184.     D-24944 Flensburg, Germany
  185.     Fax: +49-461-38169 (Mr. Nissen)
  186.  
  187. Layer-3-Decoder-Chips:
  188. -    ITT Intermetall GmbH, Hans-Bunte-Str. 19
  189.          D-79108 Freiburg, Germany
  190.          Fax: +49-761-517-2395 (Mrs. Mayer)
  191.  
  192. Layer-3 Shareware Encoder/Decoder:
  193. -    Mailbox System Nuernberg (MSN), Innerer Kleinreuther Weg 21
  194.      D-90408 Nuernberg, Germany
  195.     Fax: +49-911-9933661 (Mr. Hanft) 
  196.     Shareware (version 1.50) is available for:
  197.     -    IBM-PCs or Compatibles with MS-DOS:
  198.         L3ENC.EXE and L3DEC.EXE should work on practically 
  199.         any PC with 386 type CPU or better. For the encoder, a 
  200.         486DX33 or better is recommended.
  201.         On a 486DX2/66 the current shareware decoder performs in 
  202.         1:3 real-time, and the shareware encoder in 1:14 real-time 
  203.         (with stereo signals sampled with 44.1 kHz).
  204.     -    Sun workstations:
  205.         On a SPARC station 10, the decoder works in real time, the 
  206.         encoder performs in 1:5 real-time.
  207.         For more information, refer to chapter 6.
  208.  
  209. 5. Support by Fraunhofer-IIS
  210.  
  211. Q: I understand that Fraunhofer-IIS has been the main developer of MPEG 
  212. audio Layer-3. What can they do for me?
  213. A: The Fraunhofer-IIS focusses on applied research. Its engineers have 
  214. profound expertise in real-time implementations of signal-processing 
  215. algorithms, especially of Layer-3. The IIS may support a specific Layer-3 
  216. application in various ways:
  217. - detailed informations
  218. - technical consulting
  219. - advanced C sources for encoder and decoder
  220. - training-on-the-job
  221. - research and development projects on contract basis.
  222. For more informations, feel free to contact:
  223. - Fraunhofer-IIS, Weichselgarten 3
  224.   D-91058 Erlangen, Germany
  225.   Fax: +49-9131-776-399 (Mr. Popp)
  226.  
  227. Q: What are the latest audio demonstrations disclosed by Fraunhofer-IIS?
  228. A: At the Tonmeistertagung 11.94 in Karlsruhe, Germany, the IIS 
  229. demonstrated:
  230. - real-time Layer-3 decoder software (mono, 32 kHz fs) including sound 
  231. output on ProAudioSpectrum running on a 486DX2/66
  232. - playback of Layer-3 stereo files from a CD-ROM that has been produced 
  233. by Intermetall and contains Layer-3 data of up to 15 h of stereo music 
  234. (among others, all Beethoven symphonies); the decoder is a small board 
  235. that is connected to the parallel printer port. It mainly carries 3 chips: a 
  236. PLD as data interface, the MAS 3503 C stereo decoder chip, and the 
  237. ASCO Digital-Analog-Converter. The board has two cinch adapters that 
  238. allow a very simple connection to the usual stereo amplifier.
  239. - music-from-silicon demonstration by using the standard 1 Mbyte 
  240. EPROMs to store 1.5 minutes of CD-like quality stereo music
  241. - music link (with around 6 kHz bandwidth) via V.34 modem at 28.8 kbps 
  242. and one analog phone line
  243.  
  244. 6. Shareware Information
  245.  
  246. The Layer 3 Shareware is copyright Fraunhofer - IIS 1994,1995.
  247. The shareware packages are available:
  248. - via anonymous ftp from fhginfo.fhg.de (153.96.1.4)
  249. You may download our Layer-3 audio software package from the directory 
  250. /pub/layer3. You will find the following files:
  251.  
  252.      For IBM PCs:
  253.         l3v150d1.txt       a short description of the files found in l3v150.zip
  254.         l3v150d1.zip       encoder, decoder and documentation
  255.         l3v150d2.txt    a short description of the files found in l3v150n.zip
  256.         l3v150d2.zip    sample bitstreams
  257.  
  258.         For SUN workstations: 
  259.         l3v150.sun.txt         short description of the files found in
  260.                 l3v100.sun.tar.gz
  261.         l3v150.sun.tar.gz      encoder, decoder and documentation
  262.         l3v150bit.sun.txt       short description of the files found in     
  263.                                 l3v150bit.sun.tar.gz
  264.         l3v150bit.sun.tar.gz    sample bitstreams
  265.  
  266. -  via direct modem download (up to 14.400 bps)
  267. Modem telephone number  : +49 911 9933662    Name: FHG
  268. Packet switching network: (0) 262 45 9110 10290    Name: FHG
  269. (For the telephone number, replace "+" with your appropriate international 
  270. dial prefix, e.g. "011" for the USA.)
  271. Follow the menus as desired.
  272.  
  273. - via shipment of diskettes (only including registration)
  274. You may order a diskette directly from:
  275.     Mailbox System Nuernberg (MSN)
  276.      Hanft & Hartmann
  277.      Innerer Kleinreuther Weg 21
  278.      D-90408 Nuernberg, Germany
  279.  
  280.  Please note: MSN will only ship a diskette if they get paid for the 
  281. registration fee before. The registration fee is 85 Deutsche Mark (about 50 
  282. US$) (plus sales tax, if applicable) for one copy of the package. The 
  283. preferred method of payment is via credit card. Currently, MSN accepts 
  284. VISA, Master Card / Eurocard / Access credit cards. For details see the file 
  285. REGISTER.TXT found in the shareware package.
  286.  
  287.  You may reach MSN also via Internet: msn@iis.fhg.de
  288.      or via Fax: +49 911 9933661
  289.      or via BBS: +49 911 9933662        Name: FHG
  290.      or via X25: 0262 45 9110 10290         Name: FHG
  291.     (e.g. in USA, please replace "+" with "011"
  292.  
  293. -    via email
  294. You may get our shareware also by a direct request to msn@iis.fhg.de. In 
  295. this case, the shareware is split into about 30 small uuencoded parts...
  296.  
  297. SOFTWARE: MPEG Audio Layer 3 Shareware Codec and Windows Realtime Player
  298.  
  299. ----------------------------------------------------------------
  300. MPEG Audio Codec and Windows REALTIME Player from Fraunhofer IIS
  301. ----------------------------------------------------------------
  302.  
  303. Fraunhofer IIS announces l3enc/l3dec V2.00 and WinPlay3 V1.00.
  304.  
  305. For high quality audio compression, the shareware l3enc/l3dec V2.00
  306. package is available for Linux, SUN, NeXT and DOS on
  307. <URL:ftp://ftp.fhg.de/pub/layer3>
  308. Versions for SGI and HP will follow soon.
  309.  
  310. The shareware package for DOS
  311.  
  312. <URL:ftp://ftp.fhg.de/pub/layer3/l3v200d1.zip>
  313.  
  314. includes a demo version of WinPlay3, a Windows MPEG Audio Layer 3
  315. realtime-player.
  316.  
  317. With MPEG Audio Layer 3 you can get a 12:1 compression with a CD like
  318. quality.
  319. Instead of 12 MByte / minute (stereo 44.1 kHz) you only need about
  320. 1 Mbyte / minute!
  321.  
  322. More information can be found on
  323. <URL:ftp://ftp.fhg.de/pub/layer3/MPEG_Audio_L3_FAQ.html>
  324. or contact <URL:mailto:layer3@iis.fhg.de>
  325.  
  326. -  via direct modem download (up to 14.400 bps)
  327. Modem telephone number  : +49 911 9933662    Name: FHG
  328. Packet switching network: (0) 262 45 9110 10290    Name: FHG
  329. (For the telephone number, replace "+" with your appropriate international 
  330. dial prefix, e.g. "011" for the USA.)
  331. Follow the menus as desired.
  332.  
  333. - via shipment of diskettes (only including registration)
  334. You may order a diskette directly from:
  335.     Mailbox System Nuernberg (MSN)
  336.      Hanft & Hartmann
  337.      Innerer Kleinreuther Weg 21
  338.      D-90408 Nuernberg, Germany
  339.  
  340. Please note: MSN will only ship a diskette if they get paid for the 
  341. registration fee before. The registration fee is 85 Deutsche Mark (about 50 
  342. US$) (plus sales tax, if applicable) for one copy of the package. The 
  343. preferred method of payment is via credit card. Currently, MSN accepts 
  344. VISA, Master Card / Eurocard / Access credit cards. For details see the file 
  345. REGISTER.TXT found in the shareware package.
  346.  
  347.  You may reach MSN also via Internet: msn@iis.fhg.de
  348.      or via Fax: +49 911 9933661
  349.      or via BBS: +49 911 9933662        Name: FHG
  350.      or via X25: 0262 45 9110 10290         Name: FHG
  351.     (e.g. in USA, please replace "+" with "011"
  352.  
  353. -    via email
  354. You may get our shareware also by a direct request to msn@iis.fhg.de. In 
  355. this case, the shareware is split into about 30 small uuencoded parts...
  356.  
  357. Harald Popp
  358. Audio & Multimedia ("Music is the *BEST*" - F. Zappa)
  359. Fraunhofer-IIS-A, Weichselgarten 3, D-91058 Erlangen, Germany
  360. Phone: +49-9131-776-340
  361. Fax:   +49-9131-776-399
  362. email: popp@iis.fhg.de
  363. P.S.: Look out for planetoid #3834!
  364.  
  365. -------------------------------------------------------------------------------
  366.  
  367. ~Subject: What is MPEG-1+ ?
  368.  
  369. This was a little mail-talk between harti@harti.de (Stefan Hartmann)
  370. and hgordon@system.xingtech.com.
  371.  
  372. Q: What is MPEG-1+ ?
  373.  
  374.    It's MPEG-1 at MPEG-2 (CCIR) resolution. It will maybe be used
  375.    fir TV-on-top-boxes for broadcasting or video-on-demand projects
  376.    to enhance the picture quality.
  377.  
  378. Q: I see. Is this a new standard ?
  379.  
  380.    No. MPEG-1 allows the definition of frames until 4000x4000 pixel, but
  381.    that is usally not used.
  382.  
  383. Q; So what's different ?
  384.  
  385.    I understand that the effective resolution is approximately 550 x 480.
  386.    Typical datarates are 3.5Mbps - 5.5Mbps (sports programming and perhaps
  387.    movies are higher).
  388.  
  389. Q: Is the video quality lower than with real MPEG-2 movies ?
  390.  
  391.    The quality is better than cable TV, and in my area, we don't have cable.
  392.    They de-interlace and compress the full frames.  My understanding is that
  393.    this is about 5%-10% less efficient than taking advantage of MPEG-2
  394.    interfield motion vectors.
  395.  
  396. Q: If the fields are deinterlaced, do you see the interlace artifacts, so that
  397.    a moving object in one field is already more into one direction, than in the  
  398.    other field ?
  399.  
  400.    Probably the TV-receiver also gives it out interlaced again to the TV- 
  401.    set, so this does not produce this interlace artifact like on
  402.    PCs with live video windows displaing both fields....
  403.  
  404. Q: Can you record this anyhow on a VCR ? Does the SAT-Receiver have a
  405.    video- output, so you can record movies to tape ?
  406.  
  407.    You should be able to record to tape, though they may have some record
  408.    blocking hardware which has to be overcome with video stabilizing
  409.    hardware.
  410.  
  411. Q: What kind of realtime encoders do they use at the broadcast station ?
  412.  
  413.    CLI (Compression Labs) is the manufacturer, using C-Cube chipsets (10
  414.    CL-4000's per MPEG-1+ encoder).
  415.  
  416. Q: Is there any written info about this MPEG-1 Plus technology available on
  417.    the net ?
  418.  
  419.    Not that I'm aware. Maybe C-Cube has a Web site.
  420.  
  421.  
  422. [So it's up to you, dear reader, to find more and to tell me where it is ;o) ]
  423.  
  424. Frank Gadegast, phade@powerweb.de
  425.  
  426. -------------------------------------------------------------------------------
  427.  
  428. ~Subject: What is MPEG-2?
  429.  
  430. MPEG-2 FAQ
  431. version 3.7 (May 11, 1995)
  432. by Chad Fogg (cfogg@chromatic.com)
  433.  
  434. The MPEG (Moving Pictures Experts Group) committee began its life in
  435. late 1988 by the hand of Leonardo Chairiglione and Hiroshi Yasuda with
  436. the immediate goal of standardizing video and audio for compact discs.
  437. Over the next few years, participation amassed from international
  438. technical experts in the areas of Video, Audio, and Systems, reaching
  439. over 200 participants by 1992.   
  440.  
  441. By the end of the third year (1990), a syntax emerged, which when
  442. applied to code SIF video and compact disc audio samples  rates at a
  443. combined coded bitrate of 1.5 Mbit/sec, approximated the perceptual
  444. quality of consumer video tape (VHS).  After demonstrations proved that
  445. the syntax was generic enough to be applied to bit rates and sample
  446. rates far higher than the original primary target application, a second
  447. phase (MPEG-2) was initiated within the committee to define a syntax
  448. for efficient representation of broadcast video.  Efficient
  449. representation of interlaced (broadcast) video signals was more
  450. challenging than the progressive (non-interlaced) signals coded by
  451. MPEG-1. Similarly, MPEG-1 audio was capable of only directly
  452. representing two channels of sound. MPEG-2 would introduce a scheme to
  453. decorrelate mutlichannel discrete surround sound audio.
  454.  
  455. Need for a third phase (MPEG-3) was anticipated in 1991 for High
  456. Definition Television, although it was later discovered by late 1992
  457. and 1993 that the MPEG-2 syntax simply scaled with the bit rate,
  458. obviating the third phase.  MPEG-4 was launched in late 1992 to explore
  459. the requirements of a more diverse set of applications, while finding a
  460. more efficient means of coding low bit rate/low sample rate video and
  461. audio signals.
  462.  
  463. Today, MPEG (video and systems) is exclusive syntax of the United
  464. States Grand Alliance HDTV specification, the European Digital Video
  465. Broadcasting Group, and the high density compact disc (lead by rivals
  466. Sony/Philips and Toshiba).
  467.  
  468. What is MPEG video syntax ?
  469.  
  470. MPEG video syntax provides an efficient way to represent image
  471. sequences in the form of more compact coded data. The language of the
  472. coded bits is the syntax.  For example, a few tokens can represent an
  473. entire block of 64 samples. MPEG also describes a decoding
  474. (reconstruction) process where the coded bits are mapped from the
  475. compact representation into the original, raw format of the image
  476. sequence. For example, a flag in the coded bitstream signals whether
  477. the following bits are to be decoded with a DCT algorithm or with a
  478. prediction algorithm. The algorithms comprising the decoding process
  479. are regulated by the semantics defined by MPEG. This syntax can be
  480. applied to exploit common video characteristics such as spatial
  481. redundancy, temporal redundancy, uniform motion, spatial masking, etc.
  482.  
  483. MPEG Myths
  484.  
  485. A brief summary myths.
  486.  
  487. 1. Compression Ratios over 100:1
  488.  
  489. Articles in the press and marketing literature will often make the
  490. claim that MPEG can achieve high quality video with compression ratios
  491. over 100:1.  These figures often include the oversampling factors in
  492. the source video.  In reality, the coded sample rate specified in an
  493. MPEG image sequence is usually not much larger than 30 times the
  494. specified bit rate.   Pre-compression through subsampling is chiefly
  495. responsible for 3 digit ratios for all video coding methods, including
  496. those of the non-MPEG variety.
  497.  
  498. 2. MPEG-1 is 352x240
  499.  
  500. Both MPEG-1 and MPEG-2 video syntax can be applied at a wide range of
  501. bitrates and sample rates.  The MPEG-1 that most people are familiar
  502. with has parameters of 30 SIF pictures (352 pixels x 240 lines) per
  503. second and a bitrate less than 1.86  megabits/sec----a combination
  504. known as "Constrained Parameters Bitstreams".  This popular
  505. interoperability point is promoted by Compact Disc Video (White Book).
  506. In fact, it is syntactically possible to encode picture dimensions as
  507. high as 4095 x 4095 and a bitrates up to 100 Mbit/sec.  With the advent
  508. of the MPEG-2 specification, the most popular combinations have
  509. coagulated into Levels, which are described later in this text.  The
  510. two most common are affectionately known as SIF (e.g. 352 pixels x 240
  511. lines x 30 frames/sec), or Low Level, and CCIR 601 (e.g. 720
  512. pixels/line x 480 lines x 30 frames/sec), or Main Level.
  513.  
  514. 3. Motion Compensation displaces macroblocks from previous pictures
  515.  
  516. Macroblock predictions are formed out of arbitrary 16x16 pixel (or 16x8
  517. in MPEG-2) areas from previously reconstructed pictures. There are no
  518. boundaries which limit the location of a macroblock prediction within
  519. the previous picture,  other than the edges of the picture.
  520.  
  521.  
  522. 4. Display picture size is the same as the coded picture size
  523.  
  524. In MPEG, the display picture size and frame rate may differ from the
  525. size (resolution) and frame rate encoded into the bitstream.  For
  526. example, a regular pattern of pictures in a source image sequence may
  527. be dropped (decimated), and then each picture may itself be filtered
  528. and subsampled prior to encoding. Upon reconstruction, the picture may
  529. be interpolated and upsampled back to the source size and frame rate.
  530. In fact, the three fundamental phases (Source Rate, Coded Rate, and
  531. Display Rate) may differ by several parameters.  The MPEG syntax can
  532. separately describe Coded and Display Rates through sequence_headers,
  533. but the Source Rate is known only by the encoder.
  534.  
  535.  
  536. 5. Picture coding types (I, P, B) all consist of the same macroblocks types.
  537.  
  538. All macroblocks within an I picture must be coded Intra (like a
  539. baseline JPEG picture).  However, macroblocks within a P picture may
  540. either be coded as Intra or Non-intra (temporally predicted from a
  541. previously reconstructed picture). Finally, macroblocks within the B
  542. picture can be independently selected as either Intra, Forward
  543. predicted, Backward predicted, or both forward and backward
  544. (Interpolated) predicted. The macroblock header contains an element,
  545. called macroblock_type, which can flip these modes on and off like
  546. switches.  macroblock_type is possibly the single most powerful element
  547. in the whole of video syntax. Picture types (I, P, and B) merely enable
  548. macroblock modes by widening the scope of the semantics.  The component
  549. switches are:
  550.  
  551.   1. Intra  or Non-intra
  552.   2. Forward temporally predicted (motion_forward)
  553.   3. Backward temporally predicted (motion_backward)
  554.       (2+3 in combination represent ôInterpolatedö)
  555.   4. conditional replenishment (macroblock_pattern).
  556.   5. adaptation in quantization (macroblock_quantizer). 
  557.   6. temporally predicted without motion compensation
  558.  
  559. The first 5 switches are mostly orthogonal (the 6th is derived from the
  560. 1st and 2nd in P pictures, and does not exist in B pictures).  Some
  561. switches are non-applicable in the presence of others.  For example, in
  562. an Intra macroblock, all 6 blocks by definition contain DCT data,
  563. therefore there is no need to signal either the macroblock_pattern or
  564. any of the temporal prediction switches.  Likewise, when there is no
  565. coded prediction error information in a Non-intra macroblock, the
  566. macroblock_quantizer signal would have no meaning.
  567.  
  568.  
  569. 6. Sequence structure is fixed to a specific I,P,B frame pattern.
  570.  
  571. A sequence may consist of almost any pattern of I, P, and B pictures
  572. (there are a few minor semantic restrictions on their placement).  It
  573. is common in industrial practice to have a fixed pattern (e.g.
  574. IBBPBBPBBPBBPBB), however, more advanced encoders will attempt to
  575. optimize the placement of the three picture types according to local
  576. sequence characteristics in the context of more global
  577. characteristics.  Each picture type carries a penalty when coupled with
  578. the statistics of a particular picture (temporal masking, occlusion,
  579. motion activity, etc.).
  580.  
  581. The variable length codes of the macroblock_type switch provide a
  582. direct clue, but it is the full scope of semantics of each picture type
  583. spell out the costs-benefits. For example, if the image sequence
  584. changes little from frame-to-frame, it is sensible to code more B
  585. pictures than P.  Since B pictures by definition are never fed back
  586. into the prediction loop (i.e. not used as prediction for future
  587. pictures), bits spent on the picture are wasted in a sense (B pictures
  588. are like temporal spackle).  Application requirements also govern
  589. picture type placement: random access points, mismatch/drift reduction,
  590. channel hopping, program indexing, and error recovery & concealment.
  591.  
  592.  
  593. The 6 Steps to Claiming Bogously High Compression Ratios:
  594.  
  595. MPEG video is often quoted as achieving compression ratios over 100:1,
  596. when in reality the sweet spot rests between 8:1 and 30:1.
  597.  
  598. Heres how the fabled greater than 100:1 reduction ratio is derived for
  599. the popular Compact Disc Video (White Book) bitrate of 1.15 Mbit/sec.
  600.  
  601. Step 1.  Start with the oversampled rate
  602.  
  603.   Most MPEG video sources originate at a higher sample rate than the
  604.   "target sample rate encoded into the final MPEG bitstream.  The most
  605.   popular studio signal, known canonically as D-1 or CCIR 601 digital
  606.   video, is coded at 270 Mbit/sec.
  607.  
  608. The constant, 270 Mbit/sec, can be derived as follows:
  609.  
  610. Luminance (Y): 858 samples/line x 525 lines/frame x 30 frames/sec x 
  611.                10 bits/sample ~= 135 Mbit/sec
  612.  
  613. R-Y          (Cb):    429 samples/line x 525 lines/frame x 30 frames/sec x 
  614.                10 bits/sample ~= 68 Mbit/sec       
  615.  
  616. B-Y          (Cb):    429 samples/line x 525 lines/frame x 30 frames/sec x 
  617.                10 bits/sample ~= 68 Mbit/sec       
  618.  
  619. Total:       27 million samples/sec x  10 bits/sample =  270 Mbit/sec.
  620.  
  621. So, our compression ratio is:  270/1.15... an amazing  235:1 !!
  622.  
  623.  
  624. Step 2. Include blanking intervals
  625.  
  626. Only 720 out of the 858 luminance samples per line contain active
  627. picture information.  In fact, the debate over the true number of
  628. active samples is the cause of many hair-pulling cat-fights at TV
  629. engineering seminars and conventions, so it is safer to say that the
  630. number lies somewhere between 704 and 720.  Likewise, only 480 lines
  631. out of the 525 lines contain  active picture information.  Again, the
  632. actual number is somewhere between 480 and 496.  For the purposes of
  633. MPEG-1s and MPEG-2s famous conformance points (Constrained Parameters
  634. Bitstreams and Main Level, respectively), the number shall be 704
  635. samples x 480 lines for luminance, and 352 samples x 480 lines for each
  636. of the two chrominance pictures. Recomputing the source rate, we arrive
  637. at:
  638.  
  639. (luminance)      
  640.    704 samples/line x 480 lines x 30 fps x 10 bits/sample ~= 104 Mbit/sec 
  641.  
  642. (chrominance)  
  643.   2 components x 352 samples/line x 480 lines x 30 fps x 10 bits/sample 
  644.    ~= 104 Mbit/sec 
  645.  
  646. Total:  ~  207 Mbit/sec
  647.  
  648. The ratio (207/1.15)  is now only 180:1
  649.  
  650.  
  651. Step 3.  Include higher bits/sample
  652.  
  653. The MPEG sample precision is 8 bits.  Studio equipment often quantize
  654. samples with 10 bits of accuracy.  The 2-bit improvement to the dynamic
  655. range is considered useful for suppressing noise in multi-generation
  656. video.
  657.  
  658. The ratio is now only 180 * (8/10 ), or  144:1
  659.  
  660. Step 4.  Include higher chroma ratio
  661.  
  662. The famous CCIR-601studio signal represents the chroma signals (Cb, Cr)
  663. with half the horizontal sample density as the luminance signal, but
  664. with full vertical resolution.  This particular ratio of subsampled
  665. components is known as 4:2:2.  However, MPEG-1 and MPEG-2 Main Profile
  666. specify the exclusive use of the 4:2:0 format, deemed sufficient for
  667. consumer applications, where both chrominance signals have exactly half
  668. the horizontal and vertical resolution as luminance (the MPEG Studio
  669. Profile, however, centers around the 4:2:2 macroblock structure). Seen
  670. from the perspective of pixels being comprised of samples from multiple
  671. components, the 4:2:2 signal can be expressed as having an average of 2
  672. samples per pixel (1 for Y, 0.5 for Cb, and 0.5 for Cr).  Thanks to the
  673. reduction in the vertical direction (resulting in a 352 x 240
  674. chrominance frame), the 4:2:0 signal would, in effect, have an average
  675. of 1.5 samples per pixel (1 for Y, and 0.25 for Cb and Cr each). Our
  676. source video bit rate may now be recomputed as:
  677.  
  678.   720 pixels x 480 lines x 30 fps x 8 bits/sample x 1.5 samples/pixel 
  679.      = 124 Mbit/sec
  680.  
  681. ... and the ratio is now 108:1.
  682.  
  683. Step 5.  Include pre-subsampled image size
  684.  
  685. As a final act of pre-compression, the CCIR 601 frame is converted to
  686. the SIF frame by a subsampling of 2:1 in both the horizontal and
  687. vertical directions.... or 4:1 overall.  Quality horizontal subsampling
  688. can be achieved by the application of a simple FIR filter (7 or 4 taps,
  689. for example), and vertical subsampling by either dropping every other
  690. field (in effect, dropping every other line) or again by an FIR filter
  691. (regulated by an interfield motion detection algorithm).  Our ratio now
  692. becomes:
  693.  
  694.     352 pixels x 240 lines x 30 fps x 8 bits/sample x 1.5 samples/pixel 
  695.    ~= 30 Mbit/sec !!
  696.  
  697. .. and the ratio is now only 26:1 
  698.  
  699. Thus, the true A/B comparison should be between the source sequence at
  700. the 30 Mbit/sec stage, the actual specified sample rate in the MPEG
  701. bitstream, and the reconstructed sequence produced from the 1.15
  702. Mbit/sec coded bitstream.
  703.  
  704. Step 6.   DonÆt forget the 3:2 pulldown
  705.  
  706. A majority of high-end programs originates from film.  Most of the
  707. movies encoded onto Compact Disc Video were in captured and reproduced
  708. at 24 frames/sec.  So, in such an image sequence, 6 out of the 30
  709. frames every second are in fact redundant and need not be coded into
  710. the MPEG bitstream, leading to the shocking discovery that the actual
  711. soure bit rate has really been  24 Mbit/sec all along, and the
  712. compression ratio a mere 21:1 !!!  Even at the seemingly modest 20:1
  713. ratio, discrepancies will appear between the 24 Mbit/sec source
  714. sequence and the reconstructed sequence.  Only conservative ratios in
  715. the neighborhood of 8:1 have demonstrated true transparency for
  716. sequences with complex spatial-temporal characteristics (i.e.  rapid,
  717. divergent motion and sharp edges, textures, etc.).  However, if the
  718. video is carefully encoded by means of pre-processing and intelligent
  719. distribution of  bits, higher ratios can be made to appear at least
  720. artifact-free.
  721.  
  722.  
  723. What are the parts of the MPEG document?
  724.  
  725. The MPEG-1 specification (official title: ISO/IEC 11172 Information
  726. technology  Coding of moving pictures and associated audio for digital
  727. storage media at up to about 1.5 Mbit/s, Copyright 1993.) consists of
  728. five parts.  Each document is a part of the ISO/IEC number 11172.  The
  729. first three parts reached International Standard in 1993.  Part 4
  730. reached IS in 1994.  In mid 1995, Part 5 will go IS.
  731.  
  732. Part 1---Systems:  The first part of the MPEG standard has two primary
  733. purposes:  1). a syntax for transporting packets of audio and video
  734. bitstreams over digital channels and storage mediums (DSM),  2). a
  735. syntax for synchronizing video and audio streams.
  736.  
  737. Part 2---Video: describes syntax (header and bitstream elements) and
  738. semantics (algorithms telling what to do with the bits). Video breaks
  739. the image sequence into a series of nested layers, each containing a
  740. finer granularity of sample clusters (sequence, picture, slice,
  741. macroblock, block, sample/coefficient).  At each layer, algorithms are
  742. made available which can be used in combination to achieve efficient
  743. compression.  The syntax also provides a number of different means for
  744. assisting decoders in synchronization, random access, buffer
  745. regulation, and error recovery.  The highest layer, sequence, defines
  746. the frame rate and picture pixel dimensions for the encoded image
  747. sequence.
  748.  
  749. Part 3---Audio: describes syntax and semantics for three classes of
  750. compression methods. Known as Layers I, II, and III, the classes trade
  751. increased syntax and coding complexity for improved coding efficiency
  752. at lower bitrates.  The Layer II is the industrial favorite, applied
  753. almost exclusively in satellite broadcasting (Hughes DSS) and  compact
  754. disc video  (White Book).  Layer I has similarities in terms of
  755. complexity, efficiency, and syntax to the Sony MiniDisc and the Philips
  756. Digitial Compact Cassette (DCC). Layer III has found a home in ISDN,
  757. satellite, and Internet audio applications. The sweet spots for the
  758. three layers are 384 kbit/sec (DCC), 224 kbit/sec (CD Video, DSS), and
  759. 128 Kbits/sec (ISDN/Internet), respectively.
  760.  
  761. Part 4---Conformance: (circa 1992) defines the meaning of  MPEG
  762. conformance for all three parts (Systems, Video, and Audio), and
  763. provides two sets of test guidelines for determining compliance in
  764. bitstreams and decoders.  MPEG does not directly address encoder
  765. compliance.
  766.  
  767. Part 5---Software Simulation: Contains an example ANSI C language
  768. software encoder and  compliant decoder for video and audio.  An
  769. example systems codec is also provided which can multiplex and
  770. demultiplex separate video and audio elementary streams contained in
  771. computer data files.
  772.  
  773.  
  774. As of March 1995, the MPEG-2 volume consists of a total of 9 parts
  775. under ISO/IEC 13818.  Part 2 was jointly developed with the ITU-T,
  776. where it is known as recommendation H.262. The full title is:
  777. Information Technology--Generic Coding of Moving Pictures and
  778. Associated Audio. ISO/IEC 13818. The first five parts are organized in
  779. the same fashion as MPEG-1(System, Video, Audio, Conformance, and
  780. Software).  The four additional parts are listed below:
  781.  
  782. Part 6  Digital Storage Medium Command and Control (DSM-CC): provides a
  783. syntax for controlling VCR- style playback and random-access of
  784. bitstreams encoded onto digital storage mediums such as compact disc.
  785. Playback commands include Still frame, Fast Forward, Advance, Goto.
  786.  
  787. Part 7  Non-Backwards Compatible Audio (NBC):  addresses the need for a
  788. new syntax to efficiently de- correlate discrete mutlichannel surround
  789. sound audio.  By contrast, MPEG-2 audio (13818-3) attempts to code the
  790. surround channels as an ancillary data to the MPEG-1
  791. backwards-compatible Left and Right channels. This allows existing
  792. MPEG-1 decoders to parse and decode only the two primary channels while
  793. ignoring the side channels (parse to /dev/null).  This is analogous to
  794. the Base Layer concept in MPEG-2 Scalable video. NBC candidates include
  795. non-compatible syntaxs such as Dolby AC-3.  Final document is not
  796. expected until 1996.
  797.  
  798. Part 8  10-bit video extension.  Introduced in late 1994, this
  799. extension to the video part (13818-2) describes the syntax and
  800. semantics to coded representation of video with 10-bits of sample
  801. precision.  The primary application is studio video (distribution,
  802. editing, archiving).  Methods have been investigated by Kodak and
  803. Tektronix which employ Spatial scalablity, where the 8-bit signal
  804. becomes the Base Layer, and the 2-bit differential signal is coded as
  805. an Enhancement Layer.  Final document is not expected until 1997 or
  806. 1998.  [Part 8 will be withdrawn]
  807.  
  808. <IMG SRC="mpeg2lay.gif">
  809.  
  810. <IMG SRC="mpeg2la2.gif">
  811.  
  812. Part 9  Real-time Interface (RTI): defines a syntax for video on demand
  813. control signals between set-top boxes and head-end servers.
  814.  
  815. What is the evolution of an MPEG/ISO document?
  816.  
  817. In chronological order:
  818.  
  819. Abbr.    ISO/Committee notation            Author's notation        
  820. -----    -------------------------------   -----------------------------
  821.  -       Problem (unofficial first stage)  barroom witticism or dare
  822. NI       New work Item                     Napkin Item
  823. NP       New Proposal                      Need Permission
  824. WD       Working Draft                     WeÆre Drunk
  825. CD       Committee Draft                   Calendar Deadlock
  826. DIS      Draft International Standard      Doesn't Include Substance
  827. IS       International Standard            Induced patent Statements
  828.  
  829.  
  830. Introductory paper to MPEG?
  831.  
  832. Didier Le Gall, "MPEG: A Video Compression Standard for Multimedia
  833. Applications," Communications of the ACM, April 1991, Vol.34, No.4, pp.
  834. 47-58
  835.  
  836.  
  837. MPEG in periodicals?
  838.  
  839. The following journals and conferences have been known to contain
  840. information relating to MPEG:
  841.  
  842.  
  843.   IEEE Transactions on Consumer Electronics
  844.   IEEE Transactions on Broadcasting
  845.   IEEE Transactions on Circuits and Systems for Video Technology
  846.   Advanced Electronic Imaging
  847.   Electronic Engineering Times (EE Times)
  848.   IEEE Int'l Conference on Acoustics, Speech, and Signal Processing (ICASSP)
  849.   International Broadcasting Convention (IBC)
  850.   Society of Motion Pictures and Television Engineers Journal (SMPTE)
  851.   SPIE conference on Visual Communications and Image Processing
  852.  
  853.  
  854. MPEG Book?
  855.  
  856. Several MPEG books are under development.  
  857.  
  858. An MPEG book will be produced by the same team behind the JPEG book:
  859. Joan Mitchell and Bill Pennebaker.... along with Didier Le Gall. It is
  860. expected to be a tutorial on MPEG-1 video and some MPEG-2 video. Van
  861. Nostran Reinhold in 1995.
  862.  
  863. A book, in the Japanese language, has already been published (ISBN:
  864. 4-7561-0247-6).  The title is called MPEG by ASCII publishing.
  865.  
  866. Keith Jack's second edition of Video Demystified, to be published in
  867. August 1995, will feature a large chapter on MPEG video.  Information:
  868. ftp://ftp.pub.netcom/pub/kj/kjack/
  869.  
  870.  
  871.  
  872. MPEG is a DCT based scheme?
  873.  
  874. The DCT and Huffman algorithms receive the most press coverage (e.g.
  875. "MPEG is a DCT based scheme with Huffman coding"), but are in fact less
  876. significant when compared to the variety of coding modes signaled to
  877. the decoder as context-dependent side information. The MPEG-1 and
  878. MPEG-2 IDCT has the same definition as H.261, H.263, JPEG.
  879.  
  880.  
  881. What are constant and variable bitrate streams?
  882.  
  883. Constant bitrate streams are buffer regulated to allow continuos
  884. transfer of coded data across a constant rate channel without causing
  885. an overflow or underflow to a buffer on the receiving end.  It is the
  886. responsibility of the Encoders Rate Control stage to generate
  887. bitstreams which prevent buffer overflow and underflow.  The constant
  888. bit rate encoding can be modeled as a reservoir:  variable sized coded
  889. pictures flow into the bit reservoir, but the reservoir is drained at a
  890. constant rate into the communications channel.  The most challenging
  891. aspect of a constant rate encoder is, yes, to maintain constant channel
  892. rate (without overflowing or underflow a buffer of a fixed depth) while
  893. maintaining constant perceptual picture quality.
  894.  
  895. In the simplest form, variable rate bitstreams do not obey any buffer
  896. rules, but will maintain constant picture quality.  Constant picture
  897. quality is easiest to achieve by holding the macroblock quantizer step
  898. size constant (e.g. level 16 of 31).  In its most advanced form, a
  899. variable bitrate stream may be more difficult to generate than
  900. constant bitrate streams.  In advanced variable bitrate streams, the
  901. instantaneous bit rate (piece-wise bit rate) may be controlled by
  902. factors such as:  1. local activity measured against activity over
  903. large time intervals (e.g. the full span of a movie), or 2.
  904. instantaneous bandwidth availability of a communications channel.
  905.  
  906. Summary of bitstream types
  907. Bitrate type
  908. Applications
  909.  
  910. constant-rate
  911. fixed-rate communications channels like the original Compact Disc,
  912. digital video tape, single channel-per-carrier broadcast signal, hard
  913. disk storage
  914.  
  915. simple variable-rate
  916. software decoders where the bitstream buffer (VBV) is the storage
  917. medium itself (very large).  macroblock quantization scale is typically
  918. held constant over large number of macroblocks.
  919.  
  920. complex variable-rate
  921. Statistical muliplexing (multiple-channel-per-carrier broadcast
  922. signals), compact discs and hard disks where the servo mechanisms can
  923. be controlled to increase or decrease the channel delivery rate,
  924. networked video where overall channel rate is constant but demand is
  925. variably share by multiple users, bitstreams which achieve average
  926. rates over very long time averages
  927.  
  928.  
  929.  
  930. What is statistical multiplexing ?
  931.  
  932. Progressive explanation:
  933. In the simplest coded bitstream, a PCM (Pulse Coded Modulated) digital
  934. signal, all samples have an equal number of bits. Bit distribution in a
  935. PCM image sequence is therefore not only uniform within a picture,
  936. (bits distributed along zero dimensions), but is also uniform across
  937. the full sequence of pictures.
  938.  
  939. Audio coding algorithms such as MPEG-1s Layer I and II are capable of
  940. distributing bits over a one dimensional space, spanned by a frame.  In
  941. layer II, for example, an audio channel coded at a bitrate of 128
  942. bits/sec and sample rate of 44.1 Khz will have frames (which consist of
  943. 1152 subband coefficients each) coded with approximately 334 bits.
  944. Some subbands will receive more bits than others.
  945.  
  946. In block-based still image compression methods which employ 2-D
  947. transform coding methods, bits are distributed over a 2 dimensional
  948. space (horizontal and vertical) within the block. Further, blocks
  949. throughout the picture may contain a varying number of bits as a
  950. result, for example, of adaptive quantization. For example, background
  951. sky may contain an average of only 50 bits per block, whereas complex
  952. areas containing flowers or text may contain more than 200 bits per
  953. block.  In the typical adaptive quantization scheme, more bits are
  954. allocated to perceptually more complex areas in the picture.  The
  955. quantization stepsizes can be selected against an overall picture
  956. normalization constant, to achieve a target bit rate for the whole
  957. picture. An encoder which generates coded image sequences comprised of
  958. independently coded still pictures, such as JPEG Motion video or MPEG
  959. Intra picture sequences,  will typically generate coded pictures of
  960. equal bit size.
  961.  
  962. MPEG non-intra coding introduces the concept of the distribution of
  963. bits across multiple pictures, augmenting the distribution space to 3
  964. dimensions. Bits are now allocated to more complex pictures in the
  965. image sequence, normalized by the target bit size of the group of
  966. pictures, while at a lower layer, bits within a picture are still
  967. distributed according to more complex areas within the picture. Yet in
  968. most applications, especially those of the Constant Bitrate class, a
  969. restriction is placed in the encoder which guarantees that after a
  970. period of time, e.g. 0.25 seconds, the coded bitstream achieves a
  971. constant rate (in MPEG, the Video Buffer Verifier regulates the
  972. variable-to-constant rate mapping).  The mapping of an inherently
  973. variable bitrate coded signal to a constant rate allows consistent
  974. delivery of the program over a fixed-rate communications channel.
  975.  
  976. Statistical multiplexing takes the bit distribution model to 4
  977. dimensions:  horizontal, vertical, temporal, and program axis.  The 4th
  978. dimension is enabled by the practice of mulitplexing multiple programs
  979. (each, for example, with  respective video and audio bitstreams) on a
  980. common data carrier. In the Hughes' DSS system, a single data carrier
  981. is modulated with a payload capacity of 23 Mbits/sec, but a typical
  982. program will be transported at average bit rate of 6 Mbit/sec each. In
  983. the 4-D model, bits may be distributed according the relative
  984. complexity of each program against the complexities of the other
  985. programs of the common data carrier.  For example, a program undergoing
  986. a rapid scene change will be assigned the highest bit allocation
  987. priority, whereas the program with a near-motionless scene will receive
  988. the lowest priority, or fewest bits.
  989.  
  990.  
  991. How does MPEG achieve compression? 
  992.  
  993. Here are some typical statistical conditions addressed by specific
  994. syntax and semantic tools:
  995.  
  996. 1. Spatial correlation:  transform coding with 8x8 DCT.
  997.  
  998. 2. Human Visual Response---less acuity for higher spatial frequencies:
  999. lossy scalar quantization of the DCT coefficients.
  1000.  
  1001. 3. Correlation across wide areas of the picture:  prediction of the DC
  1002. coefficient in the 8x8 DCT block.
  1003.  
  1004. 4. Statistically more likely coded bitstream elements/tokens:  variable
  1005. length coding of macroblock_address_increment, macroblock_type,
  1006. coded_block_pattern, motion vector prediction error magnitude, DC
  1007. coefficient prediction error magnitude.
  1008.  
  1009.  
  1010. 5. Quantized blocks with sparse quantized matrix of DCT coefficients:
  1011. end_of_block token (variable length symbol).
  1012.  
  1013. 6. Spatial masking:  macroblock quantization scale factor.
  1014.  
  1015. 7. Local coding adapted to overall picture perception (content
  1016. dependent coding):  macroblock quantization scale factor.
  1017.  
  1018. 8. Adaptation to local picture characteristics:  block based coding,
  1019. macroblock_type, adaptive quantization.
  1020.  
  1021. 9. Constant stepsizes in adaptive quantization:  new quantization scale
  1022. factor signaled only by special macroblock_type codes.  (adaptive
  1023. quantization scale not transmitted by default).
  1024.  
  1025. 10. Temporal redundancy:  forward, backwards macroblock_type and motion
  1026. vectors at macroblock (16x16) granularity.
  1027.  
  1028. 11. Perceptual coding of macroblock temporal prediction error: adaptive
  1029. quantization and quantization of DCT transform coefficients (same
  1030. mechanism as Intra blocks).
  1031.  
  1032. 12. Low quantized macroblock prediction error:  No prediction error for
  1033. the macroblock may be signaled within macroblock_type.  This is the
  1034. macroblock_pattern switch.
  1035.  
  1036. 13. Finer granularity coding of macroblock prediction error: Each of
  1037. the blocks within a macroblock may be coded or not coded. Selective
  1038. on/off coding of each block is achieved with the separate
  1039. coded_block_pattern variable-length symbol, which is present in the
  1040. macroblock only of the macroblock_pattern switch has been set.
  1041.  
  1042. 14. Uniform motion vector fields (smooth optical flow fields):
  1043. prediction of  motion vectors.
  1044.  
  1045. 15. Occlusion:  forwards or backwards temporal prediction in B
  1046. pictures.  Example: an object becomes temporarily obscured by another
  1047. object within an image sequence. As a result, there may be an area of
  1048. samples in a previous picture (forward reference/prediction picture)
  1049. which has similar energy to a macroblock in the current picture (thus
  1050. it is a good prediction), but no areas within a future picture
  1051. (backward reference) are similar enough. Therefore only forwards
  1052. prediction would be selected by macroblock type of the current
  1053. macroblock. Likewise, a good prediction may only be found in a future
  1054. picture, but not in the past.  In most cases, the object, or
  1055. correlation area,  will be present in both forward and backward
  1056. references.  macroblock_type can select the best of the three
  1057. combinations.
  1058.  
  1059. 16. Sub-sample temporal prediction accuracy: bi-linearly interpolated
  1060. (filtered) "half-pel" block predictions.  Real world motion
  1061. displacements of objects (correlation areas) from picture-to-picture do
  1062. not fall on integer pel boundaries, but on  irrational . Half-pel
  1063. interpolation attempts to extract the true object to within one order
  1064. of approximation, often improving compression efficiency by at least 1
  1065. dB.
  1066.  
  1067. 17. Limited motion activity in P pictures: skipped macroblocks. When
  1068. the motion vector is zero for both the horizontal and vertical vector
  1069. components, and no quantized prediction error for the current
  1070. macroblock is present. Skipped macroblocks are the most desirable
  1071. element in the bitstream since they consume no bits, except for a
  1072. slight increase in the bits of the next non-skipped macroblock.
  1073.  
  1074. 18. Co-planar motion within B pictures: skipped macroblocks.  When the
  1075. motion vector is the same as the previous macroblocks, and no quantized
  1076. prediction error for the current macroblock is present.
  1077.  
  1078. What is the difference between MPEG-1 and MPEG-2 syntax?
  1079.  
  1080. Section D.9 of ISO/IEC 13818-2 is an informative piece of text
  1081. describing the differences between MPEG-1 and MPEG-2 video syntax.  The
  1082. following is a little more informal.
  1083.  
  1084. Sequence layer:
  1085. MPEG-2 can represent interlaced or progressive video sequences,
  1086. whereas  MPEG-1 is strictly meant for progressive sequences since the
  1087. target application was Compact Disc video coded at 1.2 Mbit/sec.
  1088.  
  1089. MPEG-2 changed the meaning behind the aspect_ratio_information
  1090. variable, while significantly reducing the number of defined aspect
  1091. ratios in the table.  In MPEG-2, aspect_ratio_information refers to the
  1092. overall display aspect ratio (e.g. 4:3,  16:9), whereas in MPEG-2, the
  1093. ratio refers to the particular pixel.  The reduction in the entries of
  1094. the aspect ratio table also helps interoperability by limiting the
  1095. number of possible modes to a practical set, much like frame_rate_code
  1096. limits the number of display frame rates that can be represented.
  1097. Optional picture header variables called display_horizontal_size and
  1098. display_vertical_size can be used to code unusual display sizes.
  1099.  
  1100. frame_rate_code in MPEG-2 refers to the intended display rate, whereas
  1101. in MPEG-1 it referred to the coded frame rate.  In film source video,
  1102. there are often 24 coded frames per second.   Prior to bitstream
  1103. coding, a good encoder will eliminate the redundant 6 frames or 12
  1104. fields from a 30 frame/sec video signal which encapsulates an
  1105. inherently 24 frame/sec video source.  The MPEG decoder or display
  1106. device will then repeat frames or fields to recreate or synthesize the
  1107. 30 frame/sec display rate.  In MPEG-1, the decoder could only infer the
  1108. intended frame rate, or derive it based on the Systems layer time
  1109. stamps.  MPEG-2 provides specific picture header variables called
  1110. repeat_first_field and top_field_first which explicitly signal which
  1111. frames or fields are to be repeated, and how many times.
  1112.  
  1113. To address the concern of software decoders which may operate at rates
  1114. lower or different than the common television rates, two new variables
  1115. in MPEG-2 called frame_rate_extension_d and frame_rate_extension_n can
  1116. be combined with frame_rate_code to specify a much wider variety of
  1117. display frame rates.  However, in the current set of define profiles
  1118. and levels, these two variables are not allowed to change the value
  1119. specified by frame_rate_code.  Future extensions or Profiles of MPEG
  1120. may enable them.
  1121.  
  1122. In interlaced sequences, the coded macroblock height (mb_height) of a
  1123. picture must be a multiple of 32 pixels, while the width, like MPEG-1,
  1124. is a coded multiple of 16 pixels.  A discrepancy between the coded
  1125. width and height of a picture and the variables horizontal_size and
  1126. vertical_size, respectively, occurs when either variable is not an
  1127. integer multiple of macroblocks.  All pixels must be coded within
  1128. macroblocks, since there cannot be such a thing as fractional
  1129. macroblocks.  Never intended for display, these overhang pixels or
  1130. lines exist along the left  and bottom edges of the coded picture.  The
  1131. sample values within these trims can be arbitrary, but they can affect
  1132. the values of samples within the current picture, and especially future
  1133. coded pictures.  In the current pictures, pixels which reside within
  1134. the same 8x8 block as the overhang pixels are affect by the ripples of
  1135. DCT quantization error.  In future coded pictures,  their energy can
  1136. propagate anywhere within an image sequence as a result of motion
  1137. compensated prediction.  An encoder should fill in values which are
  1138. easy to code, and should probably avoid creating motion vectors which
  1139. would cause the Motion Compensated Prediction stage to extract samples
  1140. from these areas.  The application should probably select
  1141. horizontal_size and vertical_size that are already multiples of 16 (or
  1142. 32 in the vertical case of interlaced sequences) to begin with.
  1143.  
  1144.  
  1145. Group of Pictures:
  1146. The concept of the Group of Pictures layer does not exist in MPEG-2.
  1147. It is an optional header useful only for establishing a SMPTE time code
  1148. or for indicating that certain B pictures at the beginning of an edited
  1149. sequence comprise a broken_link.  This occurs when the current B
  1150. picture requires prediction from a forward reference frame (previous in
  1151. time to the current picture) has been removed from the bitstream by an
  1152. editing process.  In MPEG-1, the Group of Pictures header is mandatory,
  1153. and must follow a sequence header.
  1154.  
  1155.  
  1156. Picture layer:
  1157. In MPEG-2, a frame may be coded progressively or interlaced, signaled
  1158. by the progressive_frame variable.  In interlaced frames
  1159. (progressive_frame==0), frames  may then be coded as either a frame
  1160. picture (picture_structure==frame) or as two separately coded field
  1161. pictures (picture_structure==top_field or
  1162. picture_structure==bottom_field).  Progressive frames are a logic
  1163. choice for video material which originated from film, where all pixels
  1164. are integrated or captured at the same time instant.  Most electronic
  1165. cameras today capture pictures in two separate stages: a top field
  1166. consisting of all odd lines of the picture are nearly captured in the
  1167. time instant, followed by a bottom field of all even lines.  Frame
  1168. pictures provide the option of coding each macroblock locally as either
  1169. field or frame.  An encoder may choose field pictures to save memory
  1170. storage or reduce the end-to-end encoder-decoder delay by one field
  1171. period.
  1172.  
  1173.  
  1174. There is no longer such a thing called D pictures in MPEG-2 syntax.
  1175. However, Main Profile @ Main Level MPEG-2 decoders, for example, are
  1176. still required to decode D pictures at Main Level (e.g. 720x480x30
  1177. Hz).  The usefulness of D pictures, a concept from the year 1990,  had
  1178. evaporated by the time MPEG-2 solidified in 1993.
  1179.  
  1180. repeat_first_field was introduced in MPEG-2 to signal that a field or
  1181. frame from the current frame is to be repeated for purposes of frame
  1182. rate conversion (as in the 30 Hz display vs. 24 Hz coded example
  1183. above). On average in a 24 frame/sec coded sequence, every other coded
  1184. frame would signal the repeat_first_field flag.  Thus the 24 frame/sec
  1185. (or 48 field/sec) coded sequence would become a 30 frame/sec (60
  1186. field/sec) display sequence.  This processes has been known for decades
  1187. as 3:2 Pulldown. Most movies seen on NTSC displays since the advent of
  1188. television have been displayed this way. Only within the past decade
  1189. has it become possible to interpolate motion to create 30 truly unique
  1190. frames from the original 24. Since the repeat_first_field flag is
  1191. independently determined in every frame structured picture, the actual
  1192. pattern can be irregular (it doesnt have to be every other frame
  1193. literally).  An irregularity would occur during a scene cut, for
  1194. example.
  1195.  
  1196.  
  1197. Slice:
  1198. To aid implementations which break the decoding process into parallel
  1199. operations along horizontal strips within the same picture, MPEG-2
  1200. introduced a general semantic  mandatory requirement that all
  1201. macroblock rows must start and end with at least one slice.  Since a
  1202. slice commences with a start code, it can be identified by
  1203. inexpensively parsing through the bitstream along byte boundaries.
  1204. Before, an implementation might have had to parse all the variable
  1205. length tokens between each slice (thereby completing a significant
  1206. stage of decoding process in advance) to know the exact position of
  1207. each macroblock within the bitstream.  In MPEG-1, it was possible to
  1208. code a picture with only a single slice.  Naturally, the mandatory
  1209. slice per macroblock row restriction also facilitates error recovery.
  1210.  
  1211. MPEG-2 also added the concept of the slice_id.  This optional 6-bit
  1212. element signals which picture a particular slice belongs to.  In badly
  1213. mangled bitstreams, the location of the picture headers could become
  1214. garbled.  slice_id allows a decoder to place a slice in the proper
  1215. location within a sequence.  Other elements in the slice header, such
  1216. as slice_vertical_position, and the macroblock_address_increment of the
  1217. first macroblock in the slice uniquely identify the exact macroblock
  1218. position of the slice within the picture.  Thus within a window of 64
  1219. pictures, a lost slice can find its way.
  1220.  
  1221.  
  1222.  
  1223. Macroblock:
  1224. motion vectors are now always represented along a half-pel grid.  The
  1225. usefulness of an integer-pel grid (option in MPEG-1) diminished with
  1226. practice.  A intrinsic half-pel accuracy can encourage use by encoders
  1227. for the significant coding gain which half-pel interpolation offers.
  1228.  
  1229. In both MPEG-1 and MPEG-2, the dynamic range of motion vectors is
  1230. specified on a picture basis. A set of pictures corresponding to a
  1231. rapid motion scene may need a motion vector range of up to +/- 64
  1232. integer pixels.  A slower moving interval of pictures may need only a
  1233. +/- 16 range. Due to the syntax by which motion vectors are signaled in
  1234. a bitstream, pictures with little motion would suffer unnecessary bit
  1235. overhead in describing motion vectors in a coordinate system
  1236. established for a much wider range. MPEG-1s f_code picture header
  1237. element prescribed a radius shared by horizontal and vertical motion
  1238. vector components alike. It later became practice in industry to have a
  1239. greater horizontal search range (motion vector radius) than vertical,
  1240. since motion tends to be more prominent across the screen than up or
  1241. down (vertical).  Secondly, a decoder has a limited frame buffer size
  1242. in which to store both the current picture under decoding and the set
  1243. of pictures (forward, backward) used for prediction (reference) by
  1244. subsequent pictures.  A decoder can write over the pixels of the oldest
  1245. reference picture as soon as it no longer is needed by subsequent
  1246. pictures for prediction.  A restricted vertical motion vector range
  1247. creates a sliding window, which starts at the top of the reference
  1248. picture and moves down as the macroblocks in the current picture are
  1249. decoded in raster order.  The moment a strip of pixels passes outside
  1250. this window, they have ended their life in the MPEG decoding loop.  As
  1251. a result of all this, MPEG-2 created separate into horizontal and
  1252. vertical range specifiers (f_code[][0] for horizontal, and f_code[][1]
  1253. for vertical), and placed greater restrictions on the maximum vertical
  1254. range than on the horizontal range.  In Main Level frame pictures, this
  1255. is range is [- 128,+127.5] vertically, and [-1024,+1023.5]
  1256. horizontally. In field pictures, the vertical range is restricted to [-
  1257. 64,+63.5].
  1258.  
  1259. Macroblock stuffing is now illegal in MPEG-2.  The original intent
  1260. behind stuffing in MPEG-1 was to provide a means for finer rate control
  1261. adjustment at the macroblock layer.  Since no self-respecting encoder
  1262. would waste bits on such an element (it does not contribute to the
  1263. refinement of the reconstructed video signal), and since this unlimited
  1264. loop of stuffing variable length codes represent a significant headache
  1265. for hardware implementations which have a fixed window of time in which
  1266. to parse and decode a macroblock in a pipeline, the element was
  1267. eliminated in January 1993 from the MPEG-2 syntax.  Some feel that
  1268. macroblock stuffing was beneficial since it permitted macroblocks to be
  1269. coded along byte boundaries.  A good compromise could have been a
  1270. limited number of stuffs per macroblock.  If stuffing is needed for
  1271. purposes of rate control, an encoder can pad extra zero bytes before
  1272. the start code of the next slice. If stuffing is required in the last
  1273. row of macroblocks of the picture, the picture start code of the next
  1274. picture can be padded with an arbitrary number of bytes.  If the
  1275. picture happens to be the last in the sequence, the sequence_end_code
  1276. can be stuffed with zero bytes.
  1277.  
  1278. The dct_type flag in both Intra and non-Intra coded macroblocks of
  1279. frame structured pictures signals that the reconstructed samples output
  1280. by the IDCT stage shall be organized in field or frame order.   This
  1281. flag provides an encoder with a sort of poor mans motion_type by
  1282. adapting to the interparity (i.e. interfield) characteristics of the
  1283. macroblock without signaling a need for motion vectors via the
  1284. macroblock_type variable. dct_type plays an essential role in Intra
  1285. frame pictures by organizing lines of a common parity together when
  1286. there is significant interfield motion within the macroblock.  This
  1287. increases the decorrelation efficiency of the DCT stage.   For
  1288. non-intra macroblocks, dct_type organizes the 16 lines (... luminance,
  1289. 8 lines chrominance) of the macroblock prediction error. In combination
  1290. with motion_type, the meaning....
  1291.  
  1292.  
  1293. dct_type
  1294. motion_format
  1295. interpretation
  1296.  
  1297. frame
  1298. Intra coded
  1299. block data is frame correlated
  1300.  
  1301. field
  1302. Intra coded
  1303. block data is more strongly correlated along lines of 
  1304. opposite parity
  1305.  
  1306.