198 static int firstTime=1;
203 __asm__
volatile(
"emms\n\t":::
"memory");
217 case 3: *flags|=
SWS_X;
break;
228 *srcFilterParam=
NULL;
229 *dstFilterParam=
NULL;
237 SwsFilter *dstFilterParam, *srcFilterParam;
248 return sws_getContext(srcW, srcH, sfmt, dstW, dstH, dfmt, flags , srcFilterParam, dstFilterParam,
NULL);
260 #define OFFSET(x) offsetof(MPContext, x)
261 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
269 void ff_mp_msg(
int mod,
int lev,
const char *format, ... ){
271 va_start(va, format);
325 if(x0==0 && w==mpi->
width){
331 for(y=y0;y<y0+h;y+=2){
340 for(y=y0;y<y0+h;y++){
343 unsigned int* p=(
unsigned int*) dst;
347 #define CLEAR_PACKEDYUV_PATTERN 0x00800080
348 #define CLEAR_PACKEDYUV_PATTERN_SWAPPED 0x80008000
350 #define CLEAR_PACKEDYUV_PATTERN 0x80008000
351 #define CLEAR_PACKEDYUV_PATTERN_SWAPPED 0x00800080
361 memset(dst,0,(mpi->
bpp>>3)*w);
378 int number = mp_imgtype >> 16;
383 if(vf->
w==0 && w>0) vf->
w=w;
384 if(vf->
h==0 && h>0) vf->
h=h;
393 if (w == -1) w = vf->
w;
394 if (h == -1) h = vf->
h;
400 switch(mp_imgtype & 0xff){
439 mpi->
type=mp_imgtype;
440 mpi->
w=vf->
w; mpi->
h=vf->
h;
473 "ff_vf_get_image: Tried to allocate a format that can not be allocated!\n");
482 w2=((w+
align)&(~align));
515 ff_mp_msg(
MSGT_DECVIDEO,
MSGL_DBG2,
"(imgfmt: %x, planes: %p,%p,%p strides: %d,%d,%d, chroma: %dx%d, shift: h:%d,v:%d)\n",
554 for(i=0; i<4 && mpi->
stride[i]; i++){
578 unsigned int voflags,
unsigned int outfmt){
647 if(!args || 1!=sscanf(args,
"%255[^:=]", name)){
651 args += strlen(name);
656 if(!filters[i] || !strcmp(name, filters[i]->name))
666 "'%s' is a wrapped MPlayer filter (libmpcodecs). This filter may be removed\n"
667 "once it has been ported to a native libavfilter.\n", name);
669 memset(&m->
vf,0,
sizeof(m->
vf));
683 const m_struct_t* st = vf->
info->
opts;
684 void* vf_priv = m_struct_alloc(st);
686 for(n = 0 ; args && args[2*
n] ; n++)
687 m_struct_set(st,vf_priv,args[2*n],args[2*n+1]);
691 if(args && !strcmp(args[0],
"_oldargs_"))
692 args = (
char**)args[1];
853 .priv_class = &mp_class,