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 Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 11th September 2018, 13:43   #1361  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,265
Thanks. I probably copied and pasted one of the lines, but failed to edit it properly. I'll fix the post.
hello_hello is offline   Reply With Quote
Old 8th April 2020, 19:44   #1362  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,362
I realize TIVTC is mostly dead, but if our hero pinterf is taking requests, I'd like a different way to control the hybrid mode of tdecimate. Like a percentage parameter. An absolute value with vidThresh isn't very helpful IMHO.

In hybrid mode I care about the frame with a low outlier metric, not the absolute value. If I have basically the same metric value for all 5 frames, say ~15 of course I want them blended. If I have 4 frames that are ~15 and one that's 2.5 I want to drop the 2.5, and do no blending. Currently I control that with vidThresh. So I can set vidThresh to 2.6 which works fine until there's a later scene that has four ~30 frames and a frame that's 3. It will miss that and instead blend. It may also force a frame drop where it should blend if all the frames have low metrics (like 2.5 for all 5) due to limited motion.

A ratio parameter that I can set to say 25% which will look difference between the smallest metric value in relation to the average metric of all 5 or the average metric of the highest 4 frames seems like it would be much more useful.

That way 5 frames with the same metric get blended whether they're all 2.5, all 15, or all 30. And the outlier gets tossed whether it's a 1 among 5's or a 4 among 30's.
Stereodude is offline   Reply With Quote
Old 10th April 2020, 09:18   #1363  |  Link
mp3dom
Registered User
 
Join Date: Jul 2003
Location: Italy
Posts: 1,063
Is it possible to add HBD/avs+3.x colorspaces support?
mp3dom is offline   Reply With Quote
Old 10th April 2020, 10:02   #1364  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,596
Not in the near future. I spent some days on code cleaning which would need for any further development but I'm probably at 20% with that. It is a big achievement that last week I made TDeint compilable on msvc x64 and clang as well. More code clean will follow, drop yuy2 and add yv16. Only then can follow any hbd fun.
pinterf is offline   Reply With Quote
Old 10th April 2020, 13:21   #1365  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,362
Quote:
Originally Posted by mp3dom View Post
Is it possible to add HBD/avs+3.x colorspaces support?
Why would it need those? Is there i60 telecined content in 10 bits or color formats other than 4:2:2 or 4:2:0?
Stereodude is offline   Reply With Quote
Old 10th April 2020, 13:29   #1366  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 1,653
Quote:
Originally Posted by Stereodude View Post
Why would it need those? Is there i60 telecined content in 10 bits or color formats other than 4:2:2 or 4:2:0?
https://forum.doom9.org/showthread.php?t=180668

and maybe there are 4:4:4 mastereds
__________________
My Avisynth Stuff

Last edited by real.finder; 10th April 2020 at 14:01.
real.finder is offline   Reply With Quote
Old 10th April 2020, 14:20   #1367  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 828
Quote:
Originally Posted by Stereodude View Post
Why would it need those? Is there i60 telecined content in 10 bits or color formats other than 4:2:2 or 4:2:0?
Not knowing any telecined but when 4K/8K60 TV station broadcast 24 content, they put 4 real pictures and 6 duplicates in every 10 frame group, so decimate process is needed at least. Although in my cast the rhythm if consistent and I ended up selectevery(10, ...).
__________________
Projects
x265 - Yuuki-Asuna-mod Download / GitHub
TS - ADTS AAC Splitter | LATM AAC Splitter | BS4K-ASS
Neo AviSynth+ filters - F3KDB | FFT3D | DFTTest | MiniDeen | Temporal Median
MeteorRain is offline   Reply With Quote
Old 10th April 2020, 14:50   #1368  |  Link
mp3dom
Registered User
 
