[FFmpeg-devel] [PATCH 2/3] lavc: add a framework to fix alignment problems.
Ronald S. Bultje
rsbultje at gmail.com
Sat May 6 15:50:04 EEST 2017
Hi,
On Sat, May 6, 2017 at 5:20 AM, Nicolas George <george at nsup.org> wrote:
> + /**
> + * Minimum alignment of frame data required by the codec.
> + * All frame data pointers must have the alignment lower bits cleared,
> + * i.e. be a multiple of 1<<alignment.
> + * - encoding: set by the encoder and used by the framework
> + * - decoding: unused
> + */
> + unsigned alignment;
> +
> } AVCodecContext;
I agree it's likely that one codec (e.g. h264) would need 32-byte alignment
on a particular system (e.g. x86/haswell), whereas another codec on the
same system (e.g. wmavoice) might not.
However, I find it unlikely that one codec *instance* would need different
alignment from another codec *instance* (for the same codec). The above
allows seems specifically designed for that. Do you think adding alignment
to AVCodec would make more sense (and possibly set it at runtime using
static_init)?
Ronald
More information about the ffmpeg-devel
mailing list