summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chromium/third_party/blink/renderer/modules/webaudio/audio_param.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/chromium/third_party/blink/renderer/modules/webaudio/audio_param.cc b/chromium/third_party/blink/renderer/modules/webaudio/audio_param.cc
index 45e00ef9472..eafcce545e5 100644
--- a/chromium/third_party/blink/renderer/modules/webaudio/audio_param.cc
+++ b/chromium/third_party/blink/renderer/modules/webaudio/audio_param.cc
@@ -267,17 +267,18 @@ static void HandleNaNValues(float* values,
}
#elif defined(CPU_ARM_NEON)
if (number_of_values >= 4) {
- uint32x4_t defaults = static_cast<uint32x4_t>(vdupq_n_f32(default_value));
+ const uint32x4_t defaults = vcvtq_u32_f32(vdupq_n_f32(default_value));
for (k = 0; k < number_of_values; k += 4) {
float32x4_t v = vld1q_f32(values + k);
// Returns true (all ones) if v is not NaN
uint32x4_t is_not_nan = vceqq_f32(v, v);
// Get the parts that are not NaN
- uint32x4_t result = vandq_u32(is_not_nan, v);
+ uint32x4_t result = vandq_u32(is_not_nan, vcvtq_u32_f32(v));
// Replace the parts that are NaN with the default and merge with previous
// result. (Note: vbic_u32(x, y) = x and not y)
result = vorrq_u32(result, vbicq_u32(defaults, is_not_nan));
- vst1q_f32(values + k, static_cast<float32x4_t>(result));
+ const float32x4_t resultf32 = vcvtq_f32_u32(result);
+ vst1q_f32(values + k, resultf32);
}
}
#endif