test/*: normalize use of nullptr

this is preferred over NULL in C++11

Change-Id: Ic48ddcc6dfb8975a57f6713549ad04d93db21415
diff --git a/test/active_map_test.cc b/test/active_map_test.cc
index 2bbc3b6..a9f7f85 100644
--- a/test/active_map_test.cc
+++ b/test/active_map_test.cc
@@ -66,7 +66,7 @@
       aom_active_map_t map = aom_active_map_t();
       map.cols = (kWidth + 15) / 16;
       map.rows = (kHeight + 15) / 16;
-      map.active_map = NULL;
+      map.active_map = nullptr;
       encoder->Control(AOME_SET_ACTIVEMAP, &map);
     }
   }
diff --git a/test/aom_integer_test.cc b/test/aom_integer_test.cc
index d5dfad9..fcbbfb4 100644
--- a/test/aom_integer_test.cc
+++ b/test/aom_integer_test.cc
@@ -130,13 +130,13 @@
 
   // Test that decode fails when result would be valid 9 byte integer.
   ASSERT_EQ(aom_uleb_decode(&kAllPadBytesBuffer[0], kMaximumLeb128CodedSize + 1,
-                            &decoded_value, NULL),
+                            &decoded_value, nullptr),
             -1);
 
   // Test that encoded value missing terminator byte within available buffer
   // range causes decode error.
   ASSERT_EQ(aom_uleb_decode(&kAllPadBytesBuffer[0], kMaximumLeb128CodedSize,
-                            &decoded_value, NULL),
+                            &decoded_value, nullptr),
             -1);
 
   // Test that LEB128 input that decodes to a value larger than 32-bits fails.
@@ -153,10 +153,10 @@
   uint8_t write_buffer[kWriteBufferSize] = { 0 };
   size_t coded_size = 0;
   ASSERT_EQ(
-      aom_uleb_encode(kValidTestValue, kWriteBufferSize, NULL, &coded_size),
+      aom_uleb_encode(kValidTestValue, kWriteBufferSize, nullptr, &coded_size),
       -1);
   ASSERT_EQ(aom_uleb_encode(kValidTestValue, kWriteBufferSize, &write_buffer[0],
-                            NULL),
+                            nullptr),
             -1);
 
   const uint32_t kValueOutOfRangeForBuffer = 0xFFFFFFFF;
diff --git a/test/av1_config_test.cc b/test/av1_config_test.cc
index fca980f..3ff816c 100644
--- a/test/av1_config_test.cc
+++ b/test/av1_config_test.cc
@@ -72,14 +72,14 @@
 TEST(Av1Config, ObuInvalidInputs) {
   Av1Config av1_config;
   memset(&av1_config, 0, sizeof(av1_config));
-  ASSERT_EQ(-1, get_av1config_from_obu(NULL, 0, 0, NULL));
-  ASSERT_EQ(-1,
-            get_av1config_from_obu(&kLobfFullSequenceHeaderObu[0], 0, 0, NULL));
-  ASSERT_EQ(
-      -1, get_av1config_from_obu(&kLobfFullSequenceHeaderObu[0],
-                                 sizeof(kLobfFullSequenceHeaderObu), 0, NULL));
-  ASSERT_EQ(-1, get_av1config_from_obu(NULL, sizeof(kLobfFullSequenceHeaderObu),
-                                       0, NULL));
+  ASSERT_EQ(-1, get_av1config_from_obu(nullptr, 0, 0, nullptr));
+  ASSERT_EQ(-1, get_av1config_from_obu(&kLobfFullSequenceHeaderObu[0], 0, 0,
+                                       nullptr));
+  ASSERT_EQ(-1, get_av1config_from_obu(&kLobfFullSequenceHeaderObu[0],
+                                       sizeof(kLobfFullSequenceHeaderObu), 0,
+                                       nullptr));
+  ASSERT_EQ(-1, get_av1config_from_obu(
+                    nullptr, sizeof(kLobfFullSequenceHeaderObu), 0, nullptr));
   ASSERT_EQ(-1, get_av1config_from_obu(&kLobfFullSequenceHeaderObu[0], 0, 0,
                                        &av1_config));
 }
@@ -88,11 +88,11 @@
   Av1Config av1_config;
   memset(&av1_config, 0, sizeof(av1_config));
   size_t bytes_read = 0;
-  ASSERT_EQ(-1, read_av1config(NULL, 0, NULL, NULL));
-  ASSERT_EQ(-1, read_av1config(NULL, 4, NULL, NULL));
-  ASSERT_EQ(-1, read_av1config(&kAv1cAllZero[0], 0, NULL, NULL));
-  ASSERT_EQ(-1, read_av1config(&kAv1cAllZero[0], 4, &bytes_read, NULL));
-  ASSERT_EQ(-1, read_av1config(NULL, 4, &bytes_read, &av1_config));
+  ASSERT_EQ(-1, read_av1config(nullptr, 0, nullptr, nullptr));
+  ASSERT_EQ(-1, read_av1config(nullptr, 4, nullptr, nullptr));
+  ASSERT_EQ(-1, read_av1config(&kAv1cAllZero[0], 0, nullptr, nullptr));
+  ASSERT_EQ(-1, read_av1config(&kAv1cAllZero[0], 4, &bytes_read, nullptr));
+  ASSERT_EQ(-1, read_av1config(nullptr, 4, &bytes_read, &av1_config));
 }
 
 TEST(Av1Config, WriteInvalidInputs) {
@@ -100,13 +100,13 @@
   memset(&av1_config, 0, sizeof(av1_config));
   size_t bytes_written = 0;
   uint8_t av1c_buffer[4] = { 0 };
-  ASSERT_EQ(-1, write_av1config(NULL, 0, NULL, NULL));
-  ASSERT_EQ(-1, write_av1config(&av1_config, 0, NULL, NULL));
-  ASSERT_EQ(-1, write_av1config(&av1_config, 0, &bytes_written, NULL));
+  ASSERT_EQ(-1, write_av1config(nullptr, 0, nullptr, nullptr));
+  ASSERT_EQ(-1, write_av1config(&av1_config, 0, nullptr, nullptr));
+  ASSERT_EQ(-1, write_av1config(&av1_config, 0, &bytes_written, nullptr));
 
   ASSERT_EQ(-1,
             write_av1config(&av1_config, 0, &bytes_written, &av1c_buffer[0]));
-  ASSERT_EQ(-1, write_av1config(&av1_config, 4, &bytes_written, NULL));
+  ASSERT_EQ(-1, write_av1config(&av1_config, 4, &bytes_written, nullptr));
 }
 
 TEST(Av1Config, GetAv1ConfigFromLobfObu) {
diff --git a/test/av1_convolve_scale_test.cc b/test/av1_convolve_scale_test.cc
index 6b08e7a..3f35025 100644
--- a/test/av1_convolve_scale_test.cc
+++ b/test/av1_convolve_scale_test.cc
@@ -255,7 +255,7 @@
 template <typename SrcPixel>
 class ConvolveScaleTestBase : public ::testing::Test {
  public:
-  ConvolveScaleTestBase() : image_(NULL) {}
+  ConvolveScaleTestBase() : image_(nullptr) {}
   virtual ~ConvolveScaleTestBase() { delete image_; }
   virtual void TearDown() {}
 
@@ -278,7 +278,7 @@
     filter_x_.set(ntaps_x_, false);
     filter_y_.set(ntaps_y_, true);
     convolve_params_ =
-        get_conv_params_no_round(avg_ != false, 0, NULL, 0, 1, bd);
+        get_conv_params_no_round(avg_ != false, 0, nullptr, 0, 1, bd);
 
     delete image_;
     image_ = new TestImage<SrcPixel>(width_, height_, bd_);
diff --git a/test/av1_convolve_test.cc b/test/av1_convolve_test.cc
index 9ebe932..ebe3dfc 100644
--- a/test/av1_convolve_test.cc
+++ b/test/av1_convolve_test.cc
@@ -352,13 +352,15 @@
 
     const InterpFilterParams *filter_params_x =
         av1_get_interp_filter_params_with_block_size(filter, width);
-    ConvolveParams conv_params1 = get_conv_params_no_round(0, 0, NULL, 0, 0, 8);
+    ConvolveParams conv_params1 =
+        get_conv_params_no_round(0, 0, nullptr, 0, 0, 8);
     const uint8_t *input = FirstRandomInput8(GetParam());
     DECLARE_ALIGNED(32, uint8_t, reference[MAX_SB_SQUARE]);
     av1_convolve_x_sr_c(input, width, reference, kOutputStride, width, height,
                         filter_params_x, sub_x, &conv_params1);
 
-    ConvolveParams conv_params2 = get_conv_params_no_round(0, 0, NULL, 0, 0, 8);
+    ConvolveParams conv_params2 =
+        get_conv_params_no_round(0, 0, nullptr, 0, 0, 8);
     convolve_x_func test_func = GetParam().TestFunction();
     DECLARE_ALIGNED(32, uint8_t, test[MAX_SB_SQUARE]);
     test_func(input, width, test, kOutputStride, width, height, filter_params_x,
@@ -373,7 +375,8 @@
 
     const InterpFilterParams *filter_params_x =
         av1_get_interp_filter_params_with_block_size(filter, width);
-    ConvolveParams conv_params1 = get_conv_params_no_round(0, 0, NULL, 0, 0, 8);
+    ConvolveParams conv_params1 =
+        get_conv_params_no_round(0, 0, nullptr, 0, 0, 8);
     const uint8_t *input = FirstRandomInput8(GetParam());
     DECLARE_ALIGNED(32, uint8_t, reference[MAX_SB_SQUARE]);
 
@@ -385,7 +388,8 @@
     }
     aom_usec_timer_mark(&timer);
     const double time1 = static_cast<double>(aom_usec_timer_elapsed(&timer));
-    ConvolveParams conv_params2 = get_conv_params_no_round(0, 0, NULL, 0, 0, 8);
+    ConvolveParams conv_params2 =
+        get_conv_params_no_round(0, 0, nullptr, 0, 0, 8);
     convolve_x_func test_func = GetParam().TestFunction();
     DECLARE_ALIGNED(32, uint8_t, test[MAX_SB_SQUARE]);
 
@@ -461,7 +465,7 @@
     const InterpFilterParams *filter_params_x =
         av1_get_interp_filter_params_with_block_size(filter, width);
     ConvolveParams conv_params1 =
-        get_conv_params_no_round(0, 0, NULL, 0, 0, bit_depth);
+        get_conv_params_no_round(0, 0, nullptr, 0, 0, bit_depth);
     const uint16_t *input = FirstRandomInput16(GetParam());
     DECLARE_ALIGNED(32, uint16_t, reference[MAX_SB_SQUARE]);
     av1_highbd_convolve_x_sr(input, width, reference, kOutputStride, width,
@@ -469,7 +473,7 @@
                              bit_depth);
 
     ConvolveParams conv_params2 =
-        get_conv_params_no_round(0, 0, NULL, 0, 0, bit_depth);
+        get_conv_params_no_round(0, 0, nullptr, 0, 0, bit_depth);
     DECLARE_ALIGNED(32, uint16_t, test[MAX_SB_SQUARE]);
     GetParam().TestFunction()(input, width, test, kOutputStride, width, height,
                               filter_params_x, sub_x, &conv_params2, bit_depth);
@@ -483,7 +487,8 @@
     const int bit_depth = GetParam().BitDepth();
     const InterpFilterParams *filter_params_x =
         av1_get_interp_filter_params_with_block_size(filter, width);
-    ConvolveParams conv_params1 = get_conv_params_no_round(0, 0, NULL, 0, 0, 8);
+    ConvolveParams conv_params1 =
+        get_conv_params_no_round(0, 0, nullptr, 0, 0, 8);
     const uint16_t *input = FirstRandomInput16(GetParam());
     DECLARE_ALIGNED(32, uint16_t, reference[MAX_SB_SQUARE]);
 
@@ -496,7 +501,8 @@
     }
     aom_usec_timer_mark(&timer);
     const double time1 = static_cast<double>(aom_usec_timer_elapsed(&timer));
-    ConvolveParams conv_params2 = get_conv_params_no_round(0, 0, NULL, 0, 0, 8);
+    ConvolveParams conv_params2 =
+        get_conv_params_no_round(0, 0, nullptr, 0, 0, 8);
     highbd_convolve_x_func test_func = GetParam().TestFunction();
     DECLARE_ALIGNED(32, uint16_t, test[MAX_SB_SQUARE]);
 
@@ -878,12 +884,14 @@
         av1_get_interp_filter_params_with_block_size(v_f, height);
     const uint8_t *input = FirstRandomInput8(GetParam());
     DECLARE_ALIGNED(32, uint8_t, reference[MAX_SB_SQUARE]);
-    ConvolveParams conv_params1 = get_conv_params_no_round(0, 0, NULL, 0, 0, 8);
+    ConvolveParams conv_params1 =
+        get_conv_params_no_round(0, 0, nullptr, 0, 0, 8);
     av1_convolve_2d_sr_c(input, width, reference, kOutputStride, width, height,
                          filter_params_x, filter_params_y, sub_x, sub_y,
                          &conv_params1);
     DECLARE_ALIGNED(32, uint8_t, test[MAX_SB_SQUARE]);
-    ConvolveParams conv_params2 = get_conv_params_no_round(0, 0, NULL, 0, 0, 8);
+    ConvolveParams conv_params2 =
+        get_conv_params_no_round(0, 0, nullptr, 0, 0, 8);
     GetParam().TestFunction()(input, width, test, kOutputStride, width, height,
                               filter_params_x, filter_params_y, sub_x, sub_y,
                               &conv_params2);
@@ -901,7 +909,8 @@
         av1_get_interp_filter_params_with_block_size(v_f, height);
     const uint8_t *input = FirstRandomInput8(GetParam());
     DECLARE_ALIGNED(32, uint8_t, reference[MAX_SB_SQUARE]);
-    ConvolveParams conv_params1 = get_conv_params_no_round(0, 0, NULL, 0, 0, 8);
+    ConvolveParams conv_params1 =
+        get_conv_params_no_round(0, 0, nullptr, 0, 0, 8);
     aom_usec_timer timer;
     aom_usec_timer_start(&timer);
     for (int i = 0; i < num_iters; ++i) {
@@ -912,7 +921,8 @@
     aom_usec_timer_mark(&timer);
     const double time1 = static_cast<double>(aom_usec_timer_elapsed(&timer));
     DECLARE_ALIGNED(32, uint8_t, test[MAX_SB_SQUARE]);
-    ConvolveParams conv_params2 = get_conv_params_no_round(0, 0, NULL, 0, 0, 8);
+    ConvolveParams conv_params2 =
+        get_conv_params_no_round(0, 0, nullptr, 0, 0, 8);
     aom_usec_timer_start(&timer);
     for (int i = 0; i < num_iters; ++i) {
       GetParam().TestFunction()(input, width, test, kOutputStride, width,
@@ -1004,13 +1014,13 @@
     const uint16_t *input = FirstRandomInput16(GetParam());
     DECLARE_ALIGNED(32, uint16_t, reference[MAX_SB_SQUARE]);
     ConvolveParams conv_params1 =
-        get_conv_params_no_round(0, 0, NULL, 0, 0, bit_depth);
+        get_conv_params_no_round(0, 0, nullptr, 0, 0, bit_depth);
     av1_highbd_convolve_2d_sr(input, width, reference, kOutputStride, width,
                               height, filter_params_x, filter_params_y, sub_x,
                               sub_y, &conv_params1, bit_depth);
     DECLARE_ALIGNED(32, uint16_t, test[MAX_SB_SQUARE]);
     ConvolveParams conv_params2 =
-        get_conv_params_no_round(0, 0, NULL, 0, 0, bit_depth);
+        get_conv_params_no_round(0, 0, nullptr, 0, 0, bit_depth);
     GetParam().TestFunction()(input, width, test, kOutputStride, width, height,
                               filter_params_x, filter_params_y, sub_x, sub_y,
                               &conv_params2, bit_depth);
@@ -1028,7 +1038,8 @@
         av1_get_interp_filter_params_with_block_size(v_f, height);
     const uint16_t *input = FirstRandomInput16(GetParam());
     DECLARE_ALIGNED(32, uint16_t, reference[MAX_SB_SQUARE]);
-    ConvolveParams conv_params1 = get_conv_params_no_round(0, 0, NULL, 0, 0, 8);
+    ConvolveParams conv_params1 =
+        get_conv_params_no_round(0, 0, nullptr, 0, 0, 8);
     aom_usec_timer timer;
     aom_usec_timer_start(&timer);
     for (int i = 0; i < num_iters; ++i) {
@@ -1039,7 +1050,8 @@
     aom_usec_timer_mark(&timer);
     const double time1 = static_cast<double>(aom_usec_timer_elapsed(&timer));
     DECLARE_ALIGNED(32, uint16_t, test[MAX_SB_SQUARE]);
-    ConvolveParams conv_params2 = get_conv_params_no_round(0, 0, NULL, 0, 0, 8);
+    ConvolveParams conv_params2 =
+        get_conv_params_no_round(0, 0, nullptr, 0, 0, 8);
     aom_usec_timer_start(&timer);
     for (int i = 0; i < num_iters; ++i) {
       GetParam().TestFunction()(input, width, test, kOutputStride, width,
diff --git a/test/av1_fwd_txfm1d_test.cc b/test/av1_fwd_txfm1d_test.cc
index 5247d76..df504ea 100644
--- a/test/av1_fwd_txfm1d_test.cc
+++ b/test/av1_fwd_txfm1d_test.cc
@@ -36,8 +36,8 @@
   { av1_fdct4, av1_fadst4, av1_fidentity4_c },
   { av1_fdct8, av1_fadst8, av1_fidentity8_c },
   { av1_fdct16, av1_fadst16, av1_fidentity16_c },
-  { av1_fdct32, NULL, av1_fidentity32_c },
-  { av1_fdct64, NULL, NULL },
+  { av1_fdct32, nullptr, av1_fidentity32_c },
+  { av1_fdct64, nullptr, nullptr },
 };
 
 // the maximum stage number of fwd/inv 1d dct/adst txfm is 12
@@ -83,7 +83,7 @@
       int max_error = 7;
 
       const int count_test_block = 5000;
-      if (fwd_txfm_func != NULL) {
+      if (fwd_txfm_func != nullptr) {
         for (int ti = 0; ti < count_test_block; ++ti) {
           for (int ni = 0; ni < txfm_size; ++ni) {
             input[ni] = rnd.Rand16() % input_base - rnd.Rand16() % input_base;
diff --git a/test/av1_fwd_txfm2d_test.cc b/test/av1_fwd_txfm2d_test.cc
index 8496937..525e0cc 100644
--- a/test/av1_fwd_txfm2d_test.cc
+++ b/test/av1_fwd_txfm2d_test.cc
@@ -252,7 +252,7 @@
     }
 
     FwdTxfm2dFunc ref_func = libaom_test::fwd_txfm_func_ls[tx_size];
-    if (ref_func != NULL) {
+    if (ref_func != nullptr) {
       DECLARE_ALIGNED(32, int16_t, input[64 * 64]) = { 0 };
       DECLARE_ALIGNED(32, int32_t, output[64 * 64]);
       DECLARE_ALIGNED(32, int32_t, ref_output[64 * 64]);
@@ -309,7 +309,7 @@
       }
 
       FwdTxfm2dFunc ref_func = libaom_test::fwd_txfm_func_ls[tx_size];
-      if (ref_func != NULL) {
+      if (ref_func != nullptr) {
         DECLARE_ALIGNED(32, int16_t, input[64 * 64]) = { 0 };
         DECLARE_ALIGNED(32, int32_t, output[64 * 64]);
         DECLARE_ALIGNED(32, int32_t, ref_output[64 * 64]);
@@ -528,7 +528,7 @@
       }
 
       FwdTxfm2dFunc ref_func = libaom_test::fwd_txfm_func_ls[tx_size];
-      if (ref_func != NULL) {
+      if (ref_func != nullptr) {
         DECLARE_ALIGNED(32, int16_t, input[64 * 64]) = { 0 };
         DECLARE_ALIGNED(32, int32_t, output[64 * 64]);
         DECLARE_ALIGNED(32, int32_t, ref_output[64 * 64]);
@@ -589,7 +589,7 @@
       }
 
       FwdTxfm2dFunc ref_func = libaom_test::fwd_txfm_func_ls[tx_size];
-      if (ref_func != NULL) {
+      if (ref_func != nullptr) {
         DECLARE_ALIGNED(32, int16_t, input[64 * 64]) = { 0 };
         DECLARE_ALIGNED(32, int32_t, output[64 * 64]);
         DECLARE_ALIGNED(32, int32_t, ref_output[64 * 64]);
diff --git a/test/av1_horz_only_frame_superres_test.cc b/test/av1_horz_only_frame_superres_test.cc
index d15924d..f503b63 100644
--- a/test/av1_horz_only_frame_superres_test.cc
+++ b/test/av1_horz_only_frame_superres_test.cc
@@ -47,7 +47,7 @@
     assert(0 <= x0_ && x0_ <= RS_SCALE_SUBPEL_MASK);
 
     w_dst_ = w_src_;
-    av1_calculate_unscaled_superres_size(&w_dst_, NULL, superres_denom);
+    av1_calculate_unscaled_superres_size(&w_dst_, nullptr, superres_denom);
 
     src_stride_ = ALIGN_POWER_OF_TWO(w_src_ + 2 * kHPad, 4);
     dst_stride_ = ALIGN_POWER_OF_TWO(w_dst_ + 2 * kHPad, 4);
@@ -161,7 +161,7 @@
 template <typename Pixel>
 class ConvolveHorizRSTestBase : public ::testing::Test {
  public:
-  ConvolveHorizRSTestBase() : image_(NULL) {}
+  ConvolveHorizRSTestBase() : image_(nullptr) {}
   virtual ~ConvolveHorizRSTestBase() {}
   virtual void TearDown() {}
 
diff --git a/test/av1_inv_txfm1d_test.cc b/test/av1_inv_txfm1d_test.cc
index 01d4a4d..ab8a6f8 100644
--- a/test/av1_inv_txfm1d_test.cc
+++ b/test/av1_inv_txfm1d_test.cc
@@ -27,14 +27,14 @@
 
 const TxfmFunc fwd_txfm_func_ls[][txfm_type_num] = {
   { av1_fdct4, av1_fadst4 },   { av1_fdct8, av1_fadst8 },
-  { av1_fdct16, av1_fadst16 }, { av1_fdct32, NULL },
-  { av1_fdct64, NULL },
+  { av1_fdct16, av1_fadst16 }, { av1_fdct32, nullptr },
+  { av1_fdct64, nullptr },
 };
 
 const TxfmFunc inv_txfm_func_ls[][txfm_type_num] = {
   { av1_idct4, av1_iadst4 },   { av1_idct8, av1_iadst8 },
-  { av1_idct16, av1_iadst16 }, { av1_idct32, NULL },
-  { av1_idct64, NULL },
+  { av1_idct16, av1_iadst16 }, { av1_idct32, nullptr },
+  { av1_idct64, nullptr },
 };
 
 // the maximum stage number of fwd/inv 1d dct/adst txfm is 12
diff --git a/test/av1_inv_txfm2d_test.cc b/test/av1_inv_txfm2d_test.cc
index d14acfe..e13350a 100644
--- a/test/av1_inv_txfm2d_test.cc
+++ b/test/av1_inv_txfm2d_test.cc
@@ -278,7 +278,7 @@
                                           int run_times, int gt_int16) {
   FwdTxfm2dFunc fwd_func_ = libaom_test::fwd_txfm_func_ls[tx_size];
   InvTxfm2dFunc ref_func_ = libaom_test::inv_txfm_func_ls[tx_size];
-  if (fwd_func_ == NULL || ref_func_ == NULL || target_func_ == NULL) {
+  if (fwd_func_ == nullptr || ref_func_ == nullptr || target_func_ == nullptr) {
     return;
   }
   const int bd = 8;
diff --git a/test/av1_quantize_test.cc b/test/av1_quantize_test.cc
index ce1311d..731e99c 100644
--- a/test/av1_quantize_test.cc
+++ b/test/av1_quantize_test.cc
@@ -30,8 +30,8 @@
     const int16_t *scan, const int16_t *iscan, int log_scale);
 
 struct QuantizeFuncParams {
-  QuantizeFuncParams(QuantizeFpFunc qF = NULL, QuantizeFpFunc qRefF = NULL,
-                     int count = 16)
+  QuantizeFuncParams(QuantizeFpFunc qF = nullptr,
+                     QuantizeFpFunc qRefF = nullptr, int count = 16)
       : qFunc(qF), qFuncRef(qRefF), coeffCount(count) {}
   QuantizeFpFunc qFunc;
   QuantizeFpFunc qFuncRef;
diff --git a/test/avg_test.cc b/test/avg_test.cc
index ca24c9b..b12d1ef 100644
--- a/test/avg_test.cc
+++ b/test/avg_test.cc
@@ -32,12 +32,12 @@
 class AverageTestBase : public ::testing::Test {
  public:
   AverageTestBase(int width, int height, int bit_depth = 8)
-      : width_(width), height_(height), source_data_(NULL), source_stride_(0),
-        bit_depth_(bit_depth) {}
+      : width_(width), height_(height), source_data_(nullptr),
+        source_stride_(0), bit_depth_(bit_depth) {}
 
   virtual void TearDown() {
     aom_free(source_data_);
-    source_data_ = NULL;
+    source_data_ = nullptr;
   }
 
  protected:
@@ -353,7 +353,8 @@
                       public ::testing::WithParamInterface<IntProRowParam> {
  public:
   IntProRowTest()
-      : AverageTestBase(16, GET_PARAM(0)), hbuf_asm_(NULL), hbuf_c_(NULL) {
+      : AverageTestBase(16, GET_PARAM(0)), hbuf_asm_(nullptr),
+        hbuf_c_(nullptr) {
     asm_func_ = GET_PARAM(1);
     c_func_ = GET_PARAM(2);
   }
@@ -374,11 +375,11 @@
 
   virtual void TearDown() {
     aom_free(source_data_);
-    source_data_ = NULL;
+    source_data_ = nullptr;
     aom_free(hbuf_c_);
-    hbuf_c_ = NULL;
+    hbuf_c_ = nullptr;
     aom_free(hbuf_asm_);
-    hbuf_asm_ = NULL;
+    hbuf_asm_ = nullptr;
   }
 
   void RunComparison() {
@@ -544,9 +545,9 @@
   }
   virtual void TearDown() {
     aom_free(ref_vector);
-    ref_vector = NULL;
+    ref_vector = nullptr;
     aom_free(src_vector);
-    src_vector = NULL;
+    src_vector = nullptr;
   }
 
   void FillConstant(int16_t fill_constant_ref, int16_t fill_constant_src) {
diff --git a/test/blend_a64_mask_test.cc b/test/blend_a64_mask_test.cc
index fc45664..9dece57 100644
--- a/test/blend_a64_mask_test.cc
+++ b/test/blend_a64_mask_test.cc
@@ -525,7 +525,7 @@
 };
 
 TEST_P(BlendA64MaskTestHBD_d16, RandomValues) {
-  if (params_.tst_func == NULL) return;
+  if (params_.tst_func == nullptr) return;
   for (int iter = 0; iter < kIterations && !HasFatalFailure(); ++iter) {
     int bsize = rng_.Rand8() % BLOCK_SIZES_ALL;
     switch (rng_(3)) {
@@ -592,9 +592,9 @@
   }
 }
 
-INSTANTIATE_TEST_SUITE_P(
-    C, BlendA64MaskTestHBD_d16,
-    ::testing::Values(TestFuncsHBD_d16(aom_highbd_blend_a64_d16_mask_c, NULL)));
+INSTANTIATE_TEST_SUITE_P(C, BlendA64MaskTestHBD_d16,
+                         ::testing::Values(TestFuncsHBD_d16(
+                             aom_highbd_blend_a64_d16_mask_c, nullptr)));
 
 #if HAVE_SSE4_1
 INSTANTIATE_TEST_SUITE_P(
diff --git a/test/boolcoder_test.cc b/test/boolcoder_test.cc
index 680ec18..17a9aa7 100644
--- a/test/boolcoder_test.cc
+++ b/test/boolcoder_test.cc
@@ -77,7 +77,7 @@
           } else if (bit_method == 3) {
             bit = bit_rnd(2);
           }
-          GTEST_ASSERT_EQ(aom_read(&br, probas[i], NULL), bit)
+          GTEST_ASSERT_EQ(aom_read(&br, probas[i], nullptr), bit)
               << "pos: " << i << " / " << kBitsToTest
               << " bit_method: " << bit_method << " method: " << method;
         }
@@ -110,7 +110,7 @@
     GTEST_ASSERT_LE(aom_reader_tell(&br), 1u);
     ASSERT_FALSE(aom_reader_has_overflowed(&br));
     for (int i = 0; i < kSymbols; i++) {
-      aom_read(&br, p, NULL);
+      aom_read(&br, p, nullptr);
       uint32_t tell = aom_reader_tell(&br);
       uint32_t tell_frac = aom_reader_tell_frac(&br);
       GTEST_ASSERT_GE(tell, last_tell)
@@ -151,7 +151,7 @@
     aom_reader_init(&br, bw_buffer, bw.pos);
     ASSERT_FALSE(aom_reader_has_overflowed(&br));
     for (int i = 0; i < kSymbols; i++) {
-      GTEST_ASSERT_EQ(aom_read(&br, p, NULL), 1);
+      GTEST_ASSERT_EQ(aom_read(&br, p, nullptr), 1);
       ASSERT_FALSE(aom_reader_has_overflowed(&br));
     }
     // In the worst case, the encoder uses just a tiny fraction of the last
@@ -166,7 +166,7 @@
     // bound. In practice we are not guaranteed to hit the worse case and can
     // get away with 174 calls.
     for (int i = 0; i < 174; i++) {
-      aom_read(&br, p, NULL);
+      aom_read(&br, p, nullptr);
     }
     ASSERT_TRUE(aom_reader_has_overflowed(&br));
   }
diff --git a/test/cnn_test.cc b/test/cnn_test.cc
index 0b92197..96bb9e35 100644
--- a/test/cnn_test.cc
+++ b/test/cnn_test.cc
@@ -322,7 +322,7 @@
   // of the offset.
   AssignLayerWeightsBiases(&cnn_config, weights, bias);
 
-  CNN_THREAD_DATA thread_data = { 1, NULL };
+  CNN_THREAD_DATA thread_data = { 1, nullptr };
 
   RunCNNTest(image_width, image_height, input, expected_same, &cnn_config,
              image_width, &thread_data, MSE_INT_TOL);
@@ -399,7 +399,7 @@
                                 0,
                             } } };
 
-  CNN_THREAD_DATA thread_data = { 1, NULL };
+  CNN_THREAD_DATA thread_data = { 1, nullptr };
 
   RunCNNTest(image_width, image_height, input, expected_same, &cnn_config,
              image_width, &thread_data, MSE_INT_TOL);
@@ -481,7 +481,7 @@
     41, -26, 5, 76, 13, 83, -21, 53, -54, -14, 21, 121,
   };
 
-  CNN_THREAD_DATA thread_data = { 1, NULL };
+  CNN_THREAD_DATA thread_data = { 1, nullptr };
 
   RunCNNTest(image_width, image_height, input, expected_1, &cnn_config,
              image_width, &thread_data, MSE_INT_TOL);
@@ -565,7 +565,7 @@
                                 0,
                             } } };
 
-  CNN_THREAD_DATA thread_data = { 1, NULL };
+  CNN_THREAD_DATA thread_data = { 1, nullptr };
 
   RunCNNTest(image_width, image_height, input, expected, &cnn_config,
              image_width, &thread_data, MSE_INT_TOL);
@@ -645,7 +645,7 @@
                                 0,
                             } } };
 
-  CNN_THREAD_DATA thread_data = { 1, NULL };
+  CNN_THREAD_DATA thread_data = { 1, nullptr };
 
   RunCNNTest(image_width, image_height, input, expected_1_same, &cnn_config,
              image_width, &thread_data, MSE_INT_TOL);
@@ -921,7 +921,7 @@
   int image_height = 10;
   int image_width = 11;
 
-  CNN_THREAD_DATA thread_data = { 1, NULL };
+  CNN_THREAD_DATA thread_data = { 1, nullptr };
 
   RunCNNTest(image_width, image_height, input_10x11, expected_10x11,
              &cnn_config, image_width, &thread_data, MSE_INT_TOL);
@@ -1070,7 +1070,7 @@
                                 0,
                             } } };
 
-  CNN_THREAD_DATA thread_data = { 1, NULL };
+  CNN_THREAD_DATA thread_data = { 1, nullptr };
 
   RunCNNTest(image_width, image_height, input, expected_same, &cnn_config,
              image_width, &thread_data, MSE_FLOAT_TOL);
@@ -1256,7 +1256,7 @@
   // of the offset.
   AssignLayerWeightsBiases(&cnn_config, weights, bias);
 
-  CNN_THREAD_DATA thread_data = { 1, NULL };
+  CNN_THREAD_DATA thread_data = { 1, nullptr };
 
   RunCNNTest(image_width, image_height, input, expected, &cnn_config,
              image_width, &thread_data, MSE_INT_TOL);
@@ -1432,7 +1432,7 @@
   // of the offset.
   AssignLayerWeightsBiases(&cnn_config, weights, bias);
 
-  CNN_THREAD_DATA thread_data = { 1, NULL };
+  CNN_THREAD_DATA thread_data = { 1, nullptr };
 
   RunCNNTest(image_width, image_height, input, expected, &cnn_config,
              image_width, &thread_data, MSE_INT_TOL);
@@ -1709,7 +1709,7 @@
   // of the offset.
   AssignLayerWeightsBiases(&cnn_config, weights, bias);
 
-  CNN_THREAD_DATA thread_data = { 1, NULL };
+  CNN_THREAD_DATA thread_data = { 1, nullptr };
 
   RunCNNTest(image_width, image_height, input, expected, &cnn_config,
              image_width, &thread_data, MSE_INT_TOL);
@@ -1824,7 +1824,7 @@
   // of the offset.
   AssignLayerWeightsBiases(&cnn_config, weights, bias);
 
-  CNN_THREAD_DATA thread_data = { 1, NULL };
+  CNN_THREAD_DATA thread_data = { 1, nullptr };
 
   RunCNNTest(image_width, image_height, input, expected, &cnn_config,
              image_width, &thread_data, MSE_INT_TOL);
@@ -1932,7 +1932,7 @@
   // of the offset.
   AssignLayerWeightsBiases(&cnn_config, weights, bias);
 
-  CNN_THREAD_DATA thread_data = { 1, NULL };
+  CNN_THREAD_DATA thread_data = { 1, nullptr };
 
   RunCNNTest(image_width, image_height, input, expected, &cnn_config,
              image_width, &thread_data, MSE_FLOAT_TOL);
@@ -2162,7 +2162,7 @@
     },
   };
 
-  CNN_THREAD_DATA thread_data = { 1, NULL };
+  CNN_THREAD_DATA thread_data = { 1, nullptr };
 
   RunCNNTest(image_width, image_height, input, expected, &cnn_config,
              image_width, &thread_data, MSE_FLOAT_TOL);
@@ -2227,7 +2227,7 @@
     },
   };
 
-  CNN_THREAD_DATA thread_data = { 1, NULL };
+  CNN_THREAD_DATA thread_data = { 1, nullptr };
 
   RunCNNTest(image_width, image_height, input, expected, &cnn_config,
              image_width, &thread_data, MSE_FLOAT_TOL);
@@ -2474,7 +2474,7 @@
     },
   };
 
-  CNN_THREAD_DATA thread_data = { 1, NULL };
+  CNN_THREAD_DATA thread_data = { 1, nullptr };
 
   const int num_outputs = 4;
   const int output_chs[4] = { filter_dim, filter_dim, filter_dim,
diff --git a/test/codec_factory.h b/test/codec_factory.h
index 5ceb70b..931b39a 100644
--- a/test/codec_factory.h
+++ b/test/codec_factory.h
@@ -94,7 +94,7 @@
 #if CONFIG_AV1_DECODER
     return aom_codec_av1_dx();
 #else
-    return NULL;
+    return nullptr;
 #endif
   }
 };
@@ -110,7 +110,7 @@
 #if CONFIG_AV1_ENCODER
     return aom_codec_av1_cx();
 #else
-    return NULL;
+    return nullptr;
 #endif
   }
 };
@@ -130,7 +130,7 @@
 #else
     (void)cfg;
     (void)flags;
-    return NULL;
+    return nullptr;
 #endif
   }
 
@@ -143,7 +143,7 @@
     (void)cfg;
     (void)init_flags;
     (void)stats;
-    return NULL;
+    return nullptr;
 #endif
   }
 
diff --git a/test/coding_path_sync.cc b/test/coding_path_sync.cc
index 0eaa9da..c3e51fd 100644
--- a/test/coding_path_sync.cc
+++ b/test/coding_path_sync.cc
@@ -98,9 +98,9 @@
     aom_img_wrap(&img, format_, width_, height_, 0, buf);
     aom_codec_encode(&enc_, &img, frame_count_++, 1, 0);
 
-    aom_codec_iter_t iter = NULL;
+    aom_codec_iter_t iter = nullptr;
 
-    const aom_codec_cx_pkt_t *pkt = NULL;
+    const aom_codec_cx_pkt_t *pkt = nullptr;
 
     do {
       pkt = aom_codec_get_cx_data(&enc_, &iter);
@@ -157,9 +157,9 @@
 
   std::vector<int16_t> decode(const aom_codec_cx_pkt_t *pkt) {
     aom_codec_decode(&dec_, static_cast<uint8_t *>(pkt->data.frame.buf),
-                     pkt->data.frame.sz, NULL);
+                     pkt->data.frame.sz, nullptr);
 
-    aom_codec_iter_t iter = NULL;
+    aom_codec_iter_t iter = nullptr;
     return Serialize(aom_codec_get_frame(&dec_, &iter));
   }
 
diff --git a/test/comp_avg_pred_test.h b/test/comp_avg_pred_test.h
index 312f3d4..c1526d8 100644
--- a/test/comp_avg_pred_test.h
+++ b/test/comp_avg_pred_test.h
@@ -232,11 +232,11 @@
               const int offset_c = 3 + rnd_.PseudoUniform(w - in_w - 7);
 
               aom_dist_wtd_comp_avg_upsampled_pred_c(
-                  NULL, NULL, 0, 0, NULL, output,
+                  nullptr, nullptr, 0, 0, nullptr, output,
                   pred8 + offset_r * w + offset_c, in_w, in_h, sub_x_q3,
                   sub_y_q3, ref8 + offset_r * w + offset_c, in_w,
                   &dist_wtd_comp_params, subpel_search);
-              test_impl(NULL, NULL, 0, 0, NULL, output2,
+              test_impl(nullptr, nullptr, 0, 0, nullptr, output2,
                         pred8 + offset_r * w + offset_c, in_w, in_h, sub_x_q3,
                         sub_y_q3, ref8 + offset_r * w + offset_c, in_w,
                         &dist_wtd_comp_params, subpel_search);
@@ -292,8 +292,8 @@
 
     for (int i = 0; i < num_loops; ++i)
       aom_dist_wtd_comp_avg_upsampled_pred_c(
-          NULL, NULL, 0, 0, NULL, output, pred8, in_w, in_h, sub_x_q3, sub_y_q3,
-          ref8, in_w, &dist_wtd_comp_params, subpel_search);
+          nullptr, nullptr, 0, 0, nullptr, output, pred8, in_w, in_h, sub_x_q3,
+          sub_y_q3, ref8, in_w, &dist_wtd_comp_params, subpel_search);
 
     aom_usec_timer_mark(&timer);
     const int elapsed_time = static_cast<int>(aom_usec_timer_elapsed(&timer));
@@ -304,8 +304,9 @@
     aom_usec_timer_start(&timer1);
 
     for (int i = 0; i < num_loops; ++i)
-      test_impl(NULL, NULL, 0, 0, NULL, output2, pred8, in_w, in_h, sub_x_q3,
-                sub_y_q3, ref8, in_w, &dist_wtd_comp_params, subpel_search);
+      test_impl(nullptr, nullptr, 0, 0, nullptr, output2, pred8, in_w, in_h,
+                sub_x_q3, sub_y_q3, ref8, in_w, &dist_wtd_comp_params,
+                subpel_search);
 
     aom_usec_timer_mark(&timer1);
     const int elapsed_time1 = static_cast<int>(aom_usec_timer_elapsed(&timer1));
@@ -468,12 +469,13 @@
               const int offset_c = 3 + rnd_.PseudoUniform(w - in_w - 7);
 
               aom_highbd_dist_wtd_comp_avg_upsampled_pred_c(
-                  NULL, NULL, 0, 0, NULL, CONVERT_TO_BYTEPTR(output),
+                  nullptr, nullptr, 0, 0, nullptr, CONVERT_TO_BYTEPTR(output),
                   CONVERT_TO_BYTEPTR(pred8) + offset_r * w + offset_c, in_w,
                   in_h, sub_x_q3, sub_y_q3,
                   CONVERT_TO_BYTEPTR(ref8) + offset_r * w + offset_c, in_w, bd,
                   &dist_wtd_comp_params, subpel_search);
-              test_impl(NULL, NULL, 0, 0, NULL, CONVERT_TO_BYTEPTR(output2),
+              test_impl(nullptr, nullptr, 0, 0, nullptr,
+                        CONVERT_TO_BYTEPTR(output2),
                         CONVERT_TO_BYTEPTR(pred8) + offset_r * w + offset_c,
                         in_w, in_h, sub_x_q3, sub_y_q3,
                         CONVERT_TO_BYTEPTR(ref8) + offset_r * w + offset_c,
@@ -527,7 +529,7 @@
     int subpel_search = USE_8_TAPS;  // set to USE_4_TAPS to test 4-tap filter.
     for (int i = 0; i < num_loops; ++i)
       aom_highbd_dist_wtd_comp_avg_upsampled_pred_c(
-          NULL, NULL, 0, 0, NULL, CONVERT_TO_BYTEPTR(output),
+          nullptr, nullptr, 0, 0, nullptr, CONVERT_TO_BYTEPTR(output),
           CONVERT_TO_BYTEPTR(pred8), in_w, in_h, sub_x_q3, sub_y_q3,
           CONVERT_TO_BYTEPTR(ref8), in_w, bd, &dist_wtd_comp_params,
           subpel_search);
@@ -541,7 +543,7 @@
     aom_usec_timer_start(&timer1);
 
     for (int i = 0; i < num_loops; ++i)
-      test_impl(NULL, NULL, 0, 0, NULL, CONVERT_TO_BYTEPTR(output2),
+      test_impl(nullptr, nullptr, 0, 0, nullptr, CONVERT_TO_BYTEPTR(output2),
                 CONVERT_TO_BYTEPTR(pred8), in_w, in_h, sub_x_q3, sub_y_q3,
                 CONVERT_TO_BYTEPTR(ref8), in_w, bd, &dist_wtd_comp_params,
                 subpel_search);
diff --git a/test/comp_mask_variance_test.cc b/test/comp_mask_variance_test.cc
index 4c2cba4..f958c5d 100644
--- a/test/comp_mask_variance_test.cc
+++ b/test/comp_mask_variance_test.cc
@@ -208,13 +208,13 @@
 
         // ref
         aom_comp_mask_upsampled_pred_c(
-            NULL, NULL, 0, 0, NULL, comp_pred1_, pred_, w, h, subx, suby, ref_,
-            MAX_SB_SIZE, mask, w, inv, subpel_search);
+            nullptr, nullptr, 0, 0, nullptr, comp_pred1_, pred_, w, h, subx,
+            suby, ref_, MAX_SB_SIZE, mask, w, inv, subpel_search);
 
         aom_comp_mask_pred = test_impl;  // test
-        aom_comp_mask_upsampled_pred(NULL, NULL, 0, 0, NULL, comp_pred2_, pred_,
-                                     w, h, subx, suby, ref_, MAX_SB_SIZE, mask,
-                                     w, inv, subpel_search);
+        aom_comp_mask_upsampled_pred(nullptr, nullptr, 0, 0, nullptr,
+                                     comp_pred2_, pred_, w, h, subx, suby, ref_,
+                                     MAX_SB_SIZE, mask, w, inv, subpel_search);
         ASSERT_EQ(CheckResult(w, h), true)
             << " wedge " << wedge_index << " inv " << inv << "sub (" << subx
             << "," << suby << ")";
@@ -242,9 +242,9 @@
     aom_usec_timer_start(&timer);
     aom_comp_mask_pred = funcs[i];
     for (int j = 0; j < num_loops; ++j) {
-      aom_comp_mask_upsampled_pred(NULL, NULL, 0, 0, NULL, comp_pred1_, pred_,
-                                   w, h, subx, suby, ref_, MAX_SB_SIZE, mask, w,
-                                   0, subpel_search);
+      aom_comp_mask_upsampled_pred(nullptr, nullptr, 0, 0, nullptr, comp_pred1_,
+                                   pred_, w, h, subx, suby, ref_, MAX_SB_SIZE,
+                                   mask, w, 0, subpel_search);
     }
     aom_usec_timer_mark(&timer);
     double time = static_cast<double>(aom_usec_timer_elapsed(&timer));
@@ -489,18 +489,20 @@
             av1_get_contiguous_soft_mask(wedge_index, 1, bsize);
 
         // ref
-        aom_highbd_upsampled_pred_c(
-            NULL, NULL, 0, 0, NULL, CONVERT_TO_BYTEPTR(comp_pred1_), w, h, subx,
-            suby, CONVERT_TO_BYTEPTR(ref_), MAX_SB_SIZE, bd_, subpel_search);
+        aom_highbd_upsampled_pred_c(nullptr, nullptr, 0, 0, nullptr,
+                                    CONVERT_TO_BYTEPTR(comp_pred1_), w, h, subx,
+                                    suby, CONVERT_TO_BYTEPTR(ref_), MAX_SB_SIZE,
+                                    bd_, subpel_search);
 
         aom_highbd_comp_mask_pred_c(
             CONVERT_TO_BYTEPTR(comp_pred1_), CONVERT_TO_BYTEPTR(pred_), w, h,
             CONVERT_TO_BYTEPTR(comp_pred1_), w, mask, w, inv);
 
         // test
-        aom_highbd_upsampled_pred(
-            NULL, NULL, 0, 0, NULL, CONVERT_TO_BYTEPTR(comp_pred2_), w, h, subx,
-            suby, CONVERT_TO_BYTEPTR(ref_), MAX_SB_SIZE, bd_, subpel_search);
+        aom_highbd_upsampled_pred(nullptr, nullptr, 0, 0, nullptr,
+                                  CONVERT_TO_BYTEPTR(comp_pred2_), w, h, subx,
+                                  suby, CONVERT_TO_BYTEPTR(ref_), MAX_SB_SIZE,
+                                  bd_, subpel_search);
 
         aom_highbd_comp_mask_pred(
             CONVERT_TO_BYTEPTR(comp_pred2_), CONVERT_TO_BYTEPTR(pred_), w, h,
@@ -543,7 +545,7 @@
     int subpel_search = 2;  // set to 1 to test 4-tap filter.
     for (int j = 0; j < num_loops; ++j) {
       aom_highbd_comp_mask_upsampled_pred(
-          NULL, NULL, 0, 0, NULL, CONVERT_TO_BYTEPTR(comp_pred1_),
+          nullptr, nullptr, 0, 0, nullptr, CONVERT_TO_BYTEPTR(comp_pred1_),
           CONVERT_TO_BYTEPTR(pred_), w, h, subx, suby, CONVERT_TO_BYTEPTR(ref_),
           MAX_SB_SIZE, mask, w, 0, bd_, subpel_search);
     }
diff --git a/test/convolve_test.cc b/test/convolve_test.cc
index d5e3750..d5232ee 100644
--- a/test/convolve_test.cc
+++ b/test/convolve_test.cc
@@ -301,21 +301,21 @@
 
   static void TearDownTestSuite() {
     aom_free(input_ - 1);
-    input_ = NULL;
+    input_ = nullptr;
     aom_free(ref8_);
-    ref8_ = NULL;
+    ref8_ = nullptr;
     aom_free(output_);
-    output_ = NULL;
+    output_ = nullptr;
     aom_free(output_ref_);
-    output_ref_ = NULL;
+    output_ref_ = nullptr;
     aom_free(input16_ - 1);
-    input16_ = NULL;
+    input16_ = nullptr;
     aom_free(ref16_);
-    ref16_ = NULL;
+    ref16_ = nullptr;
     aom_free(output16_);
-    output16_ = NULL;
+    output16_ = nullptr;
     aom_free(output16_ref_);
-    output16_ref_ = NULL;
+    output16_ref_ = nullptr;
   }
 
  protected:
@@ -474,14 +474,14 @@
   int mask_;
 };
 
-uint8_t *ConvolveTest::input_ = NULL;
-uint8_t *ConvolveTest::ref8_ = NULL;
-uint8_t *ConvolveTest::output_ = NULL;
-uint8_t *ConvolveTest::output_ref_ = NULL;
-uint16_t *ConvolveTest::input16_ = NULL;
-uint16_t *ConvolveTest::ref16_ = NULL;
-uint16_t *ConvolveTest::output16_ = NULL;
-uint16_t *ConvolveTest::output16_ref_ = NULL;
+uint8_t *ConvolveTest::input_ = nullptr;
+uint8_t *ConvolveTest::ref8_ = nullptr;
+uint8_t *ConvolveTest::output_ = nullptr;
+uint8_t *ConvolveTest::output_ref_ = nullptr;
+uint16_t *ConvolveTest::input16_ = nullptr;
+uint16_t *ConvolveTest::ref16_ = nullptr;
+uint16_t *ConvolveTest::output16_ = nullptr;
+uint16_t *ConvolveTest::output16_ref_ = nullptr;
 
 TEST_P(ConvolveTest, GuardBlocks) { CheckGuardBlocks(); }
 
diff --git a/test/decode_api_test.cc b/test/decode_api_test.cc
index f3cf7cc..591a167 100644
--- a/test/decode_api_test.cc
+++ b/test/decode_api_test.cc
@@ -22,25 +22,30 @@
   uint8_t buf[1] = { 0 };
   aom_codec_ctx_t dec;
 
-  EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_dec_init(NULL, NULL, NULL, 0));
-  EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_dec_init(&dec, NULL, NULL, 0));
-  EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_decode(NULL, NULL, 0, NULL));
-  EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_decode(NULL, buf, 0, NULL));
   EXPECT_EQ(AOM_CODEC_INVALID_PARAM,
-            aom_codec_decode(NULL, buf, sizeof(buf), NULL));
+            aom_codec_dec_init(nullptr, nullptr, nullptr, 0));
   EXPECT_EQ(AOM_CODEC_INVALID_PARAM,
-            aom_codec_decode(NULL, NULL, sizeof(buf), NULL));
-  EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_destroy(NULL));
-  EXPECT_TRUE(aom_codec_error(NULL) != NULL);
-  EXPECT_TRUE(aom_codec_error_detail(NULL) == NULL);
+            aom_codec_dec_init(&dec, nullptr, nullptr, 0));
+  EXPECT_EQ(AOM_CODEC_INVALID_PARAM,
+            aom_codec_decode(nullptr, nullptr, 0, nullptr));
+  EXPECT_EQ(AOM_CODEC_INVALID_PARAM,
+            aom_codec_decode(nullptr, buf, 0, nullptr));
+  EXPECT_EQ(AOM_CODEC_INVALID_PARAM,
+            aom_codec_decode(nullptr, buf, sizeof(buf), nullptr));
+  EXPECT_EQ(AOM_CODEC_INVALID_PARAM,
+            aom_codec_decode(nullptr, nullptr, sizeof(buf), nullptr));
+  EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_destroy(nullptr));
+  EXPECT_NE(aom_codec_error(nullptr), nullptr);
+  EXPECT_EQ(aom_codec_error_detail(nullptr), nullptr);
 
   aom_codec_iface_t *iface = aom_codec_av1_dx();
-  EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_dec_init(NULL, iface, NULL, 0));
-
-  EXPECT_EQ(AOM_CODEC_OK, aom_codec_dec_init(&dec, iface, NULL, 0));
   EXPECT_EQ(AOM_CODEC_INVALID_PARAM,
-            aom_codec_decode(&dec, NULL, sizeof(buf), NULL));
-  EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_decode(&dec, buf, 0, NULL));
+            aom_codec_dec_init(nullptr, iface, nullptr, 0));
+
+  EXPECT_EQ(AOM_CODEC_OK, aom_codec_dec_init(&dec, iface, nullptr, 0));
+  EXPECT_EQ(AOM_CODEC_INVALID_PARAM,
+            aom_codec_decode(&dec, nullptr, sizeof(buf), nullptr));
+  EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_decode(&dec, buf, 0, nullptr));
 
   EXPECT_EQ(AOM_CODEC_OK, aom_codec_destroy(&dec));
 }
@@ -48,7 +53,7 @@
 TEST(DecodeAPI, InvalidControlId) {
   aom_codec_iface_t *iface = aom_codec_av1_dx();
   aom_codec_ctx_t dec;
-  EXPECT_EQ(AOM_CODEC_OK, aom_codec_dec_init(&dec, iface, NULL, 0));
+  EXPECT_EQ(AOM_CODEC_OK, aom_codec_dec_init(&dec, iface, nullptr, 0));
   EXPECT_EQ(AOM_CODEC_ERROR, aom_codec_control(&dec, -1, 0));
   EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_control(&dec, 0, 0));
   EXPECT_EQ(AOM_CODEC_OK, aom_codec_destroy(&dec));
diff --git a/test/decode_perf_test.cc b/test/decode_perf_test.cc
index 7c52cf2..900cb67 100644
--- a/test/decode_perf_test.cc
+++ b/test/decode_perf_test.cc
@@ -71,7 +71,7 @@
   aom_usec_timer t;
   aom_usec_timer_start(&t);
 
-  for (video.Begin(); video.cxdata() != NULL; video.Next()) {
+  for (video.Begin(); video.cxdata() != nullptr; video.Next()) {
     decoder.DecodeFrame(video.cxdata(), video.frame_size());
   }
 
@@ -139,11 +139,11 @@
   }
 
   virtual void EndPassHook() {
-    if (outfile_ != NULL) {
+    if (outfile_ != nullptr) {
       if (!fseek(outfile_, 0, SEEK_SET))
         ivf_write_file_header(outfile_, &cfg_, AV1_FOURCC, out_frames_);
       fclose(outfile_);
-      outfile_ = NULL;
+      outfile_ = nullptr;
     }
   }
 
@@ -220,7 +220,7 @@
   aom_usec_timer t;
   aom_usec_timer_start(&t);
 
-  for (decode_video.Begin(); decode_video.cxdata() != NULL;
+  for (decode_video.Begin(); decode_video.cxdata() != nullptr;
        decode_video.Next()) {
     decoder.DecodeFrame(decode_video.cxdata(), decode_video.frame_size());
   }
diff --git a/test/decode_test_driver.cc b/test/decode_test_driver.cc
index 246fc82..f44d670 100644
--- a/test/decode_test_driver.cc
+++ b/test/decode_test_driver.cc
@@ -27,7 +27,7 @@
 }
 
 aom_codec_err_t Decoder::DecodeFrame(const uint8_t *cxdata, size_t size) {
-  return DecodeFrame(cxdata, size, NULL);
+  return DecodeFrame(cxdata, size, nullptr);
 }
 
 aom_codec_err_t Decoder::DecodeFrame(const uint8_t *cxdata, size_t size,
@@ -68,7 +68,7 @@
     aom_codec_stream_info_t stream_info;
     stream_info.is_annexb = 0;
 
-    if (video->cxdata() != NULL) {
+    if (video->cxdata() != nullptr) {
       if (!peeked_stream) {
         // TODO(yaowu): PeekStream returns error for non-sequence_header_obu,
         // therefore should only be tried once per sequence, this shall be fixed
@@ -85,13 +85,13 @@
       if (!HandleDecodeResult(res_dec, *video, decoder)) break;
     } else {
       // Signal end of the file to the decoder.
-      const aom_codec_err_t res_dec = decoder->DecodeFrame(NULL, 0);
+      const aom_codec_err_t res_dec = decoder->DecodeFrame(nullptr, 0);
       ASSERT_EQ(AOM_CODEC_OK, res_dec) << decoder->DecodeError();
       end_of_file = true;
     }
 
     DxDataIterator dec_iter = decoder->GetDxData();
-    const aom_image_t *img = NULL;
+    const aom_image_t *img = nullptr;
 
     // Get decompressed data
     while (!::testing::Test::HasFailure() && (img = dec_iter.Next()))
diff --git a/test/decode_test_driver.h b/test/decode_test_driver.h
index 64722f4..9678f72 100644
--- a/test/decode_test_driver.h
+++ b/test/decode_test_driver.h
@@ -27,7 +27,7 @@
 class DxDataIterator {
  public:
   explicit DxDataIterator(aom_codec_ctx_t *decoder)
-      : decoder_(decoder), iter_(NULL) {}
+      : decoder_(decoder), iter_(nullptr) {}
 
   const aom_image_t *Next() { return aom_codec_get_frame(decoder_, &iter_); }
 
diff --git a/test/dr_prediction_test.cc b/test/dr_prediction_test.cc
index cf2e90c..cbb3153 100644
--- a/test/dr_prediction_test.cc
+++ b/test/dr_prediction_test.cc
@@ -133,8 +133,8 @@
 
 template <typename FuncType>
 struct DrPredFunc {
-  DrPredFunc(FuncType pred = NULL, FuncType tst = NULL, int bit_depth_value = 0,
-             int start_angle_value = 0)
+  DrPredFunc(FuncType pred = nullptr, FuncType tst = nullptr,
+             int bit_depth_value = 0, int start_angle_value = 0)
       : ref_fn(pred), tst_fn(tst), bit_depth(bit_depth_value),
         start_angle(start_angle_value) {}
 
@@ -222,7 +222,7 @@
       }
     }
     for (int tx = 0; tx < TX_SIZES_ALL; ++tx) {
-      if (params_.tst_fn == NULL) {
+      if (params_.tst_fn == nullptr) {
         for (int i = 0; i < kDstSize; ++i) {
           dst_tst_[i] = (1 << bd_) - 1;
           dst_ref_[i] = (1 << bd_) - 1;
@@ -274,7 +274,7 @@
   }
 
   void RundrPredTest(const int speed) {
-    if (params_.tst_fn == NULL) return;
+    if (params_.tst_fn == nullptr) return;
     const int angles[] = { 3, 45, 87 };
     const int start_angle = speed ? 0 : start_angle_;
     const int stop_angle = speed ? 3 : stop_angle_;
@@ -340,11 +340,11 @@
 INSTANTIATE_TEST_SUITE_P(
     C, LowbdDrPredTest,
     ::testing::Values(DrPredFunc<DrPred>(&z1_wrapper<av1_dr_prediction_z1_c>,
-                                         NULL, AOM_BITS_8, kZ1Start),
+                                         nullptr, AOM_BITS_8, kZ1Start),
                       DrPredFunc<DrPred>(&z2_wrapper<av1_dr_prediction_z2_c>,
-                                         NULL, AOM_BITS_8, kZ2Start),
+                                         nullptr, AOM_BITS_8, kZ2Start),
                       DrPredFunc<DrPred>(&z3_wrapper<av1_dr_prediction_z3_c>,
-                                         NULL, AOM_BITS_8, kZ3Start)));
+                                         nullptr, AOM_BITS_8, kZ3Start)));
 
 #if CONFIG_AV1_HIGHBITDEPTH
 class HighbdDrPredTest : public DrPredTest<uint16_t, DrPred_Hbd> {};
@@ -363,23 +363,23 @@
     C, HighbdDrPredTest,
     ::testing::Values(
         DrPredFunc<DrPred_Hbd>(&z1_wrapper_hbd<av1_highbd_dr_prediction_z1_c>,
-                               NULL, AOM_BITS_8, kZ1Start),
+                               nullptr, AOM_BITS_8, kZ1Start),
         DrPredFunc<DrPred_Hbd>(&z1_wrapper_hbd<av1_highbd_dr_prediction_z1_c>,
-                               NULL, AOM_BITS_10, kZ1Start),
+                               nullptr, AOM_BITS_10, kZ1Start),
         DrPredFunc<DrPred_Hbd>(&z1_wrapper_hbd<av1_highbd_dr_prediction_z1_c>,
-                               NULL, AOM_BITS_12, kZ1Start),
+                               nullptr, AOM_BITS_12, kZ1Start),
         DrPredFunc<DrPred_Hbd>(&z2_wrapper_hbd<av1_highbd_dr_prediction_z2_c>,
-                               NULL, AOM_BITS_8, kZ2Start),
+                               nullptr, AOM_BITS_8, kZ2Start),
         DrPredFunc<DrPred_Hbd>(&z2_wrapper_hbd<av1_highbd_dr_prediction_z2_c>,
-                               NULL, AOM_BITS_10, kZ2Start),
+                               nullptr, AOM_BITS_10, kZ2Start),
         DrPredFunc<DrPred_Hbd>(&z2_wrapper_hbd<av1_highbd_dr_prediction_z2_c>,
-                               NULL, AOM_BITS_12, kZ2Start),
+                               nullptr, AOM_BITS_12, kZ2Start),
         DrPredFunc<DrPred_Hbd>(&z3_wrapper_hbd<av1_highbd_dr_prediction_z3_c>,
-                               NULL, AOM_BITS_8, kZ3Start),
+                               nullptr, AOM_BITS_8, kZ3Start),
         DrPredFunc<DrPred_Hbd>(&z3_wrapper_hbd<av1_highbd_dr_prediction_z3_c>,
-                               NULL, AOM_BITS_10, kZ3Start),
+                               nullptr, AOM_BITS_10, kZ3Start),
         DrPredFunc<DrPred_Hbd>(&z3_wrapper_hbd<av1_highbd_dr_prediction_z3_c>,
-                               NULL, AOM_BITS_12, kZ3Start)));
+                               nullptr, AOM_BITS_12, kZ3Start)));
 #endif  // CONFIG_AV1_HIGHBITDEPTH
 
 TEST_P(LowbdDrPredTest, OperationCheck) { RundrPredTest(0); }
@@ -469,7 +469,7 @@
 }
 
 TEST_P(HighbdDrPredTest, OperationCheck) {
-  if (params_.tst_fn == NULL) return;
+  if (params_.tst_fn == nullptr) return;
   // const int angles[] = { 3, 45, 81, 87, 93, 100, 145, 187, 199, 260 };
   for (enable_upsample_ = 0; enable_upsample_ < 2; ++enable_upsample_) {
     for (int angle = start_angle_; angle < stop_angle_; angle++) {
diff --git a/test/encode_api_test.cc b/test/encode_api_test.cc
index 70b0612..2566abe 100644
--- a/test/encode_api_test.cc
+++ b/test/encode_api_test.cc
@@ -34,34 +34,39 @@
 
   EXPECT_EQ(&img, aom_img_wrap(&img, AOM_IMG_FMT_I420, 1, 1, 1, buf));
 
-  EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_enc_init(NULL, NULL, NULL, 0));
-  EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_enc_init(&enc, NULL, NULL, 0));
-  EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_encode(NULL, NULL, 0, 0, 0));
-  EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_encode(NULL, &img, 0, 0, 0));
-  EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_destroy(NULL));
   EXPECT_EQ(AOM_CODEC_INVALID_PARAM,
-            aom_codec_enc_config_default(NULL, NULL, 0));
+            aom_codec_enc_init(nullptr, nullptr, nullptr, 0));
   EXPECT_EQ(AOM_CODEC_INVALID_PARAM,
-            aom_codec_enc_config_default(NULL, &cfg, 0));
-  EXPECT_TRUE(aom_codec_error(NULL) != NULL);
+            aom_codec_enc_init(&enc, nullptr, nullptr, 0));
+  EXPECT_EQ(AOM_CODEC_INVALID_PARAM,
+            aom_codec_encode(nullptr, nullptr, 0, 0, 0));
+  EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_encode(nullptr, &img, 0, 0, 0));
+  EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_destroy(nullptr));
+  EXPECT_EQ(AOM_CODEC_INVALID_PARAM,
+            aom_codec_enc_config_default(nullptr, nullptr, 0));
+  EXPECT_EQ(AOM_CODEC_INVALID_PARAM,
+            aom_codec_enc_config_default(nullptr, &cfg, 0));
+  EXPECT_NE(aom_codec_error(nullptr), nullptr);
 
   aom_codec_iface_t *iface = aom_codec_av1_cx();
   SCOPED_TRACE(aom_codec_iface_name(iface));
-  EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_enc_init(NULL, iface, NULL, 0));
-  EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_enc_init(&enc, iface, NULL, 0));
+  EXPECT_EQ(AOM_CODEC_INVALID_PARAM,
+            aom_codec_enc_init(nullptr, iface, nullptr, 0));
+  EXPECT_EQ(AOM_CODEC_INVALID_PARAM,
+            aom_codec_enc_init(&enc, iface, nullptr, 0));
   EXPECT_EQ(AOM_CODEC_INVALID_PARAM,
             aom_codec_enc_config_default(iface, &cfg, 3));
   EXPECT_EQ(AOM_CODEC_OK, aom_codec_enc_config_default(iface, &cfg, kUsage));
   EXPECT_EQ(AOM_CODEC_OK, aom_codec_enc_init(&enc, iface, &cfg, 0));
-  EXPECT_EQ(NULL, aom_codec_get_global_headers(NULL));
+  EXPECT_EQ(nullptr, aom_codec_get_global_headers(nullptr));
 
   aom_fixed_buf_t *glob_headers = aom_codec_get_global_headers(&enc);
-  EXPECT_TRUE(glob_headers->buf != NULL);
+  EXPECT_NE(glob_headers->buf, nullptr);
   if (glob_headers) {
     free(glob_headers->buf);
     free(glob_headers);
   }
-  EXPECT_EQ(AOM_CODEC_OK, aom_codec_encode(&enc, NULL, 0, 0, 0));
+  EXPECT_EQ(AOM_CODEC_OK, aom_codec_encode(&enc, nullptr, 0, 0, 0));
   EXPECT_EQ(AOM_CODEC_OK, aom_codec_destroy(&enc));
 }
 
diff --git a/test/encode_small_width_height_test.cc b/test/encode_small_width_height_test.cc
index fa0d16a..3d00327 100644
--- a/test/encode_small_width_height_test.cc
+++ b/test/encode_small_width_height_test.cc
@@ -52,7 +52,7 @@
   EXPECT_EQ(AOM_CODEC_OK, aom_codec_enc_init(&enc, iface, &cfg, 0));
   EXPECT_EQ(AOM_CODEC_OK, aom_codec_control(&enc, AOME_SET_CPUUSED, 5));
   EXPECT_EQ(AOM_CODEC_OK, aom_codec_encode(&enc, &img, 0, 1, 0));
-  EXPECT_EQ(AOM_CODEC_OK, aom_codec_encode(&enc, NULL, 0, 0, 0));
+  EXPECT_EQ(AOM_CODEC_OK, aom_codec_encode(&enc, nullptr, 0, 0, 0));
   EXPECT_EQ(AOM_CODEC_OK, aom_codec_destroy(&enc));
 }
 
@@ -77,7 +77,7 @@
   EXPECT_EQ(AOM_CODEC_OK, aom_codec_enc_init(&enc, iface, &cfg, 0));
   EXPECT_EQ(AOM_CODEC_OK, aom_codec_control(&enc, AOME_SET_CPUUSED, 0));
   EXPECT_EQ(AOM_CODEC_OK, aom_codec_encode(&enc, &img, 0, 1, 0));
-  EXPECT_EQ(AOM_CODEC_OK, aom_codec_encode(&enc, NULL, 0, 0, 0));
+  EXPECT_EQ(AOM_CODEC_OK, aom_codec_encode(&enc, nullptr, 0, 0, 0));
   EXPECT_EQ(AOM_CODEC_OK, aom_codec_destroy(&enc));
 }
 #endif
@@ -102,7 +102,7 @@
   EXPECT_EQ(AOM_CODEC_OK, aom_codec_enc_init(&enc, iface, &cfg, 0));
   EXPECT_EQ(AOM_CODEC_OK, aom_codec_control(&enc, AOME_SET_CPUUSED, 5));
   EXPECT_EQ(AOM_CODEC_OK, aom_codec_encode(&enc, &img, 0, 1, 0));
-  EXPECT_EQ(AOM_CODEC_OK, aom_codec_encode(&enc, NULL, 0, 0, 0));
+  EXPECT_EQ(AOM_CODEC_OK, aom_codec_encode(&enc, nullptr, 0, 0, 0));
   EXPECT_EQ(AOM_CODEC_OK, aom_codec_destroy(&enc));
 }
 
@@ -127,7 +127,7 @@
   EXPECT_EQ(AOM_CODEC_OK, aom_codec_enc_init(&enc, iface, &cfg, 0));
   EXPECT_EQ(AOM_CODEC_OK, aom_codec_control(&enc, AOME_SET_CPUUSED, 0));
   EXPECT_EQ(AOM_CODEC_OK, aom_codec_encode(&enc, &img, 0, 1, 0));
-  EXPECT_EQ(AOM_CODEC_OK, aom_codec_encode(&enc, NULL, 0, 0, 0));
+  EXPECT_EQ(AOM_CODEC_OK, aom_codec_encode(&enc, nullptr, 0, 0, 0));
   EXPECT_EQ(AOM_CODEC_OK, aom_codec_destroy(&enc));
 }
 #endif
@@ -181,7 +181,7 @@
   EXPECT_EQ(AOM_CODEC_OK, aom_codec_enc_init(&enc, iface, &cfg, 0));
   EXPECT_EQ(AOM_CODEC_OK, aom_codec_control(&enc, AOME_SET_CPUUSED, 5));
   EXPECT_EQ(AOM_CODEC_OK, aom_codec_encode(&enc, &img, 0, 1, 0));
-  EXPECT_EQ(AOM_CODEC_OK, aom_codec_encode(&enc, NULL, 0, 0, 0));
+  EXPECT_EQ(AOM_CODEC_OK, aom_codec_encode(&enc, nullptr, 0, 0, 0));
   EXPECT_EQ(AOM_CODEC_OK, aom_codec_destroy(&enc));
 }
 
diff --git a/test/encode_test_driver.cc b/test/encode_test_driver.cc
index 96714f4..fdc34a9 100644
--- a/test/encode_test_driver.cc
+++ b/test/encode_test_driver.cc
@@ -76,7 +76,7 @@
 }
 
 void Encoder::Flush() {
-  const aom_codec_err_t res = aom_codec_encode(&encoder_, NULL, 0, 0, 0);
+  const aom_codec_err_t res = aom_codec_encode(&encoder_, nullptr, 0, 0, 0);
   if (!encoder_.priv)
     ASSERT_EQ(AOM_CODEC_ERROR, res) << EncoderError();
   else
@@ -111,10 +111,10 @@
       const int pix2 = buf2[r * stride2 + c];
 
       if (pix1 != pix2) {
-        if (mismatch_row != NULL) *mismatch_row = r;
-        if (mismatch_col != NULL) *mismatch_col = c;
-        if (mismatch_pix1 != NULL) *mismatch_pix1 = pix1;
-        if (mismatch_pix2 != NULL) *mismatch_pix2 = pix2;
+        if (mismatch_row != nullptr) *mismatch_row = r;
+        if (mismatch_col != nullptr) *mismatch_col = c;
+        if (mismatch_pix1 != nullptr) *mismatch_pix1 = pix1;
+        if (mismatch_pix2 != nullptr) *mismatch_pix2 = pix2;
         return false;
       }
     }
@@ -132,8 +132,8 @@
   if (img1->fmt != img2->fmt || img1->cp != img2->cp || img1->tc != img2->tc ||
       img1->mc != img2->mc || img1->d_w != img2->d_w ||
       img1->d_h != img2->d_h || img1->monochrome != img2->monochrome) {
-    if (mismatch_row != NULL) *mismatch_row = -1;
-    if (mismatch_col != NULL) *mismatch_col = -1;
+    if (mismatch_row != nullptr) *mismatch_row = -1;
+    if (mismatch_col != nullptr) *mismatch_col = -1;
     return false;
   }
 
@@ -144,7 +144,7 @@
                        aom_img_plane_width(img1, plane),
                        aom_img_plane_height(img1, plane), mismatch_row,
                        mismatch_col, mismatch_pix1, mismatch_pix2)) {
-      if (mismatch_plane != NULL) *mismatch_plane = plane;
+      if (mismatch_plane != nullptr) *mismatch_plane = plane;
       return false;
     }
   }
@@ -218,7 +218,7 @@
 
     bool again;
     for (again = true; again; video->Next()) {
-      again = (video->img() != NULL);
+      again = (video->img() != nullptr);
 
       for (int sl = 0; sl < number_spatial_layers_; sl++) {
         PreEncodeFrameHook(video);
@@ -238,7 +238,7 @@
             case AOM_CODEC_CX_FRAME_PKT:  //
               has_cxdata = true;
 #if CONFIG_AV1_DECODER
-              if (decoder.get() != NULL && DoDecode()) {
+              if (decoder.get() != nullptr && DoDecode()) {
                 aom_codec_err_t res_dec;
                 if (DoDecodeInvisible()) {
                   res_dec = decoder->DecodeFrame(
@@ -278,8 +278,8 @@
             DxDataIterator dec_iter = decoder->GetDxData();
             const aom_image_t *img_dec = dec_iter.Next();
             if (img_enc && img_dec) {
-              const bool res =
-                  compare_img(img_enc, img_dec, NULL, NULL, NULL, NULL, NULL);
+              const bool res = compare_img(img_enc, img_dec, nullptr, nullptr,
+                                           nullptr, nullptr, nullptr);
               if (!res) {  // Mismatch
                 MismatchHook(img_enc, img_dec);
               }
diff --git a/test/encode_test_driver.h b/test/encode_test_driver.h
index 84ca64c..8fee929 100644
--- a/test/encode_test_driver.h
+++ b/test/encode_test_driver.h
@@ -45,7 +45,7 @@
 class CxDataIterator {
  public:
   explicit CxDataIterator(aom_codec_ctx_t *encoder)
-      : encoder_(encoder), iter_(NULL) {}
+      : encoder_(encoder), iter_(nullptr) {}
 
   const aom_codec_cx_pkt_t *Next() {
     return aom_codec_get_cx_data(encoder_, &iter_);
diff --git a/test/ethread_test.cc b/test/ethread_test.cc
index 0074ff3..3271114 100644
--- a/test/ethread_test.cc
+++ b/test/ethread_test.cc
@@ -37,7 +37,7 @@
     init_flags_ = AOM_CODEC_USE_PSNR;
 
     row_mt_ = 1;
-    firstpass_stats_.buf = NULL;
+    firstpass_stats_.buf = nullptr;
     firstpass_stats_.sz = 0;
   }
   virtual ~AVxFirstPassEncoderThreadTest() { free(firstpass_stats_.buf); }
diff --git a/test/external_frame_buffer_test.cc b/test/external_frame_buffer_test.cc
index 84bf584..ea7ed50 100644
--- a/test/external_frame_buffer_test.cc
+++ b/test/external_frame_buffer_test.cc
@@ -36,7 +36,7 @@
 class ExternalFrameBufferList {
  public:
   ExternalFrameBufferList()
-      : num_buffers_(0), num_used_buffers_(0), ext_fb_list_(NULL) {}
+      : num_buffers_(0), num_used_buffers_(0), ext_fb_list_(nullptr) {}
 
   virtual ~ExternalFrameBufferList() {
     for (int i = 0; i < num_buffers_; ++i) {
@@ -93,7 +93,7 @@
 
     if (ext_fb_list_[idx].size < min_size) {
       delete[] ext_fb_list_[idx].data;
-      ext_fb_list_[idx].data = NULL;
+      ext_fb_list_[idx].data = nullptr;
       ext_fb_list_[idx].size = min_size;
     }
 
@@ -104,13 +104,13 @@
   // Marks the external frame buffer that |fb| is pointing to as free.
   // Returns < 0 on an error.
   int ReturnFrameBuffer(aom_codec_frame_buffer_t *fb) {
-    if (fb == NULL) {
+    if (fb == nullptr) {
       EXPECT_NE(fb, nullptr);
       return -1;
     }
     ExternalFrameBuffer *const ext_fb =
         reinterpret_cast<ExternalFrameBuffer *>(fb->priv);
-    if (ext_fb == NULL) {
+    if (ext_fb == nullptr) {
       EXPECT_NE(ext_fb, nullptr);
       return -1;
     }
@@ -212,10 +212,10 @@
  protected:
   ExternalFrameBufferMD5Test()
       : DecoderTest(GET_PARAM(::libaom_test::kCodecFactoryParam)),
-        md5_file_(NULL), num_buffers_(0) {}
+        md5_file_(nullptr), num_buffers_(0) {}
 
   virtual ~ExternalFrameBufferMD5Test() {
-    if (md5_file_ != NULL) fclose(md5_file_);
+    if (md5_file_ != nullptr) fclose(md5_file_);
   }
 
   virtual void PreDecodeFrameHook(
@@ -253,7 +253,7 @@
         (aom_img_fmt)(img.fmt & ~AOM_IMG_FMT_HIGHBITDEPTH);
     if (img.bit_depth == 8 && shifted_fmt != img.fmt) {
       aom_image_t *img_shifted =
-          aom_img_alloc(NULL, shifted_fmt, img.d_w, img.d_h, 16);
+          aom_img_alloc(nullptr, shifted_fmt, img.d_w, img.d_h, 16);
       img_shifted->bit_depth = img.bit_depth;
       img_shifted->monochrome = img.monochrome;
       aom_img_downshift(img_shifted, &img, 0);
@@ -312,7 +312,8 @@
 // Class for testing passing in external frame buffers to libaom.
 class ExternalFrameBufferTest : public ::testing::Test {
  protected:
-  ExternalFrameBufferTest() : video_(NULL), decoder_(NULL), num_buffers_(0) {}
+  ExternalFrameBufferTest()
+      : video_(nullptr), decoder_(nullptr), num_buffers_(0) {}
 
   virtual void SetUp() {
     video_ = new libaom_test::WebMVideoSource(kAV1TestFile);
@@ -328,9 +329,9 @@
 
   virtual void TearDown() {
     delete decoder_;
-    decoder_ = NULL;
+    decoder_ = nullptr;
     delete video_;
-    video_ = NULL;
+    video_ = nullptr;
   }
 
   // Passes the external frame buffer information to libaom.
@@ -354,7 +355,7 @@
   }
 
   aom_codec_err_t DecodeRemainingFrames() {
-    for (; video_->cxdata() != NULL; video_->Next()) {
+    for (; video_->cxdata() != nullptr; video_->Next()) {
       const aom_codec_err_t res =
           decoder_->DecodeFrame(video_->cxdata(), video_->frame_size());
       if (res != AOM_CODEC_OK) return res;
@@ -366,10 +367,10 @@
  protected:
   void CheckDecodedFrames() {
     libaom_test::DxDataIterator dec_iter = decoder_->GetDxData();
-    const aom_image_t *img = NULL;
+    const aom_image_t *img = nullptr;
 
     // Get decompressed data
-    while ((img = dec_iter.Next()) != NULL) {
+    while ((img = dec_iter.Next()) != nullptr) {
       fb_list_.CheckImageFrameBuffer(img);
     }
   }
@@ -511,13 +512,14 @@
   const int num_buffers = AOM_MAXIMUM_REF_BUFFERS + AOM_MAXIMUM_WORK_BUFFERS;
   ASSERT_EQ(
       AOM_CODEC_INVALID_PARAM,
-      SetFrameBufferFunctions(num_buffers, NULL, release_aom_frame_buffer));
+      SetFrameBufferFunctions(num_buffers, nullptr, release_aom_frame_buffer));
 }
 
 TEST_F(ExternalFrameBufferTest, NullReleaseFunction) {
   const int num_buffers = AOM_MAXIMUM_REF_BUFFERS + AOM_MAXIMUM_WORK_BUFFERS;
-  ASSERT_EQ(AOM_CODEC_INVALID_PARAM,
-            SetFrameBufferFunctions(num_buffers, get_aom_frame_buffer, NULL));
+  ASSERT_EQ(
+      AOM_CODEC_INVALID_PARAM,
+      SetFrameBufferFunctions(num_buffers, get_aom_frame_buffer, nullptr));
 }
 
 TEST_F(ExternalFrameBufferTest, SetAfterDecode) {
diff --git a/test/film_grain_table_test.cc b/test/film_grain_table_test.cc
index 09e4d61..bf63903 100644
--- a/test/film_grain_table_test.cc
+++ b/test/film_grain_table_test.cc
@@ -124,12 +124,12 @@
 
   // Test lookup and remove that adjusts start time
   EXPECT_TRUE(aom_film_grain_table_lookup(&table, 0, 100, true, &grain));
-  EXPECT_EQ(NULL, table.head->next);
+  EXPECT_EQ(nullptr, table.head->next);
   EXPECT_EQ(100, table.head->start_time);
 
   // Test lookup and remove that adjusts end time
   EXPECT_TRUE(aom_film_grain_table_lookup(&table, 900, 1000, true, &grain));
-  EXPECT_EQ(NULL, table.head->next);
+  EXPECT_EQ(nullptr, table.head->next);
   EXPECT_EQ(100, table.head->start_time);
   EXPECT_EQ(900, table.head->end_time);
 
@@ -138,7 +138,7 @@
   EXPECT_EQ(100, table.head->start_time);
   EXPECT_EQ(400, table.head->end_time);
 
-  ASSERT_NE((void *)NULL, table.head->next);
+  ASSERT_NE(nullptr, table.head->next);
   EXPECT_EQ(table.tail, table.head->next);
   EXPECT_EQ(600, table.head->next->start_time);
   EXPECT_EQ(900, table.head->next->end_time);
diff --git a/test/firstpass_test.cc b/test/firstpass_test.cc
index f7d8f2e..718fdab 100644
--- a/test/firstpass_test.cc
+++ b/test/firstpass_test.cc
@@ -36,7 +36,7 @@
 
 TEST(FirstpassTest, FirstpassInfoInitWithStaticBuf) {
   FIRSTPASS_INFO firstpass_info;
-  aom_codec_err_t ret = av1_firstpass_info_init(&firstpass_info, NULL, 0);
+  aom_codec_err_t ret = av1_firstpass_info_init(&firstpass_info, nullptr, 0);
   EXPECT_EQ(firstpass_info.stats_count, 0);
   EXPECT_EQ(firstpass_info.cur_index, 0);
   EXPECT_EQ(ret, AOM_CODEC_OK);
@@ -44,7 +44,7 @@
 
 TEST(FirstpassTest, FirstpassInfoPushPop) {
   FIRSTPASS_INFO firstpass_info;
-  av1_firstpass_info_init(&firstpass_info, NULL, 0);
+  av1_firstpass_info_init(&firstpass_info, nullptr, 0);
   EXPECT_EQ(firstpass_info.stats_buf_size, FIRSTPASS_INFO_STATIC_BUF_SIZE);
   for (int i = 0; i < FIRSTPASS_INFO_STATIC_BUF_SIZE; ++i) {
     FIRSTPASS_STATS stats;
@@ -85,7 +85,7 @@
 
 TEST(FirstpassTest, FirstpassInfoTotalStats) {
   FIRSTPASS_INFO firstpass_info;
-  av1_firstpass_info_init(&firstpass_info, NULL, 0);
+  av1_firstpass_info_init(&firstpass_info, nullptr, 0);
   EXPECT_EQ(firstpass_info.total_stats.frame, 0);
   for (int i = 0; i < 10; ++i) {
     FIRSTPASS_STATS stats;
@@ -98,7 +98,7 @@
 
 TEST(FirstpassTest, FirstpassInfoMoveCurr) {
   FIRSTPASS_INFO firstpass_info;
-  av1_firstpass_info_init(&firstpass_info, NULL, 0);
+  av1_firstpass_info_init(&firstpass_info, nullptr, 0);
   int frame_cnt = 0;
   EXPECT_EQ(firstpass_info.stats_buf_size, FIRSTPASS_INFO_STATIC_BUF_SIZE);
   for (int i = 0; i < FIRSTPASS_INFO_STATIC_BUF_SIZE; ++i) {
diff --git a/test/function_equivalence_test.h b/test/function_equivalence_test.h
index a7116b1..f47800a 100644
--- a/test/function_equivalence_test.h
+++ b/test/function_equivalence_test.h
@@ -36,7 +36,7 @@
 
 template <typename T>
 struct FuncParam {
-  FuncParam(T ref = NULL, T tst = NULL, int bit_depth = 0)
+  FuncParam(T ref = nullptr, T tst = nullptr, int bit_depth = 0)
       : ref_func(ref), tst_func(tst), bit_depth(bit_depth) {}
   T ref_func;
   T tst_func;
diff --git a/test/fwht4x4_test.cc b/test/fwht4x4_test.cc
index f39722b..8b8b4f2 100644
--- a/test/fwht4x4_test.cc
+++ b/test/fwht4x4_test.cc
@@ -192,10 +192,11 @@
 INSTANTIATE_TEST_SUITE_P(
     C, Trans4x4WHT,
     ::testing::Values(make_tuple(&av1_highbd_fwht4x4_c, &iwht4x4_10_c, DCT_DCT,
-                                 AOM_BITS_10, 16, static_cast<FdctFunc>(NULL)),
+                                 AOM_BITS_10, 16,
+                                 static_cast<FdctFunc>(nullptr)),
                       make_tuple(&av1_highbd_fwht4x4_c, &iwht4x4_12_c, DCT_DCT,
                                  AOM_BITS_12, 16,
-                                 static_cast<FdctFunc>(NULL))));
+                                 static_cast<FdctFunc>(nullptr))));
 
 #if HAVE_SSE4_1
 
@@ -203,10 +204,10 @@
     SSE4_1, Trans4x4WHT,
     ::testing::Values(make_tuple(&av1_highbd_fwht4x4_sse4_1, &iwht4x4_10_sse4_1,
                                  DCT_DCT, AOM_BITS_10, 16,
-                                 static_cast<FdctFunc>(NULL)),
+                                 static_cast<FdctFunc>(nullptr)),
                       make_tuple(&av1_highbd_fwht4x4_sse4_1, &iwht4x4_12_sse4_1,
                                  DCT_DCT, AOM_BITS_12, 16,
-                                 static_cast<FdctFunc>(NULL))));
+                                 static_cast<FdctFunc>(nullptr))));
 
 #endif  // HAVE_SSE4_1
 
diff --git a/test/intrapred_test.cc b/test/intrapred_test.cc
index 356fd83..bfe9c8f 100644
--- a/test/intrapred_test.cc
+++ b/test/intrapred_test.cc
@@ -47,7 +47,7 @@
 // See bug aomedia:2003.
 template <typename FuncType>
 struct IntraPredFunc {
-  IntraPredFunc(FuncType pred = NULL, FuncType ref = NULL,
+  IntraPredFunc(FuncType pred = nullptr, FuncType ref = nullptr,
                 int block_width_value = 0, int block_height_value = 0,
                 int bit_depth_value = 0)
       : pred_fn(pred), ref_fn(ref), block_width(block_width_value),
diff --git a/test/invalid_file_test.cc b/test/invalid_file_test.cc
index c84c8c9..261ab31 100644
--- a/test/invalid_file_test.cc
+++ b/test/invalid_file_test.cc
@@ -24,13 +24,13 @@
 struct DecodeParam {
   int threads;
   const char *filename;
-  const char *res_filename;  // If NULL, the result filename is
+  const char *res_filename;  // If nullptr, the result filename is
                              // filename + ".res".
 };
 
 // Constructs result file name.
 std::string GetResFilename(const DecodeParam &param) {
-  if (param.res_filename != NULL) return param.res_filename;
+  if (param.res_filename != nullptr) return param.res_filename;
   const std::string filename = param.filename;
   return filename + ".res";
 }
@@ -43,10 +43,10 @@
 class InvalidFileTest : public ::libaom_test::DecoderTest,
                         public ::libaom_test::CodecTestWithParam<DecodeParam> {
  protected:
-  InvalidFileTest() : DecoderTest(GET_PARAM(0)), res_file_(NULL) {}
+  InvalidFileTest() : DecoderTest(GET_PARAM(0)), res_file_(nullptr) {}
 
   virtual ~InvalidFileTest() {
-    if (res_file_ != NULL) fclose(res_file_);
+    if (res_file_ != nullptr) fclose(res_file_);
   }
 
   void OpenResFile(const std::string &res_file_name) {
@@ -121,36 +121,36 @@
 
 TEST_P(InvalidFileTest, ReturnCode) { RunTest(); }
 
-// If res_filename (the third field) is NULL, then the result filename is
+// If res_filename (the third field) is nullptr, then the result filename is
 // filename + ".res" by default. Set res_filename to a string if the result
 // filename differs from the default.
 const DecodeParam kAV1InvalidFileTests[] = {
   // { threads, filename, res_filename }
-  { 1, "invalid-bug-1814.ivf", NULL },
-  { 1, "invalid-chromium-906381.ivf", NULL },
-  { 1, "invalid-google-142530197.ivf", NULL },
-  { 1, "invalid-google-142530197-1.ivf", NULL },
+  { 1, "invalid-bug-1814.ivf", nullptr },
+  { 1, "invalid-chromium-906381.ivf", nullptr },
+  { 1, "invalid-google-142530197.ivf", nullptr },
+  { 1, "invalid-google-142530197-1.ivf", nullptr },
   { 4, "invalid-oss-fuzz-9463.ivf", "invalid-oss-fuzz-9463.ivf.res.2" },
-  { 1, "invalid-oss-fuzz-9720.ivf", NULL },
+  { 1, "invalid-oss-fuzz-9720.ivf", nullptr },
   { 1, "invalid-oss-fuzz-10389.ivf", "invalid-oss-fuzz-10389.ivf.res.4" },
   { 1, "invalid-oss-fuzz-11523.ivf", "invalid-oss-fuzz-11523.ivf.res.2" },
-  { 4, "invalid-oss-fuzz-15363.ivf", NULL },
+  { 4, "invalid-oss-fuzz-15363.ivf", nullptr },
   { 1, "invalid-oss-fuzz-16437.ivf", "invalid-oss-fuzz-16437.ivf.res.2" },
-  { 1, "invalid-oss-fuzz-24706.ivf", NULL },
+  { 1, "invalid-oss-fuzz-24706.ivf", nullptr },
 #if CONFIG_AV1_HIGHBITDEPTH
   // These test vectors contain 10-bit or 12-bit video.
-  { 1, "invalid-oss-fuzz-9288.ivf", NULL },
-  { 1, "invalid-oss-fuzz-9482.ivf", NULL },
-  { 1, "invalid-oss-fuzz-10061.ivf", NULL },
-  { 1, "invalid-oss-fuzz-10117-mc-buf-use-highbd.ivf", NULL },
-  { 1, "invalid-oss-fuzz-10227.ivf", NULL },
-  { 4, "invalid-oss-fuzz-10555.ivf", NULL },
-  { 1, "invalid-oss-fuzz-10705.ivf", NULL },
+  { 1, "invalid-oss-fuzz-9288.ivf", nullptr },
+  { 1, "invalid-oss-fuzz-9482.ivf", nullptr },
+  { 1, "invalid-oss-fuzz-10061.ivf", nullptr },
+  { 1, "invalid-oss-fuzz-10117-mc-buf-use-highbd.ivf", nullptr },
+  { 1, "invalid-oss-fuzz-10227.ivf", nullptr },
+  { 4, "invalid-oss-fuzz-10555.ivf", nullptr },
+  { 1, "invalid-oss-fuzz-10705.ivf", nullptr },
   { 1, "invalid-oss-fuzz-10723.ivf", "invalid-oss-fuzz-10723.ivf.res.2" },
-  { 1, "invalid-oss-fuzz-10779.ivf", NULL },
-  { 1, "invalid-oss-fuzz-11477.ivf", NULL },
+  { 1, "invalid-oss-fuzz-10779.ivf", nullptr },
+  { 1, "invalid-oss-fuzz-11477.ivf", nullptr },
   { 1, "invalid-oss-fuzz-11479.ivf", "invalid-oss-fuzz-11479.ivf.res.2" },
-  { 1, "invalid-oss-fuzz-33030.ivf", NULL },
+  { 1, "invalid-oss-fuzz-33030.ivf", nullptr },
 #endif
 };
 
diff --git a/test/ivf_video_source.h b/test/ivf_video_source.h
index f7efd67..45828b5 100644
--- a/test/ivf_video_source.h
+++ b/test/ivf_video_source.h
@@ -33,8 +33,9 @@
 class IVFVideoSource : public CompressedVideoSource {
  public:
   explicit IVFVideoSource(const std::string &file_name)
-      : file_name_(file_name), input_file_(NULL), compressed_frame_buf_(NULL),
-        frame_sz_(0), frame_(0), end_of_file_(false) {}
+      : file_name_(file_name), input_file_(nullptr),
+        compressed_frame_buf_(nullptr), frame_sz_(0), frame_(0),
+        end_of_file_(false) {}
 
   virtual ~IVFVideoSource() {
     delete[] compressed_frame_buf_;
@@ -94,7 +95,7 @@
   }
 
   virtual const uint8_t *cxdata() const {
-    return end_of_file_ ? NULL : compressed_frame_buf_;
+    return end_of_file_ ? nullptr : compressed_frame_buf_;
   }
   virtual size_t frame_size() const { return frame_sz_; }
   virtual unsigned int frame_number() const { return frame_; }
diff --git a/test/metadata_test.cc b/test/metadata_test.cc
index 7143294..f3b33ba 100644
--- a/test/metadata_test.cc
+++ b/test/metadata_test.cc
@@ -67,12 +67,12 @@
       ASSERT_EQ(aom_img_add_metadata(current_frame, OBU_METADATA_TYPE_ITUT_T35,
                                      kMetadataPayloadT35, 0, AOM_MIF_ANY_FRAME),
                 -1);
-      ASSERT_EQ(
-          aom_img_add_metadata(current_frame, OBU_METADATA_TYPE_ITUT_T35, NULL,
-                               kMetadataPayloadSizeT35, AOM_MIF_ANY_FRAME),
-          -1);
       ASSERT_EQ(aom_img_add_metadata(current_frame, OBU_METADATA_TYPE_ITUT_T35,
-                                     NULL, 0, AOM_MIF_ANY_FRAME),
+                                     nullptr, kMetadataPayloadSizeT35,
+                                     AOM_MIF_ANY_FRAME),
+                -1);
+      ASSERT_EQ(aom_img_add_metadata(current_frame, OBU_METADATA_TYPE_ITUT_T35,
+                                     nullptr, 0, AOM_MIF_ANY_FRAME),
                 -1);
       ASSERT_EQ(
           aom_img_add_metadata(current_frame, OBU_METADATA_TYPE_ITUT_T35,
@@ -139,7 +139,7 @@
 
   virtual void DecompressedFrameHook(const aom_image_t &img,
                                      aom_codec_pts_t /*pts*/) {
-    ASSERT_TRUE(img.metadata != nullptr);
+    ASSERT_NE(img.metadata, nullptr);
 
     ASSERT_EQ(img.metadata->sz, 3u);
 
@@ -217,14 +217,14 @@
 
 TEST(MetadataTest, AddMetadataToImage) {
   aom_image_t image;
-  image.metadata = NULL;
+  image.metadata = nullptr;
 
   ASSERT_EQ(aom_img_add_metadata(&image, OBU_METADATA_TYPE_ITUT_T35,
                                  kMetadataPayloadT35, kMetadataPayloadSizeT35,
                                  AOM_MIF_ANY_FRAME),
             0);
   aom_img_metadata_array_free(image.metadata);
-  EXPECT_EQ(aom_img_add_metadata(NULL, OBU_METADATA_TYPE_ITUT_T35,
+  EXPECT_EQ(aom_img_add_metadata(nullptr, OBU_METADATA_TYPE_ITUT_T35,
                                  kMetadataPayloadT35, kMetadataPayloadSizeT35,
                                  AOM_MIF_ANY_FRAME),
             -1);
@@ -232,19 +232,19 @@
 
 TEST(MetadataTest, RemoveMetadataFromImage) {
   aom_image_t image;
-  image.metadata = NULL;
+  image.metadata = nullptr;
 
   ASSERT_EQ(aom_img_add_metadata(&image, OBU_METADATA_TYPE_ITUT_T35,
                                  kMetadataPayloadT35, kMetadataPayloadSizeT35,
                                  AOM_MIF_ANY_FRAME),
             0);
   aom_img_remove_metadata(&image);
-  aom_img_remove_metadata(NULL);
+  aom_img_remove_metadata(nullptr);
 }
 
 TEST(MetadataTest, CopyMetadataToFrameBuffer) {
   YV12_BUFFER_CONFIG yvBuf;
-  yvBuf.metadata = NULL;
+  yvBuf.metadata = nullptr;
 
   aom_metadata_array_t *metadata_array = aom_img_metadata_array_alloc(1);
   ASSERT_NE(metadata_array, nullptr);
@@ -256,7 +256,7 @@
   // Metadata_array
   int status = aom_copy_metadata_to_frame_buffer(&yvBuf, metadata_array);
   EXPECT_EQ(status, 0);
-  status = aom_copy_metadata_to_frame_buffer(NULL, metadata_array);
+  status = aom_copy_metadata_to_frame_buffer(nullptr, metadata_array);
   EXPECT_EQ(status, -1);
   aom_img_metadata_array_free(metadata_array);
 
@@ -268,24 +268,24 @@
   aom_img_metadata_array_free(metadata_array_2);
 
   // YV12_BUFFER_CONFIG
-  status = aom_copy_metadata_to_frame_buffer(&yvBuf, NULL);
+  status = aom_copy_metadata_to_frame_buffer(&yvBuf, nullptr);
   EXPECT_EQ(status, -1);
   aom_remove_metadata_from_frame_buffer(&yvBuf);
-  aom_remove_metadata_from_frame_buffer(NULL);
+  aom_remove_metadata_from_frame_buffer(nullptr);
 }
 
 TEST(MetadataTest, GetMetadataFromImage) {
   aom_image_t image;
-  image.metadata = NULL;
+  image.metadata = nullptr;
 
   ASSERT_EQ(aom_img_add_metadata(&image, OBU_METADATA_TYPE_ITUT_T35,
                                  kMetadataPayloadT35, kMetadataPayloadSizeT35,
                                  AOM_MIF_ANY_FRAME),
             0);
 
-  EXPECT_TRUE(aom_img_get_metadata(NULL, 0) == NULL);
-  EXPECT_TRUE(aom_img_get_metadata(&image, 1u) == NULL);
-  EXPECT_TRUE(aom_img_get_metadata(&image, 10u) == NULL);
+  EXPECT_EQ(aom_img_get_metadata(nullptr, 0), nullptr);
+  EXPECT_EQ(aom_img_get_metadata(&image, 1u), nullptr);
+  EXPECT_EQ(aom_img_get_metadata(&image, 10u), nullptr);
 
   const aom_metadata_t *metadata = aom_img_get_metadata(&image, 0);
   ASSERT_NE(metadata, nullptr);
@@ -299,7 +299,7 @@
 
 TEST(MetadataTest, ReadMetadatasFromImage) {
   aom_image_t image;
-  image.metadata = NULL;
+  image.metadata = nullptr;
 
   uint32_t types[3];
   types[0] = OBU_METADATA_TYPE_ITUT_T35;
diff --git a/test/quantize_func_test.cc b/test/quantize_func_test.cc
index 1c646d2..e00cc1f 100644
--- a/test/quantize_func_test.cc
+++ b/test/quantize_func_test.cc
@@ -114,9 +114,9 @@
 
   virtual void TearDown() {
     aom_free(qtab_);
-    qtab_ = NULL;
+    qtab_ = nullptr;
     aom_free(coeff_);
-    coeff_ = NULL;
+    coeff_ = nullptr;
   }
 
   void InitQuantizer() {
diff --git a/test/reconinter_test.cc b/test/reconinter_test.cc
index ec97db7..b45b7bb 100644
--- a/test/reconinter_test.cc
+++ b/test/reconinter_test.cc
@@ -100,7 +100,8 @@
   DECLARE_ALIGNED(32, uint16_t, src0[MAX_SB_SQUARE]);
   DECLARE_ALIGNED(32, uint16_t, src1[MAX_SB_SQUARE]);
 
-  ConvolveParams conv_params = get_conv_params_no_round(0, 0, NULL, 0, 1, bd);
+  ConvolveParams conv_params =
+      get_conv_params_no_round(0, 0, nullptr, 0, 1, bd);
 
   int in_precision =
       bd + 2 * FILTER_BITS - conv_params.round_0 - conv_params.round_1 + 2;
@@ -140,7 +141,8 @@
   DECLARE_ALIGNED(32, uint16_t, src0[MAX_SB_SQUARE]);
   DECLARE_ALIGNED(32, uint16_t, src1[MAX_SB_SQUARE]);
 
-  ConvolveParams conv_params = get_conv_params_no_round(0, 0, NULL, 0, 1, bd);
+  ConvolveParams conv_params =
+      get_conv_params_no_round(0, 0, nullptr, 0, 1, bd);
 
   int in_precision =
       bd + 2 * FILTER_BITS - conv_params.round_0 - conv_params.round_1 + 2;
diff --git a/test/resize_test.cc b/test/resize_test.cc
index 141cdc9..6826602 100644
--- a/test/resize_test.cc
+++ b/test/resize_test.cc
@@ -257,7 +257,7 @@
  protected:
 #if WRITE_COMPRESSED_STREAM
   ResizeInternalTestLarge()
-      : ResizeTest(), frame0_psnr_(0.0), outfile_(NULL), out_frames_(0) {}
+      : ResizeTest(), frame0_psnr_(0.0), outfile_(nullptr), out_frames_(0) {}
 #else
   ResizeInternalTestLarge() : ResizeTest(), frame0_psnr_(0.0) {}
 #endif
@@ -276,7 +276,7 @@
       if (!fseek(outfile_, 0, SEEK_SET))
         write_ivf_file_header(&cfg_, out_frames_, outfile_);
       fclose(outfile_);
-      outfile_ = NULL;
+      outfile_ = nullptr;
     }
 #endif
   }
@@ -725,7 +725,7 @@
  protected:
 #if WRITE_COMPRESSED_STREAM
   ResizeCspTest()
-      : ResizeTest(), frame0_psnr_(0.0), outfile_(NULL), out_frames_(0) {}
+      : ResizeTest(), frame0_psnr_(0.0), outfile_(nullptr), out_frames_(0) {}
 #else
   ResizeCspTest() : ResizeTest(), frame0_psnr_(0.0) {}
 #endif
@@ -744,7 +744,7 @@
       if (!fseek(outfile_, 0, SEEK_SET))
         write_ivf_file_header(&cfg_, out_frames_, outfile_);
       fclose(outfile_);
-      outfile_ = NULL;
+      outfile_ = nullptr;
     }
 #endif
   }
diff --git a/test/sad_test.cc b/test/sad_test.cc
index 0d0ee88..55897f2 100644
--- a/test/sad_test.cc
+++ b/test/sad_test.cc
@@ -117,25 +117,25 @@
 
   static void TearDownTestSuite() {
     aom_free(source_data8_);
-    source_data8_ = NULL;
+    source_data8_ = nullptr;
     aom_free(reference_data8_);
-    reference_data8_ = NULL;
+    reference_data8_ = nullptr;
     aom_free(second_pred8_);
-    second_pred8_ = NULL;
+    second_pred8_ = nullptr;
     aom_free(comp_pred8_);
-    comp_pred8_ = NULL;
+    comp_pred8_ = nullptr;
     aom_free(comp_pred8_test_);
-    comp_pred8_test_ = NULL;
+    comp_pred8_test_ = nullptr;
     aom_free(source_data16_);
-    source_data16_ = NULL;
+    source_data16_ = nullptr;
     aom_free(reference_data16_);
-    reference_data16_ = NULL;
+    reference_data16_ = nullptr;
     aom_free(second_pred16_);
-    second_pred16_ = NULL;
+    second_pred16_ = nullptr;
     aom_free(comp_pred16_);
-    comp_pred16_ = NULL;
+    comp_pred16_ = nullptr;
     aom_free(comp_pred16_test_);
-    comp_pred16_test_ = NULL;
+    comp_pred16_test_ = nullptr;
   }
 
   virtual void TearDown() {}
@@ -655,21 +655,21 @@
   }
 };
 
-uint8_t *SADTestBase::source_data_ = NULL;
-uint8_t *SADTestBase::reference_data_ = NULL;
-uint8_t *SADTestBase::second_pred_ = NULL;
-uint8_t *SADTestBase::comp_pred_ = NULL;
-uint8_t *SADTestBase::comp_pred_test_ = NULL;
-uint8_t *SADTestBase::source_data8_ = NULL;
-uint8_t *SADTestBase::reference_data8_ = NULL;
-uint8_t *SADTestBase::second_pred8_ = NULL;
-uint8_t *SADTestBase::comp_pred8_ = NULL;
-uint8_t *SADTestBase::comp_pred8_test_ = NULL;
-uint16_t *SADTestBase::source_data16_ = NULL;
-uint16_t *SADTestBase::reference_data16_ = NULL;
-uint16_t *SADTestBase::second_pred16_ = NULL;
-uint16_t *SADTestBase::comp_pred16_ = NULL;
-uint16_t *SADTestBase::comp_pred16_test_ = NULL;
+uint8_t *SADTestBase::source_data_ = nullptr;
+uint8_t *SADTestBase::reference_data_ = nullptr;
+uint8_t *SADTestBase::second_pred_ = nullptr;
+uint8_t *SADTestBase::comp_pred_ = nullptr;
+uint8_t *SADTestBase::comp_pred_test_ = nullptr;
+uint8_t *SADTestBase::source_data8_ = nullptr;
+uint8_t *SADTestBase::reference_data8_ = nullptr;
+uint8_t *SADTestBase::second_pred8_ = nullptr;
+uint8_t *SADTestBase::comp_pred8_ = nullptr;
+uint8_t *SADTestBase::comp_pred8_test_ = nullptr;
+uint16_t *SADTestBase::source_data16_ = nullptr;
+uint16_t *SADTestBase::reference_data16_ = nullptr;
+uint16_t *SADTestBase::second_pred16_ = nullptr;
+uint16_t *SADTestBase::comp_pred16_ = nullptr;
+uint16_t *SADTestBase::comp_pred16_test_ = nullptr;
 
 TEST_P(SADTest, MaxRef) {
   FillConstant(source_data_, source_stride_, 0);
diff --git a/test/simd_cmp_impl.h b/test/simd_cmp_impl.h
index ab8f579..384caec 100644
--- a/test/simd_cmp_impl.h
+++ b/test/simd_cmp_impl.h
@@ -1301,7 +1301,7 @@
                       MAP(v256_unpacklo_s8_s16),
                       MAP(v256_unpackhi_s8_s16),
                       MAP(v256_blend_8),
-                      { NULL, NULL, NULL } };
+                      { nullptr, nullptr, nullptr } };
 #undef MAP
 
 // Map reference functions to machine tuned functions. Since the
