[Spice-devel] jpeg and jpeg_alpha in spice
Christophe Fergeau
cfergeau at redhat.com
Wed May 4 04:40:49 PDT 2011
On Wed, May 04, 2011 at 10:33:08AM +0800, Shuxiang Lim wrote:
> Hi,Alon!
> Thanks,but now I decide to abandon such drudgery try of forcing use JPEG
> in spice-server because it's not a friendly reasonable way to spice. Now all
> that I can do currently is just attempting to fasten the image traffic
> between libspicec.so and Java UI,all the sins come from the android
> framework and Java for there is no way to access directly the image buffer
> in mem maintained by libspicec.so from Java. The only hope will be
> file-mem-mapping between C and Java, but that will never give me any
> surprise,I suppose.
> Besides,another reason that enticed me to force use of JPEG is the
> common/quic.c in client is damned buggy of SIGBUS on android/ARM on some ops
> such as pointer typecasting.
> That's common in my porting work,for example,in generated_demashaller.c,
> this
> *#define write_int8(ptr, val) *(int8_t *)(ptr) = val*
> will cause SIGBUS on ARM, so I change it into
> *#define write_int8(ptr,v) {int8_t val=v;memcpy(ptr,&val,sizeof(int8_t)); }
> *
> then it's safe, but seems ugly and clumsy.
> So, is there any simple,elegant and safe way to do this?
As I understand it, this shouldn't be needed for 8 bit values, only for
unaligned 16/32/64 bit accesses. An alternate way of doing this would be
by OR-ing ( | ) and shifting (<<) byte values, but that wouldn't be really
nice either :)
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20110504/b0ae0243/attachment.pgp>
More information about the Spice-devel
mailing list