FFmpeg
|
vf_blackframe.c File Reference
Search for black frames to detect scene transitions. More...
#include <stdio.h>
#include <inttypes.h>
#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "avfilter.h"
#include "internal.h"
#include "formats.h"
#include "video.h"
Include dependency graph for vf_blackframe.c:
Go to the source code of this file.
Data Structures | |
struct | BlackFrameContext |
Macros | |
#define | OFFSET(x) offsetof(BlackFrameContext, x) |
#define | FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM |
Functions | |
static int | query_formats (AVFilterContext *ctx) |
static int | filter_frame (AVFilterLink *inlink, AVFrame *frame) |
AVFILTER_DEFINE_CLASS (blackframe) | |
Variables | |
static const AVOption | blackframe_options [] |
static const AVFilterPad | avfilter_vf_blackframe_inputs [] |
static const AVFilterPad | avfilter_vf_blackframe_outputs [] |
AVFilter | avfilter_vf_blackframe |
Detailed Description
Search for black frames to detect scene transitions.
Ported from MPlayer libmpcodecs/vf_blackframe.c.
Definition in file vf_blackframe.c.
Macro Definition Documentation
#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM |
Definition at line 93 of file vf_blackframe.c.
#define OFFSET | ( | x | ) | offsetof(BlackFrameContext, x) |
Definition at line 92 of file vf_blackframe.c.
Function Documentation
AVFILTER_DEFINE_CLASS | ( | blackframe | ) |
|
static |
Definition at line 62 of file vf_blackframe.c.
|
static |
Definition at line 50 of file vf_blackframe.c.
Variable Documentation
AVFilter avfilter_vf_blackframe |
Initial value:
= {
.name = "blackframe",
.description = NULL_IF_CONFIG_SMALL("Detect frames that are (almost) black."),
.priv_size = sizeof(BlackFrameContext),
.priv_class = &blackframe_class,
}
Definition: vf_blackframe.c:41
static const AVFilterPad avfilter_vf_blackframe_inputs[]
Definition: vf_blackframe.c:106
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: libavutil/internal.h:123
static const AVFilterPad avfilter_vf_blackframe_outputs[]
Definition: vf_blackframe.c:116
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: filter_design.txt:216
Definition at line 124 of file vf_blackframe.c.
|
static |
Initial value:
= {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer,
.filter_frame = filter_frame,
},
{ NULL }
}
AVFrame * ff_null_get_video_buffer(AVFilterLink *link, int w, int h)
Definition: video.c:35
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
Definition: vf_blackframe.c:62
Definition: avutil.h:143
Definition at line 106 of file vf_blackframe.c.
|
static |
Initial value:
Definition at line 116 of file vf_blackframe.c.
|
static |
Initial value:
= {
{ "amount", "Percentage of the pixels that have to be below the threshold "
"for the frame to be considered black.", OFFSET(bamount), AV_OPT_TYPE_INT, { .i64 = 98 }, 0, 100, FLAGS },
{ "threshold", "threshold below which a pixel value is considered black",
{ "thresh", "threshold below which a pixel value is considered black",
{ NULL },
}
Definition: opt.h:222
Definition at line 94 of file vf_blackframe.c.
Generated on Fri Dec 20 2024 06:56:16 for FFmpeg by 1.8.11