View Single Post
Old 9th December 2005, 14:34   #6  |  Link
cedocida
Registered User
 
Join Date: Mar 2002
Posts: 38
(I)
When encoding to DV and input is YV12 you have to tell the encoder which type of YV12 input you are feeding the encoder:
1.) "DV", that is the luma and chroma samples are taken 1:1 for DCT-type compression as specified in the standard. If the source has sample positions which are not compliant to the DV standard you will get wrong results.
2.) "MPEG 2 non interlaced", you are feeding in YV12 which is used in the MPEG 2 standard for non interlaced material. In order to get correct DV-compressed-video the position of the chroma samples are internally shifted/interpolated.
3.) "MPEG 2 interlaced", same as 2.) but for interlaced MPEG 2 material
4.) When feeding the encoder with YUY2 or RGB material there is no uncertainty about the sample positions of luma/chroma, that is the "YV12 chroma sampling"-options are irrelevant.

(II)
When decoding from DV and output is YV12 you have to tell the encoder which type of YV12 output you want to get out of the decoder:
1.), 2.) and 3.) same as above but now specifies the output material.
4.) When decoding to YUY2 or RGB there is no uncertainty about the sample positions of luma/chroma, that is the "YV12 chroma sampling"-options are irrelevant.


IMHO YV12 does only mean (in the broader sense), that there are 4 parts of luma and 2 parts of chroma samples for a 4-pixel-block, each 8bit per sample, and arranged in a planar way in memory. The position of the samples differs for the various video formats.
That is, if you deal with YV12, you have to tell what material you have (to feed the encoder) or you want to get (from the decoder).
DV compressed video does not distinguish between interlaced or progessive. DV-input and DV-output allways is considered as fields. It only has a mechanism to efficiently compress video which is progressive, i.e. if both fields are from the same time instance.

Regards, Andreas
cedocida is offline   Reply With Quote