1 /*
2 * Bluetooth low-complexity, subband codec (SBC)
3 *
4 * Copyright (C) 2017 Aurelien Jacobs <aurel@gnuage.org>
5 * Copyright (C) 2008-2010 Nokia Corporation
6 * Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
7 * Copyright (C) 2004-2005 Henryk Ploetz <henryk@ploetzli.ch>
8 * Copyright (C) 2005-2006 Brad Midgley <bmidgley@xmission.com>
9 *
10 * This file is part of FFmpeg.
11 *
12 * FFmpeg is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation; either
15 * version 2.1 of the License, or (at your option) any later version.
16 *
17 * FFmpeg is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
21 *
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with FFmpeg; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25 */
26
27 /**
28 * @file
29 * SBC basic "building bricks"
30 */
31
32 #ifndef AVCODEC_SBCDSP_H
33 #define AVCODEC_SBCDSP_H
34
36
39
40 #define SCALE_OUT_BITS 15
41 #define SBC_X_BUFFER_SIZE 328
42
44
47 /* Number of consecutive blocks handled by the encoder */
52 /* Polyphase analysis filter for 4 subbands configuration,
53 * it handles "increment" blocks at once */
56 /* Polyphase analysis filter for 8 subbands configuration,
57 * it handles "increment" blocks at once */
60 /* Process input data (deinterleave, endian conversion, reordering),
61 * depending on the number of subbands and input data byte order */
64 int nsamples, int nchannels);
67 int nsamples, int nchannels);
68 /* Scale factors calculation */
70 uint32_t scale_factor[2][8],
72 /* Scale factors calculation with joint stereo support */
74 uint32_t scale_factor[2][8],
76 };
77
78 /*
79 * Initialize pointers to the functions which are the basic "building bricks"
80 * of SBC codec. Best implementation is selected based on target CPU
81 * capabilities.
82 */
84
87
88 #endif /* AVCODEC_SBCDSP_H */