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;
146 luma_filter_size = filter_sizes[fsi];
147 chr_filter_size = filter_sizes[fsi];
149 if (
desc->comp[0].depth > 16) {
151 }
else if (
desc->comp[0].depth > 8) {
159 for (
i = 0;
i < 4;
i ++) {
165 chr_filter, chru, chrv, chr_filter_size,
168 chr_filter, chru, chrv, chr_filter_size,
171 if (memcmp(dst0[0], dst1[0],
dstW * byte_size) ||
172 memcmp(dst0[1], dst1[1],
dstW * byte_size) ||
173 memcmp(dst0[2], dst1[2],
dstW * byte_size) ||
174 memcmp(dst0[3], dst1[3],
dstW * byte_size) )
178 chr_filter, chru, chrv, chr_filter_size,
187 #undef LARGEST_INPUT_SIZE
196 #define LARGEST_INPUT_SIZE 512
197 #define INPUT_SIZES 6
198 static const int input_sizes[] = {8, 24, 128, 144, 256, 512};
199 const uint8_t *
src[4];
219 src[0] = (uint8_t*)src_g;
220 src[1] = (uint8_t*)src_b;
221 src[2] = (uint8_t*)src_r;
222 src[3] = (uint8_t*)src_a;
244 if (memcmp(dst0_y, dst1_y,
dstW * byte_size))
255 #undef LARGEST_INPUT_SIZE
264 #define LARGEST_INPUT_SIZE 512
265 #define INPUT_SIZES 6
266 static const int input_sizes[] = {8, 24, 128, 144, 256, 512};
267 const uint8_t *
src[4];
290 src[0] = (uint8_t*)src_g;
291 src[1] = (uint8_t*)src_b;
292 src[2] = (uint8_t*)src_r;
293 src[3] = (uint8_t*)src_a;
317 if (memcmp(dst0_u, dst1_u,
dstW * byte_size) ||
318 memcmp(dst0_v, dst1_v,
dstW * byte_size))
328 #undef LARGEST_INPUT_SIZE
337 #define LARGEST_INPUT_SIZE 512
338 #define INPUT_SIZES 6
339 static const int input_sizes[] = {8, 24, 128, 144, 256, 512};
340 const uint8_t *
src[4];
360 src[0] = (uint8_t*)src_g;
361 src[1] = (uint8_t*)src_b;
362 src[2] = (uint8_t*)src_r;
363 src[3] = (uint8_t*)src_a;
388 if (memcmp(dst0_a, dst1_a,
dstW * byte_size))
400 report(
"output_yuv2gbrp");
403 report(
"input_planar_rgb_y");
406 report(
"input_planar_rgb_uv");
409 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.
static const int input_sizes[]
@ 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)
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
#define SWS_FULL_CHR_H_INT
Perform full chroma upsampling when upscaling to RGB.
@ 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