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). --- sub/draw_bmp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sub/draw_bmp.c') diff --git a/sub/draw_bmp.c b/sub/draw_bmp.c index dfbdb340b2..5e2ed41cd9 100644 --- a/sub/draw_bmp.c +++ b/sub/draw_bmp.c @@ -289,8 +289,7 @@ static void draw_ass(struct mp_draw_sub_cache *cache, struct mp_rect bb, struct mp_image *temp, int bits, struct sub_bitmaps *sbs) { struct mp_csp_params cspar = MP_CSP_PARAMS_DEFAULTS; - cspar.colorspace = temp->params.colorspace; - cspar.levels_in = temp->params.colorlevels; + mp_csp_set_image_params(&cspar, &temp->params); cspar.levels_out = MP_CSP_LEVELS_PC; // RGB (libass.color) cspar.int_bits_in = bits; cspar.int_bits_out = 8; -- cgit v1.2.3