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

Macros

#define OFFSET(x)   offsetof(InterlaceContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS (interlace)
 
static void lowpass_line_c (uint8_t *dstp, ptrdiff_t linesize, const uint8_t *srcp, ptrdiff_t mref, ptrdiff_t pref, int clip_max)
 
static void lowpass_line_c_16 (uint8_t *dst8, ptrdiff_t linesize, const uint8_t *src8, ptrdiff_t mref, ptrdiff_t pref, int clip_max)
 
static void lowpass_line_complex_c (uint8_t *dstp, ptrdiff_t linesize, const uint8_t *srcp, ptrdiff_t mref, ptrdiff_t pref, int clip_max)
 
static void lowpass_line_complex_c_16 (uint8_t *dst8, ptrdiff_t linesize, const uint8_t *src8, ptrdiff_t mref, ptrdiff_t pref, int clip_max)
 
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)
 

Variables

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 41 of file vf_interlace.c.

Definition at line 42 of file vf_interlace.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( interlace  )
static void lowpass_line_c ( uint8_t dstp,
ptrdiff_t  linesize,
const uint8_t srcp,
ptrdiff_t  mref,
ptrdiff_t  pref,
int  clip_max 
)
static

Definition at line 63 of file vf_interlace.c.

Referenced by config_out_props().

static void lowpass_line_c_16 ( uint8_t dst8,
ptrdiff_t  linesize,
const uint8_t src8,
ptrdiff_t  mref,
ptrdiff_t  pref,
int  clip_max 
)
static

Definition at line 78 of file vf_interlace.c.

Referenced by config_out_props().

static void lowpass_line_complex_c ( uint8_t dstp,
ptrdiff_t  linesize,
const uint8_t srcp,
ptrdiff_t  mref,
ptrdiff_t  pref,
int  clip_max 
)
static

Definition at line 97 of file vf_interlace.c.

Referenced by config_out_props().

static void lowpass_line_complex_c_16 ( uint8_t dst8,
ptrdiff_t  linesize,
const uint8_t src8,
ptrdiff_t  mref,
ptrdiff_t  pref,
int  clip_max 
)
static

Definition at line 125 of file vf_interlace.c.

Referenced by config_out_props().

static int query_formats ( AVFilterContext ctx)
static

Definition at line 172 of file vf_interlace.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 180 of file vf_interlace.c.

static int config_out_props ( AVFilterLink outlink)
static

Definition at line 188 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 
)
static

Definition at line 235 of file vf_interlace.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink inlink,
AVFrame buf 
)
static

Definition at line 284 of file vf_interlace.c.

Variable Documentation

const AVOption interlace_options[]
static
Initial value:
= {
{ "scan", "scanning mode", OFFSET(scan),
AV_OPT_TYPE_INT, {.i64 = MODE_TFF }, 0, 1, .flags = FLAGS, .unit = "scan" },
{ "tff", "top field first", 0,
AV_OPT_TYPE_CONST, {.i64 = MODE_TFF }, INT_MIN, INT_MAX, .flags = FLAGS, .unit = "scan" },
{ "bff", "bottom field first", 0,
AV_OPT_TYPE_CONST, {.i64 = MODE_BFF }, INT_MIN, INT_MAX, .flags = FLAGS, .unit = "scan" },
{ "lowpass", "set vertical low-pass filter", OFFSET(lowpass),
AV_OPT_TYPE_INT, {.i64 = VLPF_LIN }, 0, 2, .flags = FLAGS, .unit = "lowpass" },
{ "off", "disable vertical low-pass filter", 0,
AV_OPT_TYPE_CONST, {.i64 = VLPF_OFF }, INT_MIN, INT_MAX, .flags = FLAGS, .unit = "lowpass" },
{ "linear", "linear vertical low-pass filter", 0,
AV_OPT_TYPE_CONST, {.i64 = VLPF_LIN }, INT_MIN, INT_MAX, .flags = FLAGS, .unit = "lowpass" },
{ "complex", "complex vertical low-pass filter", 0,
AV_OPT_TYPE_CONST, {.i64 = VLPF_CMP }, INT_MIN, INT_MAX, .flags = FLAGS, .unit = "lowpass" },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: vf_interlace.c:41
#define FLAGS
Definition: vf_interlace.c:42

Definition at line 43 of file vf_interlace.c.

enum AVPixelFormat formats_supported[]
static
Initial value:
= {
}
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: pixfmt.h:170
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition: pixfmt.h:67
planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
Definition: pixfmt.h:201
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
Definition: pixfmt.h:102
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition: pixfmt.h:265
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range...
Definition: pixfmt.h:101
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
Definition: pixfmt.h:75
planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition: pixfmt.h:176
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
Definition: pixfmt.h:188
planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: pixfmt.h:172
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:66
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
Definition: pixfmt.h:74
planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: pixfmt.h:257
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
Definition: pixfmt.h:189
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
Definition: pixfmt.h:68
planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)
Definition: pixfmt.h:199
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:62
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: pixfmt.h:261
Y , 8bpp.
Definition: pixfmt.h:70
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
Definition: pixfmt.h:76
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
Definition: pixfmt.h:69
planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
Definition: pixfmt.h:197

Definition at line 161 of file vf_interlace.c.

Referenced by query_formats().

const AVFilterPad inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
Definition: vf_interlace.c:284

Definition at line 334 of file vf_interlace.c.

const AVFilterPad outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_out_props,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int config_out_props(AVFilterLink *outlink)
Definition: vf_interlace.c:188

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

Definition at line 352 of file vf_interlace.c.