[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 00/18] [PATCH v2 00/18] VNC Updates for 0.13
From: |
Corentin Chary |
Subject: |
[Qemu-devel] [PATCH v2 00/18] [PATCH v2 00/18] VNC Updates for 0.13 |
Date: |
Wed, 7 Jul 2010 20:57:48 +0200 |
This set contains all my patchs related to tight and threaded vnc server.
Since v1:
* Add a fix for jpeg and png with non-24bpp displays
* Better default values for vnc options in ./configure
* Fixed Tight PNG to use its own encoding number (-260)
* Cleaned tight send_sub_rect()
Tight JPEG and Move to ui
=========================
This set starts by adding JPEG and gradient to tight, then move all ui code
in the ui/ subdirectory.
Thanks,
Since v1:
* Format patch with rename detection
* Add "lossy" parameter instead of "lossless"
* Disable lossy encodings by default
* Add a small tight fix (for indexed colors)
Since v2:
* Rebased on current master
* Removed a leak in send_jpeg_rect()
Misc
=======
* Add the missing last color while filling palette
* Rewrite the palette code without using qdict. I did some profiling using
`perf`
and a lot of cpu time was spent in qdict, mainly due to memory allocation,
hash, and
qobject conversion. The new code is faster and uses less memory.
Tight PNG
==========
This set introduce a new encoding: VNC_ENCODING_TIGHT_PNG [1] (-260) and a new
tight filter VNC_TIGHT_PNG (0x0A). When the client tells it supports the -260
encoding, the server will use tight, but will always send encoding pixels using
PNG instead of zlib. If the client also told it support JPEG, then the server
can
send JPEG, because PNG will only be used in the cases zlib was used in normal
tight.
This encoding was introduced to speed up HTML5 based VNC clients like noVNC
[2], but
can also be used on devices like iPhone where PNG can be rendered in hardware.
I also made a quick patch to add support for PNG in gtk-vnc [3] and noVNC
already support
PNG encoding. Note: There is a bug in gtk-vnc when using pixbuf on a 16bit
display,
which also happens with JPEG.
[1] http://wiki.qemu.org/VNC_Tight_PNG
[2] http://github.com/kanaka/noVNC/
[3] http://xf.iksaif.net/dev/vnc/gtk-vnc/0001-add-png-support.patch
Threaded Server
===============
Since v1:
* Moved locks from VncState to VncDisplay because it's only used in vnc_refresh
* Use trylock in vnc_refresh. If there is an encoding task still running,
reschedule the refresh.
This really boost performances and make the vnc server truly asynchroneous.
The only blocking
lock is the output_mutex which is only held during a simple memcpy().
* Fixed issues found by Paolo, except the exit condition, mainly because we can
only have
one queue per VncState (due to zstreams), so this is not really an issue.
* Rebased on top of jpeg and ui/ patchs
Since v2:
* renamed vnc-jobs.c vnc-jobs-async.c
* added vnc-jobs.h, refactor functions declarations, export
vnc_[un]lock_display()
and vnc_[un]lock_output() and use them in vnc-jobs-async.c (reported by Avi)
* rework exit condition for vnc_worker_thread_loop (Paolo)
* abord -> abort (Paolo)
* call qemu_thread_self() (Paolo)
* Coding style issues (Alexander)
* Move from empty macros to empty statis inline (Alexander)
Alexander also suggested me to use stw_be_p() defined in cpu-all.h,
but when I tried to include cpu-all.h, it broke every thing. Anyway it can
be done later since this code is already present in vnc.c.
Also vnc_async_encoding_start() could be cleaner if encoding members where
in a specific structure, but this is a lot of changes, and as I'm also working
on encodings, I want this patch to be easy to rebase. So I'll do as soon as
the VNC server is merged.
Since v3:
* Encoding are data is now in specific structures, that makes
vnc_async_encoding_start a lot cleaner.
* Added a missing vnc_output_lock(vs)
Corentin Chary (18):
vnc: tight: add JPEG and gradient subencoding with smooth image
detection
vnc: JPEG should be disabled if the client don't set tight quality
vnc: add lossy option
ui: move all ui components in ui/
vnc: rename vnc-encoding-* vnc-enc-*
vnc: tight: don't forget do at the last color
vnc: tight: remove a memleak in send_jpeg_rect()
vnc: tight add PNG encoding
vnc: tight: specific zlib level and filters for each compression
level
vnc: tight: stop using qdict for palette stuff
vnc: encapsulate encoding members
vnc: fix tight png memory leak
qemu-thread: add qemu_mutex/cond_destroy and qemu_mutex_exit
vnc: threaded VNC server
vnc: add missing lock for vnc_cursor_define()
vnc: tight: fix rgb_prepare_row
vnc: tight: split send_sub_rect
vnc: better default values for VNC options
Makefile | 38 +-
Makefile.objs | 29 +-
Makefile.target | 2 +
configure | 83 ++
qemu-options.hx | 7 +
qemu-thread.c | 22 +
qemu-thread.h | 4 +
cocoa.m => ui/cocoa.m | 0
curses.c => ui/curses.c | 0
curses_keys.h => ui/curses_keys.h | 0
d3des.c => ui/d3des.c | 0
d3des.h => ui/d3des.h | 0
keymaps.c => ui/keymaps.c | 0
keymaps.h => ui/keymaps.h | 0
sdl.c => ui/sdl.c | 0
sdl_keysym.h => ui/sdl_keysym.h | 0
sdl_zoom.c => ui/sdl_zoom.c | 0
sdl_zoom.h => ui/sdl_zoom.h | 0
sdl_zoom_template.h => ui/sdl_zoom_template.h | 0
vnc-auth-sasl.c => ui/vnc-auth-sasl.c | 0
vnc-auth-sasl.h => ui/vnc-auth-sasl.h | 0
vnc-auth-vencrypt.c => ui/vnc-auth-vencrypt.c | 0
vnc-auth-vencrypt.h => ui/vnc-auth-vencrypt.h | 0
vnchextile.h => ui/vnc-enc-hextile-template.h | 0
vnc-encoding-hextile.c => ui/vnc-enc-hextile.c | 26 +-
ui/vnc-enc-tight.c | 1715 ++++++++++++++++++++++++
vnc-encoding-tight.h => ui/vnc-enc-tight.h | 21 +-
vnc-encoding-zlib.c => ui/vnc-enc-zlib.c | 34 +-
ui/vnc-jobs-async.c | 331 +++++
vnc-tls.h => ui/vnc-jobs-sync.c | 99 +-
ui/vnc-jobs.h | 87 ++
ui/vnc-palette.c | 136 ++
ui/vnc-palette.h | 63 +
vnc-tls.c => ui/vnc-tls.c | 0
vnc-tls.h => ui/vnc-tls.h | 0
vnc.c => ui/vnc.c | 167 ++-
vnc.h => ui/vnc.h | 115 ++-
vnc_keysym.h => ui/vnc_keysym.h | 0
x_keymap.c => ui/x_keymap.c | 0
x_keymap.h => ui/x_keymap.h | 0
vnc-encoding-tight.c | 959 -------------
41 files changed, 2796 insertions(+), 1142 deletions(-)
rename cocoa.m => ui/cocoa.m (100%)
rename curses.c => ui/curses.c (100%)
rename curses_keys.h => ui/curses_keys.h (100%)
rename d3des.c => ui/d3des.c (100%)
rename d3des.h => ui/d3des.h (100%)
rename keymaps.c => ui/keymaps.c (100%)
rename keymaps.h => ui/keymaps.h (100%)
rename sdl.c => ui/sdl.c (100%)
rename sdl_keysym.h => ui/sdl_keysym.h (100%)
rename sdl_zoom.c => ui/sdl_zoom.c (100%)
rename sdl_zoom.h => ui/sdl_zoom.h (100%)
rename sdl_zoom_template.h => ui/sdl_zoom_template.h (100%)
rename vnc-auth-sasl.c => ui/vnc-auth-sasl.c (100%)
rename vnc-auth-sasl.h => ui/vnc-auth-sasl.h (100%)
rename vnc-auth-vencrypt.c => ui/vnc-auth-vencrypt.c (100%)
rename vnc-auth-vencrypt.h => ui/vnc-auth-vencrypt.h (100%)
rename vnchextile.h => ui/vnc-enc-hextile-template.h (100%)
rename vnc-encoding-hextile.c => ui/vnc-enc-hextile.c (81%)
create mode 100644 ui/vnc-enc-tight.c
rename vnc-encoding-tight.h => ui/vnc-enc-tight.h (92%)
rename vnc-encoding-zlib.c => ui/vnc-enc-zlib.c (83%)
create mode 100644 ui/vnc-jobs-async.c
copy vnc-tls.h => ui/vnc-jobs-sync.c (54%)
create mode 100644 ui/vnc-jobs.h
create mode 100644 ui/vnc-palette.c
create mode 100644 ui/vnc-palette.h
rename vnc-tls.c => ui/vnc-tls.c (100%)
rename vnc-tls.h => ui/vnc-tls.h (100%)
rename vnc.c => ui/vnc.c (95%)
rename vnc.h => ui/vnc.h (87%)
rename vnc_keysym.h => ui/vnc_keysym.h (100%)
rename x_keymap.c => ui/x_keymap.c (100%)
rename x_keymap.h => ui/x_keymap.h (100%)
delete mode 100644 vnc-encoding-tight.c
- [Qemu-devel] [PATCH v2 00/18] [PATCH v2 00/18] VNC Updates for 0.13,
Corentin Chary <=
- [Qemu-devel] [PATCH v2 03/18] vnc: add lossy option, Corentin Chary, 2010/07/07
- [Qemu-devel] [PATCH v2 02/18] vnc: JPEG should be disabled if the client don't set tight quality, Corentin Chary, 2010/07/07
- [Qemu-devel] [PATCH v2 05/18] vnc: rename vnc-encoding-* vnc-enc-*, Corentin Chary, 2010/07/07
- [Qemu-devel] [PATCH v2 04/18] ui: move all ui components in ui/, Corentin Chary, 2010/07/07
- [Qemu-devel] [PATCH v2 07/18] vnc: tight: remove a memleak in send_jpeg_rect(), Corentin Chary, 2010/07/07
- [Qemu-devel] [PATCH v2 01/18] vnc: tight: add JPEG and gradient subencoding with smooth image detection, Corentin Chary, 2010/07/07
- [Qemu-devel] [PATCH v2 09/18] vnc: tight: specific zlib level and filters for each compression level, Corentin Chary, 2010/07/07
- [Qemu-devel] [PATCH v2 12/18] vnc: fix tight png memory leak, Corentin Chary, 2010/07/07
- [Qemu-devel] [PATCH v2 06/18] vnc: tight: don't forget do at the last color, Corentin Chary, 2010/07/07
- [Qemu-devel] [PATCH v2 16/18] vnc: tight: fix rgb_prepare_row, Corentin Chary, 2010/07/07