[FFmpeg-cvslog] lavc/pixblockdsp: add scalar get_pixels_unaligned

Rémi Denis-Courmont git at videolan.org
Fri May 24 17:55:08 EEST 2024


ffmpeg | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue May 21 20:50:51 2024 +0300| [ba38d0e3282544765bff1110e043c65c7e566db6] | committer: Rémi Denis-Courmont

lavc/pixblockdsp: add scalar get_pixels_unaligned

The code is already there, we just need to use it.

get_pixels_unaligned_c: 2.2
get_pixels_unaligned_misaligned: 1.7

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

 libavcodec/riscv/pixblockdsp_init.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/riscv/pixblockdsp_init.c b/libavcodec/riscv/pixblockdsp_init.c
index b205841101..2735776105 100644
--- a/libavcodec/riscv/pixblockdsp_init.c
+++ b/libavcodec/riscv/pixblockdsp_init.c
@@ -55,6 +55,13 @@ av_cold void ff_pixblockdsp_init_riscv(PixblockDSPContext *c,
             c->get_pixels = ff_get_pixels_8_rvi;
     }
 
+    if (cpu_flags & AV_CPU_FLAG_RV_MISALIGNED) {
+        if (high_bit_depth)
+            c->get_pixels_unaligned = ff_get_pixels_16_rvi;
+        else
+            c->get_pixels_unaligned = ff_get_pixels_8_rvi;
+    }
+
 #if HAVE_RVV
     if ((cpu_flags & AV_CPU_FLAG_RVV_I32) && ff_rv_vlen_least(128)) {
         c->diff_pixels = ff_diff_pixels_unaligned_rvv;



More information about the ffmpeg-cvslog mailing list