[FFmpeg-devel] [PATCH] lavu/get_video_buffer: also align data pointers
Pavel Koshevoy
pkoshevoy at gmail.com
Fri Nov 15 21:36:04 EET 2024
On Sat, Nov 9, 2024 at 10:46 AM Pavel Koshevoy <pkoshevoy at gmail.com> wrote:
>
>
> On Sat, Nov 9, 2024 at 10:39 AM James Almer <jamrial at gmail.com> wrote:
>
>> On 11/9/2024 2:34 PM, Pavel Koshevoy wrote:
>> > On Sat, Nov 9, 2024 at 10:27 AM James Almer <jamrial at gmail.com> wrote:
>> >
>> >> On 11/9/2024 1:57 PM, Pavel Koshevoy wrote:
>> >>> This avoids unpleasant surprises to av_frame_get_buffer callers
>> >>> that explicitly specified 64-byte alignment and didn't get
>> >>> AVFrame.data pointers that are 64-byte aligned.
>> >>
>> >> Again, the doxy is clear that only the buffer sizes are aligned, not
>> the
>> >> pointers. I'd rather not make this change here. Please see
>> >> https://ffmpeg.org//pipermail/ffmpeg-devel/2024-November/335811.html
>> >>
>> >>
>> > So if we update the doxy then the change will be accepted?
>> > I don't understand the reluctance to improve the behavior of this API.
>>
>> I simply prefer to not change how public API behaves if the problem can
>> be fixed with an internal change.
>> That said, if other developers agree with you, then I'm not going to
>> block such a change.
>>
>>
> AVFrame.data pointers being aligned according to the explicitly specified
> align parameter
> is not going to break any caller. It is a safe change, and I would think
> a welcome change for any users of av_frame_get_buffer.
>
> I too would like to hear additional comments from other developers.
>
> Thank you,
> Pavel.
>
>
I've submitted a v2 of the patch, with updated doxy
More information about the ffmpeg-devel
mailing list