summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/yuv2rgb.h
Side-by-side diff
Diffstat (limited to 'noncore/multimedia/opieplayer2/yuv2rgb.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/yuv2rgb.h50
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
@@ -4,2 +4,6 @@
+#ifdef HAVE_MLIB
+#include <mlib_video.h>
+#endif
+
#include <inttypes.h>
@@ -24,3 +28,2 @@ typedef uint32_t (*yuv2rgb_single_pixel_fun_t) (yuv2rgb_t *this, uint8_t y, uint
-
/*
@@ -43,3 +46,2 @@ typedef uint32_t (*yuv2rgb_single_pixel_fun_t) (yuv2rgb_t *this, uint8_t y, uint
struct yuv2rgb_s {
-
/*
@@ -54,2 +56,12 @@ 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
@@ -76,4 +88,5 @@ struct yuv2rgb_s {
int rgb_stride;
+ int slice_height, slice_offset;
int step_dx, step_dy;
- int do_scale;
+ int do_scale, swapped;
@@ -86,2 +99,10 @@ struct yuv2rgb_s {
+#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;
@@ -90,2 +111,3 @@ struct yuv2rgb_s {
void **table_bU;
+ void *table_mmx;
@@ -93,3 +115,2 @@ struct yuv2rgb_s {
scale_line_func_t scale_line;
-
} ;
@@ -101,3 +122,2 @@ struct yuv2rgb_s {
struct yuv2rgb_factory_s {
-
yuv2rgb_t* (*create_converter) (yuv2rgb_factory_t *this);
@@ -105,11 +125,12 @@ struct yuv2rgb_factory_s {
/*
- * 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);
@@ -121,7 +142,5 @@ struct yuv2rgb_factory_s {
- int gamma;
- int entry_size;
-
uint32_t matrix_coefficients;
+ void *table_base;
void *table_rV[256];
@@ -130,2 +149,4 @@ struct yuv2rgb_factory_s {
void *table_bU[256];
+ void *table_mmx_base;
+ void *table_mmx;
@@ -135,3 +156,2 @@ struct yuv2rgb_factory_s {
yuv2rgb_single_pixel_fun_t yuv2rgb_single_pixel_fun;
-
};
@@ -145,3 +165,4 @@ 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);
@@ -149,3 +170,2 @@ void yuv2rgb_init_mmx (yuv2rgb_factory_t *this);
void yuv2rgb_init_mlib (yuv2rgb_factory_t *this);
-void yuv2rgb_init_arm (yuv2rgb_factory_t *this);