beautypg.com

Data types, Video_mode – Sensoray 817 User Manual

Page 5

background image

5

Data Types


All data types are defined in

s817.h

. Integer types are 32-bit.

VIDEO_MODE

typedef struct {
MODE_TV_FORMAT

tvFormat;

MODE_JPG_SIZE

jpgSize;

MODE_BMP_TYPE bmpType;
int

brightness;

int

contrast;

int

saturation;

int

hue;

} VIDEO_MODE;

tvFormat

Defines TV format:

TV_NTSC

for

NTSC

,

TV_PAL

for

PAL

.

Note

:

It is not recommended to switch the input signal from one TV standard to

another while the board is capturing. This may result in a lock up requiring
software restart.

jpgSize

Defines captured image size:

SIZE_4CIF

-

640x480 (NTSC), 704x576 (PAL);

SIZE_4CIFI

-

640x480 (NTSC), 704x576 (PAL), deinterlaced;

SIZE_2CIF

-

640x240 (NTSC), 704x288 (PAL);

SIZE_1CIF

-

320x240 (NTSC), 352x288 (PAL).

This parameter applies to both JPEG and bitmap captured images.
Images captured in

SIZE_2CIF

format represent one field of interlaced video. Such

an image looks stretched in the horizontal direction, if displayed directly, but it does
not have motion artifacts characteristic to interlaced images. Capture of fields is
supported only at the frame rate (i.e. one field per frame, 30 fields per second for
NTSC, 25 for PAL).
Images captured in

SIZE_1CIF

format represent one field of interlaced video scaled

down horizontally by a factor of 2. The same capture rate limitation as for

SIZE_2CIF

applies.

Images captured in

SIZE_4CIFI

format have one field recreated by interpolating the

lines of another field. This removes motion artifacts at the expense of some losws of
vertical resolution.
PAL images captured in

SIZE_4CIF

and

SIZE_1CIF

sizes have slightly distorted

aspect ratio of 1.222 instead of 1.333.

bmpType

Format of uncompressed image. Currently only monochrome 1 byte/pixel (Y8)
format is supported.