diff options
Diffstat (limited to 'src/post/planar')
-rw-r--r-- | src/post/planar/Makefile.am | 44 | ||||
-rw-r--r-- | src/post/planar/boxblur.c | 27 | ||||
-rw-r--r-- | src/post/planar/denoise3d.c | 27 | ||||
-rw-r--r-- | src/post/planar/eq.c | 27 | ||||
-rw-r--r-- | src/post/planar/eq2.c | 27 | ||||
-rw-r--r-- | src/post/planar/expand.c | 27 | ||||
-rw-r--r-- | src/post/planar/fill.c | 26 | ||||
-rw-r--r-- | src/post/planar/invert.c | 27 | ||||
-rw-r--r-- | src/post/planar/noise.c | 27 | ||||
-rw-r--r-- | src/post/planar/pp.c | 27 | ||||
-rw-r--r-- | src/post/planar/unsharp.c | 26 |
11 files changed, 60 insertions, 252 deletions
diff --git a/src/post/planar/Makefile.am b/src/post/planar/Makefile.am index 4ba6bfa41..cb1ee68f9 100644 --- a/src/post/planar/Makefile.am +++ b/src/post/planar/Makefile.am @@ -1,34 +1,30 @@ include $(top_srcdir)/misc/Makefile.common -POSTPROC_INT_LIB = $(top_builddir)/src/libffmpeg/libavcodec/libpostproc/libpostprocess.la +AM_CFLAGS = $(VISIBILITY_FLAG) $(ff_cflags) +AM_CPPFLAGS = +AM_LDFLAGS = -if HAVE_FFMPEG +if WITH_EXTERNAL_FFMPEG postproc_lib = $(FFMPEG_POSTPROC_LIBS) -ff_cflags = $(FFMPEG_POSTPROC_CFLAGS) +ff_cflags = $(FFMPEG_POSTPROC_CFLAGS) else -ff_cflags = -I$(top_srcdir)/src/libffmpeg/libavcodec/libpostproc -postproc_lib = $(POSTPROC_INT_LIB) -postproc_dep = $(postproc_lib) -endif +AM_CPPFLAGS += -I$(top_srcdir)/contrib/ffmpeg/libpostproc +postproc_lib = $(top_builddir)/contrib/ffmpeg/libpostproc/libpostproc.a \ + $(top_builddir)/contrib/ffmpeg/libavutil/libavutil.a -# -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 +$(top_builddir)/contrib/ffmpeg/libpostproc/libpostproc.a: + $(MAKE) -C $(top_builddir)/contrib ffmpeg/libpostproc/libpostproc.a +$(top_builddir)/contrib/ffmpeg/libavutil/libavutil.a: + $(MAKE) -C $(top_builddir)/contrib ffmpeg/libavutil/libavutil.a +endif -# 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) 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 = -avoid-version -module \ - @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) $(postproc_lib) -lm $(PTHREAD_LIBS) $(LTLIBINTL) $(noinst_LTLIBRARIES) +xineplug_post_planar_la_CFLAGS = $(DEFAULT_OCFLAGS) $(AM_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 b7a6f524f..225e75954 100644 --- a/src/post/planar/boxblur.c +++ b/src/post/planar/boxblur.c @@ -120,9 +120,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); @@ -136,15 +133,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; } @@ -194,22 +191,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 fb3c1102b..fb7021ece 100644 --- a/src/post/planar/denoise3d.c +++ b/src/post/planar/denoise3d.c @@ -157,9 +157,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); @@ -176,15 +173,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; } @@ -237,22 +234,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 b2cf6e50f..03f647d68 100644 --- a/src/post/planar/eq.c +++ b/src/post/planar/eq.c @@ -208,9 +208,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); @@ -228,15 +225,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; } @@ -292,22 +289,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 6b277c347..ceb9f9024 100644 --- a/src/post/planar/eq2.c +++ b/src/post/planar/eq2.c @@ -389,9 +389,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); @@ -409,15 +406,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; } @@ -489,22 +486,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 67d449153..db62a5512 100644 --- a/src/post/planar/expand.c +++ b/src/post/planar/expand.c @@ -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 32a9d5dfb..62fdc1381 100644 --- a/src/post/planar/fill.c +++ b/src/post/planar/fill.c @@ -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 1aa5c2a2e..b5ee1e3f2 100644 --- a/src/post/planar/invert.c +++ b/src/post/planar/invert.c @@ -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 8c04f2e72..afe05b180 100644 --- a/src/post/planar/noise.c +++ b/src/post/planar/noise.c @@ -429,9 +429,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); @@ -445,15 +442,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) { @@ -515,22 +512,6 @@ 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; diff --git a/src/post/planar/pp.c b/src/post/planar/pp.c index e13119311..3f9c0d745 100644 --- a/src/post/planar/pp.c +++ b/src/post/planar/pp.c @@ -135,9 +135,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); @@ -151,15 +148,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; } @@ -221,22 +218,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 b9b791a8e..ff86f21bc 100644 --- a/src/post/planar/unsharp.c +++ b/src/post/planar/unsharp.c @@ -253,9 +253,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); @@ -269,15 +266,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; } @@ -332,21 +329,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; |