FreeCalypso > hg > vband-misc
changeset 24:c52fb8080faf
pcmu2efr: emit all 320 computed frames
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 12 May 2024 04:28:49 +0000 |
parents | 2628a34fe75b |
children | 1f58ba0d79a4 |
files | .hgignore pcmu2efr/Makefile pcmu2efr/comb-out.c |
diffstat | 3 files changed, 39 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgignore Sun May 12 04:24:15 2024 +0000 +++ b/.hgignore Sun May 12 04:28:49 2024 +0000 @@ -11,6 +11,7 @@ ^pcmu2efr/amrefr-out$ ^pcmu2efr/comb-diff$ +^pcmu2efr/comb-out$ ^pcmu2efr/dhf-check$ ^pcmu2efr/stdefr-diff$ ^pcmu2efr/stdefr-out$
--- a/pcmu2efr/Makefile Sun May 12 04:24:15 2024 +0000 +++ b/pcmu2efr/Makefile Sun May 12 04:28:49 2024 +0000 @@ -1,10 +1,12 @@ CC= gcc CFLAGS= -O2 -PROGS= amrefr-out comb-diff dhf-check stdefr-diff stdefr-out +PROGS= amrefr-out comb-diff comb-out dhf-check stdefr-diff stdefr-out AMREFR_OBJS= amrefr-out.o gen-amrefr.o gen160.o seqsyncu.o ulaw-expand.o COMB_DIFF_OBJS= comb-diff.o gen-amr-2fr.o gen-efr.o gen160.o seqsyncu.o \ ulaw-expand.o +COMB_OUT_OBJS= comb-out.o gen-amr-2fr.o gen-efr.o gen160.o seqsyncu.o \ + ulaw-expand.o DHF_CHECK_OBJS= dhf-check.o gen-amr-2fr.o gen-efr.o gen160.o seqsyncu.o \ ulaw-expand.o STDEFR_OBJS= gen-efr.o gen160.o seqsyncu.o stdefr-out.o ulaw-expand.o @@ -18,6 +20,9 @@ comb-diff: ${COMB_DIFF_OBJS} ${CC} ${CFLAGS} -o $@ ${COMB_DIFF_OBJS} -lgsmefr -ltwamr +comb-out: ${COMB_OUT_OBJS} + ${CC} ${CFLAGS} -o $@ ${COMB_OUT_OBJS} -lgsmefr -ltwamr + dhf-check: ${DHF_CHECK_OBJS} ${CC} ${CFLAGS} -o $@ ${DHF_CHECK_OBJS} -lgsmefr -ltwamr
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pcmu2efr/comb-out.c Sun May 12 04:28:49 2024 +0000 @@ -0,0 +1,32 @@ +/* + * This program computes 160 possible EFR encoder outputs using standard EFR, + * then 160 possible outputs in AMR-EFR, then writes out all 320 frames + * to a gsmx output file. + */ + +#include <stdio.h> +#include <stdint.h> +#include <stdlib.h> +#include <string.h> +#include <strings.h> + +extern uint8_t standard_efr[160][31]; +extern uint8_t amr_efr[160][31]; + +main(argc, argv) + char **argv; +{ + FILE *outf; + + if (argc != 2) { + fprintf(stderr, "usage: %s gsmx-out-file\n", argv[0]); + exit(1); + } + generate_linear_inputs(); + generate_std_efr(); + generate_amr_efr(); + fwrite(standard_efr, 31, 160, outf); + fwrite(amr_efr, 31, 160, outf); + fclose(outf); + exit(0); +}