mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-08 21:28:45 +00:00
libs: h265parser: rename the FormatRangeExtensionProfile
FormatRangeExtensionProfile declares the common bits used for not only format range extensions profiles, but also for several different h265 extension profiles, such as high throughput, screen content coding extensions, etc. And So the old name is not proper. We also rename the get_h265_extension_profile function. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1121>
This commit is contained in:
parent
e99b962c0f
commit
f4ddccb08e
1 changed files with 12 additions and 12 deletions
|
@ -3164,17 +3164,17 @@ typedef struct
|
||||||
|
|
||||||
/* Tie breaker if more than one profiles are matching */
|
/* Tie breaker if more than one profiles are matching */
|
||||||
guint priority;
|
guint priority;
|
||||||
} FormatRangeExtensionProfile;
|
} H265ExtensionProfile;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
FormatRangeExtensionProfile *profile;
|
H265ExtensionProfile *profile;
|
||||||
guint extra_constraints;
|
guint extra_constraints;
|
||||||
} FormatRangeExtensionProfileMatch;
|
} H265ExtensionProfileMatch;
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
sort_fre_profile_matches (FormatRangeExtensionProfileMatch * a,
|
sort_fre_profile_matches (H265ExtensionProfileMatch * a,
|
||||||
FormatRangeExtensionProfileMatch * b)
|
H265ExtensionProfileMatch * b)
|
||||||
{
|
{
|
||||||
gint d;
|
gint d;
|
||||||
|
|
||||||
|
@ -3186,10 +3186,10 @@ sort_fre_profile_matches (FormatRangeExtensionProfileMatch * a,
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstH265Profile
|
static GstH265Profile
|
||||||
get_format_range_extension_profile (GstH265ProfileTierLevel * ptl)
|
get_h265_extension_profile (GstH265ProfileTierLevel * ptl)
|
||||||
{
|
{
|
||||||
/* See Table A.2 for the definition of those formats */
|
/* See Table A.2 for the definition of those formats */
|
||||||
FormatRangeExtensionProfile profiles[] = {
|
H265ExtensionProfile profiles[] = {
|
||||||
{GST_H265_PROFILE_MONOCHROME, GST_H265_PROFILE_IDC_FORMAT_RANGE_EXTENSION,
|
{GST_H265_PROFILE_MONOCHROME, GST_H265_PROFILE_IDC_FORMAT_RANGE_EXTENSION,
|
||||||
0, 1, 1, 1, 1, 1, 1, 0, 0, TRUE, 0},
|
0, 1, 1, 1, 1, 1, 1, 0, 0, TRUE, 0},
|
||||||
{GST_H265_PROFILE_MONOCHROME_10,
|
{GST_H265_PROFILE_MONOCHROME_10,
|
||||||
|
@ -3317,9 +3317,9 @@ get_format_range_extension_profile (GstH265ProfileTierLevel * ptl)
|
||||||
GList *matches = NULL;
|
GList *matches = NULL;
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (profiles); i++) {
|
for (i = 0; i < G_N_ELEMENTS (profiles); i++) {
|
||||||
FormatRangeExtensionProfile p = profiles[i];
|
H265ExtensionProfile p = profiles[i];
|
||||||
guint extra_constraints = 0;
|
guint extra_constraints = 0;
|
||||||
FormatRangeExtensionProfileMatch *m;
|
H265ExtensionProfileMatch *m;
|
||||||
|
|
||||||
/* Filter out all the profiles having constraints not satisfied by @ptl.
|
/* Filter out all the profiles having constraints not satisfied by @ptl.
|
||||||
* Then pick the one having the least extra constraints. This allow us
|
* Then pick the one having the least extra constraints. This allow us
|
||||||
|
@ -3391,14 +3391,14 @@ get_format_range_extension_profile (GstH265ProfileTierLevel * ptl)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
m = g_new0 (FormatRangeExtensionProfileMatch, 1);
|
m = g_new0 (H265ExtensionProfileMatch, 1);
|
||||||
m->profile = &profiles[i];
|
m->profile = &profiles[i];
|
||||||
m->extra_constraints = extra_constraints;
|
m->extra_constraints = extra_constraints;
|
||||||
matches = g_list_prepend (matches, m);
|
matches = g_list_prepend (matches, m);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result == GST_H265_PROFILE_INVALID && matches) {
|
if (result == GST_H265_PROFILE_INVALID && matches) {
|
||||||
FormatRangeExtensionProfileMatch *m;
|
H265ExtensionProfileMatch *m;
|
||||||
|
|
||||||
matches = g_list_sort (matches, (GCompareFunc) sort_fre_profile_matches);
|
matches = g_list_sort (matches, (GCompareFunc) sort_fre_profile_matches);
|
||||||
m = matches->data;
|
m = matches->data;
|
||||||
|
@ -3435,7 +3435,7 @@ gst_h265_profile_tier_level_get_profile (GstH265ProfileTierLevel * ptl)
|
||||||
|| ptl->profile_compatibility_flag[3])
|
|| ptl->profile_compatibility_flag[3])
|
||||||
return GST_H265_PROFILE_MAIN_STILL_PICTURE;
|
return GST_H265_PROFILE_MAIN_STILL_PICTURE;
|
||||||
|
|
||||||
return get_format_range_extension_profile (ptl);
|
return get_h265_extension_profile (ptl);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue