summaryrefslogtreecommitdiff
path: root/src/xvmc/intel_xvmc.c
diff options
context:
space:
mode:
authorZou Nan hai <nanhai.zou@intel.com>2008-08-27 11:11:41 +0800
committerZou Nan hai <nanhai.zou@intel.com>2008-08-27 11:11:41 +0800
commite813b139b7c353a0930c3e00408700619d3949e4 (patch)
tree93796b73d0ce36e15a17dd8e9a668a1e8ccd6936 /src/xvmc/intel_xvmc.c
parent3147fa775c7e2a933dc74af1372a3318e77d3218 (diff)
[965-xvmc] support field prediction and dct type, optimize in GPU
Diffstat (limited to 'src/xvmc/intel_xvmc.c')
-rw-r--r--src/xvmc/intel_xvmc.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/xvmc/intel_xvmc.c b/src/xvmc/intel_xvmc.c
index f708ee79..e89c0342 100644
--- a/src/xvmc/intel_xvmc.c
+++ b/src/xvmc/intel_xvmc.c
@@ -450,12 +450,11 @@ Status XvMCCreateContext(Display *display, XvPortID port,
Status XvMCDestroyContext(Display *display, XvMCContext *context)
{
Status ret;
- int screen;
+ int screen = DefaultScreen(display);
if (!display || !context)
return XvMCBadContext;
- screen = DefaultScreen(display);
ret = (xvmc_driver->destroy_context)(display, context);
if (ret) {
XVMC_ERR("destroy context fail\n");
@@ -745,19 +744,23 @@ Status XvMCPutSurface(Display *display,XvMCSurface *surface,
intel_surf->gc = XCreateGC(display, draw, 0, NULL);
}
intel_surf->last_draw = draw;
-
/* fill intel_surf->data */
+ if (0)
+ {
+ drmVBlank vbl;
+ vbl.request.type = DRM_VBLANK_RELATIVE;
+ vbl.request.sequence = 1;
+ drmWaitVBlank(xvmc_driver->fd, &vbl);
+ }
ret = (xvmc_driver->put_surface)(display, surface, draw, srcx, srcy,
srcw, srch, destx, desty, destw, desth, flags, &intel_surf->data);
if (ret) {
XVMC_ERR("put surface fail\n");
return ret;
}
-
ret = XvPutImage(display, context->port, draw, intel_surf->gc,
intel_surf->image, srcx, srcy, srcw, srch, destx, desty,
destw, desth);
-
return ret;
}