hello_hello
10th August 2020, 16:36
Maybe I'm missing something, but AddAlphaPlane() doesn't always seem to be accepting "last" as the first clip. It seems I can work around it by specifying the mask clip as a named argument, but is this apparent inconsistency expected? I'm running Avisynth+ 3.5 on XP.
No error
ConvertToYUV420()
AddAlphaPlane()
Alfa = ExtractA()
ConvertToYUV420().AddAlphaPlane(Alfa)
Results in a "greyscale source is not allowed" error
ConvertToYUV420()
AddAlphaPlane()
Alfa = ExtractA()
ConvertToYUV420()
AddAlphaPlane(Alfa)
Results in a "greyscale source is not allowed" error
ConvertToYUV420()
AddAlphaPlane()
Alfa = ExtractA()
Add = "AddAlphaPlane(Alfa)"
ConvertToYUV420().Eval(Add)
Results in a "greyscale source is not allowed" error
ConvertToYUV420()
AddAlphaPlane()
Alfa = ExtractA()
Add = "AddAlphaPlane(Alfa)"
ConvertToYUV420()
Eval(Add)
When using Mask=MaskClip, it never produces an error, but I'd be interested to know why only one of the examples above works as I expected it to.
This sort if thing never results in an error
ConvertToYUV420()
AddAlphaPlane()
Alfa = ExtractA()
Add = "AddAlphaPlane(Mask=Alfa)"
ConvertToYUV420()
Eval(Add)
Edit: While I'm here, could somebody please explain this one. I'm using the example from the wiki (http://avisynth.nl/index.php/AddAlphaPlane#Examples). Are these functions newer than version 3.5, or were they removed?
No such function as UToY8
Source = last.AddAlphaPlane()
U8 = source.UToY8()
V8 = source.VToY8()
Y8 = source.ConvertToY()
A8 = source.AddAlphaPlane(128).AToY8()
CombinePlanes(Y8, U8, V8, A8, planes="YUVA", source_planes="YYYY",
\ sample_clip=source)
No such function as AToY8 (or ATtoY)
Source = last.AddAlphaPlane()
U8 = source.UToY.ConvertToY8()
V8 = source.VToY.ConvertToY8()
Y8 = source.ConvertToY()
A8 = source.AddAlphaPlane(128).AToY8()
CombinePlanes(Y8, U8, V8, A8, planes="YUVA", source_planes="YYYY",
\ sample_clip=source)
No error
Source = last.AddAlphaPlane()
U8 = source.UToY.ConvertToY8()
V8 = source.VToY.ConvertToY8()
Y8 = source.ConvertToY()
A8 = source.AddAlphaPlane(128).ExtractA().ConvertToY8()
CombinePlanes(Y8, U8, V8, A8, planes="YUVA", source_planes="YYYY",
\ sample_clip=source)
Cheers.
No error
ConvertToYUV420()
AddAlphaPlane()
Alfa = ExtractA()
ConvertToYUV420().AddAlphaPlane(Alfa)
Results in a "greyscale source is not allowed" error
ConvertToYUV420()
AddAlphaPlane()
Alfa = ExtractA()
ConvertToYUV420()
AddAlphaPlane(Alfa)
Results in a "greyscale source is not allowed" error
ConvertToYUV420()
AddAlphaPlane()
Alfa = ExtractA()
Add = "AddAlphaPlane(Alfa)"
ConvertToYUV420().Eval(Add)
Results in a "greyscale source is not allowed" error
ConvertToYUV420()
AddAlphaPlane()
Alfa = ExtractA()
Add = "AddAlphaPlane(Alfa)"
ConvertToYUV420()
Eval(Add)
When using Mask=MaskClip, it never produces an error, but I'd be interested to know why only one of the examples above works as I expected it to.
This sort if thing never results in an error
ConvertToYUV420()
AddAlphaPlane()
Alfa = ExtractA()
Add = "AddAlphaPlane(Mask=Alfa)"
ConvertToYUV420()
Eval(Add)
Edit: While I'm here, could somebody please explain this one. I'm using the example from the wiki (http://avisynth.nl/index.php/AddAlphaPlane#Examples). Are these functions newer than version 3.5, or were they removed?
No such function as UToY8
Source = last.AddAlphaPlane()
U8 = source.UToY8()
V8 = source.VToY8()
Y8 = source.ConvertToY()
A8 = source.AddAlphaPlane(128).AToY8()
CombinePlanes(Y8, U8, V8, A8, planes="YUVA", source_planes="YYYY",
\ sample_clip=source)
No such function as AToY8 (or ATtoY)
Source = last.AddAlphaPlane()
U8 = source.UToY.ConvertToY8()
V8 = source.VToY.ConvertToY8()
Y8 = source.ConvertToY()
A8 = source.AddAlphaPlane(128).AToY8()
CombinePlanes(Y8, U8, V8, A8, planes="YUVA", source_planes="YYYY",
\ sample_clip=source)
No error
Source = last.AddAlphaPlane()
U8 = source.UToY.ConvertToY8()
V8 = source.VToY.ConvertToY8()
Y8 = source.ConvertToY()
A8 = source.AddAlphaPlane(128).ExtractA().ConvertToY8()
CombinePlanes(Y8, U8, V8, A8, planes="YUVA", source_planes="YYYY",
\ sample_clip=source)
Cheers.