Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions code/include/IAMF_decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ int IAMF_layout_sound_system_channels_count(IAMF_SoundSystem ss);
* @brief Get the number of channels of binaural pattern.
* @return the number of channels.
*/
int IAMF_layout_binaural_channels_count();
int IAMF_layout_binaural_channels_count(void);

/**
* @brief Get the codec capability of iamf. Need to free string manually.
Expand All @@ -129,7 +129,7 @@ int IAMF_layout_binaural_channels_count();
* is three digits to indicate the value of the additional_profile.
* @return the supported codec string.
*/
char *IAMF_decoder_get_codec_capability();
char *IAMF_decoder_get_codec_capability(void);

/**
* @brief Set target normalization loudness value, then loudness will be
Expand Down
12 changes: 12 additions & 0 deletions code/include/IAMF_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ typedef enum IAMF_AnimationType {
ANIMATION_TYPE_LINEAR,
ANIMATION_TYPE_BEZIER
} IAMF_AnimationType;

/**
* Layout Syntax:
*
Expand Down Expand Up @@ -130,6 +131,12 @@ typedef struct IAMF_Layout {
* signed int (16) anchored_loudness;
* }
* }
*
* if (info_type & 0b11111100 > 0) {
* leb128() info_type_size;
* unsigned int (8 x info_type_size) info_type_bytes;
* }
*
* }
*
* */
Expand All @@ -143,9 +150,14 @@ typedef struct IAMF_LoudnessInfo {
uint8_t info_type;
int16_t integrated_loudness;
int16_t digital_peak;

int16_t true_peak;

uint8_t num_anchor_loudness;
anchor_loudness_t *anchor_loudness;

uint64_t info_type_size;
uint8_t *info_type_bytes;
} IAMF_LoudnessInfo;

/**
Expand Down
12 changes: 8 additions & 4 deletions code/src/iamf_dec/IAMF_OBU.c
Original file line number Diff line number Diff line change
Expand Up @@ -967,8 +967,10 @@ IAMF_MixPresentation *iamf_mix_presentation_new(IAMF_OBU *obu) {
}

if (loudness[i].info_type & ~LOUDNESS_INFO_TYPE_ALL) {
size = bs_getAleb128(&b);
bs_skipABytes(&b, size);
loudness[i].info_type_size = bs_getAleb128(&b);
loudness[i].info_type_bytes =
IAMF_MALLOC(uint8_t, loudness[i].info_type_size);
bs_read(&b, loudness[i].info_type_bytes, loudness[i].info_type_size);
ia_logd("extension loudness info size %" PRIu64, size);
}
}
Expand Down Expand Up @@ -1049,10 +1051,12 @@ void iamf_mix_presentation_free(IAMF_MixPresentation *obj) {
}

if (sub->loudness) {
for (int i = 0; i < sub->num_layouts; ++i)
for (int i = 0; i < sub->num_layouts; ++i) {
IAMF_FREE(sub->loudness[i].anchor_loudness);
IAMF_FREE(sub->loudness[i].info_type_bytes);
}
free(sub->loudness);
}
IAMF_FREE(sub->loudness);
}

free(obj->sub_mixes);
Expand Down
Loading