[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH v2 05/10] vnc: add basic tight support
From: |
Alexander Graf |
Subject: |
[Qemu-devel] Re: [PATCH v2 05/10] vnc: add basic tight support |
Date: |
Tue, 18 May 2010 15:49:34 +0200 |
User-agent: |
Thunderbird 2.0.0.23 (X11/20090817) |
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 <address@hidden>
> ---
> 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
- [Qemu-devel] Re: [PATCH v2 01/10] vnc: refactor set_encodings, (continued)
[Qemu-devel] [PATCH v2 10/10] vnc: update copyrights for vnc-encoding-tight.c, Corentin Chary, 2010/05/18
[Qemu-devel] [PATCH v2 04/10] vnc: adjust compression zstream level, Corentin Chary, 2010/05/18
[Qemu-devel] [PATCH v2 05/10] vnc: add basic tight support, Corentin Chary, 2010/05/18
[Qemu-devel] [PATCH v2 09/10] vnc: tight: add palette encoding, Corentin Chary, 2010/05/18
[Qemu-devel] [PATCH v2 08/10] vnc: remove memory leaks in zlib and tight encoding, Corentin Chary, 2010/05/18
[Qemu-devel] [PATCH v2 06/10] vnc: add support for tight fill encoding, Corentin Chary, 2010/05/18
[Qemu-devel] [PATCH v2 07/10] vnc: don't clear zlib stream on set_encoding, Corentin Chary, 2010/05/18