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 4th November 2016, 10:07   #2561  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,853
Quote:
Originally Posted by Stephen R. Savage View Post
Wouldn't that conflict with a function named test_array? AVS does not prevent creating variables with the same name as functions.
Yes, there would be conflict.
Final solution should be something like that
Code:
black = [0,128,128]
test_array = [ ["ciao", black], ["hello",[1,1,2.718281]], ["null", []] ]
test_array = test_array + ["dummy"]
item = test_array[0]
item2 = test_array["hello"]
e = item2[2]
Provided the [ and ] symbols are not reserved.
Or { and }. Language experts will decide.
pinterf is offline  
Old 4th November 2016, 12:16   #2562  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,412
Quote:
Originally Posted by pinterf View Post
Provided the [ and ] symbols are not reserved.
Or { and }. Language experts will decide.
[ and ] are currently used only for nestable block comments [* ... *].
Although technically possible, I recommend not using { and } as these are already well established as code block delimiters, whereas [] is familiar from other languages as indicating array indexing.

You could argue for using a different symbol, like { ... }, for array creation (as in C/C++ and Java), but I would prefer [] for both indexing and creation. There is no problem in distinguishing the two contexts in the parser even if the same symbol is used for both.

On a wider note...
You have so far shown examples of how the array features would be used in the script language.
From the plugin writer's point of view, I would also like to see a list of proposed API changes.
I imagine there will be changes to the public interface of AVSValue and possibly new ScriptEnvironment functions.
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline  
Old 4th November 2016, 12:47   #2563  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,853
Quote:
Originally Posted by Gavino View Post
On a wider note...
You have so far shown examples of how the array features would be used in the script language.
From the plugin writer's point of view, I would also like to see a list of proposed API changes.
I imagine there will be changes to the public interface of AVSValue and possibly new ScriptEnvironment functions.
I agree with [ and ].
I also wonder how can I do that with keeping backward compatibility. Anyway, I will return to the problem later, this will definitely need more time than that day I spent on it so far.
pinterf is offline  
Old 4th November 2016, 13:23   #2564  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,412
Quote:
Originally Posted by pinterf View Post
I agree with [ and ].
I also wonder how can I do that with keeping backward compatibility.
Since [ and ] are currently illegal in scripts (except for [* and *]), what problem do you see with backward compatibility?
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline  
Old 4th November 2016, 13:38   #2565  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,853
Quote:
Originally Posted by Gavino View Post
Since [ and ] are currently illegal in scripts (except for [* and *]), what problem do you see with backward compatibility?
Sorry, I was thinking forward on AVSValue things and the possible interface additions.
pinterf is offline  
Old 4th November 2016, 13:58   #2566  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,412
Quote:
Originally Posted by pinterf View Post
Sorry, I was thinking forward on AVSValue things and the possible interface additions.
Yes, that's certainly an area where careful thought will be required (although at the moment I can't see any specific problems).
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline  
Old 4th November 2016, 14:00   #2567  |  Link
stranno
Registered User
 
Join Date: Jul 2011
Posts: 39
I'm getting a "display error" with r2294 using ProRes 422LT source. Pre-2000 releases work fine. I have seen r2003+ releases support high bit depth colorspace so i'm not sure whats the problem.

Edit: I'm using FFMS2 2.23.
stranno is offline  
Old 4th November 2016, 14:13   #2568  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,853
Quote:
Originally Posted by stranno View Post
I'm getting a "display error" with r2294 using ProRes 422LT source. Pre-2000 releases work fine. I have seen r2003+ releases support high bit depth colorspace so i'm not sure whats the problem.

Edit: I'm using FFMS2 2.23.
Pre r2294 versions did not support 10,12 and 14 bit depths. Could you please try with the latest version?
pinterf is offline  
Old 4th November 2016, 14:27   #2569  |  Link
tuanden0
Registered User
 
Join Date: Oct 2016
Posts: 104
I have a problem with Avisynth Plus r2294, can someone help me

I coppied the Avisynth.dll to System32 but i still error

tuanden0 is offline  
Old 4th November 2016, 14:36   #2570  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,853
If you have installed 32 bit avisynth+ and have a 64 bit windows, the avisynth.dll must be placed to the SysWOW64 folder.
On 32 bit windows, system32 is O.K. for 32 bit avisynth.
But the installer should do this instead of you.
I suppose, there is another avisynth.dll somewhere, can it be set in avspmod?
pinterf is offline  
Old 4th November 2016, 14:42   #2571  |  Link
tuanden0
Registered User
 
