Mercurial > mplayer.hg
annotate postproc/rgb2rgb.c @ 7874:4c832590e18e
yeah, test.c works now!
author | arpi |
---|---|
date | Wed, 23 Oct 2002 18:20:13 +0000 |
parents | d5bd28edf486 |
children | 9fc45fe0d444 |
rev | line source |
---|---|
2694 | 1 /* |
2538
71320898b333
Finish mmx2, 3dnow optimiz. 15to16 should be tested. Better fix of can't compile
nick
parents:
2535
diff
changeset
|
2 * |
71320898b333
Finish mmx2, 3dnow optimiz. 15to16 should be tested. Better fix of can't compile
nick
parents:
2535
diff
changeset
|
3 * rgb2rgb.c, Software RGB to RGB convertor |
2732 | 4 * pluralize by Software PAL8 to RGB convertor |
5 * Software YUV to YUV convertor | |
6 * Software YUV to RGB convertor | |
2538
71320898b333
Finish mmx2, 3dnow optimiz. 15to16 should be tested. Better fix of can't compile
nick
parents:
2535
diff
changeset
|
7 * Written by Nick Kurshev. |
3132 | 8 * palette & yuv & runtime cpu stuff by Michael (michaelni@gmx.at) (under GPL) |
2538
71320898b333
Finish mmx2, 3dnow optimiz. 15to16 should be tested. Better fix of can't compile
nick
parents:
2535
diff
changeset
|
9 */ |
2504 | 10 #include <inttypes.h> |
11 #include "../config.h" | |
12 #include "rgb2rgb.h" | |
3132 | 13 #include "../cpudetect.h" |
4923 | 14 #include "../mangle.h" |
7159
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
15 #include "../bswap.h" |
2538
71320898b333
Finish mmx2, 3dnow optimiz. 15to16 should be tested. Better fix of can't compile
nick
parents:
2535
diff
changeset
|
16 |
3132 | 17 #ifdef ARCH_X86 |
18 #define CAN_COMPILE_X86_ASM | |
19 #endif | |
20 | |
4622 | 21 #define FAST_BGR2YV12 // use 7 bit coeffs instead of 15bit |
22 | |
3132 | 23 #ifdef CAN_COMPILE_X86_ASM |
6492 | 24 static const uint64_t mmx_null __attribute__((aligned(8))) = 0x0000000000000000ULL; |
25 static const uint64_t mmx_one __attribute__((aligned(8))) = 0xFFFFFFFFFFFFFFFFULL; | |
2755 | 26 static const uint64_t mask32b __attribute__((aligned(8))) = 0x000000FF000000FFULL; |
27 static const uint64_t mask32g __attribute__((aligned(8))) = 0x0000FF000000FF00ULL; | |
28 static const uint64_t mask32r __attribute__((aligned(8))) = 0x00FF000000FF0000ULL; | |
2538
71320898b333
Finish mmx2, 3dnow optimiz. 15to16 should be tested. Better fix of can't compile
nick
parents:
2535
diff
changeset
|
29 static const uint64_t mask32 __attribute__((aligned(8))) = 0x00FFFFFF00FFFFFFULL; |
5582 | 30 static const uint64_t mask24b __attribute__((aligned(8))) = 0x00FF0000FF0000FFULL; |
31 static const uint64_t mask24g __attribute__((aligned(8))) = 0xFF0000FF0000FF00ULL; | |
32 static const uint64_t mask24r __attribute__((aligned(8))) = 0x0000FF0000FF0000ULL; | |
2538
71320898b333
Finish mmx2, 3dnow optimiz. 15to16 should be tested. Better fix of can't compile
nick
parents:
2535
diff
changeset
|
33 static const uint64_t mask24l __attribute__((aligned(8))) = 0x0000000000FFFFFFULL; |
71320898b333
Finish mmx2, 3dnow optimiz. 15to16 should be tested. Better fix of can't compile
nick
parents:
2535
diff
changeset
|
34 static const uint64_t mask24h __attribute__((aligned(8))) = 0x0000FFFFFF000000ULL; |
2746
dece635a28e3
Minor speedup of rgb32to24. (performance is not successful)
nick
parents:
2741
diff
changeset
|
35 static const uint64_t mask24hh __attribute__((aligned(8))) = 0xffff000000000000ULL; |
dece635a28e3
Minor speedup of rgb32to24. (performance is not successful)
nick
parents:
2741
diff
changeset
|
36 static const uint64_t mask24hhh __attribute__((aligned(8))) = 0xffffffff00000000ULL; |
dece635a28e3
Minor speedup of rgb32to24. (performance is not successful)
nick
parents:
2741
diff
changeset
|
37 static const uint64_t mask24hhhh __attribute__((aligned(8))) = 0xffffffffffff0000ULL; |
2538
71320898b333
Finish mmx2, 3dnow optimiz. 15to16 should be tested. Better fix of can't compile
nick
parents:
2535
diff
changeset
|
38 static const uint64_t mask15b __attribute__((aligned(8))) = 0x001F001F001F001FULL; /* 00000000 00011111 xxB */ |
71320898b333
Finish mmx2, 3dnow optimiz. 15to16 should be tested. Better fix of can't compile
nick
parents:
2535
diff
changeset
|
39 static const uint64_t mask15rg __attribute__((aligned(8))) = 0x7FE07FE07FE07FE0ULL; /* 01111111 11100000 RGx */ |
2698
22652c028692
faster 15to16 bit rgb (the mmx routine is limited by memory speed so there is no difference ): but the c routine is faster
michael
parents:
2697
diff
changeset
|
40 static const uint64_t mask15s __attribute__((aligned(8))) = 0xFFE0FFE0FFE0FFE0ULL; |
6492 | 41 static const uint64_t mask15g __attribute__((aligned(8))) = 0x03E003E003E003E0ULL; |
42 static const uint64_t mask15r __attribute__((aligned(8))) = 0x7C007C007C007C00ULL; | |
43 #define mask16b mask15b | |
44 static const uint64_t mask16g __attribute__((aligned(8))) = 0x07E007E007E007E0ULL; | |
45 static const uint64_t mask16r __attribute__((aligned(8))) = 0xF800F800F800F800ULL; | |
2741 | 46 static const uint64_t red_16mask __attribute__((aligned(8))) = 0x0000f8000000f800ULL; |
47 static const uint64_t green_16mask __attribute__((aligned(8)))= 0x000007e0000007e0ULL; | |
48 static const uint64_t blue_16mask __attribute__((aligned(8))) = 0x0000001f0000001fULL; | |
49 static const uint64_t red_15mask __attribute__((aligned(8))) = 0x00007c000000f800ULL; | |
50 static const uint64_t green_15mask __attribute__((aligned(8)))= 0x000003e0000007e0ULL; | |
51 static const uint64_t blue_15mask __attribute__((aligned(8))) = 0x0000001f0000001fULL; | |
4622 | 52 |
53 #ifdef FAST_BGR2YV12 | |
54 static const uint64_t bgr2YCoeff __attribute__((aligned(8))) = 0x000000210041000DULL; | |
55 static const uint64_t bgr2UCoeff __attribute__((aligned(8))) = 0x0000FFEEFFDC0038ULL; | |
56 static const uint64_t bgr2VCoeff __attribute__((aligned(8))) = 0x00000038FFD2FFF8ULL; | |
57 #else | |
58 static const uint64_t bgr2YCoeff __attribute__((aligned(8))) = 0x000020E540830C8BULL; | |
59 static const uint64_t bgr2UCoeff __attribute__((aligned(8))) = 0x0000ED0FDAC23831ULL; | |
60 static const uint64_t bgr2VCoeff __attribute__((aligned(8))) = 0x00003831D0E6F6EAULL; | |
61 #endif | |
62 static const uint64_t bgr2YOffset __attribute__((aligned(8))) = 0x1010101010101010ULL; | |
63 static const uint64_t bgr2UVOffset __attribute__((aligned(8)))= 0x8080808080808080ULL; | |
64 static const uint64_t w1111 __attribute__((aligned(8))) = 0x0001000100010001ULL; | |
65 | |
2755 | 66 #if 0 |
67 static volatile uint64_t __attribute__((aligned(8))) b5Dither; | |
68 static volatile uint64_t __attribute__((aligned(8))) g5Dither; | |
69 static volatile uint64_t __attribute__((aligned(8))) g6Dither; | |
70 static volatile uint64_t __attribute__((aligned(8))) r5Dither; | |
71 | |
72 static uint64_t __attribute__((aligned(8))) dither4[2]={ | |
73 0x0103010301030103LL, | |
74 0x0200020002000200LL,}; | |
75 | |
76 static uint64_t __attribute__((aligned(8))) dither8[2]={ | |
77 0x0602060206020602LL, | |
78 0x0004000400040004LL,}; | |
79 #endif | |
2535 | 80 #endif |
2513 | 81 |
3132 | 82 #define RGB2YUV_SHIFT 8 |
83 #define BY ((int)( 0.098*(1<<RGB2YUV_SHIFT)+0.5)) | |
84 #define BV ((int)(-0.071*(1<<RGB2YUV_SHIFT)+0.5)) | |
85 #define BU ((int)( 0.439*(1<<RGB2YUV_SHIFT)+0.5)) | |
86 #define GY ((int)( 0.504*(1<<RGB2YUV_SHIFT)+0.5)) | |
87 #define GV ((int)(-0.368*(1<<RGB2YUV_SHIFT)+0.5)) | |
88 #define GU ((int)(-0.291*(1<<RGB2YUV_SHIFT)+0.5)) | |
89 #define RY ((int)( 0.257*(1<<RGB2YUV_SHIFT)+0.5)) | |
90 #define RV ((int)( 0.439*(1<<RGB2YUV_SHIFT)+0.5)) | |
91 #define RU ((int)(-0.148*(1<<RGB2YUV_SHIFT)+0.5)) | |
92 | |
93 //Note: we have C, MMX, MMX2, 3DNOW version therse no 3DNOW+MMX2 one | |
94 //Plain C versions | |
95 #undef HAVE_MMX | |
96 #undef HAVE_MMX2 | |
97 #undef HAVE_3DNOW | |
98 #undef ARCH_X86 | |
5338 | 99 #undef HAVE_SSE2 |
3132 | 100 #define RENAME(a) a ## _C |
101 #include "rgb2rgb_template.c" | |
102 | |
103 #ifdef CAN_COMPILE_X86_ASM | |
104 | |
105 //MMX versions | |
106 #undef RENAME | |
107 #define HAVE_MMX | |
108 #undef HAVE_MMX2 | |
109 #undef HAVE_3DNOW | |
5338 | 110 #undef HAVE_SSE2 |
3132 | 111 #define ARCH_X86 |
112 #define RENAME(a) a ## _MMX | |
113 #include "rgb2rgb_template.c" | |
114 | |
115 //MMX2 versions | |
116 #undef RENAME | |
117 #define HAVE_MMX | |
118 #define HAVE_MMX2 | |
119 #undef HAVE_3DNOW | |
5338 | 120 #undef HAVE_SSE2 |
3132 | 121 #define ARCH_X86 |
122 #define RENAME(a) a ## _MMX2 | |
123 #include "rgb2rgb_template.c" | |
124 | |
125 //3DNOW versions | |
126 #undef RENAME | |
127 #define HAVE_MMX | |
128 #undef HAVE_MMX2 | |
129 #define HAVE_3DNOW | |
5338 | 130 #undef HAVE_SSE2 |
3132 | 131 #define ARCH_X86 |
132 #define RENAME(a) a ## _3DNow | |
133 #include "rgb2rgb_template.c" | |
134 | |
135 #endif //CAN_COMPILE_X86_ASM | |
136 | |
2718 | 137 void rgb24to32(const uint8_t *src,uint8_t *dst,unsigned src_size) |
2504 | 138 { |
3132 | 139 #ifdef CAN_COMPILE_X86_ASM |
140 // ordered per speed fasterst first | |
141 if(gCpuCaps.hasMMX2) | |
142 rgb24to32_MMX2(src, dst, src_size); | |
143 else if(gCpuCaps.has3DNow) | |
144 rgb24to32_3DNow(src, dst, src_size); | |
145 else if(gCpuCaps.hasMMX) | |
146 rgb24to32_MMX(src, dst, src_size); | |
147 else | |
6492 | 148 #endif |
3132 | 149 rgb24to32_C(src, dst, src_size); |
6492 | 150 } |
151 | |
152 void rgb15to24(const uint8_t *src,uint8_t *dst,unsigned src_size) | |
153 { | |
154 #ifdef CAN_COMPILE_X86_ASM | |
155 // ordered per speed fasterst first | |
156 if(gCpuCaps.hasMMX2) | |
157 rgb15to24_MMX2(src, dst, src_size); | |
158 else if(gCpuCaps.has3DNow) | |
159 rgb15to24_3DNow(src, dst, src_size); | |
160 else if(gCpuCaps.hasMMX) | |
161 rgb15to24_MMX(src, dst, src_size); | |
162 else | |
163 #endif | |
164 rgb15to24_C(src, dst, src_size); | |
165 } | |
166 | |
167 void rgb16to24(const uint8_t *src,uint8_t *dst,unsigned src_size) | |
168 { | |
169 #ifdef CAN_COMPILE_X86_ASM | |
170 // ordered per speed fasterst first | |
171 if(gCpuCaps.hasMMX2) | |
172 rgb16to24_MMX2(src, dst, src_size); | |
173 else if(gCpuCaps.has3DNow) | |
174 rgb16to24_3DNow(src, dst, src_size); | |
175 else if(gCpuCaps.hasMMX) | |
176 rgb16to24_MMX(src, dst, src_size); | |
177 else | |
2510 | 178 #endif |
6492 | 179 rgb16to24_C(src, dst, src_size); |
180 } | |
181 | |
182 void rgb15to32(const uint8_t *src,uint8_t *dst,unsigned src_size) | |
183 { | |
184 #ifdef CAN_COMPILE_X86_ASM | |
185 // ordered per speed fasterst first | |
186 if(gCpuCaps.hasMMX2) | |
187 rgb15to32_MMX2(src, dst, src_size); | |
188 else if(gCpuCaps.has3DNow) | |
189 rgb15to32_3DNow(src, dst, src_size); | |
190 else if(gCpuCaps.hasMMX) | |
191 rgb15to32_MMX(src, dst, src_size); | |
192 else | |
193 #endif | |
194 rgb15to32_C(src, dst, src_size); | |
195 } | |
196 | |
197 void rgb16to32(const uint8_t *src,uint8_t *dst,unsigned src_size) | |
198 { | |
199 #ifdef CAN_COMPILE_X86_ASM | |
200 // ordered per speed fasterst first | |
201 if(gCpuCaps.hasMMX2) | |
202 rgb16to32_MMX2(src, dst, src_size); | |
203 else if(gCpuCaps.has3DNow) | |
204 rgb16to32_3DNow(src, dst, src_size); | |
205 else if(gCpuCaps.hasMMX) | |
206 rgb16to32_MMX(src, dst, src_size); | |
207 else | |
208 #endif | |
209 rgb16to32_C(src, dst, src_size); | |
2504 | 210 } |
2505 | 211 |
2718 | 212 void rgb32to24(const uint8_t *src,uint8_t *dst,unsigned src_size) |
2505 | 213 { |
3132 | 214 #ifdef CAN_COMPILE_X86_ASM |
215 // ordered per speed fasterst first | |
216 if(gCpuCaps.hasMMX2) | |
217 rgb32to24_MMX2(src, dst, src_size); | |
218 else if(gCpuCaps.has3DNow) | |
219 rgb32to24_3DNow(src, dst, src_size); | |
220 else if(gCpuCaps.hasMMX) | |
221 rgb32to24_MMX(src, dst, src_size); | |
222 else | |
6492 | 223 #endif |
3132 | 224 rgb32to24_C(src, dst, src_size); |
2505 | 225 } |
2506 | 226 |
2538
71320898b333
Finish mmx2, 3dnow optimiz. 15to16 should be tested. Better fix of can't compile
nick
parents:
2535
diff
changeset
|
227 /* |
71320898b333
Finish mmx2, 3dnow optimiz. 15to16 should be tested. Better fix of can't compile
nick
parents:
2535
diff
changeset
|
228 Original by Strepto/Astral |
71320898b333
Finish mmx2, 3dnow optimiz. 15to16 should be tested. Better fix of can't compile
nick
parents:
2535
diff
changeset
|
229 ported to gcc & bugfixed : A'rpi |
2564 | 230 MMX2, 3DNOW optimization by Nick Kurshev |
2698
22652c028692
faster 15to16 bit rgb (the mmx routine is limited by memory speed so there is no difference ): but the c routine is faster
michael
parents:
2697
diff
changeset
|
231 32bit c version, and and&add trick by Michael Niedermayer |
2538
71320898b333
Finish mmx2, 3dnow optimiz. 15to16 should be tested. Better fix of can't compile
nick
parents:
2535
diff
changeset
|
232 */ |
2718 | 233 void rgb15to16(const uint8_t *src,uint8_t *dst,unsigned src_size) |
2506 | 234 { |
3132 | 235 #ifdef CAN_COMPILE_X86_ASM |
236 // ordered per speed fasterst first | |
237 if(gCpuCaps.hasMMX2) | |
238 rgb15to16_MMX2(src, dst, src_size); | |
239 else if(gCpuCaps.has3DNow) | |
240 rgb15to16_3DNow(src, dst, src_size); | |
241 else if(gCpuCaps.hasMMX) | |
242 rgb15to16_MMX(src, dst, src_size); | |
243 else | |
6492 | 244 #endif |
3132 | 245 rgb15to16_C(src, dst, src_size); |
2506 | 246 } |
2694 | 247 |
6606
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
248 void rgb16to15(const uint8_t *src,uint8_t *dst,unsigned src_size) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
249 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
250 #ifdef CAN_COMPILE_X86_ASM |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
251 // ordered per speed fasterst first |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
252 if(gCpuCaps.hasMMX2) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
253 rgb16to15_MMX2(src, dst, src_size); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
254 else if(gCpuCaps.has3DNow) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
255 rgb16to15_3DNow(src, dst, src_size); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
256 else if(gCpuCaps.hasMMX) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
257 rgb16to15_MMX(src, dst, src_size); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
258 else |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
259 #endif |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
260 rgb16to15_C(src, dst, src_size); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
261 } |
2694 | 262 /** |
263 * Pallete is assumed to contain bgr32 | |
264 */ | |
2718 | 265 void palette8torgb32(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette) |
2694 | 266 { |
2718 | 267 unsigned i; |
7334 | 268 |
269 /* | |
2702 | 270 for(i=0; i<num_pixels; i++) |
2718 | 271 ((unsigned *)dst)[i] = ((unsigned *)palette)[ src[i] ]; |
7334 | 272 */ |
273 | |
274 for(i=0; i<num_pixels; i++) | |
275 { | |
276 //FIXME slow? | |
277 dst[0]= palette[ src[i]*4+2 ]; | |
278 dst[1]= palette[ src[i]*4+1 ]; | |
279 dst[2]= palette[ src[i]*4+0 ]; | |
280 // dst[3]= 0; /* do we need this cleansing? */ | |
281 dst+= 4; | |
282 } | |
2694 | 283 } |
284 | |
7159
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
285 void palette8tobgr32(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette) |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
286 { |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
287 unsigned i; |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
288 for(i=0; i<num_pixels; i++) |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
289 { |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
290 //FIXME slow? |
7334 | 291 dst[0]= palette[ src[i]*4+0 ]; |
292 dst[1]= palette[ src[i]*4+1 ]; | |
293 dst[2]= palette[ src[i]*4+2 ]; | |
294 // dst[3]= 0; /* do we need this cleansing? */ | |
7159
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
295 dst+= 4; |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
296 } |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
297 } |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
298 |
2697 | 299 /** |
300 * Pallete is assumed to contain bgr32 | |
301 */ | |
2718 | 302 void palette8torgb24(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette) |
2697 | 303 { |
2718 | 304 unsigned i; |
2697 | 305 /* |
306 writes 1 byte o much and might cause alignment issues on some architectures? | |
2702 | 307 for(i=0; i<num_pixels; i++) |
2718 | 308 ((unsigned *)(&dst[i*3])) = ((unsigned *)palette)[ src[i] ]; |
2697 | 309 */ |
2702 | 310 for(i=0; i<num_pixels; i++) |
2697 | 311 { |
312 //FIXME slow? | |
7334 | 313 dst[0]= palette[ src[i]*4+2 ]; |
2697 | 314 dst[1]= palette[ src[i]*4+1 ]; |
7334 | 315 dst[2]= palette[ src[i]*4+0 ]; |
2697 | 316 dst+= 3; |
317 } | |
318 } | |
319 | |
7159
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
320 void palette8tobgr24(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette) |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
321 { |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
322 unsigned i; |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
323 /* |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
324 writes 1 byte o much and might cause alignment issues on some architectures? |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
325 for(i=0; i<num_pixels; i++) |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
326 ((unsigned *)(&dst[i*3])) = ((unsigned *)palette)[ src[i] ]; |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
327 */ |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
328 for(i=0; i<num_pixels; i++) |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
329 { |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
330 //FIXME slow? |
7334 | 331 dst[0]= palette[ src[i]*4+0 ]; |
332 dst[1]= palette[ src[i]*4+1 ]; | |
333 dst[2]= palette[ src[i]*4+2 ]; | |
7159
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
334 dst+= 3; |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
335 } |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
336 } |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
337 |
6484
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
338 void bgr24torgb24(const uint8_t *src, uint8_t *dst, unsigned src_size) |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
339 { |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
340 #ifdef CAN_COMPILE_X86_ASM |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
341 // ordered per speed fasterst first |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
342 if(gCpuCaps.hasMMX2) |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
343 bgr24torgb24_MMX2(src, dst, src_size); |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
344 else if(gCpuCaps.has3DNow) |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
345 bgr24torgb24_3DNow(src, dst, src_size); |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
346 else if(gCpuCaps.hasMMX) |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
347 bgr24torgb24_MMX(src, dst, src_size); |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
348 else |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
349 bgr24torgb24_C(src, dst, src_size); |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
350 #else |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
351 bgr24torgb24_C(src, dst, src_size); |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
352 #endif |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
353 } |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
354 |
2718 | 355 void rgb32to16(const uint8_t *src, uint8_t *dst, unsigned src_size) |
2694 | 356 { |
3132 | 357 #ifdef CAN_COMPILE_X86_ASM |
358 // ordered per speed fasterst first | |
359 if(gCpuCaps.hasMMX2) | |
360 rgb32to16_MMX2(src, dst, src_size); | |
361 else if(gCpuCaps.has3DNow) | |
362 rgb32to16_3DNow(src, dst, src_size); | |
363 else if(gCpuCaps.hasMMX) | |
364 rgb32to16_MMX(src, dst, src_size); | |
365 else | |
6492 | 366 #endif |
3132 | 367 rgb32to16_C(src, dst, src_size); |
2694 | 368 } |
369 | |
2718 | 370 void rgb32to15(const uint8_t *src, uint8_t *dst, unsigned src_size) |
2694 | 371 { |
3132 | 372 #ifdef CAN_COMPILE_X86_ASM |
373 // ordered per speed fasterst first | |
374 if(gCpuCaps.hasMMX2) | |
375 rgb32to15_MMX2(src, dst, src_size); | |
376 else if(gCpuCaps.has3DNow) | |
377 rgb32to15_3DNow(src, dst, src_size); | |
378 else if(gCpuCaps.hasMMX) | |
379 rgb32to15_MMX(src, dst, src_size); | |
380 else | |
6492 | 381 #endif |
3132 | 382 rgb32to15_C(src, dst, src_size); |
2694 | 383 } |
384 | |
2718 | 385 void rgb24to16(const uint8_t *src, uint8_t *dst, unsigned src_size) |
386 { | |
3132 | 387 #ifdef CAN_COMPILE_X86_ASM |
388 // ordered per speed fasterst first | |
389 if(gCpuCaps.hasMMX2) | |
390 rgb24to16_MMX2(src, dst, src_size); | |
391 else if(gCpuCaps.has3DNow) | |
392 rgb24to16_3DNow(src, dst, src_size); | |
393 else if(gCpuCaps.hasMMX) | |
394 rgb24to16_MMX(src, dst, src_size); | |
395 else | |
6492 | 396 #endif |
3132 | 397 rgb24to16_C(src, dst, src_size); |
2718 | 398 } |
399 | |
400 void rgb24to15(const uint8_t *src, uint8_t *dst, unsigned src_size) | |
401 { | |
3132 | 402 #ifdef CAN_COMPILE_X86_ASM |
403 // ordered per speed fasterst first | |
404 if(gCpuCaps.hasMMX2) | |
405 rgb24to15_MMX2(src, dst, src_size); | |
406 else if(gCpuCaps.has3DNow) | |
407 rgb24to15_3DNow(src, dst, src_size); | |
408 else if(gCpuCaps.hasMMX) | |
409 rgb24to15_MMX(src, dst, src_size); | |
410 else | |
6492 | 411 #endif |
3132 | 412 rgb24to15_C(src, dst, src_size); |
2718 | 413 } |
2694 | 414 |
415 /** | |
416 * Palette is assumed to contain bgr16, see rgb32to16 to convert the palette | |
417 */ | |
2718 | 418 void palette8torgb16(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette) |
2694 | 419 { |
2718 | 420 unsigned i; |
2702 | 421 for(i=0; i<num_pixels; i++) |
2694 | 422 ((uint16_t *)dst)[i] = ((uint16_t *)palette)[ src[i] ]; |
423 } | |
7159
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
424 void palette8tobgr16(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette) |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
425 { |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
426 unsigned i; |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
427 for(i=0; i<num_pixels; i++) |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
428 ((uint16_t *)dst)[i] = bswap_16(((uint16_t *)palette)[ src[i] ]); |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
429 } |
2694 | 430 |
431 /** | |
432 * Pallete is assumed to contain bgr15, see rgb32to15 to convert the palette | |
433 */ | |
2718 | 434 void palette8torgb15(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette) |
2694 | 435 { |
2718 | 436 unsigned i; |
2702 | 437 for(i=0; i<num_pixels; i++) |
2694 | 438 ((uint16_t *)dst)[i] = ((uint16_t *)palette)[ src[i] ]; |
2697 | 439 } |
7159
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
440 void palette8tobgr15(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette) |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
441 { |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
442 unsigned i; |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
443 for(i=0; i<num_pixels; i++) |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
444 ((uint16_t *)dst)[i] = bswap_16(((uint16_t *)palette)[ src[i] ]); |
1df24fd752d0
added missing palette8tobgr pairs (hope it's correct)
alex
parents:
6614
diff
changeset
|
445 } |
2755 | 446 |
447 void rgb32tobgr32(const uint8_t *src, uint8_t *dst, unsigned int src_size) | |
448 { | |
3132 | 449 #ifdef CAN_COMPILE_X86_ASM |
450 // ordered per speed fasterst first | |
451 if(gCpuCaps.hasMMX2) | |
452 rgb32tobgr32_MMX2(src, dst, src_size); | |
453 else if(gCpuCaps.has3DNow) | |
454 rgb32tobgr32_3DNow(src, dst, src_size); | |
455 else if(gCpuCaps.hasMMX) | |
456 rgb32tobgr32_MMX(src, dst, src_size); | |
457 else | |
6492 | 458 #endif |
3132 | 459 rgb32tobgr32_C(src, dst, src_size); |
2755 | 460 } |
461 | |
6606
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
462 void rgb32tobgr24(const uint8_t *src, uint8_t *dst, unsigned int src_size) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
463 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
464 unsigned i; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
465 unsigned num_pixels = src_size >> 2; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
466 for(i=0; i<num_pixels; i++) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
467 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
468 dst[3*i + 0] = src[4*i + 2]; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
469 dst[3*i + 1] = src[4*i + 1]; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
470 dst[3*i + 2] = src[4*i + 0]; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
471 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
472 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
473 |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
474 void rgb32tobgr16(const uint8_t *src, uint8_t *dst, unsigned int src_size) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
475 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
476 #ifdef CAN_COMPILE_X86_ASM |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
477 // ordered per speed fasterst first |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
478 if(gCpuCaps.hasMMX2) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
479 rgb32tobgr16_MMX2(src, dst, src_size); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
480 else if(gCpuCaps.has3DNow) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
481 rgb32tobgr16_3DNow(src, dst, src_size); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
482 else if(gCpuCaps.hasMMX) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
483 rgb32tobgr16_MMX(src, dst, src_size); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
484 else |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
485 #endif |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
486 rgb32tobgr16_C(src, dst, src_size); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
487 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
488 |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
489 void rgb32tobgr15(const uint8_t *src, uint8_t *dst, unsigned int src_size) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
490 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
491 #ifdef CAN_COMPILE_X86_ASM |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
492 // ordered per speed fasterst first |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
493 if(gCpuCaps.hasMMX2) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
494 rgb32tobgr15_MMX2(src, dst, src_size); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
495 else if(gCpuCaps.has3DNow) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
496 rgb32tobgr15_3DNow(src, dst, src_size); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
497 else if(gCpuCaps.hasMMX) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
498 rgb32tobgr15_MMX(src, dst, src_size); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
499 else |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
500 #endif |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
501 rgb32tobgr15_C(src, dst, src_size); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
502 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
503 |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
504 void rgb24tobgr32(const uint8_t *src, uint8_t *dst, unsigned int src_size) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
505 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
506 unsigned i; |
6614 | 507 for(i=0; 3*i<src_size; i++) |
6606
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
508 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
509 dst[4*i + 0] = src[3*i + 2]; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
510 dst[4*i + 1] = src[3*i + 1]; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
511 dst[4*i + 2] = src[3*i + 0]; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
512 dst[4*i + 3] = 0; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
513 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
514 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
515 |
5582 | 516 void rgb24tobgr24(const uint8_t *src, uint8_t *dst, unsigned int src_size) |
517 { | |
518 #ifdef CAN_COMPILE_X86_ASM | |
519 // ordered per speed fasterst first | |
520 if(gCpuCaps.hasMMX2) | |
521 rgb24tobgr24_MMX2(src, dst, src_size); | |
522 else if(gCpuCaps.has3DNow) | |
523 rgb24tobgr24_3DNow(src, dst, src_size); | |
524 else if(gCpuCaps.hasMMX) | |
525 rgb24tobgr24_MMX(src, dst, src_size); | |
526 else | |
6492 | 527 #endif |
5582 | 528 rgb24tobgr24_C(src, dst, src_size); |
529 } | |
530 | |
6606
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
531 void rgb24tobgr16(const uint8_t *src, uint8_t *dst, unsigned int src_size) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
532 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
533 #ifdef CAN_COMPILE_X86_ASM |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
534 // ordered per speed fasterst first |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
535 if(gCpuCaps.hasMMX2) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
536 rgb24tobgr16_MMX2(src, dst, src_size); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
537 else if(gCpuCaps.has3DNow) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
538 rgb24tobgr16_3DNow(src, dst, src_size); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
539 else if(gCpuCaps.hasMMX) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
540 rgb24tobgr16_MMX(src, dst, src_size); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
541 else |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
542 #endif |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
543 rgb24tobgr16_C(src, dst, src_size); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
544 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
545 |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
546 void rgb24tobgr15(const uint8_t *src, uint8_t *dst, unsigned int src_size) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
547 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
548 #ifdef CAN_COMPILE_X86_ASM |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
549 // ordered per speed fasterst first |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
550 if(gCpuCaps.hasMMX2) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
551 rgb24tobgr15_MMX2(src, dst, src_size); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
552 else if(gCpuCaps.has3DNow) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
553 rgb24tobgr15_3DNow(src, dst, src_size); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
554 else if(gCpuCaps.hasMMX) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
555 rgb24tobgr15_MMX(src, dst, src_size); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
556 else |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
557 #endif |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
558 rgb24tobgr15_C(src, dst, src_size); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
559 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
560 |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
561 void rgb16tobgr32(const uint8_t *src, uint8_t *dst, unsigned int src_size) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
562 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
563 const uint16_t *end; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
564 uint8_t *d = (uint8_t *)dst; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
565 const uint16_t *s = (uint16_t *)src; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
566 end = s + src_size/2; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
567 while(s < end) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
568 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
569 register uint16_t bgr; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
570 bgr = *s++; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
571 *d++ = (bgr&0xF800)>>8; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
572 *d++ = (bgr&0x7E0)>>3; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
573 *d++ = (bgr&0x1F)<<3; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
574 *d++ = 0; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
575 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
576 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
577 |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
578 void rgb16tobgr24(const uint8_t *src, uint8_t *dst, unsigned int src_size) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
579 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
580 const uint16_t *end; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
581 uint8_t *d = (uint8_t *)dst; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
582 const uint16_t *s = (const uint16_t *)src; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
583 end = s + src_size/2; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
584 while(s < end) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
585 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
586 register uint16_t bgr; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
587 bgr = *s++; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
588 *d++ = (bgr&0xF800)>>8; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
589 *d++ = (bgr&0x7E0)>>3; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
590 *d++ = (bgr&0x1F)<<3; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
591 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
592 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
593 |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
594 void rgb16tobgr16(const uint8_t *src, uint8_t *dst, unsigned int src_size) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
595 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
596 unsigned i; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
597 unsigned num_pixels = src_size >> 1; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
598 |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
599 for(i=0; i<num_pixels; i++) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
600 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
601 unsigned b,g,r; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
602 register uint16_t rgb; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
603 rgb = src[2*i]; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
604 r = rgb&0x1F; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
605 g = (rgb&0x7E0)>>5; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
606 b = (rgb&0xF800)>>11; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
607 dst[2*i] = (b&0x1F) | ((g&0x3F)<<5) | ((r&0x1F)<<11); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
608 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
609 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
610 |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
611 void rgb16tobgr15(const uint8_t *src, uint8_t *dst, unsigned int src_size) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
612 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
613 unsigned i; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
614 unsigned num_pixels = src_size >> 1; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
615 |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
616 for(i=0; i<num_pixels; i++) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
617 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
618 unsigned b,g,r; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
619 register uint16_t rgb; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
620 rgb = src[2*i]; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
621 r = rgb&0x1F; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
622 g = (rgb&0x7E0)>>5; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
623 b = (rgb&0xF800)>>11; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
624 dst[2*i] = (b&0x1F) | ((g&0x1F)<<5) | ((r&0x1F)<<10); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
625 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
626 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
627 |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
628 void rgb15tobgr32(const uint8_t *src, uint8_t *dst, unsigned int src_size) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
629 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
630 const uint16_t *end; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
631 uint8_t *d = (uint8_t *)dst; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
632 const uint16_t *s = (const uint16_t *)src; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
633 end = s + src_size/2; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
634 while(s < end) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
635 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
636 register uint16_t bgr; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
637 bgr = *s++; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
638 *d++ = (bgr&0x7C00)>>7; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
639 *d++ = (bgr&0x3E0)>>2; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
640 *d++ = (bgr&0x1F)<<3; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
641 *d++ = 0; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
642 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
643 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
644 |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
645 void rgb15tobgr24(const uint8_t *src, uint8_t *dst, unsigned int src_size) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
646 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
647 const uint16_t *end; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
648 uint8_t *d = (uint8_t *)dst; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
649 const uint16_t *s = (uint16_t *)src; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
650 end = s + src_size/2; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
651 while(s < end) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
652 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
653 register uint16_t bgr; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
654 bgr = *s++; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
655 *d++ = (bgr&0x7C00)>>7; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
656 *d++ = (bgr&0x3E0)>>2; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
657 *d++ = (bgr&0x1F)<<3; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
658 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
659 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
660 |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
661 void rgb15tobgr16(const uint8_t *src, uint8_t *dst, unsigned int src_size) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
662 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
663 unsigned i; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
664 unsigned num_pixels = src_size >> 1; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
665 |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
666 for(i=0; i<num_pixels; i++) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
667 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
668 unsigned b,g,r; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
669 register uint16_t rgb; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
670 rgb = src[2*i]; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
671 r = rgb&0x1F; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
672 g = (rgb&0x3E0)>>5; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
673 b = (rgb&0x7C00)>>10; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
674 dst[2*i] = (b&0x1F) | ((g&0x3F)<<5) | ((r&0x1F)<<11); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
675 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
676 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
677 |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
678 void rgb15tobgr15(const uint8_t *src, uint8_t *dst, unsigned int src_size) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
679 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
680 unsigned i; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
681 unsigned num_pixels = src_size >> 1; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
682 |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
683 for(i=0; i<num_pixels; i++) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
684 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
685 unsigned b,g,r; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
686 register uint16_t rgb; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
687 rgb = src[2*i]; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
688 r = rgb&0x1F; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
689 g = (rgb&0x3E0)>>5; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
690 b = (rgb&0x7C00)>>10; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
691 dst[2*i] = (b&0x1F) | ((g&0x1F)<<5) | ((r&0x1F)<<10); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
692 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
693 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
694 |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
695 void rgb8tobgr8(const uint8_t *src, uint8_t *dst, unsigned int src_size) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
696 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
697 unsigned i; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
698 unsigned num_pixels = src_size; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
699 for(i=0; i<num_pixels; i++) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
700 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
701 unsigned b,g,r; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
702 register uint8_t rgb; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
703 rgb = src[i]; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
704 r = (rgb&0x07); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
705 g = (rgb&0x38)>>3; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
706 b = (rgb&0xC0)>>6; |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
707 dst[i] = ((b<<1)&0x07) | ((g&0x07)<<3) | ((r&0x03)<<6); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
708 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
709 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
710 |
2702 | 711 /** |
712 * | |
2724 | 713 * height should be a multiple of 2 and width should be a multiple of 16 (if this is a |
714 * problem for anyone then tell me, and ill fix it) | |
2702 | 715 */ |
2723 | 716 void yv12toyuy2(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, |
2725 | 717 unsigned int width, unsigned int height, |
718 unsigned int lumStride, unsigned int chromStride, unsigned int dstStride) | |
2701 | 719 { |
3132 | 720 #ifdef CAN_COMPILE_X86_ASM |
721 // ordered per speed fasterst first | |
722 if(gCpuCaps.hasMMX2) | |
723 yv12toyuy2_MMX2(ysrc, usrc, vsrc, dst, width, height, lumStride, chromStride, dstStride); | |
724 else if(gCpuCaps.has3DNow) | |
725 yv12toyuy2_3DNow(ysrc, usrc, vsrc, dst, width, height, lumStride, chromStride, dstStride); | |
726 else if(gCpuCaps.hasMMX) | |
727 yv12toyuy2_MMX(ysrc, usrc, vsrc, dst, width, height, lumStride, chromStride, dstStride); | |
728 else | |
6492 | 729 #endif |
3132 | 730 yv12toyuy2_C(ysrc, usrc, vsrc, dst, width, height, lumStride, chromStride, dstStride); |
2701 | 731 } |
732 | |
2724 | 733 /** |
734 * | |
5588 | 735 * width should be a multiple of 16 |
736 */ | |
737 void yuv422ptoyuy2(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, | |
738 unsigned int width, unsigned int height, | |
739 unsigned int lumStride, unsigned int chromStride, unsigned int dstStride) | |
740 { | |
741 #ifdef CAN_COMPILE_X86_ASM | |
742 // ordered per speed fasterst first | |
743 if(gCpuCaps.hasMMX2) | |
744 yuv422ptoyuy2_MMX2(ysrc, usrc, vsrc, dst, width, height, lumStride, chromStride, dstStride); | |
745 else if(gCpuCaps.has3DNow) | |
746 yuv422ptoyuy2_3DNow(ysrc, usrc, vsrc, dst, width, height, lumStride, chromStride, dstStride); | |
747 else if(gCpuCaps.hasMMX) | |
748 yuv422ptoyuy2_MMX(ysrc, usrc, vsrc, dst, width, height, lumStride, chromStride, dstStride); | |
749 else | |
6492 | 750 #endif |
5588 | 751 yuv422ptoyuy2_C(ysrc, usrc, vsrc, dst, width, height, lumStride, chromStride, dstStride); |
752 } | |
753 | |
754 /** | |
755 * | |
2724 | 756 * height should be a multiple of 2 and width should be a multiple of 16 (if this is a |
757 * problem for anyone then tell me, and ill fix it) | |
758 */ | |
759 void yuy2toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, | |
2725 | 760 unsigned int width, unsigned int height, |
761 unsigned int lumStride, unsigned int chromStride, unsigned int srcStride) | |
2701 | 762 { |
3132 | 763 #ifdef CAN_COMPILE_X86_ASM |
764 // ordered per speed fasterst first | |
765 if(gCpuCaps.hasMMX2) | |
766 yuy2toyv12_MMX2(src, ydst, udst, vdst, width, height, lumStride, chromStride, srcStride); | |
767 else if(gCpuCaps.has3DNow) | |
768 yuy2toyv12_3DNow(src, ydst, udst, vdst, width, height, lumStride, chromStride, srcStride); | |
769 else if(gCpuCaps.hasMMX) | |
770 yuy2toyv12_MMX(src, ydst, udst, vdst, width, height, lumStride, chromStride, srcStride); | |
771 else | |
6492 | 772 #endif |
3132 | 773 yuy2toyv12_C(src, ydst, udst, vdst, width, height, lumStride, chromStride, srcStride); |
2723 | 774 } |
2801 | 775 |
776 /** | |
777 * | |
778 * height should be a multiple of 2 and width should be a multiple of 16 (if this is a | |
779 * problem for anyone then tell me, and ill fix it) | |
3132 | 780 * chrominance data is only taken from every secound line others are ignored FIXME write HQ version |
2801 | 781 */ |
782 void uyvytoyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, | |
783 unsigned int width, unsigned int height, | |
784 unsigned int lumStride, unsigned int chromStride, unsigned int srcStride) | |
785 { | |
3132 | 786 #ifdef CAN_COMPILE_X86_ASM |
787 // ordered per speed fasterst first | |
788 if(gCpuCaps.hasMMX2) | |
789 uyvytoyv12_MMX2(src, ydst, udst, vdst, width, height, lumStride, chromStride, srcStride); | |
790 else if(gCpuCaps.has3DNow) | |
791 uyvytoyv12_3DNow(src, ydst, udst, vdst, width, height, lumStride, chromStride, srcStride); | |
792 else if(gCpuCaps.hasMMX) | |
793 uyvytoyv12_MMX(src, ydst, udst, vdst, width, height, lumStride, chromStride, srcStride); | |
794 else | |
795 uyvytoyv12_C(src, ydst, udst, vdst, width, height, lumStride, chromStride, srcStride); | |
2847 | 796 #else |
3132 | 797 uyvytoyv12_C(src, ydst, udst, vdst, width, height, lumStride, chromStride, srcStride); |
2847 | 798 #endif |
2801 | 799 } |
800 | |
6484
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
801 void yvu9toyv12(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
802 uint8_t *ydst, uint8_t *udst, uint8_t *vdst, |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
803 unsigned int width, unsigned int height, |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
804 unsigned int lumStride, unsigned int chromStride) |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
805 { |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
806 #ifdef CAN_COMPILE_X86_ASM |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
807 // ordered per speed fasterst first |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
808 if(gCpuCaps.hasMMX2) |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
809 yvu9toyv12_MMX2(ysrc, usrc, vsrc, ydst, udst, vdst, width, height, lumStride, chromStride); |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
810 else if(gCpuCaps.has3DNow) |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
811 yvu9toyv12_3DNow(ysrc, usrc, vsrc, ydst, udst, vdst, width, height, lumStride, chromStride); |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
812 else if(gCpuCaps.hasMMX) |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
813 yvu9toyv12_MMX(ysrc, usrc, vsrc, ydst, udst, vdst, width, height, lumStride, chromStride); |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
814 else |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
815 yvu9toyv12_C(ysrc, usrc, vsrc, ydst, udst, vdst, width, height, lumStride, chromStride); |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
816 #else |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
817 yvu9toyv12_C(ysrc, usrc, vsrc, ydst, udst, vdst, width, height, lumStride, chromStride); |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
818 #endif |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
819 } |
c5cf988c6d6f
pre-yvu9toyv12 converter, only grayscale Y-plane coping :)
alex
parents:
5588
diff
changeset
|
820 |
6582
f98313dcd428
yvu9 -> yv12 unscaled converter with linear chroma scaling
michael
parents:
6492
diff
changeset
|
821 void planar2x(const uint8_t *src, uint8_t *dst, int width, int height, int srcStride, int dstStride) |
f98313dcd428
yvu9 -> yv12 unscaled converter with linear chroma scaling
michael
parents:
6492
diff
changeset
|
822 { |
f98313dcd428
yvu9 -> yv12 unscaled converter with linear chroma scaling
michael
parents:
6492
diff
changeset
|
823 #ifdef CAN_COMPILE_X86_ASM |
f98313dcd428
yvu9 -> yv12 unscaled converter with linear chroma scaling
michael
parents:
6492
diff
changeset
|
824 // ordered per speed fasterst first |
f98313dcd428
yvu9 -> yv12 unscaled converter with linear chroma scaling
michael
parents:
6492
diff
changeset
|
825 if(gCpuCaps.hasMMX2) |
f98313dcd428
yvu9 -> yv12 unscaled converter with linear chroma scaling
michael
parents:
6492
diff
changeset
|
826 planar2x_MMX2(src, dst, width, height, srcStride, dstStride); |
f98313dcd428
yvu9 -> yv12 unscaled converter with linear chroma scaling
michael
parents:
6492
diff
changeset
|
827 else if(gCpuCaps.has3DNow) |
f98313dcd428
yvu9 -> yv12 unscaled converter with linear chroma scaling
michael
parents:
6492
diff
changeset
|
828 planar2x_3DNow(src, dst, width, height, srcStride, dstStride); |
f98313dcd428
yvu9 -> yv12 unscaled converter with linear chroma scaling
michael
parents:
6492
diff
changeset
|
829 else |
f98313dcd428
yvu9 -> yv12 unscaled converter with linear chroma scaling
michael
parents:
6492
diff
changeset
|
830 #endif |
f98313dcd428
yvu9 -> yv12 unscaled converter with linear chroma scaling
michael
parents:
6492
diff
changeset
|
831 planar2x_C(src, dst, width, height, srcStride, dstStride); |
f98313dcd428
yvu9 -> yv12 unscaled converter with linear chroma scaling
michael
parents:
6492
diff
changeset
|
832 } |
f98313dcd428
yvu9 -> yv12 unscaled converter with linear chroma scaling
michael
parents:
6492
diff
changeset
|
833 |
3132 | 834 /** |
835 * | |
836 * height should be a multiple of 2 and width should be a multiple of 2 (if this is a | |
837 * problem for anyone then tell me, and ill fix it) | |
838 * chrominance data is only taken from every secound line others are ignored FIXME write HQ version | |
839 */ | |
840 void rgb24toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, | |
841 unsigned int width, unsigned int height, | |
842 unsigned int lumStride, unsigned int chromStride, unsigned int srcStride) | |
843 { | |
844 #ifdef CAN_COMPILE_X86_ASM | |
845 // ordered per speed fasterst first | |
846 if(gCpuCaps.hasMMX2) | |
847 rgb24toyv12_MMX2(src, ydst, udst, vdst, width, height, lumStride, chromStride, srcStride); | |
848 else if(gCpuCaps.has3DNow) | |
849 rgb24toyv12_3DNow(src, ydst, udst, vdst, width, height, lumStride, chromStride, srcStride); | |
850 else if(gCpuCaps.hasMMX) | |
851 rgb24toyv12_MMX(src, ydst, udst, vdst, width, height, lumStride, chromStride, srcStride); | |
852 else | |
6492 | 853 #endif |
3132 | 854 rgb24toyv12_C(src, ydst, udst, vdst, width, height, lumStride, chromStride, srcStride); |
855 } | |
5337 | 856 |
857 void interleaveBytes(uint8_t *src1, uint8_t *src2, uint8_t *dst, | |
6492 | 858 unsigned width, unsigned height, unsigned src1Stride, |
859 unsigned src2Stride, unsigned dstStride) | |
5337 | 860 { |
861 #ifdef CAN_COMPILE_X86_ASM | |
862 // ordered per speed fasterst first | |
863 if(gCpuCaps.hasMMX2) | |
864 interleaveBytes_MMX2(src1, src2, dst, width, height, src1Stride, src2Stride, dstStride); | |
865 else if(gCpuCaps.has3DNow) | |
866 interleaveBytes_3DNow(src1, src2, dst, width, height, src1Stride, src2Stride, dstStride); | |
867 else if(gCpuCaps.hasMMX) | |
868 interleaveBytes_MMX(src1, src2, dst, width, height, src1Stride, src2Stride, dstStride); | |
869 else | |
6492 | 870 #endif |
5337 | 871 interleaveBytes_C(src1, src2, dst, width, height, src1Stride, src2Stride, dstStride); |
872 } | |
6606
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
873 |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
874 void vu9_to_vu12(const uint8_t *src1, const uint8_t *src2, |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
875 uint8_t *dst1, uint8_t *dst2, |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
876 unsigned width, unsigned height, |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
877 unsigned srcStride1, unsigned srcStride2, |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
878 unsigned dstStride1, unsigned dstStride2) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
879 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
880 #ifdef CAN_COMPILE_X86_ASM |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
881 if(gCpuCaps.hasMMX2) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
882 vu9_to_vu12_MMX2(src1, src2, dst1, dst2, width, height, srcStride1, srcStride2, dstStride1, dstStride2); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
883 else if(gCpuCaps.has3DNow) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
884 vu9_to_vu12_3DNow(src1, src2, dst1, dst2, width, height, srcStride1, srcStride2, dstStride1, dstStride2); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
885 else if(gCpuCaps.hasMMX) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
886 vu9_to_vu12_MMX(src1, src2, dst1, dst2, width, height, srcStride1, srcStride2, dstStride1, dstStride2); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
887 else |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
888 #endif |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
889 vu9_to_vu12_C(src1, src2, dst1, dst2, width, height, srcStride1, srcStride2, dstStride1, dstStride2); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
890 } |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
891 |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
892 void yvu9_to_yuy2(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
893 uint8_t *dst, |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
894 unsigned width, unsigned height, |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
895 unsigned srcStride1, unsigned srcStride2, |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
896 unsigned srcStride3, unsigned dstStride) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
897 { |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
898 #ifdef CAN_COMPILE_X86_ASM |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
899 if(gCpuCaps.hasMMX2) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
900 yvu9_to_yuy2_MMX2(src1, src2, src3, dst, width, height, srcStride1, srcStride2, srcStride3, dstStride); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
901 else if(gCpuCaps.has3DNow) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
902 yvu9_to_yuy2_3DNow(src1, src2, src3, dst, width, height, srcStride1, srcStride2, srcStride3, dstStride); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
903 else if(gCpuCaps.hasMMX) |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
904 yvu9_to_yuy2_MMX(src1, src2, src3, dst, width, height, srcStride1, srcStride2, srcStride3, dstStride); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
905 else |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
906 #endif |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
907 yvu9_to_yuy2_C(src1, src2, src3, dst, width, height, srcStride1, srcStride2, srcStride3, dstStride); |
50b5d8367318
merging changes from mplayerxp (rgb2rgb*.{c,h} only)
michael
parents:
6582
diff
changeset
|
908 } |