#include "avfilter.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, void *opaque) |
| static void | 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 void | end_frame (AVFilterLink *inlink) |
| static av_cold void | uninit (AVFilterContext *ctx) |
| static void | 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>. http://notbrainsurgery.livejournal.com/29773.html
Definition in file vf_thumbnail.c.
| #define HIST_SIZE (3*256) |
Definition at line 32 of file vf_thumbnail.c.
Referenced by end_frame(), and frame_sum_square_err().
| static void draw_slice | ( | AVFilterLink * | inlink, | |
| int | y, | |||
| int | h, | |||
| int | slice_dir | |||
| ) | [static] |
Definition at line 70 of file vf_thumbnail.c.
| static void end_frame | ( | AVFilterLink * | inlink | ) | [static] |
Definition at line 108 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 96 of file vf_thumbnail.c.
Referenced by end_frame().
| static av_cold int init | ( | AVFilterContext * | ctx, | |
| const char * | args, | |||
| void * | opaque | |||
| ) | [static] |
Definition at line 45 of file vf_thumbnail.c.
| static void null_start_frame | ( | AVFilterLink * | link, | |
| AVFilterBufferRef * | picref | |||
| ) | [static] |
Definition at line 171 of file vf_thumbnail.c.
| static int poll_frame | ( | AVFilterLink * | link | ) | [static] |
Definition at line 187 of file vf_thumbnail.c.
| static int query_formats | ( | AVFilterContext * | ctx | ) | [static] |
Definition at line 209 of file vf_thumbnail.c.
| static int request_frame | ( | AVFilterLink * | link | ) | [static] |
Definition at line 173 of file vf_thumbnail.c.
| static av_cold void uninit | ( | AVFilterContext * | ctx | ) | [static] |
Definition at line 160 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 = avfilter_null_get_video_buffer,
.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,
.rej_perms = AV_PERM_REUSE2,
},{ .name = NULL }
},
}
Definition at line 219 of file vf_thumbnail.c.
1.5.8