#include "libavutil/file.h"
#include "libavutil/lfg.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "libavutil/random_seed.h"
#include "avfilter.h"
Go to the source code of this file.
Data Structures | |
struct | CellAutoContext |
Defines | |
#define | OFFSET(x) offsetof(CellAutoContext, x) |
Functions | |
static const char * | cellauto_get_name (void *ctx) |
static int | init_pattern_from_string (AVFilterContext *ctx) |
static int | init_pattern_from_file (AVFilterContext *ctx) |
static int | init (AVFilterContext *ctx, const char *args, void *opaque) |
static av_cold void | uninit (AVFilterContext *ctx) |
static int | config_props (AVFilterLink *outlink) |
static void | evolve (AVFilterContext *ctx) |
static void | fill_picture (AVFilterContext *ctx, AVFilterBufferRef *picref) |
static int | request_frame (AVFilterLink *outlink) |
static int | query_formats (AVFilterContext *ctx) |
Variables | |
static const AVOption | cellauto_options [] |
static const AVClass | cellauto_class |
AVFilter | avfilter_vsrc_cellauto |
Definition in file vsrc_cellauto.c.
#define OFFSET | ( | x | ) | offsetof(CellAutoContext, x) |
Definition at line 56 of file vsrc_cellauto.c.
static const char* cellauto_get_name | ( | void * | ctx | ) | [static] |
Definition at line 79 of file vsrc_cellauto.c.
static int config_props | ( | AVFilterLink * | outlink | ) | [static] |
Definition at line 239 of file vsrc_cellauto.c.
static void evolve | ( | AVFilterContext * | ctx | ) | [static] |
static void fill_picture | ( | AVFilterContext * | ctx, | |
AVFilterBufferRef * | picref | |||
) | [static] |
static int init | ( | AVFilterContext * | ctx, | |
const char * | args, | |||
void * | opaque | |||
) | [static] |
Definition at line 167 of file vsrc_cellauto.c.
static int init_pattern_from_file | ( | AVFilterContext * | ctx | ) | [static] |
static int init_pattern_from_string | ( | AVFilterContext * | ctx | ) | [static] |
static int query_formats | ( | AVFilterContext * | ctx | ) | [static] |
Definition at line 338 of file vsrc_cellauto.c.
static int request_frame | ( | AVFilterLink * | outlink | ) | [static] |
Definition at line 309 of file vsrc_cellauto.c.
static av_cold void uninit | ( | AVFilterContext * | ctx | ) | [static] |
Definition at line 230 of file vsrc_cellauto.c.
Initial value:
{ .name = "cellauto", .description = NULL_IF_CONFIG_SMALL("Create pattern generated by an elementary cellular automaton."), .priv_size = sizeof(CellAutoContext), .init = init, .uninit = uninit, .query_formats = query_formats, .inputs = (const AVFilterPad[]) { { .name = NULL} }, .outputs = (const AVFilterPad[]) { { .name = "default", .type = AVMEDIA_TYPE_VIDEO, .request_frame = request_frame, .config_props = config_props }, { .name = NULL} }, }
Definition at line 345 of file vsrc_cellauto.c.
const AVClass cellauto_class [static] |
Initial value:
{ "CellAutoContext", cellauto_get_name, cellauto_options }
Definition at line 84 of file vsrc_cellauto.c.
const AVOption cellauto_options[] [static] |
Initial value:
{ { "filename", "read initial pattern from file", OFFSET(filename), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0 }, { "f", "read initial pattern from file", OFFSET(filename), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0 }, { "pattern", "set initial pattern", OFFSET(pattern), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0 }, { "p", "set initial pattern", OFFSET(pattern), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0 }, { "rate", "set video rate", OFFSET(rate), AV_OPT_TYPE_STRING, {.str = "25"}, 0, 0 }, { "r", "set video rate", OFFSET(rate), AV_OPT_TYPE_STRING, {.str = "25"}, 0, 0 }, { "size", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str = NULL}, 0, 0 }, { "s", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str = NULL}, 0, 0 }, { "rule", "set rule", OFFSET(rule), AV_OPT_TYPE_INT, {.dbl = 110}, 0, 255 }, { "random_fill_ratio", "set fill ratio for filling initial grid randomly", OFFSET(random_fill_ratio), AV_OPT_TYPE_DOUBLE, {.dbl = 1/M_PHI}, 0, 1 }, { "ratio", "set fill ratio for filling initial grid randomly", OFFSET(random_fill_ratio), AV_OPT_TYPE_DOUBLE, {.dbl = 1/M_PHI}, 0, 1 }, { "random_seed", "set the seed for filling the initial grid randomly", OFFSET(random_seed), AV_OPT_TYPE_INT, {.dbl = -1}, -1, UINT32_MAX }, { "seed", "set the seed for filling the initial grid randomly", OFFSET(random_seed), AV_OPT_TYPE_INT, {.dbl = -1}, -1, UINT32_MAX }, { "scroll", "scroll pattern downward", OFFSET(scroll), AV_OPT_TYPE_INT, {.dbl = 1}, 0, 1 }, { "start_full", "start filling the whole video", OFFSET(start_full), AV_OPT_TYPE_INT, {.dbl = 0}, 0, 1 }, { "full", "start filling the whole video", OFFSET(start_full), AV_OPT_TYPE_INT, {.dbl = 1}, 0, 1 }, { "stitch", "stitch boundaries", OFFSET(stitch), AV_OPT_TYPE_INT, {.dbl = 1}, 0, 1 }, { NULL }, }
Definition at line 58 of file vsrc_cellauto.c.