FFmpeg
Macros | Functions | Variables
vf_idet.c File Reference
#include <float.h>
#include "libavutil/common.h"
#include "libavutil/opt.h"
#include "filters.h"
#include "vf_idet.h"

Go to the source code of this file.

Macros

#define OFFSET(x)   offsetof(IDETContext, x)
 
#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 
#define PRECISION   1048576
 

Functions

 AVFILTER_DEFINE_CLASS (idet)
 
static const char * type2str (Type type)
 
static uint64_t uintpow (uint64_t b, unsigned int e)
 
static int av_dict_set_fxp (AVDictionary **pm, const char *key, uint64_t value, unsigned int digits, int flags)
 
static const char * rep2str (RepeatedField repeated_field)
 
int ff_idet_filter_line_c (const uint8_t *a, const uint8_t *b, const uint8_t *c, int w)
 
int ff_idet_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 av_cold int init (AVFilterContext *ctx)
 

Variables

static const AVOption idet_options []
 
static enum AVPixelFormat pix_fmts []
 
static const AVFilterPad idet_inputs []
 
static const AVFilterPad idet_outputs []
 
const AVFilter ff_vf_idet
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 28 of file vf_idet.c.

◆ FLAGS

Definition at line 29 of file vf_idet.c.

◆ PRECISION

#define PRECISION   1048576

Definition at line 53 of file vf_idet.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( idet  )

◆ type2str()

static const char* type2str ( Type  type)
static

Definition at line 42 of file vf_idet.c.

Referenced by filter().

◆ uintpow()

static uint64_t uintpow ( uint64_t  b,
unsigned int  e 
)
static

Definition at line 55 of file vf_idet.c.

Referenced by av_dict_set_fxp().

◆ av_dict_set_fxp()

static int av_dict_set_fxp ( AVDictionary **  pm,
const char *  key,
uint64_t  value,
unsigned int  digits,
int  flags 
)
static

Definition at line 62 of file vf_idet.c.

Referenced by filter().

◆ rep2str()

static const char* rep2str ( RepeatedField  repeated_field)
static

Definition at line 76 of file vf_idet.c.

Referenced by filter().

◆ ff_idet_filter_line_c()

int ff_idet_filter_line_c ( const uint8_t *  a,
const uint8_t *  b,
const uint8_t *  c,
int  w 
)

Definition at line 86 of file vf_idet.c.

Referenced by init().

◆ ff_idet_filter_line_c_16bit()

int ff_idet_filter_line_c_16bit ( const uint16_t *  a,
const uint16_t *  b,
const uint16_t *  c,
int  w 
)

Definition at line 99 of file vf_idet.c.

Referenced by filter_frame().

◆ filter()

static void filter ( AVFilterContext ctx)
static

Definition at line 112 of file vf_idet.c.

Referenced by filter_frame().

◆ filter_frame()

static int filter_frame ( AVFilterLink link,
AVFrame picref 
)
static

Definition at line 249 of file vf_idet.c.

Referenced by request_frame().

◆ request_frame()

static int request_frame ( AVFilterLink link)
static

Definition at line 345 of file vf_idet.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 369 of file vf_idet.c.

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 430 of file vf_idet.c.

Variable Documentation

◆ idet_options

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 },
{ "rep_thres", "set repeat threshold", OFFSET(repeat_threshold), AV_OPT_TYPE_FLOAT, {.dbl = 3.0}, -1, FLT_MAX, FLAGS },
{ "half_life", "half life of cumulative statistics", OFFSET(half_life), AV_OPT_TYPE_FLOAT, {.dbl = 0.0}, -1, INT_MAX, FLAGS },
{ "analyze_interlaced_flag", "set number of frames to use to determine if the interlace flag is accurate", OFFSET(analyze_interlaced_flag), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, FLAGS },
{ NULL }
}

Definition at line 31 of file vf_idet.c.

◆ pix_fmts

enum AVPixelFormat pix_fmts[]
static

Definition at line 396 of file vf_idet.c.

◆ idet_inputs

const AVFilterPad idet_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
}

Definition at line 452 of file vf_idet.c.

◆ idet_outputs

const AVFilterPad idet_outputs[]
static
Initial value:
= {
{
.name = "default",
.request_frame = request_frame
},
}

Definition at line 460 of file vf_idet.c.

◆ ff_vf_idet

const AVFilter ff_vf_idet
Initial value:
= {
.name = "idet",
.description = NULL_IF_CONFIG_SMALL("Interlace detect Filter."),
.priv_size = sizeof(IDETContext),
.init = init,
.priv_class = &idet_class,
}

Definition at line 468 of file vf_idet.c.

request_frame
static int request_frame(AVFilterLink *link)
Definition: vf_idet.c:345
FILTER_PIXFMTS_ARRAY
#define FILTER_PIXFMTS_ARRAY(array)
Definition: filters.h:242
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: filters.h:262
filter_frame
static int filter_frame(AVFilterLink *link, AVFrame *picref)
Definition: vf_idet.c:249
pix_fmts
static enum AVPixelFormat pix_fmts[]
Definition: vf_idet.c:396
IDETContext
Definition: vf_idet.h:42
FLAGS
#define FLAGS
Definition: vf_idet.c:29
idet_outputs
static const AVFilterPad idet_outputs[]
Definition: vf_idet.c:460
init
static av_cold int init(AVFilterContext *ctx)
Definition: vf_idet.c:430
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: filters.h:263
NULL
#define NULL
Definition: coverity.c:32
idet_inputs
static const AVFilterPad idet_inputs[]
Definition: vf_idet.c:452
OFFSET
#define OFFSET(x)
Definition: vf_idet.c:28
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:94
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_idet.c:369
AV_OPT_TYPE_FLOAT
@ AV_OPT_TYPE_FLOAT
Underlying C type is float.
Definition: opt.h:271
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition: opt.h:259
AVFILTER_FLAG_METADATA_ONLY
#define AVFILTER_FLAG_METADATA_ONLY
The filter is a "metadata" filter - it does not modify the frame data in any way.
Definition: avfilter.h:168
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:482