Go to the documentation of this file.
44 for (
int ch = 0; ch <
u->ch_layout.nb_channels; ch++) {
45 const double *
const us = (
double *)
u->extended_data[ch];
47 double sum_uv =
s->sum_uv[ch];
48 double sum_u =
s->sum_u[ch];
50 for (
int n = 0; n <
u->nb_samples; n++) {
51 sum_u +=
us[n] *
us[n];
52 sum_uv += (
us[n] - vs[n]) * (
us[n] - vs[n]);
55 s->sum_uv[ch] = sum_uv;
73 for (
int i = 0;
i < 2;
i++) {
77 s->pts =
s->cache[
i]->pts;
93 for (
int i = 0;
i < 2;
i++) {
101 for (
int i = 0;
i < 2;
i++) {
120 s->channels =
inlink->ch_layout.nb_channels;
124 if (!
s->sum_u || !
s->sum_uv)
134 for (
int ch = 0; ch <
s->channels; ch++)
they must not be accessed directly The fifo field contains the frames that are queued in the input for processing by the filter The status_in and status_out fields contains the queued status(EOF or error) of the link
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
#define u(width, name, range_min, range_max)
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
#define FILTER_SINGLE_SAMPLEFMT(sample_fmt_)
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
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
This structure describes decoded (raw) audio or video data.
const char * name
Filter name.
int nb_channels
Number of channels in this layout.
A link between two filters.
static int config_output(AVFilterLink *outlink)
#define FF_FILTER_FORWARD_STATUS_BACK_ALL(outlink, filter)
Forward the status on an output link to all input links.
#define us(width, name, range_min, range_max, subs,...)
A filter pad used for either input or output.
static void ff_outlink_set_status(AVFilterLink *link, int status, int64_t pts)
Set the status field of a link from the source filter.
void ff_inlink_request_frame(AVFilterLink *link)
Mark that a frame is wanted on the link.
static int activate(AVFilterContext *ctx)
#define FILTER_INPUTS(array)
int ff_inlink_consume_samples(AVFilterLink *link, unsigned min, unsigned max, AVFrame **rframe)
Take samples from the link's FIFO and update the link's stats.
int ff_inlink_acknowledge_status(AVFilterLink *link, int *rstatus, int64_t *rpts)
Test and acknowledge the change of status on the link.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
#define AV_NOPTS_VALUE
Undefined timestamp value.
AVFilterContext * src
source filter
#define AV_LOG_INFO
Standard information.
#define i(width, name, range_min, range_max)
static void sdr(AVFilterContext *ctx, const AVFrame *u, const AVFrame *v)
uint8_t ** extended_data
pointers to the data planes/channels.
const char * name
Pad name.
int ff_inlink_queued_samples(AVFilterLink *link)
void * av_calloc(size_t nmemb, size_t size)
static const AVFilterPad outputs[]
static av_cold void uninit(AVFilterContext *ctx)
const AVFilter ff_af_asdr
#define AVFILTER_FLAG_METADATA_ONLY
The filter is a "metadata" filter - it does not modify the frame data in any way.
@ AV_SAMPLE_FMT_DBLP
double, planar
AVChannelLayout ch_layout
channel layout of current buffer (see libavutil/channel_layout.h)
#define FILTER_OUTPUTS(array)
#define flags(name, subs,...)
static const AVFilterPad inputs[]
the definition of that something depends on the semantic of the filter The callback must examine the status of the filter s links and proceed accordingly The status of output links is stored in the status_in and status_out fields and tested by the ff_outlink_frame_wanted() function. If this function returns true