mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-25 12:42:04 +08:00
Main use: deinterlacing. I'm not sure how to select the deinterlacing mode at all. You can enumate the available video processors, but at least on Intel, all of them either signal support for all deinterlacers, or none (the latter is apparently used for IVTC). I haven't found anything that actually tells the processor _which_ algorithm to use. Another strange detail is how to select top/bottom fields and field dominance. At least I'm getting quite similar results to vavpp on Linux, so I'm content with it for now. Future plans include removing the D3D11 video processor use from the ANGLE interop code.
37 lines
1.3 KiB
C
37 lines
1.3 KiB
C
#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);
|
|
void mp_refqueue_next_field(struct mp_refqueue *q);
|
|
struct mp_image *mp_refqueue_get(struct mp_refqueue *q, int pos);
|
|
|
|
enum {
|
|
MP_MODE_DEINT = (1 << 0), // deinterlacing enabled
|
|
MP_MODE_OUTPUT_FIELDS = (1 << 1), // output fields separately
|
|
MP_MODE_INTERLACED_ONLY = (1 << 2), // only deinterlace marked frames
|
|
};
|
|
|
|
void mp_refqueue_set_mode(struct mp_refqueue *q, int flags);
|
|
bool mp_refqueue_should_deint(struct mp_refqueue *q);
|
|
bool mp_refqueue_is_interlaced(struct mp_refqueue *q);
|
|
bool mp_refqueue_is_top_field(struct mp_refqueue *q);
|
|
bool mp_refqueue_top_field_first(struct mp_refqueue *q);
|
|
bool mp_refqueue_is_second_field(struct mp_refqueue *q);
|
|
struct mp_image *mp_refqueue_get_field(struct mp_refqueue *q, int pos);
|
|
|
|
#endif
|