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

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd November 2018, 08:45   #4321  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,095
Quote:
Originally Posted by GMJCZP View Post
Thanks pinterf.
What you say means that the next version of avs+ will admit "" as it does the classic avs?
Yes, in next release.
pinterf is offline   Reply With Quote
Old 7th December 2018, 03:26   #4322  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,093
AviSynth+ FilterGraph

I found something really cool from the AviSynth+ nekopanda fork. It is a function to output the flow of filter processing as a graph. See following pictures:

QTGMC(): https://i.imgur.com/JMWKKaO.png

SMDegrain(): https://i.imgur.com/56xKzxl.png

https://github.com/nekopanda/AviSynt...ilterGraph.cpp

Any possibility of this filter being incorporated into Avs+? There are other features in this fork as well:
https://github.com/nekopanda/AviSynt...i/Avisynth-Neo
https://github.com/nekopanda/AviSynt...e-New-Features
Reel.Deel is offline   Reply With Quote
Old 7th December 2018, 07:43   #4323  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,095
Yep, I know it, I was just looking into it yesterday. Good and brave modifications, Avisynth++. Also fixed some MT problems with runtime filters which I did't understand two years ago when I tried to fix it, and since then it was forgotten.
EDIT: Yesterday I was already trying to integrate the older ScriptClip related fixes. But in general the source code of the core (caching, video frame storage and allocations, frame properties (!), threading) became so much different and reworked that now it is not easy - or maybe impossible - to simply cherry-pick only one or two features. I have to mention though that as seen on QTGMC or TemporalDegrain when using CPU-only method it consumes more memory and is a bit slower than the current Avisynth+ version (x64, Win10, i7-7770). But it's the question of time when it's getting solved.

Last edited by pinterf; 7th December 2018 at 10:59. Reason: add experiences
pinterf is offline   Reply With Quote
Old 13th December 2018, 13:12   #4324  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,095
Doc updated for Overlay, VarExists, BuildPixelType, and ColorSpaceNameToPixelType
pinterf is offline   Reply With Quote
Old 14th December 2018, 01:35   #4325  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 1,618
This is probably a silly idea and probably not worth implementing even if it isn't, but is there any way for a plugin to set global AviSynths variable that can be used in the script? I'm thinking of those parameters were numbers just won't cut it, so they have to be specified as strings - like specifying a matrix for RGB->YUV conversion.

That seems really clunky, though, so I was wondering if there was a way to do something like this:

Code:
foo(clip, quality=FOO_BILINEAR)
foo(clip, quality=FOO_BICUBIC)
with FOO_BILINEAR and FOO_BICUBIC being declared somehow a bit like enums in C++ (having values of 0, 1, etc)? I'm guessing you could do it with an accompanying .avsi script, but can a DLL plugin arrange something like that by itself? By doing something with env in its Init thingy? (I still don't really know how plugins work despite the many I've written...)
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 14th December 2018, 04:47   #4326  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Germany
Posts: 482
Hi Ferenc.
I personally use Avisynth+ x86 32bit (both on my x64 and on my legacy x86 32bit systems) and I rely on that due to filters compatibility/consistency.
Whenever I have to allocate more than 4GB of RAM, I use MP_Pipeline, but it's not that fast and it doesn't support audio.
Anyway, do you think it can be modified to support audio, improved and included inside Avisynth+ x86 32bit?
Having a better and updated version of MP_Pipeline that also supports audio would be great, especially nowadays 'cause high bit depth and high resolutions require a lot of RAM.
I know that you have many things to do before even considering this one, but it's just a hint, whenever you have time. ^^

Thank you in advance and sorry if it's not 100% related to the Avisynth+ development (you are doing a great job by the way). ^_^
FranceBB is offline   Reply With Quote
Old 14th December 2018, 10:15   #4327  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 6,305
David,
Some Stuff (SetVar and SetGlobalVar pretty much the same usage):-

http://avisynth.nl/index.php/Filter_...I#SetGlobalVar
http://avisynth.nl/index.php/Filter_...API#SaveString
https://forum.doom9.org/showthread.p...21#post1572321
https://forum.doom9.org/showthread.p...ar#post1843591


If setting some kind of var (Local or Global) from within eg GetFrame, then suggest that in Constructor, check for existence of the var, and if does not exist, create it with dummy value (using env->SaveString for the variable name, so you know for sure that the name already exists when in GetFrame), also, if eg var type is string and with a known max possible size, then create dummy max size string for it and also SaveString.
In GetFrame, can then assume that var name already exists (and saved with SaveString), and so can just set value in already allocated and saved buffer.

