Revert video HDR10+ support

This reverts commit f76b731cbf.
This reverts commit 631489de23.
This reverts commit a1ed7a8f49.
This reverts commit 7d6f72e956.

Back this out again for now for the release. Needs more discussion.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/865

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1148>
This commit is contained in:
Tim-Philipp Müller 2021-05-16 13:31:56 +01:00 committed by GStreamer Marge Bot
parent 57578529a0
commit 48c0a6dd1e
2 changed files with 0 additions and 612 deletions

View file

@ -22,13 +22,9 @@
#endif
#include <string.h>
#include <gst/base/gstbitreader.h>
#include "video-hdr.h"
#define HDR10_PLUS_MAX_BEZIER_CURVE_ANCHORS 9
#define HDR10_PLUS_MAX_DIST_MAXRGB_PERCENTILES 9
#define N_ELEMENT_MASTERING_DISPLAY_INFO 10
#define MASTERING_FORMAT \
"%d:%d:" \
@ -45,48 +41,6 @@
(m)->max_display_mastering_luminance, \
(m)->min_display_mastering_luminance
/**
* gst_video_hdr_format_to_string:
* @format: a #GstVideoHDRFormat
*
* Returns: (nullable): a string containing a descriptive name for
* the #GstVideoHDRFormat if there is one, or %NULL otherwise.
*
* Since: 1.20
*/
const gchar *
gst_video_hdr_format_to_string (GstVideoHDRFormat format)
{
switch (format) {
case GST_VIDEO_HDR_FORMAT_HDR10:
return "hdr10";
case GST_VIDEO_HDR_FORMAT_HDR10_PLUS:
return "hdr10+";
default:
return NULL;
}
}
/**
* gst_video_hdr_format_from_string:
* @format: (nullable): a #GstVideoHDRFormat
*
* Returns: the #GstVideoHDRFormat for @format or GST_VIDEO_HDR_FORMAT_NONE when the
* string is not a known format.
*
* Since: 1.20
*/
GstVideoHDRFormat
gst_video_hdr_format_from_string (const gchar * format)
{
if (!g_strcmp0 (format, "hdr10"))
return GST_VIDEO_HDR_FORMAT_HDR10;
else if (!g_strcmp0 (format, "hdr10+"))
return GST_VIDEO_HDR_FORMAT_HDR10_PLUS;
return GST_VIDEO_HDR_FORMAT_NONE;
}
/**
* gst_video_mastering_display_info_init:
* @minfo: a #GstVideoMasteringDisplayInfo
@ -459,304 +413,3 @@ gst_video_content_light_level_add_to_caps (const GstVideoContentLightLevel *
return TRUE;
}
/* Dynamic HDR Meta implementation */
GType
gst_video_hdr_meta_api_get_type (void)
{
static GType type = 0;
if (g_once_init_enter (&type)) {
static const gchar *tags[] = {
GST_META_TAG_VIDEO_STR,
NULL
};
GType _type = gst_meta_api_type_register ("GstVideoHDRMetaAPI", tags);
g_once_init_leave (&type, _type);
}
return type;
}
static gboolean
gst_video_hdr_meta_transform (GstBuffer * dest, GstMeta * meta,
GstBuffer * buffer, GQuark type, gpointer data)
{
GstVideoHDRMeta *dmeta, *smeta;
/* We always copy over the caption meta */
smeta = (GstVideoHDRMeta *) meta;
GST_DEBUG ("copy HDR metadata");
dmeta =
gst_buffer_add_video_hdr_meta (dest, smeta->format, smeta->data,
smeta->size);
if (!dmeta)
return FALSE;
return TRUE;
}
static gboolean
gst_video_hdr_meta_init (GstMeta * meta, gpointer params, GstBuffer * buffer)
{
GstVideoHDRMeta *emeta = (GstVideoHDRMeta *) meta;
emeta->data = NULL;
return TRUE;
}
static void
gst_video_hdr_meta_free (GstMeta * meta, GstBuffer * buffer)
{
GstVideoHDRMeta *emeta = (GstVideoHDRMeta *) meta;
g_free (emeta->data);
}
const GstMetaInfo *
gst_video_hdr_meta_get_info (void)
{
static const GstMetaInfo *meta_info = NULL;
if (g_once_init_enter ((GstMetaInfo **) & meta_info)) {
const GstMetaInfo *mi = gst_meta_register (GST_VIDEO_HDR_META_API_TYPE,
"GstVideoHDRMeta",
sizeof (GstVideoHDRMeta),
gst_video_hdr_meta_init,
gst_video_hdr_meta_free,
gst_video_hdr_meta_transform);
g_once_init_leave ((GstMetaInfo **) & meta_info, (GstMetaInfo *) mi);
}
return meta_info;
}
/**
* gst_buffer_add_video_hdr_meta:
* @buffer: a #GstBuffer
* @format: The type of dynamic HDR contained in the meta.
* @data: contains the dynamic HDR data
* @size: The size in bytes of @data
*
* Attaches #GstVideoHDRMeta metadata to @buffer with the given
* parameters.
*
* Returns: (transfer none): the #GstVideoHDRMeta on @buffer.
*
* Since: 1.20
*/
GstVideoHDRMeta *
gst_buffer_add_video_hdr_meta (GstBuffer * buffer,
GstVideoHDRFormat format, const guint8 * data, gsize size)
{
GstVideoHDRMeta *meta;
g_return_val_if_fail (GST_IS_BUFFER (buffer), NULL);
g_return_val_if_fail (data != NULL, NULL);
meta = (GstVideoHDRMeta *) gst_buffer_add_meta (buffer,
GST_VIDEO_HDR_META_INFO, NULL);
g_assert (meta != NULL);
meta->format = format;
meta->data = g_memdup (data, size);
meta->size = size;
return meta;
}
#define CHECK_HDR10PLUS_REMAINING(br, needed) \
if (gst_bit_reader_get_remaining (&br) < needed) { \
GST_DEBUG ("Not enough bits remaining %d, needed %d", gst_bit_reader_get_remaining (&br), needed); \
return FALSE; \
}
/**
* gst_video_hdr_parse_hdr10_plus:
* @data: HDR10+ data
* @size: size of data
* @hdr10_plus: (out): #GstVideoHDR10Plus structure to fill in.
*
* Parse HDR10+ (SMPTE2094-40) user data and store in @hdr10_plus
* For more details, see:
* https://www.atsc.org/wp-content/uploads/2018/02/S34-301r2-A341-Amendment-2094-40-1.pdf
* and SMPTE ST2094-40
*
* Returns: %TRUE if @data was successfully parsed to @hdr10_plus
*
* Since: 1.20
*/
gboolean
gst_video_hdr_parse_hdr10_plus (const guint8 * data, gsize size,
GstVideoHDR10Plus * hdr10_plus)
{
guint16 provider_oriented_code;
int w, i, j;
GstBitReader br;
/* there must be at least one byte, and not more than GST_VIDEO_HDR10_PLUS_MAX_BYTES bytes */
g_return_val_if_fail (data != NULL, FALSE);
memset (hdr10_plus, 0, sizeof (GstVideoHDR10Plus));
gst_bit_reader_init (&br, data, size);
GST_MEMDUMP ("HDR10+", data, size);
CHECK_HDR10PLUS_REMAINING (br, 2 + 8 + 8 + 2);
provider_oriented_code = gst_bit_reader_get_bits_uint16_unchecked (&br, 16);
if (provider_oriented_code != 0x0001)
return FALSE;
hdr10_plus->application_identifier =
gst_bit_reader_get_bits_uint8_unchecked (&br, 8);
hdr10_plus->application_version =
gst_bit_reader_get_bits_uint8_unchecked (&br, 8);
hdr10_plus->num_windows = gst_bit_reader_get_bits_uint8_unchecked (&br, 2);
if (hdr10_plus->num_windows != GST_VIDEO_HDR10_PLUS_NUM_WINDOWS)
return FALSE;
for (w = 0; w < hdr10_plus->num_windows; w++) {
CHECK_HDR10PLUS_REMAINING (br,
16 + 16 + 16 + 16 + 16 + 16 + 8 + 16 + 16 + 16 + 1);
hdr10_plus->processing_window[w].window_upper_left_corner_x =
gst_bit_reader_get_bits_uint16_unchecked (&br, 16);
hdr10_plus->processing_window[w].window_upper_left_corner_y =
gst_bit_reader_get_bits_uint16_unchecked (&br, 16);
hdr10_plus->processing_window[w].window_lower_right_corner_x =
gst_bit_reader_get_bits_uint16_unchecked (&br, 16);
hdr10_plus->processing_window[w].window_lower_right_corner_y =
gst_bit_reader_get_bits_uint16_unchecked (&br, 16);
hdr10_plus->processing_window[w].center_of_ellipse_x =
gst_bit_reader_get_bits_uint16_unchecked (&br, 16);
hdr10_plus->processing_window[w].center_of_ellipse_y =
gst_bit_reader_get_bits_uint16_unchecked (&br, 16);
hdr10_plus->processing_window[w].rotation_angle =
gst_bit_reader_get_bits_uint8_unchecked (&br, 8);
hdr10_plus->processing_window[w].semimajor_axis_internal_ellipse =
gst_bit_reader_get_bits_uint16_unchecked (&br, 16);
hdr10_plus->processing_window[w].semimajor_axis_external_ellipse =
gst_bit_reader_get_bits_uint16_unchecked (&br, 16);
hdr10_plus->processing_window[w].semiminor_axis_external_ellipse =
gst_bit_reader_get_bits_uint16_unchecked (&br, 16);
hdr10_plus->processing_window[w].overlap_process_option =
gst_bit_reader_get_bits_uint8_unchecked (&br, 1);
}
CHECK_HDR10PLUS_REMAINING (br, 27 + 1);
hdr10_plus->targeted_system_display_maximum_luminance =
gst_bit_reader_get_bits_uint32_unchecked (&br, 27);
hdr10_plus->targeted_system_display_actual_peak_luminance_flag =
gst_bit_reader_get_bits_uint8_unchecked (&br, 1);
if (hdr10_plus->targeted_system_display_actual_peak_luminance_flag) {
CHECK_HDR10PLUS_REMAINING (br, 5 + 5);
hdr10_plus->num_rows_targeted_system_display_actual_peak_luminance =
gst_bit_reader_get_bits_uint8_unchecked (&br, 5);
hdr10_plus->num_cols_targeted_system_display_actual_peak_luminance =
gst_bit_reader_get_bits_uint8_unchecked (&br, 5);
if (hdr10_plus->num_rows_targeted_system_display_actual_peak_luminance >
GST_VIDEO_HDR10_PLUS_MAX_ROWS_TSD_APL)
return FALSE;
if (hdr10_plus->num_cols_targeted_system_display_actual_peak_luminance >
GST_VIDEO_HDR10_PLUS_MAX_COLS_MD_APL)
return FALSE;
CHECK_HDR10PLUS_REMAINING (br,
hdr10_plus->num_rows_targeted_system_display_actual_peak_luminance *
hdr10_plus->num_cols_targeted_system_display_actual_peak_luminance * 4);
for (i = 0;
i < hdr10_plus->num_rows_targeted_system_display_actual_peak_luminance;
i++) {
for (j = 0;
j <
hdr10_plus->num_cols_targeted_system_display_actual_peak_luminance;
j++)
hdr10_plus->targeted_system_display_actual_peak_luminance[i][j] =
gst_bit_reader_get_bits_uint8_unchecked (&br, 4);
}
for (w = 0; w < hdr10_plus->num_windows; w++) {
CHECK_HDR10PLUS_REMAINING (br, (17 * 3));
for (i = 0; i < 3; i++)
hdr10_plus->processing_window[w].maxscl[i] =
gst_bit_reader_get_bits_uint32_unchecked (&br, 17);
CHECK_HDR10PLUS_REMAINING (br, 17 + 4);
hdr10_plus->processing_window[w].average_maxrgb =
gst_bit_reader_get_bits_uint32_unchecked (&br, 17);
hdr10_plus->processing_window[w].num_distribution_maxrgb_percentiles =
gst_bit_reader_get_bits_uint8_unchecked (&br, 4);
if (hdr10_plus->processing_window[w].
num_distribution_maxrgb_percentiles !=
HDR10_PLUS_MAX_DIST_MAXRGB_PERCENTILES)
return FALSE;
CHECK_HDR10PLUS_REMAINING (br,
hdr10_plus->processing_window[w].num_distribution_maxrgb_percentiles *
(17 + 7));
for (i = 0;
i <
hdr10_plus->processing_window[w].num_distribution_maxrgb_percentiles;
i++) {
hdr10_plus->processing_window[w].distribution_maxrgb_percentages[i] =
gst_bit_reader_get_bits_uint8_unchecked (&br, 7);
hdr10_plus->processing_window[w].distribution_maxrgb_percentiles[i] =
gst_bit_reader_get_bits_uint32_unchecked (&br, 17);
}
CHECK_HDR10PLUS_REMAINING (br, 10)
hdr10_plus->processing_window[w].fraction_bright_pixels =
gst_bit_reader_get_bits_uint16_unchecked (&br, 10);
}
}
CHECK_HDR10PLUS_REMAINING (br, 1)
hdr10_plus->mastering_display_actual_peak_luminance_flag =
gst_bit_reader_get_bits_uint8_unchecked (&br, 1);
if (hdr10_plus->targeted_system_display_actual_peak_luminance_flag) {
CHECK_HDR10PLUS_REMAINING (br, 5 + 5)
hdr10_plus->num_rows_mastering_display_actual_peak_luminance =
gst_bit_reader_get_bits_uint8_unchecked (&br, 5);
hdr10_plus->num_cols_mastering_display_actual_peak_luminance =
gst_bit_reader_get_bits_uint8_unchecked (&br, 5);
if (hdr10_plus->num_rows_mastering_display_actual_peak_luminance >
GST_VIDEO_HDR10_PLUS_MAX_ROWS_TSD_APL)
return FALSE;
if (hdr10_plus->num_cols_mastering_display_actual_peak_luminance >
GST_VIDEO_HDR10_PLUS_MAX_COLS_MD_APL)
return FALSE;
CHECK_HDR10PLUS_REMAINING (br,
hdr10_plus->num_rows_mastering_display_actual_peak_luminance *
hdr10_plus->num_cols_mastering_display_actual_peak_luminance * 4)
for (i = 0;
i < hdr10_plus->num_rows_mastering_display_actual_peak_luminance; i++) {
for (j = 0;
j < hdr10_plus->num_cols_mastering_display_actual_peak_luminance; j++)
hdr10_plus->mastering_display_actual_peak_luminance[i][j] =
gst_bit_reader_get_bits_uint8_unchecked (&br, 4);
}
for (w = 0; w < hdr10_plus->num_windows; w++) {
CHECK_HDR10PLUS_REMAINING (br, 1)
hdr10_plus->processing_window[w].tone_mapping_flag =
gst_bit_reader_get_bits_uint8_unchecked (&br, 1);
if (hdr10_plus->processing_window[w].tone_mapping_flag) {
CHECK_HDR10PLUS_REMAINING (br, 12 + 12 + 4)
hdr10_plus->processing_window[w].knee_point_x =
gst_bit_reader_get_bits_uint16_unchecked (&br, 12);
hdr10_plus->processing_window[w].knee_point_y =
gst_bit_reader_get_bits_uint16_unchecked (&br, 12);
hdr10_plus->processing_window[w].num_bezier_curve_anchors =
gst_bit_reader_get_bits_uint8_unchecked (&br, 4);
if (hdr10_plus->processing_window[w].num_bezier_curve_anchors >
HDR10_PLUS_MAX_BEZIER_CURVE_ANCHORS)
return FALSE;
CHECK_HDR10PLUS_REMAINING (br,
10 * hdr10_plus->processing_window[w].num_bezier_curve_anchors);
for (i = 0;
i < hdr10_plus->processing_window[w].num_bezier_curve_anchors; i++)
hdr10_plus->processing_window[w].bezier_curve_anchors[i] =
gst_bit_reader_get_bits_uint16_unchecked (&br, 10);
}
CHECK_HDR10PLUS_REMAINING (br, 1);
hdr10_plus->processing_window[w].color_saturation_mapping_flag =
gst_bit_reader_get_bits_uint8_unchecked (&br, 1);
if (hdr10_plus->processing_window[w].color_saturation_mapping_flag) {
CHECK_HDR10PLUS_REMAINING (br, 6);
hdr10_plus->processing_window[w].color_saturation_weight =
gst_bit_reader_get_bits_uint8_unchecked (&br, 6);
}
}
}
return TRUE;
}

