开发者

Is using zlib (or similar) compression worth/recommended when transmitting JPEG-compressed screen tiles over network (remote screencasting app)?

I'm starting to implement some sort of remote screencasting (VNC-alike) client/server software in C++ (Windows platform), which just transmits the screen updates (image tiles) over the network.

The screen is divided in blocks and each tile is compressed into JPEG (probably I'll use libjpeg-turbo), before sending over network. So my question is, will it be good to implement another layer of compression (lossless) for these (already-JPEG-compressed) tiles, e.g. using zlib?

I have a feeling that zlib won't give any significant improvement in terms of bandwidth as the JPEG files will be already compressed. I'd like to avoid further ti开发者_Go百科me and money investment for implementing additional compression layer just for testing purposes, so I'd like to hear your suggestions.

P.S.: As a side question, are there any better alternatives than encoding tiles into JPEG? Maybe lossless compression right away? Is the above-mentioned technique (dividing screen into tiles => selecting updated tiles => compressing them into JPEG => sending over network) good way to implement such software?

Any kind of input would be much appreciated!


JPEG files are already compressed nearly as small as they can be. You might save a few bytes on the header, but that may be overcome by the overhead of the additional compression.

If you need to do a quick check just to prove the point, it should be easy to zip up a collection of sample jpeg files and see what the difference is.


Absolutely unneccessary.

Better option is to use both methods: count the colors in the block and use zlib/rle/etc for few colors and jpeg for many. That's the very basic approach. I recommend you to take a look at the Remote Framebuffer Protocol of the VNC.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