Diffstat (limited to 'noncore/multimedia/opieplayer2/yuv2rgb.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/yuv2rgb.h | 56 |
1 files changed, 38 insertions, 18 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 @@ | |||
4 | 4 | ||
5 | #ifdef HAVE_MLIB | ||
6 | #include <mlib_video.h> | ||
7 | #endif | ||
8 | |||
5 | #include <inttypes.h> | 9 | #include <inttypes.h> |
@@ -24,3 +28,2 @@ typedef uint32_t (*yuv2rgb_single_pixel_fun_t) (yuv2rgb_t *this, uint8_t y, uint | |||
24 | 28 | ||
25 | |||
26 | /* | 29 | /* |
@@ -43,3 +46,2 @@ typedef uint32_t (*yuv2rgb_single_pixel_fun_t) (yuv2rgb_t *this, uint8_t y, uint | |||
43 | struct yuv2rgb_s { | 46 | struct yuv2rgb_s { |
44 | |||
45 | /* | 47 | /* |
@@ -54,2 +56,12 @@ struct yuv2rgb_s { | |||
54 | /* | 56 | /* |
57 | * start a new field or frame if dest is NULL | ||
58 | */ | ||
59 | int (*next_slice) (yuv2rgb_t *this, uint8_t **dest); | ||
60 | |||
61 | /* | ||
62 | * free resources | ||
63 | */ | ||
64 | void (*dispose) (yuv2rgb_t *this); | ||
65 | |||
66 | /* | ||
55 | * this is the function to call for the yuv2rgb and scaling process | 67 | * this is the function to call for the yuv2rgb and scaling process |
@@ -76,4 +88,5 @@ struct yuv2rgb_s { | |||
76 | int rgb_stride; | 88 | int rgb_stride; |
89 | int slice_height, slice_offset; | ||
77 | int step_dx, step_dy; | 90 | int step_dx, step_dy; |
78 | int do_scale; | 91 | int do_scale, swapped; |
79 | 92 | ||
@@ -86,2 +99,10 @@ struct yuv2rgb_s { | |||
86 | 99 | ||
100 | #ifdef HAVE_MLIB | ||
101 | uint8_t *mlib_buffer; | ||
102 | uint8_t *mlib_resize_buffer; | ||
103 | void *mlib_chunk; | ||
104 | void *mlib_resize_chunk; | ||
105 | mlib_filter mlib_filter_type; | ||
106 | #endif | ||
107 | |||
87 | void **table_rV; | 108 | void **table_rV; |
@@ -90,6 +111,6 @@ struct yuv2rgb_s { | |||
90 | void **table_bU; | 111 | void **table_bU; |
112 | void *table_mmx; | ||
91 | 113 | ||
92 | uint8_t *cmap; | 114 | uint8_t *cmap; |
93 | scale_line_func_t scale_line; | 115 | scale_line_func_t scale_line; |
94 | |||
95 | } ; | 116 | } ; |
@@ -101,15 +122,15 @@ struct yuv2rgb_s { | |||
101 | struct yuv2rgb_factory_s { | 122 | struct yuv2rgb_factory_s { |
102 | |||
103 | yuv2rgb_t* (*create_converter) (yuv2rgb_factory_t *this); | 123 | yuv2rgb_t* (*create_converter) (yuv2rgb_factory_t *this); |
104 | 124 | ||
105 | /* | 125 | /* |
106 | * adjust gamma (-100 to 100 looks fine) | 126 | * set color space conversion levels |
107 | * for all converters produced by this factory | 127 | * for all converters produced by this factory |
108 | */ | 128 | */ |
109 | void (*set_gamma) (yuv2rgb_factory_t *this, int gamma); | 129 | void (*set_csc_levels) (yuv2rgb_factory_t *this, |
130 | int brightness, int contrast, int saturation); | ||
110 | 131 | ||
111 | /* | 132 | /* |
112 | * get gamma value | 133 | * free resources |
113 | */ | 134 | */ |
114 | int (*get_gamma) (yuv2rgb_factory_t *this); | 135 | void (*dispose) (yuv2rgb_factory_t *this); |
115 | 136 | ||
@@ -121,7 +142,5 @@ struct yuv2rgb_factory_s { | |||
121 | 142 | ||
122 | int gamma; | ||
123 | int entry_size; | ||
124 | |||
125 | uint32_t matrix_coefficients; | 143 | uint32_t matrix_coefficients; |
126 | 144 | ||
145 | void *table_base; | ||
127 | void *table_rV[256]; | 146 | void *table_rV[256]; |
@@ -130,2 +149,4 @@ struct yuv2rgb_factory_s { | |||
130 | void *table_bU[256]; | 149 | void *table_bU[256]; |
150 | void *table_mmx_base; | ||
151 | void *table_mmx; | ||
131 | 152 | ||
@@ -135,3 +156,2 @@ struct yuv2rgb_factory_s { | |||
135 | yuv2rgb_single_pixel_fun_t yuv2rgb_single_pixel_fun; | 156 | yuv2rgb_single_pixel_fun_t yuv2rgb_single_pixel_fun; |
136 | |||
137 | }; | 157 | }; |
@@ -140,3 +160,3 @@ yuv2rgb_factory_t *yuv2rgb_factory_init (int mode, int swapped, uint8_t *colorma | |||
140 | 160 | ||
141 | 161 | ||
142 | /* | 162 | /* |
@@ -145,3 +165,4 @@ yuv2rgb_factory_t *yuv2rgb_factory_init (int mode, int swapped, uint8_t *colorma | |||
145 | 165 | ||
146 | void mmx_yuv2rgb_set_gamma(int gamma); | 166 | void mmx_yuv2rgb_set_csc_levels(yuv2rgb_factory_t *this, |
167 | int brightness, int contrast, int saturation); | ||
147 | void yuv2rgb_init_mmxext (yuv2rgb_factory_t *this); | 168 | void yuv2rgb_init_mmxext (yuv2rgb_factory_t *this); |
@@ -149,3 +170,2 @@ void yuv2rgb_init_mmx (yuv2rgb_factory_t *this); | |||
149 | void yuv2rgb_init_mlib (yuv2rgb_factory_t *this); | 170 | void yuv2rgb_init_mlib (yuv2rgb_factory_t *this); |
150 | void yuv2rgb_init_arm (yuv2rgb_factory_t *this); | ||
151 | 171 | ||