Skip to content

Commit 4e952f3

Browse files
committed
Remove unused code
Signed-off-by: yilun.zhang <yilun.zhang@samsung.com>
1 parent 914ef54 commit 4e952f3

23 files changed

Lines changed: 7 additions & 1443 deletions

code/src/iamf_dec/iamf_decoder.c

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -763,61 +763,6 @@ static int iamf_decoder_priv_create_parser(iamf_decoder_t *self) {
763763
return self->parser ? IAMF_OK : IAMF_ERR_ALLOC_FAIL;
764764
}
765765

766-
static void iamf_decoder_priv_display_stream_info(iamf_stream_info_t *info) {
767-
if (!info) {
768-
error("Stream info is null");
769-
return;
770-
}
771-
772-
info("=== IAMF Stream Information ===");
773-
info("Max frame size: %u samples", info->max_frame_size);
774-
775-
// Display profile information
776-
info("Primary profile: %d", info->iamf_stream_info.primary_profile);
777-
info("Additional profile: %d", info->iamf_stream_info.additional_profile);
778-
779-
// Display codec information
780-
info("Codec ID 0: %d", info->iamf_stream_info.codec_ids[0]);
781-
info("Codec ID 1: %d", info->iamf_stream_info.codec_ids[1]);
782-
info("Sampling rate: %u Hz", info->iamf_stream_info.sampling_rate);
783-
info("Samples per channel in frame: %u",
784-
info->iamf_stream_info.samples_per_channel_in_frame);
785-
786-
// Display mix presentation information
787-
info("Mix presentation count: %u",
788-
info->iamf_stream_info.mix_presentation_count);
789-
790-
if (info->iamf_stream_info.mix_presentations) {
791-
for (uint32_t i = 0; i < info->iamf_stream_info.mix_presentation_count;
792-
++i) {
793-
iamf_mix_presentation_info_t *mix_presentation =
794-
&info->iamf_stream_info.mix_presentations[i];
795-
796-
info(" Mix Presentation[%u]:", i);
797-
info(" ID: %u", mix_presentation->id);
798-
info(" Number of audio elements: %u",
799-
mix_presentation->num_audio_elements);
800-
801-
if (mix_presentation->elements) {
802-
for (uint32_t j = 0; j < mix_presentation->num_audio_elements; ++j) {
803-
iamf_element_presentation_info_t *element =
804-
&mix_presentation->elements[j];
805-
info(" Element[%u]: ID=%u, Mode=%d, Profile=%d", j, element->eid,
806-
element->mode, element->profile);
807-
808-
if (element->gain_offset_range) {
809-
info(" Gain Offset Range: Min=%.2f dB, Max=%.2f dB",
810-
element->gain_offset_range->min,
811-
element->gain_offset_range->max);
812-
}
813-
}
814-
}
815-
}
816-
}
817-
818-
info("=== End of Stream Information ===");
819-
}
820-
821766
/* ----------------------------- APIs ----------------------------- */
822767

823768
IAMF_DecoderHandle IAMF_decoder_open(void) {
@@ -1416,9 +1361,6 @@ IAMF_StreamInfo *IAMF_decoder_get_stream_info(IAMF_DecoderHandle handle) {
14161361
}
14171362
}
14181363

1419-
// Display stream information for debugging
1420-
iamf_decoder_priv_display_stream_info(info);
1421-
14221364
return info;
14231365
}
14241366

code/src/iamf_dec/iamf_string.c

Lines changed: 0 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -171,16 +171,6 @@ const char* iamf_expanded_loudspeaker_layout_string(
171171
: "None";
172172
}
173173

