subtype idKGScriptParserduration?ð framebaseencodingparms inputFormat inputCountpublicspudtitlewww.fxscript.orguitype typedefaultstringvaluefieldFielduiinfolabels Upper (Odd) Lower (Even)min?€max@@@methodmethod interpolation duplicationquick and dirty (vertical blur)?€ @@?€?€privatestaticsscript Zfilter "stibs de-interlacer" group "stib's filters" // ©2002 stephen dixon // a de-interlacer with more options and less processing than the FCP version // De-interlacing is useful for removing flicker from stills that contain movement. // if you want to learn more about fxscript there's an excellent fxscript reference at: www.joemaller.com // this is emailware: feel free to use it for any purpose except as a commercial product, // if you do use it and you like it, send me an email saying hello --> sdixon@vocam.com //this software is free. You may copy or distribute it as long as this message is included //see www.fxscript.org for more //not sure what this does: FullFrame input spud, "www.fxscript.org", Label, "string" input field, "Field", popup, 2, "Upper (Odd)", "Lower (Even)" input method, "method", RadioGroup, 1, "interpolation","duplication", "quick and dirty (vertical blur)" code float kern[3][3] // munge the popup values (1 or 2) into 1 for upper or 0 for lower field = -1 * (field - 2) if method == 3 then // quick and dirty de-interlace. Basically a one pixel vertical blur using the convolution kernel below // 0 1 0 0 0 0 // 0 1 0 OR 0 1 0 // 0 0 0 0 1 0 // depending on whether the field is upper or lower kern = {0, field , 0, 0, 1, 0, 0, 1-field, 0} convolve(src1, dest, kern, 2 , 0) else // we need a few more variables for the more involved interpolation or duplication methods float i, width, height, divisor dimensionsof(dest, width, height) float columnOffset[width], rowOffset[height] image buf[width][height] // delete one field by offsetting alternate rows of pixels right off the edge of the image // to do this, first we make an array of alternating offsets: ..0, height, 0, height.. // if field is upper we start at row 1 , if lower at row 0 for i = field to height-1 step 2 rowOffset[i] = width next offsetPixels(src1, buf, 0, columnOffset, rowOffset, aspectof(dest)) // set up the convolution kernels for interpolation or duplication: if method == 1 // interpolation: for pixels in the deleted rows the image comes from the averaging the row above & below // pixels in the rows not deleted won't be affected by this kernel kern = {0, 1 ,0, 0, 2, 0, 0, 1, 0} divisor = 2 else // duplication: pixels come from either the present row or the one above or below depending on the choice of field // (this is the same convolution kernel as used int the quick and dirty method BTW) kern = {0, field, 0, 0, 1, 0, 0, 1-field, 0} divisor = 1 end if // now put it into action: convolve(buf, dest, kern, divisor , 0) end if namestibs de-interlacerscriptid0groupstib's filters fullframeencoded