Go to the documentation of this file.
31 #define randomize_buffers(buf, size) \
33 for (int j = 0; j < size; j += 4) \
34 AV_WN32(buf + j, rnd()); \
66 for (
size_t i = 0;
i < n;
i++) {
75 const uint16_t *ref16 = (
const uint16_t *)
ref;
76 const uint16_t *test16 = (
const uint16_t *)
test;
77 for (
size_t i = 0;
i < n;
i++) {
78 if (
abs(( ref16[
i] & 0x1f) - ( test16[
i] & 0x1f)) > accuracy)
80 if (
abs(((ref16[
i] >> 5) & 0x1f) - ((test16[
i] >> 5) & 0x1f)) > accuracy)
82 if (
abs(((ref16[
i] >> 10) & 0x1f) - ((test16[
i] >> 10) & 0x1f)) > accuracy)
90 const uint16_t *ref16 = (
const uint16_t *)
ref;
91 const uint16_t *test16 = (
const uint16_t *)
test;
92 for (
size_t i = 0;
i < n;
i++) {
93 if (
abs(( ref16[
i] & 0x1f) - ( test16[
i] & 0x1f)) > accuracy)
95 if (
abs(((ref16[
i] >> 5) & 0x3f) - ((test16[
i] >> 5) & 0x3f)) > accuracy)
97 if (
abs(((ref16[
i] >> 11) & 0x1f) - ((test16[
i] >> 11) & 0x1f)) > accuracy)
106 #define MAX_LINE_SIZE 1920
111 int srcStride[],
int srcSliceY,
int srcSliceH,
112 uint8_t *
dst[],
int dstStride[]);
118 const uint8_t *
src[4] = { src_y, src_u, src_v, src_a };
123 uint8_t *dst0[4] = { dst0_0, dst0_1, dst0_2 };
124 uint8_t *lines0[4][2] = {
133 uint8_t *dst1[4] = { dst1_0, dst1_1, dst1_2 };
134 uint8_t *lines1[4][2] = {
173 width, srcSliceH, dst_pix_fmt,
191 srcSliceH, dst0, dstStride);
193 srcSliceH, dst1, dstStride);
215 for (
int p = 0; p < 3; p++)
216 for (
int l = 0; l < 2; l++)
224 srcSliceH, dst0, dstStride);
#define declare_func_emms(cpu_flags, ret,...)
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
void sws_freeContext(SwsContext *swsContext)
Free the swscaler context swsContext.
#define check_func(func,...)
@ AV_PIX_FMT_BGR24
packed RGB 8:8:8, 24bpp, BGRBGR...
@ AV_PIX_FMT_BGRA
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
#define randomize_buffers(buf, size)
static int cmp_565_by_n(const uint8_t *ref, const uint8_t *test, size_t n, int accuracy)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define FF_ARRAY_ELEMS(a)
static int cmp_555_by_n(const uint8_t *ref, const uint8_t *test, size_t n, int accuracy)
@ AV_PIX_FMT_YUVA420P
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
static const int input_sizes[]
static void check_yuv2rgb(int src_pix_fmt)
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
#define LOCAL_ALIGNED_8(t, v,...)
int av_log_get_level(void)
Get the current log level.
static int cmp_off_by_n(const uint8_t *ref, const uint8_t *test, size_t n, int accuracy)
@ AV_PIX_FMT_ABGR
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
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
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
int av_get_padded_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
Return the number of bits per pixel for the pixel format described by pixdesc, including any padding ...
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
void checkasm_check_sw_yuv2rgb(void)
#define AV_PIX_FMT_BGR555
@ AV_PIX_FMT_ARGB
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
static SwsContext * sws[3]
void av_log_set_level(int level)
Set the log level.
#define i(width, name, range_min, range_max)
#define AV_PIX_FMT_RGB555
#define AV_PIX_FMT_BGR565
#define AV_PIX_FMT_RGB565
SwsContext * sws_getContext(int srcW, int srcH, enum AVPixelFormat srcFormat, int dstW, int dstH, enum AVPixelFormat dstFormat, int flags, SwsFilter *srcFilter, SwsFilter *dstFilter, const double *param)
Allocate and return an SwsContext.
#define AV_CPU_FLAG_MMX
standard MMX
static int ref[MAX_W *MAX_W]
#define AV_CPU_FLAG_MMXEXT
SSE integer functions or AMD MMX ext.
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
static const int dst_fmts[]
static SwsInternal * sws_internal(const SwsContext *sws)
Main external API structure.