Set range of GetLinearAecOutput to [-1, 1]
The output of GetLinearAecOutput is changed to have the range [-1, 1] instead of [-2^15, 2^15] to be more similar to other Audio Processing Module API functions. The "--linear_aec_output" of audioproc_f has been tested for bit-exactness. Bug: webrtc:12185 Change-Id: Id50d93fcfaee5c239f3eb73f99d0bd3533319518 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/193062 Reviewed-by: Per Åhgren <peah@webrtc.org> Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32604}
This commit is contained in:
parent
bee6408d7b
commit
4543697b37
@ -1476,8 +1476,8 @@ bool AudioProcessingImpl::GetLinearAecOutput(
|
||||
rtc::ArrayView<const float> channel_view =
|
||||
rtc::ArrayView<const float>(linear_aec_buffer->channels_const()[ch],
|
||||
linear_aec_buffer->num_frames());
|
||||
std::copy(channel_view.begin(), channel_view.end(),
|
||||
linear_output[ch].begin());
|
||||
FloatS16ToFloat(channel_view.data(), channel_view.size(),
|
||||
linear_output[ch].data());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -59,7 +59,6 @@ EchoCanceller3Config ReadAec3ConfigFromJsonFile(const std::string& filename) {
|
||||
return cfg;
|
||||
}
|
||||
|
||||
|
||||
std::string GetIndexedOutputWavFilename(const std::string& wav_name,
|
||||
int counter) {
|
||||
rtc::StringBuilder ss;
|
||||
@ -260,8 +259,8 @@ void AudioProcessingSimulator::ProcessStream(bool fixed_interface) {
|
||||
for (size_t k = 0; k < linear_aec_output_buf_[0].size(); ++k) {
|
||||
for (size_t ch = 0; ch < linear_aec_output_buf_.size(); ++ch) {
|
||||
RTC_CHECK_EQ(linear_aec_output_buf_[ch].size(), 160);
|
||||
linear_aec_output_file_writer_->WriteSamples(
|
||||
&linear_aec_output_buf_[ch][k], 1);
|
||||
float sample = FloatToFloatS16(linear_aec_output_buf_[ch][k]);
|
||||
linear_aec_output_file_writer_->WriteSamples(&sample, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user