mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
video-color: add Adobe RGB primaries and transfer function
This commit is contained in:
parent
773e2476e6
commit
c99caa6b37
2 changed files with 15 additions and 3 deletions
|
@ -282,7 +282,9 @@ static const GstVideoColorPrimariesInfo color_primaries[] = {
|
|||
{GST_VIDEO_COLOR_PRIMARIES_FILM, WP_C, 0.681, 0.319, 0.243, 0.692, 0.145,
|
||||
0.049},
|
||||
{GST_VIDEO_COLOR_PRIMARIES_BT2020, WP_D65, 0.708, 0.292, 0.170, 0.797, 0.131,
|
||||
0.046}
|
||||
0.046},
|
||||
{GST_VIDEO_COLOR_PRIMARIES_ADOBERGB, WP_D65, 0.64, 0.33, 0.21, 0.71, 0.15,
|
||||
0.06}
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -459,6 +461,9 @@ gst_video_color_transfer_encode (GstVideoTransferFunction func, gdouble val)
|
|||
else
|
||||
res = 1.0993 * pow (val, 0.45) - 0.0993;
|
||||
break;
|
||||
case GST_VIDEO_TRANSFER_ADOBERGB:
|
||||
res = pow (val, 1.0 / 2.19921875);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
@ -544,6 +549,9 @@ gst_video_color_transfer_decode (GstVideoTransferFunction func, gdouble val)
|
|||
else
|
||||
res = pow ((val + 0.0993) / 1.0993, 1.0 / 0.45);
|
||||
break;
|
||||
case GST_VIDEO_TRANSFER_ADOBERGB:
|
||||
res = pow (val, 2.19921875);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
|
|
@ -88,6 +88,7 @@ gboolean gst_video_color_matrix_get_Kr_Kb (GstVideoColorMatrix matrix, gdouble *
|
|||
* @GST_VIDEO_TRANSFER_BT2020_12: Gamma 2.2 curve with a linear segment in the lower
|
||||
* range. Used for BT.2020 with 12 bits per
|
||||
* component. Since: 1.6.
|
||||
* @GST_VIDEO_TRANSFER_ADOBERGB: Gamma 2.19921875. Since: 1.8
|
||||
*
|
||||
* The video transfer function defines the formula for converting between
|
||||
* non-linear RGB (R'G'B') and linear RGB
|
||||
|
@ -104,7 +105,8 @@ typedef enum {
|
|||
GST_VIDEO_TRANSFER_GAMMA28,
|
||||
GST_VIDEO_TRANSFER_LOG100,
|
||||
GST_VIDEO_TRANSFER_LOG316,
|
||||
GST_VIDEO_TRANSFER_BT2020_12
|
||||
GST_VIDEO_TRANSFER_BT2020_12,
|
||||
GST_VIDEO_TRANSFER_ADOBERGB
|
||||
} GstVideoTransferFunction;
|
||||
|
||||
gdouble gst_video_color_transfer_encode (GstVideoTransferFunction func, gdouble val);
|
||||
|
@ -120,6 +122,7 @@ gdouble gst_video_color_transfer_decode (GstVideoTransferFunction func, gdo
|
|||
* @GST_VIDEO_COLOR_PRIMARIES_SMPTE240M: SMPTE240M primaries
|
||||
* @GST_VIDEO_COLOR_PRIMARIES_FILM: Generic film
|
||||
* @GST_VIDEO_COLOR_PRIMARIES_BT2020: BT2020 primaries. Since: 1.6.
|
||||
* @GST_VIDEO_COLOR_PRIMARIES_ADOBERGB: Adobe RGB primaries. Since: 1.8
|
||||
*
|
||||
* The color primaries define the how to transform linear RGB values to and from
|
||||
* the CIE XYZ colorspace.
|
||||
|
@ -132,7 +135,8 @@ typedef enum {
|
|||
GST_VIDEO_COLOR_PRIMARIES_SMPTE170M,
|
||||
GST_VIDEO_COLOR_PRIMARIES_SMPTE240M,
|
||||
GST_VIDEO_COLOR_PRIMARIES_FILM,
|
||||
GST_VIDEO_COLOR_PRIMARIES_BT2020
|
||||
GST_VIDEO_COLOR_PRIMARIES_BT2020,
|
||||
GST_VIDEO_COLOR_PRIMARIES_ADOBERGB
|
||||
} GstVideoColorPrimaries;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue