[FFmpeg-devel] Alignment implication in libswscale

Michael Niedermayer michaelni
Tue Mar 11 14:13:16 CET 2008


On Tue, Mar 11, 2008 at 08:44:14PM +0800, Zuxy Meng wrote:
> Hi,
> 
> Is it safe when implementing libswscale to assume that src and dst
> pointers are aligned to the natural boundary of its format? For
> example assuming that a src pointing to RGB32/YUY2 format is aligned
> to a 4-byte boundary and RGB24 a 3-byte one.

You can generally assume 16byte alignment for src/dst/linesize.
And its easy to fallback to the existing C code when alignment is not
provided.
The only case where alignment might be missing is for crop+scale ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I hate to see young programmers poisoned by the kind of thinking
Ulrich Drepper puts forward since it is simply too narrow -- Roman Shaposhnik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080311/48265037/attachment.pgp>



More information about the ffmpeg-devel mailing list