diff options
Diffstat (limited to 'av1/encoder/palette.h')
-rw-r--r-- | av1/encoder/palette.h | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/av1/encoder/palette.h b/av1/encoder/palette.h index 7d9a72f61..7da863a0c 100644 --- a/av1/encoder/palette.h +++ b/av1/encoder/palette.h @@ -28,10 +28,10 @@ struct macroblock; /*!\cond */ #define AV1_K_MEANS_RENAME(func, dim) func##_dim##dim##_c -void AV1_K_MEANS_RENAME(av1_k_means, 1)(const int *data, int *centroids, +void AV1_K_MEANS_RENAME(av1_k_means, 1)(const int16_t *data, int16_t *centroids, uint8_t *indices, int n, int k, int max_itr); -void AV1_K_MEANS_RENAME(av1_k_means, 2)(const int *data, int *centroids, +void AV1_K_MEANS_RENAME(av1_k_means, 2)(const int16_t *data, int16_t *centroids, uint8_t *indices, int n, int k, int max_itr); /*!\endcond */ @@ -49,16 +49,17 @@ void AV1_K_MEANS_RENAME(av1_k_means, 2)(const int *data, int *centroids, * \param[in] k Number of clusters. * \param[in] dim Data dimension. * - * \return Returns nothing, but saves each data's cluster index in indices. + * \remark Returns nothing, but saves each data's cluster index in \a indices. */ -static INLINE void av1_calc_indices(const int *data, const int *centroids, - uint8_t *indices, int n, int k, int dim) { +static INLINE void av1_calc_indices(const int16_t *data, + const int16_t *centroids, uint8_t *indices, + int n, int k, int dim) { assert(n > 0); assert(k > 0); if (dim == 1) { - av1_calc_indices_dim1(data, centroids, indices, n, k); + av1_calc_indices_dim1(data, centroids, indices, /*total_dist=*/NULL, n, k); } else if (dim == 2) { - av1_calc_indices_dim2(data, centroids, indices, n, k); + av1_calc_indices_dim2(data, centroids, indices, /*total_dist=*/NULL, n, k); } else { assert(0 && "Untemplated k means dimension"); } @@ -79,12 +80,12 @@ static INLINE void av1_calc_indices(const int *data, const int *centroids, * \param[in] dim Data dimension. * \param[in] max_itr Maximum number of iterations to run. * - * \return Returns nothing, but saves each cluster's centroid in centroids and - * each data's cluster index in indices. + * \remark Returns nothing, but saves each cluster's centroid in centroids and + * each data's cluster index in \a indices. * * \attention The output centroids are rounded off to nearest integers. */ -static INLINE void av1_k_means(const int *data, int *centroids, +static INLINE void av1_k_means(const int16_t *data, int16_t *centroids, uint8_t *indices, int n, int k, int dim, int max_itr) { assert(n > 0); @@ -110,7 +111,7 @@ static INLINE void av1_k_means(const int *data, int *centroids, * \attention The centroids should be rounded to integers before calling this * method. */ -int av1_remove_duplicates(int *centroids, int num_centroids); +int av1_remove_duplicates(int16_t *centroids, int num_centroids); /*!\brief Checks what colors are in the color cache. * @@ -186,7 +187,7 @@ void av1_rd_pick_palette_intra_sby( const struct AV1_COMP *cpi, struct macroblock *x, BLOCK_SIZE bsize, int dc_mode_cost, MB_MODE_INFO *best_mbmi, uint8_t *best_palette_color_map, int64_t *best_rd, int *rate, int *rate_tokenonly, int64_t *distortion, - int *skippable, int *beat_best_rd, struct PICK_MODE_CONTEXT *ctx, + uint8_t *skippable, int *beat_best_rd, struct PICK_MODE_CONTEXT *ctx, uint8_t *best_blk_skip, uint8_t *tx_type_map); /*!\brief Search for the best palette in the chroma plane. @@ -201,7 +202,7 @@ void av1_rd_pick_palette_intra_sbuv(const struct AV1_COMP *cpi, MB_MODE_INFO *const best_mbmi, int64_t *best_rd, int *rate, int *rate_tokenonly, int64_t *distortion, - int *skippable); + uint8_t *skippable); /*!\brief Resets palette color map for chroma channels. */ |