summaryrefslogtreecommitdiffstats
path: root/libvo/mga_common.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-30 17:40:22 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-30 17:40:22 +0000
commit9a9c52cdf3bc29e92dc358ddc812444991e4680f (patch)
tree071e91580c6d84c116a03f94a72864b951b9878b /libvo/mga_common.c
parent355ce1177153049c789ff45b57b2b44d7aefee6d (diff)
downloadmpv-9a9c52cdf3bc29e92dc358ddc812444991e4680f.tar.bz2
mpv-9a9c52cdf3bc29e92dc358ddc812444991e4680f.tar.xz
using interleaveBytes() for G200 draw_slice
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5406 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/mga_common.c')
-rw-r--r--libvo/mga_common.c59
1 files changed, 5 insertions, 54 deletions
diff --git a/libvo/mga_common.c b/libvo/mga_common.c
index 0f1c4c6b42..48f3d75547 100644
--- a/libvo/mga_common.c
+++ b/libvo/mga_common.c
@@ -2,6 +2,7 @@
#include "fastmemcpy.h"
#include "../mmx_defs.h"
#include "../mp_image.h"
+#include "../postproc/rgb2rgb.h"
// mga_vid drawing functions
@@ -85,60 +86,10 @@ draw_slice_g200(uint8_t *image[], int stride[], int width,int height,int x,int y
width/=2;height/=2;x/=2;y/=2;
dest = vid_data + bespitch*mga_vid_config.src_height + bespitch*y + 2*x;
- src = image[1];
- src2 = image[2];
-
- for(h=0; h < height; h++)
- {
-#ifdef HAVE_MMX
- asm(
- "xorl %%eax, %%eax \n\t"
- "1: \n\t"
- PREFETCH" 64(%1, %%eax) \n\t"
- PREFETCH" 64(%2, %%eax) \n\t"
- "movq (%1, %%eax), %%mm0 \n\t"
- "movq 8(%1, %%eax), %%mm2 \n\t"
- "movq %%mm0, %%mm1 \n\t"
- "movq %%mm2, %%mm3 \n\t"
- "movq (%2, %%eax), %%mm4 \n\t"
- "movq 8(%2, %%eax), %%mm5 \n\t"
- "punpcklbw %%mm4, %%mm0 \n\t"
- "punpckhbw %%mm4, %%mm1 \n\t"
- "punpcklbw %%mm5, %%mm2 \n\t"
- "punpckhbw %%mm5, %%mm3 \n\t"
- MOVNTQ" %%mm0, (%0, %%eax, 2) \n\t"
- MOVNTQ" %%mm1, 8(%0, %%eax, 2) \n\t"
- MOVNTQ" %%mm2, 16(%0, %%eax, 2) \n\t"
- MOVNTQ" %%mm3, 24(%0, %%eax, 2) \n\t"
- "addl $16, %%eax \n\t"
- "cmpl %3, %%eax \n\t"
- " jb 1b \n\t"
- ::"r"(dest), "r"(src), "r"(src2), "r" (width-15)
- : "memory", "%eax"
- );
- for(w= (width&(~15)); w < width; w++)
- {
- dest[2*w+0] = src[w];
- dest[2*w+1] = src2[w];
- }
-#else
- for(w=0; w < width; w++)
- {
- dest[2*w+0] = src[w];
- dest[2*w+1] = src2[w];
- }
-#endif
- dest += bespitch;
- src += stride[1];
- src2+= stride[2];
- }
-#ifdef HAVE_MMX
- asm(
- EMMS" \n\t"
- SFENCE" \n\t"
- ::: "memory"
- );
-#endif
+
+ interleaveBytes(image[1],image[2],dest,
+ mga_vid_config.src_width, height,
+ stride[1], stride[2], bespitch);
}
static void