diff options
author | wm4 <wm4@nowhere> | 2012-11-01 02:12:47 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-11-01 02:12:47 +0100 |
commit | 84829a4ea1903e5db5782b72861fabc503a589cb (patch) | |
tree | 26b4acbaf6dd4b255278dcc67f28bd83357c3b86 /libvo/csputils.h | |
parent | e45dd051c304dec189d0d4d792a89c2988c3fa71 (diff) | |
parent | f4069259cf7ffd24ac2a5b64e26a386185e94c7b (diff) | |
download | mpv-84829a4ea1903e5db5782b72861fabc503a589cb.tar.bz2 mpv-84829a4ea1903e5db5782b72861fabc503a589cb.tar.xz |
Merge branch 'osd_changes' into master
Conflicts:
DOCS/man/en/options.rst
Diffstat (limited to 'libvo/csputils.h')
-rw-r--r-- | libvo/csputils.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libvo/csputils.h b/libvo/csputils.h index 4ec0f14ba2..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 }; @@ -69,10 +71,20 @@ struct mp_csp_params { float rgamma; float ggamma; float bgamma; + // texture_bits/input_bits is for rescaling fixed point input to range [0,1] int texture_bits; int input_bits; + // for scaling integer input and output (if 0, assume range [0,1]) + int int_bits_in; + int int_bits_out; }; +#define MP_CSP_PARAMS_DEFAULTS { \ + .colorspace = MP_CSP_DETAILS_DEFAULTS, \ + .brightness = 0, .contrast = 1, .hue = 0, .saturation = 1, \ + .rgamma = 1, .ggamma = 1, .bgamma = 1, \ + .texture_bits = 8, .input_bits = 8} + enum mp_csp_equalizer_param { MP_CSP_EQ_BRIGHTNESS, MP_CSP_EQ_CONTRAST, @@ -133,4 +145,7 @@ void mp_gen_gamma_map(unsigned char *map, int size, float gamma); void mp_get_yuv2rgb_coeffs(struct mp_csp_params *params, float yuv2rgb[3][4]); void mp_gen_yuv2rgb_map(struct mp_csp_params *params, uint8_t *map, int size); +void mp_invert_yuv2rgb(float out[3][4], float in[3][4]); +void mp_map_int_color(float matrix[3][4], int clip_bits, int c[3]); + #endif /* MPLAYER_CSPUTILS_H */ |