Index: libmpcodecs/vf_geq.c =================================================================== --- libmpcodecs/vf_geq.c (版本 24763) +++ libmpcodecs/vf_geq.c (工作副本) @@ -26,6 +26,7 @@ #include "mp_msg.h" #include "cpudetect.h" +#include "mp_image.h" // Needed to bring in lrintf. #define HAVE_AV_CONFIG_H @@ -35,17 +36,7 @@ #include "libavcodec/eval.h" #include "libavutil/common.h" -/* FIXME: common.h defines fprintf away when HAVE_AV_CONFIG - * is defined, but mp_image.h needs fprintf. - */ -#undef fprintf - -#ifdef HAVE_MALLOC_H -#include -#endif - #include "img_format.h" -#include "mp_image.h" #include "vf.h" @@ -61,23 +52,6 @@ return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); } -static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){ - if(mpi->flags&MP_IMGFLAG_PRESERVE) return; // don't change - // ok, we can do pp in-place (or pp disabled): - vf->dmpi=vf_get_image(vf->next,mpi->imgfmt, - mpi->type, mpi->flags, mpi->w, mpi->h); - mpi->planes[0]=vf->dmpi->planes[0]; - mpi->stride[0]=vf->dmpi->stride[0]; - mpi->width=vf->dmpi->width; - if(mpi->flags&MP_IMGFLAG_PLANAR){ - mpi->planes[1]=vf->dmpi->planes[1]; - mpi->planes[2]=vf->dmpi->planes[2]; - mpi->stride[1]=vf->dmpi->stride[1]; - mpi->stride[2]=vf->dmpi->stride[2]; - } - mpi->flags|=MP_IMGFLAG_DIRECT; -} - static inline double getpix(struct vf_instance_s* vf, double x, double y, int plane){ int xi, yi; mp_image_t *mpi= vf->priv->mpi; @@ -193,14 +167,14 @@ "SH", NULL }; - static const char *func2_names[]={ + static char *func2_names[]={ "lum", "cb", "cr", "p", NULL }; - double (*func2[])(void *, double, double)={ + double (*func2[])(struct vf_instance_s*, double, double)={ lum, cb, cr,