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

Reply
 
Thread Tools Search this Thread Display Modes
Old 15th October 2014, 17:38   #1  |  Link
HolyWu
Registered User
 
HolyWu's Avatar
 
Join Date: Aug 2006
Location: Taiwan
Posts: 565
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   Reply With Quote
Old 24th October 2014, 19:22   #2  |  Link
HolyWu
Registered User
 
HolyWu's Avatar
 
Join Date: Aug 2006
Location: Taiwan
Posts: 565
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   Reply With Quote
Old 30th December 2014, 05:51   #3  |  Link
HolyWu
Registered User
 
HolyWu's Avatar
 
Join Date: Aug 2006
Location: Taiwan
Posts: 565
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 12:37.
HolyWu is offline   Reply With Quote
Old 22nd April 2015, 20:50   #4  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 704
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   Reply With Quote
Old 22nd April 2015, 21:12   #5  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 1,896
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   Reply With Quote
Old 23rd April 2015, 17:44   #6  |  Link
HolyWu
Registered User
 
HolyWu's Avatar
 
Join Date: Aug 2006
Location: Taiwan
Posts: 565
Thanks. I didn't think about that carefully when I vectorized the function. Should have been fixed now.
HolyWu is offline   Reply With Quote
Old 14th May 2015, 11:33   #7  |  Link
HolyWu
Registered User
 
HolyWu's Avatar
 
Join Date: Aug 2006
Location: Taiwan
Posts: 565
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   Reply With Quote
Old 13th May 2016, 14:56   #8  |  Link
HolyWu
Registered User
 
HolyWu's Avatar
 
Join Date: Aug 2006
Location: Taiwan
Posts: 565
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   Reply With Quote
Old 27th October 2016, 17:50   #9  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: UK
Posts: 2,366
Is this expected to compile on OSX?
kolak is offline   Reply With Quote
Old 1st May 2017, 09:21   #10  |  Link
HolyWu
Registered User
 
HolyWu's Avatar
 
Join Date: Aug 2006
Location: Taiwan
Posts: 565
Update r8.
  • Code refactoring and minor performance improvement.
  • Add AVX2 code path.
  • Add opt and planes parameters.
HolyWu is offline   Reply With Quote
Old 9th March 2018, 07:32   #11  |  Link
HolyWu
Registered User
 
HolyWu's Avatar
 
Join Date: Aug 2006
Location: Taiwan
Posts: 565
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   Reply With Quote
Old 9th March 2018, 10:18   #12  |  Link
Sparktank
47.952fps@71.928Hz
 
Sparktank's Avatar
 
Join Date: Mar 2011
Posts: 882
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 17134 | GPU Caps Viewer 1.40.1.0
NVIDIA GeForce GT 1030 (GP108) 2047MB/GDDR5 | (R417.22)
NTSC | DVD: R1 | BD: A
Sparktank is offline   Reply With Quote
Old 9th March 2018, 13:24   #13  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 704
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   Reply With Quote
Old 9th March 2018, 18:02   #14  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 150
@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 | My Telegram
DJATOM is offline   Reply With Quote
Old 9th March 2018, 18: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   Reply With Quote
Old 9th March 2018, 20:59   #16  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 704
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   Reply With Quote
Old 10th March 2018, 04:22   #17  |  Link
HolyWu
Registered User
 
HolyWu's Avatar
 
Join Date: Aug 2006
Location: Taiwan
Posts: 565
Update r10.
  • Fix link parameter not working in 9-16 bit depth.
HolyWu is offline   Reply With Quote
Old 10th March 2018, 07:07   #18  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 150
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 | My Telegram
DJATOM is offline   Reply With Quote
Old 12th March 2018, 02:47   #19  |  Link
l33tmeatwad
Registered User
 
l33tmeatwad's Avatar
 
Join Date: Jun 2007
Posts: 152
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   Reply With Quote
Old 12th March 2018, 12:07   #20  |  Link
HolyWu
Registered User
 
HolyWu's Avatar
 
Join Date: Aug 2006
Location: Taiwan
Posts: 565
Quote:
Originally Posted by l33tmeatwad View Post
Both r9 and r10 fail to compile on OSX.
Fixed in the latest commit.
HolyWu 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 14:06.


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