summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-03-17 20:30:56 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-03-17 20:30:56 +0000
commit00c9cd0a3881ce7eee9e60f08d1dd01312334fb2 (patch)
treebd400700b17c4fa8b04acbc78496a3f13f88c22e /src
parentfb10cf6446aca252321f827cbfca1f099b7f2042 (diff)
merge with XORG-RELEASE-1 (tag XORG-CYGWIN-LAST-MERGE)CYGWIN-RELEASE-1-MERGE
Diffstat (limited to 'src')
-rw-r--r--src/regsmi.h2
-rw-r--r--src/smi.h2
-rw-r--r--src/smi_accel.c2
-rw-r--r--src/smi_dac.c2
-rw-r--r--src/smi_dga.c2
-rw-r--r--src/smi_driver.c2
-rw-r--r--src/smi_hwcurs.c2
-rw-r--r--src/smi_i2c.c2
-rw-r--r--src/smi_shadow.c2
-rw-r--r--src/smi_video.c111
-rw-r--r--src/smi_video.h2
11 files changed, 36 insertions, 95 deletions
diff --git a/src/regsmi.h b/src/regsmi.h
index da0f659..d2dc840 100644
--- a/src/regsmi.h
+++ b/src/regsmi.h
@@ -26,7 +26,7 @@ Silicon Motion shall not be used in advertising or otherwise to promote the
sale, use or other dealings in this Software without prior written
authorization from the XFree86 Project and SIlicon Motion.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/regsmi.h,v 1.3 2003/10/08 11:13:01 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/regsmi.h,v 1.1 2000/11/28 20:59:19 dawes Exp $ */
#ifndef _REGSMI_H
#define _REGSMI_H
diff --git a/src/smi.h b/src/smi.h
index ffbf8a0..07d73e8 100644
--- a/src/smi.h
+++ b/src/smi.h
@@ -26,7 +26,7 @@ Silicon Motion shall not be used in advertising or otherwise to promote the
sale, use or other dealings in this Software without prior written
authorization from the XFree86 Project and Silicon Motion.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi.h,v 1.14 2003/10/08 11:13:01 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi.h,v 1.12tsi Exp $ */
#ifndef _SMI_H
#define _SMI_H
diff --git a/src/smi_accel.c b/src/smi_accel.c
index 70e369b..d55ad6e 100644
--- a/src/smi_accel.c
+++ b/src/smi_accel.c
@@ -26,7 +26,7 @@ Silicon Motion shall not be used in advertising or otherwise to promote the
sale, use or other dealings in this Software without prior written
authorization from the XFree86 Project and silicon Motion.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_accel.c,v 1.9 2003/10/08 11:13:01 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_accel.c,v 1.7tsi Exp $ */
#include "smi.h"
diff --git a/src/smi_dac.c b/src/smi_dac.c
index 627b892..c606712 100644
--- a/src/smi_dac.c
+++ b/src/smi_dac.c
@@ -26,7 +26,7 @@ Silicon Motion shall not be used in advertising or otherwise to promote the
sale, use or other dealings in this Software without prior written
authorization from the XFree86 Project and Silicon Motion.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_dac.c,v 1.2 2001/11/30 12:11:59 eich Exp $ */
+/* $XFree86$ */
#include "smi.h"
diff --git a/src/smi_dga.c b/src/smi_dga.c
index 9f090b9..7ee542e 100644
--- a/src/smi_dga.c
+++ b/src/smi_dga.c
@@ -26,7 +26,7 @@ Silicon Motion shall not be used in advertising or otherwise to promote the
sale, use or other dealings in this Software without prior written
authorization from the XFree86 Project and Silicon Motion.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_dga.c,v 1.2 2001/02/15 18:20:33 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_dga.c,v 1.1 2000/11/28 20:59:19 dawes Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
diff --git a/src/smi_driver.c b/src/smi_driver.c
index 1d25f80..a75ea59 100644
--- a/src/smi_driver.c
+++ b/src/smi_driver.c
@@ -26,7 +26,7 @@ Silicon Motion shall not be used in advertising or otherwise to promote the
sale, use or other dealings in this Software without prior written
authorization from The XFree86 Project or Silicon Motion.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_driver.c,v 1.37 2003/11/06 18:38:08 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_driver.c,v 1.36tsi Exp $ */
#include "xf86Resources.h"
#include "xf86RAC.h"
diff --git a/src/smi_hwcurs.c b/src/smi_hwcurs.c
index 2c8c63f..fb89969 100644
--- a/src/smi_hwcurs.c
+++ b/src/smi_hwcurs.c
@@ -26,7 +26,7 @@ Silicon Motion shall not be used in advertising or otherwise to promote the
sale, use or other dealings in this Software without prior written
authorization from the XFree86 Project and Silicon Motion.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_hwcurs.c,v 1.3 2003/10/08 11:13:01 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_hwcurs.c,v 1.1 2000/11/28 20:59:20 dawes Exp $ */
#include "cursorstr.h"
#include "smi.h"
diff --git a/src/smi_i2c.c b/src/smi_i2c.c
index 3a73ced..f395df4 100644
--- a/src/smi_i2c.c
+++ b/src/smi_i2c.c
@@ -26,7 +26,7 @@ Silicon Motion shall not be used in advertising or otherwise to promote the
sale, use or other dealings in this Software without prior written
authorization from the XFree86 Project and Silicon Motion.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_i2c.c,v 1.2 2001/12/20 21:35:39 eich Exp $ */
+/* $XFree86$ */
#include "xf86.h"
#include "xf86_OSproc.h"
diff --git a/src/smi_shadow.c b/src/smi_shadow.c
index ed7372b..32bd1ce 100644
--- a/src/smi_shadow.c
+++ b/src/smi_shadow.c
@@ -26,7 +26,7 @@ Silicon Motion shall not be used in advertising or otherwise to promote the
sale, use or other dealings in this Software without prior written
authorization from the XFree86 Project and Silicon Motion.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_shadow.c,v 1.3 2003/10/08 11:13:01 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_shadow.c,v 1.1 2000/11/28 20:59:20 dawes Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
diff --git a/src/smi_video.c b/src/smi_video.c
index 06dcc3a..6254916 100644
--- a/src/smi_video.c
+++ b/src/smi_video.c
@@ -41,6 +41,7 @@ Author of changes: Corvin Zahn <zahn@zac.de>
Date: 2.11.2001
*/
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_video.c,v 1.1.4.2.4.2 2004/03/04 20:16:31 kaleb Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_video.c,v 1.13 2003/11/10 18:22:26 tsi Exp $ */
#include "smi.h"
@@ -133,11 +134,6 @@ static void SMI_WaitForSync(ScrnInfoPtr pScrn);
static void SMI_InitOffscreenImages(ScreenPtr pScreen);
static FBAreaPtr SMI_AllocateMemory(ScrnInfoPtr pScrn, FBAreaPtr area,
int numLines);
-static void SMI_CopyData(unsigned char *src, unsigned char *dst, int srcPitch,
- int dstPitch, int height, int width);
-static void SMI_CopyYV12Data(unsigned char *src1, unsigned char *src2,
- unsigned char *src3, unsigned char *dst, int srcPitch1, int srcPitch2,
- int dstPitch, int height, int width);
static int SMI_AllocSurface(ScrnInfoPtr pScrn,
int id, unsigned short width, unsigned short height,
@@ -1690,27 +1686,31 @@ SMI_PutImage(
offset = (pPort->area->box.y1 * fbPitch) + (top * dstPitch);
dstStart = pSmi->FBBase + offset + left;
- switch (id)
- {
- case FOURCC_YV12:
- case FOURCC_I420:
- top &= ~1;
- tmp = ((top >> 1) * srcPitch2) + (left >> 2);
- offset2 += tmp;
- offset3 += tmp;
- nLines = ((((y2 + 0xFFFF) >> 16) + 1) & ~1) - top;
- SMI_CopyYV12Data(buf + (top * srcPitch) + (left >> 1),
- buf + offset2, buf + offset3, dstStart, srcPitch, srcPitch2,
- dstPitch, nLines, nPixels);
- break;
-
- default:
- buf += (top * srcPitch) + left;
- nLines = ((y2 + 0xFFFF) >> 16) - top;
- SMI_CopyData(buf, dstStart, srcPitch, dstPitch, nLines,
- nPixels * bpp);
- break;
- }
+ switch(id) {
+ case FOURCC_YV12:
+ case FOURCC_I420:
+ top &= ~1;
+ tmp = ((top >> 1) * srcPitch2) + (left >> 2);
+ offset2 += tmp;
+ offset3 += tmp;
+ if(id == FOURCC_I420) {
+ tmp = offset2;
+ offset2 = offset3;
+ offset3 = tmp;
+ }
+ nLines = ((((y2 + 0xffff) >> 16) + 1) & ~1) - top;
+ xf86XVCopyYUV12ToPacked(buf + (top * srcPitch) + (left >> 1),
+ buf + offset2, buf + offset3, dstStart,
+ srcPitch, srcPitch2, dstPitch, nLines, nPixels);
+ break;
+ case FOURCC_UYVY:
+ case FOURCC_YUY2:
+ default:
+ buf += (top * srcPitch) + left;
+ nLines = ((y2 + 0xffff) >> 16) - top;
+ xf86XVCopyPacked(buf, dstStart, srcPitch, dstPitch, nLines, nPixels);
+ break;
+ }
#if XF86_VERSION_CURRENT < XF86_VERSION_NUMERIC(4,3,99,0,0)
if (!RegionsEqual(&pPort->clip, clipBoxes))
@@ -2349,65 +2349,6 @@ SMI_AllocateMemory(
return(area);
}
-static void
-SMI_CopyData(
- unsigned char *src,
- unsigned char *dst,
- int srcPitch,
- int dstPitch,
- int height,
- int width
-)
-{
- ENTER_PROC("SMI_CopyData");
-
- while (height-- > 0)
- {
- memcpy(dst, src, width);
- src += srcPitch;
- dst += dstPitch;
- }
-
- LEAVE_PROC("SMI_CopyData");
-}
-
-static void
-SMI_CopyYV12Data(
- unsigned char *src1,
- unsigned char *src2,
- unsigned char *src3,
- unsigned char *dst,
- int srcPitch1,
- int srcPitch2,
- int dstPitch,
- int height,
- int width
-)
-{
- CARD32 *pDst = (CARD32 *) dst;
- int i, j;
-
- ENTER_PROC("SMI_CopyYV12Data");
-
- for (j = 0; j < height; j++)
- {
- for (i =0; i < width; i++)
- {
- pDst[i] = src1[i << 1] | (src1[(i << 1) + 1] << 16) |
- (src3[i] << 8) | (src2[i] << 24);
- }
- pDst += dstPitch >> 2;
- src1 += srcPitch1;
- if (j & 1)
- {
- src2 += srcPitch2;
- src3 += srcPitch2;
- }
- }
-
- LEAVE_PROC("SMI_CopyYV12Data");
-}
-
static int
SMI_AllocSurface(
ScrnInfoPtr pScrn,
diff --git a/src/smi_video.h b/src/smi_video.h
index b63e4bc..270e0fe 100644
--- a/src/smi_video.h
+++ b/src/smi_video.h
@@ -26,7 +26,7 @@ Silicon Motion shall not be used in advertising or otherwise to promote the
sale, use or other dealings in this Software without prior written
authorization from the XFree86 Project and silicon Motion.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_video.h,v 1.4 2002/09/16 18:06:01 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_video.h,v 1.1 2000/11/28 20:59:20 dawes Exp $ */
#ifndef _SMI_VIDEO_H
#define _SMI_VIDEO_H