diff options
Diffstat (limited to 'src/post')
-rw-r--r-- | src/post/planar/Makefile.am | 24 | ||||
-rw-r--r-- | src/post/planar/noise.c | 9 |
2 files changed, 11 insertions, 22 deletions
diff --git a/src/post/planar/Makefile.am b/src/post/planar/Makefile.am index cb1ee68f9..c9a36a001 100644 --- a/src/post/planar/Makefile.am +++ b/src/post/planar/Makefile.am @@ -1,30 +1,18 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(VISIBILITY_FLAG) $(ff_cflags) +AM_CFLAGS = $(VISIBILITY_FLAG) AM_CPPFLAGS = AM_LDFLAGS = -if WITH_EXTERNAL_FFMPEG -postproc_lib = $(FFMPEG_POSTPROC_LIBS) -ff_cflags = $(FFMPEG_POSTPROC_CFLAGS) -else -AM_CPPFLAGS += -I$(top_srcdir)/contrib/ffmpeg/libpostproc -postproc_lib = $(top_builddir)/contrib/ffmpeg/libpostproc/libpostproc.a \ - $(top_builddir)/contrib/ffmpeg/libavutil/libavutil.a - -$(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 - 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) +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 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_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_POSTPROC_CFLAGS) xineplug_post_planar_la_LDFLAGS = $(AM_LDFLAGS) $(xineplug_ldflags) $(IMPURE_TEXT_LDFLAGS) diff --git a/src/post/planar/noise.c b/src/post/planar/noise.c index 53dc3065d..394b6a7b4 100644 --- a/src/post/planar/noise.c +++ b/src/post/planar/noise.c @@ -27,6 +27,8 @@ #include <math.h> #include <pthread.h> +/* libavutil from FFmpeg */ +#include <mem.h> #ifdef ARCH_X86_64 # define REG_a "rax" @@ -55,7 +57,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}; @@ -72,9 +73,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++) @@ -130,7 +130,6 @@ static int8_t *initNoise(noise_param_t *fp){ } fp->noise= noise; - fp->base = base; fp->shiftptr= 0; return noise; } @@ -525,6 +524,8 @@ static void noise_dispose(post_plugin_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); } } |