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. |
20th January 2019, 01:50 | #4401 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Fixed, sorry.
If size specifier is wrong then gets only first four bytes (half of __int64 start, bytes 0 to 3) from stack for vsprintf start arg, vsprintf count would come from 2nd half (4 bytes, bytes 4 to 7) of start, so count on stack would NOT be accessed at all. EDIT: for other readers, the vsprintf mentioned stuff, think Wonkey is using something like this Code:
int __cdecl dprintf(char* fmt, ...) { char printString[2048]="WonkeyWilly: "; // 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 } Quote:
__________________
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; 20th January 2019 at 19:29. |
|
20th January 2019, 12:26 | #4402 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,496
|
It's a magic number to flip GetAudio into providing something other than audio. Negative numbers were making it crash, so I must have copied-and-pasted mid-testing. The comparison in GetAudio should be with the positive number.
I've abandoned that idea now because of the possible caching/bounds checking issue (something is intercepting the call and aborting it because the clip doesn't have that many samples). Now I'm calling it with start=0 and passing the magic number in the buffer. I'm not sure this will work either, because it's possible the returned values for a given start/count will change, and if something is caching them then it will interfere. |
20th January 2019, 18:55 | #4403 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Avs+ Feature request:
Layer with YV24 support would be nice [think I requested this in avs Standard thread] I would like to mod S_ExLogo() for YV24, currently only YUY2 [Layer also supports RGB32 & under avs+ RGB64]. S_ExLogo[YUY2 Only]:- https://forum.doom9.org/showthread.p...light=S_ExLogo Code:
# Based on Dekafka (YUY2 Only) # # HHHHHH s_Exlogo, samples above and below (shown left as 'H') # VLLLLLLV and combines them into a horizontal bar. # VLLLLLLV Samples left and right and combines them into a vertical bar (show as 'V'. # VLLLLLLV Logo area shown as 'L'. # VLLLLLLV These bars may or may not be blurred, and are then resized to fit # HHHHHH the logo area. The resized bars are then mixed together based # on arg "Spow" and the ratio of length of Vertical bars to length # of horizontal bars. Finally, the resultant de-logo'd area is # Layer'ed onto the clip using the Amount arg. # Clipping can be set so as to avoid eg sampling letterboxing when # blurring out the logo (would normally result in nasty black # block instead of a nasty logo). # # Basic usage:- # s_ExLogo(clip, int LogoX, int LogoY, int LogoW, Int LogoH) EDIT: Despite what it says on the Wiki, Dekafka supports only YUY2, RGB32, RGB64(same as Layer). Quote:
__________________
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; 20th January 2019 at 19:31. |
|
21st January 2019, 14:29 | #4404 | Link |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Good catch, Layer is somewhat retarded at the moment. YUY2 is supported so there should be no complain why it's missing other YUV formats. Nor it does support planar RGB, what a world we live in.
Problem registered, and will be solved, well before the next lunar eclipse (but not this week), thanks for the report |
21st January 2019, 14:52 | #4405 | Link | ||
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
Me is a happy bunny, Thanx. EDIT: Quote:
__________________
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; 21st January 2019 at 15:05. |
||
23rd January 2019, 18:20 | #4406 | Link |
Registered User
Join Date: Dec 2012
Posts: 163
|
Excuses my ignorance, but what is the latest release of avisynth (or what ever it has morphed into)?
Is there a better fork to use than standard avisynth, as i used to use AvsPmod in conjunction with avisynth is there an all in one app now a days? |
23rd January 2019, 19:23 | #4407 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
BockABoots,
Here, Avisynth+ r2772, usually via pinterf sig link "My Avisynth+ repo on github", and then click Releases tab:- https://github.com/pinterf/AviSynthPlus/releases Above (current avs+) is the only one that everybody should be using.
__________________
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; 23rd January 2019 at 22:02. |
24th January 2019, 00:35 | #4409 | Link | |
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
|
Quote:
On an old computer with low system RAM and a single core CPU AVS+ does run, but it is way slower than plain vanilla AVS 2.60 (or 2.61 Beta). The only reason to use AVS+ on such a computer is if the user needs the high bit depth and extented color space features of AVS+. Even on a much newer Core i5 CPU with 8 GB system RAM I found that I had to turn off multithreading completely when using ffms2 as the source filter (in the default serialized mode). Speed dropped to a crawl when the prefetch value was set to 4. So I do see a few good reasons to prefer AVS 2.60 over AVS+. Cheers manolito |
|
24th January 2019, 01:01 | #4411 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Can you post an example script which would show that classic Avisynth uses less memory than AVS+? My expierence is that AVS+ is much more efficient using the available memory.
__________________
Groucho's Avisynth Stuff |
24th January 2019, 11:08 | #4412 | Link | |||
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
Quote:
FrameSel plugin, 2nd arg is array of frame numbers, Quote:
Code:
AVSValue __cdecl Create_FrameSel(AVSValue args, void* user_data, IScriptEnvironment* env) { PClip _child = args[0].AsClip(); // Source Clip, No Default AVSValue _Frames = args[1]; // Frames, Array of frame numbers as filter arguments const char *_SCmd = args[2].AsString(NULL); // SCmd, Frames in string, defaults to NULL const char *_Cmd = args[3].AsString(NULL); // Cmd, Frames Cmd File, defaults to NULL bool _show = args[4].AsBool(false); // show, show frame numbers bool _ver = args[5].AsBool(false); // ver, show version bool _reject = args[6].AsBool(false); // Reject Mode bool _ordered= args[7].AsBool(true); // ordered Mode bool _debug = args[8].AsBool(false); // debug int _extract = args[9].AsInt(1); // extract if(_SCmd && *_SCmd == '\0') _SCmd=NULL; // Convert user supplied "" to NULL if(_Cmd && *_Cmd == '\0') _Cmd=NULL; // Convert user supplied "" to NULL // if(_Cmd==NULL && _SCmd==NULL && _Frames.ArraySize()==0) // return _child; // No frames specified at all, return orig clip as if no filter. return new FrameSel(_child,_Frames,_SCmd,_Cmd,_show,_ver,_reject,_ordered,_debug,_extract,env); }
__________________
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; 24th January 2019 at 11:13. |
|||
24th January 2019, 11:58 | #4413 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,496
|
Oh, sorry, I meant is it possible to construct an AVSValue with an ArraySize() of zero? I tried AVSValue x = AVSValue() but it had an ArraySize() of 1.
I'm using two creator functions which both instantiate the same class - one includes an i+ in its parameter definition, the other doesn't (but does have all the other variables). I also tried passing NULL but C++ wouldn't let me compare an AVSValue with NULL. It's very easy to work around but I always try to strive for a neat solution (even if my source code doesn't suggest it). |
24th January 2019, 12:27 | #4414 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
For anything like that, I tend to look at Avisynth VERSION 3 header (v2.58) with baked code.
Code:
class AVSValue { public: AVSValue() { type = 'v'; } AVSValue(IClip* c) { type = 'c'; clip = c; if (c) c->AddRef(); } AVSValue(const PClip& c) { type = 'c'; clip = c.GetPointerWithAddRef(); } AVSValue(bool b) { type = 'b'; boolean = b; } AVSValue(int i) { type = 'i'; integer = i; } // AVSValue(__int64 l) { type = 'l'; longlong = l; } AVSValue(float f) { type = 'f'; floating_pt = f; } AVSValue(double f) { type = 'f'; floating_pt = float(f); } AVSValue(const char* s) { type = 's'; string = s; } AVSValue(const AVSValue* a, int size) { type = 'a'; array = a; array_size = size; } AVSValue(const AVSValue& v) { Assign(&v, true); } ~AVSValue() { if (IsClip() && clip) clip->Release(); } AVSValue& operator=(const AVSValue& v) { Assign(&v, false); return *this; } // Note that we transparently allow 'int' to be treated as 'float'. // There are no int<->bool conversions, though. bool Defined() const { return type != 'v'; } bool IsClip() const { return type == 'c'; } bool IsBool() const { return type == 'b'; } bool IsInt() const { return type == 'i'; } // bool IsLong() const { return (type == 'l'|| type == 'i'); } bool IsFloat() const { return type == 'f' || type == 'i'; } bool IsString() const { return type == 's'; } bool IsArray() const { return type == 'a'; } PClip AsClip() const { _ASSERTE(IsClip()); return IsClip()?clip:0; } bool AsBool() const { _ASSERTE(IsBool()); return boolean; } int AsInt() const { _ASSERTE(IsInt()); return integer; } // int AsLong() const { _ASSERTE(IsLong()); return longlong; } const char* AsString() const { _ASSERTE(IsString()); return IsString()?string:0; } double AsFloat() const { _ASSERTE(IsFloat()); return IsInt()?integer:floating_pt; } bool AsBool(bool def) const { _ASSERTE(IsBool()||!Defined()); return IsBool() ? boolean : def; } int AsInt(int def) const { _ASSERTE(IsInt()||!Defined()); return IsInt() ? integer : def; } double AsFloat(double def) const { _ASSERTE(IsFloat()||!Defined()); return IsInt() ? integer : type=='f' ? floating_pt : def; } const char* AsString(const char* def) const { _ASSERTE(IsString()||!Defined()); return IsString() ? string : def; } int ArraySize() const { _ASSERTE(IsArray()); return IsArray()?array_size:1; } const AVSValue& operator[](int index) const { _ASSERTE(IsArray() && index>=0 && index<array_size); return (IsArray() && index>=0 && index<array_size) ? array[index] : *this; } private: short type; // 'a'rray, 'c'lip, 'b'ool, 'i'nt, 'f'loat, 's'tring, 'v'oid, or 'l'ong short array_size; union { IClip* clip; bool boolean; int integer; float floating_pt; const char* string; const AVSValue* array; // __int64 longlong; }; void Assign(const AVSValue* src, bool init) { if (src->IsClip() && src->clip) src->clip->AddRef(); if (!init && IsClip() && clip) clip->Release(); // make sure this copies the whole struct! ((__int32*)this)[0] = ((__int32*)src)[0]; ((__int32*)this)[1] = ((__int32*)src)[1]; } }; Code:
AVSValue(const AVSValue* a, int size) { type = 'a'; array = a; array_size = size; } int ArraySize() const { _ASSERTE(IsArray()); return IsArray()?array_size:1; } Code:
AVSValue a[0]; EDIT: Some existing code that works, Code:
AVSValue std1[STD_SIZE] = {child,0,0,0,0,0,0,false}; AVSValue xtra1[XTRA_SIZE]; xtra1[XTRA_RGBIX] = matrix; std1[STD_FRAME] = n; AVSValue std2[STD_SIZE] = {child2,0,0,0,0,0,0,false}; AVSValue xtra2[XTRA_SIZE]; xtra2[XTRA_RGBIX] = matrix; std2[STD_FRAME] = n2; MYLO mylo; RT_MYstats_Lo(RTHIST_F,AVSValue(std1,STD_SIZE),AVSValue(xtra1,XTRA_SIZE),mylo,myName,env,hist1); RT_MYstats_Lo(RTHIST_F,AVSValue(std2,STD_SIZE),AVSValue(xtra2,XTRA_SIZE),mylo,myName,env,hist2);
__________________
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; 24th January 2019 at 13:43. |
24th January 2019, 23:29 | #4416 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,496
|
It's just occured to me that the "child" clip in the GenericVideoFilter constructor shouldn't really be called "child", should it? It should be "parent".
Not suggesting it should be changed, of course, just making an observation! |
25th January 2019, 06:52 | #4417 | Link | |
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
|
Quote:
Just found out that DirectShowSource.dll from the Non-SSE2 folder seems to be broken. It sure does not work without SSE2. Using the older DirectShowSource.dll from the qyot27 build avisynth _r2741-g0cb91abf-20180803 fixes it. Cheers manolito |
|
25th January 2019, 07:09 | #4418 | Link | |||
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
|
Quote:
Specs: I tested it again using a short HD clip and converted it to DVD. I used two scripts, the first one is very basic, the second one uses jm_fps (frame rate interpolation) and is much slower. These are the scripts: Easy.avs: Quote:
Hard.avs: Quote:
And these are the AVSMeter results for plain vanilla AVS 2.61 Alpha and for the current AVS+ version: bilder hochladen free For me this is enough reason to not use AVS+ on this computer. It is slow enough as it is, but slowing it down even more without any additional benefit does not make sense to me. Cheers manolito Last edited by manolito; 25th January 2019 at 07:13. |
|||
25th January 2019, 07:50 | #4419 | Link | |
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,420
|
Quote:
Being a system library, I'm pretty sure I always make sure to compile that piece using /ARCH:IA32 (i.e., none at all) for 32-bit. |
|
25th January 2019, 11:45 | #4420 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
I used basically the same script as your "hard.avs" with a 720p clip and here are the results with my i5:
Code:
AviSynth 2.61, build:May 17 2016 [16:06:18] VC2008Exp FPS (min | max | average): 18.57 | 198864 | 46.70 Process memory usage (max): 592 MiB Thread count: 13 CPU usage (average): 24.9% Code:
AviSynth+ 0.1 (r2772, MT, i386) FPS (min | max | average): 18.64 | 137675 | 46.88 Process memory usage (max): 142 MiB Thread count: 20 CPU usage (average): 24.6% Code:
MEMORYSTATUS memstatus; GlobalMemoryStatus(&memstatus); // Minimum 16MB // else physical memory/4 // Maximum 0.5GB if (memstatus.dwAvailPhys > 64*1024*1024) memory_max = (__int64)memstatus.dwAvailPhys >> 2; else memory_max = 16*1024*1024; if (memory_max <= 0 || memory_max > 512*1024*1024) // More than 0.5GB memory_max = 512*1024*1024;
__________________
Groucho's Avisynth Stuff Last edited by Groucho2004; 25th January 2019 at 13:02. |
Thread Tools | Search this Thread |
Display Modes | |
|
|