chromium/third_party/ffmpeg/libavcodec/mpegaudiodsp_template.c

/*
 * Copyright (c) 2001, 2002 Fabrice Bellard
 *
 * 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 <stdint.h>

#include "libavutil/attributes.h"
#include "libavutil/mem_internal.h"
#include "libavutil/thread.h"

#include "dct32.h"
#include "mathops.h"
#include "mpegaudiodsp.h"
#include "mpegaudio.h"

#if USE_FLOATS
#define RENAME

static inline float round_sample(float *sum)
{
    float sum1=*sum;
    *sum = 0;
    return sum1;
}

#define MACS
#define MULS
#define MULH3
#define MLSS
#define MULLx
#define FIXHR
#define FIXR
#define SHR

#else

#define RENAME(n)
#define OUT_SHIFT

static inline int round_sample(int64_t *sum)
{}

#define MULS(ra, rb)
#define MACS(rt, ra, rb)
#define MLSS(rt, ra, rb)
#define MULH3(x, y, s)
#define MULLx(x, y, s)
#define SHR(a,b)
#define FIXR(a)
#define FIXHR(a)
#endif

/** Window for MDCT. Actually only the elements in [0,17] and
    [MDCT_BUF_SIZE/2, MDCT_BUF_SIZE/2 + 17] are actually used. The rest
    is just to preserve alignment for SIMD implementations.
*/
DECLARE_ALIGNED(16, INTFLOAT, RENAME(ff_mdct_win))[8][MDCT_BUF_SIZE];

DECLARE_ALIGNED(16, MPA_INT, RENAME(ff_mpa_synth_window))[512+256];

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

#define SUM8P2(sum1, op1, sum2, op2, w1, w2, p)

void RENAME(ff_mpadsp_apply_window)(MPA_INT *synth_buf, MPA_INT *window,
                                  int *dither_state, OUT_INT *samples,
                                  ptrdiff_t incr)
{}

/* 32 sub band synthesis filter. Input: 32 sub band samples, Output:
   32 samples. */
void RENAME(ff_mpa_synth_filter)(MPADSPContext *s, MPA_INT *synth_buf_ptr,
                                 int *synth_buf_offset,
                                 MPA_INT *window, int *dither_state,
                                 OUT_INT *samples, ptrdiff_t incr,
                                 MPA_INT *sb_samples)
{}

static av_cold void mpa_synth_init(MPA_INT *window)
{}

static av_cold void mpa_synth_window_init(void)
{}

av_cold void RENAME(ff_mpa_synth_init)(void)
{}

/* cos(pi*i/18) */
#define C1
#define C2
#define C3
#define C4
#define C5
#define C6
#define C7
#define C8

/* 0.5 / cos(pi*(2*i+1)/36) */
static const INTFLOAT icos36[9] =;

/* 0.5 / cos(pi*(2*i+1)/36) */
static const INTFLOAT icos36h[9] =;

/* using Lee like decomposition followed by hand coded 9 points DCT */
static void imdct36(INTFLOAT *out, INTFLOAT *buf, SUINTFLOAT *in, INTFLOAT *win)
{}

void RENAME(ff_imdct36_blocks)(INTFLOAT *out, INTFLOAT *buf, INTFLOAT *in,
                               int count, int switch_point, int block_type)
{}