FFmpeg
Loading...
Searching...
No Matches
mpegvideo_init.c
Go to the documentation of this file.
1/*
2 * Copyright © 2022 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 "config.h"
22
24#include "libavutil/cpu.h"
27
28void ff_h263_dct_unquantize_intra_rvv(const MPVContext *s, int16_t *block,
29 ptrdiff_t len, int qscale, int aic);
30void ff_h263_dct_unquantize_inter_rvv(const MPVContext *s, int16_t *block,
31 ptrdiff_t len, int qscale);
32
33static void dct_unquantize_h263_intra_rvv(const MPVContext *s,
34 int16_t *block, int n, int qscale)
35{
36 if (!s->h263_aic)
37 block[0] *= (n < 4) ? s->y_dc_scale : s->c_dc_scale;
38
39 n = s->ac_pred ? 63
40 : s->intra_scantable.raster_end[s->block_last_index[n]];
41 ff_h263_dct_unquantize_intra_rvv(s, block, n, qscale, s->h263_aic);
42}
43
44static void dct_unquantize_h263_inter_rvv(const MPVContext *s,
45 int16_t *block, int n, int qscale)
46{
47 n = s->inter_scantable.raster_end[s->block_last_index[n]];
49}
50
53{
54#if HAVE_RVV
55 int flags = av_get_cpu_flags();
56
58 c->dct_unquantize_h263_intra = dct_unquantize_h263_intra_rvv;
59 c->dct_unquantize_h263_inter = dct_unquantize_h263_inter_rvv;
60 }
61#endif
62}
#define flags(name, subs,...)
Definition cbs_h264.c:74
#define s(width, name)
Definition cbs_vp9.c:198
static int16_t block[64]
Definition dct.c:125
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_I32
Vectors of 8/16/32-bit int's *‍/.
Definition cpu.h:97
mpegvideo header.
static void dct_unquantize_h263_inter_rvv(const MPVContext *s, int16_t *block, int n, int qscale)
void ff_h263_dct_unquantize_inter_rvv(const MPVContext *s, int16_t *block, ptrdiff_t len, int qscale)
void ff_h263_dct_unquantize_intra_rvv(const MPVContext *s, int16_t *block, ptrdiff_t len, int qscale, int aic)
static void dct_unquantize_h263_intra_rvv(const MPVContext *s, int16_t *block, int n, int qscale)
av_cold void ff_mpv_unquantize_init_riscv(MPVUnquantDSPContext *c, int bitexact)
int len
static double c[64]