Compare commits

...
3 changed files with 6 additions and 6 deletions
+2 -1
View File
@@ -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
+3 -4
View File
@@ -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
+1 -1
View File
@@ -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)
{