2014-04-29 13:07:21 +00:00
|
|
|
#ifndef MP_VDPAU_MIXER_H_
|
|
|
|
#define MP_VDPAU_MIXER_H_
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
video: redo video equalizer option handling
I really wouldn't care much about this, but some parts of the core code
are under HAVE_GPL, so there's some need to get rid of it. Simply turn
the video equalizer from its current fine-grained handling with vf/vo
fallbacks into global options. This makes updating them much simpler.
This removes any possibility of applying video equalizers in filters,
which affects vf_scale, and the previously removed vf_eq. Not a big
loss, since the preferred VOs have this builtin.
Remove video equalizer handling from vo_direct3d, vo_sdl, vo_vaapi, and
vo_xv. I'm not going to waste my time on these legacy VOs.
vo.eq_opts_cache exists _only_ to send a VOCTRL_SET_EQUALIZER, which
exists _only_ to trigger a redraw. This seems silly, but for now I feel
like this is less of a pain. The rest of the equalizer using code is
self-updating.
See commit 96b906a51d5 for how some video equalizer code was GPL only.
Some command line option names and ranges can probably be traced back to
a GPL only committer, but we don't consider these copyrightable.
2017-08-22 15:01:35 +00:00
|
|
|
#include "csputils.h"
|
2014-04-29 13:07:21 +00:00
|
|
|
#include "mp_image.h"
|
|
|
|
#include "vdpau.h"
|
|
|
|
|
|
|
|
struct mp_vdpau_mixer_opts {
|
|
|
|
int deint;
|
2023-02-20 03:32:50 +00:00
|
|
|
bool chroma_deint;
|
|
|
|
bool pullup;
|
2014-04-29 13:07:21 +00:00
|
|
|
float denoise;
|
|
|
|
float sharpen;
|
|
|
|
int hqscaling;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define MP_VDP_HISTORY_FRAMES 2
|
|
|
|
|
|
|
|
struct mp_vdpau_mixer_frame {
|
|
|
|
// settings
|
|
|
|
struct mp_vdpau_mixer_opts opts;
|
|
|
|
// video data
|
|
|
|
VdpVideoMixerPictureStructure field;
|
|
|
|
VdpVideoSurface past[MP_VDP_HISTORY_FRAMES];
|
|
|
|
VdpVideoSurface current;
|
|
|
|
VdpVideoSurface future[MP_VDP_HISTORY_FRAMES];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct mp_vdpau_mixer {
|
|
|
|
struct mp_log *log;
|
|
|
|
struct mp_vdpau_ctx *ctx;
|
2016-05-03 11:56:11 +00:00
|
|
|
uint64_t preemption_counter;
|
2014-04-29 13:07:21 +00:00
|
|
|
bool initialized;
|
|
|
|
|
|
|
|
struct mp_image_params image_params;
|
|
|
|
struct mp_vdpau_mixer_opts opts;
|
2015-05-28 19:54:02 +00:00
|
|
|
|
|
|
|
VdpChromaType current_chroma_type;
|
|
|
|
int current_w, current_h;
|
2014-04-29 13:07:21 +00:00
|
|
|
|
video: redo video equalizer option handling
I really wouldn't care much about this, but some parts of the core code
are under HAVE_GPL, so there's some need to get rid of it. Simply turn
the video equalizer from its current fine-grained handling with vf/vo
fallbacks into global options. This makes updating them much simpler.
This removes any possibility of applying video equalizers in filters,
which affects vf_scale, and the previously removed vf_eq. Not a big
loss, since the preferred VOs have this builtin.
Remove video equalizer handling from vo_direct3d, vo_sdl, vo_vaapi, and
vo_xv. I'm not going to waste my time on these legacy VOs.
vo.eq_opts_cache exists _only_ to send a VOCTRL_SET_EQUALIZER, which
exists _only_ to trigger a redraw. This seems silly, but for now I feel
like this is less of a pain. The rest of the equalizer using code is
self-updating.
See commit 96b906a51d5 for how some video equalizer code was GPL only.
Some command line option names and ranges can probably be traced back to
a GPL only committer, but we don't consider these copyrightable.
2017-08-22 15:01:35 +00:00
|
|
|
struct mp_csp_equalizer_state *video_eq;
|
2014-04-29 13:07:21 +00:00
|
|
|
|
|
|
|
VdpVideoMixer video_mixer;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct mp_image *mp_vdpau_mixed_frame_create(struct mp_image *base);
|
|
|
|
|
|
|
|
struct mp_vdpau_mixer_frame *mp_vdpau_mixed_frame_get(struct mp_image *mpi);
|
|
|
|
|
|
|
|
struct mp_vdpau_mixer *mp_vdpau_mixer_create(struct mp_vdpau_ctx *vdp_ctx,
|
|
|
|
struct mp_log *log);
|
|
|
|
void mp_vdpau_mixer_destroy(struct mp_vdpau_mixer *mixer);
|
|
|
|
|
|
|
|
int mp_vdpau_mixer_render(struct mp_vdpau_mixer *mixer,
|
2014-04-29 13:12:38 +00:00
|
|
|
struct mp_vdpau_mixer_opts *opts,
|
2014-04-29 13:07:21 +00:00
|
|
|
VdpOutputSurface output, VdpRect *output_rect,
|
|
|
|
struct mp_image *video, VdpRect *video_rect);
|
|
|
|
|
|
|
|
#endif
|