28 const int16_t *low, ptrdiff_t low_stride,
29 const int16_t *high, ptrdiff_t high_stride,
35 tmp = (11*low[0*low_stride] - 4*low[1*low_stride] + low[2*low_stride] + 4) >> 3;
36 output[(2*0+0)*out_stride] = (
tmp + high[0*high_stride]) >> 1;
40 tmp = ( 5*low[0*low_stride] + 4*low[1*low_stride] - low[2*low_stride] + 4) >> 3;
41 output[(2*0+1)*out_stride] = (
tmp - high[0*high_stride]) >> 1;
45 for (
i = 1;
i <
len - 1;
i++) {
46 tmp = (low[(
i-1)*low_stride] - low[(
i+1)*low_stride] + 4) >> 3;
47 output[(2*
i+0)*out_stride] = (
tmp + low[
i*low_stride] + high[
i*high_stride]) >> 1;
51 tmp = (low[(
i+1)*low_stride] - low[(
i-1)*low_stride] + 4) >> 3;
52 output[(2*
i+1)*out_stride] = (
tmp + low[
i*low_stride] - high[
i*high_stride]) >> 1;
57 tmp = ( 5*low[
i*low_stride] + 4*low[(
i-1)*low_stride] - low[(
i-2)*low_stride] + 4) >> 3;
58 output[(2*
i+0)*out_stride] = (
tmp + high[
i*high_stride]) >> 1;
62 tmp = (11*low[
i*low_stride] - 4*low[(
i-1)*low_stride] + low[(
i-2)*low_stride] + 4) >> 3;
63 output[(2*
i+1)*out_stride] = (
tmp - high[
i*high_stride]) >> 1;
68 static void vert_filter(int16_t *output, ptrdiff_t out_stride,
69 const int16_t *low, ptrdiff_t low_stride,
70 const int16_t *high, ptrdiff_t high_stride,
74 filter(output, out_stride, low, low_stride, high, high_stride,
height, 0);
82 const int16_t *low, ptrdiff_t lstride,
83 const int16_t *high, ptrdiff_t hstride,
90 output += ostride * 2;
Macro definitions for various function/variable attributes.
simple assert() macros that are a bit more flexible than ISO C assert().
static void horiz_filter(int16_t *output, ptrdiff_t ostride, const int16_t *low, ptrdiff_t lstride, const int16_t *high, ptrdiff_t hstride, int width, int height)
static void horiz_filter_clip(int16_t *output, const int16_t *low, const int16_t *high, int width, int clip)
static void horiz_filter_clip_bayer(int16_t *output, const int16_t *low, const int16_t *high, int width, int clip)
av_cold void ff_cfhddsp_init(CFHDDSPContext *c, int depth, int bayer)
static av_always_inline void filter(int16_t *output, ptrdiff_t out_stride, const int16_t *low, ptrdiff_t low_stride, const int16_t *high, ptrdiff_t high_stride, int len, int clip)
static void vert_filter(int16_t *output, ptrdiff_t out_stride, const int16_t *low, ptrdiff_t low_stride, const int16_t *high, ptrdiff_t high_stride, int width, int height)
void ff_cfhddsp_init_x86(CFHDDSPContext *c, int format, int bayer)
common internal and external API header
static av_always_inline av_const unsigned av_clip_uintp2_c(int a, int p)
Clip a signed integer to an unsigned power of two range.
static double clip(void *opaque, double val)
Clip value val in the minval - maxval range.