FFmpeg
Loading...
Searching...
No Matches
aacencdsp_init.c
Go to the documentation of this file.
1/*
2 * AAC encoder assembly optimizations
3 * Copyright (c) 2023 Institute of Software Chinese Academy of Sciences (ISCAS).
4 *
5 * This file is part of FFmpeg.
6 *
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22#include "config.h"
23
25#include "libavutil/cpu.h"
27
28void ff_abs_pow34_rvv(float *out, const float *in, const int size);
29void ff_aac_quant_bands_rvv(int *, const float *, const float *, int, int,
30 int, const float, const float);
31
33{
34#if HAVE_RVV
35 int flags = av_get_cpu_flags();
36
38 if (flags & AV_CPU_FLAG_RVB) {
39 s->abs_pow34 = ff_abs_pow34_rvv;
40 s->quant_bands = ff_aac_quant_bands_rvv;
41 }
42 }
43#endif
44}
static FILE * out
#define flags(name, subs,...)
Definition cbs_h264.c:74
#define s(width, name)
Definition cbs_vp9.c:198
Macro definitions for various function/variable attributes.
#define av_cold
Definition attributes.h:117
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
Definition cpu.c:109
#define AV_CPU_FLAG_RVB
B (bit manipulations)
Definition cpu.h:104
#define AV_CPU_FLAG_RVV_F32
Vectors of float's *‍/.
Definition cpu.h:98
void ff_abs_pow34_rvv(float *out, const float *in, const int size)
av_cold void ff_aacenc_dsp_init_riscv(AACEncDSPContext *s)
void ff_aac_quant_bands_rvv(int *, const float *, const float *, int, int, int, const float, const float)
int size