EDIT: If using preallocated buffer, then just write to that buffer, dont SetVar, assuming that you kept address of SaveString buffer,
otherwise get the used buffer via GetVar, and extract the pointer to the buffer from the AVSValue and write to that buffer.
Quote:
SaveString

virtual char* SaveString(const char* s, int length = -1);

This function copies its argument to a safe "permanent" location and returns a pointer to the new location. Each ScriptEnvironment instance has a buffer set aside for storing strings, which is expanded as needed. The strings are not deleted until the ScriptEnvironment instance goes away (when the script file is closed, usually). This is usually all the permanence that is needed, since all related filter instances will already be gone by then. The returned pointer is not const-qualified, and you're welcome to write to it, as long as you don't stray beyond the bounds of the string.
If just setting with string literals, can just save var name via SaveString,and set var with address of string literal (dont need saving),
string literals are at constant address and read only.

Saving Strings, related to SetVar;
https://forum.doom9.org/showthread.p...36#post1633936

EDIT:
ApparentFPS constructor
Code:
ApparentFPS::ApparentFPS(PClip _child,double _DupeThresh,double _FrameRate,int _Samples,double _ChromaWeight,
    const char*_Prefix,bool _Show,bool _Verbose,bool _Debug,
    int _Mode,int _Matrix,int _BlkW,int _BlkH,int _oLapX,int _oLapY,
    IScriptEnvironment* env) :
    GenericVideoFilter(_child),DupeThresh(_DupeThresh),FrameRate(_FrameRate),Samples(_Samples),
    ChromaWeight(_ChromaWeight),Prefix(_Prefix),Show(_Show),Verbose(_Verbose),Debug(_Debug),
    Mode(_Mode),Matrix(_Matrix),BlkW(_BlkW),BlkH(_BlkH),oLapX(_oLapX),oLapY(_oLapY) {
    # ifdef AVISYNTH_PLUGIN_25
        if(vi.IsPlanar() && vi.pixel_type != 0xA0000008) {
            // Here Planar but NOT YV12, If v2.5 Plugin Does NOT support ANY v2.6+ ColorSpaces
            env->ThrowError("ApparentFPS: ColorSpace unsupported in ApparentFPS v2.5\n");
        }
    # endif
    num_frames      = vi.num_frames;
    Dif             = 0.0;
    AppFPS          = 0.0;
    MaxAppFPS       = 0.0;
    MaxBelowDupeDif = 0.0;
    MinAboveDupeDif = 255.0;
    Unique          = 0;
    Valid           = 0;
    UniqMax         = 0;
    LftSpan         = 0;
    RgtSpan         = 0;
    Prev_n          = -666;
    int i;
    for(i=5;--i>=0;)    VarNames[i][0]='\0';
    if(*Prefix != '\0') {
        char *names[5]={"ApparentFPS","MaxApparentFPS","MaxBelowDupeDif","MinAboveDupeDif","CurrentDif"};
        int pfixlen=int(strlen(Prefix));
        if(pfixlen>128) pfixlen=128;
        for(i=5;--i>=0;) {
            char * p = VarNames[i];
            memcpy(p,Prefix,pfixlen);
            char *d=p+pfixlen;
            const char *np=names[i];
            for(;*d++=*np++;);          // strcat variable name part
            AVSValue var = GetVar(env,p);
            env->SetVar(var.Defined() ? p : env->SaveString(p),(i==3)?255.0:0.0); // Make sure name exists, init with dummy value
        }
    }
}
GetFrame
Code:
PVideoFrame __stdcall ApparentFPS::GetFrame(int n, IScriptEnvironment* env) {

 ...


    if(*Prefix != '\0') {
        env->SetVar(VarNames[0],AppFPS);
        env->SetVar(VarNames[1],MaxAppFPS);
        env->SetVar(VarNames[2],MaxBelowDupeDif);
        env->SetVar(VarNames[3],MinAboveDupeDif);
        env->SetVar(VarNames[4],Dif);
    }

 ...
}
EDIT: Take NOTE that GetVar() [by Gavino] is in the 3rd link.

EDIT: Again here:
Code:
AVSValue __cdecl GetVar(IScriptEnvironment* env, const char* name) {
    try {return env->GetVar(name);} catch (IScriptEnvironment::NotFound) {} return AVSValue();}
