[XviD-devel] interlacing test

peter ross xvid-devel@xvid.org
Wed, 04 Sep 2002 14:44:28 +1000


>i patched xvid's interlacing, but have a couple queries.
>
>- vm18 says boundary blocks should always use normal frame-based dct, but 
>there's nothing to enforce it (and it brings quite a bitrate hit).  should 
>xvid obey this?
>- how the hell does one decode an xvid sequence with momusys?


hello,

just read the spec, and i reckon:
* we must encode boundary macroblocks using frame-based compen/dct
* for outside-of-vop padding we must use 'frame-based padding'.
* for inner-vop padding (NOTE: we dont need this atm) luminace must
  use frame-base padding, whilst chrominance uses 'field-base padding'

it also worth trying other decoders, because the reference software
may have bugs. divx, envivio, quicktime, etc.

momusys: iam not sure. if its anything like msfdam or jm, you must
feed it file containing the raw bitstream, and it will spit out a
.yuv file. the yuv file contains the sequential yuv images. there
are tools available at mpeg4ip to covert yuv to pgm/avi etc.

-- pete

relevant excerpts from ISO/IEC 14496-2:2001(E)
---
6.1.3.6 Format
---
6.3.6.3 Interlaced Information
dct_type: This is a 1-bit flag indicating whether the macroblock is frame 
DCT coded or field DCT coded. If this flag
is set to “1”, the macroblock is field DCT coded; otherwise, the macroblock 
is frame DCT coded. This flag is only
present in the bitstream if the interlaced flag is set to “1” and the 
macroblock is coded (coded blcok pattern is nonzero)
or intra-coded. Boundary blocks are always coded in frame-based mode.
---
7.6.1.1 Horizontal repetitive padding
7.6.1.2 Vertical repetitive padding
7.6.1.3 Extended padding
7.6.1.4 Padding for chrominance components
---
7.6.1.5 Padding of interlaced macroblocks
Macroblocks of interlaced VOP (interlaced = 1) are padded according to 
subclauses 7.6.1.1 through 7.6.1.3. The
vertical padding of the luminance component, however, is performed for each 
field independently. A sample outside
of a VOP is therefore filled with the value of the nearest boundary sample 
of the same field. Completely transparent
blocks are padded with 2bits_per_pixel-1. Chrominance components of 
interlaced VOP are padded according to
subclause 7.6.1.4, however, based on fields to enhance subjective quality of 
display in 4:2:0 format. The padding
method described in this subclause is not used outside the bounding 
rectangle of the VOP.
---


_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx