-enum MovitPixelFormat { FORMAT_RGB, FORMAT_RGBA, FORMAT_BGR, FORMAT_BGRA, FORMAT_GRAYSCALE };
+// Note: Input depths above 8 bits have not been tested, so Rec. 2020
+// support should be regarded as somewhat untested (it assumes 10-
+// or 12-bit input). We also only support “conventional non-constant
+// luminance” for Rec. 2020, where Y' is derived from R'G'B' instead of
+// RGB, since this is the same system as used in Rec. 601 and 709.
+enum MovitPixelFormat {
+ FORMAT_RGB,
+ FORMAT_RGBA_PREMULTIPLIED_ALPHA,
+ FORMAT_RGBA_POSTMULTIPLIED_ALPHA,
+ FORMAT_BGR,
+ FORMAT_BGRA_PREMULTIPLIED_ALPHA,
+ FORMAT_BGRA_POSTMULTIPLIED_ALPHA,
+ FORMAT_GRAYSCALE
+};
+
+enum Colorspace {
COLORSPACE_INVALID = -1, // For internal use.
COLORSPACE_sRGB = 0,
COLORSPACE_REC_709 = 0, // Same as sRGB.
COLORSPACE_REC_601_525 = 1,
COLORSPACE_REC_601_625 = 2,
COLORSPACE_XYZ = 3, // Mostly useful for testing and debugging.
COLORSPACE_INVALID = -1, // For internal use.
COLORSPACE_sRGB = 0,
COLORSPACE_REC_709 = 0, // Same as sRGB.
COLORSPACE_REC_601_525 = 1,
COLORSPACE_REC_601_625 = 2,
COLORSPACE_XYZ = 3, // Mostly useful for testing and debugging.