# HG changeset patch # User Mychaela Falconia # Date 1668992527 0 # Node ID a8fd4ff6b0130f22a374908e8e88057253f71ba2 # Parent 896ce7f1d27109ab6e2cfafbaf42bf2ead914d36 gsmfr-max-out: dump transformed codec parameters too diff -r 896ce7f1d271 -r a8fd4ff6b013 frtest/max-out.c --- a/frtest/max-out.c Sun Nov 20 23:04:27 2022 +0000 +++ b/frtest/max-out.c Mon Nov 21 01:02:07 2022 +0000 @@ -1,10 +1,17 @@ /* - * This program reads an extended-libgsm binary file, dumps every frame in - * human-readable form just like gsmrec-dump, but then also passes it through - * our GSM FR decoder (libgsmfrp+libgsm) and looks for the highest-magnitude - * PCM sample in the decoder output. This maximum output sample magnitude is - * reported after the dump of each input frame. This program is intended to - * serve as a debug aid, for troubleshooting of our libgsmfrp+libgsm stack. + * This program reads an extended-libgsm binary file (which must be in FR + * codec format, not EFR) and performs the following processing, in this + * order: + * + * 1) dumps every frame in human-readable form just like gsmrec-dump; + * 2) passes the frame stream through our DTX Rx preprocessor; + * 3) dumps the output from the preprocessor; + * 4) feeds this output to the standard 06.10 decoder (libgsm); + * 5) finds the highest-magnitude PCM sample in the decoder output and + * reports this maximum output magnitude. + * + * This program is intended to serve as a debug aid, for troubleshooting + * of our libgsmfrp+libgsm stack. */ #include @@ -86,6 +93,18 @@ gsmfr_preproc_bfi(pp_state, taf, frame); else gsmfr_preproc_good_frame(pp_state, frame); + fputs("Xform:", stdout); + gsm_explode(dec_state, frame, fr_params); + n = 0; + for (i = 0; i < 8; i++) + printf(" %u", fr_params[n++]); + putchar('\n'); + for (i = 0; i < 4; i++) { + putchar(' '); + for (j = 0; j < 17; j++) + printf(" %u", fr_params[n++]); + putchar('\n'); + } gsm_decode(dec_state, frame, pcm); samp_max = 0; for (i = 0; i < 160; i++) {