summaryrefslogtreecommitdiff
path: root/src/post/planar
diff options
context:
space:
mode:
Diffstat (limited to 'src/post/planar')
-rw-r--r--src/post/planar/Makefile.am41
-rw-r--r--src/post/planar/boxblur.c33
-rw-r--r--src/post/planar/denoise3d.c33
-rw-r--r--src/post/planar/eq.c33
-rw-r--r--src/post/planar/eq2.c33
-rw-r--r--src/post/planar/expand.c31
-rw-r--r--src/post/planar/fill.c30
-rw-r--r--src/post/planar/invert.c31
-rw-r--r--src/post/planar/noise.c49
-rw-r--r--src/post/planar/planar.c26
-rw-r--r--src/post/planar/pp.c59
-rw-r--r--src/post/planar/unsharp.c32
12 files changed, 116 insertions, 315 deletions
diff --git a/src/post/planar/Makefile.am b/src/post/planar/Makefile.am
index 319152cba..d5d122ce3 100644
--- a/src/post/planar/Makefile.am
+++ b/src/post/planar/Makefile.am
@@ -1,35 +1,20 @@
+include $(top_srcdir)/misc/Makefile.quiet
include $(top_builddir)/misc/Makefile.plugins
include $(top_srcdir)/misc/Makefile.common
-POSTPROC_INT_LIB = $(top_builddir)/src/libffmpeg/libavcodec/libpostproc/libpostprocess.la
+AM_CFLAGS = $(VISIBILITY_FLAG)
+AM_CPPFLAGS =
+AM_LDFLAGS =
-if HAVE_FFMPEG
-postproc_lib = $(FFMPEG_POSTPROC_LIBS)
-ff_cflags = $(FFMPEG_CFLAGS) $(FFMPEG_POSTPROC_CFLAGS)
-else
-ff_cflags = -I$(top_srcdir)/src/libffmpeg/libavcodec
-postproc_lib = $(POSTPROC_INT_LIB)
-postproc_dep = $(postproc_lib)
-endif
-
-# -fomit-frame-pointer is always needed. it might cause debug to not
-# work, but at least it compiles.
-AM_CFLAGS = $(ff_cflags) -fomit-frame-pointer
-
-# Avoid errors with -O0
-xineplug_post_planar_la-eq.o xineplug_post_planar_la-eq.lo: CFLAGS=`echo @CFLAGS@ | sed -e 's/-O0\?\s/-Os /g'`
-xineplug_post_planar_la-eq2.o xineplug_post_planar_la-eq2.lo: CFLAGS=`echo @CFLAGS@ | sed -e 's/-O0\?\s/-Os /g'`
-xineplug_post_planar_la-noise.o xineplug_post_planar_la-noise.lo: CFLAGS=`echo @CFLAGS@ | sed -e 's/-O0\?\s/-Os /g'`
+noinst_LTLIBRARIES = libpost_planar_asm.la
+libpost_planar_asm_la_SOURCES = eq.c eq2.c noise.c
+libpost_planar_asm_la_CFLAGS = $(O1_CFLAGS) -fomit-frame-pointer $(AM_CFLAGS) $(AVUTIL_CFLAGS)
+libpost_planar_asm_la_LIBADD = $(AVUTIL_LIBS)
xinepost_LTLIBRARIES = xineplug_post_planar.la
-
xineplug_post_planar_la_SOURCES = planar.c invert.c expand.c fill.c boxblur.c \
- denoise3d.c eq.c eq2.c unsharp.c pp.c noise.c
-xineplug_post_planar_la_DEPENDENCIES = $(postproc_dep)
-xineplug_post_planar_la_LIBADD = $(XINE_LIB) $(postproc_lib) -lm $(PTHREAD_LIBS) $(LTLIBINTL)
-xineplug_post_planar_la_LDFLAGS = $(xineplug_ldflags) \
- @IMPURE_TEXT_LDFLAGS@
-xineplug_post_planar_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
-
-$(POSTPROC_INT_LIB):
- cd $(top_builddir)/src/libffmpeg/libavcodec/libpostproc && $(MAKE) libpostprocess.la
+ denoise3d.c unsharp.c pp.c
+xineplug_post_planar_la_LIBADD = $(XINE_LIB) $(FFMPEG_POSTPROC_LIBS) -lm $(PTHREAD_LIBS) $(LTLIBINTL) $(noinst_LTLIBRARIES)
+xineplug_post_planar_la_DEPS = $(FFMPEG_POSTPROC_DEPS)
+xineplug_post_planar_la_CFLAGS = $(DEFAULT_OCFLAGS) $(AM_CFLAGS) $(FFMPEG_CFLAGS) $(FFMPEG_POSTPROC_CFLAGS)
+xineplug_post_planar_la_LDFLAGS = $(AM_LDFLAGS) $(xineplug_ldflags) $(IMPURE_TEXT_LDFLAGS)
diff --git a/src/post/planar/boxblur.c b/src/post/planar/boxblur.c
index ceeba3b40..ea3085ffd 100644
--- a/src/post/planar/boxblur.c
+++ b/src/post/planar/boxblur.c
@@ -25,9 +25,9 @@
#include "config.h"
#endif
-#include "xine_internal.h"
-#include "post.h"
-#include "xineutils.h"
+#include <xine/xine_internal.h>
+#include <xine/post.h>
+#include <xine/xineutils.h>
#include <pthread.h>
/* plugin class initialization function */
@@ -124,9 +124,6 @@ static xine_post_api_t post_api = {
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);
-static char *boxblur_get_identifier(post_class_t *class_gen);
-static char *boxblur_get_description(post_class_t *class_gen);
-static void boxblur_class_dispose(post_class_t *class_gen);
/* plugin instance functions */
static void boxblur_dispose(post_plugin_t *this_gen);
@@ -140,15 +137,15 @@ static int boxblur_draw(vo_frame_t *frame, xine_stream_t *stream);
void *boxblur_init_plugin(xine_t *xine, void *data)
{
- post_class_t *class = (post_class_t *)malloc(sizeof(post_class_t));
+ post_class_t *class = (post_class_t *)xine_xmalloc(sizeof(post_class_t));
if (!class)
return NULL;
class->open_plugin = boxblur_open_plugin;
- class->get_identifier = boxblur_get_identifier;
- class->get_description = boxblur_get_description;
- class->dispose = boxblur_class_dispose;
+ class->identifier = "boxblur";
+ class->description = N_("box blur filter from mplayer");
+ class->dispose = default_post_class_dispose;
return class;
}
@@ -198,22 +195,6 @@ static post_plugin_t *boxblur_open_plugin(post_class_t *class_gen, int inputs,
return &this->post;
}
-static char *boxblur_get_identifier(post_class_t *class_gen)
-{
- return "boxblur";
-}
-
-static char *boxblur_get_description(post_class_t *class_gen)
-{
- return "box blur filter from mplayer";
-}
-
-static void boxblur_class_dispose(post_class_t *class_gen)
-{
- free(class_gen);
-}
-
-
static void boxblur_dispose(post_plugin_t *this_gen)
{
post_plugin_boxblur_t *this = (post_plugin_boxblur_t *)this_gen;
diff --git a/src/post/planar/denoise3d.c b/src/post/planar/denoise3d.c
index 2073151b4..793a377c7 100644
--- a/src/post/planar/denoise3d.c
+++ b/src/post/planar/denoise3d.c
@@ -25,9 +25,9 @@
#include "config.h"
#endif
-#include "xine_internal.h"
-#include "post.h"
-#include "xineutils.h"
+#include <xine/xine_internal.h>
+#include <xine/post.h>
+#include <xine/xineutils.h>
#include <math.h>
#include <pthread.h>
@@ -161,9 +161,6 @@ static xine_post_api_t post_api = {
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);
-static char *denoise3d_get_identifier(post_class_t *class_gen);
-static char *denoise3d_get_description(post_class_t *class_gen);
-static void denoise3d_class_dispose(post_class_t *class_gen);
/* plugin instance functions */
static void denoise3d_dispose(post_plugin_t *this_gen);
@@ -180,15 +177,15 @@ static int denoise3d_draw(vo_frame_t *frame, xine_stream_t *stream);
void *denoise3d_init_plugin(xine_t *xine, void *data)
{
- post_class_t *class = (post_class_t *)malloc(sizeof(post_class_t));
+ post_class_t *class = (post_class_t *)xine_xmalloc(sizeof(post_class_t));
if (!class)
return NULL;
class->open_plugin = denoise3d_open_plugin;
- class->get_identifier = denoise3d_get_identifier;
- class->get_description = denoise3d_get_description;
- class->dispose = denoise3d_class_dispose;
+ class->identifier = "denoise3d";
+ class->description = N_("3D Denoiser (variable lowpass filter)");
+ class->dispose = default_post_class_dispose;
return class;
}
@@ -241,22 +238,6 @@ static post_plugin_t *denoise3d_open_plugin(post_class_t *class_gen, int inputs,
return &this->post;
}
-static char *denoise3d_get_identifier(post_class_t *class_gen)
-{
- return "denoise3d";
-}
-
-static char *denoise3d_get_description(post_class_t *class_gen)
-{
- return "3D Denoiser (variable lowpass filter)";
-}
-
-static void denoise3d_class_dispose(post_class_t *class_gen)
-{
- free(class_gen);
-}
-
-
static void denoise3d_dispose(post_plugin_t *this_gen)
{
post_plugin_denoise3d_t *this = (post_plugin_denoise3d_t *)this_gen;
diff --git a/src/post/planar/eq.c b/src/post/planar/eq.c
index 73607b8a1..dcf9b47fb 100644
--- a/src/post/planar/eq.c
+++ b/src/post/planar/eq.c
@@ -25,9 +25,9 @@
#include "config.h"
#endif
-#include "xine_internal.h"
-#include "post.h"
-#include "xineutils.h"
+#include <xine/xine_internal.h>
+#include <xine/post.h>
+#include <xine/xineutils.h>
#include <pthread.h>
@@ -212,9 +212,6 @@ static xine_post_api_t post_api = {
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);
-static char *eq_get_identifier(post_class_t *class_gen);
-static char *eq_get_description(post_class_t *class_gen);
-static void eq_class_dispose(post_class_t *class_gen);
/* plugin instance functions */
static void eq_dispose(post_plugin_t *this_gen);
@@ -232,15 +229,15 @@ static int eq_draw(vo_frame_t *frame, xine_stream_t *stream);
void *eq_init_plugin(xine_t *xine, void *data)
{
- post_class_t *class = (post_class_t *)malloc(sizeof(post_class_t));
+ post_class_t *class = (post_class_t *)xine_xmalloc(sizeof(post_class_t));
if (!class)
return NULL;
class->open_plugin = eq_open_plugin;
- class->get_identifier = eq_get_identifier;
- class->get_description = eq_get_description;
- class->dispose = eq_class_dispose;
+ class->identifier = "eq";
+ class->description = N_("soft video equalizer");
+ class->dispose = default_post_class_dispose;
return class;
}
@@ -296,22 +293,6 @@ static post_plugin_t *eq_open_plugin(post_class_t *class_gen, int inputs,
return &this->post;
}
-static char *eq_get_identifier(post_class_t *class_gen)
-{
- return "eq";
-}
-
-static char *eq_get_description(post_class_t *class_gen)
-{
- return "soft video equalizer";
-}
-
-static void eq_class_dispose(post_class_t *class_gen)
-{
- free(class_gen);
-}
-
-
static void eq_dispose(post_plugin_t *this_gen)
{
post_plugin_eq_t *this = (post_plugin_eq_t *)this_gen;
diff --git a/src/post/planar/eq2.c b/src/post/planar/eq2.c
index 542ea7bad..a3e1acac1 100644
--- a/src/post/planar/eq2.c
+++ b/src/post/planar/eq2.c
@@ -29,9 +29,9 @@
#include "config.h"
#endif
-#include "xine_internal.h"
-#include "post.h"
-#include "xineutils.h"
+#include <xine/xine_internal.h>
+#include <xine/post.h>
+#include <xine/xineutils.h>
#include <math.h>
#include <pthread.h>
@@ -393,9 +393,6 @@ static xine_post_api_t post_api = {
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);
-static char *eq2_get_identifier(post_class_t *class_gen);
-static char *eq2_get_description(post_class_t *class_gen);
-static void eq2_class_dispose(post_class_t *class_gen);
/* plugin instance functions */
static void eq2_dispose(post_plugin_t *this_gen);
@@ -413,15 +410,15 @@ static int eq2_draw(vo_frame_t *frame, xine_stream_t *stream);
void *eq2_init_plugin(xine_t *xine, void *data)
{
- post_class_t *class = (post_class_t *)malloc(sizeof(post_class_t));
+ post_class_t *class = (post_class_t *)xine_xmalloc(sizeof(post_class_t));
if (!class)
return NULL;
class->open_plugin = eq2_open_plugin;
- class->get_identifier = eq2_get_identifier;
- class->get_description = eq2_get_description;
- class->dispose = eq2_class_dispose;
+ class->identifier = "eq2";
+ class->description = N_("Software video equalizer");
+ class->dispose = default_post_class_dispose;
return class;
}
@@ -480,22 +477,6 @@ static post_plugin_t *eq2_open_plugin(post_class_t *class_gen, int inputs,
return &this->post;
}
-static char *eq2_get_identifier(post_class_t *class_gen)
-{
- return "eq2";
-}
-
-static char *eq2_get_description(post_class_t *class_gen)
-{
- return "Software video equalizer";
-}
-
-static void eq2_class_dispose(post_class_t *class_gen)
-{
- free(class_gen);
-}
-
-
static void eq2_dispose(post_plugin_t *this_gen)
{
post_plugin_eq2_t *this = (post_plugin_eq2_t *)this_gen;
diff --git a/src/post/planar/expand.c b/src/post/planar/expand.c
index cc189118f..513def84f 100644
--- a/src/post/planar/expand.c
+++ b/src/post/planar/expand.c
@@ -27,8 +27,8 @@
*
*/
-#include "xine_internal.h"
-#include "post.h"
+#include <xine/xine_internal.h>
+#include <xine/post.h>
/* The expand trick explained:
*
@@ -100,9 +100,6 @@ typedef struct post_expand_s {
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);
-static char *expand_get_identifier(post_class_t *class_gen);
-static char *expand_get_description(post_class_t *class_gen);
-static void expand_class_dispose(post_class_t *class_gen);
/* plugin instance functions */
static void expand_dispose(post_plugin_t *this_gen);
@@ -130,15 +127,15 @@ static int32_t expand_overlay_add_event(video_overlay_manager_t *this_gen
void *expand_init_plugin(xine_t *xine, void *data)
{
- post_class_t *class = (post_class_t *)malloc(sizeof(post_class_t));
+ post_class_t *class = (post_class_t *)xine_xmalloc(sizeof(post_class_t));
if (!class)
return NULL;
class->open_plugin = expand_open_plugin;
- class->get_identifier = expand_get_identifier;
- class->get_description = expand_get_description;
- class->dispose = expand_class_dispose;
+ class->identifier = "expand";
+ class->description = N_("add black borders to top and bottom of video to expand it to 4:3 aspect ratio");
+ class->dispose = default_post_class_dispose;
return class;
}
@@ -191,22 +188,6 @@ static post_plugin_t *expand_open_plugin(post_class_t *class_gen, int inputs,
return &this->post;
}
-static char *expand_get_identifier(post_class_t *class_gen)
-{
- return "expand";
-}
-
-static char *expand_get_description(post_class_t *class_gen)
-{
- return "add black borders to top and bottom of video to expand it to 4:3 aspect ratio";
-}
-
-static void expand_class_dispose(post_class_t *class_gen)
-{
- free(class_gen);
-}
-
-
static void expand_dispose(post_plugin_t *this_gen)
{
post_expand_t *this = (post_expand_t *)this_gen;
diff --git a/src/post/planar/fill.c b/src/post/planar/fill.c
index dd8b83c82..c79033a72 100644
--- a/src/post/planar/fill.c
+++ b/src/post/planar/fill.c
@@ -22,8 +22,8 @@
* based on invert.c
*/
-#include "xine_internal.h"
-#include "post.h"
+#include <xine/xine_internal.h>
+#include <xine/post.h>
/* plugin class initialization function */
void *fill_init_plugin(xine_t *xine, void *);
@@ -32,9 +32,6 @@ void *fill_init_plugin(xine_t *xine, void *);
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);
-static char *fill_get_identifier(post_class_t *class_gen);
-static char *fill_get_description(post_class_t *class_gen);
-static void fill_class_dispose(post_class_t *class_gen);
/* plugin instance functions */
static void fill_dispose(post_plugin_t *this_gen);
@@ -48,15 +45,15 @@ static int fill_draw(vo_frame_t *frame, xine_stream_t *stream);
void *fill_init_plugin(xine_t *xine, void *data)
{
- post_class_t *class = (post_class_t *)malloc(sizeof(post_class_t));
+ post_class_t *class = (post_class_t *)xine_xmalloc(sizeof(post_class_t));
if (!class)
return NULL;
class->open_plugin = fill_open_plugin;
- class->get_identifier = fill_get_identifier;
- class->get_description = fill_get_description;
- class->dispose = fill_class_dispose;
+ class->identifier = "fill";
+ class->description = N_("crops left and right of video to fill 4:3 aspect ratio");
+ class->dispose = default_post_class_dispose;
return class;
}
@@ -92,21 +89,6 @@ static post_plugin_t *fill_open_plugin(post_class_t *class_gen, int inputs,
return this;
}
-static char *fill_get_identifier(post_class_t *class_gen)
-{
- return "fill";
-}
-
-static char *fill_get_description(post_class_t *class_gen)
-{
- return "crops left and right of video to fill 4:3 aspect ratio";
-}
-
-static void fill_class_dispose(post_class_t *class_gen)
-{
- free(class_gen);
-}
-
static void fill_dispose(post_plugin_t *this)
{
if (_x_post_dispose(this))
diff --git a/src/post/planar/invert.c b/src/post/planar/invert.c
index 820221cf5..462b8fa7b 100644
--- a/src/post/planar/invert.c
+++ b/src/post/planar/invert.c
@@ -22,8 +22,8 @@
* simple video inverter plugin
*/
-#include "xine_internal.h"
-#include "post.h"
+#include <xine/xine_internal.h>
+#include <xine/post.h>
/* plugin class initialization function */
@@ -33,9 +33,6 @@ void *invert_init_plugin(xine_t *xine, void *);
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);
-static char *invert_get_identifier(post_class_t *class_gen);
-static char *invert_get_description(post_class_t *class_gen);
-static void invert_class_dispose(post_class_t *class_gen);
/* plugin instance functions */
static void invert_dispose(post_plugin_t *this_gen);
@@ -49,15 +46,15 @@ static int invert_draw(vo_frame_t *frame, xine_stream_t *stream);
void *invert_init_plugin(xine_t *xine, void *data)
{
- post_class_t *class = (post_class_t *)malloc(sizeof(post_class_t));
+ post_class_t *class = (post_class_t *)xine_xmalloc(sizeof(post_class_t));
if (!class)
return NULL;
class->open_plugin = invert_open_plugin;
- class->get_identifier = invert_get_identifier;
- class->get_description = invert_get_description;
- class->dispose = invert_class_dispose;
+ class->identifier = "invert";
+ class->description = N_("inverts the colours of every video frame");
+ class->dispose = default_post_class_dispose;
return class;
}
@@ -91,22 +88,6 @@ static post_plugin_t *invert_open_plugin(post_class_t *class_gen, int inputs,
return this;
}
-static char *invert_get_identifier(post_class_t *class_gen)
-{
- return "invert";
-}
-
-static char *invert_get_description(post_class_t *class_gen)
-{
- return "inverts the colours of every video frame";
-}
-
-static void invert_class_dispose(post_class_t *class_gen)
-{
- free(class_gen);
-}
-
-
static void invert_dispose(post_plugin_t *this)
{
if (_x_post_dispose(this))
diff --git a/src/post/planar/noise.c b/src/post/planar/noise.c
index 41a3a9aeb..471670fb9 100644
--- a/src/post/planar/noise.c
+++ b/src/post/planar/noise.c
@@ -25,12 +25,17 @@
#include "config.h"
#endif
-#include "xine_internal.h"
-#include "post.h"
-#include "xineutils.h"
+#include <xine/xine_internal.h>
+#include <xine/post.h>
+#include <xine/xineutils.h>
#include <math.h>
#include <pthread.h>
+#ifdef HAVE_FFMPEG_AVUTIL_H
+# include <mem.h>
+#else
+# include <libavutil/mem.h>
+#endif
#ifdef ARCH_X86_64
# define REG_a "rax"
@@ -61,7 +66,6 @@ typedef struct noise_param_t {
shiftptr;
int8_t *noise,
*prev_shift[MAX_RES][3];
- void *base;
} noise_param_t;
static int nonTempRandShift[MAX_RES]= {-1};
@@ -78,9 +82,8 @@ static int8_t *initNoise(noise_param_t *fp){
int pattern= fp->pattern;
int8_t *noise;
int i, j;
- void *base;
- noise = xine_xmalloc_aligned(16, MAX_NOISE*sizeof(int8_t), &base);
+ noise = av_mallocz(MAX_NOISE*sizeof(int8_t));
srand(123457);
for(i=0,j=0; i<MAX_NOISE; i++,j++)
@@ -136,7 +139,6 @@ static int8_t *initNoise(noise_param_t *fp){
}
fp->noise= noise;
- fp->base = base;
fp->shiftptr= 0;
return noise;
}
@@ -324,8 +326,8 @@ typedef struct noise_parameters_s {
type, quality, pattern;
} noise_parameters_t;
-static char *enum_types[] = {"uniform", "gaussian", NULL};
-static char *enum_quality[] = {"fixed", "temporal", "averaged temporal", NULL};
+static const char *const enum_types[] = {"uniform", "gaussian", NULL};
+static const char *const enum_quality[] = {"fixed", "temporal", "averaged temporal", NULL};
/*
* description of params struct
@@ -435,9 +437,6 @@ static xine_post_api_t post_api = {
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);
-static char *noise_get_identifier(post_class_t *class_gen);
-static char *noise_get_description(post_class_t *class_gen);
-static void noise_class_dispose(post_class_t *class_gen);
/* plugin instance functions */
static void noise_dispose(post_plugin_t *this_gen);
@@ -451,15 +450,15 @@ static int noise_draw(vo_frame_t *frame, xine_stream_t *stream);
void *noise_init_plugin(xine_t *xine, void *data)
{
- post_class_t *class = (post_class_t *)malloc(sizeof(post_class_t));
+ post_class_t *class = (post_class_t *)xine_xmalloc(sizeof(post_class_t));
if (!class)
return NULL;
class->open_plugin = noise_open_plugin;
- class->get_identifier = noise_get_identifier;
- class->get_description = noise_get_description;
- class->dispose = noise_class_dispose;
+ class->identifier = "noise";
+ class->description = N_("Adds noise");
+ class->dispose = default_post_class_dispose;
#ifdef ARCH_X86
if (xine_mm_accel() & MM_ACCEL_X86_MMX) {
@@ -521,28 +520,14 @@ static post_plugin_t *noise_open_plugin(post_class_t *class_gen, int inputs,
return &this->post;
}
-static char *noise_get_identifier(post_class_t *class_gen)
-{
- return "noise";
-}
-
-static char *noise_get_description(post_class_t *class_gen)
-{
- return "Adds noise";
-}
-
-static void noise_class_dispose(post_class_t *class_gen)
-{
- free(class_gen);
-}
-
-
static void noise_dispose(post_plugin_t *this_gen)
{
post_plugin_noise_t *this = (post_plugin_noise_t *)this_gen;
if (_x_post_dispose(this_gen)) {
pthread_mutex_destroy(&this->lock);
+ av_free(this->params[0].noise);
+ av_free(this->params[1].noise);
free(this);
}
}
diff --git a/src/post/planar/planar.c b/src/post/planar/planar.c
index 112ebdf0d..e2bd65846 100644
--- a/src/post/planar/planar.c
+++ b/src/post/planar/planar.c
@@ -24,9 +24,9 @@
#include "config.h"
#endif
-#include "xine_internal.h"
-#include "post.h"
-#include "xineutils.h"
+#include <xine/xine_internal.h>
+#include <xine/post.h>
+#include <xine/xineutils.h>
extern void *invert_init_plugin(xine_t *xine, void *);
static const post_info_t invert_special_info = { XINE_POST_TYPE_VIDEO_FILTER };
@@ -60,15 +60,15 @@ static const post_info_t noise_special_info = { XINE_POST_TYPE_VIDEO_FILTER };
const plugin_info_t xine_plugin_info[] EXPORTED = {
/* type, API, "name", version, special_info, init_function */
- { PLUGIN_POST, 9, "expand", XINE_VERSION_CODE, &expand_special_info, &expand_init_plugin },
- { PLUGIN_POST, 9, "fill", XINE_VERSION_CODE, &fill_special_info, &fill_init_plugin },
- { PLUGIN_POST, 9, "invert", XINE_VERSION_CODE, &invert_special_info, &invert_init_plugin },
- { PLUGIN_POST, 9, "eq", XINE_VERSION_CODE, &eq_special_info, &eq_init_plugin },
- { PLUGIN_POST, 9, "denoise3d", XINE_VERSION_CODE, &denoise3d_special_info, &denoise3d_init_plugin },
- { PLUGIN_POST, 9, "boxblur", XINE_VERSION_CODE, &boxblur_special_info, &boxblur_init_plugin },
- { PLUGIN_POST, 9, "eq2", XINE_VERSION_CODE, &eq2_special_info, &eq2_init_plugin },
- { PLUGIN_POST, 9, "unsharp", XINE_VERSION_CODE, &unsharp_special_info, &unsharp_init_plugin },
- { PLUGIN_POST, 9, "pp", XINE_VERSION_CODE, &pp_special_info, &pp_init_plugin },
- { PLUGIN_POST, 9, "noise", XINE_VERSION_CODE, &noise_special_info, &noise_init_plugin },
+ { PLUGIN_POST, 10, "expand", XINE_VERSION_CODE, &expand_special_info, &expand_init_plugin },
+ { PLUGIN_POST, 10, "fill", XINE_VERSION_CODE, &fill_special_info, &fill_init_plugin },
+ { PLUGIN_POST, 10, "invert", XINE_VERSION_CODE, &invert_special_info, &invert_init_plugin },
+ { PLUGIN_POST, 10, "eq", XINE_VERSION_CODE, &eq_special_info, &eq_init_plugin },
+ { PLUGIN_POST, 10, "denoise3d", XINE_VERSION_CODE, &denoise3d_special_info, &denoise3d_init_plugin },
+ { PLUGIN_POST, 10, "boxblur", XINE_VERSION_CODE, &boxblur_special_info, &boxblur_init_plugin },
+ { PLUGIN_POST, 10, "eq2", XINE_VERSION_CODE, &eq2_special_info, &eq2_init_plugin },
+ { PLUGIN_POST, 10, "unsharp", XINE_VERSION_CODE, &unsharp_special_info, &unsharp_init_plugin },
+ { PLUGIN_POST, 10, "pp", XINE_VERSION_CODE, &pp_special_info, &pp_init_plugin },
+ { PLUGIN_POST, 10, "noise", XINE_VERSION_CODE, &noise_special_info, &noise_init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
diff --git a/src/post/planar/pp.c b/src/post/planar/pp.c
index 3753c2ce2..ab1fc3a9f 100644
--- a/src/post/planar/pp.c
+++ b/src/post/planar/pp.c
@@ -24,16 +24,17 @@
#include "config.h"
#endif
-#include "xine_internal.h"
-#include "post.h"
-#include "xineutils.h"
-#include <pthread.h>
+#include <config.h>
+#include <xine/xine_internal.h>
+#include <xine/post.h>
+#include <xine/xineutils.h>
#ifdef HAVE_FFMPEG_AVUTIL_H
# include <postprocess.h>
#else
# include <libpostproc/postprocess.h>
#endif
+#include <pthread.h>
#if LIBPOSTPROC_VERSION_MAJOR < 52
# define pp_context pp_context_t
@@ -119,20 +120,19 @@ static xine_post_api_descr_t * get_param_descr (void) {
}
static char * get_help (void) {
- char *help1 =
- _("FFmpeg libpostprocess plugin.\n"
- "\n"
- "Parameters\n"
- "\n");
-
- char *help2 =
- _("\n"
- "* libpostprocess (C) Michael Niedermayer\n"
- );
static char *help = NULL;
- if( !help )
- help = _x_asprintf("%s%s%s", help1, help2, pp_help);
+ if( !help ) {
+ help = _x_asprintf("%s%s%s",
+ _("FFmpeg libpostprocess plugin.\n"
+ "\n"
+ "Parameters\n"
+ "\n"),
+ pp_help,
+ _("\n"
+ "* libpostprocess (C) Michael Niedermayer\n")
+ );
+ }
return help;
}
@@ -149,9 +149,6 @@ static xine_post_api_t post_api = {
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);
-static char *pp_get_identifier(post_class_t *class_gen);
-static char *pp_get_description(post_class_t *class_gen);
-static void pp_class_dispose(post_class_t *class_gen);
/* plugin instance functions */
static void pp_dispose(post_plugin_t *this_gen);
@@ -165,15 +162,15 @@ static int pp_draw(vo_frame_t *frame, xine_stream_t *stream);
void *pp_init_plugin(xine_t *xine, void *data)
{
- post_class_t *class = (post_class_t *)malloc(sizeof(post_class_t));
+ post_class_t *class = (post_class_t *)xine_xmalloc(sizeof(post_class_t));
if (!class)
return NULL;
class->open_plugin = pp_open_plugin;
- class->get_identifier = pp_get_identifier;
- class->get_description = pp_get_description;
- class->dispose = pp_class_dispose;
+ class->identifier = "pp";
+ class->description = N_("plugin for ffmpeg libpostprocess");
+ class->dispose = default_post_class_dispose;
return class;
}
@@ -235,22 +232,6 @@ static post_plugin_t *pp_open_plugin(post_class_t *class_gen, int inputs,
return &this->post;
}
-static char *pp_get_identifier(post_class_t *class_gen)
-{
- return "pp";
-}
-
-static char *pp_get_description(post_class_t *class_gen)
-{
- return "plugin for ffmpeg libpostprocess";
-}
-
-static void pp_class_dispose(post_class_t *class_gen)
-{
- free(class_gen);
-}
-
-
static void pp_dispose(post_plugin_t *this_gen)
{
post_plugin_pp_t *this = (post_plugin_pp_t *)this_gen;
diff --git a/src/post/planar/unsharp.c b/src/post/planar/unsharp.c
index dbf723577..ffa6a39df 100644
--- a/src/post/planar/unsharp.c
+++ b/src/post/planar/unsharp.c
@@ -25,9 +25,9 @@
#include "config.h"
#endif
-#include "xine_internal.h"
-#include "post.h"
-#include "xineutils.h"
+#include <xine/xine_internal.h>
+#include <xine/post.h>
+#include <xine/xineutils.h>
#include <pthread.h>
/*===========================================================================*/
@@ -250,9 +250,6 @@ static xine_post_api_t post_api = {
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);
-static char *unsharp_get_identifier(post_class_t *class_gen);
-static char *unsharp_get_description(post_class_t *class_gen);
-static void unsharp_class_dispose(post_class_t *class_gen);
/* plugin instance functions */
static void unsharp_dispose(post_plugin_t *this_gen);
@@ -266,15 +263,15 @@ static int unsharp_draw(vo_frame_t *frame, xine_stream_t *stream);
void *unsharp_init_plugin(xine_t *xine, void *data)
{
- post_class_t *class = (post_class_t *)malloc(sizeof(post_class_t));
+ post_class_t *class = (post_class_t *)xine_xmalloc(sizeof(post_class_t));
if (!class)
return NULL;
class->open_plugin = unsharp_open_plugin;
- class->get_identifier = unsharp_get_identifier;
- class->get_description = unsharp_get_description;
- class->dispose = unsharp_class_dispose;
+ class->identifier = "unsharp";
+ class->description = N_("unsharp mask & gaussian blur");
+ class->dispose = default_post_class_dispose;
return class;
}
@@ -329,21 +326,6 @@ static post_plugin_t *unsharp_open_plugin(post_class_t *class_gen, int inputs,
return &this->post;
}
-static char *unsharp_get_identifier(post_class_t *class_gen)
-{
- return "unsharp";
-}
-
-static char *unsharp_get_description(post_class_t *class_gen)
-{
- return "unsharp mask & gaussian blur";
-}
-
-static void unsharp_class_dispose(post_class_t *class_gen)
-{
- free(class_gen);
-}
-
static void unsharp_free_SC(post_plugin_unsharp_t *this)
{
int i;