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

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 3rd December 2017, 23:44   #3781  |  Link
jinkazuya
Registered User
 
Join Date: Jul 2010
Posts: 114
Quote:
Originally Posted by LigH View Post
This may be impossible in all the cases where the original authors did not provide sources of their plugins, or did not document their algorithms detailed enough to reprogram them. But where it is possible, a lot of efforts were already invested to implement them. The AviSynth Wiki lists many successful attempts. If you know some missing ones, always provide links to their original location, optimally with sources. A few special plugins may even be easily resembled using very generic tools like convolution or LUT functions.

Specifically regarding "RedAverage", Average is reported to do the same, just faster.
I know, but I would like to use the detailsharpen function. Unfortunately that function requires the RedAverage plugin.
jinkazuya is offline  
Old 3rd December 2017, 23:52   #3782  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,746
You mean this script function? I bet this could be rewritten to use more portable/compatible kernel or plugin functions.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline  
Old 4th December 2017, 01:50   #3783  |  Link
jinkazuya
Registered User
 
Join Date: Jul 2010
Posts: 114
Quote:
Originally Posted by LigH View Post
You mean this script function? I bet this could be rewritten to use more portable/compatible kernel or plugin functions.
Yes...This is the one I am talking about. I am a noob when it comes to scripting. But it seems nowadays less people are creating new scripts or plugins for video encodes. There used to be a lot more.
jinkazuya is offline  
Old 5th December 2017, 21:41   #3784  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,547
I just tried to compile avisynth.h with /permissive- in Visual Studio 15.5. It fails. When are you going to change it to be valid C++ code?

Fun fact: this is now the default setting for new projects
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline  
Old 6th December 2017, 07:33   #3785  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
I have read about it but not yet tried.
pinterf is offline  
Old 6th December 2017, 16:57   #3786  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Quote:
Originally Posted by Myrsloik View Post
I just tried to compile avisynth.h with /permissive- in Visual Studio 15.5. It fails. When are you going to change it to be valid C++ code?

Fun fact: this is now the default setting for new projects
I have tried. So what's your problem?
pinterf is offline  
Old 6th December 2017, 18:23   #3787  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,547
Quote:
Originally Posted by pinterf View Post
I have tried. So what's your problem?
Code:
4>C:\VapourSynth\AviSynthPlus\avs_core\include\avisynth.h(670): error C3447: third operand to the conditional operator ?: is of type 'void', but the second operand is neither a throw-expression nor of type 'void'
Basically a wall of this whenever you compile a plugin, compiling the core will obviously work since then the proper functions are provided. I even checked out the latest version from your MT branch to test it.

AVFS (and probably any plugin/api user) shows this problem.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline  
Old 6th December 2017, 18:27   #3788  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Ah. Then will try with a plugin. I only had syntax error in a win 7.1 sdk header which i commented out (because the 141xp toolset uses this sdk).
pinterf is offline  
Old 8th December 2017, 17:07   #3789  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Quote:
Originally Posted by Myrsloik View Post
Code:
4>C:\VapourSynth\AviSynthPlus\avs_core\include\avisynth.h(670): error C3447: third operand to the conditional operator ?: is of type 'void', but the second operand is neither a throw-expression nor of type 'void'
Basically a wall of this whenever you compile a plugin, compiling the core will obviously work since then the proper functions are provided. I even checked out the latest version from your MT branch to test it.

AVFS (and probably any plugin/api user) shows this problem.
Thanks, now it should be OK. There were other surprises as well.
pinterf is offline  
Old 8th December 2017, 20:19   #3790  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,547
Quote:
Originally Posted by pinterf View Post
Thanks, now it should be OK. There were other surprises as well.
Works. As a bonus you can now easily use clang-cl to compile plugins too.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline  
Old 10th December 2017, 00:32   #3791  |  Link
lordsmurf
Registered User
 
lordsmurf's Avatar
 
Join Date: Jan 2003
Posts: 124
I had to reinstall 2.6, and use SEt's MT dll.
I could never get the 32-bit + MT to work, and then tmedian2 was not available. That was a deal breaker.

The + x64 worked perfectly.
__________________
Back in town.
If you want my advice, then find me at the DigitalFAQ forum. Glad to assist.
lordsmurf is offline  
Old 10th December 2017, 10:20   #3792  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Quote:
Originally Posted by lordsmurf View Post
I had to reinstall 2.6, and use SEt's MT dll.
I could never get the 32-bit + MT to work, and then tmedian2 was not available. That was a deal breaker.

The + x64 worked perfectly.
What was the problem? Memory issues at large thread count?
pinterf is offline  
Old 11th December 2017, 21:39   #3793  |  Link
ryrynz
Registered User
 
ryrynz's Avatar
 
Join Date: Mar 2009
Posts: 3,645
Anyone compiled a new build?
ryrynz is offline  
Old 19th December 2017, 18:45   #3794  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
New version.
Avisynth Plus r2574

- Finally with an installer (x86/x64 in one package), thanks to Groucho2004. This is the first time I'm providing installer, there can be glitches. One of the installer comes with the current Visual Studio C++ x86 and x64 Redistributables. In theory the VS2017 redistributables superseed and are compatible with the VS2015 one. Please note that original Avisynth documentation and filter SDK is not provided, they are not up to date.

- A fix for MaskHS, reported by sneaker_ger, thanks for the report.

- The other things are mainly Expr related.

There was a bugfix in jit that took some time to understand and caused many grey hairs.
And new "why not" features to have my entertainment as well

