PDA

View Full Version : Confused about 4:2:0 and upconv in mpeg2source


FlimsyFeet
4th July 2006, 10:07
So I was comparing the output from mpeg2source() to opening a VOB directly with VirtualDubMod. In the AVS file preview I noticed some stepping on diagonal red lines that is actually smoother in the VOB file.

However, if I save out the single frame as a BMP from DGIndex, then that is smooth as well.

It seems like the XviD codec is being used to display the 4:2:0 format in the AVS file. Is it a problem with the codec?

I can makle it look nicer by using upconv=2 as a parameter in mpeg2source. But this delivers frames as uncompressed RGB, if I'm encoding to XviD then that's an extra colourspace conversion, and I though it was preferable to avoid conversions if possible?

Wilbert
4th July 2006, 12:54
In the AVS file preview I noticed some stepping on diagonal red lines that is actually smoother in the VOB file.
As in AVS file preview in VDub/WMP6.4? In that case add ConvertToRGB() for preview. Note this is just a display problem, because for displaying there is always a convertion to RGB and this convertion is the issue in this case.

It seems like the XviD codec is being used to display the 4:2:0 format in the AVS file. Is it a problem with the codec?
The XviD decoder duplicates chroma instead of interpolating it.

FlimsyFeet
4th July 2006, 13:51
Right, I see, it's just a display issue, not really anything to do with DGMPGDec (sorry!). Yes I preview the file with vdub.

So for display, the following scripts should be equivalent:

1:
mpeg2source("xxxx.d2v", upconv=2)
bilinearresize(nnn,nnn)

2:
mpeg2source("xxxx.d2v")
bilinearresize(nnn,nnn)
converttorgb()

But for encoding (to XviD), it's faster to use script 2, with the convert removed, and using the "fast recompress" mode in Vdub?

neuron2
4th July 2006, 15:19
So for display, the following scripts should be equivalent They're not equivalent, because the first follows the progressive_frame flag while the second defaults to progressive upsampling for all frames.

But for encoding (to XviD), it's faster to use script 2, with the convert removed, and using the "fast recompress" mode in Vdub? Yes, and it avoids color space conversions.