frame->linesize[1] = buf->plane[1].stride;
frame->linesize[2] = buf->plane[2].stride;
- frame->pts = buf->s.start;
+ frame->pts = buf->s.start;
frame->reordered_opaque = buf->s.start;
- frame->width = buf->f.width;
- frame->height = buf->f.height;
- frame->format = buf->f.fmt;
+ frame->width = buf->f.width;
+ frame->height = buf->f.height;
+ frame->format = buf->f.fmt;
+ frame->interlaced_frame = !!buf->s.combed;
}
static hb_buffer_t* avframe_to_buffer(hb_filter_private_t * pv, AVFrame *frame)
#define PIC_FLAG_REPEAT_FRAME 0x0200
#define HB_BUF_FLAG_EOF 0x0400
uint16_t flags;
+
+#define HB_COMB_NONE 0
+#define HB_COMB_LIGHT 1
+#define HB_COMB_HEAVY 2
+ uint8_t combed;
};
struct hb_image_format_s
#define MODE_YADIF_ENABLE 1
#define MODE_YADIF_SPATIAL 2
#define MODE_YADIF_BOB 4
+#define MODE_YADIF_AUTO 8
/* Deinterlace Settings
* mode:parity
* 1 = Enabled
* 2 = Spatial
* 4 = Bob
+ * 8 = Auto
*
* Parity:
* 0 = Top Field First
{
return (char*)hb_filter_off;
}
+ int automatic = !!(mode & MODE_YADIF_AUTO);
int bob = !!(mode & MODE_YADIF_BOB);
int no_spatial = !(mode & MODE_YADIF_SPATIAL);
mode = bob | (no_spatial << 1);
- return hb_strdup_printf("yadif='mode=%d:parity=%d'", mode, parity);
+ return hb_strdup_printf("yadif='mode=%d:auto=%d:parity=%d'",
+ mode, automatic, parity);
}
/* Rotate Settings: