Limit default encoded size to 4096 pixels wide
This commit is contained in:
@@ -212,10 +212,16 @@ wivrn_hmd::wivrn_hmd(std::shared_ptr<xrt::drivers::wivrn::wivrn_session> cnx,
|
||||
|
||||
const auto config = configuration::read_user_configuration();
|
||||
|
||||
auto eye_width = info.recommended_eye_width; // * config.scale.value_or(1);
|
||||
auto eye_height = info.recommended_eye_height; // * config.scale.value_or(1);
|
||||
auto eye_width = info.recommended_eye_width;
|
||||
auto eye_height = info.recommended_eye_height;
|
||||
auto scale = config.scale.value_or(std::array<double, 2>{0.8, 0.8});
|
||||
int foveated_eye_width = info.recommended_eye_width * scale[0];
|
||||
if (foveated_eye_width > 2048 and not config.scale)
|
||||
{
|
||||
scale[1] = scale[0] = 2048. / info.recommended_eye_width;
|
||||
U_LOG_I("Encoded video would be %d wide, setting scale to %f", 2 * foveated_eye_width, scale[0]);
|
||||
foveated_eye_width = info.recommended_eye_width * scale[0];
|
||||
}
|
||||
int foveated_eye_height = info.recommended_eye_height * scale[1];
|
||||
foveated_eye_height += foveated_eye_height % 2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user