FFmpeg
Loading...
Searching...
No Matches
vf_idet.c File Reference
#include <float.h>
#include "libavutil/common.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "filters.h"
#include "vf_idetdsp.h"

Go to the source code of this file.

Data Structures

struct  IDETSums
 
struct  IDETContext
 

Macros

#define MIN_PIXELS_PER_JOB   (128 * 1024)
 
#define HIST_SIZE   4
 
#define OFFSET(x)
 
#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 
#define PRECISION   1048576
 

Enumerations

enum  Type { TFF , BFF , PROGRESSIVE , UNDETERMINED }
 
enum  RepeatedField { REPEAT_NONE , REPEAT_TOP , REPEAT_BOTTOM }
 

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)
 
static int filter_slice (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
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)
 
static int config_input (AVFilterLink *inlink)
 

Variables

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

Macro Definition Documentation

◆ MIN_PIXELS_PER_JOB

#define MIN_PIXELS_PER_JOB   (128 * 1024)

Definition at line 51 of file vf_idet.c.

Referenced by filter().

◆ HIST_SIZE

#define HIST_SIZE   4

Definition at line 72 of file vf_idet.c.

◆ OFFSET

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

Definition at line 90 of file vf_idet.c.

◆ FLAGS

Definition at line 91 of file vf_idet.c.

◆ PRECISION

#define PRECISION   1048576

Definition at line 115 of file vf_idet.c.

Enumeration Type Documentation

◆ Type

enum Type
Enumerator
TFF 
BFF 
PROGRESSIVE 
UNDETERMINED 

Definition at line 31 of file vf_idet.c.

◆ RepeatedField

Enumerator
REPEAT_NONE 
REPEAT_TOP 
REPEAT_BOTTOM 

Definition at line 38 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 104 of file vf_idet.c.

Referenced by filter().

◆ uintpow()

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

Definition at line 117 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 124 of file vf_idet.c.

Referenced by filter().

◆ rep2str()

static const char * rep2str ( RepeatedField repeated_field)
static

Definition at line 138 of file vf_idet.c.

Referenced by filter().

◆ filter_slice()

static int filter_slice ( AVFilterContext * ctx,
void * arg,
int jobnr,
int nb_jobs )
static

Definition at line 148 of file vf_idet.c.

◆ filter()

static void filter ( AVFilterContext * ctx)
static

Definition at line 193 of file vf_idet.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink * link,
AVFrame * picref )
static

Definition at line 305 of file vf_idet.c.

Referenced by request_frame().

◆ request_frame()

static int request_frame ( AVFilterLink * link)
static

Definition at line 383 of file vf_idet.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext * ctx)
static

Definition at line 407 of file vf_idet.c.

◆ init()

static av_cold int init ( AVFilterContext * ctx)
static

Definition at line 469 of file vf_idet.c.

◆ config_input()

static int config_input ( AVFilterLink * inlink)
static

Definition at line 487 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 }
}
#define FLAGS
Definition cmdutils.c:596
#define NULL
Definition coverity.c:32
#define OFFSET(x)
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition opt.h:258
@ AV_OPT_TYPE_FLOAT
Underlying C type is float.
Definition opt.h:270

Definition at line 93 of file vf_idet.c.

◆ pix_fmts

enum AVPixelFormat pix_fmts[]
static

Definition at line 435 of file vf_idet.c.

◆ idet_inputs

const AVFilterPad idet_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 501 of file vf_idet.c.

◆ idet_outputs

const AVFilterPad idet_outputs[]
static
Initial value:
= {
{
.name = "default",
.request_frame = request_frame
},
}
static int request_frame(AVFilterLink *outlink)
Definition af_aecho.c:272

Definition at line 510 of file vf_idet.c.

◆ ff_vf_idet

const FFFilter ff_vf_idet
Initial value:
= {
.p.name = "idet",
.p.description = NULL_IF_CONFIG_SMALL("Interlace detect Filter."),
.p.priv_class = &idet_class,
.priv_size = sizeof(IDETContext),
.init = init,
}
int(* init)(AVBSFContext *ctx)
Definition dts2pts.c:613
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition avfilter.h:172
#define AVFILTER_FLAG_METADATA_ONLY
The filter is a "metadata" filter - it does not modify the frame data in any way.
Definition avfilter.h:188
static av_cold void uninit(AVBitStreamFilterContext *ctx)
#define FILTER_INPUTS(array)
Definition filters.h:279
#define FILTER_OUTPUTS(array)
Definition filters.h:280
#define FILTER_PIXFMTS_ARRAY(array)
Definition filters.h:259
static const AVFilterPad idet_outputs[]
Definition vf_idet.c:510
static const AVFilterPad idet_inputs[]
Definition vf_idet.c:501
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:98
static enum AVPixelFormat pix_fmts[]
Definition libkvazaar.c:296

Definition at line 518 of file vf_idet.c.