Setup the picture fields based on the specified image parameters
and the provided image data buffer.
The picture fields are filled in by using the image data buffer
pointed to by ptr.
If ptr is NULL, the function will fill only the picture linesize
array and return the required size for the image buffer.
To allocate an image buffer and fill the picture data in one call,
use avpicture_alloc().
@param picture the picture to be filled in
@param ptr buffer where the image data is stored, or NULL
@param pix_fmt the pixel format of the image
@param width the width of the image in pixels
@param height the height of the image in pixels
@return the size in bytes required for src, a negative error code
in case of failure
Setup the picture fields based on the specified image parameters and the provided image data buffer.
The picture fields are filled in by using the image data buffer pointed to by ptr.
If ptr is NULL, the function will fill only the picture linesize array and return the required size for the image buffer.
To allocate an image buffer and fill the picture data in one call, use avpicture_alloc().
@param picture the picture to be filled in @param ptr buffer where the image data is stored, or NULL @param pix_fmt the pixel format of the image @param width the width of the image in pixels @param height the height of the image in pixels @return the size in bytes required for src, a negative error code in case of failure
@see av_image_fill_arrays()