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. |
![]() |
#1261 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,657
|
Ah, then probably Average just doesn't handle arrays as input. It's getting only one parameter, the array, which is not the right number as far as it is concerned. You need to separate out the elements and send them as individual parameters (if you can do such a thing).
|
![]() |
![]() |
![]() |
#1262 | Link |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,631
|
yes, that why I said "way to convert array to arguments"
__________________
See My Avisynth Stuff |
![]() |
![]() |
![]() |
#1263 | Link |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 720
|
Another thing: is the Avisynth+ ABI still restricted to MSVC? Or could Clang/MSYS2 or GCC compile plug-ins now?
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding |
![]() |
![]() |
![]() |
#1264 | Link | |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,213
|
Quote:
Stephen (also called "qyot" for the Doom9 friends) did some successful experiments a while ago in which he compiled Avisynth with GCC and tried to use GCC Compiled plugins with it and it worked, however no one uses it for obvious reasons... At least this is true on Windows, but it's different for Linux and Mac OSX (yep, as hard to believe as it is, Avisynth is cross platform now eheheheh) Last edited by FranceBB; 14th August 2021 at 13:38. |
|
![]() |
![]() |
![]() |
#1265 | Link | |
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,472
|
Quote:
And currently something has broken the ability for FFmpeg to use GCC builds, although the GCC builds actually compile. It definitely is something on our side, since archived builds (r2831, from 2019) work with the same newer (May 2021) FFmpeg binary. |
|
![]() |
![]() |
![]() |
#1266 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,612
|
Quote:
Do however note that clang-cl doesn't understand the instruction set selection (as done through property pages) very well which can cause problems with intrinsics being rejected.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
![]() |
![]() |
![]() |
#1267 | Link |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 720
|
I see. So I’ll stick with MSVC for the Avisynth+ version of fmtconv for the moment.
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding |
![]() |
![]() |
![]() |
#1268 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,631
|
Quote:
AviSynth+ can even autoload C plugins unlike the old AviSynth, also you don't need to use loadCplugin in avs+, loadplugin work with it too
__________________
See My Avisynth Stuff |
|
![]() |
![]() |
![]() |
#1269 | Link |
Registered User
Join Date: Jul 2003
Location: India
Posts: 890
|
Sorry for asking a simple question. How does one read a double value for an input parameter by the plugin? args[n].AsFloat() I vaguely remembered actually outputs a double but when I tried args[n].AsFloat(0.001) I got a warning of truncating double to float. The input string has f for the value.
|
![]() |
![]() |
![]() |
#1270 | Link |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 720
|
You can use AsDblDef(), but anyway the stored type within the AVSValue is always a float.
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding |
![]() |
![]() |
![]() |
#1271 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,151
|
You can append default value with trailing 'f', args[n].AsFloat(0.001f)
[not sure if Avs+/visual studio, gives warning now for default value as double without trailing f] EDIT: AsDblDef() probably better way, never used it. With VS2008 and earlier, I sometimes had to use something like eg Code:
d = (double)args[n].AsFloat(0.001f) f = (float)args[n].AsFloat(0.001f)
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 22nd August 2021 at 15:00. |
![]() |
![]() |
![]() |
#1272 | Link | ||
Registered User
Join Date: Jul 2018
Posts: 569
|
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#1273 | Link |
Registered User
Join Date: Jul 2018
Posts: 1,320
|
Some idea to Avisynth core clip properties:
Add property to indicate full-band color 4:4:4 clip and half-color band (half vertical, half-horizontal or half-both, may be bitmask ?). For example fresh non-distorted in spectrum 4:4:4 clip upconverted from 4:2:0 source is half-banded in color in both vertical and horizontal directions. But the next in chain filters can not get this information currently. Also this property need to be user-controllable so if user damage half-banding it may set property to full-band. It may be useful hint for processing like color subsampling processing and other. Also use it automatically in Convert4:4:4To4:2:0 and from 4:4:4To4:2:2 operations with defaulting chromaresample to sinc for half-band marked clips and may be current default bicubic (gauss prefferable with fixed p-param adjusted after tuning) for full-band marked 4:4:4 sources. Also it is very great to add to Contert() the abiliti to pass kernel chromaresampler params (for example p for gauss) because currently used defaults (?) may be far from good for chromaresample. |
![]() |
![]() |
![]() |
#1274 | Link | |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,213
|
Quote:
As result of this discussion: Link In Converttoyv12, YUY2, yv16, yv24, YUV420, YUV422, YUV444 etc only the built in resizing kernels are supported and with no additional parameters, so that is actually limiting. I know that just only around 5% of the Doom9 population is actually even bothering to specify the resizing kernel when changing chroma, but anyway I'm in favor of a full args support in the default built-in conversion, to be fair. |
|
![]() |
![]() |
![]() |
#1275 | Link | |
Registered User
Join Date: Jul 2003
Location: India
Posts: 890
|
Quote:
float d = args[].AsFloat(0.5f) warning conversion double to float float d = args[].AsFloat(0.5) argument truncation from double to float initializing from double to float. So it always expects a trailing f in default value, but outputs a double. A bit confusing and is not right. double d = args[].AsDblDef(0.5) works ok |
|
![]() |
![]() |
![]() |
#1276 | Link |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 720
|
You also can use AsFloatf() which takes a float and returns a float.
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding |
![]() |
![]() |
![]() |
#1277 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,151
|
Dont think AsDblDef() or AsFloatf() work in avs 2.58, so I dont use either.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
![]() |
![]() |
![]() |
#1278 | Link |
Registered User
Join Date: Jul 2018
Posts: 1,320
|
An idea - it looks avisynth support dropping out only error messages. But it may be good for hinting and warning of user to have some method to output warning messages too. In complex processing it may be method to put info about not very best current processing path or where developer not sure and/or ask to pay special attention (where quality may be degraded or where parameter in most cases need adjustment etc).
|
![]() |
![]() |
![]() |
#1279 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,375
|
Is there a way to know how string floats get converted to single floats in Expr? I was reading IEEE 754 but nothing on it hinted the following findings:
Code:
Merge(a,b,0.25) equals Expr(a,b,"x 0.749999 * y 0.249999 * + ") Code:
Merge(a,b,0.5) equals Expr(a,b,"x y + 0.500001 * ") For example I tested in this online converter, and 0.25 turns out as 0.25 and 0.5 as 0.5.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread |
![]() |
![]() |
![]() |
#1280 | Link |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 720
|
Expr only works with float (no double). Integer multiples of powers of 2 can be represented exactly (like 0.75 = 3 * 2^-2). Other values are rounded, and the exact rounding process depends on the implementation of the standard library used to compile the program. Generally you can expect about 6 digits of precision.
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|