Mercurial > mplayer.hg
comparison libmpcodecs/vf_pp.c @ 7972:6d1103afba1c
cleanly passing the cpuCaps
author | michael |
---|---|
date | Wed, 30 Oct 2002 01:51:14 +0000 |
parents | 0a5d69e6f2a2 |
children | 1ab37da5b1da |
comparison
equal
deleted
inserted
replaced
7971:b6d3ada27931 | 7972:6d1103afba1c |
---|---|
4 #include <inttypes.h> | 4 #include <inttypes.h> |
5 #include <errno.h> | 5 #include <errno.h> |
6 | 6 |
7 #include "../config.h" | 7 #include "../config.h" |
8 #include "../mp_msg.h" | 8 #include "../mp_msg.h" |
9 #include "../cpudetect.h" | |
9 | 10 |
10 #include "img_format.h" | 11 #include "img_format.h" |
11 #include "mp_image.h" | 12 #include "mp_image.h" |
12 #include "vf.h" | 13 #include "vf.h" |
13 | 14 |
95 (mpi->w+7)&(~7),mpi->h, | 96 (mpi->w+7)&(~7),mpi->h, |
96 mpi->qscale, mpi->qstride, | 97 mpi->qscale, mpi->qstride, |
97 &vf->priv->ppMode[ vf->priv->pp ], vf->priv->context, | 98 &vf->priv->ppMode[ vf->priv->pp ], vf->priv->context, |
98 mpi->pict_type); | 99 mpi->pict_type); |
99 } | 100 } |
100 | |
101 return vf_next_put_image(vf,vf->priv->dmpi); | 101 return vf_next_put_image(vf,vf->priv->dmpi); |
102 } | 102 } |
103 | 103 |
104 //===========================================================================// | 104 //===========================================================================// |
105 | 105 |
128 vf->priv->context=NULL; | 128 vf->priv->context=NULL; |
129 | 129 |
130 // check csp: | 130 // check csp: |
131 vf->priv->outfmt=vf_match_csp(&vf->next,fmt_list,IMGFMT_YV12); | 131 vf->priv->outfmt=vf_match_csp(&vf->next,fmt_list,IMGFMT_YV12); |
132 if(!vf->priv->outfmt) return 0; // no csp match :( | 132 if(!vf->priv->outfmt) return 0; // no csp match :( |
133 | |
134 pp_init( | |
135 (gCpuCaps.hasMMX ? PP_CPU_CAPS_MMX : 0) | |
136 | (gCpuCaps.hasMMX2 ? PP_CPU_CAPS_MMX2 : 0) | |
137 | (gCpuCaps.has3DNow ? PP_CPU_CAPS_3DNOW : 0) | |
138 ); | |
133 | 139 |
134 if(args){ | 140 if(args){ |
135 if(!strcmp("help", args)){ | 141 if(!strcmp("help", args)){ |
136 printf("%s", pp_help); | 142 printf("%s", pp_help); |
137 exit(1); | 143 exit(1); |
143 }else | 149 }else |
144 name= NULL; | 150 name= NULL; |
145 }else{ | 151 }else{ |
146 name="de"; | 152 name="de"; |
147 } | 153 } |
148 | 154 |
149 if(name){ | 155 if(name){ |
150 for(i=0; i<=GET_PP_QUALITY_MAX; i++){ | 156 for(i=0; i<=GET_PP_QUALITY_MAX; i++){ |
151 vf->priv->ppMode[i]= pp_get_mode_by_name_and_quality(name, i); | 157 vf->priv->ppMode[i]= pp_get_mode_by_name_and_quality(name, i); |
152 if(vf->priv->ppMode[i].error) return -1; | 158 if(vf->priv->ppMode[i].error) return -1; |
153 } | 159 } |