diff mbox series

[FFmpeg-devel] swscale/rgb2rgb: enable R-V V deinterleaveBytes

Message ID 20240901074539.16262-1-remi@remlab.net
State New
Headers show
Series [FFmpeg-devel] swscale/rgb2rgb: enable R-V V deinterleaveBytes | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Rémi Denis-Courmont Sept. 1, 2024, 7:45 a.m. UTC
T-Head C908:
deinterleave_bytes_c:                               100328.3 ( 1.00x)
deinterleave_bytes_rvv_i32:                          19331.3 ( 5.19x)
deinterleave_bytes_aligned_c:                       100337.5 ( 1.00x)
deinterleave_bytes_aligned_rvv_i32:                  15748.0 ( 6.37x)

SpacemiT X60:
deinterleave_bytes_c:                                95230.6 ( 1.00x)
deinterleave_bytes_rvv_i32:                           9790.3 ( 9.73x)
deinterleave_bytes_aligned_c:                        96564.1 ( 1.00x)
deinterleave_bytes_aligned_rvv_i32:                   7780.1 (12.41x)
---
 libswscale/riscv/rgb2rgb.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/libswscale/riscv/rgb2rgb.c b/libswscale/riscv/rgb2rgb.c
index 7e0c0046da..3581954e38 100644
--- a/libswscale/riscv/rgb2rgb.c
+++ b/libswscale/riscv/rgb2rgb.c
@@ -33,6 +33,9 @@  void ff_shuffle_bytes_3210_rvb(const uint8_t *src, uint8_t *dst, int src_len);
 void ff_interleave_bytes_rvv(const uint8_t *src1, const uint8_t *src2,
                              uint8_t *dst, int width, int height, int s1stride,
                              int s2stride, int dstride);
+void ff_deinterleave_bytes_rvv(const uint8_t *src, uint8_t *dst1,
+                               uint8_t *dst2, int width, int height,
+                               int srcStride, int dst1Stride, int dst2Stride);
 void ff_uyvytoyuv422_rvv(uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
                          const uint8_t *src, int width, int height,
                          int ystride, int uvstride, int src_stride);
@@ -56,6 +59,7 @@  av_cold void rgb2rgb_init_riscv(void)
         shuffle_bytes_1230 = ff_shuffle_bytes_1230_rvv;
         shuffle_bytes_3012 = ff_shuffle_bytes_3012_rvv;
         interleaveBytes = ff_interleave_bytes_rvv;
+        deinterleaveBytes = ff_deinterleave_bytes_rvv;
         uyvytoyuv422 = ff_uyvytoyuv422_rvv;
         yuyvtoyuv422 = ff_yuyvtoyuv422_rvv;
     }