diff options
| author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-04-24 20:19:05 +0000 |
|---|---|---|
| committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-04-24 20:19:05 +0000 |
| commit | a602f46d69d9d18756b7f317470f654f695faa80 (patch) | |
| tree | f111cc29197def94d5404d15c7febfd06efed9f7 /apps/codecs/libfaad/drm_dec.c | |
| parent | 69580a96eb816d9b811c542d38181126243d8563 (diff) | |
| download | rockbox-a602f46d69d9d18756b7f317470f654f695faa80.zip rockbox-a602f46d69d9d18756b7f317470f654f695faa80.tar.gz rockbox-a602f46d69d9d18756b7f317470f654f695faa80.tar.bz2 rockbox-a602f46d69d9d18756b7f317470f654f695faa80.tar.xz | |
Rework of libfaad in several areas. Allow removal of malloc with a new define FAAD_STATIC_ALLOC (in common.h). For now malloc is not fully removed but used by a few arrays needed for AAC-HE SBR+PS only. Reason to keep malloc is to have this amount of memory available for AAC-LC files which might require large m4a tables. The changes make the allocation routines much smaller, better centralized and allow to move duplicated code from aac.c/raa.c to libfaad. The rework includes removal of (now and former) unused code as well.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29778 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libfaad/drm_dec.c')
| -rw-r--r-- | apps/codecs/libfaad/drm_dec.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/apps/codecs/libfaad/drm_dec.c b/apps/codecs/libfaad/drm_dec.c index 0cf40df..f0b0f01 100644 --- a/apps/codecs/libfaad/drm_dec.c +++ b/apps/codecs/libfaad/drm_dec.c @@ -41,7 +41,7 @@ #define DECAY_CUTOFF 3 #define DECAY_SLOPE 0.05f -/* type definitaions */ +/* type definitions */ typedef const int8_t (*drm_ps_huff_tab)[2]; @@ -445,6 +445,8 @@ static const complex_t Phi_Fract_Qmf[] = { { FRAC_CONST(-0.7396311164), FRAC_CONST(0.6730124950) } }; +/* static variables */ +static drm_ps_info s_drm_ps_info; /* static function declarations */ static void drm_ps_sa_element(drm_ps_info *ps, bitfile *ld); @@ -915,18 +917,12 @@ static void drm_add_pan(drm_ps_info *ps, uint8_t rateselect, drm_ps_info *drm_ps_init(void) { - drm_ps_info *ps = (drm_ps_info*)faad_malloc(sizeof(drm_ps_info)); - + drm_ps_info *ps = &s_drm_ps_info; memset(ps, 0, sizeof(drm_ps_info)); return ps; } -void drm_ps_free(drm_ps_info *ps) -{ - faad_free(ps); -} - /* main DRM PS decoding function */ uint8_t drm_ps_decode(drm_ps_info *ps, uint8_t guess, uint32_t samplerate, qmf_t X_left[MAX_NTSRPS][64], |