Skip to content

h265parser: Fixes to reported profile

    tests: h265parser: Add test for multiple compatibility profiles.
    h265parser: Compare upstream profile with in SPS.
    
    Compare if upstream profile in caps is the same as the one parsed in
    the SPS. If they are different use the bigger for simplicity and
    more chances to decode it.
    codecparsers: h265parser: Use a table map to get profile.
    
    Instead of a sequence of if statements, declare a table to map profile
    idc with profiles and traverse it.
    
    Also, first add the profile from the parsed profile idc and later add,
    into the profile array, the profile from the compatibility flags.
    codecparsers: h265parser: Verify all possible profiles.
    
    It's possible a HEVC stream to have multiple profiles given the
    compatibility bits. Instead of returning a single profile, internal
    gst_h265_profile_tier_level_get_profiles() returns an array with all
    it possible profiles.
    
    Profiles are appended into the array only if the generated profile
    is not invalid.
    
    gst_h265_profile_tier_level_get_profile() is rewritten in terms of
    gst_h265_profile_tier_level_get_profiles(), returning the first
    profile found the array.
    
    And  gst_h265_get_profile_from_sps() is also rewritten in terms of
    gst_h265_profile_tier_level_get_profiles(), but traversing the array
    verifying if the proposed profile is actually valid by Annex A.3.x of
    the specification.

Superseeds !1048 (closed)

Edited by Víctor Manuel Jáquez Leal

Merge request reports