@@ -1507,7 +1507,7 @@
   memset(d, 0, sizeof(d));
 
   Map(name, &ref_simd, &simd);
-  if (simd == NULL || ref_simd == NULL) {
+  if (simd == nullptr || ref_simd == nullptr) {
     FAIL() << "Internal error: Unknown intrinsic function " << name;
   }
   for (unsigned int count = 0;
@@ -1754,7 +1754,7 @@
   memset(d, 0, sizeof(d));
 
   Map(name, &ref_simd, &simd);
-  if (simd == NULL || ref_simd == NULL) {
+  if (simd == nullptr || ref_simd == nullptr) {
     FAIL() << "Internal error: Unknown intrinsic function " << name;
   }
 
@@ -2014,7 +2014,7 @@
   memset(d, 0, sizeof(d));
 
   Map(name, &ref_simd, &simd);
-  if (simd == NULL || ref_simd == NULL) {
+  if (simd == nullptr || ref_simd == nullptr) {
     FAIL() << "Internal error: Unknown intrinsic function " << name;
   }
 
diff --git a/test/test_intra_pred_speed.cc b/test/test_intra_pred_speed.cc
index 80fba3b..ea57330 100644
--- a/test/test_intra_pred_speed.cc
+++ b/test/test_intra_pred_speed.cc
@@ -125,7 +125,7 @@
   intra_pred_test_mem.Init(block_width, block_height, 8);
 
   for (int k = 0; k < kNumAv1IntraFuncs; ++k) {
-    if (pred_funcs[k] == NULL) continue;
+    if (pred_funcs[k] == nullptr) continue;
     memcpy(intra_pred_test_mem.src, intra_pred_test_mem.ref_src,
            sizeof(intra_pred_test_mem.src));
     aom_usec_timer timer;
@@ -432,35 +432,39 @@
 INTRA_PRED_TEST(SSE2, TX_4X4, aom_dc_predictor_4x4_sse2,
                 aom_dc_left_predictor_4x4_sse2, aom_dc_top_predictor_4x4_sse2,
                 aom_dc_128_predictor_4x4_sse2, aom_v_predictor_4x4_sse2,
-                aom_h_predictor_4x4_sse2, NULL, NULL, NULL, NULL)
+                aom_h_predictor_4x4_sse2, nullptr, nullptr, nullptr, nullptr)
 INTRA_PRED_TEST(SSE2, TX_4X8, aom_dc_predictor_4x8_sse2,
                 aom_dc_left_predictor_4x8_sse2, aom_dc_top_predictor_4x8_sse2,
                 aom_dc_128_predictor_4x8_sse2, aom_v_predictor_4x8_sse2,
-                aom_h_predictor_4x8_sse2, NULL, NULL, NULL, NULL)
+                aom_h_predictor_4x8_sse2, nullptr, nullptr, nullptr, nullptr)
 INTRA_PRED_TEST(SSE2, TX_4X16, aom_dc_predictor_4x16_sse2,
                 aom_dc_left_predictor_4x16_sse2, aom_dc_top_predictor_4x16_sse2,
                 aom_dc_128_predictor_4x16_sse2, aom_v_predictor_4x16_sse2,
-                aom_h_predictor_4x16_sse2, NULL, NULL, NULL, NULL)
+                aom_h_predictor_4x16_sse2, nullptr, nullptr, nullptr, nullptr)
 #endif  // HAVE_SSE2
 
 #if HAVE_SSSE3
-INTRA_PRED_TEST(SSSE3, TX_4X4, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_4x4_ssse3, aom_smooth_predictor_4x4_ssse3,
+INTRA_PRED_TEST(SSSE3, TX_4X4, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_4x4_ssse3,
+                aom_smooth_predictor_4x4_ssse3,
                 aom_smooth_v_predictor_4x4_ssse3,
                 aom_smooth_h_predictor_4x4_ssse3)
-INTRA_PRED_TEST(SSSE3, TX_4X8, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_4x8_ssse3, aom_smooth_predictor_4x8_ssse3,
+INTRA_PRED_TEST(SSSE3, TX_4X8, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_4x8_ssse3,
+                aom_smooth_predictor_4x8_ssse3,
                 aom_smooth_v_predictor_4x8_ssse3,
                 aom_smooth_h_predictor_4x8_ssse3)
-INTRA_PRED_TEST(SSSE3, TX_4X16, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_4x16_ssse3, aom_smooth_predictor_4x16_ssse3,
+INTRA_PRED_TEST(SSSE3, TX_4X16, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_4x16_ssse3,
+                aom_smooth_predictor_4x16_ssse3,
                 aom_smooth_v_predictor_4x16_ssse3,
                 aom_smooth_h_predictor_4x16_ssse3)
 #endif  // HAVE_SSSE3
 
 #if HAVE_DSPR2
-INTRA_PRED_TEST(DSPR2, TX_4X4, aom_dc_predictor_4x4_dspr2, NULL, NULL, NULL,
-                NULL, aom_h_predictor_4x4_dspr2, NULL, NULL, NULL, NULL)
+INTRA_PRED_TEST(DSPR2, TX_4X4, aom_dc_predictor_4x4_dspr2, nullptr, nullptr,
+                nullptr, nullptr, aom_h_predictor_4x4_dspr2, nullptr, nullptr,
+                nullptr, nullptr)
 #endif  // HAVE_DSPR2
 
 #if HAVE_NEON
@@ -470,12 +474,13 @@
                 aom_h_predictor_4x4_neon, aom_paeth_predictor_4x4_neon,
                 aom_smooth_predictor_4x4_neon, aom_smooth_v_predictor_4x4_neon,
                 aom_smooth_h_predictor_4x4_neon)
-INTRA_PRED_TEST(NEON, TX_4X8, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_4x8_neon, aom_smooth_predictor_4x8_neon,
-                aom_smooth_v_predictor_4x8_neon,
+INTRA_PRED_TEST(NEON, TX_4X8, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_4x8_neon,
+                aom_smooth_predictor_4x8_neon, aom_smooth_v_predictor_4x8_neon,
                 aom_smooth_h_predictor_4x8_neon)
-INTRA_PRED_TEST(NEON, TX_4X16, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_4x16_neon, aom_smooth_predictor_4x16_neon,
+INTRA_PRED_TEST(NEON, TX_4X16, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_4x16_neon,
+                aom_smooth_predictor_4x16_neon,
                 aom_smooth_v_predictor_4x16_neon,
                 aom_smooth_h_predictor_4x16_neon)
 #endif  // HAVE_NEON
@@ -484,7 +489,7 @@
 INTRA_PRED_TEST(MSA, TX_4X4, aom_dc_predictor_4x4_msa,
                 aom_dc_left_predictor_4x4_msa, aom_dc_top_predictor_4x4_msa,
                 aom_dc_128_predictor_4x4_msa, aom_v_predictor_4x4_msa,
-                aom_h_predictor_4x4_msa, NULL, NULL, NULL, NULL)
+                aom_h_predictor_4x4_msa, nullptr, nullptr, nullptr, nullptr)
 #endif  // HAVE_MSA
 
 // -----------------------------------------------------------------------------
@@ -518,43 +523,48 @@
 INTRA_PRED_TEST(SSE2, TX_8X8, aom_dc_predictor_8x8_sse2,
                 aom_dc_left_predictor_8x8_sse2, aom_dc_top_predictor_8x8_sse2,
                 aom_dc_128_predictor_8x8_sse2, aom_v_predictor_8x8_sse2,
-                aom_h_predictor_8x8_sse2, NULL, NULL, NULL, NULL)
+                aom_h_predictor_8x8_sse2, nullptr, nullptr, nullptr, nullptr)
 INTRA_PRED_TEST(SSE2, TX_8X4, aom_dc_predictor_8x4_sse2,
                 aom_dc_left_predictor_8x4_sse2, aom_dc_top_predictor_8x4_sse2,
                 aom_dc_128_predictor_8x4_sse2, aom_v_predictor_8x4_sse2,
-                aom_h_predictor_8x4_sse2, NULL, NULL, NULL, NULL)
+                aom_h_predictor_8x4_sse2, nullptr, nullptr, nullptr, nullptr)
 INTRA_PRED_TEST(SSE2, TX_8X16, aom_dc_predictor_8x16_sse2,
                 aom_dc_left_predictor_8x16_sse2, aom_dc_top_predictor_8x16_sse2,
                 aom_dc_128_predictor_8x16_sse2, aom_v_predictor_8x16_sse2,
-                aom_h_predictor_8x16_sse2, NULL, NULL, NULL, NULL)
+                aom_h_predictor_8x16_sse2, nullptr, nullptr, nullptr, nullptr)
 INTRA_PRED_TEST(SSE2, TX_8X32, aom_dc_predictor_8x32_sse2,
                 aom_dc_left_predictor_8x32_sse2, aom_dc_top_predictor_8x32_sse2,
                 aom_dc_128_predictor_8x32_sse2, aom_v_predictor_8x32_sse2,
-                aom_h_predictor_8x32_sse2, NULL, NULL, NULL, NULL)
+                aom_h_predictor_8x32_sse2, nullptr, nullptr, nullptr, nullptr)
 #endif  // HAVE_SSE2
 
 #if HAVE_SSSE3
-INTRA_PRED_TEST(SSSE3, TX_8X8, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_8x8_ssse3, aom_smooth_predictor_8x8_ssse3,
+INTRA_PRED_TEST(SSSE3, TX_8X8, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_8x8_ssse3,
+                aom_smooth_predictor_8x8_ssse3,
                 aom_smooth_v_predictor_8x8_ssse3,
                 aom_smooth_h_predictor_8x8_ssse3)
-INTRA_PRED_TEST(SSSE3, TX_8X4, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_8x4_ssse3, aom_smooth_predictor_8x4_ssse3,
+INTRA_PRED_TEST(SSSE3, TX_8X4, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_8x4_ssse3,
+                aom_smooth_predictor_8x4_ssse3,
                 aom_smooth_v_predictor_8x4_ssse3,
                 aom_smooth_h_predictor_8x4_ssse3)
-INTRA_PRED_TEST(SSSE3, TX_8X16, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_8x16_ssse3, aom_smooth_predictor_8x16_ssse3,
+INTRA_PRED_TEST(SSSE3, TX_8X16, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_8x16_ssse3,
+                aom_smooth_predictor_8x16_ssse3,
                 aom_smooth_v_predictor_8x16_ssse3,
                 aom_smooth_h_predictor_8x16_ssse3)
-INTRA_PRED_TEST(SSSE3, TX_8X32, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_8x32_ssse3, aom_smooth_predictor_8x32_ssse3,
+INTRA_PRED_TEST(SSSE3, TX_8X32, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_8x32_ssse3,
+                aom_smooth_predictor_8x32_ssse3,
                 aom_smooth_v_predictor_8x32_ssse3,
                 aom_smooth_h_predictor_8x32_ssse3)
 #endif  // HAVE_SSSE3
 
 #if HAVE_DSPR2
-INTRA_PRED_TEST(DSPR2, TX_8X8, aom_dc_predictor_8x8_dspr2, NULL, NULL, NULL,
-                NULL, aom_h_predictor_8x8_dspr2, NULL, NULL, NULL, NULL)
+INTRA_PRED_TEST(DSPR2, TX_8X8, aom_dc_predictor_8x8_dspr2, nullptr, nullptr,
+                nullptr, nullptr, aom_h_predictor_8x8_dspr2, nullptr, nullptr,
+                nullptr, nullptr)
 #endif  // HAVE_DSPR2
 
 #if HAVE_NEON
@@ -564,16 +574,18 @@
                 aom_h_predictor_8x8_neon, aom_paeth_predictor_8x8_neon,
                 aom_smooth_predictor_8x8_neon, aom_smooth_v_predictor_8x8_neon,
                 aom_smooth_h_predictor_8x8_neon)
-INTRA_PRED_TEST(NEON, TX_8X4, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_8x4_neon, aom_smooth_predictor_8x4_neon,
-                aom_smooth_v_predictor_8x4_neon,
+INTRA_PRED_TEST(NEON, TX_8X4, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_8x4_neon,
+                aom_smooth_predictor_8x4_neon, aom_smooth_v_predictor_8x4_neon,
                 aom_smooth_h_predictor_8x4_neon)
-INTRA_PRED_TEST(NEON, TX_8X16, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_8x16_neon, aom_smooth_predictor_8x16_neon,
+INTRA_PRED_TEST(NEON, TX_8X16, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_8x16_neon,
+                aom_smooth_predictor_8x16_neon,
                 aom_smooth_v_predictor_8x16_neon,
                 aom_smooth_h_predictor_8x16_neon)
-INTRA_PRED_TEST(NEON, TX_8X32, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_8x32_neon, aom_smooth_predictor_8x32_neon,
+INTRA_PRED_TEST(NEON, TX_8X32, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_8x32_neon,
+                aom_smooth_predictor_8x32_neon,
                 aom_smooth_v_predictor_8x32_neon,
                 aom_smooth_h_predictor_8x32_neon)
 #endif  // HAVE_NEON
@@ -582,7 +594,7 @@
 INTRA_PRED_TEST(MSA, TX_8X8, aom_dc_predictor_8x8_msa,
                 aom_dc_left_predictor_8x8_msa, aom_dc_top_predictor_8x8_msa,
                 aom_dc_128_predictor_8x8_msa, aom_v_predictor_8x8_msa,
-                aom_h_predictor_8x8_msa, NULL, NULL, NULL, NULL)
+                aom_h_predictor_8x8_msa, nullptr, nullptr, nullptr, nullptr)
 #endif  // HAVE_MSA
 
 // -----------------------------------------------------------------------------
@@ -624,67 +636,74 @@
                 aom_dc_left_predictor_16x16_sse2,
                 aom_dc_top_predictor_16x16_sse2,
                 aom_dc_128_predictor_16x16_sse2, aom_v_predictor_16x16_sse2,
-                aom_h_predictor_16x16_sse2, NULL, NULL, NULL, NULL)
+                aom_h_predictor_16x16_sse2, nullptr, nullptr, nullptr, nullptr)
 INTRA_PRED_TEST(SSE2, TX_16X8, aom_dc_predictor_16x8_sse2,
                 aom_dc_left_predictor_16x8_sse2, aom_dc_top_predictor_16x8_sse2,
                 aom_dc_128_predictor_16x8_sse2, aom_v_predictor_16x8_sse2,
-                aom_h_predictor_16x8_sse2, NULL, NULL, NULL, NULL)
+                aom_h_predictor_16x8_sse2, nullptr, nullptr, nullptr, nullptr)
 INTRA_PRED_TEST(SSE2, TX_16X32, aom_dc_predictor_16x32_sse2,
                 aom_dc_left_predictor_16x32_sse2,
                 aom_dc_top_predictor_16x32_sse2,
                 aom_dc_128_predictor_16x32_sse2, aom_v_predictor_16x32_sse2,
-                aom_h_predictor_16x32_sse2, NULL, NULL, NULL, NULL)
+                aom_h_predictor_16x32_sse2, nullptr, nullptr, nullptr, nullptr)
 INTRA_PRED_TEST(SSE2, TX_16X64, aom_dc_predictor_16x64_sse2,
                 aom_dc_left_predictor_16x64_sse2,
                 aom_dc_top_predictor_16x64_sse2,
                 aom_dc_128_predictor_16x64_sse2, aom_v_predictor_16x64_sse2,
-                aom_h_predictor_16x64_sse2, NULL, NULL, NULL, NULL)
+                aom_h_predictor_16x64_sse2, nullptr, nullptr, nullptr, nullptr)
 INTRA_PRED_TEST(SSE2, TX_16X4, aom_dc_predictor_16x4_sse2,
                 aom_dc_left_predictor_16x4_sse2, aom_dc_top_predictor_16x4_sse2,
                 aom_dc_128_predictor_16x4_sse2, aom_v_predictor_16x4_sse2,
-                aom_h_predictor_16x4_sse2, NULL, NULL, NULL, NULL)
+                aom_h_predictor_16x4_sse2, nullptr, nullptr, nullptr, nullptr)
 #endif  // HAVE_SSE2
 
 #if HAVE_SSSE3
