diff options
Diffstat (limited to 'video/csputils.h')
-rw-r--r-- | video/csputils.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/video/csputils.h b/video/csputils.h index df5da4a1c6..39346746c5 100644 --- a/video/csputils.h +++ b/video/csputils.h @@ -120,6 +120,7 @@ struct mp_csp_params { enum mp_csp colorspace; enum mp_csp_levels levels_in; // encoded video enum mp_csp_levels levels_out; // output device + enum mp_csp_prim primaries; float brightness; float contrast; float hue; @@ -130,14 +131,12 @@ struct mp_csp_params { // 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_BT_601, \ .levels_in = MP_CSP_LEVELS_TV, \ + .primaries = MP_CSP_PRIM_AUTO, \ .levels_out = MP_CSP_LEVELS_PC, \ .brightness = 0, .contrast = 1, .hue = 0, .saturation = 1, \ .gamma = 1, .texture_bits = 8, .input_bits = 8} @@ -251,12 +250,12 @@ struct mp_cmat { 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]); -void mp_get_xyz2rgb_coeffs(struct mp_csp_params *params, struct mp_csp_primaries prim, - enum mp_render_intent intent, struct mp_cmat *xyz2rgb); -void mp_get_yuv2rgb_coeffs(struct mp_csp_params *params, struct mp_cmat *yuv2rgb); +double mp_get_csp_mul(enum mp_csp csp, int input_bits, int texture_bits); +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_map_int_color(struct mp_cmat *matrix, int clip_bits, int c[3]); +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]); #endif /* MPLAYER_CSPUTILS_H */ |