FFmpeg
Loading...
Searching...
No Matches
lls_init.c
Go to the documentation of this file.
1/*
2 * Copyright © 2024 Rémi Denis-Courmont.
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#include <assert.h>
22#include <stdint.h>
23
24#include "config.h"
26#include "libavutil/cpu.h"
27#include "libavutil/riscv/cpu.h"
28#include "libavutil/lls.h"
29
30void ff_lls_update_covariance_rvv(double covar[][36], const double *var,
31 int count);
32double ff_scalarproduct_double_rvv(const double *, const double *, size_t);
33
34static void ff_lls_update_rvv(struct LLSModel *m, const double *var)
35{
37}
38
39static double ff_lls_evaluate_rvv(struct LLSModel *m, const double *var,
40 int order)
41{
42 return ff_scalarproduct_double_rvv(m->coeff[order], var, order + 1);
43}
44
46{
47#if HAVE_RVV
48 int flags = av_get_cpu_flags();
49
51 if (ff_get_rv_vlenb() > m->indep_count)
54 }
55#endif
56}
#define flags(name, subs,...)
Definition cbs_h264.c:74
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_F64
Vectors of double's.
Definition cpu.h:100
static double ff_lls_evaluate_rvv(struct LLSModel *m, const double *var, int order)
Definition lls_init.c:39
double ff_scalarproduct_double_rvv(const double *, const double *, size_t)
static void ff_lls_update_rvv(struct LLSModel *m, const double *var)
Definition lls_init.c:34
void ff_lls_update_covariance_rvv(double covar[][36], const double *var, int count)
av_cold void ff_init_lls_riscv(LLSModel *m)
Definition lls_init.c:45
Linear least squares model.
Definition lls.h:37
void(* update_lls)(struct LLSModel *m, const double *var)
Take the outer-product of var[] with itself, and add to the covariance matrix.
Definition lls.h:49
double(* evaluate_lls)(struct LLSModel *m, const double *var, int order)
Inner product of var[] and the LPC coefs.
Definition lls.h:56
int indep_count
Definition lls.h:41
double coeff[MAX_VARS][MAX_VARS]
Definition lls.h:39
double covariance[MAX_VARS_ALIGN][MAX_VARS_ALIGN]
Definition lls.h:38