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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 14th December 2005, 22:33   #61  |  Link
Chainmax
Huh?
 
Chainmax's Avatar
 
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
Yeah, the halos in that stream are just too strong for DeHalo_Alpha's current state. Here's a comparison:

Source:


Result:



Script:
Code:
DeDot()
ConvertToYUY2(interlaced=true)
ReYV12()
Interp = SeparateFields().SelectEven().EEDI2(field=0)
TDeint(order=0,field=0,edeint=Interp)
MergeChroma(Crop(0,2,-12,0).AddBorders(12,0,0,2))
Crop(16,4,688,558,align=true)
DeHalo_Alpha(rx=2.5,ry=2.5,darkstr=1.2,brightstr=1.2)
M=DePanEstimate(PixAspect=1.094,Trust=1.0)
R=2
DePanInterleave(Data=M,PixAspect=1.094,Prev=R,Next=R,Mirror=15)
DeGrainMedian(limitY=6,limitUV=8,mode=0)
TemporalSoften(2,0,50,mode=2)
SelectEvery(R+R+1,R)
GaussResize(512,384,p=100)
DeHalo_Alpha(rx=2.5,ry=2.5,darkstr=1.2,brightstr=1.2)
LimitedSharpen(SMode=4,LMode=3,Strength=150,wide=true,soft=75)
The final encode is intended to be 512x384, but for comparison's sake I made the result the same frame size as the source. By the way, is it me or does this have some blending?
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it.

Last edited by Chainmax; 14th December 2005 at 22:36.
Chainmax is offline   Reply With Quote
Old 15th December 2005, 18:02   #62  |  Link
krieger2005
Registered User
 
krieger2005's Avatar
 
Join Date: Oct 2003
Location: Germany
Posts: 377
Heavy halos... I used my script, which i use for my own encodes and the result is this (no smoother... only my own dehalo-script):



what do you think?
krieger2005 is offline   Reply With Quote
Old 15th December 2005, 18:25   #63  |  Link
Chainmax
Huh?
 
Chainmax's Avatar
 
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
The result is quite good, could you post your dehalo script?
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it.
Chainmax is offline   Reply With Quote
Old 15th December 2005, 18:40   #64  |  Link
krieger2005
Registered User
 
krieger2005's Avatar
 
Join Date: Oct 2003
Location: Germany
Posts: 377
Don't be shocked. It is frickled and modiefied thorugh the time... And very slow:
Code:
function CEA2(clip c, int "EdgeBias"){
EdgeBias = default(EdgeBias,17)

# First remove oversharpened Borders...
c
ConvertToYUY2().FixVHSOversharpL(30,12,8).FixVHSOversharp(30,14,10).ConvertToYV12()
BlindDeHalo3(PPmode=1)
oversharp=last

pT=PreWitt(thin=true)
pT1=FineEdge(EdgeBias)
pT2=pT1.Levels(10,1,110,0,255,false)

FineMask=pT2.Expand().Inpand().Inpand().Inpand().Levels(50,1,160,0,255,false).expand().inflate().inpand()
StrongMask=pT2.Inpand().BilinearResize(m4(width/3.0),m4(height/3.0)).InPand().Expand().BilInearResize(width,height).Expand().Levels(0,1,30,0,255,false)
Fine=YV12LutXY(pT2,FineMask,"y 10 > x 0 ?")
Fine=YV12LutXY(Fine,StrongMask,"y 10 > 0 x ?")

edgeA=pT1
edgeB=edgeA.Levels(30,1,90,0,255,false)
edgeC=edgeB.BilinearResize(m4(width()/4),m4(height()/4)).expand().inflate().BilinearResize(width(),height())
ptTMP=YV12LutXY(pt,edgeA,"x 10 > y 40 > & x 0 ?")
edgeD=YV12LUTxy(edgeC,ptTMP,"y 0 > x 10 > & 0 x 1.3 * ?")

edgeE1=YV12LUTxy(edgeD,Fine,"y 0 > x 20 > & x y 1.3 * - x ?").deflate()
edgeE1=edgeE1.Levels(0,1,150,0,255,false).inflate()
edgeE2=YV12LutXY(ptTMP.inflate(),Fine,"y 0 > x 20 > & x y 1.3 * - x ?").inflate()
edgeE3=YV12LutXY(edgeB,FineMask,"y 10 < x 0 ?").inflate

# Now the Cleaning
# Attention: Cleaning of c, not oversharpened

c
# Clean The Edges
clean=Deflate().Inflate().BlindDeRingA(5,5,2,20,true,false,false)
clean=clean.Blockbuster(method="noise", detail_min=1, detail_max=32, mean=1, variance=2)
MaskedMerge(clean,EdgeE1,Y=3,V=1,U=1)

clean=last
clean=clean.UnSharpMask(250,1,0)
clean=clean.Blur(.2)
MaskedMerge(clean,edgeE2,Y=3,V=1,U=1)

anti=GetAntialiaseClip()
MaskedMerge(anti,edgeE3,Y=3,V=1,U=1)

#MaskedMerge(UnSharpMask(50,1,0),FineMask,Y=3,V=1,U=1)
}


