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 30th October 2013, 10:34   #1021  |  Link
sl1pkn07
Pajas Mentales...
 
Join Date: Dec 2004
Location: Spanishtán
Posts: 496
Sangnom for example?

Greetings
sl1pkn07 is offline   Reply With Quote
Old 30th October 2013, 10:38   #1022  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by sl1pkn07 View Post
Sangnom for example?

Greetings
I suppose I could have a go at it now that tp7 has rewritten it. Should be fairly easy. The other thing is adding the remaining missing modes to removegrain which tp7 also reverse engineered.

Or someone could help by contributing a port. There's no shortage of small things to do.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 30th October 2013, 12:00   #1023  |  Link
aegisofrime
Registered User
 
Join Date: Apr 2009
Posts: 478
Quote:
Originally Posted by Myrsloik View Post
Of course it is. I actually do write these things down on the bug tracker and blog...

I don't know if there is any other really popular plugin left to port. I think I got all the extremely useful ones but correct me if I'm wrong.
Maybe it's just me using QTGMC a lot, but I recall you mentioned that you would like having all of QTGMC's plugins on native code?
aegisofrime is offline   Reply With Quote
Old 30th October 2013, 14:42   #1024  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
While I doubt that all of these will come into fruition, I think these plugins make a nice addition to VapourSynth:
  • AddGrain - Used by QTGMC and other scripts like GrainFactory3.
  • aWarpSharp2 - A rewrite of aWarpSharp.
  • dfttest - Excellent spatial/temporal denoiser. Included in the Dither package.
  • ExpLabo - Creates neat looking color effects.
  • MedianBlur - Kinda popular plugin that I've seen used in denoising, sharpening, and film restoration scripts.
  • RemoveGrainHD - While not nearly as popular as RemoveGrain, it's still used in scripts here and there.
  • RemoveDirt - Very useful for film restoration.
  • VerticalCleaner - Also used by QTGMC and do other neat things like this.

Closed source plugins that hopefully get ported or get a VS equivalent.
  • AutoGain - High quality auto-leveling plugin.
  • FrFun7 - Seems to be effective against dot crawl. I know I'm probably wasting my time here.
  • SmoothAdjust - High quality color correction plugin.
I can probably think of a few more but this is all I have time for at the moment. If I don't get completely shot down I can add some more potential plugins later.

Quote:
Originally Posted by Myrsloik View Post
I finally released R21.
Hey there Myrsloik, thank you for the updates!

Last edited by Reel.Deel; 30th October 2013 at 14:50.
Reel.Deel is offline   Reply With Quote
Old 30th October 2013, 16:11   #1025  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by Reel.Deel View Post
While I doubt that all of these will come into fruition, I think these plugins make a nice addition to VapourSynth:
  • AddGrain - Used by QTGMC and other scripts like GrainFactory3.
  • aWarpSharp2 - A rewrite of aWarpSharp.
  • dfttest - Excellent spatial/temporal denoiser. Included in the Dither package.
  • ExpLabo - Creates neat looking color effects.
  • MedianBlur - Kinda popular plugin that I've seen used in denoising, sharpening, and film restoration scripts.
  • RemoveGrainHD - While not nearly as popular as RemoveGrain, it's still used in scripts here and there.
  • RemoveDirt - Very useful for film restoration.
  • VerticalCleaner - Also used by QTGMC and do other neat things like this.

Closed source plugins that hopefully get ported or get a VS equivalent.
  • AutoGain - High quality auto-leveling plugin.
  • FrFun7 - Seems to be effective against dot crawl. I know I'm probably wasting my time here.
  • SmoothAdjust - High quality color correction plugin.
I can probably think of a few more but this is all I have time for at the moment. If I don't get completely shot down I can add some more potential plugins later.


Hey there Myrsloik, thank you for the updates!
I did a quick survey of the source code for the filters you listed.

The only ones that can be salvaged for a somewhat easy port are:

AddGrainC - not too horrible once you delete the asm
dfttest - also has a C version so it's doable
ExpLab - seemed very straightforward, the biggest challenge would be to structure the pile of arguments in a nicer way

The rest are INLINE ASM MACRO PREPROCESSOR HELL. It's easier to start over and my duty as a mediocre coder to do so. Most of them don't have C versions of most functions.

It's simply faster to read the filter description and then guess what should be done. Avisynth filter writers love to implement different kinds of median filters badly... in asm. With macros.

Anyway, AddGrainC is a decent first porting project for anyone who's interested.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 30th October 2013, 20:25   #1026  |  Link
Mystery Keeper
Beyond Kawaii
 
Mystery Keeper's Avatar
 
