summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2005-04-20 12:25:30 +0000
committerDaniel Stone <daniel@fooishbar.org>2005-04-20 12:25:30 +0000
commit4db50246111e420ad5e6ae9ac8c7e03ec0d5d704 (patch)
treebe00c516d3983cef115276c4fec6454ea0fd75ee
parent9b0caee37f7ee99831735e819d97f9ccf155562a (diff)
change "foo.h" to <X11/foo.h> for core headers, e.g. X.h, Xpoll.h; change "foo.h", "extensions/foo.h" and "X11/foo.h" to <X11/extensions/foo.h> for extension headers, e.g. Xv.h; change "foo.[ch]" to <X11/Xtrans/foo.[ch]> for Xtrans files.
-rw-r--r--src/tdfx_driver.c4
-rw-r--r--src/tdfx_video.c23
2 files changed, 12 insertions, 15 deletions
diff --git a/src/tdfx_driver.c b/src/tdfx_driver.c
index 968ce95..b57e134 100644
--- a/src/tdfx_driver.c
+++ b/src/tdfx_driver.c
@@ -81,7 +81,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* !!! These need to be checked !!! */
#if 0
#define _XF86DGA_SERVER_
-#include "extensions/xf86dgastr.h"
+#include <X11/extensions/xf86dgastr.h>
#endif
/* The driver's own header file: */
@@ -92,7 +92,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "dixstruct.h"
#include "xf86xv.h"
-#include "Xv.h"
+#include <X11/extensions/Xv.h>
#ifdef XF86DRI
#include "dri.h"
diff --git a/src/tdfx_video.c b/src/tdfx_video.c
index 8971588..8657341 100644
--- a/src/tdfx_video.c
+++ b/src/tdfx_video.c
@@ -1,10 +1,10 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_video.c,v 1.17 2003/04/23 21:51:47 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_video.c,v 1.20tsi Exp $ */
#include "xf86.h"
#include "tdfx.h"
#include "dixstruct.h"
-#include "Xv.h"
+#include <X11/extensions/Xv.h>
#include "fourcc.h"
static Atom xvColorKey, xvFilterQuality;
@@ -239,7 +239,7 @@ TDFXSetupImageVideoOverlay(ScreenPtr pScreen)
pTDFX->overlayAdaptor = adapt;
pPriv = (TDFXPortPrivPtr)(adapt->pPortPrivates[0].ptr);
- REGION_INIT(pScreen, &(pPriv->clip), NullBox, 0);
+ REGION_NULL(pScreen, &(pPriv->clip));
TDFXResetVideoOverlay(pScrn);
@@ -258,7 +258,7 @@ TDFXSetupImageVideoTexture(ScreenPtr pScreen)
return NULL;
adapt->type = XvWindowMask | XvInputMask | XvImageMask;
- adapt->flags = 0;
+ adapt->flags = VIDEO_OVERLAID_IMAGES;
adapt->name = "3dfx Video Texture";
adapt->nPorts = TDFX_MAX_TEXTURE_PORTS;
adapt->nEncodings = sizeof(TextureEncoding) / sizeof(XF86VideoEncodingRec);
@@ -507,9 +507,6 @@ static void
TDFXStopVideoTexture(ScrnInfoPtr pScrn, pointer data, Bool cleanup)
{
TDFXPtr pTDFX = TDFXPTR(pScrn);
- TDFXPortPrivPtr pPriv = (TDFXPortPrivPtr)data;
-
- REGION_EMPTY(pScrn->pScreen, &pPriv->clip);
if (cleanup) {
if(pTDFX->textureBuffer) {
@@ -537,6 +534,7 @@ TDFXScreenToScreenYUVStretchBlit (ScrnInfoPtr pScrn,
INT32 src_h = (src_y2 - src_y1) & 0x1FFF;
INT32 dst_w = (dst_x2 - dst_x1) & 0x1FFF;
INT32 dst_h = (dst_y2 - dst_y1) & 0x1FFF;
+
/* Setup for blit src and dest */
TDFXMakeRoom(pTDFX, 4);
DECLARE(SSTCP_DSTSIZE|SSTCP_SRCSIZE|SSTCP_DSTXY|SSTCP_COMMAND/*|SSTCP_COMMANDEXTRA*/);
@@ -798,7 +796,8 @@ TDFXDisplayVideoOverlay(
int dudx, dvdy;
dudx = (src_w << 20) / drw_w;
- dvdy = (src_h << 20) / drw_h;
+ /* subtract 1 to eliminate garbage on last line */
+ dvdy = (( src_h - 1 )<< 20) / drw_h;
offset += ((left >> 16) & ~1) << 1;
left = (left & 0x0001ffff) << 3;
@@ -828,7 +827,7 @@ TDFXDisplayVideoOverlay(
pTDFX->writeLong(pTDFX, VIDDESKTOPOVERLAYSTRIDE, pTDFX->ModeReg.stride);
pTDFX->writeLong(pTDFX, SST_3D_LEFTOVERLAYBUF, offset & ~3);
pTDFX->writeLong(pTDFX, VIDINADDR0, offset & ~3);
- TDFXTRACE("TDFXDisplayVideoOverlay: done, offset=0x%x\n");
+ TDFXTRACE("TDFXDisplayVideoOverlay: done, offset=0x%x\n", offset);
}
@@ -890,7 +889,7 @@ TDFXPutImageOverlay(
TDFXPortPrivPtr pPriv = (TDFXPortPrivPtr)data;
INT32 xa, xb, ya, yb;
unsigned char *dst_start;
- int pitch, new_size, offset;
+ int new_size, offset;
int s2offset = 0, s3offset = 0;
int srcPitch = 0, srcPitch2 = 0;
int dstPitch;
@@ -936,7 +935,6 @@ TDFXPutImageOverlay(
dstBox.y2 -= pScrn->frameY0;
bpp = pScrn->bitsPerPixel >> 3;
- pitch = bpp * pScrn->displayWidth;
switch(id) {
case FOURCC_YV12:
@@ -1165,7 +1163,7 @@ TDFXAllocateSurface(
){
TDFXPtr pTDFX = TDFXPTR(pScrn);
FBLinearPtr linear;
- int pitch, fbpitch, size, bpp;
+ int pitch, size, bpp;
OffscreenPrivPtr pPriv;
if((w > 2048) || (h > 2048))
@@ -1174,7 +1172,6 @@ TDFXAllocateSurface(
w = (w + 1) & ~1;
pitch = ((w << 1) + 15) & ~15;
bpp = pScrn->bitsPerPixel >> 3;
- fbpitch = bpp * pScrn->displayWidth;
size = ((pitch * h) + bpp - 1) / bpp;
if(!(linear = TDFXAllocateMemoryLinear(pScrn, NULL, size)))