Home
last modified time | relevance | path

Searched refs:dither (Results 1 - 25 of 124) sorted by relevance

12345

/third_party/ffmpeg/libswresample/
H A Ddither.c27 double scale = s->dither.noise_scale; in swri_get_dither()
39 switch(s->dither.method){ in swri_get_dither()
42 av_assert0(s->dither.method < SWR_DITHER_NB); in swri_get_dither()
54 switch(s->dither.method){ in swri_get_dither()
56 av_assert0(s->dither.method < SWR_DITHER_NB); in swri_get_dither()
84 if (s->dither.method > SWR_DITHER_TRIANGULAR_HIGHPASS && s->dither.method <= SWR_DITHER_NS) in swri_dither_init()
95 if(in_fmt == AV_SAMPLE_FMT_S32 && out_fmt == AV_SAMPLE_FMT_S32 && (s->dither.output_sample_bits&31)) scale = 1; in swri_dither_init()
100 scale *= s->dither.scale; in swri_dither_init()
102 if (out_fmt == AV_SAMPLE_FMT_S32 && s->dither in swri_dither_init()
[all...]
H A Ddither_template.c44 int pos = s->dither.ns_pos; in swri_noise_shaping()
46 int taps = s->dither.ns_taps; in swri_noise_shaping()
47 float S = s->dither.ns_scale; in swri_noise_shaping()
48 float S_1 = s->dither.ns_scale_1; in swri_noise_shaping()
51 av_assert2((taps&3) != 3 || s->dither.ns_coeffs[taps] == 0); in swri_noise_shaping()
54 const float *noise = ((const float *)noises->ch[ch]) + s->dither.noise_pos; in swri_noise_shaping()
57 float *ns_errors = s->dither.ns_errors[ch]; in swri_noise_shaping()
58 const float *ns_coeffs = s->dither.ns_coeffs; in swri_noise_shaping()
59 pos = s->dither.ns_pos; in swri_noise_shaping()
79 s->dither in swri_noise_shaping()
[all...]
H A Dswresample.c160 free_temp(&s->dither.noise); in clear_context()
161 free_temp(&s->dither.temp); in clear_context()
290 s->dither.method = s->user_dither_method; in swr_init()
438 if(!s->resample && !s->rematrix && !s->channel_map && !s->dither.method){ in swr_init()
479 s->dither.noise = s->preout; in swr_init()
480 s->dither.temp = s->preout; in swr_init()
481 if (s->dither.method > SWR_DITHER_NS) { in swr_init()
482 s->dither.noise.bps = 4; in swr_init()
483 s->dither.noise.fmt = AV_SAMPLE_FMT_FLTP; in swr_init()
484 s->dither in swr_init()
[all...]
/third_party/cups-filters/filter/
H A Dimagetoraster.c52 int Floyd16x16[16][16] = /* Traditional Floyd ordered dither */
1723 *dither; /* Pointer into dither array */ in format_CMY() local
1749 dither = Floyd16x16[y & 15]; in format_CMY()
1753 if (*r0++ > dither[x & 15]) in format_CMY()
1757 if (*r0++ > dither[x & 15]) in format_CMY()
1761 if (*r0++ > dither[x & 15]) in format_CMY()
1775 dither = Floyd8x8[y & 7]; in format_CMY()
1779 if ((r0[0] & 63) > dither[x & 7]) in format_CMY()
1784 if ((r0[1] & 63) > dither[ in format_CMY()
2098 *dither; /* Pointer into dither array */ format_CMYK() local
2488 *dither; /* Pointer into dither array */ format_K() local
2611 *dither; /* Pointer into dither array */ format_KCMY() local
3041 *dither; /* Pointer into dither array */ format_KCMYcm() local
3211 *dither; /* Pointer into dither array */ format_RGBA() local
3607 *dither; /* Pointer into dither array */ format_W() local
3729 *dither; /* Pointer into dither array */ format_YMC() local
4119 *dither; /* Pointer into dither array */ format_YMCK() local
[all...]
/third_party/ffmpeg/libavcodec/
H A Dcljrenc.c45 uint32_t dither= avctx->frame_number; in encode_frame() local
72 case 0: dither = 0x492A0000; break; in encode_frame()
73 case 1: dither = dither * 1664525 + 1013904223; break; in encode_frame()
74 case 2: dither = ordered_dither[ y&1 ][ (x>>2)&1 ];break; in encode_frame()
81 put_bits(&pb, 5, (249*(luma[3] + (dither>>29) )) >> 11); in encode_frame()
82 put_bits(&pb, 5, (249*(luma[2] + ((dither>>26)&7))) >> 11); in encode_frame()
83 put_bits(&pb, 5, (249*(luma[1] + ((dither>>23)&7))) >> 11); in encode_frame()
84 put_bits(&pb, 5, (249*(luma[0] + ((dither>>20)&7))) >> 11); in encode_frame()
86 put_bits(&pb, 6, (253*(*(cb++) + ((dither>>1 in encode_frame()
[all...]
H A Daptx.c396 channel->dither[subband] = (unsigned)d << (23 - 5*subband); in ff_aptx_generate_dither()
401 int32_t quantized_sample, int32_t dither, in aptx_invert_quantization()
411 qr = rshift64_clip24((qr * (1LL<<32)) + MUL64(dither, tables->invert_quantize_dither_factors[idx]), 32); in aptx_invert_quantization()
466 int32_t quantized_sample, int32_t dither, in aptx_process_subband()
471 aptx_invert_quantization(invert_quantize, quantized_sample, dither, tables); in aptx_process_subband()
504 channel->dither[subband], in ff_aptx_invert_quantize_and_prediction()
400 aptx_invert_quantization(InvertQuantize *invert_quantize, int32_t quantized_sample, int32_t dither, ConstTables *tables) aptx_invert_quantization() argument
464 aptx_process_subband(InvertQuantize *invert_quantize, Prediction *prediction, int32_t quantized_sample, int32_t dither, ConstTables *tables) aptx_process_subband() argument
H A Daptxenc.c102 int32_t dither, in aptx_quantize_difference()
118 d = rshift32_clip24(MULH(dither, dither), 7) - (1 << 23); in aptx_quantize_difference()
125 dithered_sample = rshift64_clip24(MUL64(dither, interval) + ((int64_t)av_clip_intp2(mean + d, 23) << 32), 32); in aptx_quantize_difference()
149 channel->dither[subband], in aptx_encode_channel()
100 aptx_quantize_difference(Quantize *quantize, int32_t sample_difference, int32_t dither, int32_t quantization_factor, ConstTables *tables) aptx_quantize_difference() argument
H A Da64multienc.c115 uint8_t dither[256]; in render_charset() local
119 /* Generate lookup-tables for dither and index before looping. in render_charset()
122 * being zero; this ensures that dither is properly initialized. */ in render_charset()
128 dither[c->mc_luma_vals[i] + b] = b * (DITHERSTEPS - 1) / distance; in render_charset()
132 if(i >= c->mc_pal_size - 1) dither[a] = 0; in render_charset()
156 if (interlaced_dither_patterns[dither[pix]][(y & 3) * 2 + 0][x & 3]) in render_charset()
161 if (interlaced_dither_patterns[dither[pix]][(y & 3) * 2 + 1][x & 3]) in render_charset()
167 if (multi_dither_patterns[dither[pix]][(y & 3)][x & 3]) in render_charset()
/third_party/libsnd/src/
H A Ddither.c28 ** Rule number 1 is to only apply dither when going from a larger bitwidth
31 ** Need to apply dither on all conversions marked X below.
90 pdither = psf->dither ; /* This may be NULL. */ in dither_init()
92 /* Turn off dither on read. */ in dither_init()
108 /* Turn off dither on write. */ in dither_init()
124 /* Turn on dither on read if asked. */ in dither_init()
127 pdither = psf->dither = calloc (1, sizeof (DITHER_DATA)) ; in dither_init()
151 /* Turn on dither on write if asked. */ in dither_init()
154 pdither = psf->dither = calloc (1, sizeof (DITHER_DATA)) ; in dither_init()
221 if ((pdither = psf->dither) in dither_write_short()
[all...]
/third_party/mesa3d/src/gallium/drivers/freedreno/a6xx/
H A Dfd6_blend.c117 .dither_mode_mrt0 = cso->dither ? DITHER_ALWAYS : DITHER_DISABLE, in __fd6_setup_blend_variant()
118 .dither_mode_mrt1 = cso->dither ? DITHER_ALWAYS : DITHER_DISABLE, in __fd6_setup_blend_variant()
119 .dither_mode_mrt2 = cso->dither ? DITHER_ALWAYS : DITHER_DISABLE, in __fd6_setup_blend_variant()
120 .dither_mode_mrt3 = cso->dither ? DITHER_ALWAYS : DITHER_DISABLE, in __fd6_setup_blend_variant()
121 .dither_mode_mrt4 = cso->dither ? DITHER_ALWAYS : DITHER_DISABLE, in __fd6_setup_blend_variant()
122 .dither_mode_mrt5 = cso->dither ? DITHER_ALWAYS : DITHER_DISABLE, in __fd6_setup_blend_variant()
123 .dither_mode_mrt6 = cso->dither ? DITHER_ALWAYS : DITHER_DISABLE, in __fd6_setup_blend_variant()
125 cso->dither ? DITHER_ALWAYS : DITHER_DISABLE, )); in __fd6_setup_blend_variant()
/third_party/libsnd/tests/
H A Ddither_test.c62 { dither_test ("dither.wav", SF_FORMAT_WAV | SF_FORMAT_PCM_U8) ; in main()
67 { dither_test ("dither.aiff", SF_FORMAT_AIFF | SF_FORMAT_PCM_S8) ; in main()
72 { dither_test ("dither.au", SF_FORMAT_AU | SF_FORMAT_PCM_S8) ; in main()
77 { dither_test ("dither.svx", SF_FORMAT_SVX | SF_FORMAT_PCM_S8) ; in main()
82 { dither_test ("dither.nist", SF_FORMAT_NIST | SF_FORMAT_PCM_S8) ; in main()
87 { dither_test ("dither.paf", SF_FORMAT_PAF | SF_FORMAT_PCM_S8) ; in main()
92 { dither_test ("dither.ircam", SF_FORMAT_IRCAM | SF_FORMAT_PCM_S8) ; in main()
97 { dither_test ("dither.voc", SF_FORMAT_VOC | SF_FORMAT_PCM_S8) ; in main()
102 { dither_test ("dither.w64", SF_FORMAT_W64 | SF_FORMAT_PCM_S8) ; in main()
107 { dither_test ("dither in main()
140 SF_DITHER_INFO dither ; dither_test() local
[all...]
/third_party/ffmpeg/libavdevice/
H A Dcaca.c34 caca_dither_t *dither; member
52 if (c->dither) { in caca_deinit()
53 caca_free_dither(c->dither); in caca_deinit()
54 c->dither = NULL; in caca_deinit()
75 const char *const *thing = caca_get_dither_## thing ##_list(c->dither); \
141 c->dither = caca_create_dither(bpp, encctx->width, encctx->height, in caca_write_header()
144 if (!c->dither) { in caca_write_header()
146 av_log(s, AV_LOG_ERROR, "Failed to create dither\n"); in caca_write_header()
151 if (caca_set_dither_##opt(c->dither, c->opt) < 0) { \ in caca_write_header()
189 caca_dither_bitmap(c->canvas, 0, 0, c->window_width, c->window_height, c->dither, pk in caca_write_packet()
[all...]
/third_party/cups-filters/cupsfilters/
H A Dtestdither.c53 short line[512]; /* Line to dither */ in main()
58 cups_dither_t *dither; /* Dither state */ in main() local
107 * Create the lookup table and dither state... in main()
111 dither = cupsDitherNew(512); in main()
136 cupsDitherLine(dither, lut, line, 1, pixels); in main()
162 * Free the dither state and lookup table... in main()
165 cupsDitherDelete(dither); in main()
/third_party/ffmpeg/libswscale/ppc/
H A Dswscale_ppc_template.c29 const uint8_t *dither, int offset, int x) in yuv2planeX_8_16()
40 val[i] = dither[(x + i + offset) & 7] << 12; in yuv2planeX_8_16()
72 const uint8_t *dither, int offset, int x) in yuv2planeX_u()
77 int t = dither[(i + offset) & 7] << 12; in yuv2planeX_u()
86 const uint8_t *dither, int offset) in yuv2planeX()
91 yuv2planeX_u(filter, filterSize, src, dest, dst_u, dither, offset, 0); in yuv2planeX()
94 FUNC(yuv2planeX_8_16)(filter, filterSize, src, dest + i, dither, in yuv2planeX()
97 yuv2planeX_u(filter, filterSize, src, dest, dstW, dither, offset, i); in yuv2planeX()
27 yuv2planeX_8_16(const int16_t *filter, int filterSize, const int16_t **src, uint8_t *dest, const uint8_t *dither, int offset, int x) yuv2planeX_8_16() argument
70 yuv2planeX_u(const int16_t *filter, int filterSize, const int16_t **src, uint8_t *dest, int dstW, const uint8_t *dither, int offset, int x) yuv2planeX_u() argument
84 yuv2planeX(const int16_t *filter, int filterSize, const int16_t **src, uint8_t *dest, int dstW, const uint8_t *dither, int offset) yuv2planeX() argument
/third_party/ffmpeg/tests/checkasm/
H A Dsw_scale.c42 const uint8_t *dither, int offset) in ref_function()
45 d = ((filterSize - 1) * 8 + dither[0]) >> 4; in ref_function()
75 int dstW, const uint8_t *dither, int offset); in check_yuv2yuvX()
82 LOCAL_ALIGNED_16(uint8_t, dither, [LARGEST_INPUT_SIZE]); in check_yuv2yuvX()
88 memset(dither, d_val, LARGEST_INPUT_SIZE); in check_yuv2yuvX()
117 ref_function(&filter_coeff[0], filter_sizes[fsi], src, dst0, dstW - osi, dither, osi); in check_yuv2yuvX()
120 call_new((const int16_t*)vFilterData, filter_sizes[fsi], src, dst1, dstW - osi, dither, osi); in check_yuv2yuvX()
124 bench_new((const int16_t*)vFilterData, filter_sizes[fsi], src, dst1, dstW - osi, dither, osi); in check_yuv2yuvX()
40 ref_function(const int16_t *filter, int filterSize, const int16_t **src, uint8_t *dest, int dstW, const uint8_t *dither, int offset) ref_function() argument
/third_party/skia/gm/
H A Dgradients.cpp190 GradientsGM(bool dither) : fDither(dither) {} in GradientsGM() argument
241 Gradients4fGM(bool dither) : fDither(dither) {} in Gradients4fGM() argument
292 GradientsLocalPerspectiveGM(bool dither) : fDither(dither) { in GradientsLocalPerspectiveGM() argument
343 GradientsViewPerspectiveGM(bool dither) : INHERITED(dither) { } in GradientsViewPerspectiveGM() argument
386 GradientsDegenrate2PointGM(bool dither) : fDither(dither) {} in GradientsDegenrate2PointGM() argument
459 ClampedGradientsGM(bool dither) ClampedGradientsGM() argument
526 RadialGradient2GM(bool dither) RadialGradient2GM() argument
590 RadialGradient3GM(bool dither) RadialGradient3GM() argument
627 RadialGradient4GM(bool dither) RadialGradient4GM() argument
665 LinearGradientGM(bool dither) LinearGradientGM() argument
[all...]
/third_party/ffmpeg/libswscale/arm/
H A Doutput.S28 ldr r5, [sp, #108] @ dither
30 vld1.8 {d0}, [r5] @ load 8x8-bit dither values
34 1: vmovl.u8 q0, d0 @ extend dither to 16-bit
35 vshll.u16 q1, d0, #12 @ extend dither to 32-bit with left shift by 12 (part 1)
36 vshll.u16 q2, d1, #12 @ extend dither to 32-bit with left shift by 12 (part 2)
/third_party/skia/docs/examples/
H A Dblur4444.cpp7 bool dither = false; in REG_FIDDLE() local
40 blrPaint.setDither(dither); in REG_FIDDLE()
53 grdPaint.setDither(dither); in REG_FIDDLE()
H A Ddither1.cpp10 for (auto dither : {false, true}) { in REG_FIDDLE()
11 colorPaint.setDither(dither); in REG_FIDDLE()
H A DDither_a.cpp11 for (auto dither : { false, true } ) { in REG_FIDDLE()
12 colorPaint.setDither(dither); in REG_FIDDLE()
/third_party/ffmpeg/libavcodec/aarch64/
H A Dmpegaudiodsp_init.c28 int *dither, int16_t *samples, ptrdiff_t incr);
30 int *dither, float *samples, ptrdiff_t incr);
/third_party/skia/third_party/externals/libjpeg-turbo/
H A Djdmerge.c412 #define DITHER_565_R(r, dither) ((r) + ((dither) & 0xFF))
413 #define DITHER_565_G(g, dither) ((g) + (((dither) & 0xFF) >> 1))
414 #define DITHER_565_B(b, dither) ((b) + ((dither) & 0xFF))
419 * We use a 4x4 ordered dither array packed into 32 bits. This array is
/third_party/ffmpeg/libswscale/x86/
H A Doutput.asm102 ; const uint8_t *dither, int offset)
106 ; const uint8_t *dither, int offset)
111 ; of 2. $offset is either 0 or 3. $dither holds 8 values.
116 ; the rep here is for the 8-bit output MMX case, where dither covers
236 cglobal yuv2planeX_%1, %3, 8, %2, filter, fltsize, src, dst, w, dither, offset
250 ; create registers holding dither
251 movq m_dith, [ditherq] ; dither
387 cglobal yuv2plane1_%1, %3, %3, %2, src, dst, w, dither, offset
406 ; create registers holding dither
407 movq m3, [ditherq] ; dither
[all...]
H A Dswscale.c187 const uint8_t *dither, int offset); \
190 const uint8_t *dither, int offset) \
193 ff_yuv2yuvX_ ##opt(filter, filterSize - 1, 0, dest - offset, dstW + offset, dither, offset); \
200 const uint8_t *dither, int offset); \
203 const uint8_t *dither, int offset) \
208 yuv2yuvX_mmx(filter, filterSize, src, dest, dstW, dither, offset); \
212 ff_yuv2yuvX_ ##opt(filter, filterSize - 1, 0, dest - offset, pixelsProcessed + offset, dither, offset); \
214 ff_yuv2yuvX_mmx(filter, filterSize - 1, pixelsProcessed, dest - offset, pixelsProcessed + remainder + offset, dither, offset); \
274 const uint8_t *dither, int offset)
288 const uint8_t *dither, in
[all...]
/third_party/ffmpeg/libavfilter/
H A Dvf_gradfun.c46 DECLARE_ALIGNED(16, static const uint16_t, dither)[8][8] = {
114 ctx->filter_line(dst + y * dst_linesize, src + y * src_linesize, dc - r / 2, width, thresh, dither[y & 7]); in filter()
116 ctx->filter_line(dst + y * dst_linesize, src + y * src_linesize, dc - r / 2, width, thresh, dither[y & 7]); in filter()
118 ctx->filter_line(dst + y * dst_linesize, src + y * src_linesize, dc - r / 2, width, thresh, dither[y & 7]); in filter()

Completed in 14 milliseconds

12345