Libav
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.

Macros

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

Functions

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 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

◆ OFFSET

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

Definition at line 35 of file vf_interlace.c.

◆ V

#define V   AV_OPT_FLAG_VIDEO_PARAM

Definition at line 36 of file vf_interlace.c.

Function Documentation

◆ lowpass_line_c()

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

Definition at line 56 of file vf_interlace.c.

Referenced by config_out_props().

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 77 of file vf_interlace.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 83 of file vf_interlace.c.

◆ config_out_props()

static int config_out_props ( AVFilterLink outlink)
static

Definition at line 93 of file vf_interlace.c.

◆ copy_picture_field()

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

Definition at line 130 of file vf_interlace.c.

Referenced by filter_frame().

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame buf 
)
static

Definition at line 177 of file vf_interlace.c.

◆ request_frame()

static int request_frame ( AVFilterLink outlink)
static

Definition at line 229 of file vf_interlace.c.

Variable Documentation

◆ options

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 }
}
#define OFFSET(x)
Definition: vf_interlace.c:35
static av_always_inline uint32_t lowpass(int prev, int cur, int16_t *coef, int depth)
Definition: vf_hqdn3d.c:51
NULL
Definition: eval.c:55
#define V
Definition: vf_interlace.c:36

Definition at line 37 of file vf_interlace.c.

◆ class_name

class_name = "interlace filter"
private

Definition at line 50 of file vf_interlace.c.

◆ item_name

item_name = av_default_item_name
private

Definition at line 51 of file vf_interlace.c.

◆ option

option = options
private

Definition at line 52 of file vf_interlace.c.

◆ version

version = LIBAVUTIL_VERSION_INT
private

Definition at line 53 of file vf_interlace.c.

◆ @122

const { ... }

◆ formats_supported

enum AVPixelFormat formats_supported[]
static
Initial value:
= {
}
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition: pixfmt.h:64
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
Definition: pixfmt.h:98
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range...
Definition: pixfmt.h:97
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
Definition: pixfmt.h:72
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:63
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
Definition: pixfmt.h:71
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
Definition: pixfmt.h:65
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:59
Y , 8bpp.
Definition: pixfmt.h:67
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
Definition: pixfmt.h:73

Definition at line 70 of file vf_interlace.c.

Referenced by query_formats().

◆ inputs

const AVFilterPad inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{ NULL }
}
NULL
Definition: eval.c:55
static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
Definition: vf_interlace.c:177

Definition at line 242 of file vf_interlace.c.

◆ outputs

const AVFilterPad outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_out_props,
.request_frame = request_frame,
},
{ NULL }
}
static int config_out_props(AVFilterLink *outlink)
Definition: vf_interlace.c:93
static int request_frame(AVFilterLink *outlink)
Definition: vf_interlace.c:229
NULL
Definition: eval.c:55

Definition at line 251 of file vf_interlace.c.

◆ ff_vf_interlace

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),
}
static const AVFilterPad inputs[]
Definition: vf_interlace.c:242
static int query_formats(AVFilterContext *ctx)
Definition: vf_interlace.c:77
static const AVFilterPad outputs[]
Definition: vf_interlace.c:251
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:148
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_interlace.c:83

Definition at line 261 of file vf_interlace.c.