19 #ifndef AVFILTER_INTERNAL_H
20 #define AVFILTER_INTERNAL_H
207 #define D2TS(d) (isnan(d) ? AV_NOPTS_VALUE : (int64_t)(d))
208 #define TS2D(ts) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts))
209 #define TS2T(ts, tb) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts) * av_q2d(tb))
213 #define FF_TPRINTF_START(ctx, func) ff_tlog(NULL, "%-16s: ", #func)
235 int ff_insert_pad(
unsigned idx,
unsigned *count,
size_t padidx_off,
244 &
f->input_pads, &
f->inputs, p);
252 &
f->output_pads, &
f->outputs, p);
288 #define AVFILTER_DEFINE_CLASS(fname) \
289 static const AVClass fname##_class = { \
290 .class_name = #fname, \
291 .item_name = av_default_item_name, \
292 .option = fname##_options, \
293 .version = LIBAVUTIL_VERSION_INT, \
294 .category = AV_CLASS_CATEGORY_FILTER, \
302 #define FF_INLINK_IDX(link) ((int)((link)->dstpad - (link)->dst->input_pads))
303 #define FF_OUTLINK_IDX(link) ((int)((link)->srcpad - (link)->src->output_pads))
339 #define FF_FILTER_FLAG_HWFRAME_AWARE (1 << 0)
375 const char *
arg,
char *res,
int res_len,
int flags);
391 int default_pool_size);
#define av_warn_unused_result
Libavcodec external API header.
Main libavfilter public API header.
#define flags(name, subs,...)
static av_always_inline void filter(int16_t *output, ptrdiff_t out_stride, const int16_t *low, ptrdiff_t low_stride, const int16_t *high, ptrdiff_t high_stride, int len, int clip)
int() avfilter_execute_func(AVFilterContext *ctx, avfilter_action_func *func, void *arg, int *ret, int nb_jobs)
A function executing multiple jobs, possibly in parallel.
common internal api header.
#define FF_QSCALE_TYPE_VP56
#define FF_QSCALE_TYPE_H264
#define FF_QSCALE_TYPE_MPEG1
#define FF_QSCALE_TYPE_MPEG2
void ff_command_queue_pop(AVFilterContext *filter)
void ff_avfilter_link_set_out_status(AVFilterLink *link, int status, int64_t pts)
Set the status field of a link from the destination filter.
void ff_tlog_link(void *ctx, AVFilterLink *link, int end)
void ff_filter_graph_remove_filter(AVFilterGraph *graph, AVFilterContext *filter)
Remove a filter from a graph;.
int ff_filter_graph_run_once(AVFilterGraph *graph)
Run one round of processing on a filter graph.
void ff_tlog_ref(void *ctx, AVFrame *ref, int end)
AVFilterContext * ff_filter_alloc(const AVFilter *filter, const char *inst_name)
Allocate a new filter context and return it.
void ff_update_link_current_pts(AVFilterLink *link, int64_t pts)
static int ff_insert_inpad(AVFilterContext *f, unsigned index, AVFilterPad *p)
Insert a new input pad for the filter.
int ff_fmt_is_in(int fmt, const int *fmts)
Tell if an integer is contained in the provided -1-terminated list of integers.
av_warn_unused_result int ff_parse_sample_rate(int *ret, const char *arg, void *log_ctx)
Parse a sample rate.
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
int ff_filter_init_hw_frames(AVFilterContext *avctx, AVFilterLink *link, int default_pool_size)
Perform any additional setup required for hardware frames.
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
Generic processing of user supplied commands that are set in the same way as the filter options.
void ff_avfilter_link_set_in_status(AVFilterLink *link, int status, int64_t pts)
Set the status field of a link from the source filter.
int ff_request_frame(AVFilterLink *link)
Request an input frame from the filter at the other end of the link.
int ff_filter_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
void ff_avfilter_graph_update_heap(AVFilterGraph *graph, AVFilterLink *link)
Update the position of a link in the age heap.
static int ff_norm_qscale(int qscale, int type)
Normalize the qscale factor FIXME the H264 qscale is a log based scale, mpeg1/2 is not,...
char * ff_get_ref_perms_string(char *buf, size_t buf_size, int perms)
static int ff_insert_outpad(AVFilterContext *f, unsigned index, AVFilterPad *p)
Insert a new output pad for the filter.
av_warn_unused_result int ff_parse_pixel_format(enum AVPixelFormat *ret, const char *arg, void *log_ctx)
Parse a pixel format.
int ff_filter_activate(AVFilterContext *filter)
av_warn_unused_result int ff_parse_channel_layout(int64_t *ret, int *nret, const char *arg, void *log_ctx)
Parse a channel layout or a corresponding integer representation.
int ff_insert_pad(unsigned idx, unsigned *count, size_t padidx_off, AVFilterPad **pads, AVFilterLink ***links, AVFilterPad *newpad)
Insert a new pad.
common internal API header
AVPixelFormat
Pixel format.
struct AVFilterCommand * next
double time
time expressed in seconds
char * arg
optional argument for the command
avfilter_execute_func * thread_execute
FFFrameQueueGlobal frame_queues
avfilter_execute_func * execute
A link between two filters.
A filter pad used for either input or output.
int(* request_frame)(AVFilterLink *link)
Frame request callback.
int needs_writable
The filter expects writable frames from its input link, duplicating data buffers if needed.
int(* config_props)(AVFilterLink *link)
Link configuration callback.
enum AVMediaType type
AVFilterPad type.
int(* filter_frame)(AVFilterLink *link, AVFrame *frame)
Filtering callback.
const char * name
Pad name.
This structure describes decoded (raw) audio or video data.
Structure to hold global options and statistics for frame queues.
static int ref[MAX_W *MAX_W]