View Full Version : How to tackle DV-like chroma artifacts
henryho_hk
30th October 2011, 14:25
I came across an interlaced DVD footage with NTSC DV 4:1:1 like artifact in the blue color (mostly).
I tried to use Reinterpolate411() with mpeg2source(... UpConv=1 ...). It helps a lot but there is still quite a bit left behind. Also, I prefer not to have YUY2 in the workflow.
Is there any way to smooth the chroma channel horizontally?
Sample (http://www.sendspace.com/file/f3vki1) uploaded.
(I want to upload a screenshot but the forum is not accepting non-subsampled JPG.)
StainlessS
30th October 2011, 20:30
(I want to upload a screenshot but the forum is not accepting non-subsampled JPG.)
I recently tried to upload a pic attachment without success,
error message something like "Not a valid image file" for about
5 or 6 differing formats of same image, jpg, png etc.
Eventually created account on PhotoBucket.com and used
insert image.
Didée
30th October 2011, 22:19
Affected is the blue channel of RGB space, but there's another catch: it seems that it's only footage of one certain of several cameras. (Split in R'G'B', and look at the 2nd half of the sample: only the background is affected. On the songstress in the foreground, the blue channel is clean.)
For that reason, I probably would not go for RGB:Blue processing, but rather for YUV:UV processing. The improvement is still good, and there's less risk to lose important data in not-affected sections.
Spaghetti-code: (using NNEDI3, Masktools and RemoveGrain/Repair)
mpeg2source("VTS_04_VOBID_001_CELLID_011_1.demuxed_cut.d2v")
o=last
fields=o.separatefields().turnleft()
fields.nnedi3(field=-2)
merge(selecteven(),selectodd())
d1=mt_makediff(fields,last,Y=2,U=3,V=3)
d2=mt_makediff(last,last.removegrain(0,20),Y=2,U=3,V=3)
last.mt_adddiff(d2.repair(d1,0,12).mt_lutxy(d1,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?",Y=2,U=3,V=3),Y=2,U=3,V=3)
turnright().assumefieldbased().assumebff().weave()
o.mergechroma(last)
stackvertical(o,last)
#bob(0,0) # just to check it out
return(last)
Seems okay to my eyes.
henryho_hk
1st November 2011, 00:54
Thank you very much, Didée. I will try to modify the code to
(1) generalize the "assumebff()" call
(2) see if it will run faster using utoy() and perhaps utov()
kolak
1st November 2011, 01:03
You can try Vdub with its gamma smoother or AutoYUY2 filter.
This sample is terrible!
Didée
1st November 2011, 01:11
Oh - I forgot that NNEDI3 has all three plane parameters available. Just add ",Y=false" the the NNEDi3 call, and there's no need to fiddle with UtoY etc. The masktools part is already working on chroma exclusively.
(and was wondering, too, about an NTSC video actually being BFF.)
henryho_hk
11th December 2011, 01:11
Is it a correct way to make the function field-order generic?
function fix_UV(clip c)
{
p=c.getparity()
fields=c.separatefields().turnleft()
fields.nnedi3(field=-2,Y=false)
merge(selecteven(),selectodd())
d1=mt_makediff(fields,last,Y=2,U=3,V=3)
d2=mt_makediff(last,last.removegrain(0,20),Y=2,U=3,V=3)
last.mt_adddiff(d2.repair(d1,0,12).mt_lutxy(d1,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?",Y=2,U=3,V=3),Y=2,U=3,V=3).turnright().assumefieldbased()
c.mergechroma((p ? last.assumetff() : last.assumebff()).weave())
#stackvertical(last,c)
#bob(0,0) # just to check it out
return(last)
}
btw, should the function be used before or after TGMC()/QTGMC()?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.