Mercurial > hg > aimc
diff carfac/sai.cc @ 662:7e18c84ca2b7
Small cleanup of eigen usage in SAI implementation.
author | ronw@google.com |
---|---|
date | Tue, 16 Jul 2013 19:56:11 +0000 |
parents | 7a0031c321da |
children | 4582882ab89f |
line wrap: on
line diff
--- a/carfac/sai.cc Mon Jul 01 19:02:37 2013 +0000 +++ b/carfac/sai.cc Tue Jul 16 19:56:11 2013 +0000 @@ -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) {