Skip to content
  • Gerd Hoffmann's avatar
    0780ec7b
    Revert "vnc: allow fall back to RAW encoding" · 0780ec7b
    Gerd Hoffmann authored
    
    
    This reverts commit de3f7de7.
    
    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.  Because of the mutation, simply
    resetting the output buffer's offset wasn't sufficient to "rewind" the
    operation.  The mutated z_stream would generate future zlib blocks which
    referred to symbols in past blocks which weren't sent.  This would lead
    to artifacting.
    
    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.
    
    Signed-off-by: default avatarCameron Esfahani <dirty@apple.com>
    Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
    0780ec7b
    Revert "vnc: allow fall back to RAW encoding"
    Gerd Hoffmann authored
    
    
    This reverts commit de3f7de7.
    
    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.  Because of the mutation, simply
    resetting the output buffer's offset wasn't sufficient to "rewind" the
    operation.  The mutated z_stream would generate future zlib blocks which
    referred to symbols in past blocks which weren't sent.  This would lead
    to artifacting.
    
    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.
    
    Signed-off-by: default avatarCameron Esfahani <dirty@apple.com>
    Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Loading