FFmpeg coverage


Directory: ../../../ffmpeg/
File: src/libavcodec/x86/sbcdsp_init.c
Date: 2024-11-20 23:03:26
Exec Total Coverage
Lines: 0 7 0.0%
Functions: 0 1 0.0%
Branches: 0 2 0.0%

Line Branch Exec Source
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 MMX optimization for some basic "building bricks"
30 */
31
32 #include "libavutil/attributes.h"
33 #include "libavutil/cpu.h"
34 #include "libavutil/x86/cpu.h"
35 #include "libavcodec/sbcdsp.h"
36
37 void ff_sbc_analyze_4_mmx(const int16_t *in, int32_t *out, const int16_t *consts);
38 void ff_sbc_analyze_8_mmx(const int16_t *in, int32_t *out, const int16_t *consts);
39 void ff_sbc_calc_scalefactors_mmx(int32_t sb_sample_f[16][2][8],
40 uint32_t scale_factor[2][8],
41 int blocks, int channels, int subbands);
42
43 av_cold void ff_sbcdsp_init_x86(SBCDSPContext *s)
44 {
45 int cpu_flags = av_get_cpu_flags();
46
47 if (EXTERNAL_MMX(cpu_flags)) {
48 s->sbc_analyze_4 = ff_sbc_analyze_4_mmx;
49 s->sbc_analyze_8 = ff_sbc_analyze_8_mmx;
50 s->sbc_calc_scalefactors = ff_sbc_calc_scalefactors_mmx;
51 }
52 }
53