187 #define OFFSET(x) offsetof(MPContext, x)
188 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
196 void ff_mp_msg(
int mod,
int lev,
const char *format, ... ){
198 va_start(va, format);
226 if (vf->next->draw_slice) {
227 vf->next->draw_slice(vf->next,src,stride,w,h,x,y);
235 memcpy_pic(vf->dmpi->planes[0]+y*vf->dmpi->stride[0]+vf->dmpi->bpp/8*x,
236 src[0], vf->dmpi->bpp/8*w, h, vf->dmpi->stride[0], stride[0]);
239 memcpy_pic(vf->dmpi->planes[0]+y*vf->dmpi->stride[0]+x, src[0],
240 w, h, vf->dmpi->stride[0], stride[0]);
241 memcpy_pic(vf->dmpi->planes[1]+(y>>vf->dmpi->chroma_y_shift)*vf->dmpi->stride[1]+(x>>vf->dmpi->chroma_x_shift),
242 src[1], w>>vf->dmpi->chroma_x_shift, h>>vf->dmpi->chroma_y_shift, vf->dmpi->stride[1], stride[1]);
243 memcpy_pic(vf->dmpi->planes[2]+(y>>vf->dmpi->chroma_y_shift)*vf->dmpi->stride[2]+(x>>vf->dmpi->chroma_x_shift),
244 src[2], w>>vf->dmpi->chroma_x_shift, h>>vf->dmpi->chroma_y_shift, vf->dmpi->stride[2], stride[2]);
252 if(x0==0 && w==mpi->
width){
258 for(y=y0;y<y0+h;y+=2){
267 for(y=y0;y<y0+h;y++){
270 unsigned int* p=(
unsigned int*) dst;
274 #define CLEAR_PACKEDYUV_PATTERN 0x00800080
275 #define CLEAR_PACKEDYUV_PATTERN_SWAPPED 0x80008000
277 #define CLEAR_PACKEDYUV_PATTERN 0x80008000
278 #define CLEAR_PACKEDYUV_PATTERN_SWAPPED 0x00800080
288 memset(dst,0,(mpi->
bpp>>3)*w);
305 int number = mp_imgtype >> 16;
310 if(vf->
w==0 && w>0) vf->
w=w;
311 if(vf->
h==0 && h>0) vf->
h=h;
320 if (w == -1) w = vf->
w;
321 if (h == -1) h = vf->
h;
327 switch(mp_imgtype & 0xff){
366 mpi->
type=mp_imgtype;
367 mpi->
w=vf->
w; mpi->
h=vf->
h;
400 "ff_vf_get_image: Tried to allocate a format that can not be allocated!\n");
409 w2=((w+
align)&(~align));
442 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",
485 for(i=0; i<4 && mpi->
stride[i]; i++){
509 unsigned int voflags,
unsigned int outfmt){
516 int flags=vf->next->query_format(vf->next,outfmt);
523 miss=vf->default_reqs - (flags&vf->default_reqs);
578 if(!args || 1!=sscanf(args,
"%255[^:=]", name)){
582 args += strlen(name);
587 if(!filters[i] || !strcmp(name, filters[i]->name))
597 "'%s' is a wrapped MPlayer filter (libmpcodecs). This filter may be removed\n"
598 "once it has been ported to a native libavfilter.\n", name);
600 memset(&m->
vf,0,
sizeof(m->
vf));
614 const m_struct_t* st = vf->
info->
opts;
615 void* vf_priv = m_struct_alloc(st);
617 for(n = 0 ; args && args[2*
n] ; n++)
618 m_struct_set(st,vf_priv,args[2*n],args[2*n+1]);
622 if(args && !strcmp(args[0],
"_oldargs_"))
623 args = (
char**)args[1];
790 .priv_class = &mp_class,