vf_qp: enable compilation depending on libavutil eval API

Libavutil eval API seems to be enough for vf_qp, so enable the filter
if the API is available. Also clean up some left over lines for other
filters in Makefile.
This commit is contained in:
Uoti Urpala 2011-07-18 00:15:08 +03:00
parent 25de401425
commit 4e2b15fc5e
3 changed files with 6 additions and 11 deletions

View File

@ -75,12 +75,11 @@ SRCS_COMMON-$(FFMPEG) += libmpcodecs/vf_pp.c \
# Requires a new enough libavutil that installs eval.h
SRCS_COMMON-$(FFMPEG_EVAL_API) += libmpcodecs/vf_geq.c \
libmpcodecs/vf_qp.c \
# These filters use private headers and do not work with shared libavcodec.
SRCS_COMMON-$(FFMPEG_INTERNALS) += libmpcodecs/vf_fspp.c \
libmpcodecs/vf_geq.c \
libmpcodecs/vf_mcdeint.c \
libmpcodecs/vf_qp.c \
libmpcodecs/vf_spp.c \
SRCS_COMMON-$(FREETYPE) += sub/font_load_ft.c
@ -654,11 +653,8 @@ checkheaders: $(ALLHEADERS:.h=.ho)
codec-cfg.o: codecs.conf.h
mpcommon.o osdep/mplayer-rc.o: version.h
# Files that depend on libswscale internals
libmpcodecs/vf_palette.o: CFLAGS := -I$(FFMPEG_SOURCE_PATH) $(CFLAGS)
# Files that depend on libavcodec internals
libmpcodecs/vf_fspp.o libmpcodecs/vf_geq.o libmpcodecs/vf_mcdeint.o libmpcodecs/vf_qp.o libmpcodecs/vf_spp.o libvo/jpeg_enc.o: CFLAGS := -I$(FFMPEG_SOURCE_PATH) $(CFLAGS)
libmpcodecs/vf_fspp.o libmpcodecs/vf_mcdeint.o libmpcodecs/vf_spp.o: CFLAGS := -I$(FFMPEG_SOURCE_PATH) $(CFLAGS)
osdep/mplayer-rc.o: osdep/mplayer.exe.manifest

View File

@ -186,11 +186,11 @@ static const vf_info_t* const filter_list[]={
#ifdef CONFIG_FFMPEG_INTERNALS
&vf_info_spp,
&vf_info_fspp,
&vf_info_qp,
&vf_info_mcdeint,
#endif
#ifdef CONFIG_FFMPEG_EVAL_API
&vf_info_geq,
&vf_info_qp,
#endif
&vf_info_yuvcsp,
&vf_info_kerndeint,

View File

@ -24,6 +24,8 @@
#include <math.h>
#include <inttypes.h>
#include <libavutil/eval.h>
#include "mp_msg.h"
#include "cpudetect.h"
#include "img_format.h"
@ -31,9 +33,6 @@
#include "vf.h"
#include "libvo/fastmemcpy.h"
#include "libavcodec/avcodec.h"
#include "libavutil/eval.h"
struct vf_priv_s {
char eq[200];
@ -69,7 +68,7 @@ static int config(struct vf_instance *vf,
double temp_val;
int res;
res= av_parse_and_eval_expr(&temp_val, vf->priv->eq, const_names, const_values, NULL, NULL, NULL, NULL, NULL, 0, NULL);
res= av_expr_parse_and_eval(&temp_val, vf->priv->eq, const_names, const_values, NULL, NULL, NULL, NULL, NULL, 0, NULL);
if (res < 0){
mp_msg(MSGT_VFILTER, MSGL_ERR, "qp: Error evaluating \"%s\" \n", vf->priv->eq);