summaryrefslogtreecommitdiffstats
path: root/libvo/csputils.h
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2011-08-29 05:38:44 +0300
committerUoti Urpala <uau@mplayer2.org>2011-08-29 06:34:36 +0300
commitb6628f4e1ece6e0b8dbd81cbfa5d6da30c73e824 (patch)
tree41474c4b26922f9e756d66da82fb3add8430c3a9 /libvo/csputils.h
parent1478f658f332df960ac8960cd16b04000ad3cb89 (diff)
downloadmpv-b6628f4e1ece6e0b8dbd81cbfa5d6da30c73e824.tar.bz2
mpv-b6628f4e1ece6e0b8dbd81cbfa5d6da30c73e824.tar.xz
csputils/vo_gl: rewrite YUV->RGB matrix generation
Rewrite the csputils.c code generating a conversion matrix for YUV->RGB conversions (currently used by vo_gl only). Functional differences: - The separate "mplayer default" colorspace is removed, and BT.601 is used instead (the default colorspace was in fact BT.601; see below). - The old code was missing chroma scaling. As a result the "mplayer default" colorspace actually mapped to BT.601, and everything else was buggy (I guess the other colorspaces were added with particular coefficient semantics, without understanding that the original "default colorspace" was actually BT.601 and why its coefficients differed from the added version). - The old code had a bug in the equalizer hue equations. - The old code assumed that for specifying whether input and output were limited-range or full-range YUV or RGB it would make sense to specify "no conversion" meaning full-range YUV to full-range RGB or limited-range YUV to limited-range RGB. This isn't true; limited- range YUV has different ranges for luma and chroma (16-235 vs 16-240) which means you have to scale chroma for limited->limited conversions. The new code assumes limited->limited conversions for the levelconv parameter 2. It'd probably make sense to change the API later to specify the ranges of input and output separately. - The undocumented EBU and XYZ colorspaces are removed. I doubt any videos use these. Also the EBU colorspace looks like it'd expect a different input range - at least no input would map to full RGB red as it was.
Diffstat (limited to 'libvo/csputils.h')
-rw-r--r--libvo/csputils.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/libvo/csputils.h b/libvo/csputils.h
index 64b23b3d57..93f9ca0316 100644
--- a/libvo/csputils.h
+++ b/libvo/csputils.h
@@ -31,15 +31,13 @@ enum mp_csp_standard {
MP_CSP_BT_601,
MP_CSP_BT_709,
MP_CSP_SMPTE_240M,
- MP_CSP_EBU,
- MP_CSP_XYZ,
MP_CSP_COUNT
};
enum mp_csp_levelconv {
MP_CSP_LEVELCONV_TV_TO_PC,
MP_CSP_LEVELCONV_PC_TO_TV,
- MP_CSP_LEVELCONV_NONE,
+ MP_CSP_LEVELCONV_TV_TO_TV,
MP_CSP_LEVELCONV_COUNT
};