[gst-devel] alignment issues
Ronald S. Bultje
R.S.Bultje at students.uu.nl
Mon Apr 5 02:06:32 CEST 2004
On Sun, 2004-04-04 at 02:15, David Schleef wrote:
> On Sat, Apr 03, 2004 at 08:35:13PM +0200, Ronald Bultje wrote:
> > 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 << 24 | \
> > data << 16 | \
> > data << 8 | \
> > data )
> > (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.
> Please hide this behind an #ifdef. Sane architectures have no
> problem reading and writing unaligned words, most of them with
> no speed penalty.
Hm, yeah. Well, if the macros exist, optimizing them is easy, no? :).
Let's first make sure that it exists.
More information about the gstreamer-devel