FFmpeg
aacencdsp_init.c
Go to the documentation of this file.
1 /*
2  * AAC encoder assembly optimizations
3  * Copyright (c) 2023 Institue 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 
24 #include "libavutil/attributes.h"
25 #include "libavutil/cpu.h"
26 #include "libavcodec/aacencdsp.h"
27 
28 void ff_abs_pow34_rvv(float *out, const float *in, const int size);
29 void 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 
37  if (flags & AV_CPU_FLAG_RVV_F32) {
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 }
out
FILE * out
Definition: movenc.c:55
AACEncDSPContext
Definition: aacencdsp.h:28
av_get_cpu_flags
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
Definition: cpu.c:109
AV_CPU_FLAG_RVB
#define AV_CPU_FLAG_RVB
B (bit manipulations)
Definition: cpu.h:102
ff_abs_pow34_rvv
void ff_abs_pow34_rvv(float *out, const float *in, const int size)
AV_CPU_FLAG_RVV_F32
#define AV_CPU_FLAG_RVV_F32
Vectors of float's *‍/.
Definition: cpu.h:93
av_cold
#define av_cold
Definition: attributes.h:90
s
#define s(width, name)
Definition: cbs_vp9.c:198
ff_aacenc_dsp_init_riscv
av_cold void ff_aacenc_dsp_init_riscv(AACEncDSPContext *s)
Definition: aacencdsp_init.c:32
cpu.h
size
int size
Definition: twinvq_data.h:10344
attributes.h
ff_aac_quant_bands_rvv
void ff_aac_quant_bands_rvv(int *, const float *, const float *, int, int, int, const float, const float)
aacencdsp.h
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:482