Syncroniza
27th April 2003, 22:08
Hi!
I'm using AviSynth v2.07 and the newest VDubMod.
A few days ago I made some test-scripts, but I experienced some problems. Starting in the YUY2-colorspace, I made some conversions to RGB and back to YUY2 in these scripts. But it seemed to me that the ConvertToRGB-command always wanted a clip with a width dividible by 4.
I will post some examples:
LoadPlugin("F:\Video\Avisynth2\Addons\MPEG2Dec3.dll")
LoadPlugin("F:\Video\Avisynth2\Addons\DecombLegacy.dll")
LoadPlugin("F:\Video\Avisynth2\Addons\Dnr2.dll")
LoadPlugin("F:\Video\Avisynth2\Addons\Convolution3D.dll")
video=mpeg2source("F:\temp\familyguy_03-02-17.pva.pf.d2v", CPU = 6, iPP = true, iConv = false)
audio=WAVSource("F:\temp\familyguy_03-02-17.pva.norm-wave.wav")
AudioDub(video, audio)
Telecide(guide=0, post=true, threshold=7, dthreshold=5, blend=true, show=false, reverse=false, firstlast=false)
ConvertToRGB32()
Crop(14,4,-12,-4)
DNR2(12)
ConvertBackToYUY2()
Convolution3d (preset="animeLQ")
BilinearResize(640,480)
Trim(5000,8000)
The script above, for example, worked.
Whereas the following script didn't work (at least not how I expected):
LoadPlugin("F:\Video\Avisynth2\Addons\MPEG2Dec3.dll")
LoadPlugin("F:\Video\Avisynth2\Addons\DecombLegacy.dll")
LoadPlugin("F:\Video\Avisynth2\Addons\Dnr2.dll")
LoadPlugin("F:\Video\Avisynth2\Addons\Convolution3D.dll")
video=mpeg2source("F:\temp\familyguy_03-02-17.pva.pf.d2v", CPU = 6, iPP = true, iConv = false)
audio=WAVSource("F:\temp\familyguy_03-02-17.pva.norm-wave.wav")
AudioDub(video, audio)
Telecide(guide=0, post=true, threshold=7, dthreshold=5, blend=true, show=false, reverse=false, firstlast=false)
Crop(14,4,-12,-4)
ConvertToRGB32()
DNR2(12)
ConvertBackToYUY2()
Convolution3d (preset="animeLQ")
BilinearResize(640,480)
Trim(5000,8000)
The problem now is, that the second example was two or three times slower! :confused:
The other filters in these scripts should be no problem, so you shouldn't mind about unusual arguments (this was only for testing). You also shouldn't ask why I'm converting to RGB at all, only for the DNR2-filter (which would also work in YUY2). This is a different problem. :D
Fact is: The first script worked properly. In this script I first used ConvertToRGB32(), then I cropped (now in RGB-colorspace). The only difference in the second script is, that I first cropped (in YUY2-colorspace), and converted to RGB afterwards.
After some further testing, I found out, that this script worked again in normal speed:
LoadPlugin("F:\Video\Avisynth2\Addons\MPEG2Dec3.dll")
LoadPlugin("F:\Video\Avisynth2\Addons\DecombLegacy.dll")
LoadPlugin("F:\Video\Avisynth2\Addons\Dnr2.dll")
LoadPlugin("F:\Video\Avisynth2\Addons\Convolution3D.dll")
video=mpeg2source("F:\temp\familyguy_03-02-17.pva.pf.d2v", CPU = 6, iPP = true, iConv = false)
audio=WAVSource("F:\temp\familyguy_03-02-17.pva.norm-wave.wav")
AudioDub(video, audio)
Telecide(guide=0, post=true, threshold=7, dthreshold=5, blend=true, show=false, reverse=false, firstlast=false)
Crop(16,4,-12,-4)
ConvertToRGB32()
DNR2(12)
ConvertBackToYUY2()
Convolution3d (preset="animeLQ")
BilinearResize(640,480)
Trim(5000,8000)
Well, it seems that I has to crop with a width-value mod4, otherwise the conversion to RGB-colorspace is horribly slow. If I want to crop with e.g. only mod2-values, I have to do this after the conversion to RGB.
So, I have to aks now:
Did I miss here something? Has the ConvertToRGB-command some restrictions that I'm not aware of?
The cropping-command cannot be false. The only two limitations of cropping in YUY2, that I know, are:
- The left and right cropping-values should be mod2 (of course the resulting width should also be mod2 then).
- You have to regard the limitations of the filters which follow after the cropping.
With cropping in the RGB-colorspace, there should be no limitations, as far as I know.
But I'm no expert in colorspaces. If such a restriction in the ConvertToRGB-command is normal, someone should tell me (and I would feel sorry about wasting your time :( ).
So, a real restriction with the colorspace-conversion would be the first possibility.
Second possibility:
Is there a bug in AviSynth v2.07 which is perhaps solved in v2.08 or the 2.5x-versions? Well, I never read of such a bug in the version historys, but who knows..?
Third possibility:
The reason is within my system configuration. I think, the possibility of that is rather low due to the problem lying in a internal Avisynth-command. But if someone asks, I will post my system specs.
Hmm...or is it possible, that Avisynth uses external routines for the conversion into the RGB-colorspace? So that a crappy codec in my system can cause such a behaviour? Questions after questions...
Oh..perhaps this helps someone in identifying the problem:
When I searched the forum for a answer to this problem, I found one old thread:
http://forum.doom9.org/showthread.php?s=&threadid=41580
In this thread, a guy reports about "slow resizing" in AviSynth. Well, he thought that it was the resizing, but I think this guy had the same problem as me. He also used normal mod2-cropping-values (and not mod4) in his scripts and converted to RGB-colorspace right after.
I really want to know what the real reason behind this strange behaviour is. So, if someone has a hint (if someone is able to read this rather long text, filled with bad english :) ), I would be very happy.
Thanks for your help.
Syncroniza
I'm using AviSynth v2.07 and the newest VDubMod.
A few days ago I made some test-scripts, but I experienced some problems. Starting in the YUY2-colorspace, I made some conversions to RGB and back to YUY2 in these scripts. But it seemed to me that the ConvertToRGB-command always wanted a clip with a width dividible by 4.
I will post some examples:
LoadPlugin("F:\Video\Avisynth2\Addons\MPEG2Dec3.dll")
LoadPlugin("F:\Video\Avisynth2\Addons\DecombLegacy.dll")
LoadPlugin("F:\Video\Avisynth2\Addons\Dnr2.dll")
LoadPlugin("F:\Video\Avisynth2\Addons\Convolution3D.dll")
video=mpeg2source("F:\temp\familyguy_03-02-17.pva.pf.d2v", CPU = 6, iPP = true, iConv = false)
audio=WAVSource("F:\temp\familyguy_03-02-17.pva.norm-wave.wav")
AudioDub(video, audio)
Telecide(guide=0, post=true, threshold=7, dthreshold=5, blend=true, show=false, reverse=false, firstlast=false)
ConvertToRGB32()
Crop(14,4,-12,-4)
DNR2(12)
ConvertBackToYUY2()
Convolution3d (preset="animeLQ")
BilinearResize(640,480)
Trim(5000,8000)
The script above, for example, worked.
Whereas the following script didn't work (at least not how I expected):
LoadPlugin("F:\Video\Avisynth2\Addons\MPEG2Dec3.dll")
LoadPlugin("F:\Video\Avisynth2\Addons\DecombLegacy.dll")
LoadPlugin("F:\Video\Avisynth2\Addons\Dnr2.dll")
LoadPlugin("F:\Video\Avisynth2\Addons\Convolution3D.dll")
video=mpeg2source("F:\temp\familyguy_03-02-17.pva.pf.d2v", CPU = 6, iPP = true, iConv = false)
audio=WAVSource("F:\temp\familyguy_03-02-17.pva.norm-wave.wav")
AudioDub(video, audio)
Telecide(guide=0, post=true, threshold=7, dthreshold=5, blend=true, show=false, reverse=false, firstlast=false)
Crop(14,4,-12,-4)
ConvertToRGB32()
DNR2(12)
ConvertBackToYUY2()
Convolution3d (preset="animeLQ")
BilinearResize(640,480)
Trim(5000,8000)
The problem now is, that the second example was two or three times slower! :confused:
The other filters in these scripts should be no problem, so you shouldn't mind about unusual arguments (this was only for testing). You also shouldn't ask why I'm converting to RGB at all, only for the DNR2-filter (which would also work in YUY2). This is a different problem. :D
Fact is: The first script worked properly. In this script I first used ConvertToRGB32(), then I cropped (now in RGB-colorspace). The only difference in the second script is, that I first cropped (in YUY2-colorspace), and converted to RGB afterwards.
After some further testing, I found out, that this script worked again in normal speed:
LoadPlugin("F:\Video\Avisynth2\Addons\MPEG2Dec3.dll")
LoadPlugin("F:\Video\Avisynth2\Addons\DecombLegacy.dll")
LoadPlugin("F:\Video\Avisynth2\Addons\Dnr2.dll")
LoadPlugin("F:\Video\Avisynth2\Addons\Convolution3D.dll")
video=mpeg2source("F:\temp\familyguy_03-02-17.pva.pf.d2v", CPU = 6, iPP = true, iConv = false)
audio=WAVSource("F:\temp\familyguy_03-02-17.pva.norm-wave.wav")
AudioDub(video, audio)
Telecide(guide=0, post=true, threshold=7, dthreshold=5, blend=true, show=false, reverse=false, firstlast=false)
Crop(16,4,-12,-4)
ConvertToRGB32()
DNR2(12)
ConvertBackToYUY2()
Convolution3d (preset="animeLQ")
BilinearResize(640,480)
Trim(5000,8000)
Well, it seems that I has to crop with a width-value mod4, otherwise the conversion to RGB-colorspace is horribly slow. If I want to crop with e.g. only mod2-values, I have to do this after the conversion to RGB.
So, I have to aks now:
Did I miss here something? Has the ConvertToRGB-command some restrictions that I'm not aware of?
The cropping-command cannot be false. The only two limitations of cropping in YUY2, that I know, are:
- The left and right cropping-values should be mod2 (of course the resulting width should also be mod2 then).
- You have to regard the limitations of the filters which follow after the cropping.
With cropping in the RGB-colorspace, there should be no limitations, as far as I know.
But I'm no expert in colorspaces. If such a restriction in the ConvertToRGB-command is normal, someone should tell me (and I would feel sorry about wasting your time :( ).
So, a real restriction with the colorspace-conversion would be the first possibility.
Second possibility:
Is there a bug in AviSynth v2.07 which is perhaps solved in v2.08 or the 2.5x-versions? Well, I never read of such a bug in the version historys, but who knows..?
Third possibility:
The reason is within my system configuration. I think, the possibility of that is rather low due to the problem lying in a internal Avisynth-command. But if someone asks, I will post my system specs.
Hmm...or is it possible, that Avisynth uses external routines for the conversion into the RGB-colorspace? So that a crappy codec in my system can cause such a behaviour? Questions after questions...
Oh..perhaps this helps someone in identifying the problem:
When I searched the forum for a answer to this problem, I found one old thread:
http://forum.doom9.org/showthread.php?s=&threadid=41580
In this thread, a guy reports about "slow resizing" in AviSynth. Well, he thought that it was the resizing, but I think this guy had the same problem as me. He also used normal mod2-cropping-values (and not mod4) in his scripts and converted to RGB-colorspace right after.
I really want to know what the real reason behind this strange behaviour is. So, if someone has a hint (if someone is able to read this rather long text, filled with bad english :) ), I would be very happy.
Thanks for your help.
Syncroniza