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 30th October 2011, 14:25   #1  |  Link
henryho_hk
Registered User
 
Join Date: Mar 2004
Posts: 889
How to tackle DV-like chroma artifacts

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 uploaded.

(I want to upload a screenshot but the forum is not accepting non-subsampled JPG.)

Last edited by henryho_hk; 30th October 2011 at 14:30.
henryho_hk is offline   Reply With Quote
Old 30th October 2011, 20:30   #2  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
Originally Posted by henryho_hk View Post
(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.
__________________
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 ???
StainlessS is offline   Reply With Quote
Old 30th October 2011, 22:19   #3  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,389
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)
Code:
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.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 1st November 2011, 00:54   #4  |  Link
henryho_hk
Registered User
 
Join Date: Mar 2004
Posts: 889
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()
henryho_hk is offline   Reply With Quote
Old 1st November 2011, 01:03   #5  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,843
You can try Vdub with its gamma smoother or AutoYUY2 filter.

This sample is terrible!

Last edited by kolak; 1st November 2011 at 01:29.
kolak is offline   Reply With Quote
Old 1st November 2011, 01:11   #6  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,389
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.)
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 11th December 2011, 01:11   #7  |  Link
henryho_hk
Registered User
 
Join Date: Mar 2004
Posts: 889
Is it a correct way to make the function field-order generic?

Code:
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()?
henryho_hk 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 16:04.


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