delta_palettization_enc.h 1013 B

1234567891011121314151617181920212223242526
  1. // Copyright 2015 Google Inc. All Rights Reserved.
  2. //
  3. // Use of this source code is governed by a BSD-style license
  4. // that can be found in the COPYING file in the root of the source
  5. // tree. An additional intellectual property rights grant can be found
  6. // in the file PATENTS. All contributing project authors may
  7. // be found in the AUTHORS file in the root of the source tree.
  8. // -----------------------------------------------------------------------------
  9. //
  10. // Author: Mislav Bradac (mislavm@google.com)
  11. //
  12. #ifndef WEBP_ENC_DELTA_PALETTIZATION_H_
  13. #define WEBP_ENC_DELTA_PALETTIZATION_H_
  14. #include "../webp/encode.h"
  15. #include "../enc/vp8li_enc.h"
  16. // Replaces enc->argb_[] input by a palettizable approximation of it,
  17. // and generates optimal enc->palette_[].
  18. // This function can revert enc->use_palette_ / enc->use_predict_ flag
  19. // if delta-palettization is not producing expected saving.
  20. WebPEncodingError WebPSearchOptimalDeltaPalette(VP8LEncoder* const enc);
  21. #endif // WEBP_ENC_DELTA_PALETTIZATION_H_