function GetAntialiaseClip(clip c, bool "chroma"){
chroma = default(chroma,false)
faktor = 1.7
SangOrder=0
SangFakt1=90
SangFakt2=90

X=width(c)
Y=height(c)

Lanczos4Resize(c,m4(X*faktor),m4(Y*faktor))
TurnLeft().SangNom(SangOrder,SangFakt1)
TurnRight().SangNom(SangOrder,SangFakt2)

BilinearResize(X,Y)
sangnommed=last

chroma ? MergeChroma(c) : sangnommed
return last
}
I uses several filters: Fixoversharp, BlindDehalo, Sangnom,Masktools, FineEdge, BlindDeRing. BlindDering is a filter which i coded by myself. You can get it here: link. Here i wrote abouth this filter: forum-link

The general purpose is to build up a mask on a dehalod picture and use this mask to dehalo it with "blinddering". I tried to make here something like "don't remove-things, which are too file". General purpose is that even halos can't be removed blind when there are too many detail. So why should we try it?
Also look at "edgeC". This can be interpreted as "clean-radius". Bigger Value-> Bigger Radius. Till now i modified it for every movie individually.

maybe there is someone out there who can optimize this script.

BTW: It try also to antialliase (secure).

Last edited by krieger2005; 15th December 2005 at 18:43.
krieger2005 is offline   Reply With Quote
Old 15th December 2005, 20:18   #65  |  Link
Chainmax
Huh?
 
Chainmax's Avatar
 
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
You should replace BlindDeHalo with DeHalo_Alpha, it's much better.
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it.
Chainmax is offline   Reply With Quote
Old 2nd January 2006, 01:38   #66  |  Link
FredThompson
Registered User
 
FredThompson's Avatar
 
Join Date: Feb 2002
Location: Charlotte, NC USA
Posts: 1,984
Quote:
Originally Posted by Chainmax
The letters look much better, they are bright and white, not yellowish and dull . Coming up soon: my ultimate test, small detail handling with an X-Men VHS capture.
What happened to the source frame?
__________________
Reclusive fart.
Collecting Military, Trains, Cooking, Woodworking, Fighting Illini, Auburn Tigers
FredThompson is offline   Reply With Quote
Old 31st January 2006, 01:36   #67  |  Link
HOLiC
Registered User
 
Join Date: Jan 2006
Posts: 32
is there dehalo_alpha version for masktools 2.0?
HOLiC is offline   Reply With Quote
Old 31st January 2006, 01:43   #68  |  Link
Chainmax
Huh?
 
Chainmax's Avatar
 
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
FredThompson, what do you mean?

