Go to the documentation of this file.
35 for (n = 0; n <
len; n++)
36 s +=
MUL64(x[n-j], x[n-k]);
112 for (
i = 0;
i <
len;
i++) {
122 return signal_energy / error_energy;
143 input_buffer2[
i] =
norm__(in[
i], shift_bits);
195 for (
i = 0;
i <
len;
i++) {
218 if (!
s->private_data)
static void error(const char *err)
static int64_t find_best_filter(const DCAADPCMEncContext *s, const int32_t *in, int len)
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
int ff_dcaadpcm_do_real(int pred_vq_index, softfloat quant, int32_t scale_factor, int32_t step_size, const int32_t *prev_hist, const int32_t *in, int32_t *next_hist, int32_t *out, int len, int32_t peak)
av_cold void ff_dcaadpcm_free(DCAADPCMEncContext *s)
static int32_t quantize_value(int32_t value, softfloat quant)
static const uint8_t quant[64]
static int64_t ff_dcaadpcm_predict(int pred_vq_index, const int32_t *input)
static int64_t apply_filter(const int16_t a[DCA_ADPCM_COEFFS], const int64_t corr[15], const int32_t aa[10])
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
#define DCA_ADPCM_VQCODEBOOK_SZ
int ff_dcaadpcm_subband_analysis(const DCAADPCMEncContext *s, const int32_t *in, int len, int *diff)
static av_always_inline int diff(const struct color_info *a, const struct color_info *b, const int trans_thresh)
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
#define i(width, name, range_min, range_max)
static int32_t norm__(int64_t a, int bits)
const int16_t ff_dca_adpcm_vb[DCA_ADPCM_VQCODEBOOK_SZ][DCA_ADPCM_COEFFS]
static void ff_dca_core_dequantize(int32_t *output, const int32_t *input, int32_t step_size, int32_t scale, int residual, int len)
av_cold int ff_dcaadpcm_init(DCAADPCMEncContext *s)
static void precalc(premultiplied_coeffs *data)
int32_t premultiplied_coeffs[10]
static int64_t calc_prediction_gain(int pred_vq, const int32_t *in, int32_t *out, int len)
static int64_t calc_corr(const int32_t *x, int len, int j, int k)