#include "avfilter.h"
#include "internal.h"
Go to the source code of this file.
Data Structures | |
struct | thumb_frame |
struct | ThumbContext |
Defines | |
#define | HIST_SIZE (3*256) |
Functions | |
static av_cold int | init (AVFilterContext *ctx, const char *args) |
static int | draw_slice (AVFilterLink *inlink, int y, int h, int slice_dir) |
static double | frame_sum_square_err (const int *hist, const double *median) |
Compute Sum-square deviation to estimate "closeness". | |
static int | end_frame (AVFilterLink *inlink) |
static av_cold void | uninit (AVFilterContext *ctx) |
static int | null_start_frame (AVFilterLink *link, AVFilterBufferRef *picref) |
static int | request_frame (AVFilterLink *link) |
static int | poll_frame (AVFilterLink *link) |
static int | query_formats (AVFilterContext *ctx) |
Variables | |
AVFilter | avfilter_vf_thumbnail |
Simplified version of algorithm by Vadim Zaliva <lord@crocodile.org>.
Definition in file vf_thumbnail.c.
#define HIST_SIZE (3*256) |
Definition at line 33 of file vf_thumbnail.c.
static int draw_slice | ( | AVFilterLink * | inlink, | |
int | y, | |||
int | h, | |||
int | slice_dir | |||
) | [static] |
Definition at line 71 of file vf_thumbnail.c.
static int end_frame | ( | AVFilterLink * | inlink | ) | [static] |
Definition at line 110 of file vf_thumbnail.c.
static double frame_sum_square_err | ( | const int * | hist, | |
const double * | median | |||
) | [static] |
Compute Sum-square deviation to estimate "closeness".
hist | color distribution histogram | |
median | average color distribution histogram |
Definition at line 98 of file vf_thumbnail.c.
Referenced by end_frame().
static av_cold int init | ( | AVFilterContext * | ctx, | |
const char * | args | |||
) | [static] |
Definition at line 46 of file vf_thumbnail.c.
static int null_start_frame | ( | AVFilterLink * | link, | |
AVFilterBufferRef * | picref | |||
) | [static] |
Definition at line 174 of file vf_thumbnail.c.
static int poll_frame | ( | AVFilterLink * | link | ) | [static] |
Definition at line 190 of file vf_thumbnail.c.
static int query_formats | ( | AVFilterContext * | ctx | ) | [static] |
Definition at line 212 of file vf_thumbnail.c.
static int request_frame | ( | AVFilterLink * | link | ) | [static] |
Definition at line 176 of file vf_thumbnail.c.
static av_cold void uninit | ( | AVFilterContext * | ctx | ) | [static] |
Definition at line 163 of file vf_thumbnail.c.
Initial value:
{ .name = "thumbnail", .description = NULL_IF_CONFIG_SMALL("Select the most representative frame in a given sequence of consecutive frames."), .priv_size = sizeof(ThumbContext), .init = init, .uninit = uninit, .query_formats = query_formats, .inputs = (const AVFilterPad[]) { { .name = "default", .type = AVMEDIA_TYPE_VIDEO, .get_video_buffer = ff_null_get_video_buffer, .min_perms = AV_PERM_PRESERVE, .start_frame = null_start_frame, .draw_slice = draw_slice, .end_frame = end_frame, },{ .name = NULL } }, .outputs = (const AVFilterPad[]) { { .name = "default", .type = AVMEDIA_TYPE_VIDEO, .request_frame = request_frame, .poll_frame = poll_frame, },{ .name = NULL } }, }
Definition at line 222 of file vf_thumbnail.c.