Go to the documentation of this file.
19 #include "config_components.h"
42 #define OFFSET(x) offsetof(BenchContext, x)
43 #define DEFINE_OPTIONS(filt_name, FLAGS) \
44 static const AVOption filt_name##_options[] = { \
45 { "action", "set action", OFFSET(action), AV_OPT_TYPE_INT, {.i64=ACTION_START}, 0, NB_ACTION-1, FLAGS, .unit = "action" }, \
46 { "start", "start timer", 0, AV_OPT_TYPE_CONST, {.i64=ACTION_START}, INT_MIN, INT_MAX, FLAGS, .unit = "action" }, \
47 { "stop", "stop timer", 0, AV_OPT_TYPE_CONST, {.i64=ACTION_STOP}, INT_MIN, INT_MAX, FLAGS, .unit = "action" }, \
51 #define START_TIME_KEY "lavfi.bench.start_time"
52 #define T2F(v) ((v) / 1000000.)
92 #if CONFIG_BENCH_FILTER
111 .priv_class = &bench_class,
116 #if CONFIG_ABENCH_FILTER
135 .priv_class = &abench_class,
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
The exact code depends on how similar the blocks are and how related they are to the and needs to apply these operations to the correct inlink or outlink if there are several Macros are available to factor that when no extra processing is inlink
#define FILTER_INPUTS(array)
This structure describes decoded (raw) audio or video data.
const char * name
Filter name.
A link between two filters.
A filter pad used for either input or output.
#define AV_OPT_FLAG_AUDIO_PARAM
const AVFilterPad ff_video_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_VIDEO.
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
#define DEFINE_OPTIONS(filt_name, FLAGS)
#define FILTER_OUTPUTS(array)
Describe the class of an AVClass context structure.
const AVFilter ff_vf_bench
const AVFilterPad ff_audio_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_AUDIO.
#define AVFILTER_DEFINE_CLASS(fname)
const AVFilter ff_af_abench
#define AV_OPT_FLAG_FILTERING_PARAM
A generic parameter which can be set by the user for filtering.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static av_always_inline int diff(const struct color_info *a, const struct color_info *b, const int trans_thresh)
#define AV_LOG_INFO
Standard information.
#define AV_OPT_FLAG_VIDEO_PARAM
static av_cold int init(AVFilterContext *ctx)
const char * name
Pad name.
AVDictionary * metadata
metadata.
#define AVFILTER_FLAG_METADATA_ONLY
The filter is a "metadata" filter - it does not modify the frame data in any way.
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
int64_t av_gettime(void)
Get the current time in microseconds.
int av_dict_set_int(AVDictionary **pm, const char *key, int64_t value, int flags)
Convenience wrapper for av_dict_set() that converts the value to a string and stores it.
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.