vnc updates and ui move
v2 cover vnc updates and ui move
Hi,
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)
Corentin Chary (6):
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
Makefile | 38 +- Makefile.objs | 22 +- Makefile.target | 1 + configure | 33 + qemu-options.hx | 7 + 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 | 12 +- ui/vnc-enc-tight.c | 1522 ++++++++++++++++++++++++ vnc-encoding-tight.h => ui/vnc-enc-tight.h | 5 + vnc-encoding-zlib.c => ui/vnc-enc-zlib.c | 0 vnc-tls.c => ui/vnc-tls.c | 0 vnc-tls.h => ui/vnc-tls.h | 0 vnc.c => ui/vnc.c | 4 +- vnc.h => ui/vnc.h | 6 + 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 | 961 --------------- 34 files changed, 1600 insertions(+), 1011 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 (93%) create mode 100644 ui/vnc-enc-tight.c rename vnc-encoding-tight.h => ui/vnc-enc-tight.h (97%) rename vnc-encoding-zlib.c => ui/vnc-enc-zlib.c (100%) rename vnc-tls.c => ui/vnc-tls.c (100%) rename vnc-tls.h => ui/vnc-tls.h (100%) rename vnc.c => ui/vnc.c (99%) rename vnc.h => ui/vnc.h (99%) 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
PATCH v2 1/6 vnc: tight: add JPEG and gradient subencoding with smooth image detection
Add gradient filter and JPEG compression with an heuristic to detect how lossy the comppression will be. This code has been adapted from libvncserver/tight.c.
JPEG support can be enabled/disabled at compile time with --enable-vnc-jpeg and --disable-vnc-jpeg.
--- Makefile.target | 1 + configure | 33 +++ vnc-encoding-tight.c | 559 +++++++++++++++++++++++++++++++++++++++++++++++++- vnc-encoding-tight.h | 5 + vnc.h | 4 + 5 files changed, 601 insertions(+), 1 deletions(-)
Makefile.target +1 -0
@@ -177,6 +177,7 @@ LIBS+=-lz QEMU_CFLAGS += $(VNC_TLS_CFLAGS) QEMU_CFLAGS += $(VNC_SASL_CFLAGS) +QEMU_CFLAGS += $(VNC_JPEG_CFLAGS) # xen backend driver support obj-$(CONFIG_XEN) += xen_machine_pv.o xen_domainbuild.o
configure +33 -0
@@ -263,6 +263,7 @@ uuid="" vde="" vnc_tls="" vnc_sasl="" +vnc_jpeg="" xen="" linux_aio="" vhost_net=""
@@ -547,6 +548,10 @@ for opt do ;; --enable-vnc-sasl) vnc_sasl="yes" ;; + --disable-vnc-jpeg) vnc_jpeg="no" + ;; + --enable-vnc-jpeg) vnc_jpeg="yes" + ;; --disable-slirp) slirp="no" ;; --disable-uuid) uuid="no"
@@ -779,6 +784,8 @@ echo " --disable-vnc-tls disable TLS encryption for VNC server" echo " --enable-vnc-tls enable TLS encryption for VNC server" echo " --disable-vnc-sasl disable SASL encryption for VNC server" echo " --enable-vnc-sasl enable SASL encryption for VNC server" +echo " --disable-vnc-jpeg disable JPEG lossy compression for VNC server" +echo " --enable-vnc-jpeg enable JPEG lossy compression for VNC server" echo " --disable-curses disable curses output" echo " --enable-curses enable curses output" echo " --disable-curl disable curl connectivity"
@@ -1191,6 +1198,27 @@ EOF fi ########################################## +# VNC JPEG detection +if test "$vnc_jpeg" = "yes" ; then +cat > $TMPC <<EOF +#include <stdio.h> +#include <jpeglib.h> +int main(void) { struct jpeg_compress_struct s; jpeg_create_compress(&s); return 0; } +EOF + vnc_jpeg_cflags="" + vnc_jpeg_libs="-ljpeg" + if compile_prog "$vnc_jpeg_cflags" "$vnc_jpeg_libs" ; then + vnc_jpeg=yes + libs_softmmu="$vnc_jpeg_libs $libs_softmmu" + else + if test "$vnc_jpeg" = "yes" ; then + feature_not_found "vnc-jpeg" + fi + vnc_jpeg=no + fi +fi + +########################################## # fnmatch() probe, used for ACL routines fnmatch="no" cat > $TMPC << EOF
@@ -2019,6 +2047,7 @@ echo "Block whitelist $block_drv_whitelist" echo "Mixer emulation $mixemu" echo "VNC TLS support $vnc_tls" echo "VNC SASL support $vnc_sasl" +echo "VNC JPEG support $vnc_jpeg" if test -n "$sparc_cpu"; then echo "Target Sparc Arch $sparc_cpu" fi
@@ -2158,6 +2187,10 @@ if test "$vnc_sasl" = "yes" ; then echo "CONFIG_VNC_SASL=y" >> $config_host_mak echo "VNC_SASL_CFLAGS=$vnc_sasl_cflags" >> $config_host_mak fi +if test "$vnc_jpeg" = "yes" ; then + echo "CONFIG_VNC_JPEG=y" >> $config_host_mak + echo "VNC_JPEG_CFLAGS=$vnc_jpeg_cflags" >> $config_host_mak +fi if test "$fnmatch" = "yes" ; then echo "CONFIG_FNMATCH=y" >> $config_host_mak fi
vnc-encoding-tight.c +558 -1
607 lines not on this page · raw message
vnc-encoding-tight.h +5 -0
@@ -173,4 +173,9 @@#define VNC_TIGHT_MIN_SOLID_SUBRECT_SIZE 2048#define VNC_TIGHT_MAX_SPLIT_TILE_SIZE 16 +#define VNC_TIGHT_JPEG_MIN_RECT_SIZE 4096 +#define VNC_TIGHT_DETECT_SUBROW_WIDTH 7 +#define VNC_TIGHT_DETECT_MIN_WIDTH 8 +#define VNC_TIGHT_DETECT_MIN_HEIGHT 8 +#endif /* VNC_ENCODING_TIGHT_H */
vnc.h +4 -0
@@ -176,6 +176,10 @@ struct VncStateBuffer tight;Buffer tight_tmp;Buffer tight_zlib; +Buffer tight_gradient; +#ifdef CONFIG_VNC_JPEG +Buffer tight_jpeg; +#endif int tight_levels[4 ];z_stream tight_stream[4 ];
Signature · 1 line
1.7.1
PATCH v2 2/6 vnc: JPEG should be disabled if the client don't set tight quality
In reply to Corentin CharyDisable JPEG compression by default and only enable it if the VNC client has sent the requested quality.
--- vnc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
vnc.c +1 -1
@@ -1644,7 +1644,7 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings) vs->features =0 ; vs->vnc_encoding =0 ; vs->tight_compression =9 ; - vs->tight_quality =9 ; + vs->tight_quality =-1 ;/* Lossless by default */ vs->absolute =-1 ;/*
Signature · 1 line
1.7.1
PATCH v2 3/6 vnc: add lossy option
In reply to Corentin CharyThe lossy option can be used to enable lossy compression methods like gradient or jpeg. This patch disable them by default.
--- qemu-options.hx | 7 +++++++ vnc-encoding-tight.c | 4 ++++ vnc.c | 2 ++ vnc.h | 2 ++ 4 files changed, 15 insertions(+), 0 deletions(-)
qemu-options.hx +7 -0
@@ -828,6 +828,13 @@ empty, with a @code{deny} policy. Thus no one will be allowed to use the VNC server until the ACLs have been loaded. This can be achieved using the @code{acl} monitor command. +@item lossy + +Enable lossy compression methods (gradient, JPEG, ...). If this +option is set, VNC client may receive lossy framebuffer updates +depending on its encoding settings. Enabling this option can save +a lot of bandwidth at the expense of quality. + @end table ETEXI
vnc-encoding-tight.c +4 -0
@@ -230,6 +230,10 @@ tight_detect_smooth_image(VncState *vs, int w, int h)int compression = vs->tight_compression;int quality = vs->tight_quality; +if (!vs->vd->lossy) { +return 0 ; + } +if (ds_get_bytes_per_pixel (vs->ds) ==1 || vs->clientds.pf.bytes_per_pixel ==1 || w <VNC_TIGHT_DETECT_MIN_WIDTH || h <VNC_TIGHT_DETECT_MIN_HEIGHT ) {
vnc.c +2 -0
@@ -2482,6 +2482,8 @@ int vnc_display_open(DisplayState *ds, const char *display)#endif }else if (strncmp (options,"acl" ,3 ) ==0 ) { acl =1 ; + }else if (strncmp (options,"lossy" ,5 ) ==0 ) { + vs->lossy = true; } }
vnc.h +2 -0
@@ -33,6 +33,7 @@#include "monitor.h" #include "audio/audio.h" #include <zlib.h> +#include <stdbool.h> #include "keymaps.h"
@@ -111,6 +112,7 @@ struct VncDisplaychar *display;char *password;int auth; +bool lossy;#ifdef CONFIG_VNC_TLS int subauth;/* Used by VeNCrypt */ VncDisplayTLS tls;
Signature · 1 line
1.7.1
PATCH v2 4/6 ui: move all ui components in ui/
In reply to Corentin CharyMove sdl, vnc, curses and cocoa UI into ui/ to cleanup the root directory. Also remove some unnecessary explicit targets from Makefile.
--- Makefile | 38 +++----------------- Makefile.objs | 22 ++++++----- 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 .../vnc-encoding-hextile.c | 0 vnc-encoding-tight.c => ui/vnc-encoding-tight.c | 0 vnc-encoding-tight.h => ui/vnc-encoding-tight.h | 0 vnc-encoding-zlib.c => ui/vnc-encoding-zlib.c | 0 vnc-tls.c => ui/vnc-tls.c | 0 vnc-tls.h => ui/vnc-tls.h | 0 vnc.c => ui/vnc.c | 0 vnc.h => ui/vnc.h | 0 vnc_keysym.h => ui/vnc_keysym.h | 0 vnchextile.h => ui/vnchextile.h | 0 x_keymap.c => ui/x_keymap.c | 0 x_keymap.h => ui/x_keymap.h | 0 30 files changed, 17 insertions(+), 43 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 vnc-encoding-hextile.c => ui/vnc-encoding-hextile.c (100%) rename vnc-encoding-tight.c => ui/vnc-encoding-tight.c (100%) rename vnc-encoding-tight.h => ui/vnc-encoding-tight.h (100%) rename vnc-encoding-zlib.c => ui/vnc-encoding-zlib.c (100%) rename vnc-tls.c => ui/vnc-tls.c (100%) rename vnc-tls.h => ui/vnc-tls.h (100%) rename vnc.c => ui/vnc.c (100%) rename vnc.h => ui/vnc.h (100%) rename vnc_keysym.h => ui/vnc_keysym.h (100%) rename vnchextile.h => ui/vnchextile.h (100%) rename x_keymap.c => ui/x_keymap.c (100%) rename x_keymap.h => ui/x_keymap.h (100%)
Makefile +5 -33
@@ -96,42 +96,14 @@ audio/audio.o audio/fmodaudio.o: QEMU_CFLAGS += $(FMOD_CFLAGS) QEMU_CFLAGS+=$(CURL_CFLAGS) -cocoa.o: cocoa.m +ui/cocoa.o: ui/cocoa.m -keymaps.o: keymaps.c keymaps.h +ui/sdl.o audio/sdlaudio.o ui/sdl_zoom.o baum.o: QEMU_CFLAGS += $(SDL_CFLAGS) -sdl_zoom.o: sdl_zoom.c sdl_zoom.h sdl_zoom_template.h - -sdl.o: sdl.c keymaps.h sdl_keysym.h sdl_zoom.h - -sdl.o audio/sdlaudio.o sdl_zoom.o baum.o: QEMU_CFLAGS += $(SDL_CFLAGS) - -acl.o: acl.h acl.c - -vnc.h: vnc-tls.h vnc-auth-vencrypt.h vnc-auth-sasl.h keymaps.h - -vnc.o: vnc.c vnc.h vnc_keysym.h vnchextile.h d3des.c d3des.h acl.h - -vnc.o: QEMU_CFLAGS += $(VNC_TLS_CFLAGS) - -vnc-tls.o: vnc-tls.c vnc.h - -vnc-auth-vencrypt.o: vnc-auth-vencrypt.c vnc.h - -vnc-auth-sasl.o: vnc-auth-sasl.c vnc.h - -vnc-encoding-zlib.o: vnc-encoding-zlib.c vnc.h - -vnc-encoding-hextile.o: vnc-encoding-hextile.c vnc.h - -vnc-encoding-tight.o: vnc-encoding-tight.c vnc.h vnc-encoding-tight.h - -curses.o: curses.c keymaps.h curses_keys.h +ui/vnc.o: QEMU_CFLAGS += $(VNC_TLS_CFLAGS) bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS) -iov.o: iov.c iov.h - ###################################################################### qemu-img.o: qemu-img-cmds.h
@@ -159,7 +131,7 @@ clean: # avoid old build problems by removing potentially incorrect old files rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h rm -f *.o *.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~ - rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d + rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d ui/*.o ui/*.d rm -f qemu-img-cmds.h $(MAKE) -C tests clean for d in $(ALL_SUBDIRS) libhw32 libhw64 libuser libdis libdis-user; do \
@@ -343,4 +315,4 @@ tarbin: $(mandir)/man8/qemu-nbd.8 # Include automatically generated dependency files --include $(wildcard *.d audio/*.d slirp/*.d block/*.d net/*.d) +-include $(wildcard *.d audio/*.d slirp/*.d block/*.d net/*.d ui/*.d)
Makefile.objs +12 -10
@@ -100,16 +100,18 @@ audio-obj-$(CONFIG_AUDIO_WIN_INT) += audio_win_int.o audio-obj-y += wavcapture.o common-obj-y += $(addprefix audio/, $(audio-obj-y)) -common-obj-y += keymaps.o -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 -common-obj-$(CONFIG_COCOA) += cocoa.o +ui-obj-y += keymaps.o +ui-obj-$(CONFIG_SDL) += sdl.o sdl_zoom.o x_keymap.o +ui-obj-$(CONFIG_CURSES) += curses.o +ui-obj-y += vnc.o d3des.o +ui-obj-y += vnc-encoding-zlib.o vnc-encoding-hextile.o +ui-obj-y += vnc-encoding-tight.o +ui-obj-$(CONFIG_VNC_TLS) += vnc-tls.o vnc-auth-vencrypt.o +ui-obj-$(CONFIG_VNC_SASL) += vnc-auth-sasl.o +ui-obj-$(CONFIG_COCOA) += cocoa.o +common-obj-y += $(addprefix ui/, $(ui-obj-y)) + +common-obj-y += iov.o acl.o common-obj-$(CONFIG_IOTHREAD) += qemu-thread.o common-obj-y += notify.o event_notifier.o common-obj-y += qemu-timer.o
ui/cocoa.m renamed from cocoa.m +0 -0
ui/curses.c renamed from curses.c +0 -0
ui/curses_keys.h renamed from curses_keys.h +0 -0
ui/d3des.c renamed from d3des.c +0 -0
ui/d3des.h renamed from d3des.h +0 -0
ui/keymaps.c renamed from keymaps.c +0 -0
ui/keymaps.h renamed from keymaps.h +0 -0
ui/sdl.c renamed from sdl.c +0 -0
ui/sdl_keysym.h renamed from sdl_keysym.h +0 -0
ui/sdl_zoom.c renamed from sdl_zoom.c +0 -0
ui/sdl_zoom.h renamed from sdl_zoom.h +0 -0
ui/sdl_zoom_template.h renamed from sdl_zoom_template.h +0 -0
ui/vnc-auth-sasl.c renamed from vnc-auth-sasl.c +0 -0
ui/vnc-auth-sasl.h renamed from vnc-auth-sasl.h +0 -0
ui/vnc-auth-vencrypt.c renamed from vnc-auth-vencrypt.c +0 -0
ui/vnc-auth-vencrypt.h renamed from vnc-auth-vencrypt.h +0 -0
ui/vnc-encoding-hextile.c renamed from vnc-encoding-hextile.c +0 -0
ui/vnc-encoding-tight.c renamed from vnc-encoding-tight.c +0 -0
ui/vnc-encoding-tight.h renamed from vnc-encoding-tight.h +0 -0
ui/vnc-encoding-zlib.c renamed from vnc-encoding-zlib.c +0 -0
ui/vnc-tls.c renamed from vnc-tls.c +0 -0
ui/vnc-tls.h renamed from vnc-tls.h +0 -0
ui/vnc.c renamed from vnc.c +0 -0
ui/vnc.h renamed from vnc.h +0 -0
ui/vnc_keysym.h renamed from vnc_keysym.h +0 -0
ui/vnchextile.h renamed from vnchextile.h +0 -0
ui/x_keymap.c renamed from x_keymap.c +0 -0
ui/x_keymap.h renamed from x_keymap.h +0 -0
Signature · 1 line
1.7.1
PATCH v2 5/6 vnc: rename vnc-encoding-* vnc-enc-*
In reply to Corentin CharyFor the same reason that we don't use vnc-authentication-sasl.c but vnc-auth-sals.c. Because it's tooooo long.
---
Makefile.objs | 4 ++--
ui/{vnchextile.h => vnc-enc-hextile-template.h} | 0
ui/{vnc-encoding-hextile.c => vnc-enc-hextile.c} | 12 ++++++------
ui/{vnc-encoding-tight.c => vnc-enc-tight.c} | 2 +-
ui/{vnc-encoding-tight.h => vnc-enc-tight.h} | 0
ui/{vnc-encoding-zlib.c => vnc-enc-zlib.c} | 0
6 files changed, 9 insertions(+), 9 deletions(-)
rename ui/{vnchextile.h => vnc-enc-hextile-template.h} (100%)
rename ui/{vnc-encoding-hextile.c => vnc-enc-hextile.c} (93%)
rename ui/{vnc-encoding-tight.c => vnc-enc-tight.c} (99%)
rename ui/{vnc-encoding-tight.h => vnc-enc-tight.h} (100%)
rename ui/{vnc-encoding-zlib.c => vnc-enc-zlib.c} (100%)Makefile.objs +2 -2
@@ -104,8 +104,8 @@ ui-obj-y += keymaps.o ui-obj-$(CONFIG_SDL) += sdl.o sdl_zoom.o x_keymap.o ui-obj-$(CONFIG_CURSES) += curses.o ui-obj-y += vnc.o d3des.o -ui-obj-y += vnc-encoding-zlib.o vnc-encoding-hextile.o -ui-obj-y += vnc-encoding-tight.o +ui-obj-y += vnc-enc-zlib.o vnc-enc-hextile.o +ui-obj-y += vnc-enc-tight.o ui-obj-$(CONFIG_VNC_TLS) += vnc-tls.o vnc-auth-vencrypt.o ui-obj-$(CONFIG_VNC_SASL) += vnc-auth-sasl.o ui-obj-$(CONFIG_COCOA) += cocoa.o
ui/vnc-enc-hextile-template.h renamed from ui/vnchextile.h +0 -0
ui/vnc-enc-hextile.c renamed from ui/vnc-encoding-hextile.c +6 -6
@@ -33,32 +33,32 @@ static void hextile_enc_cord(uint8_t *ptr, int x, int y, int w, int h) }#define BPP 8 -#include "vnchextile.h" +#include "vnc-enc-hextile-template.h" #undef BPP#define BPP 16 -#include "vnchextile.h" +#include "vnc-enc-hextile-template.h" #undef BPP#define BPP 32 -#include "vnchextile.h" +#include "vnc-enc-hextile-template.h" #undef BPP#define GENERIC #define BPP 8 -#include "vnchextile.h" +#include "vnc-enc-hextile-template.h" #undef BPP#undef GENERIC#define GENERIC #define BPP 16 -#include "vnchextile.h" +#include "vnc-enc-hextile-template.h" #undef BPP#undef GENERIC#define GENERIC #define BPP 32 -#include "vnchextile.h" +#include "vnc-enc-hextile-template.h" #undef BPP#undef GENERIC
ui/vnc-enc-tight.c renamed from ui/vnc-encoding-tight.c +1 -1
@@ -39,7 +39,7 @@#include "qdict.h" #include "qint.h" #include "vnc.h" -#include "vnc-encoding-tight.h" +#include "vnc-enc-tight.h" /* Compression level stuff. The following array contains various encoder parameters for each of 10 compression levels (0..9).
ui/vnc-enc-tight.h renamed from ui/vnc-encoding-tight.h +0 -0
ui/vnc-enc-zlib.c renamed from ui/vnc-encoding-zlib.c +0 -0
Signature · 1 line
1.7.1
PATCH v2 6/6 vnc: tight: don't forget to add the last color
In reply to Corentin CharyWhile using indexed colors, the last color was never added to the palette. Triggered with ubuntu livecd.
--- ui/vnc-enc-tight.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
ui/vnc-enc-tight.c +1 -1
@@ -395,11 +395,11 @@ static int tight_palette_insert(QDict *palette, uint32_t rgb, int bpp, int max)if (data[i] == ci) { \continue ; \ }else { \ + ci = data[i]; \if (!tight_palette_insert (*palette, (uint32_t )ci, \ bpp, max)) { \return 0 ; \ } \ - ci = data[i]; \ } \ } \ \
Signature · 1 line
1.7.1