tests: h265parser: Add test for multiple compatibility profiles.
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Wed, 15 Dec 2021 11:27:24 +0000 (12:27 +0100)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Thu, 16 Dec 2021 16:08:30 +0000 (17:08 +0100)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1440>

subprojects/gst-plugins-bad/tests/check/libs/h265parser.c

index ff17598..4d7ee8d 100644 (file)
@@ -652,6 +652,15 @@ GST_START_TEST (test_h265_format_range_profiles_partial_match)
   set_format_range_fields (ptl, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1);
   g_assert_cmpuint (gst_h265_profile_tier_level_get_profile (ptl), ==,
       GST_H265_PROFILE_SCREEN_EXTENDED_HIGH_THROUGHPUT_444_14);
+
+  ptl->profile_idc = 2;
+  /* main and main10 compatibility flags but with 10 bith depth */
+  ptl->profile_compatibility_flag[1] = 1;
+  ptl->profile_compatibility_flag[2] = 1;
+  set_format_range_fields (ptl, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+  set_chroma_idc_and_depth (&sps, 1, 10, 10);
+  g_assert_cmpuint (gst_h265_get_profile_from_sps (&sps), ==,
+      GST_H265_PROFILE_MAIN_10);
 }
 
 GST_END_TEST;