"ZYWRLE":Enhanced VNC codec for Motion picture

(English draft version Rev.B:2007/01/23)
(English draft version Rev.A:2006/08/03)

Noriaki Yamazaki:Research & Development Cneter, Hitachi Systems & Services, Ltd.

Table of Contents


The lossy codec based on Wavelet transform is frequently used in compression of natural image, motion picture and audio stream.
But it isn't almost used in Remote Desktop protocol like VNC because classical lossless run-length codec like ZRLE has high performance in peculiar image which has big mono color region like desktop image.
The lack of lossy codec cause low performance of motion picture in VNC.
We introduce new codec "ZYWRLE(ZLib YUV Wavelet Run Length Encoding)" which applied wavelet transform partially and is based on ZRLE.
In this new codec, network traffic reduced to 15%-50% traffic of ZRLE when we play motion picture.

Backgound and Problem Statement


ZRLE : See "RFB Protocol Specification".

Problem of ZRLE:

=> No Palette-lize, No RLE => Raw uncompressed data(Raw tile).

Raw tile rate of ZRLE when motion picture or non motion picture
Type Raw tile
Total(Mbytes) Raw tile
Comp. Raw rate(%)
non-motion 0.085 1.14 66.02 1.7 0.13
motion 125.8 117.1 292.2 29.8 32.1

For solving problem of ZRLE for motion picture:
=>Reduce Raw tile.

The based theory

YUV-RGB color transform

We use RCT(reversible color transform).
More detail, See JPEG-2000 Specification.

Wavelet transform

More detail, See Signal Processing with Wavelet Transform.

Original lena(RGB565), Wavelet transform level 1, level2. in RGB color space.

We use PLHaar as the basis of the wavelet.

Important observations of wavelet coefficients

Shapiro says:

ZYWRLE Definition

Specification about Wavelet coefficients filtering

ZYWRLE Hi-quality:Wavelet:level 1 in YUV, filitering, reconstruction image:Comp.rate=16.3%/PSNR(RGB)=28.000.

ZYWRLE Mid-quality:Wavelet:level 2 in YUV, filitering, reconstruction image:Comp.rate=6.5%/PSNR(RGB)=23.995.

Specification about Wavelet transform

1 block ZYWRLE enlarged 4 times in Hi/Mid quality.

Note: Almost block is green or black pixel. Green pixel means only Y component pixel data. Black pixel means no data. These pixels are compressed highly by ZRLE.

Changes From ZRLE

ZRLE desktop image(1280*1024pixel*16bit)
1/2 Server Side Scaling:640*512pixel(640Kbytes)/80block(1block=64~64dot)

ZYWRLE Hi-quality:YUV-Wavelet-filitering, reconstruction image

ZYWRLE Mid-quality:YUV-Wavelet-filitering, reconstruction image

Note:On left side of the image, there are distinguishable border line between ZRLE block and ZYWRLE. But On movie image and "System-kun" image in the browser, we can't see distinguishable border line.(See Errors in YUV conversion.)

Result of ZYWRLE for desktop image
quality ZYWRLE
ZLib out/rate
ZRLE 0(0) 156233(80) 74316(100%)
Hi 21048(8) 111797(72) 64543(86.8%) 37.41 33.05
Mid 28595(31) 40404(49) 41000(55.2%) 29.98 25.66

Evalution of ZYWRLE

Compression performance in motion picture

Result of ZYWRLE for motion picture
quality Raw tile(Mbytes) Total(Mbytes) Raw tile
Out Raw rate(%) Comp. Raw rate(%)
ZRLE 125.8 125.8 100 117.1 392.2 29.8 32.1
Hi 53.85 167.58 32.1 52.10 370.96 14.0 45.1 28.025
Mid 31.83 264.05 12.1 20.56 378.50 5.4 69.7 23.980

Errors in YUV conversion

There are two type errors in YUV conversion.

For these reasons, YUV conversion includes errors and PSNR indicates bad quality though there are no distinguishable image distortion.

This error is often distinguishable at border between mono color ZRLE block and ZYWRLE block.

If you convert whole image, the border disappears. But this is not a true resolution and also leads needless processing load.

We need more enhancement about YUV conversion.

YUV conversion only(no Wavelet,filitering)
original lena image, reconstruction image, difference image between both
PSNR(YUV)=37.57, PSNR(RGB)=32.95

Note: PSNR indicates bad quality though there are no distinguishable difference.

Implemantation of ZYWRLE

Our VNC client for embeded device:"micro-VNC"

PalmOS 5(Sony Clie-UX50), Windows Mobile 5(Sharp W-Zero3), BREW phone(au/Sony ericson W41S), Symbian S60(Nokia 6630)

Reference Implementation(C source code/patch for VNC Servers)

I think that Any VNC server can be applied ZYWRLE easlilly using one of these patch.

License of ZYWRLE

Though ZYWRLE is our intellectual property and was developed for our micro-VNC, We Hitachi Systems & Services, Ltd. decided make it open source. You can use it with no fee for commercial and/or non-commercial purpose. Avobe Reference implementation are released under our BSD-like license. More detail, see top of zywrletemplate.c.

To Do

ZYWRLE is yet under developement state.
All Rights Reserved Copyright (c) 2000-2007, Hitachi Systems & Services, Ltd., RDC(Research & Developement Center)