Go to the documentation of this file.
19 #include "config_components.h"
41 #define OFFSET(x) offsetof(BenchContext, x)
42 #define DEFINE_OPTIONS(filt_name, FLAGS) \
43 static const AVOption filt_name##_options[] = { \
44 { "action", "set action", OFFSET(action), AV_OPT_TYPE_INT, {.i64=ACTION_START}, 0, NB_ACTION-1, FLAGS, "action" }, \
45 { "start", "start timer", 0, AV_OPT_TYPE_CONST, {.i64=ACTION_START}, INT_MIN, INT_MAX, FLAGS, "action" }, \
46 { "stop", "stop timer", 0, AV_OPT_TYPE_CONST, {.i64=ACTION_STOP}, INT_MIN, INT_MAX, FLAGS, "action" }, \
50 #define START_TIME_KEY "lavfi.bench.start_time"
51 #define T2F(v) ((v) / 1000000.)
76 const int64_t start = strtoll(e->
value,
NULL, 0);
77 const int64_t
diff = t - start;
91 #if CONFIG_BENCH_FILTER
117 .priv_class = &bench_class,
122 #if CONFIG_ABENCH_FILTER
148 .priv_class = &abench_class,
#define AV_OPT_FLAG_VIDEO_PARAM
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
This structure describes decoded (raw) audio or video data.
const char * name
Filter name.
A link between two filters.
#define AV_OPT_FLAG_FILTERING_PARAM
a generic parameter which can be set by the user for filtering
A filter pad used for either input or output.
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_INPUTS(array)
#define AV_OPT_FLAG_AUDIO_PARAM
Describe the class of an AVClass context structure.
const AVFilter ff_vf_bench
const AVFilter ff_af_abench
#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 AVFILTER_DEFINE_CLASS(fname)
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.
#define FILTER_OUTPUTS(array)
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.