Libav
Data Structures | Macros | Enumerations | 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 "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  InterlaceContext
 

Macros

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

Enumerations

enum  ScanMode { MODE_TFF = 0, MODE_BFF = 1 }
 
enum  FieldType { FIELD_UPPER = 0, FIELD_LOWER = 1 }
 

Functions

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 (AVFrame *src_frame, AVFrame *dst_frame, AVFilterLink *inlink, enum FieldType field_type, int lowpass)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *buf)
 
static int request_frame (AVFilterLink *outlink)
 

Variables

static const AVOption options []
 
class {
      class_name = "interlace filter"
 
      item_name = av_default_item_name
 
      option = options
 
      version = LIBAVUTIL_VERSION_INT
 
}; 
 
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 52 of file vf_interlace.c.

#define V   AV_OPT_FLAG_VIDEO_PARAM

Definition at line 53 of file vf_interlace.c.

Enumeration Type Documentation

enum ScanMode
Enumerator
MODE_TFF 
MODE_BFF 

Definition at line 34 of file vf_interlace.c.

enum FieldType
Enumerator
FIELD_UPPER 
FIELD_LOWER 

Definition at line 39 of file vf_interlace.c.

Function Documentation

static int query_formats ( AVFilterContext ctx)
static

Definition at line 81 of file vf_interlace.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 87 of file vf_interlace.c.

static int config_out_props ( AVFilterLink outlink)
static

Definition at line 97 of file vf_interlace.c.

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

Definition at line 120 of file vf_interlace.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink inlink,
AVFrame buf 
)
static

Definition at line 168 of file vf_interlace.c.

static int request_frame ( AVFilterLink outlink)
static

Definition at line 220 of file vf_interlace.c.

Variable Documentation

const AVOption options[]
static
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 54 of file vf_interlace.c.

class_name = "interlace filter"

Definition at line 67 of file vf_interlace.c.

item_name = av_default_item_name

Definition at line 68 of file vf_interlace.c.

option = options

Definition at line 69 of file vf_interlace.c.

Definition at line 70 of file vf_interlace.c.

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

Definition at line 233 of file vf_interlace.c.

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

Definition at line 242 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 = &class,
.priv_size = sizeof(InterlaceContext),
}

Definition at line 252 of file vf_interlace.c.