Re: [FFmpeg-devel] [PATCH v3 1/4] libavutil/imgutils: add utility to get plane sizes

2020-07-22 Thread James Almer
On 7/13/2020 9:19 PM, Brian Kim wrote: > On Mon, Jul 13, 2020 at 11:22 AM James Almer wrote: > [...] >> You would need to cast height to size_t for this, i think, but seeing >> av_image_check_size() currently rejects line sizes and plane sizes >> bigger than INT_MAX, maybe we should just keep INT_

Re: [FFmpeg-devel] [PATCH v3 1/4] libavutil/imgutils: add utility to get plane sizes

2020-07-13 Thread Brian Kim
On Mon, Jul 13, 2020 at 11:22 AM James Almer wrote: [...] > You would need to cast height to size_t for this, i think, but seeing > av_image_check_size() currently rejects line sizes and plane sizes > bigger than INT_MAX, maybe we should just keep INT_MAX in the above > check instead (No need to s

Re: [FFmpeg-devel] [PATCH v3 1/4] libavutil/imgutils: add utility to get plane sizes

2020-07-13 Thread James Almer
On 7/13/2020 2:09 PM, Brian Kim wrote: > This utility helps avoid undefined behavior when doing things like > checking how much memory we need to allocate for an image before we have > allocated a buffer. > > Signed-off-by: Brian Kim > --- > doc/APIchanges | 3 ++ > libavutil/imgutils.c |

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

2020-07-13 Thread Brian Kim
This utility helps avoid undefined behavior when doing things like checking how much memory we need to allocate for an image before we have allocated a buffer. Signed-off-by: Brian Kim --- doc/APIchanges | 3 ++ libavutil/imgutils.c | 98 +--- libav