vf_idet.c File Reference
#include <float.h>
#include "libavutil/cpu.h"
#include "libavutil/common.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "internal.h"
Include dependency graph for vf_idet.c:

Go to the source code of this file.

Data Structures

struct  IDETContext
 

Macros

#define HIST_SIZE   4
 
#define OFFSET(x)   offsetof(IDETContext, x)
 
#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 

Enumerations

enum  Type { TFF, BFF, PROGRSSIVE, UNDETERMINED }
 

Functions

 AVFILTER_DEFINE_CLASS (idet)
 
static const char * type2str (Type type)
 
static int filter_line_c (const uint8_t *a, const uint8_t *b, const uint8_t *c, int w)
 
static int filter_line_c_16bit (const uint16_t *a, const uint16_t *b, const uint16_t *c, int w)
 
static void filter (AVFilterContext *ctx)
 
static int filter_frame (AVFilterLink *link, AVFrame *picref)
 
static int request_frame (AVFilterLink *link)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
static av_cold int init (AVFilterContext *ctx)
 

Variables

static const AVOption idet_options []
 
static const AVFilterPad idet_inputs []
 
static const AVFilterPad idet_outputs []
 
AVFilter avfilter_vf_idet
 

Macro Definition Documentation

Definition at line 59 of file vf_idet.c.

#define HIST_SIZE   4

Definition at line 30 of file vf_idet.c.

Referenced by filter(), and init().

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

Definition at line 58 of file vf_idet.c.

Enumeration Type Documentation

enum Type
Enumerator
TFF 
BFF 
PROGRSSIVE 
UNDETERMINED 

Definition at line 32 of file vf_idet.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( idet  )
static void filter ( AVFilterContext ctx)
static

Definition at line 106 of file vf_idet.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink link,
AVFrame picref 
)
static

Definition at line 182 of file vf_idet.c.

static int filter_line_c ( const uint8_t a,
const uint8_t b,
const uint8_t c,
int  w 
)
static

Definition at line 80 of file vf_idet.c.

Referenced by init().

static int filter_line_c_16bit ( const uint16_t *  a,
const uint16_t *  b,
const uint16_t *  c,
int  w 
)
static

Definition at line 93 of file vf_idet.c.

Referenced by filter_frame().

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 276 of file vf_idet.c.

static int query_formats ( AVFilterContext ctx)
static

Definition at line 246 of file vf_idet.c.

static int request_frame ( AVFilterLink link)
static

Definition at line 209 of file vf_idet.c.

static const char* type2str ( Type  type)
static

Definition at line 69 of file vf_idet.c.

Referenced by filter().

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 224 of file vf_idet.c.

Variable Documentation

AVFilter avfilter_vf_idet
Initial value:
= {
.name = "idet",
.description = NULL_IF_CONFIG_SMALL("Interlace detect Filter."),
.priv_size = sizeof(IDETContext),
.init = init,
.priv_class = &idet_class,
}
static const AVFilterPad outputs[]
Definition: af_ashowinfo.c:117
static int query_formats(AVFilterContext *ctx)
Definition: vf_idet.c:246
static const AVFilterPad idet_inputs[]
Definition: vf_idet.c:289
static const AVFilterPad idet_outputs[]
Definition: vf_idet.c:298
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_idet.c:224
static av_cold int init(AVFilterContext *ctx)
Definition: vf_idet.c:276
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs

Definition at line 307 of file vf_idet.c.

const AVFilterPad idet_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{ NULL }
}
NULL
Definition: eval.c:55
static int filter_frame(AVFilterLink *link, AVFrame *picref)
Definition: vf_idet.c:182

Definition at line 289 of file vf_idet.c.

const AVOption idet_options[]
static
Initial value:
= {
{ "intl_thres", "set interlacing threshold", OFFSET(interlace_threshold), AV_OPT_TYPE_FLOAT, {.dbl = 1.04}, -1, FLT_MAX, FLAGS },
{ "prog_thres", "set progressive threshold", OFFSET(progressive_threshold), AV_OPT_TYPE_FLOAT, {.dbl = 1.5}, -1, FLT_MAX, FLAGS },
{ NULL }
}
#define FLAGS
Definition: vf_idet.c:59
NULL
Definition: eval.c:55
#define OFFSET(x)
Definition: vf_idet.c:58

Definition at line 61 of file vf_idet.c.

const AVFilterPad idet_outputs[]
static
Initial value:
= {
{
.name = "default",
.request_frame = request_frame,
},
{ NULL }
}
NULL
Definition: eval.c:55
static int request_frame(AVFilterLink *link)
Definition: vf_idet.c:209

Definition at line 298 of file vf_idet.c.