Go to the documentation of this file.
65 for (
int i = 0;
i < dims_count; ++
i) {
66 dst[
i] = pfun(params->
v,
src[
i]);
69 const DnnOperand *input1 = &operands[input_operand_indexes[1]];
71 for (
int i = 0;
i < dims_count; ++
i) {
85 for (
int i = 0;
i < dims_count; ++
i) {
86 dst[
i] = pfun(params->
v,
src[
i]);
89 for (
int i = 0;
i < dims_count; ++
i) {
90 dst[
i] = pfun(
src[
i], params->
v);
93 const DnnOperand *input1 = &operands[input_operand_indexes[1]];
95 for (
int i = 0;
i < dims_count; ++
i) {
155 for (
int i = 0;
i < 4; ++
i)
160 if (
output->length <= 0) {
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 float sub(float src0, float src1)
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 output
static float floormod(float src0, float src1)
void * av_memdup(const void *p, size_t size)
Duplicate a buffer with av_malloc().
static float realdiv(float src0, float src1)
static av_always_inline float av_int2float(uint32_t i)
Reinterpret a 32-bit integer as a float.
int32_t ff_calculate_operand_data_length(const DnnOperand *oprd)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void * data
data pointer with data length in bytes.
static void math_binary_not_commutative(FunType pfun, const DnnLayerMathBinaryParams *params, const DnnOperand *input, DnnOperand *output, DnnOperand *operands, const int32_t *input_operand_indexes)
static float mul(float src0, float src1)
unsigned int avio_rl32(AVIOContext *s)
static float minimum(float src0, float src1)
int32_t output_operand_index
int32_t input_operand_indexes[4]
a layer can have multiple inputs and one output.
and forward the test the status of outputs and forward it to the corresponding return FFERROR_NOT_READY If the filters stores internally one or a few frame for some input
int ff_dnn_load_layer_math_binary(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
#define i(width, name, range_min, range_max)
static void math_binary_commutative(FunType pfun, const DnnLayerMathBinaryParams *params, const DnnOperand *input, DnnOperand *output, DnnOperand *operands, const int32_t *input_operand_indexes)
int32_t ff_calculate_operand_dims_count(const DnnOperand *oprd)
int ff_dnn_execute_layer_math_binary(DnnOperand *operands, const int32_t *input_operand_indexes, int32_t output_operand_index, const void *parameters, NativeContext *ctx)
static float add(float src0, float src1)
DNNMathBinaryOperation bin_op
float(* FunType)(float src0, float src1)
void * av_realloc(void *ptr, size_t size)
Allocate, reallocate, or free a block of memory.