qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/16] VNC updates for 0.13
@ 2010-06-16  7:11 Corentin Chary
  2010-06-16  7:11 ` [Qemu-devel] [PATCH 01/16] vnc: tight: add JPEG and gradient subencoding with smooth image detection Corentin Chary
                   ` (15 more replies)
  0 siblings, 16 replies; 19+ messages in thread
From: Corentin Chary @ 2010-06-16  7:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: Corentin Chary, Anthony Liguori, Alexander Graf

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 (0x17) and a new
tight filter VNC_TIGHT_PNG (0x0A). When the client tells it supports the 0x17
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 [1], 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 [2] 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://github.com/kanaka/noVNC/
[2] 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 (16):
  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: don't limit png rect size

 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                             | 1661 ++++++++++++++++++++++++
 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                              |  165 ++-
 vnc.h => ui/vnc.h                              |  112 ++-
 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, 2737 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

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

end of thread, other threads:[~2010-06-16 13:56 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-16  7:11 [Qemu-devel] [PATCH 00/16] VNC updates for 0.13 Corentin Chary
2010-06-16  7:11 ` [Qemu-devel] [PATCH 01/16] vnc: tight: add JPEG and gradient subencoding with smooth image detection Corentin Chary
2010-06-16 13:18   ` [Qemu-devel] " Juan Quintela
2010-06-16 13:56     ` Corentin Chary
2010-06-16  7:11 ` [Qemu-devel] [PATCH 02/16] vnc: JPEG should be disabled if the client don't set tight quality Corentin Chary
2010-06-16  7:12 ` [Qemu-devel] [PATCH 03/16] vnc: add lossy option Corentin Chary
2010-06-16  7:12 ` [Qemu-devel] [PATCH 04/16] ui: move all ui components in ui/ Corentin Chary
2010-06-16  7:12 ` [Qemu-devel] [PATCH 05/16] vnc: rename vnc-encoding-* vnc-enc-* Corentin Chary
2010-06-16  7:12 ` [Qemu-devel] [PATCH 06/16] vnc: tight: don't forget do at the last color Corentin Chary
2010-06-16  7:12 ` [Qemu-devel] [PATCH 07/16] vnc: tight: remove a memleak in send_jpeg_rect() Corentin Chary
2010-06-16  7:12 ` [Qemu-devel] [PATCH 08/16] vnc: tight add PNG encoding Corentin Chary
2010-06-16  7:12 ` [Qemu-devel] [PATCH 09/16] vnc: tight: specific zlib level and filters for each compression level Corentin Chary
2010-06-16  7:12 ` [Qemu-devel] [PATCH 10/16] vnc: tight: stop using qdict for palette stuff Corentin Chary
2010-06-16  7:12 ` [Qemu-devel] [PATCH 11/16] vnc: encapsulate encoding members Corentin Chary
2010-06-16  7:12 ` [Qemu-devel] [PATCH 12/16] vnc: fix tight png memory leak Corentin Chary
2010-06-16  7:12 ` [Qemu-devel] [PATCH 13/16] qemu-thread: add qemu_mutex/cond_destroy and qemu_mutex_exit Corentin Chary
2010-06-16  7:12 ` [Qemu-devel] [PATCH 14/16] vnc: threaded VNC server Corentin Chary
2010-06-16  7:12 ` [Qemu-devel] [PATCH 15/16] vnc: add missing lock for vnc_cursor_define() Corentin Chary
2010-06-16  7:12 ` [Qemu-devel] [PATCH 16/16] vnc: tight: don't limit png rect size Corentin Chary

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).