Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[V1.0] 1,Verify opus version and iamf code validity 2, fix aac specific information parsing 3, vlogging changing(info_type->info_type_bit_masks) #118

Merged
merged 22 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
39ddacd
iamf v1.0 decoder enhance for future extension
yilun-zhangs Jun 28, 2024
b93cf43
Merge branch 'AOMediaCodec:main' into main
yilun-zhangs Jul 2, 2024
067a207
1, Add more profile limitation. 2, fix some bugs in h2m
yilun-zhangs Jul 4, 2024
6f9c879
Check the rule of ambisonics channels
yilun-zhangs Jul 9, 2024
12cd7a9
Add more comments about normalization loudness
yilun-zhangs Jul 10, 2024
4e15116
Update readme
yilun-zhangs Jul 10, 2024
2ff5479
Modify license comments
yilun-zhangs Jul 10, 2024
b80777b
1,fix bug for invalid mapping value in amb mono. 2,skip invalid layou…
yilun-zhangs Jul 15, 2024
5dcb9c2
Update UTC time getting method
yilun-zhangs Jul 17, 2024
ad15422
Update error and warning logs for verification
yilun-zhangs Jul 18, 2024
aa0a3d1
1. Explicitly configure failure scenarios. 2. Change log level
yilun-zhangs Jul 24, 2024
a58b842
add missing file
yilun-zhangs Jul 25, 2024
113d755
add missing file
yilun-zhangs Jul 25, 2024
6ca47c2
Update iamf2bear api typo
yilun-zhangs Jul 25, 2024
129d2ce
Merge branch 'main' of https://github.com/yilun-zhangs/libiamf into main
yilun-zhangs Aug 5, 2024
e57d65c
Verify opus version and iamf code validity
yilun-zhangs Aug 5, 2024
ae5a2d0
Remove unused code
yilun-zhangs Aug 8, 2024
3239cdc
Merge branch 'AOMediaCodec:main' into main
yilun-zhangs Aug 9, 2024
f4dad69
fix DecoderConfigDescriptor parsing
yilun-zhangs Aug 9, 2024
d5d2671
Add log after _valid_decoder_config()
yilun-zhangs Aug 14, 2024
cb0b69d
fix comments
yilun-zhangs Aug 20, 2024
269b32f
Update HOA to 3.1.2 precomputed gains
yilun-zhangs Aug 21, 2024
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
14 changes: 0 additions & 14 deletions code/src/common/audio_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,6 @@
#define LIMITER_ReleaseSec 0.200f
#define LIMITER_LookAhead 240

typedef enum {
CHANNELUNKNOWN = 0,
CHANNELMONO,
CHANNELSTEREO,
CHANNEL51,
CHANNEL512,
CHANNEL514,
CHANNEL71,
CHANNEL712,
CHANNEL714,
CHANNEL312,
CHANNELBINAURAL
} channelLayout;

#define MAX_CHANNELS 12
#define MAX_OUTPUT_CHANNELS 24
#define MAX_DELAYSIZE 4096
Expand Down
26 changes: 26 additions & 0 deletions code/src/iamf_dec/IAMF_OBU.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ static int _valid_profile(uint8_t primary, uint8_t addional) {
IAMF_Version *iamf_version_new(IAMF_OBU *obu) {
IAMF_Version *ver = 0;
BitStream b;
union {
uint32_t _id;
uint8_t _4cc[4];
} code = {._4cc = {'i', 'a', 'm', 'f'}};

ver = IAMF_MALLOCZ(IAMF_Version, 1);
if (!ver) {
Expand All @@ -273,6 +277,12 @@ IAMF_Version *iamf_version_new(IAMF_OBU *obu) {
"%u.",
(char *)&ver->iamf_code, ver->primary_profile, ver->additional_profile);

if (ver->iamf_code != code._id) {
ia_loge("ia sequence header object: Invalid iamf code %.4s.",
(char *)&ver->iamf_code);
goto version_fail;
}

if (!_valid_profile(ver->primary_profile, ver->additional_profile)) {
ia_loge(
"ia sequence header object: Invalid primary profile %u or additional "
Expand All @@ -296,6 +306,18 @@ static int _valid_codec(uint32_t codec) {
return iamf_codec_check(iamf_codec_4cc_get_codecID(codec));
}

#define OPUS_VERSION_MAX 15
static int _valid_decoder_conifg(uint32_t codec, uint8_t *conf, size_t size) {
if (iamf_codec_4cc_get_codecID(codec) == IAMF_CODEC_OPUS) {
if (conf[0] > OPUS_VERSION_MAX) {
ia_logw("opus config invalid: version %u should less than %u.", conf[0],
OPUS_VERSION_MAX);
return 0;
}
}
return 1;
}

IAMF_CodecConf *iamf_codec_conf_new(IAMF_OBU *obu) {
IAMF_CodecConf *conf = 0;
BitStream b;
Expand Down Expand Up @@ -335,6 +357,10 @@ IAMF_CodecConf *iamf_codec_conf_new(IAMF_OBU *obu) {
goto codec_conf_fail;
}

if (!_valid_decoder_conifg(conf->codec_id, conf->decoder_conf,
conf->decoder_conf_size))
goto codec_conf_fail;

#if SUPPORT_VERIFIER
vlog_obu(IAMF_OBU_CODEC_CONFIG, conf, 0, 0);
#endif
Expand Down