View Single Post
Old 17th April 2005, 17:39   #8  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,653
Many thanks TSP!

I've digged out an about 1.5 years old function from me to test it:
Clearscale.

Code:
function clearscale(clip i, int width, int height, int "filter")
{
filter=default(filter,2)

i.converttorgb32()

#resize to destination size with triple width; 
#add 3 pixels on the right side to get room for image shifting
bicubicresize((width*3),height).addborders(0,0,3,0)                  

#do a prefiltering to supress color speckling
(filter==0) ? last : (filter==1) ? last.blur(1,0) : last.blur(1,0).blur(1,0)

# select spatial correct color planes
R=crop(2,0,-1,0).pointresize(width,height).RtoRGB()
G=crop(1,0,-2,0).pointresize(width,height).GtoRGB()
B=crop(0,0,-3,0).pointresize(width,height).BtoRGB()

#finally merge color planes
MergeRGB(R,G,B)
}
Clearscale will scale your input video paying attention to our LCDs subpixel structure. You'll actually gain a factor of three regarding phase information in the horizontal direction.
Of coure, the images needs to be saved either lossless (PNG, BMP, TIF)
or with non-subsampled-chroma JPG.

With your plugin I got it working again without cracking my brain about subtract, layers and so on
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.

Last edited by scharfis_brain; 17th April 2005 at 20:37.
scharfis_brain is offline   Reply With Quote