So vvc can reuse the implementation.
Unified · Split
| @@ -73,4 +73,4 @@ NEON-OBJS-$(CONFIG_HEVC_DECODER) += aarch64/hevcdsp_deblock_neon.o \ · 72 unmodified lines | ||
| 73 | 73 | aarch64/hevcdsp_init_aarch64.o \ |
| 74 | 74 | aarch64/hevcdsp_qpel_neon.o \ |
| 75 | 75 | aarch64/hevcdsp_epel_neon.o \ |
| 76 | − aarch64/hevcdsp_sao_neon.o | |
| 76 | + aarch64/h26x/sao_neon.o | |
| @@ -0,0 +1,36 @@ | ||
| 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 | + | |
| 21 | +#ifndef AVCODEC_AARCH64_H26X_DSP_H | |
| 22 | +#define AVCODEC_AARCH64_H26X_DSP_H | |
| 23 | + | |
| 24 | +#include <stddef.h> | |
| 25 | +#include <stdint.h> | |
| 26 | + | |
| 27 | +void ff_hevc_sao_band_filter_8x8_8_neon(uint8_t *_dst, const uint8_t *_src, | |
| 28 | + ptrdiff_t stride_dst, ptrdiff_t stride_src, | |
| 29 | + const int16_t *sao_offset_val, int sao_left_class, | |
| 30 | + int width, int height); | |
| 31 | +void ff_hevc_sao_edge_filter_16x16_8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride_dst, | |
| 32 | + const int16_t *sao_offset_val, int eo, int width, int height); | |
| 33 | +void ff_hevc_sao_edge_filter_8x8_8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride_dst, | |
| 34 | + const int16_t *sao_offset_val, int eo, int width, int height); | |
| 35 | + | |
| 36 | +#endif | |
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | /* -*-arm64-*- |
| 2 | 2 | * vim: syntax=arm64asm |
| 3 | 3 | * |
| 4 | − * AArch64 NEON optimised SAO functions for HEVC decoding | |
| 4 | + * AArch64 NEON optimised SAO functions for h26x decoding | |
| 5 | 5 | * |
| 6 | 6 | * Copyright (c) 2022 J. Dekker <jdek@itanimul.li> |
| 7 | 7 | * |
| @@ -24,6 +24,7 @@ · 23 unmodified lines | ||
| 24 | 24 | #include "libavutil/attributes.h" |
| 25 | 25 | #include "libavutil/cpu.h" |
| 26 | 26 | #include "libavutil/aarch64/cpu.h" |
| 27 | +#include "libavcodec/aarch64/h26x/dsp.h" | |
| 27 | 28 | #include "libavcodec/hevc/dsp.h" |
| 28 | 29 | |
| 29 | 30 | void ff_hevc_v_loop_filter_chroma_8_neon(uint8_t *_pix, ptrdiff_t _stride, |
| @@ -91,14 +92,6 @@ void ff_hevc_idct_8x8_dc_10_neon(int16_t *coeffs); · 61 unmodified lines | ||
| 91 | 92 | void ff_hevc_idct_16x16_dc_10_neon(int16_t *coeffs); |
| 92 | 93 | void ff_hevc_idct_32x32_dc_10_neon(int16_t *coeffs); |
| 93 | 94 | void ff_hevc_transform_luma_4x4_neon_8(int16_t *coeffs); |
| 94 | −void ff_hevc_sao_band_filter_8x8_8_neon(uint8_t *_dst, const uint8_t *_src, | |
| 95 | − ptrdiff_t stride_dst, ptrdiff_t stride_src, | |
| 96 | − const int16_t *sao_offset_val, int sao_left_class, | |
| 97 | − int width, int height); | |
| 98 | −void ff_hevc_sao_edge_filter_16x16_8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride_dst, | |
| 99 | − const int16_t *sao_offset_val, int eo, int width, int height); | |
| 100 | −void ff_hevc_sao_edge_filter_8x8_8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride_dst, | |
| 101 | − const int16_t *sao_offset_val, int eo, int width, int height); | |
| 102 | 95 | void ff_hevc_put_hevc_qpel_h4_8_neon(int16_t *dst, const uint8_t *_src, ptrdiff_t _srcstride, int height, |
| 103 | 96 | intptr_t mx, intptr_t my, int width); |
| 104 | 97 | void ff_hevc_put_hevc_qpel_h6_8_neon(int16_t *dst, const uint8_t *_src, ptrdiff_t _srcstride, int height, |