summaryrefslogtreecommitdiffstats
path: root/sub
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 /sub
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 'sub')
-rw-r--r--sub/draw_bmp.c3
1 files changed, 1 insertions, 2 deletions
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;