summaryrefslogtreecommitdiffstats
path: root/options/options.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-10-20 01:54:45 +0200
committerwm4 <wm4@nowhere>2019-10-20 02:17:31 +0200
commit07aa29ed8e11797310bbc8d569cc58e29bb794e3 (patch)
tree12f04a4c2f70fdc40bf8cf7060635bccfff06935 /options/options.c
parentfd539a542f04e88a8c5b245cc3c3b80b03c2a4b7 (diff)
downloadmpv-07aa29ed8e11797310bbc8d569cc58e29bb794e3.tar.bz2
mpv-07aa29ed8e11797310bbc8d569cc58e29bb794e3.tar.xz
video: add zimg wrapper
This provides a very similar API to sws_utils.h, which can be used to convert and scale from one mp_image to another. This commit adds only the code, but does not use it anywhere. The code is quite preliminary and barely tested. It supports only a few pixel formats, and will return failure for many others. (Unlike libswscale, which tries to support anything that FFmpeg knows.) zimg itself accepts only planar formats. Supporting other formats requires manual packing/unpacking. (Compared to libswscale, the zimg API is generally lower level, but allows for more flexibility.) Only BGR0 output was actually tested. It appears to work.
Diffstat (limited to 'options/options.c')
-rw-r--r--options/options.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/options/options.c b/options/options.c
index 41c2ab76d4..d8654c2146 100644
--- a/options/options.c
+++ b/options/options.c
@@ -60,6 +60,7 @@ extern const struct m_sub_options stream_cdda_conf;
extern const struct m_sub_options stream_dvb_conf;
extern const struct m_sub_options stream_lavf_conf;
extern const struct m_sub_options sws_conf;
+extern const struct m_sub_options zimg_conf;
extern const struct m_sub_options drm_conf;
extern const struct m_sub_options demux_rawaudio_conf;
extern const struct m_sub_options demux_rawvideo_conf;
@@ -105,6 +106,9 @@ static const struct m_sub_options screenshot_conf = {
static const m_option_t mp_vo_opt_list[] = {
OPT_SETTINGSLIST("vo", video_driver_list, 0, &vo_obj_list, ),
OPT_SUBSTRUCT("sws", sws_opts, sws_conf, 0),
+#if HAVE_ZIMG
+ OPT_SUBSTRUCT("zimg", zimg_opts, zimg_conf, 0),
+#endif
OPT_FLAG("taskbar-progress", taskbar_progress, 0),
OPT_FLAG("snap-window", snap_window, 0),
OPT_FLAG("ontop", ontop, 0),