summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-12-09 00:08:00 +0100
committerwm4 <wm4@nowhere>2015-12-09 00:08:00 +0100
commitc2d0d7818f1045fbee5f296d614a11d25784215f (patch)
tree68e94cac3a422d1d20ea0c464f22ea965c9166c0 /demux
parent0d7d935e8863ae759f284739769f250b1302a9ec (diff)
downloadmpv-c2d0d7818f1045fbee5f296d614a11d25784215f.tar.bz2
mpv-c2d0d7818f1045fbee5f296d614a11d25784215f.tar.xz
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).
Diffstat (limited to 'demux')
-rw-r--r--demux/demux_disc.c7
1 files changed, 3 insertions, 4 deletions
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)