Join Date: Jul 2003
Location: Italy
Posts: 1,063
Quote:
Originally Posted by Stereodude View Post
Why would it need those? Is there i60 telecined content in 10 bits or color formats other than 4:2:2 or 4:2:0?
Yes, there are some broadcast sources recorded at 10bit and with telecined contents.
@pinterf: Thanks for the reply and explanation.
mp3dom is offline   Reply With Quote
Old 10th April 2020, 21:07   #1369  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Germany
Posts: 883
Quote:
Originally Posted by Stereodude View Post
Why would it need those? Is there i60 telecined content in 10 bits
don't know about 10bit telecined (although perhaps I received some 10bit ProRes that were telecined very long time ago, I'm not sure), but there are definitely 10bit interlaced contents; for instance every camera that records in AVC-Intra 50, AVC-Intra 100, AVC-Intra 200 in FULL HD in PAL regions almost definitely is 4:2:2 planar 25i TFF 10bit H.264.
I've received tons of those files, generally stored in Panasonic P2 cards, but luckily I live and work in a PAL region so it wasn't a big deal, but it could be a nice present for those living in NTSC countries or for those who want to either bob or deinterlace it if tdeint supports high bit depth.



(I'm just thinking out loud, not really requesting it...)

Last edited by FranceBB; 10th April 2020 at 21:14.
FranceBB is offline   Reply With Quote
Old 10th April 2020, 23:45   #1370  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,174
Quote:
Originally Posted by Stereodude View Post
Why would it need those? Is there i60 telecined content in 10 bits or color formats other than 4:2:2 or 4:2:0?
I was thinking the same thing, and apart from the cases pointed out already (IMO, the fresh remastering/capture from video to 16bit 4:4:4 or RGB is a pretty compelling one), I wonder if maybe there's a chance that even if you don't have >4:2:0 >8bit content natively, that upsampling to 4:2:2 or (more likely) 4:4:4 beforehand can produce more accurate metrics to pass into the field matcher?
qyot27 is offline   Reply With Quote
Old 11th April 2020, 13:51   #1371  |  Link
mp3dom
Registered User
 
Join Date: Jul 2003
Location: Italy
Posts: 1,063
It's pretty rare to have "native" telecined sources, but it's not uncommon to have 10bit 24p sources telecined to 60i and edited afterwards at 60i, with bad edits and mixed real 60i footage (i.e extra contents for domestic releases). There's a solution obviously but you need to skip the 10+bit path. I don't think it's so "essential" to have a native 10+bit path, but it would be a nice addition.
mp3dom is offline   Reply With Quote
Old 12th April 2020, 06:10   #1372  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,596
Could someone put together a bunch of minimal test cases (avs script with only one or two lines per case) for TDeint/TIVTC which covers most main modes, I'd use them for before-after tests (old YV12-new YV12 for regressions, YUY2-YV16) and comparing 420 and 422 results. And perhaps a short sample clip as well, which is a big uglyer than a simple ColorBars. Thanks in advance.

Since 4:2:2 chroma part is more significant than is in 4:2:0 I have a feeling it may result in different metrics during frame difference comparisons. I don't know yet if it is handled or not in present program, I haven't seen correction for that. But if not, I probably I have to provide the same method as in mvtools2: such frame difference metrics (SAD, SSD) are normalized to the 4:2:0 case and the chroma results for 4:2:2 or 4:4:4 are divided back to match with that. And with a parameter (like scaleChromaSAD in mvtools2) one can made chroma part to be more significant.
pinterf is offline   Reply With Quote
Old 13th April 2020, 10:18   #1373  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 1,653
test cases with original samples? or with making telecined/interlaced clip from some avs codes?
__________________
My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 13th April 2020, 21:41   #1374  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,596
Thanks I solved it. Because there is no 'typical' usage I have to test all relevant parameter combinations. Most of TDeint work is done, yv16 support is working, C and SSE2 is identical, yuy2 and yv16 is identical as well. Though yuy2 is faster at the moment than yv16. that was a huuuge work, still a lot of code refactor remained. TIVTC is in pieces as well, did not started re-testing its functionality, it still needs heavy refactor, along with eliminating much common copy paste parts with tdeint and even duplicated triplicated parts inside itself. Crazy. So work in progress for at least a few weeks.
pinterf is offline   Reply With Quote
Old 15th April 2020, 18:19   #1375  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,362
Are the y0 and y1 parameters broken/limited in TFM or not used in quite the way that the documentation claims?

With this script:
Code:
source=MPEG2Source("VTS_02_1.d2v", idct=5, moderate_h=40, moderate_v=40, cpu2="xxoooo", info=0).crop(0,0,-4,-0)

moverlay = ImageSource("overlay.png", end=1000).ShowRed ("YV12")
mmask  = ImageSource("mask.png", end=1000).ShowRed ("YV12")

c1 = mt_merge(source, moverlay, mmask, luma=true)

case1=StackVertical(c1, source).TFM(d2v="VTS_02_1.d2v", y0=480, y1=960, PP=1, flags=5, MI=24, clip2=deint, display=true, ovr="D:\DS9S6D1\E01\tfm_ovr.txt")
case2=c1.TFM(d2v="VTS_02_1.d2v", mode=5, PP=1, flags=5, MI=24, clip2=deint, display=true, ovr="D:\DS9S6D1\E01\tfm_ovr.txt")
I get different pattern matches between case1 and case2 despite the documentation saying that my use of y0 and y1 (to exclude the lower stacked video) will effectively cause TFM to use the same video for field matching decisions in both cases.

case1 (incorrect match):


case2 (correct match):


I'm trying to exclude the titles fading in and out from messing up the pattern detection of the underlying telecined content by masking them out. The concept works as expected as shown by case2. However, despite excluding the entire lower (original) clip with the arguments for y0 and y1 so that it only uses the upper "masked" clip, TFM does not seem to actually ignore the bottom for the field matching.


Last edited by Stereodude; 15th April 2020 at 18:41.
Stereodude is offline   Reply With Quote
Old 5th May 2020, 20:37   #1376  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,596
Please check TDeint 1.2

(git project of TDeint is common with TIVTC. TIVTC has not changed since 1.0.14 but I have uploaded it again to have both TDeint and TIVTC together)

Code:
** TDeInt v1.2 (20200505 - work in progress) **
- Add AviSynth+ V8 interface support: passing frame properties
- Add planar YV16 and YV24 color spaces (The Big Work)
  result: YV16 output is identical with YUY2 (but a bit slower at the moment)
- Fix mode=0 for yuy2 (asm code was completely off)
- Fix mode=0 (general), luma was never processed in CheckedComb
- Fix crash with AviSynth+ versions (in general: when frame buffer alignment is more than 16 bytes)
- TDeint: refactor, code clean, c++17 conformity, keep C and SSE2
- Inline assembler code ported to intrinsics and C code. 
- Add some more SSE2 (MMX and ISSE code kept but is not active (since then it was removed))
- x64 version is compilable!
- Add ClangCL, and XP configurations to the solutions.
Although I have uploaded both TIVTC and TDeint as a common project on github, so far I worked only on the TIVTC the part.
This year I felt like TDeint could be updated as well.

https://github.com/pinterf/TIVTC/releases/tag/v1.0.14b
pinterf is offline   Reply With Quote
Old 5th May 2020, 22:28   #1377  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 1,653
Quote:
Originally Posted by pinterf View Post
Please check TDeint 1.2
This year I felt like TDeint could be updated as well.

https://github.com/pinterf/TIVTC/releases/tag/v1.0.14b
thanks for update TDeint
__________________
My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 5th May 2020, 22:44   #1378  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Germany
Posts: 883
Thank you!
YV16 and YV24 were very much needed!
FranceBB is offline   Reply With Quote
Old 6th May 2020, 08:40   #1379  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,089
TDeint in 64 bit! My hero!

__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 6th May 2020, 17:49   #1380  |  Link
mp3dom
Registered User
 
Join Date: Jul 2003
Location: Italy
Posts: 1,063
Veeery nice!
Big thanks!
mp3dom is offline   Reply With Quote
Reply

Tags
tdeint, tivtc

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 12:26.


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