LaTo
12th September 2008, 19:45
Hi!
To be short, here is the sample:
SAMPLE (200ko) (http://latoninf.free.fr/div/sample.avi)
I have tried to solve this problem, but my solution is slow...
Here it is:
directshowsource("OP.mkv",fps=23.976)
luma = last
Uchr = luma.UtoY()
Vchr = luma.VtoY()
### DENOISING CHROMA USING LUMA VECTORS (remove most of the problem)
VECS = luma.pointresize(width/2,height/2).MVanalyseMulti(refframes=6,chroma=false)
uC = Uchr.MVDegrainMulti(VECS,refframes=6,thSAD=600)
vC = Vchr.MVDegrainMulti(VECS,refframes=6,thSAD=600)
### MAKE MASK & AJUSTING THRESHOLD (preserve the other part of the picture)
thr = string(8)
uD = mt_makediff(uC,Uchr).mt_lut("x 128 "+thr+" - < 255 x 128 "+thr+" + > 255 0 ? ?",U=1,V=1)
vD = mt_makediff(vC,Vchr).mt_lut("x 128 "+thr+" - < 255 x 128 "+thr+" + > 255 0 ? ?",U=1,V=1)
### LIMIT CHROMA SATURATION & AJUSTING STRENGTH (try to solve the problem without strong denoising)
str = string(0.5)
uL = Uchr.mt_lut("x 128 - "+str+" * 128 +",U=1,V=1)
vL = Vchr.mt_lut("x 128 - "+str+" * 128 +",U=1,V=1)
### SWAP UV + INVERT -OR- UL/VL -OR- MVDEGRAINED CLIP ???
uFIX = mt_merge(Uchr,Vchr.Invert(),uD)
#uFIX = mt_merge(Uchr,uL,uD)
#uFIX = mt_merge(Uchr,uC,uD)
vFIX = mt_merge(Vchr,Uchr.Invert(),vD)
#vFIX = mt_merge(Vchr,vL,vD)
#vFIX = mt_merge(Vchr,vC,vD)
YToUV(uFIX, vFIX, luma)
Maybe some people can help, with good ideas it's surely possible to make a better script :script:
Thanks.
To be short, here is the sample:
SAMPLE (200ko) (http://latoninf.free.fr/div/sample.avi)
I have tried to solve this problem, but my solution is slow...
Here it is:
directshowsource("OP.mkv",fps=23.976)
luma = last
Uchr = luma.UtoY()
Vchr = luma.VtoY()
### DENOISING CHROMA USING LUMA VECTORS (remove most of the problem)
VECS = luma.pointresize(width/2,height/2).MVanalyseMulti(refframes=6,chroma=false)
uC = Uchr.MVDegrainMulti(VECS,refframes=6,thSAD=600)
vC = Vchr.MVDegrainMulti(VECS,refframes=6,thSAD=600)
### MAKE MASK & AJUSTING THRESHOLD (preserve the other part of the picture)
thr = string(8)
uD = mt_makediff(uC,Uchr).mt_lut("x 128 "+thr+" - < 255 x 128 "+thr+" + > 255 0 ? ?",U=1,V=1)
vD = mt_makediff(vC,Vchr).mt_lut("x 128 "+thr+" - < 255 x 128 "+thr+" + > 255 0 ? ?",U=1,V=1)
### LIMIT CHROMA SATURATION & AJUSTING STRENGTH (try to solve the problem without strong denoising)
str = string(0.5)
uL = Uchr.mt_lut("x 128 - "+str+" * 128 +",U=1,V=1)
vL = Vchr.mt_lut("x 128 - "+str+" * 128 +",U=1,V=1)
### SWAP UV + INVERT -OR- UL/VL -OR- MVDEGRAINED CLIP ???
uFIX = mt_merge(Uchr,Vchr.Invert(),uD)
#uFIX = mt_merge(Uchr,uL,uD)
#uFIX = mt_merge(Uchr,uC,uD)
vFIX = mt_merge(Vchr,Uchr.Invert(),vD)
#vFIX = mt_merge(Vchr,vL,vD)
#vFIX = mt_merge(Vchr,vC,vD)
YToUV(uFIX, vFIX, luma)
Maybe some people can help, with good ideas it's surely possible to make a better script :script:
Thanks.