The idea for introducing variables came for an earlier test Expr script, in which abs(x-y) was used and computed at least four times. Variables are temporary registers inside an Expr that can be saved, saved and popped from stack and reused many times. A variable is an uppercase letter from A to Z.

The other feature is the pixel-relative addressing. Clip variables can be shifted by (constant) x and y offset.

Both of this two features were found later in davidhorman's great rgba_rpn/y8_rpn filter: https://forum.doom9.org/showthread.php?t=172601

Two other Expr feature idea then was adopted from his filter: 'frameno' and 'time' ('n' and 't' in his version - in Expr lowercase letters are clip references)

Example: Mandelbrot zoomer, syntax rewritten from the above topic
Code:
a="X dup * Y dup * - A + T^ X Y 2 * * B + 2 min Y^ T 2 min X^ "
b=a+a
c=b+b

blankclip(width=960,height=640,length=1600,pixel_type="YUV420P8")

Expr("sxr 3 * 2 - -1.2947627 - 1.01 frameno ^ / -1.2947627 + A@ X^ syr 2 * 1 - 0.4399695 "+\
"- 1.01 frameno ^ / 0.4399695  + B@ Y^ "+c+c+c+c+c+b+a+"X dup * Y dup * + 4 < 0 255 ?","128","128")
Changes since r2544
Code:
# Fix
Fix: MaskHS created inverse mask. Regression after r2173
Fix: jitasm code generation at specific circumstances in Expr filter

# Build
Build: changed avisynth.h, strict C++ conformity with Visual Studio 2017 /permissive- flag

# Other
Installer in two flavours: simple or full (with Microsoft Visual C++ Redistributables)

# New
Expr tweaks:
  - Indexable source clip pixels by relative x,y positions. 
  Syntax: x[a,b] where 
  'x': source clip letter a..z
  'a': horizontal shift. -width < a < width
  'b': vertical shift. -height < b < height
  'a' and 'b' should be constant. e.g.: "x[-1,-1] x[-1,0] x[-1,1] y[0,-10] + + + 4 /"
  When requested pixels come from off-screen the off-screen values are cloned from the appropriate top-bottom-left-right edge.
  Optimized version requires SSSE3 (and no AVX2 version is available). On non-SSSE3 CPUs falls back to C.
  
  - sin cos tan asin acos atan (no SSE2/AVX2 optimization, when they appear in Expr a slower C code runs the expression)
  
  - % (modulo). result = x - trunc(x/d)*d. 
  Note: internally everything is calculated as a 32 bit float. 
  A float can only hold a 24 bit integer number, don't expect 32 bit accuracy here.
  
  - Variables: uppercase letters A..Z for storing and reuse temporary results, frequently used computations.
  Store, result can still be used from stack: A@ .. Z@ 
  Store and remove from stack: A^ .. Z^
  Use: A..Z
  Example: "x y - A^ x y 0.5 + + B^ A B / C@ x +"
  
  - 'frameno' : use current frame number in expression. 0 <= frameno < clip_frame_count
  
  - 'time' : calculation: time = frameno/clip_frame_count. Use relative time position in expression. 0 <= time < frameno/clip_frame_count
  
  - 'width', 'height': currently processed plane width and height
pinterf is offline  
Old 19th December 2017, 19:26   #3795  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,746
Quote:
Originally Posted by pinterf View Post
Example: Mandelbrot zoomer...
Bringing another level of "Synth" into AviSynth.

And installers!
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid

Last edited by LigH; 19th December 2017 at 19:32.
LigH is offline  
Old 19th December 2017, 19:45   #3796  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by pinterf View Post
New version.
Avisynth Plus r2574
Thank you.

Quote:
Originally Posted by pinterf View Post
Finally with an installer (x86/x64 in one package)
Nice, I can retire my installer.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline  
Old 19th December 2017, 21:42   #3797  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Thanks pinterf

Quote:
Fix: jitasm code generation at specific circumstances in Expr filter
so now it's time for lut/expr upscale things?
__________________
See My Avisynth Stuff
real.finder is offline  
Old 19th December 2017, 22:14   #3798  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Maybe. As you see I have implemented many masktools syntax elements in Expr: missing functions, modulo, similarly looking operators, basic scaling support. They are mostly similar but by now masktools lut is a bit behind Expr (e.g. variables).
pinterf is offline  
Old 19th December 2017, 22:29   #3799  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by pinterf View Post
Maybe. As you see I have implemented many masktools syntax elements in Expr: missing functions, modulo, similarly looking operators, basic scaling support. They are mostly similar but by now masktools lut is a bit behind Expr (e.g. variables).
masktools syntax especially for float need to change

https://github.com/pinterf/masktools/issues/1
__________________
See My Avisynth Stuff
real.finder is offline  
Old 19th December 2017, 23:55   #3800  |  Link
GMJCZP
Registered User
 
GMJCZP's Avatar
 
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 744
Thank you pinterf!

A small observation: the only difference I notice with the old avisynth installer is that had by default activated "Select Association", while this installer does not have it.

EDIT: When I tried to directly open a script, instead of starting notepad the Windows Media Player was opened.
As I set the default program the notepad, the file icon naturally changed. To fix it I had to use a program called FileTypesMan, but I suppose the idea is for the installer to do it just like the old avisynth.
__________________
By law and justice!

GMJCZP's Arsenal

Last edited by GMJCZP; 20th December 2017 at 02:42.
GMJCZP 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 03:10.


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