From c2d0d7818f1045fbee5f296d614a11d25784215f Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 9 Dec 2015 00:08:00 +0100 Subject: csputils: remove obscure int_bits matrix scaling This has no reason to be there. Put the functionality into another function instead. While we're at it, also adjust for possible accuracy issues with high bit depth YUV (matters for rendering subtitles into screenshots only). --- demux/demux_disc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'demux/demux_disc.c') diff --git a/demux/demux_disc.c b/demux/demux_disc.c index a816a74fa8..dd2fd866a5 100644 --- a/demux/demux_disc.c +++ b/demux/demux_disc.c @@ -93,8 +93,6 @@ static void add_dvd_streams(demuxer_t *demuxer) // emulate the extradata struct mp_csp_params csp = MP_CSP_PARAMS_DEFAULTS; - csp.int_bits_in = 8; - csp.int_bits_out = 8; struct mp_cmat cmatrix; mp_get_yuv2rgb_coeffs(&csp, &cmatrix); @@ -102,8 +100,9 @@ static void add_dvd_streams(demuxer_t *demuxer) s = talloc_asprintf_append(s, "palette: "); for (int i = 0; i < 16; i++) { int color = info.palette[i]; - int c[3] = {(color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff}; - mp_map_int_color(&cmatrix, 8, c); + int y[3] = {(color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff}; + int c[3]; + mp_map_fixp_color(&cmatrix, 8, y, 8, c); color = (c[2] << 16) | (c[1] << 8) | c[0]; if (i != 0) -- cgit v1.2.3