Skip to content
  • Seungha Yang's avatar
    h265parse: Parse mastering display info and content light level from SEI · a2436713
    Seungha Yang authored and Sebastian Dröge's avatar Sebastian Dröge committed
    ... and set to caps if necessary.
    
    Note 1) the mastering display info and content light level SEI meessages
    are persistent in the corresponding codec video sequence (i.e., GOP).
    So any bitstream containing those SEI messages
    (and also all pictures are intended to be HDR rendered) should be ensured that
    each first slice of codec video sequence follows those SEI messages.
    
    Note 2) The codec video sequence is a group an [IRAP + NoRaslOutputFlag == 1]
    and following AUs which are not [IRAP + NoRaslOutputFlag == 1]
    The NoRaslOutputFlag is equal to 1 for each IDR AU, BLA AU and some CRA AU.
    For a CRA AU to have NoRaslOutputFlag equal to 1, following condition should required.
    * When the CRA AU is the first AU in the bitstream in decoding order
    * or the CRA AU is the first AU that follows an end of sequence NAL in decoding order
    * or the HandleCraAsBlaFlag equal to 1.
    
    Due to the limited context in parse element, in this commint, CRA AU will not considered as
    having the NoRaslOutputFlag equal to 1. Therefore, in the worst case,
    mastering-display-info and content-light-level could be cleared one GOP after
    when stream was chagned from HDR to SDR.
    a2436713