summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
Diffstat (limited to 'video')
-rw-r--r--video/csputils.c8
-rw-r--r--video/csputils.h4
-rw-r--r--video/out/opengl/video.c2
-rw-r--r--video/out/vo_direct3d.c2
-rw-r--r--video/vdpau_mixer.c2
5 files changed, 9 insertions, 9 deletions
diff --git a/video/csputils.c b/video/csputils.c
index ff5ae3870d..fb9d971517 100644
--- a/video/csputils.c
+++ b/video/csputils.c
@@ -3,7 +3,7 @@
*
* Copyleft (C) 2009 Reimar Döffinger <Reimar.Doeffinger@gmx.de>
*
- * mp_invert_yuv2rgb based on DarkPlaces engine, original code (GPL2 or later)
+ * mp_invert_cmat based on DarkPlaces engine, original code (GPL2 or later)
*
* This file is part of mpv.
*
@@ -573,7 +573,7 @@ double mp_get_csp_mul(enum mp_csp csp, int input_bits, int texture_bits)
return (1LL << input_bits) / ((1LL << texture_bits) - 1.) * 255 / 256;
}
-/* Fill in the Y, U, V vectors of a yuv2rgb conversion matrix
+/* Fill in the Y, U, V vectors of a yuv-to-rgb conversion matrix
* based on the given luma weights of the R, G and B components (lr, lg, lb).
* lr+lg+lb is assumed to equal 1.
* This function is meant for colorspaces satisfying the following
@@ -605,7 +605,7 @@ static void luma_coeffs(struct mp_cmat *mat, float lr, float lg, float lb)
}
// get the coefficients of the yuv -> rgb conversion matrix
-void mp_get_yuv2rgb_coeffs(struct mp_csp_params *params, struct mp_cmat *m)
+void mp_get_csp_matrix(struct mp_csp_params *params, struct mp_cmat *m)
{
int colorspace = params->colorspace;
if (colorspace <= MP_CSP_AUTO || colorspace >= MP_CSP_COUNT)
@@ -767,7 +767,7 @@ int mp_csp_equalizer_set(struct mp_csp_equalizer *eq, const char *property,
return 1;
}
-void mp_invert_yuv2rgb(struct mp_cmat *out, struct mp_cmat *in)
+void mp_invert_cmat(struct mp_cmat *out, struct mp_cmat *in)
{
*out = *in;
mp_invert_matrix3x3(out->m);
diff --git a/video/csputils.h b/video/csputils.h
index 811f6bbef1..39346746c5 100644
--- a/video/csputils.h
+++ b/video/csputils.h
@@ -251,10 +251,10 @@ void mp_get_cms_matrix(struct mp_csp_primaries src, struct mp_csp_primaries dest
enum mp_render_intent intent, float cms_matrix[3][3]);
double mp_get_csp_mul(enum mp_csp csp, int input_bits, int texture_bits);
-void mp_get_yuv2rgb_coeffs(struct mp_csp_params *params, struct mp_cmat *yuv2rgb);
+void mp_get_csp_matrix(struct mp_csp_params *params, struct mp_cmat *out);
void mp_invert_matrix3x3(float m[3][3]);
-void mp_invert_yuv2rgb(struct mp_cmat *out, struct mp_cmat *in);
+void mp_invert_cmat(struct mp_cmat *out, struct mp_cmat *in);
void mp_map_fixp_color(struct mp_cmat *matrix, int ibits, int in[3],
int obits, int out[3]);
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c
index 7ac56cb414..8b7ec35478 100644
--- a/video/out/opengl/video.c
+++ b/video/out/opengl/video.c
@@ -1491,7 +1491,7 @@ static void pass_convert_yuv(struct gl_video *p)
// Conversion to RGB. For RGB itself, this still applies e.g. brightness
// and contrast controls, or expansion of e.g. LSB-packed 10 bit data.
struct mp_cmat m = {{{0}}};
- mp_get_yuv2rgb_coeffs(&cparams, &m);
+ mp_get_csp_matrix(&cparams, &m);
gl_sc_uniform_mat3(sc, "colormatrix", true, &m.m[0][0]);
gl_sc_uniform_vec3(sc, "colormatrix_c", m.c);
diff --git a/video/out/vo_direct3d.c b/video/out/vo_direct3d.c
index 76c92ca339..f9a5cb092f 100644
--- a/video/out/vo_direct3d.c
+++ b/video/out/vo_direct3d.c
@@ -1205,7 +1205,7 @@ static void update_colorspace(d3d_priv *priv)
csp.texture_bits = (csp.input_bits + 7) & ~7;
struct mp_cmat coeff;
- mp_get_yuv2rgb_coeffs(&csp, &coeff);
+ mp_get_csp_matrix(&csp, &coeff);
for (int row = 0; row < 3; row++) {
for (int col = 0; col < 3; col++)
priv->d3d_colormatrix.m[row][col] = coeff.m[row][col];
diff --git a/video/vdpau_mixer.c b/video/vdpau_mixer.c
index d568285f92..7025aef459 100644
--- a/video/vdpau_mixer.c
+++ b/video/vdpau_mixer.c
@@ -201,7 +201,7 @@ static int create_vdp_mixer(struct mp_vdpau_mixer *mixer,
struct mp_csp_params cparams = MP_CSP_PARAMS_DEFAULTS;
mp_csp_set_image_params(&cparams, &mixer->image_params);
mp_csp_copy_equalizer_values(&cparams, &mixer->video_eq);
- mp_get_yuv2rgb_coeffs(&cparams, &yuv2rgb);
+ mp_get_csp_matrix(&cparams, &yuv2rgb);
for (int r = 0; r < 3; r++) {
for (int c = 0; c < 3; c++)