[FFmpeg-devel] [PATCH v2 1/3] libavutil/imgutils: add utility to get plane sizes

Brian Kim bkkim at google.com
Thu Jul 9 04:50:28 EEST 2020


Patch attached.

Main changes from v1 are switching to from int to size_t/ptrdiff_t
where relevant and removing av_image_fill_pointers_from_sizes()

Some things to note:
 - The av_image_fill_planes_sizes uses size_t/ptrdiff_t for buffer
sizes, but as mentioned during the v1 review, this leads to some
inconvenient conversions and range checks when using it with existing
functions. We could keep the return type as int to alleviate this, but
that seems like it would somewhat defeat the purpose of moving to
these types.
 - SIZE_MAX is used in several places in libavutil, so I used
PTRDIFF_MAX, but I could not see any mention of these being allowed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libavutil-imgutils-add-utility-to-get-plane-sizes.patch
Type: text/x-patch
Size: 9442 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200708/e3b560d7/attachment.bin>


More information about the ffmpeg-devel mailing list