mirror of https://github.com/mpv-player/mpv
vo_xv: support video-target-params
The target colorspace depends on whether the xv adaptor supports setting BT.709 colorspace.
This commit is contained in:
parent
2af3a6e294
commit
76541db2a7
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue