2013-03-01 20:19:20 +00:00
|
|
|
/*
|
|
|
|
* This file is part of mpv.
|
|
|
|
*
|
2016-01-07 09:48:04 +00:00
|
|
|
* mpv is free software; you can redistribute it 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.
|
2013-03-01 20:19:20 +00:00
|
|
|
*
|
|
|
|
* mpv 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
|
2016-01-07 09:48:04 +00:00
|
|
|
* GNU Lesser General Public License for more details.
|
2013-03-01 20:19:20 +00:00
|
|
|
*
|
2016-01-07 09:48:04 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
|
2013-03-01 20:19:20 +00:00
|
|
|
*/
|
2016-01-07 09:48:04 +00:00
|
|
|
|
2013-03-01 20:19:20 +00:00
|
|
|
#ifndef MP_GL_VIDEO_H
|
|
|
|
#define MP_GL_VIDEO_H
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
2014-12-09 20:34:01 +00:00
|
|
|
#include "options/m_option.h"
|
2013-11-24 11:58:06 +00:00
|
|
|
#include "sub/osd.h"
|
2015-09-05 12:03:00 +00:00
|
|
|
#include "utils.h"
|
2016-02-13 14:33:00 +00:00
|
|
|
#include "lcms.h"
|
2017-08-04 17:09:46 +00:00
|
|
|
#include "shader_cache.h"
|
2017-08-10 19:36:57 +00:00
|
|
|
#include "video/csputils.h"
|
2015-09-05 12:03:00 +00:00
|
|
|
#include "video/out/filter_kernels.h"
|
|
|
|
|
vo_opengl: dynamically manage texture units
A minor cleanup that makes the code simpler, and guarantees that we
cleanup the GL state properly at any point.
We do this by reusing the uniform caching, and assigning each sampler
uniform its own texture unit by incrementing a counter. This has various
subtle consequences for the GL driver, which hopefully don't matter. For
example, it will bind fewer textures at a time, but also rebind them
more often.
For some reason we keep TEXUNIT_VIDEO_NUM, because it limits the number
of hook passes that can be bound at the same time.
OSD rendering is an exception: we do many passes with the same shader,
and rebinding the texture each pass. For now, this is handled in an
unclean way, and we make the shader cache reserve texture unit 0 for the
OSD texture. At a later point, we should allocate that one dynamically
too, and just pass the texture unit to the OSD rendering code. Right now
I feel like vo_rpi.c (may it rot in hell) is in the way.
2016-09-14 18:42:52 +00:00
|
|
|
// Assume we have this many texture units for sourcing additional passes.
|
|
|
|
// The actual texture unit assignment is dynamic.
|
2015-09-05 12:03:00 +00:00
|
|
|
#define TEXUNIT_VIDEO_NUM 6
|
|
|
|
|
vo_opengl: refactor scaler configuration
This merges all of the scaler-related options into a single
configuration struct, and also cleans up the way they're passed through
the code. (For example, the scaler index is no longer threaded through
pass_sample, just the scaler configuration itself, and there's no longer
duplication of the params etc.)
In addition, this commit makes scale-down more principled, and turns it
into a scaler in its own right - so there's no longer an ugly separation
between scale and scale-down in the code.
Finally, the radius stuff has been made more proper - filters always
have a radius now (there's no more radius -1), and get a new .resizable
attribute instead for when it's tunable.
User-visible changes:
1. scale-down has been renamed dscale and now has its own set of config
options (dscale-param1, dscale-radius) etc., instead of reusing
scale-param1 (which was arguably a bug).
2. The default radius is no longer fixed at 3, but instead uses that
filter's preferred radius by default. (Scalers with a default radius
other than 3 include sinc, gaussian, box and triangle)
3. scale-radius etc. now goes down to 0.5, rather than 1.0. 0.5 is the
smallest radius that theoretically makes sense, and indeed it's used
by at least one filter (nearest).
Apart from that, it should just be internal changes only.
Note that this sets up for the refactor discussed in #1720, which would
be to merge scaler and window configurations (include parameters etc.)
into a single, simplified string. In the code, this would now basically
just mean getting rid of all the OPT_FLOATRANGE etc. lines related to
scalers and replacing them by a single function that parses a string and
updates the struct scaler_config as appropriate.
2015-03-26 00:55:32 +00:00
|
|
|
struct scaler_fun {
|
|
|
|
char *name;
|
|
|
|
float params[2];
|
|
|
|
float blur;
|
2016-10-26 14:32:57 +00:00
|
|
|
float taper;
|
vo_opengl: refactor scaler configuration
This merges all of the scaler-related options into a single
configuration struct, and also cleans up the way they're passed through
the code. (For example, the scaler index is no longer threaded through
pass_sample, just the scaler configuration itself, and there's no longer
duplication of the params etc.)
In addition, this commit makes scale-down more principled, and turns it
into a scaler in its own right - so there's no longer an ugly separation
between scale and scale-down in the code.
Finally, the radius stuff has been made more proper - filters always
have a radius now (there's no more radius -1), and get a new .resizable
attribute instead for when it's tunable.
User-visible changes:
1. scale-down has been renamed dscale and now has its own set of config
options (dscale-param1, dscale-radius) etc., instead of reusing
scale-param1 (which was arguably a bug).
2. The default radius is no longer fixed at 3, but instead uses that
filter's preferred radius by default. (Scalers with a default radius
other than 3 include sinc, gaussian, box and triangle)
3. scale-radius etc. now goes down to 0.5, rather than 1.0. 0.5 is the
smallest radius that theoretically makes sense, and indeed it's used
by at least one filter (nearest).
Apart from that, it should just be internal changes only.
Note that this sets up for the refactor discussed in #1720, which would
be to merge scaler and window configurations (include parameters etc.)
into a single, simplified string. In the code, this would now basically
just mean getting rid of all the OPT_FLOATRANGE etc. lines related to
scalers and replacing them by a single function that parses a string and
updates the struct scaler_config as appropriate.
2015-03-26 00:55:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct scaler_config {
|
|
|
|
struct scaler_fun kernel;
|
|
|
|
struct scaler_fun window;
|
|
|
|
float radius;
|
|
|
|
float antiring;
|
2017-07-03 09:23:48 +00:00
|
|
|
float cutoff;
|
2017-07-12 17:08:58 +00:00
|
|
|
float clamp;
|
vo_opengl: refactor scaler configuration
This merges all of the scaler-related options into a single
configuration struct, and also cleans up the way they're passed through
the code. (For example, the scaler index is no longer threaded through
pass_sample, just the scaler configuration itself, and there's no longer
duplication of the params etc.)
In addition, this commit makes scale-down more principled, and turns it
into a scaler in its own right - so there's no longer an ugly separation
between scale and scale-down in the code.
Finally, the radius stuff has been made more proper - filters always
have a radius now (there's no more radius -1), and get a new .resizable
attribute instead for when it's tunable.
User-visible changes:
1. scale-down has been renamed dscale and now has its own set of config
options (dscale-param1, dscale-radius) etc., instead of reusing
scale-param1 (which was arguably a bug).
2. The default radius is no longer fixed at 3, but instead uses that
filter's preferred radius by default. (Scalers with a default radius
other than 3 include sinc, gaussian, box and triangle)
3. scale-radius etc. now goes down to 0.5, rather than 1.0. 0.5 is the
smallest radius that theoretically makes sense, and indeed it's used
by at least one filter (nearest).
Apart from that, it should just be internal changes only.
Note that this sets up for the refactor discussed in #1720, which would
be to merge scaler and window configurations (include parameters etc.)
into a single, simplified string. In the code, this would now basically
just mean getting rid of all the OPT_FLOATRANGE etc. lines related to
scalers and replacing them by a single function that parses a string and
updates the struct scaler_config as appropriate.
2015-03-26 00:55:32 +00:00
|
|
|
};
|
|
|
|
|
2015-09-05 12:03:00 +00:00
|
|
|
struct scaler {
|
|
|
|
int index;
|
|
|
|
struct scaler_config conf;
|
|
|
|
double scale_factor;
|
|
|
|
bool initialized;
|
|
|
|
struct filter_kernel *kernel;
|
2017-07-29 18:15:59 +00:00
|
|
|
struct ra_tex *lut;
|
2015-09-05 12:03:00 +00:00
|
|
|
struct fbotex sep_fbo;
|
|
|
|
bool insufficient;
|
2015-12-05 18:54:25 +00:00
|
|
|
int lut_size;
|
2015-09-05 12:03:00 +00:00
|
|
|
|
|
|
|
// kernel points here
|
|
|
|
struct filter_kernel kernel_storage;
|
|
|
|
};
|
|
|
|
|
2016-03-05 08:42:57 +00:00
|
|
|
enum scaler_unit {
|
|
|
|
SCALER_SCALE, // luma/video
|
|
|
|
SCALER_DSCALE, // luma-video downscaling
|
|
|
|
SCALER_CSCALE, // chroma upscaling
|
|
|
|
SCALER_TSCALE, // temporal scaling (interpolation)
|
|
|
|
SCALER_COUNT
|
|
|
|
};
|
|
|
|
|
2016-05-15 22:14:02 +00:00
|
|
|
enum dither_algo {
|
|
|
|
DITHER_NONE = 0,
|
|
|
|
DITHER_FRUIT,
|
|
|
|
DITHER_ORDERED,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum alpha_mode {
|
|
|
|
ALPHA_NO = 0,
|
|
|
|
ALPHA_YES,
|
|
|
|
ALPHA_BLEND,
|
|
|
|
ALPHA_BLEND_TILES,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum blend_subs_mode {
|
|
|
|
BLEND_SUBS_NO = 0,
|
|
|
|
BLEND_SUBS_YES,
|
|
|
|
BLEND_SUBS_VIDEO,
|
|
|
|
};
|
|
|
|
|
2016-05-16 00:44:30 +00:00
|
|
|
enum tone_mapping {
|
|
|
|
TONE_MAPPING_CLIP,
|
2017-06-09 07:16:06 +00:00
|
|
|
TONE_MAPPING_MOBIUS,
|
2016-05-30 10:30:23 +00:00
|
|
|
TONE_MAPPING_REINHARD,
|
2016-05-30 10:48:01 +00:00
|
|
|
TONE_MAPPING_HABLE,
|
2016-05-16 00:44:30 +00:00
|
|
|
TONE_MAPPING_GAMMA,
|
|
|
|
TONE_MAPPING_LINEAR,
|
|
|
|
};
|
|
|
|
|
2017-07-17 19:39:06 +00:00
|
|
|
// How many frames to average over for HDR peak detection
|
|
|
|
#define PEAK_DETECT_FRAMES 100
|
|
|
|
|
2013-03-01 20:19:20 +00:00
|
|
|
struct gl_video_opts {
|
2015-09-08 20:46:36 +00:00
|
|
|
int dumb_mode;
|
vo_opengl: refactor scaler configuration
This merges all of the scaler-related options into a single
configuration struct, and also cleans up the way they're passed through
the code. (For example, the scaler index is no longer threaded through
pass_sample, just the scaler configuration itself, and there's no longer
duplication of the params etc.)
In addition, this commit makes scale-down more principled, and turns it
into a scaler in its own right - so there's no longer an ugly separation
between scale and scale-down in the code.
Finally, the radius stuff has been made more proper - filters always
have a radius now (there's no more radius -1), and get a new .resizable
attribute instead for when it's tunable.
User-visible changes:
1. scale-down has been renamed dscale and now has its own set of config
options (dscale-param1, dscale-radius) etc., instead of reusing
scale-param1 (which was arguably a bug).
2. The default radius is no longer fixed at 3, but instead uses that
filter's preferred radius by default. (Scalers with a default radius
other than 3 include sinc, gaussian, box and triangle)
3. scale-radius etc. now goes down to 0.5, rather than 1.0. 0.5 is the
smallest radius that theoretically makes sense, and indeed it's used
by at least one filter (nearest).
Apart from that, it should just be internal changes only.
Note that this sets up for the refactor discussed in #1720, which would
be to merge scaler and window configurations (include parameters etc.)
into a single, simplified string. In the code, this would now basically
just mean getting rid of all the OPT_FLOATRANGE etc. lines related to
scalers and replacing them by a single function that parses a string and
updates the struct scaler_config as appropriate.
2015-03-26 00:55:32 +00:00
|
|
|
struct scaler_config scaler[4];
|
2015-12-05 19:14:23 +00:00
|
|
|
int scaler_lut_size;
|
vo_opengl: refactor shader generation (part 2)
This adds stuff related to gamma, linear light, sigmoid, BT.2020-CL,
etc, as well as color management. Also adds a new gamma function (gamma22).
This adds new parameters to configure the CMS settings, in particular
letting us target simple colorspaces without requiring usage of a 3DLUT.
This adds smoothmotion. Mostly working, but it's still sensitive to
timing issues. It's based on an actual queue now, but the queue size
is kept small to avoid larger amounts of latency.
Also makes “upscale before blending” the default strategy.
This is justified because the "render after blending" thing doesn't seme
to work consistently any way (introduces stutter due to the way vsync
timing works, or something), so this behavior is a bit closer to master
and makes pausing/unpausing less weird/jumpy.
This adds the remaining scalers, including bicubic_fast, sharpen3,
sharpen5, polar filters and antiringing. Apparently, sharpen3/5 also
consult scale-param1, which was undocumented in master.
This also implements cropping and chroma transformation, plus
rotation/flipping. These are inherently part of the same logic, although
it's a bit rough around the edges in some case, mainly due to the fallback
code paths (for bilinear scaling without indirection).
2015-03-12 21:18:16 +00:00
|
|
|
float gamma;
|
|
|
|
int gamma_auto;
|
|
|
|
int target_prim;
|
|
|
|
int target_trc;
|
vo_opengl: implement HDR (SMPTE ST2084)
Currently, this relies on the user manually entering their display
brightness (since we have no way to detect this at runtime or from ICC
metadata). The default value of 250 was picked by looking at ~10 reviews
on tftcentral.co.uk and realizing they all come with around 250 cd/m^2
out of the box. (In addition, ITU-R Rec. BT.2022 supports this)
Since there is no metadata in FFmpeg to indicate usage of this TRC, the
only way to actually play HDR content currently is to set
``--vf=format=gamma=st2084``. (It could be guessed based on SEI, but
this is not implemented yet)
Incidentally, since SEI is ignored, it's currently assumed that all
content is scaled to 10,000 cd/m^2 (and hard-clipped where out of
range). I don't see this assumption changing much, though.
As an unfortunate consequence of the fact that we don't know the display
brightness, mixed with the fact that LittleCMS' parametric tone curves
are not flexible enough to support PQ, we have to build the 3DLUT
against gamma 2.2 if it's used. This might be a good thing, though,
consdering the PQ source space is probably not fantastic for
interpolation either way.
Partially addresses #2572.
2016-05-15 18:16:12 +00:00
|
|
|
int target_brightness;
|
2017-08-03 10:46:57 +00:00
|
|
|
int tone_mapping;
|
2017-07-17 19:39:06 +00:00
|
|
|
int compute_hdr_peak;
|
2016-05-16 00:44:30 +00:00
|
|
|
float tone_mapping_param;
|
2017-07-06 03:43:00 +00:00
|
|
|
float tone_mapping_desat;
|
2015-02-06 02:37:21 +00:00
|
|
|
int linear_scaling;
|
2015-11-07 16:49:14 +00:00
|
|
|
int correct_downscaling;
|
2015-01-06 09:47:26 +00:00
|
|
|
int sigmoid_upscaling;
|
|
|
|
float sigmoid_center;
|
|
|
|
float sigmoid_slope;
|
2013-05-25 21:47:55 +00:00
|
|
|
int scaler_resizes_only;
|
2013-03-01 20:19:20 +00:00
|
|
|
int pbo;
|
|
|
|
int dither_depth;
|
2013-05-25 23:48:39 +00:00
|
|
|
int dither_algo;
|
|
|
|
int dither_size;
|
|
|
|
int temporal_dither;
|
2015-07-20 17:09:22 +00:00
|
|
|
int temporal_dither_period;
|
2017-08-04 11:48:37 +00:00
|
|
|
char *fbo_format;
|
2013-09-19 14:55:56 +00:00
|
|
|
int alpha_mode;
|
2013-12-01 22:39:13 +00:00
|
|
|
int use_rectangle;
|
2014-12-09 20:34:01 +00:00
|
|
|
struct m_color background;
|
2015-03-13 18:30:31 +00:00
|
|
|
int interpolation;
|
2016-01-27 20:07:17 +00:00
|
|
|
float interpolation_threshold;
|
2015-03-23 01:42:19 +00:00
|
|
|
int blend_subs;
|
2016-04-20 23:33:13 +00:00
|
|
|
char **user_shaders;
|
2015-09-05 15:39:27 +00:00
|
|
|
int deband;
|
|
|
|
struct deband_opts *deband_opts;
|
2015-09-23 20:43:27 +00:00
|
|
|
float unsharp;
|
2016-10-01 10:01:57 +00:00
|
|
|
int tex_pad_x, tex_pad_y;
|
2016-06-03 18:35:17 +00:00
|
|
|
struct mp_icc_opts *icc_opts;
|
2016-10-05 10:18:44 +00:00
|
|
|
int early_flush;
|
2017-04-08 14:38:56 +00:00
|
|
|
char *shader_cache_dir;
|
2013-03-01 20:19:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern const struct m_sub_options gl_video_conf;
|
|
|
|
|
|
|
|
struct gl_video;
|
2015-07-01 17:24:28 +00:00
|
|
|
struct vo_frame;
|
2013-03-01 20:19:20 +00:00
|
|
|
|
2017-08-07 17:14:18 +00:00
|
|
|
struct gl_video *gl_video_init(struct ra *ra, struct mp_log *log,
|
|
|
|
struct mpv_global *g);
|
2013-03-01 20:19:20 +00:00
|
|
|
void gl_video_uninit(struct gl_video *p);
|
2015-03-23 15:32:59 +00:00
|
|
|
void gl_video_set_osd_source(struct gl_video *p, struct osd_state *osd);
|
2016-09-02 13:59:40 +00:00
|
|
|
void gl_video_update_options(struct gl_video *p);
|
2013-11-03 23:00:18 +00:00
|
|
|
bool gl_video_check_format(struct gl_video *p, int mp_format);
|
2013-06-07 23:35:44 +00:00
|
|
|
void gl_video_config(struct gl_video *p, struct mp_image_params *params);
|
2013-03-01 20:19:20 +00:00
|
|
|
void gl_video_set_output_depth(struct gl_video *p, int r, int g, int b);
|
2017-08-07 17:14:18 +00:00
|
|
|
void gl_video_render_frame(struct gl_video *p, struct vo_frame *frame,
|
|
|
|
struct fbodst target);
|
|
|
|
void gl_video_resize(struct gl_video *p,
|
2013-03-01 20:19:20 +00:00
|
|
|
struct mp_rect *src, struct mp_rect *dst,
|
vo_opengl: refactor shader generation (part 1)
The basic idea is to use dynamically generated shaders instead of a
single monolithic file + a ton of ifdefs. Instead of having to setup
every aspect of it separately (like compiling shaders, setting uniforms,
perfoming the actual rendering steps, the GLSL parts), we generate the
GLSL on the fly, and perform the rendering at the same time. The GLSL
is regenerated every frame, but the actual compiled OpenGL-level shaders
are cached, which makes it fast again. Almost all logic can be in a
single place.
The new code is significantly more flexible, which allows us to improve
the code clarity, performance and add more features easily.
This commit is incomplete. It drops almost all previous code, and
readds only the most important things (some of them actually buggy).
The next commit will complete it - it's separate to preserve authorship
information.
2015-03-12 20:57:54 +00:00
|
|
|
struct mp_osd_res *osd);
|
2017-08-07 17:14:18 +00:00
|
|
|
void gl_video_set_fb_depth(struct gl_video *p, int fb_depth);
|
2017-08-10 19:36:57 +00:00
|
|
|
struct voctrl_performance_data;
|
vo_opengl: refactor vo performance subsystem
This replaces `vo-performance` by `vo-passes`, bringing with it a number
of changes and improvements:
1. mpv users can now introspect the vo_opengl passes, which is something
that has been requested multiple times.
2. performance data is now measured per-pass, which helps both
development and debugging.
3. since adding more passes is cheap, we can now report information for
more passes (e.g. the blit pass, and the osd pass). Note: we also
switch to nanosecond scale, to be able to measure these passes
better.
4. `--user-shaders` authors can now describe their own passes, helping
users both identify which user shaders are active at any given time
as well as helping shader authors identify performance issues.
5. the timing data per pass is now exported as a full list of samples,
so projects like Argon-/mpv-stats can immediately read out all of the
samples and render a graph without having to manually poll this
option constantly.
Due to gl_timer's design being complicated (directly reading performance
data would block, so we delay the actual read-back until the next _start
command), it's vital not to conflate different passes that might be
doing different things from one frame to another. To accomplish this,
the actual timers are stored as part of the gl_shader_cache's sc_entry,
which makes them unique for that exact shader.
Starting and stopping the time measurement is easy to unify with the
gl_sc architecture, because the existing API already relies on a
"generate, render, reset" flow, so we can just put timer_start and
timer_stop in sc_generate and sc_reset, respectively.
The ugliest thing about this code is that due to the need to keep pass
information relatively stable in between frames, we need to distinguish
between "new" and "redrawn" frames, which bloats the code somewhat and
also feels hacky and vo_opengl-specific. (But then again, this entire
thing is vo_opengl-specific)
2017-06-29 15:00:06 +00:00
|
|
|
void gl_video_perfdata(struct gl_video *p, struct voctrl_performance_data *out);
|
2017-08-11 11:02:13 +00:00
|
|
|
void gl_video_set_clear_color(struct gl_video *p, struct m_color color);
|
2017-08-15 17:12:39 +00:00
|
|
|
void gl_video_set_osd_pts(struct gl_video *p, double pts);
|
2017-08-11 11:02:13 +00:00
|
|
|
bool gl_video_check_osd_change(struct gl_video *p, struct mp_osd_res *osd,
|
|
|
|
double pts);
|
2013-03-01 20:19:20 +00:00
|
|
|
|
2015-02-07 12:54:18 +00:00
|
|
|
float gl_video_scale_ambient_lux(float lmin, float lmax,
|
|
|
|
float rmin, float rmax, float lux);
|
|
|
|
void gl_video_set_ambient_lux(struct gl_video *p, int lux);
|
2016-06-03 18:35:17 +00:00
|
|
|
void gl_video_set_icc_profile(struct gl_video *p, bstr icc_data);
|
|
|
|
bool gl_video_icc_auto_enabled(struct gl_video *p);
|
2016-09-02 12:50:03 +00:00
|
|
|
bool gl_video_gamma_auto_enabled(struct gl_video *p);
|
|
|
|
struct mp_colorspace gl_video_get_output_colorspace(struct gl_video *p);
|
2015-02-07 12:54:18 +00:00
|
|
|
|
2014-11-23 19:06:05 +00:00
|
|
|
void gl_video_reset(struct gl_video *p);
|
2015-02-04 22:37:38 +00:00
|
|
|
bool gl_video_showing_interpolated_frame(struct gl_video *p);
|
2014-12-09 16:47:02 +00:00
|
|
|
|
vo_opengl: separate hwdec context and mapping, port it to use ra
This does two separate rather intrusive things:
1. Make the hwdec context (which does initialization, provides the
device to the decoder, and other basic state) and frame mapping
(getting textures from a mp_image) separate. This is more
flexible, and you could map multiple images at once. It will
help removing some hwdec special-casing from video.c.
2. Switch all hwdec API use to ra. Of course all code is still
GL specific, but in theory it would be possible to support other
backends. The most important change is that the hwdec interop
returns ra objects, instead of anything GL specific. This removes
the last dependency on GL-specific header files from video.c.
I'm mixing these separate changes because both requires essentially
rewriting all the glue code, so better do them at once. For the same
reason, this change isn't done incrementally.
hwdec_ios.m is untested, since I can't test it. Apart from superficial
mistakes, this also requires dealing with Apple's texture format
fuckups: they force you to use GL_LUMINANCE[_ALPHA] instead of GL_RED
and GL_RG. We also need to report the correct format via ra_tex to
the renderer, which is done by find_la_variant(). It's unknown whether
this works correctly.
hwdec_rpi.c as well as vo_rpi.c are still broken. (I need to pull my
RPI out of a dusty pile of devices and cables, so, later.)
2017-08-10 15:48:33 +00:00
|
|
|
struct ra_hwdec;
|
|
|
|
void gl_video_set_hwdec(struct gl_video *p, struct ra_hwdec *hwdec);
|
2013-03-01 20:19:20 +00:00
|
|
|
|
2015-07-16 20:43:40 +00:00
|
|
|
struct vo;
|
|
|
|
void gl_video_configure_queue(struct gl_video *p, struct vo *vo);
|
|
|
|
|
2017-08-14 17:57:44 +00:00
|
|
|
struct mp_image *gl_video_get_image(struct gl_video *p, int imgfmt, int w, int h,
|
|
|
|
int stride_align);
|
|
|
|
|
2017-07-23 07:41:51 +00:00
|
|
|
|
2013-03-01 20:19:20 +00:00
|
|
|
#endif
|