#include "internal.h"
#include "video.h"
-typedef struct {
+typedef struct FieldOrderContext {
const AVClass *class;
int dst_tff; ///< output bff/tff
int line_size[4]; ///< bytes of pixel data per line for each plane
/** accept any input pixel format that is not hardware accelerated, not
* a bitstream format, and does not have vertically sub-sampled chroma */
if (ctx->inputs[0]) {
+ const AVPixFmtDescriptor *desc = NULL;
formats = NULL;
- for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++) {
- const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
+ while ((desc = av_pix_fmt_desc_next(desc))) {
+ pix_fmt = av_pix_fmt_desc_get_id(desc);
if (!(desc->flags & AV_PIX_FMT_FLAG_HWACCEL ||
desc->flags & AV_PIX_FMT_FLAG_BITSTREAM) &&
desc->nb_components && !desc->log2_chroma_h &&
return 0;
}
-static AVFrame *get_video_buffer(AVFilterLink *inlink, int w, int h)
-{
- AVFilterContext *ctx = inlink->dst;
- AVFilterLink *outlink = ctx->outputs[0];
-
- return ff_get_video_buffer(outlink, w, h);
-}
-
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
{
AVFilterContext *ctx = inlink->dst;
return ff_filter_frame(outlink, frame);
}
- av_dlog(ctx,
+ av_log(ctx, AV_LOG_TRACE,
"picture will move %s one line\n",
s->dst_tff ? "up" : "down");
h = frame->height;
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_input,
- .get_video_buffer = get_video_buffer,
.filter_frame = filter_frame,
.needs_writable = 1,
},