Mercurial > libavcodec.hg
comparison elbg.h @ 9154:aa459306ee59 libavcodec
Use FLG pseudo-random number generator in RoQ and ELBG
author | vitor |
---|---|
date | Sun, 08 Mar 2009 17:43:12 +0000 |
parents | e49a2e1f0020 |
children | 23138c3326c6 |
comparison
equal
deleted
inserted
replaced
9153:4e91d96dd045 | 9154:aa459306ee59 |
---|---|
37 * @param closest_cb Return the closest codebook to each point. Must be allocated. | 37 * @param closest_cb Return the closest codebook to each point. Must be allocated. |
38 * @param rand_state A random number generator state. Should be already initialised by av_random_init. | 38 * @param rand_state A random number generator state. Should be already initialised by av_random_init. |
39 */ | 39 */ |
40 void ff_do_elbg(int *points, int dim, int numpoints, int *codebook, | 40 void ff_do_elbg(int *points, int dim, int numpoints, int *codebook, |
41 int numCB, int num_steps, int *closest_cb, | 41 int numCB, int num_steps, int *closest_cb, |
42 AVRandomState *rand_state); | 42 AVLFG *rand_state); |
43 | 43 |
44 /** | 44 /** |
45 * Initialize the **codebook vector for the elbg algorithm. If you have already | 45 * Initialize the **codebook vector for the elbg algorithm. If you have already |
46 * a codebook and you want to refine it, you shouldn't call this function. | 46 * a codebook and you want to refine it, you shouldn't call this function. |
47 * If numpoints < 8*numCB this function fills **codebook with random numbers. | 47 * If numpoints < 8*numCB this function fills **codebook with random numbers. |
48 * If not, it calls ff_do_elbg for a (smaller) random sample of the points in | 48 * If not, it calls ff_do_elbg for a (smaller) random sample of the points in |
49 * **points. Get the same parameters as ff_do_elbg. | 49 * **points. Get the same parameters as ff_do_elbg. |
50 */ | 50 */ |
51 void ff_init_elbg(int *points, int dim, int numpoints, int *codebook, | 51 void ff_init_elbg(int *points, int dim, int numpoints, int *codebook, |
52 int numCB, int num_steps, int *closest_cb, | 52 int numCB, int num_steps, int *closest_cb, |
53 AVRandomState *rand_state); | 53 AVLFG *rand_state); |
54 | 54 |
55 #endif /* AVCODEC_ELBG_H */ | 55 #endif /* AVCODEC_ELBG_H */ |