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. |
3rd September 2014, 20:22 | #1 | Link |
Anime addict
Join Date: Feb 2009
Location: Spain
Posts: 673
|
Chroma Blending
Hi all, I am trying deinterlace a NTSC source but I get video with this artefact:
My code used is: Code:
DGDecode_mpeg2source("E:\Dragon Ball\DB_5\026\VideoFile.d2v", info=3) assumebff() tfm(order=0,pp=6,mode=4).tdecimate(mode=1) Thanks in advance.
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Radeon RX580 8GB DDR5 + ADATA SX8200 Pro 1 TB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite Last edited by Overdrive80; 14th September 2014 at 21:45. |
3rd September 2014, 21:17 | #2 | Link |
Registered User
Join Date: Sep 2013
Posts: 16
|
That's ghosting, there isn't really much you can do about it other than weakening the ghosting using mdegrain2 (or 3).
This is caused by temporal post-procesing done by the studio. Don't try to force it with something destructive like ghostbusters (also yuy2 only) because that won't end well. Icould also just be totally wrong and it could just be a simple case of blends (seeing as chroma is affected too. |
3rd September 2014, 21:27 | #3 | Link |
Anime addict
Join Date: Feb 2009
Location: Spain
Posts: 673
|
If I use separatefields, this artefact still is it but all blending frames can be replaced for backward and forward frame.
Is there any filter that do it?? I have trying srestore but dont work.
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Radeon RX580 8GB DDR5 + ADATA SX8200 Pro 1 TB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite |
3rd September 2014, 21:44 | #4 | Link |
Registered User
Join Date: Sep 2013
Posts: 16
|
Yes then they're just plain blends, honestly I'm not experienced enough with blends to give proper advice on how to take care of them.
But I can direct you to combmask which (like the name states) makes a mask of the comb based on the isCombed() algo. Combmask allong with daa3 should do a better job than pp=6 in tfm (so I suggest u set it to 0 and let daa3 do the work). Also I don't think there's such filter out there that replaces the combed frames with the last or next frame as it could lead to some nasty errors. |
3rd September 2014, 22:44 | #5 | Link |
Anime addict
Join Date: Feb 2009
Location: Spain
Posts: 673
|
had try this:
Code:
DGDecode_mpeg2source("E:\Dragon Ball\DB_5\026\VideoFile.d2v", info=3) assumebff() tfm(order=0,pp=0,mode=5).tdecimate(mode=1) video=last mask=video.combmask() last=video.mcdaa3() mt_merge(last, video, mask)
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Radeon RX580 8GB DDR5 + ADATA SX8200 Pro 1 TB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite Last edited by Overdrive80; 3rd September 2014 at 22:48. |
3rd September 2014, 22:46 | #6 | Link |
Registered User
Join Date: May 2005
Posts: 1,462
|
Are you sure the ghosting is in the source, and not the result of some temporal frame-inaccuracy or some such? For test, I'd try this too:
Code:
SetMemoryMax(768) SetMTMode(5,4) DGDecode_mpeg2source("E:\Dragon Ball\DB_5\026\VideoFile.d2v", info=3) SetMTMode(3) assumebff() tfm(order=0,pp=6,mode=4).tdecimate(mode=1)
__________________
Gorgeous, delicious, deculture! |
3rd September 2014, 23:19 | #7 | Link |
Anime addict
Join Date: Feb 2009
Location: Spain
Posts: 673
|
With this I get same result that shows here
Code:
DGDecode_mpeg2source("E:\Dragon Ball\DB_5\026\VideoFile.d2v", info=3) assumebff() TFM(mode=4).Tdecimate().Vinverse() The code that you post is same than my first post.
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Radeon RX580 8GB DDR5 + ADATA SX8200 Pro 1 TB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite |
3rd September 2014, 23:56 | #8 | Link |
ангел смерти
Join Date: Nov 2004
Location: Lost
Posts: 9,558
|
This is what happens when you treat interlaced chroma as progressive. I've tried lots of fixes, and unfortunately, I can't get SRestore's double-blend detection to work on this at all. You can manually fix the chroma, since the framerate is so low, but that's a real pain. The luma is completely untouched by blending, so that's a relief at least.
The combing isn't a problem at all, the fields aren't combed at all, just the chroma in many is blended. It's a bad IVTC on the studio side. |
4th September 2014, 00:20 | #9 | Link |
Anime addict
Join Date: Feb 2009
Location: Spain
Posts: 673
|
Honestly, I dont know how manually fix it. I tried minimize the impact of this artifact withi this code:
Code:
DGDecode_mpeg2source("E:\Dragon Ball\DB_5\026\VideoFile.d2v", info=3) assumebff() TFM(mode=4).Tdecimate(mode=1).Vinverse() Mergechroma(awarpsharp2(depth=16,thresh=255,blur=3,chroma=6).aWarpSharp2(depth=-4,chroma=2).MergeLuma(blur(0.1)).aWarpSharp2(depth=16,chroma=6)) fft3dfilter(sigma=2,plane=3,degrid=1)
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Radeon RX580 8GB DDR5 + ADATA SX8200 Pro 1 TB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite |
4th September 2014, 06:00 | #10 | Link |
Registered User
Join Date: Dec 2011
Posts: 354
|
If you're using TFM(), no need to call AssumeBFF or AssumeTFF. Order argument set it.
Code:
DGDecode_mpeg2source("E:\Dragon Ball\DB_5\026\VideoFile.d2v", info=3) TFM(chroma=true) # Sample you posted was TFF srestore(omode=4) TDecimate(chroma=false,mode=1) It works good on one blended frame. Can't fix two consistent blended frames but TDecimate(chroma=false,mode=1) do the trick, which decimates one of two blended frames. EDIT: If you set chroma=true on TDecimate, those 2 blended frames won't be decimated. EDIT: You may want to change thresh value of srestore() for more accurate blend detection. I think default value works ok. Last edited by bxyhxyh; 4th September 2014 at 09:21. |
4th September 2014, 11:09 | #12 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
luma = tfm(pp=0, slow=2)
chroma = vinverse().Srestore(omode="PP3", cache=10) # manual sync: figure out which frame (previous,current aka p,c) of 'chroma' clip is most similar to current frame of 'luma' clip # 46*log(|x-y|+1) uses the full [0,255]-range and scales little differences better than |x-y|*2 diffp = mt_lutxy(luma,chroma.selectevery(1,-1),"x y - abs 1 + log 46 *") diffc = mt_lutxy(luma,chroma, "x y - abs 1 + log 46 *") # average difference between compared frames mp = mt_lutf(diffp,diffp,"avg",expr="x") mc = mt_lutf(diffc,diffc,"avg",expr="x") # build conditional masks based on the caculated comparisons maskp = mt_lutxy(mp,mc,"x y < 255 0 ?") # finally merge the luma of the tfm with the chroma of the srestore clip accordingly to the binary mask MergeChroma(luma,chroma).mt_merge(chroma.selectevery(1,-1),maskp,luma=true,Y=2,U=3,V=3) |
4th September 2014, 18:14 | #13 | Link |
Anime addict
Join Date: Feb 2009
Location: Spain
Posts: 673
|
@Feisty2 At your feet!!! Your script is great and works nice. I would like to have such insight about avisynth as you for understanding the code. Thank you so much.
EDIT: For Decimate I use decimate(cycle=5,quality=0), and result video is incredible.
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Radeon RX580 8GB DDR5 + ADATA SX8200 Pro 1 TB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite Last edited by Overdrive80; 4th September 2014 at 23:24. |
4th September 2014, 22:07 | #14 | Link | |
ангел смерти
Join Date: Nov 2004
Location: Lost
Posts: 9,558
|
Quote:
Comparing the luma and chroma edges to match frames is absolutely brilliant though. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|