-INTRA_PRED_TEST(SSSE3, TX_16X16, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_16x16_ssse3,
+INTRA_PRED_TEST(SSSE3, TX_16X16, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_16x16_ssse3,
                 aom_smooth_predictor_16x16_ssse3,
                 aom_smooth_v_predictor_16x16_ssse3,
                 aom_smooth_h_predictor_16x16_ssse3)
-INTRA_PRED_TEST(SSSE3, TX_16X8, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_16x8_ssse3, aom_smooth_predictor_16x8_ssse3,
+INTRA_PRED_TEST(SSSE3, TX_16X8, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_16x8_ssse3,
+                aom_smooth_predictor_16x8_ssse3,
                 aom_smooth_v_predictor_16x8_ssse3,
                 aom_smooth_h_predictor_16x8_ssse3)
-INTRA_PRED_TEST(SSSE3, TX_16X32, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_16x32_ssse3,
+INTRA_PRED_TEST(SSSE3, TX_16X32, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_16x32_ssse3,
                 aom_smooth_predictor_16x32_ssse3,
                 aom_smooth_v_predictor_16x32_ssse3,
                 aom_smooth_h_predictor_16x32_ssse3)
-INTRA_PRED_TEST(SSSE3, TX_16X64, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_16x64_ssse3,
+INTRA_PRED_TEST(SSSE3, TX_16X64, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_16x64_ssse3,
                 aom_smooth_predictor_16x64_ssse3,
                 aom_smooth_v_predictor_16x64_ssse3,
                 aom_smooth_h_predictor_16x64_ssse3)
-INTRA_PRED_TEST(SSSE3, TX_16X4, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_16x4_ssse3, aom_smooth_predictor_16x4_ssse3,
+INTRA_PRED_TEST(SSSE3, TX_16X4, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_16x4_ssse3,
+                aom_smooth_predictor_16x4_ssse3,
                 aom_smooth_v_predictor_16x4_ssse3,
                 aom_smooth_h_predictor_16x4_ssse3)
 #endif  // HAVE_SSSE3
 
 #if HAVE_AVX2
-INTRA_PRED_TEST(AVX2, TX_16X16, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_16x16_avx2, NULL, NULL, NULL)
-INTRA_PRED_TEST(AVX2, TX_16X8, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_16x8_avx2, NULL, NULL, NULL)
-INTRA_PRED_TEST(AVX2, TX_16X32, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_16x32_avx2, NULL, NULL, NULL)
-INTRA_PRED_TEST(AVX2, TX_16X64, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_16x64_avx2, NULL, NULL, NULL)
+INTRA_PRED_TEST(AVX2, TX_16X16, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_16x16_avx2, nullptr, nullptr,
+                nullptr)
+INTRA_PRED_TEST(AVX2, TX_16X8, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_16x8_avx2, nullptr, nullptr,
+                nullptr)
+INTRA_PRED_TEST(AVX2, TX_16X32, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_16x32_avx2, nullptr, nullptr,
+                nullptr)
+INTRA_PRED_TEST(AVX2, TX_16X64, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_16x64_avx2, nullptr, nullptr,
+                nullptr)
 #endif  // HAVE_AVX2
 
 #if HAVE_DSPR2
-INTRA_PRED_TEST(DSPR2, TX_16X16, aom_dc_predictor_16x16_dspr2, NULL, NULL, NULL,
-                NULL, aom_h_predictor_16x16_dspr2, NULL, NULL, NULL, NULL)
+INTRA_PRED_TEST(DSPR2, TX_16X16, aom_dc_predictor_16x16_dspr2, nullptr, nullptr,
+                nullptr, nullptr, aom_h_predictor_16x16_dspr2, nullptr, nullptr,
+                nullptr, nullptr)
 #endif  // HAVE_DSPR2
 
 #if HAVE_NEON
@@ -696,20 +715,24 @@
                 aom_smooth_predictor_16x16_neon,
                 aom_smooth_v_predictor_16x16_neon,
                 aom_smooth_h_predictor_16x16_neon)
-INTRA_PRED_TEST(NEON, TX_16X8, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_16x8_neon, aom_smooth_predictor_16x8_neon,
+INTRA_PRED_TEST(NEON, TX_16X8, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_16x8_neon,
+                aom_smooth_predictor_16x8_neon,
                 aom_smooth_v_predictor_16x8_neon,
                 aom_smooth_h_predictor_16x8_neon)
-INTRA_PRED_TEST(NEON, TX_16X32, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_16x32_neon, aom_smooth_predictor_16x32_neon,
+INTRA_PRED_TEST(NEON, TX_16X32, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_16x32_neon,
+                aom_smooth_predictor_16x32_neon,
                 aom_smooth_v_predictor_16x32_neon,
                 aom_smooth_h_predictor_16x32_neon)
-INTRA_PRED_TEST(NEON, TX_16X4, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_16x4_neon, aom_smooth_predictor_16x4_neon,
+INTRA_PRED_TEST(NEON, TX_16X4, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_16x4_neon,
+                aom_smooth_predictor_16x4_neon,
                 aom_smooth_v_predictor_16x4_neon,
                 aom_smooth_h_predictor_16x4_neon)
-INTRA_PRED_TEST(NEON, TX_16X64, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_16x64_neon, aom_smooth_predictor_16x64_neon,
+INTRA_PRED_TEST(NEON, TX_16X64, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_16x64_neon,
+                aom_smooth_predictor_16x64_neon,
                 aom_smooth_v_predictor_16x64_neon,
                 aom_smooth_h_predictor_16x64_neon)
 #endif  // HAVE_NEON
@@ -718,7 +741,7 @@
 INTRA_PRED_TEST(MSA, TX_16X16, aom_dc_predictor_16x16_msa,
                 aom_dc_left_predictor_16x16_msa, aom_dc_top_predictor_16x16_msa,
                 aom_dc_128_predictor_16x16_msa, aom_v_predictor_16x16_msa,
-                aom_h_predictor_16x16_msa, NULL, NULL, NULL, NULL)
+                aom_h_predictor_16x16_msa, nullptr, nullptr, nullptr, nullptr)
 #endif  // HAVE_MSA
 
 // -----------------------------------------------------------------------------
@@ -754,41 +777,42 @@
                 aom_dc_left_predictor_32x32_sse2,
                 aom_dc_top_predictor_32x32_sse2,
                 aom_dc_128_predictor_32x32_sse2, aom_v_predictor_32x32_sse2,
-                aom_h_predictor_32x32_sse2, NULL, NULL, NULL, NULL)
+                aom_h_predictor_32x32_sse2, nullptr, nullptr, nullptr, nullptr)
 INTRA_PRED_TEST(SSE2, TX_32X16, aom_dc_predictor_32x16_sse2,
                 aom_dc_left_predictor_32x16_sse2,
                 aom_dc_top_predictor_32x16_sse2,
                 aom_dc_128_predictor_32x16_sse2, aom_v_predictor_32x16_sse2,
-                aom_h_predictor_32x16_sse2, NULL, NULL, NULL, NULL)
+                aom_h_predictor_32x16_sse2, nullptr, nullptr, nullptr, nullptr)
 INTRA_PRED_TEST(SSE2, TX_32X64, aom_dc_predictor_32x64_sse2,
                 aom_dc_left_predictor_32x64_sse2,
                 aom_dc_top_predictor_32x64_sse2,
                 aom_dc_128_predictor_32x64_sse2, aom_v_predictor_32x64_sse2,
-                aom_h_predictor_32x64_sse2, NULL, NULL, NULL, NULL)
+                aom_h_predictor_32x64_sse2, nullptr, nullptr, nullptr, nullptr)
 INTRA_PRED_TEST(SSE2, TX_32X8, aom_dc_predictor_32x8_sse2,
                 aom_dc_left_predictor_32x8_sse2, aom_dc_top_predictor_32x8_sse2,
                 aom_dc_128_predictor_32x8_sse2, aom_v_predictor_32x8_sse2,
-                aom_h_predictor_32x8_sse2, NULL, NULL, NULL, NULL)
+                aom_h_predictor_32x8_sse2, nullptr, nullptr, nullptr, nullptr)
 #endif  // HAVE_SSE2
 
 #if HAVE_SSSE3
-INTRA_PRED_TEST(SSSE3, TX_32X32, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_32x32_ssse3,
+INTRA_PRED_TEST(SSSE3, TX_32X32, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_32x32_ssse3,
                 aom_smooth_predictor_32x32_ssse3,
                 aom_smooth_v_predictor_32x32_ssse3,
                 aom_smooth_h_predictor_32x32_ssse3)
-INTRA_PRED_TEST(SSSE3, TX_32X16, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_32x16_ssse3,
+INTRA_PRED_TEST(SSSE3, TX_32X16, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_32x16_ssse3,
                 aom_smooth_predictor_32x16_ssse3,
                 aom_smooth_v_predictor_32x16_ssse3,
                 aom_smooth_h_predictor_32x16_ssse3)
-INTRA_PRED_TEST(SSSE3, TX_32X64, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_32x64_ssse3,
+INTRA_PRED_TEST(SSSE3, TX_32X64, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_32x64_ssse3,
                 aom_smooth_predictor_32x64_ssse3,
                 aom_smooth_v_predictor_32x64_ssse3,
                 aom_smooth_h_predictor_32x64_ssse3)
-INTRA_PRED_TEST(SSSE3, TX_32X8, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_32x8_ssse3, aom_smooth_predictor_32x8_ssse3,
+INTRA_PRED_TEST(SSSE3, TX_32X8, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_32x8_ssse3,
+                aom_smooth_predictor_32x8_ssse3,
                 aom_smooth_v_predictor_32x8_ssse3,
                 aom_smooth_h_predictor_32x8_ssse3)
 #endif  // HAVE_SSSE3
@@ -799,17 +823,19 @@
                 aom_dc_top_predictor_32x32_avx2,
                 aom_dc_128_predictor_32x32_avx2, aom_v_predictor_32x32_avx2,
                 aom_h_predictor_32x32_avx2, aom_paeth_predictor_32x32_avx2,
-                NULL, NULL, NULL)
+                nullptr, nullptr, nullptr)
 INTRA_PRED_TEST(AVX2, TX_32X16, aom_dc_predictor_32x16_avx2,
                 aom_dc_left_predictor_32x16_avx2,
                 aom_dc_top_predictor_32x16_avx2,
                 aom_dc_128_predictor_32x16_avx2, aom_v_predictor_32x16_avx2,
-                NULL, aom_paeth_predictor_32x16_avx2, NULL, NULL, NULL)
+                nullptr, aom_paeth_predictor_32x16_avx2, nullptr, nullptr,
+                nullptr)
 INTRA_PRED_TEST(AVX2, TX_32X64, aom_dc_predictor_32x64_avx2,
                 aom_dc_left_predictor_32x64_avx2,
                 aom_dc_top_predictor_32x64_avx2,
                 aom_dc_128_predictor_32x64_avx2, aom_v_predictor_32x64_avx2,
-                NULL, aom_paeth_predictor_32x64_avx2, NULL, NULL, NULL)
+                nullptr, aom_paeth_predictor_32x64_avx2, nullptr, nullptr,
+                nullptr)
 #endif  // HAVE_AVX2
 
 #if HAVE_NEON
@@ -821,16 +847,19 @@
                 aom_smooth_predictor_32x32_neon,
                 aom_smooth_v_predictor_32x32_neon,
                 aom_smooth_h_predictor_32x32_neon)
-INTRA_PRED_TEST(NEON, TX_32X16, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_32x16_neon, aom_smooth_predictor_32x16_neon,
+INTRA_PRED_TEST(NEON, TX_32X16, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_32x16_neon,
+                aom_smooth_predictor_32x16_neon,
                 aom_smooth_v_predictor_32x16_neon,
                 aom_smooth_h_predictor_32x16_neon)
-INTRA_PRED_TEST(NEON, TX_32X64, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_32x64_neon, aom_smooth_predictor_32x64_neon,
+INTRA_PRED_TEST(NEON, TX_32X64, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_32x64_neon,
+                aom_smooth_predictor_32x64_neon,
                 aom_smooth_v_predictor_32x64_neon,
                 aom_smooth_h_predictor_32x64_neon)
-INTRA_PRED_TEST(NEON, TX_32X8, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_32x8_neon, aom_smooth_predictor_32x8_neon,
+INTRA_PRED_TEST(NEON, TX_32X8, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_32x8_neon,
+                aom_smooth_predictor_32x8_neon,
                 aom_smooth_v_predictor_32x8_neon,
                 aom_smooth_h_predictor_32x8_neon)
 #endif  // HAVE_NEON
@@ -839,7 +868,7 @@
 INTRA_PRED_TEST(MSA, TX_32X32, aom_dc_predictor_32x32_msa,
                 aom_dc_left_predictor_32x32_msa, aom_dc_top_predictor_32x32_msa,
                 aom_dc_128_predictor_32x32_msa, aom_v_predictor_32x32_msa,
-                aom_h_predictor_32x32_msa, NULL, NULL, NULL, NULL)
+                aom_h_predictor_32x32_msa, nullptr, nullptr, nullptr, nullptr)
 #endif  // HAVE_MSA
 
 // -----------------------------------------------------------------------------
@@ -869,32 +898,32 @@
                 aom_dc_left_predictor_64x64_sse2,
                 aom_dc_top_predictor_64x64_sse2,
                 aom_dc_128_predictor_64x64_sse2, aom_v_predictor_64x64_sse2,
-                aom_h_predictor_64x64_sse2, NULL, NULL, NULL, NULL)
+                aom_h_predictor_64x64_sse2, nullptr, nullptr, nullptr, nullptr)
 INTRA_PRED_TEST(SSE2, TX_64X32, aom_dc_predictor_64x32_sse2,
                 aom_dc_left_predictor_64x32_sse2,
                 aom_dc_top_predictor_64x32_sse2,
                 aom_dc_128_predictor_64x32_sse2, aom_v_predictor_64x32_sse2,
-                aom_h_predictor_64x32_sse2, NULL, NULL, NULL, NULL)
+                aom_h_predictor_64x32_sse2, nullptr, nullptr, nullptr, nullptr)
 INTRA_PRED_TEST(SSE2, TX_64X16, aom_dc_predictor_64x16_sse2,
                 aom_dc_left_predictor_64x16_sse2,
                 aom_dc_top_predictor_64x16_sse2,
                 aom_dc_128_predictor_64x16_sse2, aom_v_predictor_64x16_sse2,
-                aom_h_predictor_64x16_sse2, NULL, NULL, NULL, NULL)
+                aom_h_predictor_64x16_sse2, nullptr, nullptr, nullptr, nullptr)
 #endif
 
 #if HAVE_SSSE3
-INTRA_PRED_TEST(SSSE3, TX_64X64, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_64x64_ssse3,
+INTRA_PRED_TEST(SSSE3, TX_64X64, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_64x64_ssse3,
                 aom_smooth_predictor_64x64_ssse3,
                 aom_smooth_v_predictor_64x64_ssse3,
                 aom_smooth_h_predictor_64x64_ssse3)
-INTRA_PRED_TEST(SSSE3, TX_64X32, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_64x32_ssse3,
+INTRA_PRED_TEST(SSSE3, TX_64X32, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_64x32_ssse3,
                 aom_smooth_predictor_64x32_ssse3,
                 aom_smooth_v_predictor_64x32_ssse3,
                 aom_smooth_h_predictor_64x32_ssse3)
-INTRA_PRED_TEST(SSSE3, TX_64X16, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_64x16_ssse3,
+INTRA_PRED_TEST(SSSE3, TX_64X16, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_64x16_ssse3,
                 aom_smooth_predictor_64x16_ssse3,
                 aom_smooth_v_predictor_64x16_ssse3,
                 aom_smooth_h_predictor_64x16_ssse3)
@@ -905,30 +934,36 @@
                 aom_dc_left_predictor_64x64_avx2,
                 aom_dc_top_predictor_64x64_avx2,
                 aom_dc_128_predictor_64x64_avx2, aom_v_predictor_64x64_avx2,
-                NULL, aom_paeth_predictor_64x64_avx2, NULL, NULL, NULL)
+                nullptr, aom_paeth_predictor_64x64_avx2, nullptr, nullptr,
+                nullptr)
 INTRA_PRED_TEST(AVX2, TX_64X32, aom_dc_predictor_64x32_avx2,
                 aom_dc_left_predictor_64x32_avx2,
                 aom_dc_top_predictor_64x32_avx2,
                 aom_dc_128_predictor_64x32_avx2, aom_v_predictor_64x32_avx2,
-                NULL, aom_paeth_predictor_64x32_avx2, NULL, NULL, NULL)
+                nullptr, aom_paeth_predictor_64x32_avx2, nullptr, nullptr,
+                nullptr)
 INTRA_PRED_TEST(AVX2, TX_64X16, aom_dc_predictor_64x16_avx2,
                 aom_dc_left_predictor_64x16_avx2,
                 aom_dc_top_predictor_64x16_avx2,
                 aom_dc_128_predictor_64x16_avx2, aom_v_predictor_64x16_avx2,
-                NULL, aom_paeth_predictor_64x16_avx2, NULL, NULL, NULL)
+                nullptr, aom_paeth_predictor_64x16_avx2, nullptr, nullptr,
+                nullptr)
 #endif
 
 #if HAVE_NEON
