[FFmpeg-devel] [PATCH 1/3] lavu/frame: add av_frame_check_align().

Michael Niedermayer michael at niedermayer.cc
Thu May 11 04:00:34 EEST 2017

On Wed, May 10, 2017 at 11:10:48PM +0200, Nicolas George wrote:
> Le primidi 21 floréal, an CCXXV, Hendrik Leppkes a écrit :
> > Everywhere I found where the align value is used, its used as (1 <<
> > alignment). In that case, I would prefer to pass the actual alignment
> > here (ie. 32 instead of 5), which is an easier value to understand and
> > matches the various alignment constants/values we already had before.
> I can live with that, but here is my rationale for doing it that way:
> log2(align_mult) is a non-trivial function while 1<<align_log is a CPU
> built-in.
> I suggest we get a third opinion on the matter.

The direct value like 32 feels more natural to me too, but iam fine
with either.

The avoidance of log() might also favor the other in some cases btw
consider you have a 32 and need to call a fuction that needs a log2(32)


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Democracy is the form of government in which you can choose your dictator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170511/45985c3b/attachment.sig>

More information about the ffmpeg-devel mailing list