Correct conversion between float and fixed formats
This CL changes the way that values are converted between fixed and floating point to -Avoid the former asymmetric conversion causing nonlinear distortions. -Reduce the complexity. Bug: webrtc:6594 Change-Id: I64d0cc31c5d16f397686a59a062cfbc4b336d94d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132783 Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org> Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org> Commit-Queue: Per Åhgren <peah@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28867}
This commit is contained in:
@ -12,11 +12,6 @@
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
void FloatToS16(const float* src, size_t size, int16_t* dest) {
|
||||
for (size_t i = 0; i < size; ++i)
|
||||
dest[i] = FloatToS16(src[i]);
|
||||
}
|
||||
|
||||
void S16ToFloat(const int16_t* src, size_t size, float* dest) {
|
||||
for (size_t i = 0; i < size; ++i)
|
||||
dest[i] = S16ToFloat(src[i]);
|
||||
|
||||
Reference in New Issue
Block a user