Commit ba64d3f7 authored by michael's avatar michael

.align 16


git-svn-id: file:///var/local/repositories/mplayer/trunk/postproc@2800 b3059339-0415-0410-9bf9-f77b7e298cf2
parent 0c5c0382
...@@ -585,6 +585,7 @@ void rgb32tobgr32(const uint8_t *src, uint8_t *dst, unsigned int src_size) ...@@ -585,6 +585,7 @@ void rgb32tobgr32(const uint8_t *src, uint8_t *dst, unsigned int src_size)
#ifdef HAVE_MMX #ifdef HAVE_MMX
asm volatile ( asm volatile (
"xorl %%eax, %%eax \n\t" "xorl %%eax, %%eax \n\t"
".align 16 \n\t"
"1: \n\t" "1: \n\t"
PREFETCH" 32(%0, %%eax) \n\t" PREFETCH" 32(%0, %%eax) \n\t"
"movq (%0, %%eax), %%mm0 \n\t" "movq (%0, %%eax), %%mm0 \n\t"
...@@ -635,6 +636,7 @@ void yv12toyuy2(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, u ...@@ -635,6 +636,7 @@ void yv12toyuy2(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, u
//FIXME handle 2 lines a once (fewer prefetch, reuse some chrom, but very likely limited by mem anyway) //FIXME handle 2 lines a once (fewer prefetch, reuse some chrom, but very likely limited by mem anyway)
asm volatile( asm volatile(
"xorl %%eax, %%eax \n\t" "xorl %%eax, %%eax \n\t"
".align 16 \n\t"
"1: \n\t" "1: \n\t"
PREFETCH" 32(%1, %%eax, 2) \n\t" PREFETCH" 32(%1, %%eax, 2) \n\t"
PREFETCH" 32(%2, %%eax) \n\t" PREFETCH" 32(%2, %%eax) \n\t"
...@@ -708,6 +710,7 @@ void yuy2toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, ...@@ -708,6 +710,7 @@ void yuy2toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
"xorl %%eax, %%eax \n\t" "xorl %%eax, %%eax \n\t"
"pcmpeqw %%mm7, %%mm7 \n\t" "pcmpeqw %%mm7, %%mm7 \n\t"
"psrlw $8, %%mm7 \n\t" // FF,00,FF,00... "psrlw $8, %%mm7 \n\t" // FF,00,FF,00...
".align 16 \n\t"
"1: \n\t" "1: \n\t"
PREFETCH" 64(%0, %%eax, 4) \n\t" PREFETCH" 64(%0, %%eax, 4) \n\t"
"movq (%0, %%eax, 4), %%mm0 \n\t" // YUYV YUYV(0) "movq (%0, %%eax, 4), %%mm0 \n\t" // YUYV YUYV(0)
...@@ -757,6 +760,7 @@ void yuy2toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, ...@@ -757,6 +760,7 @@ void yuy2toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
asm volatile( asm volatile(
"xorl %%eax, %%eax \n\t" "xorl %%eax, %%eax \n\t"
".align 16 \n\t"
"1: \n\t" "1: \n\t"
PREFETCH" 64(%0, %%eax, 4) \n\t" PREFETCH" 64(%0, %%eax, 4) \n\t"
"movq (%0, %%eax, 4), %%mm0 \n\t" // YUYV YUYV(0) "movq (%0, %%eax, 4), %%mm0 \n\t" // YUYV YUYV(0)
......
...@@ -585,6 +585,7 @@ void rgb32tobgr32(const uint8_t *src, uint8_t *dst, unsigned int src_size) ...@@ -585,6 +585,7 @@ void rgb32tobgr32(const uint8_t *src, uint8_t *dst, unsigned int src_size)
#ifdef HAVE_MMX #ifdef HAVE_MMX
asm volatile ( asm volatile (
"xorl %%eax, %%eax \n\t" "xorl %%eax, %%eax \n\t"
".align 16 \n\t"
"1: \n\t" "1: \n\t"
PREFETCH" 32(%0, %%eax) \n\t" PREFETCH" 32(%0, %%eax) \n\t"
"movq (%0, %%eax), %%mm0 \n\t" "movq (%0, %%eax), %%mm0 \n\t"
...@@ -635,6 +636,7 @@ void yv12toyuy2(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, u ...@@ -635,6 +636,7 @@ void yv12toyuy2(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, u
//FIXME handle 2 lines a once (fewer prefetch, reuse some chrom, but very likely limited by mem anyway) //FIXME handle 2 lines a once (fewer prefetch, reuse some chrom, but very likely limited by mem anyway)
asm volatile( asm volatile(
"xorl %%eax, %%eax \n\t" "xorl %%eax, %%eax \n\t"
".align 16 \n\t"
"1: \n\t" "1: \n\t"
PREFETCH" 32(%1, %%eax, 2) \n\t" PREFETCH" 32(%1, %%eax, 2) \n\t"
PREFETCH" 32(%2, %%eax) \n\t" PREFETCH" 32(%2, %%eax) \n\t"
...@@ -708,6 +710,7 @@ void yuy2toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, ...@@ -708,6 +710,7 @@ void yuy2toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
"xorl %%eax, %%eax \n\t" "xorl %%eax, %%eax \n\t"
"pcmpeqw %%mm7, %%mm7 \n\t" "pcmpeqw %%mm7, %%mm7 \n\t"
"psrlw $8, %%mm7 \n\t" // FF,00,FF,00... "psrlw $8, %%mm7 \n\t" // FF,00,FF,00...
".align 16 \n\t"
"1: \n\t" "1: \n\t"
PREFETCH" 64(%0, %%eax, 4) \n\t" PREFETCH" 64(%0, %%eax, 4) \n\t"
"movq (%0, %%eax, 4), %%mm0 \n\t" // YUYV YUYV(0) "movq (%0, %%eax, 4), %%mm0 \n\t" // YUYV YUYV(0)
...@@ -757,6 +760,7 @@ void yuy2toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, ...@@ -757,6 +760,7 @@ void yuy2toyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
asm volatile( asm volatile(
"xorl %%eax, %%eax \n\t" "xorl %%eax, %%eax \n\t"
".align 16 \n\t"
"1: \n\t" "1: \n\t"
PREFETCH" 64(%0, %%eax, 4) \n\t" PREFETCH" 64(%0, %%eax, 4) \n\t"
"movq (%0, %%eax, 4), %%mm0 \n\t" // YUYV YUYV(0) "movq (%0, %%eax, 4), %%mm0 \n\t" // YUYV YUYV(0)
......
...@@ -143,6 +143,7 @@ static int canMMX2BeUsed=0; ...@@ -143,6 +143,7 @@ static int canMMX2BeUsed=0;
"punpcklwd %%mm5, %%mm5 \n\t"\ "punpcklwd %%mm5, %%mm5 \n\t"\
"punpcklwd %%mm5, %%mm5 \n\t"\ "punpcklwd %%mm5, %%mm5 \n\t"\
"xorl %%eax, %%eax \n\t"\ "xorl %%eax, %%eax \n\t"\
".align 16 \n\t"\
"1: \n\t"\ "1: \n\t"\
"movq (%0, %%eax, 2), %%mm0 \n\t" /*buf0[eax]*/\ "movq (%0, %%eax, 2), %%mm0 \n\t" /*buf0[eax]*/\
"movq (%1, %%eax, 2), %%mm1 \n\t" /*buf1[eax]*/\ "movq (%1, %%eax, 2), %%mm1 \n\t" /*buf1[eax]*/\
...@@ -196,6 +197,7 @@ static int canMMX2BeUsed=0; ...@@ -196,6 +197,7 @@ static int canMMX2BeUsed=0;
"punpcklwd %%mm5, %%mm5 \n\t"\ "punpcklwd %%mm5, %%mm5 \n\t"\
"movq %%mm5, asm_uvalpha1 \n\t"\ "movq %%mm5, asm_uvalpha1 \n\t"\
"xorl %%eax, %%eax \n\t"\ "xorl %%eax, %%eax \n\t"\
".align 16 \n\t"\
"1: \n\t"\ "1: \n\t"\
"movq (%2, %%eax), %%mm2 \n\t" /* uvbuf0[eax]*/\ "movq (%2, %%eax), %%mm2 \n\t" /* uvbuf0[eax]*/\
"movq (%3, %%eax), %%mm3 \n\t" /* uvbuf1[eax]*/\ "movq (%3, %%eax), %%mm3 \n\t" /* uvbuf1[eax]*/\
...@@ -260,6 +262,7 @@ static int canMMX2BeUsed=0; ...@@ -260,6 +262,7 @@ static int canMMX2BeUsed=0;
#define YSCALEYUV2RGB1 \ #define YSCALEYUV2RGB1 \
"xorl %%eax, %%eax \n\t"\ "xorl %%eax, %%eax \n\t"\
".align 16 \n\t"\
"1: \n\t"\ "1: \n\t"\
"movq (%2, %%eax), %%mm3 \n\t" /* uvbuf0[eax]*/\ "movq (%2, %%eax), %%mm3 \n\t" /* uvbuf0[eax]*/\
"movq 4096(%2, %%eax), %%mm4 \n\t" /* uvbuf0[eax+2048]*/\ "movq 4096(%2, %%eax), %%mm4 \n\t" /* uvbuf0[eax+2048]*/\
...@@ -308,6 +311,7 @@ static int canMMX2BeUsed=0; ...@@ -308,6 +311,7 @@ static int canMMX2BeUsed=0;
// do vertical chrominance interpolation // do vertical chrominance interpolation
#define YSCALEYUV2RGB1b \ #define YSCALEYUV2RGB1b \
"xorl %%eax, %%eax \n\t"\ "xorl %%eax, %%eax \n\t"\
".align 16 \n\t"\
"1: \n\t"\ "1: \n\t"\
"movq (%2, %%eax), %%mm2 \n\t" /* uvbuf0[eax]*/\ "movq (%2, %%eax), %%mm2 \n\t" /* uvbuf0[eax]*/\
"movq (%3, %%eax), %%mm3 \n\t" /* uvbuf1[eax]*/\ "movq (%3, %%eax), %%mm3 \n\t" /* uvbuf1[eax]*/\
...@@ -1306,6 +1310,7 @@ FUNNY_Y_CODE ...@@ -1306,6 +1310,7 @@ FUNNY_Y_CODE
"xorl %%eax, %%eax \n\t" // i "xorl %%eax, %%eax \n\t" // i
"xorl %%ebx, %%ebx \n\t" // xx "xorl %%ebx, %%ebx \n\t" // xx
"xorl %%ecx, %%ecx \n\t" // 2*xalpha "xorl %%ecx, %%ecx \n\t" // 2*xalpha
".align 16 \n\t"
"1: \n\t" "1: \n\t"
"movzbl (%0, %%ebx), %%edi \n\t" //src[xx] "movzbl (%0, %%ebx), %%edi \n\t" //src[xx]
"movzbl 1(%0, %%ebx), %%esi \n\t" //src[xx+1] "movzbl 1(%0, %%ebx), %%esi \n\t" //src[xx+1]
...@@ -1437,6 +1442,7 @@ FUNNYUVCODE ...@@ -1437,6 +1442,7 @@ FUNNYUVCODE
"xorl %%eax, %%eax \n\t" // i "xorl %%eax, %%eax \n\t" // i
"xorl %%ebx, %%ebx \n\t" // xx "xorl %%ebx, %%ebx \n\t" // xx
"xorl %%ecx, %%ecx \n\t" // 2*xalpha "xorl %%ecx, %%ecx \n\t" // 2*xalpha
".align 16 \n\t"
"1: \n\t" "1: \n\t"
"movl %0, %%esi \n\t" "movl %0, %%esi \n\t"
"movzbl (%%esi, %%ebx), %%edi \n\t" //src[xx] "movzbl (%%esi, %%ebx), %%edi \n\t" //src[xx]
......
...@@ -143,6 +143,7 @@ static int canMMX2BeUsed=0; ...@@ -143,6 +143,7 @@ static int canMMX2BeUsed=0;
"punpcklwd %%mm5, %%mm5 \n\t"\ "punpcklwd %%mm5, %%mm5 \n\t"\
"punpcklwd %%mm5, %%mm5 \n\t"\ "punpcklwd %%mm5, %%mm5 \n\t"\
"xorl %%eax, %%eax \n\t"\ "xorl %%eax, %%eax \n\t"\
".align 16 \n\t"\
"1: \n\t"\ "1: \n\t"\
"movq (%0, %%eax, 2), %%mm0 \n\t" /*buf0[eax]*/\ "movq (%0, %%eax, 2), %%mm0 \n\t" /*buf0[eax]*/\
"movq (%1, %%eax, 2), %%mm1 \n\t" /*buf1[eax]*/\ "movq (%1, %%eax, 2), %%mm1 \n\t" /*buf1[eax]*/\
...@@ -196,6 +197,7 @@ static int canMMX2BeUsed=0; ...@@ -196,6 +197,7 @@ static int canMMX2BeUsed=0;
"punpcklwd %%mm5, %%mm5 \n\t"\ "punpcklwd %%mm5, %%mm5 \n\t"\
"movq %%mm5, asm_uvalpha1 \n\t"\ "movq %%mm5, asm_uvalpha1 \n\t"\
"xorl %%eax, %%eax \n\t"\ "xorl %%eax, %%eax \n\t"\
".align 16 \n\t"\
"1: \n\t"\ "1: \n\t"\
"movq (%2, %%eax), %%mm2 \n\t" /* uvbuf0[eax]*/\ "movq (%2, %%eax), %%mm2 \n\t" /* uvbuf0[eax]*/\
"movq (%3, %%eax), %%mm3 \n\t" /* uvbuf1[eax]*/\ "movq (%3, %%eax), %%mm3 \n\t" /* uvbuf1[eax]*/\
...@@ -260,6 +262,7 @@ static int canMMX2BeUsed=0; ...@@ -260,6 +262,7 @@ static int canMMX2BeUsed=0;
#define YSCALEYUV2RGB1 \ #define YSCALEYUV2RGB1 \
"xorl %%eax, %%eax \n\t"\ "xorl %%eax, %%eax \n\t"\
".align 16 \n\t"\
"1: \n\t"\ "1: \n\t"\
"movq (%2, %%eax), %%mm3 \n\t" /* uvbuf0[eax]*/\ "movq (%2, %%eax), %%mm3 \n\t" /* uvbuf0[eax]*/\
"movq 4096(%2, %%eax), %%mm4 \n\t" /* uvbuf0[eax+2048]*/\ "movq 4096(%2, %%eax), %%mm4 \n\t" /* uvbuf0[eax+2048]*/\
...@@ -308,6 +311,7 @@ static int canMMX2BeUsed=0; ...@@ -308,6 +311,7 @@ static int canMMX2BeUsed=0;
// do vertical chrominance interpolation // do vertical chrominance interpolation
#define YSCALEYUV2RGB1b \ #define YSCALEYUV2RGB1b \
"xorl %%eax, %%eax \n\t"\ "xorl %%eax, %%eax \n\t"\
".align 16 \n\t"\
"1: \n\t"\ "1: \n\t"\
"movq (%2, %%eax), %%mm2 \n\t" /* uvbuf0[eax]*/\ "movq (%2, %%eax), %%mm2 \n\t" /* uvbuf0[eax]*/\
"movq (%3, %%eax), %%mm3 \n\t" /* uvbuf1[eax]*/\ "movq (%3, %%eax), %%mm3 \n\t" /* uvbuf1[eax]*/\
...@@ -1306,6 +1310,7 @@ FUNNY_Y_CODE ...@@ -1306,6 +1310,7 @@ FUNNY_Y_CODE
"xorl %%eax, %%eax \n\t" // i "xorl %%eax, %%eax \n\t" // i
"xorl %%ebx, %%ebx \n\t" // xx "xorl %%ebx, %%ebx \n\t" // xx
"xorl %%ecx, %%ecx \n\t" // 2*xalpha "xorl %%ecx, %%ecx \n\t" // 2*xalpha
".align 16 \n\t"
"1: \n\t" "1: \n\t"
"movzbl (%0, %%ebx), %%edi \n\t" //src[xx] "movzbl (%0, %%ebx), %%edi \n\t" //src[xx]
"movzbl 1(%0, %%ebx), %%esi \n\t" //src[xx+1] "movzbl 1(%0, %%ebx), %%esi \n\t" //src[xx+1]
...@@ -1437,6 +1442,7 @@ FUNNYUVCODE ...@@ -1437,6 +1442,7 @@ FUNNYUVCODE
"xorl %%eax, %%eax \n\t" // i "xorl %%eax, %%eax \n\t" // i
"xorl %%ebx, %%ebx \n\t" // xx "xorl %%ebx, %%ebx \n\t" // xx
"xorl %%ecx, %%ecx \n\t" // 2*xalpha "xorl %%ecx, %%ecx \n\t" // 2*xalpha
".align 16 \n\t"
"1: \n\t" "1: \n\t"
"movl %0, %%esi \n\t" "movl %0, %%esi \n\t"
"movzbl (%%esi, %%ebx), %%edi \n\t" //src[xx] "movzbl (%%esi, %%ebx), %%edi \n\t" //src[xx]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment