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