49 const char *tff =
"tff";
50 const char *bff =
"bff";
54 }
else if (sscanf(args,
"%u", &fieldorder->
dst_tff) == 1) {
56 }
else if (!strcmp(tff, args)) {
58 }
else if (!strcmp(bff, args)) {
66 fieldorder->
dst_tff ? tff : bff);
106 for (plane = 0; plane < 4; plane++) {
129 int h, plane, line_step, line_size,
line;
137 "picture will move %s one line\n",
140 for (plane = 0; plane < 4 && frame->
data[plane]; plane++) {
143 data = frame->
data[plane];
150 for (line = 0; line < h; line++) {
152 memcpy(data, data + line_step, line_size);
154 memcpy(data, data - line_step - line_step, line_size);
164 data += (h - 1) * line_step;
165 for (line = h - 1; line >= 0 ; line--) {
167 memcpy(data, data - line_step, line_size);
169 memcpy(data, data + line_step + line_step, line_size);
202 .
name =
"fieldorder",
207 .
inputs = avfilter_vf_fieldorder_inputs,
208 .
outputs = avfilter_vf_fieldorder_outputs,
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)
AVFilterBufferRefVideoProps * video
video buffer specific properties
int linesize[8]
number of bytes per line
static const AVFilterPad outputs[]
int ff_filter_frame(AVFilterLink *link, AVFilterBufferRef *frame)
Send a frame of data to the next filter.
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[]
#define AV_PERM_READ
can read from the buffer
const char * name
Pad name.
AVFilterLink ** inputs
array of pointers to input links
int top_field_first
field order
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.
AVFilterBufferRef * ff_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
Request a picture buffer with a specific set of permissions.
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
static av_cold int init(AVFilterContext *ctx, const char *args)
#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
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
AVFilter avfilter_vf_fieldorder
uint8_t nb_components
The number of components each pixel has, (1-4)
static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *frame)
#define PIX_FMT_BITSTREAM
All values of a component are bit-wise packed end to end.
enum AVPixelFormat pix_fmt
int format
agreed upon media format
A reference to an AVFilterBuffer.
#define PIX_FMT_HWACCEL
Pixel format is an HW accelerated format.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
static const AVFilterPad inputs[]
const char * name
filter name
AVFilterLink ** outputs
array of pointers to output links
static const AVFilterPad avfilter_vf_fieldorder_outputs[]
#define AV_PERM_PRESERVE
nobody else can overwrite the buffer
static AVFilterBufferRef * get_video_buffer(AVFilterLink *inlink, int perms, int w, int h)
int interlaced
is frame interlaced
unsigned int dst_tff
output bff/tff
#define AV_PERM_REUSE2
can output the buffer multiple times, modified each time
static int config_input(AVFilterLink *inlink)
#define AV_PERM_WRITE
can write to the buffer
AVFilterContext * dst
dest filter
uint8_t * data[8]
picture/audio data for each plane
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