If you have any probs, post again. [EDIT: Perhaps ask a mod to move your post and this one to new thread]

EDIT:
Also AtExit function, maybe to release buffers if you allocate them for strings yourself.
http://avisynth.nl/index.php/Filter_SDK/Non-clip_sample
EDIT: Not sure, think you can forget AtExit above, I seem to remember that it is called AFTER plugins are destroyed, so may not work.
EDIT: Think maybe above wrong, plugins do still exist, its the filter graph that is already destroyed (otherwise there would be no point in the AtExit function if plugins already gone, basically dont count on any avisynth structures existing during call from AtExit).


EDIT:
Return constants rather than variables, simple really.
Code:
#include <windows.h>

#ifdef AVISYNTH_PLUGIN_25
    #include "avisynth25.h"
#else
    #include "avisynth.h"
#endif

AVSValue __cdecl Foo_Bilinear(AVSValue args, void* user_data, IScriptEnvironment* env) {
    return "12345678";  // Constant address read only, no need to SaveString
}

AVSValue __cdecl Foo_BiCubic(AVSValue args, void* user_data, IScriptEnvironment* env) {
    return "87654321";
}

AVSValue __cdecl Foo_PI(AVSValue args, void* user_data, IScriptEnvironment* env) {
    return 3.1415926f;
}

AVSValue __cdecl Foo_Life(AVSValue args, void* user_data, IScriptEnvironment* env) {
    return 42;
}