174-
static const char* _g_layout_type_strings[] = {
175-
"Not Defined", "Reserved", "Loudspeakers SS Convention", "Binaural"};
176-
177-
const char* iamf_layout_type_string(iamf_layout_type_t type) {
178-
return type >= ck_iamf_layout_type_not_defined &&
179-
type <= ck_iamf_layout_type_binaural
180-
? _g_layout_type_strings[type]
181-
: "None";
182-
}
183-
184174
static const char* _g_channel_strings[] = {
185175
"none", "l7/l5/l", "r7/r5/r", "c", "lfe", "sl7/sl", "sr7/sr",
186176
"bl7/bl", "br7/br", "hfl", "hfr", "hbl", "hbr", "mono",
@@ -201,123 +191,3 @@ const char* iamf_layout_string(iamf_layout_t layout) {
201191
return "None";
202192
}
203193
}
204-
205-
static const char* _g_binaural_filter_profile_strings[] = {
206-
"Ambient", "Direct", "Reverberant", "Reserved"};
207-
208-
const char* iamf_binaural_filter_profile_string(
209-
IAMF_BinauralFilterProfile profile) {
210-
return profile >= BINAURAL_FILTER_PROFILE_AMBIENT &&
211-
profile <= BINAURAL_FILTER_PROFILE_RESERVED
212-
? _g_binaural_filter_profile_strings[profile]
213-
: "None";
214-
}
215-
216-
static const char* _g_headphones_rendering_mode_strings[] = {
217-
"World Locked Restricted", "World Locked", "Head Locked", "Reserved"};
218-
219-
const char* iamf_headphones_rendering_mode_string(
220-
IAMF_HeadphonesRenderingMode mode) {
221-
return mode >= HEADPHONES_RENDERING_MODE_WORLD_LOCKED_RESTRICTED &&
222-
mode <= HEADPHONES_RENDERING_MODE_RESERVED
223-
? _g_headphones_rendering_mode_strings[mode]
224-
: "None";
225-
}
226-
227-
static const char* _g_metadata_type_strings[] = {"Reserved",
228-
"ITU-T T.35",
229-
"IAMF Tags",
230-
"Reserved",
231-
"Unregistered User Private",
232-
"Reserved Future"};
233-
234-
const char* iamf_metadata_type_string(iamf_metadata_type_t type) {
235-
switch (type) {
236-
case ck_iamf_metadata_type_reserved_0:
237-
case ck_iamf_metadata_type_itut_t35:
238-
case ck_iamf_metadata_type_iamf_tags:
239-
return _g_metadata_type_strings[type];
240-
default:
241-
if (type >= ck_iamf_metadata_type_reserved_start &&
242-
type <= ck_iamf_metadata_type_reserved_end) {
243-
return _g_metadata_type_strings[3];
244-
} else if (type >=
245-
ck_iamf_metadata_type_unregistered_user_private_start &&
246-
type <= ck_iamf_metadata_type_unregistered_user_private_end) {
247-
return _g_metadata_type_strings[4];
248-
} else if (type >= ck_iamf_metadata_type_reserved_future_start) {
249-
return _g_metadata_type_strings[5];
250-
}
251-
return "Unknown";
252-
}
253-
}
254-
255-
static const char* _g_anchor_element_strings[] = {"Unknown", // 0
256-
"Dialogue", // 1
257-
"Album", // 2
258-
"Reserved for future use"};
259-
260-
const char* iamf_anchor_element_string(uint32_t anchor_element) {
261-
if (anchor_element > 2) anchor_element = 3;
262-
return _g_anchor_element_strings[anchor_element];
263-
}
264-
265-
const char* iamf_loudness_info_type_string(uint32_t type) {
266-
static char buffer[256];
267-
buffer[0] = '\0';
268-
269-
if (type == 0) return "None";
270-
271-
int len = 0;
272-
const char* separator = "";
273-
274-
if (type & def_loudness_info_type_true_peak) {
275-
len +=
276-
snprintf(buffer + len, sizeof(buffer) - len, "%sTrue Peak", separator);
277-
separator = " | ";
278-
}
279-
280-
if (type & def_loudness_info_type_anchored) {
281-
len +=
282-
snprintf(buffer + len, sizeof(buffer) - len, "%sAnchored", separator);
283-
separator = " | ";
284-
}
285-
286-
if (type & def_loudness_info_type_live) {
287-
len += snprintf(buffer + len, sizeof(buffer) - len, "%sLive", separator);
288-
separator = " | ";
289-
}
290-
291-
if (type & def_loudness_info_type_momentary) {
292-
len +=
293-
snprintf(buffer + len, sizeof(buffer) - len, "%sMomentary", separator);
294-
separator = " | ";
295-
}
296-
297-
if (type & def_loudness_info_type_range) {
298-
len += snprintf(buffer + len, sizeof(buffer) - len, "%sRange", separator);
299-
separator = " | ";
300-
}
301-
302-
if (type & ~def_loudness_info_type_all) {
303-
snprintf(buffer + len, sizeof(buffer) - len, "%sUnknown", separator);
304-
}
305-
306-
return buffer[0] ? buffer : "None";
307-
}
308-
309-
static const char* _g_animation_type_strings[] = {
310-
"Step", // ck_iamf_animation_type_step
311-
"Linear", // ck_iamf_animation_type_linear
312-
"Bezier", // ck_iamf_animation_type_bezier
313-
"Inter Linear", // ck_iamf_animation_type_inter_linear
314-
"Inter Bezier" // ck_iamf_animation_type_inter_bezier
315-
};
316-
317-
const char* iamf_animation_type_string(iamf_animation_type_t type) {
318-
int count = sizeof(_g_animation_type_strings) / sizeof(char*);
319-
if (type >= 0 && type < count) {
320-
return _g_animation_type_strings[type];
321-
}
322-
return "Unknown";
323-
}

code/src/iamf_dec/iamf_string.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,5 @@ const char *iamf_expanded_loudspeaker_layout_string(
3737
const char *iamf_layout_type_string(iamf_layout_type_t type);
3838
const char *iamf_layout_string(iamf_layout_t layout);
3939
const char *iamf_channel_name(iamf_channel_t ch);
40-
const char *iamf_binaural_filter_profile_string(
41-
IAMF_BinauralFilterProfile profile);
42-
const char *iamf_headphones_rendering_mode_string(
43-
IAMF_HeadphonesRenderingMode mode);
44-
const char *iamf_metadata_type_string(iamf_metadata_type_t type);
45-
const char *iamf_anchor_element_string(uint32_t anchor_element);
46-
const char *iamf_loudness_info_type_string(uint32_t type);
47-
const char *iamf_animation_type_string(iamf_animation_type_t type);
4840

4941
#endif //__IAMF_STRING_H__

0 commit comments

Comments
 (0)