View Full Version : filter for setting level of red blue and green?
scorchED
31st May 2002, 00:39
hello,
i was searching a filter for AVISynth for setting the level of red blue and green. I don't want to use VDub filter. Does anyone know such filter, which works in YUV-Color area?
sh0dan
31st May 2002, 11:53
It will be significantly faster to do this operation in RGB-mode, since the calculations are much simpler. In fact, I think a seperate RGB-levels filter will be very difficult to do in YUV-mode.
Use the vdub-filter - if it's MMX-optimized, it will be faster than any YUV-mode filter.
b0b0b0b
1st June 2002, 04:11
donald graft has a levels filter for avisynth & for virtualdub which will probably do what you want.
@ALL
1.A filter to correct RGB (red,green,blue channels that works in YUY2)if I am not wrong it doesn't exist.
2.In any case this filter should convert the YUY2 format to RGB,if not all the conversion part of it
the correspondance to chrominace.
3.If what you want is to make a RGB adjust in avisynth you have as far I know two options :
a)In avisynth realease 1.06 or later its included a filter which syntax is
#Example
ConvertToRGB()
#RgbAdjust(clip,red,green,blue,alphachannel)
RgbAdjust(0.82,0.75,1.43,0)
ConvertToYUY2()
As you can see the one included in tha latest releases of avisynth works in RGB mode
b) Using the virtualdub filters RGBAdjustment from Donald as a plugin in avisynth; you do
that importing the vdub_filters.avs which you can find in Donald's page or in a link that
Wilbert post before yesterday http://forum.doom9.org/showthread.php?s=&threadid=23804;
you will find many instruccions on how to do that in the own file and in Avisyntb Q&A
just above
#Example:
Import("C:\copydvd\avisynth\Avisynthv104\AVISynth\vdub_filters.avs") #my directory
ConvertToRGB()
#RgbAdjustment(clip,red,green,blue)
RgbAdjustment(0.82,0.75,1.43)
ConvertToYUY2()
4. Finally if what you need is to make a balance correction (between red and green);
that means, you have not too much problems with blue channel; you should use
Tweak filter(it works in YUY2) ,you will find a SSE optimized version of it by
Dividee(version 1.3)also in Donald's page.It allows to correct hue,bright,contrast,saturation.
#Example:
Tweak(hue=-10,bright=-9,cont=1.15,sat=0.84)
For more details on how it works, read the html included with the filters
I hope that can help you
ARDA
scorchED
1st June 2002, 10:39
thank you very much ARDA for this detailed reply. thats all the knowledge i wanted for the praxis.
but in theorie there are some unknown things for me in color conversion between YV12 (MPEG2) and YUV2 (AVISynth). How much is the difference in theory between the colors (same as chroma?), luma, contrast and so on by converting YV12 to YUV2?
I noticed that in my combo "mpeg2dec.dll->AVISynth->VDub->XViD" the colors are fading out or/and the pictures are darker than in the original DVD-movie.
i ripped some movies more times to find some good settings to get original colors and brightness. The following script in AVISynth helped a little bit:
Levels(0,1.1,255,5,255)
Tweak(cont=1.2)
but it is not like 100% original. This works best when i choose RGB-PC scaled in DVD2AVI color-menue.
For finding best setting i have to know more about the backround how colors are changing by YV12 to YUV2.
is there somebody out there who can give me some theoretically lessons?:confused:
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.