mirror of
https://github.com/mpv-player/mpv
synced 2025-03-01 03:40:43 +00:00
Fix AMD64 support, patch by Reimar Doffinger
Original thread: subject: Re: [MEncoder-users] pullup filter segfaults on amd66 date: Nov 13, 2006 4:07 PM git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20977 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
01f5f994af
commit
1fcaa00c85
@ -5,6 +5,7 @@
|
||||
#include <string.h>
|
||||
#include "pullup.h"
|
||||
#include "config.h"
|
||||
#include "cpudetect.h"
|
||||
|
||||
|
||||
|
||||
@ -20,11 +21,11 @@ static int diff_y_mmx(unsigned char *a, unsigned char *b, int s)
|
||||
|
||||
"1: \n\t"
|
||||
|
||||
"movq (%%esi), %%mm0 \n\t"
|
||||
"movq (%%esi), %%mm2 \n\t"
|
||||
"addl %%eax, %%esi \n\t"
|
||||
"movq (%%edi), %%mm1 \n\t"
|
||||
"addl %%eax, %%edi \n\t"
|
||||
"movq (%%"REG_S"), %%mm0 \n\t"
|
||||
"movq (%%"REG_S"), %%mm2 \n\t"
|
||||
"add %%"REG_a", %%"REG_S" \n\t"
|
||||
"movq (%%"REG_D"), %%mm1 \n\t"
|
||||
"add %%"REG_a", %%"REG_D" \n\t"
|
||||
"psubusb %%mm1, %%mm2 \n\t"
|
||||
"psubusb %%mm0, %%mm1 \n\t"
|
||||
"movq %%mm2, %%mm0 \n\t"
|
||||
@ -64,14 +65,14 @@ static int licomb_y_mmx(unsigned char *a, unsigned char *b, int s)
|
||||
"movl $4, %%ecx \n\t"
|
||||
"pxor %%mm6, %%mm6 \n\t"
|
||||
"pxor %%mm7, %%mm7 \n\t"
|
||||
"subl %%eax, %%edi \n\t"
|
||||
"sub %%"REG_a", %%"REG_D" \n\t"
|
||||
|
||||
"2: \n\t"
|
||||
|
||||
"movq (%%esi), %%mm0 \n\t"
|
||||
"movq (%%edi), %%mm1 \n\t"
|
||||
"movq (%%"REG_D"), %%mm0 \n\t"
|
||||
"movq (%%"REG_D"), %%mm1 \n\t"
|
||||
"punpcklbw %%mm7, %%mm0 \n\t"
|
||||
"movq (%%edi,%%eax), %%mm2 \n\t"
|
||||
"movq (%%"REG_D",%%"REG_a"), %%mm2 \n\t"
|
||||
"punpcklbw %%mm7, %%mm1 \n\t"
|
||||
"punpcklbw %%mm7, %%mm2 \n\t"
|
||||
"paddw %%mm0, %%mm0 \n\t"
|
||||
@ -82,10 +83,10 @@ static int licomb_y_mmx(unsigned char *a, unsigned char *b, int s)
|
||||
"paddw %%mm0, %%mm6 \n\t"
|
||||
"paddw %%mm1, %%mm6 \n\t"
|
||||
|
||||
"movq (%%esi), %%mm0 \n\t"
|
||||
"movq (%%edi), %%mm1 \n\t"
|
||||
"movq (%%"REG_S"), %%mm0 \n\t"
|
||||
"movq (%%"REG_D"), %%mm1 \n\t"
|
||||
"punpckhbw %%mm7, %%mm0 \n\t"
|
||||
"movq (%%edi,%%eax), %%mm2 \n\t"
|
||||
"movq (%%"REG_D",%%"REG_a"), %%mm2 \n\t"
|
||||
"punpckhbw %%mm7, %%mm1 \n\t"
|
||||
"punpckhbw %%mm7, %%mm2 \n\t"
|
||||
"paddw %%mm0, %%mm0 \n\t"
|
||||
@ -96,10 +97,10 @@ static int licomb_y_mmx(unsigned char *a, unsigned char *b, int s)
|
||||
"paddw %%mm0, %%mm6 \n\t"
|
||||
"paddw %%mm1, %%mm6 \n\t"
|
||||
|
||||
"movq (%%edi,%%eax), %%mm0 \n\t"
|
||||
"movq (%%esi), %%mm1 \n\t"
|
||||
"movq (%%"REG_D",%%"REG_a"), %%mm0 \n\t"
|
||||
"movq (%%"REG_S"), %%mm1 \n\t"
|
||||
"punpcklbw %%mm7, %%mm0 \n\t"
|
||||
"movq (%%esi,%%eax), %%mm2 \n\t"
|
||||
"movq (%%"REG_S",%%"REG_a"), %%mm2 \n\t"
|
||||
"punpcklbw %%mm7, %%mm1 \n\t"
|
||||
"punpcklbw %%mm7, %%mm2 \n\t"
|
||||
"paddw %%mm0, %%mm0 \n\t"
|
||||
@ -110,10 +111,10 @@ static int licomb_y_mmx(unsigned char *a, unsigned char *b, int s)
|
||||
"paddw %%mm0, %%mm6 \n\t"
|
||||
"paddw %%mm1, %%mm6 \n\t"
|
||||
|
||||
"movq (%%edi,%%eax), %%mm0 \n\t"
|
||||
"movq (%%esi), %%mm1 \n\t"
|
||||
"movq (%%"REG_D",%%"REG_a"), %%mm0 \n\t"
|
||||
"movq (%%"REG_S"), %%mm1 \n\t"
|
||||
"punpckhbw %%mm7, %%mm0 \n\t"
|
||||
"movq (%%esi,%%eax), %%mm2 \n\t"
|
||||
"movq (%%"REG_S",%%"REG_a"), %%mm2 \n\t"
|
||||
"punpckhbw %%mm7, %%mm1 \n\t"
|
||||
"punpckhbw %%mm7, %%mm2 \n\t"
|
||||
"paddw %%mm0, %%mm0 \n\t"
|
||||
@ -124,8 +125,8 @@ static int licomb_y_mmx(unsigned char *a, unsigned char *b, int s)
|
||||
"paddw %%mm0, %%mm6 \n\t"
|
||||
"paddw %%mm1, %%mm6 \n\t"
|
||||
|
||||
"addl %%eax, %%esi \n\t"
|
||||
"addl %%eax, %%edi \n\t"
|
||||
"add %%"REG_a", %%"REG_S" \n\t"
|
||||
"add %%"REG_a", %%"REG_D" \n\t"
|
||||
"decl %%ecx \n\t"
|
||||
"jnz 2b \n\t"
|
||||
|
||||
@ -156,10 +157,10 @@ static int var_y_mmx(unsigned char *a, unsigned char *b, int s)
|
||||
|
||||
"1: \n\t"
|
||||
|
||||
"movq (%%esi), %%mm0 \n\t"
|
||||
"movq (%%esi), %%mm2 \n\t"
|
||||
"movq (%%esi,%%eax), %%mm1 \n\t"
|
||||
"addl %%eax, %%esi \n\t"
|
||||
"movq (%%"REG_S"), %%mm0 \n\t"
|
||||
"movq (%%"REG_S"), %%mm2 \n\t"
|
||||
"movq (%%"REG_S",%%"REG_a"), %%mm1 \n\t"
|
||||
"add %%"REG_a", %%"REG_S" \n\t"
|
||||
"psubusb %%mm1, %%mm2 \n\t"
|
||||
"psubusb %%mm0, %%mm1 \n\t"
|
||||
"movq %%mm2, %%mm0 \n\t"
|
||||
|
Loading…
Reference in New Issue
Block a user