FFmpeg
Loading...
Searching...
No Matches
dsp_init.c
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Zhao Zhili
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
22#include "libavcodec/hevc/dsp.h"
25
27{
29
30 if (!CPUEXT(cpu_flags, SIMD128))
31 return;
32
33#if HAVE_SIMD128
34 if (bit_depth == 8) {
39
40 c->sao_band_filter[0] = ff_hevc_sao_band_filter_8x8_8_simd128;
41 c->sao_band_filter[1] =
42 c->sao_band_filter[2] =
43 c->sao_band_filter[3] =
44 c->sao_band_filter[4] = ff_hevc_sao_band_filter_16x16_8_simd128;
45
46 c->sao_edge_filter[0] = ff_hevc_sao_edge_filter_8x8_8_simd128;
47 c->sao_edge_filter[1] =
48 c->sao_edge_filter[2] =
49 c->sao_edge_filter[3] =
50 c->sao_edge_filter[4] = ff_hevc_sao_edge_filter_16x16_8_simd128;
51 } else if (bit_depth == 10) {
56 }
57#endif
58}
static void bit_depth(AudioStatsContext *s, const uint64_t *const mask, uint8_t *depth)
Definition af_astats.c:246
#define CPUEXT(flags, cpuext)
void ff_hevc_idct_16x16_10_simd128(int16_t *coeffs, int col_limit)
Definition idct.c:601
void ff_hevc_idct_8x8_10_simd128(int16_t *coeffs, int col_limit)
Definition idct.c:259
void ff_hevc_idct_8x8_8_simd128(int16_t *coeffs, int col_limit)
Definition idct.c:254
void ff_hevc_idct_4x4_8_simd128(int16_t *coeffs, int col_limit)
Definition idct.c:118
void ff_hevc_idct_32x32_10_simd128(int16_t *coeffs, int col_limit)
Definition idct.c:866
void ff_hevc_idct_32x32_8_simd128(int16_t *coeffs, int col_limit)
Definition idct.c:861
void ff_hevc_idct_4x4_10_simd128(int16_t *coeffs, int col_limit)
Definition idct.c:123
void ff_hevc_idct_16x16_8_simd128(int16_t *coeffs, int col_limit)
Definition idct.c:596
#define av_cold
Definition attributes.h:117
static atomic_int cpu_flags
Definition cpu.c:56
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
Definition cpu.c:109
void ff_hevc_sao_edge_filter_16x16_8_simd128(uint8_t *dst, const uint8_t *src, ptrdiff_t stride_dst, const int16_t *sao_offset_val, int eo, int width, int height)
Definition sao.c:189
void ff_hevc_sao_edge_filter_8x8_8_simd128(uint8_t *dst, const uint8_t *src, ptrdiff_t stride_dst, const int16_t *sao_offset_val, int eo, int width, int height)
Definition sao.c:119
void ff_hevc_sao_band_filter_16x16_8_simd128(uint8_t *dst, const uint8_t *src, ptrdiff_t stride_dst, ptrdiff_t stride_src, const int16_t *sao_offset_val, int sao_left_class, int width, int height)
Definition sao.c:75
void ff_hevc_sao_band_filter_8x8_8_simd128(uint8_t *dst, const uint8_t *src, ptrdiff_t stride_dst, ptrdiff_t stride_src, const int16_t *sao_offset_val, int sao_left_class, int width, int height)
Definition sao.c:29
static double c[64]
av_cold void ff_hevc_dsp_init_wasm(HEVCDSPContext *c, const int bit_depth)
Definition dsp_init.c:26