All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] vnc: fix VNC artifacts
@ 2020-01-21  5:00 Cameron Esfahani via
  2020-01-21  5:00 ` [PATCH v2 1/2] " Cameron Esfahani via
  2020-01-21  5:00 ` [PATCH v2 2/2] vnc: prioritize ZRLE compression over ZLIB Cameron Esfahani via
  0 siblings, 2 replies; 4+ messages in thread
From: Cameron Esfahani via @ 2020-01-21  5:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: kraxel

Remove VNC optimization to reencode framebuffer update as raw if it's
smaller than the default encoding.  QEMU's implementation was naive and
didn't account for the ZLIB z_stream mutating with each compression.  Just
saving and restoring the output buffer offset wasn't sufficient to "rewind"
the previous encoding.  Considering that ZRLE is never larger than raw and
even though ZLIB can occasionally be fractionally larger than raw, the
overhead of implementing this optimization correctly isn't worth it.

While debugging this, I noticed ZRLE always compresses better than ZLIB.
Prioritize ZRLE over ZLIB, even if the client hints that ZLIB is preferred.

Cameron Esfahani (2):
  vnc: fix VNC artifacts
  vnc: prioritize ZRLE compression over ZLIB

 ui/vnc-enc-zrle.c |  4 ++--
 ui/vnc.c          | 31 +++++++++++--------------------
 2 files changed, 13 insertions(+), 22 deletions(-)

-- 
2.24.0



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-01-21  6:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-21  5:00 [PATCH v2 0/2] vnc: fix VNC artifacts Cameron Esfahani via
2020-01-21  5:00 ` [PATCH v2 1/2] " Cameron Esfahani via
2020-01-21  6:28   ` Gerd Hoffmann
2020-01-21  5:00 ` [PATCH v2 2/2] vnc: prioritize ZRLE compression over ZLIB Cameron Esfahani via

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.