3 |
|
|
4 |
#include "../portab.h" |
#include "../portab.h" |
5 |
|
|
|
|
|
6 |
/* initialize tables */ |
/* initialize tables */ |
7 |
|
|
8 |
void colorspace_init(void); |
void colorspace_init(void); |
9 |
|
|
10 |
|
|
|
/* input color conversion functions (encoder) */ |
|
11 |
|
|
12 |
typedef void (color_inputFunc)(uint8_t *y_out, uint8_t *u_out, uint8_t *v_out, |
/* colorspace conversion function (encoder) */ |
|
uint8_t *src, int width, int height, int stride); |
|
13 |
|
|
14 |
typedef color_inputFunc *color_inputFuncPtr; |
typedef void (packedFunc) (uint8_t * x_ptr, |
15 |
|
int x_stride, |
16 |
|
uint8_t * y_src, |
17 |
|
uint8_t * v_src, |
18 |
|
uint8_t * u_src, |
19 |
|
int y_stride, |
20 |
|
int uv_stride, |
21 |
|
int width, |
22 |
|
int height, |
23 |
|
int vflip); |
24 |
|
|
25 |
|
typedef packedFunc *packedFuncPtr; |
26 |
|
|
27 |
|
|
28 |
|
/* xxx_to_yv12 colorspace conversion functions (encoder) */ |
29 |
|
|
30 |
|
extern packedFuncPtr rgb555_to_yv12; |
31 |
|
extern packedFuncPtr rgb565_to_yv12; |
32 |
|
extern packedFuncPtr bgr_to_yv12; |
33 |
|
extern packedFuncPtr bgra_to_yv12; |
34 |
|
extern packedFuncPtr abgr_to_yv12; |
35 |
|
extern packedFuncPtr rgba_to_yv12; |
36 |
|
extern packedFuncPtr yuyv_to_yv12; |
37 |
|
extern packedFuncPtr uyvy_to_yv12; |
38 |
|
|
39 |
|
extern packedFuncPtr rgb555i_to_yv12; |
40 |
|
extern packedFuncPtr rgb565i_to_yv12; |
41 |
|
extern packedFuncPtr bgri_to_yv12; |
42 |
|
extern packedFuncPtr bgrai_to_yv12; |
43 |
|
extern packedFuncPtr abgri_to_yv12; |
44 |
|
extern packedFuncPtr rgbai_to_yv12; |
45 |
|
extern packedFuncPtr yuyvi_to_yv12; |
46 |
|
extern packedFuncPtr uyvyi_to_yv12; |
47 |
|
|
|
extern color_inputFuncPtr rgb555_to_yv12; |
|
|
extern color_inputFuncPtr rgb565_to_yv12; |
|
|
extern color_inputFuncPtr rgb24_to_yv12; |
|
|
extern color_inputFuncPtr rgb32_to_yv12; |
|
|
extern color_inputFuncPtr yuv_to_yv12; |
|
|
extern color_inputFuncPtr yuyv_to_yv12; |
|
|
extern color_inputFuncPtr uyvy_to_yv12; |
|
48 |
|
|
49 |
/* plain c */ |
/* plain c */ |
50 |
color_inputFunc rgb555_to_yv12_c; |
packedFunc rgb555_to_yv12_c; |
51 |
color_inputFunc rgb565_to_yv12_c; |
packedFunc rgb565_to_yv12_c; |
52 |
color_inputFunc rgb24_to_yv12_c; |
packedFunc bgr_to_yv12_c; |
53 |
color_inputFunc rgb32_to_yv12_c; |
packedFunc bgra_to_yv12_c; |
54 |
color_inputFunc yuv_to_yv12_c; |
packedFunc abgr_to_yv12_c; |
55 |
color_inputFunc yuyv_to_yv12_c; |
packedFunc rgba_to_yv12_c; |
56 |
color_inputFunc uyvy_to_yv12_c; |
packedFunc yuyv_to_yv12_c; |
57 |
|
packedFunc uyvy_to_yv12_c; |
58 |
|
|
59 |
|
packedFunc rgb555i_to_yv12_c; |
60 |
|
packedFunc rgb565i_to_yv12_c; |
61 |
|
packedFunc bgri_to_yv12_c; |
62 |
|
packedFunc bgrai_to_yv12_c; |
63 |
|
packedFunc abgri_to_yv12_c; |
64 |
|
packedFunc rgbai_to_yv12_c; |
65 |
|
packedFunc yuyvi_to_yv12_c; |
66 |
|
packedFunc uyvyi_to_yv12_c; |
67 |
|
|
68 |
|
|
69 |
/* mmx */ |
/* mmx */ |
70 |
color_inputFunc rgb24_to_yv12_mmx; |
packedFunc bgr_to_yv12_mmx; |
71 |
color_inputFunc rgb32_to_yv12_mmx; |
packedFunc bgra_to_yv12_mmx; |
72 |
color_inputFunc yuv_to_yv12_mmx; |
packedFunc yuyv_to_yv12_mmx; |
73 |
color_inputFunc yuyv_to_yv12_mmx; |
packedFunc uyvy_to_yv12_mmx; |
74 |
color_inputFunc uyvy_to_yv12_mmx; |
|
75 |
|
/* 3dnow */ |
76 |
|
packedFunc yuyv_to_yv12_3dn; |
77 |
|
packedFunc uyvy_to_yv12_3dn; |
78 |
|
|
79 |
/* xmm */ |
/* xmm */ |
80 |
color_inputFunc yuv_to_yv12_xmm; |
packedFunc yuyv_to_yv12_xmm; |
81 |
|
packedFunc uyvy_to_yv12_xmm; |
82 |
|
|
|
/* output color conversion functions (decoder) */ |
|
83 |
|
|
84 |
typedef void (color_outputFunc)(uint8_t *dst, int dst_stride, |
/* yv12_to_xxx colorspace conversion functions (decoder) */ |
|
uint8_t *y_src, uint8_t *v_src, |
|
|
uint8_t * u_src, int y_stride, |
|
|
int uv_stride, int width, int height); |
|
85 |
|
|
86 |
typedef color_outputFunc* color_outputFuncPtr; |
extern packedFuncPtr yv12_to_rgb555; |
87 |
|
extern packedFuncPtr yv12_to_rgb565; |
88 |
extern color_outputFuncPtr yv12_to_rgb555; |
extern packedFuncPtr yv12_to_bgr; |
89 |
extern color_outputFuncPtr yv12_to_rgb565; |
extern packedFuncPtr yv12_to_bgra; |
90 |
extern color_outputFuncPtr yv12_to_rgb24; |
extern packedFuncPtr yv12_to_abgr; |
91 |
extern color_outputFuncPtr yv12_to_rgb32; |
extern packedFuncPtr yv12_to_rgba; |
92 |
extern color_outputFuncPtr yv12_to_yuv; |
extern packedFuncPtr yv12_to_yuyv; |
93 |
extern color_outputFuncPtr yv12_to_yuyv; |
extern packedFuncPtr yv12_to_uyvy; |
94 |
extern color_outputFuncPtr yv12_to_uyvy; |
|
95 |
|
extern packedFuncPtr yv12_to_rgb555i; |
96 |
|
extern packedFuncPtr yv12_to_rgb565i; |
97 |
|
extern packedFuncPtr yv12_to_bgri; |
98 |
|
extern packedFuncPtr yv12_to_bgrai; |
99 |
|
extern packedFuncPtr yv12_to_abgri; |
100 |
|
extern packedFuncPtr yv12_to_rgbai; |
101 |
|
extern packedFuncPtr yv12_to_yuyvi; |
102 |
|
extern packedFuncPtr yv12_to_uyvyi; |
103 |
|
|
104 |
/* plain c */ |
/* plain c */ |
105 |
void init_yuv_to_rgb(void); |
packedFunc yv12_to_rgb555_c; |
106 |
|
packedFunc yv12_to_rgb565_c; |
107 |
color_outputFunc yv12_to_rgb555_c; |
packedFunc yv12_to_bgr_c; |
108 |
color_outputFunc yv12_to_rgb565_c; |
packedFunc yv12_to_bgra_c; |
109 |
color_outputFunc yv12_to_rgb24_c; |
packedFunc yv12_to_abgr_c; |
110 |
color_outputFunc yv12_to_rgb32_c; |
packedFunc yv12_to_rgba_c; |
111 |
color_outputFunc yv12_to_yuv_c; |
packedFunc yv12_to_yuyv_c; |
112 |
color_outputFunc yv12_to_yuyv_c; |
packedFunc yv12_to_uyvy_c; |
113 |
color_outputFunc yv12_to_uyvy_c; |
|
114 |
|
packedFunc yv12_to_rgb555i_c; |
115 |
|
packedFunc yv12_to_rgb565i_c; |
116 |
|
packedFunc yv12_to_bgri_c; |
117 |
|
packedFunc yv12_to_bgrai_c; |
118 |
|
packedFunc yv12_to_abgri_c; |
119 |
|
packedFunc yv12_to_rgbai_c; |
120 |
|
packedFunc yv12_to_yuyvi_c; |
121 |
|
packedFunc yv12_to_uyvyi_c; |
122 |
|
|
123 |
/* mmx */ |
/* mmx */ |
124 |
color_outputFunc yv12_to_rgb24_mmx; |
packedFunc yv12_to_bgr_mmx; |
125 |
color_outputFunc yv12_to_rgb32_mmx; |
packedFunc yv12_to_bgra_mmx; |
126 |
color_outputFunc yv12_to_yuyv_mmx; |
packedFunc yv12_to_yuyv_mmx; |
127 |
color_outputFunc yv12_to_uyvy_mmx; |
packedFunc yv12_to_uyvy_mmx; |
128 |
|
|
129 |
|
packedFunc yv12_to_yuyvi_mmx; |
130 |
|
packedFunc yv12_to_uyvyi_mmx; |
131 |
|
|
132 |
|
|
133 |
|
typedef void (planarFunc) ( |
134 |
|
uint8_t * y_dst, uint8_t * u_dst, uint8_t * v_dst, |
135 |
|
int y_dst_stride, int uv_dst_stride, |
136 |
|
uint8_t * y_src, uint8_t * u_src, uint8_t * v_src, |
137 |
|
int y_src_stride, int uv_src_stride, |
138 |
|
int width, int height, int vflip); |
139 |
|
typedef planarFunc *planarFuncPtr; |
140 |
|
|
141 |
|
extern planarFuncPtr yv12_to_yv12; |
142 |
|
|
143 |
|
planarFunc yv12_to_yv12_c; |
144 |
|
planarFunc yv12_to_yv12_mmx; |
145 |
|
planarFunc yv12_to_yv12_xmm; |
146 |
|
|
147 |
|
|
148 |
#endif /* _COLORSPACE_H_ */ |
#endif /* _COLORSPACE_H_ */ |