2015-09-05 12:03:00 +00:00
|
|
|
/*
|
|
|
|
* This file is part of mpv.
|
|
|
|
*
|
2016-01-19 17:36:34 +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.
|
2015-09-05 12:03:00 +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-19 17:36:34 +00:00
|
|
|
* GNU Lesser General Public License for more details.
|
2015-09-05 12:03:00 +00:00
|
|
|
*
|
2016-01-19 17:36:34 +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/>.
|
2015-09-05 12:03:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MP_GL_VIDEO_SHADERS_H
|
|
|
|
#define MP_GL_VIDEO_SHADERS_H
|
|
|
|
|
2015-09-05 15:39:27 +00:00
|
|
|
#include <libavutil/lfg.h>
|
|
|
|
|
2015-09-05 12:03:00 +00:00
|
|
|
#include "utils.h"
|
|
|
|
#include "video.h"
|
|
|
|
|
2021-04-18 09:48:35 +00:00
|
|
|
struct deband_opts {
|
|
|
|
int iterations;
|
|
|
|
float threshold;
|
|
|
|
float range;
|
|
|
|
float grain;
|
|
|
|
};
|
|
|
|
|
2015-09-05 15:39:27 +00:00
|
|
|
extern const struct deband_opts deband_opts_def;
|
|
|
|
extern const struct m_sub_options deband_conf;
|
|
|
|
|
2015-09-05 12:03:00 +00:00
|
|
|
void sampler_prelude(struct gl_shader_cache *sc, int tex_num);
|
|
|
|
void pass_sample_separated_gen(struct gl_shader_cache *sc, struct scaler *scaler,
|
|
|
|
int d_x, int d_y);
|
2017-07-04 22:25:32 +00:00
|
|
|
void pass_sample_polar(struct gl_shader_cache *sc, struct scaler *scaler,
|
2017-10-02 12:10:52 +00:00
|
|
|
int components, bool sup_gather);
|
2017-07-20 09:00:06 +00:00
|
|
|
void pass_compute_polar(struct gl_shader_cache *sc, struct scaler *scaler,
|
2017-07-25 23:42:19 +00:00
|
|
|
int components, int bw, int bh, int iw, int ih);
|
2015-09-05 12:03:00 +00:00
|
|
|
void pass_sample_bicubic_fast(struct gl_shader_cache *sc);
|
|
|
|
void pass_sample_oversample(struct gl_shader_cache *sc, struct scaler *scaler,
|
|
|
|
int w, int h);
|
|
|
|
|
2023-11-04 02:55:38 +00:00
|
|
|
void pass_linearize(struct gl_shader_cache *sc, enum pl_color_transfer trc);
|
|
|
|
void pass_delinearize(struct gl_shader_cache *sc, enum pl_color_transfer trc);
|
2015-09-05 12:03:00 +00:00
|
|
|
|
2018-12-27 17:34:19 +00:00
|
|
|
void pass_color_map(struct gl_shader_cache *sc, bool is_linear,
|
2023-11-04 02:55:38 +00:00
|
|
|
struct pl_color_space src, struct pl_color_space dst,
|
|
|
|
enum mp_csp_light src_light, enum mp_csp_light dst_light,
|
2018-12-27 17:34:19 +00:00
|
|
|
const struct gl_tone_map_opts *opts);
|
2016-05-14 05:05:04 +00:00
|
|
|
|
2015-09-05 15:39:27 +00:00
|
|
|
void pass_sample_deband(struct gl_shader_cache *sc, struct deband_opts *opts,
|
2023-11-04 02:55:38 +00:00
|
|
|
AVLFG *lfg, enum pl_color_transfer trc);
|
2015-09-05 15:39:27 +00:00
|
|
|
|
2016-04-19 18:45:40 +00:00
|
|
|
void pass_sample_unsharp(struct gl_shader_cache *sc, float param);
|
2015-09-23 20:43:27 +00:00
|
|
|
|
2015-09-05 12:03:00 +00:00
|
|
|
#endif
|