home *** CD-ROM | disk | FTP | other *** search
/ ftp.pasteur.org/FAQ/ / ftp-pasteur-org-FAQ.zip / FAQ / mpeg-faq / part3 < prev    next >
Text File  |  1996-11-10  |  57KB  |  1,326 lines

  1. Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!news.mathworks.com!fu-berlin.de!cs.tu-berlin.de!phade
  2. From: phade@cs.tu-berlin.de (Frank Gadegast)
  3. Newsgroups: alt.answers,comp.answers,news.answers
  4. Subject: MPEG-FAQ: multimedia compression [3/9]
  5. Followup-To: alt.binaries.multimedia
  6. Date: 9 Nov 1996 09:32:59 GMT
  7. Organization: Technical University of Berlin, Germany
  8. Lines: 1305
  9. Approved: news-answers-request@MIT.EDU
  10. Expires: 31 Dec 1996 12:00:00 GMT
  11. Message-ID: <561j4b$ots$1@news.cs.tu-berlin.de>
  12. Reply-To: mpegfaq@powerweb.de
  13. NNTP-Posting-Host: 130.149.22.20
  14. Mime-Version: 1.0
  15. Content-Type: text/plain; charset=iso-8859-1
  16. Content-Transfer-Encoding: 8bit
  17. Summary: This is the summary about the ISO video and audioformats MPEG 1, 2 and 4
  18. Keywords: MPEG, FAQ, Compression
  19. Xref: senator-bedfellow.mit.edu alt.answers:21696 comp.answers:22306 news.answers:86421
  20.  
  21. Archive-name: mpeg-faq/part3
  22. Last-modified: 1996/06/02
  23. Version: v 4.1 96/06/02
  24. Posting-Frequency: bimonthly
  25.  
  26. frame
  27. Field predicted
  28. 1. a low-cost encoder which only possesses frame 
  29. motion estimation may use dct_type to decorrelate 
  30. the prediction error of a prediction which is 
  31. inherently field by characteristic
  32.  
  33. 2. an intelligent encoder realizes that it is more bit 
  34. efficient to signal frame prediction with field 
  35. dct_type for the prediction error, than it is to signal 
  36. a field prediction.
  37.  
  38. field
  39. Field predicted
  40. A typical scenario.  A field prediction tends to form a 
  41. field-correlated prediction error.
  42.  
  43. frame
  44. Frame predicted
  45. A typical scenario.  A frame prediction tends to form a 
  46. frame-correlated prediction error.
  47.  
  48. field
  49. Frame predicted
  50. Makes little sense. If the encoder went through the 
  51. trouble of finding a field prediction in the first place, 
  52. why select frame organization for the prediction error?
  53.  
  54.  
  55. prediction modes now include field, frame, Dual Prime, and 16x8 MC.
  56. The combinations for Main Profile and  Simple Profile are shown below.
  57.  
  58. Frame pictures
  59. motion_type
  60. motion 
  61. vectors 
  62. per MB
  63. fundamental 
  64. prediction block 
  65. size (after half-
  66. pel)
  67. interpretation
  68.  
  69. Frame
  70. 1
  71. 16x16
  72. same as MPEG-1, with possibly different 
  73. treatment of prediction error via dct_type
  74.  
  75. Field
  76. 2
  77. 16x8
  78. Two independently coded predictions are 
  79. made: one for the 8 lines which correspond 
  80. to the top field, another for the 8 bottom 
  81. field lines.
  82.  
  83. Dual Prime
  84. 1
  85. 16x8
  86. Two independently coded predictions are 
  87. made: one for the 8 lines which correspond 
  88. to the top field, another for the 8 bottom 
  89. field lines.  Uses averaging of two 16x8 
  90. prediction blocks from fields of opposite 
  91. parity to form a prediction for the top and 
  92. bottom 8 lines.  A second vector is derived 
  93. from the first vector coded in the bitstream.
  94.  
  95.  
  96.  
  97. Field pictures
  98. motion_type
  99. motion 
  100. vectors 
  101. per MB
  102. fundamental 
  103. prediction block 
  104. size (after half-
  105. pel)
  106. interpretation
  107.  
  108. Field
  109. 1
  110. 16x16
  111. same as MPEG-1, with possibly different 
  112. treatment of prediction error via dct_type
  113.  
  114. 16x8
  115. 2
  116. 16x8
  117. Two independently coded predictions are 
  118. made: one for the 8 lines which correspond 
  119. to the top field, another for the 8 bottom 
  120. field lines.
  121.  
  122. Dual Prime
  123. 1
  124. 16x16
  125. A single prediction is constructed from the 
  126. average of two 16x16 predictions taken from 
  127. fields of opposite parity.
  128.  
  129.  
  130.  
  131. concealment motion vectors can be transmitted in the headers of intra
  132. macroblocks to help error recovery.  When the macroblock data that the
  133. concealment motion vectors are intended for becomes corrupt, these
  134. vectors can be used to specify a concealment 16x16 area to be extracted
  135. from the previous picture.  These vectors do not affect the normal
  136. decoding process, except for motion vector predictions.
  137.  
  138. Additional chroma_format  for 4:2:2 and 4:4:4 pictures.  Like MPEG-1,
  139. Main Profile syntax is strictly limited to 4:2:0 format, however, the
  140. 4:2:2 format is the basis of the 4:2:2 Profile (aka Studio Profile).
  141. In 4:2:2 mode, all syntax essentially remains the same except where
  142. matters of block count are concerned.  A coded_block_pattern extension
  143. was added to handle signaling of the extra two prediction error
  144. blocks.  The 4:4:4 format is currently undefined in any Profile.
  145.  
  146. chroma_format
  147. multiplex order within Macroblock
  148. Application
  149.  
  150. 4:2:0  (6 blocks)
  151. YYYYCbCr
  152. main stream television, consumer entertainment.
  153.  
  154. 4:2:2  (8 blocks)
  155. YYYYCbCrCbCr
  156. studio production environments, professional 
  157. editing equipment, distribution and servers
  158.  
  159. 4:4:4 (12 blocks)
  160. YYYYCbCrCbCrCbCrCbCr
  161. computer graphics
  162.  
  163.  
  164.  
  165. Non-linear macroblock quantization was introduced in MPEG-2 to increase
  166. the precision of quantization at high bit rates, while increasing the
  167. dynamic range for low bit rate use where  larger step size is needed.
  168. The quantization_scale_code may be selected between a linear (MPEG-1
  169. style) or non-linear scale on a picture (frame or field) basis. The new
  170. non-linear range corresponds to a dynamic range of 0.5 to 54 with
  171. respect to the linear (MPEG-1 style) range of 1 to 31.
  172.  
  173.  
  174. Block:
  175.  
  176. alternate scan  introduced a new run-length entropy scanning pattern
  177. generally more efficient for the statistics of interlaced video
  178. signals. Zig-zag scan is the appropriate choice for progressive
  179. pictures.
  180.  
  181. intra_dc_precision: the MPEG-1 DC value is mandatory quantized to a
  182. precision of 8 bits.  MPEG-2 introduced 9, 10, and 11 bit precision set
  183. on a picture basis to increase the accuracy of the DC component, which
  184. by very nature, has the most significant contribution towards picture
  185. quality.  Particularly useful at high bit rates to reduce
  186. posterization. Main and Simple Profiles are limited to 8, 9, or 10 bits
  187. of precision.  The 4:2:2 High Profile, which is geared towards higher
  188. bitrate applications (up to 50 Mbits/sec), permits all values (up to 11
  189. bits).
  190.  
  191. separate quantization matrices for Y and C: luminance (Y) and
  192. chrominance (Cb,Cr) share a common intra and non-intra DCT coefficient
  193. quantization 8x8 matrix in MPEG-1 and MPEG-2 Main and Simple Profiles.
  194. The 4:2:2 Profile permits separate quantization matrices to be
  195. downloaded for the luminance and chrominance blocks.  Cb and Cr still
  196. share a common matrix.
  197.  
  198. intra_vlc_format:  one of two tables may now be selected at the picture
  199. layer for variable length codes (VLCs) of AC run-length symbols in
  200. Intra blocks.  The first table is identical to that specified for
  201. MPEG-1 (dc_coef_next). The newer second table is more suited to the
  202. statistics of Intra coded blocks, especially in I- frames.  The best
  203. illustration between Table 0 and Table 1is the length of the symbol
  204. which represents End of Block (EOB).  In Table zero, EOB is 2 bits.  In
  205. Table one, it is 4 bits.  The implication is that the EOB symbol is
  206. 2^-n probable within the block, or from an alternative perspective,
  207. there are an average of 3 to 4 non-zero AC coefficients in Non-intra
  208. blocks, and 9 to 16 coefficients in Intra blocks.  The VLC tree of
  209. Table 1 was intended to be a subset of Table 0, to aid hardware
  210. implementations.  Both tables have 113 VLC entries (or events).
  211.  
  212. escape: When no entry in the VLC exists for a AC Run-Level symbol, an
  213. escape code can be used to represent the symbol. Since there are only
  214. 63 positions within an 8x8 block following the first coefficient, and
  215. the dynamic range of the quantized DCT coefficients is [-2047,+2048],
  216. there are (63*2047), or 128,961 possible combinations of Run and Level
  217. (the sign bit of the Level follows the VLC).  Only the 113 most common
  218. Run-Level symbols are represented in Table 0 or Table 1.  The length of
  219. the escape symbol (which is always 6 bits) plus the Run and Level
  220. values in MPEG-1 could be 20 or 28 bits in length.  The 20 bit escape
  221. describes levels in the range [-127,+127].  The 28 bit double escape
  222. has a range of [-255, +255].  MPEG-2 increased the span to the full
  223. dynamic range of quantized IDCT coefficients, [-2047, +2047] and
  224. simplified the escape mechanism with a single representation for this
  225. event.   The total length of the MPEG-2 escape codeword is 24 bits (6
  226. bit VLC followed by a 6-bit Run value, and 12 bit Level value).  It was
  227. an assumption by MPEG-1 designers that no quantized DCT coefficient
  228. would need greater representation than 10 bits [-255,+255].  Note:
  229. MPEG-2 escape mechanism does not permit the value -2048 to be
  230. represented.
  231.  
  232. mismatch control:  The arithmetic results of all stages are defined
  233. exactly by the normative MPEG decoding process, with the single
  234. exception of the Inverse Discrete Cosine Transform (IDCT). This stage
  235. can be implemented with a wide variety of IDCT implementations.  Some
  236. are more suited for software, others for programmable hardware, and
  237. others still for hardwired hardware designs. The IDCT reference formula
  238. in the MPEG specification would, if directly implemented, consume at
  239. least 1024 multiply and 1024 addition operations for every block. A
  240. wide variety of fast algorithms exist which can reduce the count to
  241. less than 200 multiplies and 500 adds per block by exploiting the
  242. innate symmetry of the cosine basis functions. A typical fast IDCT
  243. algorithm would be dwarfed by the cost of the other decoder stages
  244. combined. Each fast IDCT algorithm has different quantization error
  245. statistics (fingerprint), although subtle when the precision of the
  246. arithmetic is, for example, at least 16-bits for the transform
  247. coefficients and 24-bits for intermediate dot product values.
  248. Therefore, MPEG cannot standardize a single fast IDCT algorithm. The
  249. accuracy can be defined only statistically.  The IEEE 1180
  250. recommendation (December 1990) defines the error tolerance between an
  251. ideal direct-matrix floating point implementation (a direct
  252. implementation of the MPEG reference formula) and the test IDCT.
  253.  
  254. Mismatch control attempts to reduce the drift between different IDCT
  255. algorithms by eliminating bit patterns which statistically have the
  256. greatest contribution towards mismatches between the variety of
  257. methods. The reconstructions of two decoders will begin to diverge over
  258. time since their respective IDCT designs will reconstruct occasional,
  259. slightly different 8x8 blocks.
  260.  
  261. MPEG-1s mismatch control method is known canonicially as Oddification,
  262. since it forces all quantized DCT coefficients to negative values. It
  263. is a slight improvement over its predecessor in H.261.  MPEG-2 adopted
  264. a different method called, again canonically, LSB Toggling, further
  265. reducing the likelihood of mismatch. Toggling affects only the Least
  266. Significant Bit (LSB) of the 63rd AC DCT coefficient (the highest
  267. frequency in the DCT matrix).  Another significant difference between
  268. MPEG-1 and MPEG-2 mismatch control is, in MPEG-1, oddification is
  269. performed on the quantized DCT coefficients, whereas in MPEG-2,
  270. toggling is performed on the DCT coefficients after inverse
  271. quantization.  MPEG-1s mismatch control method favors programmable
  272. implementation since a block of DCT coefficients when quantized.
  273.  
  274. Sample:
  275. The two chrominace pictures (Cb, Cr) possess only half the resolution
  276. in both the horizontal and vertical direction as the luminance picture
  277. (Y).  This is the definition of the 4:2:0 chroma format. Most
  278. television displays require that at least the vertical chrominance
  279. resolution matches the luminance (4:2:2 chroma format). Computer
  280. displays may further still demand that the horizontal resolution also
  281. be equivalent (4:4:4 chroma format). There are a variety of filtering
  282. methods for interpolating the chrominance samples to match the sample
  283. density of luminance. However, the official location or center of the
  284. lower resolution chrominance sample should influence the filter design
  285. (relative taps weights), otherwise the chrominance plane can appear to
  286. be shifted by a fractional sample in the wrong direction.
  287.  
  288. The subsampled MPEG-1 chroma position has a center exactly half way
  289. between the four nearest neighboring luminance samples.  To be
  290. consistent with the subsampled chrominance positions of 4:2:2
  291. television signals, MPEG-2 moved the center of the chrominance samples
  292. to be co-located horizontally with the luminance samples.
  293.  
  294.  
  295. Misc.:
  296.  
  297. copyright_id extension can identify whether a sequence or subset of
  298. frames within the sequence is copyrighted, and provides a unique 64-bit
  299. copyright_id_number registered with the ISO/IEC.
  300.  
  301. Syntax can now signal frame sizes as large as 16383 x 16383. Since
  302. MPEG-1 employed a meager 12-bits to describe horizontal_size and
  303. vertical_size , the range was limited to 4095x4095.  However, MPEGs
  304. Levels prescribe important interoperability points for practical
  305. decoders. Constrained Parameters MPEG-1 and MPEG-2 Low Level limit the
  306. sample rate to 352x240x30 Hz.  MPEG-2s Main Level defines the limit at
  307. 720x480x30 Hz. Of course, this is simply the restriction of the dot
  308. product of horizontal_size, vertical_size, and frame_rate. The Level
  309. also places separate restrictions on each of the these three
  310. variables.
  311.  
  312. Reflecting the more television oriented manner of MPEG-2, the optional
  313. sequence_display_extension() header can specify the chromaticy of the
  314. source video signal as it was prior to representation by MPEG syntax.
  315. This information includes: whether the original video_format was
  316. composite or component, the opto-electronic transfer_characteristics,
  317. and RGB->YCbCr matrix_coefficients. The picture_display_extension()
  318. provides more localized source composite video characteristics on a
  319. frame by frame basis (not field-by-field), with the syntax elements:
  320. field_sequence, sub_carrier_phase, and burst_amplitude.  This
  321. information can be used by the displays post-processing stage to
  322. reproduce a more refined display sequence.
  323.  
  324. Optional pan & scan syntax was introduced which tells a decoder on a
  325. frame-by-frame basis how to, for example, window a 4:3 image within the
  326. wider 16:9 aspect ratio of the coded frame.  The vertical pan offset
  327. can be specified to within 1/16th pixel accuracy.
  328.  
  329. <IMG SRC="mpeg2pan.gif">
  330.  
  331.  
  332. How does MPEG syntax facilitate parallelism ?
  333.  
  334. For MPEG-1, slices may consist of an arbitrary number of macroblocks.
  335. They can be independently decoded once the picture header side
  336. information is known. For parallelism below the slice level, the coded
  337. bitstream must first be mapped into fixed-length elements.  Further,
  338. since macroblocks have coding dependencies on previous macroblocks
  339. within the same slice, the data hierarchy must be pre-processed down to
  340. the layer of DC DCT coefficients.  After this, blocks may be
  341. independently inverse transformed and quantized, temporally predicted,
  342. and reconstructed to buffer memory.  Parallelism is usually more of a
  343. concern for encoders.  In many encoders today, block matching (motion
  344. estimation) and some rate control stages (such as activity and/or
  345. complexity measures) are processed for macroblocks independently.
  346. Finally, with the exception that all macroblock rows in Main Profile
  347. MPEG-2 bitstreams must contain at least one slice, an encoder has the
  348. freedom to choose the slice structure.
  349.  
  350. What is the MPEG color space and sample precision?
  351.  
  352. MPEG strictly specifies the YCbCr color space, not YUV or YIQ or YPbPr
  353. or YDrDb or any other many fine varieties of color difference spaces.
  354. Regardless of any bitstream parameters, MPEG-1 and MPEG-2 Video Main
  355. Profile specify the 4:2:0 chroma_format, where the color difference
  356. channels (Cb, Cr) have half the "resolution" or sample grid density in
  357. both the horizontal and vertical direction with respect to luminance.
  358.  
  359. MPEG-2 High Profile includes an option for 4:2:2 chroma_format, as does
  360. the MPEG 4:2:2 Profile (a.k.a.  Studio Profile) naturally. Applications
  361. for the 4:2:2 format can be found in professional broadcasting,
  362. editing,  and contribution-quality distribution environments.  The
  363. drawback of the 4:2:2 format is simply that it increases the size of
  364. the macroblock from six 8x8 blocks (4:2:0) to eight, while increasing
  365. the frame buffer size and decoding bandwidth by the same amount (33
  366. %).  This increase places the buffering memories well past the magic
  367. 16-Mbit limit for semiconductor DRAM devices, assuming the pictures are
  368. stored with a maximum of  414,720 pixels (720 pixels/line x 576
  369. lines/frame).  The maximum allowable pixel resolution could be reduced
  370. by 1/3 to compensate (e.g. 544 x 576). However, if a hardware decoders
  371. operate on a macroblock basis in the pipeline, on-chip static memories
  372. (SRAM) will increase by 1/3.  The benefits offered by 1/3 more pixels
  373. generally outweighs full vertical chrominance resolution. Other
  374. arguments favoring 4:2:0 over 4:2:2 include:
  375.  
  376.   Vertical decimation increases compression efficiency by reducing
  377.   syntax overhead posed in an 8 block (4:2:2) macroblock structure.
  378.  
  379.   You're compressing the hell out of the video signal, so what possible
  380.   difference can the 0:0:2 chromiance high-pass make?
  381.  
  382. Is 4:2:0 the same as 4:1:1 ?
  383.  
  384. No, no, definitely no.  The following table illustrates the nuances
  385. between the different chroma formats for a frame with pixel dimensions
  386. of 720 pixels/line x 480 lines/frame.
  387.  
  388. CCIR 601 (60 Hz) image          Chroma sub-sampling factors
  389. format  Y               Cb, Cr  Vertical        Horizontal
  390.  
  391.  
  392. chroma 
  393. format
  394. pixels/
  395. line
  396. Y
  397. lines/
  398. frame
  399. Y
  400. pixels/
  401. line
  402. Cb, Cr
  403. lines/
  404. frame
  405. Cb, Cr
  406. horizontal 
  407. subsampling 
  408. factor
  409. vertical 
  410. subsampling 
  411. factor
  412.  
  413. 4:4:4
  414. 720
  415. 480
  416. 720
  417. 480
  418. none
  419. none
  420.  
  421. 4:2:2
  422. 720
  423. 480
  424. 360
  425. 480
  426. 2:1
  427. none
  428.  
  429. 4:2:0
  430. 720
  431. 480
  432. 360
  433. 240
  434. 2:1
  435. 2:1
  436.  
  437. 4:1:1
  438. 720
  439. 480
  440. 180
  441. 480
  442. 4:1
  443. none
  444.  
  445. 4:1:0
  446. 720
  447. 480
  448. 180
  449. 120
  450. 4:1
  451. 4:1
  452.  
  453.  
  454. 3:2:2, 3:1:1, and 3:1:0 are less common variations, but have been
  455. documented.  As shocking as it may seem, the 4:1:0 ratio was used by
  456. Intels DVI for several years.
  457.  
  458. The 130 microsecond gap between successive 4:2:0 lines in progressive
  459. frames, and 260 microsecond gap in interlaced frames, can introduce
  460. some difficult vertical frequencies, but most can be alleviated through
  461. pre- processing.
  462.  
  463. What is the sample precision of MPEG ?  How many colors 
  464. can MPEG represent ?
  465.  
  466. By definition, MPEG samples have no more and no less than 8-bits
  467. uniform sample precision (256 quantization levels).  For luminance
  468. (which is unsigned) data, black corresponds to level 0, white is level
  469. 255.  However, in CCIR recommendation 601 chromaticy, luminance (Y)
  470. levels 0 through 14 and 236 through 255 are reserved for blanking
  471. signal excursions. MPEG currently has no such clipped excursion
  472. restrictions, although decoder might take care to insure active samples
  473. do not exceed these limits.  With three color components per pixel, the
  474. total combination is roughly 16.8 million colors (i.e. 24-bits).
  475.  
  476.  
  477. How are the subsampled chroma samples cited ?
  478.  
  479.  
  480. It is moderately important to properly co-site chroma samples,
  481. otherwise a sort of chroma shifting effect (exhibited as a halo) may
  482. result when the reconstructed video is displayed.  In MPEG-1 video, the
  483. chroma samples are exactly centered between the 4 luminance samples
  484. (Fig 1.)   To maintain compatibility with the CCIR 601 horizontal
  485. chroma locations and simplify implementation (eliminate need for phase
  486. shift), MPEG-2 chroma samples are arranged as per Fig.2.
  487.  
  488.   Y   Y   Y   Y             Y   Y   Y   Y            YC  Y   YC  Y
  489.    C       C                C         C
  490.   Y   Y   X   Y             Y   Y   Y   Y            YC  Y   YC  Y
  491.  
  492.   Y   Y   Y   Y             Y   Y   Y   Y            YC  Y   YC  Y
  493.     C       C               C         C
  494.   Y   Y   Y   Y             Y   Y   Y   Y            YC  Y   YC  Y
  495.  
  496.   Fig.1 MPEG-1               Fig.2  MPEG-2           Fig.3 MPEG-2 and 
  497.  4:2:0 organization         4:2:0 organization         CCIR Rec. 601
  498.                                                      4:2:2 organization
  499.  
  500.  
  501. How do you tell an MPEG-1 bitstream from an MPEG-2 
  502. bitstream ?
  503.  
  504. A. All MPEG-2 bitstreams must contain specific extension headers that
  505. immediately follow MPEG-1 headers.  At the highest layer, for example,
  506. the MPEG-1 style sequence_header() is followed by sequence_extension().
  507. Some extension headers are specific to MPEG-2 profiles.  For example,
  508. sequence_scalable_extension()  is not allowed in Main Profile
  509. bitstreams.
  510.  
  511. A simple program need only scan the coded bitstream for byte-aligned
  512. start codes to determine whether the stream is MPEG-1 or MPEG-2.
  513.  
  514. What are start codes? 
  515.  
  516. These 32-bit byte-aligned codes provide a mechanism for cheaply
  517. searching coded bitstreams for commencement of various layers of video
  518. without having to actually parse variable-length codes or perform any
  519. decoder arithmetic.  Start codes also provide a mechanism for
  520. resynchronization in the presence of bit errors.  A start code may be
  521. preceded by an arbitrary number of zero bytes.  The zero bytes can be
  522. use to guarantee that a start code occurs within a certain location, or
  523. by rate control to increase the bitrate of a coded bitstream.
  524.  
  525. Coded block pattern 
  526.  
  527.  Coded block pattern:
  528. (CBP --not to be confused with Constrained Parameters!)  When the frame
  529. prediction is particularly good, the displaced frame difference(DFD, or
  530. temporal macroblock prediction error) tends to be small, often with
  531. entire block energy being reduced to zero after quantization.  This
  532. usually happens only at low bit rates.  Coded block patterns prevent
  533. the need for transmitting EOB symbols in those zero coded blocks.
  534. Coded block patterns are transmitted in the macroblock header only if
  535. the macrobock_type flag indicates so.
  536.  
  537. Why is the DC value always divided by 8 ?
  538.  
  539. Clarification point: The DC value of Intra coded blocks is quantized by
  540. a constant stepsize of 8 only in MPEG-1, rendering the 11-bit dynamic
  541. range of the IDCT DC coefficient to 8-bits of accuracy. MPEG-2 allows
  542. for DC precision of 8, 9, 10, or 11 bits.  The quantization stepsize is
  543. fixed for the duration of the picture, set by the intra_dc_precision
  544. flag in the picture_extension_header().
  545.  
  546. Why is there a special VLC for  DCT_coefficient_first:?
  547.  
  548. Since the coded_block_pattern in NON-INTRA macroblocks signals every
  549. possible combination of all-zero valued and non-zero blocks, the
  550. dct_coef_first mechanism assigns a different meaning to the VLC
  551. codeword (run = 0, level =+/- 1) that would otherwise represent EOB
  552. (10) as the first coefficient in the zig-zag ordered Run-Level token
  553. list.
  554.  
  555. WhatÆs the deal with  End of Block ?
  556.  
  557. Saves unnecessary run-length codes.  At optimal bitrates, there tends
  558. to be few AC coefficients concentrated in the early stages of the
  559. zig-zag vector. In MPEG-1, the 2-bit length of EOB implies that there
  560. is an average of only 3 or 4 non-zero AC coefficients per block.  In
  561. MPEG-2 Intra (I) pictures, with a 4-bit EOB code in Table 1, this
  562. estimate is between 9 and 16 coefficients. Since EOB is required for
  563. all coded blocks, its absence can signal that a syntax error has
  564. occurred in the bitstream.
  565.  
  566. WhatÆs  this ôMacroblock stuffing,ö dammit ?:
  567.  
  568. A genuine pain for VLSI implementations, macroblock stuffing was
  569. included in MPEG-1 to maintain smoother, constant bitrate control for
  570. encoders.  However, with normalized complexity/activity measures and
  571. buffer management performed a priori (before coding of the macroblock,
  572. for example) and local monitoring of coded data buffer levels now a
  573. common operation in encoders, (e.g. MPEG-2 encoder Test Model), the
  574. need for such localized bitrate smoothing evaporated. Stuffing can be
  575. achieved through slice start code padding if required. A good rule of
  576. thumb is: if you find often yourself wishing for stuffing more than
  577. once per slice, you probably don't have a very good rate control
  578. algorithm.  Nonetheless, to avoid any temptation, macroblock stuffing
  579. is now illegal in MPEG-2  (A general syntax restriction brought to you
  580. by the Implementation Studies Subgroup!)
  581.  
  582. WhatÆs the deal with slice_vertical_position and 
  583. macroblock_address_increment?
  584.  
  585. The absolute position of the first macroblock within a slice is known
  586. by the combination of slice_vertical_position and the
  587. macroblock_address_increment.  Therefore, the proper place of a lost
  588. slice found in a highly corrupt bitstream can be located exactly within
  589. the picture.  These two syntax elements are also the only known means
  590. of detecting slice gaps----areas of the picture which are not
  591. represented with any information (including skipped macroblocks).  A
  592. slice gap occurs when the current macroblock address of the first
  593. macroblock in a slice is greater than the previous macroblock address
  594. by more than 1 macroblock unit. A slice overlap occurs when the current
  595. macroblock address is less than or equal to the previous macroblocks
  596. address.  The previous macroblock in both instances is the last known
  597. macroblock within the previous slice. Because of the semantic
  598. interpretation of slice gaps and overlaps, and because of the syntactic
  599. restrictions for slice_vertical_position and
  600. macroblock_address_increment, it is not syntactically possible for a
  601. skipped macroblock to be represented in the first and last positions of
  602. a slice.  In the past, some (bad) encoders would attempt to signal a
  603. run of skipped macroblocks to the end of the slice. These evil skipped
  604. macroblocks should be interpreted by a compliant decoder as a gap, not
  605. as a string of skipped macroblocks.
  606.  
  607. What is meant by modified Huffman VLC tables:
  608.  
  609. The VLC tables in MPEG are not Huffman tables in the true sense of
  610. Huffman coding, but are more like the tables used in Group 3 fax. They
  611. are entropy constrained, that is, non-downloadable and optimized for a
  612. limited range of bit rates (sweet spots).  A better way would be to say
  613. that the tables are optimized for a range of ratios of bit rate to
  614. sample rate (e.g. 0.25 bits/pixel to 1.0 bits/pixel). With the
  615. exception of a few codewords, the larger tables were carried over from
  616. the H.261 standard drafted in the year 1990. This includes the AC
  617. run-level symbols, coded_block_pattern, and macroblock_address_increment.  
  618. MPEG-2 added an "Intra table," also called "Table 1".  Note that the
  619. dct_coefficient tables assume positive/negative coefficient PMF
  620. symmetry.
  621.  
  622.  
  623. How does MPEG handle 3:2 pulldown?
  624.  
  625. MPEG-1 video decoders had to decide for themselves when to perform 3:2
  626. pulldown if it was not indicated in the presentation time stamps (PTS)
  627. of the Systems layer bitstream.  MPEG-2 provides two flags
  628. (repeat_first_field, and top_field_first) which explicitly describe
  629. whether a frame or field is to be repeated. In progressive sequences,
  630. frames can be repeated 2 or 3 times.  Simple and Main Profile limit are
  631. limited to repeated fields only.  It is a general syntactic restriction
  632. that repeat_first_field can only be signaled (value ==1) in a frame
  633. structured picture.  It makes little sense to repeat field pictures in
  634. an interlaced video signal since the whole process of 3:2 pulldown
  635. conversion was meant to convert progressive, film sequences to the
  636. display frame rate of interlaced television.
  637.  
  638. In the most common scenario, a film sequence will contain 24 frames
  639. every second.  The bit_rate element in the sequence header will
  640. indicate 30 frames/sec, however.  On average, every other coded frame
  641. will signal a repeat field (repeat_first_field==1) to pad the frame
  642. rate from 24 Hz to 30 Hz:
  643.  
  644.  
  645. (24 coded frames/sec)*(2 fields/coded frame)*(5 display fields/4 coded
  646.   fields) = 30 display frames/sec
  647.  
  648.  
  649. After all this standardization, whatÆs left for research?
  650.  
  651.  
  652. A . Despite the fact that a comprehensive worldwide standard now exists
  653. for digital video, many areas remain wide open for research:  advanced
  654. encoding and pre-processing, motion estimation, macroblock decision
  655. models, rate control and buffer management in editing environments,
  656. implementation complexity reduction, etc. Many areas have yet to be
  657. solved ... (and discovered)..
  658.  
  659. Are some encoders better than others ?
  660.  
  661. A. Definitely. For example, the motion estimation search range of a
  662. has  great influence over final picture quality.  At a certain point a
  663. very large range can actually become detrimental (it may encourage
  664. large differential motion vectors). Practical ranges are usually
  665. between  +/- 15 and +/- 32.  As the range doubles, for instance, the
  666. search area quadruples. (like the classic relationship between in
  667. increase in linear vs. area).
  668.  
  669. Rate control marks a second tell-tale area where some encoders perform
  670. significantly better than others.
  671.  
  672. And finally, the degree of "pre-processing" (now a popular buzzword in
  673. the business) signals that the encoder belongs to an elite marketing
  674. class.
  675.  
  676.  
  677. Is the encoder standardized ?
  678.  
  679. A. The encoder rests just outside the normative scope of the standard,
  680. as long as the bitstreams it produces are compliant.  The decoder,
  681. however, is almost deterministic: a given bitstream should reconstruct
  682. to a unique set of pictures. However, since the IDCT  function is the
  683. ONLY non-normative stage in the decoder, an occasional error of a Least
  684. Significant Bit per prediction iteration is permitted. The designer is
  685. free to choose among many DCT algorithms and implementations.  The IEEE
  686. 1180 test referenced in Annex A of the MPEG-1 (ISO/IEC 11172-2) and
  687. MPEG-2 (ISO/IEC 13818-2) Video specifications spells out the
  688. statistical mismatch tolerance between the Reference IDCT, which is a
  689. separable 8x1 "Direct Matrix" DCT implemented with 64-bit floating
  690. point accuracy, and the IDCT you are testing for compliance.
  691.  
  692.  
  693. What is the TM (Test Model) ?
  694. What is the TM rate control and adaptive quantization technique ?
  695.  
  696. A. The Test model (MPEG-2) and Simulation Model (MPEG-1) were not, by
  697. any stretch of the imagination, meant to epitomize state-of-the art
  698. encoding quality.  They were, however, designed to exercise the syntax,
  699. verify proposals, and test the relative compression performance of
  700. proposals in a timely manner that could be duplicated by
  701. co-experimenters.  Without simplicity, there would have been no doubt
  702. endless debates over model interpretation.  Regardless of all else,
  703. more advanced techniques would probably trespass into proprietary
  704. territory.
  705.  
  706. The final test model for MPEG-2 is TM version 5b, a.k.a. TM version 6,
  707. produced in March 1993 (the time when the MPEG-2 video syntax was
  708. frozen). The final MPEG-1 simulation model is version 3 (SM-3).  The
  709. MPEG-2 TM rate control method offers a dramatic improvement over the SM
  710. method.  TM adds more accurate estimation of macroblock complexity
  711. through use of limited  a priori information. Macroblock quantization
  712. adjustments are computed on a macroblock basis, instead of
  713. once-per-macroblock row (which in the SM-3 case consisted of an entire
  714. slice).
  715.  
  716. How does the TM work?
  717.  
  718. Rate control and adaptive quantization are divided into three steps:
  719.  
  720. Step One: Target Bit Allocation
  721.  
  722. In Complexity Estimation, the global complexity measures assign
  723. relative weights to each picture type (I,P,B).  These weights (Xi, Xp,
  724. Xb) are reflected by the typical coded frame size of I, P, and B
  725. pictures (see typical frame size discussion). I pictures are usually
  726. assigned the largest weight since they have the greatest stability
  727. factor in an image sequence and contain the most new information in a
  728. sequence.  B pictures are assigned the smallest weight since B energy
  729. do not propagate into other pictures and are usually more highly
  730. correlated with neighboring P and I pictures than P pictures are.
  731.  
  732. The bit target for a frame is based on  the frame type, the remaining
  733. number of bits left in the Group of Pictures (GOP) allocation, and the
  734. immediate statistical history of previously coded pictures (sort of a
  735. moving average global rate control, if you will).
  736.  
  737. Step Two:       Rate Control via Buffer Monitoring
  738.  
  739. Rate control attempts to adjust bit allocation if there is significant
  740. difference between the target bits (anticipated bits) and actual coded
  741. bits for a block of data.  If the virtual buffer begins to overflow,
  742. the macroblock quantization step size is increased, resulting in a
  743. smaller yield of coded bits in subsequent macroblocks. Likewise, if
  744. underflow begins, the step size is decreased.   The Test Model
  745. approximates that the target picture has spatially uniform distribution
  746. of bits.  This is a safe approximation since spatial activity and
  747. perceived quantization noise are almost inversely proportional.  Of
  748. course, the user is free to design a custom distribution,  perhaps
  749. targeting more bits in areas that contain more complex yet highly
  750. perceptible data such as text.
  751.  
  752. Step Three:     Adaptive Quantization
  753.  
  754. The final step modulates the macroblock quantization step size obtained
  755. in Step 2 by a local activity measure. The activity measure itself is
  756. normalized against the most recently coded picture of the same type (I,
  757. P, or B). The activity for a macroblock is chosen as the minimum among
  758. the four 8x8 block luminance variances.  Choosing the minimum block is
  759. part of the concept that a macroblock is no better than the block of
  760. highest visible distortion (weakest link in the chain).
  761.  
  762. Decision:
  763. [deferred to later date]
  764.  
  765. Can motion vectors be used to determine object velocity?
  766.  
  767. Motion vector information cannot be reliably used as a means of
  768. determining object velocity unless the encoder model specifically set
  769. out to do so.  First, encoder models that optimize picture quality
  770. generate vectors that typically minimize prediction error and,
  771. consequently, the vectors often do not represent true object
  772. translation from picture-to-picture.  Standards converters that
  773. resample one frame rate to another (as in NTSC to PAL) use different
  774. methods (motion vector field estimation, edge detection, et al) that
  775. are not concerned with Rate-Distortion theory. Second, motion vectors
  776. are not transmitted for all macroblocks anyway.
  777.  
  778. Is it possible to code interlaced video with MPEG-1 syntax?
  779.  
  780. A. Two methods can be applied to interlaced video that maintain
  781. syntactic compatibility with MPEG-1 (which was originally designed for
  782. progressive frames only).  In the field concatenation method, the
  783. encoder model can carefully construct predictions and prediction errors
  784. that realize good compression but maintain field integrity (distinction
  785. between adjacent fields of opposite parity). Some pre-processing
  786. techniques can also be applied to the interlaced source video that
  787. would, e.g., lessen sharp vertical frequencies.
  788.  
  789. This technique is not terribly efficient of course.  On the other hand,
  790. if the original source was progressive (e.g. film), then it is more
  791. trivial to convert the interlaced source to a progressive format before
  792. encoding.  (MPEG-2 would then only offer slightly superior performance
  793. through such MPEG-2 enhancements as greater DC coefficient precision,
  794. non-linear mquant, intra VLC, etc.) Reconstructed frames are usually
  795. re- interlaced in the Display process following the decoding stages.
  796.  
  797. The second syntactically compatible method codes fields as separate
  798. pictures. Rumors have spread that this approach does not quiet work
  799. nearly as well as the pretend its really a frame method.
  800.  
  801. Can MPEG be used to code still frames ?
  802.  
  803. Yes.  MPEG Intra pictures are similar to baseline sequential JPEG pictures.
  804.  
  805. There are, of course, advantages and disadvantages to using MPEG over
  806. JPEG to represent still pictures.
  807.  
  808. Disadvantages:
  809.  
  810. 1. MPEG has only one color space (YCbCr)
  811.  
  812. 2. MPEG-1 and MPEG-2 Main Profile luma and chroma share quanitzation
  813. and VLC tables (4:2:0 chroma_format)
  814.  
  815. 3. MPEG-1 is syntactically limited to 4k x 4k images, and 16k x 16k for MPEG-2.
  816.  
  817. Advantages:
  818.  
  819. 1. MPEG possesses adaptive quantization which permits better rate
  820. control and spatial masking.
  821.  
  822. 2. With its limited still image syntax,  MPEG averts any temptation to
  823. use unnecessary, expensive, and academic encoding methods that have
  824. little impact on the overall picture quality (you know who you are).
  825.  
  826. 3. Philips' CD-I spec. has a requirement for a MPEG still frame mode,
  827. with double SIF image resolution.  This is technically feasible mostly
  828. thanks to the fact that only one picture buffer is needed to decode a
  829. still image instead of the 2.5 to 3 buffers needed for IPB sequences.
  830.  
  831.  
  832. Why was the 8x8 DCT size chosen?
  833.  
  834.  A. Experiments showed little compaction gains could be achieved with
  835.  larger transform sizes, especially in light of the increased
  836. implementation complexity. A fast DCT algorithm will require roughly
  837. double the number of arithmetic operations per sample when the linear
  838. transform point size is doubled. Naturally, the best compaction
  839. efficiency has been demonstrated using locally adaptive block sizes
  840. (e.g. 16x16, 16x8,  8x8, 8x4, and 4x4) [See Gary Sullivan and Rich
  841. Baker "Efficient Quadtree  Coding of Images and Video," ICASSP 91, pp
  842. 2661-2664.].
  843.  
  844. Inevitably, adaptive block transformation sizes introduce additional
  845. side information overhead while forcing the decoder to implement
  846. programmable or hardwired recursive  DCT algorithms. If the DCT size
  847. becomes too large, then more edges (local discontinuities) and the like
  848. become absorbed into the transform block, resulting in wider
  849. propagation of Gibbs (ringing) and other unpleasant phenomena.
  850. Finally, with larger transform sizes, the DC term is  even more
  851. critically sensitive to quantization noise.
  852.  
  853. Why was the 16x16 prediction size chosen?
  854.  
  855. The 16x16 area corresponds to the Least Common Multiple (LCM) of 8x8
  856. blocks, given the normative 4:2:0 chroma ratio. Starting with medium
  857. size images, the 16x16 area provides a good balance between side
  858. information overhead & complexity and motion compensated prediction
  859. accuracy.  In gist, experiments showed that the 16x16 was a good
  860. trade-off between complexity and coding efficiency.
  861.  
  862. What do B-pictures buy you?
  863.  
  864. A. Since bi-directional macroblock predictions are an average of two
  865. macroblock areas, noise is reduced at low bit rates (like a 3-D filter,
  866. if you will).  At nominal MPEG-1 video (352 x 240 x 30, 1.15 Mbit/sec)
  867. rates, it is said that B-frames improves SNR by as much as 2 dB. (0.5
  868. dB gain is usually considered worth-while in MPEG). However, at higher
  869. bit rates, B- frames become less useful since they inherently do not
  870. contribute to the  progressive refinement of an image sequence (i.e.
  871. not used as prediction by subsequent coded frames).  Regardless,
  872. B-frames are still politically controversial.
  873.  
  874. B pictures are interpolative in two ways: 1. predictions in the
  875. bi-directional macroblocks are an average from block areas of two
  876. pictures 2. B pictures "fill in" like a digital spackle the immediate
  877. 3-D video signal without contributing to the overall signal quality
  878. beyond that immediate point in time.  In other words, a B picture,
  879. regardless of its internal make-up of macroblock types, has a life
  880. limited only to itself.  As mentioned before, B picture energy does not
  881. propagate into other frames.  In a sense, bits spent on B pictures are
  882. wasted.
  883.  
  884. Why do some people hate B-frames?
  885.  
  886. A. Computational complexity, bandwidth, end-to-end delay, and picture
  887. buffer size are the four B-frame Pet Peeves. Computational complexity
  888. in the decoder is  increased since some macroblock modes require
  889. averaging between two block predictions (macroblock_motion_forward==1
  890. && macroblock_motion_backward==1).
  891.  
  892. Worst case, memory bandwidth is increased an extra 15.2 MByte/s
  893. (assuming 4:2:0 chroma_format at Main Level), not including any half
  894. pel or page-mode overhead) for this extra directional prediction. To
  895. really rub it in, an extra picture buffer is needed to store the future
  896. reference picture (backwards prediction frame).  Finally, an extra
  897. picture delay is introduced in the decoder since the frame used for
  898. backwards prediction needs to be transmitted to the decoder and
  899. reconstructed before the intermediate B-pictures in display order can
  900. be decoded.
  901.  
  902. Cable television have been particularly adverse to B-frames since, for
  903. CCIR 601 rate video, the extra picture buffer pushes the decoder DRAM
  904. memory requirements past the magic 8- Mbit (1 Mbyte) threshold into the
  905. evil realm of 16 Mbits (2 Mbyte).---- although 8-Mbits is fine for 352
  906. x 480 B picture sequence. However, cable often forgets that DRAM does
  907. not come in convenient high-volume (low cost) 8- Mbit packages as does
  908. friendly 4-Mbit and 16-Mbit packages.  In a few years, the cost
  909. difference between 16 Mbit and 8 Mbit will become insignificant
  910. compared to the bandwidth savings gain through higher compression.  For
  911. the time being, some cable boxes will start with 8-Mbit and allow
  912. future drop-in upgrades to the full 16-Mbit.
  913.  
  914.  
  915. How are interlaced and progressive pictures indicated in 
  916. MPEG?
  917.  
  918. The following tree may help illustrate the possible layers of
  919. progressive and interlaced coding modes:
  920.  
  921.  
  922.  
  923.           MPEG-2 sequence
  924.          /               \
  925.   progressive            interlaced sequence
  926.   sequence                 /            \
  927.                    Field picture        Frame picture
  928.                                         /         \
  929.                                        /           \
  930.                  Frame or field prediction     Frame MB prediction only
  931.                    /               \
  932.                Field dct           Frame dct 
  933.  
  934.  
  935.  
  936. What does it mean to be compliant with MPEG ?
  937.  
  938. There are two areas of conformance/compliance in MPEG:
  939.  
  940. 1. Compliant bitstreams
  941. 2. Compliant decoders
  942.  
  943. Technically speaking, video bitstreams consisting entirely of I-frames
  944. are syntactically compliant with the MPEG specification.  The I-frame
  945. sequence simply utilizes a rather limited subset of the full syntax.
  946. Compliant bitstreams must obey the range limits (e.g. motion vectors
  947. ranges, bit rates, frame rates, buffer sizes) and permitted syntax
  948. elements in the bitstream (e.g. chroma_format, B-pictures, etc).
  949.  
  950. Decoders, however, must be able to decode all combinations of legal
  951. bitstreams.. For example, a decoder which is incapable of decoding P or
  952. B frames is definitely not a Main Profile or Constrained Parameters
  953. decoder! Likewise, full arithmetic precision must be obeyed before any
  954. decoder can be called "MPEG compliant."   The IDCT, inverse quantizer,
  955. and motion compensated predictor must meet the accuracy requirements
  956. defined in the MPEG document. Real-time conformance is more complicated
  957. to measure than arithmetic precision, but it reasonable to expect that
  958. decoders that skip frames on reasonable bitstreams are not likely to be
  959. considered compliant.
  960.  
  961. What are Profiles and Levels?
  962.  
  963. A. MPEG-2 Video Main Profile and Main Level is analogous to MPEG-1's
  964. CPB, with  sampling limits at CCIR 601 parameters (720x480x30 Hz  or
  965. 720x576x24 Hz).  "Profiles" limit syntax (i.e. algorithms), whereas
  966. "Levels" limit coding parameters (sample rates, frame dimensions, coded
  967. bitrates, etc.). Together, Video Main Profile and Main Level
  968. (abbreviated as MP@ML) normalize complexity within feasible limits of
  969. 1994 VLSI technology (0.5 micron), yet still meet the needs of the
  970. majority of applications. MP@ML is the conformance point for most cable
  971. and satellite TV systems.
  972.  
  973. [insert a description of each Profiles and Levels here]
  974.  
  975. Can MPEG-1 encode higher sample rates than 352 x 240 x 30 Hz ?
  976.  
  977. A. Yes. The MPEG-1 syntax permits sampling dimensions as high as 4095 x
  978. 4095 x 60 frames per second.  The MPEG most people think of as "MPEG-1"
  979. is really a kind of subset known as Constrained Parameters bitstream
  980. (CPB).
  981.  
  982. What are Constrained Parameters Bitstreams?
  983.  
  984. MPEG-1 CPB are a limited set of sampling and bitrate parameters
  985. designed to normalize decoder computational complexity, buffer size,
  986. and memory bandwidth while still addressing the widest possible range
  987. of  applications. The parameter limits were intentionally designed to
  988. permit decoder implementations integrated with 4 Megabits (512 Kbytes)
  989. of DRAM.
  990.  
  991. Bitstream Parameter
  992. Limit 
  993.  
  994. pixels/line
  995. 704
  996.  
  997. lines/frame
  998. 480 or 576
  999.  
  1000. pixels/frame
  1001. 101,376 pixels
  1002.  
  1003. pixels/second
  1004. 2,534,400
  1005.  
  1006. frames/sec
  1007. 30 Hz
  1008.  
  1009. bit rate
  1010. 1.86 Mbit/sec
  1011.  
  1012. buffer size
  1013. 40 Kbytes
  1014.  
  1015.  
  1016. The sampling limits of CPB are bounded at the ever popular SIF rate:
  1017. 396 macroblocks (101,376 pixels) per picture if the picture rate is
  1018. less than or equal to 25 Hz, and 330 macroblocks (84,480 pixels) per
  1019. picture if the picture rate is 30 Hz. The MPEG nomenclature loosely
  1020. defines a pixel or "pel" as a unit vector containing a complete
  1021. luminance sample and one fractional (0.25 in 4:2:0 format) sample from
  1022. each of the two chrominance (Cb and Cr) channels. Thus, the
  1023. corresponding bandwidth figure can be computed as:
  1024.  
  1025.      352 samples/line x 240 lines/picture x 30 pictures/sec x 1.5
  1026.      samples/pixel
  1027.  
  1028.  or 3.8 Ms/s (million samples/sec) including chroma, but not including
  1029.  blanking intervals.  Since most decoders are capable of sustaining VLC
  1030. decoding at a faster rate than 1.8 Mbit/sec, the coded video bitrate
  1031. has become the most often waived parameter of CPB. An encoder which
  1032. intelligently employs the syntax tools should achieve SIF quality
  1033. saturation at about 2 Mbit/sec, whereas an encoder producing streams
  1034. containing  only I (Intra) pictures might require as much as 8 Mbit/sec
  1035. to achieve the same video quality.
  1036.  
  1037. Why is Constrained Parameters so important?
  1038.  
  1039.  A. It is an optimum point that allows (just barely) cost effective
  1040.  VLSI implementations in 1992 technology (0.8 microns).  It also
  1041. implies a nominal guarantee of interoperability for decoders and a
  1042. reasonable class of performance for encoders.  Since CPB is the most
  1043. popular canonical MPEG-1 conformance point, MPEG devices which are not
  1044. capable of at least meeting SIF rates are usually not considered to be
  1045. true MPEG by industry.
  1046.  
  1047.  Picture buffers (i.e. "frame stores") and coded data buffering
  1048.  requirements for MPEG-1 CPB fit just snugly into 4 Mbit of memory
  1049. (DRAM).
  1050.  
  1051. Who uses constrained parameters bitstreams?
  1052.  
  1053. A. Principal CPB applications are Compact Disc video (White Book or
  1054. CD-I) and desktop video.  Set-top TV decoders fall into a higher
  1055. sampling rate category known as "CCIR 601" or "Broadcast rate," which
  1056. as a rule of   thumb, has sampling dimensions and bandwidth 4 times
  1057. that of SIF (Constrained Parameter sample rate limit).
  1058.  
  1059. Are there ways of circumventing constrained parameters bitstreams for
  1060. SIF  class applications and decoders ?
  1061.  
  1062.  A. Yes, some.  Remember that CPB limits pictures by macroblock count
  1063.  (or pixels/frame). 416 x 240 x 24 Hz sampling rates are still within
  1064. these constraints. Deviating from 352 samples/line could throw off many
  1065. decoder implementations which possess limited horizontal sample rate
  1066. conversion abilities. Some decoders do in fact  include a few rate
  1067. conversion modes, with a filter usually implemented via binary taps
  1068. (shifts and adds).  Likewise, the target sample rates are usually
  1069. limited or ratios (e.g. 640, 540, 480 pixels/line, etc.).  Future MPEG
  1070. decoders will likely include on-chip arbitrary sample rate converters,
  1071. perhaps capable of operating in the vertical direction (although there
  1072. is little need of this in applications using standard TV monitors where
  1073. line count is constant, with the possible exception of windowing in
  1074. cable box graphical user interfaces).
  1075.  
  1076. Also, many CD videos are letterboxed at the 16:9 aspect ratio.  The
  1077. actual coded and display sampling dimensions are 384 x 216 (note
  1078. 384/216 = 16/9).  These programs are typically movies coded at the more
  1079. manageable 24 frames/sec.
  1080.  
  1081. Are there any other conformance points like CPB for MPEG-1?
  1082.  
  1083.  A. Undocumented ones, yes.  A second generation of decoder chips
  1084.  emerged on the market   about 1 year after the first wave of SIF-class
  1085. decoders.  Both LSI Logic and SGS-Thomson introduced CCIR 601 class
  1086. MPEG-1 video decoders to fill in the gap between canonical MPEG-1 (SIF)
  1087. and the emergence of Main Profile at Main Level (CCIR 601) MPEG-2
  1088. decoders.  Under non-disclosure agreement, C-Cube had the  CL- 950,
  1089. although since Q2'94, the CL-9100 is now the full MPEG-2 successor in
  1090. production.  MPEG-1 decoders in the CCIR 601 class, or Main Level, were
  1091. all too often called MPEG-1.5 or MPEG-1++ decoders.  For the first year
  1092. of operation, the Direct Broadcasting Satellite service in the United
  1093. States (Hughes Direct TV and Hubbards USSB) called only upon MPEG-1
  1094. syntax to represent interlaced video before switching to full MPEG-2
  1095. syntax.
  1096.  
  1097. What frame rates are permitted in MPEG?
  1098.  
  1099. A limited set is available for the choosing in MPEG-1 and the currently
  1100. defined set of Profiles and Levels of MPEG-2, although "tricks" could
  1101. be played with Systems-layer Time Stamps to convey non-standard picture
  1102. rates.  The set is: 23.976 Hz (3-2 pulldown NTSC), 24 Hz (Film),  25 Hz
  1103. (PAL/SECAM or 625/60 video), 29.97 (NTSC), 30 Hz (drop-frame NTSC  or
  1104. component 525/60), 50 Hz (double-rate PAL), 59.97 Hz (double rate
  1105. NTSC),  and 60 Hz (double-rate, drop-frame NTSC/component 525/60
  1106. video).
  1107.  
  1108. Only 23.976, 24, 25, 29.97, and 30 Hz are within the conformance space
  1109. of Constrained Parameter Bitstreams and Main Level.
  1110.  
  1111.  
  1112. What areas can be improved upon to create a better syntax 
  1113. than MPEG?
  1114.  
  1115. Several  improvements can be made to the MPEG syntax while remaining
  1116. within the framework of block based coding. As implementation
  1117. technology improves with time, the ratio of computation to sample rate
  1118. can be increased for the same implementation cost. With each
  1119. evolutionary stage in the shrinking of the semiconductor lithography
  1120. process (line width), more complex coding methods become economically
  1121. realizable. Some of the well-known or well-anticipated areas for
  1122. improvement are described below:
  1123.  
  1124. Intra coding:
  1125. For intra pictures, subband methods such as wavelets combined with
  1126. improved quantization and entropy coders could gain as much as 2-4 dB
  1127. over MPEG Intra pictures.  The problem becomes more complex when
  1128. considering the coding of Intra Macroblocks in mixed pictures, such as
  1129. P or B, since the extend of a subband must, in the simplest of
  1130. schemes,  be limited to the dimensions of a macroblock.
  1131.  
  1132.  
  1133. Prediction error coding
  1134. One of the strongest gripes against MPEG is the use of the DCT for
  1135. decorrelation of prediction error blocks.  One explanation is that the
  1136. DCT is suited for the statistical correlation of intra signals, but
  1137. less suited for the statistics of prediction error (Non-Intra) signals.
  1138. One common proposal is to replace the DCT with a Vector Quantizer.
  1139. Prediction error (Non-intra) blocks typically contain far fewer bits
  1140. than intra blocks.  (The bits that comprise a Non-intra blocks can be
  1141. thought of as having been previously distributed over previous blocks
  1142. in previous pictures in the form of coefficients and side
  1143. information...)
  1144.  
  1145. Finer coding unit granularityÆs:
  1146. The size of the transform block could be made smaller, larger, or both
  1147. (myriad of different sizes).  Likewise, the size of the motion
  1148. compensation block can be made larger or smaller.  The cost is more
  1149. complex semantics (more decoder complexity) and the overhead bits to
  1150. select the block size.  Instead of sharing the same side information,
  1151. the blocks within the macroblock could be assigned their own motion
  1152. vectors, macroblock quantization scale factors, etc.
  1153.  
  1154. Many advanced techniques were in investigated by MPEG during the
  1155. formative stages of the specification, but were eventually eliminated
  1156. for falling below a threshold set for coding gain vs. implementation
  1157. complexity. Often, proposals presented a significant departure from the
  1158. main stream algorithms under consideration. Each bit added to the
  1159. syntax, or rule added to the semantics represents several gates to a
  1160. silicon implementation, or from a software perspective, an extra table,
  1161. if-then or case statement at multiple points in the decoding program.
  1162.  
  1163.  
  1164.  
  1165. What are the similarities and differences between MPEG and 
  1166. H.263
  1167.  
  1168. During its formative stages, H.263 was known as "H.26P" or "H.26X". It
  1169. is an ITU-T standard for low-bitrate video and audio teleconferencing.
  1170. It is designed to be more efficient (at least 2dB) than H.261 for bit
  1171. rates below 64 kbits/sec (ISDN B channel).  The primary target bit
  1172. rate, approximately 27,000 bits/sec,  is the payload rate of the V.34
  1173. (a.k.a "V.Fast" or "V.Last") modem standard.  In a typical scenario, 20
  1174. kbit/sec would be allocated for the video portion, and 6.5 kbit/sec for
  1175. the speech portion.
  1176.  
  1177. Since the H.261 syntax was defined in 1990, techniques and
  1178. implementation power have naturally improved.  H.263 collects many of
  1179. the advanced  methods proposed during MPEGs formative stages into a
  1180. syntax which shares a common basis more with MPEG-1 video than with
  1181. H.261.
  1182.  
  1183. The detailed differences and similarities are summarized below:
  1184.  
  1185. Sample rate, precision, and color space:
  1186. H.263 pictures are transmitted with QCIF dimensions.  MPEG and JPEG
  1187. allow nearly any picture size to be described in the headers.  A fixed
  1188. picture size promotes interoperability by forcing all implementors to
  1189. operate at a common rate, rather than by allowing implementors to get
  1190. away with whatever lowest sample rate the consumer can be tricked into
  1191. buying.  Another reason for a fixed sample rate is that, unlike MPEG
  1192. which is generic, H.263 is geared towards a specific application
  1193. (teleconferencing).  Other MPEG applications such as CD Video and Cable
  1194. TV define their own fixed parameters. Chromaticy is again YCbCr, 4:2:0
  1195. macroblock structure, and 8 bits of uniform sample precision.
  1196.  
  1197. [details deferred]
  1198.  
  1199.  
  1200.  
  1201. How would you describe MPEG to the Data Compression 
  1202. expert?
  1203.  
  1204. A. MPEG video is a block-based coding scheme.
  1205.  
  1206.  
  1207. How does MPEG video really compare to TV, VHS, laserdisc ?
  1208.  
  1209. A. VHS picture quality can be achieved for film source video at about 1
  1210. million bits per second (with careful application of proprietary
  1211. encoding methods).  Objective comparison of  MPEG to VHS is complex.
  1212. The luminance response curve of VHS places -3 dB (50% response, the
  1213. common definition of bandlimit) at around analog 2 MHz (digital
  1214. equivalent to 200 samples/line). VHS chroma is considerably less dense
  1215. in the horizontal direction than MPEG's 4:2:0 signal (compare 80
  1216. samples/line equivalent to 176 !!).  From a sampling density
  1217. perspective, VHS is superior only in the vertical direction (480
  1218. luminance lines compared to 240).  When other analog factors are taken
  1219. into account, such as interfield crosstalk and the TV monitor Kell
  1220. factor, the perceptual vertical advantage becomes much less than 2:1.
  1221. VHS is also prone to such inconveniences as timing errors (an annoyance
  1222. addressed by time base correctors), whereas digital video is fully
  1223. discretized. Duplication processes for pre-recorded VHS tapes at high
  1224. speeds (5 to 15 times real time playback speed)  introduces additional
  1225. handicaps. In gist, MPEG-1 at its nominal parameters can match VHSs
  1226. sexy low-pass-filtered look, but for critical sequences, is probably
  1227. overall inferior to a well mastered, well duplicated VHS tape.
  1228.  
  1229. With careful coding schemes, broadcast NTSC quality can be approximated
  1230. at about 3 Mbit/sec, and PAL quality at about 4 Mbit/sec for film
  1231. source video.  Of course, sports  sequences with complex spatial-
  1232. temporal activity should be treated with higher bit rates, in the
  1233. neighborhood of  5 and 6 Mbit/sec. Laserdisc is perhaps the most
  1234. difficult medium to make comparisons with.
  1235.  
  1236. First, the video signal encoded onto a laserdisc is composite, which
  1237. lends the signal to the familiar set of artifacts (reduced color
  1238. accuracy of YIQ, moirse patterns, crosstalk, etc).  The medium's
  1239. bandlimited signal is often defined by laserdisc player manufacturers
  1240. and main stream publications as capable of rendering up to 425 TVL (or
  1241. frequencies with Nyquist at 567 samples/line). An equivalent component
  1242. digital representation would therefore have sampling dimensions of 567
  1243. x 480 x  30 Hz. The carrier-to-noise ratio of a laserdisc video signal
  1244. is typically better  than 48 dB.  Timing accuracy is excellent,
  1245. certainly better than VHS.  Yet some of the clean characteristics of
  1246. laserdisc can be simulated with MPEG-1 signals as low as 1.15 Mbit/sec
  1247. (SIF rates),  especially for those areas of medium detail (low spatial
  1248. activity) in the presence of uniform motion (affine motion vector
  1249. fields). The appearance of laserdisc or Super VHS quality can therefore
  1250. be obtained for many video sequences with low bit rates, but for the
  1251. more general class of images sequences, a bit rate ranging from 3 to 6
  1252. Mbit/sec is necessary.
  1253.  
  1254.  
  1255. What are the typical coded sizes for the MPEG frames?
  1256.  
  1257. Typical bit sizes for the three different picture types:
  1258. Level
  1259. I
  1260. P
  1261. B
  1262. Average
  1263.  
  1264. 30 Hz SIF
  1265. @ 1.15 Mbit/sec
  1266. 150,000
  1267. 50,000
  1268. 20,000
  1269. 38,000
  1270.  
  1271. 30 Hz CCIR 601
  1272. @ 4 Mbit/sec
  1273. 400,000
  1274. 200,000
  1275. 80,000
  1276. 130,000
  1277.  
  1278.  
  1279. Note: the above example is taken from a standard test sequence coded by
  1280. the Test Model method, with an I frame distance of 15 (N = 15), and a P
  1281. frame distance of 3 (M = 3).
  1282.  
  1283. Of course, among differing source material, scene changes, and use of
  1284. advanced encoder models these numbers can be significantly different.
  1285.  
  1286. At what bitrates is MPEG-2 video optimal? 
  1287.  
  1288. The Test subgroup has defined a few example "Sweet spot" sampling
  1289. dimensions and bit rates for MPEG-2:
  1290.  
  1291. Dimensions
  1292. Coded rate
  1293. Application
  1294.  
  1295. 352x480x24 Hz 
  1296. (progressive)
  1297. 2 Mbit/sec
  1298. Equivalent to VHS quality.  Intended for film source video. Half 
  1299. horizontal 601(HHR).  Looks almost broadcast NTSC quality
  1300.  
  1301. 544x480x30 Hz 
  1302. (interlaced).
  1303. 4 Mbit/sec
  1304. PAL broadcast quality (nearly full capture of 5.4 MHz luminance 
  1305. signal).  544 samples matches the width of a 4:3 picture windowed 
  1306. within 720 sample/line 16:9 aspect ratio via pan&scan
  1307.  
  1308. 704x480x30 
  1309. Hz.(interlaced)
  1310. 6 Mbit/sec
  1311. Full CCIR 601 sampling dimensions
  1312.  
  1313.  
  1314. These numbers may be too ambitious.  Bit rates of 3, 6, and 8 Mbit/sec
  1315. respectively provide transparent quality for the above application
  1316. examples when generated by a reasonably sophisticated encoder.
  1317.  
  1318. Why does film perform so well with MPEG ?
  1319.  
  1320.  
  1321. 1. The frame rate is 24 Hz (instead of 30 Hz) which is a savings of
  1322. some 20%.
  1323.  
  1324. 2. Film source video is inherently progressive.  Hence no fussy
  1325. interlaced spectral frequencies.
  1326.