pinterf / masktools

MaskTools v2 fork
Other
48 stars 11 forks source link

mt_merge mod16 border artifacts (10-16 bit), mt_diff chroma issue in float #4

Closed tyaniw closed 4 years ago

tyaniw commented 6 years ago

Hi I'm seeing border issues on the right side with mt_merge with non-mod16 width, as was apparently the case in an older version. Also, the diff filters have incorrect output in float; adding mt_lut(uexpr="x 0.5 +",vexpr="x 0.5 +",y=2,u=3,v=3,paramscale="none") fixes the issue. Did the 0-centered chroma get reverted to 0.5-centered? I am using 2.2.17 with Avisynth+ r2728, on a Ryzen 7 2700, running Windows 10. Here's a simple script that shows the chroma problem: blankclip() converttoyv12() o=convertbits(32) bl=o.blur(1) bld=mt_makediff(o,bl,u=3,v=3) o.mt_adddiff(bld,u=3,v=3) convertbits(8)

And another simple script for the border issue (you may have to re-open the script for it to show up, it doesn't seem to be consistent): blankclip(width=484) converttoyuv444().convertbits(16) o=last i=o.invert("Y") m=overlay(o,i.crop(400,0,-0,-0,align=true),x=100).blur(1) mt_merge(o,i,m,u=3,v=3) coloryuv(cont_y=-200) convertbits(8)

pinterf commented 6 years ago

Thanks for the reports. mt_merge non-mod16 issue has problem in the AVX2 path (a strange compiler decision) The other issue affected mt_adddiff which was missed the 0.0-center changes, and still added 0.5 to all planes.