subtype idKGScriptParserduration?ð framebaseencodingparms inputFormat inputCountpublicspudtitlewww.fxscript.orguitype typedefaultstringvaluemethod directionuiinfolabelsupper -> lowerLower -> uppermin?€max@@@privatestaticsscriptw//stib's field swapper //swaps video field order by time- shifting frames =/- one field //© 2002 stephen dixon //this software is free. You may copy or distribute it as long as this message is included //see www.scriptgeek.netfirms.com for more filter "field swapper" group "stib's filters" //not sure what this does, but it's in afew similar apple filters. I haven't had the time to try taking it out: FullFrame input spud, "www.fxscript.org", Label, "string" input method, "direction", RadioGroup, 2, "upper -> lower", "Lower -> upper" code float i, width, height, divisor,theaspect dimensionsof(dest, width, height) float columnOffset[width], rowOffset[height], frame_offset, spud, ThisClipinPoint image buf[width][height]//, buf2[width][height] string theinfo //munge the UI values of method (1 & 2) into 0 upper & 1 lower method -= 1 frame_offset = 1 - (method*2) // if were converting upper -> lower we want to use frame+1 and lower -> upper we want frame-1 // delete one field by offsetting alternate rows of pixels right off the edge of the image // to do this, we make an array of alternating offsets: ..0, width, 0, height.. for i = method to height-1 step 2 rowOffset[i] = width next // here's where we do the moving: offsetPixels(src1, buf, 0, columnOffset, rowOffset, aspectof(buf)) //reset the offset table rowOffset *= 0 // now get the other field, which comes from the frame either preceding or following // depending on the method, and put it into the destination getlimits(clip1,spud,ThisClipinPoint) // get the in point GetVideo(clip1, (frame - (ThisClipinPoint) - Frame_offset), dest) // you won't believe how long it took me to get the maths of that previous line right // I was adding not subtracting. Why the offset for getvideo is negative value has me stumped. // now put our original image, which now is only 1 field on top of it matte(buf, dest, dest, 1, kAlpha) name field swapperscriptid(groupstib's filters fullframeencoded