From 5410a5b2c55b5c7d9889451c1d6e56c697325a2c Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 6 Jan 2015 15:21:26 +0100 Subject: csputils: move image_params -> csp_params into a function Although the line count increases, this is better for making sure everything is handled consistently for all users of the mp_csp_params stuff. This also makes sure mp_csp_params is always initialized with MP_CSP_PARAMS_DEFAULTS (for consistency). --- video/vdpau_mixer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'video/vdpau_mixer.c') diff --git a/video/vdpau_mixer.c b/video/vdpau_mixer.c index 7b45ca7f55..182e1fd40a 100644 --- a/video/vdpau_mixer.c +++ b/video/vdpau_mixer.c @@ -197,9 +197,7 @@ static int create_vdp_mixer(struct mp_vdpau_mixer *mixer) VdpCSCMatrix matrix; struct mp_csp_params cparams = MP_CSP_PARAMS_DEFAULTS; - cparams.colorspace = mixer->image_params.colorspace; - cparams.levels_in = mixer->image_params.colorlevels; - cparams.levels_out = mixer->image_params.outputlevels; + mp_csp_set_image_params(&cparams, &mixer->image_params); mp_csp_copy_equalizer_values(&cparams, &mixer->video_eq); mp_get_yuv2rgb_coeffs(&cparams, matrix); -- cgit v1.2.3