Diffstat (limited to 'noncore/multimedia/opieplayer2/yuv2rgb.c') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/yuv2rgb.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/noncore/multimedia/opieplayer2/yuv2rgb.c b/noncore/multimedia/opieplayer2/yuv2rgb.c index 22bb4cb..e8e86e6 100644 --- a/noncore/multimedia/opieplayer2/yuv2rgb.c +++ b/noncore/multimedia/opieplayer2/yuv2rgb.c @@ -3042,58 +3042,57 @@ yuv2rgb_t *yuv2rgb_create_converter (yuv2rgb_factory_t *factory) { yuv2rgb_t *this = xine_xmalloc (sizeof (yuv2rgb_t)); this->cmap = factory->cmap; this->y_chunk = this->y_buffer = NULL; this->u_chunk = this->u_buffer = NULL; this->v_chunk = this->v_buffer = NULL; this->table_rV = factory->table_rV; this->table_gU = factory->table_gU; this->table_gV = factory->table_gV; this->table_bU = factory->table_bU; this->yuv2rgb_fun = factory->yuv2rgb_fun; this->yuy22rgb_fun = factory->yuy22rgb_fun; this->yuv2rgb_single_pixel_fun = factory->yuv2rgb_single_pixel_fun; this->configure = yuv2rgb_configure; return this; } /* * factory functions */ - void yuv2rgb_set_gamma (yuv2rgb_factory_t *this, int gamma) { - - int i; - - for (i = 0; i < 256; i++) { - (uint8_t *)this->table_rV[i] += this->entry_size*(gamma - this->gamma); - (uint8_t *)this->table_gU[i] += this->entry_size*(gamma - this->gamma); - (uint8_t *)this->table_bU[i] += this->entry_size*(gamma - this->gamma); - } + + int i; + + for (i = 0; i < 256; i++) { + (uint8_t *)this->table_rV[i] += this->entry_size*(gamma - this->gamma); + (uint8_t *)this->table_gU[i] += this->entry_size*(gamma - this->gamma); + (uint8_t *)this->table_bU[i] += this->entry_size*(gamma - this->gamma); + } #ifdef ARCH_X86 mmx_yuv2rgb_set_gamma(gamma); #endif this->gamma = gamma; } int yuv2rgb_get_gamma (yuv2rgb_factory_t *this) { return this->gamma; } yuv2rgb_factory_t* yuv2rgb_factory_init (int mode, int swapped, uint8_t *cmap) { yuv2rgb_factory_t *this; #ifdef ARCH_X86 uint32_t mm = xine_mm_accel(); #endif this = malloc (sizeof (yuv2rgb_factory_t)); this->mode = mode; this->swapped = swapped; |