summaryrefslogtreecommitdiffstats
path: root/video/vdpau_mixer.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-06 15:21:26 +0100
committerwm4 <wm4@nowhere>2015-01-06 16:51:02 +0100
commit5410a5b2c55b5c7d9889451c1d6e56c697325a2c (patch)
treee7989451ced95a879a1d92b9037db86fa6b4c9e0 /video/vdpau_mixer.c
parenta52ca8a2b075388dc7dd5012e4e3f4871e26b133 (diff)
downloadmpv-5410a5b2c55b5c7d9889451c1d6e56c697325a2c.tar.bz2
mpv-5410a5b2c55b5c7d9889451c1d6e56c697325a2c.tar.xz
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).
Diffstat (limited to 'video/vdpau_mixer.c')
-rw-r--r--video/vdpau_mixer.c4
1 files changed, 1 insertions, 3 deletions
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);