aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2011-06-01 21:24:16 +0200
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2011-06-02 08:38:09 +0200
commit3379531c401b457c9f7437ee0db772da75fd1765 (patch)
treefe0ec300b6c0940362c7bd06ddd2ecb3bfd30a43
parent2a30df09fd64634ad1b70485cd665ad05116730c (diff)
downloadffmpeg-3379531c401b457c9f7437ee0db772da75fd1765.tar.gz
Port recent changes to MPlayer libmpcodecs.
Also include an older fix for vf_smartblur which was essentially broken due to reading the threshold value wrongly.
-rw-r--r--libavfilter/libmpcodecs/vf_divtc.c3
-rw-r--r--libavfilter/libmpcodecs/vf_ilpack.c13
-rw-r--r--libavfilter/libmpcodecs/vf_pp7.c4
-rw-r--r--libavfilter/libmpcodecs/vf_smartblur.c4
-rw-r--r--libavfilter/libmpcodecs/vf_unsharp.c2
5 files changed, 15 insertions, 11 deletions
diff --git a/libavfilter/libmpcodecs/vf_divtc.c b/libavfilter/libmpcodecs/vf_divtc.c
index 3ead47290d..4c171d1728 100644
--- a/libavfilter/libmpcodecs/vf_divtc.c
+++ b/libavfilter/libmpcodecs/vf_divtc.c
@@ -598,7 +598,8 @@ static void uninit(struct vf_instance *vf)
static int vf_open(vf_instance_t *vf, char *args)
{
struct vf_priv_s *p;
- char *filename="framediff.log", *ap, *q, *a;
+ const char *filename="framediff.log";
+ char *ap, *q, *a;
if(args && !(args=av_strdup(args)))
{
diff --git a/libavfilter/libmpcodecs/vf_ilpack.c b/libavfilter/libmpcodecs/vf_ilpack.c
index 77555a7b41..db4a849e1f 100644
--- a/libavfilter/libmpcodecs/vf_ilpack.c
+++ b/libavfilter/libmpcodecs/vf_ilpack.c
@@ -28,6 +28,7 @@
#include "img_format.h"
#include "mp_image.h"
#include "vf.h"
+#include "libavutil/attributes.h"
typedef void (pack_func_t)(unsigned char *dst, unsigned char *y,
unsigned char *u, unsigned char *v, int w, int us, int vs);
@@ -38,7 +39,8 @@ struct vf_priv_s {
};
static void pack_nn_C(unsigned char *dst, unsigned char *y,
- unsigned char *u, unsigned char *v, int w)
+ unsigned char *u, unsigned char *v, int w,
+ int av_unused us, int av_unused vs)
{
int j;
for (j = w/2; j; j--) {
@@ -77,7 +79,8 @@ static void pack_li_1_C(unsigned char *dst, unsigned char *y,
#if HAVE_MMX
static void pack_nn_MMX(unsigned char *dst, unsigned char *y,
- unsigned char *u, unsigned char *v, int w)
+ unsigned char *u, unsigned char *v, int w,
+ int av_unused us, int av_unused vs)
{
__asm__ volatile (""
ASMALIGN(4)
@@ -103,7 +106,7 @@ static void pack_nn_MMX(unsigned char *dst, unsigned char *y,
: "r" (y), "r" (u), "r" (v), "r" (dst), "r" (w/8)
: "memory"
);
- pack_nn_C(dst, y, u, v, (w&7));
+ pack_nn_C(dst, y, u, v, (w&7), 0, 0);
}
#if HAVE_EBX_AVAILABLE
@@ -413,12 +416,12 @@ static int vf_open(vf_instance_t *vf, char *args)
vf->priv->mode = 1;
if (args) sscanf(args, "%d", &vf->priv->mode);
- pack_nn = (pack_func_t *)pack_nn_C;
+ pack_nn = pack_nn_C;
pack_li_0 = pack_li_0_C;
pack_li_1 = pack_li_1_C;
#if HAVE_MMX
if(gCpuCaps.hasMMX) {
- pack_nn = (pack_func_t *)pack_nn_MMX;
+ pack_nn = pack_nn_MMX;
#if HAVE_EBX_AVAILABLE
pack_li_0 = pack_li_0_MMX;
pack_li_1 = pack_li_1_MMX;
diff --git a/libavfilter/libmpcodecs/vf_pp7.c b/libavfilter/libmpcodecs/vf_pp7.c
index f8b64b658a..c075d6619c 100644
--- a/libavfilter/libmpcodecs/vf_pp7.c
+++ b/libavfilter/libmpcodecs/vf_pp7.c
@@ -286,8 +286,8 @@ static void filter(struct vf_priv_s *p, uint8_t *dst, uint8_t *src, int dst_stri
int x, y;
const int stride= is_luma ? p->temp_stride : ((width+16+15)&(~15));
uint8_t *p_src= p->src + 8*stride;
- DCTELEM *block= p->src;
- DCTELEM *temp= p->src + 32;
+ DCTELEM *block= (DCTELEM *)p->src;
+ DCTELEM *temp= (DCTELEM *)(p->src + 32);
if (!src || !dst) return; // HACK avoid crash for Y8 colourspace
for(y=0; y<height; y++){
diff --git a/libavfilter/libmpcodecs/vf_smartblur.c b/libavfilter/libmpcodecs/vf_smartblur.c
index 3e20880f04..8acdb73ffc 100644
--- a/libavfilter/libmpcodecs/vf_smartblur.c
+++ b/libavfilter/libmpcodecs/vf_smartblur.c
@@ -183,11 +183,11 @@ static inline void blur(uint8_t *dst, uint8_t *src, int w, int h, int dstStride,
static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
int cw= mpi->w >> mpi->chroma_x_shift;
int ch= mpi->h >> mpi->chroma_y_shift;
- FilterParam *f= &vf->priv;
+ int threshold = vf->priv->luma.threshold || vf->priv->chroma.threshold;
mp_image_t *dmpi=vf_get_image(vf->next,mpi->imgfmt,
MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE|
- (f->threshold) ? MP_IMGFLAG_READABLE : 0,
+ (threshold ? MP_IMGFLAG_READABLE : 0),
mpi->w,mpi->h);
assert(mpi->flags&MP_IMGFLAG_PLANAR);
diff --git a/libavfilter/libmpcodecs/vf_unsharp.c b/libavfilter/libmpcodecs/vf_unsharp.c
index cd464321f4..db22f78e9d 100644
--- a/libavfilter/libmpcodecs/vf_unsharp.c
+++ b/libavfilter/libmpcodecs/vf_unsharp.c
@@ -132,7 +132,7 @@ static int config( struct vf_instance *vf,
int z, stepsX, stepsY;
FilterParam *fp;
- char *effect;
+ const char *effect;
// allocate buffers