YUV overlay mask transparency issue. Partial transparency issue on 100% white areas
-affects YUV overlay operations in 10bit, different subsamplings.
-RGB overlay operations seem ok
-does not matter if you mark YUV versions as "limited" range or "full"
-Works ok if you use Gray8 for the mask, and base clip / overlay clip are matching 8bit YUV ; or Gray16 and base/overlay are matching 16bit YUV . But there is no Gray10 format, so 10bit YUV overlay with mask is out of luck, or 12bit YUV
-works as expected if you go back to older havsfunc version a few months ago, with matching pixel format YUVxxxPx mask instead of using GRAYx mask. Not sure where the exact commit altered it, possibly the recent ones
eg.
Code:
import vapoursynth as vs
import havsfunc as haf
core = vs.get_core()
orig = core.imwri.Read(r'testchart.png')
logo = core.imwri.Read(r'logo.png', alpha=True)
orig2 = core.resize.Bicubic(orig, format=vs.YUV420P10, matrix_s="709")
logobase2 = core.resize.Bicubic(logo[0], format=vs.YUV420P10, matrix_s="709", range_s="full")
logoalpha2 = core.resize.Bicubic(logo[1], format=vs.YUV420P10, matrix_s="709", range_s="full")
#logoalpha2 = core.std.SetFrameProp(logoalpha2, prop="_ColorRange", intval=1) # Mark video as limited range.
#logoalpha2 = core.resize.Bicubic(logo[1], format=vs.GRAY8, matrix_s="709", range_s="full")
#RGB24, RGB30, RGB48 work ok
#orig2 = core.resize.Bicubic(orig, format=vs.RGB30)
#logobase2 = core.resize.Bicubic(logo[0], format=vs.RGB30)
#logoalpha2 = core.resize.Bicubic(logo[1], format=vs.RGB30)
overl = haf.Overlay(orig2, logobase2, mask=logoalpha2)
overl.set_output()
Test images
https://www.mediafire.com/file/vy6k8...mages.zip/file