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 > VapourSynth

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 15th October 2014, 17:38   #1  |  Link
HolyWu
Registered User
 
Join Date: Aug 2006
Location: Taiwan
Posts: 392
TDeintMod

https://github.com/HomeOfVapourSynth...ynth-TDeintMod

It's a combination of TDeint + TMM port.

Last edited by HolyWu; 13th May 2016 at 14:54.
HolyWu is offline  
Old 24th October 2014, 19:22   #2  |  Link
HolyWu
Registered User
 
Join Date: Aug 2006
Location: Taiwan
Posts: 392
Update r3.

Add SIMD to motion mask related processing, speed up about 30~40%.
Add 'show' parameter to display the motion mask instead of the deinterlaced frame.
HolyWu is offline  
Old 30th December 2014, 06:51   #3  |  Link
HolyWu
Registered User
 
Join Date: Aug 2006
Location: Taiwan
Posts: 392
Update r5.

Add 9-16 bits support.
IsCombed's combed frame detection now works properly for different color spaces.

EDIT: I just ninja update the r5 archive to fix no frame returned at the end of processing bug, which only happen when mtql, mthl, mtqc, mthc are all set to -2 and show=True.

Last edited by HolyWu; 30th December 2014 at 13:37.
HolyWu is offline  
Old 22nd April 2015, 20:50   #4  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
Is it wise to read from getReadPtr()-1? It happens in the SIMD version of the threshMask function. I see that the value doesn't make its way into the output (I think?), but are you sure it will never crash?
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline  
Old 22nd April 2015, 21:12   #5  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
It will probably overread the end if the width is mod32 too.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline  
Old 23rd April 2015, 17:44   #6  |  Link
HolyWu
Registered User
 
Join Date: Aug 2006
Location: Taiwan
Posts: 392
Thanks. I didn't think about that carefully when I vectorized the function. Should have been fixed now.
HolyWu is offline  
Old 14th May 2015, 11:33   #7  |  Link
HolyWu
Registered User
 
Join Date: Aug 2006
Location: Taiwan
Posts: 392
Update r6.
  • TDeintMod now will use the field order specified in the source frames (_FieldBased frame property) and will only fall back to the specified order if not present.
  • The framerate and the frame duration are properly adjusted and normalized for double rate output.
  • Return an error if the returned clip is longer than INT_MAX.
  • Fix potential crash in threshMask's SIMD code.
HolyWu is offline  
Old 13th May 2016, 14:56   #8  |  Link
HolyWu
Registered User
 
Join Date: Aug 2006
Location: Taiwan
Posts: 392
Update r7.
  • Actually return an error when the value of the order, field, mode or metric parameter is out of range.
  • The output frame's _FieldBased property is now set to 0.
  • IsCombed: Actually return an error for unsupported chroma subsampling.
  • The parameter value is now scaled in a saner way.
  • Remove the upper bound of the length parameter.
HolyWu is offline  
Old 27th October 2016, 17:50   #9  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,843
Is this expected to compile on OSX?
kolak is offline  
Old 1st May 2017, 09:21   #10  |  Link
HolyWu
Registered User
 
Join Date: Aug 2006
Location: Taiwan
Posts: 392
Update r8.
  • Code refactoring and minor performance improvement.
  • Add AVX2 code path.
  • Add opt and planes parameters.
HolyWu is offline  
Old 9th March 2018, 08:32   #11  |  Link
HolyWu
Registered User
 
Join Date: Aug 2006
Location: Taiwan
Posts: 392
Update r9.
  • Change show parameter to display binary comb mask.
  • Add athresh, metric, expand and link parameters.

Someone requested for TCombMask a while ago, but we really don't need another filter for duplicate job.
HolyWu is offline  
Old 9th March 2018, 11:18   #12  |  Link
Sparktank
47.952fps@71.928Hz
 
Sparktank's Avatar
 
Join Date: Mar 2011
Posts: 940
Hmm... Every day, I think about learning VS.

So many more updates.
How is this compared to the AVS/AVS+ branches?

The only thing holding me back is not enough examples for VS usage.
I get it's python. But I don't even know python. I might as well learn Wookie.

