217 static int firstTime=1;
222 __asm__
volatile(
"emms\n\t":::
"memory");
236 case 3: *flags|=
SWS_X;
break;
247 *srcFilterParam=
NULL;
248 *dstFilterParam=
NULL;
256 SwsFilter *dstFilterParam, *srcFilterParam;
267 return sws_getContext(srcW, srcH, sfmt, dstW, dstH, dfmt, flags , srcFilterParam, dstFilterParam,
NULL);
277 void ff_mp_msg(
int mod,
int lev,
const char *format, ... ){
279 va_start(va, format);
307 if (vf->next->draw_slice) {
308 vf->next->draw_slice(vf->next,src,stride,w,h,x,y);
316 memcpy_pic(vf->dmpi->planes[0]+y*vf->dmpi->stride[0]+vf->dmpi->bpp/8*x,
317 src[0], vf->dmpi->bpp/8*w, h, vf->dmpi->stride[0], stride[0]);
320 memcpy_pic(vf->dmpi->planes[0]+y*vf->dmpi->stride[0]+x, src[0],
321 w, h, vf->dmpi->stride[0], stride[0]);
322 memcpy_pic(vf->dmpi->planes[1]+(y>>vf->dmpi->chroma_y_shift)*vf->dmpi->stride[1]+(x>>vf->dmpi->chroma_x_shift),
323 src[1], w>>vf->dmpi->chroma_x_shift, h>>vf->dmpi->chroma_y_shift, vf->dmpi->stride[1], stride[1]);
324 memcpy_pic(vf->dmpi->planes[2]+(y>>vf->dmpi->chroma_y_shift)*vf->dmpi->stride[2]+(x>>vf->dmpi->chroma_x_shift),
325 src[2], w>>vf->dmpi->chroma_x_shift, h>>vf->dmpi->chroma_y_shift, vf->dmpi->stride[2], stride[2]);
333 if(x0==0 && w==mpi->
width){
339 for(y=y0;y<y0+h;y+=2){
348 for(y=y0;y<y0+h;y++){
351 unsigned int* p=(
unsigned int*) dst;
355 #define CLEAR_PACKEDYUV_PATTERN 0x00800080
356 #define CLEAR_PACKEDYUV_PATTERN_SWAPPED 0x80008000
358 #define CLEAR_PACKEDYUV_PATTERN 0x80008000
359 #define CLEAR_PACKEDYUV_PATTERN_SWAPPED 0x00800080
369 memset(dst,0,(mpi->
bpp>>3)*w);
386 int number = mp_imgtype >> 16;
391 if(vf->
w==0 && w>0) vf->
w=w;
392 if(vf->
h==0 && h>0) vf->
h=h;
401 if (w == -1) w = vf->
w;
402 if (h == -1) h = vf->
h;
408 switch(mp_imgtype & 0xff){
447 mpi->
type=mp_imgtype;
448 mpi->
w=vf->
w; mpi->
h=vf->
h;
481 "ff_vf_get_image: Tried to allocate a format that can not be allocated!\n");
490 w2=((w+align)&(~align));
523 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",
587 if (picref && picref->
video)
596 unsigned int voflags,
unsigned int outfmt){
603 int flags=vf->next->query_format(vf->next,outfmt);
610 miss=vf->default_reqs - (flags&vf->default_reqs);
650 if(!args || 1!=sscanf(args,
"%255[^:=]", name)){
654 args += strlen(name);
659 if(!filters[i] || !strcmp(name, filters[i]->name))
669 "'%s' is a wrapped MPlayer filter (libmpcodecs). This filter may be removed\n"
670 "once it has been ported to a native libavfilter.\n", name);
672 memset(&m->
vf,0,
sizeof(m->
vf));
686 const m_struct_t* st = vf->
info->
opts;
687 void* vf_priv = m_struct_alloc(st);
689 for(n = 0 ; args && args[2*n] ; n++)
690 m_struct_set(st,vf_priv,args[2*n],args[2*n+1]);
694 if(args && !strcmp(args[0],
"_oldargs_"))
695 args = (
char**)args[1];