]> git.sesse.net Git - movit/blobdiff - image_format.h
Allow YCbCrInput to change input format after finalize.
[movit] / image_format.h
index df6f48747cdc3e933dfa6cdaf6cec88f544b14a3..1bd19f953e6ddc27102baf601229a44eb8b33cbd 100644 (file)
@@ -1,11 +1,17 @@
 #ifndef _MOVIT_IMAGE_FORMAT_H
 #define _MOVIT_IMAGE_FORMAT_H 1
 
-// 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.
+// Note: Movit's internal processing formats do not have enough
+// accuracy to support 12-bit input, so if you want to use Rec. 2020,
+// you should probably stick to 10-bit, or accept somewhat reduced
+// accuracy for 12-bit. Input depths above 8 bits are also generally
+// less tested.
+//
+// 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.
+
+namespace movit {
 
 enum MovitPixelFormat {
        FORMAT_RGB,
@@ -14,7 +20,9 @@ enum MovitPixelFormat {
        FORMAT_BGR,
        FORMAT_BGRA_PREMULTIPLIED_ALPHA,
        FORMAT_BGRA_POSTMULTIPLIED_ALPHA,
-       FORMAT_GRAYSCALE
+       FORMAT_GRAYSCALE,
+       FORMAT_RG,
+       FORMAT_R
 };
 
 enum Colorspace {
@@ -48,4 +56,6 @@ struct ImageFormat {
        GammaCurve gamma_curve;
 };
 
+}  // namespace movit
+
 #endif  // !defined(_MOVIT_IMAGE_FORMAT_H)