Skip to content

Commit

Permalink
deactivate PS ans SBR for ESP32
Browse files Browse the repository at this point in the history
ESP32 is too slow
  • Loading branch information
schreibfaul1 committed Sep 21, 2024
1 parent cb1b96e commit 75485f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
14 changes: 2 additions & 12 deletions src/aac_decoder/libfaad/neaacdec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7956,12 +7956,7 @@ void raw_data_block(NeAACDecStruct* hDecoder, NeAACDecFrameInfo* hInfo, bitfile*
/* one sbr_info describes a channel_element not a channel! */
/* if we encounter SBR data here: error */
/* SBR data will be read directly in the SCE/LFE/CPE element */
if ((hInfo->error = fill_element(hDecoder, ld, drc
#ifdef SBR_DEC
,
INVALID_SBR_ELEMENT
#endif
)) > 0)
if ((hInfo->error = fill_element(hDecoder, ld, drc, INVALID_SBR_ELEMENT)) > 0)
return;
break;
}
Expand Down Expand Up @@ -8343,12 +8338,7 @@ uint16_t data_stream_element(NeAACDecStruct* hDecoder, bitfile* ld) {
}
//——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
/* Table 4.4.11 */
uint8_t fill_element(NeAACDecStruct* hDecoder, bitfile* ld, drc_info* drc
#ifdef SBR_DEC
,
uint8_t sbr_ele
#endif
) {
uint8_t fill_element(NeAACDecStruct* hDecoder, bitfile* ld, drc_info* drc, uint8_t sbr_ele) {
uint16_t count;
#ifdef SBR_DEC
uint8_t bs_extension_type;
Expand Down
10 changes: 8 additions & 2 deletions src/aac_decoder/libfaad/neaacdec.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through [email protected].
**/

// ESP32 Version 29.07.1961
// updated: 21.09.2024

#pragma once
#include <stddef.h>
#include <stdlib.h>
Expand All @@ -38,9 +42,11 @@
#define LTP_DEC // Allow decoding of LTP (Long Term Prediction) profile AAC
#define LD_DEC // Allow decoding of LD (Low Delay) profile AAC
// #define DRM_SUPPORT // Allow decoding of Digital Radio Mondiale (DRM)
#define SBR_DEC // Allow decoding of SBR (Spectral Band Replication) profile AAC
#if (defined CONFIG_IDF_TARGET_ESP32S3 && defined BOARD_HAS_PSRAM)
#define SBR_DEC // Allow decoding of SBR (Spectral Band Replication) profile AAC
#define PS_DEC // Allow decoding of PS (Parametric Stereo) profile AAC
#endif
// #define SBR_LOW_POWER
#define PS_DEC // Allow decoding of PS (Parametric Stereo) profile AAC
#define ALLOW_SMALL_FRAMELENGTH
// #define LC_ONLY_DECODER // if you want a pure AAC LC decoder (independant of SBR_DEC and PS_DEC)
//——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
Expand Down

0 comments on commit 75485f8

Please sign in to comment.