comparison miscutil/gsmrec-dump.c @ 471:b5f8ea41362b

gsmrec-dump: report DHF matches
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 14 May 2024 07:25:06 +0000
parents fa8845306e07
children
comparison
equal deleted inserted replaced
470:ea89eb8291bf 471:b5f8ea41362b
4 */ 4 */
5 5
6 #include <stdio.h> 6 #include <stdio.h>
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h>
10 #include <strings.h>
9 #include "../libgsmfr2/tw_gsmfr.h" 11 #include "../libgsmfr2/tw_gsmfr.h"
10 #include "../libgsmefr/gsm_efr.h" 12 #include "../libgsmefr/gsm_efr.h"
11 #include "../libtest/binreader.h" 13 #include "../libtest/binreader.h"
12 14
13 main(argc, argv) 15 main(argc, argv)
45 printf("EFR SID=%d LPC", EFR_sid_classify(frame)); 47 printf("EFR SID=%d LPC", EFR_sid_classify(frame));
46 EFR_frame2params(frame, params); 48 EFR_frame2params(frame, params);
47 n = 0; 49 n = 0;
48 for (i = 0; i < 5; i++) 50 for (i = 0; i < 5; i++)
49 printf(" %d", params[n++]); 51 printf(" %d", params[n++]);
52 if (!bcmp(frame, EFR_decoder_homing_frame,
53 EFR_RTP_FRAME_LEN))
54 fputs(" (DHF)", stdout);
50 putchar('\n'); 55 putchar('\n');
51 for (i = 0; i < 4; i++) { 56 for (i = 0; i < 4; i++) {
52 putchar(' '); 57 putchar(' ');
53 for (j = 0; j < 13; j++) 58 for (j = 0; j < 13; j++)
54 printf(" %d", params[n++]); 59 printf(" %d", params[n++]);
59 printf("FR SID=%d", gsmfr_preproc_sid_classify(frame)); 64 printf("FR SID=%d", gsmfr_preproc_sid_classify(frame));
60 gsmfr_unpack_to_array(frame, params); 65 gsmfr_unpack_to_array(frame, params);
61 n = 0; 66 n = 0;
62 for (i = 0; i < 8; i++) 67 for (i = 0; i < 8; i++)
63 printf(" %d", params[n++]); 68 printf(" %d", params[n++]);
69 if (!bcmp(frame, gsmfr_decoder_homing_frame,
70 GSMFR_RTP_FRAME_LEN))
71 fputs(" (DHF)", stdout);
64 putchar('\n'); 72 putchar('\n');
65 for (i = 0; i < 4; i++) { 73 for (i = 0; i < 4; i++) {
66 putchar(' '); 74 putchar(' ');
67 for (j = 0; j < 17; j++) 75 for (j = 0; j < 17; j++)
68 printf(" %d", params[n++]); 76 printf(" %d", params[n++]);