mirror of
https://github.com/mpv-player/mpv
synced 2024-12-27 17:42:17 +00:00
vo_opengl_old: remove this VO
At this point, there is probably no hardware left that doesn't do OpenGL 2.1, and at the same time is fast enough to handle video.
This commit is contained in:
parent
21322a016e
commit
724f722d7f
181
DOCS/man/vo.rst
181
DOCS/man/vo.rst
@ -278,8 +278,7 @@ Available video output drivers are:
|
||||
``opengl-hq`` to use this driver with defaults set to high quality
|
||||
rendering.
|
||||
|
||||
Requires at least OpenGL 2.1 and the ``GL_ARB_texture_rg`` extension. For
|
||||
older drivers, ``opengl-old`` may work.
|
||||
Requires at least OpenGL 2.1.
|
||||
|
||||
Some features are available with OpenGL 3 capable graphics drivers only
|
||||
(or if the necessary extensions are available).
|
||||
@ -624,184 +623,6 @@ Available video output drivers are:
|
||||
float texture support, and some OS X setups being very slow with ``rgb16``
|
||||
but fast with ``rgb32f``.
|
||||
|
||||
``opengl-old``
|
||||
OpenGL video output driver, old version. Video size must be smaller
|
||||
than the maximum texture size of your OpenGL implementation. Intended to
|
||||
work even with the most basic OpenGL implementations, but also makes use
|
||||
of newer extensions which allow support for more color spaces.
|
||||
|
||||
The code performs very few checks, so if a feature does not work, this
|
||||
might be because it is not supported by your card and/or OpenGL
|
||||
implementation, even if you do not get any error message. Use ``glxinfo``
|
||||
or a similar tool to display the supported OpenGL extensions.
|
||||
|
||||
.. note:: This driver is for compatibility with old systems.
|
||||
|
||||
``(no-)ati-hack``
|
||||
ATI drivers may give a corrupted image when PBOs are used (when using
|
||||
``force-pbo``). This option fixes this, at the expense of using a bit
|
||||
more memory.
|
||||
``(no-)force-pbo``
|
||||
Always uses PBOs to transfer textures even if this involves an extra
|
||||
copy. Currently this gives a little extra speed with NVIDIA drivers
|
||||
and a lot more speed with ATI drivers. May need the ``ati-hack``
|
||||
suboption to work correctly.
|
||||
``(no-)scaled-osd``
|
||||
Scales the OSD and subtitles instead of rendering them at display size
|
||||
(default: disabled).
|
||||
``rectangle=<0,1,2>``
|
||||
Select usage of rectangular textures, which saves video RAM, but often
|
||||
is slower (default: 0).
|
||||
|
||||
0
|
||||
Use power-of-two textures (default).
|
||||
1
|
||||
Use the ``GL_ARB_texture_rectangle`` extension.
|
||||
2
|
||||
Use the ``GL_ARB_texture_non_power_of_two`` extension. In some
|
||||
cases only supported in software and thus very slow.
|
||||
|
||||
``swapinterval=<n>``
|
||||
Minimum interval between two buffer swaps, counted in displayed frames
|
||||
(default: 1). 1 is equivalent to enabling VSYNC, 0 to disabling VSYNC.
|
||||
Values below 0 will leave it at the system default. This limits the
|
||||
framerate to (horizontal refresh rate / n). Requires
|
||||
``GLX_SGI_swap_control`` support to work. With some (most/all?)
|
||||
implementations this only works in fullscreen mode.
|
||||
``ycbcr``
|
||||
Use the ``GL_MESA_ycbcr_texture`` extension to convert YUV to RGB. In
|
||||
most cases this is probably slower than doing software conversion to
|
||||
RGB.
|
||||
``yuv=<n>``
|
||||
Select the type of YUV to RGB conversion. The default is
|
||||
auto-detection deciding between values 0 and 2.
|
||||
|
||||
0
|
||||
Use software conversion. Compatible with all OpenGL versions.
|
||||
Provides brightness, contrast and saturation control.
|
||||
1
|
||||
Same as 2. This used to use NVIDIA-specific extensions, which
|
||||
did not provide any advantages over using fragment programs, except
|
||||
possibly on very ancient graphics cards. It produced a gray-ish
|
||||
output, which is why it has been removed.
|
||||
2
|
||||
Use a fragment program. Needs the ``GL_ARB_fragment_program``
|
||||
extension and at least three texture units. Provides brightness,
|
||||
contrast, saturation and hue control.
|
||||
3
|
||||
Use a fragment program using the ``POW`` instruction. Needs the
|
||||
``GL_ARB_fragment_program`` extension and at least three texture
|
||||
units. Provides brightness, contrast, saturation, hue and gamma
|
||||
control. Gamma can also be set independently for red, green and
|
||||
blue. Method 4 is usually faster.
|
||||
4
|
||||
Use a fragment program with additional lookup. Needs the
|
||||
``GL_ARB_fragment_program`` extension and at least four texture
|
||||
units. Provides brightness, contrast, saturation, hue and gamma
|
||||
control. Gamma can also be set independently for red, green and
|
||||
blue.
|
||||
5
|
||||
Removed. Used ATI-specific method (for older cards).
|
||||
6
|
||||
Use a 3D texture to do conversion via lookup. Needs the
|
||||
``GL_ARB_fragment_program extension`` and at least four texture
|
||||
units. Extremely slow (software emulation) on some (all?) ATI
|
||||
cards since it uses a texture with border pixels. Provides
|
||||
brightness, contrast, saturation, hue and gamma control. Gamma can
|
||||
also be set independently for red, green and blue. Speed depends
|
||||
more on GPU memory bandwidth than other methods.
|
||||
|
||||
``lscale=<n>``
|
||||
Select the scaling function to use for luminance scaling. Only valid
|
||||
for yuv modes 2, 3, 4 and 6.
|
||||
|
||||
0
|
||||
Use simple linear filtering (default).
|
||||
1
|
||||
Use bicubic B-spline filtering (better quality). Needs one
|
||||
additional texture unit. Older cards will not be able to handle
|
||||
this for chroma at least in fullscreen mode.
|
||||
2
|
||||
Use cubic filtering in horizontal, linear filtering in vertical
|
||||
direction. Works on a few more cards than method 1.
|
||||
3
|
||||
Same as 1 but does not use a lookup texture. Might be faster on
|
||||
some cards.
|
||||
4
|
||||
Use experimental unsharp masking with 3x3 support and a default
|
||||
strength of 0.5 (see ``filter-strength``).
|
||||
5
|
||||
Use experimental unsharp masking with 5x5 support and a default
|
||||
strength of 0.5 (see ``filter-strength``).
|
||||
|
||||
``cscale=<n>``
|
||||
Select the scaling function to use for chrominance scaling. For
|
||||
details see ``lscale``.
|
||||
``filter-strength=<value>``
|
||||
Set the effect strength for the ``lscale``/``cscale`` filters that
|
||||
support it.
|
||||
``stereo=<value>``
|
||||
Select a method for stereo display. You may have to use
|
||||
``--video-aspect`` to fix the aspect value. Experimental, do not expect
|
||||
too much from it.
|
||||
|
||||
0
|
||||
Normal 2D display
|
||||
1
|
||||
Convert side by side input to full-color red-cyan stereo.
|
||||
2
|
||||
Convert side by side input to full-color green-magenta stereo.
|
||||
3
|
||||
Convert side by side input to quad buffered stereo. Only supported
|
||||
by very few OpenGL cards.
|
||||
|
||||
The following options are only useful if writing your own fragment programs.
|
||||
|
||||
``customprog=<filename>``
|
||||
Load a custom fragment program from ``<filename>``.
|
||||
``customtex=<filename>``
|
||||
Load a custom "gamma ramp" texture from ``<filename>``. This can be used
|
||||
in combination with ``yuv=4`` or with the ``customprog`` option.
|
||||
``(no-)customtlin``
|
||||
If enabled (default) use ``GL_LINEAR`` interpolation, otherwise use
|
||||
``GL_NEAREST`` for customtex texture.
|
||||
``(no-)customtrect``
|
||||
If enabled, use ``texture_rectangle`` for the ``customtex`` texture.
|
||||
Default is disabled.
|
||||
``(no-)mipmapgen``
|
||||
If enabled, mipmaps for the video are automatically generated. This
|
||||
should be useful together with the ``customprog`` and the ``TXB``
|
||||
instruction to implement blur filters with a large radius. For most
|
||||
OpenGL implementations, this is very slow for any non-RGB formats.
|
||||
Default is disabled.
|
||||
|
||||
Normally there is no reason to use the following options; they mostly
|
||||
exist for testing purposes.
|
||||
|
||||
``(no-)glfinish``
|
||||
Call ``glFinish()`` before swapping buffers. Slower but in some cases
|
||||
more correct output (default: disabled).
|
||||
``(no-)manyfmts``
|
||||
Enables support for more (RGB and BGR) color formats (default: enabled).
|
||||
Needs OpenGL version >= 1.2.
|
||||
``slice-height=<0-...>``
|
||||
Number of lines copied to texture in one piece (default: 0). 0 for
|
||||
whole image.
|
||||
``sw``
|
||||
Continue even if a software renderer is detected.
|
||||
|
||||
``backend=<sys>``
|
||||
auto
|
||||
auto-select (default)
|
||||
cocoa
|
||||
Cocoa/OS X
|
||||
win
|
||||
Win32/WGL
|
||||
x11
|
||||
X11/GLX
|
||||
wayland
|
||||
Wayland/EGL
|
||||
|
||||
``sdl``
|
||||
SDL 2.0+ Render video output driver, depending on system with or without
|
||||
hardware acceleration. Should work on all platforms supported by SDL 2.0.
|
||||
|
@ -63,9 +63,7 @@ SOURCES-$(GL) += video/out/gl_common.c video/out/gl_osd.c \
|
||||
video/out/vo_opengl.c video/out/gl_lcms.c \
|
||||
video/out/gl_video.c video/out/dither.c \
|
||||
video/out/gl_hwdec.c \
|
||||
video/out/vo_opengl_cb.c \
|
||||
video/out/vo_opengl_old.c \
|
||||
video/out/pnm_loader.c
|
||||
video/out/vo_opengl_cb.c
|
||||
|
||||
SOURCES-$(ENCODING) += video/out/vo_lavc.c audio/out/ao_lavc.c \
|
||||
common/encode_lavc.c
|
||||
|
@ -960,8 +960,6 @@ MPGLContext *mpgl_init(struct vo *vo, const char *backend_name,
|
||||
|
||||
if (gl_flavor >= 210 && !(ctx->gl->mpgl_caps & MPGL_CAP_GL21)) {
|
||||
MP_WARN(ctx->vo, "At least OpenGL 2.1 required.\n");
|
||||
if (!vo->probing && (ctx->gl->mpgl_caps & MPGL_CAP_GL_LEGACY))
|
||||
MP_WARN(ctx->vo, "Try with: --vo=opengl-old\n");
|
||||
goto cleanup;
|
||||
} else if (gl_flavor < 210 && !(ctx->gl->mpgl_caps & MPGL_CAP_GL_LEGACY)) {
|
||||
MP_WARN(ctx->vo, "OpenGL context creation failed!\n");
|
||||
|
@ -1,97 +0,0 @@
|
||||
/*
|
||||
* PNM image files loader
|
||||
*
|
||||
* copyleft (C) 2005-2010 Reimar Döffinger <Reimar.Doeffinger@gmx.de>
|
||||
*
|
||||
* This file is part of MPlayer.
|
||||
*
|
||||
* MPlayer is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* MPlayer is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* You can alternatively redistribute this file and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file pnm_loader.c
|
||||
* \brief PNM image files loader
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include "misc/ctype.h"
|
||||
#include "pnm_loader.h"
|
||||
|
||||
/**
|
||||
* \brief skips whitespace and comments
|
||||
* \param f file to read from
|
||||
*/
|
||||
static void ppm_skip(FILE *f) {
|
||||
int c, comment = 0;
|
||||
do {
|
||||
c = fgetc(f);
|
||||
if (c == '#')
|
||||
comment = 1;
|
||||
if (c == '\n')
|
||||
comment = 0;
|
||||
} while (c != EOF && (mp_isspace(c) || comment));
|
||||
if (c != EOF)
|
||||
ungetc(c, f);
|
||||
}
|
||||
|
||||
#define MAXDIM (16 * 1024)
|
||||
|
||||
uint8_t *read_pnm(FILE *f, int *width, int *height,
|
||||
int *bytes_per_pixel, int *maxval) {
|
||||
uint8_t *data;
|
||||
int type;
|
||||
unsigned w, h, m, val, bpp;
|
||||
*width = *height = *bytes_per_pixel = *maxval = 0;
|
||||
ppm_skip(f);
|
||||
if (fgetc(f) != 'P')
|
||||
return NULL;
|
||||
type = fgetc(f);
|
||||
if (type != '5' && type != '6')
|
||||
return NULL;
|
||||
ppm_skip(f);
|
||||
if (fscanf(f, "%u", &w) != 1)
|
||||
return NULL;
|
||||
ppm_skip(f);
|
||||
if (fscanf(f, "%u", &h) != 1)
|
||||
return NULL;
|
||||
ppm_skip(f);
|
||||
if (fscanf(f, "%u", &m) != 1)
|
||||
return NULL;
|
||||
val = fgetc(f);
|
||||
if (!mp_isspace(val))
|
||||
return NULL;
|
||||
if (w > MAXDIM || h > MAXDIM)
|
||||
return NULL;
|
||||
bpp = (m > 255) ? 2 : 1;
|
||||
if (type == '6')
|
||||
bpp *= 3;
|
||||
data = malloc(w * h * bpp);
|
||||
if (fread(data, w * bpp, h, f) != h) {
|
||||
free(data);
|
||||
return NULL;
|
||||
}
|
||||
*width = w;
|
||||
*height = h;
|
||||
*bytes_per_pixel = bpp;
|
||||
*maxval = m;
|
||||
return data;
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
/*
|
||||
* PNM image files loader
|
||||
*
|
||||
* This file is part of MPlayer.
|
||||
*
|
||||
* MPlayer is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* MPlayer is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* You can alternatively redistribute this file and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef MPLAYER_PNM_LOADER_H
|
||||
#define MPLAYER_PNM_LOADER_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* Read a "portable anymap" image.
|
||||
* Supports raw PGM (P5) and PNM (P6).
|
||||
*
|
||||
* @param[in] f input stream.
|
||||
* @param[out] width width of the loaded image.
|
||||
* @param[out] height height of the loaded image.
|
||||
* @param[out] bytes_per_pixel format of the loaded image.
|
||||
* @param[out] maxval maximum pixel value; possible values are:
|
||||
* 1 for 8 bits gray,
|
||||
* 2 for 16 bits gray,
|
||||
* 3 for 8 bits per component RGB,
|
||||
* 6 for 16 bits per component RGB.
|
||||
* @return a newly allocated array of
|
||||
* width*height*bytes_per_pixel bytes,
|
||||
* or NULL in case of error.
|
||||
*/
|
||||
uint8_t *read_pnm(FILE *f, int *width, int *height,
|
||||
int *bytes_per_pixel, int *maxval);
|
||||
|
||||
#endif /* MPLAYER_PNM_LOADER_H */
|
@ -54,7 +54,6 @@ extern const struct vo_driver video_out_vdpau;
|
||||
extern const struct vo_driver video_out_xv;
|
||||
extern const struct vo_driver video_out_opengl;
|
||||
extern const struct vo_driver video_out_opengl_hq;
|
||||
extern const struct vo_driver video_out_opengl_old;
|
||||
extern const struct vo_driver video_out_opengl_cb;
|
||||
extern const struct vo_driver video_out_null;
|
||||
extern const struct vo_driver video_out_image;
|
||||
@ -84,9 +83,6 @@ const struct vo_driver *const video_out_drivers[] =
|
||||
#if HAVE_SDL2
|
||||
&video_out_sdl,
|
||||
#endif
|
||||
#if HAVE_GL
|
||||
&video_out_opengl_old,
|
||||
#endif
|
||||
#if HAVE_VAAPI
|
||||
&video_out_vaapi,
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -348,7 +348,6 @@ def build(ctx):
|
||||
( "video/out/gl_wayland.c", "gl-wayland" ),
|
||||
( "video/out/gl_x11.c", "gl-x11" ),
|
||||
( "video/out/gl_x11egl.c", "egl-x11" ),
|
||||
( "video/out/pnm_loader.c", "gl" ),
|
||||
( "video/out/vo.c" ),
|
||||
( "video/out/vo_caca.c", "caca" ),
|
||||
( "video/out/vo_direct3d.c", "direct3d" ),
|
||||
@ -357,7 +356,6 @@ def build(ctx):
|
||||
( "video/out/vo_null.c" ),
|
||||
( "video/out/vo_opengl.c", "gl" ),
|
||||
( "video/out/vo_opengl_cb.c", "gl" ),
|
||||
( "video/out/vo_opengl_old.c", "gl" ),
|
||||
( "video/out/vo_sdl.c", "sdl2" ),
|
||||
( "video/out/vo_vaapi.c", "vaapi" ),
|
||||
( "video/out/vo_vdpau.c", "vdpau" ),
|
||||
|
Loading…
Reference in New Issue
Block a user