From f8456285fb72e3456fc0f605df4c3c361e09837f Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 30 Oct 2002 01:51:14 +0000 Subject: cleanly passing the cpuCaps git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7973 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vf_pp.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'libmpcodecs') diff --git a/libmpcodecs/vf_pp.c b/libmpcodecs/vf_pp.c index d1cb181d83..15bd9200dd 100644 --- a/libmpcodecs/vf_pp.c +++ b/libmpcodecs/vf_pp.c @@ -6,6 +6,7 @@ #include "../config.h" #include "../mp_msg.h" +#include "../cpudetect.h" #include "img_format.h" #include "mp_image.h" @@ -97,7 +98,6 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){ &vf->priv->ppMode[ vf->priv->pp ], vf->priv->context, mpi->pict_type); } - return vf_next_put_image(vf,vf->priv->dmpi); } @@ -131,6 +131,12 @@ static int open(vf_instance_t *vf, char* args){ vf->priv->outfmt=vf_match_csp(&vf->next,fmt_list,IMGFMT_YV12); if(!vf->priv->outfmt) return 0; // no csp match :( + pp_init( + (gCpuCaps.hasMMX ? PP_CPU_CAPS_MMX : 0) + | (gCpuCaps.hasMMX2 ? PP_CPU_CAPS_MMX2 : 0) + | (gCpuCaps.has3DNow ? PP_CPU_CAPS_3DNOW : 0) + ); + if(args){ if(!strcmp("help", args)){ printf("%s", pp_help); @@ -145,7 +151,7 @@ static int open(vf_instance_t *vf, char* args){ }else{ name="de"; } - + if(name){ for(i=0; i<=GET_PP_QUALITY_MAX; i++){ vf->priv->ppMode[i]= pp_get_mode_by_name_and_quality(name, i); -- cgit v1.2.3