mirror of https://github.com/mpv-player/mpv
vo_x11: enable use of zimg
This will perform conversion and scaling of video with zimg, if --sws-allow-zimg is used. The performance probably depends on how well the compiler optimizes the RGB pack code in zimg.c, which is written in C.
This commit is contained in:
parent
51e141f7ba
commit
d9eac493b5
|
@ -245,6 +245,7 @@ static bool resize(struct vo *vo)
|
||||||
}
|
}
|
||||||
|
|
||||||
mp_sws_set_from_cmdline(p->sws, vo->global);
|
mp_sws_set_from_cmdline(p->sws, vo->global);
|
||||||
|
p->sws->allow_zimg = true;
|
||||||
p->sws->dst = (struct mp_image_params) {
|
p->sws->dst = (struct mp_image_params) {
|
||||||
.imgfmt = fmte->mpfmt,
|
.imgfmt = fmte->mpfmt,
|
||||||
.w = p->dst_w,
|
.w = p->dst_w,
|
||||||
|
@ -376,6 +377,7 @@ static int preinit(struct vo *vo)
|
||||||
struct priv *p = vo->priv;
|
struct priv *p = vo->priv;
|
||||||
p->vo = vo;
|
p->vo = vo;
|
||||||
p->sws = mp_sws_alloc(vo);
|
p->sws = mp_sws_alloc(vo);
|
||||||
|
p->sws->log = vo->log;
|
||||||
|
|
||||||
if (!vo_x11_init(vo))
|
if (!vo_x11_init(vo))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
Loading…
Reference in New Issue