diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2015-11-14 10:50:19 +0100 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2015-11-14 10:56:30 +0100 |
commit | 3fef9cc9e1f279677dfdd91de81a719df2796052 (patch) | |
tree | d37d7c04f7bd0f59e15fe7339b29bd988d786f6b | |
parent | 1c6653ba06f935e54db3ee4826cb3fe23ac5e1bc (diff) |
avscale: Add a AVColorModel filed and specify flags
-rw-r--r-- | libavutil/formaton.h | 17 | ||||
-rw-r--r-- | libavutil/pixfmt.h | 15 |
2 files changed, 29 insertions, 3 deletions
diff --git a/libavutil/formaton.h b/libavutil/formaton.h index fe3d457cac..8acab13fd5 100644 --- a/libavutil/formaton.h +++ b/libavutil/formaton.h @@ -64,10 +64,20 @@ typedef struct AVChromaton { } AVChromaton; typedef struct AVPixelFormaton { - unsigned flags; // has alpha, uses BE order, uses palette etc +#define AV_PIX_FORMATON_FLAG_BE (1 << 0) +#define AV_PIX_FORMATON_FLAG_ALPHA (1 << 1) +#define AV_PIX_FORMATON_FLAG_PAL (1 << 2) + /** + * Or-ed AV_PIX_FORMATON_FLAG_ + */ + unsigned flags; /** * Size of all the pixel components packed as one element including * padding. + * + * Useful to move to the next pixel in packeted formats. + * + * It is set to 0 for planar and quasi-planar formats. */ int pixel_next; @@ -76,6 +86,7 @@ typedef struct AVPixelFormaton { */ int nb_palette_entries; + enum AVColorModel model; enum AVColorRange range; enum AVColorPrimaries primaries; enum AVColorTransferCharacteristic transfer; @@ -83,8 +94,8 @@ typedef struct AVPixelFormaton { enum AVChromaLocation location; int nb_components; -#define AVSCALE_MAX_COMPONENTS 5 - AVChromaton component_desc[AVSCALE_MAX_COMPONENTS]; +#define AV_PIX_FORMATON_COMPONENTS 5 + AVChromaton component_desc[AV_PIX_FORMATON_COMPONENTS]; } AVPixelFormaton; AVPixelFormaton *av_formaton_from_pixfmt(enum AVPixelFormat pix_fmt); diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h index 4e0c0d392e..7de22b6aea 100644 --- a/libavutil/pixfmt.h +++ b/libavutil/pixfmt.h @@ -274,6 +274,21 @@ enum AVPixelFormat { #define AV_PIX_FMT_NV20 AV_PIX_FMT_NE(NV20BE, NV20LE) /** + * Color Model + */ + +enum AVColorModel { + AVCOL_MOD_RGB, + AVCOL_MOD_XYZ, + AVCOL_MOD_YUV, +/* + AVCOL_MOD_CYL, ///< HSL, HSV. HSI + AVCOL_MOD_CFA, ///< Bayer and other Field Arrays + AVCOL_MOD_OPAQUE, ///< Opaque, implementation dependent */ +}; + + +/** * Chromaticity coordinates of the source primaries. */ enum AVColorPrimaries { |