FFmpeg
Loading...
Searching...
No Matches
sbcdsp_init.c
Go to the documentation of this file.
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 DSP optimization for some basic "building bricks"
30 */
31
33#include "libavutil/cpu.h"
34#include "libavutil/x86/cpu.h"
35#include "libavcodec/sbcdsp.h"
36
37void ff_sbc_analyze_4_sse2(const int16_t *in, int32_t *out, const int16_t *consts);
38void ff_sbc_analyze_8_sse2(const int16_t *in, int32_t *out, const int16_t *consts);
39void ff_sbc_calc_scalefactors_sse4(const int32_t sb_sample_f[16][2][8],
40 uint32_t scale_factor[2][8],
41 int blocks, int channels, int subbands);
42
43av_cold void ff_sbcdsp_init_x86(SBCDSPContext *s)
44{
46
48 s->sbc_analyze_4 = ff_sbc_analyze_4_sse2;
49 s->sbc_analyze_8 = ff_sbc_analyze_8_sse2;
50 }
52 s->sbc_calc_scalefactors = ff_sbc_calc_scalefactors_sse4;
53 }
54}
static FILE * out
channels
Definition aptx.h:31
subbands
Definition aptx.h:37
int32_t
#define s(width, name)
Definition cbs_vp9.c:198
Macro definitions for various function/variable attributes.
#define av_cold
Definition attributes.h:117
static atomic_int cpu_flags
Definition cpu.c:56
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
Definition cpu.c:109
#define EXTERNAL_SSE4(flags)
Definition cpu.h:62
#define EXTERNAL_SSE2(flags)
Definition cpu.h:53
SBC basic "building bricks".
av_cold void ff_sbcdsp_init_x86(SBCDSPContext *s)
Definition sbcdsp_init.c:43
void ff_sbc_calc_scalefactors_sse4(const int32_t sb_sample_f[16][2][8], uint32_t scale_factor[2][8], int blocks, int channels, int subbands)
void ff_sbc_analyze_4_sse2(const int16_t *in, int32_t *out, const int16_t *consts)
void ff_sbc_analyze_8_sse2(const int16_t *in, int32_t *out, const int16_t *consts)