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 
31 {
32 #if HAVE_RVV
33  int flags = av_get_cpu_flags();
34 
35  if (flags & AV_CPU_FLAG_RVV_F32) {
37  s->abs_pow34 = ff_abs_pow34_rvv;
38  }
39  }
40 #endif
41 }
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:103
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:88
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:30
AV_CPU_FLAG_RVB_ADDR
#define AV_CPU_FLAG_RVB_ADDR
Address bit-manipulations.
Definition: cpu.h:92
cpu.h
size
int size
Definition: twinvq_data.h:10344
attributes.h
aacencdsp.h
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:474