Log in

View Full Version : RGB -> YUY2 -> YV12 problems with mpeg-2 and AviSynth


mp3dom
6th April 2005, 23:17
Hi,
I have a "small" problem.
I have an interlaced PAL mpeg-2 source 720x576 @ 50 Mbps (coming from an SDI acquisition) that I need to load into VDubMod and frameserving it to AviSynth (mpeg2dec3 and DGIndex doesn't seems to be capable of decoding such mpeg-2 stream).
The source is quite noisy so I'm using some filters to correct this problem but some filters works only in YUY2 and some only in YV12... so I need a color conversion. The main problem is that the "final" clip has some artifacts (blocks) on chroma especially on full red scenes. Also a "ConvertToYUY2" at the end of the script doesn't resolve the problem. I've red that the problem could be the YV12 "decoder" so I've installed XviD and Helix YV12 decoder but the problem still remain. What can I do?

I've also another question... the source has an "aliasing" effects on the diagonal edge like a "saw blade". Is there a way to fix or soften this effect? (the source is interlaced and need to be interlaced. I can however de-interlace and re-interlace if this could be helpful to fix the problem.)

Thanks to all for the "support" :P

Wilbert
6th April 2005, 23:38
Just send the clip to neuron2 and ask him to look at it:

http://forum.doom9.org/showthread.php?s=&postid=635134#post635134

Guest
7th April 2005, 04:54
Originally posted by mp3dom
(mpeg2dec3 and DGIndex doesn't seems to be capable of decoding such mpeg-2 stream) Not too surprising, because DGIndex must be used only with the matching DGDecode; it won't work at all with mpeg2dec3.

Guest
7th April 2005, 04:57
Originally posted by Wilbert
Just send the clip to neuron2 and ask him to look at it
I concur with Wilbert. Upload an unprocessed source clip to my server (see sig below) and notify me here of its filename. Then we can give a proper analysis.

mp3dom
7th April 2005, 07:16
The main problem is not that DGIndex cannot decode the 50 Mbps (In previous post i mean DGIndex or mpeg2dec3) but the fact that the colorconversion lower the quality. It's not a problem to me to use VDubMod to "passthrough" the Mpeg to AviSynth (via VDR).

Wilbert
7th April 2005, 09:20
So, DGIndex can't decode it?

Perhaps you can provide more info.


The main problem is that the "final" clip has some artifacts (blocks) on chroma especially on full red scenes. Also a "ConvertToYUY2" at the end of the script doesn't resolve the problem. I've red that the problem could be the YV12 "decoder" so I've installed XviD and Helix YV12 decoder but the problem still remain. What can I do?
1) What is your end format? mpeg-2, or do you want to deinterlace it and encode to XviD/DivX?

2) Post the script you want to use.

Guest
7th April 2005, 13:57
Originally posted by mp3dom
The main problem is not that DGIndex cannot decode the 50 Mbps (In previous post i mean DGIndex or mpeg2dec3) but the fact that the colorconversion lower the quality. What color conversion?

sh0dan
7th April 2005, 16:26
Originally posted by mp3dom
I've red that the problem could be the YV12 "decoder" so I've installed XviD and Helix YV12 decoder but the problem still remain.
These codecs all have rather bad chroma upsampling.

So what application are you serving your frames?
An YV12 capable one? (VDub, QuEnc, Real). Don't do any conversion - and DON'T trust the preview in vdub, unless you do converttorgb() first (disable when processing). Evaluating chroma resolution is not easy, and you must know exactly what you are doing.

Always convert your source inside avisynth to a the format the destination application understands (YV12 for the apps above, YUY2 for CCE, RGB for TMPGEnc and others). That way you get the best possible quality.

dukey
12th February 2006, 18:23
i have this problem exactly
video source is mpeg2
i have a dgindex d2v file (does the same with dvd2avi)
i load it into avisyth with the appropriate plugin
then when i load this script into media player or tmpgenc the chroma ends up broken
its especially noticable on the red. Deinterlacing the picture doesn't fix it. Blend even/odd etc don't work. However if i load the d2v into tmpgenc without using an aviscript it works fine. Can someone explain what is going on ?

my script is just this
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
video = DGDecode_MPEG2Source("C:\uploads\vs remixes\mashed.d2v")
return video

The screenshot is AFTER i've deinterlaced it with even, as you can see the choma has gone sort of crazy.

sh0dan
13th February 2006, 20:43
For TMPGEnc, use "return video.ConvertToRGB24(interlaced=true)"

GrofLuigi
14th February 2006, 04:33
I've red that the problem could be the YV12 "decoder" so I've installed XviD and Helix YV12 decoder but the problem still remain.
These codecs all have rather bad chroma upsampling.

Really? I thought Helix was 'specialised' in YV12. Please explain some more.

GL

Wilbert
14th February 2006, 10:38
Helix accepts progressive YV12. Since your source is interlaced you will get bad chroma upsampling. More info:
http://www.avisynth.org/Sampling