Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
16th November 2015, 11:54 | #5 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
http://forum.doom9.org/showthread.php?t=172490
guess the problem is the same like this |
16th November 2015, 15:29 | #7 | Link |
Retried Guesser
Join Date: Jun 2012
Posts: 1,373
|
Code:
## requires MaskTools2 ## http://manao4.free.fr/mt_masktools.html ## kill color streaking at top of a VHS transfer ## http://forum.doom9.org/showthread.php?p=1647675#post1647675 ChromaDestripe(top=80, blur=6) ## Masked smoother for anime ## http://avisynth.nl/index.php/Msmooth MSmooth(threshold=10, strength=2) EDIT those links again: http://manao4.free.fr/mt_masktools.html http://forum.doom9.org/showthread.ph...75#post1647675 http://avisynth.nl/index.php/Msmooth Last edited by raffriff42; 16th November 2015 at 15:34. |
16th November 2015, 21:28 | #9 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
RaffRiff already gave you the link:- http://forum.doom9.org/showthread.ph...75#post1647675
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
17th November 2015, 03:10 | #10 | Link |
Registered User
Join Date: Apr 2002
Posts: 74
|
Yuy2
raffriff42, do you have a YUY2 version of ChromaDestripe?
This ChromaDestripe function makes me want to re-do my VHS transfers since they all have the same problems with the stripes at the top.
__________________
Intel Core i5-4250U, 8 GB Ram, Intel HD 5000 |
17th November 2015, 05:26 | #11 | Link |
Retried Guesser
Join Date: Jun 2012
Posts: 1,373
|
OK this seems to work:
Code:
####################################### ## try to remove horizontal chroma stripes ## ## @ top - number of pixels (from top) to process (default 160) ## @ blur - vertical chroma blur radius (default 12) ## @ thresh - ignore smaller chroma changes (default 6) ## ## v0.42.02 16-Nov-2015 support YV24, YV16 and YUY2 ## function ChromaDestripe(clip C, int "top", int "blur", int "thresh") { Assert(C.IsYV12 || C.IsYV24 || C.IsYV16 || C.IsYUY2, \ "ChromaDestripe: source must be YV12, YV24, YV16 or YUY2") top = Max(0, Default(top, 160)) blur = Min(Max(2, Default(blur, 12)), 16) thresh = Min(Max(0, Default(thresh, 6)), 32) isYV12 = C.IsYV12 U = C.UToY8 V = C.VToY8 Y = C.ConvertToY8 #return U tw = V.Width th = V.Height ## X = (highpass blurred anti-signal) xh = Max(1, Round(th / (isYV12 ? 4 : 16))) XU=U.BilinearResize(tw, xh, src_top=1, src_height=(th-2)) \ .BilinearResize(tw, th) XV=V.BilinearResize(tw, xh, src_top=1, src_height=(th-2)) \ .BilinearResize(tw, th) #return XU ## H = highpass - find bold horizontal U & V edges HU=U.Subtract(XU).Invert.ColorYUV(cont_y=98) HV=V.Subtract(XV).Invert.ColorYUV(cont_y=98) #return HU.Histogram ## M = mask - pass only areas with bold hor. U & V edges MU=HU.mt_lut("x 128 - abs " + String(thresh) + " - 512 * ") MV=HV.mt_lut("x 128 - abs " + String(thresh) + " - 512 * ") #return MU MU=MU.mt_expand \ .BilinearResize(tw/4, th/4) \ .mt_expand.mt_expand \ .BilinearResize(tw, th) MV=MV.mt_expand \ .BilinearResize(tw/4, th/4) \ .mt_expand.mt_expand \ .BilinearResize(tw, th) #return MU ## restrict mask to "top" pixels top = (isYV12 ? top / 2 : top) MU = (top<=0 || top>=th) \ ? MU \ : MU.Crop(0, 0, -0, top).AddBorders(0, 0, 0, (th-top)) MV = (top<=0 || top>=th) \ ? MV \ : MV.Crop(0, 0, -0, top).AddBorders(0, 0, 0, (th-top)) #return MU ## B = chroma blur nh = Max(1, Round(th / blur)) / (isYV12 ? 1 : 2) BU=U.BilinearResize(tw, nh, src_top=1, src_height=(th-2)) \ .BilinearResize(tw, th) BV=V.BilinearResize(tw, nh, src_top=1, src_height=(th-2)) \ .BilinearResize(tw, th) #return BU ## use blurred chroma in areas of high variation U=U.Overlay(BU, mode="blend", opacity=1.0, mask=MU) #return U V=V.Overlay(BV, mode="blend", opacity=1.0, mask=MV) YToUV(U, V, Y) return (C.IsYUY2) ? ConvertToYUY2 : Last } |
17th November 2015, 18:03 | #12 | Link |
Registered User
Join Date: Aug 2010
Posts: 47
|
@StainlessS sorry my bad
Thanks raffriff42. I have add this ChromaDestripe to plugin directory as avsi file but now it display there is no function named "UtoY8" even after i used ConvertToYV12 after using AVISource ? video info: Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits |
Thread Tools | Search this Thread |
Display Modes | |
|
|