114 lines
7.3 KiB
Plaintext
114 lines
7.3 KiB
Plaintext
$OpenBSD: patch-mpeg2_video_yuv2rgb_mmx_c,v 1.1.1.1 2001/10/14 15:35:04 espie Exp $
|
|
--- mpeg2_video/yuv2rgb_mmx.c.orig Sat Oct 13 14:57:08 2001
|
|
+++ mpeg2_video/yuv2rgb_mmx.c Sat Oct 13 14:58:00 2001
|
|
@@ -73,23 +73,23 @@ void YUV2RGB420_MMX_16(uint8_t *out,
|
|
"movd (%0), %%mm1\n" // 4 Cr 0 0 0 0 v3 v2 v1 v0
|
|
"punpcklbw %%mm7, %%mm0\n" // 4 W cb 0 u3 0 u2 0 u1 0 u0
|
|
"punpcklbw %%mm7, %%mm1\n" // 4 W cr 0 v3 0 v2 0 v1 0 v0
|
|
- "psubw MMX_80w, %%mm0\n"
|
|
- "psubw MMX_80w, %%mm1\n"
|
|
+ "psubw _MMX_80w, %%mm0\n"
|
|
+ "psubw _MMX_80w, %%mm1\n"
|
|
"movq %%mm0, %%mm2\n" // Cb 0 u3 0 u2 0 u1 0 u0
|
|
"movq %%mm1, %%mm3\n" // Cr
|
|
- "pmullw MMX_Ugrncoeff, %%mm2\n" // Cb2green 0 R3 0 R2 0 R1 0 R0
|
|
+ "pmullw _MMX_Ugrncoeff, %%mm2\n" // Cb2green 0 R3 0 R2 0 R1 0 R0
|
|
"movq (%2), %%mm6\n" // L1 l7 L6 L5 L4 L3 L2 L1 L0
|
|
- "pmullw MMX_Ublucoeff, %%mm0\n" // Cb2blue
|
|
- "pand MMX_00FFw, %%mm6\n" // L1 00 L6 00 L4 00 L2 00 L0
|
|
- "pmullw MMX_Vgrncoeff, %%mm3\n" // Cr2green
|
|
+ "pmullw _MMX_Ublucoeff, %%mm0\n" // Cb2blue
|
|
+ "pand _MMX_00FFw, %%mm6\n" // L1 00 L6 00 L4 00 L2 00 L0
|
|
+ "pmullw _MMX_Vgrncoeff, %%mm3\n" // Cr2green
|
|
"movq (%2), %%mm7\n" // L2
|
|
- "pmullw MMX_Vredcoeff, %%mm1\n" // Cr2red
|
|
+ "pmullw _MMX_Vredcoeff, %%mm1\n" // Cr2red
|
|
// "psubw MMX_10w, %%mm6\n"
|
|
"psrlw $8, %%mm7\n" // L2 00 L7 00 L5 00 L3 00 L1
|
|
- "pmullw MMX_Ycoeff, %%mm6\n" // lum1
|
|
+ "pmullw _MMX_Ycoeff, %%mm6\n" // lum1
|
|
// "psubw MMX_10w, %%mm7\n" // L2
|
|
"paddw %%mm3, %%mm2\n" // Cb2green + Cr2green == green
|
|
- "pmullw MMX_Ycoeff, %%mm7\n" // lum2
|
|
+ "pmullw _MMX_Ycoeff, %%mm7\n" // lum2
|
|
|
|
"movq %%mm6, %%mm4\n" // lum1
|
|
"paddw %%mm0, %%mm6\n" // lum1 +blue 00 B6 00 B4 00 B2 00 B0
|
|
@@ -107,11 +107,11 @@ void YUV2RGB420_MMX_16(uint8_t *out,
|
|
"punpcklbw %%mm4, %%mm4\n"
|
|
"punpcklbw %%mm5, %%mm5\n"
|
|
|
|
- "pand MMX_redmask, %%mm4\n"
|
|
+ "pand _MMX_redmask, %%mm4\n"
|
|
"psllw $3, %%mm5\n" // GREEN 1
|
|
"punpcklbw %%mm6, %%mm6\n"
|
|
- "pand MMX_grnmask, %%mm5\n"
|
|
- "pand MMX_redmask, %%mm6\n"
|
|
+ "pand _MMX_grnmask, %%mm5\n"
|
|
+ "pand _MMX_redmask, %%mm6\n"
|
|
"por %%mm5, %%mm4\n" //
|
|
"psrlw $11, %%mm6\n" // BLUE 1
|
|
"movq %%mm3, %%mm5\n" // lum2
|
|
@@ -125,17 +125,17 @@ void YUV2RGB420_MMX_16(uint8_t *out,
|
|
"packuswb %%mm3, %%mm3\n"
|
|
"packuswb %%mm5, %%mm5\n"
|
|
"packuswb %%mm7, %%mm7\n"
|
|
- "pand MMX_00FFw, %%mm6\n" // L3
|
|
+ "pand _MMX_00FFw, %%mm6\n" // L3
|
|
"punpcklbw %%mm3, %%mm3\n"
|
|
// "psubw MMX_10w, %%mm6\n" // L3
|
|
"punpcklbw %%mm5, %%mm5\n"
|
|
- "pmullw MMX_Ycoeff, %%mm6\n" // lum3
|
|
+ "pmullw _MMX_Ycoeff, %%mm6\n" // lum3
|
|
"punpcklbw %%mm7, %%mm7\n"
|
|
"psllw $3, %%mm5\n" // GREEN 2
|
|
- "pand MMX_redmask, %%mm7\n"
|
|
- "pand MMX_redmask, %%mm3\n"
|
|
+ "pand _MMX_redmask, %%mm7\n"
|
|
+ "pand _MMX_redmask, %%mm3\n"
|
|
"psrlw $11, %%mm7\n" // BLUE 2
|
|
- "pand MMX_grnmask, %%mm5\n"
|
|
+ "pand _MMX_grnmask, %%mm5\n"
|
|
"por %%mm7, %%mm3\n"
|
|
"movq (%2,%3), %%mm7\n" // L4
|
|
"por %%mm5, %%mm3\n" //
|
|
@@ -143,7 +143,7 @@ void YUV2RGB420_MMX_16(uint8_t *out,
|
|
"movq %%mm4, %%mm5\n"
|
|
// "psubw MMX_10w, %%mm7\n" // L4
|
|
"punpcklwd %%mm3, %%mm4\n"
|
|
- "pmullw MMX_Ycoeff, %%mm7\n" // lum4
|
|
+ "pmullw _MMX_Ycoeff, %%mm7\n" // lum4
|
|
"punpckhwd %%mm3, %%mm5\n"
|
|
|
|
"movq %%mm4, (%4)\n"
|
|
@@ -170,11 +170,11 @@ void YUV2RGB420_MMX_16(uint8_t *out,
|
|
"punpcklbw %%mm5, %%mm5\n"
|
|
"punpcklbw %%mm6, %%mm6\n"
|
|
"psllw $3, %%mm5\n" // GREEN 3
|
|
- "pand MMX_redmask, %%mm4\n"
|
|
+ "pand _MMX_redmask, %%mm4\n"
|
|
"psraw $6, %%mm3\n" // psr 6
|
|
"psraw $6, %%mm0\n"
|
|
- "pand MMX_redmask, %%mm6\n" // BLUE
|
|
- "pand MMX_grnmask, %%mm5\n"
|
|
+ "pand _MMX_redmask, %%mm6\n" // BLUE
|
|
+ "pand _MMX_grnmask, %%mm5\n"
|
|
"psrlw $11, %%mm6\n" // BLUE 3
|
|
"por %%mm5, %%mm4\n"
|
|
"psraw $6, %%mm7\n"
|
|
@@ -185,11 +185,11 @@ void YUV2RGB420_MMX_16(uint8_t *out,
|
|
"punpcklbw %%mm3, %%mm3\n"
|
|
"punpcklbw %%mm0, %%mm0\n"
|
|
"punpcklbw %%mm7, %%mm7\n"
|
|
- "pand MMX_redmask, %%mm3\n"
|
|
- "pand MMX_redmask, %%mm7\n" // BLUE
|
|
+ "pand _MMX_redmask, %%mm3\n"
|
|
+ "pand _MMX_redmask, %%mm7\n" // BLUE
|
|
"psllw $3, %%mm0\n" // GREEN 4
|
|
"psrlw $11, %%mm7\n"
|
|
- "pand MMX_grnmask, %%mm0\n"
|
|
+ "pand _MMX_grnmask, %%mm0\n"
|
|
"por %%mm7, %%mm3\n"
|
|
"addl $8, %6\n"
|
|
"por %%mm0, %%mm3\n"
|