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
Register FAQ Calendar Today's Posts Search

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 4th April 2019, 07:37   #4621  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,314
Quote:
Originally Posted by StainlessS View Post
EDIT: Perhaps 'n' is name, ie function name, variable name, device name.
'n' is for functioN
pinterf is offline  
Old 4th April 2019, 09:14   #4622  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
'n' is for functioN
Thanx.

Last one on list,
Code:
YPlaneMinMaxDifference    "c[threshold]fi"
Un-named optional final arg of type int ?

Whereas NEO
Code:
YPlaneMinMaxDifference    "c[threshold]f[offset]i"
EDIT: After ANY optional arg, so all following args have to be optional (standard amongst many languages) and I think that is enforced by Avisynth
even though 'i' type arg is neither specified as named optional, nor un-named optional, '[offset]i' or '[]i', however, how does it magically know that the arg name should be accepted as 'offset', when is not specified.
(I think some clever magic spell is being cast, but maybe should comply with standard prototype spec stuff, or some things will not work proper [eg AvsPMod]).
Avisynth+ may know what clever magic is involved, but as AVS exports function names in "$InternalFunctions$" (and "$PluginFunctions$"), and parameters via "$Plugin!" and "!Param$",
so would be best if software that interrogates those infos, get the un-magic'ed versions.

EDIT: From Wiki:- http://avisynth.nl/index.php/Interna...time_functions
Code:
 Color plane median, min, max, range

    YPlaneMedian(clip [, int offset = 0])   
    UPlaneMedian(clip [, int offset = 0])   
    VPlaneMedian(clip [, int offset = 0])   
    BPlaneMedian(clip [, int offset = 0])   AVS+ 
    GPlaneMedian(clip [, int offset = 0])   AVS+ 
    RPlaneMedian(clip [, int offset = 0])   AVS+ 

    YPlaneMin(clip [, float threshold = 0, int offset = 0])   
    UPlaneMin(clip [, float threshold = 0, int offset = 0])   
    VPlaneMin(clip [, float threshold = 0, int offset = 0])   
    BPlaneMin(clip [, float threshold = 0, int offset = 0])   AVS+ 
    GPlaneMin(clip [, float threshold = 0, int offset = 0])   AVS+ 
    RPlaneMin(clip [, float threshold = 0, int offset = 0])   AVS+ 

    YPlaneMax(clip [, float threshold = 0, int offset = 0])   
    UPlaneMax(clip [, float threshold = 0, int offset = 0])   
    VPlaneMax(clip [, float threshold = 0, int offset = 0])   
    BPlaneMax(clip [, float threshold = 0, int offset = 0])   AVS+ 
    GPlaneMax(clip [, float threshold = 0, int offset = 0])   AVS+ 
    RPlaneMax(clip [, float threshold = 0, int offset = 0])   AVS+ 

    YPlaneMinMaxDifference(clip [, float threshold, int offset = 0])   
    UPlaneMinMaxDifference(clip [, float threshold, int offset = 0])   
    VPlaneMinMaxDifference(clip [, float threshold, int offset = 0])   
    BPlaneMinMaxDifference(clip [, float threshold, int offset = 0])   AVS+ 
    GPlaneMinMaxDifference(clip [, float threshold, int offset = 0])   AVS+ 
    RPlaneMinMaxDifference(clip [, float threshold, int offset = 0])   AVS+
__________________
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; 4th April 2019 at 10:09.
StainlessS is offline  
Old 4th April 2019, 11:08   #4623  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,314
Quote:
Originally Posted by StainlessS View Post
Thanx.

Last one on list,
Code:
YPlaneMinMaxDifference    "c[threshold]fi"
Un-named optional final arg of type int ?

