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 > VirtualDub, VDubMod & AviDemux

Reply
 
Thread Tools Search this Thread Display Modes
Old 19th October 2020, 00:03   #1  |  Link
Dwedit
Registered User
 
Join Date: Sep 2020
Posts: 8
Chroma Problem with Inverse Telecine filter (IVTC)

I am seeing an issue with the Inverse Telecine filter.

Original clip (mpeg-2 in MKV file, 10 frames long, ~300K)

I have loaded the clip, added one Filter: IVTC
Field assembly mode: Reduce Frame Rate
Field mode: Autodetect
Pattern phase: Adaptive

When I go to Frame 6, I get this:

Input frame:


Output frame:


Supposed to be this:


I'm getting clean field-matched Luma, but getting the Chroma from a combed frame instead.
Dwedit is offline   Reply With Quote
Old 19th October 2020, 02:34   #2  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,373
This occurs because vdub/vdub2's IVTC filter works in 422 . The 420 => 422 chroma upsampling is performed in a progressive fashion, not interlaced aware. That produces those chroma artifacts

I don' t know of any internal vdub2 workaround. The alias format, convert, and decode options don't have interlace aware options. You need something equivalent to avisynth's ConvertToYUY2(interlaced=true) , or ConvertToYV16(interlaced=true). Or vdub2's IVTC filter needs to be reworked to support 4:2:0, or some proper intermediate conversion routine needs to be added

If you feed an avs script to vdub2 (with ConvertToYUY2(interlaced=true) ) it will work . (But if you were using avisynth, you might as well IVTC in the original YV12 in avisynth and skip vdub2 altogether in the first place)
poisondeathray is offline   Reply With Quote
Old 19th October 2020, 02:45   #3  |  Link
Dwedit
Registered User
 
Join Date: Sep 2020
Posts: 8
I've been hunting around for a good inverse telecine engine, because this DVD doesn't have a consistent 3-2 pattern throughout the whole episode, it changes many times.

I just tried changing the color space to RGB888, but it still does the same thing with chroma.
Dwedit is offline   Reply With Quote
Old 19th October 2020, 02:54   #4  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,373
Quote:
Originally Posted by Dwedit View Post
I've been hunting around for a good inverse telecine engine, because this DVD doesn't have a consistent 3-2 pattern throughout the whole episode, it changes many times.
avisynth - TIVTC is an adaptive field matcher , and has many options, overrides


Quote:
I just tried changing the color space to RGB888, but it still does the same thing with chroma.
If you use "show image formats" checked, you will see the filter works in 422 , but you're sending it 420 (all DVD's are 420) . That's the problem.

If you upsample it correctly (ie. resize the chroma planes in an interlaced aware fashion), it will work in vdub2 IVTC without the chroma artifacts. I don't know of a workaround in internal vdub2 only

There is no need to upsampling in avisynth, because TIVTC can work with the original 420 format
poisondeathray is offline   Reply With Quote
Old 19th October 2020, 03:14   #5  |  Link
Dwedit
Registered User
 
Join Date: Sep 2020
Posts: 8
I tried TIVTC, but I was getting some artifacts. Some frames had a single field enlarged to fill the whole frame, at half vertical resolution.

It appears that LibAVFilter's "Pullup" filter (Handbrake uses this) works really well, and I'm not sure if that's available in Avisynth or not.
Dwedit is offline   Reply With Quote
Old 19th October 2020, 03:51   #6  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,373
Quote:
Originally Posted by Dwedit View Post
I tried TIVTC, but I was getting some artifacts. Some frames had a single field enlarged to fill the whole frame, at half vertical resolution.

Did you use a frame accurate source filter ?

Was there a good match available, or was it an "orphaned" field to begin with ?

