From: drowe67 Date: Sat, 26 Sep 2009 00:18:14 +0000 (+0000) Subject: yet another subtle bug in combining phase 0 and lpc 10 models, sounds better now X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=ce7b9e2b7d1f30202aa20f7f7d2f909c88cf9028;p=freetel-svn-tracking.git yet another subtle bug in combining phase 0 and lpc 10 models, sounds better now git-svn-id: https://svn.code.sf.net/p/freetel/code@65 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/codec2/src/codeall.sh b/codec2/src/codeall.sh new file mode 100755 index 00000000..6bdf825f --- /dev/null +++ b/codec2/src/codeall.sh @@ -0,0 +1,9 @@ +#!/bin/sh +# codeall.sh +# David Rowe 24 sep 2009 +# Code all samples using various processing steps +./code.sh hts1a +./code.sh hts2a +./code.sh mmt1 +./code.sh morig +./code.sh forig diff --git a/codec2/src/sinedec.c b/codec2/src/sinedec.c index bf840f21..b63547e5 100644 --- a/codec2/src/sinedec.c +++ b/codec2/src/sinedec.c @@ -197,32 +197,38 @@ int main(int argc, char *argv[]) dump_model(&model); - /* optional phase modelling - make sure this happens before LPC modelling - as first order model fit doesn't work well with LPC Modelled {Am} */ + /* optional phase modelling - make sure this happens before LPC + modelling of {Am} as first order model fit doesn't work well + with LPC Modelled {Am} (not sure why - investigate later) */ if (phase) { float Wn[M]; /* windowed speech samples */ float Rk[PHASE_LPC_ORD+1]; /* autocorrelation coeffs */ + float ak_phase[PHASE_LPC_ORD+1];/* LPCs */ COMP H[MAX_AMP]; /* LPC freq domain samples */ float n_min; COMP min_Am; dump_phase(&model.phi[0]); - if (!lpc_model) { - /* Determine LPC model using time domain LPC if we don't have - any LPCs yet */ + /* Determine LPCs for phase modelling. Note that we may also + find the LPCs as part of the {Am} modelling, this can + probably be combined in the final codec. However during + development some subtle bugs were found when combining LPC + and phase models so for the purpose of development it's + easier to find LPCs indepenently for phase modelling + here. */ - for(i=0; i2.0, &bg_est); + dump_phase_(&model.phi[0]); } /* optional LPC model amplitudes */