View file

@ -22,142 +22,12 @@
#include <gst/gst.h>
#include <gst/video/video-prelude.h>
#include <gst/video/video-info.h>
G_BEGIN_DECLS
/**
* GstVideoHDRFormat:
* @GST_VIDEO_HDR_FORMAT_NONE: No HDR format detected.
* @GST_VIDEO_HDR_FORMAT_HDR10: HDR10 format
* @GST_VIDEO_HDR_FORMAT_HDR10_PLUS: HDR10+ format
* @GST_VIDEO_HDR_FORMAT_DOLBY_VISION: Dolby Vision format
*
* Enum value describing the most common video for High Dynamic Range (HDR) formats.
*
* Since: 1.20
*/
typedef enum {
GST_VIDEO_HDR_FORMAT_NONE,
GST_VIDEO_HDR_FORMAT_HDR10,
GST_VIDEO_HDR_FORMAT_HDR10_PLUS,
GST_VIDEO_HDR_FORMAT_DOLBY_VISION,
} GstVideoHDRFormat;
/**
* GST_VIDEO_HDR10_PLUS_MAX_BYTES:
*
* Specify the max size for a HDR10+ content
*
* Since: 1.20
*/
#define GST_VIDEO_HDR10_PLUS_MAX_BYTES 1024
/**
* GST_VIDEO_HDR10_PLUS_NUM_WINDOWS:
*
* Number of windows in HDR10+ dynamic metadata.
* Defined in CTA-861-G.
* Shall be 1.
*
* Since: 1.20
*/
#define GST_VIDEO_HDR10_PLUS_NUM_WINDOWS 1
/**
* GST_VIDEO_HDR10_PLUS_MAX_ROWS_TSD_APL:
*
* Specifies the number of columns in the
* targeted_system_display_actual_peak_luminance
* array.
* Defined in CTA-861-G.
*
* Since: 1.20
*/
#define GST_VIDEO_HDR10_PLUS_MAX_ROWS_TSD_APL 25
/**
* GST_VIDEO_HDR10_PLUS_MAX_COLS_MD_APL:
*
* Specifies the number of columns in the
* targeted_system_display_actual_peak_luminance
* array.
* Defined in CTA-861-G.
*
*
* Since: 1.20
*/
#define GST_VIDEO_HDR10_PLUS_MAX_COLS_MD_APL 25
typedef struct _GstVideoMasteringDisplayInfoCoordinates GstVideoMasteringDisplayInfoCoordinates;
typedef struct _GstVideoMasteringDisplayInfo GstVideoMasteringDisplayInfo;
typedef struct _GstVideoContentLightLevel GstVideoContentLightLevel;
typedef struct _GstVideoHDR10Plus GstVideoHDR10Plus;
typedef struct _GstVideoColorVolumeTransformation GstVideoColorVolumeTransformation;
GST_VIDEO_API
const gchar* gst_video_hdr_format_to_string (GstVideoHDRFormat format) G_GNUC_CONST;
GST_VIDEO_API
GstVideoHDRFormat gst_video_hdr_format_from_string (const gchar* format) G_GNUC_CONST;
/**
* GstVideoHDRMeta:
* @meta: parent #GstMeta
* @format: The type of dynamic HDR contained in the meta.
* @data: contains the dynamic HDR data
* @size: The size in bytes of @data
*
* Dynamic HDR data should be included in video user data
*
* Since: 1.20
*/
typedef struct {
GstMeta meta;
GstVideoHDRFormat format;
guint8 *data;
gsize size;
} GstVideoHDRMeta;
/**
* gst_video_hdr_meta_api_get_type: (attributes doc.skip=true)
*/
GST_VIDEO_API
GType gst_video_hdr_meta_api_get_type (void);
/**
* GST_VIDEO_HDR_META_API_TYPE: (attributes doc.skip=true)
*/
#define GST_VIDEO_HDR_META_API_TYPE (gst_video_hdr_meta_api_get_type())
/**
* gst_video_hdr_meta_get_info: (attributes doc.skip=true)
*/
GST_VIDEO_API
const GstMetaInfo *gst_video_hdr_meta_get_info (void);
/**
* GST_VIDEO_HDR_META_INFO: (attributes doc.skip=true)
*/
#define GST_VIDEO_HDR_META_INFO (gst_video_hdr_meta_get_info())
/**
* gst_buffer_get_video_hdr_meta:
* @b: A #GstBuffer
*
* Gets the #GstVideoHDRMeta that might be present on @b.
*
* Since: 1.20
*
* Returns: The first #GstVideoHDRMeta present on @b, or %NULL if
* no #GstVideoHDRMeta are present
*/
#define gst_buffer_get_video_hdr_meta(b) \
((GstVideoHDRMeta*)gst_buffer_get_meta((b), GST_VIDEO_HDR_META_API_TYPE))
GST_VIDEO_API
GstVideoHDRMeta *gst_buffer_add_video_hdr_meta (GstBuffer * buffer, GstVideoHDRFormat format,
const guint8 * data, gsize size);
/**
* GstVideoMasteringDisplayInfoCoordinates:
@ -267,141 +137,6 @@ GST_VIDEO_API
gboolean gst_video_content_light_level_add_to_caps (const GstVideoContentLightLevel * linfo,
GstCaps * caps);
/**
* GstVideoColorVolumeTransformation:
* @window_upper_left_corner_x: the x coordinate of the top left pixel of the w-th processing
* @window_upper_left_corner_y: the y coordinate of the top left pixel of the w-th processing
* @window_lower_right_corner_x: the x coordinate of the lower right pixel of the w-th processing
* @window_lower_right_corner_y: the y coordinate of the lower right pixel of the w-th processing
* @center_of_ellipse_x: the x coordinate of the center position of the concentric internal
* and external ellipses of the elliptical pixel selector in the w-th processing window
* @center_of_ellipse_y: the y coordinate of the center position of the concentric internal
* and external ellipses of the elliptical pixel selector in the w-th processing window
* @rotation_angle: the clockwise rotation angle in degree of arc with respect to the
* positive direction of the x-axis of the concentric internal and external ellipses of the elliptical
* pixel selector in the w-th processing window
* @semimajor_axis_internal_ellipse: the semi-major axis value of the internal ellipse of the
* elliptical pixel selector in amount of pixels in the w-th processing window
* @semimajor_axis_external_ellipse: the semi-major axis value of the external ellipse of
* the elliptical pixel selector in amount of pixels in the w-th processing window
* @semiminor_axis_external_ellipse: the semi-minor axis value of the external ellipse of
* the elliptical pixel selector in amount of pixels in the w-th processing window
* @overlap_process_option: one of the two methods of combining
* rendered pixels in the w-th processing window in an image with at least one elliptical pixel
* selector
* @maxscl: the maximum of the i-th color component of linearized RGB values in the
* w-th processing window in the scene
* @average_maxrgb: the average of linearized maxRGB values in the w-th processing
* window in the scene
* @num_distribution_maxrgb_percentiles: the number of linearized maxRGB values at
* given percentiles in the w-th processing window in the scene. Maximum value should be 9.
* @distribution_maxrgb_percentages: an integer percentage value corresponding to the
* i-th percentile linearized RGB value in the w-th processing window in the scene
* @fraction_bright_pixels: the fraction of selected pixels in the image that contains the
* brightest pixel in the scene
* @tone_mapping_flag: true if the tone mapping function in the w-th
* processing window is present
* @knee_point_x: the x coordinate of the separation point between the linear part and the
* curved part of the tone mapping function
* @knee_point_y: the y coordinate of the separation point between the linear part and the
* curved part of the tone mapping function
* @num_bezier_curve_anchors: the number of the intermediate anchor parameters of the
* tone mapping function in the w-th processing window. Maximum value should be 9.
* @bezier_curve_anchors: the i-th intermediate anchor parameter of the tone mapping
function in the w-th processing window in the scene
* @color_saturation_mapping_flag: shall be equal to zero in this version of the standard.
* @color_saturation_weight: a number that shall adjust the color saturation gain in the w-
th processing window in the scene
*
* Processing window in dynamic metadata defined in SMPTE ST 2094-40:2016
* and CTA-861-G Annex S HDR Dynamic Metadata Syntax Type 4.
*
* Since: 1.20
*/
struct _GstVideoColorVolumeTransformation
{
guint16 window_upper_left_corner_x;
guint16 window_upper_left_corner_y;
guint16 window_lower_right_corner_x;
guint16 window_lower_right_corner_y;
guint16 center_of_ellipse_x;
guint16 center_of_ellipse_y;
guint8 rotation_angle;
guint16 semimajor_axis_internal_ellipse;
guint16 semimajor_axis_external_ellipse;
guint16 semiminor_axis_external_ellipse;
guint8 overlap_process_option;
guint32 maxscl[3];
guint32 average_maxrgb;
guint8 num_distribution_maxrgb_percentiles;
guint8 distribution_maxrgb_percentages[16];
guint32 distribution_maxrgb_percentiles[16];
guint16 fraction_bright_pixels;
guint8 tone_mapping_flag;
guint16 knee_point_x;
guint16 knee_point_y;
guint8 num_bezier_curve_anchors;
guint16 bezier_curve_anchors[16];
guint8 color_saturation_mapping_flag;
guint8 color_saturation_weight;
/*< private >*/
guint32 _gst_reserved[GST_PADDING];
};
/**
* GstVideoHDR10Plus:
* @application_identifier: the application identifier
* @application_version: the application version
* @num_windows: the number of processing windows. The first processing window shall be
* for the entire picture
* @processing_window: the color volume transformation for the processing window.
* @targeted_system_display_maximum_luminance: the nominal maximum display luminance
* of the targeted system display in units of 0.0001 candelas per square meter
* @targeted_system_display_actual_peak_luminance_flag: shall be equal to zero in this
* version of the standard
* @num_rows_targeted_system_display_actual_peak_luminance: the number of rows
* in the targeted_system_display_actual_peak_luminance array
* @num_cols_targeted_system_display_actual_peak_luminance: the number of columns in the
* targeted_system_display_actual_peak_luminance array
* @targeted_system_display_actual_peak_luminance: the normalized actual peak luminance of
* the targeted system display
* @mastering_display_actual_peak_luminance_flag: shall be equal to 0 for this version of this Standard
* @num_rows_mastering_display_actual_peak_luminance: the number of rows in the
* mastering_display_actual_peak_luminance array
* @num_cols_mastering_display_actual_peak_luminance: the number of columns in the
* mastering_display_actual_peak_luminance array.
* @mastering_display_actual_peak_luminance: the normalized actual peak luminance of
* the mastering display used for mastering the image essence
*
* Dynamic HDR 10+ metadata defined in SMPTE2094-40
* and CTA-861-G Annex S HDR Dynamic Metadata Syntax Type 4.
*
* Since: 1.20
*/
struct _GstVideoHDR10Plus
{
guint8 application_identifier;
guint8 application_version;
guint8 num_windows;
GstVideoColorVolumeTransformation processing_window[GST_VIDEO_HDR10_PLUS_NUM_WINDOWS];
guint32 targeted_system_display_maximum_luminance;
guint8 targeted_system_display_actual_peak_luminance_flag;
guint8 num_rows_targeted_system_display_actual_peak_luminance;
guint8 num_cols_targeted_system_display_actual_peak_luminance;
guint8 targeted_system_display_actual_peak_luminance[GST_VIDEO_HDR10_PLUS_MAX_ROWS_TSD_APL][GST_VIDEO_HDR10_PLUS_MAX_COLS_MD_APL];
guint8 mastering_display_actual_peak_luminance_flag;
guint8 num_rows_mastering_display_actual_peak_luminance;
guint8 num_cols_mastering_display_actual_peak_luminance;
guint8 mastering_display_actual_peak_luminance[GST_VIDEO_HDR10_PLUS_MAX_ROWS_TSD_APL][GST_VIDEO_HDR10_PLUS_MAX_COLS_MD_APL];
/*< private >*/
gpointer _gst_reserved[GST_PADDING];
};
GST_VIDEO_API gboolean
gst_video_hdr_parse_hdr10_plus (const guint8 * data, gsize size,
GstVideoHDR10Plus * hdr10_plus);
G_END_DECLS