float lspmelvq_mse = 0.0;
int amread;
FILE *fam;
+ int awread;
+ FILE *faw;
char* opt_string = "ho:";
struct option long_options[] = {
{ "bpf", no_argument, &bpf_en, 1 },
{ "bpfb", no_argument, &bpfb_en, 1 },
{ "amread", required_argument, &amread, 1 },
+ { "awread", required_argument, &awread, 1 },
#ifdef DUMP
{ "dump", required_argument, &dump, 1 },
#endif
optarg, strerror(errno));
exit(1);
}
+ } else if(strcmp(long_options[option_index].name, "awread") == 0) {
+ if ((faw = fopen(optarg,"rb")) == NULL) {
+ fprintf(stderr, "Error opening float Aw file: %s: %s.\n",
+ optarg, strerror(errno));
+ exit(1);
+ }
} else if(strcmp(long_options[option_index].name, "dump_pitch_e") == 0) {
if ((fjvm = fopen(optarg,"wt")) == NULL) {
fprintf(stderr, "Error opening pitch & energy dump file: %s: %s.\n",
#endif
}
+ /* optionally rewad in Aw FFT vector, we really only care about the phase
+ of each entry, used for reading in phases generated by Octave */
+
+ if (awread) {
+ int j;
+ int ret = fread(Aw, sizeof(COMP), FFT_ENC, faw);
+ //for(j=0; j<10; j++) {
+ // fprintf(stderr, "%f %f\n", Aw[j].real, Aw[j].imag);
+ //}
+ //exit(0);
+ assert(ret == FFT_ENC);
+ }
+
if (phase0)
phase_synth_zero_order(fft_fwd_cfg, &model_dec[i], ex_phase, Aw);
if (postfilt)