diff options
Diffstat (limited to 'src/post/planar/eq2.c')
-rw-r--r-- | src/post/planar/eq2.c | 37 |
1 files changed, 14 insertions, 23 deletions
diff --git a/src/post/planar/eq2.c b/src/post/planar/eq2.c index 6b277c347..1a301fdab 100644 --- a/src/post/planar/eq2.c +++ b/src/post/planar/eq2.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2006 the xine project + * Copyright (C) 2000-2008 the xine project * * This file is part of xine, a free video player. * @@ -25,6 +25,10 @@ * Richard Felker (original MMX contrast/brightness code (vf_eq.c)) */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "xine_internal.h" #include "post.h" #include "xineutils.h" @@ -427,13 +431,11 @@ static post_plugin_t *eq2_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target) { - post_plugin_eq2_t *this = (post_plugin_eq2_t *)xine_xmalloc(sizeof(post_plugin_eq2_t)); + post_plugin_eq2_t *this = calloc(1, sizeof(post_plugin_eq2_t)); post_in_t *input; xine_post_in_t *input_api; post_out_t *output; post_video_port_t *port; - vf_eq2_t *eq2; - int i; if (!this || !video_target || !video_target[0]) { free(this); @@ -442,26 +444,15 @@ static post_plugin_t *eq2_open_plugin(post_class_t *class_gen, int inputs, _x_post_init(&this->post, 0, 1); - eq2 = &this->eq2; - for (i = 0; i < 3; i++) { - eq2->buf[i] = NULL; - eq2->buf_w[i] = 0; - eq2->buf_h[i] = 0; - - eq2->param[i].adjust = NULL; - eq2->param[i].c = 1.0; - eq2->param[i].b = 0.0; - eq2->param[i].g = 1.0; - eq2->param[i].lut_clean = 0; - } + memset(&this->eq2, 0, sizeof(this->eq2)); - eq2->gamma = this->params.gamma = 1.0; - eq2->contrast = this->params.contrast = 1.0; - eq2->brightness = this->params.brightness = 0.0; - eq2->saturation = this->params.saturation = 1.0; - eq2->rgamma = this->params.rgamma = 1.0; - eq2->ggamma = this->params.ggamma = 1.0; - eq2->bgamma = this->params.bgamma = 1.0; + this->eq2.gamma = this->params.gamma = 1.0; + this->eq2.contrast = this->params.contrast = 1.0; + this->eq2.brightness = this->params.brightness = 0.0; + this->eq2.saturation = this->params.saturation = 1.0; + this->eq2.rgamma = this->params.rgamma = 1.0; + this->eq2.ggamma = this->params.ggamma = 1.0; + this->eq2.bgamma = this->params.bgamma = 1.0; pthread_mutex_init(&this->lock, NULL); |