79 for (plane = 0; plane < 4; plane++) {
92 int h, plane, line_step, line_size,
line;
100 "frame with same field order" :
"progressive frame");
105 "picture will move %s one line\n",
108 for (plane = 0; plane < 4 && frame->
data[plane]; plane++) {
111 data = frame->
data[plane];
118 for (line = 0; line < h; line++) {
120 memcpy(data, data + line_step, line_size);
122 memcpy(data, data - line_step - line_step, line_size);
132 data += (h - 1) * line_step;
133 for (line = h - 1; line >= 0 ; line--) {
135 memcpy(data, data - line_step, line_size);
137 memcpy(data, data + line_step + line_step, line_size);
148 #define OFFSET(x) offsetof(FieldOrderContext, x)
149 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM
152 {
"bff",
"bottom field first", 0,
AV_OPT_TYPE_CONST, { .i64 = 0 }, .unit =
"order" },
153 {
"tff",
"top field first", 0,
AV_OPT_TYPE_CONST, { .i64 = 1 }, .unit =
"order" },
184 .
name =
"fieldorder",
187 .priv_class = &fieldorder_class,
189 .
inputs = avfilter_vf_fieldorder_inputs,
190 .
outputs = avfilter_vf_fieldorder_outputs,
AVFilter ff_vf_fieldorder
int av_image_get_linesize(enum AVPixelFormat pix_fmt, int width, int plane)
Compute the size of an image line with format pix_fmt and width width for the plane plane...
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
This structure describes decoded (raw) audio or video data.
static const AVFilterPad outputs[]
Main libavfilter public API header.
static int query_formats(AVFilterContext *ctx)
av_dlog(ac->avr,"%d samples - audio_convert: %s to %s (%s)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt), use_generic?ac->func_descr_generic:ac->func_descr)
static enum AVSampleFormat formats[]
const char * name
Pad name.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
AVFilterLink ** inputs
array of pointers to input links
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
int dst_tff
output bff/tff
#define AV_LOG_VERBOSE
Detailed information.
int interlaced_frame
The content of the picture is interlaced.
static const AVOption options[]
static const AVFilterPad avfilter_vf_fieldorder_inputs[]
A filter pad used for either input or output.
int line_size[4]
bytes of pixel data per line for each plane
A link between two filters.
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void * priv
private data for use by the filter
#define AV_PIX_FMT_FLAG_HWACCEL
Pixel format is an HW accelerated format.
void av_log(void *avcl, int level, const char *fmt,...)
AVFilterFormats * in_formats
Lists of formats supported by the input and output filters respectively.
int w
agreed upon image width
common internal API header
uint8_t nb_components
The number of components each pixel has, (1-4)
enum AVPixelFormat pix_fmt
int format
agreed upon media format
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Describe the class of an AVClass context structure.
static const AVFilterPad inputs[]
const char * name
Filter name.
#define AV_PIX_FMT_FLAG_BITSTREAM
All values of a component are bit-wise packed end to end.
AVFilterLink ** outputs
array of pointers to output links
static const AVFilterPad avfilter_vf_fieldorder_outputs[]
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static int config_input(AVFilterLink *inlink)
int top_field_first
If the content is interlaced, is top field displayed first.
AVFilterContext * dst
dest filter
static const AVClass fieldorder_class
number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of...
AVPixelFormat
Pixel format.
AVFilterFormats * out_formats