trunk/src/emu/video/rgbvmx.h
r26842 | r26843 | |
216 | 216 | extern const struct _rgbvmx_statics |
217 | 217 | { |
218 | 218 | rgbaint maxbyte; |
219 | | rgbaint scale_table[256+1]; |
| 219 | rgbaint scale_table[256]; |
220 | 220 | } rgbvmx_statics; |
221 | 221 | |
222 | 222 | |
r26842 | r26843 | |
234 | 234 | { |
235 | 235 | vector signed int temp; |
236 | 236 | *color1 = vec_mergeh(*color1, *color2); |
237 | | temp = vec_msum(*color1, rgbvmx_statics.scale_table[color1scale+1], vec_splat_s32(0)); |
| 237 | temp = vec_msum(*color1, rgbvmx_statics.scale_table[color1scale], vec_splat_s32(0)); |
238 | 238 | temp = (vector signed int)vec_sr(temp, vec_splat_u32(8)); |
239 | 239 | *color1 = vec_packs(temp, temp); |
240 | 240 | } |
r26842 | r26843 | |
249 | 249 | { |
250 | 250 | vector signed int temp; |
251 | 251 | *color1 = vec_mergeh(*color1, *color2); |
252 | | temp = vec_msum(*color1, rgbvmx_statics.scale_table[color1scale+1], vec_splat_s32(0)); |
| 252 | temp = vec_msum(*color1, rgbvmx_statics.scale_table[color1scale], vec_splat_s32(0)); |
253 | 253 | temp = (vector signed int)vec_sr(temp, vec_splat_u32(8)); |
254 | 254 | *color1 = vec_packs(temp, temp); |
255 | 255 | } |
trunk/src/emu/video/rgbutil.c
r26842 | r26843 | |
151 | 151 | { 248, 8, 248, 8, 248, 8, 248, 8 }, { 249, 7, 249, 7, 249, 7, 249, 7 }, |
152 | 152 | { 250, 6, 250, 6, 250, 6, 250, 6 }, { 251, 5, 251, 5, 251, 5, 251, 5 }, |
153 | 153 | { 252, 4, 252, 4, 252, 4, 252, 4 }, { 253, 3, 253, 3, 253, 3, 253, 3 }, |
154 | | { 254, 2, 254, 2, 254, 2, 254, 2 }, { 255, 1, 255, 1, 255, 1, 255, 1 }, |
155 | | { 256, 0, 256, 0, 256, 0, 256, 0 } |
| 154 | { 254, 2, 254, 2, 254, 2, 254, 2 }, { 255, 1, 255, 1, 255, 1, 255, 1 } |
156 | 155 | } |
157 | 156 | }; |
158 | 157 | #endif // defined(__SSE2__) |
r26842 | r26843 | |
296 | 295 | { 248, 8, 248, 8, 248, 8, 248, 8 }, { 249, 7, 249, 7, 249, 7, 249, 7 }, |
297 | 296 | { 250, 6, 250, 6, 250, 6, 250, 6 }, { 251, 5, 251, 5, 251, 5, 251, 5 }, |
298 | 297 | { 252, 4, 252, 4, 252, 4, 252, 4 }, { 253, 3, 253, 3, 253, 3, 253, 3 }, |
299 | | { 254, 2, 254, 2, 254, 2, 254, 2 }, { 255, 1, 255, 1, 255, 1, 255, 1 }, |
300 | | { 256, 0, 256, 0, 256, 0, 256, 0 } |
| 298 | { 254, 2, 254, 2, 254, 2, 254, 2 }, { 255, 1, 255, 1, 255, 1, 255, 1 } |
301 | 299 | } |
302 | 300 | }; |
303 | 301 | #endif // defined(__ALTIVEC__) |