Go to the documentation of this file.
39 #define OFFSET(x) offsetof(BenchContext, x)
40 #define DEFINE_OPTIONS(filt_name, FLAGS) \
41 static const AVOption filt_name##_options[] = { \
42 { "action", "set action", OFFSET(action), AV_OPT_TYPE_INT, {.i64=ACTION_START}, 0, NB_ACTION-1, FLAGS, "action" }, \
43 { "start", "start timer", 0, AV_OPT_TYPE_CONST, {.i64=ACTION_START}, INT_MIN, INT_MAX, FLAGS, "action" }, \
44 { "stop", "stop timer", 0, AV_OPT_TYPE_CONST, {.i64=ACTION_STOP}, INT_MIN, INT_MAX, FLAGS, "action" }, \
48 #define START_TIME_KEY "lavfi.bench.start_time"
49 #define T2F(v) ((v) / 1000000.)
74 const int64_t start = strtoll(e->
value,
NULL, 0);
75 const int64_t
diff = t - start;
89 #if CONFIG_BENCH_FILTER
115 .priv_class = &bench_class,
120 #if CONFIG_ABENCH_FILTER
146 .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.
#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.
static av_always_inline int diff(const uint32_t a, const uint32_t b)
#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.