From 9a5af1a0cadccf4a327c90520662a1dd5edaaee9 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Thu, 4 Sep 2025 17:26:08 +0200 Subject: [PATCH] Default to 2 encoder split --- docs/configuration.md | 2 +- server/encoder/encoder_settings.cpp | 22 +++++----------------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 3ee6ad01..5c2785b3 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -44,7 +44,7 @@ Bit depth of the video. 8-bit is supported by all encoders. 10-bit is supported ## `encoders` A list of encoders to use. -Default value: 3 encoders in order 1/8th, 3/8th and 4/8th of the image. +Default value: one encoder per eye 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. diff --git a/server/encoder/encoder_settings.cpp b/server/encoder/encoder_settings.cpp index 6fd30ad8..7a383007 100644 --- a/server/encoder/encoder_settings.cpp +++ b/server/encoder/encoder_settings.cpp @@ -307,34 +307,22 @@ static std::vector get_encoder_default_settings(wivrn_vk #ifdef WIVRN_SPLIT_ENCODERS if (base.name != encoder_x264) { - /* Split in 3 parts: + /* Split in 2 parts: * +--------+--------+ * | | | - * | | | - * +--------+ | - * | | | - * | | | - * | | | - * | | | + * | left | right | + * | eye | eye | * | | | * +--------+--------+ - * All 3 are encoded sequentially, so that the smallest is ready earlier. + * Encoded sequentially, so the first eye is ready and transmitted earlier. * Decoder can start work as fast as possible, reducing idle time. + * Splitting on eye boundaries allows for fast-path on headset. * */ return { { .name = base.name, .width = 0.5, - .height = 0.25, - .group = 0, - .codec = base.codec, - }, - { - .name = base.name, - .width = 0.5, - .height = 0.75, - .offset_y = 0.25, .group = 0, .codec = base.codec, },