Go to the documentation of this file.
28 #define randomize_buffers(buf, size) \
30 for (int j = 0; j < size; j += 4) \
31 AV_WN32((char*)buf + j, rnd()); \
34 #define randomize_buffer_clipped(buf, min, max) \
36 for (size_t j = 0; j < FF_ARRAY_ELEMS(buf); ++j) \
37 buf[j] = rnd() % (max - min + 1) + min; \
52 memcpy(rem2, rem1,
sizeof(rem2));
55 if (memcmp(rem1, rem2,
sizeof(rem1)))
69 for (
int n = 0; n < 2; n++) {
70 const char *negstride_str = n ?
"_negstride" :
"";
71 if (
check_func(
c->pix_sum,
"pix_sum%s", negstride_str)) {
73 const uint8_t *
pix =
src + (n ? (15 * 16) : 0);
74 ptrdiff_t line_size = 16 * (n ? -1 : 1);
92 for (
int n = 0; n < 2; n++) {
93 const char *negstride_str = n ?
"_negstride" :
"";
94 if (
check_func(
c->pix_norm1,
"pix_norm1%s", negstride_str)) {
96 const uint8_t *
pix =
src + (n ? (15 * 16) : 0);
97 ptrdiff_t line_size = 16 * (n ? -1 : 1);
108 #define MAX_LINE_SIZE 1920
109 #define EDGE_WIDTH 16
110 #define LINESIZE (EDGE_WIDTH + MAX_LINE_SIZE + EDGE_WIDTH)
111 #define BUFSIZE ((EDGE_WIDTH + NUM_LINES + EDGE_WIDTH) * LINESIZE)
120 int w,
int h,
int sides);
124 int negstride = input_size < 0;
125 const char *negstride_str = negstride ?
"_negstride" :
"";
134 dst0 += (
height - 1) * linesize;
135 dst1 += (
height - 1) * linesize;
146 if (memcmp(buf0, buf1,
BUFSIZE))
#define declare_func_emms(cpu_flags, ret,...)
static int16_t basis[64][64]
#define check_func(func,...)
void checkasm_check_mpegvideoencdsp(void)
static void check_pix_norm1(MpegvideoEncDSPContext *c)
static void check_pix_sum(MpegvideoEncDSPContext *c)
#define FF_ARRAY_ELEMS(a)
static const int input_sizes[]
#define LOCAL_ALIGNED_16(t, v,...)
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
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
#define DECLARE_ALIGNED(n, t, v)
static int shift(int a, int b)
#define randomize_buffer_clipped(buf, min, max)
#define randomize_buffers(buf, size)
#define AV_CPU_FLAG_MMX
standard MMX
main external API structure.
static av_const int sign_extend(int val, unsigned bits)
#define declare_func(ret,...)
static void scale(int *out, const int *in, const int w, const int h, const int shift)
av_cold void ff_mpegvideoencdsp_init(MpegvideoEncDSPContext *c, AVCodecContext *avctx)
static void check_draw_edges(MpegvideoEncDSPContext *c)
static void check_add_8x8basis(MpegvideoEncDSPContext *c)