Join Date: Oct 2016
Posts: 104
Quote:
Originally Posted by pinterf View Post
If you have installed 32 bit avisynth+ and have a 64 bit windows, the avisynth.dll must be placed to the SysWOW64 folder.
On 32 bit windows, system32 is O.K. for 32 bit avisynth.
But the installer should do this instead of you.
I suppose, there is another avisynth.dll somewhere, can it be set in avspmod?
Yah, my fault, i forgot that

Thank you very much
tuanden0 is offline  
Old 4th November 2016, 14:52   #2572  |  Link
ajp_anton
Registered User
 
ajp_anton's Avatar
 
Join Date: Aug 2006
Location: Stockholm/Helsinki
Posts: 792
Quote:
Originally Posted by pinterf View Post
Quote:
Originally Posted by Stephen R. Savage View Post
Wouldn't that conflict with a function named test_array? AVS does not prevent creating variables with the same name as functions.
Yes, there would be conflict
But as mentioned, you can already create those conflicts with variable names. What makes array-name conflicts any different? Either you ignore the problem (allow conflicts), or you do something about it (throw error when conflicts happen, or require ()-brackets for functions), but you do the same thing with variable names and array names (aren't arrays also some kind of "variables"?).

Though I agree that []-brackets are better for arrays.
ajp_anton is offline  
Old 5th November 2016, 01:22   #2573  |  Link
Aktan
Registered User
 
Join Date: Feb 2002
Posts: 302
I have an interesting problem. I have a Lagarith source AVI in RGB32 colorspace with the resolution of 350x240. If I open this AVI with AVS+, I get distorted video. From Info(), I noticed the video pitch is wrong. Then I realized 350 is not mod 4. Is this a known problem?
Aktan is offline  
Old 5th November 2016, 01:25   #2574  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,196
Quote:
Originally Posted by Aktan View Post
I have an interesting problem. I have a Lagarith source AVI in RGB32 colorspace with the resolution of 350x240. If I open this AVI with AVS+, I get distorted video. From Info(), I noticed the video pitch is wrong. Then I realized 350 is not mod 4. Is this a known problem?
What AVS+ version are you using?
Reel.Deel is offline  
Old 5th November 2016, 01:27   #2575  |  Link
Aktan
Registered User
 
Join Date: Feb 2002
Posts: 302
Quote:
Originally Posted by Reel.Deel View Post
What AVS+ version are you using?
r1576, x64

Edit: Well I guess it's an old version? lol.
Aktan is offline  
Old 5th November 2016, 01:31   #2576  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,196
Quote:
Originally Posted by Aktan View Post
r1576, x64
IIRC someone reported a similar problem way back. I believe it was fixed, try updating to the latest version. Report your findings .

Edit: maybe this? https://github.com/AviSynth/AviSynthPlus/issues/36

Last edited by Reel.Deel; 5th November 2016 at 01:37.
Reel.Deel is offline  
Old 5th November 2016, 01:34   #2577  |  Link
Aktan
Registered User
 
Join Date: Feb 2002
Posts: 302
Quote:
Originally Posted by Reel.Deel View Post
IIRC someone reported a similar problem way back. I believe it was fixed, try updating to the latest version. Report your findings .
Thanks, will do!

Edit: r2294 works fine =)

Last edited by Aktan; 5th November 2016 at 14:38.
Aktan is offline  
Old 5th November 2016, 17:09   #2578  |  Link
Stephen R. Savage
Registered User
 
Stephen R. Savage's Avatar
 
Join Date: Nov 2009
Posts: 344
Quote:
Originally Posted by ajp_anton View Post
But as mentioned, you can already create those conflicts with variable names. What makes array-name conflicts any different? Either you ignore the problem (allow conflicts), or you do something about it (throw error when conflicts happen, or require ()-brackets for functions), but you do the same thing with variable names and array names (aren't arrays also some kind of "variables"?).

Though I agree that []-brackets are better for arrays.
There are no function pointers, so I believe AVS will use the presence of the parentheses token to identify a function name instead of a variable.
Stephen R. Savage is offline  
Old 5th November 2016, 19:17   #2579  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,412
Quote:
Originally Posted by Stephen R. Savage View Post
There are no function pointers, so I believe AVS will use the presence of the parentheses token to identify a function name instead of a variable.
It does indeed, but in principle it could be extended to try x(1) as an array indexing if it finds that there is no function named x - just as now, when it finds plain 'x' and there is no variable called x, it tries to treat it as a parameterless function call x().

However, I don't think that would be a good idea and the availability of [] makes it unnecessary.
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline  
Old 7th November 2016, 12:54   #2580  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 1,901
A little question.
If i am with an YUVA 4:4:4 mode (for exemple), will IsYV24() still be true ?
jpsdr 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 06:40.


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