View Full Version : How can I apply deblocking to the chroma planes?
Chainmax
24th May 2007, 23:17
I have some crappy DVDs that I want to use DeBlock() on both the luma and chroma, how would I go about doing it?
Terranigma
24th May 2007, 23:33
I have some crappy DVDs that I want to use DeBlock() on both the luma and chroma, how would I go about doing it?
By using deblock with MVTools via MVAnalyse & MVMask?
Edit. Can you test this?
function MVDeblock(clip c,int "delta",int "dct",int "lambda",int "ml",bool "ipp",int "cpu",int "quant"){
c
delta=default(delta,1)
dct=default(dct,0)
lambda=default(lambda,1000)
ml=default(ml,50)
ipp=default(ipp,false)
cpu=default(cpu,4)
quant=default(quant,6)
frames = c
Analysis = frames.MVAnalyse(isb=false, delta=delta,pel=2,overlap=8/2,lambda=lambda,dct=dct)
compensation = frames.MVCompensate(Analysis)
blurred = compensation.BlindPP(ipp=ipp,cpu=cpu,quant=quant)
mask = frames.MVMask(Analysis, kind = 2, ml=ml)
maskedmerge(compensation, blurred, mask)}
It probably doesn't do anything, i'll test it myself when I get time :D
Chainmax
25th May 2007, 02:34
I was thinking more along the lines of MaskToolsv1's YtoUV or something like that, but I'll try to test your function tomorrow and report back.
Terranigma
25th May 2007, 16:21
I was thinking more along the lines of MaskToolsv1's YtoUV or something like that, but I'll try to test your function tomorrow and report back.
My function kills details, so it's no good. Maybe someone with more experience can clean/fix it. Chainmax, if you figure out how to deblock this way without destroying details, let me know. :)
foxyshadis
26th May 2007, 03:56
FitYtoUV and related functions are masktools, but UtoY and VtoY (presumably followed by YtoUV) are part of avisynth.
Chainmax
28th May 2007, 01:50
I see. So, would the correct way be something like this
DeBlock()
UtoY().VtoY().DeBlock().YtoUV()
then?
scharfis_brain
28th May 2007, 02:00
uhm NO.
in=last
y=in.greyscale().deblock() # luma
u=in.utoy().deblock() #chroma u
v=in.vtoy().deblock() # chroma v
out=ytouv(u,v,y)
Chainmax
28th May 2007, 03:13
Thanks :). Could you please explain me why was I wrong and how does your suggestion work so that I can learn the principle behind it?
Thanks :). Could you please explain me why was I wrong and how does your suggestion work so that I can learn the principle behind it?
UtoY() # Copy U plane to luma plane
VtoY() # Overwrite U plane in lume plane with V plane
DeBlock() # Deblock V stored in the luma plane
YtoUV() # Overwrite U and V plane with the deblocked V plane
So what you basically do is overwrite the U plane with the deblocked V plane, which will totally mess up your colors...
Didée
28th May 2007, 11:11
Deja vu (http://forum.doom9.org/showthread.php?p=942842#post942842).
Deblock() . does . deblock . chroma . natively.
Period.
scharfis_brain
28th May 2007, 11:33
Oh, LOL. I didn't thought about that. (Though I never use deblock() )
I just assumed the function as luma-only placeholder.
So I wrote something around it without really knowing what it does.
Chainmax
28th May 2007, 22:29
I had forgotten about that thread :o.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.