chromium/third_party/ffmpeg/libavcodec/x86/mpegaudiodsp.c

/*
 * SIMD-optimized MP3 decoding functions
 * Copyright (c) 2010 Vitor Sessak
 *
 * This file is part of FFmpeg.
 *
 * FFmpeg is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * FFmpeg is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with FFmpeg; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 */

#include <stddef.h>

#include "config.h"
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/mem_internal.h"
#include "libavutil/x86/asm.h"
#include "libavutil/x86/cpu.h"
#include "libavcodec/mpegaudiodsp.h"

#define DECL(CPU)

#if HAVE_X86ASM
DECL(sse2)
DECL(sse3)
DECL(ssse3)
DECL(avx)
#endif /* HAVE_X86ASM */

void ff_four_imdct36_float_sse(float *out, float *buf, float *in, float *win,
                               float *tmpbuf);
void ff_four_imdct36_float_avx(float *out, float *buf, float *in, float *win,
                               float *tmpbuf);

void ff_dct32_float_sse2(float *out, const float *in);
void ff_dct32_float_avx (float *out, const float *in);

DECLARE_ALIGNED(16, static float, mdct_win_sse)[2][4][4*40];

#if HAVE_6REGS && HAVE_SSE_INLINE

#define MACS(rt, ra, rb)
#define MLSS(rt, ra, rb)

#define SUM8(op, sum, w, p)

static void apply_window(const float *buf, const float *win1,
                         const float *win2, float *sum1, float *sum2, int len)
{}

static void apply_window_mp3(float *in, float *win, int *unused, float *out,
                             ptrdiff_t incr)
{}

#endif /* HAVE_6REGS && HAVE_SSE_INLINE */

#if HAVE_X86ASM
#define DECL_IMDCT_BLOCKS(CPU1, CPU2)

#if HAVE_SSE
DECL_IMDCT_BLOCKS()
DECL_IMDCT_BLOCKS()
DECL_IMDCT_BLOCKS()
#endif
#if HAVE_AVX_EXTERNAL
DECL_IMDCT_BLOCKS()
#endif
#endif /* HAVE_X86ASM */

av_cold void ff_mpadsp_init_x86_tabs(void)
{}

av_cold void ff_mpadsp_init_x86(MPADSPContext *s)
{}