diff options
Diffstat (limited to 'third_party/aom/av1/encoder/palette.h')
-rw-r--r-- | third_party/aom/av1/encoder/palette.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/third_party/aom/av1/encoder/palette.h b/third_party/aom/av1/encoder/palette.h index 5403ac5e60..f5a3c1bdd4 100644 --- a/third_party/aom/av1/encoder/palette.h +++ b/third_party/aom/av1/encoder/palette.h @@ -45,13 +45,12 @@ int av1_count_colors_highbd(const uint8_t *src8, int stride, int rows, int cols, #endif // CONFIG_HIGHBITDEPTH #if CONFIG_PALETTE_DELTA_ENCODING -// Return the number of bits used to transmit each luma palette color delta. -int av1_get_palette_delta_bits_y(const PALETTE_MODE_INFO *const pmi, - int bit_depth, int *min_bits); - -// Return the number of bits used to transmit each U palette color delta. -int av1_get_palette_delta_bits_u(const PALETTE_MODE_INFO *const pmi, - int bit_depth, int *min_bits); +// Given a color cache and a set of base colors, find if each cache color is +// present in the base colors, record the binary results in "cache_color_found". +// Record the colors that are not in the color cache in "out_cache_colors". +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); // Return the number of bits used to transmit each v palette color delta; // assign zero_count with the number of deltas being 0. @@ -60,10 +59,17 @@ int av1_get_palette_delta_bits_v(const PALETTE_MODE_INFO *const pmi, #endif // CONFIG_PALETTE_DELTA_ENCODING // Return the rate cost for transmitting luma palette color values. -int av1_palette_color_cost_y(const PALETTE_MODE_INFO *const pmi, int bit_depth); +int av1_palette_color_cost_y(const PALETTE_MODE_INFO *const pmi, +#if CONFIG_PALETTE_DELTA_ENCODING + uint16_t *color_cache, int n_cache, +#endif // CONFIG_PALETTE_DELTA_ENCODING + int bit_depth); // Return the rate cost for transmitting chroma palette color values. int av1_palette_color_cost_uv(const PALETTE_MODE_INFO *const pmi, +#if CONFIG_PALETTE_DELTA_ENCODING + uint16_t *color_cache, int n_cache, +#endif // CONFIG_PALETTE_DELTA_ENCODING int bit_depth); #ifdef __cplusplus |