// Copyright 2002 Matt Sandstršm/Too Much Too Soon // This script is freeware, meaning you may copy and // distribute it free of charge, as long as it's kept intact, // including this message. Feel free to use the code as // inspiration for your own scripts, but don't steal. // Email me at mattias@beauty.se if you have any questions. // Thank you. Have fun. filter "Reduce Interlace Flicker" group "TMTS Video" FullFrame input s, "Sensitivity", slider, 3, 1, 5 snap 0, 1, 2, 3, 4, 5 input sp, "Show Problem Areas", checkbox, 0 input a, "Amount", slider, 3, 1, 5 snap 0, 1, 2, 3, 4, 5 code float kern[3][3] float w,h dimensionsof(dest,w,h) image buf1[w][h],buf2[w][h] kern = {0, -s, 0, 0, 2*s, 0, 0, -s, 0} convolve(src1, buf1, kern, 1, 0) kern *= -1 convolve(src1, buf2, kern, 1, 0) lighten(buf1,buf2,buf1,1,kKeyLighten) desaturate(buf1,buf1) kern = { 0,1,0,0,7-a,0,0,1,0 } convolve(src1,buf2,kern,9-a,0) channelcopy(buf1,buf2,kred,knone,knone,knone) if sp == 1 channelmultiply(buf2,buf2,1,1,0.2,0.2) end if matte(buf2,src1,dest,1,kalpha)