summaryrefslogtreecommitdiffstats
path: root/video/out/vo_xv.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:13:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:13:14 +0000
commit60e8a3d404f0640fa5a3f834eae54b4f1fb9127d (patch)
tree1da89a218d0ecf010c67a87cb2f625c4cb18e7d7 /video/out/vo_xv.c
parentAdding upstream version 0.37.0. (diff)
downloadmpv-upstream/0.38.0.tar.xz
mpv-upstream/0.38.0.zip
Adding upstream version 0.38.0.upstream/0.38.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'video/out/vo_xv.c')
-rw-r--r--video/out/vo_xv.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/video/out/vo_xv.c b/video/out/vo_xv.c
index 6c776c5..d2d5b73 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))
@@ -401,7 +402,7 @@ static void read_xv_csp(struct vo *vo)
ctx->cached_csp = 0;
int bt709_enabled;
if (xv_get_eq(vo, ctx->xv_port, "bt_709", &bt709_enabled))
- ctx->cached_csp = bt709_enabled == 100 ? MP_CSP_BT_709 : MP_CSP_BT_601;
+ ctx->cached_csp = bt709_enabled == 100 ? PL_COLOR_SYSTEM_BT_709 : PL_COLOR_SYSTEM_BT_601;
}
@@ -519,10 +520,17 @@ static int reconfig(struct vo *vo, struct mp_image_params *params)
ctx->current_buf = 0;
ctx->current_ip_buf = 0;
- int is_709 = params->color.space == MP_CSP_BT_709;
+ int is_709 = params->repr.sys == PL_COLOR_SYSTEM_BT_709;
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;
@@ -652,7 +660,7 @@ static struct mp_image get_xv_buffer(struct vo *vo, int buf_index)
if (vo->params) {
struct mp_image_params params = *vo->params;
if (ctx->cached_csp)
- params.color.space = ctx->cached_csp;
+ params.repr.sys = ctx->cached_csp;
mp_image_set_attributes(&img, &params);
}