From: Alexander Graf <agraf@suse.de>
To: Corentin Chary <corentincj@iksaif.net>
Cc: Anthony Liguori <aliguori@linux.vnet.ibm.com>,
qemu-devel@nongnu.org, Adam Litke <agl@us.ibm.com>
Subject: [Qemu-devel] Re: [PATCH v2 05/10] vnc: add basic tight support
Date: Tue, 18 May 2010 15:49:34 +0200 [thread overview]
Message-ID: <4BF29AEE.8070602@suse.de> (raw)
In-Reply-To: <1274186986-26878-6-git-send-email-corentincj@iksaif.net>
Corentin Chary wrote:
> Add support for tight encoding [1]. This patch only add support
> for "basic" tight compression without any filter.
>
> [1] http://tigervnc.org/cgi-bin/rfbproto#tight-encoding.
>
> Signed-off-by: Corentin Chary <corentincj@iksaif.net>
> ---
> Makefile | 2 +
> Makefile.objs | 1 +
> vnc-encoding-hextile.c | 5 +-
> vnc-encoding-tight.c | 287 ++++++++++++++++++++++++++++++++++++++++++++++++
> vnc-encoding-tight.h | 199 +++++++++++++++++++++++++++++++++
> vnc-encoding-zlib.c | 17 ++-
> vnc.c | 37 +++++--
> vnc.h | 17 +++-
> 8 files changed, 543 insertions(+), 22 deletions(-)
> create mode 100644 vnc-encoding-tight.c
> create mode 100644 vnc-encoding-tight.h
>
> diff --git a/Makefile b/Makefile
> index eb9e02b..99d9c5d 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -124,6 +124,8 @@ vnc-encoding-zlib.o: vnc.h
>
> vnc-encoding-hextile.o: vnc.h
>
> +vnc-encoding-tight.o: vnc.h vnc-encoding-tight.h
> +
> curses.o: curses.c keymaps.h curses_keys.h
>
> bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS)
> diff --git a/Makefile.objs b/Makefile.objs
> index acbaf22..070ee09 100644
> --- a/Makefile.objs
> +++ b/Makefile.objs
> @@ -104,6 +104,7 @@ common-obj-$(CONFIG_SDL) += sdl.o sdl_zoom.o x_keymap.o
> common-obj-$(CONFIG_CURSES) += curses.o
> common-obj-y += vnc.o acl.o d3des.o
> common-obj-y += vnc-encoding-zlib.o vnc-encoding-hextile.o
> +common-obj-y += vnc-encoding-tight.o
> common-obj-y += iov.o
> common-obj-$(CONFIG_VNC_TLS) += vnc-tls.o vnc-auth-vencrypt.o
> common-obj-$(CONFIG_VNC_SASL) += vnc-auth-sasl.o
> diff --git a/vnc-encoding-hextile.c b/vnc-encoding-hextile.c
> index a01c5e2..728f25e 100644
> --- a/vnc-encoding-hextile.c
> +++ b/vnc-encoding-hextile.c
> @@ -62,8 +62,8 @@ static void hextile_enc_cord(uint8_t *ptr, int x, int y, int w, int h)
> #undef BPP
> #undef GENERIC
>
> -void vnc_hextile_send_framebuffer_update(VncState *vs, int x,
> - int y, int w, int h)
> +int vnc_hextile_send_framebuffer_update(VncState *vs, int x,
> + int y, int w, int h)
>
IMHO this API change should go into a separate patch.
> {
> int i, j;
> int has_fg, has_bg;
> @@ -83,6 +83,7 @@ void vnc_hextile_send_framebuffer_update(VncState *vs, int x,
> free(last_fg);
> free(last_bg);
>
> + return 1;
> }
>
> void vnc_hextile_set_pixel_conversion(VncState *vs, int generic)
>
>
[...]
> diff --git a/vnc.h b/vnc.h
> index 96f3fe7..ec7f481 100644
> --- a/vnc.h
> +++ b/vnc.h
> @@ -166,6 +166,12 @@ struct VncState
> /* Tight */
> uint8_t tight_quality;
> uint8_t tight_compression;
> + uint8_t tight_pixel24;
> + Buffer tight;
> + Buffer tight_tmp;
> + Buffer tight_zlib;
> + int tight_levels[4];
> + z_stream tight_stream[4];
>
You just shrunk down things to a single stream for zlib, so why go with
4 here? Did I miss anything?
Alex
next prev parent reply other threads:[~2010-05-18 13:49 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-18 12:49 [Qemu-devel] [PATCH v2 00/10] vnc-encodings Corentin Chary
2010-05-18 12:49 ` [Qemu-devel] [PATCH v2 01/10] vnc: refactor set_encodings Corentin Chary
2010-05-18 12:54 ` [Qemu-devel] " Alexander Graf
2010-05-18 18:09 ` Corentin Chary
2010-05-18 18:18 ` Alexander Graf
2010-05-18 19:23 ` Corentin Chary
2010-05-18 12:49 ` [Qemu-devel] [PATCH v2 02/10] vnc: really call zlib if we want zlib Corentin Chary
2010-05-18 12:54 ` [Qemu-devel] " Alexander Graf
2010-05-18 12:49 ` [Qemu-devel] [PATCH v2 03/10] vnc: only use a single zlib stream Corentin Chary
2010-05-18 12:51 ` [Qemu-devel] " Alexander Graf
2010-05-18 13:39 ` Anthony Liguori
2010-05-18 13:52 ` Alexander Graf
2010-05-18 13:55 ` Anthony Liguori
2010-05-18 13:56 ` Alexander Graf
2010-05-18 13:58 ` Anthony Liguori
2010-05-18 12:49 ` [Qemu-devel] [PATCH v2 04/10] vnc: adjust compression zstream level Corentin Chary
2010-05-18 12:55 ` [Qemu-devel] " Alexander Graf
2010-05-18 12:49 ` [Qemu-devel] [PATCH v2 05/10] vnc: add basic tight support Corentin Chary
2010-05-18 13:33 ` [Qemu-devel] " Anthony Liguori
2010-05-18 13:49 ` Alexander Graf [this message]
2010-05-18 13:54 ` Anthony Liguori
2010-05-18 12:49 ` [Qemu-devel] [PATCH v2 06/10] vnc: add support for tight fill encoding Corentin Chary
2010-05-18 13:34 ` [Qemu-devel] " Anthony Liguori
2010-05-18 12:49 ` [Qemu-devel] [PATCH v2 07/10] vnc: don't clear zlib stream on set_encoding Corentin Chary
2010-05-18 12:49 ` [Qemu-devel] [PATCH v2 08/10] vnc: remove memory leaks in zlib and tight encoding Corentin Chary
2010-05-18 12:49 ` [Qemu-devel] [PATCH v2 09/10] vnc: tight: add palette encoding Corentin Chary
2010-05-18 12:49 ` [Qemu-devel] [PATCH v2 10/10] vnc: update copyrights for vnc-encoding-tight.c Corentin Chary
2010-05-18 13:37 ` [Qemu-devel] " Anthony Liguori
2010-05-18 13:47 ` Chris Krumme
2010-05-18 17:26 ` Blue Swirl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BF29AEE.8070602@suse.de \
--to=agraf@suse.de \
--cc=agl@us.ibm.com \
--cc=aliguori@linux.vnet.ibm.com \
--cc=corentincj@iksaif.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).