Thread: Avisynth+
View Single Post
Old 25th February 2019, 09:20   #4546  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Quote:
Originally Posted by wonkey_monkey View Post
overlay doesn't seem to throw errors properly, or at least not in the usual manner. Instead of a popup error, as you get with layer when specifying bad parameters or providing unsupported colourspaces, overlay's internal errors (e.g. "Overlay: Invalid 'Mode' specified.") come up as status bar messages in VirtualDub2 instead.

Is it because they are being thrown in GetFrame instead of in the constructor?
I'll check it later this week.

Quote:
Originally Posted by wonkey_monkey View Post
PS Is there any reason layer and overlay couldn't be merged? They seem like they overlap quite a lot.
I have finished porting Layer to support all formats and bit depths (it's on git source already, but not finished and published the whole project because the possible integration with Overlay has also come in my mind). Theoretically Overlaps and Layer can be merged - unfortunately we have to keep both - compatibility you know. They are using different set of parameters - though I already introduced 'opacity' for layer, it was needed instead of 'level' because of the consistency among different bit-depth), terminology (add-blend), and they are also using different methods for some of their similar filters (lighten-darken has an additional threshold in Layer), Layer can use a single alpha channel for masking as part or the format (RGB_A, YUV_A), Overlaps is using mask, but this can also be a luma-chroma clip.
In 'Layer' I have done proper chroma masking based on a single luma mask (now you can even choose placement as mpeg2 or mpeg1), for such task Overlay converts 4:2:0 or 4:2:2 clips to 4:4:4, and can only use a not-so-precise conversion for chroma.
So the two filters are similar but there are still differences -> lot of work.

Last edited by pinterf; 25th February 2019 at 11:10. Reason: typos
pinterf is offline