From 8357b9ddb1fa1f42192cec6c4a86b02859766df3 Mon Sep 17 00:00:00 2001 From: Darren Baldwin <68653294+DarrenBaldwin07@users.noreply.github.com> Date: Thu, 19 Nov 2026 00:44:47 -0500 Subject: [PATCH 1/2] perf: build x264 with patches that skip unchanged macroblocks --- README.md | 6 + default.nix | 3 +- ...t-macroblocks-without-analysing-them.patch | 185 ++++++++++++++++++ ...y-the-input-macroblocks-that-changed.patch | 164 ++++++++++++++++ ...he-lowres-blocks-whose-input-changed.patch | 98 ++++++++++ ...es-whole-and-changed-luma-with-the-S.patch | 67 +++++++ ...the-full-path-would-at-emergency-QPs.patch | 34 ++++ ...-runs-to-the-AVX-512-copy-s-64-bytes.patch | 46 +++++ shell.nix | 3 +- x264.nix | 21 ++ 10 files changed, 625 insertions(+), 2 deletions(-) create mode 100644 patches/x264/0001-Skip-constant-macroblocks-without-analysing-them.patch create mode 100644 patches/x264/0002-Copy-only-the-input-macroblocks-that-changed.patch create mode 100644 patches/x264/0003-Filter-only-the-lowres-blocks-whose-input-changed.patch create mode 100644 patches/x264/0004-Copy-large-changes-whole-and-changed-luma-with-the-S.patch create mode 100644 patches/x264/0005-Skip-constant-macroblocks-only-where-the-full-path-would-at-emergency-QPs.patch create mode 100644 patches/x264/0006-Align-changed-luma-runs-to-the-AVX-512-copy-s-64-bytes.patch create mode 100644 x264.nix diff --git a/README.md b/README.md index 0eac25f3..ca8feaaf 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,12 @@ cargo build --release On Linux, `--no-default-features` leaves out PulseAudio, and with it desktop audio: a voxl that can be linked statically (musl) and runs without PulseAudio's libraries. +`nix-shell` and `default.nix` build x264 with the patches in +[`patches/x264`](patches/x264) ([`x264.nix`](x264.nix)), which skip the work x264 does +on macroblocks voxl's damage map marks unchanged: a frame where a small window changed +encodes in about 40% less time, and the stream comes out bit for bit the same. voxl +builds against a stock x264 too, without the savings. + Or install it from [crates.io](https://crates.io/crates/voxl-server) with the same libraries on your system (the crate is `voxl-server`, the binary is `voxl`): diff --git a/default.nix b/default.nix index 1dc80b9c..ad890d25 100644 --- a/default.nix +++ b/default.nix @@ -42,7 +42,8 @@ rustPlatform.buildRustPackage { ''; buildInputs = [ - x264 + # x264 patched to skip the macroblocks voxl's damage map marks unchanged. + (import ./x264.nix {inherit x264;}) libyuv libopus libpulseaudio diff --git a/patches/x264/0001-Skip-constant-macroblocks-without-analysing-them.patch b/patches/x264/0001-Skip-constant-macroblocks-without-analysing-them.patch new file mode 100644 index 00000000..b11f6aaf --- /dev/null +++ b/patches/x264/0001-Skip-constant-macroblocks-without-analysing-them.patch @@ -0,0 +1,185 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: thelamer +Date: Wed, 4 Nov 2026 23:09:25 -0500 +Subject: [PATCH 1/6] Skip constant macroblocks without analysing them + +A P macroblock the caller's mb_info marks constant, which the mb_info fast skip in +x264_macroblock_analyse would code as P_SKIP (the reference is the previous frame at this +macroblock's analysis QP or finer, no weighted prediction) and whose P_SKIP vector is zero, is +coded in the slice loop directly: the reference's pixels become the reconstruction, and the +per-macroblock arrays, the 16x16 vectors later macroblocks and the next frame predict from, the +intra border backup, and the cache column the next macroblock's left neighbour comes from are +left as the full path leaves them. Only CAVLC slices without deblocking, MBAFF, or intra refresh +take it, and a row's first macroblock always takes the full path, whose analysis sets the row's +vertical vector limits. + +The stream is bit for bit the full path's: single-threaded (the sliced threads' VBV row control +reads the other slices' progress, so it repeats only on one thread), 1080p, 720p and 1366x770, +CRF and VBV, 4:2:0, 4:4:4 and 10-bit, a video box beside still text and a scroll with the +cleanup's quantizer offsets. At 2560x1600 with four sliced threads, a frame where a 256x256 +area changed took 3.76 ms where the full path took 4.26 under CRF, and 4.11 against 4.44 under +VBV. +--- + encoder/encoder.c | 128 ++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 128 insertions(+) + +diff --git a/encoder/encoder.c b/encoder/encoder.c +index c2effa2..56f9821 100644 +--- a/encoder/encoder.c ++++ b/encoder/encoder.c +@@ -2756,6 +2756,107 @@ static ALWAYS_INLINE void bitstream_restore( x264_t *h, x264_bs_bak_t *bak, int + } + } + ++/* Code the macroblock at (mb_x, mb_y) as the P_SKIP analysis would take for it, without ++ * loading, analysing, or encoding it: one the caller's mb_info marks constant, where the ++ * mb_info fast skip in x264_macroblock_analyse holds (the reference is the previous frame, at ++ * this macroblock's analysis QP or finer, without weighted prediction) and the P_SKIP vector ++ * is zero. A row's first macroblock always takes the full path, whose analysis sets the ++ * row's vertical vector limits every later macroblock of the row searches and compensates ++ * within. The reference's pixels are the reconstruction, and the macroblock's state is left ++ * as x264_macroblock_cache_save leaves a P_SKIP's: the per-macroblock arrays its neighbours ++ * and the next frame read, the intra border backup, and the right column of the cache the next ++ * macroblock takes its left neighbour from. The stream comes out bit for bit as the full path ++ * codes it; returns 0, leaving everything untouched, wherever the full path would decide. */ ++static int macroblock_skip_constant( x264_t *h, int mb_x, int mb_y ) ++{ ++ const int mb_xy = mb_x + mb_y * h->mb.i_mb_stride; ++ if( mb_x == 0 || !(h->fdec->mb_info[mb_xy] & X264_MBINFO_CONSTANT) ) ++ return 0; ++ const int s8x8 = h->mb.i_b8_stride; ++ const int s4x4 = h->mb.i_b4_stride; ++ const int b8_xy = 2*(mb_y * s8x8 + mb_x); ++ const int b4_xy = 4*(mb_y * s4x4 + mb_x); ++ const int first = h->sh.i_first_mb; ++ ++ /* P_SKIP's vector is zero where a neighbour is unavailable or one predicts from reference 0 ++ * with a zero vector (x264_mb_predict_mv_pskip); a median that comes to zero takes the full ++ * path. */ ++ int zero = h->mb.slice_table[mb_xy - 1] != first ++ || mb_y == 0 || h->mb.slice_table[mb_xy - h->mb.i_mb_stride] != first; ++ if( !zero ) ++ zero = !( h->mb.ref[0][b8_xy - 1] | M32( h->mb.mv[0][b4_xy - 1] ) ) ++ || !( h->mb.ref[0][b8_xy - s8x8] | M32( h->mb.mv[0][b4_xy - s4x4] ) ); ++ if( !zero ) ++ return 0; ++ ++ h->mb.i_mb_x = mb_x; ++ h->mb.i_mb_y = mb_y; ++ h->mb.i_mb_xy = mb_xy; ++ h->mb.i_b8_xy = b8_xy; ++ h->mb.i_b4_xy = b4_xy; ++ int qp = x264_ratecontrol_mb_qp( h ); ++ if( h->param.rc.i_aq_mode && h->param.analyse.i_subpel_refine < 10 ) ++ qp = abs(qp - h->mb.i_last_qp) == 1 ? h->mb.i_last_qp : qp; ++ if( h->fref[0][0]->effective_qp[mb_xy] > qp ) ++ return 0; ++ h->fdec->effective_qp[mb_xy] = qp; ++ ++ for( int p = 0; p < (CHROMA444 ? 3 : 1); p++ ) ++ { ++ int stride = h->fdec->i_stride[p]; ++ int off = 16 * mb_x + 16 * mb_y * stride; ++ pixel *dst = &h->fdec->plane[p][off]; ++ h->mc.copy[PIXEL_16x16]( dst, stride, &h->fref[0][0]->plane[p][off], stride, 16 ); ++ memcpy( &h->intra_border_backup[mb_y&1][p][mb_x*16], dst + 15*stride, 16*SIZEOF_PIXEL ); ++ for( int j = 0; j < 16; j++ ) ++ h->mb.pic.p_fdec[p][15 + j*FDEC_STRIDE] = dst[15 + j*stride]; ++ } ++ if( CHROMA_FORMAT && !CHROMA444 ) ++ { ++ int height = 16 >> CHROMA_V_SHIFT; ++ int stride = h->fdec->i_stride[1]; ++ int off = 16 * mb_x + height * mb_y * stride; ++ pixel *dst = &h->fdec->plane[1][off]; ++ h->mc.copy[PIXEL_16x16]( dst, stride, &h->fref[0][0]->plane[1][off], stride, height ); ++ pixel *last = dst + (height - 1) * stride; ++ for( int i = 0; i < 8; i++ ) ++ { ++ h->intra_border_backup[mb_y&1][1][mb_x*16 + i] = last[2*i]; ++ h->intra_border_backup[mb_y&1][1][mb_x*16 + 8 + i] = last[2*i + 1]; ++ } ++ for( int j = 0; j < height; j++ ) ++ { ++ h->mb.pic.p_fdec[1][7 + j*FDEC_STRIDE] = dst[14 + j*stride]; ++ h->mb.pic.p_fdec[2][7 + j*FDEC_STRIDE] = dst[15 + j*stride]; ++ } ++ } ++ ++ h->mb.i_type = P_SKIP; ++ h->mb.i_partition = D_16x16; ++ h->mb.i_cbp_luma = h->mb.i_cbp_chroma = 0; ++ h->mb.b_transform_8x8 = 0; ++ h->mb.type[mb_xy] = P_SKIP; ++ h->mb.slice_table[mb_xy] = first; ++ h->mb.partition[mb_xy] = D_16x16; ++ h->mb.i_mb_prev_xy = mb_xy; ++ M64( h->mb.intra4x4_pred_mode[mb_xy] ) = h->param.b_constrained_intra ++ ? (uint8_t)(-1) * 0x0101010101010101ULL : I_PRED_4x4_DC * 0x0101010101010101ULL; ++ h->mb.i_qp = h->mb.i_last_qp; ++ h->mb.qp[mb_xy] = h->mb.i_qp; ++ h->mb.i_last_dqp = 0; ++ memset( h->mb.non_zero_count[mb_xy], 0, sizeof(h->mb.non_zero_count[0]) ); ++ h->mb.cbp[mb_xy] = 0; ++ h->mb.mb_transform_size[mb_xy] = 0; ++ M16( &h->mb.ref[0][b8_xy] ) = 0; ++ M16( &h->mb.ref[0][b8_xy + s8x8] ) = 0; ++ for( int j = 0; j < 4; j++ ) ++ M128( &h->mb.mv[0][b4_xy + j*s4x4] ) = M128_ZERO; ++ /* The 16x16 vectors later macroblocks and the next frame predict motion from. */ ++ for( int i = 0; i < h->i_ref[0]; i++ ) ++ M32( h->mb.mvr[0][i][mb_xy] ) = 0; ++ return 1; ++} ++ + static intptr_t slice_write( x264_t *h ) + { + int i_skip; +@@ -2773,6 +2874,9 @@ static intptr_t slice_write( x264_t *h ) + int b_hpel = h->fdec->b_kept_as_ref; + int orig_last_mb = h->sh.i_last_mb; + int thread_last_mb = h->i_threadslice_end * h->mb.i_mb_width - 1; ++ int b_skip_constant = h->fdec->mb_info && h->sh.i_type == SLICE_TYPE_P && !h->param.b_cabac ++ && !SLICE_MBAFF && !PARAM_INTERLACED && !h->sh.b_weighted_pred && !h->param.b_intra_refresh ++ && h->fdec->i_frame - h->fref[0][0]->i_frame == 1; + uint8_t *last_emu_check; + #define BS_BAK_SLICE_MAX_SIZE 0 + #define BS_BAK_CAVLC_OVERFLOW 1 +@@ -2780,6 +2884,7 @@ static intptr_t slice_write( x264_t *h ) + #define BS_BAK_ROW_VBV 3 + x264_bs_bak_t bs_bak[4]; + b_deblock &= b_hpel || h->param.b_full_recon || h->param.psz_dump_yuv; ++ b_skip_constant &= !b_deblock; + bs_realign( &h->out.bs ); + + /* Slice */ +@@ -2859,6 +2964,29 @@ static intptr_t slice_write( x264_t *h ) + h->mb.field[mb_xy] = MB_INTERLACED; + } + ++ if( b_skip_constant && !h->mb.b_reencode_mb && macroblock_skip_constant( h, i_mb_x, i_mb_y ) ) ++ { ++ i_skip++; ++ if( x264_ratecontrol_mb( h, 0 ) < 0 ) ++ { ++ bitstream_restore( h, &bs_bak[BS_BAK_ROW_VBV], &i_skip, 1 ); ++ h->mb.b_reencode_mb = 1; ++ i_mb_x = 0; ++ h->mb.i_mb_prev_xy = i_mb_y * h->mb.i_mb_stride - 1; ++ h->sh.i_last_mb = orig_last_mb; ++ continue; ++ } ++ h->stat.frame.i_mb_count[P_SKIP]++; ++ if( mb_xy == h->sh.i_last_mb ) ++ break; ++ if( ++i_mb_x == h->mb.i_mb_width ) ++ { ++ i_mb_y++; ++ i_mb_x = 0; ++ } ++ continue; ++ } ++ + /* load cache */ + if( SLICE_MBAFF ) + x264_macroblock_cache_load_interlaced( h, i_mb_x, i_mb_y ); diff --git a/patches/x264/0002-Copy-only-the-input-macroblocks-that-changed.patch b/patches/x264/0002-Copy-only-the-input-macroblocks-that-changed.patch new file mode 100644 index 00000000..2b517617 --- /dev/null +++ b/patches/x264/0002-Copy-only-the-input-macroblocks-that-changed.patch @@ -0,0 +1,164 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: thelamer +Date: Wed, 4 Nov 2026 23:38:11 -0500 +Subject: [PATCH 2/6] Copy only the input macroblocks that changed + +Input frames are recycled, so a recycled frame already holds the picture of the input frame it +last took, and on a screen where little changes nearly all of it is still current. x264 keeps +the input frame that last changed each macroblock, from the caller's mb_info +(X264_MBINFO_CONSTANT; a frame without mb_info changes all of them), and each frame the input +frame its planes hold, and copies planar 4:2:0 and 4:4:4 input only where a macroblock changed +since: a run of them along a row at a time, through the C copies, since the SIMD ones store +non-temporally to aligned addresses a run need not start at. Other formats, and a frame holding +nothing of the stream, copy whole. + +Every stream the skip of constant macroblocks was checked on comes out bit for bit the same. +At 2560x1600, a frame where a 256x256 area changed took 3.28 ms where it took 3.76 under CRF, +and 3.72 against 4.11 under VBV; a frame that changed whole is unchanged. +--- + common/common.h | 4 +++ + common/frame.c | 76 +++++++++++++++++++++++++++++++++++++++++++++++ + common/frame.h | 1 + + encoder/encoder.c | 1 + + 4 files changed, 82 insertions(+) + +diff --git a/common/common.h b/common/common.h +index a22e224..429c33b 100644 +--- a/common/common.h ++++ b/common/common.h +@@ -392,6 +392,10 @@ struct x264_t + * I frame and the next P or I frame, else -1 */ + + int i_input; /* Number of input frames already accepted */ ++ /* The input frame that last changed each macroblock, from the caller's mb_info, and ++ * the last to change all of them (one without mb_info). */ ++ int *mb_input_changed; ++ int i_input_all_changed; + + int i_max_dpb; /* Number of frames allocated in the decoded picture buffer */ + int i_max_ref0; +diff --git a/common/frame.c b/common/frame.c +index 7f19e1b..23b6e2f 100644 +--- a/common/frame.c ++++ b/common/frame.c +@@ -79,6 +79,7 @@ static x264_frame_t *frame_new( x264_t *h, int b_fdec ) + #endif + + CHECKED_MALLOCZERO( frame, sizeof(x264_frame_t) ); ++ frame->i_input_frame = -1; + PREALLOC_INIT + + /* allocate frame data (+64 for extra data for me) */ +@@ -360,6 +361,79 @@ static int get_plane_ptr( x264_t *h, x264_picture_t *src, uint8_t **pix, int *st + + #define get_plane_ptr(...) do { if( get_plane_ptr(__VA_ARGS__) < 0 ) return -1; } while( 0 ) + ++/* Copy into dst only the macroblocks of src that changed since the input frame dst's planes ++ * hold, for planar 4:2:0 and 4:4:4: the input frames are recycled, so on a screen where little ++ * changes most of a recycled frame already holds the picture. Which input frame last changed ++ * each macroblock comes from the caller's mb_info (X264_MBINFO_CONSTANT), a frame without it ++ * changing all of them. Returns 0, having copied nothing, where the whole picture is to be ++ * copied: another format, or a frame holding nothing of the stream. */ ++static int frame_copy_changed( x264_t *h, x264_frame_t *dst, x264_picture_t *src, int i_csp ) ++{ ++ const int n = h->frames.i_input; ++ const int mb_w = h->mb.i_mb_width, mb_h = h->mb.i_mb_height; ++ uint8_t *info = h->param.analyse.b_mb_info ? src->prop.mb_info : NULL; ++ if( !h->frames.mb_input_changed ) ++ { ++ h->frames.mb_input_changed = x264_malloc( mb_w * mb_h * sizeof(int) ); ++ if( !h->frames.mb_input_changed ) ++ return 0; ++ for( int i = 0; i < mb_w * mb_h; i++ ) ++ h->frames.mb_input_changed[i] = -1; ++ } ++ int *changed = h->frames.mb_input_changed; ++ if( info ) ++ { ++ for( int i = 0; i < mb_w * mb_h; i++ ) ++ if( !(info[i] & X264_MBINFO_CONSTANT) ) ++ changed[i] = n; ++ } ++ else ++ h->frames.i_input_all_changed = n; ++ int held = dst->i_input_frame; ++ dst->i_input_frame = n; ++ int planar420 = i_csp == X264_CSP_I420; ++ int planar444 = i_csp == X264_CSP_I444; ++ if( held < 0 || h->frames.i_input_all_changed > held || !(planar420 || planar444) ) ++ return 0; ++ ++ uint8_t *pix[3]; ++ int stride[3]; ++ get_plane_ptr( h, src, &pix[0], &stride[0], 0, 0, 0 ); ++ get_plane_ptr( h, src, &pix[1], &stride[1], 1, planar420, planar420 ); ++ get_plane_ptr( h, src, &pix[2], &stride[2], 2, planar420, planar420 ); ++ for( int y = 0; y < mb_h; y++ ) ++ { ++ int rows = X264_MIN( 16, h->param.i_height - 16*y ); ++ for( int x = 0; x < mb_w; ) ++ { ++ if( changed[x + y*mb_w] <= held ) ++ { ++ x++; ++ continue; ++ } ++ int x0 = x; ++ while( x < mb_w && (changed[x + y*mb_w] > held) ) ++ x++; ++ int cols = X264_MIN( 16*(x - x0), h->param.i_width - 16*x0 ); ++ if( cols <= 0 || rows <= 0 ) ++ continue; ++ /* The SIMD copies store non-temporally to aligned addresses a run need not start at. */ ++ x264_plane_copy_c( dst->plane[0] + 16*x0 + 16*y*dst->i_stride[0], dst->i_stride[0], ++ (pixel*)pix[0] + 16*x0 + 16*y*(stride[0]/SIZEOF_PIXEL), stride[0]/SIZEOF_PIXEL, cols, rows ); ++ if( planar420 ) ++ x264_plane_copy_interleave_c( dst->plane[1] + 16*x0 + 8*y*dst->i_stride[1], dst->i_stride[1], ++ (pixel*)pix[1] + 8*x0 + 8*y*(stride[1]/SIZEOF_PIXEL), stride[1]/SIZEOF_PIXEL, ++ (pixel*)pix[2] + 8*x0 + 8*y*(stride[2]/SIZEOF_PIXEL), stride[2]/SIZEOF_PIXEL, ++ (cols+1)>>1, (rows+1)>>1 ); ++ else ++ for( int p = 1; p < 3; p++ ) ++ x264_plane_copy_c( dst->plane[p] + 16*x0 + 16*y*dst->i_stride[p], dst->i_stride[p], ++ (pixel*)pix[p] + 16*x0 + 16*y*(stride[p]/SIZEOF_PIXEL), stride[p]/SIZEOF_PIXEL, cols, rows ); ++ } ++ } ++ return 1; ++} ++ + int x264_frame_copy_picture( x264_t *h, x264_frame_t *dst, x264_picture_t *src ) + { + int i_csp = src->img.i_csp & X264_CSP_MASK; +@@ -409,6 +483,8 @@ int x264_frame_copy_picture( x264_t *h, x264_frame_t *dst, x264_picture_t *src ) + + uint8_t *pix[3]; + int stride[3]; ++ if( frame_copy_changed( h, dst, src, i_csp ) ) ++ return 0; + if( i_csp == X264_CSP_YUYV || i_csp == X264_CSP_UYVY ) + { + int p = i_csp == X264_CSP_UYVY; +diff --git a/common/frame.h b/common/frame.h +index c66bcc5..18cdcad 100644 +--- a/common/frame.h ++++ b/common/frame.h +@@ -54,6 +54,7 @@ typedef struct x264_frame + x264_param_t *param; + + int i_frame; /* Presentation frame number */ ++ int i_input_frame; /* The input frame whose pixels the planes hold, -1 for none */ + int i_coded; /* Coded frame number */ + int64_t i_field_cnt; /* Presentation field count */ + int i_frame_num; /* 7.4.3 frame_num */ +diff --git a/encoder/encoder.c b/encoder/encoder.c +index 56f9821..b88ffca 100644 +--- a/encoder/encoder.c ++++ b/encoder/encoder.c +@@ -4338,6 +4338,7 @@ void x264_encoder_close ( x264_t *h ) + || h->stat.i_mb_count[SLICE_TYPE_B][I_PCM]; + + x264_lookahead_delete( h ); ++ x264_free( h->frames.mb_input_changed ); + + #if HAVE_OPENCL + x264_opencl_lookahead_delete( h ); diff --git a/patches/x264/0003-Filter-only-the-lowres-blocks-whose-input-changed.patch b/patches/x264/0003-Filter-only-the-lowres-blocks-whose-input-changed.patch new file mode 100644 index 00000000..fc5c8f5d --- /dev/null +++ b/patches/x264/0003-Filter-only-the-lowres-blocks-whose-input-changed.patch @@ -0,0 +1,98 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: thelamer +Date: Wed, 4 Nov 2026 23:53:28 -0500 +Subject: [PATCH 3/6] Filter only the lowres blocks whose input changed + +A recycled input frame's lowres planes hold the input frame they were filtered from (its +i_lowres_frame), so only a block whose 16x16 macroblock, or the column or row of the next ones +the filter reads, changed since (h->frames.mb_input_changed) is filtered again. After the copy +of the changed macroblocks the planes hold the current picture everywhere, so each run is +widened to eight blocks either side, the alignment the SIMD core loads and stores at from a +row's start, and filtered there; a frame holding nothing, or one after a frame without mb_info, +is filtered whole. + +Every stream checked before comes out bit for bit the same. At 2560x1600, a frame where a +256x256 area changed took 2.80 ms where it took 3.28 under CRF; a frame whose change leaves a +32-pixel margin took 7.71 against 7.78. +--- + common/frame.c | 2 +- + common/frame.h | 1 + + common/mc.c | 40 ++++++++++++++++++++++++++++++++++++++-- + 3 files changed, 40 insertions(+), 3 deletions(-) + +diff --git a/common/frame.c b/common/frame.c +index 23b6e2f..6014e2d 100644 +--- a/common/frame.c ++++ b/common/frame.c +@@ -79,7 +79,7 @@ static x264_frame_t *frame_new( x264_t *h, int b_fdec ) + #endif + + CHECKED_MALLOCZERO( frame, sizeof(x264_frame_t) ); +- frame->i_input_frame = -1; ++ frame->i_input_frame = frame->i_lowres_frame = -1; + PREALLOC_INIT + + /* allocate frame data (+64 for extra data for me) */ +diff --git a/common/frame.h b/common/frame.h +index 18cdcad..380d17d 100644 +--- a/common/frame.h ++++ b/common/frame.h +@@ -55,6 +55,7 @@ typedef struct x264_frame + + int i_frame; /* Presentation frame number */ + int i_input_frame; /* The input frame whose pixels the planes hold, -1 for none */ ++ int i_lowres_frame; /* The input frame the lowres planes were filtered from, -1 for none */ + int i_coded; /* Coded frame number */ + int64_t i_field_cnt; /* Presentation field count */ + int i_frame_num; /* 7.4.3 frame_num */ +diff --git a/common/mc.c b/common/mc.c +index ae81ce4..1097d8d 100644 +--- a/common/mc.c ++++ b/common/mc.c +@@ -466,8 +466,44 @@ void x264_frame_init_lowres( x264_t *h, x264_frame_t *frame ) + for( int y = 0; y < i_height; y++ ) + src[i_width+y*i_stride] = src[i_width-1+y*i_stride]; + memcpy( src+i_stride*i_height, src+i_stride*(i_height-1), (i_width+1) * SIZEOF_PIXEL ); +- h->mc.frame_init_lowres_core( src, frame->lowres[0], frame->lowres[1], frame->lowres[2], frame->lowres[3], +- i_stride, frame->i_stride_lowres, frame->i_width_lowres, frame->i_lines_lowres ); ++ /* A recycled frame's lowres planes hold the input frame they were filtered from: only the ++ * blocks whose 16x16 macroblock, or the column or row of the next ones the filter reads, ++ * changed since are filtered again. The planes hold the current picture everywhere, so a ++ * run widened to 8 blocks either side filters current pixels: that is the alignment the ++ * SIMD core reads and stores at, as from a row's start. */ ++ int held = frame->i_lowres_frame; ++ int *changed = h->frames.mb_input_changed; ++ frame->i_lowres_frame = frame->i_input_frame; ++ if( held >= 0 && changed && frame->i_input_frame >= 0 && h->frames.i_input_all_changed <= held ) ++ { ++ const int mb_w = h->mb.i_mb_width, mb_h = h->mb.i_mb_height; ++ const intptr_t dst_stride = frame->i_stride_lowres; ++#define LOWRES_STALE( x, y ) ( (x) < mb_w && (y) < mb_h && changed[(x) + (y)*mb_w] > held ) ++#define BLOCK_STALE( x, y ) ( LOWRES_STALE( x, y ) || LOWRES_STALE( (x)+1, y ) || LOWRES_STALE( x, (y)+1 ) || LOWRES_STALE( (x)+1, (y)+1 ) ) ++ for( int y = 0; y < mb_h; y++ ) ++ for( int x = 0; x < mb_w; ) ++ { ++ if( !BLOCK_STALE( x, y ) ) ++ { ++ x++; ++ continue; ++ } ++ int x0 = x & ~7; ++ while( x < mb_w && BLOCK_STALE( x, y ) ) ++ x++; ++ x = X264_MIN( (x + 7) & ~7, mb_w ); ++ intptr_t d = 8*x0 + 8*y*dst_stride; ++ h->mc.frame_init_lowres_core( src + 16*x0 + 16*y*i_stride, frame->lowres[0] + d, frame->lowres[1] + d, ++ frame->lowres[2] + d, frame->lowres[3] + d, i_stride, dst_stride, ++ x == mb_w ? frame->i_width_lowres - 8*x0 : 8*(x - x0), ++ X264_MIN( 8, frame->i_lines_lowres - 8*y ) ); ++ } ++#undef BLOCK_STALE ++#undef LOWRES_STALE ++ } ++ else ++ h->mc.frame_init_lowres_core( src, frame->lowres[0], frame->lowres[1], frame->lowres[2], frame->lowres[3], ++ i_stride, frame->i_stride_lowres, frame->i_width_lowres, frame->i_lines_lowres ); + x264_frame_expand_border_lowres( frame ); + + memset( frame->i_cost_est, -1, sizeof(frame->i_cost_est) ); diff --git a/patches/x264/0004-Copy-large-changes-whole-and-changed-luma-with-the-S.patch b/patches/x264/0004-Copy-large-changes-whole-and-changed-luma-with-the-S.patch new file mode 100644 index 00000000..9556399f --- /dev/null +++ b/patches/x264/0004-Copy-large-changes-whole-and-changed-luma-with-the-S.patch @@ -0,0 +1,67 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: thelamer +Date: Thu, 5 Nov 2026 00:19:48 -0500 +Subject: [PATCH 4/6] Copy large changes whole and changed luma with the SIMD + copy + +The changed-macroblock copy took a frame that mostly changed through the C copies, at 0.62 ms +for 2496x1536 of 2560x1600 where the whole-frame SIMD copy takes 0.36: a frame where more than +half the macroblocks changed copies whole again. A luma run is widened to even macroblocks, +which copies current pixels since the source holds the whole picture, and taken by the SIMD +copy at the 32-byte alignment it stores at; the chroma interleave keeps the C copy, the SIMD +one coming out different on a run. + +Every stream checked before comes out bit for bit the same. Alternating runs at 2560x1600: a +frame changed but for a 32-pixel margin took a median 7.74 ms with the fallback against 8.01 +without, and a 256x256 change 2.86 against 2.83. +--- + common/frame.c | 17 +++++++++++++---- + 1 file changed, 13 insertions(+), 4 deletions(-) + +diff --git a/common/frame.c b/common/frame.c +index 6014e2d..ea893c8 100644 +--- a/common/frame.c ++++ b/common/frame.c +@@ -395,6 +395,12 @@ static int frame_copy_changed( x264_t *h, x264_frame_t *dst, x264_picture_t *src + int planar444 = i_csp == X264_CSP_I444; + if( held < 0 || h->frames.i_input_all_changed > held || !(planar420 || planar444) ) + return 0; ++ /* Most of the picture changed: the whole-frame SIMD copy is the faster one. */ ++ int stale = 0; ++ for( int i = 0; i < mb_w * mb_h; i++ ) ++ stale += changed[i] > held; ++ if( 2*stale > mb_w * mb_h ) ++ return 0; + + uint8_t *pix[3]; + int stride[3]; +@@ -411,14 +417,17 @@ static int frame_copy_changed( x264_t *h, x264_frame_t *dst, x264_picture_t *src + x++; + continue; + } +- int x0 = x; ++ /* The source holds the whole current picture, so a run widened to even macroblocks ++ * copies current pixels: the 32-byte alignment the SIMD luma copy stores at. The ++ * chroma interleave takes the C copy, the SIMD one coming out different on a run. */ ++ int x0 = x & ~1; + while( x < mb_w && (changed[x + y*mb_w] > held) ) + x++; ++ x = X264_MIN( (x + 1) & ~1, mb_w ); + int cols = X264_MIN( 16*(x - x0), h->param.i_width - 16*x0 ); + if( cols <= 0 || rows <= 0 ) + continue; +- /* The SIMD copies store non-temporally to aligned addresses a run need not start at. */ +- x264_plane_copy_c( dst->plane[0] + 16*x0 + 16*y*dst->i_stride[0], dst->i_stride[0], ++ h->mc.plane_copy( dst->plane[0] + 16*x0 + 16*y*dst->i_stride[0], dst->i_stride[0], + (pixel*)pix[0] + 16*x0 + 16*y*(stride[0]/SIZEOF_PIXEL), stride[0]/SIZEOF_PIXEL, cols, rows ); + if( planar420 ) + x264_plane_copy_interleave_c( dst->plane[1] + 16*x0 + 8*y*dst->i_stride[1], dst->i_stride[1], +@@ -427,7 +436,7 @@ static int frame_copy_changed( x264_t *h, x264_frame_t *dst, x264_picture_t *src + (cols+1)>>1, (rows+1)>>1 ); + else + for( int p = 1; p < 3; p++ ) +- x264_plane_copy_c( dst->plane[p] + 16*x0 + 16*y*dst->i_stride[p], dst->i_stride[p], ++ h->mc.plane_copy( dst->plane[p] + 16*x0 + 16*y*dst->i_stride[p], dst->i_stride[p], + (pixel*)pix[p] + 16*x0 + 16*y*(stride[p]/SIZEOF_PIXEL), stride[p]/SIZEOF_PIXEL, cols, rows ); + } + } diff --git a/patches/x264/0005-Skip-constant-macroblocks-only-where-the-full-path-would-at-emergency-QPs.patch b/patches/x264/0005-Skip-constant-macroblocks-only-where-the-full-path-would-at-emergency-QPs.patch new file mode 100644 index 00000000..1d329a14 --- /dev/null +++ b/patches/x264/0005-Skip-constant-macroblocks-only-where-the-full-path-would-at-emergency-QPs.patch @@ -0,0 +1,34 @@ +From 8ad65397cc7b189f343342a9107dd693361119f4 Mon Sep 17 00:00:00 2001 +From: "tembo[bot]" <208362400+tembo-io[bot]@users.noreply.github.com> +Date: Thu, 19 Nov 2026 04:39:00 +0000 +Subject: [PATCH 5/6] Skip constant macroblocks only where the full path would + at emergency QPs + +The full path's mb_info fast skip compares the reference's effective QP with h->mb.i_qp after +mb_analyse_init_qp, which clamps an emergency QP above QP_MAX_SPEC to QP_MAX_SPEC (it only sets +lambda from the higher one). macroblock_skip_constant compared it with the unclamped QP, so under +VBV emergency QPs it coded as P_SKIP a macroblock the full path analyses (and may code as P_L0 +with a residual), and the stream was no longer the full path's. It compares with the clamped QP +now, and stores the analysis QP as the full path does. +--- + encoder/encoder.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/encoder/encoder.c b/encoder/encoder.c +index 253838f..07c72d5 100644 +--- a/encoder/encoder.c ++++ b/encoder/encoder.c +@@ -2790,7 +2790,9 @@ static int macroblock_skip_constant( x264_t *h, int mb_x, int mb_y ) + int qp = x264_ratecontrol_mb_qp( h ); + if( h->param.rc.i_aq_mode && h->param.analyse.i_subpel_refine < 10 ) + qp = abs(qp - h->mb.i_last_qp) == 1 ? h->mb.i_last_qp : qp; +- if( h->fref[0][0]->effective_qp[mb_xy] > qp ) ++ /* The full path compares against the QP x264_mb_analyse_init_qp codes with, which an ++ * emergency QP above QP_MAX_SPEC only sets lambda from; it stores the QP it analysed at. */ ++ if( h->fref[0][0]->effective_qp[mb_xy] > X264_MIN( qp, QP_MAX_SPEC ) ) + return 0; + h->fdec->effective_qp[mb_xy] = qp; + +-- +2.50.1 + diff --git a/patches/x264/0006-Align-changed-luma-runs-to-the-AVX-512-copy-s-64-bytes.patch b/patches/x264/0006-Align-changed-luma-runs-to-the-AVX-512-copy-s-64-bytes.patch new file mode 100644 index 00000000..0c1d64f3 --- /dev/null +++ b/patches/x264/0006-Align-changed-luma-runs-to-the-AVX-512-copy-s-64-bytes.patch @@ -0,0 +1,46 @@ +From fb5ac2f46ad50291f2c7d42debcbd406c9b538e8 Mon Sep 17 00:00:00 2001 +From: "tembo[bot]" <208362400+tembo-io[bot]@users.noreply.github.com> +Date: Thu, 19 Nov 2026 04:39:13 +0000 +Subject: [PATCH 6/6] Align changed luma runs to the AVX-512 copy's 64 bytes + +The changed-macroblock copy widened a luma run to even macroblocks, the 32 bytes the AVX copy +stores at, and handed it to h->mc.plane_copy. On a CPU with AVX-512 that is +x264_plane_copy_avx512, which stores with aligned (non-temporal) 64-byte stores from the run's +start and ends each row with a whole-vector store, zeroing the bytes after the run up to the next +64. A run starting on an odd pair of macroblocks faulted (SIGSEGV on the first frame with +mb_info where a change began at such a macroblock), and one ending short of a 64-byte boundary +would have zeroed the input pixels after it. A run is widened to four macroblocks either side +now, which copies current pixels as before since the source holds the whole picture; at the +right edge it ends where the whole-frame copy ends a row, writing the same padding. +--- + common/frame.c | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/common/frame.c b/common/frame.c +index ea893c8..231010a 100644 +--- a/common/frame.c ++++ b/common/frame.c +@@ -417,13 +417,15 @@ static int frame_copy_changed( x264_t *h, x264_frame_t *dst, x264_picture_t *src + x++; + continue; + } +- /* The source holds the whole current picture, so a run widened to even macroblocks +- * copies current pixels: the 32-byte alignment the SIMD luma copy stores at. The +- * chroma interleave takes the C copy, the SIMD one coming out different on a run. */ +- int x0 = x & ~1; ++ /* The source holds the whole current picture, so a run widened to four macroblocks ++ * either side copies current pixels: 64 bytes, the alignment the AVX-512 luma copy ++ * stores at (as do the AVX and SSE ones at 32 and 16), whose last store also writes ++ * a whole vector, zeroing what follows a run that ends short of it. The chroma ++ * interleave takes the C copy, the SIMD one coming out different on a run. */ ++ int x0 = x & ~3; + while( x < mb_w && (changed[x + y*mb_w] > held) ) + x++; +- x = X264_MIN( (x + 1) & ~1, mb_w ); ++ x = X264_MIN( (x + 3) & ~3, mb_w ); + int cols = X264_MIN( 16*(x - x0), h->param.i_width - 16*x0 ); + if( cols <= 0 || rows <= 0 ) + continue; +-- +2.50.1 + diff --git a/shell.nix b/shell.nix index f5968ac9..9f3de9c7 100644 --- a/shell.nix +++ b/shell.nix @@ -9,5 +9,6 @@ pkgs.mkShell { nativeBuildInputs = with pkgs; [pkg-config clang rustPlatform.bindgenHook esbuild typescript] ++ lib.optionals withRust [rustc cargo clippy rustfmt]; - buildInputs = with pkgs; [x264 libyuv libopus libpulseaudio xorg.libX11 xorg.libXext xorg.libxcb]; + # x264 with patches/x264, as default.nix builds voxl. + buildInputs = with pkgs; [(import ./x264.nix {inherit x264;}) libyuv libopus libpulseaudio xorg.libX11 xorg.libXext xorg.libxcb]; } diff --git a/x264.nix b/x264.nix new file mode 100644 index 00000000..e0dc91a7 --- /dev/null +++ b/x264.nix @@ -0,0 +1,21 @@ +# libx264 with the patches under patches/x264, which skip the work x264 does on +# macroblocks voxl's damage map marks unchanged (X264_MBINFO_CONSTANT): they're coded +# as skips without loading or analysing them, and only the changed ones are copied into +# x264's input frame and filtered into its lowres picture. 0001-0004 are pixelflux's +# (selkies-project/pixelflux, patches/x264); 0005 keeps the skip to where stock x264 +# would take it at emergency QPs, and 0006 aligns the copy for x264's AVX-512 code. +# The stream comes out bit for bit as stock x264 codes it. They add no API, so voxl +# builds against a stock x264 too, just without the savings. +{x264}: +x264.overrideAttrs (old: { + patches = + (old.patches or []) + ++ [ + ./patches/x264/0001-Skip-constant-macroblocks-without-analysing-them.patch + ./patches/x264/0002-Copy-only-the-input-macroblocks-that-changed.patch + ./patches/x264/0003-Filter-only-the-lowres-blocks-whose-input-changed.patch + ./patches/x264/0004-Copy-large-changes-whole-and-changed-luma-with-the-S.patch + ./patches/x264/0005-Skip-constant-macroblocks-only-where-the-full-path-would-at-emergency-QPs.patch + ./patches/x264/0006-Align-changed-luma-runs-to-the-AVX-512-copy-s-64-bytes.patch + ]; +}) From ded1137a397fea4bd040c81da262082efd8a406e Mon Sep 17 00:00:00 2001 From: Darren Baldwin <68653294+DarrenBaldwin07@users.noreply.github.com> Date: Thu, 19 Nov 2026 08:46:51 -0500 Subject: [PATCH 2/2] docs: update voxl benchmark numbers with patched x264 --- README.md | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index ca8feaaf..067b6183 100644 --- a/README.md +++ b/README.md @@ -21,28 +21,30 @@ screen instead; see [macOS](#macos) and [Windows](#windows). https://github.com/user-attachments/assets/acdf3f31-64fc-4acf-b5c5-ff173d7100a8 -In every test below voxl averages 60 FPS with a median latency of 12–99 ms; noVNC +In every test below voxl averages 60 FPS with a median latency of 13–98 ms; noVNC averages under 8 FPS. A 16 vCPU AMD EPYC 9334 VM (no GPU), 2560x1600 Xvfb desktop, same workloads, each stream decoded by a native client that reads a pixel marker drawn into the content. Cells are FPS (worst second), then latency p50/p99 from the content being drawn to the -frame being decoded. voxl's column is its best run of each test. To reproduce, see -[`bench/`](bench/README.md). +frame being decoded. voxl's column is its best of three runs of each test, and its +numbers (the column and the CPU row) come from a later session than the other +servers', on the same kind of VM, with x264 built with [`patches/x264`](patches/x264). +To reproduce, see [`bench/`](bench/README.md). | Test | voxl | [selkies](https://github.com/selkies-project/selkies) | [KasmVNC](https://github.com/kasmtech/KasmVNC) | [Neko](https://github.com/m1k1o/neko) | [Neko, tuned](https://github.com/m1k1o/neko) | [Sunshine](https://github.com/LizardByte/Sunshine) | [Sunshine, tuned](https://github.com/LizardByte/Sunshine) | [noVNC](https://github.com/novnc/noVNC) | [Daytona](https://www.daytona.io) | | ------------------------------ | -------------------------- | ----------------------------------------------------- | ---------------------------------------------- | ------------------------------------- | -------------------------------------------- | -------------------------------------------------- | --------------------------------------------------------- | --------------------------------------- | --------------------------------- | -| Chromium scroll, LAN | **60.1 (59.7), 55/60 ms** | 56.8 (54.0), 85/106 ms | 51.7 (39.5), 99/135 ms | 25.0 (23.7), 156/217 ms | 53.9 (49.9), 128/155 ms | 28.3 (23.5), 88/115 ms | 48.5 (44.0), 94/117 ms | 6.7 (6.3), 198/301 ms | 5.2 (2.5), 306/713 ms | -| Scroll, 10 Mbps / 40 ms RTT | **60.0 (59.4), 82/94 ms** | 55.6 (47.7), 152/261 ms | 8.3 (7.4), 229/249 ms | 24.6 (14.9), 221/737 ms | 46.3 (40.3), 606/831 ms | 27.9 (25.3), 160/179 ms | 51.3 (47.5), 147/162 ms | 2.6 (2.4), 426/678 ms | 1.9 (1.6), 617/798 ms | -| Scroll, 5 Mbps / 60 ms RTT | **60.1 (59.7), 99/109 ms** | 27.9 (19.6), 2.7/3.7 s | 4.9 (3.6), 306/415 ms | 21.7 (3.8), 1.2/3.6 s | stalls | 29.6 (21.9), 178/207 ms | 44.5 (35.2), 164/191 ms | 1.6 (1.4), 637/937 ms | 1.1 (0.9), 1.1/1.2 s | -| 1080p animation, LAN | **60.1 (59.9), 12/16 ms** | 58.7 (55.9), 31/48 ms | 56.7 (51.6), 51/82 ms | 24.8 (23.6), 122/202 ms | 55.6 (50.0), 54/82 ms | 27.1 (22.7), 69/91 ms | 45.6 (40.3), 42/57 ms | 7.7 (7.2), 149/210 ms | 10.5 (8.8), 138/209 ms | -| Animation, 10 Mbps / 40 ms RTT | **60.1 (59.5), 46/71 ms** | 39.3 (31.8), 2.3/3.1 s | 52.9 (49.2), 76/115 ms | 25.1 (9.1), 295/962 ms | 33.3 (25.4), 4.0/7.1 s | 29.7 (26.0), 108/125 ms | 51.1 (44.6), 86/107 ms | 5.8 (5.2), 160/226 ms | 7.4 (7.0), 154/213 ms | -| Animation, 5 Mbps / 60 ms RTT | **60.0 (58.8), 66/92 ms** | 18.4 (15.3), 2.2/4.3 s | 34.1 (26.4), 104/156 ms | 15.2 (8.6), 5.0/9.4 s | stalls | 34.7 (25.4), 123/143 ms | 45.5 (40.9), 114/131 ms | 5.1 (4.7), 174/240 ms | 5.8 (4.4), 189/252 ms | -| Full-screen animation, LAN | **59.8 (54.0), 18/25 ms** | 54.8 (49.8), 54/79 ms | 34.2 (32.5), 83/102 ms | 22.7 (18.0), 2.9/3.3 s | 54.6 (49.7), 54/79 ms | 24.9 (21.7), 73/98 ms | 47.4 (43.4), 46/65 ms | 5.9 (5.2), 184/279 ms | 9.1 (7.2), 154/247 ms | +| Chromium scroll, LAN | **60.0 (58.1), 37/50 ms** | 56.8 (54.0), 85/106 ms | 51.7 (39.5), 99/135 ms | 25.0 (23.7), 156/217 ms | 53.9 (49.9), 128/155 ms | 28.3 (23.5), 88/115 ms | 48.5 (44.0), 94/117 ms | 6.7 (6.3), 198/301 ms | 5.2 (2.5), 306/713 ms | +| Scroll, 10 Mbps / 40 ms RTT | **60.1 (59.6), 80/90 ms** | 55.6 (47.7), 152/261 ms | 8.3 (7.4), 229/249 ms | 24.6 (14.9), 221/737 ms | 46.3 (40.3), 606/831 ms | 27.9 (25.3), 160/179 ms | 51.3 (47.5), 147/162 ms | 2.6 (2.4), 426/678 ms | 1.9 (1.6), 617/798 ms | +| Scroll, 5 Mbps / 60 ms RTT | **60.0 (59.2), 98/115 ms** | 27.9 (19.6), 2.7/3.7 s | 4.9 (3.6), 306/415 ms | 21.7 (3.8), 1.2/3.6 s | stalls | 29.6 (21.9), 178/207 ms | 44.5 (35.2), 164/191 ms | 1.6 (1.4), 637/937 ms | 1.1 (0.9), 1.1/1.2 s | +| 1080p animation, LAN | **60.0 (59.8), 13/18 ms** | 58.7 (55.9), 31/48 ms | 56.7 (51.6), 51/82 ms | 24.8 (23.6), 122/202 ms | 55.6 (50.0), 54/82 ms | 27.1 (22.7), 69/91 ms | 45.6 (40.3), 42/57 ms | 7.7 (7.2), 149/210 ms | 10.5 (8.8), 138/209 ms | +| Animation, 10 Mbps / 40 ms RTT | **60.0 (58.1), 45/72 ms** | 39.3 (31.8), 2.3/3.1 s | 52.9 (49.2), 76/115 ms | 25.1 (9.1), 295/962 ms | 33.3 (25.4), 4.0/7.1 s | 29.7 (26.0), 108/125 ms | 51.1 (44.6), 86/107 ms | 5.8 (5.2), 160/226 ms | 7.4 (7.0), 154/213 ms | +| Animation, 5 Mbps / 60 ms RTT | **60.0 (59.4), 60/84 ms** | 18.4 (15.3), 2.2/4.3 s | 34.1 (26.4), 104/156 ms | 15.2 (8.6), 5.0/9.4 s | stalls | 34.7 (25.4), 123/143 ms | 45.5 (40.9), 114/131 ms | 5.1 (4.7), 174/240 ms | 5.8 (4.4), 189/252 ms | +| Full-screen animation, LAN | **60.0 (59.4), 16/23 ms** | 54.8 (49.8), 54/79 ms | 34.2 (32.5), 83/102 ms | 22.7 (18.0), 2.9/3.3 s | 54.6 (49.7), 54/79 ms | 24.9 (21.7), 73/98 ms | 47.4 (43.4), 46/65 ms | 5.9 (5.2), 184/279 ms | 9.1 (7.2), 154/247 ms | | Server CPU, X server + streamer (cores) | idle | 1080p animation | scroll | full screen | | --------------------------------------------------------- | ---- | ---------------- | ---------------- | ---------------- | -| voxl | 0.00 | 1.39 | 1.33 | 1.68 | +| voxl | 0.00 | 1.54 | 1.44 | 2.00 | | [selkies](https://github.com/selkies-project/selkies) | 1.29 | not measured | 1.54 | 1.80 | | [KasmVNC](https://github.com/kasmtech/KasmVNC) | 0.00 | 1.97 | 2.07 | 1.82 (at 34 FPS) | | [Neko](https://github.com/m1k1o/neko) | 1.63 | 2.50 (at 25 FPS) | 2.20 (at 25 FPS) | 2.46 (at 23 FPS) |