A possible compression scheme

Hans Holmberg hasse "at" solace.mh.se
Wed, 30 Sep 1998 13:58:23 +0000


On Wed, 30 Sep 1998, Luis B. Almeida wrote:

> Hi all,
> 
> I've recently started to use VNC to access my office computer from home,
...
... lines deleted
...
> And a note about Lempel-Ziv encoding. What it does is also, essentially,
> finding frequently used patterns. It won't be as effective as the scheme
> I outline above because it doesn't find repeated rectangles. For
> example, if we seep an image line by line, what L-Z will find are
> repeated sub-lines, which are much less effective than repeated
> rectangles.
> 
> Regards to all,
> 
> Luis
> -- 

If the updates are purely graphical and you want to use some form of
compression on the graphical data the easiest way to increase performance
is to divide the graphical image into subimages; say 8x8 pixels, before
compressing it. That means that most compression algorithms will tokenize
each subimage and if the subimage is repeatedly used in the graphical
image the net compression should be a factor of at least 2 better than
by just compressing the image as is. You could even use some form of JPEG
compression with a high quality set, but that complicates matters a bit.

The idea of a backing store is also a good one to lessen the amount of
data sent, but the tradeoff is that you need more processing power for
matching the updated graphics with what is stored. But I suspect that the
VNC Server for Windows does this to some degree. Maybe there is a
possiblity to work with that and make it smarter and faster on updates.

One way to keep track on changes in a purely graphical image is to use
something I call "prioritized area detection". An area that is changed
often will get a finer degree of detection than an area where there is
hardly any change at all. You always start look at the areas that changes 
often. If you don't find a change increase your scope of search to include
the areas on the next lower priority. The priority more or less tells what
activity of change an area has. Each area can be as small as you like but
normally you weigh the size of each search area against the total
resolution and update speed.

I must add that this method is only good for purely computer generated
graphics, like GUI's and the like where you have an image with no noise
in.

Anyway, enough of my ramblings..
Cheers..

 /-----------------> Hans Holmberg <hasse "at" solace.mh.se> <--------------------\
/|  "...very few phenomena can pull someone out of Deep Hack Mode, with two  |\
\|   noted exceptions: being struck by lightning, or worse, your *computer*  |/
 \-------------> being struck by lightning." (By Matt Welsh) <---------------/


---------------------------------------------------------------------
The VNC mailing list     -   see http://www.orl.co.uk/vnc/intouch.html
---------------------------------------------------------------------