[FFmpeg-devel] [PATCH 2/3] lavc: add a framework to fix alignment problems.
Marton Balint
cus at passwd.hu
Sat May 6 19:48:54 EEST 2017
On Sat, 6 May 2017, Ronald S. Bultje wrote:
> 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).
I can imagine a case where alignment requirements are dependant on pixel
format. Not the best example, because it is not a "codec", and it is using
bitpacked formats, but the Decklink output device would require 128 byte
or even 256 byte alignment for 10/12 bit, according to the SDK.
Regards,
Marton
More information about the ffmpeg-devel
mailing list