192 static int firstTime=1;
197 __asm__
volatile(
"emms\n\t":::
"memory");
211 case 3: *flags|=
SWS_X;
break;
222 *srcFilterParam= NULL;
223 *dstFilterParam= NULL;
231 SwsFilter *dstFilterParam, *srcFilterParam;
242 return sws_getContext(srcW, srcH, sfmt, dstW, dstH, dfmt, flags , srcFilterParam, dstFilterParam, NULL);
255 #define OFFSET(x) offsetof(MPContext, x)
256 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
264 void ff_mp_msg(
int mod,
int lev,
const char *format, ... ){
266 va_start(va, format);
294 if (vf->next->draw_slice) {
295 vf->next->draw_slice(vf->next,src,stride,w,h,x,y);
303 memcpy_pic(vf->dmpi->planes[0]+y*vf->dmpi->stride[0]+vf->dmpi->bpp/8*x,
304 src[0], vf->dmpi->bpp/8*w, h, vf->dmpi->stride[0], stride[0]);
307 memcpy_pic(vf->dmpi->planes[0]+y*vf->dmpi->stride[0]+x, src[0],
308 w, h, vf->dmpi->stride[0], stride[0]);
309 memcpy_pic(vf->dmpi->planes[1]+(y>>vf->dmpi->chroma_y_shift)*vf->dmpi->stride[1]+(x>>vf->dmpi->chroma_x_shift),
310 src[1], w>>vf->dmpi->chroma_x_shift, h>>vf->dmpi->chroma_y_shift, vf->dmpi->stride[1], stride[1]);
311 memcpy_pic(vf->dmpi->planes[2]+(y>>vf->dmpi->chroma_y_shift)*vf->dmpi->stride[2]+(x>>vf->dmpi->chroma_x_shift),
312 src[2], w>>vf->dmpi->chroma_x_shift, h>>vf->dmpi->chroma_y_shift, vf->dmpi->stride[2], stride[2]);
320 if(x0==0 && w==mpi->
width){
326 for(y=y0;y<y0+h;y+=2){
335 for(y=y0;y<y0+h;y++){
338 unsigned int* p=(
unsigned int*) dst;
342 #define CLEAR_PACKEDYUV_PATTERN 0x00800080
343 #define CLEAR_PACKEDYUV_PATTERN_SWAPPED 0x80008000
345 #define CLEAR_PACKEDYUV_PATTERN 0x80008000
346 #define CLEAR_PACKEDYUV_PATTERN_SWAPPED 0x00800080
356 memset(dst,0,(mpi->
bpp>>3)*w);
373 int number = mp_imgtype >> 16;
378 if(vf->
w==0 && w>0) vf->
w=w;
379 if(vf->
h==0 && h>0) vf->
h=h;
388 if (w == -1) w = vf->
w;
389 if (h == -1) h = vf->
h;
395 switch(mp_imgtype & 0xff){
434 mpi->
type=mp_imgtype;
435 mpi->
w=vf->
w; mpi->
h=vf->
h;
468 "ff_vf_get_image: Tried to allocate a format that can not be allocated!\n");
477 w2=((w+
align)&(~align));
510 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",
553 for(i=0; i<4 && mpi->
stride[i]; i++){
577 unsigned int voflags,
unsigned int outfmt){
584 int flags=vf->next->query_format(vf->next,outfmt);
591 miss=vf->default_reqs - (flags&vf->default_reqs);
646 if(!args || 1!=sscanf(args,
"%255[^:=]", name)){
650 args += strlen(name);
655 if(!filters[i] || !strcmp(name, filters[i]->name))
665 "'%s' is a wrapped MPlayer filter (libmpcodecs). This filter may be removed\n"
666 "once it has been ported to a native libavfilter.\n", name);
668 memset(&m->
vf,0,
sizeof(m->
vf));
682 const m_struct_t* st = vf->
info->
opts;
683 void* vf_priv = m_struct_alloc(st);
685 for(n = 0 ; args && args[2*
n] ; n++)
686 m_struct_set(st,vf_priv,args[2*n],args[2*n+1]);
690 if(args && !strcmp(args[0],
"_oldargs_"))
691 args = (
char**)args[1];
858 .priv_class = &mp_class,