Home
last modified time | relevance | path

Searched refs:lfg (Results 1 - 21 of 21) sorted by relevance

/third_party/ffmpeg/libavutil/tests/
H A Dlls.c23 #include "libavutil/lfg.h"
31 AVLFG lfg; in main() local
33 av_lfg_init(&lfg, 1); in main()
40 var[0] = (av_lfg_get(&lfg) / (double) UINT_MAX - 0.5) * 2; in main()
41 var[1] = var[0] + av_lfg_get(&lfg) / (double) UINT_MAX - 0.5; in main()
42 var[2] = var[1] + av_lfg_get(&lfg) / (double) UINT_MAX - 0.5; in main()
43 var[3] = var[2] + av_lfg_get(&lfg) / (double) UINT_MAX - 0.5; in main()
H A Dfifo.c23 #include "libavutil/lfg.h"
145 AVLFG lfg; in main() local
148 av_lfg_init(&lfg, seed); in main()
154 unsigned to_process = av_lfg_get(&lfg) % nb_elems; in main()
166 s.offset = av_lfg_get(&lfg) % (nb_elems - 1); in main()
169 s.to_process = av_lfg_get(&lfg) % nb_elems; in main()
180 to_process = nb_elems ? av_lfg_get(&lfg) % nb_elems : 0; in main()
/third_party/ffmpeg/libavutil/
H A Dlfg.c25 #include "lfg.h"
49 void av_bmg_get(AVLFG *lfg, double out[2]) in av_bmg_get() argument
54 x1 = 2.0 / UINT_MAX * av_lfg_get(lfg) - 1.0; in av_bmg_get()
55 x2 = 2.0 / UINT_MAX * av_lfg_get(lfg) - 1.0; in av_bmg_get()
H A DMakefile55 lfg.h \
144 lfg.o \
251 lfg \
H A Dlfg.h74 * generator using the random numbers issued by lfg.
78 void av_bmg_get(AVLFG *lfg, double out[2]);
/third_party/ffmpeg/libavfilter/
H A Dvf_noise.c29 #include "libavutil/lfg.h"
69 #define RAND_N(range) ((int) ((double) range * av_lfg_get(lfg) / (UINT_MAX + 1.0)))
74 AVLFG *lfg = &n->param[comp].lfg; in init_noise() local
82 av_lfg_init(&fp->lfg, fp->seed + comp*31415U); in init_noise()
104 x1 = 2.0 * av_lfg_get(lfg) / (float)UINT_MAX - 1.0; in init_noise()
105 x2 = 2.0 * av_lfg_get(lfg) / (float)UINT_MAX - 1.0; in init_noise()
127 fp->prev_shift[i][j] = noise + (av_lfg_get(lfg) & (MAX_SHIFT - 1)); in init_noise()
268 fp->rand_shift[i] = av_lfg_get(&fp->lfg) & (MAX_SHIFT - 1); in filter_frame()
H A Df_perms.c23 #include "libavutil/lfg.h"
40 AVLFG lfg; member
69 av_lfg_init(&s->lfg, seed); in init()
88 case MODE_RANDOM: out_perm = av_lfg_get(&s->lfg) & 1 ? RW : RO; break; in filter_frame()
H A Dvf_random.c21 #include "libavutil/lfg.h"
34 AVLFG lfg; member
62 av_lfg_init(&s->lfg, seed); in init()
81 idx = av_lfg_get(&s->lfg) % s->nb_frames; in filter_frame()
H A Dvsrc_sierpinski.c34 #include "libavutil/lfg.h"
52 AVLFG lfg; member
155 av_lfg_init(&s->lfg, s->seed); in config_output()
168 unsigned int rnd = av_lfg_get(&s->lfg); in draw_sierpinski()
H A Dvsrc_gradients.c30 #include "libavutil/lfg.h"
52 AVLFG lfg; member
341 av_lfg_init(&s->lfg, s->seed); in config_output()
358 s->x0 = av_lfg_get(&s->lfg) % s->w; in config_output()
360 s->y0 = av_lfg_get(&s->lfg) % s->h; in config_output()
362 s->x1 = av_lfg_get(&s->lfg) % s->w; in config_output()
364 s->y1 = av_lfg_get(&s->lfg) % s->h; in config_output()
H A Dvf_elbg.c39 AVLFG lfg; member
82 av_lfg_init(&elbg->lfg, elbg->lfg_seed); in init()
175 elbg->codeword_closest_codebook_idxs, &elbg->lfg, 0); in filter_frame()
H A Dvf_noise.h25 #include "libavutil/lfg.h"
40 AVLFG lfg; member
H A Dvsrc_cellauto.c30 #include "libavutil/lfg.h"
56 AVLFG lfg; member
192 av_lfg_init(&s->lfg, s->random_seed); in init()
195 double r = (double)av_lfg_get(&s->lfg) / UINT32_MAX; in init()
H A Dvsrc_life.c31 #include "libavutil/lfg.h"
72 AVLFG lfg; member
249 av_lfg_init(&life->lfg, life->random_seed); in init()
252 double r = (double)av_lfg_get(&life->lfg) / UINT32_MAX; in init()
H A Dvf_deshake_opencl.c49 #include <libavutil/lfg.h>
/third_party/ffmpeg/tools/
H A Dscale_slice_test.c28 #include "libavutil/lfg.h"
40 AVLFG lfg; member
81 slice_height = av_lfg_get(&pd->lfg) % (frame->height - slice_start); in process_frame()
142 av_lfg_init(&pd.lfg, pd.random_seed); in main()
/third_party/ffmpeg/libavcodec/
H A Dcngdec.c31 #include "libavutil/lfg.h"
41 AVLFG lfg; member
77 av_lfg_init(&p->lfg, 0); in cng_decode_init()
145 int r = (av_lfg_get(&p->lfg) & 0xffff) - 0x8000; in cng_decode_frame()
H A Datrac9dec.c30 #include "libavutil/lfg.h"
91 AVLFG lfg; member
522 av_bmg_get(&s->lfg, tmp); in fill_with_noise()
906 av_lfg_init(&s->lfg, 0xFBADF00D); in atrac9_decode_init()
/third_party/ffmpeg/tests/fate/
H A Dlibavutil.mak107 FATE_LIBAVUTIL += fate-lfg
108 fate-lfg: libavutil/tests/lfg$(EXESUF)
109 fate-lfg: CMD = run libavutil/tests/lfg$(EXESUF)
/third_party/ffmpeg/libavresample/
H A Ddither.c36 #include "libavutil/lfg.h"
46 AVLFG lfg; member
84 /* scale to convert lfg from INT_MIN/INT_MAX to -0.5/0.5 */
160 av_lfg_init(&state->lfg, state->seed); in generate_dither_noise()
162 noise_buf_ui[i] = av_lfg_get(&state->lfg); in generate_dither_noise()
/third_party/ffmpeg/libavresample/tests/
H A Davresample.c27 #include "libavutil/lfg.h"
36 static double dbl_rand(AVLFG *lfg) in dbl_rand() argument
38 return 2.0 * (av_lfg_get(lfg) / (double)UINT_MAX) - 1.0; in dbl_rand()

Completed in 21 milliseconds