Capturing in Different IIDC modes
Steve Sisak
steve.sisak at ioxperts.com
Mon Feb 7 15:42:42 GMT 2005
At 3:01 PM -0500 2/7/05, Peter Carr wrote:
>I'm trying to capture from a Fire-i camera in YUV 4:4:4 @ 160x120.
>I'm not sure what function calls (and associated parameter values) I
>need to make to accomplish this.
You need to pas the appropriate compressType to VDSetCompression()
For the standard IIDC YUV types, we are currently using:
enum
{
kIIDCYUV411Format = 'UYV1', // uyyv yyuy yvyy (8 pixels)
kIIDCYUV422Format = 'UYV2', // uyvy uyvy uyvy (6 pixels)
kIIDCYUV444Format = 'UYV4' // uyvu yvuy vuyv (4 pixels)
};
for these compressDepth does not matter -- pass 0
If you want 24-bit RGB, request 'raw ', depth=24
For 8-bit grayscale, you can either request 'raw ', depth=40 (but
note that black=255, white=0) or 'b08g', which should return standard
gray.
pass the result VDGetActiveSourceRect() to VDSetDigitizerRect() to
request full frame video (no cropping).
The ratio of DigitizerRect to ActiveSourceRect controls cropping
The ratio of DigitizerRect to BoundsRect controls scaling
>Additionally, do I need to setup a GWorld with the same specs as the
>digitizer settings when I decompress the frames? If my bounds
>aren't 160x120 at YUV444, will the GWorld resample the data from the
>digitizer buffer to make it fit?
This is handled at the layers above -- what you probably want to do
is look at Kevin Marks' MiniMung example, which lets you look at
'compressed' data as it goes by.
As of 1.1b43, We install some codecs and transcoders for the IIDC
native types, plus RGGB Bayer so you can see a preview while you're
recording in camera native format.
>Finally, I'm interested in analyzing the images in real time. As a
>result, I'd like to use the altivec extensions. Should I decompress
>the digitizer's image buffer into a vector array instead of a
>GWorld? If so, what's the best way to do this?
Either use the techniques in MiniMung to access the data directly as
it goes by or talk to the vdig directly. I'd start with the former
until you're comfortable.
HTH,
-Steve
--
_________________________________________________________________________
Steve Sisak, CTO steve.sisak at ioxperts.com
IOXperts, Inc. voice: +1 617 876-2572
87 Bristol St #3A fax: +1 617 876-2337
Cambridge, MA 02139 mobile: +1 617 388-6476
More information about the Video-Developers
mailing list