190 #define OFFSET(x) offsetof(MPContext, x)
191 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
199 void ff_mp_msg(
int mod,
int lev,
const char *format, ... ){
201 va_start(va, format);
229 if (vf->next->draw_slice) {
230 vf->next->draw_slice(vf->next,src,stride,w,h,x,y);
238 memcpy_pic(vf->dmpi->planes[0]+y*vf->dmpi->stride[0]+vf->dmpi->bpp/8*x,
239 src[0], vf->dmpi->bpp/8*w, h, vf->dmpi->stride[0], stride[0]);
242 memcpy_pic(vf->dmpi->planes[0]+y*vf->dmpi->stride[0]+x, src[0],
243 w, h, vf->dmpi->stride[0], stride[0]);
244 memcpy_pic(vf->dmpi->planes[1]+(y>>vf->dmpi->chroma_y_shift)*vf->dmpi->stride[1]+(x>>vf->dmpi->chroma_x_shift),
245 src[1], w>>vf->dmpi->chroma_x_shift, h>>vf->dmpi->chroma_y_shift, vf->dmpi->stride[1], stride[1]);
246 memcpy_pic(vf->dmpi->planes[2]+(y>>vf->dmpi->chroma_y_shift)*vf->dmpi->stride[2]+(x>>vf->dmpi->chroma_x_shift),
247 src[2], w>>vf->dmpi->chroma_x_shift, h>>vf->dmpi->chroma_y_shift, vf->dmpi->stride[2], stride[2]);
255 if(x0==0 && w==mpi->
width){
261 for(y=y0;y<y0+h;y+=2){
270 for(y=y0;y<y0+h;y++){
273 unsigned int* p=(
unsigned int*) dst;
277 #define CLEAR_PACKEDYUV_PATTERN 0x00800080
278 #define CLEAR_PACKEDYUV_PATTERN_SWAPPED 0x80008000
280 #define CLEAR_PACKEDYUV_PATTERN 0x80008000
281 #define CLEAR_PACKEDYUV_PATTERN_SWAPPED 0x00800080
291 memset(dst,0,(mpi->
bpp>>3)*w);
308 int number = mp_imgtype >> 16;
313 if(vf->
w==0 && w>0) vf->
w=w;
314 if(vf->
h==0 && h>0) vf->
h=h;
323 if (w == -1) w = vf->
w;
324 if (h == -1) h = vf->
h;
330 switch(mp_imgtype & 0xff){
369 mpi->
type=mp_imgtype;
370 mpi->
w=vf->
w; mpi->
h=vf->
h;
403 "ff_vf_get_image: Tried to allocate a format that can not be allocated!\n");
412 w2=((w+
align)&(~align));
445 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",
488 for(i=0; i<4 && mpi->
stride[i]; i++){
512 unsigned int voflags,
unsigned int outfmt){
519 int flags=vf->next->query_format(vf->next,outfmt);
526 miss=vf->default_reqs - (flags&vf->default_reqs);
581 if(!args || 1!=sscanf(args,
"%255[^:=]", name)){
585 args += strlen(name);
590 if(!filters[i] || !strcmp(name, filters[i]->name))
600 "'%s' is a wrapped MPlayer filter (libmpcodecs). This filter may be removed\n"
601 "once it has been ported to a native libavfilter.\n", name);
603 memset(&m->
vf,0,
sizeof(m->
vf));
617 const m_struct_t* st = vf->
info->
opts;
618 void* vf_priv = m_struct_alloc(st);
620 for(n = 0 ; args && args[2*
n] ; n++)
621 m_struct_set(st,vf_priv,args[2*n],args[2*n+1]);
625 if(args && !strcmp(args[0],
"_oldargs_"))
626 args = (
char**)args[1];
793 .priv_class = &mp_class,