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
pgpweLiFu78pD.pgp
Description: PGP signature
_______________________________________________ Spice-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/spice-devel
