Tweak default values, fix docs
default client scale: 1.0 -> 1.4 default server scale: 0.8 -> 0.5 (0.35 if eye tracked) added docs for av1 as default when supported fixed docs about multiple encoders, it's not enabled by default
This commit is contained in:
@@ -41,7 +41,7 @@ public:
|
|||||||
|
|
||||||
std::map<std::string, server_data> servers;
|
std::map<std::string, server_data> servers;
|
||||||
float preferred_refresh_rate = 0;
|
float preferred_refresh_rate = 0;
|
||||||
float resolution_scale = 1.0;
|
float resolution_scale = 1.4;
|
||||||
bool show_performance_metrics = false;
|
bool show_performance_metrics = false;
|
||||||
bool microphone = false;
|
bool microphone = false;
|
||||||
bool passthrough_enabled = false;
|
bool passthrough_enabled = false;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Configurable items:
|
# Configurable items:
|
||||||
## `scale`
|
## `scale`
|
||||||
Default value: `0.8`
|
Default value: `0.5`, `0.35` if headset supports eye tracking
|
||||||
|
|
||||||
Controls the size of the video stream, either a number between 0 and 1 or a pair of numbers between 0 and 1. If two numbers are provided the first one is horizontal scale and the second vertical.
|
Controls the size of the video stream, either a number between 0 and 1 or a pair of numbers between 0 and 1. If two numbers are provided the first one is horizontal scale and the second vertical.
|
||||||
Scaling is applied in a foveated fashion: the center has a 1:1 ratio and the rest is scaled so that the total number of pixels matches the desired scale.
|
Scaling is applied in a foveated fashion: the center has a 1:1 ratio and the rest is scaled so that the total number of pixels matches the desired scale.
|
||||||
@@ -28,7 +28,7 @@ Bitrate of the video, in bit/s. Split among decoders based on size and codecs.
|
|||||||
## `encoders`
|
## `encoders`
|
||||||
A list of encoders to use.
|
A list of encoders to use.
|
||||||
|
|
||||||
Default value: single encoder if using Nvidia or software encoding. Split into 3 sequential parts (1/8th, 3/8th, 4/8th) if using vaapi.
|
Default value: single encoder.
|
||||||
|
|
||||||
WiVRn has the ability to split the video in blocks that are processed independently, this may use resources more effectively and reduce latency.
|
WiVRn has the ability to split the video in blocks that are processed independently, this may use resources more effectively and reduce latency.
|
||||||
All the provided encoders are put into groups, groups are executed concurrently and items within a group are processed sequentially.
|
All the provided encoders are put into groups, groups are executed concurrently and items within a group are processed sequentially.
|
||||||
@@ -39,7 +39,7 @@ Default value: `nvenc` if Nvidia GPU and compiled with cuda, `vaapi` for all oth
|
|||||||
Identifier of the encoder, one of `x264` (software encoding), `nvenc` (Nvidia hardware encoding), `vaapi` (AMD/Intel hardware encoding)
|
Identifier of the encoder, one of `x264` (software encoding), `nvenc` (Nvidia hardware encoding), `vaapi` (AMD/Intel hardware encoding)
|
||||||
|
|
||||||
### `codec`
|
### `codec`
|
||||||
Default value: `h265`
|
Default value: `av1` if supported by both headset and hardware encoder, else `h265`.
|
||||||
|
|
||||||
One of `h264`, `h265` or `av1`. If using `x264` encoder, value is ignored and `h264` is used. `av1` is only supported on `vaapi` encoder.
|
One of `h264`, `h265` or `av1`. If using `x264` encoder, value is ignored and `h264` is used. `av1` is only supported on `vaapi` encoder.
|
||||||
|
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ static bool comp_wivrn_init_post_vulkan(struct comp_target * ct, uint32_t prefer
|
|||||||
*cn->wivrn_bundle,
|
*cn->wivrn_bundle,
|
||||||
cn->c->settings.preferred.width,
|
cn->c->settings.preferred.width,
|
||||||
cn->c->settings.preferred.height,
|
cn->c->settings.preferred.height,
|
||||||
cn->cnx->get_info().supported_codecs);
|
cn->cnx->get_info());
|
||||||
print_encoders(cn->settings);
|
print_encoders(cn->settings);
|
||||||
}
|
}
|
||||||
catch (const std::exception & e)
|
catch (const std::exception & e)
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ static void make_even(uint16_t & value, uint16_t max)
|
|||||||
value = std::min(value, max);
|
value = std::min(value, max);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<encoder_settings> xrt::drivers::wivrn::get_encoder_settings(wivrn_vk_bundle & bundle, uint32_t & width, uint32_t & height, const std::vector<xrt::drivers::wivrn::video_codec> & headset_codecs)
|
std::vector<encoder_settings> xrt::drivers::wivrn::get_encoder_settings(wivrn_vk_bundle & bundle, uint32_t & width, uint32_t & height, const from_headset::headset_info_packet & info)
|
||||||
{
|
{
|
||||||
configuration config;
|
configuration config;
|
||||||
try
|
try
|
||||||
@@ -240,9 +240,11 @@ std::vector<encoder_settings> xrt::drivers::wivrn::get_encoder_settings(wivrn_vk
|
|||||||
U_LOG_E("Failed to read encoder configuration: %s", e.what());
|
U_LOG_E("Failed to read encoder configuration: %s", e.what());
|
||||||
}
|
}
|
||||||
if (config.encoders.empty())
|
if (config.encoders.empty())
|
||||||
config.encoders = get_encoder_default_settings(bundle, headset_codecs);
|
config.encoders = get_encoder_default_settings(bundle, info.supported_codecs);
|
||||||
uint64_t bitrate = config.bitrate.value_or(default_bitrate);
|
uint64_t bitrate = config.bitrate.value_or(default_bitrate);
|
||||||
auto scale = config.scale.value_or(std::array<double, 2>{0.8, 0.8});
|
std::array<double, 2> default_scale;
|
||||||
|
default_scale.fill(info.eye_gaze ? 0.35 : 0.5);
|
||||||
|
auto scale = config.scale.value_or(default_scale);
|
||||||
for (const auto & encoder: config.encoders)
|
for (const auto & encoder: config.encoders)
|
||||||
{
|
{
|
||||||
check_scale(encoder.name,
|
check_scale(encoder.name,
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ struct encoder_settings : public to_headset::video_stream_description::item
|
|||||||
std::optional<std::string> device;
|
std::optional<std::string> device;
|
||||||
};
|
};
|
||||||
|
|
||||||
std::vector<encoder_settings> get_encoder_settings(wivrn_vk_bundle &, uint32_t & width, uint32_t & height, const std::vector<xrt::drivers::wivrn::video_codec> & headset_codecs);
|
std::vector<encoder_settings> get_encoder_settings(wivrn_vk_bundle &, uint32_t & width, uint32_t & height, const from_headset::headset_info_packet & info);
|
||||||
|
|
||||||
} // namespace xrt::drivers::wivrn
|
} // namespace xrt::drivers::wivrn
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user