#ifndef AVFILTER_YADIF_H
#define AVFILTER_YADIF_H
+#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
YADIF_DEINT_INTERLACED = 1, ///< only deinterlace frames marked as interlaced
};
+enum YADIFCurrentField {
+ YADIF_FIELD_BACK_END = -1, ///< The last frame in a sequence
+ YADIF_FIELD_END = 0, ///< The first or last field in a sequence
+ YADIF_FIELD_NORMAL = 1, ///< A normal field in the middle of a sequence
+};
+
typedef struct YADIFContext {
const AVClass *class;
AVFrame *prev;
AVFrame *out;
+ void (*filter)(AVFilterContext *ctx, AVFrame *dstpic, int parity, int tff);
+
/**
* Required alignment for filter_line
*/
int eof;
uint8_t *temp_line;
int temp_line_size;
+
+ /*
+ * An algorithm that treats first and/or last fields in a sequence
+ * differently can use this to detect those cases. It is the algorithm's
+ * responsibility to set the value to YADIF_FIELD_NORMAL after processing
+ * the first field.
+ */
+ int current_field; ///< YADIFCurrentField
} YADIFContext;
void ff_yadif_init_x86(YADIFContext *yadif);
+int ff_yadif_filter_frame(AVFilterLink *link, AVFrame *frame);
+
+int ff_yadif_request_frame(AVFilterLink *link);
+
+extern const AVOption ff_yadif_options[];
+
#endif /* AVFILTER_YADIF_H */