Home
last modified time | relevance | path

Searched refs:centroids (Results 1 – 4 of 4) sorted by relevance

/external/libaom/libaom/av1/encoder/
Dk_means_template.h35 void RENAME(av1_calc_indices)(const int *data, const int *centroids, in RENAME()
38 int min_dist = RENAME(calc_dist)(data + i * AV1_K_MEANS_DIM, centroids); in RENAME()
42 centroids + j * AV1_K_MEANS_DIM); in RENAME()
51 static void RENAME(calc_centroids)(const int *data, int *centroids, in RENAME()
57 memset(centroids, 0, sizeof(centroids[0]) * k * AV1_K_MEANS_DIM); in RENAME()
64 centroids[index * AV1_K_MEANS_DIM + j] += data[i * AV1_K_MEANS_DIM + j]; in RENAME()
70 memcpy(centroids + i * AV1_K_MEANS_DIM, in RENAME()
72 sizeof(centroids[0]) * AV1_K_MEANS_DIM); in RENAME()
75 centroids[i * AV1_K_MEANS_DIM + j] = in RENAME()
76 DIVIDE_AND_ROUND(centroids[i * AV1_K_MEANS_DIM + j], count[i]); in RENAME()
[all …]
Dpalette.h24 const int *centroids,
27 const int *centroids,
29 void AV1_K_MEANS_RENAME(av1_k_means, 1)(const int *data, int *centroids,
32 void AV1_K_MEANS_RENAME(av1_k_means, 2)(const int *data, int *centroids,
38 static INLINE void av1_calc_indices(const int *data, const int *centroids, in av1_calc_indices() argument
41 AV1_K_MEANS_RENAME(av1_calc_indices, 1)(data, centroids, indices, n, k); in av1_calc_indices()
43 AV1_K_MEANS_RENAME(av1_calc_indices, 2)(data, centroids, indices, n, k); in av1_calc_indices()
53 static INLINE void av1_k_means(const int *data, int *centroids, in av1_k_means() argument
57 AV1_K_MEANS_RENAME(av1_k_means, 1)(data, centroids, indices, n, k, max_itr); in av1_k_means()
59 AV1_K_MEANS_RENAME(av1_k_means, 2)(data, centroids, indices, n, k, max_itr); in av1_k_means()
[all …]
Dpalette.c30 int av1_remove_duplicates(int *centroids, int num_centroids) { in av1_remove_duplicates() argument
33 qsort(centroids, num_centroids, sizeof(*centroids), int_comparer); in av1_remove_duplicates()
37 if (centroids[i] != centroids[i - 1]) { // found a new unique centroid in av1_remove_duplicates()
38 centroids[num_unique++] = centroids[i]; in av1_remove_duplicates()
Dintra_mode_search.c544 int stride, int *centroids) { in optimize_palette_colors() argument
547 int min_diff = abs(centroids[i] - (int)color_cache[0]); in optimize_palette_colors()
550 const int this_diff = abs(centroids[i] - color_cache[j]); in optimize_palette_colors()
556 if (min_diff <= 1) centroids[i] = color_cache[idx]; in optimize_palette_colors()
564 BLOCK_SIZE bsize, int dc_mode_cost, const int *data, int *centroids, int n, in palette_rd_y() argument
570 optimize_palette_colors(color_cache, n_cache, n, 1, centroids); in palette_rd_y()
571 const int num_unique_colors = av1_remove_duplicates(centroids, n); in palette_rd_y()
581 (int)centroids[i], cpi->common.seq_params.bit_depth); in palette_rd_y()
585 pmi->palette_colors[i] = clip_pixel(centroids[i]); in palette_rd_y()
594 av1_calc_indices(data, centroids, color_map, rows * cols, num_unique_colors, in palette_rd_y()
[all …]