Join Date: Feb 2008
Location: Russia
Posts: 724
By the way, VapourSynth keeps track of scene changes, right? Or does something need to be done for that? Is it possible to process a frame with different filter if it has scene change on both sides (flicker) within the script? Example please?
__________________
...desu!
Mystery Keeper is offline   Reply With Quote
Old 30th October 2013, 23:46   #1027  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
Quote:
Originally Posted by Mystery Keeper View Post
By the way, VapourSynth keeps track of scene changes, right? Or does something need to be done for that? Is it possible to process a frame with different filter if it has scene change on both sides (flicker) within the script? Example please?
There are two reserved properties. I'm not sure exactly how they're supposed to be used. I guess "_SceneChangePrev" should be set on the first frame of a scene, and "_SceneChangeNext" should be set on the last frame. Wouldn't "_SceneStart" and "_SceneEnd" make more sense?

Obviously VapourSynth doesn't magically add these properties to the right frames for you. Some filter needs to find the scene changes and set the properties accordingly.
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 31st October 2013, 17:15   #1028  |  Link
sl1pkn07
Pajas Mentales...
 
Join Date: Dec 2004
Location: Spanishtán
Posts: 496
hi, is possible port this script (the famous insertsign.avsi)

Code:
function insertsign(clip mainclip, clip overlayclip, int startframe, int "endframe") {
	endframe = default(endframe,startframe+overlayclip.framecount()-1)
	endframe = (endframe == 0) ? startframe+overlayclip.framecount()-1 : endframe
	endframe = (endframe >= mainclip.framecount()-1) ? mainclip.framecount()-1 : endframe 

	begin= (startframe == 1) ? mainclip.trim(0,-1) : mainclip.trim(0,startframe-1)
	middle= mainclip.trim(startframe,endframe)
	end= (endframe == mainclip.framecount()-1) ? blankclip(mainclip,length=0) : mainclip.trim(endframe+1,0)

	middleoverlay = Overlay(middle, overlayclip, mask=overlayclip.showalpha())

	final = (startframe == 0) ? middleoverlay ++ end : begin ++ middleoverlay ++ end
	return final
}
to vapoursynth?

greetings

Last edited by sl1pkn07; 31st October 2013 at 17:27.
sl1pkn07 is offline   Reply With Quote
Old 3rd November 2013, 19:22   #1029  |  Link
Mystery Keeper
Beyond Kawaii
 
Mystery Keeper's Avatar
 
Join Date: Feb 2008
Location: Russia
Posts: 724
I request a function which loads all plugins in specified (not predefined) folder.
__________________
...desu!
Mystery Keeper is offline   Reply With Quote
Old 3rd November 2013, 19:43   #1030  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Can't you do that in Python?
sneaker_ger is offline   Reply With Quote
Old 4th November 2013, 09:50   #1031  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by Mystery Keeper View Post
By the way, VapourSynth keeps track of scene changes, right? Or does something need to be done for that? Is it possible to process a frame with different filter if it has scene change on both sides (flicker) within the script? Example please?
My head has finally recovered. Here's a simple example that uses Chikuzen's scenechange plugin:
Code:
import vapoursynth as vs
import functools

def select_processing(n, f, original_clip, extra_processed_clip, core):
    if f.props._SceneChangeNext and f.props._SceneChangePrev:
        return extra_processed_clip
    else:
        return original_clip
        
core = vs.get_core()
source = core.ffms2.Source(source='D:/dl/Super Size Me/Super Size Me.avi')
source = core.scd.Detect(source)
source = core.text.FrameProps(source)
extra_processed_clip = core.std.BlankClip(source, color=[255,0,255]) # set the special frames to a distinct color

final_clip = core.std.FrameEval(source, functools.partial(select_processing, original_clip=source, extra_processed_clip=extra_processed_clip, core=core), prop_src=source)
final_clip.set_output()
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 4th November 2013, 14:11   #1032  |  Link
Mystery Keeper
Beyond Kawaii
 
Mystery Keeper's Avatar
 
Join Date: Feb 2008
Location: Russia
Posts: 724
Thank you very much.
__________________
...desu!
Mystery Keeper is offline   Reply With Quote
Old 5th November 2013, 01:16   #1033  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by Myrsloik View Post
I did a quick survey of the source code for the filters you listed.

The only ones that can be salvaged for a somewhat easy port are:

AddGrainC - not too horrible once you delete the asm
dfttest - also has a C version so it's doable
ExpLab - seemed very straightforward, the biggest challenge would be to structure the pile of arguments in a nicer way.
Glad to hear that at least some are portable. Thanks for taking a look.
Another one I was going to mention was Vinverse, but I see that lachs0r already ported it.