If it's the case where you only have top or bottom field from edits, orphaned fields (You only have half resolution to begin with) or residual combing (various reasons, frame warping etc..) - you specify TFM clip2 parameter using a better deinterlacer such as QTGMC instead of the default cubic resize (this just interpolates the missing field using cubic interpolation). QTGMC clip2 interpolation for the missing field will almost always give better results than pullup or handbrake, or ffmpeg pullup or fieldmatch (with any deint pp) in that frame's interpolated missing field. There is no comparison in terms of quality

If there was a good field match available that TFM missed, it might have been not ideal settings used, or a non frame accurate source filter

Quote:
It appears that LibAVFilter's "Pullup" filter (Handbrake uses this) works really well, and I'm not sure if that's available in Avisynth or not.
Not the same filter exactly.

People frequently complain about pullup results . Maybe it works ok in your case, or maybe you didn't use ideal TIVTC settings

But use whatever works best. I'd be very surprised if handbrake achieved better IVTC results

Last edited by poisondeathray; 19th October 2020 at 04:18.
poisondeathray is offline   Reply With Quote
Old 19th October 2020, 06:09   #7  |  Link
Dwedit
Registered User
 
Join Date: Sep 2020
Posts: 8
I'm using TFM in two-pass mode.

tfm(d2v=d2vPath,output=tfmPath)
tdecimate(mode=4,output=decimatePath)

These are using the default settings.

My second pass:

tfm(d2v=d2vPath,input=tfmPath)
tdecimate(mode=5,hybrid=2,input=decimatePath,tfmIn=tfmPath,mkvOut=timecodesPath)

I have also tried other TFM settings, and can't find anything that works.


I'm getting bad artifacts on EASY frames.

Comb Guy (Bad)


Comb Guy (Good)


Comb Guy is in the middle of some easy frames. Immediately before it is 3 fields, 2 fields, 3 fields, 2 fields, repeating for a while. Comb guy's frame is 2 fields, then 3, 2, 3, 2, 3.... Very easy sequence here.

Train Guy (Bad)


Train Guy (Good)


Train Guy's frame is 3 fields. Before it is 2, 3, 2, 3.... After it is 2,3,2,3.... Very easy sequence.

Mouth Guy (Bad)


Mouth Guy (Good)


Mouth Guy's frame is 2 fields long. Before it is 3 fields, 2 fields... After it is 3 fields, then a 5 field (2+3) frame.

Mouth Guy happens to be behind a 60FPS credits overlay, so I could give that one a pass.

Last edited by Dwedit; 19th October 2020 at 06:13.
Dwedit is offline   Reply With Quote
Old 19th October 2020, 06:25   #8  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,373
Quote:
Originally Posted by Dwedit View Post

I'm getting bad artifacts on EASY frames.

Comb Guy is in the middle of some easy frames. Immediately before it is 3 fields, 2 fields, 3 fields, 2 fields, repeating for a while. Comb guy's frame is 2 fields, then 3, 2, 3, 2, 3.... Very easy sequence here.



If it's deinterlacing frames it shouldn't be, the cthresh is possibly too low for that source (false positives), you can try increasing the value

Use the TFM debug overlay (display=true) to help guide you in adjusting the settings for that source

Even if combing is detected (right or wrong) , it's still a good idea to use clip2 with QTGMC for better quality post processing. It's only applied when combing is detected

Quote:
Mouth Guy happens to be behind a 60FPS credits overlay, so I could give that one a pass.
You can specify an incluson/exclusion area if you have overlays /credits (or any areas that might distort the analysis , and therefore results) . For TFM there is a y0/y1 exclusion band ; for TDecimate , clip2 can be full frames but clip1 can be an altered input clip to use for detection purposes (e.g. a cropped clip)

If you are using VFR, you have to decide what base rate you want for each section; if the underlying content is 23.976, you're going to have duplicates if you keep the overlays/credits at 59.94

If you need more help, post in the avisynth subforum, with a sample of the source. (It's not really a vdub IVTC issue)

Last edited by poisondeathray; 19th October 2020 at 06:33.
poisondeathray 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 13:05.


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