]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/imgutils.h
libavformat/avio: Add avio_get_dyn_buf function
[ffmpeg] / libavutil / imgutils.h
index 23282a38fa796ab962f88ff9c203d60fac25969f..40aee8b98e56a6b2759085cb97658ab1997d4c5f 100644 (file)
@@ -191,6 +191,21 @@ int av_image_copy_to_buffer(uint8_t *dst, int dst_size,
  */
 int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx);
 
+/**
+ * Check if the given dimension of an image is valid, meaning that all
+ * bytes of a plane of an image with the specified pix_fmt can be addressed
+ * with a signed int.
+ *
+ * @param w the width of the picture
+ * @param h the height of the picture
+ * @param max_pixels the maximum number of pixels the user wants to accept
+ * @param pix_fmt the pixel format, can be AV_PIX_FMT_NONE if unknown.
+ * @param log_offset the offset to sum to the log level for logging with log_ctx
+ * @param log_ctx the parent logging context, it may be NULL
+ * @return >= 0 if valid, a negative error code otherwise
+ */
+int av_image_check_size2(unsigned int w, unsigned int h, int64_t max_pixels, enum AVPixelFormat pix_fmt, int log_offset, void *log_ctx);
+
 /**
  * Check if the given sample aspect ratio of an image is valid.
  *