[FFmpeg-cvslog] aarch64/hevc: Move sao to h26x directory

Zhao Zhili git at videolan.org
Sat Aug 31 11:08:21 EEST 2024


ffmpeg | branch: master | Zhao Zhili <zhilizhao at tencent.com> | Wed Aug 28 23:21:00 2024 +0800| [8cc10298a74d0c6b59feb23131eebf8d0a4cf433] | committer: Nuo Mi

aarch64/hevc: Move sao to h26x directory

So vvc can reuse the implementation.

Reviewed-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8cc10298a74d0c6b59feb23131eebf8d0a4cf433
---

 libavcodec/aarch64/Makefile                        |  2 +-
 libavcodec/aarch64/h26x/dsp.h                      | 36 ++++++++++++++++++++++
 .../{hevcdsp_sao_neon.S => h26x/sao_neon.S}        |  2 +-
 libavcodec/aarch64/hevcdsp_init_aarch64.c          |  9 +-----
 4 files changed, 39 insertions(+), 10 deletions(-)

diff --git a/libavcodec/aarch64/Makefile b/libavcodec/aarch64/Makefile
index de0653ebbc..a01e665b55 100644
--- a/libavcodec/aarch64/Makefile
+++ b/libavcodec/aarch64/Makefile
@@ -73,4 +73,4 @@ NEON-OBJS-$(CONFIG_HEVC_DECODER)        += aarch64/hevcdsp_deblock_neon.o      \
                                            aarch64/hevcdsp_init_aarch64.o      \
                                            aarch64/hevcdsp_qpel_neon.o         \
                                            aarch64/hevcdsp_epel_neon.o         \
-                                           aarch64/hevcdsp_sao_neon.o
+                                           aarch64/h26x/sao_neon.o
diff --git a/libavcodec/aarch64/h26x/dsp.h b/libavcodec/aarch64/h26x/dsp.h
new file mode 100644
index 0000000000..4dcaf0e6bb
--- /dev/null
+++ b/libavcodec/aarch64/h26x/dsp.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2024 Zhao Zhili
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVCODEC_AARCH64_H26X_DSP_H
+#define AVCODEC_AARCH64_H26X_DSP_H
+
+#include <stddef.h>
+#include <stdint.h>
+
+void ff_hevc_sao_band_filter_8x8_8_neon(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);
+void ff_hevc_sao_edge_filter_16x16_8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride_dst,
+                                          const int16_t *sao_offset_val, int eo, int width, int height);
+void ff_hevc_sao_edge_filter_8x8_8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride_dst,
+                                        const int16_t *sao_offset_val, int eo, int width, int height);
+
+#endif
diff --git a/libavcodec/aarch64/hevcdsp_sao_neon.S b/libavcodec/aarch64/h26x/sao_neon.S
similarity index 99%
rename from libavcodec/aarch64/hevcdsp_sao_neon.S
rename to libavcodec/aarch64/h26x/sao_neon.S
index 30e83dda5d..dc407484de 100644
--- a/libavcodec/aarch64/hevcdsp_sao_neon.S
+++ b/libavcodec/aarch64/h26x/sao_neon.S
@@ -1,7 +1,7 @@
 /* -*-arm64-*-
  * vim: syntax=arm64asm
  *
- * AArch64 NEON optimised SAO functions for HEVC decoding
+ * AArch64 NEON optimised SAO functions for h26x decoding
  *
  * Copyright (c) 2022 J. Dekker <jdek at itanimul.li>
  *
diff --git a/libavcodec/aarch64/hevcdsp_init_aarch64.c b/libavcodec/aarch64/hevcdsp_init_aarch64.c
index e8c911deb4..7efae0f740 100644
--- a/libavcodec/aarch64/hevcdsp_init_aarch64.c
+++ b/libavcodec/aarch64/hevcdsp_init_aarch64.c
@@ -24,6 +24,7 @@
 #include "libavutil/attributes.h"
 #include "libavutil/cpu.h"
 #include "libavutil/aarch64/cpu.h"
+#include "libavcodec/aarch64/h26x/dsp.h"
 #include "libavcodec/hevc/dsp.h"
 
 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);
 void ff_hevc_idct_16x16_dc_10_neon(int16_t *coeffs);
 void ff_hevc_idct_32x32_dc_10_neon(int16_t *coeffs);
 void ff_hevc_transform_luma_4x4_neon_8(int16_t *coeffs);
-void ff_hevc_sao_band_filter_8x8_8_neon(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);
-void ff_hevc_sao_edge_filter_16x16_8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride_dst,
-                                          const int16_t *sao_offset_val, int eo, int width, int height);
-void ff_hevc_sao_edge_filter_8x8_8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride_dst,
-                                        const int16_t *sao_offset_val, int eo, int width, int height);
 void ff_hevc_put_hevc_qpel_h4_8_neon(int16_t *dst, const uint8_t *_src, ptrdiff_t _srcstride, int height,
                                      intptr_t mx, intptr_t my, int width);
 void ff_hevc_put_hevc_qpel_h6_8_neon(int16_t *dst, const uint8_t *_src, ptrdiff_t _srcstride, int height,



More information about the ffmpeg-cvslog mailing list