1 #ifndef _MOVIT_IMAGE_FORMAT_H
2 #define _MOVIT_IMAGE_FORMAT_H 1
4 // Note: Movit's internal processing formats do not have enough
5 // accuracy to support 12-bit input, so if you want to use Rec. 2020,
6 // you should probably stick to 10-bit, or accept somewhat reduced
7 // accuracy for 12-bit. Input depths above 8 bits are also generally
10 // We also only support “conventional non-constant luminance” for Rec. 2020,
11 // where Y' is derived from R'G'B' instead of RGB, since this is the same
12 // system as used in Rec. 601 and 709.
16 enum MovitPixelFormat {
18 FORMAT_RGBA_PREMULTIPLIED_ALPHA,
19 FORMAT_RGBA_POSTMULTIPLIED_ALPHA,
21 FORMAT_BGRA_PREMULTIPLIED_ALPHA,
22 FORMAT_BGRA_POSTMULTIPLIED_ALPHA,
29 COLORSPACE_INVALID = -1, // For internal use.
31 COLORSPACE_REC_709 = 0, // Same as sRGB.
32 COLORSPACE_REC_601_525 = 1,
33 COLORSPACE_REC_601_625 = 2,
34 COLORSPACE_XYZ = 3, // Mostly useful for testing and debugging.
35 COLORSPACE_REC_2020 = 4,
39 GAMMA_INVALID = -1, // For internal use.
43 GAMMA_REC_709 = 2, // Same as Rec. 601.
44 GAMMA_REC_2020_10_BIT = 2, // Same as Rec. 601.
45 GAMMA_REC_2020_12_BIT = 3,
48 enum YCbCrLumaCoefficients {
55 Colorspace color_space;
56 GammaCurve gamma_curve;
61 #endif // !defined(_MOVIT_IMAGE_FORMAT_H)