From ebb00172b79f6dd61bff3bdebe9f246d034ff05c Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Tue, 23 Sep 2014 21:28:35 -0700 Subject: Xorg: add amd64 asm files --- xorg/server/module/Makefile | 13 +++++++++++++ xorg/server/module/amd64/i420_to_rgb32_amd64_sse2.asm | 18 ++++++++++++++++++ xorg/server/module/amd64/uyvy_to_rgb32_amd64_sse2.asm | 18 ++++++++++++++++++ xorg/server/module/amd64/yuy2_to_rgb32_amd64_sse2.asm | 18 ++++++++++++++++++ xorg/server/module/amd64/yv12_to_rgb32_amd64_sse2.asm | 18 ++++++++++++++++++ xorg/server/module/rdpXv.c | 12 ++++++------ 6 files changed, 91 insertions(+), 6 deletions(-) create mode 100644 xorg/server/module/amd64/i420_to_rgb32_amd64_sse2.asm create mode 100644 xorg/server/module/amd64/uyvy_to_rgb32_amd64_sse2.asm create mode 100644 xorg/server/module/amd64/yuy2_to_rgb32_amd64_sse2.asm create mode 100644 xorg/server/module/amd64/yv12_to_rgb32_amd64_sse2.asm diff --git a/xorg/server/module/Makefile b/xorg/server/module/Makefile index 49cbb3e3..329322be 100644 --- a/xorg/server/module/Makefile +++ b/xorg/server/module/Makefile @@ -9,6 +9,7 @@ rdpComposite.o rdpGlyphs.o rdpPixmap.o rdpInput.o rdpClientCon.o rdpCapture.o \ rdpTrapezoids.o rdpXv.o ;OBJS += i420_to_rgb32_x86_sse2.o yv12_to_rgb32_x86_sse2.o yuy2_to_rgb32_x86_sse2.o uyvy_to_rgb32_x86_sse2.o +;OBJS += i420_to_rgb32_amd64_sse2.o yv12_to_rgb32_amd64_sse2.o yuy2_to_rgb32_amd64_sse2.o uyvy_to_rgb32_amd64_sse2.o CFLAGS = -g -O2 -Wall -fPIC -I/usr/include/xorg -I/usr/include/pixman-1 \ -I../../../common @@ -37,3 +38,15 @@ yuy2_to_rgb32_x86_sse2.o: x86/yuy2_to_rgb32_x86_sse2.asm uyvy_to_rgb32_x86_sse2.o: x86/uyvy_to_rgb32_x86_sse2.asm yasm -f elf32 -g dwarf2 x86/uyvy_to_rgb32_x86_sse2.asm +i420_to_rgb32_amd64_sse2.o: amd64/i420_to_rgb32_amd64_sse2.asm + yasm -f elf64 -g dwarf2 amd64/i420_to_rgb32_amd64_sse2.asm + +yv12_to_rgb32_amd64_sse2.o: amd64/yv12_to_rgb32_amd64_sse2.asm + yasm -f elf64 -g dwarf2 amd64/yv12_to_rgb32_amd64_sse2.asm + +yuy2_to_rgb32_amd64_sse2.o: amd64/yuy2_to_rgb32_amd64_sse2.asm + yasm -f elf64 -g dwarf2 amd64/yuy2_to_rgb32_amd64_sse2.asm + +uyvy_to_rgb32_amd64_sse2.o: amd64/uyvy_to_rgb32_amd64_sse2.asm + yasm -f elf64 -g dwarf2 amd64/uyvy_to_rgb32_amd64_sse2.asm + diff --git a/xorg/server/module/amd64/i420_to_rgb32_amd64_sse2.asm b/xorg/server/module/amd64/i420_to_rgb32_amd64_sse2.asm new file mode 100644 index 00000000..75377edd --- /dev/null +++ b/xorg/server/module/amd64/i420_to_rgb32_amd64_sse2.asm @@ -0,0 +1,18 @@ + +%macro PROC 1 + align 16 + global %1 + %1: +%endmacro + +;int +;i420_to_rgb32_amd64_sse2(unsigned char *yuvs, int width, int height, int *rgbs) + +PROC i420_to_rgb32_amd64_sse2 + push ebx + + mov eax, 0 + pop ebx + ret + align 16 + diff --git a/xorg/server/module/amd64/uyvy_to_rgb32_amd64_sse2.asm b/xorg/server/module/amd64/uyvy_to_rgb32_amd64_sse2.asm new file mode 100644 index 00000000..cbe85bec --- /dev/null +++ b/xorg/server/module/amd64/uyvy_to_rgb32_amd64_sse2.asm @@ -0,0 +1,18 @@ + +%macro PROC 1 + align 16 + global %1 + %1: +%endmacro + +;int +;uyvy_to_rgb32_amd64_sse2(unsigned char *yuvs, int width, int height, int *rgbs) + +PROC uyvy_to_rgb32_amd64_sse2 + push ebx + + mov eax, 0 + pop ebx + ret + align 16 + diff --git a/xorg/server/module/amd64/yuy2_to_rgb32_amd64_sse2.asm b/xorg/server/module/amd64/yuy2_to_rgb32_amd64_sse2.asm new file mode 100644 index 00000000..693c364c --- /dev/null +++ b/xorg/server/module/amd64/yuy2_to_rgb32_amd64_sse2.asm @@ -0,0 +1,18 @@ + +%macro PROC 1 + align 16 + global %1 + %1: +%endmacro + +;int +;yuy2_to_rgb32_amd64_sse2(unsigned char *yuvs, int width, int height, int *rgbs) + +PROC yuy2_to_rgb32_amd64_sse2 + push ebx + + mov eax, 0 + pop ebx + ret + align 16 + diff --git a/xorg/server/module/amd64/yv12_to_rgb32_amd64_sse2.asm b/xorg/server/module/amd64/yv12_to_rgb32_amd64_sse2.asm new file mode 100644 index 00000000..7802795f --- /dev/null +++ b/xorg/server/module/amd64/yv12_to_rgb32_amd64_sse2.asm @@ -0,0 +1,18 @@ + +%macro PROC 1 + align 16 + global %1 + %1: +%endmacro + +;int +;yv12_to_rgb32_amd64_sse2(unsigned char *yuvs, int width, int height, int *rgbs) + +PROC yv12_to_rgb32_amd64_sse2 + push ebx + + mov eax, 0 + pop ebx + ret + align 16 + diff --git a/xorg/server/module/rdpXv.c b/xorg/server/module/rdpXv.c index 741766e5..3638b2ea 100644 --- a/xorg/server/module/rdpXv.c +++ b/xorg/server/module/rdpXv.c @@ -73,12 +73,12 @@ static XF86VideoFormatRec g_xrdpVidFormats[T_NUM_FORMATS] = every second pixel */ /* XVIMAGE_YV12 FOURCC_YV12 0x32315659 */ +/* XVIMAGE_I420 FOURCC_I420 0x30323449 */ /* XVIMAGE_YUY2 FOURCC_YUY2 0x32595559 */ /* XVIMAGE_UYVY FOURCC_UYVY 0x59565955 */ -/* XVIMAGE_I420 FOURCC_I420 0x30323449 */ static XF86ImageRec g_xrdpVidImages[] = -{ XVIMAGE_YV12, XVIMAGE_YUY2, XVIMAGE_UYVY, XVIMAGE_I420 }; +{ XVIMAGE_YV12, XVIMAGE_I420, XVIMAGE_YUY2, XVIMAGE_UYVY }; #define T_MAX_PORTS 1 @@ -611,19 +611,19 @@ xrdpVidQueryImageAttributes(ScrnInfoPtr pScrn, int id, #if defined(__x86_64__) || defined(__AMD64__) || defined (_M_AMD64) int -i420_to_rgb32_amd64_sse2(unsigned char *yuvs, int width, int height, int *rgbs); -int yv12_to_rgb32_amd64_sse2(unsigned char *yuvs, int width, int height, int *rgbs); int +i420_to_rgb32_amd64_sse2(unsigned char *yuvs, int width, int height, int *rgbs); +int yuy2_to_rgb32_amd64_sse2(unsigned char *yuvs, int width, int height, int *rgbs); int uyvy_to_rgb32_amd64_sse2(unsigned char *yuvs, int width, int height, int *rgbs); #elif defined(__x86__) || defined(_M_IX86) || defined(__i386__) int -i420_to_rgb32_x86_sse2(unsigned char *yuvs, int width, int height, int *rgbs); -int yv12_to_rgb32_x86_sse2(unsigned char *yuvs, int width, int height, int *rgbs); int +i420_to_rgb32_x86_sse2(unsigned char *yuvs, int width, int height, int *rgbs); +int yuy2_to_rgb32_x86_sse2(unsigned char *yuvs, int width, int height, int *rgbs); int uyvy_to_rgb32_x86_sse2(unsigned char *yuvs, int width, int height, int *rgbs); -- cgit v1.2.1