1cabdff1aSopenharmony_ci/*
2cabdff1aSopenharmony_ci * Copyright (c) 2012 Mans Rullgard
3cabdff1aSopenharmony_ci *
4cabdff1aSopenharmony_ci * This file is part of FFmpeg.
5cabdff1aSopenharmony_ci *
6cabdff1aSopenharmony_ci * FFmpeg is free software; you can redistribute it and/or
7cabdff1aSopenharmony_ci * modify it under the terms of the GNU Lesser General Public
8cabdff1aSopenharmony_ci * License as published by the Free Software Foundation; either
9cabdff1aSopenharmony_ci * version 2.1 of the License, or (at your option) any later version.
10cabdff1aSopenharmony_ci *
11cabdff1aSopenharmony_ci * FFmpeg is distributed in the hope that it will be useful,
12cabdff1aSopenharmony_ci * but WITHOUT ANY WARRANTY; without even the implied warranty of
13cabdff1aSopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14cabdff1aSopenharmony_ci * Lesser General Public License for more details.
15cabdff1aSopenharmony_ci *
16cabdff1aSopenharmony_ci * You should have received a copy of the GNU Lesser General Public
17cabdff1aSopenharmony_ci * License along with FFmpeg; if not, write to the Free Software
18cabdff1aSopenharmony_ci * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19cabdff1aSopenharmony_ci */
20cabdff1aSopenharmony_ci
21cabdff1aSopenharmony_ci#ifndef AVCODEC_AACPSDSP_H
22cabdff1aSopenharmony_ci#define AVCODEC_AACPSDSP_H
23cabdff1aSopenharmony_ci
24cabdff1aSopenharmony_ci#include <stddef.h>
25cabdff1aSopenharmony_ci
26cabdff1aSopenharmony_ci#include "aac_defines.h"
27cabdff1aSopenharmony_ci
28cabdff1aSopenharmony_ci#define PS_QMF_TIME_SLOTS 32
29cabdff1aSopenharmony_ci#define PS_AP_LINKS 3
30cabdff1aSopenharmony_ci#define PS_MAX_AP_DELAY 5
31cabdff1aSopenharmony_ci
32cabdff1aSopenharmony_citypedef struct PSDSPContext {
33cabdff1aSopenharmony_ci    void (*add_squares)(INTFLOAT *dst, const INTFLOAT (*src)[2], int n);
34cabdff1aSopenharmony_ci    void (*mul_pair_single)(INTFLOAT (*dst)[2], INTFLOAT (*src0)[2], INTFLOAT *src1,
35cabdff1aSopenharmony_ci                            int n);
36cabdff1aSopenharmony_ci    void (*hybrid_analysis)(INTFLOAT (*out)[2], INTFLOAT (*in)[2],
37cabdff1aSopenharmony_ci                            const INTFLOAT (*filter)[8][2],
38cabdff1aSopenharmony_ci                            ptrdiff_t stride, int n);
39cabdff1aSopenharmony_ci    void (*hybrid_analysis_ileave)(INTFLOAT (*out)[32][2], INTFLOAT L[2][38][64],
40cabdff1aSopenharmony_ci                                   int i, int len);
41cabdff1aSopenharmony_ci    void (*hybrid_synthesis_deint)(INTFLOAT out[2][38][64], INTFLOAT (*in)[32][2],
42cabdff1aSopenharmony_ci                                   int i, int len);
43cabdff1aSopenharmony_ci    void (*decorrelate)(INTFLOAT (*out)[2], INTFLOAT (*delay)[2],
44cabdff1aSopenharmony_ci                        INTFLOAT (*ap_delay)[PS_QMF_TIME_SLOTS+PS_MAX_AP_DELAY][2],
45cabdff1aSopenharmony_ci                        const INTFLOAT phi_fract[2], const INTFLOAT (*Q_fract)[2],
46cabdff1aSopenharmony_ci                        const INTFLOAT *transient_gain,
47cabdff1aSopenharmony_ci                        INTFLOAT g_decay_slope,
48cabdff1aSopenharmony_ci                        int len);
49cabdff1aSopenharmony_ci    void (*stereo_interpolate[2])(INTFLOAT (*l)[2], INTFLOAT (*r)[2],
50cabdff1aSopenharmony_ci                                  INTFLOAT h[2][4], INTFLOAT h_step[2][4],
51cabdff1aSopenharmony_ci                                  int len);
52cabdff1aSopenharmony_ci} PSDSPContext;
53cabdff1aSopenharmony_ci
54cabdff1aSopenharmony_civoid AAC_RENAME(ff_psdsp_init)(PSDSPContext *s);
55cabdff1aSopenharmony_civoid ff_psdsp_init_arm(PSDSPContext *s);
56cabdff1aSopenharmony_civoid ff_psdsp_init_aarch64(PSDSPContext *s);
57cabdff1aSopenharmony_civoid ff_psdsp_init_mips(PSDSPContext *s);
58cabdff1aSopenharmony_civoid ff_psdsp_init_x86(PSDSPContext *s);
59cabdff1aSopenharmony_ci
60cabdff1aSopenharmony_ci#endif /* AVCODEC_AACPSDSP_H */
61