diff options
author | Rudolf Polzer <divverent@xonotic.org> | 2012-10-24 19:11:42 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-10-24 21:56:29 +0200 |
commit | aa1047a35a98606c972cc35e566178703b1f2bff (patch) | |
tree | e757c045aee158cbe4bf56f3d142f80e0ef62cb0 /libvo/csputils.h | |
parent | 1282f9d79e09160af67ec13c05c0eed1ae02bd46 (diff) | |
download | mpv-aa1047a35a98606c972cc35e566178703b1f2bff.tar.bz2 mpv-aa1047a35a98606c972cc35e566178703b1f2bff.tar.xz |
sub: add helper to draw sub-bitmaps into an image
Merged by wm4 from commits 93978f17b76d..13211ef5fc20. Changed copyright
header in draw_bmp.c to "mpv", and removed the one in draw_bmp.h.
Diffstat (limited to 'libvo/csputils.h')
-rw-r--r-- | libvo/csputils.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libvo/csputils.h b/libvo/csputils.h index 4ec0f14ba2..0dd75b0549 100644 --- a/libvo/csputils.h +++ b/libvo/csputils.h @@ -133,4 +133,14 @@ 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]); + #endif /* MPLAYER_CSPUTILS_H */ |