vnc: add basic tight support

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>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Corentin Chary 2010-05-19 09:24:10 +02:00 committed by Anthony Liguori
parent a885211eed
commit 380282b07d
7 changed files with 498 additions and 4 deletions

12
vnc.h
View file

@ -170,6 +170,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];
/* Hextile */
VncSendHextileTile *send_hextile_tile;
@ -404,7 +410,13 @@ int vnc_hextile_send_framebuffer_update(VncState *vs, int x,
int y, int w, int h);
void vnc_hextile_set_pixel_conversion(VncState *vs, int generic);
void *vnc_zlib_zalloc(void *x, unsigned items, unsigned size);
void vnc_zlib_zfree(void *x, void *addr);
int vnc_zlib_send_framebuffer_update(VncState *vs, int x, int y, int w, int h);
void vnc_zlib_clear(VncState *vs);
int vnc_tight_send_framebuffer_update(VncState *vs, int x, int y, int w, int h);
void vnc_tight_clear(VncState *vs);
#endif /* __QEMU_VNC_H */