Skip to content

Commit

Permalink
Merge pull request #901 from DolbyLaboratories/dolby/ac4_ims
Browse files Browse the repository at this point in the history
add AC4 signaling for IMS stereo and CBI(channel based immersive) in HLS
  • Loading branch information
barbibulle committed Nov 18, 2023
2 parents feb99f5 + 47a959d commit f826f46
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Source/Python/utils/mp4utils.py
Expand Up @@ -449,13 +449,15 @@ def __init__(self, parent, info):
# Set the default values for Dolby audio codec flags
self.dolby_ddp_atmos = 'No'
self.dolby_ac4_ims = 'No'
self.dolby_ac4_cbi = 'No'
if self.codec_family == 'ec-3' and 'dolby_digital_plus_info' in sample_desc:
self.channels = GetDolbyDigitalPlusChannels(self)[0]
self.dolby_ddp_atmos = sample_desc['dolby_digital_plus_info']['Dolby_Atmos']
if (self.dolby_ddp_atmos == 'Yes'):
self.complexity_index = sample_desc['dolby_digital_plus_info']['complexity_index']
self.channels = str(self.info['sample_descriptions'][0]['dolby_digital_plus_info']['complexity_index']) + '/JOC'
elif self.codec_family == 'ac-4' and 'dolby_ac4_info' in sample_desc:
self.channels = str(self.channels)
if sample_desc['dolby_ac4_info']['dsi version'] == 0:
raise Exception("AC4 dsi version 0 is deprecated.")
elif sample_desc['dolby_ac4_info']['dsi version'] == 1:
Expand All @@ -465,7 +467,10 @@ def __init__(self, parent, info):
stream_type = sample_desc['dolby_ac4_info']['presentations'][0]['Stream Type']
if stream_type == 'Immersive stereo':
self.dolby_ac4_ims = 'Yes'
self.channels = str(self.channels)
self.channels = '2/IMSA'
elif stream_type == 'Channel based immsersive':
self.dolby_ac4_cbi = 'Yes'
self.channels = self.channels + '/IMSA'
elif 'mpeg_4_audio_decoder_config' in sample_desc:
self.channels = sample_desc['mpeg_4_audio_decoder_config']['channels']

Expand Down

0 comments on commit f826f46

Please sign in to comment.