Package org.freedesktop.gstreamer.video
Enum Class VideoTransferFunction
- All Implemented Interfaces:
Enumeration
,Serializable
,Comparable<VideoTransferFunction>
,Constable
@Generated("io.github.jwharm.JavaGI")
public enum VideoTransferFunction
extends Enum<VideoTransferFunction>
implements Enumeration
The video transfer function defines the formula for converting between
non-linear RGB (R'G'B') and linear RGB
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionGamma 2.19921875.Association of Radio Industries and Businesses (ARIB) STD-B67 and Rec.Rec.Gamma 2.2 curve with a linear segment in the lower range.also known as SMPTE170M / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSCGamma 2.2 curve with a linear segment in the lower range, also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM / ITU-R BT1361linear RGB, gamma 1.0 curveGamma 1.8 curveGamma 2.0 curveGamma 2.2 curveGamma 2.8 curve, also ITU-R BT470BGLogarithmic transfer characteristic 100:1 rangeLogarithmic transfer characteristic 316.22777:1 range (100 * sqrt(10) : 1)SMPTE ST 2084 for 10, 12, 14, and 16-bit systems.Gamma 2.2 curve with a linear segment in the lower rangeGamma 2.4 curve with a linear segment in the lower range.unknown transfer function -
Method Summary
Modifier and TypeMethodDescriptiondouble
decode
(double val) Convertval
to its gamma decoded value.double
encode
(double val) Convertval
to its gamma encoded value.static VideoTransferFunction
fromIso
(int value) Converts thevalue
to theGstVideoTransferFunction
The transfer characteristics (TransferCharacteristics) value is defined by "ISO/IEC 23001-8 Section 7.2 Table 3" and "ITU-T H.273 Table 3".static Type
getType()
Get the GType of the VideoTransferFunction classint
getValue()
Get the numeric value of this enumboolean
isEquivalent
(int fromBpp, VideoTransferFunction toFunc, int toBpp) Returns whether this VideoTransferFunction andtoFunc
are equivalent.static VideoTransferFunction
of
(int value) Create a new VideoTransferFunction for the provided valueint
toIso()
ConvertsGstVideoTransferFunction
to the "transfer characteristics" (TransferCharacteristics) value defined by "ISO/IEC 23001-8 Section 7.2 Table 3" and "ITU-T H.273 Table 3".static VideoTransferFunction
Returns the enum constant of this class with the specified name.static VideoTransferFunction[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
unknown transfer function -
GAMMA10
linear RGB, gamma 1.0 curve -
GAMMA18
Gamma 1.8 curve -
GAMMA20
Gamma 2.0 curve -
GAMMA22
Gamma 2.2 curve -
BT709
Gamma 2.2 curve with a linear segment in the lower range, also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM / ITU-R BT1361 -
SMPTE240M
Gamma 2.2 curve with a linear segment in the lower range -
SRGB
Gamma 2.4 curve with a linear segment in the lower range. IEC 61966-2-1 (sRGB or sYCC) -
GAMMA28
Gamma 2.8 curve, also ITU-R BT470BG -
LOG100
Logarithmic transfer characteristic 100:1 range -
LOG316
Logarithmic transfer characteristic 316.22777:1 range (100 * sqrt(10) : 1) -
BT2020_12
Gamma 2.2 curve with a linear segment in the lower range. Used for BT.2020 with 12 bits per component. Since: 1.6 -
ADOBERGB
Gamma 2.19921875. Since: 1.8 -
BT2020_10
Rec. ITU-R BT.2020-2 with 10 bits per component. (functionally the same as the values GST_VIDEO_TRANSFER_BT709 and GST_VIDEO_TRANSFER_BT601). Since: 1.18 -
SMPTE2084
SMPTE ST 2084 for 10, 12, 14, and 16-bit systems. Known as perceptual quantization (PQ) Since: 1.18 -
ARIB_STD_B67
Association of Radio Industries and Businesses (ARIB) STD-B67 and Rec. ITU-R BT.2100-1 hybrid loggamma (HLG) system Since: 1.18 -
BT601
also known as SMPTE170M / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC
-
-
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 VideoTransferFunction 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 theGstVideoTransferFunction
The transfer characteristics (TransferCharacteristics) value is defined by "ISO/IEC 23001-8 Section 7.2 Table 3" and "ITU-T H.273 Table 3". "H.264 Table E-4" and "H.265 Table E.4" share the identical values.- Parameters:
value
- a ITU-T H.273 transfer characteristics value- Returns:
- the matched
GstVideoTransferFunction
-
decode
public double decode(double val) Convertval
to its gamma decoded value. This is the inverse operation of gst_video_color_transfer_encode().For a non-linear value L' in the range [0..1], conversion to the linear L is in general performed with a power function like:
L = L' ^ gamma
Depending on this VideoTransferFunction, different formulas might be applied. Some formulas encode a linear segment in the lower range.
- Parameters:
val
- a value- Returns:
- the gamma decoded value of
val
-
encode
public double encode(double val) Convertval
to its gamma encoded value.For a linear value L in the range [0..1], conversion to the non-linear (gamma encoded) L' is in general performed with a power function like:
L' = L ^ (1 / gamma)
Depending on this VideoTransferFunction, different formulas might be applied. Some formulas encode a linear segment in the lower range.
- Parameters:
val
- a value- Returns:
- the gamma encoded value of
val
-
isEquivalent
Returns whether this VideoTransferFunction andtoFunc
are equivalent. There are cases (e.g. BT601, BT709, and BT2020_10) where several functions are functionally identical. In these cases, when doing conversion, we should consider them as equivalent. Also, BT2020_12 is the same as the aforementioned three for less than 12 bits per pixel.- Parameters:
fromBpp
- bits per pixel to convert fromtoFunc
-GstVideoTransferFunction
to convert intotoBpp
- bits per pixel to convert into- Returns:
- TRUE if this VideoTransferFunction and
toFunc
can be considered equivalent.
-
toIso
public int toIso()ConvertsGstVideoTransferFunction
to the "transfer characteristics" (TransferCharacteristics) value defined by "ISO/IEC 23001-8 Section 7.2 Table 3" and "ITU-T H.273 Table 3". "H.264 Table E-4" and "H.265 Table E.4" share the identical values.- Returns:
- The value of ISO/IEC 23001-8 transfer characteristics.
-