56 #ifndef NV_VPI_COLORSPEC_H
57 #define NV_VPI_COLORSPEC_H
60 #include "detail/FormatUtils.h"
167 VPI_COLOR_SPEC_DEFAULT = VPI_DETAIL_MAKE_CSPC(SPACE_UNDEFINED, ENC_UNDEFINED, XFER_LINEAR, RANGE_FULL, LOC_BOTH, LOC_BOTH),
175 VPI_COLOR_SPEC_BT601 = VPI_DETAIL_MAKE_CSPC(SPACE_BT709, ENC_BT601, XFER_BT709, RANGE_LIMITED, LOC_EVEN, LOC_EVEN),
181 VPI_COLOR_SPEC_BT709 = VPI_DETAIL_MAKE_CSPC(SPACE_BT709, ENC_BT709, XFER_BT709, RANGE_LIMITED, LOC_EVEN, LOC_EVEN),
190 VPI_COLOR_SPEC_BT2020 = VPI_DETAIL_MAKE_CSPC(SPACE_BT2020, ENC_BT2020, XFER_BT2020, RANGE_LIMITED, LOC_EVEN, LOC_EVEN),
205 VPI_COLOR_SPEC_BT2020c = VPI_DETAIL_MAKE_CSPC(SPACE_BT2020, ENC_BT2020c, XFER_BT2020, RANGE_LIMITED, LOC_EVEN, LOC_EVEN),
220 VPI_COLOR_SPEC_sRGB = VPI_DETAIL_MAKE_CSPC(SPACE_BT709, ENC_UNDEFINED, XFER_sRGB, RANGE_FULL, LOC_BOTH, LOC_BOTH),
223 VPI_COLOR_SPEC_sYCC = VPI_DETAIL_MAKE_CSPC(SPACE_BT709, ENC_BT601, XFER_sYCC, RANGE_FULL, LOC_CENTER, LOC_CENTER),
235 VPI_COLOR_SPEC_SENSOR = VPI_DETAIL_MAKE_CSPC(SPACE_SENSOR, ENC_UNDEFINED, XFER_LINEAR, RANGE_FULL, LOC_BOTH, LOC_BOTH),
256 # define VPI_MAKE_COLOR_SPEC_ABBREV(cspace, encoding, xferFunc, range, locHoriz, locVert)
258 # define VPI_MAKE_COLOR_SPEC_ABBREV (VPIColorSpec) VPI_DETAIL_MAKE_CSPC
279 # define VPI_MAKE_COLOR_SPEC(cspace, encoding, xferFunc, range, locHoriz, locVert)
281 # define VPI_MAKE_COLOR_SPEC (VPIColorSpec) VPI_DETAIL_MAKE_COLOR_SPEC
388 VPI_RAW_FORCE8 = UINT8_MAX
VPIColorSpec
Color spec definitions.
VPIColorSpace vpiColorSpecGetSpace(VPIColorSpec cspec)
Get the color_space of a given color spec.
VPIColorSpec vpiColorSpecSetSpace(VPIColorSpec cspec, VPIColorSpace cspace)
Set the color_space of a given color spec.
VPIRawPattern
Defines Bayer patterns used by RAW color model.
VPIChromaLocation vpiColorSpecGetChromaLocHoriz(VPIColorSpec cspec)
Get the chroma horizontal sampling location of a given color spec.
VPIColorRange vpiColorSpecGetRange(VPIColorSpec cspec)
Get the color quantization range of a given color spec.
VPIColorRange
Defines the color range of a particular VPIColorSpec.
VPIColorModel
Defines color models.
VPIColorSpec vpiColorSpecSetRange(VPIColorSpec cspec, VPIColorRange range)
Set the color quantization range of a given color spec.
VPIChromaSubsampling vpiMakeChromaSubsampling(int samplesHoriz, int samplesVert)
Creates a VPIChromaSubsampling given the horizontal and vertical sampling.
VPIColorTransferFunction
Defines the color transfer function in a particular VPIColorSpec.
VPIYCbCrEncoding
Defines the YCbCr encoding used in a particular VPIColorSpec.
VPIColorTransferFunction vpiColorSpecGetTransferFunction(VPIColorSpec cspec)
Get the color transfer function of a given color spec.
VPIColorSpec vpiMakeColorSpec(VPIColorSpace cspace, VPIYCbCrEncoding encoding, VPIColorTransferFunction xferFunc, VPIColorRange range, VPIChromaLocation locHoriz, VPIChromaLocation locVert)
Creates a user-defined VPIColorSpec.
VPIChromaSubsampling
Defines how chroma-subsampling is done.
int vpiChromaSubsamplingGetSamplesVert(VPIChromaSubsampling css)
Get the number of chroma samples for each group of 4 vertical luma samples.
VPIYCbCrEncoding vpiColorSpecGetYCbCrEncoding(VPIColorSpec cspec)
Get the R'G'B' <-> Y'CbCr encoding scheme of a given color spec.
VPIColorSpace
Defines the color primaries and the white point of a VPIColorSpec.
VPIColorSpec vpiColorSpecSetChromaLoc(VPIColorSpec cspec, VPIChromaLocation locHoriz, VPIChromaLocation locVert)
Set the chroma sample location of a given color spec.
VPIWhitePoint
Defines the white point associated with a VPIColorSpace.
int vpiChromaSubsamplingGetSamplesHoriz(VPIChromaSubsampling css)
Get the number of chroma samples for each group of 4 horizontal luma samples.
VPIChromaLocation
Chroma sampling location.
VPIColorSpec vpiColorSpecSetTransferFunction(VPIColorSpec cspec, VPIColorTransferFunction xferFunc)
Set the color transfer function of a given color spec.
VPIChromaLocation vpiColorSpecGetChromaLocVert(VPIColorSpec cspec)
Get the chroma vertical sample location of a given color spec.
VPIColorSpec vpiColorSpecSetYCbCrEncoding(VPIColorSpec cspec, VPIYCbCrEncoding encoding)
Set the R'G'B' <-> Y'CbCr encoding scheme of a given color spec.
const char * vpiColorSpecGetName(VPIColorSpec cspec)
Returns a string representation of the color spec.
@ VPI_COLOR_SPEC_BT709
Color spec defining ITU-R BT.709 standard, limited range.
@ VPI_COLOR_SPEC_BT2020_ER
Color spec defining ITU-R BT.2020 standard, full range.
@ VPI_COLOR_SPEC_MPEG2_BT601
Color spec defining MPEG2 standard using ITU-R BT.601 encoding.
@ VPI_COLOR_SPEC_INVALID
Invalid color spec.
@ VPI_COLOR_SPEC_UNDEFINED
No color spec defined.
@ VPI_COLOR_SPEC_DEFAULT
Default color spec.
@ VPI_COLOR_SPEC_BT2020c
Color spec defining ITU-R BT.2020 standard for constant luminance, limited range.
@ VPI_COLOR_SPEC_SENSOR
Color spec used for images coming from an image sensor, right after demosaicing.
@ VPI_COLOR_SPEC_sRGB
Color spec defining sRGB standard.
@ VPI_COLOR_SPEC_DISPLAYP3
Color spec defining Display P3 standard, with sRGB color transfer function.
@ VPI_COLOR_SPEC_BT709_LINEAR
Color spec defining ITU-R BT.709 standard, limited range and linear transfer function.
@ VPI_COLOR_SPEC_BT2020c_ER
Color spec defining ITU-R BT.2020 standard for constant luminance, full range.
@ VPI_COLOR_SPEC_DISPLAYP3_LINEAR
Color spec defining Display P3 standard, with linear color transfer function.
@ VPI_COLOR_SPEC_SMPTE240M
Color spec defining SMPTE 240M standard, limited range.
@ VPI_COLOR_SPEC_BT2020_PQ
Color spec defining ITU-R BT.2020 standard, limited range and perceptual quantizer transfer function.
@ VPI_COLOR_SPEC_MPEG2_BT709
Color spec defining MPEG2 standard using ITU-R BT.709 encoding.
@ VPI_COLOR_SPEC_BT601_ER
Color spec defining ITU-R BT.601 standard, full range, with BT.709 chrominancies and transfer functio...
@ VPI_COLOR_SPEC_BT2020_PQ_ER
Color spec defining ITU-R BT.2020 standard, full range and perceptual quantizer transfer function.
@ VPI_COLOR_SPEC_BT2020
Color spec defining ITU-R BT.2020 standard, limited range.
@ VPI_COLOR_SPEC_BT2020_LINEAR
Color spec defining ITU-R BT.2020 standard, limited range and linear transfer function.
@ VPI_COLOR_SPEC_BT709_ER
Color spec defining ITU-R BT.709 standard, full range.
@ VPI_COLOR_SPEC_sYCC
Color spec defining sYCC standard.
@ VPI_COLOR_SPEC_MPEG2_SMPTE240M
Color spec defining MPEG2 standard using SMPTE 240M encoding.
@ VPI_COLOR_SPEC_BT601
Color spec defining ITU-R BT.601 standard, limited range, with BT.709 chrominancies and transfer func...
@ VPI_RAW_BAYER_CBRC
Bayer format with X channel mapped to samples as follows:
@ VPI_RAW_BAYER_CRCC
Bayer format with X channel mapped to samples as follows:
@ VPI_RAW_BAYER_CCCR
Bayer format with X channel mapped to samples as follows:
@ VPI_RAW_BAYER_GBRG
Bayer format with X channel mapped to samples as follows:
@ VPI_RAW_BAYER_RCCB
Bayer format with X channel mapped to samples as follows:
@ VPI_RAW_BAYER_BCCR
Bayer format with X channel mapped to samples as follows:
@ VPI_RAW_INVALID
Invalid raw pattern.
@ VPI_RAW_BAYER_CCRC
Bayer format with X channel mapped to samples as follows:
@ VPI_RAW_BAYER_RGGB
Bayer format with X channel mapped to samples as follows:
@ VPI_RAW_BAYER_CCCC
Bayer format with X channel mapped to samples as follows:
@ VPI_RAW_BAYER_GRBG
Bayer format with X channel mapped to samples as follows:
@ VPI_RAW_BAYER_RCCC
Bayer format with X channel mapped to samples as follows:
@ VPI_RAW_BAYER_CRBC
Bayer format with X channel mapped to samples as follows:
@ VPI_RAW_BAYER_BGGR
Bayer format with X channel mapped to samples as follows:
@ VPI_COLOR_RANGE_FULL
Values cover the full underlying type range.
@ VPI_COLOR_RANGE_LIMITED
Values cover a limited range of the underlying type.
@ VPI_COLOR_MODEL_RGB
red, green, blue components.
@ VPI_COLOR_MODEL_UNDEFINED
Color model is undefined.
@ VPI_COLOR_MODEL_XYZ
CIE XYZ tristimulus color spec.
@ VPI_COLOR_MODEL_RAW
RAW color model, used for Bayer image formats.
@ VPI_COLOR_MODEL_YCbCr
Luma + chroma (blue-luma, red-luma).
@ VPI_COLOR_XFER_LINEAR
Linear color transfer function.
@ VPI_COLOR_XFER_BT709
Color transfer function specified by ITU-R BT.709 standard.
@ VPI_COLOR_XFER_sRGB
Color transfer function specified by sRGB standard.
@ VPI_COLOR_XFER_PQ
Perceptual quantizer color transfer function.
@ VPI_COLOR_XFER_sYCC
Color transfer function specified by sYCC standard.
@ VPI_COLOR_XFER_SMPTE240M
Color transfer function specified by SMPTE 240M standard.
@ VPI_COLOR_XFER_BT2020
Color transfer function specified by ITU-R BT.2020 standard.
@ VPI_YCbCr_ENC_BT2020
Encoding specified by ITU-R BT.2020 standard.
@ VPI_YCbCr_ENC_BT601
Encoding specified by ITU-R BT.601 standard.
@ VPI_YCbCr_ENC_BT709
Encoding specified by ITU-R BT.709 standard.
@ VPI_YCbCr_ENC_BT2020c
Encoding specified by ITU-R BT.2020 with constant luminance.
@ VPI_YCbCr_ENC_SMPTE240M
Encoding specified by SMPTE 240M standard.
@ VPI_YCbCr_ENC_UNDEFINED
Encoding not defined.
@ VPI_CSS_422
4:2:2 BT.601 sub-sampling.
@ VPI_CSS_422R
4:2:2R BT.601 sub-sampling.
@ VPI_CSS_INVALID
Invalid chroma subsampling.
@ VPI_CSS_411R
4:1:1 sub-sampling.
@ VPI_CSS_420
4:2:0 sub-sampling.
@ VPI_CSS_NONE
Used when no chroma subsampling takes place, specially for color specs without chroma components.
@ VPI_CSS_444
4:4:4 sub-sampling.
@ VPI_CSS_411
4:1:1 sub-sampling.
@ VPI_COLOR_SPACE_BT709
Color primaries from ITU-R BT.709 standard, D65 white point.
@ VPI_COLOR_SPACE_BT2020
Color primaries from ITU-R BT.2020 standard, D65 white point.
@ VPI_COLOR_SPACE_BT601
Color primaries from ITU-R BT.601/625 lines standard, also known as EBU 3213-E.
@ VPI_COLOR_SPACE_SENSOR
Color space from the sensor used to capture the image.
@ VPI_COLOR_SPACE_DCIP3
Color primaries from DCI-P3 standard, D65 white point.
@ VPI_COLOR_SPACE_UNDEFINED
Color space not defined.
@ VPI_WHITE_POINT_UNDEFINED
White point not defined.
@ VPI_WHITE_POINT_D65
D65 white point, K = 6504.
@ VPI_CHROMA_LOC_BOTH
Sample chroma from even and odd coordinates.
@ VPI_CHROMA_LOC_CENTER
Sample the chroma exactly between the even and odd coordinate.
@ VPI_CHROMA_LOC_ODD
Sample the chroma with odd coordinate.
@ VPI_CHROMA_LOC_EVEN
Sample the chroma with even coordinate.