[gst-devel] alignment issues

Daniel Gazard daniel.gazard at free.fr
Sun Apr 4 01:47:02 CEST 2004


Ronald Bultje <rbultje at ronald.bitfreak.net> writes:

Hi,

> [..]
>> May be there are other similar problems elsewhere. If someone is
>> interested, I can send my patches (I have to clean up the code
>> before).
>
> Please do. I sort-of dislike memcpy() though... Can you think of a quick
> macro to do this? E.g.:
>
> #define GST_READ_UINT32_BE(data) (data[0] << 24 | \
> 				  data[1] << 16 | \
> 				  data[2] <<  8 | \
> 				  data[3]         )
>
> (etc.)
>
> Same for uint64, 16, all also LE and maybe even several write macros. Such
> code should go somewhere in GStreamer core, I guess, since those are used
> virtually everywhere.

Ok, I will do something similar with your macro above (which should be
more efficient than a memcpy !). I am a bit overbook those days but I
expect to be able submit a patch in the current of the next week.




More information about the gstreamer-devel mailing list