Whereas NEO
Code:
YPlaneMinMaxDifference    "c[threshold]f[offset]i"
Avisynth+ is also OK.
Code:
Avisynth+:
  {  "YPlaneMinMaxDifference", BUILTIN_FUNC_PREFIX, "c[threshold]f[offset]i", MinMaxPlane::Create_minmax, (void *)PLANAR_Y },
  {  "UPlaneMinMaxDifference", BUILTIN_FUNC_PREFIX, "c[threshold]f[offset]i", MinMaxPlane::Create_minmax, (void *)PLANAR_U }, // AVS+! was before: missing offset parameter
  {  "VPlaneMinMaxDifference", BUILTIN_FUNC_PREFIX, "c[threshold]f[offset]i", MinMaxPlane::Create_minmax, (void *)PLANAR_V }, // AVS+! was before: missing offset parameter
  {  "RPlaneMinMaxDifference", BUILTIN_FUNC_PREFIX, "c[threshold]f[offset]i", MinMaxPlane::Create_minmax, (void *)PLANAR_R },
  {  "GPlaneMinMaxDifference", BUILTIN_FUNC_PREFIX, "c[threshold]f[offset]i", MinMaxPlane::Create_minmax, (void *)PLANAR_G },
  {  "BPlaneMinMaxDifference", BUILTIN_FUNC_PREFIX, "c[threshold]f[offset]i", MinMaxPlane::Create_minmax, (void *)PLANAR_B },
pinterf is offline  
Old 4th April 2019, 13:26   #4624  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Not sure that I'm understanding properley, think that you are saying that it works ok.

Code:
PLG="YPlaneMinMaxDifference"
PARAM=RT_PluginParam(PLG)
RT_Debugf("PLUG=%s PARAM=%s",PLG,PARAM)
return MessageClip("DONE")
result ( '[offset]' missing )
Code:
00000011	13:16:13.462	[2900] RT_DebugF: PLUG=YPlaneMinMaxDifference PARAM=c[threshold]fi
Quote:
{ "YPlaneMinMaxDifference", BUILTIN_FUNC_PREFIX, "c[threshold]f[offset]i", MinMaxPlane::Create_minmax, (void *)PLANAR_Y },
"[offset]" has gone AWOL.

Source to RT_PluginParam [ env->AddFunction("RT_PluginParam", "s",RT_PluginParam, 0); ]
Code:
AVSValue __cdecl RT_PluginParam(AVSValue args, void* user_data, IScriptEnvironment* env) {
    char * myName="RT_PluginParam: ";
    const char *s=args[0].AsString();
    int len = int(strlen(s));
    char *bf = new char[len + 16];
    if(bf==NULL)    env->ThrowError("%sCannot allocate memory",myName);
    strcpy(bf,"$Plugin!");
    strcat(bf,s);
    strcat(bf,"!Param$");
    char *ps;
    try {
        AVSValue var  = env->GetVar(bf);
        if(!var.IsString()) {
            delete [] bf;
            env->ThrowError("%s Var '$Plugin!%s!Param$' is not a string",myName,s);
        }
        delete [] bf;
        ps = (char*)var.AsString();
    } catch (IScriptEnvironment::NotFound) {
        ps="";
    }
    return env->SaveString(ps);
}
Also, is there a way to extract all alterative parameter lists for a plugin name ? [there did not used to be for avs standard).
__________________
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; 4th April 2019 at 13:34.
StainlessS is offline  
Old 4th April 2019, 13:56   #4625  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,314
When there are too many data, e.g. output is fast, OutputDebugString can lose characters.
pinterf is offline  
Old 4th April 2019, 14:01   #4626  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by pinterf View Post
When there are too many data, e.g. output is fast, OutputDebugString can lose characters.
That's nasty.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline  
Old 4th April 2019, 14:17   #4627  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
Originally Posted by pinterf View Post
When there are too many data, e.g. output is fast, OutputDebugString can lose characters.
Cannot possibly be the cause, the RT_Stats function list extractors do not use OutputDebugString at all, same problem.
I've never seen swallowed output in OutputDebugString (and I've often sent biggish text files to OutputDebugString for capture and checking)

Quote:
function list extractors do not use OutputDebugString at all
At least not for extraction or processing or writing to file. [there is a problem somewhere]

