diff options
author | Roman Artiukhin <bahusdrive@gmail.com> | 2024-02-04 15:53:58 +0200 |
---|---|---|
committer | Roman Artiukhin <bahusdrive@gmail.com> | 2024-09-25 14:01:57 +0300 |
commit | ef6da7503ac7bd7ffc940fbe17c6c3b92532dee6 (patch) | |
tree | 1770f882c05628c1f30d604446ca6fa614152da9 | |
parent | 9af325a541ecbf430624ed3bdee95fa88a55078e (diff) | |
download | rockbox-ef6da7503a.tar.gz rockbox-ef6da7503a.zip |
Codecs: mp4: Support object type 29 (AAC LC + SBR + PS).
Backport libfaad commit https://github.com/knik0/faad2/commit/d35cf8f24d55112451074424f8896e695ce9ee6b
Change-Id: I0d637d2be36f5e4bb10d7d09adc442b470e81bf7
-rw-r--r-- | lib/rbcodec/codecs/libfaad/mp4.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/rbcodec/codecs/libfaad/mp4.c b/lib/rbcodec/codecs/libfaad/mp4.c index 94e1a1daaa..43a4d8da4c 100644 --- a/lib/rbcodec/codecs/libfaad/mp4.c +++ b/lib/rbcodec/codecs/libfaad/mp4.c @@ -113,7 +113,11 @@ static uint8_t ObjectTypesTable[32] = { 0, /* 27 ER Parametric */ #endif 0, /* 28 (Reserved) */ - 0, /* 29 (Reserved) */ +#ifdef PS_DEC + 1, /* 29 AAC LC + SBR + PS */ +#else + 0, /* 29 AAC LC + SBR + PS */ +#endif 0, /* 30 (Reserved) */ 0 /* 31 (Reserved) */ }; @@ -188,7 +192,7 @@ int8_t AudioSpecificConfig2(uint8_t *pBuffer, #ifdef SBR_DEC mp4ASC->sbr_present_flag = -1; - if (mp4ASC->objectTypeIndex == 5) + if (mp4ASC->objectTypeIndex == 5 || mp4ASC->objectTypeIndex == 29) { uint8_t tmp; @@ -242,7 +246,7 @@ int8_t AudioSpecificConfig2(uint8_t *pBuffer, #ifdef SBR_DEC bits_to_decode = (int8_t)(buffer_size*8 - faad_get_processed_bits(&ld)); - if ((mp4ASC->objectTypeIndex != 5) && (bits_to_decode >= 16)) + if ((mp4ASC->objectTypeIndex != 5 && mp4ASC->objectTypeIndex != 29) && (bits_to_decode >= 16)) { int16_t syncExtensionType = (int16_t)faad_getbits(&ld, 11 DEBUGVAR(1,9,"parse_audio_decoder_specific_info(): syncExtensionType")); |