17
17
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
18
18
*/
19
19
20
- /* Image/Video processing: Scale, rotate, crop, color conversion */
20
+ /** \file
21
+ * Image/Video processing: Scale, rotate, crop, color conversion
22
+ */
21
23
22
24
#ifndef __VEU_COLORSPACE_H__
23
25
#define __VEU_COLORSPACE_H__
24
26
27
+ /** Rotation */
25
28
enum {
29
+ /** No rotation */
26
30
SHVEU_NO_ROT = 0 ,
31
+
32
+ /** Rotate 90 degrees clockwise */
27
33
SHVEU_ROT_90 ,
28
34
};
29
35
30
- /* Image formats */
36
+ /** Image formats */
31
37
enum {
38
+ /** RGB565 */
32
39
SHVEU_RGB565 = 0 ,
40
+
41
+ /** YCbCr 4:2:0 */
33
42
SHVEU_YCbCr420 ,
43
+
44
+ /** YCbCr 4:2:2 */
34
45
SHVEU_YCbCr422 ,
35
46
};
36
47
37
- /* Perform (scale|rotate) & crop between YCbCr 4:2:0 & RG565 surfaces */
48
+ /** Perform (scale|rotate) & crop between YCbCr 4:2:0 & RG565 surfaces
49
+ * \param veu_index Index of which VEU to use
50
+ * \param src_py Pointer to Y or RGB plane of source image
51
+ * \param src_pc Pointer to CbCr plane of source image (ignored for RGB)
52
+ * \param src_width Width in pixels of source image
53
+ * \param src_height Height in pixels of source image
54
+ * \param src_pitch Line pitch of source image
55
+ * \param src_format Format of source image
56
+ * \param dst_py Pointer to Y or RGB plane of destination image
57
+ * \param dst_pc Pointer to CbCr plane of destination image (ignored for RGB)
58
+ * \param dst_width Width in pixels of destination image
59
+ * \param dst_height Height in pixels of destination image
60
+ * \param dst_pitch Line pitch of destination image
61
+ * \param dst_fmt Format of destination image
62
+ * \param rotate Rotation to apply
63
+ * \retval 0 Success
64
+ * \retval -1 Error: Attempt to perform simultaneous scaling and rotation
65
+ */
38
66
int
39
67
shveu_operation (
40
68
unsigned int veu_index ,
@@ -52,15 +80,31 @@ shveu_operation(
52
80
int dst_fmt ,
53
81
int rotate );
54
82
55
- /* Perform scale from RG565 to YCbCr 4:2:0 surface */
83
+ /** Perform scale from RG565 to YCbCr 4:2:0 surface
84
+ * \param rgb565_in Pointer to input RGB565 image
85
+ * \param y_out Pointer to output Y plane
86
+ * \param c_out Pointer to output CbCr plane
87
+ * \param width Width in pixels of image
88
+ * \param height Height in pixels of image
89
+ * \retval 0 Success
90
+ */
56
91
int shveu_rgb565_to_nv12 (
57
92
unsigned char * rgb565_in ,
58
93
unsigned char * y_out ,
59
94
unsigned char * c_out ,
60
95
unsigned long width ,
61
96
unsigned long height );
62
97
63
- /* Perform color conversion & crop from YCbCr 4:2:0 to RG565 surface */
98
+ /** Perform color conversion & crop from YCbCr 4:2:0 to RG565 surface
99
+ * \param y_in Pointer to input Y plane
100
+ * \param c_in Pointer to input CbCr plane
101
+ * \param rgb565_out Pointer to output RGB565 image
102
+ * \param width Width in pixels of image
103
+ * \param height Height in pixels of image
104
+ * \param pitch_in Line pitch of input image
105
+ * \param pitch_out Line pitch of output image
106
+ * \retval 0 Success
107
+ */
64
108
int
65
109
shveu_nv12_to_rgb565 (
66
110
unsigned char * y_in ,
0 commit comments