* @func: a #GstVideoTransferFunction
* @val: a value
*
+ * Deprecated: Use gst_video_transfer_function_encode() instead.
+ *
+ * Since: 1.6
+ */
+gdouble
+gst_video_color_transfer_encode (GstVideoTransferFunction func, gdouble val)
+{
+ return gst_video_transfer_function_encode (func, val);
+}
+
+/**
+ * gst_video_transfer_function_encode:
+ * @func: a #GstVideoTransferFunction
+ * @val: a value
+ *
* Convert @val to its gamma encoded value.
*
* For a linear value L in the range [0..1], conversion to the non-linear
*
* Returns: the gamma encoded value of @val
*
- * Since: 1.6
+ * Since: 1.20
*/
gdouble
-gst_video_color_transfer_encode (GstVideoTransferFunction func, gdouble val)
+gst_video_transfer_function_encode (GstVideoTransferFunction func, gdouble val)
{
gdouble res;
* @func: a #GstVideoTransferFunction
* @val: a value
*
+ * Deprecated: Use gst_video_transfer_function_decode() instead.
+ *
+ * Since: 1.6
+ */
+gdouble
+gst_video_color_transfer_decode (GstVideoTransferFunction func, gdouble val)
+{
+ return gst_video_transfer_function_decode (func, val);
+}
+
+/**
+ * gst_video_transfer_function_decode:
+ * @func: a #GstVideoTransferFunction
+ * @val: a value
+ *
* Convert @val to its gamma decoded value. This is the inverse operation of
* @gst_video_color_transfer_encode().
*
*
* Returns: the gamma decoded value of @val
*
- * Since: 1.6
+ * Since: 1.20
*/
gdouble
-gst_video_color_transfer_decode (GstVideoTransferFunction func, gdouble val)
+gst_video_transfer_function_decode (GstVideoTransferFunction func, gdouble val)
{
gdouble res;
GST_VIDEO_TRANSFER_BT601
} GstVideoTransferFunction;
+GST_VIDEO_DEPRECATED_FOR(gst_video_transfer_function_encode)
+gdouble gst_video_color_transfer_encode (GstVideoTransferFunction func, gdouble val);
GST_VIDEO_API
-gdouble gst_video_color_transfer_encode (GstVideoTransferFunction func, gdouble val);
+gdouble gst_video_transfer_function_encode (GstVideoTransferFunction func, gdouble val);
+GST_VIDEO_DEPRECATED_FOR(gst_video_transfer_function_decode)
+gdouble gst_video_color_transfer_decode (GstVideoTransferFunction func, gdouble val);
GST_VIDEO_API
-gdouble gst_video_color_transfer_decode (GstVideoTransferFunction func, gdouble val);
+gdouble gst_video_transfer_function_decode (GstVideoTransferFunction func, gdouble val);
/**
* GstVideoColorPrimaries:
t = convert->gamma_dec.gamma_table = g_malloc (sizeof (guint16) * 256);
for (i = 0; i < 256; i++)
- t[i] = rint (gst_video_color_transfer_decode (func, i / 255.0) * 65535.0);
+ t[i] =
+ rint (gst_video_transfer_function_decode (func, i / 255.0) * 65535.0);
} else {
GST_DEBUG ("gamma decode 16->16: %d", func);
convert->gamma_dec.gamma_func = gamma_convert_u16_u16;
for (i = 0; i < 65536; i++)
t[i] =
- rint (gst_video_color_transfer_decode (func, i / 65535.0) * 65535.0);
+ rint (gst_video_transfer_function_decode (func,
+ i / 65535.0) * 65535.0);
}
convert->current_bits = 16;
convert->current_pstride = 8;
t = convert->gamma_enc.gamma_table = g_malloc (sizeof (guint8) * 65536);
for (i = 0; i < 65536; i++)
- t[i] = rint (gst_video_color_transfer_encode (func, i / 65535.0) * 255.0);
+ t[i] =
+ rint (gst_video_transfer_function_encode (func, i / 65535.0) * 255.0);
} else {
guint16 *t;
for (i = 0; i < 65536; i++)
t[i] =
- rint (gst_video_color_transfer_encode (func, i / 65535.0) * 65535.0);
+ rint (gst_video_transfer_function_encode (func,
+ i / 65535.0) * 65535.0);
}
}
for (i = 0; i < 256; i++) {
gdouble val1, val2;
- val1 = gst_video_color_transfer_encode (j, i / 255.0);
+ val1 = gst_video_transfer_function_encode (j, i / 255.0);
fail_if (val1 < 0.0 || val1 > 1.0);
- val2 = gst_video_color_transfer_decode (j, val1);
+ val2 = gst_video_transfer_function_decode (j, val1);
fail_if (val2 < 0.0 || val2 > 1.0);
GST_DEBUG ("%d: %d %f->%f->%f %d", j, i, i / 255.0, val1, val2,