diff --git a/media/base/vector_math.cc b/media/base/vector_math.cc
index 4d066f3450947..a05abacc0209c 100644
--- a/media/base/vector_math.cc
+++ b/media/base/vector_math.cc
@@ -2,10 +2,11 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifdef UNSAFE_BUFFERS_BUILD
-// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
-#pragma allow_unsafe_buffers
-#endif
+#include <cstdint>
+#include "base/containers/span.h"
+#include "base/numerics/safe_conversions.h"
+
+
 
 #include "media/base/vector_math.h"
 
@@ -59,10 +60,16 @@ void FMAC(base::span<const float> src, float scale, base::span<float> dest) {
 #endif
   }();
 
-  return fmac_func(src.data(), scale, src.size(), dest.data());
+  return fmac_func(src, scale, src.size(), dest);
 }
 
-void FMAC_C(const float src[], float scale, int len, float dest[]) {
+void FMAC_C(base::span<const float> src,
+              float scale,
+              int len,
+              base::span<float> dest) {
+  // TODO(crbug.com/431824301): Remove unneeded parameter once validated to be
+  // redundant in M143.
+  CHECK(base::checked_cast<size_t>(len) == src.size(), base::NotFatalUntil::M143);
   for (int i = 0; i < len; ++i) {
     dest[i] += src[i] * scale;
   }
@@ -88,10 +95,16 @@ void FMUL(base::span<const float> src, float scale, base::span<float> dest) {
 #endif
   }();
 
-  return fmul_func(src.data(), scale, src.size(), dest.data());
+  return fmul_func(src, scale, src.size(), dest);
 }
 
-void FMUL_C(const float src[], float scale, int len, float dest[]) {
+void FMUL_C(base::span<const float> src,
+              float scale,
+              int len,
+              base::span<float> dest) {
+  // TODO(crbug.com/431824301): Remove unneeded parameter once validated to be
+  // redundant in M143.
+  CHECK(base::checked_cast<size_t>(len) == src.size(), base::NotFatalUntil::M143);
   for (int i = 0; i < len; ++i) {
     dest[i] = src[i] * scale;
   }
@@ -117,10 +130,13 @@ void FCLAMP(base::span<const float> src, base::span<float> dest) {
 #endif
   }();
 
-  return fclamp_func(src.data(), src.size(), dest.data());
+  return fclamp_func(src, src.size(), dest);
 }
 
-void FCLAMP_C(const float src[], int len, float dest[]) {
+void FCLAMP_C(base::span<const float> src, int len, base::span<float> dest) {
+  // TODO(crbug.com/431824301): Remove unneeded parameter once validated to be
+  // redundant in M143.
+  CHECK(base::checked_cast<size_t>(len) == src.size(), base::NotFatalUntil::M143);
   for (int i = 0; i < len; ++i) {
     const float sample = src[i];
     const float temp = std::isnan(sample) ? kSilence : sample;
@@ -149,14 +165,17 @@ std::pair<float, float> EWMAAndMaxPower(float initial_value,
 #endif
   }();
 
-  return ewma_and_max_power_func(initial_value, src.data(), src.size(),
+  return ewma_and_max_power_func(initial_value, src, src.size(),
                                  smoothing_factor);
 }
 
 std::pair<float, float> EWMAAndMaxPower_C(float initial_value,
-                                          const float src[],
+                                          base::span<const float> src,
                                           int len,
                                           float smoothing_factor) {
+  // TODO(crbug.com/431824301): Remove unneeded parameter once validated to be
+  // redundant in M143.
+  CHECK(base::checked_cast<size_t>(len) == src.size(), base::NotFatalUntil::M143);
   std::pair<float, float> result(initial_value, 0.0f);
   const float weight_prev = 1.0f - smoothing_factor;
   for (int i = 0; i < len; ++i) {
@@ -170,12 +189,19 @@ std::pair<float, float> EWMAAndMaxPower_C(float initial_value,
 }
 
 #if defined(ARCH_CPU_X86_FAMILY)
-void FMUL_SSE(const float src[], float scale, int len, float dest[]) {
+void FMUL_SSE(base::span<const float> src,
+                float scale,
+                int len,
+                base::span<float> dest) {
+  // TODO(crbug.com/431824301): Remove unneeded parameter once validated to be
+  // redundant in M143.
+  CHECK(base::checked_cast<size_t>(len) == src.size(), base::NotFatalUntil::M143);
   const int rem = len % 4;
   const int last_index = len - rem;
   __m128 m_scale = _mm_set_ps1(scale);
   for (int i = 0; i < last_index; i += 4) {
-    _mm_store_ps(dest + i, _mm_mul_ps(_mm_load_ps(src + i), m_scale));
+    _mm_store_ps(dest.subspan(base::checked_cast<size_t>(i)).data(),
+                 _mm_mul_ps(_mm_load_ps(src.subspan(base::checked_cast<size_t>(i)).data()), m_scale));
   }
 
   // Handle any remaining values that wouldn't fit in an SSE pass.
@@ -184,39 +210,46 @@ void FMUL_SSE(const float src[], float scale, int len, float dest[]) {
   }
 }
 
-__attribute__((target("avx2"))) void FMUL_AVX2(const float src[],
+__attribute__((target("avx2"))) void FMUL_AVX2(base::span<const float> src,
                                                float scale,
                                                int len,
-                                               float dest[]) {
+                                               base::span<float> dest) {
+  // TODO(crbug.com/431824301): Remove unneeded parameter once validated to be
+  // redundant in M143.
+  CHECK(base::checked_cast<size_t>(len) == src.size(), base::NotFatalUntil::M143);
   const int rem = len % 8;
   const int last_index = len - rem;
   __m256 m_scale = _mm256_set1_ps(scale);
   // TODO(crbug.com/40756517): Remove below alignment conditionals when AudioBus
   // |kChannelAlignment| updated to 32.
-  bool aligned_src = (reinterpret_cast<uintptr_t>(src) & 0x1F) == 0;
-  bool aligned_dest = (reinterpret_cast<uintptr_t>(dest) & 0x1F) == 0;
+  bool aligned_src = (reinterpret_cast<uintptr_t>(src.data()) & 0x1F) == 0;
+  bool aligned_dest = (reinterpret_cast<uintptr_t>(dest.data()) & 0x1F) == 0;
   if (aligned_src) {
     if (aligned_dest) {
       for (int i = 0; i < last_index; i += 8) {
-        _mm256_store_ps(dest + i,
-                        _mm256_mul_ps(_mm256_load_ps(src + i), m_scale));
+        _mm256_store_ps(
+            dest.subspan(base::checked_cast<size_t>(i)).data(),
+            _mm256_mul_ps(_mm256_load_ps(src.subspan(base::checked_cast<size_t>(i)).data()), m_scale));
       }
     } else {
       for (int i = 0; i < last_index; i += 8) {
-        _mm256_storeu_ps(dest + i,
-                         _mm256_mul_ps(_mm256_load_ps(src + i), m_scale));
+        _mm256_storeu_ps(
+            dest.subspan(base::checked_cast<size_t>(i)).data(),
+            _mm256_mul_ps(_mm256_load_ps(src.subspan(base::checked_cast<size_t>(i)).data()), m_scale));
       }
     }
   } else {
     if (aligned_dest) {
       for (int i = 0; i < last_index; i += 8) {
-        _mm256_store_ps(dest + i,
-                        _mm256_mul_ps(_mm256_loadu_ps(src + i), m_scale));
+        _mm256_store_ps(
+            dest.subspan(base::checked_cast<size_t>(i)).data(),
+            _mm256_mul_ps(_mm256_loadu_ps(src.subspan(base::checked_cast<size_t>(i)).data()), m_scale));
       }
     } else {
       for (int i = 0; i < last_index; i += 8) {
-        _mm256_storeu_ps(dest + i,
-                         _mm256_mul_ps(_mm256_loadu_ps(src + i), m_scale));
+        _mm256_storeu_ps(
+            dest.subspan(base::checked_cast<size_t>(i)).data(),
+            _mm256_mul_ps(_mm256_loadu_ps(src.subspan(base::checked_cast<size_t>(i)).data()), m_scale));
       }
     }
   }
@@ -227,14 +260,21 @@ __attribute__((target("avx2"))) void FMUL_AVX2(const float src[],
   }
 }
 
-void FMAC_SSE(const float src[], float scale, int len, float dest[]) {
+void FMAC_SSE(base::span<const float> src,
+                float scale,
+                int len,
+                base::span<float> dest) {
+  // TODO(crbug.com/431824301): Remove unneeded parameter once validated to be
+  // redundant in M143.
+  CHECK(base::checked_cast<size_t>(len) == src.size(), base::NotFatalUntil::M143);
   const int rem = len % 4;
   const int last_index = len - rem;
   __m128 m_scale = _mm_set_ps1(scale);
   for (int i = 0; i < last_index; i += 4) {
-    _mm_store_ps(dest + i,
-                 _mm_add_ps(_mm_load_ps(dest + i),
-                            _mm_mul_ps(_mm_load_ps(src + i), m_scale)));
+    _mm_store_ps(
+        dest.subspan(base::checked_cast<size_t>(i)).data(),
+        _mm_add_ps(_mm_load_ps(dest.subspan(base::checked_cast<size_t>(i)).data()),
+                   _mm_mul_ps(_mm_load_ps(src.subspan(base::checked_cast<size_t>(i)).data()), m_scale)));
   }
 
   // Handle any remaining values that wouldn't fit in an SSE pass.
@@ -243,43 +283,50 @@ void FMAC_SSE(const float src[], float scale, int len, float dest[]) {
   }
 }
 
-__attribute__((target("avx2,fma"))) void FMAC_AVX2(const float src[],
+__attribute__((target("avx2,fma"))) void FMAC_AVX2(base::span<const float> src,
                                                    float scale,
                                                    int len,
-                                                   float dest[]) {
+                                                   base::span<float> dest) {
+  // TODO(crbug.com/431824301): Remove unneeded parameter once validated to be
+  // redundant in M143.
+  CHECK(base::checked_cast<size_t>(len) == src.size(), base::NotFatalUntil::M143);
   const int rem = len % 8;
   const int last_index = len - rem;
   __m256 m_scale = _mm256_set1_ps(scale);
   // TODO(crbug.com/40756517): Remove below alignment conditionals when AudioBus
   // |kChannelAlignment| updated to 32.
-  bool aligned_src = (reinterpret_cast<uintptr_t>(src) & 0x1F) == 0;
-  bool aligned_dest = (reinterpret_cast<uintptr_t>(dest) & 0x1F) == 0;
+  bool aligned_src = (reinterpret_cast<uintptr_t>(src.data()) & 0x1F) == 0;
+  bool aligned_dest = (reinterpret_cast<uintptr_t>(dest.data()) & 0x1F) == 0;
   if (aligned_src) {
     if (aligned_dest) {
       for (int i = 0; i < last_index; i += 8) {
-        _mm256_store_ps(dest + i,
-                        _mm256_fmadd_ps(_mm256_load_ps(src + i), m_scale,
-                                        _mm256_load_ps(dest + i)));
+        _mm256_store_ps(dest.subspan(base::checked_cast<size_t>(i)).data(),
+                        _mm256_fmadd_ps(_mm256_load_ps(src.subspan(base::checked_cast<size_t>(i)).data()),
+                                        m_scale,
+                                        _mm256_load_ps(dest.subspan(base::checked_cast<size_t>(i)).data())));
       }
     } else {
       for (int i = 0; i < last_index; i += 8) {
-        _mm256_storeu_ps(dest + i,
-                         _mm256_fmadd_ps(_mm256_load_ps(src + i), m_scale,
-                                         _mm256_loadu_ps(dest + i)));
+        _mm256_storeu_ps(
+            dest.subspan(base::checked_cast<size_t>(i)).data(),
+            _mm256_fmadd_ps(_mm256_load_ps(src.subspan(base::checked_cast<size_t>(i)).data()), m_scale,
+                            _mm256_loadu_ps(dest.subspan(base::checked_cast<size_t>(i)).data())));
       }
     }
   } else {
     if (aligned_dest) {
       for (int i = 0; i < last_index; i += 8) {
-        _mm256_store_ps(dest + i,
-                        _mm256_fmadd_ps(_mm256_loadu_ps(src + i), m_scale,
-                                        _mm256_load_ps(dest + i)));
+        _mm256_store_ps(
+            dest.subspan(base::checked_cast<size_t>(i)).data(),
+            _mm256_fmadd_ps(_mm256_loadu_ps(src.subspan(base::checked_cast<size_t>(i)).data()), m_scale,
+                            _mm256_load_ps(dest.subspan(base::checked_cast<size_t>(i)).data())));
       }
     } else {
       for (int i = 0; i < last_index; i += 8) {
-        _mm256_storeu_ps(dest + i,
-                         _mm256_fmadd_ps(_mm256_loadu_ps(src + i), m_scale,
-                                         _mm256_loadu_ps(dest + i)));
+        _mm256_storeu_ps(
+            dest.subspan(base::checked_cast<size_t>(i)).data(),
+            _mm256_fmadd_ps(_mm256_loadu_ps(src.subspan(base::checked_cast<size_t>(i)).data()), m_scale,
+                            _mm256_loadu_ps(dest.subspan(base::checked_cast<size_t>(i)).data())));
       }
     }
   }
@@ -289,19 +336,24 @@ __attribute__((target("avx2,fma"))) void FMAC_AVX2(const float src[],
     dest[i] += src[i] * scale;
   }
 }
-void FCLAMP_SSE(const float src[], int len, float dest[]) {
+void FCLAMP_SSE(base::span<const float> src,
+                  int len,
+                  base::span<float> dest) {
+  // TODO(crbug.com/431824301): Remove unneeded parameter once validated to be
+  // redundant in M143.
+  CHECK(base::checked_cast<size_t>(len) == src.size(), base::NotFatalUntil::M143);
   const int rem = len % 4;
   const int last_index = len - rem;
   const __m128 m_min = _mm_set_ps1(kClampMin);
   const __m128 m_max = _mm_set_ps1(kClampMax);
   for (int i = 0; i < last_index; i += 4) {
-    const __m128 values = _mm_load_ps(src + i);
+    const __m128 values = _mm_load_ps(src.subspan(base::checked_cast<size_t>(i)).data());
     // Compare each value with itself. Since NaN != NaN, we end up with a mask
     // with 0s instead of NaNs, and 1s for the original values.
     const __m128 comparisons = _mm_cmpeq_ps(values, values);
     // Zero-out all NaNs by applying the mask with a logical AND.
     const __m128 sanitized_values = _mm_and_ps(comparisons, values);
-    _mm_store_ps(dest + i,
+    _mm_store_ps(dest.subspan(base::checked_cast<size_t>(i)).data(),
                  _mm_min_ps(_mm_max_ps(sanitized_values, m_min), m_max));
   }
 
@@ -323,9 +375,12 @@ inline __attribute__((target("avx"))) __m256 SanitizeNan(const __m256 values) {
   return _mm256_and_ps(valid_mask, values);
 }
 
-__attribute__((target("avx"))) void FCLAMP_AVX(const float src[],
+__attribute__((target("avx"))) void FCLAMP_AVX(base::span<const float> src,
                                                int len,
-                                               float dest[]) {
+                                               base::span<float> dest) {
+  // TODO(crbug.com/431824301): Remove unneeded parameter once validated to be
+  // redundant in M143.
+  CHECK(base::checked_cast<size_t>(len) == src.size(), base::NotFatalUntil::M143);
   const int rem = len % 8;
   const int last_index = len - rem;
   const __m256 m_max = _mm256_set1_ps(kClampMax);
@@ -333,23 +388,25 @@ __attribute__((target("avx"))) void FCLAMP_AVX(const float src[],
 
   // TODO(crbug.com/40756517): Remove below alignment conditionals when AudioBus
   // |kChannelAlignment| updated to 32.
-  bool aligned_src = (reinterpret_cast<uintptr_t>(src) & 0x1F) == 0;
-  bool aligned_dest = (reinterpret_cast<uintptr_t>(dest) & 0x1F) == 0;
+  bool aligned_src = (reinterpret_cast<uintptr_t>(src.data()) & 0x1F) == 0;
+  bool aligned_dest = (reinterpret_cast<uintptr_t>(dest.data()) & 0x1F) == 0;
   if (aligned_src) {
     if (aligned_dest) {
       for (int i = 0; i < last_index; i += 8) {
         _mm256_store_ps(
-            dest + i,
+            dest.subspan(base::checked_cast<size_t>(i)).data(),
             _mm256_max_ps(
-                _mm256_min_ps(SanitizeNan(_mm256_load_ps(src + i)), m_max),
+                _mm256_min_ps(SanitizeNan(_mm256_load_ps(src.subspan(base::checked_cast<size_t>(i)).data())),
+                              m_max),
                 m_min));
       }
     } else {
       for (int i = 0; i < last_index; i += 8) {
         _mm256_storeu_ps(
-            dest + i,
+            dest.subspan(base::checked_cast<size_t>(i)).data(),
             _mm256_max_ps(
-                _mm256_min_ps(SanitizeNan(_mm256_load_ps(src + i)), m_max),
+                _mm256_min_ps(SanitizeNan(_mm256_load_ps(src.subspan(base::checked_cast<size_t>(i)).data())),
+                              m_max),
                 m_min));
       }
     }
@@ -357,18 +414,20 @@ __attribute__((target("avx"))) void FCLAMP_AVX(const float src[],
     if (aligned_dest) {
       for (int i = 0; i < last_index; i += 8) {
         _mm256_store_ps(
-            dest + i,
-            _mm256_max_ps(
-                _mm256_min_ps(SanitizeNan(_mm256_loadu_ps(src + i)), m_max),
-                m_min));
+            dest.subspan(base::checked_cast<size_t>(i)).data(),
+            _mm256_max_ps(_mm256_min_ps(SanitizeNan(_mm256_loadu_ps(
+                                            src.subspan(base::checked_cast<size_t>(i)).data())),
+                                        m_max),
+                          m_min));
       }
     } else {
       for (int i = 0; i < last_index; i += 8) {
         _mm256_storeu_ps(
-            dest + i,
-            _mm256_max_ps(
-                _mm256_min_ps(SanitizeNan(_mm256_loadu_ps(src + i)), m_max),
-                m_min));
+            dest.subspan(base::checked_cast<size_t>(i)).data(),
+            _mm256_max_ps(_mm256_min_ps(SanitizeNan(_mm256_loadu_ps(
+                                            src.subspan(base::checked_cast<size_t>(i)).data())),
+                                        m_max),
+                          m_min));
       }
     }
   }
@@ -389,9 +448,12 @@ __attribute__((target("avx"))) void FCLAMP_AVX(const float src[],
   (i == 0 ? _mm_cvtss_f32(a) : _mm_cvtss_f32(_mm_shuffle_ps(a, a, i)))
 
 std::pair<float, float> EWMAAndMaxPower_SSE(float initial_value,
-                                            const float src[],
+                                            base::span<const float> src,
                                             int len,
                                             float smoothing_factor) {
+  // TODO(crbug.com/431824301): Remove unneeded parameter once validated to be
+  // redundant in M143.
+  CHECK(base::checked_cast<size_t>(len) == src.size(), base::NotFatalUntil::M143);
   // When the recurrence is unrolled, we see that we can split it into 4
   // separate lanes of evaluation:
   //
@@ -422,7 +484,7 @@ std::pair<float, float> EWMAAndMaxPower_SSE(float initial_value,
   int i;
   for (i = 0; i < last_index; i += 4) {
     ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_4th_x4);
-    const __m128 sample_x4 = _mm_load_ps(src + i);
+    const __m128 sample_x4 = _mm_load_ps(src.subspan(base::checked_cast<size_t>(i)).data());
     const __m128 sample_squared_x4 = _mm_mul_ps(sample_x4, sample_x4);
     max_x4 = _mm_max_ps(max_x4, sample_squared_x4);
     // Note: The compiler optimizes this to a single multiply-and-accumulate
@@ -461,9 +523,12 @@ std::pair<float, float> EWMAAndMaxPower_SSE(float initial_value,
 
 __attribute__((target("avx2,fma"))) std::pair<float, float>
 EWMAAndMaxPower_AVX2(float initial_value,
-                     const float src[],
+                     base::span<const float> src,
                      int len,
                      float smoothing_factor) {
+  // TODO(crbug.com/431824301): Remove unneeded parameter once validated to be
+  // redundant in M143.
+  CHECK(base::checked_cast<size_t>(len) == src.size(), base::NotFatalUntil::M143);
   const int rem = len % 8;
   const int last_index = len - rem;
   const float weight_prev = 1.0f - smoothing_factor;
@@ -492,11 +557,12 @@ EWMAAndMaxPower_AVX2(float initial_value,
   __m256 res = _mm256_set_ps(initial_value, 0, 0, 0, 0, 0, 0, 0);
   __m256 res_coeff = !weight_prev ? _mm256_set1_ps(0)
                                   : _mm256_set1_ps(std::pow(weight_prev, 8));
-  bool aligned_src = (reinterpret_cast<uintptr_t>(src) & 0x1F) == 0;
+  bool aligned_src = (reinterpret_cast<uintptr_t>(src.data()) & 0x1F) == 0;
   int i = 0;
   for (; i < last_index; i += 8) {
     __m256 sample =
-        aligned_src ? _mm256_load_ps(src + i) : _mm256_loadu_ps(src + i);
+        aligned_src ? _mm256_load_ps(src.subspan(base::checked_cast<size_t>(i)).data())
+                    : _mm256_loadu_ps(src.subspan(base::checked_cast<size_t>(i)).data());
     __m256 sample_x2 = _mm256_mul_ps(sample, sample);
     max = _mm256_max_ps(max, sample_x2);
     res = _mm256_fmadd_ps(sample_x2, sum_coeff, _mm256_mul_ps(res, res_coeff));
@@ -534,13 +600,20 @@ EWMAAndMaxPower_AVX2(float initial_value,
 #endif
 
 #if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON)
-void FMAC_NEON(const float src[], float scale, int len, float dest[]) {
+void FMAC_NEON(base::span<const float> src,
+                 float scale,
+                 int len,
+                 base::span<float> dest) {
+  // TODO(crbug.com/431824301): Remove unneeded parameter once validated to be
+  // redundant in M143.
+  CHECK(base::checked_cast<size_t>(len) == src.size(), base::NotFatalUntil::M143);
   const int rem = len % 4;
   const int last_index = len - rem;
   float32x4_t m_scale = vmovq_n_f32(scale);
   for (int i = 0; i < last_index; i += 4) {
-    vst1q_f32(dest + i,
-              vmlaq_f32(vld1q_f32(dest + i), vld1q_f32(src + i), m_scale));
+    vst1q_f32(dest.subspan(base::checked_cast<size_t>(i)).data(),
+              vmlaq_f32(vld1q_f32(dest.subspan(base::checked_cast<size_t>(i)).data()),
+                        vld1q_f32(src.subspan(base::checked_cast<size_t>(i)).data()), m_scale));
   }
 
   // Handle any remaining values that wouldn't fit in an NEON pass.
@@ -549,12 +622,19 @@ void FMAC_NEON(const float src[], float scale, int len, float dest[]) {
   }
 }
 
-void FMUL_NEON(const float src[], float scale, int len, float dest[]) {
+void FMUL_NEON(base::span<const float> src,
+                 float scale,
+                 int len,
+                 base::span<float> dest) {
+  // TODO(crbug.com/431824301): Remove unneeded parameter once validated to be
+  // redundant in M143.
+  CHECK(base::checked_cast<size_t>(len) == src.size(), base::NotFatalUntil::M143);
   const int rem = len % 4;
   const int last_index = len - rem;
   float32x4_t m_scale = vmovq_n_f32(scale);
   for (int i = 0; i < last_index; i += 4) {
-    vst1q_f32(dest + i, vmulq_f32(vld1q_f32(src + i), m_scale));
+    vst1q_f32(dest.subspan(base::checked_cast<size_t>(i)).data(),
+              vmulq_f32(vld1q_f32(src.subspan(base::checked_cast<size_t>(i)).data()), m_scale));
   }
 
   // Handle any remaining values that wouldn't fit in an NEON pass.
@@ -563,13 +643,18 @@ void FMUL_NEON(const float src[], float scale, int len, float dest[]) {
   }
 }
 
-void FCLAMP_NEON(const float src[], int len, float dest[]) {
+void FCLAMP_NEON(base::span<const float> src,
+                   int len,
+                   base::span<float> dest) {
+  // TODO(crbug.com/431824301): Remove unneeded parameter once validated to be
+  // redundant in M143.
+  CHECK(base::checked_cast<size_t>(len) == src.size(), base::NotFatalUntil::M143);
   const int rem = len % 4;
   const int last_index = len - rem;
   const float32x4_t m_min = vmovq_n_f32(kClampMin);
   const float32x4_t m_max = vmovq_n_f32(kClampMax);
   for (int i = 0; i < last_index; i += 4) {
-    const float32x4_t values = vld1q_f32(src + i);
+    const float32x4_t values = vld1q_f32(src.subspan(base::checked_cast<size_t>(i)).data());
 
     // Compare each value with itself. Since NaN != NaN, we end up with a mask
     // with 0s instead of NaNs, and 1s for the original values.
@@ -579,7 +664,8 @@ void FCLAMP_NEON(const float src[], int len, float dest[]) {
     const float32x4_t sanitized_values = vreinterpretq_f32_u32(
         vandq_u32(vreinterpretq_u32_f32(values), comparisons));
 
-    vst1q_f32(dest + i, vminq_f32(vmaxq_f32(sanitized_values, m_min), m_max));
+    vst1q_f32(dest.subspan(base::checked_cast<size_t>(i)).data(),
+              vminq_f32(vmaxq_f32(sanitized_values, m_min), m_max));
   }
 
   // Handle any remaining values that wouldn't fit in a NEON pass.
@@ -592,9 +678,12 @@ void FCLAMP_NEON(const float src[], int len, float dest[]) {
 }
 
 std::pair<float, float> EWMAAndMaxPower_NEON(float initial_value,
-                                             const float src[],
+                                             base::span<const float> src,
                                              int len,
                                              float smoothing_factor) {
+  // TODO(crbug.com/431824301): Remove unneeded parameter once validated to be
+  // redundant in M143.
+  CHECK(base::checked_cast<size_t>(len) == src.size(), base::NotFatalUntil::M143);
   // When the recurrence is unrolled, we see that we can split it into 4
   // separate lanes of evaluation:
   //
@@ -625,7 +714,7 @@ std::pair<float, float> EWMAAndMaxPower_NEON(float initial_value,
   int i;
   for (i = 0; i < last_index; i += 4) {
     ewma_x4 = vmulq_f32(ewma_x4, weight_prev_4th_x4);
-    const float32x4_t sample_x4 = vld1q_f32(src + i);
+    const float32x4_t sample_x4 = vld1q_f32(src.subspan(base::checked_cast<size_t>(i)).data());
     const float32x4_t sample_squared_x4 = vmulq_f32(sample_x4, sample_x4);
     max_x4 = vmaxq_f32(max_x4, sample_squared_x4);
     ewma_x4 = vmlaq_f32(ewma_x4, sample_squared_x4, smoothing_factor_x4);
diff --git a/media/base/vector_math_testing.h b/media/base/vector_math_testing.h
index cfa993009e875..c5f74068c8908 100644
--- a/media/base/vector_math_testing.h
+++ b/media/base/vector_math_testing.h
@@ -7,6 +7,7 @@
 
 #include <utility>
 
+#include "base/containers/span.h"
 #include "build/build_config.h"
 #include "media/base/media_export.h"
 
@@ -14,58 +15,60 @@ namespace media {
 namespace vector_math {
 
 // Optimized versions exposed for testing.  See vector_math.h for details.
-MEDIA_EXPORT void FMAC_C(const float src[], float scale, int len, float dest[]);
-MEDIA_EXPORT void FMUL_C(const float src[], float scale, int len, float dest[]);
-MEDIA_EXPORT void FCLAMP_C(const float src[], int len, float dest[]);
+MEDIA_EXPORT void FMAC_C(base::span<const float> src, float scale, int len, base::span<float> dest);
+MEDIA_EXPORT void FMUL_C(base::span<const float> src, float scale, int len, base::span<float> dest);
+MEDIA_EXPORT void FCLAMP_C(base::span<const float> src, int len, base::span<float> dest);
 MEDIA_EXPORT std::pair<float, float> EWMAAndMaxPower_C(float initial_value,
-                                                       const float src[],
+                                                       base::span<const float> src,
                                                        int len,
                                                        float smoothing_factor);
 
 #if defined(ARCH_CPU_X86_FAMILY)
-MEDIA_EXPORT void FMAC_SSE(const float src[],
+MEDIA_EXPORT void FMAC_SSE(base::span<const float> src,
                            float scale,
                            int len,
-                           float dest[]);
-MEDIA_EXPORT void FMUL_SSE(const float src[],
+                           base::span<float> dest);
+MEDIA_EXPORT void FMUL_SSE(base::span<const float> src,
                            float scale,
                            int len,
-                           float dest[]);
-MEDIA_EXPORT void FCLAMP_SSE(const float src[], int len, float dest[]);
+                           base::span<float> dest);
+MEDIA_EXPORT void FCLAMP_SSE(base::span<const float> src, int len, base::span<float> dest);
 MEDIA_EXPORT std::pair<float, float> EWMAAndMaxPower_SSE(
     float initial_value,
-    const float src[],
+    base::span<const float> src,
     int len,
     float smoothing_factor);
-MEDIA_EXPORT void FMAC_AVX2(const float src[],
+MEDIA_EXPORT void FMAC_AVX2(base::span<const float> src,
                             float scale,
                             int len,
-                            float dest[]);
-MEDIA_EXPORT void FMUL_AVX2(const float src[],
+                            base::span<float> dest);
+MEDIA_EXPORT void FMUL_AVX2(base::span<const float> src,
                             float scale,
                             int len,
-                            float dest[]);
-MEDIA_EXPORT void FCLAMP_AVX(const float src[], int len, float dest[]);
+                            base::span<float> dest);
+MEDIA_EXPORT void FCLAMP_AVX(base::span<const float> src, int len, base::span<float> dest);
 MEDIA_EXPORT std::pair<float, float> EWMAAndMaxPower_AVX2(
     float initial_value,
-    const float src[],
+    base::span<const float> src,
     int len,
     float smoothing_factor);
 #endif
 
 #if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON)
-MEDIA_EXPORT void FMAC_NEON(const float src[],
+MEDIA_EXPORT void FMAC_NEON(base::span<const float> src,
                             float scale,
                             int len,
-                            float dest[]);
-MEDIA_EXPORT void FMUL_NEON(const float src[],
+                            base::span<float> dest);
+MEDIA_EXPORT void FMUL_NEON(base::span<const float> src,
                             float scale,
                             int len,
-                            float dest[]);
-MEDIA_EXPORT void FCLAMP_NEON(const float src[], int len, float dest[]);
+                            base::span<float> dest);
+MEDIA_EXPORT void FCLAMP_NEON(base::span<const float> src,
+                             int len,
+                             base::span<float> dest);
 MEDIA_EXPORT std::pair<float, float> EWMAAndMaxPower_NEON(
     float initial_value,
-    const float src[],
+    base::span<const float> src,
     int len,
     float smoothing_factor);
 #endif
diff --git a/media/base/vector_math_unittest.cc b/media/base/vector_math_unittest.cc
index 14e6f831b5008..25d43874d0a2c 100644
--- a/media/base/vector_math_unittest.cc
+++ b/media/base/vector_math_unittest.cc
@@ -130,8 +130,8 @@ TEST_F(VectorMathTest, FMAC) {
   {
     SCOPED_TRACE("FMAC_C");
     FillTestVectors(kInputFillValue, kOutputFillValue);
-    vector_math::FMAC_C(input_array_.data(), kScale, kVectorSize,
-                        output_array_.data());
+    vector_math::FMAC_C(input_array_, kScale, kVectorSize,
+                        output_array_);
     VerifyOutput(kResult);
   }
 
@@ -139,8 +139,8 @@ TEST_F(VectorMathTest, FMAC) {
   {
     SCOPED_TRACE("FMAC_SSE");
     FillTestVectors(kInputFillValue, kOutputFillValue);
-    vector_math::FMAC_SSE(input_array_.data(), kScale, kVectorSize,
-                          output_array_.data());
+    vector_math::FMAC_SSE(input_array_, kScale, kVectorSize,
+                          output_array_);
     VerifyOutput(kResult);
   }
   {
@@ -148,8 +148,8 @@ TEST_F(VectorMathTest, FMAC) {
     if (cpu.has_avx2() && cpu.has_fma3()) {
       SCOPED_TRACE("FMAC_AVX2");
       FillTestVectors(kInputFillValue, kOutputFillValue);
-      vector_math::FMAC_AVX2(input_array_.data(), kScale, kVectorSize,
-                             output_array_.data());
+      vector_math::FMAC_AVX2(input_array_, kScale, kVectorSize,
+                             output_array_);
       VerifyOutput(kResult);
     }
   }
@@ -159,8 +159,8 @@ TEST_F(VectorMathTest, FMAC) {
   {
     SCOPED_TRACE("FMAC_NEON");
     FillTestVectors(kInputFillValue, kOutputFillValue);
-    vector_math::FMAC_NEON(input_array_.data(), kScale, kVectorSize,
-                           output_array_.data());
+    vector_math::FMAC_NEON(input_array_, kScale, kVectorSize,
+                           output_array_);
     VerifyOutput(kResult);
   }
 #endif
@@ -180,8 +180,8 @@ TEST_F(VectorMathTest, FMUL) {
   {
     SCOPED_TRACE("FMUL_C");
     FillTestVectors(kInputFillValue, kOutputFillValue);
-    vector_math::FMUL_C(input_array_.data(), kScale, kVectorSize,
-                        output_array_.data());
+    vector_math::FMUL_C(input_array_, kScale, kVectorSize,
+                        output_array_);
     VerifyOutput(kResult);
   }
 
@@ -189,8 +189,8 @@ TEST_F(VectorMathTest, FMUL) {
   {
     SCOPED_TRACE("FMUL_SSE");
     FillTestVectors(kInputFillValue, kOutputFillValue);
-    vector_math::FMUL_SSE(input_array_.data(), kScale, kVectorSize,
-                          output_array_.data());
+    vector_math::FMUL_SSE(input_array_, kScale, kVectorSize,
+                          output_array_);
     VerifyOutput(kResult);
   }
   {
@@ -198,8 +198,8 @@ TEST_F(VectorMathTest, FMUL) {
     if (cpu.has_avx2()) {
       SCOPED_TRACE("FMUL_AVX2");
       FillTestVectors(kInputFillValue, kOutputFillValue);
-      vector_math::FMUL_AVX2(input_array_.data(), kScale, kVectorSize,
-                             output_array_.data());
+      vector_math::FMUL_AVX2(input_array_, kScale, kVectorSize,
+                             output_array_);
       VerifyOutput(kResult);
     }
   }
@@ -209,8 +209,8 @@ TEST_F(VectorMathTest, FMUL) {
   {
     SCOPED_TRACE("FMUL_NEON");
     FillTestVectors(kInputFillValue, kOutputFillValue);
-    vector_math::FMUL_NEON(input_array_.data(), kScale, kVectorSize,
-                           output_array_.data());
+    vector_math::FMUL_NEON(input_array_, kScale, kVectorSize,
+                           output_array_);
     VerifyOutput(kResult);
   }
 #endif
@@ -228,8 +228,8 @@ TEST_F(VectorMathTest, FCLAMP) {
   {
     SCOPED_TRACE("FCLAMP_C");
     FillTestClampingVectors(kUnclampedInputValues, kOutputFillValue);
-    vector_math::FCLAMP_C(input_array_.data(), kVectorSize,
-                          output_array_.data());
+    vector_math::FCLAMP_C(input_array_, kVectorSize,
+                          output_array_);
     VerifyClampOutput(kClampedOutputValues);
   }
 
@@ -237,8 +237,8 @@ TEST_F(VectorMathTest, FCLAMP) {
   {
     SCOPED_TRACE("FCLAMP_SSE");
     FillTestClampingVectors(kUnclampedInputValues, kOutputFillValue);
-    vector_math::FCLAMP_SSE(input_array_.data(), kVectorSize,
-                            output_array_.data());
+    vector_math::FCLAMP_SSE(input_array_, kVectorSize,
+                            output_array_);
     VerifyClampOutput(kClampedOutputValues);
   }
   {
@@ -246,8 +246,8 @@ TEST_F(VectorMathTest, FCLAMP) {
     if (cpu.has_avx()) {
       SCOPED_TRACE("FCLAMP_AVX");
       FillTestClampingVectors(kUnclampedInputValues, kOutputFillValue);
-      vector_math::FCLAMP_AVX(input_array_.data(), kVectorSize,
-                              output_array_.data());
+      vector_math::FCLAMP_AVX(input_array_, kVectorSize,
+                              output_array_);
       VerifyClampOutput(kClampedOutputValues);
     }
   }
@@ -257,8 +257,8 @@ TEST_F(VectorMathTest, FCLAMP) {
   {
     SCOPED_TRACE("FCLAMP_NEON");
     FillTestClampingVectors(kUnclampedInputValues, kOutputFillValue);
-    vector_math::FCLAMP_NEON(input_array_.data(), kVectorSize,
-                             output_array_.data());
+    vector_math::FCLAMP_NEON(input_array_, kVectorSize,
+                             output_array_);
     VerifyClampOutput(kClampedOutputValues);
   }
 #endif
@@ -272,12 +272,16 @@ TEST_F(VectorMathTest, FCLAMP_remainder_data) {
   static constexpr float kGuardValue = 123.0f;
 
   const auto run_per_value_clamp_test =
-      [&](void (*fn)(const float[], int, float[])) {
+      [&](auto fn) {
         for (auto [input, output] :
              base::zip(kUnclampedInputValues, kClampedOutputValues)) {
           input_array_[0] = input;
           output_array_[0] = kGuardValue;
-          fn(input_array_.data(), kSmallVectorSize, output_array_.data());
+          fn(base::span(input_array_).first(
+                 base::checked_cast<size_t>(kSmallVectorSize)),
+             kSmallVectorSize,
+             base::span(output_array_).first(
+                 base::checked_cast<size_t>(kSmallVectorSize)));
           EXPECT_EQ(output_array_[0], output);
         }
       };
@@ -387,7 +391,7 @@ class EWMATestScenario {
     {
       SCOPED_TRACE("EWMAAndMaxPower_C");
       const std::pair<float, float>& result = vector_math::EWMAAndMaxPower_C(
-          initial_value_, data_.data(), data_.size(), smoothing_factor_);
+          initial_value_, data_, data_.size(), smoothing_factor_);
       EXPECT_NEAR(expected_final_avg_, result.first, 0.0000001f);
       EXPECT_NEAR(expected_max_, result.second, 0.0000001f);
     }
@@ -396,7 +400,7 @@ class EWMATestScenario {
     {
       SCOPED_TRACE("EWMAAndMaxPower_SSE");
       const std::pair<float, float>& result = vector_math::EWMAAndMaxPower_SSE(
-          initial_value_, data_.data(), data_.size(), smoothing_factor_);
+          initial_value_, data_, data_.size(), smoothing_factor_);
       EXPECT_NEAR(expected_final_avg_, result.first, 0.0000001f);
       EXPECT_NEAR(expected_max_, result.second, 0.0000001f);
     }
@@ -405,7 +409,7 @@ class EWMATestScenario {
       if (cpu.has_avx2() && cpu.has_fma3()) {
         SCOPED_TRACE("EWMAAndMaxPower_AVX2");
         const std::pair<float, float>& result =
-            vector_math::EWMAAndMaxPower_AVX2(initial_value_, data_.data(),
+            vector_math::EWMAAndMaxPower_AVX2(initial_value_, data_,
                                               data_.size(), smoothing_factor_);
         EXPECT_NEAR(expected_final_avg_, result.first, 0.0000001f);
         EXPECT_NEAR(expected_max_, result.second, 0.0000001f);
@@ -417,7 +421,7 @@ class EWMATestScenario {
     {
       SCOPED_TRACE("EWMAAndMaxPower_NEON");
       const std::pair<float, float>& result = vector_math::EWMAAndMaxPower_NEON(
-          initial_value_, data_.data(), data_.size(), smoothing_factor_);
+          initial_value_, data_, data_.size(), smoothing_factor_);
       EXPECT_NEAR(expected_final_avg_, result.first, 0.0000001f);
       EXPECT_NEAR(expected_max_, result.second, 0.0000001f);
     }
