video-converter: add support for gamma and primaries

Keep only 1 structure with all matrix information.
Add structure to hold gamma information.
Add more options to control gamma, primaries and color matrix handling.
Add functions to compute transformations to and from XYZ and use this
to convert between primaries.
Merge gamma into the convert to and from RGB stage.
Fix border val.
Simplify the fastpath table, remove unused fields, add some more checks.
This commit is contained in:
Wim Taymans 2014-11-18 12:20:26 +01:00
parent 7c02acc544
commit cfc173e96b
2 changed files with 819 additions and 418 deletions

File diff suppressed because it is too large Load diff

View file

@ -130,6 +130,41 @@ typedef enum {
* is set to %TRUE. Default 0x00000000
*/
#define GST_VIDEO_CONVERTER_OPT_BORDER_ARGB "GstVideoConverter.border-argb"
/**
* GST_VIDEO_CONVERTER_OPT_MATRIX_MODE:
*
* #G_TYPE_STRING, set the color matrix conversion mode.
*
* "full": do conversion between color matrices
* "no-yuv": disable conversion between yuv color matrices
*
* Default "full"
*/
#define GST_VIDEO_CONVERTER_OPT_MATRIX_MODE "GstVideoConverter.matrix-mode"
/**
* GST_VIDEO_CONVERTER_OPT_GAMMA_MODE:
*
* #G_TYPE_STRING, set the gamma mode.
*
* "none": disable gamma handling
* "remap": convert between input and output gamma
*
* Default "none"
*/
#define GST_VIDEO_CONVERTER_OPT_GAMMA_MODE "GstVideoConverter.gamma-mode"
/**
* GST_VIDEO_CONVERTER_OPT_PRIMARIES_MODE:
*
* #G_TYPE_STRING, set the primaries conversion mode.
*
* "none": disable conversion between primaries
* "merge-only": do conversion between primaries only when it can be merged
* with color matrix conversion.
* "fast": fast conversion between primaries
*
* Default "none"
*/
#define GST_VIDEO_CONVERTER_OPT_PRIMARIES_MODE "GstVideoConverter.primaries-mode"
typedef struct _GstVideoConverter GstVideoConverter;