[FFmpeg-cvslog] sws/riscv: depend on RVB and simplify accordingly

Rémi Denis-Courmont git at videolan.org
Mon Aug 5 21:19:18 EEST 2024


ffmpeg | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jul 27 14:30:17 2024 +0300| [210877c5fd30015ea7c6a7fa2f489688ed4b1d64] | committer: Rémi Denis-Courmont

sws/riscv: depend on RVB and simplify accordingly

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

 libswscale/riscv/rgb2rgb.c | 8 +++-----
 libswscale/riscv/swscale.c | 4 ++--
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/libswscale/riscv/rgb2rgb.c b/libswscale/riscv/rgb2rgb.c
index fb527e2bbe..7e0c0046da 100644
--- a/libswscale/riscv/rgb2rgb.c
+++ b/libswscale/riscv/rgb2rgb.c
@@ -50,16 +50,14 @@ av_cold void rgb2rgb_init_riscv(void)
         shuffle_bytes_3210 = ff_shuffle_bytes_3210_rvb;
 #endif
 #if HAVE_RVV
-    if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB_ADDR)) {
+    if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB)) {
         shuffle_bytes_0321 = ff_shuffle_bytes_0321_rvv;
         shuffle_bytes_2103 = ff_shuffle_bytes_2103_rvv;
         shuffle_bytes_1230 = ff_shuffle_bytes_1230_rvv;
         shuffle_bytes_3012 = ff_shuffle_bytes_3012_rvv;
         interleaveBytes = ff_interleave_bytes_rvv;
-        if (flags & AV_CPU_FLAG_RVB_BASIC) {
-            uyvytoyuv422 = ff_uyvytoyuv422_rvv;
-            yuyvtoyuv422 = ff_yuyvtoyuv422_rvv;
-        }
+        uyvytoyuv422 = ff_uyvytoyuv422_rvv;
+        yuyvtoyuv422 = ff_yuyvtoyuv422_rvv;
     }
 #endif
 #endif
diff --git a/libswscale/riscv/swscale.c b/libswscale/riscv/swscale.c
index 529d817aaa..c452d93e5d 100644
--- a/libswscale/riscv/swscale.c
+++ b/libswscale/riscv/swscale.c
@@ -39,7 +39,7 @@ av_cold static void ff_sws_init_range_convert_riscv(SwsContext *c, int flags)
 
     if (c->srcRange != c->dstRange && !isAnyRGB(c->dstFormat) &&
         c->dstBpc <= 14 &&
-        (flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB_ADDR)) {
+        (flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB)) {
         bool from = c->srcRange != 0;
 
         c->lumConvertRange = convs[from].lum;
@@ -70,7 +70,7 @@ av_cold void ff_sws_init_swscale_riscv(SwsContext *c)
     int flags = av_get_cpu_flags();
 
 #if HAVE_RVV
-    if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB_ADDR)) {
+    if ((flags & AV_CPU_FLAG_RVV_I32) && (flags & AV_CPU_FLAG_RVB)) {
         switch (c->srcFormat) {
             case AV_PIX_FMT_ABGR:
                 c->lumToYV12 = ff_abgr32ToY_rvv;



More information about the ffmpeg-cvslog mailing list