AOMedia AV1 Codec
palette.h File Reference

Declares functions used in palette search. More...

#include "av1/common/blockd.h"

Go to the source code of this file.

Functions

static void av1_calc_indices (const int16_t *data, const int16_t *centroids, uint8_t *indices, int n, int k, int dim)
 Calculates the cluster to which each data point belong.
 
static void av1_k_means (const int16_t *data, int16_t *centroids, uint8_t *indices, int n, int k, int dim, int max_itr)
 Performs k-means cluster on the data.
 
int av1_remove_duplicates (int16_t *centroids, int num_centroids)
 Removes duplicated centroid indices.
 
int av1_index_color_cache (const uint16_t *color_cache, int n_cache, const uint16_t *colors, int n_colors, uint8_t *cache_color_found, int *out_cache_colors)
 Checks what colors are in the color cache.
 
int av1_get_palette_delta_bits_v (const PALETTE_MODE_INFO *const pmi, int bit_depth, int *zero_count, int *min_bits)
 Gets the rate cost for each delta-encoding v palette.
 
int av1_palette_color_cost_y (const PALETTE_MODE_INFO *const pmi, const uint16_t *color_cache, int n_cache, int bit_depth)
 Gets the rate cost for transmitting luma palette color values.
 
int av1_palette_color_cost_uv (const PALETTE_MODE_INFO *const pmi, const uint16_t *color_cache, int n_cache, int bit_depth)
 Gets the rate cost for transmitting luma palette chroma values.
 
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, uint8_t *skippable, int *beat_best_rd, struct PICK_MODE_CONTEXT *ctx, uint8_t *best_blk_skip, uint8_t *tx_type_map)
 Search for the best palette in the luma plane.
 
void av1_rd_pick_palette_intra_sbuv (const struct AV1_COMP *cpi, struct macroblock *x, int dc_mode_cost, uint8_t *best_palette_color_map, MB_MODE_INFO *const best_mbmi, int64_t *best_rd, int *rate, int *rate_tokenonly, int64_t *distortion, uint8_t *skippable)
 Search for the best palette in the chroma plane.
 
void av1_restore_uv_color_map (const struct AV1_COMP *cpi, struct macroblock *x)
 Resets palette color map for chroma channels.
 

Detailed Description

Declares functions used in palette search.