Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SGStartRecord always sets IIDC camera to Format7 Mode0



I've done some further tests with SGSetChannelBounds and it does not seem to work as described.

Heres what I've tested (the IIDC camera I'm using has a max resolution of 780x580 and fully supports Format 7 Mode 0 and others)

1) setting up a SG and video channel an usual (SGInitialize, SGNewChannel,...)
2) calling SGSetChannelBounds with various resolutions
3) starting preview
4) after preview has started, I'm checking the following CSR registers to get the current video mode & resolution, 
    Cur_V_Format
    Cur_V_Mode
    V_CSR_INQ7_0
    IMAGE_SIZE
    IMAGE_POSITION
       
    the result is always the same: Format7 Mode0 at 780x580

Any ideas?

Mark Munte

On 17.10.2005, at 21:04, Sean Williams wrote:

There is not an explicit API for controlling what format/mode an the QuickTime IIDC Digitizer uses when a camera presents multiple choices.
The digitizer checks what it is instructed to do when VDSetCompression() is called on it, and attempts to map that to the camera's abilities.  With regard to using "Format 7", the logic is largely driven by the pixel format and the requested bounds.

The short answer is that if you are digitizing the full frame, call SGSetChannelBounds() and specify the bounds of the format you are trying use.  If there is an exact match to the bounds/pixel format the camera can produce in Formats 1-3, it will use that over Format 7


The longer answer in the psuedo-code below shows all the corner cases. ("partial" settings refers to Format 7, and "full" refers to Formats 1-3)

use "full" settings if there aren't any "partial" settings for the desired pixel format
use "partial" settings if there aren't any "full" settings for the desired pixel format


*** at this stage, settings exist for the "partial" and "full" formats in the desired pixel formats, so start inspecting the the desired bounds of the image

use "full" settings if they exist for the requested bounds AND (the whole frame is being digitized or no "partial" settings exist for the the requested bounds)
use "partial" settings if they exist for the requested bounds AND (only a portion of the frame is being digitized or no "full" settings exist for the requested bounds)


*** If you've gotten this far, neither "full" nor "partial" have an exact match for the desired bounds, so

choose the "full" settings whose bounds are >= desired bounds (or the biggest possible, if nothing >=)
choose the "partials" settings whose bounds are >= desired bounds (or the biggest possible, if nothing >=)
determine the resulting scale factor from the full/partial bounds to the desired bounds
use the one whose scale factor is closest to 1



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden

This email sent to email@hidden

References: 
 >SGStartRecord always sets IIDC camera to Format7 Mode0 (From: Mark Munte <email@hidden>)
 >Re: SGStartRecord always sets IIDC camera to Format7 Mode0 (From: Sean Williams <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.