Re: [libdc1394-devel] Are frames always 16 bite aligned - for fast SSE loads?
Capture and control API for IIDC compliant cameras
Brought to you by:
ddouxchamps,
gordp
From: David M. <dcm@MIT.EDU> - 2007-02-01 16:02:05
|
Actually, the alignment of dc1394video_frame_t isn't very important because it's just a wrapper structure. The bytes of the frame buffer themselves are allocated by mmap() on Mac OS X, and I couldn't find any documentation on the alignment of that. I'll look into it a bit more. On Linux, the start of every frame will be 4096-byte aligned, because they are allocated in page-sized chunks by the kernel. Keep in mind that although the start of the images may be aligned, each row of the image may not be aligned, depending on the number of pixels in a row. This may affect code that uses SIMD instructions. -David On Thu, 2007-02-01 at 15:38 +0100, Mark Munte wrote: > > I don't think they are aligned. At least we are currently not doing > > anything to ensure it. > > I found out all malloc's are 16 bite aligned by default under OS X. > That means that as long as the size of a frame is a multiple of 16, > the frames will always be 16 bite aligned. > capture->frames = malloc (num_dma_buffers * sizeof > (dc1394video_frame_t)); > Mark > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier. > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Mailing list for libdc1394-devel > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libdc1394-devel |