FFmpeg
Loading...
Searching...
No Matches
vf_detelecine.c File Reference
#include "libavutil/avstring.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "filters.h"
#include "formats.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  DetelecineContext
 

Macros

#define OFFSET(x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS (detelecine)
 
static av_cold int init (AVFilterContext *ctx)
 
static int query_formats (const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
 
static int config_input (AVFilterLink *inlink)
 
static int config_output (AVFilterLink *outlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *inpicref)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption detelecine_options []
 
static const AVFilterPad detelecine_inputs []
 
static const AVFilterPad detelecine_outputs []
 
const FFFilter ff_vf_detelecine
 

Macro Definition Documentation

◆ OFFSET

#define OFFSET ( x)
Value:

Definition at line 57 of file vf_detelecine.c.

◆ FLAGS

Definition at line 58 of file vf_detelecine.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( detelecine )

◆ init()

static av_cold int init ( AVFilterContext * ctx)
static

Definition at line 73 of file vf_detelecine.c.

◆ query_formats()

static int query_formats ( const AVFilterContext * ctx,
AVFilterFormatsConfig ** cfg_in,
AVFilterFormatsConfig ** cfg_out )
static

Definition at line 125 of file vf_detelecine.c.

◆ config_input()

static int config_input ( AVFilterLink * inlink)
static

Definition at line 137 of file vf_detelecine.c.

◆ config_output()

static int config_output ( AVFilterLink * outlink)
static

Definition at line 166 of file vf_detelecine.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink * inlink,
AVFrame * inpicref )
static

Definition at line 194 of file vf_detelecine.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext * ctx)
static

Definition at line 348 of file vf_detelecine.c.

Variable Documentation

◆ detelecine_options

const AVOption detelecine_options[]
static
Initial value:
= {
{"first_field", "select first field", OFFSET(first_field), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, FLAGS, .unit = "field"},
{"top", "select top field first", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, .unit = "field"},
{"t", "select top field first", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, .unit = "field"},
{"bottom", "select bottom field first", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, .unit = "field"},
{"b", "select bottom field first", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, .unit = "field"},
{"pattern", "pattern that describe for how many fields a frame is to be displayed", OFFSET(pattern), AV_OPT_TYPE_STRING, {.str="23"}, 0, 0, FLAGS},
{"start_frame", "position of first frame with respect to the pattern if stream is cut", OFFSET(start_frame), AV_OPT_TYPE_INT, {.i64=0}, 0, 13, FLAGS},
{NULL}
}
#define FLAGS
Definition cmdutils.c:598
#define NULL
Definition coverity.c:32
#define OFFSET(x)
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
Definition opt.h:298
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition opt.h:258
@ AV_OPT_TYPE_STRING
Underlying C type is a uint8_t* that is either NULL or points to a C string allocated with the av_mal...
Definition opt.h:275
static int first_field(const struct video_data *s)
Definition v4l2.c:260

Definition at line 60 of file vf_detelecine.c.

◆ detelecine_inputs

const AVFilterPad detelecine_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
.config_props = config_input,
},
}
static int config_input(AVFilterLink *inlink)
static int filter_frame(DBEDecodeContext *s, AVFrame *frame)
Definition dolby_e.c:1067
@ AVMEDIA_TYPE_VIDEO
Definition avutil.h:200

Definition at line 357 of file vf_detelecine.c.

◆ detelecine_outputs

const AVFilterPad detelecine_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_output,
},
}
static int config_output(AVBitStreamFilterLink *outlink)

Definition at line 366 of file vf_detelecine.c.

◆ ff_vf_detelecine

const FFFilter ff_vf_detelecine
Initial value:
= {
.p.name = "detelecine",
.p.description = NULL_IF_CONFIG_SMALL("Apply an inverse telecine pattern."),
.p.priv_class = &detelecine_class,
.priv_size = sizeof(DetelecineContext),
.init = init,
}
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
Definition aeval.c:246
int(* init)(AVBSFContext *ctx)
Definition dts2pts.c:608
static av_cold void uninit(AVBitStreamFilterContext *ctx)
#define FILTER_INPUTS(array)
Definition filters.h:264
#define FILTER_OUTPUTS(array)
Definition filters.h:265
#define FILTER_QUERY_FUNC2(func)
Definition filters.h:241
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:88
static const AVFilterPad detelecine_outputs[]
static const AVFilterPad detelecine_inputs[]

Definition at line 374 of file vf_detelecine.c.