SemiDrive SSDK Appication Program Interface PTG3.0
asw.h
Go to the documentation of this file.
1
9#ifndef __ASW_H__
10#define __ASW_H__
11#include <types.h>
12#if CONFIG_OS_FREERTOS
13#include <FreeRTOS.h>
14#include <semphr.h>
15#endif
16#include "asw_g_use.h"
17#include "asw_lut_hvk.h"
18
19/*fmt*/
20/*DES FMT support: */
21/* FMT_MONOTONIC_8BIT */
22/* FMT_RGB565 */
23/* FMT_RGBA5551 */
24/* FMT_ARGB1555 */
25/* FMT_RGB_YUV888 */
26/* FMT_YUV422_UYVY */
27/* FMT_YUV422_VYUY */
28/* FMT_RGBA8888 */
29/* FMT_ARGB8888 */
30/* FMT_YUV422_YUYV */
31/* FMT_YUV422_YVYU */
32
33/*SRC FMT support: */
34/* FMT_MONOTONIC_8BIT */
35/* FMT_RGB_YUV888_PLANAR*/
36/* FMT_YUV422_PLANAR */
37/* FMT_YUV420_PLANAR */
38/* FMT_RGB565 */
39/* FMT_RGBA5551 */
40/* FMT_ARGB1555 */
41/* FMT_RGB_YUV888 */
42/* FMT_YUV422_SEMI_U0V0 */
43/* FMT_YUV422_SEMI_V0U0 */
44/* FMT_RGBA8888 */
45/* FMT_ARGB8888 */
46
47enum {
62};
63
64#define FMT_YUV422_UYVY 9
65#define FMT_YUV422_VYUY 10
66
68
70
72
74
75/*cache entry type (hsize x vsize)*/
76enum {
82};
83
84enum {
89};
90
91enum {
96};
97
104
106 paddr_t base;
107 int irq;
108};
109
111struct dst_info {
115 int dst_ba;
119};
120
122struct src_info {
133};
134
136struct lut_info {
141};
142
146};
147
149struct ext_info {
174};
175
177struct adb_info {
178 int dirty;
180 int offset;
181 int slope;
182};
183
186 int range;
189};
190
193struct asw_input {
201 struct dst_info dst;
202 struct src_info src;
203 struct lut_info lut;
205 struct adb_info adb;
210 struct cubic_info
213 struct ext_info ext;
219};
220
234};
235
237struct asw_rot {
238 int hsize;
239 int vsize;
240 double angle;
243 int dst_ba;
247 int src_ba[4];
248 int src_stride[4];
250 int t_buf;
252
254};
255
258 int type;
259 int fmt;
261 int color;
262 int hsize;
263 int vsize;
264 int pos_x;
265 int pos_y;
266 int addr;
267 int stride;
268};
269
270struct asw_operations;
271
273struct asw_dev {
274 paddr_t base;
275 int irq;
278 struct asw_input *input;
281#if CONFIG_OS_FREERTOS
282 SemaphoreHandle_t wdone_sema;
283#endif
284};
285
287 void (*soft_reset)(struct asw_dev *dev);
288 void (*cubic_cfg)(struct asw_dev *dev);
289 void (*cubic_cfg_with_hvkt)(struct asw_dev *dev, struct hvkt_param *hvkt);
290 void (*cubic_rotation)(struct asw_dev *dev, double rotate_angle,
291 struct hvkt_param *hvkt);
292 void (*bilinear_cfg)(struct asw_dev *dev);
293 void (*bilinear_cfg_with_hvkt)(struct asw_dev *dev,
294 struct hvkt_param *hvkt);
295 void (*bilinear_rotation)(struct asw_dev *dev, double rotate_angle,
296 struct hvkt_param *hvkt);
297 int (*irq_handler)(unsigned int irq, void *arg);
298};
299
300extern struct asw_dev aswdev;
301
302extern int is_asw_done;
303
304void sdrv_asw_probe(struct asw_dev *dev, const struct asw_config *asw_cfg);
305
315
327
336
345
357 struct hvkt_param *hvkt);
367void sdrv_asw_bilinear_ftob32(const float *faddr, int *b32, int len);
377void sdrv_asw_bilinear_ftob16(const float *faddr, short *b16, int len);
408void sdrv_asw_fill_rect(int fmt, int color, int hsize, int vsize, int pos_x,
409 int pos_y, int addr, int stride);
410
411#endif //__GAMA_H__
void sdrv_asw_bilinear_rotation(struct asw_rot *rot)
sdrv asw bilinear rotation.
@ FLIP_TYPE_HFLIP
Definition: asw.h:93
@ FLIP_TYPE_VFLIP
Definition: asw.h:94
@ FLIP_TYPE_HVFLIP
Definition: asw.h:95
@ FLIP_TYPE_NONE
Definition: asw.h:92
@ FMT_YUV422_SEMI_V0U0
Definition: asw.h:57
@ FMT_MONOTONIC_8BIT
Definition: asw.h:48
@ FMT_ARGB1555
Definition: asw.h:54
@ FMT_RGBA5551
Definition: asw.h:53
@ FMT_YUV422_SEMI_U0V0
Definition: asw.h:56
@ FMT_ARGB8888
Definition: asw.h:59
@ FMT_RGB_YUV888_PLANAR
Definition: asw.h:49
@ FMT_YUV422_YUYV
Definition: asw.h:60
@ FMT_RGB_YUV888
Definition: asw.h:55
@ FMT_RGB565
Definition: asw.h:52
@ FMT_RGBA8888
Definition: asw.h:58
@ FMT_YUV422_YVYU
Definition: asw.h:61
@ FMT_YUV420_PLANAR
Definition: asw.h:51
@ FMT_YUV422_PLANAR
Definition: asw.h:50
int is_asw_done
void sdrv_asw_fill_rect(int fmt, int color, int hsize, int vsize, int pos_x, int pos_y, int addr, int stride)
sdrv asw fill rect.
void sdrv_asw_bilinear_ftob16(const float *faddr, short *b16, int len)
sdrv asw bilinear ftob16.
void sdrv_asw_bilinear_noblock(struct asw_input *input)
sdrv asw bilinear noblock.
void sdrv_asw_bilinear_ftob32(const float *faddr, int *b32, int len)
sdrv asw bilinear ftob32.
void sdrv_asw_probe(struct asw_dev *dev, const struct asw_config *asw_cfg)
@ C_ENTRY_TYPE_32X4
Definition: asw.h:81
@ C_ENTRY_TYPE_16X4
Definition: asw.h:79
@ C_ENTRY_TYPE_8X4
Definition: asw.h:77
@ C_ENTRY_TYPE_16X8
Definition: asw.h:80
@ C_ENTRY_TYPE_8X8
Definition: asw.h:78
void sdrv_asw_cubic_with_hvkt(struct asw_input *input, struct hvkt_param *hvkt)
sdrv asw cubic with hvkt.
@ BUF_SIZE_32LINES
Definition: asw.h:87
@ BUF_SIZE_16LINES
Definition: asw.h:86
@ BUF_SIZE_8LINES
Definition: asw.h:85
@ BUF_SIZE_64LINES
Definition: asw.h:88
void sdrv_asw_ra_triangle(struct asw_ratria *info)
sdrv asw ra triangle.
void sdrv_asw_bilinear_with_hvkt(struct asw_input *input, struct hvkt_param *hvkt)
sdrv asw bilinear with hvkt.
@ LUT_MODE_CUBIC_SPLINE
Definition: asw.h:69
@ LUT_MODE_BILINEAR
Definition: asw.h:69
TRIAG_YTPE
Definition: asw.h:98
@ TRIAG_TYPE_RIGHT_TOP
Definition: asw.h:101
@ TRIAG_LEFT_TOP
Definition: asw.h:99
@ TRIAG_TYPE_RIGHT_BOTTOM
Definition: asw.h:102
@ TRIAG_LEFT_BOTTOM
Definition: asw.h:100
@ EXT_LUT_FORMAT_32BIT
Definition: asw.h:71
@ EXT_LUT_FORMAT_16BIT
Definition: asw.h:71
void sdrv_asw_cubic(struct asw_input *input)
sdrv asw cubic.
void sdrv_asw_bilinear(struct asw_input *input)
sdrv asw bilinear.
@ CUBIC_MODE_INT_ASM
Definition: asw.h:73
@ CUBIC_MODE_EXT_ASM
Definition: asw.h:73
@ LB_LAYOUT_A
Definition: asw.h:67
@ LB_LAYOUT_B
Definition: asw.h:67
struct asw_dev aswdev
SemiDrive asw header file.
SemiDrive asw header file.
adb info struct
Definition: asw.h:177
int dirty
Definition: asw.h:178
int slope
Definition: asw.h:181
int offset
Definition: asw.h:180
Definition: asw_g_use.h:36
Definition: asw.h:221
int asw_cache_gu_ba
Definition: asw.h:231
int asw_lut_h_ba
Definition: asw.h:227
int asw_pos_calc_pfile_ba
Definition: asw.h:222
int asw_cache_a_ba
Definition: asw.h:233
int asw_pos_lut_ba
Definition: asw.h:223
int asw_cache_ry_ba
Definition: asw.h:230
int asw_cache_bv_ba
Definition: asw.h:232
int asw_y_stepy_ba
Definition: asw.h:226
int asw_alpha_ba
Definition: asw.h:225
int asw_frb_ba
Definition: asw.h:229
int asw_m_v_ba
Definition: asw.h:224
int asw_m_h_ba
Definition: asw.h:228
Definition: asw.h:105
paddr_t base
Definition: asw.h:106
int irq
Definition: asw.h:107
This structure describe the ASW information and function opeartaions.
Definition: asw.h:273
struct asw_input * input
Definition: asw.h:278
struct asw_app_asw app
Definition: asw.h:279
int asw_done
Definition: asw.h:280
SemaphoreHandle_t wdone_sema
Definition: asw.h:282
paddr_t base
Definition: asw.h:274
struct asw_ba_info bas
Definition: asw.h:276
struct asw_operations * ops
Definition: asw.h:277
int irq
Definition: asw.h:275
This structure includes all the configuration information of ASW for controlling the ASW’s work.
Definition: asw.h:193
int ext_lut_fmt
Definition: asw.h:199
int cache_way_n
Definition: asw.h:208
struct src_info src
Definition: asw.h:202
int hdsk_mode
Definition: asw.h:195
struct cubic_info cubic
Definition: asw.h:210
struct dst_info dst
Definition: asw.h:201
int cache_entry_type
Definition: asw.h:207
int csi_start_ln
Definition: asw.h:215
struct adb_info adb
Definition: asw.h:205
int work_mode
Definition: asw.h:194
struct ext_info ext
Definition: asw.h:213
struct circular_buf cbuf
Definition: asw.h:218
int lut_mode
Definition: asw.h:198
struct lut_info lut
Definition: asw.h:203
Definition: asw.h:286
void(* cubic_rotation)(struct asw_dev *dev, double rotate_angle, struct hvkt_param *hvkt)
Definition: asw.h:290
int(* irq_handler)(unsigned int irq, void *arg)
Definition: asw.h:297
void(* soft_reset)(struct asw_dev *dev)
Definition: asw.h:287
void(* cubic_cfg_with_hvkt)(struct asw_dev *dev, struct hvkt_param *hvkt)
Definition: asw.h:289
void(* bilinear_rotation)(struct asw_dev *dev, double rotate_angle, struct hvkt_param *hvkt)
Definition: asw.h:295
void(* bilinear_cfg_with_hvkt)(struct asw_dev *dev, struct hvkt_param *hvkt)
Definition: asw.h:293
void(* cubic_cfg)(struct asw_dev *dev)
Definition: asw.h:288
void(* bilinear_cfg)(struct asw_dev *dev)
Definition: asw.h:292
This struct include asw draw triangle input infomations.
Definition: asw.h:257
int stride
Definition: asw.h:267
int color
Definition: asw.h:261
int vsize
Definition: asw.h:263
int hsize
Definition: asw.h:262
int pos_y
Definition: asw.h:265
int fmt
Definition: asw.h:259
int pos_x
Definition: asw.h:264
int addr
Definition: asw.h:266
int type
Definition: asw.h:258
This structure include rotation informations.
Definition: asw.h:237
int t_buf
Definition: asw.h:250
int vsize
Definition: asw.h:239
int bg_color
Definition: asw.h:253
int src_stride[4]
Definition: asw.h:248
int hsize
Definition: asw.h:238
int src_fmt
Definition: asw.h:246
int dst_fmt
Definition: asw.h:242
int dst_stride
Definition: asw.h:244
double angle
Definition: asw.h:240
int t_stride
Definition: asw.h:251
int src_ba[4]
Definition: asw.h:247
int dst_ba
Definition: asw.h:243
Definition: asw.h:184
int range
Definition: asw.h:186
int enable
Definition: asw.h:185
int low_limit_addr
Definition: asw.h:187
int high_limit_addr
Definition: asw.h:188
Definition: asw.h:143
int alpha_src_ba
Definition: asw.h:145
int lut_src_ba
Definition: asw.h:144
This structure include ASW output image configuration information.
Definition: asw.h:111
int dst_fmt
Definition: asw.h:112
int dst_vsize
Definition: asw.h:114
int dst_stride
Definition: asw.h:116
int dst_bg_color
Definition: asw.h:117
int dst_hsize
Definition: asw.h:113
int dst_ba
Definition: asw.h:115
int dst_flip
Definition: asw.h:118
This structure include bilinear spline lookup table information.
Definition: asw.h:149
int ext_mlut_gy_ba
Definition: asw.h:156
int ext_mlut_rx_ba
Definition: asw.h:150
int ext_mlut_by_ba
Definition: asw.h:160
int ext_mlut_ry_stride
Definition: asw.h:164
int ext_mlut_bx_stride
Definition: asw.h:170
int ext_mlut_bx_ba
Definition: asw.h:158
int ext_mlut_gy_stride
Definition: asw.h:168
int ext_mlut_gx_ba
Definition: asw.h:154
int ext_mlut_rx_stride
Definition: asw.h:162
int ext_mlut_ry_ba
Definition: asw.h:152
int ext_mlut_by_stride
Definition: asw.h:172
int ext_mlut_gx_stride
Definition: asw.h:166
Definition: asw_lut_hvk.h:28
This structure include lookup table size and step information.
Definition: asw.h:136
int asw_lut_vstep
Definition: asw.h:140
int asw_lut_hstep
Definition: asw.h:139
int asw_lut_hsize
Definition: asw.h:137
int asw_lut_vsize
Definition: asw.h:138
This structure include ASW input image information.
Definition: asw.h:122
int src_ry_stride
Definition: asw.h:129
int src_fmt
Definition: asw.h:123
int src_ry_ba
Definition: asw.h:126
int src_gu_ba
Definition: asw.h:127
int src_gu_stride
Definition: asw.h:130
int src_hsize
Definition: asw.h:124
int src_bv_stride
Definition: asw.h:131
int src_flip
Definition: asw.h:132
int src_bv_ba
Definition: asw.h:128
int src_vsize
Definition: asw.h:125