From f40bfc9267b13b54e6379dfe7539447662879d24 Mon Sep 17 00:00:00 2001 From: Sean Bartell Date: Sat, 25 Jun 2011 21:32:25 -0400 Subject: Add codecs to librbcodec. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id7f4717d51ed02d67cb9f9cb3c0ada4a81843f97 Reviewed-on: http://gerrit.rockbox.org/137 Reviewed-by: Nils Wallménius Tested-by: Nils Wallménius --- lib/rbcodec/codecs/libatrac/atrac3.h | 114 +++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 lib/rbcodec/codecs/libatrac/atrac3.h (limited to 'lib/rbcodec/codecs/libatrac/atrac3.h') diff --git a/lib/rbcodec/codecs/libatrac/atrac3.h b/lib/rbcodec/codecs/libatrac/atrac3.h new file mode 100644 index 0000000000..64086b6411 --- /dev/null +++ b/lib/rbcodec/codecs/libatrac/atrac3.h @@ -0,0 +1,114 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2009 Mohamed Tarek + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + +#include "ffmpeg_get_bits.h" +#include "../librm/rm.h" +#include "codeclib.h" + +#if (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024) || \ + (CONFIG_CPU == MCF5250) || defined(CPU_S5L870X) +/* PP5022/24, MCF5250 and S5L870x have larger IRAM */ +#define IBSS_ATTR_LARGE_IRAM IBSS_ATTR +#define ICODE_ATTR_LARGE_IRAM ICODE_ATTR +#define ICONST_ATTR_LARGE_IRAM ICONST_ATTR +#else +/* other CPUs IRAM is not large enough */ +#define IBSS_ATTR_LARGE_IRAM +#define ICODE_ATTR_LARGE_IRAM +#define ICONST_ATTR_LARGE_IRAM +#endif + +/* These structures are needed to store the parsed gain control data. */ +typedef struct { + int num_gain_data; + int levcode[8]; + int loccode[8]; +} gain_info; + +typedef struct { + gain_info gBlock[4]; +} gain_block; + +typedef struct { + int pos; + int numCoefs; + int32_t coef[8]; +} tonal_component; + +typedef struct { + int bandsCoded; + int numComponents; + tonal_component components[64]; + int32_t *prevFrame; + int gcBlkSwitch; + gain_block gainBlock[2]; + + int32_t *spectrum; + int32_t *IMDCT_buf; + + int32_t delayBuf1[46] MEM_ALIGN_ATTR; ///