summaryrefslogtreecommitdiff
path: root/vp8/common/riscv/sixtap_predict_rvv.c
diff options
context:
space:
mode:
authorWang Chen <wangchen20@iscas.ac.cn>2023-07-10 09:19:39 +0800
committerChen Wang <unicorn_wang@outlook.com>2023-07-10 11:15:18 +0800
commitc2814bb8cc32362822b5a546c8de21b3a0e89032 (patch)
tree8484f4144f8797682fc98e1e020627606a11ca61 /vp8/common/riscv/sixtap_predict_rvv.c
parentb8fdf4909a12c40fd373cfba0e212d45b021549f (diff)
downloadlibvpx-c2814bb8cc32362822b5a546c8de21b3a0e89032.tar
libvpx-c2814bb8cc32362822b5a546c8de21b3a0e89032.tar.gz
libvpx-c2814bb8cc32362822b5a546c8de21b3a0e89032.tar.bz2
libvpx-c2814bb8cc32362822b5a546c8de21b3a0e89032.zip
add example how to use rtcd
Just use vp8_sixtap_predict as example but have not implemented it actually. Test: $ CROSS=riscv64-unknown-linux-gnu- ../libvpx/configure --target=riscv64-linux-gcc $ make Check if vp8_sixtap_predict functions have been replaced with those suffixed with "_rvv": $ riscv64-unknown-linux-gnu-nm ./vp8/decoder/decodeframe.c.o | grep vp8_sixtap_predict16x16 U vp8_sixtap_predict16x16_rvv Check if vp8_sixtap_predictMxN_rvv work. $ qemu-riscv64 -L $SYSROOT_RV64 ./build-test/test_libvpx --gtest_filter="RVV/SixtapPredictTest.TestWithPresetData/*" You should see print log output such as: "--> vp8_sixtap_predict4x4_rvv" "FAILED" is expected due to we have not implemented the actual algorithm. Signed-off-by: Wang Chen <wangchen20@iscas.ac.cn> Co-authored-by: sun min <sunmin89@outlook.com>
Diffstat (limited to 'vp8/common/riscv/sixtap_predict_rvv.c')
-rw-r--r--vp8/common/riscv/sixtap_predict_rvv.c63
1 files changed, 63 insertions, 0 deletions
diff --git a/vp8/common/riscv/sixtap_predict_rvv.c b/vp8/common/riscv/sixtap_predict_rvv.c
new file mode 100644
index 000000000..0345d026e
--- /dev/null
+++ b/vp8/common/riscv/sixtap_predict_rvv.c
@@ -0,0 +1,63 @@
+#include <riscv_vector.h>
+#include <stdio.h>
+#include "./vpx_config.h"
+#include "./vp8_rtcd.h"
+
+#define UNUSED(x) (void)(x)
+
+void vp8_sixtap_predict4x4_rvv(unsigned char *src_ptr, int src_pixels_per_line,
+ int xoffset, int yoffset,
+ unsigned char *dst_ptr, int dst_pitch)
+{
+ UNUSED(src_ptr);
+ UNUSED(src_pixels_per_line);
+ UNUSED(xoffset);
+ UNUSED(yoffset);
+ UNUSED(dst_ptr);
+ UNUSED(dst_pitch);
+
+ printf("--> vp8_sixtap_predict4x4_rvv\n");
+}
+
+void vp8_sixtap_predict8x4_rvv(unsigned char *src_ptr, int src_pixels_per_line,
+ int xoffset, int yoffset,
+ unsigned char *dst_ptr, int dst_pitch)
+{
+ UNUSED(src_ptr);
+ UNUSED(src_pixels_per_line);
+ UNUSED(xoffset);
+ UNUSED(yoffset);
+ UNUSED(dst_ptr);
+ UNUSED(dst_pitch);
+
+ printf("--> vp8_sixtap_predict8x4_rvv\n");
+}
+
+void vp8_sixtap_predict8x8_rvv(unsigned char *src_ptr, int src_pixels_per_line,
+ int xoffset, int yoffset,
+ unsigned char *dst_ptr, int dst_pitch)
+{
+ UNUSED(src_ptr);
+ UNUSED(src_pixels_per_line);
+ UNUSED(xoffset);
+ UNUSED(yoffset);
+ UNUSED(dst_ptr);
+ UNUSED(dst_pitch);
+
+ printf("--> vp8_sixtap_predict8x8_rvv\n");
+}
+
+void vp8_sixtap_predict16x16_rvv(unsigned char *src_ptr,
+ int src_pixels_per_line, int xoffset,
+ int yoffset, unsigned char *dst_ptr,
+ int dst_pitch)
+{
+ UNUSED(src_ptr);
+ UNUSED(src_pixels_per_line);
+ UNUSED(xoffset);
+ UNUSED(yoffset);
+ UNUSED(dst_ptr);
+ UNUSED(dst_pitch);
+
+ printf("--> vp8_sixtap_predict16x16_rvv\n");
+}