#ifdef AVISYNTH_PLUGIN_25
    extern "C" __declspec(dllexport) const char* __stdcall AvisynthPluginInit2(IScriptEnvironment* env) {
#else
    const AVS_Linkage *AVS_linkage = 0;
    extern "C" __declspec(dllexport) const char* __stdcall
            AvisynthPluginInit3(IScriptEnvironment* env, const AVS_Linkage* const vectors) {
    AVS_linkage = vectors;
#endif
    env->AddFunction("FOO_BILINEAR",    "", Foo_Bilinear, 0);
    env->AddFunction("FOO_BICUBIC",     "", Foo_BiCubic, 0);
    env->AddFunction("FOO_PI",  "",     "", Foo_PI, 0);
    env->AddFunction("FOO_Life",        "", Foo_Life, 0);
    return "`DHorman Presets' DHorman plugin";
}
__________________
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; 19th December 2018 at 04:44.
StainlessS is offline   Reply With Quote
Old 14th December 2018, 19:37   #4328  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 1,618
Thanks Stainless. I think env->SetGlobalVar does what I want. Whether it's a good idea or not... well, I don't know if it will suit everyone, but I like what I can do with it and I will probably use it in filters in the future, with suitable variable names that are extermely unlikely to clash with anyone's scripts.

Another thought I had, and again it's probably a bit too odd an idea to implement, is that it'd be great if plugins could provide their own short help text. Instead of having to keep looking things up, there could be an "Explain" or "Help" function that you could call with a filter name, and it would give (thrown as an exception, perhaps) a list of its known parameters, and maybe some brief text for each one. I see that AvisynthPluginInit3 expects you to return a string, but don't know of any way to call that string up in a script.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 14th December 2018, 20:13   #4329  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 6,305
Quote:
extermely unlikely to clash with anyone's scripts.
That is not the reason for SaveString, its because Avisynth memory pool is not the same as your memory pool, and so you have to hand over control
of the string for freeing via Avisynth, and leaving Avisynth in charge of it and responsible for the freeing of the memory block. (otherwise memory leaks).
[Above incase you meant that you were not gonna bother with SaveString].

I have never seen the string returned by AvisynthPluginInit2/3 used by anything (with possible exception of AvsEdit, not sure if it used it, and perhaps AvsPMod does too). [EDIT: At least one plugin (dont remember which) returns 0 where it should return that string, so a program trying to access it as a string might cause a system exception/access violation]

I guess that some kind of simple (even script) function could be knocked up to show doc text on video clip,
would need (how I see it) an RT_Stats DBase with eg string name of function, and string name of a txt file on hard drive.
Look for name of function in DBase, if not found then error.
Else read in associated string filename from DB, and read text from doc file, and RT_Subtlte as in the RT_Stats subtitle demo in the avs folder of RT_Stats.

So would use something like return Man("amp").

Demo From RT_Stats using RT_Subtitle (In the AVS directory).

RT_SCROLLDEMO.avs (will open fileselector, you choose an avi file, and then a text file and it will display that text upon the avi).
Code:
avi = RT_FSelOpen("Please select an AVI file",Filt="*.AVI|*.AVI")
Assert(avi.IsString,"RT_FSelOpen: Error="+String(avi))
AVISource(AVI)
txt = RT_FSelOpen("And now select a Text file",Filt="*.txt|*.txt")
Assert(txt.IsString,"RT_FSelOpen: Error="+String(txt))
Txt=RT_ReadTxtFromFile(txt)
Lines=RT_TxtQueryLines(Txt)
# config
DELAY=100
ALIGN=1			# As Numeric KeyPad
SCROLL=0		# 0 = Upwards : 1 = Downwards : 2 = Right to Left : 3 = Left to right : 4 = Karaoke
#
ORG=Last
Last=(SCROLL==4)? ORG.Blankclip(height=80) : Last
CMD_0 = """RT_Subtitle("%s",Txt,align=ALIGN,y=height+DELAY-current_frame,expx=true,expy=true)"""
CMD_1 = """RT_Subtitle("%s",Txt,align=ALIGN,y=-(Lines*20+DELAY) + current_frame,expx=true,expy=true)"""
CMD_2 = """RT_Subtitle("%s",Txt,align=ALIGN,x=width+DELAY-current_frame,expx=true,vcent=true)"""
CMD_3 = """RT_Subtitle("%s",Txt,align=ALIGN,x=-(width+DELAY)+current_frame,expx=true,vcent=true)"""
CMD_4 = """RT_Subtitle("%s",Txt,align=ALIGN,y=height+DELAY-current_frame,expx=true,expy=true)"""
CMD_5 = """RT_Subtitle("BAD SCROLL COMMAND (0->4)")"""
CMD = (SCROLL<0 || SCROLL>4) ? CMD_5 : Select(Scroll,CMD_0,CMD_1,CMD_2,CMD_3,CMD_4)
ScriptClip(CMD)
Return (SCROLL==4)? StackVertical(ORG,Last) : Last
EDIT: I guess that you could even eg open notepad and feed it the doc text file.
Doc files could actually be stored as string in a DB, but strings are of fixed max size and so might have to allocate eg 64KB (in DB) each, even for tiny doc files.

EDIT: Even script functions could be stored in DBase, and an Eval/GScript would implant them in current script.
EDIT: For the man thing, could even have a DBase of DBase Names, where each sub DBase record might hold eg an argument name as string, and min value, max value, and some short (eg 1KB) description of the arg. (perhaps more)

EDIT: Each DBase, also has 10 user string attributes (Max 1024 len) for whatever you wish, and 1024 Int or Float user attributes, again for whatever
you want, perhaps link to website download or whatever [for StringUserAttrib(0)], and version number for Float UserAttrib(0).
__________________
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; 14th December 2018 at 21:12.
StainlessS is offline   Reply With Quote
Old 15th December 2018, 00:30   #4330  |  Link
goorawin
Registered User
 
Join Date: Feb 2012
Posts: 64
Quote:
Originally Posted by FranceBB View Post
Hi Ferenc.
I personally use Avisynth+ x86 32bit (both on my x64 and on my legacy x86 32bit systems) and I rely on that due to filters compatibility/consistency.
Whenever I have to allocate more than 4GB of RAM, I use MP_Pipeline, but it's not that fast and it doesn't support audio.
Anyway, do you think it can be modified to support audio, improved and included inside Avisynth+ x86 32bit?
Having a better and updated version of MP_Pipeline that also supports audio would be great, especially nowadays 'cause high bit depth and high resolutions require a lot of RAM.
I know that you have many things to do before even considering this one, but it's just a hint, whenever you have time. ^^

Thank you in advance and sorry if it's not 100% related to the Avisynth+ development (you are doing a great job by the way). ^_^
You can add audio to pipeline by adding it outside the pipeline script, so why would you bother including it within the script?
goorawin is offline   Reply With Quote
Old 16th December 2018, 12:17   #4331  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Posts: 2,381
After using AVS+ for a few months on my Core i5 (two physical cores plus hyperthreading) I decided to revert back to AviSynth 2.61 Alpha.

I don't have any use for high bit depth and all the new fancy color spaces. I also cannot use the 64-bit version because I absolutely need to use some 32-bit plugins. All I wanted was a speed boost by using MT modes for my AVS plugins, but I was quite disappointed.

My main sources are captured HD files in the HEVC format. My source filters are DSS2Mod and ffms2 (I do not like LSMASH, and I cannot use DGDecNV). And for both source filters the decoding speed is unacceptable with these HEVC sources.

With DSS2Mod the speed tends to be OK at the start, but after a while the speed drops to a snail's pace. With ffms2 it is even worse, speed is about one tenth compared to disabling MT.

With AVS+ the solution is to disable MT, but why would I want to do this? Under AviSynth 2.61 Alpha I get even better speed.


Cheers
manolito
manolito is offline   Reply With Quote
Old 16th December 2018, 12:31   #4332  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 542
Maybe the bottleneck is the hdd (cache is full)? How huge are the files?

You can combine 64bit with 32bit filters (and speed up things) with MP_Pipeline: https://forum.doom9.org/showthread.php?t=163281
__________________
Search and denoise

Last edited by ChaosKing; 16th December 2018 at 12:35.
ChaosKing is offline   Reply With Quote
Old 16th December 2018, 12:43   #4333  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Germany
Posts: 482
Quote:
You can add audio to pipeline by adding it outside the pipeline script, so why would you bother including it within the script?
I could, but if there's a framerate conversion in-between my filter-chain, it would be out of sync.
FranceBB is offline   Reply With Quote
Old 16th December 2018, 14:48   #4334  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 1,618
Bug? When calling extracttoy on a Y8 clip, AviSynth+ complains that there are no chroma channels.

Edit: also minor cosmetic issue: colorbars with pixel_types YV12 and YV24 do not line up exactly. I'm guessing because the bars have to align with chroma subsampling in the YV12 case, but (if someone was so inclined) I would suggest YV24 should be forced to do the same for consistency (with 4:2:0 and 4:1:1 as well), even though it isn't subsampled.
__________________
My AviSynth filters / I'm the Doctor

Last edited by wonkey_monkey; 16th December 2018 at 14:54.
wonkey_monkey is offline   Reply With Quote
Old 16th December 2018, 16:37   #4335  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,095
Quote:
Originally Posted by davidhorman View Post
Bug? When calling extracttoy on a Y8 clip, AviSynth+ complains that there are no chroma channels.
It was fixed on git but not released yet.
pinterf is offline   Reply With Quote
Old 18th December 2018, 13:55   #4336  |  Link
Groucho2004
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Posts: 4,033
Quote:
Originally Posted by pinterf View Post
It was fixed on git but not released yet.
Any chance you'd put a new release under our trees before the holidays?
Groucho2004 is offline   Reply With Quote
Old 18th December 2018, 14:38   #4337  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,095
Quote:
Originally Posted by Groucho2004 View Post
Any chance you'd put a new release under our trees before the holidays?
Probably yes.
pinterf is offline   Reply With Quote
Old 18th December 2018, 16:29   #4338  |  Link
Groucho2004
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Posts: 4,033
Quote:
Originally Posted by pinterf View Post
Probably yes.
Cool, thanks.
Groucho2004 is offline   Reply With Quote
Old 18th December 2018, 17:17   #4339  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 986
Quote:
Originally Posted by DJATOM View Post
Try dfttest(sigma=2, lsb=true) with MT mode 2 and check if it fails. It might be dfttestMC problem.
I have some issues with your build (actually all builds but your explcitly since is the most up to date).
I get "illegal instruction" message. Using:
Code:
Setfiltermtmode("dfttest", 2)
or with/without Prefetch(4), in avs+ x64, so far the only plugin that doesn't work (well wishing SoundOut and ClipClop as well). I'm using libfftw3f-3.dll from fftw338-x64-AVX2 though.
Dogway is offline   Reply With Quote
Old 18th December 2018, 18:27   #4340  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,095
O.K., it's been a long time since I released any update here, no big things included, only a new build. A sort of a maintenance release.

Download Avisynth+ r2768-MT

The files-only section also contains an x86 build for SSE-only processors.

This release features an interesting language extension: inline assignments, contributed by a new fellow developer addewyd.

Enjoy.

Code:
# Avisynth+ r2768 (20181218)
https://forum.doom9.org/showthread.php?t=168856

- New: Expr: allow input clips to have more planes than an implicitely specified output format
  Expr(aYV12Clip, "x 255.0 /", format="Y32") # target is Y only which needs only Y plane from YV12 -> no error
- New: Expr: Y-plane-only clip(s) can be used as source planes when a non-subsampled (rgb or 444) output format implicitely specified 
  Expr(Y, "x", "x 2.0 /", "x 3.0 /", format="RGBPS") # r, g and b expression uses Y plane
  Expr(Grey_r, Grey_g, Grey_b, "x", "y 2.0 /", "z 3.0 /", format="RGBPS") # r, g and b expression uses Y plane
- Fix: ConvertToYUY2() error message for non-8 bit sources.
- Fix: Y32 source to 32 bit 420,422,444 (introduced in the zero-chroma-center transition project)
- Fix: ShowY, ShowU, ShowV crash for YUV (non-YUVA) sources
- Speedup: ConvertToY12/16... for RGB or YUY2 sources where 4:4:4 or YV16 intermediate clip was used internally
  (~1.5-2x speed, was a regression in Avs+, use intermediate cache again)
- Fix: Allow ExtractY on greyscale clips
- ImageReader/ImageSource: use cache before FreezeFrame when result is a multiframe clip (fast again, regression since an early AVS+ version)
- Resizers: don't use crop at special edge cases to avoid inconsistent results across different parameters/color spaces
- Fix: Histogram 'classic': rare incomplete histogram shown in multithreading environment
- Fix: ImageReader and ImageWriter: if path is "" then it works from/to the current directory.
- GeneralConvolution: Allow 7x7 and 9x9 matrices (was: 3x3 and 5x5)
- GeneralConvolution: All 8-32 bit formats (was: RGB32 only): YUY2 is converted to/from YV16, RGB24/32/48/64 are treated as planar RGB internally
  Since 32 bit float input is now possible, matrix elements and bias parameter now is of float type.
  For 8-16 bit clips the matrix is converted to integer before use.
- GeneralConvolution: Allow chroma subsampled formats to have their luma _or_ chroma processed. E.g. set chroma=false for a YV12 input.
- GeneralConvolution: new parameters: boolean luma (true), boolean chroma(true), boolean alpha(true)
    Default: process all planes. For RGB: luma and chroma parameters are ignored. 
    Unprocessed planes are copied. Using alpha=false makes RGB32 processing faster, usually A channel is not needed.
- GeneralConvolution: MT friendly parameter parsing
- New: UTF8 filename support in AviSource, AVIFileSource, WAVSource, OpenDMLSource and SegmentedAVISource
  All functions above have a new bool utf8 parameter. Default value is false. 
- Experimental: new syntax element (by addewyd): assignment operator ":=" which returns the assigned value itself.
  (Assignment within an expression) 
  Examples:
    w := h := 256

    b := blankclip(width=w * 2, height = h * 3, length=40, pixel_type="yv12")
    bm = blankclip(width=w, height = w).letterbox(2,0,2,0, color=$ff)
    b

    for(j = 0, 1, 1) {
        for(i = 0, 1, 1) {
            e = 0 + i * 16 + j * 16 * 4
            ce = string(e)
            c = bm.subtitle("Y = 0x" + hex(e) + " " + ce)
            eval("c" + string(i) + string(j) + " := c")
            b := b.overlay(c, x = i * w, y = j * h)
        }
    }

    cx = c00.trim(0, 9) + c01.trim(0, 9) + c10.trim(0, 9) + c11.trim(0, 9) 

    b := overlay(cx, x = 0, y = w * 2)

     /* defined NEW_AVSVALUE at build */
    array = [99, 101, "303", cnt := 4]

    for(j = 0, cnt - 1, 1) {
        b := subtitle(string(array[ind := j]), x = 100, y=(j+1) * 20)
    }

    g := b.tstfunc(kf := "first", ks := "second")

    g := subtitle((s := 4) > 0 ? t := "left" : t := "right", y = 100)
    g := subtitle(string(s) + " " + t + " " + ks, y = 150)

    eval("""h := g.subtitle("G", x=200, y = 20)""")

    h.subtitle("H " + string(ind), x = 300, y = 20)


    function tstfunc(c, d, e) {
        if (f := 1 < 2) {
            c.subtitle(string(f) + e, y = 50)
        } else {
            c.subtitle(d, y = 50)
        }
    }

Last edited by pinterf; 18th December 2018 at 18:29.
pinterf is offline   Reply With Quote
Reply

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 20:14.


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