All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
vf_interlace.c File Reference

progressive to interlaced content filter, inspired by heavy debugging of tinterlace filter More...

#include "libavutil/common.h"
#include "libavutil/opt.h"
#include "libavutil/imgutils.h"
#include "libavutil/avassert.h"
#include "formats.h"
#include "avfilter.h"
#include "interlace.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.


#define OFFSET(x)   offsetof(InterlaceContext, x)


static void lowpass_line_c (uint8_t *dstp, ptrdiff_t linesize, const uint8_t *srcp, const uint8_t *srcp_above, const uint8_t *srcp_below)
static int query_formats (AVFilterContext *ctx)
static av_cold void uninit (AVFilterContext *ctx)
static int config_out_props (AVFilterLink *outlink)
static void copy_picture_field (InterlaceContext *s, AVFrame *src_frame, AVFrame *dst_frame, AVFilterLink *inlink, enum FieldType field_type, int lowpass)
static int filter_frame (AVFilterLink *inlink, AVFrame *buf)


static const AVOption interlace_options []
static enum AVPixelFormat formats_supported []
static const AVFilterPad inputs []
static const AVFilterPad outputs []
AVFilter ff_vf_interlace

Detailed Description

progressive to interlaced content filter, inspired by heavy debugging of tinterlace filter

Definition in file vf_interlace.c.

Macro Definition Documentation

#define OFFSET (   x)    offsetof(InterlaceContext, x)

Definition at line 40 of file vf_interlace.c.


Definition at line 41 of file vf_interlace.c.

Function Documentation

static void lowpass_line_c ( uint8_t dstp,
ptrdiff_t  linesize,
const uint8_t srcp,
const uint8_t srcp_above,
const uint8_t srcp_below 

Definition at line 56 of file vf_interlace.c.

Referenced by config_out_props().

static int query_formats ( AVFilterContext ctx)

Definition at line 77 of file vf_interlace.c.

static av_cold void uninit ( AVFilterContext ctx)

Definition at line 83 of file vf_interlace.c.

static int config_out_props ( AVFilterLink outlink)

Definition at line 91 of file vf_interlace.c.

static void copy_picture_field ( InterlaceContext s,
AVFrame src_frame,
AVFrame dst_frame,
AVFilterLink inlink,
enum FieldType  field_type,
int  lowpass 

Definition at line 129 of file vf_interlace.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink inlink,
AVFrame buf 

Definition at line 173 of file vf_interlace.c.

Variable Documentation

const AVOption interlace_options[]
Initial value:
= {
{ "scan", "scanning mode", OFFSET(scan),
AV_OPT_TYPE_INT, {.i64 = MODE_TFF }, 0, 1, .flags = V, .unit = "scan" },
{ "tff", "top field first", 0,
AV_OPT_TYPE_CONST, {.i64 = MODE_TFF }, INT_MIN, INT_MAX, .flags = V, .unit = "scan" },
{ "bff", "bottom field first", 0,
AV_OPT_TYPE_CONST, {.i64 = MODE_BFF }, INT_MIN, INT_MAX, .flags = V, .unit = "scan" },
{ "lowpass", "enable vertical low-pass filter", OFFSET(lowpass),
AV_OPT_TYPE_INT, {.i64 = 1 }, 0, 1, .flags = V },
{ NULL }

Definition at line 42 of file vf_interlace.c.

enum AVPixelFormat formats_supported[]
const AVFilterPad inputs[]
Initial value:
= {
.name = "default",
.filter_frame = filter_frame,
{ NULL }

Definition at line 223 of file vf_interlace.c.

const AVFilterPad outputs[]
Initial value:
= {
.name = "default",
.config_props = config_out_props,
{ NULL }

Definition at line 232 of file vf_interlace.c.

AVFilter ff_vf_interlace
Initial value:
= {
.name = "interlace",
.description = NULL_IF_CONFIG_SMALL("Convert progressive video into interlaced."),
.uninit = uninit,
.priv_class = &interlace_class,
.priv_size = sizeof(InterlaceContext),

Definition at line 241 of file vf_interlace.c.