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. |
4th April 2019, 09:14 | #4622 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
Last one on list, Code:
YPlaneMinMaxDifference "c[threshold]fi" Whereas NEO Code:
YPlaneMinMaxDifference "c[threshold]f[offset]i" 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. |
|
4th April 2019, 11:08 | #4623 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
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 }, |
|
4th April 2019, 13:26 | #4624 | Link | |
HeartlessS Usurer
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") Code:
00000011 13:16:13.462 [2900] RT_DebugF: PLUG=YPlaneMinMaxDifference PARAM=c[threshold]fi Quote:
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); }
__________________
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. |
|
4th April 2019, 14:01 | #4626 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
That's nasty.
__________________
Groucho's Avisynth Stuff |
4th April 2019, 14:17 | #4627 | Link | ||
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
I've never seen swallowed output in OutputDebugString (and I've often sent biggish text files to OutputDebugString for capture and checking) Quote:
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" 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. |
||
4th April 2019, 15:07 | #4629 | Link |
HeartlessS Usurer
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. |
4th April 2019, 15:47 | #4630 | Link |
Formerly davidh*****
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. |
4th April 2019, 16:34 | #4631 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
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. |
|
5th April 2019, 02:32 | #4632 | Link | |
HeartlessS Usurer
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)""") 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)""") 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)""") EDIT: To post #4629 Quote:
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. |
|
5th April 2019, 18:59 | #4633 | Link |
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) 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) |
6th April 2019, 00:57 | #4635 | Link | |
Registered User
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
|
Quote:
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. |
|
7th April 2019, 13:25 | #4636 | Link |
Formerly davidh*****
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 ); } 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 ); } 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? Last edited by wonkey_monkey; 7th April 2019 at 16:05. |
7th April 2019, 16:13 | #4637 | Link | |
Excessively jovial fellow
Join Date: Jun 2004
Location: rude
Posts: 1,100
|
Quote:
|
|
7th April 2019, 17:55 | #4638 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
AVSValue multipliers[3] = { 0.0f, 0.0f, 1.0f }; |
|
7th April 2019, 19:13 | #4639 | Link |
Formerly davidh*****
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.
|
7th April 2019, 22:19 | #4640 | Link | |
Registered User
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
|
Quote:
|
|
|
|