|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.media.Format | +--javax.media.format.VideoFormat | +--javax.media.format.YUVFormat
Describes YUV image data.
Field Summary | |
protected int |
offsetU
When the YUV data is in planar format, specifies the offset into the data for the U plane. |
protected int |
offsetV
When the YUV data is in planar format, specifies the offset into the data for the V plane. |
protected int |
offsetY
When the YUV data is in planar format, specifies the offset into the data for the Y plane. |
protected int |
strideUV
Length of a row of U or V values. |
protected int |
strideY
Length of a row of Y values. |
static int |
YUV_111
YUV Planar 1:1:1 type. |
static int |
YUV_411
YUV Planar 4:1:1 type. |
static int |
YUV_420
YUV Planar 4:2:0 type. |
static int |
YUV_422
YUV Planar 4:2:2 type. |
static int |
YUV_SIGNED
When added to the yuvType, specifies that the chrominance values are signed. |
static int |
YUV_YUYV
YUV 4:2:2 interleaved format. |
static int |
YUV_YVU9
YUV Planar YVU9 type. |
protected int |
yuvType
The YUV format type |
Fields inherited from class javax.media.format.VideoFormat |
CINEPAK,
frameRate,
H261,
H261_RTP,
H263,
H263_RTP,
INDEO32,
INDEO41,
INDEO50,
IRGB,
JPEG,
JPEG_RTP,
maxDataLength,
MJPEGA,
MJPEGB,
MJPG,
MPEG,
MPEG_RTP,
RGB,
RLE,
RPZA,
size,
SMC,
YUV |
Fields inherited from class javax.media.Format |
byteArray,
clz,
dataType,
encoding,
FALSE,
formatArray,
intArray,
NOT_SPECIFIED,
shortArray,
TRUE |
Constructor Summary | |
YUVFormat()
Constructs a YUVFormat object that represents all YUV formats. |
|
YUVFormat(java.awt.Dimension size,
int maxDataLength,
java.lang.Class dataType,
float frameRate,
int yuvType,
int strideY,
int strideUV,
int offsetY,
int offsetU,
int offsetV)
Constructs a YUVFormat with the specified properties. |
|
YUVFormat(int yuvType)
Constructs a YUVFormat object for a specific yuvType . |
Method Summary | |
java.lang.Object |
clone()
Creates a clone of this YUVFormat . |
protected void |
copy(Format f)
Copies the attributes from the specified Format into
this YUVFormat . |
boolean |
equals(java.lang.Object format)
Compares the specified Format with this YUVFormat . |
int |
getOffsetU()
Gets the U offset--the position in the data where the U values begin. |
int |
getOffsetV()
Gets the V offset--the position in the data where the V values begin. |
int |
getOffsetY()
Gets the Y offset--the position in the data where the Y values begin. |
int |
getStrideUV()
Gets the UV stride--the length of a row of U or V values. |
int |
getStrideY()
Gets the Y stride--the length of a row of Y values. |
int |
getYuvType()
Gets the YUV data format. |
Format |
intersects(Format format)
Finds the attributes shared by two matching Format objects. |
boolean |
matches(Format format)
Checks whether or not the specified Format matches
this YUVFormat . |
Format |
relax()
Generate a format that's less restrictive than this format but contains the basic attributes that will make this resulting format useful for format matching. |
java.lang.String |
toString()
Gets a String representation of the attributes of this
YUVFormat . |
Methods inherited from class javax.media.format.VideoFormat |
getFrameRate,
getMaxDataLength,
getSize |
Methods inherited from class javax.media.Format |
getDataType,
getEncoding |
Methods inherited from class java.lang.Object |
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final int YUV_411
public static final int YUV_420
public static final int YUV_422
public static final int YUV_111
public static final int YUV_YVU9
public static final int YUV_YUYV
public static final int YUV_SIGNED
protected int yuvType
protected int strideY
protected int strideUV
protected int offsetY
protected int offsetU
protected int offsetV
Constructor Detail |
public YUVFormat()
YUVFormat
object that represents all YUV formats.public YUVFormat(int yuvType)
YUVFormat
object for a specific yuvType
.yuvType
- The YUV type for this YUVFormat
: YUV_411, YUV_420,
YUV_422, YUV_111, YUV_YVU9, or YUV_YUYV.public YUVFormat(java.awt.Dimension size, int maxDataLength, java.lang.Class dataType, float frameRate, int yuvType, int strideY, int strideUV, int offsetY, int offsetU, int offsetV)
YUVFormat
with the specified properties. Use this
constructor for planar YUV formats. (YUV_411, YUV_420,
YUV_422, YUV_111, or YUV_YVU9.)size
- A Dimension
that specifies the frame size.maxDataLength
- The maximum size of the data array.dataType
- The type of the data.yuvType
- The YUV ordering type.strideY
- The number of data elements between the first Y
component in a row and the first Y component in the next row.strideUV
- The number of data elements between the first U
component in a row and the first U component in the next row. The
same value is expected for the V component.offsetY
- The offset into the data array where the Y plane
begins.offsetU
- The offset into the data array where the U plane
begins.offsetV
- The offset into the data array where the V plane
begins.Method Detail |
public int getYuvType()
public int getStrideY()
public int getStrideUV()
public int getOffsetY()
public int getOffsetU()
public int getOffsetV()
public java.lang.Object clone()
YUVFormat
.YUVFormat
.protected void copy(Format f)
Format
into
this YUVFormat
.f
- The Format
to copy the attributes from.public boolean equals(java.lang.Object format)
Format
with this YUVFormat
.
Returns true
only if the specified Format
is a YUVFormat
object and all of
its attributes are identical to
the attributes in this YUVFormat
.format
- The Format
to compare.Format
is the same as this one.public boolean matches(Format format)
Format
matches
this YUVFormat
.
Matches only compares the attributes that are defined in the specified
Format
,
unspecified attributes are ignored.
The two Format
objects do not have to be of the same class
to match. For example, if "A" are "B" are being compared, a
match is possible if "A" is derived from "B"
or "B" is derived from "A". (The compared attributes must still match,
or matches
fails.)
format
- The Format
to compare with this one.true
if the specified Format
matches this one, false
if it does not.public Format intersects(Format format)
Format
objects.
If the specified Format
does not match this one, the result
is undefined.The
- matching Format
to intersect with this
YUVFormat
.Format
object
with its attributes set to those attributes common to both
Format
objects.matches(javax.media.Format)
public Format relax()
Format
that's less restrictive than the
this format.public java.lang.String toString()
String
representation of the attributes of this
YUVFormat
. For example: "YUV Video Format, 352x240, ...".String
that describes the format attributes.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |