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_arm.S | 172 +++++++++++++++++++++++++++++++ 1 file changed, 172 insertions(+) create mode 100644 lib/rbcodec/codecs/libatrac/atrac3_arm.S (limited to 'lib/rbcodec/codecs/libatrac/atrac3_arm.S') diff --git a/lib/rbcodec/codecs/libatrac/atrac3_arm.S b/lib/rbcodec/codecs/libatrac/atrac3_arm.S new file mode 100644 index 0000000000..68f8de2c4e --- /dev/null +++ b/lib/rbcodec/codecs/libatrac/atrac3_arm.S @@ -0,0 +1,172 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id: + * + * Copyright (C) 2009 by Andree Buschmann + * + * 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 "config.h" + + .section .text, "ax", %progbits + +/**************************************************************************** + * void atrac3_iqmf_matrixing(int32_t *dest, + * int32_t *inlo, + * int32_t *inhi, + * unsigned int count); + * + * Matrixing step within iqmf of atrac3 synthesis. Reference implementation: + * + * for(i=0; i>31 || hi<<1 */ + mov r12, r12, lsr #31 + orr r8, r12, r8, lsl #1 /* s2 = low>>31 || hi<<1 */ + + stmia r0!, {r8, r9} /* store result out[0]=s2, out[1]=s1 */ + sub r1, r1, #184 /* roll back 64 entries = 184 bytes */ + sub r2, r2, #192 /* roll back 48 entries = 192 bytes = win[0] */ + + subs r3, r3, #1 /* outer loop -= 1 */ + bgt .iqmf_dewindow_outer_loop + + ldmpc regs=r4-r9 /* restore registers */ + +.atrac3_iqmf_dewindowing_end: + .size atrac3_iqmf_dewindowing,.atrac3_iqmf_dewindowing_end-atrac3_iqmf_dewindowing -- cgit v1.2.3