Go to the documentation of this file.
96 if (
s->drop_str &&
s->dropamount) {
98 s->drop_str,
s->dropamount);
123 int i,
ret, amount, drop = 0;
130 s->var_values[
VAR_N] =
s->pkt_idx++;
150 amount = (
s->state % 10001 + 1);
160 drop = !(
s->state %
FFABS((
int)res));
166 drop = !(
s->state %
s->dropamount);
188 if (amount &&
s->state % amount == 0)
203 s->amount_pexpr =
s->drop_pexpr =
NULL;
206 #define OFFSET(x) offsetof(NoiseContext, x)
207 #define FLAGS (AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_BSF_PARAM)
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
#define AV_LOG_WARNING
Something somehow does not look correct.
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
static const char *const var_names[]
#define AV_LOG_VERBOSE
Detailed information.
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce then the filter should push the output frames on the output link immediately As an exception to the previous rule if the input frame is enough to produce several output frames then the filter needs output only at least one per link The additional frames can be left buffered in the filter
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
The bitstream filter state.
int av_expr_parse(AVExpr **expr, const char *s, const char *const *const_names, const char *const *func1_names, double(*const *funcs1)(void *, double), const char *const *func2_names, double(*const *funcs2)(void *, double, double), int log_offset, void *log_ctx)
Parse an expression.
void av_expr_free(AVExpr *e)
Free a parsed expression previously created with av_expr_parse().
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int noise_init(AVBSFContext *ctx)
static double av_q2d(AVRational a)
Convert an AVRational to a double.
int(* init)(AVBSFContext *ctx)
double av_expr_eval(AVExpr *e, const double *const_values, void *opaque)
Evaluate a previously parsed expression.
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
#define LIBAVUTIL_VERSION_INT
Describe the class of an AVClass context structure.
const char * av_default_item_name(void *ptr)
Return the context name.
AVBitStreamFilter p
The public AVBitStreamFilter.
#define AV_NOPTS_VALUE
Undefined timestamp value.
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
int flags
A combination of AV_PKT_FLAG values.
#define i(width, name, range_min, range_max)
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
const FFBitStreamFilter ff_noise_bsf
void * priv_data
Opaque filter-specific private data.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
static int noise(AVBSFContext *ctx, AVPacket *pkt)
int av_packet_make_writable(AVPacket *pkt)
Create a writable reference for the data described by a given packet, avoiding data copy if possible.
double var_values[VAR_VARS_NB]
char * av_strdup(const char *s)
Duplicate a string.
static const AVOption options[]
This structure stores compressed data.
int64_t pos
byte position in stream, -1 if unknown
static void noise_close(AVBSFContext *bsf)
int ff_bsf_get_packet_ref(AVBSFContext *ctx, AVPacket *pkt)
Called by bitstream filters to get packet for filtering.
void * priv_data
Format private data.
static const AVClass noise_class