[aimc] r311 committed - Small cleanup of eigen usage in SAI implementation.

0 views
Skip to first unread message

ai...@googlecode.com

unread,
Jul 16, 2013, 3:56:30 PM7/16/13
to aimc...@googlegroups.com
Revision: 311
Author: ro...@google.com
Date: Tue Jul 16 12:56:11 2013
Log: Small cleanup of eigen usage in SAI implementation.
http://code.google.com/p/aimc/source/detail?r=311

Modified:
/trunk/carfac/sai.cc
/trunk/carfac/sai_test.cc
/trunk/matlab/bmm/carfac/CARFAC_GenerateTestData.m

=======================================
--- /trunk/carfac/sai.cc Mon Jul 1 12:02:37 2013
+++ /trunk/carfac/sai.cc Tue Jul 16 12:56:11 2013
@@ -52,12 +52,11 @@
"Unexpected input frame size.");

// Append new data to the input buffer.
- int num_shift = params_.window_width;
- int shift_width = input_buffer_.cols() - num_shift;
+ int shift_width = input_buffer_.cols() - params_.window_width;
input_buffer_.leftCols(shift_width).swap(
input_buffer_.rightCols(shift_width));
for (int i = 0; i < input.size(); ++i) {
- input_buffer_.block(0, shift_width + i, input[i].size(), 1) = input[i];
+ input_buffer_.col(shift_width + i) = input[i];
}
// Zero-pad the buffer if necessary.
if (input.size() < params_.window_width) {
=======================================
--- /trunk/carfac/sai_test.cc Mon Jul 1 12:02:37 2013
+++ /trunk/carfac/sai_test.cc Tue Jul 16 12:56:11 2013
@@ -157,6 +157,7 @@
const int kNumChannels = 71;
vector<ArrayX> input_segment =
LoadMatrix(kTestName + "-matlab-nap1.txt", kNumSamples,
kNumChannels);
+
const int kWindowWidth = 2000;
const int kSAIWidth = 500;
SAIParams sai_params = CreateSAIParams(kNumChannels, kWindowWidth,
kSAIWidth);
=======================================
--- /trunk/matlab/bmm/carfac/CARFAC_GenerateTestData.m Thu Jun 27 15:28:42
2013
+++ /trunk/matlab/bmm/carfac/CARFAC_GenerateTestData.m Tue Jul 16 12:56:11
2013
@@ -52,7 +52,6 @@
CF_struct = CARFAC_Design(n_ears);
WriteTestData(test_data_dir, 'binaural_test', signal, CF_struct,
sai_struct);

-
test_name = 'long_test';
samples_to_read = [80001, 82000]; % Trim for a faster test.
[signal, fs] = wavread([test_data_dir test_name '.wav'], samples_to_read);
Reply all
Reply to author
Forward
0 new messages