8 #include "img_format.h"
12 #include "../libvo/fastmemcpy.h"
18 static int put_image(struct vf_instance_s
* vf
, mp_image_t
*mpi
)
22 if (vf
->priv
->skipflag
)
23 return vf
->priv
->skipflag
= 0;
25 dmpi
= vf_get_image(vf
->next
, mpi
->imgfmt
,
26 MP_IMGTYPE_EXPORT
, 0, mpi
->width
, mpi
->height
);
28 dmpi
->planes
[0] = mpi
->planes
[0];
29 dmpi
->stride
[0] = mpi
->stride
[0];
30 if (dmpi
->flags
&MP_IMGFLAG_PLANAR
) {
31 dmpi
->planes
[1] = mpi
->planes
[1];
32 dmpi
->stride
[1] = mpi
->stride
[1];
33 dmpi
->planes
[2] = mpi
->planes
[2];
34 dmpi
->stride
[2] = mpi
->stride
[2];
37 return vf_next_put_image(vf
, dmpi
);
40 static int control(struct vf_instance_s
* vf
, int request
, void* data
)
43 case VFCTRL_SKIP_NEXT_FRAME
:
44 vf
->priv
->skipflag
= 1;
47 return vf_next_control(vf
, request
, data
);
50 static int query_format(struct vf_instance_s
* vf
, unsigned int fmt
)
52 /* FIXME - figure out which other formats work */
57 return vf_next_query_format(vf
, fmt
);
62 static void uninit(struct vf_instance_s
* vf
)
67 static int open(vf_instance_t
*vf
, char* args
)
69 vf
->put_image
= put_image
;
70 vf
->control
= control
;
72 vf
->priv
= calloc(1, sizeof(struct vf_priv_s
));
76 vf_info_t vf_info_softskip
= {
77 "soft (post-filter) frame skipping for encoding",