diff options
author | wm4 <wm4@nowhere> | 2016-05-25 19:01:32 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-05-25 23:51:24 +0200 |
commit | 15a5d33b7930b53cbc4503053211aee91d6e9659 (patch) | |
tree | 3cf1d57566506af85c6220817ed72101efb2ebf6 /video/filter/refqueue.h | |
parent | b9cc33de58c3e58a93c5e5316e5734922f5a44b9 (diff) | |
download | mpv-15a5d33b7930b53cbc4503053211aee91d6e9659.tar.bz2 mpv-15a5d33b7930b53cbc4503053211aee91d6e9659.tar.xz |
vf_vavpp: move frame handling to separate file
Move the handling of the future/past frames and the associated dataflow
rules to a separate source file.
While this on its own seems rather questionable and just inflates the
code, I intend to reuse it for other filters. The logic is annoying
enough that it shouldn't be duplicated a bunch of times.
(I considered other ways of sharing this logic, such as an uber-
deinterlace filter, which would access the hardware deinterlacer via a
different API. Although that sounds like kind of the right approach,
this would have other problems, so let's not, at least for now.)
Diffstat (limited to 'video/filter/refqueue.h')
-rw-r--r-- | video/filter/refqueue.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/video/filter/refqueue.h b/video/filter/refqueue.h new file mode 100644 index 0000000000..69b3987a8f --- /dev/null +++ b/video/filter/refqueue.h @@ -0,0 +1,22 @@ +#ifndef MP_REFQUEUE_H_ +#define MP_REFQUEUE_H_ + +#include <stdbool.h> + +// A helper for deinterlacers which require past/future reference frames. + +struct mp_refqueue; + +struct mp_refqueue *mp_refqueue_alloc(void); +void mp_refqueue_free(struct mp_refqueue *q); + +void mp_refqueue_set_refs(struct mp_refqueue *q, int past, int future); +void mp_refqueue_flush(struct mp_refqueue *q); +void mp_refqueue_add_input(struct mp_refqueue *q, struct mp_image *img); +bool mp_refqueue_need_input(struct mp_refqueue *q); +bool mp_refqueue_has_output(struct mp_refqueue *q); +void mp_refqueue_next(struct mp_refqueue *q); +struct mp_image *mp_refqueue_get(struct mp_refqueue *q, int pos); +double mp_refqueue_get_field_pts(struct mp_refqueue *q, int field); + +#endif |