From ba38d0e3282544765bff1110e043c65c7e566db6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= Date: Tue, 21 May 2024 20:50:51 +0300 Subject: [PATCH] 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 --- 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;