aleste81
27th November 2007, 01:24
So you are used to capture to YUY2, then edit in RGB with VirtualDub,
then back to YUY2 for some AviSynth filtering, then YV12 for compression, huh ?
Then see for yourself what happens each time you convert from RGB to YUV :
http://membres.lycos.fr/ttest/pub/IMAGES/FORUMS/DOOM9/RGB_2_YUV/RGB_to_YUY2_to_RGB_(000_time).gif
Original RGB
http://membres.lycos.fr/ttest/pub/IMAGES/FORUMS/DOOM9/RGB_2_YUV/RGB_to_YUY2_to_RGB_(000_time).png
RBG to YUY2 to RBG 35 times
http://membres.lycos.fr/ttest/pub/IMAGES/FORUMS/DOOM9/RGB_2_YUV/RGB_to_YUY2_to_RGB_(035_times).png
RBG to YUY2 to RBG 70 times
http://membres.lycos.fr/ttest/pub/IMAGES/FORUMS/DOOM9/RGB_2_YUV/RGB_to_YUY2_to_RGB_(070_times).png
RBG to YUY2 to RBG 215 times
http://membres.lycos.fr/ttest/pub/IMAGES/FORUMS/DOOM9/RGB_2_YUV/RGB_to_YUY2_to_RGB_(215_times).png
RBG to YUY2 to RBG 700 times
http://membres.lycos.fr/ttest/pub/IMAGES/FORUMS/DOOM9/RGB_2_YUV/RGB_to_YUY2_to_RGB_(700_times).png
Note : the video used is from VirtualDub 1.7.6 menu Tools | Create Test Video | RGB Cube, frameserved.
The AviSynth script used is
AVISource("RBGCube.vdr")
ConvertToYUY2()
ConvertToRGB()
ConvertToYUY2()
ConvertToRGB()
...
repeated many times.
Edit (from squid_80 suggestion) :
The is no color shift is you use ConvertBackToYUY2() instead of ConvertToYUY2()
From http://avisynth.org/mediawiki/ConvertToYUY2
«Conversion back and forth is not lossless, so use as few conversions as possible. If multiple conversions are necessary, use ConvertBackToYUY2() to convert back to YUY2, when you applied a YUY2->RGB conversion prior to that in your script. This will reduce colorblurring, but there are still some precision lost.»
then back to YUY2 for some AviSynth filtering, then YV12 for compression, huh ?
Then see for yourself what happens each time you convert from RGB to YUV :
http://membres.lycos.fr/ttest/pub/IMAGES/FORUMS/DOOM9/RGB_2_YUV/RGB_to_YUY2_to_RGB_(000_time).gif
Original RGB
http://membres.lycos.fr/ttest/pub/IMAGES/FORUMS/DOOM9/RGB_2_YUV/RGB_to_YUY2_to_RGB_(000_time).png
RBG to YUY2 to RBG 35 times
http://membres.lycos.fr/ttest/pub/IMAGES/FORUMS/DOOM9/RGB_2_YUV/RGB_to_YUY2_to_RGB_(035_times).png
RBG to YUY2 to RBG 70 times
http://membres.lycos.fr/ttest/pub/IMAGES/FORUMS/DOOM9/RGB_2_YUV/RGB_to_YUY2_to_RGB_(070_times).png
RBG to YUY2 to RBG 215 times
http://membres.lycos.fr/ttest/pub/IMAGES/FORUMS/DOOM9/RGB_2_YUV/RGB_to_YUY2_to_RGB_(215_times).png
RBG to YUY2 to RBG 700 times
http://membres.lycos.fr/ttest/pub/IMAGES/FORUMS/DOOM9/RGB_2_YUV/RGB_to_YUY2_to_RGB_(700_times).png
Note : the video used is from VirtualDub 1.7.6 menu Tools | Create Test Video | RGB Cube, frameserved.
The AviSynth script used is
AVISource("RBGCube.vdr")
ConvertToYUY2()
ConvertToRGB()
ConvertToYUY2()
ConvertToRGB()
...
repeated many times.
Edit (from squid_80 suggestion) :
The is no color shift is you use ConvertBackToYUY2() instead of ConvertToYUY2()
From http://avisynth.org/mediawiki/ConvertToYUY2
«Conversion back and forth is not lossless, so use as few conversions as possible. If multiple conversions are necessary, use ConvertBackToYUY2() to convert back to YUY2, when you applied a YUY2->RGB conversion prior to that in your script. This will reduce colorblurring, but there are still some precision lost.»