diff options
author | wm4 <wm4@nowhere> | 2020-05-09 17:56:21 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-05-09 18:02:57 +0200 |
commit | d61ced37ae39b4a2dcd49e783f3c292a8d97b14a (patch) | |
tree | cb11fd61cfded19b3941fe3332d53e07bbcda6b1 /video/zimg.c | |
parent | 43591ba96bf4409feaac2027cfe467824bdf7260 (diff) | |
download | mpv-d61ced37ae39b4a2dcd49e783f3c292a8d97b14a.tar.bz2 mpv-d61ced37ae39b4a2dcd49e783f3c292a8d97b14a.tar.xz |
sws_utils: allow setting zimg options directly
One could wonder, why not just use the zimg wrapper directly?
Diffstat (limited to 'video/zimg.c')
-rw-r--r-- | video/zimg.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/video/zimg.c b/video/zimg.c index 22f1a1a1b1..ae3602d297 100644 --- a/video/zimg.c +++ b/video/zimg.c @@ -43,6 +43,15 @@ static const struct m_opt_choice_alternatives mp_zimg_scalers[] = { {0} }; +const struct zimg_opts zimg_opts_defaults = { + .scaler = ZIMG_RESIZE_LANCZOS, + .scaler_params = {NAN, NAN}, + .scaler_chroma_params = {NAN, NAN}, + .scaler_chroma = ZIMG_RESIZE_BILINEAR, + .dither = ZIMG_DITHER_RANDOM, + .fast = 1, +}; + #define OPT_PARAM(var) OPT_DOUBLE(var), .flags = M_OPT_DEFAULT_NAN #define OPT_BASE_STRUCT struct zimg_opts @@ -63,14 +72,7 @@ const struct m_sub_options zimg_conf = { {0} }, .size = sizeof(struct zimg_opts), - .defaults = &(const struct zimg_opts){ - .scaler = ZIMG_RESIZE_LANCZOS, - .scaler_params = {NAN, NAN}, - .scaler_chroma_params = {NAN, NAN}, - .scaler_chroma = ZIMG_RESIZE_BILINEAR, - .dither = ZIMG_DITHER_RANDOM, - .fast = 1, - }, + .defaults = &zimg_opts_defaults, }; struct mp_zimg_repack { |