summaryrefslogtreecommitdiffstats
path: root/sub/sd_lavc.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-06 16:49:53 +0100
committerwm4 <wm4@nowhere>2015-01-06 16:51:06 +0100
commitd42d60bc1e0a1c3b472b21d3cd203279879f7d95 (patch)
tree5e3cc92bc64309acae00dc67312b56cc5873822c /sub/sd_lavc.c
parent5410a5b2c55b5c7d9889451c1d6e56c697325a2c (diff)
downloadmpv-d42d60bc1e0a1c3b472b21d3cd203279879f7d95.tar.bz2
mpv-d42d60bc1e0a1c3b472b21d3cd203279879f7d95.tar.xz
csputils: replace float[3][4] with a struct
Not being able to use the 3x3 part of the matrix was annoying, so split it into a float[3][3] matrix and a separate float[3] constant vector.
Diffstat (limited to 'sub/sd_lavc.c')
-rw-r--r--sub/sd_lavc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sub/sd_lavc.c b/sub/sd_lavc.c
index 0a969efc41..4bdd6ea548 100644
--- a/sub/sd_lavc.c
+++ b/sub/sd_lavc.c
@@ -112,10 +112,10 @@ static void set_mp4_vobsub_idx(AVCodecContext *avctx, char *src, int w, int h)
struct mp_csp_params csp = MP_CSP_PARAMS_DEFAULTS;
csp.int_bits_in = 8;
csp.int_bits_out = 8;
- float cmatrix[3][4];
- mp_get_yuv2rgb_coeffs(&csp, cmatrix);
+ struct mp_cmat cmatrix;
+ mp_get_yuv2rgb_coeffs(&csp, &cmatrix);
int c[3] = {(e >> 16) & 0xff, (e >> 8) & 0xff, e & 0xff};
- mp_map_int_color(cmatrix, 8, c);
+ mp_map_int_color(&cmatrix, 8, c);
e = (c[2] << 16) | (c[1] << 8) | c[0];
snprintf(pal_s + pal_s_pos, sizeof(pal_s) - pal_s_pos, "%06x%s", e,