summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Melanson <mike@multimedia.cx>2002-09-13 03:05:19 +0000
committerMike Melanson <mike@multimedia.cx>2002-09-13 03:05:19 +0000
commit1e4d8c9ad711c66fd8fa105fed9b1e4da05de009 (patch)
tree2532f7c487d8779dd597bcf4db92cc0bbf0f1009 /src
parent20b46c0027d3a0d64276a408a54e1c7cb8aef4ae (diff)
downloadxine-lib-1e4d8c9ad711c66fd8fa105fed9b1e4da05de009.tar.gz
xine-lib-1e4d8c9ad711c66fd8fa105fed9b1e4da05de009.tar.bz2
simplify MMX shift instruction
CVS patchset: 2658 CVS date: 2002/09/13 03:05:19
Diffstat (limited to 'src')
-rw-r--r--src/xine-utils/color.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/xine-utils/color.c b/src/xine-utils/color.c
index d9d1d74cb..de0066387 100644
--- a/src/xine-utils/color.c
+++ b/src/xine-utils/color.c
@@ -61,7 +61,7 @@
* instructions), these macros will automatically map to those special
* instructions.
*
- * $Id: color.c,v 1.7 2002/09/12 01:25:28 tmmm Exp $
+ * $Id: color.c,v 1.8 2002/09/13 03:05:19 tmmm Exp $
*/
#include "xine_internal.h"
@@ -308,12 +308,14 @@ void yuv444_to_yuy2_mmx(yuv_planes_t *yuv_planes, unsigned char *yuy2_map,
0x03, 0x00,
0x01, 0x00
};
+ unsigned char shifter[] = {0, 0, 0, 0, 0, 0, 0, 0};
int block_loops = yuv_planes->row_width / 6;
int filter_loops;
int residual_filter_loops;
int row_inc = (pitch - 2 * yuv_planes->row_width);
residual_filter_loops = (yuv_planes->row_width % 6) / 2;
+ shifter[0] = residual_filter_loops * 8;
if (!residual_filter_loops)
residual_filter_loops = 3;
@@ -380,10 +382,7 @@ void yuv444_to_yuy2_mmx(yuv_planes_t *yuv_planes, unsigned char *yuy2_map,
source_plane -= (8 - residual_filter_loops * 2);
movq_m2r(*source_plane, mm1); /* load 8 C samples */
source_plane += 8;
- if (residual_filter_loops == 1)
- psrlq_i2r(32, mm1); /* toss out 4 samples before starting */
- else if (residual_filter_loops == 2)
- psrlq_i2r(16, mm1); /* toss out 2 samples before starting */
+ psrlq_m2r(*shifter, mm1); /* toss out samples before starting */
} else {
/* normal case */