EDIT: There are many others with exact same symptoms in the functionlist comparitor prev posted, YPlaneMinMaxDifference just happened to be the easiest to locate, being the last one in list.
From first few
Code:
                                                        Differences between Avisynth NEO and Avisynth+
                                                        ##############################################


AviSynth_Neo_0.1_(r2822,_Neo,_i386)_ORDERED_Function_List                                           AviSynth+_0.1_(r2772,_MT,_i386)_ORDERED_Function_List


AddProp                   "csn"
AlignedSplice             "cci"                                                                     AlignedSplice             "cc+"
AlignedSplice             "cci"


AverageChromaU            "c[offset]i"                                                              AverageChromaU            "ci"
AverageChromaV            "c[offset]i"                                                              AverageChromaV            "ci"

AverageLuma               "c[offset]i"                                                              AverageLuma               "ci"
Actually, It ALWAYS seems to happen with "[offset]i", every single one of them (and there are quite a few).

EDIT:
Wiki, seems to be missing offset args
Code:
    LumaDifference(clip1, clip2)   
    ChromaUDifference(clip1, clip2)   
    ChromaVDifference(clip1, clip2)   
    RGBDifference(clip1, clip2)   

    BDifference(clip1, clip2)   AVS+ 
    GDifference(clip1, clip2)   AVS+ 
    RDifference(clip1, clip2)   AVS+ 
    BDifferenceFromPrevious(clip)   AVS+ 
    GDifferenceFromPrevious(clip)   AVS+ 
    RDifferenceFromPrevious(clip)   AVS+ 

    YDifferenceFromPrevious(clip)   
    UDifferenceFromPrevious(clip)   
    VDifferenceFromPrevious(clip)   
    RGBDifferenceFromPrevious(clip)

Swallowed optional offset names [RHS text column, hope I got them all].
Code:
ChromaUDifference         "cc"                                                                      ChromaUDifference         "cci"
ChromaVDifference         "cc"                                                                      ChromaVDifference         "cci"

LumaDifference            "cc"                                                                      LumaDifference            "cci"

RGBDifference             "cc"                                                                      RGBDifference             "cci"
RGBDifferenceFromPrevious "c"                                                                       RGBDifferenceFromPrevious "ci"
RGBDifferenceToNext       "c[offset]i"                                                              RGBDifferenceToNext       "ci"

UDifferenceFromPrevious   "c"                                                                       UDifferenceFromPrevious   "ci"
UDifferenceToNext         "c[offset]i"                                                              UDifferenceToNext         "ci"
UPlaneMax                 "c[threshold]f[offset]i"                                                  UPlaneMax                 "c[threshold]fi"
UPlaneMedian              "c[offset]i"                                                              UPlaneMedian              "ci"
UPlaneMin                 "c[threshold]f[offset]i"                                                  UPlaneMin                 "c[threshold]fi"
UPlaneMinMaxDifference    "c[threshold]f[offset]i"                                                  UPlaneMinMaxDifference    "c[threshold]fi"

VDifferenceFromPrevious   "c"                                                                       VDifferenceFromPrevious   "ci"
VDifferenceToNext         "c[offset]i"                                                              VDifferenceToNext         "ci"
VPlaneMax                 "c[threshold]f[offset]i"                                                  VPlaneMax                 "c[threshold]fi"
VPlaneMedian              "c[offset]i"                                                              VPlaneMedian              "ci"
VPlaneMin                 "c[threshold]f[offset]i"                                                  VPlaneMin                 "c[threshold]fi"
VPlaneMinMaxDifference    "c[threshold]f[offset]i"                                                  VPlaneMinMaxDifference    "c[threshold]fi"

