91 |
|
#error "incomplete" |
92 |
|
#define FB_BLIT_1(dst, src) (dst = (src)) |
93 |
|
#define FB_BLIT_2(dst, src) (dst = (src)) |
94 |
< |
#define FB_DEPTH 8 |
94 |
> |
#define FB_DEPTH 0 |
95 |
|
#define FB_FUNC_NAME do_fbcopy_raw |
96 |
|
#include "video_blit.h" |
97 |
|
#endif |
99 |
|
|
100 |
|
// RGB 555 |
101 |
|
|
102 |
+ |
#ifdef WORDS_BIGENDIAN |
103 |
+ |
# define FB_FUNC_NAME do_fbcopy_15_obo |
104 |
+ |
#else |
105 |
+ |
# define FB_FUNC_NAME do_fbcopy_15_nbo |
106 |
+ |
#endif |
107 |
+ |
|
108 |
|
#define FB_BLIT_1(dst, src) \ |
109 |
|
(dst = (((src) >> 8) & 0xff) | (((src) & 0xff) << 8)) |
110 |
|
|
112 |
|
(dst = (((src) >> 8) & 0x00ff00ff) | (((src) & 0x00ff00ff) << 8)) |
113 |
|
|
114 |
|
#define FB_DEPTH 15 |
109 |
– |
#define FB_FUNC_NAME do_fbcopy_15 |
115 |
|
#include "video_blit.h" |
116 |
|
|
117 |
|
|
118 |
|
// RGB 565 |
119 |
|
|
120 |
+ |
#ifdef WORDS_BIGENDIAN |
121 |
+ |
|
122 |
+ |
// native byte order |
123 |
+ |
|
124 |
+ |
#define FB_BLIT_1(dst, src) \ |
125 |
+ |
(dst = (((src) & 0x1f) | (((src) << 1) & 0xffc0))) |
126 |
+ |
|
127 |
+ |
#define FB_BLIT_2(dst, src) \ |
128 |
+ |
(dst = (((src) & 0x001f001f) | (((src) << 1) & 0xffc0ffc0))) |
129 |
+ |
|
130 |
+ |
#define FB_DEPTH 16 |
131 |
+ |
#define FB_FUNC_NAME do_fbcopy_16_nbo |
132 |
+ |
#include "video_blit.h" |
133 |
+ |
|
134 |
+ |
// opposite byte order (untested) |
135 |
+ |
|
136 |
+ |
#define FB_BLIT_1(dst, src) \ |
137 |
+ |
(dst = ((((src) >> 6) & 0xff) | (((src) & 0x60) << 9))) |
138 |
+ |
|
139 |
+ |
#define FB_BLIT_2(dst, src) \ |
140 |
+ |
(dst = ((((src) >> 6) & 0x00ff00ff) | (((src) & 0x00600060) << 9))) |
141 |
+ |
|
142 |
+ |
#define FB_DEPTH 16 |
143 |
+ |
#define FB_FUNC_NAME do_fbcopy_16_obo |
144 |
+ |
#include "video_blit.h" |
145 |
+ |
|
146 |
+ |
#else |
147 |
+ |
|
148 |
+ |
// native byte order |
149 |
+ |
|
150 |
|
#define FB_BLIT_1(dst, src) \ |
151 |
|
(dst = (((src) >> 8) & 0x001f) | (((src) << 9) & 0xfe00) | (((src) >> 7) & 0x01c0)) |
152 |
|
|
154 |
|
(dst = (((src) >> 8) & 0x001f001f) | (((src) << 9) & 0xfe00fe00) | (((src) >> 7) & 0x01c001c0)) |
155 |
|
|
156 |
|
#define FB_DEPTH 16 |
157 |
< |
#define FB_FUNC_NAME do_fbcopy_16 |
157 |
> |
#define FB_FUNC_NAME do_fbcopy_16_nbo |
158 |
|
#include "video_blit.h" |
159 |
|
|
160 |
+ |
// opposite byte order (untested) |
161 |
+ |
|
162 |
+ |
#define FB_BLIT_1(dst, src) \ |
163 |
+ |
(dst = (((src) & 0x1f00) | (((src) << 1) & 0xe0fe) | (((src) >> 15) & 1))) |
164 |
+ |
|
165 |
+ |
#define FB_BLIT_2(dst, src) \ |
166 |
+ |
(dst = (((src) & 0x1f001f00) | (((src) << 1) & 0xe0fee0fe) | (((src) >> 15) & 0x10001))) |
167 |
+ |
|
168 |
+ |
#define FB_DEPTH 16 |
169 |
+ |
#define FB_FUNC_NAME do_fbcopy_16_obo |
170 |
+ |
#include "video_blit.h" |
171 |
+ |
|
172 |
+ |
#endif |
173 |
|
|
174 |
|
// RGB 888 |
175 |
|
|
176 |
+ |
#ifdef WORDS_BIGENDIAN |
177 |
+ |
# define FB_FUNC_NAME do_fbcopy_24_obo |
178 |
+ |
#else |
179 |
+ |
# define FB_FUNC_NAME do_fbcopy_24_nbo |
180 |
+ |
#endif |
181 |
+ |
|
182 |
|
#define FB_BLIT_1(dst, src) \ |
183 |
|
(dst = (src)) |
184 |
|
|
186 |
|
(dst = (((src) >> 24) & 0xff) | (((src) >> 16) & 0xff00) | (((src) & 0xff00) << 16) | (((src) & 0xff) << 24)) |
187 |
|
|
188 |
|
#define FB_DEPTH 24 |
135 |
– |
#define FB_FUNC_NAME do_fbcopy_24 |
189 |
|
#include "video_blit.h" |
190 |
|
|
191 |
|
|
208 |
|
// NT : not tested |
209 |
|
// OK : has been successfully tested |
210 |
|
// NBO : native byte order |
211 |
+ |
// OBO : opposite byte order |
212 |
|
static fbcopy_func fbcopy_funcs[ID_DEPTH_COUNT][2][2] = { |
213 |
|
#ifdef WORDS_BIGENDIAN |
214 |
< |
/* alt byte order native byte order */ |
215 |
< |
/* 1 bpp */ { WD(fbcopy_raw) , WD(fbcopy_raw) }, // NT |
216 |
< |
/* 8 bpp */ { WD(fbcopy_raw) , WD(fbcopy_raw) }, // OK (NBO) |
217 |
< |
/* 15 bpp */ { WD(fbcopy_15) , WD(fbcopy_raw) }, // NT |
218 |
< |
/* 16 bpp */ { WD(fbcopy_16) , WD(fbcopy_raw) }, // NT |
219 |
< |
/* 24 bpp */ { WD(fbcopy_24) , WD(fbcopy_raw) } // NT |
214 |
> |
/* opposite byte order native byte order */ |
215 |
> |
/* 1 bpp */ { WD(fbcopy_raw) , WD(fbcopy_raw) }, // NT |
216 |
> |
/* 8 bpp */ { WD(fbcopy_raw) , WD(fbcopy_raw) }, // OK (NBO) |
217 |
> |
/* 15 bpp */ { WD(fbcopy_15_obo) , WD(fbcopy_raw) }, // NT |
218 |
> |
/* 16 bpp */ { WD(fbcopy_16_obo) , WD(fbcopy_16_nbo) }, // NT |
219 |
> |
/* 24 bpp */ { WD(fbcopy_24_obo) , WD(fbcopy_raw) } // NT |
220 |
|
#else |
221 |
< |
/* 1 bpp */ { WD(fbcopy_raw) , WD(fbcopy_raw) }, // NT |
222 |
< |
/* 8 bpp */ { WD(fbcopy_raw) , WD(fbcopy_raw) }, // OK (NBO) |
223 |
< |
/* 15 bpp */ { WD(fbcopy_15) , WD(fbcopy_15) }, // OK (NBO) |
224 |
< |
/* 16 bpp */ { WD(fbcopy_16) , WD(fbcopy_16) }, // OK (NBO) |
225 |
< |
/* 24 bpp */ { WD(fbcopy_24) , WD(fbcopy_24) } // NT |
221 |
> |
/* opposite byte order native byte order */ |
222 |
> |
/* 1 bpp */ { WD(fbcopy_raw) , WD(fbcopy_raw) }, // NT |
223 |
> |
/* 8 bpp */ { WD(fbcopy_raw) , WD(fbcopy_raw) }, // OK (NBO) |
224 |
> |
/* 15 bpp */ { WD(fbcopy_raw) , WD(fbcopy_15_nbo) }, // OK (NBO) |
225 |
> |
/* 16 bpp */ { WD(fbcopy_16_obo) , WD(fbcopy_16_nbo) }, // OK (NBO) |
226 |
> |
/* 24 bpp */ { WD(fbcopy_raw) , WD(fbcopy_24_nbo) } // NT |
227 |
|
#endif |
228 |
|
}; |
229 |
|
|