Go to the documentation of this file.
32 #define randomize_buffers(buf, size) \
35 for (j = 0; j < size; j+=4) \
36 AV_WN32(buf + j, rnd()); \
69 int dstW, byte_size, luma_filter_size, chr_filter_size;
70 #define LARGEST_FILTER 16
71 #define FILTER_SIZES 4
72 static const int filter_sizes[] = {1, 4, 8, 16};
73 #define LARGEST_INPUT_SIZE 512
75 static const int input_sizes[] = {8, 24, 128, 144, 256, 512};
80 const int16_t **lumSrcx,
int lumFilterSize,
81 const int16_t *chrFilter,
const int16_t **chrUSrcx,
82 const int16_t **chrVSrcx,
int chrFilterSize,
83 const int16_t **alpSrcx, uint8_t **dest,
116 dst0[0] = (uint8_t*)dst0_g;
117 dst0[1] = (uint8_t*)dst0_b;
118 dst0[2] = (uint8_t*)dst0_r;
119 dst0[3] = (uint8_t*)dst0_a;
121 dst1[0] = (uint8_t*)dst1_g;
122 dst1[1] = (uint8_t*)dst1_b;
123 dst1[2] = (uint8_t*)dst1_r;
124 dst1[3] = (uint8_t*)dst1_a;
138 ctx->yuv2rgb_y_offset =
rnd();
139 ctx->yuv2rgb_y_coeff =
rnd();
140 ctx->yuv2rgb_v2r_coeff =
rnd();
141 ctx->yuv2rgb_v2g_coeff =
rnd();
142 ctx->yuv2rgb_u2g_coeff =
rnd();
143 ctx->yuv2rgb_u2b_coeff =
rnd();
151 dstW = input_sizes[isi];
152 luma_filter_size = filter_sizes[fsi];
153 chr_filter_size = filter_sizes[fsi];
155 if (
desc->comp[0].depth > 16) {
157 }
else if (
desc->comp[0].depth > 8) {
165 for (
i = 0;
i < 4;
i ++) {
171 chr_filter, chru, chrv, chr_filter_size,
174 chr_filter, chru, chrv, chr_filter_size,
177 if (memcmp(dst0[0], dst1[0],
dstW * byte_size) ||
178 memcmp(dst0[1], dst1[1],
dstW * byte_size) ||
179 memcmp(dst0[2], dst1[2],
dstW * byte_size) ||
180 memcmp(dst0[3], dst1[3],
dstW * byte_size) )
184 chr_filter, chru, chrv, chr_filter_size,
193 #undef LARGEST_INPUT_SIZE
202 #define LARGEST_INPUT_SIZE 512
203 #define INPUT_SIZES 6
204 static const int input_sizes[] = {8, 24, 128, 144, 256, 512};
224 src[0] = (uint8_t*)src_g;
225 src[1] = (uint8_t*)src_b;
226 src[2] = (uint8_t*)src_r;
227 src[3] = (uint8_t*)src_a;
239 dstW = input_sizes[isi];
249 if (memcmp(dst0_y, dst1_y,
dstW * byte_size))
260 #undef LARGEST_INPUT_SIZE
269 #define LARGEST_INPUT_SIZE 512
270 #define INPUT_SIZES 6
271 static const int input_sizes[] = {8, 24, 128, 144, 256, 512};
295 src[0] = (uint8_t*)src_g;
296 src[1] = (uint8_t*)src_b;
297 src[2] = (uint8_t*)src_r;
298 src[3] = (uint8_t*)src_a;
310 dstW = input_sizes[isi];
322 if (memcmp(dst0_u, dst1_u,
dstW * byte_size) ||
323 memcmp(dst0_v, dst1_v,
dstW * byte_size))
333 #undef LARGEST_INPUT_SIZE
342 #define LARGEST_INPUT_SIZE 512
343 #define INPUT_SIZES 6
344 static const int input_sizes[] = {8, 24, 128, 144, 256, 512};
364 src[0] = (uint8_t*)src_g;
365 src[1] = (uint8_t*)src_b;
366 src[2] = (uint8_t*)src_r;
367 src[3] = (uint8_t*)src_a;
382 dstW = input_sizes[isi];
392 if (memcmp(dst0_a, dst1_a,
dstW * byte_size))
404 report(
"output_yuv2gbrp");
407 report(
"input_planar_rgb_y");
410 report(
"input_planar_rgb_uv");
413 report(
"input_planar_rgb_a");
int dstW
Width of destination luma/alpha planes.
@ AV_PIX_FMT_GBRP16BE
planar GBR 4:4:4 48bpp, big-endian
@ AV_PIX_FMT_GBRP10BE
planar GBR 4:4:4 30bpp, big-endian
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
@ AV_PIX_FMT_GBRAPF32LE
IEEE-754 single precision planar GBRA 4:4:4:4, 128bpp, little-endian.
@ AV_PIX_FMT_GBRPF32BE
IEEE-754 single precision planar GBR 4:4:4, 96bpp, big-endian.
#define check_func(func,...)
static const char rgb2yuv[]
@ AV_PIX_FMT_GBRP14BE
planar GBR 4:4:4 42bpp, big-endian
@ AV_PIX_FMT_GBRAP12LE
planar GBR 4:4:4:4 48bpp, little-endian
static const int planar_fmts[]
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
#define AV_PIX_FMT_YUVA444P16
static void check_output_yuv2gbrp(void)
void checkasm_check_sw_gbrp(void)
#define FF_ARRAY_ELEMS(a)
#define randomize_buffers(buf, size)
@ AV_PIX_FMT_GBRAP16BE
planar GBRA 4:4:4:4 64bpp, big-endian
@ AV_PIX_FMT_GBRP16LE
planar GBR 4:4:4 48bpp, little-endian
int flags
Flags modifying the (de)muxer behaviour.
@ AV_PIX_FMT_GBRP12LE
planar GBR 4:4:4 36bpp, little-endian
#define AV_PIX_FMT_FLAG_ALPHA
The pixel format has an alpha channel.
@ AV_PIX_FMT_GBRP10LE
planar GBR 4:4:4 30bpp, little-endian
static void check_input_planar_rgb_to_y(void)
#define LOCAL_ALIGNED_8(t, v,...)
@ AV_PIX_FMT_GBRAPF32BE
IEEE-754 single precision planar GBRA 4:4:4:4, 128bpp, big-endian.
@ AV_PIX_FMT_GBRAP12BE
planar GBR 4:4:4:4 48bpp, big-endian
struct SwsContext * sws_alloc_context(void)
Allocate an empty SwsContext.
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
static void check_input_planar_rgb_to_uv(void)
void ff_sws_init_scale(SwsContext *c)
#define SWS_FULL_CHR_H_INT
@ AV_PIX_FMT_GBRP9BE
planar GBR 4:4:4 27bpp, big-endian
@ AV_PIX_FMT_GBRP9LE
planar GBR 4:4:4 27bpp, little-endian
#define LARGEST_INPUT_SIZE
@ AV_PIX_FMT_GBRAP10LE
planar GBR 4:4:4:4 40bpp, little-endian
#define i(width, name, range_min, range_max)
@ AV_PIX_FMT_GBRPF32LE
IEEE-754 single precision planar GBR 4:4:4, 96bpp, little-endian.
@ AV_PIX_FMT_GBRAP16LE
planar GBRA 4:4:4:4 64bpp, little-endian
av_warn_unused_result int sws_init_context(struct SwsContext *sws_context, SwsFilter *srcFilter, SwsFilter *dstFilter)
Initialize the swscaler context sws_context.
@ AV_PIX_FMT_GBRP12BE
planar GBR 4:4:4 36bpp, big-endian
static void check_input_planar_rgb_to_a(void)
void sws_freeContext(struct SwsContext *swsContext)
Free the swscaler context swsContext.
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
#define declare_func(ret,...)
static const int16_t alpha[]
@ AV_PIX_FMT_GBRP14LE
planar GBR 4:4:4 42bpp, little-endian
@ AV_PIX_FMT_GBRAP10BE
planar GBR 4:4:4:4 40bpp, big-endian