HOLiC, not for now, but a modification is probably easy to do, just ask Didée if he has the time do it.
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it.
Chainmax is offline   Reply With Quote
Old 31st January 2006, 02:09   #69  |  Link
FredThompson
Registered User
 
FredThompson's Avatar
 
Join Date: Feb 2002
Location: Charlotte, NC USA
Posts: 1,984
There was a broken link in an earlier post. Your source frame wasn't showing or you'd forgotten to add it to the post or something like that.
__________________
Reclusive fart.
Collecting Military, Trains, Cooking, Woodworking, Fighting Illini, Auburn Tigers
FredThompson is offline   Reply With Quote
Old 31st January 2006, 05:46   #70  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,556
Code:
function DeHalo_alpha(clip clp, float "rx", float "ry", float "darkstr", float "brightstr", float "lowsens", float "highsens", float "ss")
{
rx        = default( rx,        2.0 )
ry        = default( ry,        2.0 )
darkstr   = default( darkstr,   1.0 )
brightstr = default( brightstr, 1.0 )
lowsens   = default( lowsens,    50 )
highsens  = default( highsens,   50 )
ss        = default( ss,        1.5 )

LOS = string(lowsens)
HIS = string(highsens/100.0)
DRK = string(darkstr)
BRT = string(brightstr)
ox  = clp.width()
oy  = clp.height()
uv  = 1
uv2 = (uv==3) ? 3 : 2

halos  = clp.bicubicresize(m4(ox/rx),m4(oy/ry)).bicubicresize(ox,oy,1,0)
are    = mt_lutxy(clp.mt_expand(U=uv,V=uv),clp.mt_inpand(U=uv,V=uv),"x y -","x y -","x y -",U=uv,V=uv)
ugly   = mt_lutxy(halos.mt_expand(U=uv,V=uv),halos.mt_inpand(U=uv,V=uv),"x y -","x y -","x y -",U=uv,V=uv)
so     = mt_lutxy( ugly, are, "y x - y 0.001 + / 255 * "+LOS+" - y 256 + 512 / "+HIS+" + *" )
lets   = mt_merge(halos,clp,so,U=uv,V=uv)
remove = (ss==1.0) ? clp.repair(lets,1,0) 
          \        : clp.lanczosresize(m4(ox*ss),m4(oy*ss))
          \             .mt_logic(lets.mt_expand(U=uv,V=uv).bicubicresize(m4(ox*ss),m4(oy*ss)),"min",U=uv2,V=uv2)
          \             .mt_logic(lets.mt_inpand(U=uv,V=uv).bicubicresize(m4(ox*ss),m4(oy*ss)),"max",U=uv2,V=uv2)
          \             .lanczosresize(ox,oy)
them   = mt_lutxy(clp,remove,"x y < x x y - "+DRK+" * - x x y - "+BRT+" * - ?",U=2,V=2)

return( them )
}

function m4(float x) {return(x<16?16:int(round(x/4.0)*4))}
Standard disclaimer: May show gigantic bugs in masktools 2. Always use the latest alpha and always compare to the original.

If my mod starts showing results I'll post it too; right now it's not that much better. Don't work on it much though.
foxyshadis is offline   Reply With Quote
Old 31st January 2006, 06:05   #71  |  Link
HOLiC
Registered User
 
Join Date: Jan 2006
Posts: 32
thanks chainmax! and thank you foxyshadis!!

I can't wait to try this version...^^
HOLiC is offline   Reply With Quote
Old 31st January 2006, 09:16   #72  |  Link
Lil' Jer
Registered User
 
Join Date: Jan 2006
Posts: 156
Quote:
Originally Posted by foxyshadis
Standard disclaimer: May show gigantic bugs in masktools 2. Always use the latest alpha and always compare to the original.

If my mod starts showing results I'll post it too; right now it's not that much better. Don't work on it much though.
Seems to give identical results. From Porco Rosso R2 version:

Source:



DeHalo_Alpha(darkstr=.4) (old version):



DeHalo_Alpha(darkstr=.4) (Masktools 2):

Lil' Jer is offline   Reply With Quote
Old 30th April 2006, 22:42   #73  |  Link
gatekeeper_007
The fish knows everything
 
gatekeeper_007's Avatar
 
Join Date: Oct 2005
Location: Greece
Posts: 63
1st I'd like to say: Keep up the good work !

and then I'd like to ask a silly question...

well, sometimes I like to over do it with the compression
and as a result of that I get some film alterations__which I'm able to get rid of at the cost of very little detail-loss.
The only thing I can't get rid of (without a greater-loss of detail) is some mosquito noise which is the result of that low bitrate.
My question is:
I know//at least I think I do.... that 'BlindDehalo3' and 'Dehalo_alpha' are made so they can be used to correct some things in a (source), but I was wonderin' how stupid will it be to use something like PPmode=-1 or -2 on a clean source to correct my issue?

thx
NO I wont give higher bitrates
gatekeeper_007 is offline   Reply With Quote
Old 11th August 2006, 10:22   #74  |  Link
techmule
Registered User
 
Join Date: Aug 2005
Posts: 127
Any updates to the dehalo scripts.(both earlier and MVtool2 vers) ???
techmule is offline   Reply With Quote
Old 26th August 2006, 01:57   #75  |  Link
frednerk33
Registered User
 
Join Date: Jan 2006
Posts: 25
Seconding that... any updates or new approaches ? Guess could zip over to the Dev forum but haven't spotted anything in an occasional browse.
frednerk33 is offline   Reply With Quote
Old 28th August 2006, 15:15   #76  |  Link
MaXi_TK96
Registered User
 
Join Date: Aug 2005
Posts: 6
Don't forget that this filter can also remove haloing caused by some sharpener filters so that is one more use for this filter. Dunno if FFDshow has this kind of a filter but I could image it would be very handy. Many thanx to the Didee and foxyshadis for their work!
MaXi_TK96 is offline   Reply With Quote
Old 28th August 2006, 20:23   #77  |  Link
Chainmax
Huh?
 
Chainmax's Avatar
 
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
IIRC, Didée is was very busy with other projects (Restore24 being one of them) and hadn't thought of further improvements. What I'd like to see is a renewed version of HQDering as requested in this thread. That or a standalone version of IIP's deringing.
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it.
Chainmax is offline   Reply With Quote
Old 6th September 2006, 20:34   #78  |  Link
FredThompson
Registered User
 
FredThompson's Avatar
 
Join Date: Feb 2002
Location: Charlotte, NC USA
Posts: 1,984
where does the function "expand" live? I've updated a bunch of filters and this seems to have disappeared. I'm starting to wonder if AviSynth has a limit on the number of filters it will auto-load. warpsharp is pretty far down the alphabetical sort...
__________________
Reclusive fart.
Collecting Military, Trains, Cooking, Woodworking, Fighting Illini, Auburn Tigers

Last edited by FredThompson; 6th September 2006 at 20:44.
FredThompson is offline   Reply With Quote
Old 6th September 2006, 23:51   #79  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,556
2.5.6 does have a limit (a bug, really), and that's one reason I keep filters split between an auto and manual load folder. 2.5.7 has no such limit.

Expand is part of masktools 1.x.
foxyshadis is offline   Reply With Quote
Old 7th September 2006, 03:51   #80  |  Link
FredThompson
Registered User
 
FredThompson's Avatar
 
Join Date: Feb 2002
Location: Charlotte, NC USA
Posts: 1,984
2.5.7a3 dates back to April. Is the alpha aspect only additional things which aren't in 2.5.6?
__________________
Reclusive fart.
Collecting Military, Trains, Cooking, Woodworking, Fighting Illini, Auburn Tigers
FredThompson is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:38.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.