Quote:
Originally Posted by Myrsloik View Post
The rest are INLINE ASM MACRO PREPROCESSOR HELL. It's easier to start over and my duty as a mediocre coder to do so. Most of them don't have C versions of most functions.

It's simply faster to read the filter description and then guess what should be done. Avisynth filter writers love to implement different kinds of median filters badly... in asm. With macros
Maybe I'm missing something here but RemoveGrainHD's documentation says that it's written in "ordinary C/C++".
Quote:
While RemoveGrain uses a very high level of parallelism - the SSE2/SSE3 version processes 16 pixels simultaneously - this is unfortunately no more possible for RemoveGrainHD. It is a rather ordinary C/C++ program without any inline assembler code.
If that documentation is wrong, please excuse my ignorance.

And finally, someone started to port RemoveDirt to VS.

------
Quote:
Originally Posted by jackoneill View Post
Wouldn't "_SceneStart" and "_SceneEnd" make more sense?
I agree, _SceneStart/End is definitely more straightforward.
Reel.Deel is offline   Reply With Quote
Old 5th November 2013, 16:35   #1034  |  Link
sl1pkn07
Pajas Mentales...
 
Join Date: Dec 2004
Location: Spanishtán
Posts: 496
I found other plugin for vapoursynth

https://github.com/gnaggnoyil/VAutoDeint

greetings
sl1pkn07 is offline   Reply With Quote
Old 5th November 2013, 16:42   #1035  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by sl1pkn07 View Post
I found other plugin for vapoursynth

https://github.com/gnaggnoyil/VAutoDeint

greetings
Another secret plugin. Interesting.

Anyway, about the scenechange naming. I probably won't change it now since it's being used. I also think it makes more sense since in my world a scenechange happens between two frames. Not on a frame.

I'm busy converting the whole project to C++11 now and I've made quite a bit of progress. Qt has already been 80% removed from the codebase since C++11 finally gets a somewhat complete standard library.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 5th November 2013, 17:13   #1036  |  Link
Are_
Registered User
 
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 321
Quote:
Originally Posted by sl1pkn07 View Post
I found other plugin for vapoursynth

https://github.com/gnaggnoyil/VAutoDeint

greetings
Unfortunately it's so Windows centric. It also performs plugin loading within the python module using filesystem paths (too bad, because the plugin itself compiles under Linux).
Are_ is offline   Reply With Quote
Old 5th November 2013, 19:56   #1037  |  Link
sl1pkn07
Pajas Mentales...
 
Join Date: Dec 2004
Location: Spanishtán
Posts: 496
others (?)

https://github.com/gnaggnoyil/tc2cfr
https://github.com/4re/vapoursynth-modules

Last edited by sl1pkn07; 10th November 2013 at 22:33. Reason: add other plugin
sl1pkn07 is offline   Reply With Quote
Old 8th November 2013, 02:27   #1038  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
I just brought an i7 4470k and ran some speed test comparison between avisynth mt on the d2v source filter and tivtc/vivtc.

source was a 720x480 anime, all benchmark were measured by avsmeter.

Code:
                   avisynth-mt(fps)/cpu%             vapoursynth(fps)/cpu%

d2v                 (mode 5)308/12%                     912/12%
tfm                 (mode 2)215/17%                     330/12%
tfm+tdecimate       (mode 5)157/12%                     255/12%
vfm                                                     253/12%
vfm+vdecimate                                           31/13%

With vapoursynth, cpu was never fully utilized, not even 30%. And there's definitely something wrong with vdecimate, as running it alone also gives me 60fps.

Last edited by lansing; 8th November 2013 at 03:45. Reason: update more accurate benchmark for vapoursynth
lansing is offline   Reply With Quote
Old 8th November 2013, 15:31   #1039  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by lansing View Post
I just brought an i7 4470k and ran some speed test comparison between avisynth mt on the d2v source filter and tivtc/vivtc.

source was a 720x480 anime, all benchmark were measured by avsmeter.

Code:
                   avisynth-mt(fps)/cpu%             vapoursynth(fps)/cpu%

d2v                 (mode 5)308/12%                     912/12%
tfm                 (mode 2)215/17%                     330/12%
tfm+tdecimate       (mode 5)157/12%                     255/12%
vfm                                                     253/12%
vfm+vdecimate                                           31/13%

With vapoursynth, cpu was never fully utilized, not even 30%. And there's definitely something wrong with vdecimate, as running it alone also gives me 60fps.
That's quite odd indeed. I'll try to figure out why vdecimate makes it so slow.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 8th November 2013, 16:24   #1040  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Here are two alternative vivtc dlls you can test:
Test1
Test2

Both are completely untested but should perform slightly better.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Reply

Tags
speed, vaporware, vapoursynth

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


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