32#define randomize_buffers(buf, size) \
35 for (j = 0; j < size; j+=4) \
36 AV_WN32(buf + j, rnd()); \
70 int dstW, byte_size, luma_filter_size, chr_filter_size;
71#define LARGEST_FILTER 16
73 static const int filter_sizes[] = {1, 4, 8, 16};
74#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;
147 luma_filter_size = filter_sizes[fsi];
148 chr_filter_size = filter_sizes[fsi];
150 if (
desc->comp[0].depth > 16) {
152 }
else if (
desc->comp[0].depth > 8) {
159 if (
check_func(
c->yuv2anyX,
"yuv2%s_full_X_%d_%d",
desc->name, luma_filter_size, dstW)) {
160 for (
i = 0;
i < 4;
i ++) {
165 call_ref(
c, luma_filter, luma, luma_filter_size,
166 chr_filter, chru, chrv, chr_filter_size,
167 alpha, dst0, dstW, 0);
168 call_new(
c, luma_filter, luma, luma_filter_size,
169 chr_filter, chru, chrv, chr_filter_size,
170 alpha, dst1, dstW, 0);
172 if (memcmp(dst0[0], dst1[0], dstW * byte_size) ||
173 memcmp(dst0[1], dst1[1], dstW * byte_size) ||
174 memcmp(dst0[2], dst1[2], dstW * byte_size) ||
175 memcmp(dst0[3], dst1[3], dstW * byte_size) )
178 bench_new(
c, luma_filter, luma, luma_filter_size,
179 chr_filter, chru, chrv, chr_filter_size,
180 alpha, dst1, dstW, 0);
188#undef LARGEST_INPUT_SIZE
197#define LARGEST_INPUT_SIZE 512
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;
238 if(
check_func(
c->readLumPlanar,
"planar_%s_to_y_%d",
desc->name, dstW)) {
245 if (memcmp(dst0_y, dst1_y, dstW * byte_size))
256#undef LARGEST_INPUT_SIZE
265#define LARGEST_INPUT_SIZE 512
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;
309 if(
check_func(
c->readChrPlanar,
"planar_%s_to_uv_%d",
desc->name, dstW)) {
318 if (memcmp(dst0_u, dst1_u, dstW * byte_size) ||
319 memcmp(dst0_v, dst1_v, dstW * byte_size))
329#undef LARGEST_INPUT_SIZE
338#define LARGEST_INPUT_SIZE 512
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;
382 if(
check_func(
c->readAlpPlanar,
"planar_%s_to_a_%d",
desc->name, dstW)) {
389 if (memcmp(dst0_a, dst1_a, dstW * byte_size))
401 report(
"output_yuv2gbrp");
404 report(
"input_planar_rgb_y");
407 report(
"input_planar_rgb_uv");
410 report(
"input_planar_rgb_a");
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
#define i(width, name, range_min, range_max)
static void fn rgb2yuv(uint8_t *_yuv[3], const ptrdiff_t yuv_stride[3], int16_t *rgb[3], ptrdiff_t s, int w, int h, const int16_t rgb2yuv_coeffs[3][3][8], const int16_t yuv_offset[8])
common internal and external API header
av_warn_unused_result int sws_init_context(SwsContext *sws_context, SwsFilter *srcFilter, SwsFilter *dstFilter)
Initialize the swscaler context sws_context.
SwsContext * sws_alloc_context(void)
Allocate an empty SwsContext and set its fields to default values.
void sws_freeContext(SwsContext *swsContext)
Free the swscaler context swsContext.
@ SWS_FULL_CHR_H_INT
Perform full chroma upsampling when upscaling to RGB.
static const int16_t alpha[]
#define LOCAL_ALIGNED_8(t, v,...)
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
#define AV_PIX_FMT_FLAG_ALPHA
The pixel format has an alpha channel.
@ AV_PIX_FMT_GBRP10BE
planar GBR 4:4:4 30bpp, big-endian
@ AV_PIX_FMT_GBRPF32BE
IEEE-754 single precision planar GBR 4:4:4, 96bpp, big-endian.
@ AV_PIX_FMT_GBRP9LE
planar GBR 4:4:4 27bpp, little-endian
@ AV_PIX_FMT_GBRP12BE
planar GBR 4:4:4 36bpp, big-endian
@ AV_PIX_FMT_GBRAP12BE
planar GBR 4:4:4:4 48bpp, big-endian
@ AV_PIX_FMT_GBRAP16BE
planar GBRA 4:4:4:4 64bpp, big-endian
@ AV_PIX_FMT_GBRPF32LE
IEEE-754 single precision planar GBR 4:4:4, 96bpp, little-endian.
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
@ AV_PIX_FMT_GBRP12LE
planar GBR 4:4:4 36bpp, little-endian
@ AV_PIX_FMT_GBRP16BE
planar GBR 4:4:4 48bpp, big-endian
@ AV_PIX_FMT_GBRAP12LE
planar GBR 4:4:4:4 48bpp, little-endian
@ AV_PIX_FMT_GBRP9BE
planar GBR 4:4:4 27bpp, big-endian
@ AV_PIX_FMT_GBRAPF32BE
IEEE-754 single precision planar GBRA 4:4:4:4, 128bpp, big-endian.
@ AV_PIX_FMT_GBRAPF32LE
IEEE-754 single precision planar GBRA 4:4:4:4, 128bpp, little-endian.
@ AV_PIX_FMT_GBRP14LE
planar GBR 4:4:4 42bpp, little-endian
@ AV_PIX_FMT_GBRP10LE
planar GBR 4:4:4 30bpp, little-endian
@ AV_PIX_FMT_GBRAP10BE
planar GBR 4:4:4:4 40bpp, big-endian
@ AV_PIX_FMT_GBRAP10LE
planar GBR 4:4:4:4 40bpp, little-endian
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
@ AV_PIX_FMT_GBRAP16LE
planar GBRA 4:4:4:4 64bpp, little-endian
@ AV_PIX_FMT_GBRP14BE
planar GBR 4:4:4 42bpp, big-endian
@ AV_PIX_FMT_GBRP16LE
planar GBR 4:4:4 48bpp, little-endian
#define AV_PIX_FMT_YUVA444P16
#define FF_ARRAY_ELEMS(a)
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Main external API structure.
int dst_format
Destination pixel format.
int src_format
Source pixel format.
unsigned flags
Bitmask of SWS_*.
void checkasm_check_sw_gbrp(void)
#define randomize_buffers(buf, size)
static const int planar_fmts[]
static void check_input_planar_rgb_to_uv(void)
#define LARGEST_INPUT_SIZE
static void check_input_planar_rgb_to_a(void)
static void check_input_planar_rgb_to_y(void)
static void check_output_yuv2gbrp(void)
static const int input_sizes[]
void ff_sws_init_scale(SwsInternal *c)
static SwsInternal * sws_internal(const SwsContext *sws)