[Spice-devel] [PATCH 1/5] LZ4: Limit LZ4 to RGB formats

Christophe Fergeau cfergeau at redhat.com
Mon Jan 26 08:34:49 PST 2015


ACK (a note in the commit log explaining why we don't want to handle the
other formats would be useful).

On Thu, Jan 22, 2015 at 05:21:04PM +0100, Javier Celaya wrote:
> ---
>  server/red_worker.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/server/red_worker.c b/server/red_worker.c
> index a18987a..8f07ee9 100644
> --- a/server/red_worker.c
> +++ b/server/red_worker.c
> @@ -6678,6 +6678,7 @@ static inline int red_compress_image(DisplayChannelClient *dcc,
>          if (!glz) {
>  #ifdef USE_LZ4
>              if (image_compression == SPICE_IMAGE_COMPRESS_LZ4 &&
> +                bitmap_fmt_is_rgb(src->format) &&
>                  red_channel_client_test_remote_cap(&dcc->common.base,
>                          SPICE_DISPLAY_CAP_LZ4_COMPRESSION)) {
>                  ret = red_lz4_compress_image(dcc, dest, src, o_comp_data,
> @@ -8918,6 +8919,7 @@ static void red_marshall_image(RedChannelClient *rcc, SpiceMarshaller *m, ImageI
>          } else {
>  #ifdef USE_LZ4
>              if (comp_mode == SPICE_IMAGE_COMPRESS_LZ4 &&
> +                bitmap_fmt_is_rgb(bitmap.format) &&
>                  red_channel_client_test_remote_cap(&dcc->common.base,
>                          SPICE_DISPLAY_CAP_LZ4_COMPRESSION)) {
>                  comp_succeeded = red_lz4_compress_image(dcc, &red_image, &bitmap,
> -- 
> 1.9.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20150126/30c42fa7/attachment.sig>


More information about the Spice-devel mailing list