FFmpeg
Loading...
Searching...
No Matches
h2656dsp.h
Go to the documentation of this file.
1/*
2 * DSP for HEVC/VVC
3 *
4 * Copyright (C) 2022-2024 Nuo Mi
5 * Copyright (c) 2023-2024 Wu Jianhua
6 *
7 * This file is part of FFmpeg.
8 *
9 * FFmpeg is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * FFmpeg is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with FFmpeg; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23
24#ifndef AVCODEC_X86_H26X_H2656DSP_H
25#define AVCODEC_X86_H26X_H2656DSP_H
26
27#include <stddef.h>
28#include <stdint.h>
29
30#define H2656_PEL_PROTOTYPE(name, D, opt) \
31void ff_h2656_put_ ## name ## _ ## D ## _##opt(int16_t *dst, ptrdiff_t dststride, const uint8_t *_src, ptrdiff_t _srcstride, int height, const int8_t *hf, const int8_t *vf, int width); \
32void ff_h2656_put_uni_ ## name ## _ ## D ## _##opt(uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, int height, const int8_t *hf, const int8_t *vf, int width) \
33
34#define H2656_MC_8TAP_PROTOTYPES(fname, bitd, opt) \
35 H2656_PEL_PROTOTYPE(fname##4, bitd, opt); \
36 H2656_PEL_PROTOTYPE(fname##6, bitd, opt); \
37 H2656_PEL_PROTOTYPE(fname##8, bitd, opt); \
38 H2656_PEL_PROTOTYPE(fname##12, bitd, opt); \
39 H2656_PEL_PROTOTYPE(fname##16, bitd, opt); \
40 H2656_PEL_PROTOTYPE(fname##32, bitd, opt); \
41 H2656_PEL_PROTOTYPE(fname##64, bitd, opt); \
42 H2656_PEL_PROTOTYPE(fname##128, bitd, opt)
43
44H2656_MC_8TAP_PROTOTYPES(pixels , 8, sse4);
45H2656_MC_8TAP_PROTOTYPES(pixels , 10, sse4);
46H2656_MC_8TAP_PROTOTYPES(pixels , 12, sse4);
47H2656_MC_8TAP_PROTOTYPES(8tap_h , 8, sse4);
48H2656_MC_8TAP_PROTOTYPES(8tap_h , 10, sse4);
49H2656_MC_8TAP_PROTOTYPES(8tap_h , 12, sse4);
50H2656_MC_8TAP_PROTOTYPES(8tap_v , 8, sse4);
51H2656_MC_8TAP_PROTOTYPES(8tap_v , 10, sse4);
52H2656_MC_8TAP_PROTOTYPES(8tap_v , 12, sse4);
53H2656_MC_8TAP_PROTOTYPES(8tap_hv , 8, sse4);
54H2656_MC_8TAP_PROTOTYPES(8tap_hv , 10, sse4);
55H2656_MC_8TAP_PROTOTYPES(8tap_hv , 12, sse4);
56
57#define H2656_MC_4TAP_PROTOTYPES(fname, bitd, opt) \
58 H2656_PEL_PROTOTYPE(fname##2, bitd, opt); \
59 H2656_PEL_PROTOTYPE(fname##4, bitd, opt); \
60 H2656_PEL_PROTOTYPE(fname##6, bitd, opt); \
61 H2656_PEL_PROTOTYPE(fname##8, bitd, opt); \
62 H2656_PEL_PROTOTYPE(fname##12, bitd, opt); \
63 H2656_PEL_PROTOTYPE(fname##16, bitd, opt); \
64 H2656_PEL_PROTOTYPE(fname##32, bitd, opt); \
65 H2656_PEL_PROTOTYPE(fname##64, bitd, opt); \
66 H2656_PEL_PROTOTYPE(fname##128, bitd, opt)
67
68#define H2656_MC_4TAP_PROTOTYPES_SSE4(bitd) \
69 H2656_PEL_PROTOTYPE(pixels2, bitd, sse4); \
70 H2656_MC_4TAP_PROTOTYPES(4tap_h, bitd, sse4); \
71 H2656_MC_4TAP_PROTOTYPES(4tap_v, bitd, sse4); \
72 H2656_MC_4TAP_PROTOTYPES(4tap_hv, bitd, sse4); \
73
77
78#define H2656_MC_8TAP_PROTOTYPES_AVX2(fname) \
79 H2656_PEL_PROTOTYPE(fname##32 , 8, avx2); \
80 H2656_PEL_PROTOTYPE(fname##64 , 8, avx2); \
81 H2656_PEL_PROTOTYPE(fname##128, 8, avx2); \
82 H2656_PEL_PROTOTYPE(fname##16 ,10, avx2); \
83 H2656_PEL_PROTOTYPE(fname##32 ,10, avx2); \
84 H2656_PEL_PROTOTYPE(fname##64 ,10, avx2); \
85 H2656_PEL_PROTOTYPE(fname##128,10, avx2); \
86 H2656_PEL_PROTOTYPE(fname##16 ,12, avx2); \
87 H2656_PEL_PROTOTYPE(fname##32 ,12, avx2); \
88 H2656_PEL_PROTOTYPE(fname##64 ,12, avx2); \
89 H2656_PEL_PROTOTYPE(fname##128,12, avx2) \
90
95H2656_PEL_PROTOTYPE(8tap_hv16, 8, avx2);
96
100
101#endif
#define H2656_MC_8TAP_PROTOTYPES_AVX2(fname)
Definition h2656dsp.h:78
#define H2656_MC_4TAP_PROTOTYPES_SSE4(bitd)
Definition h2656dsp.h:68
#define H2656_MC_8TAP_PROTOTYPES(fname, bitd, opt)
Definition h2656dsp.h:34
#define H2656_PEL_PROTOTYPE(name, D, opt)
Definition h2656dsp.h:30