diff options
author | nanahi <130121847+na-na-hi@users.noreply.github.com> | 2024-03-24 09:05:37 -0400 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2024-03-27 22:08:56 +0100 |
commit | 76541db2a73798414e0d4dc80070be2a815b30fb (patch) | |
tree | 86f841c565fbc86de4bb561c2efbcebbdb6ea024 | |
parent | 2af3a6e294e829191dfa0c41396ecd6384d405d9 (diff) | |
download | mpv-76541db2a73798414e0d4dc80070be2a815b30fb.tar.bz2 mpv-76541db2a73798414e0d4dc80070be2a815b30fb.tar.xz |
vo_xv: support video-target-params
The target colorspace depends on whether the xv adaptor supports
setting BT.709 colorspace.
-rw-r--r-- | video/out/vo_xv.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/video/out/vo_xv.c b/video/out/vo_xv.c index 378602b655..d2d5b737e7 100644 --- a/video/out/vo_xv.c +++ b/video/out/vo_xv.c @@ -92,6 +92,7 @@ struct xvctx { int Shmem_Flag; XShmSegmentInfo Shminfo[MAX_BUFFERS]; int Shm_Warned_Slow; + struct mp_image_params dst_params; }; #define MP_FOURCC(a,b,c,d) ((a) | ((b)<<8) | ((c)<<16) | ((unsigned)(d)<<24)) @@ -523,6 +524,13 @@ static int reconfig(struct vo *vo, struct mp_image_params *params) xv_set_eq(vo, ctx->xv_port, "bt_709", is_709 * 200 - 100); read_xv_csp(vo); + ctx->dst_params = *params; + if (ctx->cached_csp) + ctx->dst_params.repr.sys = ctx->cached_csp; + mp_mutex_lock(&vo->params_mutex); + vo->target_params = &ctx->dst_params; + mp_mutex_unlock(&vo->params_mutex); + resize(vo); return 0; |