Le mardi 15 février 2011 03:55:44, Burkhard Plaum a écrit :
> Not yet, but a function gavl_video_frame_is_aligned() would be easy to
> write. Just cast all plane pointers to long and check if they are
> multiples of 16, then check if all strides are multiples of 16.
>
> In videoframe.c there is a macro ALIGNMENT_BYTES which should be used for
> the case the alignment is changed in a future version.
>
> You can do that if you want.
Thanks for the details! Does the following transcribes it ?
static inline int gavl_video_frame_is_aligned(gavl_video_frame_t *vf, int
planes)
{
int i;
for (i = 0; i < planes; i++)
{
if (((long)vf->planes[i] % ALIGNMENT_BYTES != 0))
return 0;
if (((long)vf->strides[i] % ALIGNMENT_BYTES != 0))
return 0;
}
return 1;
}
Romain
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Gmerlin-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gmerlin-general