26 #define SAMPLE_SIZE 16 37 #define SAMPLE_SIZE 32 47 int pred_order,
int qlevel,
int len)
51 for (i = pred_order; i < len - 1; i += 2, decoded += 2) {
55 for (j = 1; j < pred_order; j++) {
62 d = decoded[j] += (
SUINT)(s0 >> qlevel);
64 decoded[j + 1] += (
SUINT)(
s1 >> qlevel);
68 for (j = 0; j < pred_order; j++)
69 sum += coeffs[j] * (
SUINT)decoded[j];
70 decoded[j] = decoded[j] + (unsigned)(sum >> qlevel);
75 int pred_order,
int qlevel,
int len)
79 for (i = pred_order; i <
len; i++, decoded++) {
81 for (j = 0; j < pred_order; j++)
82 sum += (int64_t)coeffs[j] * decoded[j];
83 decoded[j] += sum >> qlevel;
av_cold void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, int bps)
void(* lpc32)(int32_t *samples, const int coeffs[32], int order, int qlevel, int len)
Macro definitions for various function/variable attributes.
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(* lpc16)(int32_t *samples, const int coeffs[32], int order, int qlevel, int len)
void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, int bps)
static void flac_lpc_16_c(int32_t *decoded, const int coeffs[32], int pred_order, int qlevel, int len)
static void flac_lpc_32_c(int32_t *decoded, const int coeffs[32], int pred_order, int qlevel, int len)
void(* lpc16_encode)(int32_t *res, const int32_t *smp, int len, int order, const int32_t coefs[32], int shift)
AVSampleFormat
Audio sample formats.
av_cold void ff_flacdsp_init_arm(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, int bps)
void(* lpc32_encode)(int32_t *res, const int32_t *smp, int len, int order, const int32_t coefs[32], int shift)
void(* decorrelate[4])(uint8_t **out, int32_t **in, int channels, int len, int shift)