FFmpeg
Data Structures | Macros | Functions | Variables
vf_blackdetect.c File Reference

Video black detector, loosely based on blackframe with extended syntax and features. More...

#include <float.h>
#include "libavutil/opt.h"
#include "libavutil/timestamp.h"
#include "avfilter.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct   BlackDetectContext
 

Macros

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

Functions

  AVFILTER_DEFINE_CLASS (blackdetect)
 
static int  query_formats (AVFilterContext *ctx)
 
static int  config_input (AVFilterLink *inlink)
 
 
static int  request_frame (AVFilterLink *outlink)
 
static int  filter_frame (AVFilterLink *inlink, AVFrame *picref)
 

Variables

static const AVOption  blackdetect_options []
 
static enum AVPixelFormat  yuvj_formats []
 
static const AVFilterPad  blackdetect_inputs []
 
static const AVFilterPad  blackdetect_outputs []
 
 

Detailed Description

Video black detector, loosely based on blackframe with extended syntax and features.

Definition in file vf_blackdetect.c.

Macro Definition Documentation

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

Definition at line 49 of file vf_blackdetect.c.

Definition at line 50 of file vf_blackdetect.c.

Definition at line 64 of file vf_blackdetect.c.

Referenced by query_formats().

Function Documentation

AVFILTER_DEFINE_CLASS ( blackdetect  )
static int query_formats ( AVFilterContextctx )
static

Definition at line 71 of file vf_blackdetect.c.

static int config_input ( AVFilterLinkinlink )
static

Definition at line 87 of file vf_blackdetect.c.

static void check_black_end ( AVFilterContextctx )
static

Definition at line 108 of file vf_blackdetect.c.

Referenced by filter_frame(), and request_frame().

static int request_frame ( AVFilterLinkoutlink )
static

Definition at line 122 of file vf_blackdetect.c.

static int filter_frame ( AVFilterLinkinlink,
AVFramepicref 
)
static

Definition at line 138 of file vf_blackdetect.c.

Variable Documentation

const AVOption blackdetect_options[]
static
Initial value:
= {
{ "d", "set minimum detected black duration in seconds", OFFSET(black_min_duration_time), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 0, DBL_MAX, FLAGS },
{ "black_min_duration", "set minimum detected black duration in seconds", OFFSET(black_min_duration_time), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 0, DBL_MAX, FLAGS },
{ "picture_black_ratio_th", "set the picture black ratio threshold", OFFSET(picture_black_ratio_th), AV_OPT_TYPE_DOUBLE, {.dbl=.98}, 0, 1, FLAGS },
{ "pic_th", "set the picture black ratio threshold", OFFSET(picture_black_ratio_th), AV_OPT_TYPE_DOUBLE, {.dbl=.98}, 0, 1, FLAGS },
{ "pixel_black_th", "set the pixel black threshold", OFFSET(pixel_black_th), AV_OPT_TYPE_DOUBLE, {.dbl=.10}, 0, 1, FLAGS },
{ "pix_th", "set the pixel black threshold", OFFSET(pixel_black_th), AV_OPT_TYPE_DOUBLE, {.dbl=.10}, 0, 1, FLAGS },
{ NULL }
}

Definition at line 52 of file vf_blackdetect.c.

enum AVPixelFormat yuvj_formats[]
static
Initial value:
= {
}

Definition at line 67 of file vf_blackdetect.c.

Referenced by config_input().

const AVFilterPad blackdetect_inputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_input,
.filter_frame = filter_frame,
},
{ NULL }
}

Definition at line 182 of file vf_blackdetect.c.

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

Definition at line 192 of file vf_blackdetect.c.

AVFilter ff_vf_blackdetect
Initial value:
= {
.name = "blackdetect",
.description = NULL_IF_CONFIG_SMALL("Detect video intervals that are (almost) black."),
.priv_size = sizeof(BlackDetectContext),
.priv_class = &blackdetect_class,
}

Definition at line 201 of file vf_blackdetect.c.


Generated on Sun Mar 8 2015 02:35:27 for FFmpeg by   doxygen 1.8.2

AltStyle によって変換されたページ (->オリジナル) /