/* The Khronos Data Format Specification (version 1.3) */ /* ** Copyright 2015-2020 The Khronos Group Inc. ** SPDX-License-Identifier: Apache-2.0 */ /* This header defines a structure that can describe the layout of image formats in memory. This means that the data format is transparent to the application, and the expectation is that this should be used when the layout is defined external to the API. Many Khronos APIs deliberately keep the internal layout of images opaque, to allow proprietary layouts and optimisations. This structure is not appropriate for describing opaque layouts. */ /* We stick to standard C89 constructs for simplicity and portability. */ #ifndef _KHR_DATA_FORMAT_H_ #define _KHR_DATA_FORMAT_H_ /** @file khr_df.h @brief Data Format enums and macros. */ /* Accessors */ khr_df_word_e; khr_df_shift_e; khr_df_mask_e; /* Helper macro: Extract field X from basic descriptor block BDB */ #define KHR_DFDVAL(BDB, X) … /* Helper macro: Set field X of basic descriptor block BDB */ #define KHR_DFDSETVAL(BDB, X, val) … /* Offsets relative to the start of a sample */ khr_df_sampleword_e; khr_df_sampleshift_e; khr_df_samplemask_e; /* Helper macro: Extract field X of sample S from basic descriptor block BDB */ #define KHR_DFDSVAL(BDB, S, X) … /* Helper macro: Set field X of sample S of basic descriptor block BDB */ #define KHR_DFDSETSVAL(BDB, S, X, val) … /* Helper macro: Number of samples in basic descriptor block BDB */ #define KHR_DFDSAMPLECOUNT(BDB) … /* Helper macro: Size in words of basic descriptor block for S samples */ #define KHR_DFDSIZEWORDS(S) … /* Vendor ids */ khr_df_vendorid_e; /* Descriptor types */ khr_df_khr_descriptortype_e; /* Descriptor block version */ khr_df_versionnumber_e; /** @~English @brief Model in which the color coordinate space is defined. There is no requirement that a color format use all the channel types that are defined in the color model. */ khr_df_model_e; /* Definition of channel names for each color model */ khr_df_model_channels_e; /** @~English @brief Definition of the primary colors in color coordinates. This is implicitly responsible for defining the conversion between RGB an YUV color spaces. LAB and related absolute color models should use KHR_DF_PRIMARIES_CIEXYZ. */ khr_df_primaries_e; /** @~English @brief Definition of the optical to digital transfer function ("gamma correction"). Most transfer functions are not a pure power function and also include a linear element. LAB and related absolute color representations should use KHR_DF_TRANSFER_UNSPECIFIED. */ khr_df_transfer_e; khr_df_flags_e; khr_df_sample_datatype_qualifiers_e; #endif