229 static int firstTime=1;
234 __asm__
volatile(
"emms\n\t":::
"memory");
248 case 3: *flags|=
SWS_X;
break;
259 *srcFilterParam=
NULL;
260 *dstFilterParam=
NULL;
268 SwsFilter *dstFilterParam, *srcFilterParam;
279 return sws_getContext(srcW, srcH, sfmt, dstW, dstH, dfmt, flags , srcFilterParam, dstFilterParam,
NULL);
289 void ff_mp_msg(
int mod,
int lev,
const char *format, ... ){
291 va_start(va, format);
319 if (vf->next->draw_slice) {
320 vf->next->draw_slice(vf->next,src,stride,w,h,x,y);
328 memcpy_pic(vf->dmpi->planes[0]+y*vf->dmpi->stride[0]+vf->dmpi->bpp/8*x,
329 src[0], vf->dmpi->bpp/8*w, h, vf->dmpi->stride[0], stride[0]);
332 memcpy_pic(vf->dmpi->planes[0]+y*vf->dmpi->stride[0]+x, src[0],
333 w, h, vf->dmpi->stride[0], stride[0]);
334 memcpy_pic(vf->dmpi->planes[1]+(y>>vf->dmpi->chroma_y_shift)*vf->dmpi->stride[1]+(x>>vf->dmpi->chroma_x_shift),
335 src[1], w>>vf->dmpi->chroma_x_shift, h>>vf->dmpi->chroma_y_shift, vf->dmpi->stride[1], stride[1]);
336 memcpy_pic(vf->dmpi->planes[2]+(y>>vf->dmpi->chroma_y_shift)*vf->dmpi->stride[2]+(x>>vf->dmpi->chroma_x_shift),
337 src[2], w>>vf->dmpi->chroma_x_shift, h>>vf->dmpi->chroma_y_shift, vf->dmpi->stride[2], stride[2]);
345 if(x0==0 && w==mpi->
width){
351 for(y=y0;y<y0+h;y+=2){
360 for(y=y0;y<y0+h;y++){
363 unsigned int* p=(
unsigned int*) dst;
367 #define CLEAR_PACKEDYUV_PATTERN 0x00800080
368 #define CLEAR_PACKEDYUV_PATTERN_SWAPPED 0x80008000
370 #define CLEAR_PACKEDYUV_PATTERN 0x80008000
371 #define CLEAR_PACKEDYUV_PATTERN_SWAPPED 0x00800080
381 memset(dst,0,(mpi->
bpp>>3)*w);
398 int number = mp_imgtype >> 16;
403 if(vf->
w==0 && w>0) vf->
w=w;
404 if(vf->
h==0 && h>0) vf->
h=h;
413 if (w == -1) w = vf->
w;
414 if (h == -1) h = vf->
h;
420 switch(mp_imgtype & 0xff){
459 mpi->
type=mp_imgtype;
460 mpi->
w=vf->
w; mpi->
h=vf->
h;
493 "ff_vf_get_image: Tried to allocate a format that can not be allocated!\n");
502 w2=((w+align)&(~align));
535 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",
599 if (picref && picref->
video)
608 unsigned int voflags,
unsigned int outfmt){
615 int flags=vf->next->query_format(vf->next,outfmt);
622 miss=vf->default_reqs - (flags&vf->default_reqs);
662 if(!args || 1!=sscanf(args,
"%255[^:=]", name)){
666 args += strlen(name);
671 if(!filters[i] || !strcmp(name, filters[i]->name))
681 "'%s' is a wrapped MPlayer filter (libmpcodecs). This filter may be removed\n"
682 "once it has been ported to a native libavfilter.\n", name);
684 memset(&m->
vf,0,
sizeof(m->
vf));
698 const m_struct_t* st = vf->
info->
opts;
699 void* vf_priv = m_struct_alloc(st);
701 for(n = 0 ; args && args[2*n] ; n++)
702 m_struct_set(st,vf_priv,args[2*n],args[2*n+1]);
706 if(args && !strcmp(args[0],
"_oldargs_"))
707 args = (
char**)args[1];