31 #define MAX_CHANNELS 8
33 #define randomize_buffers() \
36 for (i = 0; i < BUF_SIZE; i += 4) { \
37 for (j = 0; j < channels; j++) { \
38 uint32_t r = rnd() & (1 << (bits - 2)) - 1; \
39 AV_WN32A(ref_src[j] + i, r); \
40 AV_WN32A(new_src[j] + i, r); \
45 static void check_decorrelate(uint8_t **ref_dst, uint8_t **ref_src, uint8_t **new_dst, uint8_t **new_src,
60 int qlevel =
rnd() % 16;
61 int coeff_prec = (
rnd() % 15) + 1;
72 for (
int i = 0;
i < 32;
i++)
77 const int test_lens[] = {
86 int len = test_lens[k];
87 if (len < 0 || len >
BUF_SIZE)
continue;
101 int qlevel =
rnd() % 16;
102 int coeff_prec = (
rnd() % 15) + 1;
111 for (
int i = 0;
i < 32;
i++)
119 const int test_lens[] = {
128 int len = test_lens[k];
129 if (len < 0 || len >
BUF_SIZE)
continue;
133 call_ref(dst0, residuals, coeffs, pred_order, qlevel,
len);
134 call_new(dst1, residuals, coeffs, pred_order, qlevel,
len);
143 int wasted =
rnd() % 32;
164 int wasted =
rnd() % 33;
172 residuals[
i] =
rnd();
191 static const char *
const names[3] = {
"ls",
"rs",
"ms" };
192 static const struct {
199 static const signed char pred_orders[] = { 13, 16, 29, 32 };
203 for (
i = 0;
i < 2;
i++) {
205 for (j = 0; j < 3; j++)
206 if (
check_func(
h.decorrelate[j + 1],
"flac_decorrelate_%s_%d", names[j], fmts[
i].bits))
210 if (
check_func(
h.decorrelate[0],
"flac_decorrelate_indep%d_%d", j, fmts[
i].bits))
218 if (
check_func(
h.lpc16,
"flac_lpc_16_%d", pred_orders[
i]))
221 if (
check_func(
h.lpc32,
"flac_lpc_32_%d", pred_orders[
i]))
224 if (
check_func(
h.lpc33,
"flac_lpc_33_%d", pred_orders[
i]))