summaryrefslogtreecommitdiffstats
path: root/libvo/csputils.h
diff options
context:
space:
mode:
Diffstat (limited to 'libvo/csputils.h')
-rw-r--r--libvo/csputils.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/libvo/csputils.h b/libvo/csputils.h
index 4ec0f14ba2..e4fb32e156 100644
--- a/libvo/csputils.h
+++ b/libvo/csputils.h
@@ -73,6 +73,12 @@ struct mp_csp_params {
int input_bits;
};
+#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 +139,16 @@ 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);
+#define MP_MAP_YUV2RGB_COLOR(m, y, u, v, scale, c) ((m)[c][0] * (y) + \
+ (m)[c][1] * (u) + \
+ (m)[c][2] * (v) + \
+ (m)[c][3] * (scale))
+#define MP_MAP_RGB2YUV_COLOR(minv, r, g, b, scale, c) ((minv)[c][0] * (r) + \
+ (minv)[c][1] * (g) + \
+ (minv)[c][2] * (b) + \
+ (minv)[c][3] * (scale))
+void mp_invert_yuv2rgb(float out[3][4], float in[3][4]);
+
+void mp_map_color(float matrix[3][4], uint8_t c[3]);
+
#endif /* MPLAYER_CSPUTILS_H */