detect HDR transcodes via colorTrc attribute (#2466)

This commit is contained in:
chrisdecker08 2024-12-14 15:24:08 -05:00 committed by GitHub
parent 37ef098718
commit b7c4f2eefe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3386,10 +3386,10 @@ class PmsConnect(object):
def get_dynamic_range(stream):
extended_display_title = helpers.get_xml_attr(stream, 'extendedDisplayTitle')
bit_depth = helpers.cast_to_int(helpers.get_xml_attr(stream, 'bitDepth'))
color_space = helpers.get_xml_attr(stream, 'colorSpace')
color_trc = helpers.get_xml_attr(stream, 'colorTrc')
DOVI_profile = helpers.get_xml_attr(stream, 'DOVIProfile')
HDR = bool(bit_depth > 8 and 'bt2020' in color_space)
HDR = bool(bit_depth > 8 and (color_trc == 'smpte2084' or color_trc == 'arib-std-b67'))
DV = bool(DOVI_profile)
if not HDR and not DV: