Go to the documentation of this file.
28 #define SRC_STRIDE 512
29 #define PIXELS (WIDTH * HEIGHT)
31 #define randomize_buffers(buf, size) \
34 uint8_t *tmp_buf = (uint8_t *)buf;\
35 for (j = 0; j< size; j++) \
36 tmp_buf[j] = rnd() & 0xFF; \
63 const uint8_t *
c[],
int peak,
int radius,
int dstride,
int stride,
int size);
72 memset(dst_ref, 0,
PIXELS);
73 memset(dst_new, 0,
PIXELS);
82 call_ref(dst_ref + yoff + xoff, sizew - 2 * radius,
85 call_new(dst_new + yoff + xoff, sizew - 2 * radius,
88 if (memcmp(dst_ref + yoff + xoff, dst_new + yoff + xoff,
slice_end -
step))
90 bench_new(dst_new + yoff + xoff, sizew - 2 * radius,
103 report(
"convolution:sobel");
trying all byte sequences megabyte in length and selecting the best looking sequence will yield cases to try But a word about which is also called distortion Distortion can be quantified by almost any quality measurement one chooses the sum of squared differences is used but more complex methods that consider psychovisual effects can be used as well It makes no difference in this discussion First step
#define check_func(func,...)
static av_unused void ff_sobel_init(ConvolutionContext *s, int depth, int nb_planes)
static int slice_start(SliceContext *sc, VVCContext *s, VVCFrameContext *fc, const CodedBitstreamUnit *unit, const int is_first_slice)
static int slice_end(AVCodecContext *avctx, AVFrame *pict)
Handle slice ends.
#define LOCAL_ALIGNED_32(t, v,...)
static void check_sobel(const char *report_name)
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 scale(int *out, const int *in, const int w, const int h, const int shift)
void checkasm_check_vf_sobel(void)
#define randomize_buffers(buf, size)
#define declare_func(ret,...)