Skip to content

Commit

Permalink
Add IMTL receiver pipeline for perf tests (#6)
Browse files Browse the repository at this point in the history
Co-authored-by: Wilczynski, Andrzej <[email protected]>
  • Loading branch information
tjanczak and awilczyns authored Dec 6, 2023
1 parent 73deb11 commit 9c60b3e
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 23 deletions.
27 changes: 14 additions & 13 deletions test_scripts/docker_camera.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
NIC_PORT="0000:b1:01.2"
LOCAL_IP_ADDRESS="192.168.2.2"
DEST_IP_ADDRESS="192.168.2.1"
NIC_PORT="0000:b1:01.1"
LOCAL_IP_ADDRESS="192.168.2.1"
DEST_IP_ADDRESS="192.168.2.2"

docker run -it \
--user root\
Expand All @@ -16,17 +16,18 @@ docker run -it \
-v /tmp/hugepages:/tmp/hugepages \
-v /hugepages:/hugepages \
--network=my_net_801f0 \
--ip=192.168.2.2 \
--ip=192.168.2.1 \
--expose=20000-20170 \
--cpuset-cpus="28-55" \
my_ffmpeg \
-y \
-an \
-f rawvideo -pix_fmt y210le -s:v 3840x2160 -i /config/random_y210le.yuv\
-f rawvideo -pix_fmt y210le -s:v 3840x2160 -i /config/random_y210le.yuv\
-f rawvideo -pix_fmt y210le -s:v 3840x2160 -i /config/random_y210le.yuv\
-f rawvideo -pix_fmt y210le -s:v 3840x2160 -i /config/random_y210le.yuv\
-map 0:v -filter:v format=rgb24,fps=60 -port $NIC_PORT -local_addr $LOCAL_IP_ADDRESS -dst_addr $DEST_IP_ADDRESS -udp_port 20000 -total_sessions 4 -f kahawai_mux -\
-map 1:v -filter:v format=rgb24,fps=60 -port $NIC_PORT -local_addr $LOCAL_IP_ADDRESS -dst_addr $DEST_IP_ADDRESS -udp_port 20001 -total_sessions 4 -f kahawai_mux -\
-map 2:v -filter:v format=rgb24,fps=60 -port $NIC_PORT -local_addr $LOCAL_IP_ADDRESS -dst_addr $DEST_IP_ADDRESS -udp_port 20002 -total_sessions 4 -f kahawai_mux -\
-map 3:v -filter:v format=rgb24,fps=60 -port $NIC_PORT -local_addr $LOCAL_IP_ADDRESS -dst_addr $DEST_IP_ADDRESS -udp_port 20003 -total_sessions 4 -f kahawai_mux -

-threads 16 \
-i /config/test0_4k.mkv \
-i /config/test1_4k.mkv \
-i /config/test2_4k.mkv \
-i /config/test3_4k.mkv \
-map 0:v -vframes 2000 -filter:v format=y210le,fps=60 -port $NIC_PORT -local_addr $LOCAL_IP_ADDRESS -dst_addr $DEST_IP_ADDRESS -udp_port 20000 -total_sessions 4 -f kahawai_mux -\
-map 1:v -vframes 2000 -filter:v format=y210le,fps=60 -port $NIC_PORT -local_addr $LOCAL_IP_ADDRESS -dst_addr $DEST_IP_ADDRESS -udp_port 20001 -total_sessions 4 -f kahawai_mux -\
-map 2:v -vframes 2000 -filter:v format=y210le,fps=60 -port $NIC_PORT -local_addr $LOCAL_IP_ADDRESS -dst_addr $DEST_IP_ADDRESS -udp_port 20002 -total_sessions 4 -f kahawai_mux -\
-map 3:v -vframes 2000 -filter:v format=y210le,fps=60 -port $NIC_PORT -local_addr $LOCAL_IP_ADDRESS -dst_addr $DEST_IP_ADDRESS -udp_port 20003 -total_sessions 4 -f kahawai_mux -
26 changes: 16 additions & 10 deletions test_scripts/docker_multiviewer.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash
NIC_PORT="0000:b1:01.1"
LOCAL_IP_ADDRESS="192.168.2.1"
SOURCE_IP_ADDRESS="192.168.2.2"
NIC_PORT="0000:b1:01.2"
LOCAL_IP_ADDRESS="192.168.2.2"
SOURCE_IP_ADDRESS="192.168.2.1"
DEST_IP_ADDRESS="192.168.2.3"

docker run -it \
--user root\
Expand All @@ -16,22 +17,27 @@ docker run -it \
-v /tmp/hugepages:/tmp/hugepages \
-v /hugepages:/hugepages \
--network=my_net_801f0 \
--ip=192.168.2.1 \
--ip=192.168.2.2 \
--expose=20000-20170 \
my_ffmpeg \
-y \
-an \
-qsv_device /dev/dri/renderD128 \
-hwaccel qsv -hwaccel_output_format qsv \
-framerate 50 -pixel_format yuv422p10le -width 3840 -height 2160 -port $NIC_PORT -local_addr $LOCAL_IP_ADDRESS -src_addr $SOURCE_IP_ADDRESS -udp_port 20000 -total_sessions 4 -ext_frames_mode 1 -f kahawai -i "0" \
-framerate 50 -pixel_format yuv422p10le -width 3840 -height 2160 -port $NIC_PORT -local_addr $LOCAL_IP_ADDRESS -src_addr $SOURCE_IP_ADDRESS -udp_port 20001 -total_sessions 4 -ext_frames_mode 1 -f kahawai -i "1" \
-framerate 50 -pixel_format yuv422p10le -width 3840 -height 2160 -port $NIC_PORT -local_addr $LOCAL_IP_ADDRESS -src_addr $SOURCE_IP_ADDRESS -udp_port 20002 -total_sessions 4 -ext_frames_mode 1 -f kahawai -i "2" \
-framerate 50 -pixel_format yuv422p10le -width 3840 -height 2160 -port $NIC_PORT -local_addr $LOCAL_IP_ADDRESS -src_addr $SOURCE_IP_ADDRESS -udp_port 20003 -total_sessions 4 -ext_frames_mode 1 -f kahawai -i "3" \
-thread_queue_size 1024 \
-framerate 60 -pixel_format y210le -width 3840 -height 2160 -port $NIC_PORT -local_addr $LOCAL_IP_ADDRESS -src_addr $SOURCE_IP_ADDRESS -udp_port 20000 -total_sessions 4 -ext_frames_mode 1 -f kahawai -i "0" \
-framerate 60 -pixel_format y210le -width 3840 -height 2160 -port $NIC_PORT -local_addr $LOCAL_IP_ADDRESS -src_addr $SOURCE_IP_ADDRESS -udp_port 20001 -total_sessions 4 -ext_frames_mode 1 -f kahawai -i "1" \
-framerate 60 -pixel_format y210le -width 3840 -height 2160 -port $NIC_PORT -local_addr $LOCAL_IP_ADDRESS -src_addr $SOURCE_IP_ADDRESS -udp_port 20002 -total_sessions 4 -ext_frames_mode 1 -f kahawai -i "2" \
-framerate 60 -pixel_format y210le -width 3840 -height 2160 -port $NIC_PORT -local_addr $LOCAL_IP_ADDRESS -src_addr $SOURCE_IP_ADDRESS -udp_port 20003 -total_sessions 4 -ext_frames_mode 1 -f kahawai -i "3" \
-noauto_conversion_filters \
-filter_complex "\
[0:v]hwupload=extra_hw_frames=4,scale_qsv=w=iw/2:h=ih/2:mode=compute[tile0];\
[1:v]hwupload,scale_qsv=w=iw/2:h=ih/2:mode=compute[tile1];\
[2:v]hwupload,scale_qsv=w=iw/2:h=ih/2:mode=compute[tile2];\
[3:v]hwupload,scale_qsv=w=iw/2:h=ih/2:mode=compute[tile3];\
[tile0][tile1][tile2][tile3]xstack_qsv=inputs=4:layout=0_0|0_h0|w0_0|w0_h0[out];\
[out]hwdownload,format=y210[multiview]" \
-map "[multiview]" -f rawvideo -pix_fmt y210le /config/out_y210le.yuv
[out]hwdownload,format=y210le[multiview]" \
-map [multiview] -f rawvideo -pix_fmt y210le /dev/null
#-map [multiview] -f hevc /config/out_hevc.mkv
#TODO: enable transmit path IMTL supports RX and TX in same plugin
#-map "[multiview]" -filter:v fps=60 -port $NIC_PORT -local_addr $LOCAL_IP_ADDRESS -dst_addr $DEST_IP_ADDRESS -udp_port 20000 -total_sessions 1 -f kahawai_mux -
31 changes: 31 additions & 0 deletions test_scripts/docker_receiver.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash
NIC_PORT="0000:b1:01.2"
LOCAL_IP_ADDRESS="192.168.2.2"
SOURCE_IP_ADDRESS="192.168.2.1"

docker run -it \
--user root\
--privileged \
--device=/dev/vfio:/dev/vfio \
--device=/dev/dri:/dev/dri \
--cap-add ALL \
-v $(pwd):/config \
-v /usr/lib/x86_64-linux-gnu/dri:/usr/local/lib/x86_64-linux-gnu/dri/ \
-v /tmp/kahawai_lcore.lock:/tmp/kahawai_lcore.lock \
-v /dev/null:/dev/null \
-v /tmp/hugepages:/tmp/hugepages \
-v /hugepages:/hugepages \
--network=my_net_801f0 \
--ip=192.168.2.2 \
--expose=20000-20170 \
my_ffmpeg \
-y \
-an \
-framerate 60 -pixel_format y210le -width 3840 -height 2160 -port $NIC_PORT -local_addr $LOCAL_IP_ADDRESS -src_addr $SOURCE_IP_ADDRESS -udp_port 20000 -total_sessions 4 -ext_frames_mode 1 -f kahawai -i "0" \
-framerate 60 -pixel_format y210le -width 3840 -height 2160 -port $NIC_PORT -local_addr $LOCAL_IP_ADDRESS -src_addr $SOURCE_IP_ADDRESS -udp_port 20001 -total_sessions 4 -ext_frames_mode 1 -f kahawai -i "1" \
-framerate 60 -pixel_format y210le -width 3840 -height 2160 -port $NIC_PORT -local_addr $LOCAL_IP_ADDRESS -src_addr $SOURCE_IP_ADDRESS -udp_port 20002 -total_sessions 4 -ext_frames_mode 1 -f kahawai -i "2" \
-framerate 60 -pixel_format y210le -width 3840 -height 2160 -port $NIC_PORT -local_addr $LOCAL_IP_ADDRESS -src_addr $SOURCE_IP_ADDRESS -udp_port 20003 -total_sessions 4 -ext_frames_mode 1 -f kahawai -i "3" \
-map 0:0 -f rawvideo /dev/null \
-map 1:0 -f rawvideo /dev/null \
-map 2:0 -f rawvideo /dev/null \
-map 3:0 -f rawvideo /dev/null

0 comments on commit 9c60b3e

Please sign in to comment.