3 * Bluetooth low-complexity, subband codec (SBC) library
5 * Copyright (C) 2004-2009 Marcel Holtmann <marcel@holtmann.org>
6 * Copyright (C) 2004-2005 Henryk Ploetz <henryk@ploetzli.ch>
7 * Copyright (C) 2005-2006 Brad Midgley <bmidgley@xmission.com>
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 #ifndef __SBC_PRIMITIVES_H
27 #define __SBC_PRIMITIVES_H
29 #define SCALE_OUT_BITS 15
31 struct sbc_encoder_state {
34 int16_t SBC_ALIGNED X[2][256];
35 /* Polyphase analysis filter for 4 subbands configuration,
36 it handles 4 blocks at once */
37 void (*sbc_analyze_4b_4s)(int16_t *pcm, int16_t *x,
38 int32_t *out, int out_stride);
39 /* Polyphase analysis filter for 8 subbands configuration,
40 it handles 4 blocks at once */
41 void (*sbc_analyze_4b_8s)(int16_t *pcm, int16_t *x,
42 int32_t *out, int out_stride);
46 * Initialize pointers to the functions which are the basic "building bricks"
47 * of SBC codec. Best implementation is selected based on target CPU
50 void sbc_init_primitives(struct sbc_encoder_state *encoder_state);