animi.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // Copyright 2016 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. // Internal header for animation related functions.
  11. //
  12. // Author: Hui Su (huisu@google.com)
  13. #ifndef WEBP_MUX_ANIMI_H_
  14. #define WEBP_MUX_ANIMI_H_
  15. #include "../webp/mux.h"
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. // Picks the optimal rectangle between two pictures, starting with initial
  20. // values of offsets and dimensions that are passed in. The initial
  21. // values will be clipped, if necessary, to make sure the rectangle is
  22. // within the canvas. "use_argb" must be true for both pictures.
  23. // Parameters:
  24. // prev_canvas, curr_canvas - (in) two input pictures to compare.
  25. // is_lossless, quality - (in) encoding settings.
  26. // x_offset, y_offset, width, height - (in/out) rectangle between the two
  27. // input pictures.
  28. // Returns true on success.
  29. int WebPAnimEncoderRefineRect(
  30. const struct WebPPicture* const prev_canvas,
  31. const struct WebPPicture* const curr_canvas,
  32. int is_lossless, float quality, int* const x_offset, int* const y_offset,
  33. int* const width, int* const height);
  34. #ifdef __cplusplus
  35. } // extern "C"
  36. #endif
  37. #endif // WEBP_MUX_ANIMI_H_