xref: /aosp_15_r20/external/libaom/third_party/libyuv/include/libyuv/scale_argb.h (revision 77c1e3ccc04c968bd2bc212e87364f250e820521)
1 /*
2  *  Copyright 2012 The LibYuv Project Authors. All rights reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS. All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 #ifndef INCLUDE_LIBYUV_SCALE_ARGB_H_
12 #define INCLUDE_LIBYUV_SCALE_ARGB_H_
13 
14 #include "libyuv/basic_types.h"
15 #include "libyuv/scale.h"  // For FilterMode
16 
17 #ifdef __cplusplus
18 namespace libyuv {
19 extern "C" {
20 #endif
21 
22 LIBYUV_API
23 int ARGBScale(const uint8_t* src_argb,
24               int src_stride_argb,
25               int src_width,
26               int src_height,
27               uint8_t* dst_argb,
28               int dst_stride_argb,
29               int dst_width,
30               int dst_height,
31               enum FilterMode filtering);
32 
33 // Clipped scale takes destination rectangle coordinates for clip values.
34 LIBYUV_API
35 int ARGBScaleClip(const uint8_t* src_argb,
36                   int src_stride_argb,
37                   int src_width,
38                   int src_height,
39                   uint8_t* dst_argb,
40                   int dst_stride_argb,
41                   int dst_width,
42                   int dst_height,
43                   int clip_x,
44                   int clip_y,
45                   int clip_width,
46                   int clip_height,
47                   enum FilterMode filtering);
48 
49 // Scale with YUV conversion to ARGB and clipping.
50 LIBYUV_API
51 int YUVToARGBScaleClip(const uint8_t* src_y,
52                        int src_stride_y,
53                        const uint8_t* src_u,
54                        int src_stride_u,
55                        const uint8_t* src_v,
56                        int src_stride_v,
57                        uint32_t src_fourcc,
58                        int src_width,
59                        int src_height,
60                        uint8_t* dst_argb,
61                        int dst_stride_argb,
62                        uint32_t dst_fourcc,
63                        int dst_width,
64                        int dst_height,
65                        int clip_x,
66                        int clip_y,
67                        int clip_width,
68                        int clip_height,
69                        enum FilterMode filtering);
70 
71 #ifdef __cplusplus
72 }  // extern "C"
73 }  // namespace libyuv
74 #endif
75 
76 #endif  // INCLUDE_LIBYUV_SCALE_ARGB_H_
77