But, I love seeing any update. Wether it be AVS+ or VS.
All updates just mean a step forward.
__________________
Win10 (x64) build 19041
NVIDIA GeForce GTX 1060 3GB (GP106) 3071MB/GDDR5 | (r435_95-4)
NTSC | DVD: R1 | BD: A
AMD Ryzen 5 2600 @3.4GHz (6c/12th, I'm on AVX2 now!)
Sparktank is offline  
Old 9th March 2018, 14:24   #13  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
Quote:
Originally Posted by Sparktank View Post
The only thing holding me back is not enough examples for VS usage.
I get it's python. But I don't even know python. I might as well learn Wookie.
Here is an example:
Code:
import vapoursynth as vs

core = vs.get_core()

clip = core.std.BlankClip(format=vs.YUV420P8)
clip = core.text.CoreInfo(clip)

clip.set_output()
Code:
vspipe blankclip.py - --y4m | x264.exe --demuxer y4m --crf 16 -o blankclip.mkv -
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline  
Old 9th March 2018, 19:02   #14  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 377
@Sparktank
VS is pretty good. I tried it this fall and now I'm using VS for almost all my releases. IVTC (tfm) stuff is done using AVS+, anything else with VS.
__________________
Me on GitHub
PC Specs: Ryzen 5950X, 64 GB RAM, RTX 2070
DJATOM is offline  
Old 9th March 2018, 19:57   #15  |  Link
kgrabs
Registered User
 
Join Date: Jan 2017
Posts: 28
Quote:
Originally Posted by DJATOM View Post
@Sparktank
VS is pretty good. I tried it this fall and now I'm using VS for almost all my releases. IVTC (tfm) stuff is done using AVS+, anything else with VS.
If/when you try switching to VIVTC, it might benefit you to know it doesn't remove the field-based prop, so if you try to crop to mod 2 you have to remove it first: https://pastebin.com/raw/eujeQxvb
kgrabs is offline  
Old 9th March 2018, 21:59   #16  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
Quote:
Originally Posted by kgrabs View Post
If/when you try switching to VIVTC, it might benefit you to know it doesn't remove the field-based prop, so if you try to crop to mod 2 you have to remove it first: https://pastebin.com/raw/eujeQxvb
An easier way to remove a frame property:
Code:
src = c.std.SetFrameProp(src, "_FieldBased", delete=True)
http://www.vapoursynth.com/doc/funct...frameprop.html
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline  
Old 10th March 2018, 05:22   #17  |  Link
HolyWu
Registered User
 
Join Date: Aug 2006
Location: Taiwan
Posts: 392
Update r10.
  • Fix link parameter not working in 9-16 bit depth.
HolyWu is offline  
Old 10th March 2018, 08:07   #18  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 377
Quote:
Originally Posted by kgrabs View Post
If/when you try switching to VIVTC, it might benefit you to know it doesn't remove the field-based prop, so if you try to crop to mod 2 you have to remove it first: https://pastebin.com/raw/eujeQxvb
VIVTC can't perform 2 pass VFR, that's why I stick with tfm/tdecimate for that task.
__________________
Me on GitHub
PC Specs: Ryzen 5950X, 64 GB RAM, RTX 2070
DJATOM is offline  
Old 12th March 2018, 03:47   #19  |  Link
l33tmeatwad
Registered User
 
l33tmeatwad's Avatar
 
Join Date: Jun 2007
Posts: 414
Both r9 and r10 fail to compile on OSX.
Code:
TDeintMod/TDeintMod_SSE2.cpp:270:43: error: use of overloaded operator '==' is
      ambiguous (with operand types 'Vec16uc' and '__m128i' (vector of 2
      'long long' values))
            select(T2().load_a(srcp0 + x) == zero_128b() && T2().load_a(...
                   ~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
TDeintMod/TDeintMod_SSE2.cpp:281:15: note: in instantiation of function template
      specialization 'combineMasks_sse2<unsigned char, Vec16uc, 16>' requested
      here
template void combineMasks_sse2<uint8_t, Vec16uc, 16>(const VSFrameRef *...
              ^
TDeintMod/vectorclass/vectori128.h:679:23: note: candidate function
static inline Vec16cb operator == (Vec16c const & a, Vec16c const & b) {
                      ^
TDeintMod/TDeintMod_SSE2.cpp:270:43: note: built-in candidate
      operator==(__attribute__((__vector_size__(2 * sizeof(long long)))) long
      long, __attribute__((__vector_size__(2 * sizeof(long long)))) long long)
            select(T2().load_a(srcp0 + x) == zero_128b() && T2().load_a(...
                                          ^
TDeintMod/TDeintMod_SSE2.cpp:270:43: error: use of overloaded operator '==' is
      ambiguous (with operand types 'Vec8us' and '__m128i' (vector of 2
      'long long' values))
            select(T2().load_a(srcp0 + x) == zero_128b() && T2().load_a(...
                   ~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
TDeintMod/TDeintMod_SSE2.cpp:282:15: note: in instantiation of function template
      specialization 'combineMasks_sse2<unsigned short, Vec8us, 8>' requested
      here
template void combineMasks_sse2<uint16_t, Vec8us, 8>(const VSFrameRef *...
              ^
TDeintMod/vectorclass/vectori128.h:1504:22: note: candidate function
static inline Vec8sb operator == (Vec8s const & a, Vec8s const & b) {
                     ^
TDeintMod/TDeintMod_SSE2.cpp:270:43: note: built-in candidate
      operator==(__attribute__((__vector_size__(2 * sizeof(long long)))) long
      long, __attribute__((__vector_size__(2 * sizeof(long long)))) long long)
            select(T2().load_a(srcp0 + x) == zero_128b() && T2().load_a(...
                                          ^
2 errors generated.
make: *** [TDeintMod/TDeintMod_SSE2.lo] Error 1
l33tmeatwad is offline  
Old 12th March 2018, 13:07   #20  |  Link
HolyWu
Registered User
 
Join Date: Aug 2006
Location: Taiwan
Posts: 392
Quote:
Originally Posted by l33tmeatwad View Post
Both r9 and r10 fail to compile on OSX.
Fixed in the latest commit.
HolyWu is offline  
Closed Thread

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 08:09.


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