Go to the documentation of this file.
28 int firorder,
int iirorder,
30 int blocksize,
int32_t *sample_buffer)
38 for (
i = 0;
i < blocksize;
i++) {
44 for (order = 0; order < firorder; order++)
45 accum += (int64_t) firbuf[order] * fircoeff[order];
46 for (order = 0; order < iirorder; order++)
47 accum += (int64_t) iirbuf[order] * iircoeff[order];
49 accum = accum >> filter_shift;
53 *--iirbuf =
result - accum;
63 const int8_t *noise_buffer,
68 int matrix_noise_shift,
69 int access_unit_size_pow2,
72 unsigned int src_ch,
i;
73 int index2 = 2 *
index + 1;
74 for (
i = 0;
i < blockpos;
i++) {
77 for (src_ch = 0; src_ch <= maxchan; src_ch++)
78 accum += (int64_t)
samples[src_ch] * coeffs[src_ch];
80 if (matrix_noise_shift) {
81 index &= access_unit_size_pow2 - 1;
82 accum += noise_buffer[
index] * (1 << (matrix_noise_shift + 7));
86 samples[dest_ch] = ((accum >> 14) &
mask) + *bypassed_lsbs;
105 int8_t *output_shift,
109 unsigned int i, out_ch = 0;
111 int16_t *data_16 =
data;
113 for (
i = 0;
i < blockpos;
i++) {
114 for (out_ch = 0; out_ch <= max_matrix_channel; out_ch++) {
115 int mat_ch = ch_assign[out_ch];
117 (1
U << output_shift[mat_ch]);
118 lossless_check_data ^= (
sample & 0xffffff) << mat_ch;
125 return lossless_check_data;
av_cold void ff_mlpdsp_init(MLPDSPContext *c)
static void mlp_filter_channel(int32_t *state, const int32_t *coeff, int firorder, int iirorder, unsigned int filter_shift, int32_t mask, int blocksize, int32_t *sample_buffer)
static int32_t(*)(int32_t, uint16_t, int32_t(*)[], void *, uint8_t *, int8_t *, uint8_t, int) mlp_select_pack_output(uint8_t *ch_assign, int8_t *output_shift, uint8_t max_matrix_channel, int is32)
int32_t ff_mlp_pack_output(int32_t lossless_check_data, uint16_t blockpos, int32_t(*sample_buffer)[MAX_CHANNELS], void *data, uint8_t *ch_assign, int8_t *output_shift, uint8_t max_matrix_channel, int is32)
static const uint16_t mask[17]
and forward the result(frame or status change) to the corresponding input. If nothing is possible
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
void ff_mlp_rematrix_channel(int32_t *samples, const int32_t *coeffs, const uint8_t *bypassed_lsbs, const int8_t *noise_buffer, int index, unsigned int dest_ch, uint16_t blockpos, unsigned int maxchan, int matrix_noise_shift, int access_unit_size_pow2, int32_t mask)
#define MAX_FIR_ORDER
The maximum number of taps in IIR and FIR filters.
#define i(width, name, range_min, range_max)
void ff_mlpdsp_init_x86(MLPDSPContext *c)
Filter the word “frame” indicates either a video frame or a group of audio samples
av_cold void ff_mlpdsp_init_arm(MLPDSPContext *c)
static const double coeff[2][5]