YDifferenceFromPrevious   "c"                                                                       YDifferenceFromPrevious   "ci"
YDifferenceToNext         "c[offset]i"                                                              YDifferenceToNext         "ci"
YPlaneMax                 "c[threshold]f[offset]i"                                                  YPlaneMax                 "c[threshold]fi"
YPlaneMedian              "c[offset]i"                                                              YPlaneMedian              "ci"
YPlaneMin                 "c[threshold]f[offset]i"                                                  YPlaneMin                 "c[threshold]fi"
YPlaneMinMaxDifference    "c[threshold]f[offset]i"                                                  YPlaneMinMaxDifference    "c[threshold]fi"
__________________
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; 4th April 2019 at 16:46.
StainlessS is offline  
Old 4th April 2019, 14:31   #4628  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,314
Quote:
Originally Posted by Groucho2004 View Post
That's nasty.
Probably the output is O.K., I experienced the missing lines in the viewer (DebugView)
pinterf is offline  
Old 4th April 2019, 15:07   #4629  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Maybe old DebugView, update.

DebugView v4.81(Published: December 4, 2012):- https://docs.microsoft.com/en-us/sys...oads/debugview

[Maybe you use Kernel mode a lot, I dont]

EDIT: I switch off option WIN32 PIDS, and always Force Carriage Returns [If you dont, some text disappears off RHS when not sending '\n' at end of lines].
__________________
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; 5th April 2019 at 03:08.
StainlessS is offline  
Old 4th April 2019, 15:47   #4630  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
I use DebugView too and have never had any problem with missing lines.

Code:
Clear-output string: When DebugView sees the special debug output string "DBGVIEWCLEAR" it clears the output.
Holy cow that's going to save me a lot of trouble.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline  
Old 4th April 2019, 16:34   #4631  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
Holy cow that's going to save me a lot of trouble.
I've never seen that before, making a note of it.

