comparison pcmu2efr/comb-diff.c @ 21:3eb407b08b4c

pcmu2efr: confirm that we got 280 distinct outputs so far
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 12 May 2024 03:15:23 +0000
parents pcmu2efr/stdefr-diff.c@39b3c24256ae
children 2628a34fe75b
comparison
equal deleted inserted replaced
20:f5f541bc9415 21:3eb407b08b4c
1 /*
2 * This program computes 160 possible EFR encoder outputs using standard EFR,
3 * then 120 possible outputs using "simple" AMR-EFR, then does a diff
4 * 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 < 279; m++) {
28 for (n = m + 1; n < 280; 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 }