Go to the documentation of this file.
26 ptrdiff_t linesizes1[4],
offsets[3] = { 0 };
27 int i, total_size, linesizes[4];
31 for (
i = 0;
i < 4;
i++)
32 linesizes1[
i] = linesizes[
i];
42 for (
i = 0;
i < 4;
i++)
46 for (
i = 0;
i < 4;
i++)
49 for (
i = 0;
i < 3 &&
data[
i + 1];
i++)
51 printf(
", plane_offsets:");
52 for (
i = 0;
i < 3;
i++)
54 printf(
", total_size: %d", total_size);
62 ptrdiff_t linesizes1[4];
63 int ret, total_size, linesizes[4];
73 printf(
"total_size: %6d", total_size);
75 total_size -= 256 * 4;
77 memset(
data[0], 0xA3, total_size);
78 for (
int i = 0;
i < 4;
i++)
79 linesizes1[
i] = linesizes[
i];
99 for (y = -1; y<UINT_MAX; y+= y/2 + 1) {
100 for (x = -1; x<UINT_MAX; x+= x/2 + 1) {
108 for (
int i = 0;
i < 2;
i++) {
109 printf(
i ?
"\nimage_fill_black tests\n" :
"image_fill tests\n");
AVPixelFormat
Pixel format.
static int check_image_fill_black(const AVPixFmtDescriptor *desc, enum AVPixelFormat pix_fmt, int w, int h)
const AVPixFmtDescriptor * av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)
Iterate over all pixel format descriptors known to libavutil.
#define AV_PIX_FMT_FLAG_HWACCEL
Pixel format is an HW accelerated format.
@ AVCOL_RANGE_NB
Not part of ABI.
int av_image_fill_pointers(uint8_t *data[4], enum AVPixelFormat pix_fmt, int height, uint8_t *ptr, const int linesizes[4])
Fill plane data pointers for an image with pixel format pix_fmt and height height.
int av_image_fill_linesizes(int linesizes[4], enum AVPixelFormat pix_fmt, int width)
Fill plane linesizes for an image with pixel format pix_fmt and width width.
static const int offsets[]
static enum AVPixelFormat pix_fmt
const char * av_color_range_name(enum AVColorRange range)
#define PTRDIFF_SPECIFIER
static const int sizes[][2]
int av_image_fill_plane_sizes(size_t sizes[4], enum AVPixelFormat pix_fmt, int height, const ptrdiff_t linesizes[4])
Fill plane sizes for an image with pixel format pix_fmt and height height.
int av_image_alloc(uint8_t *pointers[4], int linesizes[4], int w, int h, enum AVPixelFormat pix_fmt, int align)
Allocate an image with size w and h and pixel format pix_fmt, and fill pointers and linesizes accordi...
int av_image_fill_black(uint8_t *const dst_data[4], const ptrdiff_t dst_linesize[4], enum AVPixelFormat pix_fmt, enum AVColorRange range, int width, int height)
Overwrite the image data with black.
printf("static const uint8_t my_array[100] = {\n")
const AVCRC * av_crc_get_table(AVCRCId crc_id)
Get an initialized standard CRC table.
enum AVPixelFormat av_pix_fmt_desc_get_id(const AVPixFmtDescriptor *desc)
static int check_image_fill(enum AVPixelFormat pix_fmt, int w, int h)
#define i(width, name, range_min, range_max)
uint32_t av_crc(const AVCRC *ctx, uint32_t crc, const uint8_t *buffer, size_t length)
Calculate the CRC of a block.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
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 the image can be address...
AVColorRange
Visual content value range.
#define AV_PIX_FMT_FLAG_PAL
Pixel format has a palette in data[1], values are indexes in this palette.