Alignment in allocator question
Carlos Rafael Giani
dv at pseudoterminal.org
Tue Mar 4 08:58:39 PST 2014
On 2014-03-04 12:40, Wim Taymans wrote:
> It's a bitmask and it checks ((align&(align+1))==0). The reason for
> the bitmask is that it is easy to combine alignments, you can just or
> them together to get the max required alignment.
>
> Wim
>
Err, yes, +1. But the downside of this is that non-power-of-two
alignments will not be supported in gstreamer. Of course alignments
usually are power-of-two, but the very possibility that an alignment
value given to me by a device might be non-power-of-two some day
(perhaps with a different hardware model etc.) and then cause the
application to crash concerns me. Oh well, I then just "align the
alignment" to power-of-two :)
More information about the gstreamer-devel
mailing list