1 #ifndef _MOVIT_IMAGE_FORMAT_H
2 #define _MOVIT_IMAGE_FORMAT_H 1
4 // Note: Input depths above 8 bits have not been tested, so Rec. 2020
5 // support should be regarded as somewhat untested (it assumes 10-
6 // or 12-bit input). We also only support “conventional non-constant
7 // luminance” for Rec. 2020, where Y' is derived from R'G'B' instead of
8 // RGB, since this is the same system as used in Rec. 601 and 709.
10 enum MovitPixelFormat {
12 FORMAT_RGBA_PREMULTIPLIED_ALPHA,
13 FORMAT_RGBA_POSTMULTIPLIED_ALPHA,
15 FORMAT_BGRA_PREMULTIPLIED_ALPHA,
16 FORMAT_BGRA_POSTMULTIPLIED_ALPHA,
21 COLORSPACE_INVALID = -1, // For internal use.
23 COLORSPACE_REC_709 = 0, // Same as sRGB.
24 COLORSPACE_REC_601_525 = 1,
25 COLORSPACE_REC_601_625 = 2,
26 COLORSPACE_XYZ = 3, // Mostly useful for testing and debugging.
27 COLORSPACE_REC_2020 = 4,
31 GAMMA_INVALID = -1, // For internal use.
35 GAMMA_REC_709 = 2, // Same as Rec. 601.
36 GAMMA_REC_2020_10_BIT = 2, // Same as Rec. 601.
37 GAMMA_REC_2020_12_BIT = 3,
40 enum YCbCrLumaCoefficients {
47 Colorspace color_space;
48 GammaCurve gamma_curve;
51 #endif // !defined(_MOVIT_IMAGE_FORMAT_H)