Log in

View Full Version : AviSynth 2.6.0 Alpha5 [Sep 18th, 2013]


Pages : [1] 2 3

IanB
18th September 2013, 12:05
Here is the 5th official release of Avisynth 2.6

Get AviSynth_130918.exe (5MiB) (http://sourceforge.net/projects/avisynth2/files/AviSynth_Alpha_Releases/AVS%202.6.0%20Alpha%205%20%5B130918%5D/AviSynth_130918.exe/download) from SourceForge.

========================
Changelist

Additions
* Added Eval(clip, string name, string) alias for oop processing of argument.
* DirectShowSource support non-standard pixel types "YV24" and "YV16".
* Info: Audio only clip now creates its own canvas video.
* AviSource: Include packed/padded processing and -ve biHeight logic for compressed input.
* Add Script Functions :- BitLRotate, BitRRotate, BitChange, BitClear, BitSet, BitTest and their asm aliases.
* Add WeaveRows (blit cost) and WeaveColumns (slow) frame combining filters.
* Add AudioDuration() [as float seconds], IsY8(), IsYV411() & PixelType() [as a string] script functions.
* Add Echo and Preroll filters.
* Add IScriptEnvironment::GetAVSLinkage() and DLLExport AVS_linkage for host usage of avisynth.dll.
* DirectShowSource, 2.6 plugin, support pixel types "AYUV" as YV24, "Y41P" and "Y411" as YV411.
* AviSource: Add Full and Auto pseudo pixel_types. Full is all supported. Auto is YV12, YUY2, RGB32, RGB24 & Y8.
* Add "AudioLengthS" [as a string], "Ord" & "FillStr" script functions.
* Add AudioTrim(clip, float, float) audio priority trimming, args in fractional seconds.
* Add Trim(M, Length=N[, Pad=False]) and Trim(M, End=N[, Pad=False]) function overloads for explicit Trimming. Length=0 means zero frame clip. End=0 means end at frame 0.
* Add SeparateRows (zero cost) and SeparateColumns (slow) frame slashing filters.
* Add Script Functions :- Acos, Asin, Atan, Atan2, Cosh, Sinh, Tanh, Fmod, Log10, BitLShift, BitRShiftS, BitRShiftU and Hex.
* Add "ConditionalSelect","csc+[show]b" runtime filter.
* Add dither option to Levels, RGBAdjust & Tweak.
* Add BitAnd(), BitNot(), BitOr() & BitXor() script functions.
* Add StrCmp() & StrCmpI() script functions.
* Add YV24 support for Limiter show option.
* Add "Global OPT_dwChannelMask={int}"
* Add 0x0063F speaker mask for 7.1 WAVE_FORMAT_EXTENSIBLE.
* Add .dll DelayLoad exception texts to crash message formatter.
* ImageWriter, add support for printf formating of filename string, default is ("%06d.%s", n, ext);
* Add avs_get_error(AVS_ScriptEnvironment*); to avisynth_c interface.
* Catch and save AvisynthError text in more avisynth_c entry points, for kemuri-_9.
* Add ScriptName(), ScriptFile(), ScriptDir() functions (WarpEnterprises).
* Add SkewRows filter.
* Histogram, Levels mode, Improve colour of chroma legends.
* ConditionalFilter, teach about string results.
* Add some more "Add/Remove Software" registry keys to the Installer (XhmikosR).
* AviSource: Support both packed and DWORD padded raw planar input like with DSS.
* Add IScriptEnvironment::ApplyMessage()
* Add ImageSourceAnim (Wilbert)
* Support user upgrade to 178 DevIL.dll (They need to manage CRT dependancies).
* ImageSource: palette and compressed bmp images load correctly now (issue 894702) [need 178 DevIL.dll]
* ImageSource: support for other formats like: gif, exr, jp2, psd, hdr [need 178 DevIL.dll]
* Add YV24 mode to ColorBars.
* Add ColorBarsHD based on arib_std_b28.
* C-api usability enhancements from kemuri9 [Work in progress!]
* Add Undefined(), AudioLengthLo(), AudioLengthHi(), IsYV16() & IsYV24() script functions
* Allow newlines (and hence comments) before '{' -- Gavino
* Added IScriptEnvironment::DeleteScriptEnvironment()
* Added Histogram, population clamp % factor for "Levels" mode,
* Histogram, revert "Stereo" mode to YV12, Add "StereoY8" mode,
* AviSource: Support fourcc "GREY" as Y8
* Added support for argument passing and EAX return value to SoftwireHelper.
* Added "Global OPT_VDubPlanarHack=True" to flip YV24 and YV16 chroma planes for old VDub's.
* Added "Global OPT_AVIPadScanlines=True" option for DWORD aligned planar padding
* Added Matrix="AVERAGE" mode.
* Added ContinuedDenominator/ContinuedNumerator(f[]i[limit]i) script functions.
* Tweak: fix MaskPointResizing + put back Dividee ISSE code (use sse=true).
* Added ChromaInPlacement, ChromaOutPlacement and ChromaResample options to planar colour conversions.
* Added MaskHS.
* Source tweaks to get ready for VC8.
* Add Y8 for DevIL, planarize EBMP.
* Planar support for many filters.
* Added Info() time indicator on audio length and video (current frame & total). (2.5.8)
* Added UtoY8 and VtoY8.
* Added more info to Info(). (2.5.8)
* ColorYUV: Added all adjustment parameters as conditional variables "coloryuv_SETTING". Enable by setting conditional=true.
* ConditionalReader: Added support for type String.
* ConditionalReader: Added offset keyword to offset all frame numbers after the keyword.
* Added SincResize() with optional taps parameter (default is 4).
* Added Custom band setting to SuperEQ to allow all 16 bands to be set from script. Usage: SuperEQ(clip,band1, band2, band3....) values are dB in float.
* Added fast 0-1-0 kernel for YV24 to ConvertBacktoYUY2().
* Added core formats: YV24, YV16, Y8, YV411.


Bugfixes
* Fixed frame range clamping in ComparePlane (ultim).
* Fixed posible leak with realloc in ConditionalReader (ultim).
* Fixed posible double free in text-overlay (ultim).
* Fixed RGB32 to Y8 pixel right shift from 4th pixel on (Robert Martens).
* Fixed Overlay YV24 Image444 leak.
* Fixed AVISource "AUTO" and "FULL" handling.
* Fixed ImageSource handling of missing ebmp files.
* Fixed DirectShowSource incorrect byte order for unpacking of pixel type "AYUV"
* Fixed HexValue parsing values greater than 7FFFFFFF, now as unsigned hex.
* Fixed ConditionalReader memory overrun parsing bools.
* Fixed ResampleAudio NOP test to compare vi.num_audio_samples, not sample rate.
* Fixed YV24 -> RGB24 overrun cleanup for widths%16 == 5.
* Fixed RGB24 AddBorders with right=0.
* Fixed conditional_functions error message names (Wilbert).
* Fixed Audio cache ac_expected_next regression.
* Fixed ImageSource deal with add 1 to IL_NUM_IMAGES bug (Wilbert)
* Fixed Overlay YV24 V plane conversion.
* Fixed Overlay YV24 mode with shared input clip, needed a MakeWritable.
* Fixed ImageReader upside down TIFF in 178 DevIL. (Wilbert)
* Fixed string+string bug when total length is 4096*K-1.
* Fixed SincResize misuse of "int abs(int)" (Gavino). Fix Lanczos and Blackman sinc use of float == 0.0, use small limit "> 0.000001".
* Fixed Classic mode legend drawing for planar right limit and yuy2 centre line.
* Fixed possible MT race. Use "env->ManageCache(MC_IncVFBRefcount, ...)" in ProtectVFB.
* Fixed SwapYToUV output image size bug for 3 clip case.
* Fixed Crop limit tests for RGB.
* Fixed Overlay yellow tint on rec601 RGB import conversion.
* Fixed YtoUV() output image size bug for 3 clip case.
* Fixed ConvertToPlanar chroma alignment.
* Fixed Levels (RGB) change use of PixelClip(x) to min(max(x, 0), 255).
* Fixed SwapYtoUV yuy2 crash (StainlessS).
* Fixed Overlay saturate UV in add and subtract mode.
* Fixed Info.h range protect display characters (StainlessS).
* Fixed AviSource packed planar import chroma offsets.
* Fixed AviSource NULL GetWritePtr() failure due to premature setting of last_frame.
* Fixed Mask rounding in greyscale calcs (Wilbert), minor refactor.
* Fixed SelectRangeEvery audio snafu (Gavino).
* Fixed LoadPlugin, SaveString of result string.
* Fixed LoadPlugin, use _vsnprintf.
* Fixed LoadVirtualdubPlugin, don't add vdub filter to chain on load failure.
* Fixed rounding in RGB HResize (JoshyD) (affects all resizers)
* Fixed error message name in the filter VerticalReduceBy2
* Fixed SeparateFields() with variable parity input clip (Wilbert)
* Fixed AviSource, cannot cast__int64* to long*, it does not work!
* Fixed ConditionalReader: Don't allow out of range "Range" to overwrite edge values
* Fixed MonoToStereo with stereo sources.
* Fixed MergeChannels with only 1 input clip.
* Fixed AviSource support for negative height DIB format AVI's.
* Fixed Audio cache crashes.
* Fixed resize with YV411, missing code.
* Fixed ConditionalReader rounding with integer interpolation.
* Fixed Softwire SSE2 bugs.
* Fixed SSSE3 CPU detection.
* Fixed SSSE3, SSE4.1 & SSE4.2 detection.
* Fixed Fastwire encoding of instructions that are >2 opcodes (SSSE3+4).
* Fixed _RPT5() macro for debug builds


Optimizations
* Cache auto increase span on sparse misses.
* Cache prevent inactive instances returning VFB early and spoiling active instances hit rate (LaTo).
* ConvertToPlanarGeneric explicit add Cache before chroma rescaler.
* Overlay minor refactor YV12 -> 444 chroma
* Speedup ConvertToMono(), minor refactor MixAudio().
* Change StackVertical/Horizontal to interative instead of recursive, 2^N performace increase for 3 and more clips, i.e. 1 blit total instead of blit(blit(blit(...
* RGBtoY8 Dynamic ASM code, support for RGB24.
* YV24backtoYUY2 Dynamic ASM code.
* UtoY8, VtoY8 abuse subframe, zero cost.
* YV24<->RGB Add SSE2 and SSSE3 code paths, get rid of wide_enough.
* ConvertToYUY2 Add SSE2, MMX restore full speed on platforms with poor ooox.
* ConvertAudio, manage tempbuffer and floatbuffer independantly.
* ConvertAudio, prefer SSE2 over 3DNow for super AMD cores.
* Info.h, full refactor, a good example of "Never look down", thx StainlessS
* DoubleWeaveFrames, If A not writable, try to write to B, else make new frame
* Histogram, fix GetFrame/NewVideoFrame call order
* HResizer, interleave code +4% faster
* YtoUV() Abuse Subframe to snatch the Y plane / UV planes, Derestrict destination colorformat autogeneration.
* ImageSource: Improve thread interlock code
* ConditionalReader/WriteFile: Full refactor.
* Replace _strdup with SaveString in AddFunction (Thanks Gavino)
* SuperEQ: Improve channel unpacking/packing code.
* H-Resize: Use SSE4.1 (movntdqa) loads for use once memory access.
* H-Resize: Added SSE2 horizontal unpacker.
* Resize: Use SSE3 (lddqu) loads for unaligned memory access.
* Added ultra fast vertical PointResizer (64 pixel/cycle).
* Added dynamic SSSE3 vertical resizer (16 pixel/cycle) ~ twice as fast as old MMX.
* Added dynamic SSE2 vertical resizer (16 pixel/cycle).
* Added dynamic MMX vertical resizer (8 pixel/cycle).
* Added SSSE3 version for RGB<->YV24 conversions.
* Added dynamic compiled MMX/iSSE for RGB<->YV24 conversions. Speed is approx 200% of C-code.


Changes
* Keep parity across Bob.
* Import: Increase full path buffer to MAX_PATH*4 for multi char code pages like CP932 (Chikuzen).
* Throw error when output number of frames will exceed MAXINT.
* BlankClip: Supply useful defaults for new Audio/Video when using a Video/Audio only template clip.
* BlankClip: Use duration from Audio only template as default length for new clip.
* Define new IClip::SetCacheHints cachehint constants.
* Force int call arguments to user script function float params to be explicit floats.
* Splice pass CacheHints through to both children in + and ++ mode.
* WriteFileStart/End save current_frame and set Last.
* ConditionalReader do not ignore syntax errors in input file.
* ImageSourceAnim Pad/Crop images to match first frame (Wilbert)
* ImageSource Add version to messages (Wilbert)
* Initial 2.6 API entry point linkage.
* Use Invoke for graph tail, enhance non-clip output error reporting.
* PopContext when inner block Asserts/throws (maxxon).
* Remove duplicate definitions (Wilbert).
* Enhance non-clip output error reporting.
* Explicitly specify calling sequence as __cdecl for Avisynth softwire routines, (was the compiler default)
* Use env->Invoke("Cache", ...) everywhere instead of Cache::Create_Cache(), allows for Cache to be overloaded by a plugin.
* ConvertToYUY2 Change from 0-1-1 kernel to 1-2-1 kernel.
* Tweak make Interp same units as minSat and maxSat.
* Check HKEY_CURRENT_USER for PluginDir first. (henktiggelaar)
* Make forced, -ve, planar alignment of chroma planes match subsampling.
* Enforce planar alignment restrictions.
* C-api: Remove func sub-struct from AVS_Library struct
* Add error code to plugin load failure message
* Make default planar AVI output packed. Control with OPT_AVIPadScanlines=True.
* WriteFile() now supports unlimited number of unlimited strings. (was 16 by 254 byte strings).
* ConvertToRGB*, make C++ code sample chroma the same as the MMX code i.e. use both pixels.
* ConvertToRGB*, use YV24 path for planar, complain when options are present for YUY2.
* ConvertToYUY2, use YV16 path for planar, complain when options are present for RGB see: http://forum.doom9.org/showthread.php?p=1378381#post1378381
* Thread safe code, part 2.
* Correct IClip baked documentation
* Passify compilation error/warnings (XhmikosR)
* for, const, extern and ansi patches for VC2008 (SEt)
* Disable OPT_RELS_LOGGING option
* Change implicit Last parsing for argless, bracketless calls to match bracketed cases. (Gavino)
* DirectShowSource: Support last minute format renegotiation thru IPin::QueryAccept() & Validate the size of the provided directshow buffer.
* Remove non ascii chars from comments.
* Add core stubs for DirectShowSource, TCPServer & TCPSource, report when plugins are missing.
* Add note for original source downloads - SoundTouch
* Add more lineage history to Info()
* Move convertaudio, alignplanar, fillborder & MIN/MAX_INT definitions.
* Run AtExit before dismantling world.
* Change setcachehints definition from void to int. Test IClip version >= 5.
* Move PixelClip definition to avisynth.cpp
* SubTitle, etc, make X & Y options float (0.125 pixel granularity).
* ShowSMPTE() supports all integer FPS and multiplies of drop frame FPS.
* SubTitle, stop overwriting string constants (Gavino).
* SubTitle, improve pixel registration (Gavino).
* Make Info() CPU display hierarchical.
* Thread safe code, part 1.
* SoftwireHelper: explicit hardware exception handling.
* Resize: Moved GetResampleFunction into Resamplefuntion, to allow overrides.
* Resampler: Removed dead stlf code.
* Updated Soundtouch to 1.31 (2.5.8)
* Put dynamic matrix conversion into separate file.
* Moved chroma subsampling to image_type section.
* Added specific error reporting when requesting chromasubsampling with Y8.
* Split up merge and plane Swappers.
* Split up Plane transfers into separate classes.
* Added automatic destination colorspace detection on planar YtoUV.
* Took out greyscale and RGB32<->RGB24 from convert.cpp and placed them in separate files.
* All code assuming UVwidth = Ywidth/2 and similar should be gone.

IanB
18th September 2013, 12:13
For info, here are the changes from A4 to A5, based on comparing the two change lists.

Additions
* Added Eval(clip, string name, string) alias for oop processing of argument.
* DirectShowSource support non-standard pixel types "YV24" and "YV16".

Bugfixes
* Fixed frame range clamping in ComparePlane (ultim).
* Fixed posible leak with realloc in ConditionalReader (ultim).
* Fixed posible double free in text-overlay (ultim).
* Fixed RGB32 to Y8 pixel right shift from 4th pixel on (Robert Martens).
* Fixed Overlay YV24 Image444 leak.
* Fixed AVISource "AUTO" and "FULL" handling.
* Fixed ImageSource handling of missing ebmp files.
* Fixed DirectShowSource incorrect byte order for unpacking of pixel type "AYUV"

Optimizations
* Cache auto increase span on sparse misses.
* Cache prevent inactive instances returning VFB early and spoiling active instances hit rate (LaTo).

Changes
* Keep parity across Bob
* Import: Increase full path buffer to MAX_PATH*4 for multi char code pages like CP932 (Chikuzen).
* Throw error when output number of frames will exceed MAXINT.

IanB
18th September 2013, 12:14
Reserved 2

Groucho2004
18th September 2013, 13:30
Hi Ian,

I have a couple of observations about the new code:
In ImageSeq.cpp, ImageReader::BlankFrame, how did you get the following code to compile (UVPitch not being declared)?
const int UVpitch = frame->GetPitch(PLANAR_U);
if (UVpitch) {
const int UVsize = UVPitch * frame->GetHeight(PLANAR_U);


I also get errors from the Intel compiler in "ImageWriter::GetFrame":
env->MakeWritable(frame);
env->ApplyMessage(frame, vi, ss.str().c_str(), vi.width/4, TEXT_COLOR, 0, 0);

no suitable conversion function from "PVideoFrame" to "PVideoFrame *" exists
env->MakeWritable(frame);
Previously, "frame" had the address-of operator -> "&frame".

ultim
18th September 2013, 17:58
Thank you for the new release!

IanB
18th September 2013, 21:50
@Groucho2004,

Sorry, got some hw problems, I'll update the SF CVS as soon as it's fixed.

Yes "frame" -> "&frame" and "UVPitch" -> "UVpitch".

Groucho2004
18th September 2013, 22:04
I'll update the SF CVS as soon as it's fixed.

Yes "frame" -> "&frame" and "UVPitch" -> "UVpitch".
Thanks.

StainlessS
19th September 2013, 00:14
Thank you Mr IB, we all love you. :) (EDIT: big cuddles)

Groucho2004
19th September 2013, 00:29
I'll update the SF CVS as soon as it's fixed.
While you're at it and if it's not too much trouble - please get rid of the UPX compression stuff. I think most people now have enough space for a 1.7 MB DLL. :)

Sparktank
19th September 2013, 01:57
:D My goodness! Excellent work!

Can't wait to play with it.

I admit, while reading most of the changelist I had to go to bed I got so tired last night.
I'll admit, even moreso, that a lot of the stuff is beyond my complete comprehension. :p

Thanks again! :unavailableemoteofexcitement:

EDIT: oh man, re-reading that: it was not intended to sound BORING, LOL!
I should really wait until I've had my second cup of coffee before posting without proofreading.

ryrynz
19th September 2013, 07:17
Nice, can't be far off a beta version now, waiting on SEt to do his thing with the MT version :)

turbojet
19th September 2013, 07:26
2.60 is being tested like a stable release and generally thought to be more stable then 2.58. It's a shame some wait years for the next stable build to upgrade. After 4+ years of alpha status is there any chance the next release being labeled 'stable'?

Groucho2004
19th September 2013, 08:12
I admit, while reading most of the changelist I had to go to bed I got so tired last night.
I'll admit, even moreso, that a lot of the stuff is beyond my complete comprehension. :p

Thanks again! :unavailableemoteofexcitement:
[/SIZE]
Settle down Beavis. :)

The change log you're looking at is the log with all changes since the release of 2.58. The changes from A4 to A5 are a tiny fraction of that.

Groucho2004
19th September 2013, 08:35
After 4+ years of alpha status is there any chance the next release being labeled 'stable'?
See here (http://forum.doom9.org/showthread.php?p=1629125#post1629125).

IanB
20th September 2013, 02:32
Okay, new PS fitted, server back, CVS updated.

Groucho2004
20th September 2013, 09:21
Okay, new PS fitted, server back, CVS updated.
Thanks. I noticed that A5 uses a lot less memory than previous versions, possibly due to that cache bug you fixed - very nice. One more reason to not use 2.5.8.

Gavino
20th September 2013, 12:18
The change log you're looking at is the log with all changes since the release of 2.58. The changes from A4 to A5 are a tiny fraction of that.
For info, here are the changes from A4 to A5, based on comparing the two changelists.

Additions
* Added Eval(clip, string name, string) alias for oop processing of argument.
* DirectShowSource support non-standard pixel types "YV24" and "YV16".

Bugfixes
* Fixed frame range clamping in ComparePlane (ultim).
* Fixed posible leak with realloc in ConditionalReader (ultim).
* Fixed posible double free in text-overlay (ultim).
* Fixed RGB32 to Y8 pixel right shift from 4th pixel on (Robert Martens).
* Fixed Overlay YV24 Image444 leak.
* Fixed AVISource "AUTO" and "FULL" handling.
* Fixed ImageSource handling of missing ebmp files.
* Fixed DirectShowSource incorrect byte order for unpacking of pixel type "AYUV"

Optimizations
* Cache auto increase span on sparse misses.
* Cache prevent inactive instances returning VFB early and spoiling active instances hit rate (LaTo).

Changes
* Import: Increase full path buffer to MAX_PATH*4 for multi char code pages like CP932 (Chikuzen).
* Throw error when output number of frames will exceed MAXINT.

unreal666
10th October 2013, 08:25
...
Changes
* Keep parity across Bob
...

it's not in CVS doc (changelist26.htm).

ultim
22nd October 2013, 23:41
Hello IanB,

The enumeration values for GetCPUFlags() are being shared by both Avisynth and VirtualDub plugin support in Avisynth. VDub plugins loaded in Avisynth will get a function pointer to Avisynth's GetCPUFlags(), and thus it is important that Avisynth uses the same enumeration values for instruction sets as VirtualDub does. This has been ensured historically, but in latest Avisynth the flags of Avs and VDub have diverged.

Avisynth defines CPUF_SSE4_2 as 0x800, but in recent (to-be-released 1.10 series) versions of VirtualDub, the value 0x800 is used for AVX, not for SSE4.2 (a value for SSE4.2 is missing from VDub). As a result, if a VDub plugin that would use AVX gets loaded into Avisynth, Avisynth could report the instruction set as available on SSE4.2-capable CPUs even when they do not support AVX. The plugin would then try to execute illegal instructions and crash.

Could we sync to VirtualDub's values? Assuming VDub keeps adding new flags from LSB to MSB order, we could still define a flag for SSE4.2 without collision if we use an MSB bit. My suggestion:

enum {
CPUF_FORCE = 0x01, // N/A
CPUF_FPU = 0x02, // 386/486DX
CPUF_MMX = 0x04, // P55C, K6, PII
CPUF_INTEGER_SSE = 0x08, // PIII, Athlon
CPUF_SSE = 0x10, // PIII, Athlon XP/MP
CPUF_SSE2 = 0x20, // PIV, K8
CPUF_3DNOW = 0x40, // K6-2
CPUF_3DNOW_EXT = 0x80, // Athlon
CPUF_X86_64 = 0xA0, // Hammer (note: equiv. to 3DNow + SSE2, which
// only Hammer will have anyway)
CPUF_SSE3 = 0x100, // PIV+, K8 Venice
CPUF_SSSE3 = 0x200, // Core 2
CPUF_SSE4 = 0x400, // Penryn, Wolfdale, Yorkfield
CPUF_SSE4_1 = 0x400,
CPUF_AVX = 0x800,
CPUF_SSE4_2 = (1u<<31) // Avisynth-only
};

EDIT: Actually, the instructions in SSE4.2 seem to be irrelevant for image processing, so it is questionable if it needs to be included in the enumeration at all.

TurboPascal7
27th October 2013, 15:07
I'd like to hear your opinion on the question above too, IanB.

Also, two bugs in the core filters:
1. ConvertYV16ToYUY2 (https://github.com/jeeb/avisynth/blob/master/src/convert/convert_planar.cpp#L817) - return dst; line is missing. Each frame ends up being processed by both mmx and C versions making the filter slower than it should be.
2. AFH_YV12_C (https://github.com/jeeb/avisynth/blob/master/src/filters/focus.cpp#L751) - leftmost pixel is not processed. x should start with 0 just like it does everywhere else.

IanB
28th October 2013, 22:17
@Ultim,

Spoke to Avery :-
This makes sense. I'll add SSE42 = 0x1000. (http://forums.virtualdub.org/index.php?act=ST&f=11&t=21832&#entry94370)I'll reserve AVX=0x800 and adjust SSE4.2=0x1000, thanks.

@TurboPascal7,

Thanks for the 2 bug reports.

TurboPascal7
29th October 2013, 11:54
And we'll get AVX=0x800, SSE4.2=0x1000 and AVX2=0x2000. Not really important but still silly.
In fact, does avs even need to have SSE4.2 defined? It's basically useless for video filtering.

Richard1485
30th October 2013, 10:36
I can't find a generic thread for requests for updates to Avisynth, so I'll post this here if I may. Avisynth crossfades are simple linear dissolves. Is it possible to change this so that more complicated crossfades, such as those found in NLEs, are possible? I have a thread here (http://forum.videohelp.com/threads/355061-Avisynth-Crossfades) that goes into more detail.

I note that there have been recent, audio-related changes to the Trim() function, so I hope that the developers will consider implementing other audio-related changes, such as a non-linear crossfade. Thanks.

qyot27
7th November 2013, 06:29
A couple of related requests:

First,
Can avisynth_c.h be synchronized with the semi-updated version that x264 ships with in extras/? The modifications were authored by kemuri-_9 but the colorspace-specific ones haven't been integrated with the rest of the updates to avisynth_c.h mentioned in the Changelog. For convenience, I converted the changes into a patch:
diff --git a/src/core/avisynth_c.h b/src/core/avisynth_c.h
index e419d03..9b6325b 100644
--- a/src/core/avisynth_c.h
+++ b/src/core/avisynth_c.h
@@ -75,7 +75,7 @@ typedef __int64 INT64;
//

#ifndef __AVISYNTH_H__
-enum { AVISYNTH_INTERFACE_VERSION = 3 };
+enum { AVISYNTH_INTERFACE_VERSION = 5 };
#endif

enum {AVS_SAMPLE_INT8 = 1<<0,
@@ -90,13 +90,46 @@ enum {AVS_PLANAR_Y=1<<0,
AVS_PLANAR_ALIGNED=1<<3,
AVS_PLANAR_Y_ALIGNED=AVS_PLANAR_Y|AVS_PLANAR_ALIGNED,
AVS_PLANAR_U_ALIGNED=AVS_PLANAR_U|AVS_PLANAR_ALIGNED,
- AVS_PLANAR_V_ALIGNED=AVS_PLANAR_V|AVS_PLANAR_ALIGNED};
+ AVS_PLANAR_V_ALIGNED=AVS_PLANAR_V|AVS_PLANAR_ALIGNED,
+ AVS_PLANAR_A=1<<4,
+ AVS_PLANAR_R=1<<5,
+ AVS_PLANAR_G=1<<6,
+ AVS_PLANAR_B=1<<7,
+ AVS_PLANAR_A_ALIGNED=AVS_PLANAR_A|AVS_PLANAR_ALIGNED,
+ AVS_PLANAR_R_ALIGNED=AVS_PLANAR_R|AVS_PLANAR_ALIGNED,
+ AVS_PLANAR_G_ALIGNED=AVS_PLANAR_G|AVS_PLANAR_ALIGNED,
+ AVS_PLANAR_B_ALIGNED=AVS_PLANAR_B|AVS_PLANAR_ALIGNED};

// Colorspace properties.
-enum {AVS_CS_BGR = 1<<28,
+enum {AVS_CS_BGR = 1<<28,
AVS_CS_YUV = 1<<29,
AVS_CS_INTERLEAVED = 1<<30,
- AVS_CS_PLANAR = 1<<31};
+ AVS_CS_PLANAR = 1<<31,
+
+ AVS_CS_SHIFT_SUB_WIDTH = 0,
+ AVS_CS_SHIFT_SUB_HEIGHT = 1 << 3,
+ AVS_CS_SHIFT_SAMPLE_BITS = 1 << 4,
+
+ AVS_CS_SUB_WIDTH_MASK = 7 << AVS_CS_SHIFT_SUB_WIDTH,
+ AVS_CS_SUB_WIDTH_1 = 3 << AVS_CS_SHIFT_SUB_WIDTH, // YV24
+ AVS_CS_SUB_WIDTH_2 = 0 << AVS_CS_SHIFT_SUB_WIDTH, // YV12, I420, YV16
+ AVS_CS_SUB_WIDTH_4 = 1 << AVS_CS_SHIFT_SUB_WIDTH, // YUV9, YV411
+
+ AVS_CS_VPLANEFIRST = 1 << 3, // YV12, YV16, YV24, YV411, YUV9
+ AVS_CS_UPLANEFIRST = 1 << 4, // I420
+
+ AVS_CS_SUB_HEIGHT_MASK = 7 << AVS_CS_SHIFT_SUB_HEIGHT,
+ AVS_CS_SUB_HEIGHT_1 = 3 << AVS_CS_SHIFT_SUB_HEIGHT, // YV16, YV24, YV411
+ AVS_CS_SUB_HEIGHT_2 = 0 << AVS_CS_SHIFT_SUB_HEIGHT, // YV12, I420
+ AVS_CS_SUB_HEIGHT_4 = 1 << AVS_CS_SHIFT_SUB_HEIGHT, // YUV9
+
+ AVS_CS_SAMPLE_BITS_MASK = 7 << AVS_CS_SHIFT_SAMPLE_BITS,
+ AVS_CS_SAMPLE_BITS_8 = 0 << AVS_CS_SHIFT_SAMPLE_BITS,
+ AVS_CS_SAMPLE_BITS_16 = 1 << AVS_CS_SHIFT_SAMPLE_BITS,
+ AVS_CS_SAMPLE_BITS_32 = 2 << AVS_CS_SHIFT_SAMPLE_BITS,
+
+ AVS_CS_PLANAR_MASK = AVS_CS_PLANAR | AVS_CS_INTERLEAVED | AVS_CS_YUV | AVS_CS_BGR | AVS_CS_SAMPLE_BITS_MASK | AVS_CS_SUB_HEIGHT_MASK | AVS_CS_SUB_WIDTH_MASK,
+ AVS_CS_PLANAR_FILTER = ~( AVS_CS_VPLANEFIRST | AVS_CS_UPLANEFIRST )};

// Specific colorformats
enum {
@@ -104,9 +137,18 @@ enum {
AVS_CS_BGR24 = 1<<0 | AVS_CS_BGR | AVS_CS_INTERLEAVED,
AVS_CS_BGR32 = 1<<1 | AVS_CS_BGR | AVS_CS_INTERLEAVED,
AVS_CS_YUY2 = 1<<2 | AVS_CS_YUV | AVS_CS_INTERLEAVED,
- AVS_CS_YV12 = 1<<3 | AVS_CS_YUV | AVS_CS_PLANAR, // y-v-u, planar
- AVS_CS_I420 = 1<<4 | AVS_CS_YUV | AVS_CS_PLANAR, // y-u-v, planar
- AVS_CS_IYUV = 1<<4 | AVS_CS_YUV | AVS_CS_PLANAR // same as above
+ // AVS_CS_YV12 = 1<<3 Reserved
+ // AVS_CS_I420 = 1<<4 Reserved
+ AVS_CS_RAW32 = 1<<5 | AVS_CS_INTERLEAVED,
+
+ AVS_CS_YV24 = AVS_CS_PLANAR | AVS_CS_YUV | AVS_CS_SAMPLE_BITS_8 | AVS_CS_VPLANEFIRST | AVS_CS_SUB_HEIGHT_1 | AVS_CS_SUB_WIDTH_1, // YVU 4:4:4 planar
+ AVS_CS_YV16 = AVS_CS_PLANAR | AVS_CS_YUV | AVS_CS_SAMPLE_BITS_8 | AVS_CS_VPLANEFIRST | AVS_CS_SUB_HEIGHT_1 | AVS_CS_SUB_WIDTH_2, // YVU 4:2:2 planar
+ AVS_CS_YV12 = AVS_CS_PLANAR | AVS_CS_YUV | AVS_CS_SAMPLE_BITS_8 | AVS_CS_VPLANEFIRST | AVS_CS_SUB_HEIGHT_2 | AVS_CS_SUB_WIDTH_2, // YVU 4:2:0 planar
+ AVS_CS_I420 = AVS_CS_PLANAR | AVS_CS_YUV | AVS_CS_SAMPLE_BITS_8 | AVS_CS_UPLANEFIRST | AVS_CS_SUB_HEIGHT_2 | AVS_CS_SUB_WIDTH_2, // YUV 4:2:0 planar
+ AVS_CS_IYUV = AVS_CS_I420,
+ AVS_CS_YV411 = AVS_CS_PLANAR | AVS_CS_YUV | AVS_CS_SAMPLE_BITS_8 | AVS_CS_VPLANEFIRST | AVS_CS_SUB_HEIGHT_1 | AVS_CS_SUB_WIDTH_4, // YVU 4:1:1 planar
+ AVS_CS_YUV9 = AVS_CS_PLANAR | AVS_CS_YUV | AVS_CS_SAMPLE_BITS_8 | AVS_CS_VPLANEFIRST | AVS_CS_SUB_HEIGHT_4 | AVS_CS_SUB_WIDTH_4, // YVU 4:1:0 planar
+ AVS_CS_Y8 = AVS_CS_PLANAR | AVS_CS_INTERLEAVED | AVS_CS_YUV | AVS_CS_SAMPLE_BITS_8 // Y 4:0:0 planar
};

enum {
@@ -191,17 +233,29 @@ AVSC_INLINE int avs_is_yuv(const AVS_VideoInfo * p)
AVSC_INLINE int avs_is_yuy2(const AVS_VideoInfo * p)
{ return (p->pixel_type & AVS_CS_YUY2) == AVS_CS_YUY2; }

+AVSC_INLINE int avs_is_yv24(const AVS_VideoInfo * p)
+ { return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YV24 & AVS_CS_PLANAR_FILTER); }
+
+AVSC_INLINE int avs_is_yv16(const AVS_VideoInfo * p)
+ { return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YV16 & AVS_CS_PLANAR_FILTER); }
+
AVSC_INLINE int avs_is_yv12(const AVS_VideoInfo * p)
- { return ((p->pixel_type & AVS_CS_YV12) == AVS_CS_YV12)||((p->pixel_type & AVS_CS_I420) == AVS_CS_I420); }
+ { return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YV12 & AVS_CS_PLANAR_FILTER); }

-AVSC_INLINE int avs_is_color_space(const AVS_VideoInfo * p, int c_space)
- { return ((p->pixel_type & c_space) == c_space); }
+AVSC_INLINE int avs_is_yv411(const AVS_VideoInfo * p)
+ { return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YV411 & AVS_CS_PLANAR_FILTER); }
+
+AVSC_INLINE int avs_is_y8(const AVS_VideoInfo * p)
+ { return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_Y8 & AVS_CS_PLANAR_FILTER); }

AVSC_INLINE int avs_is_property(const AVS_VideoInfo * p, int property)
{ return ((p->pixel_type & property)==property ); }

AVSC_INLINE int avs_is_planar(const AVS_VideoInfo * p)
{ return !!(p->pixel_type & AVS_CS_PLANAR); }
+
+AVSC_INLINE int avs_is_color_space(const AVS_VideoInfo * p, int c_space)
+ { return avs_is_planar(p) ? ((p->pixel_type & AVS_CS_PLANAR_MASK) == (c_space & AVS_CS_PLANAR_FILTER)) : ((p->pixel_type & c_space) == c_space); }

AVSC_INLINE int avs_is_field_based(const AVS_VideoInfo * p)
{ return !!(p->image_type & AVS_IT_FIELDBASED); }
@@ -351,7 +405,7 @@ AVSC_INLINE int avs_get_row_size_p(const AVS_VideoFrame * p, int plane) {
else return 0;
case AVS_PLANAR_U_ALIGNED: case AVS_PLANAR_V_ALIGNED:
if (p->pitchUV) {
- int r = (p->row_sizeUV+AVS_FRAME_ALIGN-1)&(~(AVS_FRAME_ALIGN-1)); // Aligned rowsize
+ r = (p->row_sizeUV+AVS_FRAME_ALIGN-1)&(~(AVS_FRAME_ALIGN-1)); // Aligned rowsize
if (r < p->pitchUV)
return r;
return p->row_sizeUV;
@@ -602,7 +656,6 @@ enum {
AVS_CPUF_SSE4_2 = 0x800, // Nehalem
};

-
AVSC_API(const char *, avs_get_error)(AVS_ScriptEnvironment *); // return 0 if no error

AVSC_API(long, avs_get_cpu_flags)(AVS_ScriptEnvironment *);
@@ -715,6 +768,7 @@ struct AVS_Library {
AVSC_DECLARE_FUNC(avs_function_exists);
AVSC_DECLARE_FUNC(avs_get_audio);
AVSC_DECLARE_FUNC(avs_get_cpu_flags);
+ AVSC_DECLARE_FUNC(avs_get_error);
AVSC_DECLARE_FUNC(avs_get_frame);
AVSC_DECLARE_FUNC(avs_get_parity);
AVSC_DECLARE_FUNC(avs_get_var);
@@ -739,7 +793,6 @@ struct AVS_Library {
AVSC_DECLARE_FUNC(avs_subframe_planar);
AVSC_DECLARE_FUNC(avs_take_clip);
AVSC_DECLARE_FUNC(avs_vsprintf);
- AVSC_DECLARE_FUNC(avs_get_error);
};

#undef AVSC_DECLARE_FUNC
@@ -774,6 +827,7 @@ AVSC_INLINE AVS_Library * avs_load_library() {
AVSC_LOAD_FUNC(avs_function_exists);
AVSC_LOAD_FUNC(avs_get_audio);
AVSC_LOAD_FUNC(avs_get_cpu_flags);
+ AVSC_LOAD_FUNC(avs_get_error);
AVSC_LOAD_FUNC(avs_get_frame);
AVSC_LOAD_FUNC(avs_get_parity);
AVSC_LOAD_FUNC(avs_get_var);
@@ -798,7 +852,6 @@ AVSC_INLINE AVS_Library * avs_load_library() {
AVSC_LOAD_FUNC(avs_subframe_planar);
AVSC_LOAD_FUNC(avs_take_clip);
AVSC_LOAD_FUNC(avs_vsprintf);
- AVSC_LOAD_FUNC(avs_get_error);

#undef __AVSC_STRINGIFY
#undef AVSC_STRINGIFY
--
1.7.11.msysgit.1



Second,
This is a patch that adds a GNU-style Makefile to ease users needing to install AviSynth's headers. It installs both avisynth.h and avisynth_c.h:
diff --git a/GNUmakefile b/GNUmakefile
new file mode 100644
index 0000000..083ab09
--- /dev/null
+++ b/GNUmakefile
@@ -0,0 +1,13 @@
+# Makefile
+
+all: default
+
+PREFIX=/usr/local
+
+install:
+ install -d $(PREFIX)/include
+ install -d $(PREFIX)/include/avisynth
+ install -m 644 $(addprefix src/core/, avisynth.h avisynth_c.h) $(PREFIX)/include/avisynth
+
+uninstall:
+ rm -f -R $(PREFIX)/include/avisynth
diff --git a/README-GNUmakefile b/README-GNUmakefile
new file mode 100644
index 0000000..728584b
--- /dev/null
+++ b/README-GNUmakefile
@@ -0,0 +1,18 @@
+AviSynth, as an MSVC-based project, does not have a 'make install'
+routine that users familiar with GNU-style build systems recognize.
+Thus, users must search out the right header(s) from AviSynth's
+source code and manually copy them to wherever their source code
+expects them to be.
+
+As a remedy for this issue when wanting to build libav with
+--enable-avisynth, this Makefile supplies this method of
+installation.
+
+To install:
+make install
+
+To install to a non-standard location:
+make install PREFIX=/path/to/location
+
+To uninstall:
+make uninstall
--
1.7.11.msysgit.1



The reason for this is that libav is in the process of vetting the rewritten AviSynth demuxer that FFmpeg committed back in March. This new version of the demuxer uses the C interface header, and assumes the one included with x264 so that it can use YV24, YV16, YV411, and Y8. For FFmpeg this wasn't a problem, a copy of the header is stored locally in compat/. But libav doesn't want to store a local copy of the header, shifting the responsibility of acquiring and installing it onto the user (I have a stopgap repo on Github that supplies it, but I really don't like that as a solution). So avisynth_c.h in CVS would need to be updated in order to allow the demuxer to even compile correctly, and the GNUmakefile is there to eliminate the burden of manually copying files around.

ultim
9th November 2013, 15:42
DynamicAssembledCode::Free() should be using delete[] instead of free().

ultim
13th November 2013, 17:51
Hi IanB,

I'd like to ask for your permission to add back the license exception clause to the 2.6 avisynth.h in Avisynth+. Can we, please?

vcmohan
16th January 2014, 04:42
Where can one get the new avisynth.h for the 2.6 5th release?

Groucho2004
16th January 2014, 11:20
Where can one get the new avisynth.h for the 2.6 5th release?
You can either use the file from the official CVS repo here (http://sourceforge.net/p/avisynth2/cvs/) or use the header from AVS+, from here (https://github.com/AviSynth/AviSynthPlus)

vcmohan
17th January 2014, 04:45
You can either use the file from the official CVS repo here (http://sourceforge.net/p/avisynth2/cvs/) or use the header from AVS+, from here (https://github.com/AviSynth/AviSynthPlus) I tried both places. Each wants me to download another software prior. Is there no way of getting this file straight w/o hassle?
Are avisynth+ and avisynth 2.6 header files same?

StainlessS
17th January 2014, 04:55
@VcMohan,
you could just copy/paste the text from here:-
https://github.com/AviSynth/AviSynthPlus/blob/master/avs_core/include/avisynth.h

zero9999
17th January 2014, 04:59
I tried both places. Each wants me to download another software prior. Is there no way of getting this file straight w/o hassle?
https://github.com/AviSynth/AviSynthPlus/archive/master.zip

or get the files separately from here (https://github.com/AviSynth/AviSynthPlus/tree/master/avs_core/include). (click RAW)

vcmohan
17th January 2014, 10:38
Thanks. I could get avisynth.h from a forked version of avisynth as avisynth plus. Are the original avisynth.h version (official) and this are from the fork identical?

TurboPascal7
17th January 2014, 10:58
No. You can get the original one from the alpha5 github mirror here (https://github.com/jeeb/avisynth/blob/master/src/core/avisynth.h). They aren't that different though and should be perfectly compatible.

ultim
17th January 2014, 12:09
No. You can get the original one from the alpha5 github mirror here (https://github.com/jeeb/avisynth/blob/master/src/core/avisynth.h). They aren't that different though and should be perfectly compatible.

They are perfectly compatible. Because avs+'s header is actually composed of multiple (a small number of) files though, it might be a bit easier for you to handle 2.6a5's version. EDIT: On the other hand, avs+'s header is x64-compatible.

TurboPascal7
18th January 2014, 02:57
Yes, your understanding is correct. Technically, all closed-source 2.6 plugins violate GPL. In practice, no one really cares.

SEt
18th January 2014, 07:57
Do I understand correctly that any Y8-compatible close-source plugin is illegal now because Y8 colorspace is added to 2.6?
Not really. You can completely ignore official header and define interfaces yourself. It's the code that is under GPL, not the interfaces as far as I understand.

Wilbert
19th January 2014, 20:21
Yes, your understanding is correct. Technically, all closed-source 2.6 plugins violate GPL. In practice, no one really cares.
Speak for yourself TurboPascal7. Only shameless people don't care. But if you have a list of examples let us know.

Not really. You can completely ignore official header and define interfaces yourself. It's the code that is under GPL, not the interfaces as far as I understand.
As far as I understand this is simply not true, because it is a derivative of AviSynth. But feel free to prove otherwise.

The reason the exemption was temporary removed is described here http://forum.doom9.org/showthread.php?t=125582 (plugins can be fixed when the api is finished). Yes if devs stay around the reason is a bit moot.

TurboPascal7
19th January 2014, 20:40
Speak for yourself TurboPascal7. Only shameless people don't care. But if you have a list of examples let us know.
What for? To force freedom on people's heads? To make the authors remove the plugins, making its users very happy? Even if I did know any, I'd shamelessly pass, thank you.

As for the reasoning - the point is very moot if the avs dev himself doesn't really stay around. Not to mention that 6 years is quite a long time to finalize the interface, don't you think?

Guest
19th January 2014, 22:23
The reason the exemption was temporary removed is described here http://forum.doom9.org/showthread.php?t=125582 (plugins can be fixed when the api is finished). I don't see how anybody can remove the exemption originally granted by the creator of Avisynth, Ben Rudiak-Gould. I will proceed as if the exemption is still in effect, and advise others to do the same.

ultim
19th January 2014, 22:46
I don't see how anybody can remove the exemption originally granted by the creator of Avisynth, Ben Rudiak-Gould. I will proceed as if the exemption is still in effect, and advise others to do the same.
Unfortunately, he can remove it. More precisely, he decided to license his own code in the header as GPL (without the exemption), which he has every right to do. Of course that does not remove the exemption from the other parts of the code that he has not written, but since his code is licensed under the GPL, as long as you use his header, you basically have to treat the whole project as GPL. You can ignore his step and treat the AviSynth code as if the exemption was still in effect, but then you must not use his header.

To summarize, you are free to proceed as if the exemption is still in effect if you don't use his 2.6-style header. Otherwise you're violating the licence.

EDIT: Actually, assuming he has contributed his non-header code under the GPL too, without his explicit agreement you cannot use the exemption at all with any of his copyrightable code, not even with other headers. Otherwise it would be possible to add non-GPL headers to GPL code and circumvent the licence in any project this way.

Guest
19th January 2014, 23:13
That's goofy. Why would IanB castrate all of us and then never restore the exemption?

What about your header for Avisynth+? What is the status of the exemption?

TurboPascal7
19th January 2014, 23:14
Sadly, Avisynth+ can't add it back without permission of IanB.

Guest
19th January 2014, 23:17
I will ask IanB to please restore the exemption. It's crazy that he would put a dam in the river like this.

Can't Avisynth+ re-engineer a header from the original exempted one? Why do you have to derive from IanB's stuff? Let him fork a dead end if that is what he wants.

ultim
20th January 2014, 00:04
I will ask IanB to please restore the exemption. It's crazy that he would put a dam in the river like this.

Can't Avisynth+ re-engineer a header from the original exempted one? Why do you have to derive from IanB's stuff? Let him fork a dead end if that is what he wants.

He also has contributed other code under the GPL, code that is not in the header. I cannot just take his GPL code and add a non-GPL exemption header, otherwise anybody could circumvent GPL this way in any project. So, although I'm not a lawyer, I'm reasonably sure we either need his agreement to add the exemption back, or we must re-write all copyrightable functionality that he has contributed to the project, both header and non-header code.

I'll edit my previous post accordingly.

Guest
20th January 2014, 00:34
Why do you have to take his code?

TurboPascal7
20th January 2014, 00:55
Because we already did (ultim wanted to contribute to the 2.6 codebase before creating the fork).
We want to support new colorspaces and keep compatibility with existing 2.6 plugins. Starting from 2.5.8 codebase or rewriting everything IanB wrote during these 6 years would delay new features quite noticeably and that's a lot more important to the end users than some silly licensing question.

qyot27
20th January 2014, 01:01
For what it's worth, the 2.6-ish extended version of avisynth_c.h from x264 does have the exemption intact (source (http://git.videolan.org/?p=x264.git;a=blob;f=extras/avisynth_c.h;h=5044efb0aa6816eac59c80c9a85b422d588cb2a4;hb=1ca7bb943d15165a4b9631002a655587d923be63)). Probably because it was done externally and wasn't subject to this particular circumstance - the one in AviSynth's CVS is still the old 2.5 version.

SEt
20th January 2014, 10:41
I'm far from law expert, but still think that interfaces are not subject to licensing restrictions (structures, function prototypes,...). For example, does linux kernel need to explicitly grant the permission for every interface to allow its usage in proprietary kernel modules?

I completely agree with TurboPascal7 that licensing restrictions can only harm Avisynth. Personally if I had to choice between going GPL or removing plugin that I don't want to be GPL – result will be removal 100% of the time. And I believe we do have several plugins removed by authors because they were threatened later with GPL stuff.

Sapo84
20th January 2014, 12:16
Unfortunately, he can remove it. More precisely, he decided to license his own code in the header as GPL (without the exemption), which he has every right to do.
But he can't change the license of the original code.
In the header I see three copyrights lines, either they are wrong (and he wrote every line of the header himself) or he should have needed consent from all the contributors to redistribute their code with a different license.

ultim
20th January 2014, 12:52
I'm far from law expert, but still think that interfaces are not subject to licensing restrictions (structures, function prototypes,...).
Headers are always subject of the license, but the licence may define separate terms for the headers. LGPL is such an example, but GPL is not. LGPL plays with the definition of "header", while GPL plays with the definition of "derived work".

For example, does linux kernel need to explicitly grant the permission for every interface to allow its usage in proprietary kernel modules?
Code that tightly integrates with the kernel is considered derived work, which already lead to problems at least once where NVIDIA couldn't integrate his won code because they didn't want to open-source it. Code that somehow only links to GPL modules over the headers is some kind of a grey zone, e.g. kernel devs allow you to have closed-source kernel modules (maybe they have an exemption for that? - dunno), while it is generally unacceptable to link desktop GPL libraries to closed-source apps. As I said, the difference is how you interpret "derived work", and different people do that differently.

I completely agree with TurboPascal7 that licensing restrictions can only harm Avisynth. Personally if I had to choice between going GPL or removing plugin that I don't want to be GPL – result will be removal 100% of the time. And I believe we do have several plugins removed by authors because they were threatened later with GPL stuff.
And I agree too. Me too would like to relicense Avisynth+ under the LGPL. My posts aren't aimed at defending the current licence of Avisynth, but that the current licence should still be adhered to even if I don't like it. Changing the licence still needs to be done in a legally conformant way - considering the old one too. And we are trying to do that actively.