Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72e257b1ee | ||
|
|
b845f30454 | ||
|
|
3aa60efbde | ||
|
|
84ef968dc3 | ||
|
|
a1b94f1dfc | ||
|
|
d8c8020d84 | ||
|
|
6e6dfc68fc | ||
|
|
5307f2fe62 |
+1
-1
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.25)
|
||||
cmake_minimum_required(VERSION 3.28)
|
||||
project(WiVRn VERSION 0.0.0 LANGUAGES C CXX)
|
||||
|
||||
# Set default for FetchContent projects
|
||||
|
||||
@@ -93,7 +93,8 @@ modules:
|
||||
url: https://www.mpfr.org/mpfr-4.2.1/mpfr-4.2.1.tar.xz
|
||||
sha256: 277807353a6726978996945af13e52829e3abd7a9a5b7fb2793894e18f1fcbb2
|
||||
- type: file
|
||||
url: https://libisl.sourceforge.io/isl-0.26.tar.xz
|
||||
dest-filename: isl-0.26.tar.xz
|
||||
url: https://sourceforge.net/projects/libisl/files/isl-0.26.tar.xz/download
|
||||
sha256: a0b5cb06d24f9fa9e77b55fabbe9a3c94a336190345c2555f9915bb38e976504
|
||||
- type: file
|
||||
url: https://www.multiprecision.org/downloads/mpc-1.3.1.tar.gz
|
||||
|
||||
@@ -190,7 +190,7 @@ static std::optional<wivrn::video_codec> filter_codecs_vaapi(wivrn_vk_bundle & b
|
||||
#endif
|
||||
|
||||
#if WIVRN_USE_NVENC
|
||||
static bool probe_nvenc(wivrn_vk_bundle & bundle)
|
||||
static bool probe_nvenc(wivrn_vk_bundle & bundle, int bit_depth)
|
||||
{
|
||||
static bool res = [&]() {
|
||||
encoder_settings s{
|
||||
@@ -204,6 +204,7 @@ static bool probe_nvenc(wivrn_vk_bundle & bundle)
|
||||
encoder_nvenc,
|
||||
default_bitrate,
|
||||
};
|
||||
s.bit_depth = bit_depth;
|
||||
try
|
||||
{
|
||||
video_encoder_nvenc test(bundle, s, 60, 0);
|
||||
@@ -225,9 +226,7 @@ static void fill_defaults(wivrn_vk_bundle & bundle, const std::vector<wivrn::vid
|
||||
if (is_nvidia(*bundle.physical_device))
|
||||
{
|
||||
#if WIVRN_USE_NVENC
|
||||
if (bit_depth != 8)
|
||||
U_LOG_W("nvenc encoder does not support %d-bit encoding (set 8-bit to use nvenc)", bit_depth);
|
||||
else if (probe_nvenc(bundle))
|
||||
if (probe_nvenc(bundle, bit_depth))
|
||||
config.name = encoder_nvenc;
|
||||
else
|
||||
#else
|
||||
|
||||
@@ -336,7 +336,7 @@ void video_encoder::SendData(std::span<uint8_t> data, bool end_of_frame, bool co
|
||||
auto end = data.end();
|
||||
while (begin != end)
|
||||
{
|
||||
const size_t max_payload_size = to_headset::video_stream_data_shard::max_payload_size - serialized_size(shard.view_info);
|
||||
const size_t max_payload_size = std::max(0z, ssize_t(to_headset::video_stream_data_shard::max_payload_size) - ssize_t(serialized_size(shard.view_info)));
|
||||
auto next = std::min(end, begin + max_payload_size);
|
||||
if (next == end)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user