summaryrefslogtreecommitdiffstats
path: root/common/lz_common.h
Commit message (Collapse)AuthorAgeFilesLines
* ppc: Fix lz magic endianessLukas Venhoda2015-07-021-1/+2
| | | | | | | | | | | | | | Commit d39dfbfe changes lz magic to be always treated as LE when encoded. Runtime conversion from a string to uint32 is storing the magic with the same endianness on both LE and BE machines. This requires aditional byte swap when sending magic between LE/BE machines. Changing lz magic to a constant will ensure, that it will be always stored in native endianness, and the second byte swap won't be needed. This commit reverts d39dfbfe changes in lz.c while keeping the rest. They will be needed in future commit for quic.c
* Add compile-time check for lz arraysChristophe Fergeau2013-04-101-0/+5
| | | | | | | | | | | In addition to Laszlo's commit fixing rhbz#928973, we can add some compile-time assertion to lz_common.h to help catch similar bugs in the future. This uses gnulib's verify.h to make sure at compile-time that the various constant arrays used in lz_common.h are of the expected size. I've checked that before Laszlo's patch, the assert triggers, and that it's gone after it.
* supply missing IS_IMAGE_TYPE_* elements for LZ_IMAGE_TYPE_A8Laszlo Ersek2013-04-101-2/+2
| | | | | | | | | | | | | | The IS_IMAGE_TYPE_PLT and IS_IMAGE_TYPE_RGB arrays are supposed to decide whether each image type is PLT or RGB. Dependent on the result, one of the PLT_PIXELS_PER_BYTE and RGB_BYTES_PER_PIXEL arrays can be indexed. Commit c0b048eb introduced the LZ_IMAGE_TYPE_A8 enum constant and grew the RGB_BYTES_PER_PIXEL array by one element, but it missed to append a zero to IS_IMAGE_TYPE_PLT, and a one to IS_IMAGE_TYPE_RGB. Do so now. Related RHBZ: 928973. Signed-off-by: Laszlo Ersek <lersek@redhat.com>
* Add support for A8 images to the LZ routinesSøren Sandmann Pedersen2012-08-241-2/+3
| | | | | This format is needed to add Render support to the X driver, so we need the ability to compress and decompress it.
* Use SPICE_{BEGIN,END}_DECLSMarc-André Lureau2012-03-201-6/+4
|
* common: add extern "C" guards to headersChristophe Fergeau2012-03-201-0/+7
| | | | | | Since some spice C++ code is using code from common/, the C functions need to be marked as such for the C++ compiler, otherwise we'll get linkage issues.
* Lossy compression of RGBA images (on WAN connection)Yonit Halperin2012-03-201-4/+5
| | | | | The RGB channels are compressed using JPEG. The alpha channel is compressed using LZ.
* Add emacs settings for indent according to spice styleguideAlexander Larsson2012-03-201-0/+1
|
* fresh startYaniv Kamay2012-03-201-0/+60