Page: | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
(Version 6.2)
X Window System is a trademark of X Consortium, Inc.
Copyright © 1989, 1990, l991 Tektronix, Inc.
Permission to use, copy, modify, and distribute this document for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice are retained, and that the name of Tektronix not be used in advertising or publicity pertaining to this document without specific, written prior permission. Tektronix makes no representations about the suitability of this document or the protocol defined in this document for any purpose. It is provided "as is" without express or implied warranty.
MVEX enables those models that can be fitted with color video boards to use the X-window video extension facility. The current specifications are based on the following versions:
These versions do not conform to the X Consortium standards. They may be changed as they are introduced to the X Consortium standards.
Programs that use MVEX must include <Xl 1/MVEX/MVEXlib.h>.
To link the MVEX library, the -lmvex option must be specified at linkage.
These data structures are used by routines in MVEXlib:
typedef XID VideoIn;
typedef XID VideoOut;
typedef XID VedeoIO;
typedef XID VideoReference;
VideoIO | vio; |
Atom | port; |
Bool | frames_available; |
Bool | timecodes_available; |
Bool | frame_accurate; |
Bool | negative; |
int | hour; |
int | minute; |
int | second; |
int | frame; |
int | field; |
Bool | negative; |
int | frame; |
int | field; |
long | numerator; |
long | denominator; |
long | num_base; | |
long | num_increment; | |
long | num_limit; | |
int | num_type; | /* MVEXGeometricRange or MVEXLi nearRange */ |
long | denom_base; | |
long | denom_increment; | |
long | denom_limit; | |
int | denom_type; | /* MVEXGeometricRange or MVEXLi nearRange */ |
XRectangle | base; | |
XRectangle | limit; | |
int | x-inc; | |
int | y_inc; | |
int | width_inc; | |
int | height_inc; | |
int | type; | /* MVEXGeometricRange or nearRange */ |
MVEXFraction | frame_rate; | /* max nominal rate(frames/sec) */ |
MVEXRectangleRange | src; | /* set of possible source rectangles */ |
MVEXRectangleRange | dest; | /* set of possible dest rectangles */ |
MVEXFractionRange | x_scale; | /* set of dst/src width ratios */ |
MVEXFractionRange | y_scale; | /* set of dst/src height ratios */ |
Bool | identity_aspect; | /* must x_scale ==y_scale? */ |
MVEXFraction | frame_rate; | /* frames/sec in signal format */ |
MVEXFraction | field_rate; | /* fields/sec in signal format */ |
int | width; | /* signal width (in pixels) */ |
int | height; | /* signal height (in pixels) */ |
int | priority_steps; | /* priority resolution */ |
int | concurrent_use; | /* max simultaneous use */ |
int | nplacement; | /* number of placements */ |
MVEXPlacement | *placement; | /* placement list */ |
Window | window; | /* identifies client requesting ownership */ |
VideoID | vid; | /* resource to be owned */ |
int depth; | /* depth */ | |
VisualID visualid; | /* visual ID used for colormaps in * /* CaptureGraphics, window in */ /* Render Video */ /* True if video input pixels cannot */ |
|
Bool opaque; | /* be interpreted by a Core type */ | |
unsigned long | model_mask; | /* Window, Pixmap and/or Composite */ |
unsigned long | red_mask; | |
unsigned long | green-mask; | |
unsigned long | blue_mask; |
MVEXFraction | normal_saturation; | ||
MVEXFraction | normal_contrast; | ||
MVEXFraction | normal_hue; | ||
MVEXFraction | normal_bright; | ||
int | n_saturation; | ||
int | n_contrast; | ||
int | n hue; | ||
int | n_bright; | ||
MVEXFractionRange | *saturation; | ||
MVEXFractionRange | *contrast; | ||
MVEXFractionRange | *hue; | ||
MVEXFractionRange | *bright; |
VideoReference | vref; | /* VideoIn reference ID */ |
int | ncontrols; | |
MVEXControl | *controls; | |
MVEXGeometry | geometry; | |
MVEXModelInfo | model_info; | |
XRectangle | clip_size; |
VideoReference | vref; | /* VideoOut reference ID */ |
int | ncontrols; | |
MVEXControl | *controls; | |
MVEXGeometry | geometry; | |
MVEXModelInfo | model_info; |
int | full_motion; |
int | priority; |
int | marker_type; |
MVEXFrame | in_frame; |
MVEXFrame | out_frame; |
MVEXTimecode | in_timecode; |
MVEXTimecode | out_timecode; |
MVEXFraction | hue; |
MVEXFraction | saturation; |
MVEXFraction | bright; |
MVEXFraction | contrast; |
int type; | /* of event */ |
unsigned long serial; | /* # of last request processed by server */ |
Bool send_event; | /* true if this came from a SendEvent request */ |
Display *display; | /* Display the event was read from */ |
Window window; | /* window on which video constraints were violated */ |
VideoIO vid; | /* VideoIO whose video constraints were violated */ |
Time time; | /* current server time */ |
unsigned long action_mask; | /* MVEXScale Violation (1L << 0) /* MVEXPlacementViolation */ /* MVEXClipViolation */ /* MVEXOverlapViolation */ /* MVEXHueViolation */ /* MVEXSaturationViolation */ /* MVEXContrastViolation */ /* MVEXBrightnessViolation */ |
int state; | /* MVEXViolationSuccess, * MVEXViolationFail, or * MVEXVilationSubset */ |
int type; | /* of event */ |
unsigned long serial; | /* # of last request processed by server */ |
Bool send_event; | /* true if this came from a SendEvent request */ |
Display *display; | /* Display the event was read from */ |
Drawable window; | /* unused */ |
VideoIO vid; | /* vid on which Render/Capture was requested */ |
Atom | port; /* port setup changed */ |
Time | time; /* current server time */ |
Bool | frames_available; /* true if frames can be read */ |
Bool | timecodes_available; /* true if timecodes can be read */ |
Bool | frame_accurate; /* true if requests are frame accurate */ |
int type; | /* of event */ |
unsigned long serial; | /* # of last request processed by server */ |
Bool send_event; | /* true if this came from a SendEvent request */ |
Display *display; | /* Display the event was read from */ |
VideoIO vid; | /* drawable on which Render/Capture was requested */ |
Time | time;/* current server time */ |
int | state; /* MVEXSyncAcquired or MVEXSyncLost */ |
int type; | /* of event */ |
unsigned long serial; | /* # of last request processed by server */ |
Bool send_event; | /* true if this came from a SendEvent request */ |
Display *display; | /* Display the event was read from */ |
Drawable drawable; | /* drawable on which Override was selected */ |
VideoIO vid; | /* vid on which Render/Capture was requested */ |
VideoIO override_id; | /* vid in overriding request */ |
Time | time; /* current server time */ |
int | state; /* Reason for override */ |
int type; | /* of event */ |
unsigned long serial; | /* # of last request processed by server */ |
Bool send_event; | /* true if this came from a SendEvent request */ |
Display *display; | /* Display the event was read from */ |
Window | window; /* unused */ |
XID src; | |
XIDdst; | |
Bool | redirect; |
int | request; /* MVEXRender or MVEXCapture */ |
Time | time; /* current server time */ |
display | Specifies the connection to the X server. |
owners | Specifies array of ownerships to set. |
nowners | Specifies number of entries in owners array. |
For each member of the owners list, the client that created the specified window is given owner-ship of the specified resource. [See the MVEX Protocol ChangeOwnership request description]
display | Specifies the connection to the X server. |
reference | Specifies reference for which a VIDEOIO alias is requested. |
Returns a VideoIO corresponding to the given VideoReference. If the MVEX extension cannot be initialized, the returned value is None. [See the MVEX Protocol Create Video request description]
(In the current release, only one resource can be decoded at a time and one video window
can be displayed on the X server.)
display | Specifies the connection to the X server. |
src | Specifies the video source. |
dest | Specifies the drawable which accepts the video signal. |
gc | Specifies the gc which provides the subWindowMode and the clip information. |
port | Specifies the port identifier for the video input. |
src_x | |
src_y | Specify the x and y coordinates of the upper-left corner of the video source rectangle. |
src_width | |
src_height | Specify the width and height of the video source rectangle. |
dest_x | |
dest_y | Specify the x and y coordinates of the upper-left corner of the destination drawable rectangle. The coordinates are relative to the origin of the destination drawable. |
dest_width | |
dest_height | Specify the width and height of the destination drawable rectangle. |
value_mask | Specifies the set of bits designating the values to send. |
values | Specifies the set of values for this request. |
The specified region of the source video signal is decoded and directed to the
destination drawable.
See Section 8.2.2, Remarks on DEOGEOMETRY. Accessing a
videopixel can be implemented.
The values that can be specified to value_mask are as follows:
VRFullMotion | Sets consecutive updating of a video signal |
VRPriority | Sets priorities (Not supported) |
VRMarkerType | none,FrameMaker, or TimecodeMarker (Not supported) |
VRInFrame | Sets the start frame (Not supported) |
VROutFrame | Sets the end frame (Not supported) |
VRInTimecode | Sets the start time code (Not supported) |
VROutTimecode | Sets the end time code (Not supported) |
VRHue | Sets the Hue |
VRSaturation | Sets the Saturation |
VRBrightness | Sets the Brightness |
VRContrast | Sets the Contrast |
display | Specifies the connection to the X server. |
src | Specifies the drawable source. |
dest | Specifies the video output which accepts the video signal. |
cmap | Specifies the colormap to use for a Pixmap drawable. Must be None for window drawable. |
port | Specifies the port identifier for the video output. |
src_x | |
src_y | Specify the x and y coordinates of the upper-left corner of the source drawable rectangle. The coordinates are relative to the origin of the source drawable. |
src_width | |
src_height | Specify the width and height of the drawable source rectangle. |
dest_x | |
dest_y | Specify the x and y coordinates of the upper-left corner of the destination video rectangle. |
src_width | |
src_height | Specify the width and height of the drawable source rectangle. |
dest_x | |
dest_y | Specify the x and y coordinates of the upper-left corner of the destination video rectangle. |
dest_width | |
dest_height | Specify the width and height of the destination video rectangle. |
dest_height | Specify the width and height of the destination video rectangle. |
subwindow_mode | Specifies the treatment of the source window's children. Ignored if source is a pixmap. You can pass ClipBy Children or IncludeInferiors. |
value_mask | Specifies the set of bits designating the values to send. |
values | Specifies the set of values for this request. |
The specified region of the drawable source is encoded into a video signal by the
destination encoder.
This function is not supported in the current release.
display | Specifies the connection to the X server. |
action_mask | Specifies the action to take on the drawables list. The mask values is a bitwise OR of these masks: MVEXStopRenderVideo and MVEXStopCaptureVideo. |
drawables | Specifies array of drawables to stop. |
ndrawables | Specifies number of entries in drawablesarray. |
The video actions previously requested on any of the drawables given in the drawables array are stopped, even if one of the drawables produces an error. [See the MVEXProtocol StopVideo request description]
display | Specifies the connection to the X server. |
setup | For input, it specifies the vio and the port combination being queried. For return values, it specifies if frames and timecodes are available, and if the combination is frame-accurate on all operations. |
The vio and port combination are queried its ability to "see" timecodes and/or frames, and whether it is able to perform RenderVideo or CaptureGraphics on a frame accurate basis. [See the MVEX Protocol QuerySetup request description]
display | Specifies the connection to the X server. |
screen_number | Specifies the screen to be updated. |
[See the MVEXProtocol QueryVideo request description]
MVEXQueryVideo updates connectivity and device list information in MVEXlib. It
should be called by the client after receiving a MVEXConnectivityEvent or a
MVEXChangeEvent.
The client should get a new XVout array by calling MVEXGetVouts after calling MVEXQueryVideo.
MVEXQueryVideo does an implicit selection for MVEXChange events. This selection cannot be withdrawn.
Status return is non-zero if MVEXlib can be initialized. Otherwise the return is zero and MVEXlib data are not updated.
display | Specifies the connection to the X server. |
id | Specifies the VideoID or Drawable on which events are selected. |
event_mask | Specifies the events to select. |
The following table lists the event mask constants you can pass to the event_mask argument and the circumstances in which you would want to specify the event mask:
Event Mask | Circumstances |
NoEvent Mask | No events wanted |
MVEXRedirectMask | MVEXRequest events wanted on a screen (should be used only by Video Manager) |
MVEXSyncMask | MVEXSync events wanted |
MVEXViolationMask | MVEXViolation events wanted |
MVEXOverrideMask | MVEXOverride events wanted |
MVEXRequest, MVEXViolation, and MVEXOverride events can be selected only on a Drawable. MVEXSync events can be selected only on a VideoIO and MVEXControl events can be selected only on a VideoID. Selections are not cumulative; if an event is not asserted in conjunction with a valid resource for that event (e.g. not asserting MVEXOverrideMask when using a Drawable resource), the event will not be delivered on that resource regardless of earlier selections on that resource. MVEXRequest events are actually selected on the screen associated with the drawable id argument; to maintain these selections, MVEXRedirectMask must be asserted on each drawable id associated with that screen. [See the MVEX Protocol SelectVideoEvents request description]
Every MVEX event also contains the least-significant 16 bits of the sequence number of
the last request issued by the client that was (or is currently being) processed by the
server.
The events particular to MVEX can be recognized from the fact that the value of the
occurred event type is the same as that of the event code obtained by the utility function
of MVEXBaseEvent or more. (The event codes of MVEX are set in the order of MVEXViolation,
MVEXSetup, MVEXSynch, MVEXOverride, and MVEXRequest.
The meanings of individual events are given below (see Section 8.1.3, Event Structures);
For scale, placement, clip and overlap, if state is Subset, then some subset of
the unobscured regions are still being displayed or captured; if the state is Fail,
then the originating RenderVideo and CaptureGraphics will be cancelled (no VideoOverride
event is generated). Note that for pixmaps, Overlap will never be asserted.
For hue, saturation, contrast and brightness, if the state is Subset, then a
suitably close value has been substituted; if the state is Fail, then normal value
was substitued. Note that Violation events for these are not generated when the hardware
lists no abilities for the adjustment.
The time is the current server time.
It is generated following a RenderVideo request with the specified id and video
input, whenever the sync is lost or gained. When selected, at least one VideoSync event
is guaranteed following a RenderVideo request. An event with state Lost will
be delivered if the picture cannot be rendered for some reason; e.g. no video sync, or a
digital feed is down. An event with state Acquired will be delivered after the a
complete frame has been rendered.
The event is also generated following a CaptureGraphics request with the
specified id and video output, whenever the output signal begins to be produced. When
selected, at least one VideoSync event is guaranteed following a CaptureGraphics
request. An event with state Lost will be delivered if the picture cannot be
captured for some reason; e.g. no video sync, or a digital feed is down. An event with
state Acquired will be delivered after the a complete frame has been captured.
Note that if the original request specified fullmotion false, and the request
succeeded, this will be the only event generated.
The time is the current server time.
Given a RenderVideo or CaptureGraphics request specifying VIDEOIO V and
drawable D, the following changes in the environment will cause th request to stop, and
the VideoOverride event to be generated with the specified state:
Note that if a client has ownership for a VIDEOIO, the system is guaranteed never to
stop an issued request given any of the conditions marked with state RequestOverride. A
video resource manager may arbitrarily decide to revoke ownership at any time, but a
request will not be stopped until there is contention for the resource.
Normally, when a client receives a VideoOverride event with state RequestOverride
and the override-id is not its own, it should not try to restart the RenderVideo
(CaptureGraphics) request until being notified by some video manager, or explicit
instruction by the user. This model will work whether or not a video manager is present.
The time is the current server time.
This event is intended to be used by video resource managers so that it can be notified
about clients that want to use a video resource that is currently in use.
The time is the current server time.
display | Specifies the connection to the X server. |
Returns the major version for the MVEX extension if the MVEX library can be initialized; otherwise, - l is returned.
display | Specifies the connection to the X server. |
Returns the major version for the MVEX extension if the MVEX library can be initialized; otherwise, - l is returned.
display |
display | Specifies the connection to the X server. |
Returns the major opcode for the MVEX extension if MVEXlib can be initialized; otherwise, False is returned.
display | Specifies the connection to the X server. |
Returns the base event type code for the MVEX extension if MVEXlib can be initialized; otherwise, False is returned.
display | Specifies the connection to the X server. |
Returns the base error code for the MVEX extension if MVEXlib can be initialized; otherwise, False is returned.
display | Specifies the connection to the X server. |
screen_number | Specifies the screen to be examined. |
input_overlap | Returns True if VIRs may overlap, False otherwise. |
capture_overlap | Returns True if VORs may overlap, False otherwise. |
io_overlap | Returns True if a VIR and a VOR may overlap, False otherwise. |
Status return is non-zero if VEXlib can be initialized. Otherwise the return is zero and the return arguments are not updated. [See VEXProtocol QueryVideo request description]
display | Specifies the connection to the X server. |
vinfo_mask | Specifies the visual mask value. |
vinfo_template | Specifies the visual attributes that are to be used in matching the visual structures. |
nitems_return | Returns the number of matching visual structures. |
include_core_visuals | Specifies which visuals lists should be searched. If the value is True, then both the Core and the VEX visuals lists are searched, otherwise, only the VEX list is searched. |
MVEXGetVisualInfo function returns a list of visual structures that match the attributes specified by vinfo_template. If include_core_visuals is False, it returns only those visuals that are unique to VEX(not provided in the Core connection information), otherwise it returns visuals from either the Core list or the VEX list. Visuals returned by this routine are not guaranteed to have any video capability; association with video is determined by MVEXWindowModel structures returned by MVEXGetVins and MVEXGetVouts. If no visual structures match the template using the specified vinfo_mask, MVEXGetVisualInfo returns a NULL. To free the data returned by this function, use XFree. The choices for vinfo_mask and the definition for the XVisualInfo data structure are given in the Core Xlib specification (see XGetVisualInfo in Chapter l0, Application Utility Functions). Possible values for the class field of the XVisualInfo structure include MVEXVideoGray and MVEXVideoColor in addition to the Core class types.
display | Specifies the connection to the X server. |
screen_number | Specifies the screen to be examined. |
nitems_return | Returns number of MVEXVin structures in the returned MVEXVin array. |
Returns an array of MVEXVin structures for the named screen. The array remains valid for the life of the connection. Returns NULL if VEXlib cannot be initialized or cannot allocate space or if there are no VideoInputs for this screen. To free the data returned by this function, use XFree.
display | Specifies the connection to the X server. |
screen_number | Specifies the screen to be examined. |
nitems_return | Returns number of MVEXVout structures in the returned MVEXVout, array. |
Returns an array ofMVEXVout structures for the named screen. The array remains valid for the life of the connection. Returns NULL if VEXlib cannot be initialized or cannot allocate space or if there are no Video Outputs for this screen. To free the data returned by this function, use XFree.
given | Specifies the fraction to be checked. |
ranges | Specifies the fraction range list to be compared against. |
nranges | Specifies the number of fraction ranges in the list. |
lower | Returns the nearest lower or equivalent fraction in the range. |
higher | Returns the nearest higher or equivalent fraction in the range. |
Returns True if given is numerically equal to a fraction in one of the fraction ranges in ranges, in which case lower and higher are returned numerically equal to given, with the smallest values for numerator and denominator within range. For example, if given is 22/33, lower and higher could be 2/3 even if 22/33 is also in range.
Returns False otherwise. If given is between the highest and lowest fractions in
all the fraction ranges in ranges, then lower is the closest fraction in ranges
of less value and higher is the closest fraction in ranges of greater
value. If given is below the lowest fraction in ranges, both lower and
higher are that lowest fraction, while if above both are the highest.
One use of this function is to make sure a src and dest match according to the x_scale and y_scale ranges, so that the MVEXRenderVideo or MVEXCaptureGraphics functions do not get a VideoViolation event.
given | Specifies the fraction to be checked. |
list | Specifies the fraction list to be compared against. |
count | Specifies the number of fractions in the list. |
lower | Returns the nearest lower or equivalent fraction in the list. |
higher | Returns the nearest higher or equivalent fraction in the list. |
index_return | Returns the index of lower. |
Returns True if given is numerically equal to a fraction in list, in
which case lower and higher are both some fraction that is numerically
equivalent to given.
Returns False otherwise. If given is between the highest and lowest fractions in list, then lower is the closest fraction of less value and higher is the closest fraction of greater value. If given is below the lowest fraction in list, both lower and higher are that lowest fraction (index_return is 0). If given is above the highest fraction in list, both lower and higher are that highest fraction (index_return is count-l ).
ranges | Specifies the fraction ranges to be expanded. |
nranges | Specifies the number of fraction ranges. |
length_return | Returns the number of fractions in the list. |
Returns a list of fractions, with 0 occurring at most once. The list is in numerical
order, least first, with numerically equivalent fractions in no particular order.
This function is intended for use with small fraction ranges, such as may be found in
the VEX_SPEED control description. Fraction ranges in the placements of MVEXVin or
MVEXVout structures can be too large for this function, which allocates the memory for the
list. If in doubt, use MVEXFractionCount to see how big the list will be before using this
function.
To free the data returned by this function, use XFree.
ranges | Specifies the fraction ranges to be counted. |
nranges | Specifies the number of fraction ranges. |
Returns the number of fractions in the list of fraction ranges, which can be used to determine whether to use MVEXFractionList, above.
given | Specifies a given rectangle. |
range | Specifies a rectangle range. |
enclosed | Returns the largest rectangle in the range that is enclosed by the given rectangle, if possible. |
enclosing | Returns the smallest rectangle in the range that encloses the given rectangle, if possible. |
Returns True if given exactly matches a rectangle in range. Then both enclosed
and enclosing are returned equal to given.
Returns False otherwise. If given is within the extents of range, then enclosed
is the largest rectangle in range that is completely enclosed by given and enclosing
is the smallest rectangle in range that completely encloses given. But if given
is partially or completely outside the extents of range, then enclosed and enclosing
are as close as possible to being enclosed/enclosing while still being rectangles in range.
This function can be used to find either the proper enclosing area around a desired source area or the largest proper destination area within a given boundary, for rendering video or capturing graphics.
To display video images using the video computer board, the X server visual must be 8-plane PseudoColor or GrayScale. (The displaying operation in other X server visual environments is not guaranteed.)
In other environments, add mvexOff to the X server starting-up option to use the video capture board, so that the MVEX extension cannot works.
The following three types of video board are available.
In MVEXGetVins, as many MVEXVin structure pointers as there are corresponding signal formats are returned and the start address of the consecutively stored addresses is returned. An atom number for each terminal is set in the port atom array of each MVEXVin structure member. These specifications are made by specifying the MVEXRenderVideo argument 5 port when MVEXRenderVideo is executed. The atom names of the ports corresponding to the signal formats are listed below.
NTSC format (1, 2, and 3) |
: | "ntsc-s " "ntsc-rcal " " ntsc-rca2 " |
/* s terminal */ /* RCA terminal 1 */ /* RCA terminal 2 */ |
|
NTSC format (1 and 2) |
: | " pal-s " " pal-rcal " " pal-rca2 " |
/* s terminal */ /* RCA terminal 1 */ /* RCA terminal 2 */ |
|
SECAM format (1 and 2) |
: | " secam-s " " secam-rcal " " secam-rca2 " |
/* s terminal */ /* RCA terminal 1 */ /* RCA terminal 2 */ |
|
YUV format (2 only) |
: | " yuv " | /* YUV terminal (at 2 mounting only) */ | |
Input format from an application program.(3 only) |
: | " apl " | /* Data input from an application program. (at 3 mounting only)*/ |
-NTSC and YUV: 640 (width) 480 (height)
- PAL and SECAM: 768 (width) 576 (height)
frame_rate | = | [30,1] |
src | = | [base ={-640,-480,1,1}, limit={639,479,640,480}, x-inc=1,y-inc =1, width-inc=1,height-inc=1, type =Linear] |
dst | = | [base ={-32768,-32768,1,1} limit={32767,32767,640,480}, x-inc=1,y-inc =1, width-inc=1,height-inc=1, type =Linear] |
x-scale | = | [num-{base,inc,limit}={1,1,640}, type =Linear denom-{base,inc,limit}={640,1,640} type =Linear] |
y-scale | = | [num-{base,inc,limit}={1,1,480}, type =Linear denom-{base,inc,limit}={480,1,480} type =Linear] |
identity-aspect | = | False |
frame_rate | = | [30,1] |
src | = | [base ={-640,-480,1,1}, limit={639,479,640,480}, x-inc=1,y-inc =1, width-inc=1,height-inc=1, type =Linear] |
dst | = | [base ={-32768,-32768,642,482}, limit={32767,32767,1280,960}, x-inc=2,y-inc =2, width- inc=2, height-i nc=2, type =Linear] |
x-scale | = | [num-{base,inc,limit}={642,2,1280}, type =Linear denom-{base,inc,limit}={640,1,640} type =Linear] |
y-scale | = | [num-{base,inc,limit}={482,2,960}, type =Linear denom-{base,inc,limit}={480,1,480} type =Linear] |
identity-aspect | = | False |
frame_rate | = | [30,1] |
src | = | [base={-640,-480,1,1}, limit={639,479,640,480}, x-inc=1,y-inc=1, width-inc=1,height-inc=1, type=Linear] |
dst | = | [base={-32768,-32768,1,1}, limit={32767,32767,640,480}, x-inc=1,y-inc=1, width-inc=1,height-inc=1, type=Linear] |
x-scale | = | [num-{base,inc,limit}={1,1,1280} type=Linear denom-(base,inc,limit)={640,1,640} type=Linear] |
y-scale | = | [num-{base,inc,limit}={1,1,960} type=Linear denom-{base,inc,limit}={480,1,480} type=Linear] |
identity-aspect | = | False |
frame_rate | = | [30,1] |
src | = | [base ={-768,-576,1,1}, limit={767,575,768,576}, x-inc=1,y-inc =1, width-inc=1,height-inc=l, type =Linear] |
dst | = | [base ={-32768,-32768,1,1}, limit={32767,32767,768,576}, x-inc=1,y-inc =1, width-inc=1,height-inc=1, type =Linear] |
x-scale | = | [num-{base,inc,limit}={1,1,768}, type =Linear denom-{base,inc,limit}={768,1,768} type =Linear] |
y-scale | = | [num-{base,inc,limit}={1,1,576}, type =Linear denom-{base,inc,limit}={576,1,576} type =Linear] |
identity-aspect | = | False |
frame_rate | = | [30,1] |
src | = | [base ={-768,-576,1,1}, limit=4767,575,768,576}, x-inc=1,y-inc =1, width-inc=1,height-inc=1, type =Linear] |
dst | = | [base ={-32768,-32768,770,578}, limit={32767,32767,1536,1152}, x-inc=2,y-inc =2, width-inc=2,height-inc=2, type =Linear] |
x-scale | = | [num-{base,inc,limit}={770,2,1536}, type =Linear denom-{base,inc,limit}={768,1,768} type =Linear] |
y-scale | = | [num-{base,inc,limit}={578,2,1152}, type =Linear denom-{base,inc,limit}={576,1,576} type =Linear] |
identity-aspect | = | False |
frame_rate | = | [30,1] |
src | = | [base={0,0,1,1}, limit={639,479,640,480}, x-inc=1,y-inc=1, width-inc=1,height-inc=1, type=Linear] |
dst | = | [base={-32768,-32768,1,1}, limit={32767,32767,640,480}, x-inc=1,y-inc=1, width-inc=1,height-inc=1, type=Linear] |
x-scale | = | [num-{base,inc,limit}={1,1,2} type=Linear denom-{base,inc,limit}={1,1,1} type=Linear] |
y-scale | = | [num-{base,inc,limit}={1,1,2} type=Linear denom-{base,inc,limit}={1,1,1} type=Linear] |
identity-aspect | = | False |
Example (for NTSC)
Check Scale(src_x src_y ,src_width ,src_height ,dst_width ,dst_height) int src_x; int src_y; int src_width; int src_height; int dst_width; int dst_height; { if(src_x <0 || src_x + src_width > 640 || src_width <= 0 || src_y <0 || src_y + src_height > 480 || src_height <= 0) return(FALSE); if(dst_width > src_width || dst_height > src_height){ if(dst_width / 2*2!=dst_width) return(FALSE); if(dst_height / 2*2!=dst_height) return(FALSE); } if(dst_width > src_width * 2) return(FALSE); if(dst_height > src_height * 2) return(FALSE); return(TRUE); }
The saturation, contrast, hue, and brightness of video images can be changed by specifying the MVEXVideoValues structure of MVEXRenderVideo argument 15 (see Section 8.1.2). Specify any member of the MVEXFraction list for the members (saturation, contrast, hue, and brightness) of the MVEXVideoVideo structure. The MVEXFraction list is contained in the MVEXVin structure obtained by MVEXGetVins. If the MVEXVideoValues structure is set and MVEXRenderVideo is executed, render processing is performed according to the information specified by value_mask.
The members of the MVEXVin structure are represented by the following FRACTIONRANGE:
saturation | { 0, 1, 255, Linear, 255, 1, 255,Linear } |
contrast | { 0, 1, 100, Linear, l00, 1, 100, Linear } |
hue | { -128, 1, 127, Linear, 127, 1, 127, Linear } |
brightness | { 0, 1, 100, Linear, 100, 1, 100, Linear } |
If these settings are omitted, the default values are assumed. The default values are the intermediate values of FRACTIONRANGE, listed below.
Saturation default value | { 127(numerator),255(denominator) } |
Contrast default value | { 50(numerator), 100(denominator)} |
Hue default value | { 0(numerator), 127(denominator) } |
Brightness default value | { 50(numerator), 100(denominator) } |
Home |
---|
Contents | Previous Chapter | Chapter 8, Part 2 |