-INTRA_PRED_TEST(NEON, TX_64X64, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_64x64_neon, aom_smooth_predictor_64x64_neon,
+INTRA_PRED_TEST(NEON, TX_64X64, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_64x64_neon,
+                aom_smooth_predictor_64x64_neon,
                 aom_smooth_v_predictor_64x64_neon,
                 aom_smooth_h_predictor_64x64_neon)
-INTRA_PRED_TEST(NEON, TX_64X32, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_64x32_neon, aom_smooth_predictor_64x32_neon,
+INTRA_PRED_TEST(NEON, TX_64X32, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_64x32_neon,
+                aom_smooth_predictor_64x32_neon,
                 aom_smooth_v_predictor_64x32_neon,
                 aom_smooth_h_predictor_64x32_neon)
-INTRA_PRED_TEST(NEON, TX_64X16, NULL, NULL, NULL, NULL, NULL, NULL,
-                aom_paeth_predictor_64x16_neon, aom_smooth_predictor_64x16_neon,
+INTRA_PRED_TEST(NEON, TX_64X16, nullptr, nullptr, nullptr, nullptr, nullptr,
+                nullptr, aom_paeth_predictor_64x16_neon,
+                aom_smooth_predictor_64x16_neon,
                 aom_smooth_v_predictor_64x16_neon,
                 aom_smooth_h_predictor_64x16_neon)
 #endif  // HAVE_NEON
@@ -956,7 +991,7 @@
   intra_pred_test_mem.Init(block_width, block_height, bd);
 
   for (int k = 0; k < kNumAv1IntraFuncs; ++k) {
-    if (pred_funcs[k] == NULL) continue;
+    if (pred_funcs[k] == nullptr) continue;
     memcpy(intra_pred_test_mem.src, intra_pred_test_mem.ref_src,
            sizeof(intra_pred_test_mem.src));
     aom_usec_timer timer;
@@ -1267,30 +1302,32 @@
                        aom_highbd_dc_top_predictor_4x4_sse2,
                        aom_highbd_dc_128_predictor_4x4_sse2,
                        aom_highbd_v_predictor_4x4_sse2,
-                       aom_highbd_h_predictor_4x4_sse2, NULL, NULL, NULL, NULL)
+                       aom_highbd_h_predictor_4x4_sse2, nullptr, nullptr,
+                       nullptr, nullptr)
 
 HIGHBD_INTRA_PRED_TEST(SSE2, TX_4X8, aom_highbd_dc_predictor_4x8_sse2,
                        aom_highbd_dc_left_predictor_4x8_sse2,
                        aom_highbd_dc_top_predictor_4x8_sse2,
                        aom_highbd_dc_128_predictor_4x8_sse2,
                        aom_highbd_v_predictor_4x8_sse2,
-                       aom_highbd_h_predictor_4x8_sse2, NULL, NULL, NULL, NULL)
+                       aom_highbd_h_predictor_4x8_sse2, nullptr, nullptr,
+                       nullptr, nullptr)
 #endif
 #if HAVE_NEON
-HIGHBD_INTRA_PRED_TEST(NEON, TX_4X4, aom_highbd_dc_predictor_4x4_neon, NULL,
-                       NULL, NULL, aom_highbd_v_predictor_4x4_neon, NULL,
-                       aom_highbd_paeth_predictor_4x4_neon,
+HIGHBD_INTRA_PRED_TEST(NEON, TX_4X4, aom_highbd_dc_predictor_4x4_neon, nullptr,
+                       nullptr, nullptr, aom_highbd_v_predictor_4x4_neon,
+                       nullptr, aom_highbd_paeth_predictor_4x4_neon,
                        aom_highbd_smooth_predictor_4x4_neon,
                        aom_highbd_smooth_v_predictor_4x4_neon,
                        aom_highbd_smooth_h_predictor_4x4_neon)
-HIGHBD_INTRA_PRED_TEST(NEON, TX_4X8, NULL, NULL, NULL, NULL,
-                       aom_highbd_v_predictor_4x8_neon, NULL,
+HIGHBD_INTRA_PRED_TEST(NEON, TX_4X8, nullptr, nullptr, nullptr, nullptr,
+                       aom_highbd_v_predictor_4x8_neon, nullptr,
                        aom_highbd_paeth_predictor_4x8_neon,
                        aom_highbd_smooth_predictor_4x8_neon,
                        aom_highbd_smooth_v_predictor_4x8_neon,
                        aom_highbd_smooth_h_predictor_4x8_neon)
-HIGHBD_INTRA_PRED_TEST(NEON, TX_4X16, NULL, NULL, NULL, NULL,
-                       aom_highbd_v_predictor_4x16_neon, NULL,
+HIGHBD_INTRA_PRED_TEST(NEON, TX_4X16, nullptr, nullptr, nullptr, nullptr,
+                       aom_highbd_v_predictor_4x16_neon, nullptr,
                        aom_highbd_paeth_predictor_4x16_neon,
                        aom_highbd_smooth_predictor_4x16_neon,
                        aom_highbd_smooth_v_predictor_4x16_neon,
@@ -1335,47 +1372,50 @@
                        aom_highbd_dc_top_predictor_8x8_sse2,
                        aom_highbd_dc_128_predictor_8x8_sse2,
                        aom_highbd_v_predictor_8x8_sse2,
-                       aom_highbd_h_predictor_8x8_sse2, NULL, NULL, NULL, NULL)
+                       aom_highbd_h_predictor_8x8_sse2, nullptr, nullptr,
+                       nullptr, nullptr)
 HIGHBD_INTRA_PRED_TEST(SSE2, TX_8X4, aom_highbd_dc_predictor_8x4_sse2,
                        aom_highbd_dc_left_predictor_8x4_sse2,
                        aom_highbd_dc_top_predictor_8x4_sse2,
                        aom_highbd_dc_128_predictor_8x4_sse2,
                        aom_highbd_v_predictor_8x4_sse2,
-                       aom_highbd_h_predictor_8x4_sse2, NULL, NULL, NULL, NULL)
+                       aom_highbd_h_predictor_8x4_sse2, nullptr, nullptr,
+                       nullptr, nullptr)
 HIGHBD_INTRA_PRED_TEST(SSE2, TX_8X16, aom_highbd_dc_predictor_8x16_sse2,
                        aom_highbd_dc_left_predictor_8x16_sse2,
                        aom_highbd_dc_top_predictor_8x16_sse2,
                        aom_highbd_dc_128_predictor_8x16_sse2,
                        aom_highbd_v_predictor_8x16_sse2,
-                       aom_highbd_h_predictor_8x16_sse2, NULL, NULL, NULL, NULL)
+                       aom_highbd_h_predictor_8x16_sse2, nullptr, nullptr,
+                       nullptr, nullptr)
 #endif
 
 #if HAVE_SSSE3
-HIGHBD_INTRA_PRED_TEST(SSSE3, TX_8X8, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                       NULL, NULL, NULL)
+HIGHBD_INTRA_PRED_TEST(SSSE3, TX_8X8, nullptr, nullptr, nullptr, nullptr,
+                       nullptr, nullptr, nullptr, nullptr, nullptr, nullptr)
 #endif
 
 #if HAVE_NEON
-HIGHBD_INTRA_PRED_TEST(NEON, TX_8X8, aom_highbd_dc_predictor_8x8_neon, NULL,
-                       NULL, NULL, aom_highbd_v_predictor_8x8_neon, NULL,
-                       aom_highbd_paeth_predictor_8x8_neon,
+HIGHBD_INTRA_PRED_TEST(NEON, TX_8X8, aom_highbd_dc_predictor_8x8_neon, nullptr,
+                       nullptr, nullptr, aom_highbd_v_predictor_8x8_neon,
+                       nullptr, aom_highbd_paeth_predictor_8x8_neon,
                        aom_highbd_smooth_predictor_8x8_neon,
                        aom_highbd_smooth_v_predictor_8x8_neon,
                        aom_highbd_smooth_h_predictor_8x8_neon)
-HIGHBD_INTRA_PRED_TEST(NEON, TX_8X4, NULL, NULL, NULL, NULL,
-                       aom_highbd_v_predictor_8x4_neon, NULL,
+HIGHBD_INTRA_PRED_TEST(NEON, TX_8X4, nullptr, nullptr, nullptr, nullptr,
+                       aom_highbd_v_predictor_8x4_neon, nullptr,
                        aom_highbd_paeth_predictor_8x4_neon,
                        aom_highbd_smooth_predictor_8x4_neon,
                        aom_highbd_smooth_v_predictor_8x4_neon,
                        aom_highbd_smooth_h_predictor_8x4_neon)
-HIGHBD_INTRA_PRED_TEST(NEON, TX_8X16, NULL, NULL, NULL, NULL,
-                       aom_highbd_v_predictor_8x16_neon, NULL,
+HIGHBD_INTRA_PRED_TEST(NEON, TX_8X16, nullptr, nullptr, nullptr, nullptr,
+                       aom_highbd_v_predictor_8x16_neon, nullptr,
                        aom_highbd_paeth_predictor_8x16_neon,
                        aom_highbd_smooth_predictor_8x16_neon,
                        aom_highbd_smooth_v_predictor_8x16_neon,
                        aom_highbd_smooth_h_predictor_8x16_neon)
-HIGHBD_INTRA_PRED_TEST(NEON, TX_8X32, NULL, NULL, NULL, NULL,
-                       aom_highbd_v_predictor_8x32_neon, NULL,
+HIGHBD_INTRA_PRED_TEST(NEON, TX_8X32, nullptr, nullptr, nullptr, nullptr,
+                       aom_highbd_v_predictor_8x32_neon, nullptr,
                        aom_highbd_paeth_predictor_8x32_neon,
                        aom_highbd_smooth_predictor_8x32_neon,
                        aom_highbd_smooth_v_predictor_8x32_neon,
@@ -1427,66 +1467,68 @@
                        aom_highbd_dc_top_predictor_16x16_sse2,
                        aom_highbd_dc_128_predictor_16x16_sse2,
                        aom_highbd_v_predictor_16x16_sse2,
-                       aom_highbd_h_predictor_16x16_sse2, NULL, NULL, NULL,
-                       NULL)
+                       aom_highbd_h_predictor_16x16_sse2, nullptr, nullptr,
+                       nullptr, nullptr)
 HIGHBD_INTRA_PRED_TEST(SSE2, TX_16X8, aom_highbd_dc_predictor_16x8_sse2,
                        aom_highbd_dc_left_predictor_16x8_sse2,
                        aom_highbd_dc_top_predictor_16x8_sse2,
                        aom_highbd_dc_128_predictor_16x8_sse2,
                        aom_highbd_v_predictor_16x8_sse2,
-                       aom_highbd_h_predictor_16x8_sse2, NULL, NULL, NULL, NULL)
+                       aom_highbd_h_predictor_16x8_sse2, nullptr, nullptr,
+                       nullptr, nullptr)
 HIGHBD_INTRA_PRED_TEST(SSE2, TX_16X32, aom_highbd_dc_predictor_16x32_sse2,
                        aom_highbd_dc_left_predictor_16x32_sse2,
                        aom_highbd_dc_top_predictor_16x32_sse2,
                        aom_highbd_dc_128_predictor_16x32_sse2,
                        aom_highbd_v_predictor_16x32_sse2,
-                       aom_highbd_h_predictor_16x32_sse2, NULL, NULL, NULL,
-                       NULL)
+                       aom_highbd_h_predictor_16x32_sse2, nullptr, nullptr,
+                       nullptr, nullptr)
 #endif
 
 #if HAVE_SSSE3
-HIGHBD_INTRA_PRED_TEST(SSSE3, TX_16X16, NULL, NULL, NULL, NULL, NULL, NULL,
-                       NULL, NULL, NULL, NULL)
+HIGHBD_INTRA_PRED_TEST(SSSE3, TX_16X16, nullptr, nullptr, nullptr, nullptr,
+                       nullptr, nullptr, nullptr, nullptr, nullptr, nullptr)
 #endif
 
 #if HAVE_AVX2
-HIGHBD_INTRA_PRED_TEST(AVX2, TX_16X16, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                       NULL, NULL, NULL)
+HIGHBD_INTRA_PRED_TEST(AVX2, TX_16X16, nullptr, nullptr, nullptr, nullptr,
+                       nullptr, nullptr, nullptr, nullptr, nullptr, nullptr)
 
-HIGHBD_INTRA_PRED_TEST(AVX2, TX_16X8, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                       NULL, NULL, NULL)
+HIGHBD_INTRA_PRED_TEST(AVX2, TX_16X8, nullptr, nullptr, nullptr, nullptr,
+                       nullptr, nullptr, nullptr, nullptr, nullptr, nullptr)
 
-HIGHBD_INTRA_PRED_TEST(AVX2, TX_16X32, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                       NULL, NULL, NULL)
+HIGHBD_INTRA_PRED_TEST(AVX2, TX_16X32, nullptr, nullptr, nullptr, nullptr,
+                       nullptr, nullptr, nullptr, nullptr, nullptr, nullptr)
 #endif
 
 #if HAVE_NEON
-HIGHBD_INTRA_PRED_TEST(NEON, TX_16X16, aom_highbd_dc_predictor_16x16_neon, NULL,
-                       NULL, NULL, aom_highbd_v_predictor_16x16_neon, NULL,
+HIGHBD_INTRA_PRED_TEST(NEON, TX_16X16, aom_highbd_dc_predictor_16x16_neon,
+                       nullptr, nullptr, nullptr,
+                       aom_highbd_v_predictor_16x16_neon, nullptr,
                        aom_highbd_paeth_predictor_16x16_neon,
                        aom_highbd_smooth_predictor_16x16_neon,
                        aom_highbd_smooth_v_predictor_16x16_neon,
                        aom_highbd_smooth_h_predictor_16x16_neon)
-HIGHBD_INTRA_PRED_TEST(NEON, TX_16X8, NULL, NULL, NULL, NULL,
-                       aom_highbd_v_predictor_16x8_neon, NULL,
+HIGHBD_INTRA_PRED_TEST(NEON, TX_16X8, nullptr, nullptr, nullptr, nullptr,
+                       aom_highbd_v_predictor_16x8_neon, nullptr,
                        aom_highbd_paeth_predictor_16x8_neon,
                        aom_highbd_smooth_predictor_16x8_neon,
                        aom_highbd_smooth_v_predictor_16x8_neon,
                        aom_highbd_smooth_h_predictor_16x8_neon)
-HIGHBD_INTRA_PRED_TEST(NEON, TX_16X32, NULL, NULL, NULL, NULL,
-                       aom_highbd_v_predictor_16x32_neon, NULL,
+HIGHBD_INTRA_PRED_TEST(NEON, TX_16X32, nullptr, nullptr, nullptr, nullptr,
+                       aom_highbd_v_predictor_16x32_neon, nullptr,
                        aom_highbd_paeth_predictor_16x32_neon,
                        aom_highbd_smooth_predictor_16x32_neon,
                        aom_highbd_smooth_v_predictor_16x32_neon,
                        aom_highbd_smooth_h_predictor_16x32_neon)
-HIGHBD_INTRA_PRED_TEST(NEON, TX_16X4, NULL, NULL, NULL, NULL,
-                       aom_highbd_v_predictor_16x4_neon, NULL,
+HIGHBD_INTRA_PRED_TEST(NEON, TX_16X4, nullptr, nullptr, nullptr, nullptr,
+                       aom_highbd_v_predictor_16x4_neon, nullptr,
                        aom_highbd_paeth_predictor_16x4_neon,
                        aom_highbd_smooth_predictor_16x4_neon,
                        aom_highbd_smooth_v_predictor_16x4_neon,
                        aom_highbd_smooth_h_predictor_16x4_neon)
-HIGHBD_INTRA_PRED_TEST(NEON, TX_16X64, NULL, NULL, NULL, NULL,
-                       aom_highbd_v_predictor_16x64_neon, NULL,
+HIGHBD_INTRA_PRED_TEST(NEON, TX_16X64, nullptr, nullptr, nullptr, nullptr,
+                       aom_highbd_v_predictor_16x64_neon, nullptr,
                        aom_highbd_paeth_predictor_16x64_neon,
                        aom_highbd_smooth_predictor_16x64_neon,
                        aom_highbd_smooth_v_predictor_16x64_neon,
@@ -1531,51 +1573,52 @@
                        aom_highbd_dc_top_predictor_32x32_sse2,
                        aom_highbd_dc_128_predictor_32x32_sse2,
                        aom_highbd_v_predictor_32x32_sse2,
-                       aom_highbd_h_predictor_32x32_sse2, NULL, NULL, NULL,
-                       NULL)
+                       aom_highbd_h_predictor_32x32_sse2, nullptr, nullptr,
+                       nullptr, nullptr)
 HIGHBD_INTRA_PRED_TEST(SSE2, TX_32X16, aom_highbd_dc_predictor_32x16_sse2,
                        aom_highbd_dc_left_predictor_32x16_sse2,
                        aom_highbd_dc_top_predictor_32x16_sse2,
                        aom_highbd_dc_128_predictor_32x16_sse2,
                        aom_highbd_v_predictor_32x16_sse2,
-                       aom_highbd_h_predictor_32x16_sse2, NULL, NULL, NULL,
-                       NULL)
+                       aom_highbd_h_predictor_32x16_sse2, nullptr, nullptr,
+                       nullptr, nullptr)
 #endif
 
 #if HAVE_SSSE3
-HIGHBD_INTRA_PRED_TEST(SSSE3, TX_32X32, NULL, NULL, NULL, NULL, NULL, NULL,
-                       NULL, NULL, NULL, NULL)
+HIGHBD_INTRA_PRED_TEST(SSSE3, TX_32X32, nullptr, nullptr, nullptr, nullptr,
+                       nullptr, nullptr, nullptr, nullptr, nullptr, nullptr)
 #endif
 
 #if HAVE_AVX2
-HIGHBD_INTRA_PRED_TEST(AVX2, TX_32X32, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                       NULL, NULL, NULL)
+HIGHBD_INTRA_PRED_TEST(AVX2, TX_32X32, nullptr, nullptr, nullptr, nullptr,
+                       nullptr, nullptr, nullptr, nullptr, nullptr, nullptr)
 
-HIGHBD_INTRA_PRED_TEST(AVX2, TX_32X16, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                       NULL, NULL, NULL)
+HIGHBD_INTRA_PRED_TEST(AVX2, TX_32X16, nullptr, nullptr, nullptr, nullptr,
+                       nullptr, nullptr, nullptr, nullptr, nullptr, nullptr)
 #endif
 
 #if HAVE_NEON
-HIGHBD_INTRA_PRED_TEST(NEON, TX_32X32, aom_highbd_dc_predictor_32x32_neon, NULL,
-                       NULL, NULL, aom_highbd_v_predictor_32x32_neon, NULL,
+HIGHBD_INTRA_PRED_TEST(NEON, TX_32X32, aom_highbd_dc_predictor_32x32_neon,
+                       nullptr, nullptr, nullptr,
+                       aom_highbd_v_predictor_32x32_neon, nullptr,
                        aom_highbd_paeth_predictor_32x32_neon,
                        aom_highbd_smooth_predictor_32x32_neon,
                        aom_highbd_smooth_v_predictor_32x32_neon,
                        aom_highbd_smooth_h_predictor_32x32_neon)
-HIGHBD_INTRA_PRED_TEST(NEON, TX_32X16, NULL, NULL, NULL, NULL,
-                       aom_highbd_v_predictor_32x16_neon, NULL,
+HIGHBD_INTRA_PRED_TEST(NEON, TX_32X16, nullptr, nullptr, nullptr, nullptr,
+                       aom_highbd_v_predictor_32x16_neon, nullptr,
                        aom_highbd_paeth_predictor_32x16_neon,
                        aom_highbd_smooth_predictor_32x16_neon,
                        aom_highbd_smooth_v_predictor_32x16_neon,
                        aom_highbd_smooth_h_predictor_32x16_neon)
-HIGHBD_INTRA_PRED_TEST(NEON, TX_32X64, NULL, NULL, NULL, NULL,
-                       aom_highbd_v_predictor_32x64_neon, NULL,
+HIGHBD_INTRA_PRED_TEST(NEON, TX_32X64, nullptr, nullptr, nullptr, nullptr,
+                       aom_highbd_v_predictor_32x64_neon, nullptr,
                        aom_highbd_paeth_predictor_32x64_neon,
                        aom_highbd_smooth_predictor_32x64_neon,
                        aom_highbd_smooth_v_predictor_32x64_neon,
                        aom_highbd_smooth_h_predictor_32x64_neon)
-HIGHBD_INTRA_PRED_TEST(NEON, TX_32X8, NULL, NULL, NULL, NULL,
-                       aom_highbd_v_predictor_32x8_neon, NULL,
+HIGHBD_INTRA_PRED_TEST(NEON, TX_32X8, nullptr, nullptr, nullptr, nullptr,
+                       aom_highbd_v_predictor_32x8_neon, nullptr,
                        aom_highbd_paeth_predictor_32x8_neon,
                        aom_highbd_smooth_predictor_32x8_neon,
                        aom_highbd_smooth_v_predictor_32x8_neon,
@@ -1608,20 +1651,21 @@
     aom_highbd_smooth_h_predictor_64x16_c)
 
 #if HAVE_NEON
-HIGHBD_INTRA_PRED_TEST(NEON, TX_64X64, aom_highbd_dc_predictor_64x64_neon, NULL,
-                       NULL, NULL, aom_highbd_v_predictor_64x64_neon, NULL,
+HIGHBD_INTRA_PRED_TEST(NEON, TX_64X64, aom_highbd_dc_predictor_64x64_neon,
+                       nullptr, nullptr, nullptr,
+                       aom_highbd_v_predictor_64x64_neon, nullptr,
                        aom_highbd_paeth_predictor_64x64_neon,
                        aom_highbd_smooth_predictor_64x64_neon,
                        aom_highbd_smooth_v_predictor_64x64_neon,
                        aom_highbd_smooth_h_predictor_64x64_neon)
-HIGHBD_INTRA_PRED_TEST(NEON, TX_64X32, NULL, NULL, NULL, NULL,
-                       aom_highbd_v_predictor_64x32_neon, NULL,
+HIGHBD_INTRA_PRED_TEST(NEON, TX_64X32, nullptr, nullptr, nullptr, nullptr,
+                       aom_highbd_v_predictor_64x32_neon, nullptr,
                        aom_highbd_paeth_predictor_64x32_neon,
                        aom_highbd_smooth_predictor_64x32_neon,
                        aom_highbd_smooth_v_predictor_64x32_neon,
                        aom_highbd_smooth_h_predictor_64x32_neon)
-HIGHBD_INTRA_PRED_TEST(NEON, TX_64X16, NULL, NULL, NULL, NULL,
-                       aom_highbd_v_predictor_64x16_neon, NULL,
+HIGHBD_INTRA_PRED_TEST(NEON, TX_64X16, nullptr, nullptr, nullptr, nullptr,
+                       aom_highbd_v_predictor_64x16_neon, nullptr,
                        aom_highbd_paeth_predictor_64x16_neon,
                        aom_highbd_smooth_predictor_64x16_neon,
                        aom_highbd_smooth_v_predictor_64x16_neon,
diff --git a/test/test_vector_test.cc b/test/test_vector_test.cc
index 9fa2c2c..87155c7 100644
--- a/test/test_vector_test.cc
+++ b/test/test_vector_test.cc
@@ -39,7 +39,7 @@
 class TestVectorTest : public ::libaom_test::DecoderTest,
                        public ::libaom_test::CodecTestWithParam<DecodeParam> {
  protected:
-  TestVectorTest() : DecoderTest(GET_PARAM(0)), md5_file_(NULL) {}
+  TestVectorTest() : DecoderTest(GET_PARAM(0)), md5_file_(nullptr) {}
 
   virtual ~TestVectorTest() {
     if (md5_file_) fclose(md5_file_);
@@ -74,7 +74,7 @@
         (aom_img_fmt)(img.fmt & ~AOM_IMG_FMT_HIGHBITDEPTH);
     if (img.bit_depth == 8 && shifted_fmt != img.fmt) {
       aom_image_t *img_shifted =
-          aom_img_alloc(NULL, shifted_fmt, img.d_w, img.d_h, 16);
+          aom_img_alloc(nullptr, shifted_fmt, img.d_w, img.d_h, 16);
       img_shifted->bit_depth = img.bit_depth;
       img_shifted->monochrome = img.monochrome;
       aom_img_downshift(img_shifted, &img, 0);
diff --git a/test/tpl_model_test.cc b/test/tpl_model_test.cc
index e41077f..674f202 100644
--- a/test/tpl_model_test.cc
+++ b/test/tpl_model_test.cc
@@ -509,11 +509,11 @@
     const int base_q = av1_vbr_rc_info_estimate_base_q(
         bit_budget, bit_depth, vbr_rc_info.scale_factors, gf_group.size,
         gf_group.update_type, vbr_rc_info.qstep_ratio_list, stats_list.data(),
-        vbr_rc_info.q_index_list, NULL);
+        vbr_rc_info.q_index_list, nullptr);
     const int ref_base_q = find_gop_q_iterative(
         bit_budget, bit_depth, vbr_rc_info.scale_factors, gf_group.size,
         gf_group.update_type, vbr_rc_info.qstep_ratio_list, stats_list.data(),
-        vbr_rc_info.q_index_list, NULL);
+        vbr_rc_info.q_index_list, nullptr);
     if (bit_budget == 0) {
       EXPECT_EQ(base_q, 255);
     } else if (bit_budget == DBL_MAX) {
diff --git a/test/variance_test.cc b/test/variance_test.cc
index 62d510d..e96f933 100644
--- a/test/variance_test.cc
+++ b/test/variance_test.cc
@@ -383,7 +383,7 @@
 
 template <typename Func>
 struct TestParams {
-  TestParams(int log2w = 0, int log2h = 0, Func function = NULL,
+  TestParams(int log2w = 0, int log2h = 0, Func function = nullptr,
              int bit_depth_value = 0)
       : log2width(log2w), log2height(log2h), func(function) {
     use_high_bit_depth = (bit_depth_value > 0);
@@ -434,8 +434,8 @@
   virtual void TearDown() {
     aom_free(src_);
     aom_free(dst_);
-    src_ = NULL;
-    dst_ = NULL;
+    src_ = nullptr;
+    dst_ = nullptr;
   }
 
  protected:
@@ -546,8 +546,8 @@
 
     aom_free(src_);
     delete[] ref_;
-    src_ = NULL;
-    ref_ = NULL;
+    src_ = nullptr;
+    ref_ = nullptr;
   }
 
  protected:
@@ -1591,8 +1591,8 @@
   virtual void TearDown() {
     aom_free(src_);
     aom_free(dst_);
-    src_ = NULL;
-    dst_ = NULL;
+    src_ = nullptr;
+    dst_ = nullptr;
   }
 
  protected:
diff --git a/test/video_source.h b/test/video_source.h
index d17300e..742178e 100644
--- a/test/video_source.h
+++ b/test/video_source.h
@@ -41,7 +41,7 @@
 // A simple function to encapsulate cross platform retrieval of test data path
 static std::string GetDataPath() {
   const char *const data_path = getenv("LIBAOM_TEST_DATA_PATH");
-  if (data_path == NULL) {
+  if (data_path == nullptr) {
 #ifdef LIBAOM_TEST_DATA_PATH
     // In some environments, we cannot set environment variables
     // Instead, we set the data path by using a preprocessor symbol
@@ -75,10 +75,10 @@
       return fopen(fname, "wb+");
     }
   }
-  return NULL;
+  return nullptr;
 #else
   std::string temp_dir = testing::TempDir();
-  if (temp_dir.empty()) return NULL;
+  if (temp_dir.empty()) return nullptr;
   // Versions of testing::TempDir() prior to release-1.11.0-214-g5e6a5336 may
   // use the value of an environment variable without checking for a trailing
   // path delimiter.
@@ -86,12 +86,12 @@
   const char name_template[] = "libaomtest.XXXXXX";
   std::unique_ptr<char[]> temp_file_name(
       new char[temp_dir.size() + sizeof(name_template)]);
-  if (temp_file_name == nullptr) return NULL;
+  if (temp_file_name == nullptr) return nullptr;
   memcpy(temp_file_name.get(), temp_dir.data(), temp_dir.size());
   memcpy(temp_file_name.get() + temp_dir.size(), name_template,
          sizeof(name_template));
   const int fd = mkstemp(temp_file_name.get());
-  if (fd == -1) return NULL;
+  if (fd == -1) return nullptr;
   *file_name = temp_file_name.get();
   return fdopen(fd, "wb+");
 #endif
@@ -113,7 +113,7 @@
   void CloseFile() {
     if (file_) {
       fclose(file_);
-      file_ = NULL;
+      file_ = nullptr;
     }
   }
   FILE *file_;
@@ -132,7 +132,7 @@
   // Advance the cursor to the next frame
   virtual void Next() = 0;
 
-  // Get the current video frame, or NULL on End-Of-Stream.
+  // Get the current video frame, or nullptr on End-Of-Stream.
   virtual aom_image_t *img() const = 0;
 
   // Get the presentation timestamp of the current frame.
@@ -154,7 +154,7 @@
 class DummyVideoSource : public VideoSource {
  public:
   DummyVideoSource()
-      : img_(NULL), limit_(100), width_(80), height_(64),
+      : img_(nullptr), limit_(100), width_(80), height_(64),
         format_(AOM_IMG_FMT_I420) {
     ReallocImage();
   }
@@ -171,7 +171,9 @@
     FillFrame();
   }
 
-  virtual aom_image_t *img() const { return (frame_ < limit_) ? img_ : NULL; }
+  virtual aom_image_t *img() const {
+    return (frame_ < limit_) ? img_ : nullptr;
+  }
 
   // Models a stream where Timebase = 1/FPS, so pts == frame.
   virtual aom_codec_pts_t pts() const { return frame_; }
@@ -211,7 +213,7 @@
 
   void ReallocImage() {
     aom_img_free(img_);
-    img_ = aom_img_alloc(NULL, format_, width_, height_, 32);
+    img_ = aom_img_alloc(nullptr, format_, width_, height_, 32);
     ASSERT_NE(img_, nullptr);
     raw_sz_ = ((img_->w + 31) & ~31) * img_->h * img_->bps / 8;
   }
diff --git a/test/webm_video_source.h b/test/webm_video_source.h
index 61c64cc..706e596 100644
--- a/test/webm_video_source.h
+++ b/test/webm_video_source.h
@@ -27,11 +27,11 @@
  public:
   explicit WebMVideoSource(const std::string &file_name)
       : file_name_(file_name), aom_ctx_(new AvxInputContext()),
-        webm_ctx_(new WebmInputContext()), buf_(NULL), buf_sz_(0), frame_sz_(0),
-        frame_number_(0), end_of_file_(false) {}
+        webm_ctx_(new WebmInputContext()), buf_(nullptr), buf_sz_(0),
+        frame_sz_(0), frame_number_(0), end_of_file_(false) {}
 
   virtual ~WebMVideoSource() {
-    if (aom_ctx_->file != NULL) fclose(aom_ctx_->file);
+    if (aom_ctx_->file != nullptr) fclose(aom_ctx_->file);
     webm_free(webm_ctx_);
     delete aom_ctx_;
     delete webm_ctx_;
@@ -85,7 +85,9 @@
     } while (!webm_ctx_->is_key_frame && !end_of_file_);
   }
 
-  virtual const uint8_t *cxdata() const { return end_of_file_ ? NULL : buf_; }
+  virtual const uint8_t *cxdata() const {
+    return end_of_file_ ? nullptr : buf_;
+  }
   virtual size_t frame_size() const { return frame_sz_; }
   virtual unsigned int frame_number() const { return frame_number_; }
 
diff --git a/test/y4m_test.cc b/test/y4m_test.cc
index 1092c3e..515a783 100644
--- a/test/y4m_test.cc
+++ b/test/y4m_test.cc
@@ -126,11 +126,11 @@
 
 class Y4mVideoWriteTest : public Y4mVideoSourceTest {
  protected:
-  Y4mVideoWriteTest() : tmpfile_(NULL) {}
+  Y4mVideoWriteTest() : tmpfile_(nullptr) {}
 
   virtual ~Y4mVideoWriteTest() {
     delete tmpfile_;
-    input_file_ = NULL;
+    input_file_ = nullptr;
   }
 
   void ReplaceInputFile(FILE *input_file) {
@@ -192,7 +192,7 @@
   EXPECT_EQ(0, fseek(f.file(), 0, 0));
 
   y4m_input y4m;
-  EXPECT_EQ(y4m_input_open(&y4m, f.file(), NULL, 0, AOM_CSP_UNKNOWN,
+  EXPECT_EQ(y4m_input_open(&y4m, f.file(), nullptr, 0, AOM_CSP_UNKNOWN,
                            /*only_420=*/0),
             0);
   EXPECT_EQ(y4m.pic_w, 4);
@@ -221,7 +221,7 @@
   EXPECT_EQ(fseek(f, 0, 0), 0);
 
   y4m_input y4m;
-  EXPECT_EQ(y4m_input_open(&y4m, f, NULL, 0, AOM_CSP_UNKNOWN,
+  EXPECT_EQ(y4m_input_open(&y4m, f, nullptr, 0, AOM_CSP_UNKNOWN,
                            /*only_420=*/0),
             0);
   EXPECT_EQ(y4m.pic_w, 4);
@@ -248,7 +248,7 @@
   EXPECT_EQ(fseek(f, 0, 0), 0);
 
   y4m_input y4m;
-  EXPECT_EQ(y4m_input_open(&y4m, f, NULL, 0, AOM_CSP_UNKNOWN,
+  EXPECT_EQ(y4m_input_open(&y4m, f, nullptr, 0, AOM_CSP_UNKNOWN,
                            /*only_420=*/0),
             0);
   EXPECT_EQ(y4m.pic_w, 4);
diff --git a/test/y4m_video_source.h b/test/y4m_video_source.h
index 143fbc6..bf65776 100644
--- a/test/y4m_video_source.h
+++ b/test/y4m_video_source.h
@@ -24,7 +24,7 @@
 class Y4mVideoSource : public VideoSource {
  public:
   Y4mVideoSource(const std::string &file_name, unsigned int start, int limit)
-      : file_name_(file_name), input_file_(NULL), img_(new aom_image_t()),
+      : file_name_(file_name), input_file_(nullptr), img_(new aom_image_t()),
         start_(start), limit_(limit), frame_(0), framerate_numerator_(0),
         framerate_denominator_(0), y4m_() {}
 
@@ -43,7 +43,7 @@
   virtual void ReadSourceToStart() {
     ASSERT_NE(input_file_, nullptr);
     ASSERT_FALSE(
-        y4m_input_open(&y4m_, input_file_, NULL, 0, AOM_CSP_UNKNOWN, 0));
+        y4m_input_open(&y4m_, input_file_, nullptr, 0, AOM_CSP_UNKNOWN, 0));
     framerate_numerator_ = y4m_.fps_n;
     framerate_denominator_ = y4m_.fps_d;
     frame_ = 0;
@@ -64,7 +64,7 @@
   }
 
   virtual aom_image_t *img() const {
-    return (frame_ < limit_) ? img_.get() : NULL;
+    return (frame_ < limit_) ? img_.get() : nullptr;
   }
 
   // Models a stream where Timebase = 1/FPS, so pts == frame.
@@ -103,9 +103,9 @@
   void CloseSource() {
     y4m_input_close(&y4m_);
     y4m_ = y4m_input();
-    if (input_file_ != NULL) {
+    if (input_file_ != nullptr) {
       fclose(input_file_);
-      input_file_ = NULL;
+      input_file_ = nullptr;
     }
   }
 
diff --git a/test/yuv_video_source.h b/test/yuv_video_source.h
index 15ad5c2..1b898b5 100644
--- a/test/yuv_video_source.h
+++ b/test/yuv_video_source.h
@@ -28,8 +28,8 @@
   YUVVideoSource(const std::string &file_name, aom_img_fmt format,
                  unsigned int width, unsigned int height, int rate_numerator,
                  int rate_denominator, unsigned int start, int limit)
-      : file_name_(file_name), input_file_(NULL), img_(NULL), start_(start),
-        limit_(limit), frame_(0), width_(0), height_(0),
+      : file_name_(file_name), input_file_(nullptr), img_(nullptr),
+        start_(start), limit_(limit), frame_(0), width_(0), height_(0),
         format_(AOM_IMG_FMT_NONE), framerate_numerator_(rate_numerator),
         framerate_denominator_(rate_denominator) {
     // This initializes format_, raw_size_, width_, height_ and allocates img.
@@ -58,7 +58,9 @@
     FillFrame();
   }
 
-  virtual aom_image_t *img() const { return (frame_ < limit_) ? img_ : NULL; }
+  virtual aom_image_t *img() const {
+    return (frame_ < limit_) ? img_ : nullptr;
+  }
 
   // Models a stream where Timebase = 1/FPS, so pts == frame.
   virtual aom_codec_pts_t pts() const { return frame_; }
@@ -78,7 +80,7 @@
                        aom_img_fmt format) {
     if (width != width_ || height != height_ || format != format_) {
       aom_img_free(img_);
-      img_ = aom_img_alloc(NULL, format, width, height, 1);
+      img_ = aom_img_alloc(nullptr, format, width, height, 1);
       ASSERT_NE(img_, nullptr);
       width_ = width;
       height_ = height;