On Wed, 16 Mar 2022, James Almer wrote:

On 3/14/2022 6:06 PM, Marton Balint wrote:
 Output buffer alignment might be different to ZIMG_ALIGNMENT or it may not
 be
 aligned at all if a downstream filter (e.g. vf_pad) intentionally
 misaligns it.

av_frame_get_buffer() align parameter is used to align linesizes, not buffers. av_malloc() has a hardcoded alignment defined at compile time based on configure settings.

Good point.


If what you need is aligned data pointers, you should either use the trick i used in the libdav1d wrapper, or change av_malloc() in order to use av_cpu_max_align().

Actually av_cpu_max_align() also depends on compile time, so your trick is the only way to ensure ZIMG alignment as far as I see...

Regards,
Marton
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to