Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 2/3] lavc/h264pred: R-V V pred16x16_horizontal_8
@ 2024-01-16 16:15 flow gg
  0 siblings, 0 replies; only message in thread
From: flow gg @ 2024-01-16 16:15 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: 0002-lavc-h264pred-R-V-V-pred16x16_horizontal_8.patch --]
[-- Type: text/x-patch, Size: 1912 bytes --]

From 806f84ea5557c4652e48451decc4c679c9485472 Mon Sep 17 00:00:00 2001
From: sunyuechi <sunyuechi@iscas.ac.cn>
Date: Tue, 16 Jan 2024 23:56:33 +0800
Subject: [PATCH 2/3] lavc/h264pred: R-V V pred16x16_horizontal_8

C908
pred16x16_horizontal_8_c: 3.0
pred16x16_horizontal_8_rvv_i32: 2.5
---
 libavcodec/riscv/h264pred_init.c |  2 ++
 libavcodec/riscv/h264pred_rvv.S  | 15 +++++++++++++++
 2 files changed, 17 insertions(+)

diff --git a/libavcodec/riscv/h264pred_init.c b/libavcodec/riscv/h264pred_init.c
index 179bd8c8a5..8665bc729e 100644
--- a/libavcodec/riscv/h264pred_init.c
+++ b/libavcodec/riscv/h264pred_init.c
@@ -25,6 +25,7 @@
 #include "libavcodec/h264pred.h"
 
 void ff_pred16x16_vertical_8_rvv(uint8_t *src, ptrdiff_t stride);
+void ff_pred16x16_horizontal_8_rvv(uint8_t *src, ptrdiff_t stride);
 
 av_cold void ff_h264_pred_init_riscv(H264PredContext *h, int codec_id,
                                    const int bit_depth,
@@ -36,6 +37,7 @@ av_cold void ff_h264_pred_init_riscv(H264PredContext *h, int codec_id,
 
             if (flags & AV_CPU_FLAG_RVV_I32) {
                 h->pred16x16[VERT_PRED8x8] = ff_pred16x16_vertical_8_rvv;
+                h->pred16x16[HOR_PRED8x8] = ff_pred16x16_horizontal_8_rvv;
             }
         #endif
     }
diff --git a/libavcodec/riscv/h264pred_rvv.S b/libavcodec/riscv/h264pred_rvv.S
index 0e48662922..ba1e9045e1 100644
--- a/libavcodec/riscv/h264pred_rvv.S
+++ b/libavcodec/riscv/h264pred_rvv.S
@@ -33,3 +33,18 @@ func ff_pred16x16_vertical_8_rvv, zve32x
 
         ret
 endfunc
+
+func ff_pred16x16_horizontal_8_rvv, zve32x
+        li        t0, 16
+1:
+        lbu       t1, -1(a0)
+        vsetivli  zero, 16, e8, m1, ta, ma
+        vmv.v.x   v0, t1
+        vsetivli  zero, 4, e8, mf4, ta, ma
+        addi      t0, t0, -1
+        vse32.v   v0, (a0)
+        add       a0, a0, a1
+        bnez      t0, 1b
+
+        ret
+endfunc
-- 
2.43.0


[-- Attachment #3: Type: text/plain, Size: 251 bytes --]

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-16 16:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-16 16:15 [FFmpeg-devel] [PATCH 2/3] lavc/h264pred: R-V V pred16x16_horizontal_8 flow gg

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git