View Single Post
Old 15th August 2009, 16:53   #4  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
Quote:
Originally Posted by Gavino View Post
In your constructor, just env->Invoke("ConvertToRGB32") on the input clip, and similarly to convert back.
No, noticed how no other filter does implicit colorspace conversions? Same thing applies here. Also converting back implicitly is even worse because then you just lose even more precision instead of letting the filter after implicitly convert to its own preferred format. Just say NO.

If you for some reason want to implement it anyway do something like this in AvisynthPluginInit2:
Code:
return new MyFilter(Env->Invoke("ConvertToRGB32", Args[0]), all other filter args go here));
I meant the create function, do never trust coding advice on internet forums
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet

Last edited by Myrsloik; 15th August 2009 at 20:54.
Myrsloik is offline   Reply With Quote