// Copyright 2003 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 "Chroma Resample" group "TMTS Video" input std, "Sampling Scheme", popup, 1, "4:2:0 (DV PAL)", "4:1:1 (DV NTSC)", "4:2:2" InformationFlag("YUVaware") code float format, h, v point sp[4], dp[4] dimensionsof(dest, h, v) image buf[h][v] format = GetPixelFormat(dest); MakeRect(sp, -h/2, -v/2, h, v) if std == 1 then MakeRect(dp, -h/4, -v/4, h/2, v/2); else if std == 2 then MakeRect(dp, -h/8, -v/2, h/4, v); else MakeRect(dp, -h/4, -v/2, h/2, v); end if; if (format != kFormatYUV219) ConvertImage(src1, src1, kFormatYUV219); end if blitrect(src1,sp,buf,dp); blitrect(buf,dp,dest,sp); channelcopy(src1, dest, knone, kred, knone, knone);