ffmpeg.libavutil.imgutils

Undocumented in source.

Members

Functions

av_image_alloc
int av_image_alloc(ubyte*[4] pointers, int[4] linesizes, int w, int h, AVPixelFormat pix_fmt, int align_)

Allocate an image with size w and h and pixel format pix_fmt, and fill pointers and linesizes accordingly. The allocated image buffer has to be freed by using av_freep(&pointers[0]).

av_image_check_sar
int av_image_check_sar(uint w, uint h, AVRational sar)

Check if the given sample aspect ratio of an image is valid.

av_image_check_size
int av_image_check_size(uint w, uint h, int log_offset, void* log_ctx)

Check if the given dimension of an image is valid, meaning that all bytes of the image can be addressed with a signed int.

av_image_check_size2
int av_image_check_size2(uint w, uint h, long max_pixels, AVPixelFormat pix_fmt, 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.

av_image_copy
void av_image_copy(ubyte*[4] dst_data, int[4] dst_linesizes, const(ubyte)*[4] src_data, const(int)[4] src_linesizes, AVPixelFormat pix_fmt, int width, int height)

Copy image in src_data to dst_data.

av_image_copy_plane
void av_image_copy_plane(ubyte* dst, int dst_linesize, const(ubyte)* src, int src_linesize, int bytewidth, int height)

Copy image plane from src to dst. That is, copy "height" number of lines of "bytewidth" bytes each. The first byte of each successive line is separated by *_linesize bytes.

av_image_copy_to_buffer
int av_image_copy_to_buffer(ubyte* dst, int dst_size, const(ubyte*)[4] src_data, const(int)[4] src_linesize, AVPixelFormat pix_fmt, int width, int height, int align_)

Copy image data from an image into a buffer.

av_image_copy_uc_from
void av_image_copy_uc_from(ubyte*[4] dst_data, const(ptrdiff_t)[4] dst_linesizes, const(ubyte)*[4] src_data, const(ptrdiff_t)[4] src_linesizes, AVPixelFormat pix_fmt, int width, int height)

Copy image data located in uncacheable (e.g. GPU mapped) memory. Where available, this function will use special functionality for reading from such memory, which may result in greatly improved performance compared to plain av_image_copy().

av_image_fill_arrays
int av_image_fill_arrays(ubyte*[4] dst_data, int[4] dst_linesize, const(ubyte)* src, AVPixelFormat pix_fmt, int width, int height, int align_)

Setup the data pointers and linesizes based on the specified image parameters and the provided array.

av_image_fill_black
int av_image_fill_black(ubyte*[4] dst_data, const(ptrdiff_t)[4] dst_linesize, AVPixelFormat pix_fmt, AVColorRange range, int width, int height)

Overwrite the image data with black. This is suitable for filling a sub-rectangle of an image, meaning the padding between the right most pixel and the left most pixel on the next line will not be overwritten. For some formats, the image size might be rounded up due to inherent alignment.

av_image_fill_linesizes
int av_image_fill_linesizes(int[4] linesizes, AVPixelFormat pix_fmt, int width)

Fill plane linesizes for an image with pixel format pix_fmt and width width.

av_image_fill_max_pixsteps
void av_image_fill_max_pixsteps(int[4] max_pixsteps, int[4] max_pixstep_comps, const(AVPixFmtDescriptor)* pixdesc)

Compute the max pixel step for each plane of an image with a format described by pixdesc.

av_image_fill_pointers
int av_image_fill_pointers(ubyte*[4] data, AVPixelFormat pix_fmt, int height, ubyte* ptr, const(int)[4] linesizes)

Fill plane data pointers for an image with pixel format pix_fmt and height height.

av_image_get_buffer_size
int av_image_get_buffer_size(AVPixelFormat pix_fmt, int width, int height, int align_)

Return the size in bytes of the amount of data required to store an image with the given parameters.

av_image_get_linesize
int av_image_get_linesize(AVPixelFormat pix_fmt, int width, int plane)

Compute the size of an image line with format pix_fmt and width width for the plane plane.

Meta