22 int multiplier_bit = 0;
23 int dsi_frame_rate_multiply_info = 0;
27 int b_frame_rate_fraction = 0;
28 int b_frame_rate_fraction_is_4 = 0;
34 int b_emdf_payloads_substream_info = 0;
35 int substream_index = 0;
37 int protection_length_primary = 0;
38 int protection_length_secondary = 0;
39 uint8_t protection_bits_primary[16];
40 uint8_t protection_bits_secondary[16];
44 int b_default_screen_size_ratio = 0;
45 int master_screen_size_ratio_code = 0;
46 int b_bed_object_chan_distribute = 0;
47 int b_additional_data = 0;
48 int add_data_bytes = 0;
49 int add_data_bytes_minus1 = 0;
55 int b_4_back_channels_present = 0;
56 int b_centre_present = 0;
57 int top_channels_present = 0;
58 int b_sf_multiplier = 0;
59 int sf_multiplier = 0;
60 int b_bitrate_info = 0;
61 int bitrate_indicator = 0;
64 int substream_index = 0;
70 int n_fullband_dmx_signals = 0;
71 int n_fullband_dmx_signals_minus1 = 0;
73 int b_dyn_objects_only = 0;
76 int b_ch_assign_code = 0;
77 int bed_chan_assign_code = 0;
78 int b_chan_assign_mask = 0;
79 int b_nonstd_bed_channel_assignment = 0;
80 int nonstd_bed_channel_assignment_mask = 0;
81 int std_bed_channel_assignment_mask = 0;
82 int n_bed_signals = 0;
83 int n_bed_signals_minus1 = 0;
84 int nonstd_bed_channel_assignment = 0;
85 int b_oamd_common_data_present = 0;
87 int n_fullband_upmix_signals_minus1 = 0;
88 int b_sf_multiplier = 0;
89 int sf_multiplier = 0;
90 int b_bitrate_info = 0;
91 int bitrate_indicator = 0;
93 int substream_index = 0;
97 int n_objects_code = 0;
98 int b_dynamic_objects = 0;
100 int b_bed_objects = 0;
102 int b_ch_assign_code = 0;
103 int bed_chan_assign_code = 0;
104 int b_nonstd_bed_channel_assignment = 0;
105 int nonstd_bed_channel_assignment_mask = 0;
106 int std_bed_channel_assignment_mask = 0;
110 int b_sf_multiplier = 0;
111 int sf_multiplier = 0;
112 int b_bitrate_info = 0;
113 int bitrate_indicator = 0;
114 int b_audio_ndot = 0;
115 int substream_index = 0;
119 int b_single_substream_group = 0;
120 int presentation_config = 0;
121 int presentation_version = 0;
123 int b_presentation_id = 0;
127 int b_presentation_filter = 0;
128 int b_enable_presentation = 0;
131 int group_index[16] = {0};
132 int n_substream_groups = 0;
133 int n_substream_groups_minus2 = 0;
134 int b_pre_virtualized = 0;
135 int b_add_emdf_substreams = 0;
136 int n_add_emdf_substreams = 0;
138 int b_alternative = 0;
140 int substream_index = 0;
145 int b_substreams_present = 0;
147 int b_single_substream = 0;
148 int n_lf_substreams = 0;
149 int n_lf_substreams_minus2 = 0;
150 int b_channel_coded = 0;
155 int b_oamd_substream = 0;
161 int b_content_type = 0;
162 int content_classifier = 0;
163 int b_language_indicator = 0;
164 int b_serialized_language_tag = 0;
166 int language_tag_chunk = 0;
167 int n_language_tag_bytes = 0;
168 int language_tag_bytes[64] = {0};
172 int bitstream_version;
173 int sequence_counter;
178 int frame_rate_index;
180 int b_single_presentation;
181 int b_more_presentations;
183 int payload_base_minus1;
185 int short_program_id;
186 int b_program_uuid_present;
189 int total_n_substream_groups;
197 virtual bool Parse(
const uint8_t* data,
size_t data_size);
198 int GetAc4TocSize() {
return toc_size; };
205 bool ParseAc4PresentationV1Info(
207 Ac4PresentationV1Info& ac4_presentation_v1_info,
208 int& max_group_index);
209 bool ParseFrameRateMultiplyInfo(
BitReader* reader);
210 bool ParseFrameRateFractionsInfo(
BitReader* reader);
212 bool ParseAc4PresentationSubstreamInfo(
BitReader* reader);
213 int ParseAc4SgiSpecifier(
BitReader* reader);
214 bool ParsePresentationConfigExtInfo(
BitReader* reader);
215 bool ParseAc4SubstreamGroupInfo(
217 Ac4SubstreamGroupInfo& ac4_substream_group_info,
218 int substream_group_index);
220 Ac4SubstreamGroupInfo& ac4_substream_group_info);
221 bool ParseOamdSubstreamInfo(
BitReader* reader,
222 Ac4SubstreamGroupInfo& ac4_substream_group_info);
223 bool ParseAc4HsfExtSubstreamInfo(
225 Ac4SubstreamGroupInfo& ac4_substream_group_info);
226 bool ParseAc4SubstreamInfoChan(
BitReader* reader,
227 int presentation_version,
229 int frame_rate_factor,
230 int b_substreams_present);
231 int ParseChannelMode(
BitReader* reader,
int presentation_version);
232 bool ParseAc4SubstreamInfoAjoc(
BitReader* reader,
234 int frame_rate_factor,
235 int b_substreams_present);
236 bool ParseBedDynObjAssignment(
BitReader* reader,
238 Ac4SubstreamInfoAjoc& ac4_substream_info_ajoc);
239 bool ParseOamdCommonData(
BitReader* reader);
240 bool ParseAc4SubstreamInfoObj(
BitReader* reader,
242 int frame_rate_factor,
243 int b_substreams_present);
244 int GetPresentationIdx(
int substream_group_index);
245 int GetPresentationVersion(
int substream_group_index);