Closed bmegli closed 4 years ago
The current program structure is simple sequential (grab data, upload to hardware, hardware encode, download from hardware, send). Some of those operations could be made to run concurrently if needed.
Benchmark 56bb454 with NHVE@432cfcb:
Just to get idea of order of execution time
./realsense-nhve-hevc 192.168.0.100 9768 depth 848 480 30 500 /dev/dri/renderD128 80000000 0.000025
./realsense-nhve-hevc 192.168.0.100 9768 depth+ir 848 480 30 500 /dev/dri/renderD128 80000000 0.000025
No noticeable difference between depth and depth+ir in hardware encoding time (as above).
./realsense-nhve-hevc 192.168.0.100 9768 color 640 360 30 500 /dev/dri/renderD128 80000000
./realsense-nhve-hevc 192.168.0.100 9768 color 1920x1080 30 500 /dev/dri/renderD128 80000000
./realsense-nhve-hevc 127.0.0.1 9768 infrared 848 480 30 500 /dev/dri/renderD128 80000000
As above but with 1 Mb bitrate no noticable differences
Now H.264
./realsense-nhve-h264 127.0.0.1 9766 color 640 360 30 5 /dev/dri/renderD128 2000000
./realsense-nhve-h264 127.0.0.1 9766 color 1920 1080 30 5 /dev/dri/renderD128 2000000
./realsense-nhve-h264 127.0.0.1 9766 infrared 848 480 30 50 /dev/dri/renderD128 1000000
./realsense-nhve-h264 127.0.0.1 9766 infrared 640 360 30 50 /dev/dri/renderD128 1000000
Now LattePanda Alpha m3-7y30
./realsense-nhve-hevc 127.0.0.1 9768 depth 848 480 30 500 /dev/dri/renderD128 8000000 0.0000125
./realsense-nhve-hevc 127.0.0.1 9768 depth 640 360 30 500 /dev/dri/renderD128 8000000 0.0000125
Depth+ir no noticeable difference from depth only
./realsense-nhve-hevc 127.0.0.1 9766 infrared 848 480 30 50 /dev/dri/renderD128 1000000
./realsense-nhve-hevc 127.0.0.1 9766 infrared 640 360 30 50 /dev/dri/renderD128 1000000
Now H264
/realsense-nhve-h264 127.0.0.1 9766 infrared 848 480 30 5 /dev/dri/renderD128 1000000
/realsense-nhve-h264 127.0.0.1 9766 infrared 640 360 30 5 /dev/dri/renderD128 1000000
scenario | i7-7820hk | LPA m3-7y30 |
---|---|---|
848x480 depth HEVC Main10 | 7-9 ms | 8-10 ms |
640x360 depth HEVC Main10 | 5-6 ms | 6-7 ms |
848x480 ir HEVC Main | 5-8 ms | 6-8 ms |
848x480 ir H264 | 3-5 ms | 3-5 ms |
640x360 ir H264 | 3-4 ms | 3-4 ms |
Encoding at resolution up to 848x480 takes less than 10 ms in all tested scenarios.
This means that:
Side note - Full HD HEVC would need optimizations for 60 fps (15-17 ms encoding time).
The above benchmark was with default ffmpeg/VAAPI compression level.
It is possible to specify quality/time trade-off with compression_level.
Notes:
intel_gpu_top
and timings (0 is probably driver default)With i7-7820HK Laptop (KabyLake) and:
./realsense-nhve-hevc 192.168.0.100 9768 depth 848 480 30 500 /dev/dri/renderD128 80000000 0.000025
This suggests that compression_level should be exposed as option, see HVE#6
Benchmark time needed for encoding to HEVC Main10 including upload to hardware encoding, download from hardware.
Related to hardware-video-streaming#4