diff options
Diffstat (limited to 'src/post/planar')
-rw-r--r-- | src/post/planar/boxblur.c | 2 | ||||
-rw-r--r-- | src/post/planar/denoise3d.c | 2 | ||||
-rw-r--r-- | src/post/planar/eq.c | 2 | ||||
-rw-r--r-- | src/post/planar/eq2.c | 29 | ||||
-rw-r--r-- | src/post/planar/expand.c | 2 | ||||
-rw-r--r-- | src/post/planar/fill.c | 2 | ||||
-rw-r--r-- | src/post/planar/invert.c | 2 | ||||
-rw-r--r-- | src/post/planar/noise.c | 2 | ||||
-rw-r--r-- | src/post/planar/pp.c | 6 | ||||
-rw-r--r-- | src/post/planar/unsharp.c | 2 |
10 files changed, 22 insertions, 29 deletions
diff --git a/src/post/planar/boxblur.c b/src/post/planar/boxblur.c index 988729af0..b27e7e561 100644 --- a/src/post/planar/boxblur.c +++ b/src/post/planar/boxblur.c @@ -151,7 +151,7 @@ static post_plugin_t *boxblur_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target) { - post_plugin_boxblur_t *this = (post_plugin_boxblur_t *)xine_xmalloc(sizeof(post_plugin_boxblur_t)); + post_plugin_boxblur_t *this = calloc(1, sizeof(post_plugin_boxblur_t)); post_in_t *input; xine_post_in_t *input_api; post_out_t *output; diff --git a/src/post/planar/denoise3d.c b/src/post/planar/denoise3d.c index bec59b35f..cadaafae0 100644 --- a/src/post/planar/denoise3d.c +++ b/src/post/planar/denoise3d.c @@ -191,7 +191,7 @@ static post_plugin_t *denoise3d_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target) { - post_plugin_denoise3d_t *this = (post_plugin_denoise3d_t *)xine_xmalloc(sizeof(post_plugin_denoise3d_t)); + post_plugin_denoise3d_t *this = calloc(1, sizeof(post_plugin_denoise3d_t)); post_in_t *input; xine_post_in_t *input_api; post_out_t *output; diff --git a/src/post/planar/eq.c b/src/post/planar/eq.c index e62a808c1..128616e6d 100644 --- a/src/post/planar/eq.c +++ b/src/post/planar/eq.c @@ -243,7 +243,7 @@ static post_plugin_t *eq_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target) { - post_plugin_eq_t *this = (post_plugin_eq_t *)xine_xmalloc(sizeof(post_plugin_eq_t)); + post_plugin_eq_t *this = calloc(1, sizeof(post_plugin_eq_t)); post_in_t *input; xine_post_in_t *input_api; post_out_t *output; diff --git a/src/post/planar/eq2.c b/src/post/planar/eq2.c index 42f4580d9..c47270c2f 100644 --- a/src/post/planar/eq2.c +++ b/src/post/planar/eq2.c @@ -424,7 +424,7 @@ 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; @@ -439,26 +439,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); diff --git a/src/post/planar/expand.c b/src/post/planar/expand.c index 90547163f..3cecaf47d 100644 --- a/src/post/planar/expand.c +++ b/src/post/planar/expand.c @@ -145,7 +145,7 @@ static post_plugin_t *expand_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target) { - post_expand_t *this = (post_expand_t *)xine_xmalloc(sizeof(post_expand_t)); + post_expand_t *this = calloc(1, sizeof(post_expand_t)); post_in_t *input; xine_post_in_t *input_param; post_out_t *output; diff --git a/src/post/planar/fill.c b/src/post/planar/fill.c index 6dd5ce23b..5aacfd679 100644 --- a/src/post/planar/fill.c +++ b/src/post/planar/fill.c @@ -63,7 +63,7 @@ static post_plugin_t *fill_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target) { - post_plugin_t *this = (post_plugin_t *)xine_xmalloc(sizeof(post_plugin_t)); + post_plugin_t *this = calloc(1, sizeof(post_plugin_t)); post_in_t *input; post_out_t *output; post_video_port_t *port; diff --git a/src/post/planar/invert.c b/src/post/planar/invert.c index 8c1b6103a..17f237fd7 100644 --- a/src/post/planar/invert.c +++ b/src/post/planar/invert.c @@ -64,7 +64,7 @@ static post_plugin_t *invert_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target) { - post_plugin_t *this = (post_plugin_t *)xine_xmalloc(sizeof(post_plugin_t)); + post_plugin_t *this = calloc(1, sizeof(post_plugin_t)); post_in_t *input; post_out_t *output; post_video_port_t *port; diff --git a/src/post/planar/noise.c b/src/post/planar/noise.c index efc3e49f8..cba5004d0 100644 --- a/src/post/planar/noise.c +++ b/src/post/planar/noise.c @@ -468,7 +468,7 @@ static post_plugin_t *noise_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target) { - post_plugin_noise_t *this = (post_plugin_noise_t *)xine_xmalloc(sizeof(post_plugin_noise_t)); + post_plugin_noise_t *this = calloc(1, sizeof(post_plugin_noise_t)); post_in_t *input; xine_post_in_t *input_api; post_out_t *output; diff --git a/src/post/planar/pp.c b/src/post/planar/pp.c index 6dbd74ac9..ce163aacc 100644 --- a/src/post/planar/pp.c +++ b/src/post/planar/pp.c @@ -20,6 +20,10 @@ * plugin for ffmpeg libpostprocess */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <config.h> #include <xine/xine_internal.h> @@ -168,7 +172,7 @@ static post_plugin_t *pp_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target) { - post_plugin_pp_t *this = (post_plugin_pp_t *)xine_xmalloc(sizeof(post_plugin_pp_t)); + post_plugin_pp_t *this = calloc(1, sizeof(post_plugin_pp_t)); post_in_t *input; xine_post_in_t *input_api; post_out_t *output; diff --git a/src/post/planar/unsharp.c b/src/post/planar/unsharp.c index 591f32a7b..91ac6de82 100644 --- a/src/post/planar/unsharp.c +++ b/src/post/planar/unsharp.c @@ -284,7 +284,7 @@ static post_plugin_t *unsharp_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target) { - post_plugin_unsharp_t *this = (post_plugin_unsharp_t *)xine_xmalloc(sizeof(post_plugin_unsharp_t)); + post_plugin_unsharp_t *this = calloc(1, sizeof(post_plugin_unsharp_t)); post_in_t *input; xine_post_in_t *input_api; post_out_t *output; |