summaryrefslogtreecommitdiffstats
path: root/libvo/vo_directx.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-08-02 21:28:59 +0200
committerwm4 <wm4@nowhere>2012-08-02 22:07:38 +0200
commite48b21dd87468245268c470b250c3cdd5a1bbfae (patch)
tree43d11465e021a9573bf581ecf2d00c2819f8cabf /libvo/vo_directx.c
parent6c05d49730b8fe3b0eff6639b067c4978706bf59 (diff)
downloadmpv-e48b21dd87468245268c470b250c3cdd5a1bbfae.tar.bz2
mpv-e48b21dd87468245268c470b250c3cdd5a1bbfae.tar.xz
VO: remove VO direct rendering
This was disabled by default, and could be enabled with -dr. It was disabled by default because it was buggy: there were issues with OSD corruption. It wasn't entirely sane for OpenGL based VOs either. OpenGL can chose to drop mapped pixel buffer objects, requiring the application to map and fill the buffer again. But there was no mechanism in mplayer to fill the lost buffer again. (It seems this rarely happened in practice, though.) On the other side, users liked the --dr flag, because it promised them more speed. I'm not sure if it actually helped with speed, but it's unlikely it had any real advantages on modern systems. In order to evade the --dr cargo culting in mplayer config files, it's best to get rid of it.
Diffstat (limited to 'libvo/vo_directx.c')
-rw-r--r--libvo/vo_directx.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/libvo/vo_directx.c b/libvo/vo_directx.c
index 345ee6e8d4..398aa4890b 100644
--- a/libvo/vo_directx.c
+++ b/libvo/vo_directx.c
@@ -862,10 +862,6 @@ static void flip_page(void)
g_lpddsPrimary->lpVtbl->Blt(g_lpddsPrimary, &rd, g_lpddsBack, NULL, DDBLT_WAIT, &ddbltfx);
}
if (g_lpddsBack->lpVtbl->Lock(g_lpddsBack, NULL, &ddsdsf, DDLOCK_NOSYSLOCK | DDLOCK_WAIT, NULL) == DD_OK) {
- if (vo_directrendering && (dstride != ddsdsf.lPitch)) {
- mp_msg(MSGT_VO, MSGL_WARN, "<vo_directx><WARN>stride changed !!!! disabling direct rendering\n");
- vo_directrendering = 0;
- }
free(tmp_image);
tmp_image = NULL;
dstride = ddsdsf.lPitch;
@@ -882,43 +878,6 @@ static int draw_frame(uint8_t *src[])
return 0;
}
-static uint32_t get_image(mp_image_t *mpi)
-{
- if (mpi->flags & MP_IMGFLAG_READABLE) {
- mp_msg(MSGT_VO, MSGL_V, "<vo_directx><ERROR>slow video ram\n");
- return VO_FALSE;
- }
- if (mpi->type == MP_IMGTYPE_STATIC) {
- mp_msg(MSGT_VO, MSGL_V, "<vo_directx><ERROR>not static\n");
- return VO_FALSE;
- }
- if (mpi->width == dstride || (mpi->flags & (MP_IMGFLAG_ACCEPT_STRIDE | MP_IMGFLAG_ACCEPT_WIDTH))) {
- if (mpi->flags & MP_IMGFLAG_PLANAR) {
- if (image_format == IMGFMT_YV12) {
- mpi->planes[2] = image + dstride * image_height;
- mpi->planes[1] = image + dstride * image_height + dstride * image_height / 4;
- mpi->stride[1] = mpi->stride[2] = dstride / 2;
- } else if (image_format == IMGFMT_IYUV || image_format == IMGFMT_I420) {
- mpi->planes[1] = image + dstride * image_height;
- mpi->planes[2] = image + dstride * image_height + dstride * image_height / 4;
- mpi->stride[1] = mpi->stride[2] = dstride / 2;
- } else if (image_format == IMGFMT_YVU9) {
- mpi->planes[2] = image + dstride * image_height;
- mpi->planes[1] = image + dstride * image_height + dstride * image_height / 16;
- mpi->stride[1] = mpi->stride[2] = dstride / 4;
- }
- }
- mpi->planes[0] = image;
- mpi->stride[0] = dstride;
- mpi->width = image_width;
- mpi->height = image_height;
- mpi->flags |= MP_IMGFLAG_DIRECT;
- mp_msg(MSGT_VO, MSGL_DBG3, "<vo_directx><INFO>Direct Rendering ENABLED\n");
- return VO_TRUE;
- }
- return VO_FALSE;
-}
-
static uint32_t put_image(mp_image_t *mpi)
{
uint8_t *d;
@@ -1130,8 +1089,6 @@ static uint32_t color_ctrl_get(const char *what, int *value)
static int control(uint32_t request, void *data)
{
switch (request) {
- case VOCTRL_GET_IMAGE:
- return get_image(data);
case VOCTRL_QUERY_FORMAT:
return query_format(*(uint32_t *)data);
case VOCTRL_DRAW_IMAGE: