diff options
author | wm4 <wm4@nowhere> | 2012-10-27 18:01:51 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-10-28 15:31:32 +0100 |
commit | d9839fe8623c855b6b335df3a5b9783e3ed22266 (patch) | |
tree | b074361fef63d1a00b473e1859d373acb8c1e0e0 /libvo | |
parent | 1ba8090df7e64885f717133d769f59808c3c8807 (diff) | |
download | mpv-d9839fe8623c855b6b335df3a5b9783e3ed22266.tar.bz2 mpv-d9839fe8623c855b6b335df3a5b9783e3ed22266.tar.xz |
mp_image: add fields to pass colorspace down the filter chain
Note that this also adds a RGB colorspace for general symmetry. The
frontend (colormatrix property and options) and
mp_get_yuv2rgb_coeffs() don't support this.
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/csputils.c | 5 | ||||
-rw-r--r-- | libvo/csputils.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/libvo/csputils.c b/libvo/csputils.c index 5d2711b1ce..23eb099f69 100644 --- a/libvo/csputils.c +++ b/libvo/csputils.c @@ -39,6 +39,7 @@ char * const mp_csp_names[MP_CSP_COUNT] = { "BT.601 (SD)", "BT.709 (HD)", "SMPTE-240M", + "RGB", }; char * const mp_csp_equalizer_names[MP_CSP_EQ_COUNT] = { @@ -56,6 +57,7 @@ enum mp_csp avcol_spc_to_mp_csp(enum AVColorSpace colorspace) case AVCOL_SPC_BT470BG: return MP_CSP_BT_601; case AVCOL_SPC_SMPTE170M: return MP_CSP_BT_601; case AVCOL_SPC_SMPTE240M: return MP_CSP_SMPTE_240M; + case AVCOL_SPC_RGB: return MP_CSP_RGB; default: return MP_CSP_AUTO; } } @@ -75,7 +77,8 @@ enum AVColorSpace mp_csp_to_avcol_spc(enum mp_csp colorspace) case MP_CSP_BT_709: return AVCOL_SPC_BT709; case MP_CSP_BT_601: return AVCOL_SPC_BT470BG; case MP_CSP_SMPTE_240M: return AVCOL_SPC_SMPTE240M; - default: return AVCOL_SPC_RGB; + case MP_CSP_RGB: return AVCOL_SPC_RGB; + default: return AVCOL_SPC_UNSPECIFIED; } } diff --git a/libvo/csputils.h b/libvo/csputils.h index fc6b492441..d66bb86fa3 100644 --- a/libvo/csputils.h +++ b/libvo/csputils.h @@ -24,6 +24,7 @@ #ifndef MPLAYER_CSPUTILS_H #define MPLAYER_CSPUTILS_H +#include <stdbool.h> #include <stdint.h> #include "libavcodec/avcodec.h" @@ -38,6 +39,7 @@ enum mp_csp { MP_CSP_BT_601, MP_CSP_BT_709, MP_CSP_SMPTE_240M, + MP_CSP_RGB, MP_CSP_COUNT }; |