comparison pcma2efr/comb-diff.c @ 29:fc4544e3687b

pcma2efr: comb-diff check passes
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 13 May 2024 02:49:26 +0000
parents pcmu2efr/comb-diff.c@2628a34fe75b
children
comparison
equal deleted inserted replaced
28:4f47447fd17f 29:fc4544e3687b
1 /*
2 * This program computes 160 possible EFR encoder outputs using standard EFR,
3 * then 160 possible outputs using our current understanding of AMR-EFR, then
4 * does a diff among them, seeking to verify that they are all distinct.
5 */
6
7 #include <stdio.h>
8 #include <stdint.h>
9 #include <stdlib.h>
10 #include <string.h>
11 #include <strings.h>
12
13 extern uint8_t standard_efr[160][31];
14 extern uint8_t amr_efr[160][31];
15
16 main(argc, argv)
17 char **argv;
18 {
19 uint8_t combine[320][31];
20 unsigned m, n;
21
22 generate_linear_inputs();
23 generate_std_efr();
24 generate_amr_efr();
25 bcopy(standard_efr, combine, 160*31);
26 bcopy(amr_efr, combine + 160, 160*31);
27 for (m = 0; m < 319; m++) {
28 for (n = m + 1; n < 320; n++) {
29 if (!memcmp(combine[m], combine[n], 31))
30 printf("Bad: sequences #%u and #%u are equal\n",
31 m, n);
32 }
33 }
34 exit(0);
35 }