View Single Post
Old 3rd February 2006, 20:41   #61  |  Link
Inc
Squeeze it!
 
Inc's Avatar
 
Join Date: Oct 2003
Location: Germany
Posts: 472
Quote:
Originally Posted by Amnon82
@Ebobtron: I took a look on your programm. Nice app.

I've two questions for you:
I'm coding in Delphi and use avisynth_c-port for open AVS-files in my newest build of AutoQ2. I coded also an sample app with a preview option. avisynth_c displays only files in RGB. I tried also your app with YUY2, YUV12 and got a black screen. In my apps I got a white one. Only RGB shows the frames. So my first question is: Does AVISYNTH only displays RGB frames?

My second question: In what language do you code?
Your display is rgb, so your graphics cards delivers a rgb signal and so you do use the GDI API routines or maybe delphi native commands to show the image.
To show the image, you have to feed to your code a rgb one.
(If using DirectX then you could pass the yuv image via the hardware on your graphicscard which could do the conversation, but lets stick on straight rgb handling).
Do apply in your delphi avisynth_c example a condition where its asked about the incoming Colorspace from the resulted clip. There are declared functions in the avisynth_c interface which can do that like 'IsRGB32()'.
If its not the case, then do invoke via a "ConverttoRGB32()" , take the clip from the result and use avsiynth's BitBlt() to perform an image blocktransfer to your determined target-imagepointer. Now the frameserved Imagedata is rgb which is easy to handle for your application's video preview routines by just requesting the bitmaps from the mentioned target-image-memorypointer. I do use RGB24 as output with no problems but as I heared its better to serve RGB32 as its DWORD aligned (if I understood right) as most of the GDI API routines do prefer DWORD aligned RGB data.

Last edited by Inc; 3rd February 2006 at 20:48.
Inc is offline   Reply With Quote