diff options
author | RĂ©mi Denis-Courmont <remi@remlab.net> | 2022-09-28 18:30:01 +0300 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2022-09-30 07:25:44 +0200 |
commit | a1bfb5290e58afa3d38e4d3f986302a2668fbfbe (patch) | |
tree | faa554915d1c7185c2443ac1c435827a0699fc69 /libswscale/riscv/rgb2rgb.c | |
parent | 9181835a249405ec492d26bba58d3881eded95bf (diff) | |
download | ffmpeg-a1bfb5290e58afa3d38e4d3f986302a2668fbfbe.tar.gz |
sws/rgb2rgb: RISC-V 64-bit V packed YUYV/UYVY to planar 4:2:2
This is currently 64-bit only because the stack spilling code would not
assemble on RV32I (and it would corrupt s0 and s1 on RV128I, in theory).
This could be added later in the unlikely that someone wants it.
Diffstat (limited to 'libswscale/riscv/rgb2rgb.c')
-rw-r--r-- | libswscale/riscv/rgb2rgb.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libswscale/riscv/rgb2rgb.c b/libswscale/riscv/rgb2rgb.c index 32c1546827..37a2cd5ea1 100644 --- a/libswscale/riscv/rgb2rgb.c +++ b/libswscale/riscv/rgb2rgb.c @@ -33,6 +33,12 @@ void ff_shuffle_bytes_3210_rvv(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_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); +void ff_yuyvtoyuv422_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); av_cold void rgb2rgb_init_riscv(void) { @@ -46,6 +52,10 @@ av_cold void rgb2rgb_init_riscv(void) shuffle_bytes_3012 = ff_shuffle_bytes_3012_rvv; shuffle_bytes_3210 = ff_shuffle_bytes_3210_rvv; interleaveBytes = ff_interleave_bytes_rvv; +#if (__riscv_xlen == 64) + uyvytoyuv422 = ff_uyvytoyuv422_rvv; + yuyvtoyuv422 = ff_yuyvtoyuv422_rvv; +#endif } #endif } |