diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-06-22 01:10:47 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-06-22 01:10:47 +0100 |
| commit | 5e9e59e044fe3b51352d5dccad7f11882c6a571c (patch) | |
| tree | dca9b4fee01fd836a36b0cba6d09f66b13982704 /src/lib/dcp_decoder.cc | |
| parent | 7fa5d6964891ea199e449d30e2591bf61645247b (diff) | |
A couple of small optimisations.
Diffstat (limited to 'src/lib/dcp_decoder.cc')
| -rw-r--r-- | src/lib/dcp_decoder.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/dcp_decoder.cc b/src/lib/dcp_decoder.cc index e7e88d319..c17b21a7f 100644 --- a/src/lib/dcp_decoder.cc +++ b/src/lib/dcp_decoder.cc @@ -116,9 +116,10 @@ DCPDecoder::pass (PassReason reason, bool) int const channels = _dcp_content->audio->stream()->channels (); int const frames = sf->size() / (3 * channels); shared_ptr<AudioBuffers> data (new AudioBuffers (channels, frames)); + float** data_data = data->data(); for (int i = 0; i < frames; ++i) { for (int j = 0; j < channels; ++j) { - data->data()[j][i] = static_cast<int> ((from[0] << 8) | (from[1] << 16) | (from[2] << 24)) / static_cast<float> (INT_MAX - 256); + data_data[j][i] = static_cast<int> ((from[0] << 8) | (from[1] << 16) | (from[2] << 24)) / static_cast<float> (INT_MAX - 256); from += 3; } } |
