FFmpeg
hevcdsp_init_aarch64.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020 Reimar Döffinger
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 <stdint.h>
22 
23 #include "libavutil/attributes.h"
24 #include "libavutil/cpu.h"
25 #include "libavutil/aarch64/cpu.h"
26 #include "libavcodec/hevcdsp.h"
27 
28 void ff_hevc_add_residual_4x4_8_neon(uint8_t *_dst, int16_t *coeffs,
29  ptrdiff_t stride);
30 void ff_hevc_add_residual_4x4_10_neon(uint8_t *_dst, int16_t *coeffs,
31  ptrdiff_t stride);
32 void ff_hevc_add_residual_8x8_8_neon(uint8_t *_dst, int16_t *coeffs,
33  ptrdiff_t stride);
34 void ff_hevc_add_residual_8x8_10_neon(uint8_t *_dst, int16_t *coeffs,
35  ptrdiff_t stride);
36 void ff_hevc_add_residual_16x16_8_neon(uint8_t *_dst, int16_t *coeffs,
37  ptrdiff_t stride);
38 void ff_hevc_add_residual_16x16_10_neon(uint8_t *_dst, int16_t *coeffs,
39  ptrdiff_t stride);
40 void ff_hevc_add_residual_32x32_8_neon(uint8_t *_dst, int16_t *coeffs,
41  ptrdiff_t stride);
42 void ff_hevc_add_residual_32x32_10_neon(uint8_t *_dst, int16_t *coeffs,
43  ptrdiff_t stride);
44 void ff_hevc_idct_8x8_8_neon(int16_t *coeffs, int col_limit);
45 void ff_hevc_idct_8x8_10_neon(int16_t *coeffs, int col_limit);
46 void ff_hevc_idct_16x16_8_neon(int16_t *coeffs, int col_limit);
47 void ff_hevc_idct_16x16_10_neon(int16_t *coeffs, int col_limit);
48 void ff_hevc_idct_4x4_dc_8_neon(int16_t *coeffs);
49 void ff_hevc_idct_8x8_dc_8_neon(int16_t *coeffs);
50 void ff_hevc_idct_16x16_dc_8_neon(int16_t *coeffs);
51 void ff_hevc_idct_32x32_dc_8_neon(int16_t *coeffs);
52 void ff_hevc_idct_4x4_dc_10_neon(int16_t *coeffs);
53 void ff_hevc_idct_8x8_dc_10_neon(int16_t *coeffs);
54 void ff_hevc_idct_16x16_dc_10_neon(int16_t *coeffs);
55 void ff_hevc_idct_32x32_dc_10_neon(int16_t *coeffs);
57  ptrdiff_t stride_dst, ptrdiff_t stride_src,
58  int16_t *sao_offset_val, int sao_left_class,
59  int width, int height);
60 
61 
62 
64 {
65  if (!have_neon(av_get_cpu_flags())) return;
66 
67  if (bit_depth == 8) {
79  }
80  if (bit_depth == 10) {
91  }
92 }
void ff_hevc_idct_16x16_10_neon(int16_t *coeffs, int col_limit)
void ff_hevc_idct_16x16_dc_8_neon(int16_t *coeffs)
void ff_hevc_idct_4x4_dc_8_neon(int16_t *coeffs)
void ff_hevc_idct_32x32_dc_10_neon(int16_t *coeffs)
void ff_hevc_idct_8x8_10_neon(int16_t *coeffs, int col_limit)
void ff_hevc_idct_32x32_dc_8_neon(int16_t *coeffs)
void ff_hevc_idct_8x8_dc_10_neon(int16_t *coeffs)
void ff_hevc_add_residual_4x4_8_neon(uint8_t *_dst, int16_t *coeffs, ptrdiff_t stride)
Macro definitions for various function/variable attributes.
void(* idct[4])(int16_t *coeffs, int col_limit)
Definition: hevcdsp.h:59
uint8_t
#define av_cold
Definition: attributes.h:88
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32
#define height
void ff_hevc_add_residual_32x32_8_neon(uint8_t *_dst, int16_t *coeffs, ptrdiff_t stride)
void ff_hevc_add_residual_4x4_10_neon(uint8_t *_dst, int16_t *coeffs, ptrdiff_t stride)
void ff_hevc_idct_8x8_dc_8_neon(int16_t *coeffs)
void ff_hevc_idct_4x4_dc_10_neon(int16_t *coeffs)
void ff_hevc_add_residual_16x16_8_neon(uint8_t *_dst, int16_t *coeffs, ptrdiff_t stride)
void ff_hevc_idct_16x16_8_neon(int16_t *coeffs, int col_limit)
void ff_hevc_add_residual_32x32_10_neon(uint8_t *_dst, int16_t *coeffs, ptrdiff_t stride)
void ff_hevc_idct_16x16_dc_10_neon(int16_t *coeffs)
#define have_neon(flags)
Definition: cpu.h:26
#define width
static void bit_depth(AudioStatsContext *s, uint64_t mask, uint64_t imask, AVRational *depth)
Definition: af_astats.c:254
void(* idct_dc[4])(int16_t *coeffs)
Definition: hevcdsp.h:61
void ff_hevc_add_residual_8x8_10_neon(uint8_t *_dst, int16_t *coeffs, ptrdiff_t stride)
void(* sao_band_filter[5])(uint8_t *_dst, uint8_t *_src, ptrdiff_t _stride_dst, ptrdiff_t _stride_src, int16_t *sao_offset_val, int sao_left_class, int width, int height)
Definition: hevcdsp.h:63
av_cold void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth)
void(* add_residual[4])(uint8_t *dst, int16_t *res, ptrdiff_t stride)
Definition: hevcdsp.h:51
void ff_hevc_sao_band_filter_8x8_8_neon(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src, int16_t *sao_offset_val, int sao_left_class, int width, int height)
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
Definition: cpu.c:95
GLint GLenum GLboolean GLsizei stride
Definition: opengl_enc.c:104
void ff_hevc_add_residual_16x16_10_neon(uint8_t *_dst, int16_t *coeffs, ptrdiff_t stride)
void ff_hevc_idct_8x8_8_neon(int16_t *coeffs, int col_limit)
void ff_hevc_add_residual_8x8_8_neon(uint8_t *_dst, int16_t *coeffs, ptrdiff_t stride)