172 #define OFFSET(x) offsetof(MPContext, x)
173 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
181 void ff_mp_msg(
int mod,
int lev,
const char *format, ... ){
183 va_start(va, format);
206 if (vf->next->draw_slice) {
207 vf->next->draw_slice(vf->next,src,stride,w,h,x,y);
215 memcpy_pic(vf->dmpi->planes[0]+y*vf->dmpi->stride[0]+vf->dmpi->bpp/8*x,
216 src[0], vf->dmpi->bpp/8*w, h, vf->dmpi->stride[0], stride[0]);
219 memcpy_pic(vf->dmpi->planes[0]+y*vf->dmpi->stride[0]+x, src[0],
220 w, h, vf->dmpi->stride[0], stride[0]);
221 memcpy_pic(vf->dmpi->planes[1]+(y>>vf->dmpi->chroma_y_shift)*vf->dmpi->stride[1]+(x>>vf->dmpi->chroma_x_shift),
222 src[1], w>>vf->dmpi->chroma_x_shift, h>>vf->dmpi->chroma_y_shift, vf->dmpi->stride[1], stride[1]);
223 memcpy_pic(vf->dmpi->planes[2]+(y>>vf->dmpi->chroma_y_shift)*vf->dmpi->stride[2]+(x>>vf->dmpi->chroma_x_shift),
224 src[2], w>>vf->dmpi->chroma_x_shift, h>>vf->dmpi->chroma_y_shift, vf->dmpi->stride[2], stride[2]);
232 if(x0==0 && w==mpi->
width){
238 for(y=y0;y<y0+h;y+=2){
247 for(y=y0;y<y0+h;y++){
250 unsigned int* p=(
unsigned int*) dst;
254 #define CLEAR_PACKEDYUV_PATTERN 0x00800080
255 #define CLEAR_PACKEDYUV_PATTERN_SWAPPED 0x80008000
257 #define CLEAR_PACKEDYUV_PATTERN 0x80008000
258 #define CLEAR_PACKEDYUV_PATTERN_SWAPPED 0x00800080
268 memset(dst,0,(mpi->
bpp>>3)*w);
285 int number = mp_imgtype >> 16;
290 if(vf->
w==0 && w>0) vf->
w=w;
291 if(vf->
h==0 && h>0) vf->
h=h;
300 if (w == -1) w = vf->
w;
301 if (h == -1) h = vf->
h;
307 switch(mp_imgtype & 0xff){
346 mpi->
type=mp_imgtype;
347 mpi->
w=vf->
w; mpi->
h=vf->
h;
380 "ff_vf_get_image: Tried to allocate a format that can not be allocated!\n");
389 w2=((w+
align)&(~align));
422 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",
463 for(i=0; i<4 && mpi->
stride[i]; i++){
487 unsigned int voflags,
unsigned int outfmt){
494 int flags=vf->next->query_format(vf->next,outfmt);
501 miss=vf->default_reqs - (flags&vf->default_reqs);
556 if(!args || 1!=sscanf(args,
"%255[^:=]", name)){
560 args += strlen(name);
565 if(!filters[i] || !strcmp(name, filters[i]->name))
575 "'%s' is a wrapped MPlayer filter (libmpcodecs). This filter may be removed\n"
576 "once it has been ported to a native libavfilter.\n", name);
578 memset(&m->
vf,0,
sizeof(m->
vf));
592 const m_struct_t* st = vf->
info->
opts;
593 void* vf_priv = m_struct_alloc(st);
595 for(n = 0 ; args && args[2*
n] ; n++)
596 m_struct_set(st,vf_priv,args[2*n],args[2*n+1]);
600 if(args && !strcmp(args[0],
"_oldargs_"))
601 args = (
char**)args[1];
768 .priv_class = &mp_class,