Lines Matching refs:points
36 * In the ELBG jargon, a cell is the set of points that are closest to a
55 int *points;
101 error += distance_limited(centroid, elbg->points + cells->index*elbg->dim, elbg->dim, INT_MAX);
150 int *points,
167 idx = distance_limited(centroid[0], points + tempcell->index*dim, dim, INT_MAX)>=
168 distance_limited(centroid[1], points + tempcell->index*dim, dim, INT_MAX);
171 newcentroid[idx][i] += points[tempcell->index*dim + i];
178 int dist[2] = {distance_limited(centroid[0], points + tempcell->index*dim, dim, INT_MAX),
179 distance_limited(centroid[1], points + tempcell->index*dim, dim, INT_MAX)};
202 min[i]=FFMIN(min[i], elbg->points[tempcell->index*elbg->dim + i]);
203 max[i]=FFMAX(max[i], elbg->points[tempcell->index*elbg->dim + i]);
215 * Add the points in the low utility cell to its closest cell. Split the high
216 * utility cell, putting the separated points in the (now empty) low utility
240 int idx = distance_limited(elbg->points + tempdata->index*elbg->dim,
242 distance_limited(elbg->points + tempdata->index*elbg->dim,
300 newcentroid[2][j] += elbg->points[tempcell->index*elbg->dim + j];
312 newerror += simple_lbg(elbg, elbg->dim, newcentroid, newutility, elbg->points,
349 static void do_elbg(ELBGContext *av_restrict elbg, int *points, int numpoints,
358 elbg->points = points;
372 int best_dist = distance_limited(elbg->points + i * elbg->dim,
376 int dist = distance_limited(elbg->points + i * elbg->dim,
403 elbg->points[i*elbg->dim + j];
419 * If not, it calls do_elbg for a (smaller) random sample of the points in
420 * points.
422 static void init_elbg(ELBGContext *av_restrict elbg, int *points, int *temp_points,
428 /* ELBG is very costly for a big number of points. So if we have a lot
432 memcpy(temp_points + i*dim, points + k*dim, dim * sizeof(*temp_points));
442 memcpy(elbg->codebook + i * dim, points + ((i*BIG_PRIME)%numpoints)*dim,
446 int avpriv_elbg_do(ELBGContext **elbgp, int *points, int dim, int numpoints,
494 init_elbg(elbg, points, elbg->temp_points, numpoints, max_steps);
495 do_elbg (elbg, points, numpoints, max_steps);