Go to the documentation of this file.
32 #define randomize_buffers(buf, size) \
34 for (int j = 0; j < size; j += 4) \
35 AV_WN32(buf + j, rnd()); \
71 for (
size_t i = 0;
i < n;
i++) {
80 for (
size_t i = 0;
i < n;
i++) {
83 if (
abs((
r & 0x1f) - ( t & 0x1f)) > accuracy)
85 if (
abs(((
r >> 5) & 0x1f) - ((t >> 5) & 0x1f)) > accuracy)
87 if (
abs(((
r >> 10) & 0x1f) - ((t >> 10) & 0x1f)) > accuracy)
95 for (
size_t i = 0;
i < n;
i++) {
98 if (
abs((
r & 0x1f) - ( t & 0x1f)) > accuracy)
100 if (
abs(((
r >> 5) & 0x3f) - ((t >> 5) & 0x3f)) > accuracy)
102 if (
abs(((
r >> 11) & 0x1f) - ((t >> 11) & 0x1f)) > accuracy)
111 #define MAX_LINE_SIZE 1920
112 #define SRC_STRIDE_PAD 32
117 const int srcStride[],
int srcSliceY,
int srcSliceH,
118 uint8_t *
const dst[],
const int dstStride[]);
124 const uint8_t *
src[4] = { src_y, src_u, src_v, src_a };
129 uint8_t *dst0[4] = { dst0_0, dst0_1, dst0_2 };
134 uint8_t *dst1[4] = { dst1_0, dst1_1, dst1_2 };
173 width, srcSliceH, dst_pix_fmt,
191 srcSliceH, dst0, dstStride);
193 srcSliceH, dst1, dstStride);
201 for (
int row = 0; row < srcSliceH; row++)
203 dst1_0 + row * dstStride[0],
204 width * sample_size, 3))
212 for (
int row = 0; row < srcSliceH; row++)
214 dst1_0 + row * dstStride[0],
223 for (
int row = 0; row < srcSliceH; row++)
225 dst1_0 + row * dstStride[0],
229 for (
int p = 0;
p < 3;
p++)
230 for (
int row = 0; row < srcSliceH; row++)
232 dst1[
p] + row * dstStride[
p],
240 srcSliceH, dst0, dstStride);
248 #undef SRC_STRIDE_PAD
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
void sws_freeContext(SwsContext *swsContext)
Free the swscaler context swsContext.
@ AV_PIX_FMT_BGR24
packed RGB 8:8:8, 24bpp, BGRBGR...
@ AV_PIX_FMT_BGRA
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
@ AV_PIX_FMT_RGB555BE
packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), big-endian , X=unused/undefined
#define randomize_buffers(buf, size)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define FF_ARRAY_ELEMS(a)
@ 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)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_RL16
@ 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.
@ AV_PIX_FMT_RGB565LE
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), little-endian
@ AV_PIX_FMT_BGR565LE
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), little-endian
static int cmp_off_by_n(const uint8_t *ref, const uint8_t *test, size_t n, int accuracy)
@ AV_PIX_FMT_BGR555BE
packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), big-endian , X=unused/undefined
@ 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...
static int cmp_565_by_n(const uint8_t *ref, const uint8_t *test, size_t n, int accuracy, int is_be)
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
#define i(width, name, range_min, range_max)
void checkasm_check_sw_yuv2rgb(void)
@ AV_PIX_FMT_BGR565BE
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), big-endian
@ AV_PIX_FMT_ARGB
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
int av_image_get_linesize(enum AVPixelFormat pix_fmt, int width, int plane)
Compute the size of an image line with format pix_fmt and width width for the plane plane.
void av_log_set_level(int level)
Set the log level.
@ AV_PIX_FMT_RGB555LE
packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), little-endian, X=unused/undefined
@ AV_PIX_FMT_NV21
as above, but U and V bytes are swapped
@ AV_PIX_FMT_NV12
planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
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.
static int ref[MAX_W *MAX_W]
IDirect3DDxgiInterfaceAccess _COM_Outptr_ void ** p
@ AV_PIX_FMT_RGB565BE
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian
@ 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...
@ AV_PIX_FMT_BGR555LE
packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), little-endian, X=unused/undefined
static const int dst_fmts[]
static SwsInternal * sws_internal(const SwsContext *sws)
static int cmp_555_by_n(const uint8_t *ref, const uint8_t *test, size_t n, int accuracy, int is_be)
Main external API structure.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_WB24 unsigned int_TMPL AV_RB16