comparison libswscale/yuv2rgb_template.c @ 25882:2ad528dd42a0

Make some assembler constants global instead of declaring them multiple times.
author reimar
date Tue, 29 Jan 2008 14:58:10 +0000
parents 00966f09c33b
children afd429e00184
comparison
equal deleted inserted replaced
25881:c6f535c5f65b 25882:2ad528dd42a0
336 //".balign 16 \n\t" 336 //".balign 16 \n\t"
337 "1: \n\t" 337 "1: \n\t"
338 YUV2RGB 338 YUV2RGB
339 /* mm0=B, %%mm2=G, %%mm1=R */ 339 /* mm0=B, %%mm2=G, %%mm1=R */
340 #ifdef HAVE_MMX2 340 #ifdef HAVE_MMX2
341 "movq "MANGLE(M24A)", %%mm4 \n\t" 341 "movq "MANGLE(ff_M24A)", %%mm4 \n\t"
342 "movq "MANGLE(M24C)", %%mm7 \n\t" 342 "movq "MANGLE(ff_M24C)", %%mm7 \n\t"
343 "pshufw $0x50, %%mm0, %%mm5 \n\t" /* B3 B2 B3 B2 B1 B0 B1 B0 */ 343 "pshufw $0x50, %%mm0, %%mm5 \n\t" /* B3 B2 B3 B2 B1 B0 B1 B0 */
344 "pshufw $0x50, %%mm2, %%mm3 \n\t" /* G3 G2 G3 G2 G1 G0 G1 G0 */ 344 "pshufw $0x50, %%mm2, %%mm3 \n\t" /* G3 G2 G3 G2 G1 G0 G1 G0 */
345 "pshufw $0x00, %%mm1, %%mm6 \n\t" /* R1 R0 R1 R0 R1 R0 R1 R0 */ 345 "pshufw $0x00, %%mm1, %%mm6 \n\t" /* R1 R0 R1 R0 R1 R0 R1 R0 */
346 346
347 "pand %%mm4, %%mm5 \n\t" /* B2 B1 B0 */ 347 "pand %%mm4, %%mm5 \n\t" /* B2 B1 B0 */
356 "psrlq $8, %%mm2 \n\t" /* 00 G7 G6 G5 G4 G3 G2 G1 */ 356 "psrlq $8, %%mm2 \n\t" /* 00 G7 G6 G5 G4 G3 G2 G1 */
357 "pshufw $0xA5, %%mm0, %%mm5 \n\t" /* B5 B4 B5 B4 B3 B2 B3 B2 */ 357 "pshufw $0xA5, %%mm0, %%mm5 \n\t" /* B5 B4 B5 B4 B3 B2 B3 B2 */
358 "pshufw $0x55, %%mm2, %%mm3 \n\t" /* G4 G3 G4 G3 G4 G3 G4 G3 */ 358 "pshufw $0x55, %%mm2, %%mm3 \n\t" /* G4 G3 G4 G3 G4 G3 G4 G3 */
359 "pshufw $0xA5, %%mm1, %%mm6 \n\t" /* R5 R4 R5 R4 R3 R2 R3 R2 */ 359 "pshufw $0xA5, %%mm1, %%mm6 \n\t" /* R5 R4 R5 R4 R3 R2 R3 R2 */
360 360
361 "pand "MANGLE(M24B)", %%mm5 \n\t" /* B5 B4 B3 */ 361 "pand "MANGLE(ff_M24B)", %%mm5 \n\t" /* B5 B4 B3 */
362 "pand %%mm7, %%mm3 \n\t" /* G4 G3 */ 362 "pand %%mm7, %%mm3 \n\t" /* G4 G3 */
363 "pand %%mm4, %%mm6 \n\t" /* R4 R3 R2 */ 363 "pand %%mm4, %%mm6 \n\t" /* R4 R3 R2 */
364 364
365 "por %%mm5, %%mm3 \n\t" /* B5 G4 B4 G3 B3 */ 365 "por %%mm5, %%mm3 \n\t" /* B5 G4 B4 G3 B3 */
366 "por %%mm3, %%mm6 \n\t" 366 "por %%mm3, %%mm6 \n\t"
371 "pshufw $0xFA, %%mm1, %%mm6 \n\t" /* R7 R6 R7 R6 R5 R4 R5 R4 */ 371 "pshufw $0xFA, %%mm1, %%mm6 \n\t" /* R7 R6 R7 R6 R5 R4 R5 R4 */
372 "movd 4 (%2, %0), %%mm0;" /* Load 4 Cb 00 00 00 00 u3 u2 u1 u0 */ 372 "movd 4 (%2, %0), %%mm0;" /* Load 4 Cb 00 00 00 00 u3 u2 u1 u0 */
373 373
374 "pand %%mm7, %%mm5 \n\t" /* B7 B6 */ 374 "pand %%mm7, %%mm5 \n\t" /* B7 B6 */
375 "pand %%mm4, %%mm3 \n\t" /* G7 G6 G5 */ 375 "pand %%mm4, %%mm3 \n\t" /* G7 G6 G5 */
376 "pand "MANGLE(M24B)", %%mm6 \n\t" /* R7 R6 R5 */ 376 "pand "MANGLE(ff_M24B)", %%mm6 \n\t" /* R7 R6 R5 */
377 "movd 4 (%3, %0), %%mm1;" /* Load 4 Cr 00 00 00 00 v3 v2 v1 v0 */ 377 "movd 4 (%3, %0), %%mm1;" /* Load 4 Cr 00 00 00 00 v3 v2 v1 v0 */
378 \ 378 \
379 "por %%mm5, %%mm3 \n\t" 379 "por %%mm5, %%mm3 \n\t"
380 "por %%mm3, %%mm6 \n\t" 380 "por %%mm3, %%mm6 \n\t"
381 MOVNTQ" %%mm6, 16(%1) \n\t" 381 MOVNTQ" %%mm6, 16(%1) \n\t"