57 desc->nb_components && !
desc->log2_chroma_h &&
77 int h, plane, src_line_step, dst_line_step, line_size,
line;
86 "frame with same field order" :
"progressive frame");
102 "picture will move %s one line\n",
103 s->dst_tff ?
"up" :
"down");
105 for (plane = 0; plane < 4 &&
frame->data[plane] &&
frame->linesize[plane]; plane++) {
106 dst_line_step =
out->linesize[plane] * (
h > 2);
107 src_line_step =
frame->linesize[plane] * (
h > 2);
108 line_size =
s->line_size[plane];
118 if (1 + line < frame->
height) {
119 memcpy(
dst,
src + src_line_step, line_size);
121 memcpy(
dst,
src - 2 * src_line_step, line_size);
123 dst += dst_line_step;
124 src += src_line_step;
132 dst += (
h - 1) * dst_line_step;
133 src += (
h - 1) * src_line_step;
136 memcpy(
dst,
src - src_line_step, line_size);
138 memcpy(
dst,
src + 2 * src_line_step, line_size);
140 dst -= dst_line_step;
141 src -= src_line_step;
155#define OFFSET(x) offsetof(FieldOrderContext, x)
156#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
177 .p.name =
"fieldorder",
179 .p.priv_class = &fieldorder_class,
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
static int config_input(AVFilterLink *inlink)
const FFFilter ff_vf_fieldorder
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Main libavfilter public API header.
static enum AVPixelFormat pix_fmt
static int filter_frame(DBEDecodeContext *s, AVFrame *frame)
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
@ AV_OPT_TYPE_INT
Underlying C type is int.
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
#define AV_FRAME_FLAG_INTERLACED
A flag to mark frames whose content is interlaced.
#define AV_FRAME_FLAG_TOP_FIELD_FIRST
A flag to mark frames where the top field is displayed first if the content is interlaced.
int av_frame_is_writable(AVFrame *frame)
Check if the frame data is writable.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
#define AV_LOG_TRACE
Extremely verbose debugging, useful for libav* development.
#define AV_LOG_VERBOSE
Detailed information.
int av_image_fill_linesizes(int linesizes[4], enum AVPixelFormat pix_fmt, int width)
Fill plane linesizes for an image with pixel format pix_fmt and width width.
#define FILTER_INPUTS(array)
#define FILTER_OUTPUTS(array)
#define AVFILTER_DEFINE_CLASS(fname)
#define FILTER_QUERY_FUNC2(func)
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
enum AVPixelFormat av_pix_fmt_desc_get_id(const AVPixFmtDescriptor *desc)
const AVPixFmtDescriptor * av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)
Iterate over all pixel format descriptors known to libavutil.
#define AV_PIX_FMT_FLAG_BITSTREAM
All values of a component are bit-wise packed end to end.
#define AV_PIX_FMT_FLAG_HWACCEL
Pixel format is an HW accelerated format.
#define AV_PIX_FMT_FLAG_PAL
Pixel format has a palette in data[1], values are indexes in this palette.
AVPixelFormat
Pixel format.
Describe the class of an AVClass context structure.
A link between two filters.
int w
agreed upon image width
int h
agreed upon image height
AVFilterContext * dst
dest filter
int format
agreed upon media format
A filter pad used for either input or output.
This structure describes decoded (raw) audio or video data.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
int dst_tff
output bff/tff
int line_size[4]
bytes of pixel data per line for each plane
static AVFormatContext * ctx
static const AVFilterPad avfilter_vf_fieldorder_inputs[]
static int config_input(AVFilterLink *inlink)
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
static const AVOption fieldorder_options[]
const AVFilterPad ff_video_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_VIDEO.
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.