Go to the documentation of this file.
31 #define randomize_buffers(buf, size) \
34 for (j = 0; j < size; j+=4) \
35 AV_WN32(buf + j, rnd()); \
38 #define SRC_PIXELS 128
42 #define MAX_FILTER_WIDTH 40
43 #define FILTER_SIZES 5
44 static const int filter_sizes[
FILTER_SIZES] = { 4, 8, 16, 32, 40 };
46 #define HSCALE_PAIRS 2
68 const int32_t *filterPos,
int filterSize);
78 width = filter_sizes[fsi];
80 ctx->srcBpc = hscale_pairs[hpi][0];
81 ctx->dstBpc = hscale_pairs[hpi][1];
100 for (j = 0; j <
width; j++) {
116 memset(dst0, 0,
SRC_PIXELS *
sizeof(dst0[0]));
117 memset(dst1, 0,
SRC_PIXELS *
sizeof(dst1[0]));
121 if (memcmp(dst0, dst1,
SRC_PIXELS *
sizeof(dst0[0])))
#define declare_func_emms(cpu_flags, ret,...)
int dstW
Width of destination luma/alpha planes.
#define check_func(func,...)
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce then the filter should push the output frames on the output link immediately As an exception to the previous rule if the input frame is enough to produce several output frames then the filter needs output only at least one per link The additional frames can be left buffered in the filter
static void check_hscale(void)
struct SwsContext * sws_alloc_context(void)
Allocate an empty SwsContext.
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
SwsFunc ff_getSwsFunc(SwsContext *c)
Return function pointer to fastest main scaler path function depending on architecture and available ...
#define i(width, name, range_min, range_max)
#define randomize_buffers(buf, size)
av_warn_unused_result int sws_init_context(struct SwsContext *sws_context, SwsFilter *srcFilter, SwsFilter *dstFilter)
Initialize the swscaler context sws_context.
#define AV_CPU_FLAG_MMX
standard MMX
void sws_freeContext(struct SwsContext *swsContext)
Free the swscaler context swsContext.
#define LOCAL_ALIGNED_32(t, v,...)
void checkasm_check_sw_scale(void)