I used to use a Sinclair QL via RS232 for showing debug stuff (used to just switch on/plug in and auto started showing any debug stuff on 9" green screen), I kinda forgot bout that when I gave to charity shop 2 QL's
+ £1000's of softwares, next day I thought, what the hell do I do for debugging now. Maybe I set up debugview for same type output on laptop or 10" tablet laptoppy thingy.
I got a USB to Ethernet whatsit, but wonder if USB alone could be persuaded to work.
EDIT: I also used to view Debug stuff on 2nd monitor, but have not had dual display for a few years now, guess we needs one.
__________________
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; 4th April 2019 at 16:54.
StainlessS is offline  
Old 5th April 2019, 02:32   #4632  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Seems to be a pretty serious bug in avisynth NEO, Main avs level local variables not visible inside Scriptclip.
Works fine even in Avs v2.58, Fails in AVS NEO < "I dont know what S Means. ([Scriptclip] Line 1)" >
Code:
    S=RT_TxtAddStr(S,S2)    # Some String
    W=1280 H=640 LINES=RT_TxtQueryLines(S)
    L= LINES*20 + H + 100
    RT_Debug(S)
    BlankClip(Width=W,Height=H,Length=L).ScriptClip("""RT_Subtitle("%s",S,x=10,y=height+100-current_frame,expx=true,expy=true)""")
Fixes in Avs NEO
Code:
    S=RT_TxtAddStr(S,S2)    # Some String
    W=1280 H=640 LINES=RT_TxtQueryLines(S)
    L= LINES*20 + H + 100
    RT_Debug(S)
    Global GLB_S=S
    BlankClip(Width=W,Height=H,Length=L).ScriptClip("""RT_Subtitle("%s",GLB_S,x=10,y=height+100-current_frame,expx=true,expy=true)""")
The Fix was already incorporated into the zip of FunctionLists/FunctionList_creator_scripts previously posted.

Perhaps we need a NEO thread.
Could probably be fixed using Grunt style ScriptClip(args="S") instead of Global.

EDIT: Alternative script OK in v2.58, but error in NEO [EDIT: Thanx Grouchy, its a breeze to switch avs back and forth now with Universal Avisynth Installer ]
Code:
S="HELLO"
BlankClip.ScriptClip("""Subtitle(S)""")
Maybe some GitHub guy could post in Neo whotsit.

EDIT: To post #4629
Quote:
Maybe old DebugView, update.

DebugView v4.81(Published: December 4, 2012):- https://docs.microsoft.com/en-us/sys...oads/debugview

[Maybe you use Kernel mode a lot, I dont]

EDIT: I switch off option WIN32 PIDS, and always Force Carriage Returns [If you dont, some text disappears off RHS when not sending '\n' at end of lines].
EDIT: Above in BLUE why I now always use the below with auto add NewLine (rather than OutputDebugString directly).
Code:
int __cdecl dprintf(char* fmt, ...) {
    char printString[2048]="Shuffle: ";                             // Must be nul Termed, eg "Test: " or ""
    char *p=printString;
    for(;*p++;);
    --p;                                                            // @ null term
    va_list argp;
    va_start(argp, fmt);
    vsprintf(p, fmt, argp);
    va_end(argp);
    for(;*p++;);
    --p;                                                            // @ null term
    if(printString == p || p[-1] != '\n') {
        p[0]='\n';                                                  // append n/l if not there already
        p[1]='\0';
    }
    OutputDebugString(printString);
    return int(p-printString);                                      // strlen printString
}
__________________
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; 5th April 2019 at 17:37.
StainlessS is offline  
Old 5th April 2019, 18:59   #4633  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Is it not possible to use two instances of the same filter that each use conditional reader in AVIsynth+ with unique conditional arguments for each?

This does not give the results I would expect.
Code:
LoadPlugin("C:\HDTV Tools\DGMPGDec\DGDecode-x86.dll")

MPEG2Source("YMMB_2.d2v", idct=5, moderate_h=40, moderate_v=40, cpu2="oooooo")

ConvertBits(16)

ColorYUV(conditional=true, levels="TV", analyze=false)
ConditionalReader("offu_t.txt", "coloryuv_off_u", false)
ConditionalReader("offv_t.txt", "coloryuv_off_v", false)

#some processing here

ColorYUV(conditional=true, levels="TV", analyze=false)
ConditionalReader("off_y.txt", "coloryuv_off_y", false)
ConditionalReader("gain_y.txt", "coloryuv_gain_y", false)

ConvertBits(8, dither = 1)
The output is the same as this:
Code:
LoadPlugin("C:\HDTV Tools\DGMPGDec\DGDecode-x86.dll")

MPEG2Source("YMMB_2.d2v", idct=5, moderate_h=40, moderate_v=40, cpu2="oooooo")

ConvertBits(16)

ColorYUV(conditional=true, levels="TV", analyze=false)
ConditionalReader("offu_t.txt", "coloryuv_off_u", false)
ConditionalReader("offv_t.txt", "coloryuv_off_v", false)
ConditionalReader("off_y.txt", "coloryuv_off_y", false)
ConditionalReader("gain_y.txt", "coloryuv_gain_y", false)

#some processing here

ColorYUV(conditional=true, levels="TV", analyze=false)
ConditionalReader("offu_t.txt", "coloryuv_off_u", false)
ConditionalReader("offv_t.txt", "coloryuv_off_v", false)
ConditionalReader("off_y.txt", "coloryuv_off_y", false)
ConditionalReader("gain_y.txt", "coloryuv_gain_y", false)

ConvertBits(8, dither = 1)
It seems that all 4 ConditionalReader arguments in the script are seen by each of the ColorYUV instances. Is there some way to prevent each instance of the ColorYUV filter from seeing all 4 conditional reader arguments?
Stereodude is offline  
Old 6th April 2019, 00:37   #4634  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,100
Is that your actual script? To me it looks like you're reading the same files in both instances.
TheFluff is offline  
Old 6th April 2019, 00:57   #4635  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Quote:
Originally Posted by TheFluff View Post
Is that your actual script? To me it looks like you're reading the same files in both instances.
That's a simplified version of the actual script that shows the issue without having a pile of extra stuff in it. The actual script has other filters in between the two ColorYUV instances. Hence the #some processing here line.

I'm not sure what you're trying to say about the same files. Those two scripts have the exact same output. I'm asking if that's intentional. If so, can we have some sort of additional feature to segregate conditional reader statements in Avisynth+. Like a line that will be parsed by Avisynth+ and prevent all 4 ConditionalReader lines from being seen by both instances of the ColorYUV filter. Something that will cause conditional reader statements above the line to not be seen by filters below the line and vice versa.

Last edited by Stereodude; 6th April 2019 at 00:59.
Stereodude is offline  
Old 7th April 2019, 13:25   #4636  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
I have a filter which takes an array of floats as one of its arguments. It's instantiated like this:

Code:
AVSValue __cdecl Create_pyramid_mul(AVSValue args, void* user_data, IScriptEnvironment* env) {
	return new pyramid_mul(
		args[0].AsClip(),
		args[1],
		args[2].AsBool(false),
		env
	);
}
I want to create another function which only takes a single float argument, and constructs the array itself before calling the same constructor (below is just some test code which doesn't use the parameter):

Code:
AVSValue __cdecl Create_pyramid_blur(AVSValue args, void* user_data, IScriptEnvironment* env) {
	AVSValue multipliers[3] = { 0, 0, 1 };

	return new pyramid_mul(
		args[0].AsClip(),
		AVSValue(multipliers, 3),
		false,
		env
	);
}
But for some reason this doesn't work. Instead of receiving an array (0,0,1), the values the filter finds in the array are either 0, QNAN, or some random very large number.

Clearly my understanding of AVSValue objects and arrays is lacking. Can someone tell me the right way to do this?

---

Edit: is it because the AVSValue I'm sending to the filter - which I use in every GetFrame - is a pointer which becomes invalid after the constructor is called and the instantiator ends?
__________________
My AviSynth filters / I'm the Doctor

Last edited by wonkey_monkey; 7th April 2019 at 16:05.
wonkey_monkey is offline  
Old 7th April 2019, 16:13   #4637  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,100
Quote:
Originally Posted by Stereodude View Post
That's a simplified version of the actual script that shows the issue without having a pile of extra stuff in it. The actual script has other filters in between the two ColorYUV instances. Hence the #some processing here line.

I'm not sure what you're trying to say about the same files. Those two scripts have the exact same output. I'm asking if that's intentional. If so, can we have some sort of additional feature to segregate conditional reader statements in Avisynth+. Like a line that will be parsed by Avisynth+ and prevent all 4 ConditionalReader lines from being seen by both instances of the ColorYUV filter. Something that will cause conditional reader statements above the line to not be seen by filters below the line and vice versa.
What I mean is that both sets of calls to conditionalreader seem to be reading from the same input files. I'm asking if this is a mistake in your example script or not. If it's not a mistake, well, you would expect two function calls with the same parameters to give the same results, no?
TheFluff is offline  
Old 7th April 2019, 17:55   #4638  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,314
Quote:
Originally Posted by wonkey_monkey View Post
Code:
AVSValue __cdecl Create_pyramid_blur(AVSValue args, void* user_data, IScriptEnvironment* env) {
	AVSValue multipliers[3] = { 0, 0, 1 };

	return new pyramid_mul(
		args[0].AsClip(),
		AVSValue(multipliers, 3),
		false,
		env
	);
}
What happens if you try with floats?
AVSValue multipliers[3] = { 0.0f, 0.0f, 1.0f };
pinterf is offline  
Old 7th April 2019, 19:13   #4639  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
Same thing. It seems the object only exists during construction of the filter instance, whereas actual proper filter parameters persist. I made the filter take a copy during construction, and now it works as intended.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline  
Old 7th April 2019, 22:19   #4640  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Quote:
Originally Posted by TheFluff View Post
What I mean is that both sets of calls to conditionalreader seem to be reading from the same input files. I'm asking if this is a mistake in your example script or not. If it's not a mistake, well, you would expect two function calls with the same parameters to give the same results, no?
They're not the same in the script with two and two. They have similar names, but they're not the same.
Stereodude is offline  
Closed Thread


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 16:47.


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