Go to the source code of this file.
Potential thumbnail lookup filter to reduce the risk of an inappropriate selection (such as a black frame) we could get with an absolute seek.
Simplified version of algorithm by Vadim Zaliva lord@.nosp@m.croc.nosp@m.odile.nosp@m..org.
- See also
- http://notbrainsurgery.livejournal.com/29773.html
Definition in file vf_thumbnail.c.
◆ HIST_SIZE
#define HIST_SIZE (3*256) |
◆ OFFSET
◆ FLAGS
◆ AVFILTER_DEFINE_CLASS()
◆ init()
◆ frame_sum_square_err()
static double frame_sum_square_err |
( |
const int * |
hist, |
|
|
const double * |
median |
|
) |
| |
|
static |
Compute Sum-square deviation to estimate "closeness".
- Parameters
-
hist | color distribution histogram |
median | average color distribution histogram |
- Returns
- sum of squared errors
Definition at line 91 of file vf_thumbnail.c.
Referenced by get_best_frame().
◆ get_best_frame()
◆ do_slice()
◆ filter_frame()
◆ uninit()
◆ request_frame()
◆ config_props()
◆ thumbnail_options
◆ pix_fmts
◆ thumbnail_inputs
Initial value:= {
{
.name = "default",
},
}
Definition at line 309 of file vf_thumbnail.c.
◆ thumbnail_outputs
Initial value:= {
{
.name = "default",
},
}
Definition at line 318 of file vf_thumbnail.c.
◆ ff_vf_thumbnail
Initial value:= {
.name = "thumbnail",
.description =
NULL_IF_CONFIG_SMALL(
"Select the most representative frame in a given sequence of consecutive frames."),
.priv_class = &thumbnail_class,
}
Definition at line 326 of file vf_thumbnail.c.
#define AV_LOG_QUIET
Print no output.
#define FILTER_PIXFMTS_ARRAY(array)
#define AV_LOG_VERBOSE
Detailed information.
@ AV_PIX_FMT_BGR24
packed RGB 8:8:8, 24bpp, BGRBGR...
@ AV_PIX_FMT_BGRA
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
@ AV_PIX_FMT_YUV440P
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
static enum AVPixelFormat pix_fmts[]
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
@ AV_PIX_FMT_YUVJ411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor ...
@ AV_PIX_FMT_YUVJ422P
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
@ AV_PIX_FMT_YUVA420P
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
#define FILTER_INPUTS(array)
@ AV_PIX_FMT_YUVJ444P
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
@ AV_PIX_FMT_YUVJ420P
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
static int config_props(AVFilterLink *inlink)
@ AV_PIX_FMT_BGR0
packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined
@ AV_PIX_FMT_ABGR
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static int request_frame(AVFilterLink *link)
static const AVFilterPad thumbnail_outputs[]
static av_cold void uninit(AVFilterContext *ctx)
@ AV_PIX_FMT_YUVA444P
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
@ AV_PIX_FMT_RGB0
packed RGB 8:8:8, 32bpp, RGBXRGBX... X=unused/undefined
#define AV_LOG_INFO
Standard information.
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
@ AV_PIX_FMT_ARGB
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
@ AV_PIX_FMT_YUVJ440P
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range
@ AV_PIX_FMT_0BGR
packed BGR 8:8:8, 32bpp, XBGRXBGR... X=unused/undefined
static const AVFilterPad thumbnail_inputs[]
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
#define FILTER_OUTPUTS(array)
@ AV_PIX_FMT_YUV411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
@ AV_PIX_FMT_0RGB
packed RGB 8:8:8, 32bpp, XRGBXRGB... X=unused/undefined
@ AV_PIX_FMT_YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
static av_cold int init(AVFilterContext *ctx)
@ AV_PIX_FMT_YUVA422P
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)