Re: Patch to support LZ4 compression algorithm‏‏

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I think the cause of this problem is the unnecessary step of flipping the bitmap buffer lines when encoding, since the surface in the client will be created with the top-down param. 
this patch just works.
----------------------------------------
> From: javier.celaya@xxxxxxxxx
> To: spice-devel@xxxxxxxxxxxxxxxxxxxxx
> Date: Wed, 7 Jan 2015 09:22:52 +0100
> Subject: Re: [Spice-devel] Patch to support LZ4 compression algorithm‏‏
>
> Hello
>
> To enable LZ4 from the qemu command line, you have to add this to ui/spice-
> core.c:
>
> static const char *compression_names[] = {
> [ SPICE_IMAGE_COMPRESS_OFF ] = "off",
> [ SPICE_IMAGE_COMPRESS_AUTO_GLZ ] = "auto_glz",
> [ SPICE_IMAGE_COMPRESS_AUTO_LZ ] = "auto_lz",
> [ SPICE_IMAGE_COMPRESS_QUIC ] = "quic",
> [ SPICE_IMAGE_COMPRESS_GLZ ] = "glz",
> [ SPICE_IMAGE_COMPRESS_LZ ] = "lz",
> + [ SPICE_IMAGE_COMPRESS_LZ4 ] = "lz4",
> };
>
> Build qemu, and then you can use --spice image-compression=lz4.
>
> About the problem with SPICE_BITMAP_FLAGS_TOP_DOWN, I'll have a look at it
> ASAP.
>
> Thanks for your feedback.
>
> El Miércoles, 7 de enero de 2015 15:48:43 LgDoor escribió:
>> i'm not sure but it seems lz4 won't be enabled unless adding a new value of
>> the image_compress parameter in QEMU.
>> so i just replace lz with lz4, at red_compress_image() in red_worker.c,
> 6680:
>>> if (image_compression == SPICE_IMAGE_COMPRESS_LZ4 &&
>>> red_channel_client_test_remote_cap(&dcc->common.base,
>>> SPICE_DISPLAY_CAP_LZ4_COMPRESSION)) {
>>
>> changes to
>>
>>> if (true && .......
>>
>> and launch qemu with --spice image-compression=auto_lz.
>>
>> ----------------------------------------
>>
>>> Date: Wed, 7 Jan 2015 08:15:07 +0100
>>> From: fantonifabio@xxxxxxxxxx
>>> To: lgdoor@xxxxxxxxxxx; spice-devel@xxxxxxxxxxxxxxxxxxxxx
>>> Subject: Re: [Spice-devel] Patch to support LZ4 compression algorithm‏‏
>>>
>>> Il 07/01/2015 08:01, LgDoor ha scritto:
>>>> has anybody tried this feature and encountered the displaying problems?
>>>>
>>>> I just made a small change to enable lz4, but the image turns out to be
>>>> broken (see the screenshots). And I observed that it goes wrong only for
>>>> the SpiceBitmap w/o SPICE_BITMAP_FLAGS_TOP_DOWN flag in the
>>>> red_compress_image() function from red_worker.c .>
>>> What change you did?
>>> I tried it only using both server and client compiled with it and FWIK
>>> should be used automatically if no image compression specified.
>>>
>>>> 2014-11-14 0:11 GMT+08:00 Javier Celaya <javier.celaya@xxxxxxxxx>:
>>>>> Hello
>>>>>
>>>>> There they go.
>>>>>
>>>>> However, don't forget that, since spice-protocol is a submodule of
>>>>> spice-
>>>>> common, once you push the commit for spice-protocol, the commit for
>>>>> spice-
>>>>> common should point to it. The same with spice and spice-gtk in relation
>>>>> to
>>>>> spice-common.
>>>>>
>>>>> Regards
>>>>>
>>>>> El Jueves, 13 de noviembre de 2014 16:04:00 Christophe Fergeau escribió:
>>>>>> Hey,
>>>>>>
>>>>>> On Fri, Nov 07, 2014 at 10:17:11AM +0100, Javier Celaya wrote:
>>>>>>> Hello
>>>>>>>
>>>>>>> I resend the patch for the spice repository. I just realized I forgot
>>>>>>> to
>>>>>>> remove a debug message from red_worker.c, sorry.
>>>>>>
>>>>>> Thanks for the updated patches, they look good to me. There are 2 blank
>>>>>> lines at the end of lz4_encoder.[ch] which should be removed.
>>>>>> Can you resend these patches generated with git-format-patch so that
>>>>>> they contain a commit log, and an author name/address? Then they can be
>>>>>> pushed upstream.
>>>>>>
>>>>>> Christophe
>>>>>
>>>>> _______________________________________________
>>>>> Spice-devel mailing list
>>>>> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
>>>>> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>>
>> _______________________________________________
>> Spice-devel mailing list
>> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
>> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
 		 	   		  

Attachment: lz4-broken-image.patch
Description: Binary data

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]