diff options
author | Koen Vos <koenvos@users.noreply.github.com> | 2016-01-13 11:54:40 +0800 |
---|---|---|
committer | Koen Vos <koenvos@users.noreply.github.com> | 2016-01-13 11:54:40 +0800 |
commit | d845e44c07a43aa82e558699361d54bdfe755888 (patch) | |
tree | 206da38ea94603956498c4351a6fcf75b5b2d809 /src | |
parent | 43e8bd46560d1aaf85fd682ab554e1f0753837ef (diff) | |
download | opus-burg_optimization.tar.gz |
faster Burg implementationburg_optimization
Diffstat (limited to 'src')
-rw-r--r-- | src/opus_demo.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/opus_demo.c b/src/opus_demo.c index 9e99a3b2..485818cb 100644 --- a/src/opus_demo.c +++ b/src/opus_demo.c @@ -242,7 +242,7 @@ int main(int argc, char *argv[]) int stop=0; short *in, *out; int application=OPUS_APPLICATION_AUDIO; - double bits=0.0, bits_max=0.0, bits_act=0.0, bits2=0.0, nrg; + double bits=0.0, bits_max=0.0, bits_act=0.0, bits2=0.0, bits_act2=0.0, nrg; double tot_samples=0; opus_uint64 tot_in, tot_out; int bandwidth=OPUS_AUTO; @@ -848,6 +848,7 @@ int main(int argc, char *argv[]) nrg /= frame_size * channels; if( nrg > 1e5 ) { bits_act += len[toggle]*8; + bits_act2 += len[toggle]*len[toggle]*64; count_act++; } } @@ -866,9 +867,11 @@ int main(int argc, char *argv[]) 1e-3*bits_max*sampling_rate/frame_size); if (!decode_only) fprintf (stderr, "active bitrate: %7.3f kb/s\n", - 1e-3*bits_act*sampling_rate/(1e-15+frame_size*(double)count_act)); + 1e-3*bits_act*sampling_rate/(frame_size*(double)count_act)); fprintf (stderr, "bitrate standard deviation: %7.3f kb/s\n", 1e-3*sqrt(bits2/count - bits*bits/(count*(double)count))*sampling_rate/frame_size); + fprintf (stderr, "active standard deviation: %7.3f kb/s\n", + 1e-3*sqrt(bits_act2/count_act - bits_act*bits_act/(count_act*(double)count_act))*sampling_rate/frame_size); /* Close any files to which intermediate results were stored */ SILK_DEBUG_STORE_CLOSE_FILES silk_TimerSave("opus_timing.txt"); |