From 2719c56c147846b7730cc94b44220009ba1ddd8c Mon Sep 17 00:00:00 2001 From: Mike Melanson Date: Sun, 22 Dec 2002 23:20:21 +0000 Subject: fix MMX color converter when width is divisible by 6 CVS patchset: 3638 CVS date: 2002/12/22 23:20:21 --- src/xine-utils/color.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/xine-utils/color.c b/src/xine-utils/color.c index 2602250cc..0802bdec3 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.11 2002/12/04 05:33:40 tmmm Exp $ + * $Id: color.c,v 1.12 2002/12/22 23:20:21 tmmm Exp $ */ #include "xine_internal.h" @@ -321,8 +321,12 @@ void yuv444_to_yuy2_mmx(yuv_planes_t *yuv_planes, unsigned char *yuy2_map, residual_filter_loops = (yuv_planes->row_width % 6) / 2; shifter[0] = residual_filter_loops * 8; - if (!residual_filter_loops) + /* if the width is divisible by 6, apply 3 residual filters and perform + * one less primary loop */ + if (!residual_filter_loops) { residual_filter_loops = 3; + block_loops--; + } /* set up some MMX registers: * mm0 = 0, mm7 = color filter */ -- cgit v1.2.3