Diffstat (limited to 'noncore/multimedia/opieplayer2/yuv2rgb.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/yuv2rgb.h | 50 |
1 files changed, 35 insertions, 15 deletions
diff --git a/noncore/multimedia/opieplayer2/yuv2rgb.h b/noncore/multimedia/opieplayer2/yuv2rgb.h index e453243..1833889 100644 --- a/noncore/multimedia/opieplayer2/yuv2rgb.h +++ b/noncore/multimedia/opieplayer2/yuv2rgb.h @@ -3,4 +3,8 @@ #define HAVE_YUV2RGB_h +#ifdef HAVE_MLIB +#include <mlib_video.h> +#endif + #include <inttypes.h> @@ -23,5 +27,4 @@ typedef void (*yuy22rgb_fun_t) (yuv2rgb_t *this, uint8_t * image, uint8_t * p); typedef uint32_t (*yuv2rgb_single_pixel_fun_t) (yuv2rgb_t *this, uint8_t y, uint8_t u, uint8_t v); - /* * modes supported - feel free to implement yours @@ -42,5 +45,4 @@ typedef uint32_t (*yuv2rgb_single_pixel_fun_t) (yuv2rgb_t *this, uint8_t y, uint struct yuv2rgb_s { - /* * configure converter for scaling factors @@ -53,4 +55,14 @@ struct yuv2rgb_s { /* + * start a new field or frame if dest is NULL + */ + int (*next_slice) (yuv2rgb_t *this, uint8_t **dest); + + /* + * free resources + */ + void (*dispose) (yuv2rgb_t *this); + + /* * this is the function to call for the yuv2rgb and scaling process */ @@ -75,6 +87,7 @@ struct yuv2rgb_s { int dest_width, dest_height; int rgb_stride; + int slice_height, slice_offset; int step_dx, step_dy; - int do_scale; + int do_scale, swapped; uint8_t *y_buffer; @@ -85,12 +98,20 @@ struct yuv2rgb_s { void *v_chunk; +#ifdef HAVE_MLIB + uint8_t *mlib_buffer; + uint8_t *mlib_resize_buffer; + void *mlib_chunk; + void *mlib_resize_chunk; + mlib_filter mlib_filter_type; +#endif + void **table_rV; void **table_gU; int *table_gV; void **table_bU; + void *table_mmx; uint8_t *cmap; scale_line_func_t scale_line; - } ; @@ -100,17 +121,17 @@ struct yuv2rgb_s { struct yuv2rgb_factory_s { - yuv2rgb_t* (*create_converter) (yuv2rgb_factory_t *this); /* - * adjust gamma (-100 to 100 looks fine) + * set color space conversion levels * for all converters produced by this factory */ - void (*set_gamma) (yuv2rgb_factory_t *this, int gamma); + void (*set_csc_levels) (yuv2rgb_factory_t *this, + int brightness, int contrast, int saturation); /* - * get gamma value + * free resources */ - int (*get_gamma) (yuv2rgb_factory_t *this); + void (*dispose) (yuv2rgb_factory_t *this); /* private data */ @@ -120,13 +141,13 @@ struct yuv2rgb_factory_s { uint8_t *cmap; - int gamma; - int entry_size; - uint32_t matrix_coefficients; + void *table_base; void *table_rV[256]; void *table_gU[256]; int table_gV[256]; void *table_bU[256]; + void *table_mmx_base; + void *table_mmx; /* preselected functions for mode/swap/hardware */ @@ -134,5 +155,4 @@ struct yuv2rgb_factory_s { yuy22rgb_fun_t yuy22rgb_fun; yuv2rgb_single_pixel_fun_t yuv2rgb_single_pixel_fun; - }; @@ -144,9 +164,9 @@ yuv2rgb_factory_t *yuv2rgb_factory_init (int mode, int swapped, uint8_t *colorma */ -void mmx_yuv2rgb_set_gamma(int gamma); +void mmx_yuv2rgb_set_csc_levels(yuv2rgb_factory_t *this, + int brightness, int contrast, int saturation); void yuv2rgb_init_mmxext (yuv2rgb_factory_t *this); void yuv2rgb_init_mmx (yuv2rgb_factory_t *this); void yuv2rgb_init_mlib (yuv2rgb_factory_t *this); -void yuv2rgb_init_arm (yuv2rgb_factory_t *this); #endif |