Package org.freedesktop.gstreamer.video
Enum Class VideoColorMatrix
- All Implemented Interfaces:
Enumeration
,Serializable
,Comparable<VideoColorMatrix>
,Constable
@Generated("io.github.jwharm.JavaGI")
public enum VideoColorMatrix
extends Enum<VideoColorMatrix>
implements Enumeration
The color matrix is used to convert between Y'PbPr and
non-linear RGB (R'G'B')
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionITU-R BT.2020 color matrix.ITU-R BT.601 color matrix, also SMPTE170M / ITU-R BT1358 525 / ITU-R BT1700 NTSCITU-R BT.709 color matrix, also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex BFCC Title 47 Code of Federal Regulations 73.682 (a)(20)identity matrix.SMPTE 240M color matrixunknown matrix -
Method Summary
Modifier and TypeMethodDescriptionstatic VideoColorMatrix
fromIso
(int value) Converts thevalue
to theGstVideoColorMatrix
The matrix coefficients (MatrixCoefficients) value is defined by "ISO/IEC 23001-8 Section 7.3 Table 4" and "ITU-T H.273 Table 4".boolean
Get the coefficients used to convert between Y'PbPr and R'G'B' using this VideoColorMatrix.static Type
getType()
Get the GType of the VideoColorMatrix classint
getValue()
Get the numeric value of this enumstatic VideoColorMatrix
of
(int value) Create a new VideoColorMatrix for the provided valueint
toIso()
ConvertsGstVideoColorMatrix
to the "matrix coefficients" (MatrixCoefficients) value defined by "ISO/IEC 23001-8 Section 7.3 Table 4" and "ITU-T H.273 Table 4".static VideoColorMatrix
Returns the enum constant of this class with the specified name.static VideoColorMatrix[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
unknown matrix -
RGB
identity matrix. Order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB) -
FCC
FCC Title 47 Code of Federal Regulations 73.682 (a)(20) -
BT709
ITU-R BT.709 color matrix, also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B -
BT601
ITU-R BT.601 color matrix, also SMPTE170M / ITU-R BT1358 525 / ITU-R BT1700 NTSC -
SMPTE240M
SMPTE 240M color matrix -
BT2020
ITU-R BT.2020 color matrix. Since: 1.6
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
of
Create a new VideoColorMatrix for the provided value- Parameters:
value
- the enum value- Returns:
- the enum for the provided value
-
getValue
public int getValue()Get the numeric value of this enum- Specified by:
getValue
in interfaceEnumeration
- Returns:
- the enum value
-
getType
-
fromIso
Converts thevalue
to theGstVideoColorMatrix
The matrix coefficients (MatrixCoefficients) value is defined by "ISO/IEC 23001-8 Section 7.3 Table 4" and "ITU-T H.273 Table 4". "H.264 Table E-5" and "H.265 Table E.5" share the identical values.- Parameters:
value
- a ITU-T H.273 matrix coefficients value- Returns:
- the matched
GstVideoColorMatrix
-
getKrKb
Get the coefficients used to convert between Y'PbPr and R'G'B' using this VideoColorMatrix.When:
0.0 <= [Y',R',G',B'] <= 1.0) (-0.5 <= [Pb,Pr] <= 0.5)
the general conversion is given by:
Y' = Kr*R' + (1-Kr-Kb)*G' + Kb*B' Pb = (B'-Y')/(2*(1-Kb)) Pr = (R'-Y')/(2*(1-Kr))
and the other way around:
R' = Y' + Cr*2*(1-Kr) G' = Y' - Cb*2*(1-Kb)*Kb/(1-Kr-Kb) - Cr*2*(1-Kr)*Kr/(1-Kr-Kb) B' = Y' + Cb*2*(1-Kb)
- Parameters:
Kr
- result red channel coefficientKb
- result blue channel coefficient- Returns:
- TRUE if this VideoColorMatrix was a YUV color format and
Kr
andKb
contain valid values.
-
toIso
public int toIso()ConvertsGstVideoColorMatrix
to the "matrix coefficients" (MatrixCoefficients) value defined by "ISO/IEC 23001-8 Section 7.3 Table 4" and "ITU-T H.273 Table 4". "H.264 Table E-5" and "H.265 Table E.5" share the identical values.- Returns:
- The value of ISO/IEC 23001-8 matrix coefficients.
-