cosmetics: normalize include guards

use the recommended format [1] of:
<PROJECT>_<PATH>_<FILE>_H_

[1] https://google.github.io/styleguide/cppguide.html#The__define_Guard
"All header files should have #define guards to prevent multiple
inclusion. The format of the symbol name should be
<PROJECT>_<PATH>_<FILE>_H_."

Change-Id: I00a0595fc2a5fc736ab6ff3215727d6db05b10e1
diff --git a/aom/aom.h b/aom/aom.h
index c5ef251..b1cc1ec 100644
--- a/aom/aom.h
+++ b/aom/aom.h
@@ -28,8 +28,8 @@
 /*!\file
  * \brief Provides controls common to both the AOM encoder and decoder.
  */
-#ifndef AOM_AOM_H_
-#define AOM_AOM_H_
+#ifndef AOM_AOM_AOM_H_
+#define AOM_AOM_AOM_H_
 
 #include "aom/aom_codec.h"
 #include "aom/aom_image.h"
@@ -144,4 +144,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_AOM_H_
+#endif  // AOM_AOM_AOM_H_
diff --git a/aom/aom_codec.h b/aom/aom_codec.h
index 63e3586..4976fcf 100644
--- a/aom/aom_codec.h
+++ b/aom/aom_codec.h
@@ -36,8 +36,8 @@
  * Once initialized, the instance is manged using other functions from
  * the aom_codec_* family.
  */
-#ifndef AOM_AOM_CODEC_H_
-#define AOM_AOM_CODEC_H_
+#ifndef AOM_AOM_AOM_CODEC_H_
+#define AOM_AOM_AOM_CODEC_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -526,4 +526,4 @@
 #ifdef __cplusplus
 }
 #endif
-#endif  // AOM_AOM_CODEC_H_
+#endif  // AOM_AOM_AOM_CODEC_H_
diff --git a/aom/aom_decoder.h b/aom/aom_decoder.h
index 3bbdcd7..06c2dc5 100644
--- a/aom/aom_decoder.h
+++ b/aom/aom_decoder.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef AOM_AOM_DECODER_H_
-#define AOM_AOM_DECODER_H_
+#ifndef AOM_AOM_AOM_DECODER_H_
+#define AOM_AOM_AOM_DECODER_H_
 
 /*!\defgroup decoder Decoder Algorithm Interface
  * \ingroup codec
@@ -361,4 +361,4 @@
 #ifdef __cplusplus
 }
 #endif
-#endif  // AOM_AOM_DECODER_H_
+#endif  // AOM_AOM_AOM_DECODER_H_
diff --git a/aom/aom_encoder.h b/aom/aom_encoder.h
index 2d9b4eb..7b41e2e 100644
--- a/aom/aom_encoder.h
+++ b/aom/aom_encoder.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef AOM_AOM_ENCODER_H_
-#define AOM_AOM_ENCODER_H_
+#ifndef AOM_AOM_AOM_ENCODER_H_
+#define AOM_AOM_AOM_ENCODER_H_
 
 /*!\defgroup encoder Encoder Algorithm Interface
  * \ingroup codec
@@ -991,4 +991,4 @@
 #ifdef __cplusplus
 }
 #endif
-#endif  // AOM_AOM_ENCODER_H_
+#endif  // AOM_AOM_AOM_ENCODER_H_
diff --git a/aom/aom_frame_buffer.h b/aom/aom_frame_buffer.h
index b979fcf2..fba4322 100644
--- a/aom/aom_frame_buffer.h
+++ b/aom/aom_frame_buffer.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_AOM_FRAME_BUFFER_H_
-#define AOM_AOM_FRAME_BUFFER_H_
+#ifndef AOM_AOM_AOM_FRAME_BUFFER_H_
+#define AOM_AOM_AOM_FRAME_BUFFER_H_
 
 /*!\file
  * \brief Describes the decoder external frame buffer interface.
@@ -81,4 +81,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_AOM_FRAME_BUFFER_H_
+#endif  // AOM_AOM_AOM_FRAME_BUFFER_H_
diff --git a/aom/aom_image.h b/aom/aom_image.h
index b01317b3..a960127 100644
--- a/aom/aom_image.h
+++ b/aom/aom_image.h
@@ -13,8 +13,8 @@
  * \brief Describes the aom image descriptor and associated operations
  *
  */
-#ifndef AOM_AOM_IMAGE_H_
-#define AOM_AOM_IMAGE_H_
+#ifndef AOM_AOM_AOM_IMAGE_H_
+#define AOM_AOM_AOM_IMAGE_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -328,4 +328,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_AOM_IMAGE_H_
+#endif  // AOM_AOM_AOM_IMAGE_H_
diff --git a/aom/aom_integer.h b/aom/aom_integer.h
index 907d4cb..90263bd 100644
--- a/aom/aom_integer.h
+++ b/aom/aom_integer.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef AOM_AOM_INTEGER_H_
-#define AOM_AOM_INTEGER_H_
+#ifndef AOM_AOM_AOM_INTEGER_H_
+#define AOM_AOM_AOM_INTEGER_H_
 
 /* get ptrdiff_t, size_t, wchar_t, NULL */
 #include <stddef.h>
@@ -103,4 +103,4 @@
 }  // extern "C"
 #endif  // __cplusplus
 
-#endif  // AOM_AOM_INTEGER_H_
+#endif  // AOM_AOM_AOM_INTEGER_H_
diff --git a/aom/aomcx.h b/aom/aomcx.h
index cb33d02..013ddf5 100644
--- a/aom/aomcx.h
+++ b/aom/aomcx.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef AOM_AOMCX_H_
-#define AOM_AOMCX_H_
+#ifndef AOM_AOM_AOMCX_H_
+#define AOM_AOM_AOMCX_H_
 
 /*!\defgroup aom_encoder AOMedia AOM/AV1 Encoder
  * \ingroup aom
@@ -1195,4 +1195,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_AOMCX_H_
+#endif  // AOM_AOM_AOMCX_H_
diff --git a/aom/aomdx.h b/aom/aomdx.h
index 50ff224..9086082 100644
--- a/aom/aomdx.h
+++ b/aom/aomdx.h
@@ -18,8 +18,8 @@
  * \brief Provides definitions for using AOM or AV1 within the aom Decoder
  *        interface.
  */
-#ifndef AOM_AOMDX_H_
-#define AOM_AOMDX_H_
+#ifndef AOM_AOM_AOMDX_H_
+#define AOM_AOM_AOMDX_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -291,4 +291,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_AOMDX_H_
+#endif  // AOM_AOM_AOMDX_H_
diff --git a/aom/internal/aom_codec_internal.h b/aom/internal/aom_codec_internal.h
index 88bf78ef..0023f46 100644
--- a/aom/internal/aom_codec_internal.h
+++ b/aom/internal/aom_codec_internal.h
@@ -41,8 +41,8 @@
  * Once initialized, the instance is manged using other functions from
  * the aom_codec_* family.
  */
-#ifndef AOM_INTERNAL_AOM_CODEC_INTERNAL_H_
-#define AOM_INTERNAL_AOM_CODEC_INTERNAL_H_
+#ifndef AOM_AOM_INTERNAL_AOM_CODEC_INTERNAL_H_
+#define AOM_AOM_INTERNAL_AOM_CODEC_INTERNAL_H_
 #include "../aom_decoder.h"
 #include "../aom_encoder.h"
 #include <stdarg.h>
@@ -438,4 +438,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_INTERNAL_AOM_CODEC_INTERNAL_H_
+#endif  // AOM_AOM_INTERNAL_AOM_CODEC_INTERNAL_H_
diff --git a/aom_dsp/aom_dsp_common.h b/aom_dsp/aom_dsp_common.h
index c5dc9a8..a185b23 100644
--- a/aom_dsp/aom_dsp_common.h
+++ b/aom_dsp/aom_dsp_common.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_AOM_DSP_COMMON_H_
-#define AOM_DSP_AOM_DSP_COMMON_H_
+#ifndef AOM_AOM_DSP_AOM_DSP_COMMON_H_
+#define AOM_AOM_DSP_AOM_DSP_COMMON_H_
 
 #include "config/aom_config.h"
 
@@ -95,4 +95,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_DSP_AOM_DSP_COMMON_H_
+#endif  // AOM_AOM_DSP_AOM_DSP_COMMON_H_
diff --git a/aom_dsp/aom_filter.h b/aom_dsp/aom_filter.h
index fd4f51b..00686ac 100644
--- a/aom_dsp/aom_filter.h
+++ b/aom_dsp/aom_filter.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_AOM_FILTER_H_
-#define AOM_DSP_AOM_FILTER_H_
+#ifndef AOM_AOM_DSP_AOM_FILTER_H_
+#define AOM_AOM_DSP_AOM_FILTER_H_
 
 #include "aom/aom_integer.h"
 
@@ -53,4 +53,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_DSP_AOM_FILTER_H_
+#endif  // AOM_AOM_DSP_AOM_FILTER_H_
diff --git a/aom_dsp/aom_simd.h b/aom_dsp/aom_simd.h
index 392b366..ab950ca 100644
--- a/aom_dsp/aom_simd.h
+++ b/aom_dsp/aom_simd.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_AOM_AOM_SIMD_H_
-#define AOM_DSP_AOM_AOM_SIMD_H_
+#ifndef AOM_AOM_DSP_AOM_SIMD_H_
+#define AOM_AOM_DSP_AOM_SIMD_H_
 
 #include <stdint.h>
 
@@ -35,4 +35,4 @@
 #include "simd/v256_intrinsics.h"
 #endif
 
-#endif  // AOM_DSP_AOM_AOM_SIMD_H_
+#endif  // AOM_AOM_DSP_AOM_SIMD_H_
diff --git a/aom_dsp/aom_simd_inline.h b/aom_dsp/aom_simd_inline.h
index 02a8b3a..eb333f6 100644
--- a/aom_dsp/aom_simd_inline.h
+++ b/aom_dsp/aom_simd_inline.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_AOM_SIMD_INLINE_H_
-#define AOM_DSP_AOM_SIMD_INLINE_H_
+#ifndef AOM_AOM_DSP_AOM_SIMD_INLINE_H_
+#define AOM_AOM_DSP_AOM_SIMD_INLINE_H_
 
 #include "aom/aom_integer.h"
 
@@ -18,4 +18,4 @@
 #define SIMD_INLINE static AOM_FORCE_INLINE
 #endif
 
-#endif  // AOM_DSP_AOM_SIMD_INLINE_H_
+#endif  // AOM_AOM_DSP_AOM_SIMD_INLINE_H_
diff --git a/aom_dsp/binary_codes_reader.h b/aom_dsp/binary_codes_reader.h
index 7b41885..364a674 100644
--- a/aom_dsp/binary_codes_reader.h
+++ b/aom_dsp/binary_codes_reader.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_BINARY_CODES_READER_H_
-#define AOM_DSP_BINARY_CODES_READER_H_
+#ifndef AOM_AOM_DSP_BINARY_CODES_READER_H_
+#define AOM_AOM_DSP_BINARY_CODES_READER_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -44,4 +44,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_DSP_BINARY_CODES_READER_H_
+#endif  // AOM_AOM_DSP_BINARY_CODES_READER_H_
diff --git a/aom_dsp/binary_codes_writer.h b/aom_dsp/binary_codes_writer.h
index b839171..c360e0e 100644
--- a/aom_dsp/binary_codes_writer.h
+++ b/aom_dsp/binary_codes_writer.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_BINARY_CODES_WRITER_H_
-#define AOM_DSP_BINARY_CODES_WRITER_H_
+#ifndef AOM_AOM_DSP_BINARY_CODES_WRITER_H_
+#define AOM_AOM_DSP_BINARY_CODES_WRITER_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -65,4 +65,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_DSP_BINARY_CODES_WRITER_H_
+#endif  // AOM_AOM_DSP_BINARY_CODES_WRITER_H_
diff --git a/aom_dsp/bitreader.h b/aom_dsp/bitreader.h
index d16cff3..7c0efcc 100644
--- a/aom_dsp/bitreader.h
+++ b/aom_dsp/bitreader.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_BITREADER_H_
-#define AOM_DSP_BITREADER_H_
+#ifndef AOM_AOM_DSP_BITREADER_H_
+#define AOM_AOM_DSP_BITREADER_H_
 
 #include <assert.h>
 #include <limits.h>
@@ -157,4 +157,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_DSP_BITREADER_H_
+#endif  // AOM_AOM_DSP_BITREADER_H_
diff --git a/aom_dsp/bitreader_buffer.h b/aom_dsp/bitreader_buffer.h
index 38e7af3..725ca1e 100644
--- a/aom_dsp/bitreader_buffer.h
+++ b/aom_dsp/bitreader_buffer.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_BITREADER_BUFFER_H_
-#define AOM_DSP_BITREADER_BUFFER_H_
+#ifndef AOM_AOM_DSP_BITREADER_BUFFER_H_
+#define AOM_AOM_DSP_BITREADER_BUFFER_H_
 
 #include <limits.h>
 
@@ -47,4 +47,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_DSP_BITREADER_BUFFER_H_
+#endif  // AOM_AOM_DSP_BITREADER_BUFFER_H_
diff --git a/aom_dsp/bitwriter.h b/aom_dsp/bitwriter.h
index de1b1d0..b5ecc23 100644
--- a/aom_dsp/bitwriter.h
+++ b/aom_dsp/bitwriter.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_BITWRITER_H_
-#define AOM_DSP_BITWRITER_H_
+#ifndef AOM_AOM_DSP_BITWRITER_H_
+#define AOM_AOM_DSP_BITWRITER_H_
 
 #include <assert.h>
 
@@ -86,4 +86,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_DSP_BITWRITER_H_
+#endif  // AOM_AOM_DSP_BITWRITER_H_
diff --git a/aom_dsp/bitwriter_buffer.h b/aom_dsp/bitwriter_buffer.h
index 8159c7f..d031128 100644
--- a/aom_dsp/bitwriter_buffer.h
+++ b/aom_dsp/bitwriter_buffer.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_BITWRITER_BUFFER_H_
-#define AOM_DSP_BITWRITER_BUFFER_H_
+#ifndef AOM_AOM_DSP_BITWRITER_BUFFER_H_
+#define AOM_AOM_DSP_BITWRITER_BUFFER_H_
 
 #include "aom/aom_integer.h"
 
@@ -48,4 +48,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_DSP_BITWRITER_BUFFER_H_
+#endif  // AOM_AOM_DSP_BITWRITER_BUFFER_H_
diff --git a/aom_dsp/blend.h b/aom_dsp/blend.h
index 434bb83..fd87dc1 100644
--- a/aom_dsp/blend.h
+++ b/aom_dsp/blend.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_BLEND_H_
-#define AOM_DSP_BLEND_H_
+#ifndef AOM_AOM_DSP_BLEND_H_
+#define AOM_AOM_DSP_BLEND_H_
 
 #include "aom_ports/mem.h"
 
@@ -42,4 +42,4 @@
 #define DIFF_FACTOR_LOG2 4
 #define DIFF_FACTOR (1 << DIFF_FACTOR_LOG2)
 
-#endif  // AOM_DSP_BLEND_H_
+#endif  // AOM_AOM_DSP_BLEND_H_
diff --git a/aom_dsp/buf_ans.h b/aom_dsp/buf_ans.h
index cf7df1d..985fcdf 100644
--- a/aom_dsp/buf_ans.h
+++ b/aom_dsp/buf_ans.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_BUF_ANS_H_
-#define AOM_DSP_BUF_ANS_H_
+#ifndef AOM_AOM_DSP_BUF_ANS_H_
+#define AOM_AOM_DSP_BUF_ANS_H_
 // Buffered forward ANS writer.
 // Symbols are written to the writer in forward (decode) order and serialized
 // backwards due to ANS's stack like behavior.
@@ -133,4 +133,4 @@
 #ifdef __cplusplus
 }  // extern "C"
 #endif  // __cplusplus
-#endif  // AOM_DSP_BUF_ANS_H_
+#endif  // AOM_AOM_DSP_BUF_ANS_H_
diff --git a/aom_dsp/daalaboolreader.h b/aom_dsp/daalaboolreader.h
index ed9b8e8..ba78f91 100644
--- a/aom_dsp/daalaboolreader.h
+++ b/aom_dsp/daalaboolreader.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_DAALABOOLREADER_H_
-#define AOM_DSP_DAALABOOLREADER_H_
+#ifndef AOM_AOM_DSP_DAALABOOLREADER_H_
+#define AOM_AOM_DSP_DAALABOOLREADER_H_
 
 #include "aom/aom_integer.h"
 #include "aom_dsp/entdec.h"
@@ -157,4 +157,4 @@
 }  // extern "C"
 #endif
 
-#endif
+#endif  // AOM_AOM_DSP_DAALABOOLREADER_H_
diff --git a/aom_dsp/daalaboolwriter.h b/aom_dsp/daalaboolwriter.h
index f9c596c..3848877 100644
--- a/aom_dsp/daalaboolwriter.h
+++ b/aom_dsp/daalaboolwriter.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_DAALABOOLWRITER_H_
-#define AOM_DSP_DAALABOOLWRITER_H_
+#ifndef AOM_AOM_DSP_DAALABOOLWRITER_H_
+#define AOM_AOM_DSP_DAALABOOLWRITER_H_
 
 #include <stdio.h>
 
@@ -75,4 +75,4 @@
 }  // extern "C"
 #endif
 
-#endif
+#endif  // AOM_AOM_DSP_DAALABOOLWRITER_H_
diff --git a/aom_dsp/entcode.h b/aom_dsp/entcode.h
index 5c15526..7ba2b1c 100644
--- a/aom_dsp/entcode.h
+++ b/aom_dsp/entcode.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_ENTCODE_H_
-#define AOM_DSP_ENTCODE_H_
+#ifndef AOM_AOM_DSP_ENTCODE_H_
+#define AOM_AOM_DSP_ENTCODE_H_
 
 #include <limits.h>
 #include <stddef.h>
@@ -37,4 +37,4 @@
 OD_WARN_UNUSED_RESULT uint32_t od_ec_tell_frac(uint32_t nbits_total,
                                                uint32_t rng);
 
-#endif  // AOM_DSP_ENTCODE_H_
+#endif  // AOM_AOM_DSP_ENTCODE_H_
diff --git a/aom_dsp/entdec.h b/aom_dsp/entdec.h
index e35c3f9..283bf18 100644
--- a/aom_dsp/entdec.h
+++ b/aom_dsp/entdec.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#if !defined(_entdec_H)
-#define _entdec_H (1)
+#ifndef AOM_AOM_DSP_ENTDEC_H_
+#define AOM_AOM_DSP_ENTDEC_H_
 #include <limits.h>
 #include "aom_dsp/entcode.h"
 
@@ -80,4 +80,4 @@
 }  // extern "C"
 #endif
 
-#endif
+#endif  // AOM_AOM_DSP_ENTDEC_H_
diff --git a/aom_dsp/entenc.h b/aom_dsp/entenc.h
index 1988f68..3551d42 100644
--- a/aom_dsp/entenc.h
+++ b/aom_dsp/entenc.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#if !defined(_entenc_H)
-#define _entenc_H (1)
+#ifndef AOM_AOM_DSP_ENTENC_H_
+#define AOM_AOM_DSP_ENTENC_H_
 #include <stddef.h>
 #include "aom_dsp/entcode.h"
 
@@ -82,4 +82,4 @@
 }  // extern "C"
 #endif
 
-#endif
+#endif  // AOM_AOM_DSP_ENTENC_H_
diff --git a/aom_dsp/fft_common.h b/aom_dsp/fft_common.h
index 2f3cd5f..5137331 100644
--- a/aom_dsp/fft_common.h
+++ b/aom_dsp/fft_common.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_FFT_COMMON_H_
-#define AOM_DSP_FFT_COMMON_H_
+#ifndef AOM_AOM_DSP_FFT_COMMON_H_
+#define AOM_AOM_DSP_FFT_COMMON_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -1047,4 +1047,4 @@
           add(w93[0], sub(mul(kWeight5, w157[0]), mul(kWeight6, w157[1]))));   \
   }
 
-#endif  // AOM_DSP_FFT_COMMON_H_
+#endif  // AOM_AOM_DSP_FFT_COMMON_H_
diff --git a/aom_dsp/grain_synthesis.h b/aom_dsp/grain_synthesis.h
index 4554e75..7aee6f6 100644
--- a/aom_dsp/grain_synthesis.h
+++ b/aom_dsp/grain_synthesis.h
@@ -13,8 +13,8 @@
  * \brief Describes film grain parameters and film grain synthesis
  *
  */
-#ifndef AOM_AOM_GRAIN_SYNTHESIS_H_
-#define AOM_AOM_GRAIN_SYNTHESIS_H_
+#ifndef AOM_AOM_DSP_GRAIN_SYNTHESIS_H_
+#define AOM_AOM_DSP_GRAIN_SYNTHESIS_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -119,4 +119,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_AOM_GRAIN_SYNTHESIS_H_
+#endif  // AOM_AOM_DSP_GRAIN_SYNTHESIS_H_
diff --git a/aom_dsp/grain_table.h b/aom_dsp/grain_table.h
index 5c20413..a8ac507 100644
--- a/aom_dsp/grain_table.h
+++ b/aom_dsp/grain_table.h
@@ -99,4 +99,4 @@
 }
 #endif
 
-#endif
+#endif  // AOM_AOM_DSP_GRAIN_TABLE_H_
diff --git a/aom_dsp/intrapred_common.h b/aom_dsp/intrapred_common.h
index e047d98..3ec62a8 100644
--- a/aom_dsp/intrapred_common.h
+++ b/aom_dsp/intrapred_common.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef _AOM_DSP_INTRAPRED_COMMON_H
-#define _AOM_DSP_INTRAPRED_COMMON_H
+#ifndef AOM_AOM_DSP_INTRAPRED_COMMON_H_
+#define AOM_AOM_DSP_INTRAPRED_COMMON_H_
 
 #include "config/aom_config.h"
 
@@ -44,4 +44,4 @@
 };
 /* clang-format on */
 
-#endif  // _AOM_DSP_INTRAPRED_COMMON_H
+#endif  // AOM_AOM_DSP_INTRAPRED_COMMON_H_
diff --git a/aom_dsp/mips/aom_convolve_msa.h b/aom_dsp/mips/aom_convolve_msa.h
index a0627c0..852415c 100644
--- a/aom_dsp/mips/aom_convolve_msa.h
+++ b/aom_dsp/mips/aom_convolve_msa.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_MIPS_AOM_CONVOLVE_MSA_H_
-#define AOM_DSP_MIPS_AOM_CONVOLVE_MSA_H_
+#ifndef AOM_AOM_DSP_MIPS_AOM_CONVOLVE_MSA_H_
+#define AOM_AOM_DSP_MIPS_AOM_CONVOLVE_MSA_H_
 
 #include "aom_dsp/mips/macros_msa.h"
 #include "aom_dsp/aom_filter.h"
@@ -76,4 +76,4 @@
                 res7_m, out0, out1, out2, out3);                             \
   }
 
-#endif /* AOM_DSP_MIPS_AOM_CONVOLVE_MSA_H_ */
+#endif  // AOM_AOM_DSP_MIPS_AOM_CONVOLVE_MSA_H_
diff --git a/aom_dsp/mips/common_dspr2.h b/aom_dsp/mips/common_dspr2.h
index d51bfa8..c42188d 100644
--- a/aom_dsp/mips/common_dspr2.h
+++ b/aom_dsp/mips/common_dspr2.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_COMMON_MIPS_DSPR2_H_
-#define AOM_COMMON_MIPS_DSPR2_H_
+#ifndef AOM_AOM_DSP_MIPS_COMMON_DSPR2_H_
+#define AOM_AOM_DSP_MIPS_COMMON_DSPR2_H_
 
 #include <assert.h>
 
@@ -48,4 +48,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_COMMON_MIPS_DSPR2_H_
+#endif  // AOM_AOM_DSP_MIPS_COMMON_DSPR2_H_
diff --git a/aom_dsp/mips/convolve_common_dspr2.h b/aom_dsp/mips/convolve_common_dspr2.h
index e7b8d53..e5d48a8 100644
--- a/aom_dsp/mips/convolve_common_dspr2.h
+++ b/aom_dsp/mips/convolve_common_dspr2.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_MIPS_AOM_COMMON_DSPR2_H_
-#define AOM_DSP_MIPS_AOM_COMMON_DSPR2_H_
+#ifndef AOM_AOM_DSP_MIPS_CONVOLVE_COMMON_DSPR2_H_
+#define AOM_AOM_DSP_MIPS_CONVOLVE_COMMON_DSPR2_H_
 
 #include <assert.h>
 
@@ -45,4 +45,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_DSP_MIPS_AOM_COMMON_DSPR2_H_
+#endif  // AOM_AOM_DSP_MIPS_CONVOLVE_COMMON_DSPR2_H_
diff --git a/aom_dsp/mips/loopfilter_filters_dspr2.h b/aom_dsp/mips/loopfilter_filters_dspr2.h
index 3e38ef3..28f0dc3 100644
--- a/aom_dsp/mips/loopfilter_filters_dspr2.h
+++ b/aom_dsp/mips/loopfilter_filters_dspr2.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_MIPS_LOOPFILTER_FILTERS_DSPR2_H_
-#define AOM_DSP_MIPS_LOOPFILTER_FILTERS_DSPR2_H_
+#ifndef AOM_AOM_DSP_MIPS_LOOPFILTER_FILTERS_DSPR2_H_
+#define AOM_AOM_DSP_MIPS_LOOPFILTER_FILTERS_DSPR2_H_
 
 #include <stdlib.h>
 
@@ -733,4 +733,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_DSP_MIPS_LOOPFILTER_FILTERS_DSPR2_H_
+#endif  // AOM_AOM_DSP_MIPS_LOOPFILTER_FILTERS_DSPR2_H_
diff --git a/aom_dsp/mips/loopfilter_macros_dspr2.h b/aom_dsp/mips/loopfilter_macros_dspr2.h
index cb599cf..62295d6 100644
--- a/aom_dsp/mips/loopfilter_macros_dspr2.h
+++ b/aom_dsp/mips/loopfilter_macros_dspr2.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_MIPS_LOOPFILTER_MACROS_DSPR2_H_
-#define AOM_DSP_MIPS_LOOPFILTER_MACROS_DSPR2_H_
+#ifndef AOM_AOM_DSP_MIPS_LOOPFILTER_MACROS_DSPR2_H_
+#define AOM_AOM_DSP_MIPS_LOOPFILTER_MACROS_DSPR2_H_
 
 #include <stdlib.h>
 
@@ -434,4 +434,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_DSP_MIPS_LOOPFILTER_MACROS_DSPR2_H_
+#endif  // AOM_AOM_DSP_MIPS_LOOPFILTER_MACROS_DSPR2_H_
diff --git a/aom_dsp/mips/loopfilter_masks_dspr2.h b/aom_dsp/mips/loopfilter_masks_dspr2.h
index 6db1dac..a0f57f3 100644
--- a/aom_dsp/mips/loopfilter_masks_dspr2.h
+++ b/aom_dsp/mips/loopfilter_masks_dspr2.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_MIPS_LOOPFILTER_MASKS_DSPR2_H_
-#define AOM_DSP_MIPS_LOOPFILTER_MASKS_DSPR2_H_
+#ifndef AOM_AOM_DSP_MIPS_LOOPFILTER_MASKS_DSPR2_H_
+#define AOM_AOM_DSP_MIPS_LOOPFILTER_MASKS_DSPR2_H_
 
 #include <stdlib.h>
 
@@ -354,4 +354,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_DSP_MIPS_LOOPFILTER_MASKS_DSPR2_H_
+#endif  // AOM_AOM_DSP_MIPS_LOOPFILTER_MASKS_DSPR2_H_
diff --git a/aom_dsp/mips/loopfilter_msa.h b/aom_dsp/mips/loopfilter_msa.h
index 4505942..54b0bb4 100644
--- a/aom_dsp/mips/loopfilter_msa.h
+++ b/aom_dsp/mips/loopfilter_msa.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_LOOPFILTER_MSA_H_
-#define AOM_DSP_LOOPFILTER_MSA_H_
+#ifndef AOM_AOM_DSP_MIPS_LOOPFILTER_MSA_H_
+#define AOM_AOM_DSP_MIPS_LOOPFILTER_MSA_H_
 
 #include "aom_dsp/mips/macros_msa.h"
 
@@ -248,4 +248,4 @@
     mask_out = limit_in < (v16u8)mask_out;                                   \
     mask_out = __msa_xori_b(mask_out, 0xff);                                 \
   }
-#endif /* AOM_DSP_LOOPFILTER_MSA_H_ */
+#endif  // AOM_AOM_DSP_MIPS_LOOPFILTER_MSA_H_
diff --git a/aom_dsp/mips/macros_msa.h b/aom_dsp/mips/macros_msa.h
index eb919d4..9bfc271 100644
--- a/aom_dsp/mips/macros_msa.h
+++ b/aom_dsp/mips/macros_msa.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_MIPS_MACROS_MSA_H_
-#define AOM_DSP_MIPS_MACROS_MSA_H_
+#ifndef AOM_AOM_DSP_MIPS_MACROS_MSA_H_
+#define AOM_AOM_DSP_MIPS_MACROS_MSA_H_
 
 #include <msa.h>
 
@@ -2055,4 +2055,4 @@
                                                                 \
     tmp1_m;                                                     \
   })
-#endif /* AOM_DSP_MIPS_MACROS_MSA_H_ */
+#endif  // AOM_AOM_DSP_MIPS_MACROS_MSA_H_
diff --git a/aom_dsp/noise_model.h b/aom_dsp/noise_model.h
index b07bf86..049d5be 100644
--- a/aom_dsp/noise_model.h
+++ b/aom_dsp/noise_model.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_NOISE_MODEL_H_
-#define AOM_DSP_NOISE_MODEL_H_
+#ifndef AOM_AOM_DSP_NOISE_MODEL_H_
+#define AOM_AOM_DSP_NOISE_MODEL_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -320,4 +320,4 @@
 #ifdef __cplusplus
 }  // extern "C"
 #endif  // __cplusplus
-#endif  // AOM_DSP_NOISE_MODEL_H_
+#endif  // AOM_AOM_DSP_NOISE_MODEL_H_
diff --git a/aom_dsp/noise_util.h b/aom_dsp/noise_util.h
index ea4d9e3..2284a17 100644
--- a/aom_dsp/noise_util.h
+++ b/aom_dsp/noise_util.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_NOISE_UTIL_H_
-#define AOM_DSP_NOISE_UTIL_H_
+#ifndef AOM_AOM_DSP_NOISE_UTIL_H_
+#define AOM_AOM_DSP_NOISE_UTIL_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -65,4 +65,4 @@
 }  // extern "C"
 #endif  // __cplusplus
 
-#endif  // AOM_DSP_NOISE_UTIL_H_
+#endif  // AOM_AOM_DSP_NOISE_UTIL_H_
diff --git a/aom_dsp/postproc.h b/aom_dsp/postproc.h
index 11a8c5a..f3d87f2 100644
--- a/aom_dsp/postproc.h
+++ b/aom_dsp/postproc.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_POSTPROC_H_
-#define AOM_DSP_POSTPROC_H_
+#ifndef AOM_AOM_DSP_POSTPROC_H_
+#define AOM_AOM_DSP_POSTPROC_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -23,4 +23,4 @@
 }
 #endif
 
-#endif  // AOM_DSP_POSTPROC_H_
+#endif  // AOM_AOM_DSP_POSTPROC_H_
diff --git a/aom_dsp/prob.h b/aom_dsp/prob.h
index 85dd424..d003a98 100644
--- a/aom_dsp/prob.h
+++ b/aom_dsp/prob.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_PROB_H_
-#define AOM_DSP_PROB_H_
+#ifndef AOM_AOM_DSP_PROB_H_
+#define AOM_AOM_DSP_PROB_H_
 
 #include <assert.h>
 #include <stdio.h>
@@ -668,4 +668,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_DSP_PROB_H_
+#endif  // AOM_AOM_DSP_PROB_H_
diff --git a/aom_dsp/psnr.h b/aom_dsp/psnr.h
index 8300b0a..58e4e71 100644
--- a/aom_dsp/psnr.h
+++ b/aom_dsp/psnr.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_PSNR_H_
-#define AOM_DSP_PSNR_H_
+#ifndef AOM_AOM_DSP_PSNR_H_
+#define AOM_AOM_DSP_PSNR_H_
 
 #include "aom_scale/yv12config.h"
 
@@ -76,4 +76,4 @@
 #ifdef __cplusplus
 }  // extern "C"
 #endif
-#endif  // AOM_DSP_PSNR_H_
+#endif  // AOM_AOM_DSP_PSNR_H_
diff --git a/aom_dsp/quantize.h b/aom_dsp/quantize.h
index 56d50b9..a47bd05 100644
--- a/aom_dsp/quantize.h
+++ b/aom_dsp/quantize.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_QUANTIZE_H_
-#define AOM_DSP_QUANTIZE_H_
+#ifndef AOM_AOM_DSP_QUANTIZE_H_
+#define AOM_AOM_DSP_QUANTIZE_H_
 
 #include "config/aom_config.h"
 
@@ -57,4 +57,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_DSP_QUANTIZE_H_
+#endif  // AOM_AOM_DSP_QUANTIZE_H_
diff --git a/aom_dsp/simd/v128_intrinsics.h b/aom_dsp/simd/v128_intrinsics.h
index 51a38a7..01dbb8f 100644
--- a/aom_dsp/simd/v128_intrinsics.h
+++ b/aom_dsp/simd/v128_intrinsics.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef _V128_INTRINSICS_H
-#define _V128_INTRINSICS_H
+#ifndef AOM_AOM_DSP_SIMD_V128_INTRINSICS_H_
+#define AOM_AOM_DSP_SIMD_V128_INTRINSICS_H_
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -341,4 +341,4 @@
   return c_v128_ssd_s16_sum(s);
 }
 
-#endif /* _V128_INTRINSICS_H */
+#endif  // AOM_AOM_DSP_SIMD_V128_INTRINSICS_H_
diff --git a/aom_dsp/simd/v128_intrinsics_arm.h b/aom_dsp/simd/v128_intrinsics_arm.h
index c96a080..3c669d5 100644
--- a/aom_dsp/simd/v128_intrinsics_arm.h
+++ b/aom_dsp/simd/v128_intrinsics_arm.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef _V128_INTRINSICS_H
-#define _V128_INTRINSICS_H
+#ifndef AOM_AOM_DSP_SIMD_V128_INTRINSICS_ARM_H_
+#define AOM_AOM_DSP_SIMD_V128_INTRINSICS_ARM_H_
 
 #include <arm_neon.h>
 
@@ -955,4 +955,4 @@
   return v64_u64(v128_low_v64(s)) + v64_u64(v128_high_v64(s));
 }
 
-#endif /* _V128_INTRINSICS_H */
+#endif  // AOM_AOM_DSP_SIMD_V128_INTRINSICS_ARM_H_
diff --git a/aom_dsp/simd/v128_intrinsics_c.h b/aom_dsp/simd/v128_intrinsics_c.h
index e508f6a..bbe9a9d 100644
--- a/aom_dsp/simd/v128_intrinsics_c.h
+++ b/aom_dsp/simd/v128_intrinsics_c.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef _V128_INTRINSICS_C_H
-#define _V128_INTRINSICS_C_H
+#ifndef AOM_AOM_DSP_SIMD_V128_INTRINSICS_C_H_
+#define AOM_AOM_DSP_SIMD_V128_INTRINSICS_C_H_
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -885,4 +885,4 @@
 
 SIMD_INLINE uint64_t c_v128_ssd_s16_sum(c_ssd128_internal_s16 s) { return s; }
 
-#endif /* _V128_INTRINSICS_C_H */
+#endif  // AOM_AOM_DSP_SIMD_V128_INTRINSICS_C_H_
diff --git a/aom_dsp/simd/v128_intrinsics_x86.h b/aom_dsp/simd/v128_intrinsics_x86.h
index f9043fe..6c7241f 100644
--- a/aom_dsp/simd/v128_intrinsics_x86.h
+++ b/aom_dsp/simd/v128_intrinsics_x86.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef _V128_INTRINSICS_H
-#define _V128_INTRINSICS_H
+#ifndef AOM_AOM_DSP_SIMD_V128_INTRINSICS_X86_H_
+#define AOM_AOM_DSP_SIMD_V128_INTRINSICS_X86_H_
 
 #include <stdint.h>
 #include "aom_dsp/simd/v64_intrinsics_x86.h"
@@ -653,4 +653,4 @@
   return v64_u64(v128_low_v64(s)) + v64_u64(v128_high_v64(s));
 }
 
-#endif /* _V128_INTRINSICS_H */
+#endif  // AOM_AOM_DSP_SIMD_V128_INTRINSICS_X86_H_
diff --git a/aom_dsp/simd/v256_intrinsics.h b/aom_dsp/simd/v256_intrinsics.h
index 4b70cc5..cb99d35 100644
--- a/aom_dsp/simd/v256_intrinsics.h
+++ b/aom_dsp/simd/v256_intrinsics.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef _V256_INTRINSICS_H
-#define _V256_INTRINSICS_H
+#ifndef AOM_AOM_DSP_SIMD_V256_INTRINSICS_H_
+#define AOM_AOM_DSP_SIMD_V256_INTRINSICS_H_
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -373,4 +373,4 @@
   return c_v256_ssd_s16_sum(s);
 }
 
-#endif /* _V256_INTRINSICS_H */
+#endif  // AOM_AOM_DSP_SIMD_V256_INTRINSICS_H_
diff --git a/aom_dsp/simd/v256_intrinsics_arm.h b/aom_dsp/simd/v256_intrinsics_arm.h
index d966384..bd86ea1 100644
--- a/aom_dsp/simd/v256_intrinsics_arm.h
+++ b/aom_dsp/simd/v256_intrinsics_arm.h
@@ -9,9 +9,9 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef _V256_INTRINSICS_H
-#define _V256_INTRINSICS_H
+#ifndef AOM_AOM_DSP_SIMD_V256_INTRINSICS_ARM_H_
+#define AOM_AOM_DSP_SIMD_V256_INTRINSICS_ARM_H_
 
 #include "aom_dsp/simd/v256_intrinsics_v128.h"
 
-#endif /* _V256_INTRINSICS_H */
+#endif  // AOM_AOM_DSP_SIMD_V256_INTRINSICS_ARM_H_
diff --git a/aom_dsp/simd/v256_intrinsics_c.h b/aom_dsp/simd/v256_intrinsics_c.h
index 5b412df..a1c08e9 100644
--- a/aom_dsp/simd/v256_intrinsics_c.h
+++ b/aom_dsp/simd/v256_intrinsics_c.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef _V256_INTRINSICS_C_H
-#define _V256_INTRINSICS_C_H
+#ifndef AOM_AOM_DSP_SIMD_V256_INTRINSICS_C_H_
+#define AOM_AOM_DSP_SIMD_V256_INTRINSICS_C_H_
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -950,4 +950,4 @@
 
 SIMD_INLINE uint64_t c_v256_ssd_s16_sum(c_ssd256_internal_s16 s) { return s; }
 
-#endif /* _V256_INTRINSICS_C_H */
+#endif  // AOM_AOM_DSP_SIMD_V256_INTRINSICS_C_H_
diff --git a/aom_dsp/simd/v256_intrinsics_v128.h b/aom_dsp/simd/v256_intrinsics_v128.h
index 60b2a17..d5b7905 100644
--- a/aom_dsp/simd/v256_intrinsics_v128.h
+++ b/aom_dsp/simd/v256_intrinsics_v128.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef _V256_INTRINSICS_V128_H
-#define _V256_INTRINSICS_V128_H
+#ifndef AOM_AOM_DSP_SIMD_V256_INTRINSICS_V128_H_
+#define AOM_AOM_DSP_SIMD_V256_INTRINSICS_V128_H_
 
 #if HAVE_NEON
 #include "aom_dsp/simd/v128_intrinsics_arm.h"
@@ -870,4 +870,4 @@
   return v128_ssd_s16_sum(s.val[1]) + v128_ssd_s16_sum(s.val[0]);
 }
 
-#endif /* _V256_INTRINSICS_V128_H */
+#endif  // AOM_AOM_DSP_SIMD_V256_INTRINSICS_V128_H_
diff --git a/aom_dsp/simd/v256_intrinsics_x86.h b/aom_dsp/simd/v256_intrinsics_x86.h
index 05f2051..44594bc 100644
--- a/aom_dsp/simd/v256_intrinsics_x86.h
+++ b/aom_dsp/simd/v256_intrinsics_x86.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef _V256_INTRINSICS_H
-#define _V256_INTRINSICS_H
+#ifndef AOM_AOM_DSP_SIMD_V256_INTRINSICS_X86_H_
+#define AOM_AOM_DSP_SIMD_V256_INTRINSICS_X86_H_
 
 #if !defined(__AVX2__)
 
@@ -747,4 +747,4 @@
 
 #endif
 
-#endif /* _V256_INTRINSICS_H */
+#endif  // AOM_AOM_DSP_SIMD_V256_INTRINSICS_X86_H_
diff --git a/aom_dsp/simd/v64_intrinsics.h b/aom_dsp/simd/v64_intrinsics.h
index 6ce53c6..afc5542 100644
--- a/aom_dsp/simd/v64_intrinsics.h
+++ b/aom_dsp/simd/v64_intrinsics.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef _V64_INTRINSICS_H
-#define _V64_INTRINSICS_H
+#ifndef AOM_AOM_DSP_SIMD_V64_INTRINSICS_H_
+#define AOM_AOM_DSP_SIMD_V64_INTRINSICS_H_
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -229,4 +229,4 @@
   return c_v64_shr_n_s32(a, c);
 }
 
-#endif /* _V64_INTRINSICS_H */
+#endif  // AOM_AOM_DSP_SIMD_V64_INTRINSICS_H_
diff --git a/aom_dsp/simd/v64_intrinsics_arm.h b/aom_dsp/simd/v64_intrinsics_arm.h
index 267441b..8f39ad6 100644
--- a/aom_dsp/simd/v64_intrinsics_arm.h
+++ b/aom_dsp/simd/v64_intrinsics_arm.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef _V64_INTRINSICS_H
-#define _V64_INTRINSICS_H
+#ifndef AOM_AOM_DSP_SIMD_V64_INTRINSICS_ARM_H_
+#define AOM_AOM_DSP_SIMD_V64_INTRINSICS_ARM_H_
 
 #include <arm_neon.h>
 
@@ -677,4 +677,4 @@
 
 #endif
 
-#endif /* _V64_INTRINSICS_H */
+#endif  // AOM_AOM_DSP_SIMD_V64_INTRINSICS_ARM_H_
diff --git a/aom_dsp/simd/v64_intrinsics_c.h b/aom_dsp/simd/v64_intrinsics_c.h
index 8158899..028d68c 100644
--- a/aom_dsp/simd/v64_intrinsics_c.h
+++ b/aom_dsp/simd/v64_intrinsics_c.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef _V64_INTRINSICS_C_H
-#define _V64_INTRINSICS_C_H
+#ifndef AOM_AOM_DSP_SIMD_V64_INTRINSICS_C_H_
+#define AOM_AOM_DSP_SIMD_V64_INTRINSICS_C_H_
 
 /* Note: This implements the intrinsics in plain, unoptimised C.
    Intended for reference, porting or debugging. */
@@ -965,4 +965,4 @@
   return c_v64_shr_s32(a, c);
 }
 
-#endif /* _V64_INTRINSICS_C_H */
+#endif  // AOM_AOM_DSP_SIMD_V64_INTRINSICS_C_H_
diff --git a/aom_dsp/simd/v64_intrinsics_x86.h b/aom_dsp/simd/v64_intrinsics_x86.h
index 130052e..5f9a57b 100644
--- a/aom_dsp/simd/v64_intrinsics_x86.h
+++ b/aom_dsp/simd/v64_intrinsics_x86.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef _V64_INTRINSICS_H
-#define _V64_INTRINSICS_H
+#ifndef AOM_AOM_DSP_SIMD_V64_INTRINSICS_X86_H_
+#define AOM_AOM_DSP_SIMD_V64_INTRINSICS_X86_H_
 
 #include <emmintrin.h>
 #if defined(__SSSE3__)
@@ -488,4 +488,4 @@
 #define v64_shr_n_u32(a, c) _mm_srli_epi32(a, c)
 #define v64_shr_n_s32(a, c) _mm_srai_epi32(a, c)
 
-#endif /* _V64_INTRINSICS_H */
+#endif  // AOM_AOM_DSP_SIMD_V64_INTRINSICS_X86_H_
diff --git a/aom_dsp/ssim.h b/aom_dsp/ssim.h
index c8a389d..55038f4 100644
--- a/aom_dsp/ssim.h
+++ b/aom_dsp/ssim.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_SSIM_H_
-#define AOM_DSP_SSIM_H_
+#ifndef AOM_AOM_DSP_SSIM_H_
+#define AOM_AOM_DSP_SSIM_H_
 
 #define MAX_SSIM_DB 100.0;
 
@@ -84,4 +84,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_DSP_SSIM_H_
+#endif  // AOM_AOM_DSP_SSIM_H_
diff --git a/aom_dsp/txfm_common.h b/aom_dsp/txfm_common.h
index 7deb0ae..f982428 100644
--- a/aom_dsp/txfm_common.h
+++ b/aom_dsp/txfm_common.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_TXFM_COMMON_H_
-#define AOM_DSP_TXFM_COMMON_H_
+#ifndef AOM_AOM_DSP_TXFM_COMMON_H_
+#define AOM_AOM_DSP_TXFM_COMMON_H_
 
 #include "aom_dsp/aom_dsp_common.h"
 #include "av1/common/enums.h"
@@ -88,4 +88,4 @@
   return rv;
 }
 
-#endif  // AOM_DSP_TXFM_COMMON_H_
+#endif  // AOM_AOM_DSP_TXFM_COMMON_H_
diff --git a/aom_dsp/variance.h b/aom_dsp/variance.h
index 77ad261..362da29 100644
--- a/aom_dsp/variance.h
+++ b/aom_dsp/variance.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_VARIANCE_H_
-#define AOM_DSP_VARIANCE_H_
+#ifndef AOM_AOM_DSP_VARIANCE_H_
+#define AOM_AOM_DSP_VARIANCE_H_
 
 #include "config/aom_config.h"
 
@@ -127,4 +127,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_DSP_VARIANCE_H_
+#endif  // AOM_AOM_DSP_VARIANCE_H_
diff --git a/aom_dsp/x86/blend_mask_sse4.h b/aom_dsp/x86/blend_mask_sse4.h
index 90cce4a..c071fdc 100644
--- a/aom_dsp/x86/blend_mask_sse4.h
+++ b/aom_dsp/x86/blend_mask_sse4.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_X86_BLEND_MASK_SSE4_H_
-#define AOM_DSP_X86_BLEND_MASK_SSE4_H_
+#ifndef AOM_AOM_DSP_X86_BLEND_MASK_SSE4_H_
+#define AOM_AOM_DSP_X86_BLEND_MASK_SSE4_H_
 #include <smmintrin.h>  // SSE4.1
 
 #include <assert.h>
@@ -234,4 +234,4 @@
     src1 += src1_stride;
   }
 }
-#endif  // AOM_DSP_X86_BLEND_MASK_SSE4_H_
+#endif  // AOM_AOM_DSP_X86_BLEND_MASK_SSE4_H_
diff --git a/aom_dsp/x86/blend_sse4.h b/aom_dsp/x86/blend_sse4.h
index f7be7cf..8d9b325 100644
--- a/aom_dsp/x86/blend_sse4.h
+++ b/aom_dsp/x86/blend_sse4.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_X86_BLEND_SSE4_H_
-#define AOM_DSP_X86_BLEND_SSE4_H_
+#ifndef AOM_AOM_DSP_X86_BLEND_SSE4_H_
+#define AOM_AOM_DSP_X86_BLEND_SSE4_H_
 
 #include "aom_dsp/blend.h"
 #include "aom_dsp/x86/synonyms.h"
@@ -188,4 +188,4 @@
   return v_res_w;
 }
 
-#endif  // AOM_DSP_X86_BLEND_SSE4_H_
+#endif  // AOM_AOM_DSP_X86_BLEND_SSE4_H_
diff --git a/aom_dsp/x86/common_avx2.h b/aom_dsp/x86/common_avx2.h
index 3f46420..96fe4eb 100644
--- a/aom_dsp/x86/common_avx2.h
+++ b/aom_dsp/x86/common_avx2.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_X86_COMMON_AVX2_H
-#define AOM_DSP_X86_COMMON_AVX2_H
+#ifndef AOM_AOM_DSP_X86_COMMON_AVX2_H_
+#define AOM_AOM_DSP_X86_COMMON_AVX2_H_
 
 #include <immintrin.h>
 
@@ -144,4 +144,4 @@
   out[7] = _mm256_permute2x128_si256(tr0_7, tr0_f, 0x20);
   out[15] = _mm256_permute2x128_si256(tr0_7, tr0_f, 0x31);
 }
-#endif
+#endif  // AOM_AOM_DSP_X86_COMMON_AVX2_H_
diff --git a/aom_dsp/x86/convolve.h b/aom_dsp/x86/convolve.h
index 001ed47..c6a008a 100644
--- a/aom_dsp/x86/convolve.h
+++ b/aom_dsp/x86/convolve.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef AOM_DSP_X86_CONVOLVE_H_
-#define AOM_DSP_X86_CONVOLVE_H_
+#ifndef AOM_AOM_DSP_X86_CONVOLVE_H_
+#define AOM_AOM_DSP_X86_CONVOLVE_H_
 
 #include <assert.h>
 
@@ -175,4 +175,4 @@
     }                                                                      \
   }
 
-#endif  // AOM_DSP_X86_CONVOLVE_H_
+#endif  // AOM_AOM_DSP_X86_CONVOLVE_H_
diff --git a/aom_dsp/x86/convolve_avx2.h b/aom_dsp/x86/convolve_avx2.h
index 72fabd2..d4f3865 100644
--- a/aom_dsp/x86/convolve_avx2.h
+++ b/aom_dsp/x86/convolve_avx2.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_X86_CONVOLVE_AVX2_H_
-#define AOM_DSP_X86_CONVOLVE_AVX2_H_
+#ifndef AOM_AOM_DSP_X86_CONVOLVE_AVX2_H_
+#define AOM_AOM_DSP_X86_CONVOLVE_AVX2_H_
 
 // filters for 16
 DECLARE_ALIGNED(32, static const uint8_t, filt_global_avx2[]) = {
@@ -191,4 +191,4 @@
   return res_round;
 }
 
-#endif
+#endif  // AOM_AOM_DSP_X86_CONVOLVE_AVX2_H_
diff --git a/aom_dsp/x86/convolve_common_intrin.h b/aom_dsp/x86/convolve_common_intrin.h
index e80c587..707bd2d 100644
--- a/aom_dsp/x86/convolve_common_intrin.h
+++ b/aom_dsp/x86/convolve_common_intrin.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef _AOM_DSP_X86_CONVOLVE_COMMON_INTRIN_H_
-#define _AOM_DSP_X86_CONVOLVE_COMMON_INTRIN_H_
+#ifndef AOM_AOM_DSP_X86_CONVOLVE_COMMON_INTRIN_H_
+#define AOM_AOM_DSP_X86_CONVOLVE_COMMON_INTRIN_H_
 
 // Note:
 //  This header file should be put below any x86 intrinsics head file
@@ -28,4 +28,4 @@
   _mm_store_si128((__m128i *)dst, d);
 }
 
-#endif  // _AOM_DSP_X86_TXFM_COMMON_INTRIN_H_
+#endif  // AOM_AOM_DSP_X86_CONVOLVE_COMMON_INTRIN_H_
diff --git a/aom_dsp/x86/convolve_sse2.h b/aom_dsp/x86/convolve_sse2.h
index 399df5d..445d04b 100644
--- a/aom_dsp/x86/convolve_sse2.h
+++ b/aom_dsp/x86/convolve_sse2.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_X86_CONVOLVE_SSE2_H_
-#define AOM_DSP_X86_CONVOLVE_SSE2_H_
+#ifndef AOM_AOM_DSP_X86_CONVOLVE_SSE2_H_
+#define AOM_AOM_DSP_X86_CONVOLVE_SSE2_H_
 
 // Note:
 //  This header file should be put below any x86 intrinsics head file
@@ -118,4 +118,4 @@
   return res_round;
 }
 
-#endif
+#endif  // AOM_AOM_DSP_X86_CONVOLVE_SSE2_H_
diff --git a/aom_dsp/x86/convolve_sse4_1.h b/aom_dsp/x86/convolve_sse4_1.h
index d48c256..6b8388d 100644
--- a/aom_dsp/x86/convolve_sse4_1.h
+++ b/aom_dsp/x86/convolve_sse4_1.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef _AOM_DSP_X86_CONVOLVE_SSE4_1_INTRIN_H_
-#define _AOM_DSP_X86_CONVOLVE_SSE4_1_INTRIN_H_
+#ifndef AOM_AOM_DSP_X86_CONVOLVE_SSE4_1_H_
+#define AOM_AOM_DSP_X86_CONVOLVE_SSE4_1_H_
 
 // Note:
 //  This header file should be put below any x86 intrinsics head file
@@ -50,4 +50,4 @@
   return res;
 }
 
-#endif  // _AOM_DSP_X86_TXFM_COMMON_INTRIN_H_
+#endif  // AOM_AOM_DSP_X86_CONVOLVE_SSE4_1_H_
diff --git a/aom_dsp/x86/fwd_txfm_sse2.h b/aom_dsp/x86/fwd_txfm_sse2.h
index 12ccf7f..260d8dd 100644
--- a/aom_dsp/x86/fwd_txfm_sse2.h
+++ b/aom_dsp/x86/fwd_txfm_sse2.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_X86_FWD_TXFM_SSE2_H_
-#define AOM_DSP_X86_FWD_TXFM_SSE2_H_
+#ifndef AOM_AOM_DSP_X86_FWD_TXFM_SSE2_H_
+#define AOM_AOM_DSP_X86_FWD_TXFM_SSE2_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -152,4 +152,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_DSP_X86_FWD_TXFM_SSE2_H_
+#endif  // AOM_AOM_DSP_X86_FWD_TXFM_SSE2_H_
diff --git a/aom_dsp/x86/lpf_common_sse2.h b/aom_dsp/x86/lpf_common_sse2.h
index c6b6469..8970fe7 100644
--- a/aom_dsp/x86/lpf_common_sse2.h
+++ b/aom_dsp/x86/lpf_common_sse2.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef _AOM_DSP_X86_LPF_COMMON_X86_H
-#define _AOM_DSP_X86_LPF_COMMON_X86_H
+#ifndef AOM_AOM_DSP_X86_LPF_COMMON_SSE2_H_
+#define AOM_AOM_DSP_X86_LPF_COMMON_SSE2_H_
 
 #include <emmintrin.h>  // SSE2
 
@@ -212,4 +212,4 @@
                            d4 + 1, d5 + 1, d6 + 1, d7 + 1);
 }
 
-#endif  // _AOM_DSP_X86_LPF_COMMON_X86_H
+#endif  // AOM_AOM_DSP_X86_LPF_COMMON_SSE2_H_
diff --git a/aom_dsp/x86/masked_sad_intrin_ssse3.h b/aom_dsp/x86/masked_sad_intrin_ssse3.h
index 5a2b9e5..cffbd96 100644
--- a/aom_dsp/x86/masked_sad_intrin_ssse3.h
+++ b/aom_dsp/x86/masked_sad_intrin_ssse3.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_X86_MASKED_SAD_INTRIN_SSSE3_H
-#define AOM_DSP_X86_MASKED_SAD_INTRIN_SSSE3_H
+#ifndef AOM_AOM_DSP_X86_MASKED_SAD_INTRIN_SSSE3_H_
+#define AOM_AOM_DSP_X86_MASKED_SAD_INTRIN_SSSE3_H_
 
 unsigned int aom_masked_sad8xh_ssse3(const uint8_t *src_ptr, int src_stride,
                                      const uint8_t *a_ptr, int a_stride,
@@ -30,4 +30,4 @@
                                             const uint8_t *m_ptr, int m_stride,
                                             int height);
 
-#endif  // AOM_DSP_X86_MASKED_SAD_INTRIN_SSSE3_H
+#endif  // AOM_AOM_DSP_X86_MASKED_SAD_INTRIN_SSSE3_H_
diff --git a/aom_dsp/x86/masked_variance_intrin_ssse3.h b/aom_dsp/x86/masked_variance_intrin_ssse3.h
index dc41a83..4faa098 100644
--- a/aom_dsp/x86/masked_variance_intrin_ssse3.h
+++ b/aom_dsp/x86/masked_variance_intrin_ssse3.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef _AOM_DSP_X86_MASKED_VARIANCE_INTRIN_SSSE3_H
-#define _AOM_DSP_X86_MASKED_VARIANCE_INTRIN_SSSE3_H
+#ifndef AOM_AOM_DSP_X86_MASKED_VARIANCE_INTRIN_SSSE3_H_
+#define AOM_AOM_DSP_X86_MASKED_VARIANCE_INTRIN_SSSE3_H_
 
 #include <stdlib.h>
 #include <string.h>
@@ -89,4 +89,4 @@
   } while (i < height);
 }
 
-#endif
+#endif  // AOM_AOM_DSP_X86_MASKED_VARIANCE_INTRIN_SSSE3_H_
diff --git a/aom_dsp/x86/mem_sse2.h b/aom_dsp/x86/mem_sse2.h
index 8b69606..6c82167 100644
--- a/aom_dsp/x86/mem_sse2.h
+++ b/aom_dsp/x86/mem_sse2.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_X86_MEM_SSE2_H_
-#define AOM_DSP_X86_MEM_SSE2_H_
+#ifndef AOM_AOM_DSP_X86_MEM_SSE2_H_
+#define AOM_AOM_DSP_X86_MEM_SSE2_H_
 
 #include <emmintrin.h>  // SSE2
 
@@ -39,4 +39,4 @@
   return dst;
 }
 
-#endif  // AOM_DSP_X86_MEM_SSE2_H_
+#endif  // AOM_AOM_DSP_X86_MEM_SSE2_H_
diff --git a/aom_dsp/x86/obmc_intrinsic_sse4.h b/aom_dsp/x86/obmc_intrinsic_sse4.h
index fc0603a..5181e44 100644
--- a/aom_dsp/x86/obmc_intrinsic_sse4.h
+++ b/aom_dsp/x86/obmc_intrinsic_sse4.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_X86_OBMC_INTRINSIC_SSE4_1_H_
-#define AOM_DSP_X86_OBMC_INTRINSIC_SSE4_1_H_
+#ifndef AOM_AOM_DSP_X86_OBMC_INTRINSIC_SSE4_H_
+#define AOM_AOM_DSP_X86_OBMC_INTRINSIC_SSE4_H_
 
 #include <smmintrin.h>
 
@@ -55,4 +55,4 @@
   *sse = xx_hsum_epi32_si32(v_sse_d);
 }
 
-#endif  // AOM_DSP_X86_OBMC_INTRINSIC_SSE4_1_H_
+#endif  // AOM_AOM_DSP_X86_OBMC_INTRINSIC_SSE4_H_
diff --git a/aom_dsp/x86/obmc_intrinsic_ssse3.h b/aom_dsp/x86/obmc_intrinsic_ssse3.h
index 1d28a98..48486c6 100644
--- a/aom_dsp/x86/obmc_intrinsic_ssse3.h
+++ b/aom_dsp/x86/obmc_intrinsic_ssse3.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_X86_OBMC_INTRINSIC_SSSE3_H_
-#define AOM_DSP_X86_OBMC_INTRINSIC_SSSE3_H_
+#ifndef AOM_AOM_DSP_X86_OBMC_INTRINSIC_SSSE3_H_
+#define AOM_AOM_DSP_X86_OBMC_INTRINSIC_SSSE3_H_
 
 #include <immintrin.h>
 
@@ -51,4 +51,4 @@
   return _mm_srai_epi32(v_tmp_d, bits);
 }
 
-#endif  // AOM_DSP_X86_OBMC_INTRINSIC_SSSE3_H_
+#endif  // AOM_AOM_DSP_X86_OBMC_INTRINSIC_SSSE3_H_
diff --git a/aom_dsp/x86/synonyms.h b/aom_dsp/x86/synonyms.h
index 4601496..1e9f1e2 100644
--- a/aom_dsp/x86/synonyms.h
+++ b/aom_dsp/x86/synonyms.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_X86_SYNONYMS_H_
-#define AOM_DSP_X86_SYNONYMS_H_
+#ifndef AOM_AOM_DSP_X86_SYNONYMS_H_
+#define AOM_AOM_DSP_X86_SYNONYMS_H_
 
 #include <immintrin.h>
 
@@ -111,4 +111,4 @@
   return _mm_srai_epi16(v_tmp_d, bits);
 }
 
-#endif  // AOM_DSP_X86_SYNONYMS_H_
+#endif  // AOM_AOM_DSP_X86_SYNONYMS_H_
diff --git a/aom_dsp/x86/synonyms_avx2.h b/aom_dsp/x86/synonyms_avx2.h
index 3371928..3f69b12 100644
--- a/aom_dsp/x86/synonyms_avx2.h
+++ b/aom_dsp/x86/synonyms_avx2.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_X86_SYNONYMS_AVX2_H_
-#define AOM_DSP_X86_SYNONYMS_AVX2_H_
+#ifndef AOM_AOM_DSP_X86_SYNONYMS_AVX2_H_
+#define AOM_AOM_DSP_X86_SYNONYMS_AVX2_H_
 
 #include <immintrin.h>
 
@@ -71,4 +71,4 @@
   const __m256i v_s_w = _mm256_srli_epi16(v_val_w, bits - 1);
   return _mm256_avg_epu16(v_s_w, _mm256_setzero_si256());
 }
-#endif  // AOM_DSP_X86_SYNONYMS_AVX2_H_
+#endif  // AOM_AOM_DSP_X86_SYNONYMS_AVX2_H_
diff --git a/aom_dsp/x86/transpose_sse2.h b/aom_dsp/x86/transpose_sse2.h
index f88a152..d0d1ee6 100644
--- a/aom_dsp/x86/transpose_sse2.h
+++ b/aom_dsp/x86/transpose_sse2.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_X86_TRANSPOSE_SSE2_H_
-#define AOM_DSP_X86_TRANSPOSE_SSE2_H_
+#ifndef AOM_AOM_DSP_X86_TRANSPOSE_SSE2_H_
+#define AOM_AOM_DSP_X86_TRANSPOSE_SSE2_H_
 
 #include <emmintrin.h>  // SSE2
 
@@ -417,4 +417,4 @@
   out[7] = _mm_unpackhi_epi64(a6, a7);
 }
 
-#endif  // AOM_DSP_X86_TRANSPOSE_SSE2_H_
+#endif  // AOM_AOM_DSP_X86_TRANSPOSE_SSE2_H_
diff --git a/aom_dsp/x86/txfm_common_avx2.h b/aom_dsp/x86/txfm_common_avx2.h
index bdff64b..b1611ba 100644
--- a/aom_dsp/x86/txfm_common_avx2.h
+++ b/aom_dsp/x86/txfm_common_avx2.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_X86_TXFM_COMMON_AVX2_H_
-#define AOM_DSP_X86_TXFM_COMMON_AVX2_H_
+#ifndef AOM_AOM_DSP_X86_TXFM_COMMON_AVX2_H_
+#define AOM_AOM_DSP_X86_TXFM_COMMON_AVX2_H_
 
 #include <emmintrin.h>
 #include "aom/aom_integer.h"
@@ -196,4 +196,4 @@
 }
 #endif
 
-#endif  // AOM_DSP_X86_TXFM_COMMON_AVX2_H_
+#endif  // AOM_AOM_DSP_X86_TXFM_COMMON_AVX2_H_
diff --git a/aom_dsp/x86/txfm_common_sse2.h b/aom_dsp/x86/txfm_common_sse2.h
index 58a7924..ed82eee 100644
--- a/aom_dsp/x86/txfm_common_sse2.h
+++ b/aom_dsp/x86/txfm_common_sse2.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_DSP_X86_TXFM_COMMON_SSE2_H_
-#define AOM_DSP_X86_TXFM_COMMON_SSE2_H_
+#ifndef AOM_AOM_DSP_X86_TXFM_COMMON_SSE2_H_
+#define AOM_AOM_DSP_X86_TXFM_COMMON_SSE2_H_
 
 #include <emmintrin.h>
 #include "aom/aom_integer.h"
@@ -26,4 +26,4 @@
   return _mm_shuffle_epi32(b, 0x4e);
 }
 
-#endif  // AOM_DSP_X86_TXFM_COMMON_SSE2_H_
+#endif  // AOM_AOM_DSP_X86_TXFM_COMMON_SSE2_H_
diff --git a/aom_mem/aom_mem.h b/aom_mem/aom_mem.h
index a36ee3e..4b1fa45 100644
--- a/aom_mem/aom_mem.h
+++ b/aom_mem/aom_mem.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_MEM_AOM_MEM_H_
-#define AOM_MEM_AOM_MEM_H_
+#ifndef AOM_AOM_MEM_AOM_MEM_H_
+#define AOM_AOM_MEM_AOM_MEM_H_
 
 #include "aom/aom_integer.h"
 #include "config/aom_config.h"
@@ -67,4 +67,4 @@
 }
 #endif
 
-#endif  // AOM_MEM_AOM_MEM_H_
+#endif  // AOM_AOM_MEM_AOM_MEM_H_
diff --git a/aom_mem/include/aom_mem_intrnl.h b/aom_mem/include/aom_mem_intrnl.h
index 977ebad..cbc30a9 100644
--- a/aom_mem/include/aom_mem_intrnl.h
+++ b/aom_mem/include/aom_mem_intrnl.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_MEM_INCLUDE_AOM_MEM_INTRNL_H_
-#define AOM_MEM_INCLUDE_AOM_MEM_INTRNL_H_
+#ifndef AOM_AOM_MEM_INCLUDE_AOM_MEM_INTRNL_H_
+#define AOM_AOM_MEM_INCLUDE_AOM_MEM_INTRNL_H_
 
 #include "config/aom_config.h"
 
@@ -30,4 +30,4 @@
 #define align_addr(addr, align) \
   (void *)(((size_t)(addr) + ((align)-1)) & ~(size_t)((align)-1))
 
-#endif  // AOM_MEM_INCLUDE_AOM_MEM_INTRNL_H_
+#endif  // AOM_AOM_MEM_INCLUDE_AOM_MEM_INTRNL_H_
diff --git a/aom_ports/aom_once.h b/aom_ports/aom_once.h
index 8e04f85..4d77aac 100644
--- a/aom_ports/aom_once.h
+++ b/aom_ports/aom_once.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_PORTS_AOM_ONCE_H_
-#define AOM_PORTS_AOM_ONCE_H_
+#ifndef AOM_AOM_PORTS_AOM_ONCE_H_
+#define AOM_AOM_PORTS_AOM_ONCE_H_
 
 #include "config/aom_config.h"
 
@@ -135,4 +135,4 @@
 }
 #endif
 
-#endif  // AOM_PORTS_AOM_ONCE_H_
+#endif  // AOM_AOM_PORTS_AOM_ONCE_H_
diff --git a/aom_ports/aom_timer.h b/aom_ports/aom_timer.h
index c719ec6..9b17b89 100644
--- a/aom_ports/aom_timer.h
+++ b/aom_ports/aom_timer.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_PORTS_AOM_TIMER_H_
-#define AOM_PORTS_AOM_TIMER_H_
+#ifndef AOM_AOM_PORTS_AOM_TIMER_H_
+#define AOM_AOM_PORTS_AOM_TIMER_H_
 
 #include "config/aom_config.h"
 
@@ -108,4 +108,4 @@
 
 #endif /* CONFIG_OS_SUPPORT */
 
-#endif  // AOM_PORTS_AOM_TIMER_H_
+#endif  // AOM_AOM_PORTS_AOM_TIMER_H_
diff --git a/aom_ports/arm.h b/aom_ports/arm.h
index a1a2ab7..1aade74 100644
--- a/aom_ports/arm.h
+++ b/aom_ports/arm.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_PORTS_ARM_H_
-#define AOM_PORTS_ARM_H_
+#ifndef AOM_AOM_PORTS_ARM_H_
+#define AOM_AOM_PORTS_ARM_H_
 #include <stdlib.h>
 
 #include "config/aom_config.h"
@@ -38,4 +38,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_PORTS_ARM_H_
+#endif  // AOM_AOM_PORTS_ARM_H_
diff --git a/aom_ports/bitops.h b/aom_ports/bitops.h
index 4cc3f53..44df173 100644
--- a/aom_ports/bitops.h
+++ b/aom_ports/bitops.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_PORTS_BITOPS_H_
-#define AOM_PORTS_BITOPS_H_
+#ifndef AOM_AOM_PORTS_BITOPS_H_
+#define AOM_AOM_PORTS_BITOPS_H_
 
 #include <assert.h>
 
@@ -75,4 +75,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_PORTS_BITOPS_H_
+#endif  // AOM_AOM_PORTS_BITOPS_H_
diff --git a/aom_ports/emmintrin_compat.h b/aom_ports/emmintrin_compat.h
index f9d44c6..85d218a 100644
--- a/aom_ports/emmintrin_compat.h
+++ b/aom_ports/emmintrin_compat.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_PORTS_EMMINTRIN_COMPAT_H_
-#define AOM_PORTS_EMMINTRIN_COMPAT_H_
+#ifndef AOM_AOM_PORTS_EMMINTRIN_COMPAT_H_
+#define AOM_AOM_PORTS_EMMINTRIN_COMPAT_H_
 
 #if defined(__GNUC__) && __GNUC__ < 4
 /* From emmintrin.h (gcc 4.5.3) */
@@ -53,4 +53,4 @@
 }
 #endif
 
-#endif  // AOM_PORTS_EMMINTRIN_COMPAT_H_
+#endif  // AOM_AOM_PORTS_EMMINTRIN_COMPAT_H_
diff --git a/aom_ports/mem.h b/aom_ports/mem.h
index 0793d82..3ffea3c 100644
--- a/aom_ports/mem.h
+++ b/aom_ports/mem.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_PORTS_MEM_H_
-#define AOM_PORTS_MEM_H_
+#ifndef AOM_AOM_PORTS_MEM_H_
+#define AOM_AOM_PORTS_MEM_H_
 
 #include "aom/aom_integer.h"
 #include "config/aom_config.h"
@@ -66,4 +66,4 @@
 #define CONVERT_TO_SHORTPTR(x) ((uint16_t *)(((uintptr_t)(x)) << 1))
 #define CONVERT_TO_BYTEPTR(x) ((uint8_t *)(((uintptr_t)(x)) >> 1))
 
-#endif  // AOM_PORTS_MEM_H_
+#endif  // AOM_AOM_PORTS_MEM_H_
diff --git a/aom_ports/mem_ops.h b/aom_ports/mem_ops.h
index ef0ee17..2b5bc0f 100644
--- a/aom_ports/mem_ops.h
+++ b/aom_ports/mem_ops.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_PORTS_MEM_OPS_H_
-#define AOM_PORTS_MEM_OPS_H_
+#ifndef AOM_AOM_PORTS_MEM_OPS_H_
+#define AOM_AOM_PORTS_MEM_OPS_H_
 
 /* \file
  * \brief Provides portable memory access primitives
@@ -225,4 +225,4 @@
   mem[3] = (MAU_T)((val >> 24) & 0xff);
 }
 /* clang-format on */
-#endif  // AOM_PORTS_MEM_OPS_H_
+#endif  // AOM_AOM_PORTS_MEM_OPS_H_
diff --git a/aom_ports/mem_ops_aligned.h b/aom_ports/mem_ops_aligned.h
index 81fe41a..37c3675 100644
--- a/aom_ports/mem_ops_aligned.h
+++ b/aom_ports/mem_ops_aligned.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_PORTS_MEM_OPS_ALIGNED_H_
-#define AOM_PORTS_MEM_OPS_ALIGNED_H_
+#ifndef AOM_AOM_PORTS_MEM_OPS_ALIGNED_H_
+#define AOM_AOM_PORTS_MEM_OPS_ALIGNED_H_
 
 #include "aom/aom_integer.h"
 
@@ -170,4 +170,4 @@
 #undef swap_endian_32_se
 /* clang-format on */
 
-#endif  // AOM_PORTS_MEM_OPS_ALIGNED_H_
+#endif  // AOM_AOM_PORTS_MEM_OPS_ALIGNED_H_
diff --git a/aom_ports/msvc.h b/aom_ports/msvc.h
index 7d2b540..e78e605 100644
--- a/aom_ports/msvc.h
+++ b/aom_ports/msvc.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_PORTS_MSVC_H_
-#define AOM_PORTS_MSVC_H_
+#ifndef AOM_AOM_PORTS_MSVC_H_
+#define AOM_AOM_PORTS_MSVC_H_
 #ifdef _MSC_VER
 
 #include "config/aom_config.h"
@@ -72,4 +72,4 @@
 #endif  // _MSC_VER <= 1900
 #endif  // HAVE_AVX
 #endif  // _MSC_VER
-#endif  // AOM_PORTS_MSVC_H_
+#endif  // AOM_AOM_PORTS_MSVC_H_
diff --git a/aom_ports/ppc.h b/aom_ports/ppc.h
index ec487c2..3159bda 100644
--- a/aom_ports/ppc.h
+++ b/aom_ports/ppc.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_PORTS_PPC_H_
-#define AOM_PORTS_PPC_H_
+#ifndef AOM_AOM_PORTS_PPC_H_
+#define AOM_AOM_PORTS_PPC_H_
 #include <stdlib.h>
 
 #include "config/aom_config.h"
@@ -27,4 +27,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_PORTS_PPC_H_
+#endif  // AOM_AOM_PORTS_PPC_H_
diff --git a/aom_ports/sanitizer.h b/aom_ports/sanitizer.h
index d4e197e..1dd8eb4 100644
--- a/aom_ports/sanitizer.h
+++ b/aom_ports/sanitizer.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_PORTS_SANITIZER_H_
-#define AOM_PORTS_SANITIZER_H_
+#ifndef AOM_AOM_PORTS_SANITIZER_H_
+#define AOM_AOM_PORTS_SANITIZER_H_
 
 // AddressSanitizer support.
 
@@ -35,4 +35,4 @@
 #define ASAN_UNPOISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size))
 #endif
 
-#endif  // AOM_PORTS_SANITIZER_H_
+#endif  // AOM_AOM_PORTS_SANITIZER_H_
diff --git a/aom_ports/system_state.h b/aom_ports/system_state.h
index 0f2c3d8..6640839 100644
--- a/aom_ports/system_state.h
+++ b/aom_ports/system_state.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_PORTS_SYSTEM_STATE_H_
-#define AOM_PORTS_SYSTEM_STATE_H_
+#ifndef AOM_AOM_PORTS_SYSTEM_STATE_H_
+#define AOM_AOM_PORTS_SYSTEM_STATE_H_
 
 #include "config/aom_config.h"
 
@@ -20,4 +20,4 @@
 #else
 #define aom_clear_system_state()
 #endif  // ARCH_X86 || ARCH_X86_64
-#endif  // AOM_PORTS_SYSTEM_STATE_H_
+#endif  // AOM_AOM_PORTS_SYSTEM_STATE_H_
diff --git a/aom_ports/x86.h b/aom_ports/x86.h
index b642a57..52ee49c 100644
--- a/aom_ports/x86.h
+++ b/aom_ports/x86.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_PORTS_X86_H_
-#define AOM_PORTS_X86_H_
+#ifndef AOM_AOM_PORTS_X86_H_
+#define AOM_AOM_PORTS_X86_H_
 #include <stdlib.h>
 
 #if defined(_MSC_VER)
@@ -322,4 +322,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_PORTS_X86_H_
+#endif  // AOM_AOM_PORTS_X86_H_
diff --git a/aom_scale/aom_scale.h b/aom_scale/aom_scale.h
index a4aef6c..11812a1 100644
--- a/aom_scale/aom_scale.h
+++ b/aom_scale/aom_scale.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_SCALE_AOM_SCALE_H_
-#define AOM_SCALE_AOM_SCALE_H_
+#ifndef AOM_AOM_SCALE_AOM_SCALE_H_
+#define AOM_AOM_SCALE_AOM_SCALE_H_
 
 #include "aom_scale/yv12config.h"
 
@@ -20,4 +20,4 @@
                             unsigned int vscale, unsigned int vratio,
                             unsigned int interlaced, const int num_planes);
 
-#endif  // AOM_SCALE_AOM_SCALE_H_
+#endif  // AOM_AOM_SCALE_AOM_SCALE_H_
diff --git a/aom_scale/yv12config.h b/aom_scale/yv12config.h
index 768143e..2fb81ac 100644
--- a/aom_scale/yv12config.h
+++ b/aom_scale/yv12config.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_SCALE_YV12CONFIG_H_
-#define AOM_SCALE_YV12CONFIG_H_
+#ifndef AOM_AOM_SCALE_YV12CONFIG_H_
+#define AOM_AOM_SCALE_YV12CONFIG_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -140,4 +140,4 @@
 }
 #endif
 
-#endif  // AOM_SCALE_YV12CONFIG_H_
+#endif  // AOM_AOM_SCALE_YV12CONFIG_H_
diff --git a/aom_util/aom_thread.h b/aom_util/aom_thread.h
index fdb724d..f14c1ac 100644
--- a/aom_util/aom_thread.h
+++ b/aom_util/aom_thread.h
@@ -14,8 +14,8 @@
 // Original source:
 //  https://chromium.googlesource.com/webm/libwebp
 
-#ifndef AOM_THREAD_H_
-#define AOM_THREAD_H_
+#ifndef AOM_AOM_UTIL_AOM_THREAD_H_
+#define AOM_AOM_UTIL_AOM_THREAD_H_
 
 #include "config/aom_config.h"
 
@@ -427,4 +427,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_THREAD_H_
+#endif  // AOM_AOM_UTIL_AOM_THREAD_H_
diff --git a/aom_util/debug_util.h b/aom_util/debug_util.h
index 4096801..127a8b4 100644
--- a/aom_util/debug_util.h
+++ b/aom_util/debug_util.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_UTIL_DEBUG_UTIL_H_
-#define AOM_UTIL_DEBUG_UTIL_H_
+#ifndef AOM_AOM_UTIL_DEBUG_UTIL_H_
+#define AOM_AOM_UTIL_DEBUG_UTIL_H_
 
 #include "config/aom_config.h"
 
@@ -66,4 +66,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOM_UTIL_DEBUG_UTIL_H_
+#endif  // AOM_AOM_UTIL_DEBUG_UTIL_H_
diff --git a/aom_util/endian_inl.h b/aom_util/endian_inl.h
index 2d28221..f536ec5 100644
--- a/aom_util/endian_inl.h
+++ b/aom_util/endian_inl.h
@@ -11,8 +11,8 @@
 //
 // Endian related functions.
 
-#ifndef AOM_UTIL_ENDIAN_INL_H_
-#define AOM_UTIL_ENDIAN_INL_H_
+#ifndef AOM_AOM_UTIL_ENDIAN_INL_H_
+#define AOM_AOM_UTIL_ENDIAN_INL_H_
 
 #include <stdlib.h>
 
@@ -119,4 +119,4 @@
 #endif  // HAVE_BUILTIN_BSWAP64
 }
 
-#endif  // AOM_UTIL_ENDIAN_INL_H_
+#endif  // AOM_AOM_UTIL_ENDIAN_INL_H_
diff --git a/apps/aomenc.h b/apps/aomenc.h
index 976079d..14047fa 100644
--- a/apps/aomenc.h
+++ b/apps/aomenc.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef AOMENC_H_
-#define AOMENC_H_
+#ifndef AOM_APPS_AOMENC_H_
+#define AOM_APPS_AOMENC_H_
 
 #include "aom/aom_encoder.h"
 
@@ -60,4 +60,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOMENC_H_
+#endif  // AOM_APPS_AOMENC_H_
diff --git a/av1/av1_iface_common.h b/av1/av1_iface_common.h
index efa23dc..4a7af58 100644
--- a/av1/av1_iface_common.h
+++ b/av1/av1_iface_common.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef AV1_AV1_IFACE_COMMON_H_
-#define AV1_AV1_IFACE_COMMON_H_
+#ifndef AOM_AV1_AV1_IFACE_COMMON_H_
+#define AOM_AV1_AV1_IFACE_COMMON_H_
 
 #include "aom_ports/mem.h"
 #include "aom_scale/yv12config.h"
@@ -133,4 +133,4 @@
   return AOM_CODEC_OK;
 }
 
-#endif  // AV1_AV1_IFACE_COMMON_H_
+#endif  // AOM_AV1_AV1_IFACE_COMMON_H_
diff --git a/av1/common/alloccommon.h b/av1/common/alloccommon.h
index dbcb5b9..8e58969 100644
--- a/av1/common/alloccommon.h
+++ b/av1/common/alloccommon.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_ALLOCCOMMON_H_
-#define AV1_COMMON_ALLOCCOMMON_H_
+#ifndef AOM_AV1_COMMON_ALLOCCOMMON_H_
+#define AOM_AV1_COMMON_ALLOCCOMMON_H_
 
 #define INVALID_IDX -1  // Invalid buffer index.
 
@@ -45,4 +45,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_ALLOCCOMMON_H_
+#endif  // AOM_AV1_COMMON_ALLOCCOMMON_H_
diff --git a/av1/common/arm/av1_inv_txfm_neon.h b/av1/common/arm/av1_inv_txfm_neon.h
index 7f1e9fe..9ec6582 100644
--- a/av1/common/arm/av1_inv_txfm_neon.h
+++ b/av1/common/arm/av1_inv_txfm_neon.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef AV1_COMMON_ARM_AV1_INV_TXFM_NEON_H_
-#define AV1_COMMON_ARM_AV1_INV_TXFM_NEON_H_
+#ifndef AOM_AV1_COMMON_ARM_AV1_INV_TXFM_NEON_H_
+#define AOM_AV1_COMMON_ARM_AV1_INV_TXFM_NEON_H_
 
 #include "config/aom_config.h"
 #include "config/av1_rtcd.h"
@@ -151,4 +151,4 @@
   *eoby = eob_fill[temp_eoby];
 }
 
-#endif  // AV1_COMMON_ARM_AV1_INV_TXFM_NEON_H_
+#endif  // AOM_AV1_COMMON_ARM_AV1_INV_TXFM_NEON_H_
diff --git a/av1/common/arm/convolve_neon.h b/av1/common/arm/convolve_neon.h
index 47c93d6..f382984 100644
--- a/av1/common/arm/convolve_neon.h
+++ b/av1/common/arm/convolve_neon.h
@@ -8,8 +8,8 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef AV1_COMMON_ARM_CONVOLVE_NEON_H_
-#define AV1_COMMON_ARM_CONVOLVE_NEON_H_
+#ifndef AOM_AV1_COMMON_ARM_CONVOLVE_NEON_H_
+#define AOM_AV1_COMMON_ARM_CONVOLVE_NEON_H_
 
 #include <arm_neon.h>
 
@@ -225,4 +225,4 @@
   return res;
 }
 
-#endif  // AV1_COMMON_ARM_CONVOLVE_NEON_H_
+#endif  // AOM_AV1_COMMON_ARM_CONVOLVE_NEON_H_
diff --git a/av1/common/arm/mem_neon.h b/av1/common/arm/mem_neon.h
index d5f458e..c4ae2e7 100644
--- a/av1/common/arm/mem_neon.h
+++ b/av1/common/arm/mem_neon.h
@@ -8,8 +8,8 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef AV1_COMMON_ARM_MEM_NEON_H_
-#define AV1_COMMON_ARM_MEM_NEON_H_
+#ifndef AOM_AV1_COMMON_ARM_MEM_NEON_H_
+#define AOM_AV1_COMMON_ARM_MEM_NEON_H_
 
 #include <arm_neon.h>
 #include <string.h>
@@ -491,4 +491,4 @@
   vst1q_u32(s, s4);
 }
 
-#endif  // AV1_COMMON_ARM_MEM_NEON_H_
+#endif  // AOM_AV1_COMMON_ARM_MEM_NEON_H_
diff --git a/av1/common/arm/transpose_neon.h b/av1/common/arm/transpose_neon.h
index c4a414b..8a3d9f0 100644
--- a/av1/common/arm/transpose_neon.h
+++ b/av1/common/arm/transpose_neon.h
@@ -8,8 +8,8 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef AV1_COMMON_ARM_TRANSPOSE_NEON_H_
-#define AV1_COMMON_ARM_TRANSPOSE_NEON_H_
+#ifndef AOM_AV1_COMMON_ARM_TRANSPOSE_NEON_H_
+#define AOM_AV1_COMMON_ARM_TRANSPOSE_NEON_H_
 
 #include <arm_neon.h>
 
@@ -534,4 +534,4 @@
   *a3 = c1.val[1];
 }
 
-#endif  // AV1_COMMON_ARM_TRANSPOSE_NEON_H_
+#endif  // AOM_AV1_COMMON_ARM_TRANSPOSE_NEON_H_
diff --git a/av1/common/av1_inv_txfm1d.h b/av1/common/av1_inv_txfm1d.h
index 64a1a92..c31c019 100644
--- a/av1/common/av1_inv_txfm1d.h
+++ b/av1/common/av1_inv_txfm1d.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_INV_TXFM1D_H_
-#define AV1_INV_TXFM1D_H_
+#ifndef AOM_AV1_COMMON_AV1_INV_TXFM1D_H_
+#define AOM_AV1_COMMON_AV1_INV_TXFM1D_H_
 
 #include "av1/common/av1_txfm.h"
 
@@ -58,4 +58,4 @@
 }
 #endif
 
-#endif  // AV1_INV_TXFM1D_H_
+#endif  // AOM_AV1_COMMON_AV1_INV_TXFM1D_H_
diff --git a/av1/common/av1_inv_txfm1d_cfg.h b/av1/common/av1_inv_txfm1d_cfg.h
index 4c600f7..7d80a00 100644
--- a/av1/common/av1_inv_txfm1d_cfg.h
+++ b/av1/common/av1_inv_txfm1d_cfg.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_INV_TXFM2D_CFG_H_
-#define AV1_INV_TXFM2D_CFG_H_
+#ifndef AOM_AV1_COMMON_AV1_INV_TXFM1D_CFG_H_
+#define AOM_AV1_COMMON_AV1_INV_TXFM1D_CFG_H_
 #include "av1/common/av1_inv_txfm1d.h"
 
 // sum of fwd_shift_##
@@ -44,4 +44,4 @@
 extern const int8_t inv_cos_bit_col[5 /*row*/][5 /*col*/];
 extern const int8_t inv_cos_bit_row[5 /*row*/][5 /*col*/];
 
-#endif  // AV1_INV_TXFM2D_CFG_H_
+#endif  // AOM_AV1_COMMON_AV1_INV_TXFM1D_CFG_H_
diff --git a/av1/common/av1_loopfilter.h b/av1/common/av1_loopfilter.h
index d721a96..1229c0d 100644
--- a/av1/common/av1_loopfilter.h
+++ b/av1/common/av1_loopfilter.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_LOOPFILTER_H_
-#define AV1_COMMON_LOOPFILTER_H_
+#ifndef AOM_AV1_COMMON_AV1_LOOPFILTER_H_
+#define AOM_AV1_COMMON_AV1_LOOPFILTER_H_
 
 #include "config/aom_config.h"
 
@@ -160,4 +160,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_LOOPFILTER_H_
+#endif  // AOM_AV1_COMMON_AV1_LOOPFILTER_H_
diff --git a/av1/common/av1_txfm.h b/av1/common/av1_txfm.h
index 660729b..c92f91d 100644
--- a/av1/common/av1_txfm.h
+++ b/av1/common/av1_txfm.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_TXFM_H_
-#define AV1_TXFM_H_
+#ifndef AOM_AV1_COMMON_AV1_TXFM_H_
+#define AOM_AV1_COMMON_AV1_TXFM_H_
 
 #include <assert.h>
 #include <math.h>
@@ -214,4 +214,4 @@
 }
 #endif  // __cplusplus
 
-#endif  // AV1_TXFM_H_
+#endif  // AOM_AV1_COMMON_AV1_TXFM_H_
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index e6bbb9c..9b962fd 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_BLOCKD_H_
-#define AV1_COMMON_BLOCKD_H_
+#ifndef AOM_AV1_COMMON_BLOCKD_H_
+#define AOM_AV1_COMMON_BLOCKD_H_
 
 #include "config/aom_config.h"
 
@@ -1168,4 +1168,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_BLOCKD_H_
+#endif  // AOM_AV1_COMMON_BLOCKD_H_
diff --git a/av1/common/cdef.h b/av1/common/cdef.h
index 092230d..3b2eac8 100644
--- a/av1/common/cdef.h
+++ b/av1/common/cdef.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef AV1_COMMON_CDEF_H_
-#define AV1_COMMON_CDEF_H_
+#ifndef AOM_AV1_COMMON_CDEF_H_
+#define AOM_AV1_COMMON_CDEF_H_
 
 #define CDEF_STRENGTH_BITS 6
 
@@ -48,4 +48,4 @@
 #ifdef __cplusplus
 }  // extern "C"
 #endif
-#endif  // AV1_COMMON_CDEF_H_
+#endif  // AOM_AV1_COMMON_CDEF_H_
diff --git a/av1/common/cdef_block.h b/av1/common/cdef_block.h
index 81c6da0..6b4452c 100644
--- a/av1/common/cdef_block.h
+++ b/av1/common/cdef_block.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#if !defined(_CDEF_BLOCK_H)
-#define _CDEF_BLOCK_H (1)
+#ifndef AOM_AV1_COMMON_CDEF_BLOCK_H_
+#define AOM_AV1_COMMON_CDEF_BLOCK_H_
 
 #include "av1/common/odintrin.h"
 
@@ -56,4 +56,4 @@
                     cdef_list *dlist, int cdef_count, int level,
                     int sec_strength, int pri_damping, int sec_damping,
                     int coeff_shift);
-#endif
+#endif  // AOM_AV1_COMMON_CDEF_BLOCK_H_
diff --git a/av1/common/cdef_block_simd.h b/av1/common/cdef_block_simd.h
index d24a7c0..14587a0 100644
--- a/av1/common/cdef_block_simd.h
+++ b/av1/common/cdef_block_simd.h
@@ -9,6 +9,9 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
+#ifndef AOM_AV1_COMMON_CDEF_BLOCK_SIMD_H_
+#define AOM_AV1_COMMON_CDEF_BLOCK_SIMD_H_
+
 #include "config/av1_rtcd.h"
 
 #include "av1/common/cdef_block.h"
@@ -913,3 +916,5 @@
     }
   }
 }
+
+#endif  // AOM_AV1_COMMON_CDEF_BLOCK_SIMD_H_
diff --git a/av1/common/cfl.h b/av1/common/cfl.h
index bc9fbce..d627891 100644
--- a/av1/common/cfl.h
+++ b/av1/common/cfl.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_CFL_H_
-#define AV1_COMMON_CFL_H_
+#ifndef AOM_AV1_COMMON_CFL_H_
+#define AOM_AV1_COMMON_CFL_H_
 
 #include "av1/common/blockd.h"
 #include "av1/common/onyxc_int.h"
@@ -299,4 +299,4 @@
     return pred[tx_size % TX_SIZES_ALL];                                  \
   }
 
-#endif  // AV1_COMMON_CFL_H_
+#endif  // AOM_AV1_COMMON_CFL_H_
diff --git a/av1/common/common.h b/av1/common/common.h
index 72c6d3a..bed6083 100644
--- a/av1/common/common.h
+++ b/av1/common/common.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_COMMON_H_
-#define AV1_COMMON_COMMON_H_
+#ifndef AOM_AV1_COMMON_COMMON_H_
+#define AOM_AV1_COMMON_COMMON_H_
 
 /* Interface header for common constant data structures and lookup tables */
 
@@ -60,4 +60,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_COMMON_H_
+#endif  // AOM_AV1_COMMON_COMMON_H_
diff --git a/av1/common/common_data.h b/av1/common/common_data.h
index 3aafcf2..46e455f 100644
--- a/av1/common/common_data.h
+++ b/av1/common/common_data.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_COMMON_DATA_H_
-#define AV1_COMMON_COMMON_DATA_H_
+#ifndef AOM_AV1_COMMON_COMMON_DATA_H_
+#define AOM_AV1_COMMON_COMMON_DATA_H_
 
 #include "av1/common/enums.h"
 #include "aom/aom_integer.h"
@@ -443,4 +443,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_COMMON_DATA_H_
+#endif  // AOM_AV1_COMMON_COMMON_DATA_H_
diff --git a/av1/common/convolve.h b/av1/common/convolve.h
index a17dd58..3854440 100644
--- a/av1/common/convolve.h
+++ b/av1/common/convolve.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_AV1_CONVOLVE_H_
-#define AV1_COMMON_AV1_CONVOLVE_H_
+#ifndef AOM_AV1_COMMON_CONVOLVE_H_
+#define AOM_AV1_COMMON_CONVOLVE_H_
 #include "av1/common/filter.h"
 
 #ifdef __cplusplus
@@ -121,4 +121,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_AV1_CONVOLVE_H_
+#endif  // AOM_AV1_COMMON_CONVOLVE_H_
diff --git a/av1/common/entropy.h b/av1/common/entropy.h
index ef944c5..991692c 100644
--- a/av1/common/entropy.h
+++ b/av1/common/entropy.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_ENTROPY_H_
-#define AV1_COMMON_ENTROPY_H_
+#ifndef AOM_AV1_COMMON_ENTROPY_H_
+#define AOM_AV1_COMMON_ENTROPY_H_
 
 #include "config/aom_config.h"
 
@@ -178,4 +178,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_ENTROPY_H_
+#endif  // AOM_AV1_COMMON_ENTROPY_H_
diff --git a/av1/common/entropymode.h b/av1/common/entropymode.h
index 941a89b..7047f34 100644
--- a/av1/common/entropymode.h
+++ b/av1/common/entropymode.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_ENTROPYMODE_H_
-#define AV1_COMMON_ENTROPYMODE_H_
+#ifndef AOM_AV1_COMMON_ENTROPYMODE_H_
+#define AOM_AV1_COMMON_ENTROPYMODE_H_
 
 #include "av1/common/entropy.h"
 #include "av1/common/entropymv.h"
@@ -209,4 +209,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_ENTROPYMODE_H_
+#endif  // AOM_AV1_COMMON_ENTROPYMODE_H_
diff --git a/av1/common/entropymv.h b/av1/common/entropymv.h
index 709aeeb..fa818a2 100644
--- a/av1/common/entropymv.h
+++ b/av1/common/entropymv.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_ENTROPYMV_H_
-#define AV1_COMMON_ENTROPYMV_H_
+#ifndef AOM_AV1_COMMON_ENTROPYMV_H_
+#define AOM_AV1_COMMON_ENTROPYMV_H_
 
 #include "config/aom_config.h"
 
@@ -101,4 +101,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_ENTROPYMV_H_
+#endif  // AOM_AV1_COMMON_ENTROPYMV_H_
diff --git a/av1/common/enums.h b/av1/common/enums.h
index 3884be7..869c06e 100644
--- a/av1/common/enums.h
+++ b/av1/common/enums.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_ENUMS_H_
-#define AV1_COMMON_ENUMS_H_
+#ifndef AOM_AV1_COMMON_ENUMS_H_
+#define AOM_AV1_COMMON_ENUMS_H_
 
 #include "config/aom_config.h"
 
@@ -616,4 +616,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_ENUMS_H_
+#endif  // AOM_AV1_COMMON_ENUMS_H_
diff --git a/av1/common/filter.h b/av1/common/filter.h
index 48bc49a..3abc0ec 100644
--- a/av1/common/filter.h
+++ b/av1/common/filter.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_FILTER_H_
-#define AV1_COMMON_FILTER_H_
+#ifndef AOM_AV1_COMMON_FILTER_H_
+#define AOM_AV1_COMMON_FILTER_H_
 
 #include <assert.h>
 
@@ -200,4 +200,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_FILTER_H_
+#endif  // AOM_AV1_COMMON_FILTER_H_
diff --git a/av1/common/frame_buffers.h b/av1/common/frame_buffers.h
index e7341cf..9e2754d 100644
--- a/av1/common/frame_buffers.h
+++ b/av1/common/frame_buffers.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_FRAME_BUFFERS_H_
-#define AV1_COMMON_FRAME_BUFFERS_H_
+#ifndef AOM_AV1_COMMON_FRAME_BUFFERS_H_
+#define AOM_AV1_COMMON_FRAME_BUFFERS_H_
 
 #include "aom/aom_frame_buffer.h"
 #include "aom/aom_integer.h"
@@ -51,4 +51,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_FRAME_BUFFERS_H_
+#endif  // AOM_AV1_COMMON_FRAME_BUFFERS_H_
diff --git a/av1/common/idct.h b/av1/common/idct.h
index 803e60c..d025ad7 100644
--- a/av1/common/idct.h
+++ b/av1/common/idct.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_IDCT_H_
-#define AV1_COMMON_IDCT_H_
+#ifndef AOM_AV1_COMMON_IDCT_H_
+#define AOM_AV1_COMMON_IDCT_H_
 
 #include "config/aom_config.h"
 
@@ -66,4 +66,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_IDCT_H_
+#endif  // AOM_AV1_COMMON_IDCT_H_
diff --git a/av1/common/mv.h b/av1/common/mv.h
index 2f2e7f2..5b02251 100644
--- a/av1/common/mv.h
+++ b/av1/common/mv.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_MV_H_
-#define AV1_COMMON_MV_H_
+#ifndef AOM_AV1_COMMON_MV_H_
+#define AOM_AV1_COMMON_MV_H_
 
 #include "av1/common/common.h"
 #include "av1/common/common_data.h"
@@ -298,4 +298,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_MV_H_
+#endif  // AOM_AV1_COMMON_MV_H_
diff --git a/av1/common/mvref_common.h b/av1/common/mvref_common.h
index 28edd09..83f7a1a 100644
--- a/av1/common/mvref_common.h
+++ b/av1/common/mvref_common.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef AV1_COMMON_MVREF_COMMON_H_
-#define AV1_COMMON_MVREF_COMMON_H_
+#ifndef AOM_AV1_COMMON_MVREF_COMMON_H_
+#define AOM_AV1_COMMON_MVREF_COMMON_H_
 
 #include "av1/common/onyxc_int.h"
 #include "av1/common/blockd.h"
@@ -358,4 +358,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_MVREF_COMMON_H_
+#endif  // AOM_AV1_COMMON_MVREF_COMMON_H_
diff --git a/av1/common/obmc.h b/av1/common/obmc.h
index ec731e0..1c90cd9 100644
--- a/av1/common/obmc.h
+++ b/av1/common/obmc.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_OBMC_H_
-#define AV1_COMMON_OBMC_H_
+#ifndef AOM_AV1_COMMON_OBMC_H_
+#define AOM_AV1_COMMON_OBMC_H_
 
 typedef void (*overlappable_nb_visitor_t)(MACROBLOCKD *xd, int rel_mi_pos,
                                           uint8_t nb_mi_size,
@@ -88,4 +88,4 @@
   }
 }
 
-#endif  // AV1_COMMON_OBMC_H_
+#endif  // AOM_AV1_COMMON_OBMC_H_
diff --git a/av1/common/obu_util.h b/av1/common/obu_util.h
index 3b92d1a..7c56904 100644
--- a/av1/common/obu_util.h
+++ b/av1/common/obu_util.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef AV1_COMMON_OBU_UTIL_H
-#define AV1_COMMON_OBU_UTIL_H
+#ifndef AOM_AV1_COMMON_OBU_UTIL_H_
+#define AOM_AV1_COMMON_OBU_UTIL_H_
 
 #include "aom/aom_codec.h"
 
@@ -44,4 +44,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_OBU_UTIL_H
+#endif  // AOM_AV1_COMMON_OBU_UTIL_H_
diff --git a/av1/common/odintrin.h b/av1/common/odintrin.h
index c55cb28..e1db0f4 100644
--- a/av1/common/odintrin.h
+++ b/av1/common/odintrin.h
@@ -11,8 +11,8 @@
 
 /* clang-format off */
 
-#ifndef AV1_COMMON_ODINTRIN_H_
-#define AV1_COMMON_ODINTRIN_H_
+#ifndef AOM_AV1_COMMON_ODINTRIN_H_
+#define AOM_AV1_COMMON_ODINTRIN_H_
 
 #include <stdlib.h>
 #include <string.h>
@@ -93,4 +93,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_ODINTRIN_H_
+#endif  // AOM_AV1_COMMON_ODINTRIN_H_
diff --git a/av1/common/onyxc_int.h b/av1/common/onyxc_int.h
index 21a042c..fbeecd2 100644
--- a/av1/common/onyxc_int.h
+++ b/av1/common/onyxc_int.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_ONYXC_INT_H_
-#define AV1_COMMON_ONYXC_INT_H_
+#ifndef AOM_AV1_COMMON_ONYXC_INT_H_
+#define AOM_AV1_COMMON_ONYXC_INT_H_
 
 #include "config/aom_config.h"
 #include "config/av1_rtcd.h"
@@ -1338,4 +1338,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_ONYXC_INT_H_
+#endif  // AOM_AV1_COMMON_ONYXC_INT_H_
diff --git a/av1/common/pred_common.h b/av1/common/pred_common.h
index 6a835c46..6dba232 100644
--- a/av1/common/pred_common.h
+++ b/av1/common/pred_common.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_PRED_COMMON_H_
-#define AV1_COMMON_PRED_COMMON_H_
+#ifndef AOM_AV1_COMMON_PRED_COMMON_H_
+#define AOM_AV1_COMMON_PRED_COMMON_H_
 
 #include "av1/common/blockd.h"
 #include "av1/common/mvref_common.h"
@@ -357,4 +357,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_PRED_COMMON_H_
+#endif  // AOM_AV1_COMMON_PRED_COMMON_H_
diff --git a/av1/common/quant_common.h b/av1/common/quant_common.h
index ca199e9..d1f52a6 100644
--- a/av1/common/quant_common.h
+++ b/av1/common/quant_common.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_QUANT_COMMON_H_
-#define AV1_COMMON_QUANT_COMMON_H_
+#ifndef AOM_AV1_COMMON_QUANT_COMMON_H_
+#define AOM_AV1_COMMON_QUANT_COMMON_H_
 
 #include "aom/aom_codec.h"
 #include "av1/common/seg_common.h"
@@ -60,4 +60,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_QUANT_COMMON_H_
+#endif  // AOM_AV1_COMMON_QUANT_COMMON_H_
diff --git a/av1/common/reconinter.h b/av1/common/reconinter.h
index 035bdcd..67725b2 100644
--- a/av1/common/reconinter.h
+++ b/av1/common/reconinter.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_RECONINTER_H_
-#define AV1_COMMON_RECONINTER_H_
+#ifndef AOM_AV1_COMMON_RECONINTER_H_
+#define AOM_AV1_COMMON_RECONINTER_H_
 
 #include "av1/common/filter.h"
 #include "av1/common/onyxc_int.h"
@@ -354,4 +354,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_RECONINTER_H_
+#endif  // AOM_AV1_COMMON_RECONINTER_H_
diff --git a/av1/common/reconintra.h b/av1/common/reconintra.h
index 57638f2..07853ab 100644
--- a/av1/common/reconintra.h
+++ b/av1/common/reconintra.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_RECONINTRA_H_
-#define AV1_COMMON_RECONINTRA_H_
+#ifndef AOM_AV1_COMMON_RECONINTRA_H_
+#define AOM_AV1_COMMON_RECONINTRA_H_
 
 #include <stdlib.h>
 
@@ -116,4 +116,4 @@
 #ifdef __cplusplus
 }  // extern "C"
 #endif
-#endif  // AV1_COMMON_RECONINTRA_H_
+#endif  // AOM_AV1_COMMON_RECONINTRA_H_
diff --git a/av1/common/resize.h b/av1/common/resize.h
index feec3a9..9a59a8d 100644
--- a/av1/common/resize.h
+++ b/av1/common/resize.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_RESIZE_H_
-#define AV1_ENCODER_RESIZE_H_
+#ifndef AOM_AV1_COMMON_RESIZE_H_
+#define AOM_AV1_COMMON_RESIZE_H_
 
 #include <stdio.h>
 #include "aom/aom_integer.h"
@@ -109,4 +109,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_RESIZE_H_
+#endif  // AOM_AV1_COMMON_RESIZE_H_
diff --git a/av1/common/restoration.h b/av1/common/restoration.h
index b97f514..d834f92 100644
--- a/av1/common/restoration.h
+++ b/av1/common/restoration.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_RESTORATION_H_
-#define AV1_COMMON_RESTORATION_H_
+#ifndef AOM_AV1_COMMON_RESTORATION_H_
+#define AOM_AV1_COMMON_RESTORATION_H_
 
 #include "aom_ports/mem.h"
 #include "config/aom_config.h"
@@ -374,4 +374,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_RESTORATION_H_
+#endif  // AOM_AV1_COMMON_RESTORATION_H_
diff --git a/av1/common/scale.h b/av1/common/scale.h
index dc1526a..748e958 100644
--- a/av1/common/scale.h
+++ b/av1/common/scale.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_SCALE_H_
-#define AV1_COMMON_SCALE_H_
+#ifndef AOM_AV1_COMMON_SCALE_H_
+#define AOM_AV1_COMMON_SCALE_H_
 
 #include "av1/common/convolve.h"
 #include "av1/common/mv.h"
@@ -64,4 +64,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_SCALE_H_
+#endif  // AOM_AV1_COMMON_SCALE_H_
diff --git a/av1/common/scan.h b/av1/common/scan.h
index d206586..233dc0e 100644
--- a/av1/common/scan.h
+++ b/av1/common/scan.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_SCAN_H_
-#define AV1_COMMON_SCAN_H_
+#ifndef AOM_AV1_COMMON_SCAN_H_
+#define AOM_AV1_COMMON_SCAN_H_
 
 #include "aom/aom_integer.h"
 #include "aom_ports/mem.h"
@@ -52,4 +52,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_SCAN_H_
+#endif  // AOM_AV1_COMMON_SCAN_H_
diff --git a/av1/common/seg_common.h b/av1/common/seg_common.h
index c851d65..8c35bba 100644
--- a/av1/common/seg_common.h
+++ b/av1/common/seg_common.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_SEG_COMMON_H_
-#define AV1_COMMON_SEG_COMMON_H_
+#ifndef AOM_AV1_COMMON_SEG_COMMON_H_
+#define AOM_AV1_COMMON_SEG_COMMON_H_
 
 #include "aom_dsp/prob.h"
 
@@ -101,4 +101,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_SEG_COMMON_H_
+#endif  // AOM_AV1_COMMON_SEG_COMMON_H_
diff --git a/av1/common/thread_common.h b/av1/common/thread_common.h
index 4b0d5d2..23d61d7 100644
--- a/av1/common/thread_common.h
+++ b/av1/common/thread_common.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_LOOPFILTER_THREAD_H_
-#define AV1_COMMON_LOOPFILTER_THREAD_H_
+#ifndef AOM_AV1_COMMON_THREAD_COMMON_H_
+#define AOM_AV1_COMMON_THREAD_COMMON_H_
 
 #include "config/aom_config.h"
 
@@ -116,4 +116,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_LOOPFILTER_THREAD_H_
+#endif  // AOM_AV1_COMMON_THREAD_COMMON_H_
diff --git a/av1/common/tile_common.h b/av1/common/tile_common.h
index 3b00cfd..c03553d 100644
--- a/av1/common/tile_common.h
+++ b/av1/common/tile_common.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_TILE_COMMON_H_
-#define AV1_COMMON_TILE_COMMON_H_
+#ifndef AOM_AV1_COMMON_TILE_COMMON_H_
+#define AOM_AV1_COMMON_TILE_COMMON_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -69,4 +69,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_TILE_COMMON_H_
+#endif  // AOM_AV1_COMMON_TILE_COMMON_H_
diff --git a/av1/common/timing.h b/av1/common/timing.h
index 1749baa..06939ae 100644
--- a/av1/common/timing.h
+++ b/av1/common/timing.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOM_TIMING_H_
-#define AOM_TIMING_H_
+#ifndef AOM_AV1_COMMON_TIMING_H_
+#define AOM_AV1_COMMON_TIMING_H_
 
 #include "aom/aom_integer.h"
 #include "av1/common/enums.h"
@@ -56,4 +56,4 @@
 int64_t max_level_bitrate(BITSTREAM_PROFILE seq_profile, int seq_level_idx,
                           int seq_tier);
 
-#endif  // AOM_TIMING_H_
+#endif  // AOM_AV1_COMMON_TIMING_H_
diff --git a/av1/common/token_cdfs.h b/av1/common/token_cdfs.h
index 9a6b454..53e9564 100644
--- a/av1/common/token_cdfs.h
+++ b/av1/common/token_cdfs.h
@@ -9,6 +9,9 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
+#ifndef AOM_AV1_COMMON_TOKEN_CDFS_H_
+#define AOM_AV1_COMMON_TOKEN_CDFS_H_
+
 #include "config/aom_config.h"
 
 #include "av1/common/entropy.h"
@@ -3548,3 +3551,5 @@
                                         { AOM_CDF3(10923, 21845) },
                                         { AOM_CDF3(10923, 21845) },
                                         { AOM_CDF3(10923, 21845) } } } } };
+
+#endif  // AOM_AV1_COMMON_TOKEN_CDFS_H_
diff --git a/av1/common/txb_common.h b/av1/common/txb_common.h
index ec7bf7d..1dda51f 100644
--- a/av1/common/txb_common.h
+++ b/av1/common/txb_common.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_TXB_COMMON_H_
-#define AV1_COMMON_TXB_COMMON_H_
+#ifndef AOM_AV1_COMMON_TXB_COMMON_H_
+#define AOM_AV1_COMMON_TXB_COMMON_H_
 
 extern const int16_t k_eob_group_start[12];
 extern const int16_t k_eob_offset_bits[12];
@@ -421,4 +421,4 @@
 
 void av1_init_lv_map(AV1_COMMON *cm);
 
-#endif  // AV1_COMMON_TXB_COMMON_H_
+#endif  // AOM_AV1_COMMON_TXB_COMMON_H_
diff --git a/av1/common/warped_motion.h b/av1/common/warped_motion.h
index ce4032e..a1a4f06 100644
--- a/av1/common/warped_motion.h
+++ b/av1/common/warped_motion.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_COMMON_WARPED_MOTION_H_
-#define AV1_COMMON_WARPED_MOTION_H_
+#ifndef AOM_AV1_COMMON_WARPED_MOTION_H_
+#define AOM_AV1_COMMON_WARPED_MOTION_H_
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -92,4 +92,4 @@
                     int mi_col);
 
 int get_shear_params(WarpedMotionParams *wm);
-#endif  // AV1_COMMON_WARPED_MOTION_H_
+#endif  // AOM_AV1_COMMON_WARPED_MOTION_H_
diff --git a/av1/common/x86/av1_inv_txfm_avx2.h b/av1/common/x86/av1_inv_txfm_avx2.h
index 7b5b29c..f74cbae 100644
--- a/av1/common/x86/av1_inv_txfm_avx2.h
+++ b/av1/common/x86/av1_inv_txfm_avx2.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef AV1_COMMON_X86_AV1_INV_TXFM_AVX2_H_
-#define AV1_COMMON_X86_AV1_INV_TXFM_AVX2_H_
+#ifndef AOM_AV1_COMMON_X86_AV1_INV_TXFM_AVX2_H_
+#define AOM_AV1_COMMON_X86_AV1_INV_TXFM_AVX2_H_
 
 #include <immintrin.h>
 
@@ -68,4 +68,4 @@
 }
 #endif
 
-#endif  // AV1_COMMON_X86_AV1_INV_TXFM_AVX2_H_
+#endif  // AOM_AV1_COMMON_X86_AV1_INV_TXFM_AVX2_H_
diff --git a/av1/common/x86/av1_inv_txfm_ssse3.h b/av1/common/x86/av1_inv_txfm_ssse3.h
index 0c5658c..66bd339 100644
--- a/av1/common/x86/av1_inv_txfm_ssse3.h
+++ b/av1/common/x86/av1_inv_txfm_ssse3.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef AV1_COMMON_X86_AV1_INV_TXFM_SSSE3_H_
-#define AV1_COMMON_X86_AV1_INV_TXFM_SSSE3_H_
+#ifndef AOM_AV1_COMMON_X86_AV1_INV_TXFM_SSSE3_H_
+#define AOM_AV1_COMMON_X86_AV1_INV_TXFM_SSSE3_H_
 
 #include <emmintrin.h>  // SSE2
 #include <tmmintrin.h>  // SSSE3
@@ -229,4 +229,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_COMMON_X86_AV1_INV_TXFM_SSSE3_H_
+#endif  // AOM_AV1_COMMON_X86_AV1_INV_TXFM_SSSE3_H_
diff --git a/av1/common/x86/av1_txfm_sse2.h b/av1/common/x86/av1_txfm_sse2.h
index 721cfe0..77aeb6e 100644
--- a/av1/common/x86/av1_txfm_sse2.h
+++ b/av1/common/x86/av1_txfm_sse2.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef AV1_COMMON_X86_AV1_TXFM_SSE2_H_
-#define AV1_COMMON_X86_AV1_TXFM_SSE2_H_
+#ifndef AOM_AV1_COMMON_X86_AV1_TXFM_SSE2_H_
+#define AOM_AV1_COMMON_X86_AV1_TXFM_SSE2_H_
 
 #include <emmintrin.h>  // SSE2
 
@@ -314,4 +314,4 @@
 #ifdef __cplusplus
 }
 #endif  // __cplusplus
-#endif  // AV1_COMMON_X86_AV1_TXFM_SSE2_H_
+#endif  // AOM_AV1_COMMON_X86_AV1_TXFM_SSE2_H_
diff --git a/av1/common/x86/av1_txfm_sse4.h b/av1/common/x86/av1_txfm_sse4.h
index 367e020..bffa8dc 100644
--- a/av1/common/x86/av1_txfm_sse4.h
+++ b/av1/common/x86/av1_txfm_sse4.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_TXFM_SSE4_H_
-#define AV1_TXFM_SSE4_H_
+#ifndef AOM_AV1_COMMON_X86_AV1_TXFM_SSE4_H_
+#define AOM_AV1_COMMON_X86_AV1_TXFM_SSE4_H_
 
 #include <smmintrin.h>
 
@@ -68,4 +68,4 @@
 }
 #endif
 
-#endif  // AV1_TXFM_SSE4_H_
+#endif  // AOM_AV1_COMMON_X86_AV1_TXFM_SSE4_H_
diff --git a/av1/common/x86/cfl_simd.h b/av1/common/x86/cfl_simd.h
index 7479ac3..3b342cd 100644
--- a/av1/common/x86/cfl_simd.h
+++ b/av1/common/x86/cfl_simd.h
@@ -9,6 +9,9 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
+#ifndef AOM_AV1_COMMON_X86_CFL_SIMD_H_
+#define AOM_AV1_COMMON_X86_CFL_SIMD_H_
+
 #include "av1/common/blockd.h"
 
 // SSSE3 version is optimal for with == 4, we reuse them in AVX2
@@ -236,3 +239,5 @@
                              int dst_stride, int alpha_q3, int bd);
 void predict_hbd_16x32_ssse3(const int16_t *pred_buf_q3, uint16_t *dst,
                              int dst_stride, int alpha_q3, int bd);
+
+#endif  // AOM_AV1_COMMON_X86_CFL_SIMD_H_
diff --git a/av1/common/x86/highbd_txfm_utility_sse4.h b/av1/common/x86/highbd_txfm_utility_sse4.h
index cfea022..f468aa1 100644
--- a/av1/common/x86/highbd_txfm_utility_sse4.h
+++ b/av1/common/x86/highbd_txfm_utility_sse4.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef _HIGHBD_TXFM_UTILITY_SSE4_H
-#define _HIGHBD_TXFM_UTILITY_SSE4_H
+#ifndef AOM_AV1_COMMON_X86_HIGHBD_TXFM_UTILITY_SSE4_H_
+#define AOM_AV1_COMMON_X86_HIGHBD_TXFM_UTILITY_SSE4_H_
 
 #include <smmintrin.h> /* SSE4.1 */
 
@@ -108,4 +108,4 @@
                                                TX_TYPE tx_type, TX_SIZE tx_size,
                                                int eob, const int bd);
 
-#endif  // _HIGHBD_TXFM_UTILITY_SSE4_H
+#endif  // AOM_AV1_COMMON_X86_HIGHBD_TXFM_UTILITY_SSE4_H_
diff --git a/av1/decoder/accounting.h b/av1/decoder/accounting.h
index 9099d08..288e5e6 100644
--- a/av1/decoder/accounting.h
+++ b/av1/decoder/accounting.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef AOM_ACCOUNTING_H_
-#define AOM_ACCOUNTING_H_
+#ifndef AOM_AV1_DECODER_ACCOUNTING_H_
+#define AOM_AV1_DECODER_ACCOUNTING_H_
 #include <stdlib.h>
 #include "aom/aomdx.h"
 
@@ -79,4 +79,4 @@
 #ifdef __cplusplus
 }  // extern "C"
 #endif  // __cplusplus
-#endif  // AOM_ACCOUNTING_H_
+#endif  // AOM_AV1_DECODER_ACCOUNTING_H_
diff --git a/av1/decoder/decodeframe.h b/av1/decoder/decodeframe.h
index 831f946..ddad273 100644
--- a/av1/decoder/decodeframe.h
+++ b/av1/decoder/decodeframe.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_DECODER_DECODEFRAME_H_
-#define AV1_DECODER_DECODEFRAME_H_
+#ifndef AOM_AV1_DECODER_DECODEFRAME_H_
+#define AOM_AV1_DECODER_DECODEFRAME_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -82,4 +82,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_DECODER_DECODEFRAME_H_
+#endif  // AOM_AV1_DECODER_DECODEFRAME_H_
diff --git a/av1/decoder/decodemv.h b/av1/decoder/decodemv.h
index 6243bb1..1625e5b 100644
--- a/av1/decoder/decodemv.h
+++ b/av1/decoder/decodemv.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_DECODER_DECODEMV_H_
-#define AV1_DECODER_DECODEMV_H_
+#ifndef AOM_AV1_DECODER_DECODEMV_H_
+#define AOM_AV1_DECODER_DECODEMV_H_
 
 #include "aom_dsp/bitreader.h"
 
@@ -32,4 +32,4 @@
 void av1_read_tx_type(const AV1_COMMON *const cm, MACROBLOCKD *xd, int blk_row,
                       int blk_col, TX_SIZE tx_size, aom_reader *r);
 
-#endif  // AV1_DECODER_DECODEMV_H_
+#endif  // AOM_AV1_DECODER_DECODEMV_H_
diff --git a/av1/decoder/decoder.h b/av1/decoder/decoder.h
index 644994c..8bffd89 100644
--- a/av1/decoder/decoder.h
+++ b/av1/decoder/decoder.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_DECODER_DECODER_H_
-#define AV1_DECODER_DECODER_H_
+#ifndef AOM_AV1_DECODER_DECODER_H_
+#define AOM_AV1_DECODER_DECODER_H_
 
 #include "config/aom_config.h"
 
@@ -311,4 +311,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_DECODER_DECODER_H_
+#endif  // AOM_AV1_DECODER_DECODER_H_
diff --git a/av1/decoder/decodetxb.h b/av1/decoder/decodetxb.h
index 687bba9..fe04f6a 100644
--- a/av1/decoder/decodetxb.h
+++ b/av1/decoder/decodetxb.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef DECODETXB_H_
-#define DECODETXB_H_
+#ifndef AOM_AV1_DECODER_DECODETXB_H_
+#define AOM_AV1_DECODER_DECODETXB_H_
 
 #include "config/aom_config.h"
 
@@ -29,4 +29,4 @@
                                 MACROBLOCKD *const xd, aom_reader *const r,
                                 const int plane, const int row, const int col,
                                 const TX_SIZE tx_size);
-#endif  //  DECODETXB_H_
+#endif  // AOM_AV1_DECODER_DECODETXB_H_
diff --git a/av1/decoder/detokenize.h b/av1/decoder/detokenize.h
index ec85bf7e..173b437 100644
--- a/av1/decoder/detokenize.h
+++ b/av1/decoder/detokenize.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_DECODER_DETOKENIZE_H_
-#define AV1_DECODER_DETOKENIZE_H_
+#ifndef AOM_AV1_DECODER_DETOKENIZE_H_
+#define AOM_AV1_DECODER_DETOKENIZE_H_
 
 #include "config/aom_config.h"
 
@@ -26,4 +26,4 @@
 #ifdef __cplusplus
 }  // extern "C"
 #endif
-#endif  // AV1_DECODER_DETOKENIZE_H_
+#endif  // AOM_AV1_DECODER_DETOKENIZE_H_
diff --git a/av1/decoder/dthread.h b/av1/decoder/dthread.h
index 9f854e0..1d264b07 100644
--- a/av1/decoder/dthread.h
+++ b/av1/decoder/dthread.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_DECODER_DTHREAD_H_
-#define AV1_DECODER_DTHREAD_H_
+#ifndef AOM_AV1_DECODER_DTHREAD_H_
+#define AOM_AV1_DECODER_DTHREAD_H_
 
 #include "config/aom_config.h"
 
@@ -79,4 +79,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_DECODER_DTHREAD_H_
+#endif  // AOM_AV1_DECODER_DTHREAD_H_
diff --git a/av1/decoder/inspection.h b/av1/decoder/inspection.h
index bb604f6..7214a9b 100644
--- a/av1/decoder/inspection.h
+++ b/av1/decoder/inspection.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef AOM_INSPECTION_H_
-#define AOM_INSPECTION_H_
+#ifndef AOM_AV1_DECODER_INSPECTION_H_
+#define AOM_AV1_DECODER_INSPECTION_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -81,4 +81,4 @@
 #ifdef __cplusplus
 }  // extern "C"
 #endif  // __cplusplus
-#endif  // AOM_INSPECTION_H_
+#endif  // AOM_AV1_DECODER_INSPECTION_H_
diff --git a/av1/decoder/obu.h b/av1/decoder/obu.h
index 3f8226b..5ab243f 100644
--- a/av1/decoder/obu.h
+++ b/av1/decoder/obu.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_DECODER_OBU_H
-#define AV1_DECODER_OBU_H
+#ifndef AOM_AV1_DECODER_OBU_H_
+#define AOM_AV1_DECODER_OBU_H_
 
 #include "aom/aom_codec.h"
 #include "av1/decoder/decoder.h"
@@ -28,4 +28,4 @@
     int operating_point_idc, unsigned int *num_spatial_layers,
     unsigned int *num_temporal_layers);
 
-#endif
+#endif  // AOM_AV1_DECODER_OBU_H_
diff --git a/av1/encoder/aq_complexity.h b/av1/encoder/aq_complexity.h
index af525b3..3421d74 100644
--- a/av1/encoder/aq_complexity.h
+++ b/av1/encoder/aq_complexity.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_AQ_COMPLEXITY_H_
-#define AV1_ENCODER_AQ_COMPLEXITY_H_
+#ifndef AOM_AV1_ENCODER_AQ_COMPLEXITY_H_
+#define AOM_AV1_ENCODER_AQ_COMPLEXITY_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -34,4 +34,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_AQ_COMPLEXITY_H_
+#endif  // AOM_AV1_ENCODER_AQ_COMPLEXITY_H_
diff --git a/av1/encoder/aq_cyclicrefresh.h b/av1/encoder/aq_cyclicrefresh.h
index 459ab80..b457819 100644
--- a/av1/encoder/aq_cyclicrefresh.h
+++ b/av1/encoder/aq_cyclicrefresh.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_AQ_CYCLICREFRESH_H_
-#define AV1_ENCODER_AQ_CYCLICREFRESH_H_
+#ifndef AOM_AV1_ENCODER_AQ_CYCLICREFRESH_H_
+#define AOM_AV1_ENCODER_AQ_CYCLICREFRESH_H_
 
 #include "av1/common/blockd.h"
 
@@ -95,4 +95,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_AQ_CYCLICREFRESH_H_
+#endif  // AOM_AV1_ENCODER_AQ_CYCLICREFRESH_H_
diff --git a/av1/encoder/aq_variance.h b/av1/encoder/aq_variance.h
index 89685ac..2d22b66 100644
--- a/av1/encoder/aq_variance.h
+++ b/av1/encoder/aq_variance.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_AQ_VARIANCE_H_
-#define AV1_ENCODER_AQ_VARIANCE_H_
+#ifndef AOM_AV1_ENCODER_AQ_VARIANCE_H_
+#define AOM_AV1_ENCODER_AQ_VARIANCE_H_
 
 #include "av1/encoder/encoder.h"
 
@@ -30,4 +30,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_AQ_VARIANCE_H_
+#endif  // AOM_AV1_ENCODER_AQ_VARIANCE_H_
diff --git a/av1/encoder/av1_fwd_txfm1d.h b/av1/encoder/av1_fwd_txfm1d.h
index 9472af8..9dcf165 100644
--- a/av1/encoder/av1_fwd_txfm1d.h
+++ b/av1/encoder/av1_fwd_txfm1d.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_FWD_TXFM1D_H_
-#define AV1_FWD_TXFM1D_H_
+#ifndef AOM_AV1_ENCODER_AV1_FWD_TXFM1D_H_
+#define AOM_AV1_ENCODER_AV1_FWD_TXFM1D_H_
 
 #include "av1/common/av1_txfm.h"
 
@@ -46,4 +46,4 @@
 }
 #endif
 
-#endif  // AV1_FWD_TXFM1D_H_
+#endif  // AOM_AV1_ENCODER_AV1_FWD_TXFM1D_H_
diff --git a/av1/encoder/av1_fwd_txfm1d_cfg.h b/av1/encoder/av1_fwd_txfm1d_cfg.h
index 174689a..98b6530 100644
--- a/av1/encoder/av1_fwd_txfm1d_cfg.h
+++ b/av1/encoder/av1_fwd_txfm1d_cfg.h
@@ -9,11 +9,11 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_FWD_TXFM2D_CFG_H_
-#define AV1_FWD_TXFM2D_CFG_H_
+#ifndef AOM_AV1_ENCODER_AV1_FWD_TXFM1D_CFG_H_
+#define AOM_AV1_ENCODER_AV1_FWD_TXFM1D_CFG_H_
 #include "av1/common/enums.h"
 #include "av1/encoder/av1_fwd_txfm1d.h"
 extern const int8_t *fwd_txfm_shift_ls[TX_SIZES_ALL];
 extern const int8_t fwd_cos_bit_col[5][5];
 extern const int8_t fwd_cos_bit_row[5][5];
-#endif  // AV1_FWD_TXFM2D_CFG_H_
+#endif  // AOM_AV1_ENCODER_AV1_FWD_TXFM1D_CFG_H_
diff --git a/av1/encoder/av1_quantize.h b/av1/encoder/av1_quantize.h
index eaf8374..35af9a6 100644
--- a/av1/encoder/av1_quantize.h
+++ b/av1/encoder/av1_quantize.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_QUANTIZE_H_
-#define AV1_ENCODER_QUANTIZE_H_
+#ifndef AOM_AV1_ENCODER_AV1_QUANTIZE_H_
+#define AOM_AV1_ENCODER_AV1_QUANTIZE_H_
 
 #include "config/aom_config.h"
 
@@ -145,4 +145,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_QUANTIZE_H_
+#endif  // AOM_AV1_ENCODER_AV1_QUANTIZE_H_
diff --git a/av1/encoder/bitstream.h b/av1/encoder/bitstream.h
index 39096e2..465ccae 100644
--- a/av1/encoder/bitstream.h
+++ b/av1/encoder/bitstream.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_BITSTREAM_H_
-#define AV1_ENCODER_BITSTREAM_H_
+#ifndef AOM_AV1_ENCODER_BITSTREAM_H_
+#define AOM_AV1_ENCODER_BITSTREAM_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -48,4 +48,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_BITSTREAM_H_
+#endif  // AOM_AV1_ENCODER_BITSTREAM_H_
diff --git a/av1/encoder/block.h b/av1/encoder/block.h
index 7a57128..cfde813 100644
--- a/av1/encoder/block.h
+++ b/av1/encoder/block.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_BLOCK_H_
-#define AV1_ENCODER_BLOCK_H_
+#ifndef AOM_AV1_ENCODER_BLOCK_H_
+#define AOM_AV1_ENCODER_BLOCK_H_
 
 #include "av1/common/entropymv.h"
 #include "av1/common/entropy.h"
@@ -416,4 +416,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_BLOCK_H_
+#endif  // AOM_AV1_ENCODER_BLOCK_H_
diff --git a/av1/encoder/context_tree.h b/av1/encoder/context_tree.h
index 98d35e1..4efc349 100644
--- a/av1/encoder/context_tree.h
+++ b/av1/encoder/context_tree.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_CONTEXT_TREE_H_
-#define AV1_ENCODER_CONTEXT_TREE_H_
+#ifndef AOM_AV1_ENCODER_CONTEXT_TREE_H_
+#define AOM_AV1_ENCODER_CONTEXT_TREE_H_
 
 #include "av1/common/blockd.h"
 #include "av1/encoder/block.h"
@@ -111,4 +111,4 @@
 }  // extern "C"
 #endif
 
-#endif /* AV1_ENCODER_CONTEXT_TREE_H_ */
+#endif  // AOM_AV1_ENCODER_CONTEXT_TREE_H_
diff --git a/av1/encoder/corner_detect.h b/av1/encoder/corner_detect.h
index 0317db5..cab59a7 100644
--- a/av1/encoder/corner_detect.h
+++ b/av1/encoder/corner_detect.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_CORNER_DETECT_H_
-#define AV1_ENCODER_CORNER_DETECT_H_
+#ifndef AOM_AV1_ENCODER_CORNER_DETECT_H_
+#define AOM_AV1_ENCODER_CORNER_DETECT_H_
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -19,4 +19,4 @@
 int fast_corner_detect(unsigned char *buf, int width, int height, int stride,
                        int *points, int max_points);
 
-#endif  // AV1_ENCODER_CORNER_DETECT_H_
+#endif  // AOM_AV1_ENCODER_CORNER_DETECT_H_
diff --git a/av1/encoder/corner_match.h b/av1/encoder/corner_match.h
index 3b16f9e..535d2fa 100644
--- a/av1/encoder/corner_match.h
+++ b/av1/encoder/corner_match.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef AV1_ENCODER_CORNER_MATCH_H_
-#define AV1_ENCODER_CORNER_MATCH_H_
+#ifndef AOM_AV1_ENCODER_CORNER_MATCH_H_
+#define AOM_AV1_ENCODER_CORNER_MATCH_H_
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -30,4 +30,4 @@
                              int height, int frm_stride, int ref_stride,
                              int *correspondence_pts);
 
-#endif  // AV1_ENCODER_CORNER_MATCH_H_
+#endif  // AOM_AV1_ENCODER_CORNER_MATCH_H_
diff --git a/av1/encoder/cost.h b/av1/encoder/cost.h
index 5de7765..af5b098 100644
--- a/av1/encoder/cost.h
+++ b/av1/encoder/cost.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_COST_H_
-#define AV1_ENCODER_COST_H_
+#ifndef AOM_AV1_ENCODER_COST_H_
+#define AOM_AV1_ENCODER_COST_H_
 
 #include "aom_dsp/prob.h"
 #include "aom/aom_integer.h"
@@ -44,4 +44,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_COST_H_
+#endif  // AOM_AV1_ENCODER_COST_H_
diff --git a/av1/encoder/dwt.h b/av1/encoder/dwt.h
index 03318e5..37306c6 100644
--- a/av1/encoder/dwt.h
+++ b/av1/encoder/dwt.h
@@ -9,6 +9,9 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
+#ifndef AOM_AV1_ENCODER_DWT_H_
+#define AOM_AV1_ENCODER_DWT_H_
+
 #include "av1/common/common.h"
 #include "av1/common/enums.h"
 
@@ -18,3 +21,5 @@
 void av1_fdwt8x8_uint8_input_c(uint8_t *input, tran_low_t *output, int stride,
                                int hbd);
 int av1_haar_ac_sad_8x8_uint8_input(uint8_t *input, int stride, int hbd);
+
+#endif  // AOM_AV1_ENCODER_DWT_H_
diff --git a/av1/encoder/encodeframe.h b/av1/encoder/encodeframe.h
index 55f644a..7f02e6c 100644
--- a/av1/encoder/encodeframe.h
+++ b/av1/encoder/encodeframe.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_ENCODEFRAME_H_
-#define AV1_ENCODER_ENCODEFRAME_H_
+#ifndef AOM_AV1_ENCODER_ENCODEFRAME_H_
+#define AOM_AV1_ENCODER_ENCODEFRAME_H_
 
 #include "aom/aom_integer.h"
 #include "av1/common/blockd.h"
@@ -41,4 +41,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_ENCODEFRAME_H_
+#endif  // AOM_AV1_ENCODER_ENCODEFRAME_H_
diff --git a/av1/encoder/encodemb.h b/av1/encoder/encodemb.h
index 26fe8ce..39080de 100644
--- a/av1/encoder/encodemb.h
+++ b/av1/encoder/encodemb.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_ENCODEMB_H_
-#define AV1_ENCODER_ENCODEMB_H_
+#ifndef AOM_AV1_ENCODER_ENCODEMB_H_
+#define AOM_AV1_ENCODER_ENCODEMB_H_
 
 #include "config/aom_config.h"
 
@@ -93,4 +93,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_ENCODEMB_H_
+#endif  // AOM_AV1_ENCODER_ENCODEMB_H_
diff --git a/av1/encoder/encodemv.h b/av1/encoder/encodemv.h
index 7eb4fbe..37ff547 100644
--- a/av1/encoder/encodemv.h
+++ b/av1/encoder/encodemv.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_ENCODEMV_H_
-#define AV1_ENCODER_ENCODEMV_H_
+#ifndef AOM_AV1_ENCODER_ENCODEMV_H_
+#define AOM_AV1_ENCODER_ENCODEMV_H_
 
 #include "av1/encoder/encoder.h"
 
@@ -52,4 +52,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_ENCODEMV_H_
+#endif  // AOM_AV1_ENCODER_ENCODEMV_H_
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h
index 307e12d..54a26da 100644
--- a/av1/encoder/encoder.h
+++ b/av1/encoder/encoder.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_ENCODER_H_
-#define AV1_ENCODER_ENCODER_H_
+#ifndef AOM_AV1_ENCODER_ENCODER_H_
+#define AOM_AV1_ENCODER_ENCODER_H_
 
 #include <stdio.h>
 
@@ -980,4 +980,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_ENCODER_H_
+#endif  // AOM_AV1_ENCODER_ENCODER_H_
diff --git a/av1/encoder/encodetxb.h b/av1/encoder/encodetxb.h
index 0442cc6..40ae343 100644
--- a/av1/encoder/encodetxb.h
+++ b/av1/encoder/encodetxb.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef ENCODETXB_H_
-#define ENCODETXB_H_
+#ifndef AOM_AV1_ENCODER_ENCODETXB_H_
+#define AOM_AV1_ENCODER_ENCODETXB_H_
 
 #include "config/aom_config.h"
 
@@ -84,4 +84,4 @@
 }
 #endif
 
-#endif  // COEFFS_CODING_H_
+#endif  // AOM_AV1_ENCODER_ENCODETXB_H_
diff --git a/av1/encoder/ethread.h b/av1/encoder/ethread.h
index b6b1fed..5de4b48 100644
--- a/av1/encoder/ethread.h
+++ b/av1/encoder/ethread.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_ETHREAD_H_
-#define AV1_ENCODER_ETHREAD_H_
+#ifndef AOM_AV1_ENCODER_ETHREAD_H_
+#define AOM_AV1_ENCODER_ETHREAD_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -34,4 +34,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_ETHREAD_H_
+#endif  // AOM_AV1_ENCODER_ETHREAD_H_
diff --git a/av1/encoder/extend.h b/av1/encoder/extend.h
index 48178b9..e0432cc 100644
--- a/av1/encoder/extend.h
+++ b/av1/encoder/extend.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_EXTEND_H_
-#define AV1_ENCODER_EXTEND_H_
+#ifndef AOM_AV1_ENCODER_EXTEND_H_
+#define AOM_AV1_ENCODER_EXTEND_H_
 
 #include "aom_scale/yv12config.h"
 #include "aom/aom_integer.h"
@@ -29,4 +29,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_EXTEND_H_
+#endif  // AOM_AV1_ENCODER_EXTEND_H_
diff --git a/av1/encoder/firstpass.h b/av1/encoder/firstpass.h
index 100f462..a953f9e 100644
--- a/av1/encoder/firstpass.h
+++ b/av1/encoder/firstpass.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_FIRSTPASS_H_
-#define AV1_ENCODER_FIRSTPASS_H_
+#ifndef AOM_AV1_ENCODER_FIRSTPASS_H_
+#define AOM_AV1_ENCODER_FIRSTPASS_H_
 
 #include "av1/common/enums.h"
 #include "av1/common/onyxc_int.h"
@@ -204,4 +204,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_FIRSTPASS_H_
+#endif  // AOM_AV1_ENCODER_FIRSTPASS_H_
diff --git a/av1/encoder/global_motion.h b/av1/encoder/global_motion.h
index 2c15753..c7c016c 100644
--- a/av1/encoder/global_motion.h
+++ b/av1/encoder/global_motion.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_GLOBAL_MOTION_H_
-#define AV1_ENCODER_GLOBAL_MOTION_H_
+#ifndef AOM_AV1_ENCODER_GLOBAL_MOTION_H_
+#define AOM_AV1_ENCODER_GLOBAL_MOTION_H_
 
 #include "aom/aom_integer.h"
 #include "aom_scale/yv12config.h"
@@ -61,4 +61,4 @@
 #ifdef __cplusplus
 }  // extern "C"
 #endif
-#endif  // AV1_ENCODER_GLOBAL_MOTION_H_
+#endif  // AOM_AV1_ENCODER_GLOBAL_MOTION_H_
diff --git a/av1/encoder/grain_test_vectors.h b/av1/encoder/grain_test_vectors.h
index 45632da..945dc37 100644
--- a/av1/encoder/grain_test_vectors.h
+++ b/av1/encoder/grain_test_vectors.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef AV1_GRAIN_TEST_VECTORS_H_
-#define AV1_GRAIN_TEST_VECTORS_H_
+#ifndef AOM_AV1_ENCODER_GRAIN_TEST_VECTORS_H_
+#define AOM_AV1_ENCODER_GRAIN_TEST_VECTORS_H_
 
 /* Test vectors for emulation of different film grain types.
  * Note that bit depth would be derived from the bitstream and
@@ -778,4 +778,4 @@
       45231 /* random_seed */
   },
 };
-#endif  // AV1_GRAIN_TEST_VECTORS_H_
+#endif  // AOM_AV1_ENCODER_GRAIN_TEST_VECTORS_H_
diff --git a/av1/encoder/hash.h b/av1/encoder/hash.h
index 7e32aa2..826c004 100644
--- a/av1/encoder/hash.h
+++ b/av1/encoder/hash.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_HASH_H_
-#define AV1_ENCODER_HASH_H_
+#ifndef AOM_AV1_ENCODER_HASH_H_
+#define AOM_AV1_ENCODER_HASH_H_
 
 #include "config/aom_config.h"
 
@@ -49,4 +49,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_HASH_H_
+#endif  // AOM_AV1_ENCODER_HASH_H_
diff --git a/av1/encoder/hash_motion.h b/av1/encoder/hash_motion.h
index fa510c1..df3ec32 100644
--- a/av1/encoder/hash_motion.h
+++ b/av1/encoder/hash_motion.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_HASH_MOTION_H_
-#define AV1_ENCODER_HASH_MOTION_H_
+#ifndef AOM_AV1_ENCODER_HASH_MOTION_H_
+#define AOM_AV1_ENCODER_HASH_MOTION_H_
 
 #include "config/aom_config.h"
 
@@ -75,4 +75,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_HASH_MOTION_H_
+#endif  // AOM_AV1_ENCODER_HASH_MOTION_H_
diff --git a/av1/encoder/hybrid_fwd_txfm.h b/av1/encoder/hybrid_fwd_txfm.h
index 6155b25..daabc71 100644
--- a/av1/encoder/hybrid_fwd_txfm.h
+++ b/av1/encoder/hybrid_fwd_txfm.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_HYBRID_FWD_TXFM_H_
-#define AV1_ENCODER_HYBRID_FWD_TXFM_H_
+#ifndef AOM_AV1_ENCODER_HYBRID_FWD_TXFM_H_
+#define AOM_AV1_ENCODER_HYBRID_FWD_TXFM_H_
 
 #include "config/aom_config.h"
 
@@ -28,4 +28,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_HYBRID_FWD_TXFM_H_
+#endif  // AOM_AV1_ENCODER_HYBRID_FWD_TXFM_H_
diff --git a/av1/encoder/lookahead.h b/av1/encoder/lookahead.h
index 3897c2a..e55224c 100644
--- a/av1/encoder/lookahead.h
+++ b/av1/encoder/lookahead.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_LOOKAHEAD_H_
-#define AV1_ENCODER_LOOKAHEAD_H_
+#ifndef AOM_AV1_ENCODER_LOOKAHEAD_H_
+#define AOM_AV1_ENCODER_LOOKAHEAD_H_
 
 #include "aom_scale/yv12config.h"
 #include "aom/aom_integer.h"
@@ -103,4 +103,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_LOOKAHEAD_H_
+#endif  // AOM_AV1_ENCODER_LOOKAHEAD_H_
diff --git a/av1/encoder/mathutils.h b/av1/encoder/mathutils.h
index 23243dd..aa75d65 100644
--- a/av1/encoder/mathutils.h
+++ b/av1/encoder/mathutils.h
@@ -9,6 +9,9 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
+#ifndef AOM_AV1_ENCODER_MATHUTILS_H_
+#define AOM_AV1_ENCODER_MATHUTILS_H_
+
 #include <memory.h>
 #include <math.h>
 #include <stdio.h>
@@ -352,3 +355,5 @@
 
   return 0;
 }
+
+#endif  // AOM_AV1_ENCODER_MATHUTILS_H_
diff --git a/av1/encoder/mbgraph.h b/av1/encoder/mbgraph.h
index 3e0a4fa..ba08476 100644
--- a/av1/encoder/mbgraph.h
+++ b/av1/encoder/mbgraph.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_MBGRAPH_H_
-#define AV1_ENCODER_MBGRAPH_H_
+#ifndef AOM_AV1_ENCODER_MBGRAPH_H_
+#define AOM_AV1_ENCODER_MBGRAPH_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -38,4 +38,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_MBGRAPH_H_
+#endif  // AOM_AV1_ENCODER_MBGRAPH_H_
diff --git a/av1/encoder/mcomp.h b/av1/encoder/mcomp.h
index 592d89f..532516c 100644
--- a/av1/encoder/mcomp.h
+++ b/av1/encoder/mcomp.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_MCOMP_H_
-#define AV1_ENCODER_MCOMP_H_
+#ifndef AOM_AV1_ENCODER_MCOMP_H_
+#define AOM_AV1_ENCODER_MCOMP_H_
 
 #include "av1/encoder/block.h"
 #include "aom_dsp/variance.h"
@@ -158,4 +158,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_MCOMP_H_
+#endif  // AOM_AV1_ENCODER_MCOMP_H_
diff --git a/av1/encoder/ml.h b/av1/encoder/ml.h
index 614cb60..179740e 100644
--- a/av1/encoder/ml.h
+++ b/av1/encoder/ml.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_ML_H_
-#define AV1_ENCODER_ML_H_
+#ifndef AOM_AV1_ENCODER_ML_H_
+#define AOM_AV1_ENCODER_ML_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -41,4 +41,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_RD_H_
+#endif  // AOM_AV1_ENCODER_ML_H_
diff --git a/av1/encoder/palette.h b/av1/encoder/palette.h
index bbdd507..8b88c47 100644
--- a/av1/encoder/palette.h
+++ b/av1/encoder/palette.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_PALETTE_H_
-#define AV1_ENCODER_PALETTE_H_
+#ifndef AOM_AV1_ENCODER_PALETTE_H_
+#define AOM_AV1_ENCODER_PALETTE_H_
 
 #include "av1/common/blockd.h"
 
@@ -93,4 +93,4 @@
 }  // extern "C"
 #endif
 
-#endif /* AV1_ENCODER_PALETTE_H_ */
+#endif  // AOM_AV1_ENCODER_PALETTE_H_
diff --git a/av1/encoder/partition_model_weights.h b/av1/encoder/partition_model_weights.h
index 340fcd2..ad4bfde 100644
--- a/av1/encoder/partition_model_weights.h
+++ b/av1/encoder/partition_model_weights.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_AB_PARTITION_MODEL_WEIGHTS_H_
-#define AV1_ENCODER_AB_PARTITION_MODEL_WEIGHTS_H_
+#ifndef AOM_AV1_ENCODER_PARTITION_MODEL_WEIGHTS_H_
+#define AOM_AV1_ENCODER_PARTITION_MODEL_WEIGHTS_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -1987,4 +1987,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_AB_PARTITION_MODEL_WEIGHTS_H_
+#endif  // AOM_AV1_ENCODER_PARTITION_MODEL_WEIGHTS_H_
diff --git a/av1/encoder/picklpf.h b/av1/encoder/picklpf.h
index 2a16835..357097a 100644
--- a/av1/encoder/picklpf.h
+++ b/av1/encoder/picklpf.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_PICKLPF_H_
-#define AV1_ENCODER_PICKLPF_H_
+#ifndef AOM_AV1_ENCODER_PICKLPF_H_
+#define AOM_AV1_ENCODER_PICKLPF_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -27,4 +27,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_PICKLPF_H_
+#endif  // AOM_AV1_ENCODER_PICKLPF_H_
diff --git a/av1/encoder/pickrst.h b/av1/encoder/pickrst.h
index e92f8c6..3fec0c3 100644
--- a/av1/encoder/pickrst.h
+++ b/av1/encoder/pickrst.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef AV1_ENCODER_PICKRST_H_
-#define AV1_ENCODER_PICKRST_H_
+#ifndef AOM_AV1_ENCODER_PICKRST_H_
+#define AOM_AV1_ENCODER_PICKRST_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -43,4 +43,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_PICKRST_H_
+#endif  // AOM_AV1_ENCODER_PICKRST_H_
diff --git a/av1/encoder/pustats.h b/av1/encoder/pustats.h
index 689f858..40dd467 100644
--- a/av1/encoder/pustats.h
+++ b/av1/encoder/pustats.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_PUSTATS_H_
-#define AV1_ENCODER_PUSTATS_H_
+#ifndef AOM_AV1_ENCODER_PUSTATS_H_
+#define AOM_AV1_ENCODER_PUSTATS_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -195,4 +195,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_PUSTATS_H_
+#endif  // AOM_AV1_ENCODER_PUSTATS_H_
diff --git a/av1/encoder/random.h b/av1/encoder/random.h
index 9b2dac9..0bca391 100644
--- a/av1/encoder/random.h
+++ b/av1/encoder/random.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_RANDOM_H_
-#define AV1_ENCODER_RANDOM_H_
+#ifndef AOM_AV1_ENCODER_RANDOM_H_
+#define AOM_AV1_ENCODER_RANDOM_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -26,4 +26,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_RANDOM_H_
+#endif  // AOM_AV1_ENCODER_RANDOM_H_
diff --git a/av1/encoder/ransac.h b/av1/encoder/ransac.h
index 1019055..c429f2c 100644
--- a/av1/encoder/ransac.h
+++ b/av1/encoder/ransac.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_RANSAC_H_
-#define AV1_ENCODER_RANSAC_H_
+#ifndef AOM_AV1_ENCODER_RANSAC_H_
+#define AOM_AV1_ENCODER_RANSAC_H_
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -32,4 +32,4 @@
 int ransac_translation(int *matched_points, int npoints,
                        int *num_inliers_by_motion, double *params_by_motion,
                        int num_motions);
-#endif  // AV1_ENCODER_RANSAC_H_
+#endif  // AOM_AV1_ENCODER_RANSAC_H_
diff --git a/av1/encoder/rate_distortion_model_params.h b/av1/encoder/rate_distortion_model_params.h
index 14d23f1..7cd0962 100644
--- a/av1/encoder/rate_distortion_model_params.h
+++ b/av1/encoder/rate_distortion_model_params.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_RATE_DISTORTION_MODEL_PARAMS_H_
-#define AV1_ENCODER_RATE_DISTORTION_MODEL_PARAMS_H_
+#ifndef AOM_AV1_ENCODER_RATE_DISTORTION_MODEL_PARAMS_H_
+#define AOM_AV1_ENCODER_RATE_DISTORTION_MODEL_PARAMS_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -588,4 +588,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_RATE_DISTORTION_MODEL_PARAMS_H_
+#endif  // AOM_AV1_ENCODER_RATE_DISTORTION_MODEL_PARAMS_H_
diff --git a/av1/encoder/ratectrl.h b/av1/encoder/ratectrl.h
index 8e8ae2e..a38235b 100644
--- a/av1/encoder/ratectrl.h
+++ b/av1/encoder/ratectrl.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_RATECTRL_H_
-#define AV1_ENCODER_RATECTRL_H_
+#ifndef AOM_AV1_ENCODER_RATECTRL_H_
+#define AOM_AV1_ENCODER_RATECTRL_H_
 
 #include "aom/aom_codec.h"
 #include "aom/aom_integer.h"
@@ -282,4 +282,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_RATECTRL_H_
+#endif  // AOM_AV1_ENCODER_RATECTRL_H_
diff --git a/av1/encoder/rd.h b/av1/encoder/rd.h
index 9f05d88..9ce7191 100644
--- a/av1/encoder/rd.h
+++ b/av1/encoder/rd.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_RD_H_
-#define AV1_ENCODER_RD_H_
+#ifndef AOM_AV1_ENCODER_RD_H_
+#define AOM_AV1_ENCODER_RD_H_
 
 #include <limits.h>
 
@@ -459,4 +459,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_RD_H_
+#endif  // AOM_AV1_ENCODER_RD_H_
diff --git a/av1/encoder/rdopt.h b/av1/encoder/rdopt.h
index c996d5e..1d56fba 100644
--- a/av1/encoder/rdopt.h
+++ b/av1/encoder/rdopt.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_RDOPT_H_
-#define AV1_ENCODER_RDOPT_H_
+#ifndef AOM_AV1_ENCODER_RDOPT_H_
+#define AOM_AV1_ENCODER_RDOPT_H_
 
 #include "av1/common/blockd.h"
 #include "av1/common/txb_common.h"
@@ -135,4 +135,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_RDOPT_H_
+#endif  // AOM_AV1_ENCODER_RDOPT_H_
diff --git a/av1/encoder/reconinter_enc.h b/av1/encoder/reconinter_enc.h
index da85cea..90980b9 100644
--- a/av1/encoder/reconinter_enc.h
+++ b/av1/encoder/reconinter_enc.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_RECONINTER_ENC_H_
-#define AV1_ENCODER_RECONINTER_ENC_H_
+#ifndef AOM_AV1_ENCODER_RECONINTER_ENC_H_
+#define AOM_AV1_ENCODER_RECONINTER_ENC_H_
 
 #include "av1/common/filter.h"
 #include "av1/common/blockd.h"
@@ -124,4 +124,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_RECONINTER_ENC_H_
+#endif  // AOM_AV1_ENCODER_RECONINTER_ENC_H_
diff --git a/av1/encoder/segmentation.h b/av1/encoder/segmentation.h
index a207b0f..1ad13d6 100644
--- a/av1/encoder/segmentation.h
+++ b/av1/encoder/segmentation.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_SEGMENTATION_H_
-#define AV1_ENCODER_SEGMENTATION_H_
+#ifndef AOM_AV1_ENCODER_SEGMENTATION_H_
+#define AOM_AV1_ENCODER_SEGMENTATION_H_
 
 #include "av1/common/blockd.h"
 #include "av1/encoder/encoder.h"
@@ -35,4 +35,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_SEGMENTATION_H_
+#endif  // AOM_AV1_ENCODER_SEGMENTATION_H_
diff --git a/av1/encoder/speed_features.h b/av1/encoder/speed_features.h
index b38da06..9238602 100644
--- a/av1/encoder/speed_features.h
+++ b/av1/encoder/speed_features.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_SPEED_FEATURES_H_
-#define AV1_ENCODER_SPEED_FEATURES_H_
+#ifndef AOM_AV1_ENCODER_SPEED_FEATURES_H_
+#define AOM_AV1_ENCODER_SPEED_FEATURES_H_
 
 #include "av1/common/enums.h"
 
@@ -653,4 +653,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_SPEED_FEATURES_H_
+#endif  // AOM_AV1_ENCODER_SPEED_FEATURES_H_
diff --git a/av1/encoder/temporal_filter.h b/av1/encoder/temporal_filter.h
index bc0863a..2ddc68b 100644
--- a/av1/encoder/temporal_filter.h
+++ b/av1/encoder/temporal_filter.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_TEMPORAL_FILTER_H_
-#define AV1_ENCODER_TEMPORAL_FILTER_H_
+#ifndef AOM_AV1_ENCODER_TEMPORAL_FILTER_H_
+#define AOM_AV1_ENCODER_TEMPORAL_FILTER_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -22,4 +22,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_TEMPORAL_FILTER_H_
+#endif  // AOM_AV1_ENCODER_TEMPORAL_FILTER_H_
diff --git a/av1/encoder/tokenize.h b/av1/encoder/tokenize.h
index de1cbe9..63b505f 100644
--- a/av1/encoder/tokenize.h
+++ b/av1/encoder/tokenize.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_TOKENIZE_H_
-#define AV1_ENCODER_TOKENIZE_H_
+#ifndef AOM_AV1_ENCODER_TOKENIZE_H_
+#define AOM_AV1_ENCODER_TOKENIZE_H_
 
 #include "av1/common/entropy.h"
 #include "av1/encoder/block.h"
@@ -70,4 +70,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_TOKENIZE_H_
+#endif  // AOM_AV1_ENCODER_TOKENIZE_H_
diff --git a/av1/encoder/tx_prune_model_weights.h b/av1/encoder/tx_prune_model_weights.h
index 69063b8..ad0ae47 100644
--- a/av1/encoder/tx_prune_model_weights.h
+++ b/av1/encoder/tx_prune_model_weights.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_ENCODER_TX_PRUNE_MODEL_WEIGHTS_H_
-#define AV1_ENCODER_TX_PRUNE_MODEL_WEIGHTS_H_
+#ifndef AOM_AV1_ENCODER_TX_PRUNE_MODEL_WEIGHTS_H_
+#define AOM_AV1_ENCODER_TX_PRUNE_MODEL_WEIGHTS_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -2083,4 +2083,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AV1_ENCODER_TX_PRUNE_MODEL_WEIGHTS_H_
+#endif  // AOM_AV1_ENCODER_TX_PRUNE_MODEL_WEIGHTS_H_
diff --git a/av1/encoder/x86/av1_fwd_txfm_avx2.h b/av1/encoder/x86/av1_fwd_txfm_avx2.h
index c582ca0..3870713 100644
--- a/av1/encoder/x86/av1_fwd_txfm_avx2.h
+++ b/av1/encoder/x86/av1_fwd_txfm_avx2.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_FWD_TXFM_AVX2_H_
-#define AV1_FWD_TXFM_AVX2_H_
+#ifndef AOM_AV1_ENCODER_X86_AV1_FWD_TXFM_AVX2_H_
+#define AOM_AV1_ENCODER_X86_AV1_FWD_TXFM_AVX2_H_
 #include <immintrin.h>
 
 static INLINE __m256i av1_round_shift_32_avx2(__m256i vec, int bit) {
@@ -100,4 +100,4 @@
   *in1 = _mm256_srai_epi32(temp1, cos_bit);
 }
 
-#endif  // AV1_FWD_TXFM_AVX2_H_
+#endif  // AOM_AV1_ENCODER_X86_AV1_FWD_TXFM_AVX2_H_
diff --git a/av1/encoder/x86/av1_fwd_txfm_sse2.h b/av1/encoder/x86/av1_fwd_txfm_sse2.h
index aa14d3a..99a6b90 100644
--- a/av1/encoder/x86/av1_fwd_txfm_sse2.h
+++ b/av1/encoder/x86/av1_fwd_txfm_sse2.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef AV1_COMMON_X86_AV1_FWD_TXFM_SSE2_H_
-#define AV1_COMMON_X86_AV1_FWD_TXFM_SSE2_H_
+#ifndef AOM_AV1_ENCODER_X86_AV1_FWD_TXFM_SSE2_H_
+#define AOM_AV1_ENCODER_X86_AV1_FWD_TXFM_SSE2_H_
 
 #include <immintrin.h>
 
@@ -114,4 +114,4 @@
 }
 #endif
 
-#endif  // AV1_COMMON_X86_AV1_FWD_TXFM_SSE2_H_
+#endif  // AOM_AV1_ENCODER_X86_AV1_FWD_TXFM_SSE2_H_
diff --git a/av1/encoder/x86/av1_txfm1d_sse4.h b/av1/encoder/x86/av1_txfm1d_sse4.h
index 0adefec..17ca8fc 100644
--- a/av1/encoder/x86/av1_txfm1d_sse4.h
+++ b/av1/encoder/x86/av1_txfm1d_sse4.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_TXMF1D_SSE2_H_
-#define AV1_TXMF1D_SSE2_H_
+#ifndef AOM_AV1_ENCODER_X86_AV1_TXFM1D_SSE4_H_
+#define AOM_AV1_ENCODER_X86_AV1_TXFM1D_SSE4_H_
 
 #include <smmintrin.h>
 #include "av1/common/av1_txfm.h"
@@ -138,4 +138,4 @@
 }
 #endif
 
-#endif  // AV1_TXMF1D_SSE2_H_
+#endif  // AOM_AV1_ENCODER_X86_AV1_TXFM1D_SSE4_H_
diff --git a/common/args.h b/common/args.h
index d129736..6a26642 100644
--- a/common/args.h
+++ b/common/args.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef ARGS_H_
-#define ARGS_H_
+#ifndef AOM_COMMON_ARGS_H_
+#define AOM_COMMON_ARGS_H_
 #include <stdio.h>
 
 #ifdef __cplusplus
@@ -65,4 +65,4 @@
 }  // extern "C"
 #endif
 
-#endif  // ARGS_H_
+#endif  // AOM_COMMON_ARGS_H_
diff --git a/common/av1_config.h b/common/av1_config.h
index f6f6bf9..a15bedb 100644
--- a/common/av1_config.h
+++ b/common/av1_config.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef COMMON_AV1_CONFIG_H_
-#define COMMON_AV1_CONFIG_H_
+#ifndef AOM_COMMON_AV1_CONFIG_H_
+#define AOM_COMMON_AV1_CONFIG_H_
 
 #include "aom/aom_integer.h"
 
@@ -83,4 +83,4 @@
 } /* extern "C" */
 #endif
 
-#endif  // COMMON_AV1_CONFIG_H_
+#endif  // AOM_COMMON_AV1_CONFIG_H_
diff --git a/common/ivfdec.h b/common/ivfdec.h
index 9013dea..ea294fa 100644
--- a/common/ivfdec.h
+++ b/common/ivfdec.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef IVFDEC_H_
-#define IVFDEC_H_
+#ifndef AOM_COMMON_IVFDEC_H_
+#define AOM_COMMON_IVFDEC_H_
 
 #include "common/tools_common.h"
 
@@ -27,4 +27,4 @@
 } /* extern "C" */
 #endif
 
-#endif  // IVFDEC_H_
+#endif  // AOM_COMMON_IVFDEC_H_
diff --git a/common/ivfenc.h b/common/ivfenc.h
index f0cab81..8f6d947 100644
--- a/common/ivfenc.h
+++ b/common/ivfenc.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef IVFENC_H_
-#define IVFENC_H_
+#ifndef AOM_COMMON_IVFENC_H_
+#define AOM_COMMON_IVFENC_H_
 
 #include "common/tools_common.h"
 
@@ -31,4 +31,4 @@
 } /* extern "C" */
 #endif
 
-#endif  // IVFENC_H_
+#endif  // AOM_COMMON_IVFENC_H_
diff --git a/common/md5_utils.h b/common/md5_utils.h
index bd4991b..144fa3a 100644
--- a/common/md5_utils.h
+++ b/common/md5_utils.h
@@ -20,8 +20,8 @@
  * Still in the public domain.
  */
 
-#ifndef MD5_UTILS_H_
-#define MD5_UTILS_H_
+#ifndef AOM_COMMON_MD5_UTILS_H_
+#define AOM_COMMON_MD5_UTILS_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -46,4 +46,4 @@
 }  // extern "C"
 #endif
 
-#endif  // MD5_UTILS_H_
+#endif  // AOM_COMMON_MD5_UTILS_H_
diff --git a/common/obudec.h b/common/obudec.h
index c52a94e..b2adb1e 100644
--- a/common/obudec.h
+++ b/common/obudec.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef OBUDEC_H_
-#define OBUDEC_H_
+#ifndef AOM_COMMON_OBUDEC_H_
+#define AOM_COMMON_OBUDEC_H_
 
 #include "common/tools_common.h"
 
@@ -45,4 +45,4 @@
 } /* extern "C" */
 #endif
 
-#endif  // OBUDEC_H_
+#endif  // AOM_COMMON_OBUDEC_H_
diff --git a/common/rawenc.h b/common/rawenc.h
index 5c4a148..cf5e00e 100644
--- a/common/rawenc.h
+++ b/common/rawenc.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef RAWENC_H_
-#define RAWENC_H_
+#ifndef AOM_COMMON_RAWENC_H_
+#define AOM_COMMON_RAWENC_H_
 
 #include "aom/aom_decoder.h"
 #include "common/md5_utils.h"
@@ -29,4 +29,4 @@
 }  // extern "C"
 #endif
 
-#endif  // RAWENC_H_
+#endif  // AOM_COMMON_RAWENC_H_
diff --git a/common/tools_common.h b/common/tools_common.h
index 5879036..4e1d12f 100644
--- a/common/tools_common.h
+++ b/common/tools_common.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef TOOLS_COMMON_H_
-#define TOOLS_COMMON_H_
+#ifndef AOM_COMMON_TOOLS_COMMON_H_
+#define AOM_COMMON_TOOLS_COMMON_H_
 
 #include <stdio.h>
 
@@ -161,4 +161,4 @@
 } /* extern "C" */
 #endif
 
-#endif  // TOOLS_COMMON_H_
+#endif  // AOM_COMMON_TOOLS_COMMON_H_
diff --git a/common/video_common.h b/common/video_common.h
index 965038d..bf95031 100644
--- a/common/video_common.h
+++ b/common/video_common.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef VIDEO_COMMON_H_
-#define VIDEO_COMMON_H_
+#ifndef AOM_COMMON_VIDEO_COMMON_H_
+#define AOM_COMMON_VIDEO_COMMON_H_
 
 #include "common/tools_common.h"
 
@@ -22,4 +22,4 @@
   unsigned int is_annexb;
 } AvxVideoInfo;
 
-#endif  // VIDEO_COMMON_H_
+#endif  // AOM_COMMON_VIDEO_COMMON_H_
diff --git a/common/video_reader.h b/common/video_reader.h
index 1eb3383..903deae 100644
--- a/common/video_reader.h
+++ b/common/video_reader.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef VIDEO_READER_H_
-#define VIDEO_READER_H_
+#ifndef AOM_COMMON_VIDEO_READER_H_
+#define AOM_COMMON_VIDEO_READER_H_
 
 #include "common/video_common.h"
 
@@ -54,4 +54,4 @@
 }  // extern "C"
 #endif
 
-#endif  // VIDEO_READER_H_
+#endif  // AOM_COMMON_VIDEO_READER_H_
diff --git a/common/video_writer.h b/common/video_writer.h
index 16655d3..3e2b655 100644
--- a/common/video_writer.h
+++ b/common/video_writer.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef VIDEO_WRITER_H_
-#define VIDEO_WRITER_H_
+#ifndef AOM_COMMON_VIDEO_WRITER_H_
+#define AOM_COMMON_VIDEO_WRITER_H_
 
 #include "common/video_common.h"
 
@@ -42,4 +42,4 @@
 }  // extern "C"
 #endif
 
-#endif  // VIDEO_WRITER_H_
+#endif  // AOM_COMMON_VIDEO_WRITER_H_
diff --git a/common/warnings.h b/common/warnings.h
index 61db2dc..36f1fe0 100644
--- a/common/warnings.h
+++ b/common/warnings.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef WARNINGS_H_
-#define WARNINGS_H_
+#ifndef AOM_COMMON_WARNINGS_H_
+#define AOM_COMMON_WARNINGS_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -31,4 +31,4 @@
 }  // extern "C"
 #endif
 
-#endif  // WARNINGS_H_
+#endif  // AOM_COMMON_WARNINGS_H_
diff --git a/common/webmdec.h b/common/webmdec.h
index d5b472a..5ac75cb 100644
--- a/common/webmdec.h
+++ b/common/webmdec.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef WEBMDEC_H_
-#define WEBMDEC_H_
+#ifndef AOM_COMMON_WEBMDEC_H_
+#define AOM_COMMON_WEBMDEC_H_
 
 #include "common/tools_common.h"
 
@@ -68,4 +68,4 @@
 }  // extern "C"
 #endif
 
-#endif  // WEBMDEC_H_
+#endif  // AOM_COMMON_WEBMDEC_H_
diff --git a/common/webmenc.h b/common/webmenc.h
index 74387fb..aa9832f 100644
--- a/common/webmenc.h
+++ b/common/webmenc.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef WEBMENC_H_
-#define WEBMENC_H_
+#ifndef AOM_COMMON_WEBMENC_H_
+#define AOM_COMMON_WEBMENC_H_
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -53,4 +53,4 @@
 }  // extern "C"
 #endif
 
-#endif  // WEBMENC_H_
+#endif  // AOM_COMMON_WEBMENC_H_
diff --git a/common/y4menc.h b/common/y4menc.h
index a133a3d..4020eb4 100644
--- a/common/y4menc.h
+++ b/common/y4menc.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef Y4MENC_H_
-#define Y4MENC_H_
+#ifndef AOM_COMMON_Y4MENC_H_
+#define AOM_COMMON_Y4MENC_H_
 
 #include "aom/aom_decoder.h"
 #include "common/md5_utils.h"
@@ -35,4 +35,4 @@
 }  // extern "C"
 #endif
 
-#endif  // Y4MENC_H_
+#endif  // AOM_COMMON_Y4MENC_H_
diff --git a/common/y4minput.h b/common/y4minput.h
index db20190..01b9ce9 100644
--- a/common/y4minput.h
+++ b/common/y4minput.h
@@ -12,8 +12,8 @@
  * Copyright (C) 2002-2010 The Xiph.Org Foundation and contributors.
  */
 
-#ifndef Y4MINPUT_H_
-#define Y4MINPUT_H_
+#ifndef AOM_COMMON_Y4MINPUT_H_
+#define AOM_COMMON_Y4MINPUT_H_
 
 #include <stdio.h>
 #include "aom/aom_image.h"
@@ -66,4 +66,4 @@
 }  // extern "C"
 #endif
 
-#endif  // Y4MINPUT_H_
+#endif  // AOM_COMMON_Y4MINPUT_H_
diff --git a/examples/encoder_util.h b/examples/encoder_util.h
index 966f5e0..a6bb3fb 100644
--- a/examples/encoder_util.h
+++ b/examples/encoder_util.h
@@ -11,8 +11,8 @@
 
 // Utility functions used by encoder binaries.
 
-#ifndef EXAMPLES_ENCODER_UTIL_H_
-#define EXAMPLES_ENCODER_UTIL_H_
+#ifndef AOM_EXAMPLES_ENCODER_UTIL_H_
+#define AOM_EXAMPLES_ENCODER_UTIL_H_
 
 #include "aom/aom_image.h"
 
@@ -30,4 +30,4 @@
 int aom_compare_img(const aom_image_t *const img1,
                     const aom_image_t *const img2);
 
-#endif  // EXAMPLES_ENCODER_UTIL_H_
+#endif  // AOM_EXAMPLES_ENCODER_UTIL_H_
diff --git a/stats/aomstats.h b/stats/aomstats.h
index 6438093..b9c7187 100644
--- a/stats/aomstats.h
+++ b/stats/aomstats.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AOMSTATS_H_
-#define AOMSTATS_H_
+#ifndef AOM_STATS_AOMSTATS_H_
+#define AOM_STATS_AOMSTATS_H_
 
 #include <stdio.h>
 
@@ -41,4 +41,4 @@
 }  // extern "C"
 #endif
 
-#endif  // AOMSTATS_H_
+#endif  // AOM_STATS_AOMSTATS_H_
diff --git a/stats/rate_hist.h b/stats/rate_hist.h
index e6aa149..55b8c5d 100644
--- a/stats/rate_hist.h
+++ b/stats/rate_hist.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef RATE_HIST_H_
-#define RATE_HIST_H_
+#ifndef AOM_STATS_RATE_HIST_H_
+#define AOM_STATS_RATE_HIST_H_
 
 #include "aom/aom_encoder.h"
 
@@ -38,4 +38,4 @@
 }  // extern "C"
 #endif
 
-#endif  // RATE_HIST_H_
+#endif  // AOM_STATS_RATE_HIST_H_
diff --git a/test/acm_random.h b/test/acm_random.h
index 0233870..0a8317f 100644
--- a/test/acm_random.h
+++ b/test/acm_random.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef TEST_ACM_RANDOM_H_
-#define TEST_ACM_RANDOM_H_
+#ifndef AOM_TEST_ACM_RANDOM_H_
+#define AOM_TEST_ACM_RANDOM_H_
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
@@ -81,4 +81,4 @@
 
 }  // namespace libaom_test
 
-#endif  // TEST_ACM_RANDOM_H_
+#endif  // AOM_TEST_ACM_RANDOM_H_
diff --git a/test/av1_convolve_2d_test_util.h b/test/av1_convolve_2d_test_util.h
index cd4607d..e0eb584 100644
--- a/test/av1_convolve_2d_test_util.h
+++ b/test/av1_convolve_2d_test_util.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef TEST_HIPREC_CONVOLVE_TEST_UTIL_H_
-#define TEST_HIPREC_CONVOLVE_TEST_UTIL_H_
+#ifndef AOM_TEST_AV1_CONVOLVE_2D_TEST_UTIL_H_
+#define AOM_TEST_AV1_CONVOLVE_2D_TEST_UTIL_H_
 
 #include "config/av1_rtcd.h"
 #include "config/aom_dsp_rtcd.h"
@@ -114,4 +114,4 @@
 
 }  // namespace libaom_test
 
-#endif  // TEST_HIPREC_CONVOLVE_TEST_UTIL_H_
+#endif  // AOM_TEST_AV1_CONVOLVE_2D_TEST_UTIL_H_
diff --git a/test/av1_txfm_test.h b/test/av1_txfm_test.h
index 70d1a89..a181647 100644
--- a/test/av1_txfm_test.h
+++ b/test/av1_txfm_test.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef AV1_TXFM_TEST_H_
-#define AV1_TXFM_TEST_H_
+#ifndef AOM_TEST_AV1_TXFM_TEST_H_
+#define AOM_TEST_AV1_TXFM_TEST_H_
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -132,4 +132,4 @@
                             const int8_t cos_bit, int low_range,
                             int high_range);
 }  // namespace libaom_test
-#endif  // AV1_TXFM_TEST_H_
+#endif  // AOM_TEST_AV1_TXFM_TEST_H_
diff --git a/test/clear_system_state.h b/test/clear_system_state.h
index 7aa7824..d38ff5d 100644
--- a/test/clear_system_state.h
+++ b/test/clear_system_state.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef TEST_CLEAR_SYSTEM_STATE_H_
-#define TEST_CLEAR_SYSTEM_STATE_H_
+#ifndef AOM_TEST_CLEAR_SYSTEM_STATE_H_
+#define AOM_TEST_CLEAR_SYSTEM_STATE_H_
 
 #include "config/aom_config.h"
 
@@ -28,4 +28,4 @@
 }
 
 }  // namespace libaom_test
-#endif  // TEST_CLEAR_SYSTEM_STATE_H_
+#endif  // AOM_TEST_CLEAR_SYSTEM_STATE_H_
diff --git a/test/codec_factory.h b/test/codec_factory.h
index bcea05a..dd99110 100644
--- a/test/codec_factory.h
+++ b/test/codec_factory.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef TEST_CODEC_FACTORY_H_
-#define TEST_CODEC_FACTORY_H_
+#ifndef AOM_TEST_CODEC_FACTORY_H_
+#define AOM_TEST_CODEC_FACTORY_H_
 
 #include "config/aom_config.h"
 
@@ -167,4 +167,4 @@
           __VA_ARGS__))
 
 }  // namespace libaom_test
-#endif  // TEST_CODEC_FACTORY_H_
+#endif  // AOM_TEST_CODEC_FACTORY_H_
diff --git a/test/comp_avg_pred_test.h b/test/comp_avg_pred_test.h
index fe7c0ca..9661dd9 100644
--- a/test/comp_avg_pred_test.h
+++ b/test/comp_avg_pred_test.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef TEST_COMP_AVG_PRED_TEST_H_
-#define TEST_COMP_AVG_PRED_TEST_H_
+#ifndef AOM_TEST_COMP_AVG_PRED_TEST_H_
+#define AOM_TEST_COMP_AVG_PRED_TEST_H_
 
 #include "config/aom_dsp_rtcd.h"
 
@@ -552,4 +552,4 @@
 }  // namespace AV1JNTCOMPAVG
 }  // namespace libaom_test
 
-#endif  // TEST_COMP_AVG_PRED_TEST_H_
+#endif  // AOM_TEST_COMP_AVG_PRED_TEST_H_
diff --git a/test/decode_test_driver.h b/test/decode_test_driver.h
index 916efda..d13e13e 100644
--- a/test/decode_test_driver.h
+++ b/test/decode_test_driver.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef TEST_DECODE_TEST_DRIVER_H_
-#define TEST_DECODE_TEST_DRIVER_H_
+#ifndef AOM_TEST_DECODE_TEST_DRIVER_H_
+#define AOM_TEST_DECODE_TEST_DRIVER_H_
 #include <cstring>
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
@@ -162,4 +162,4 @@
 
 }  // namespace libaom_test
 
-#endif  // TEST_DECODE_TEST_DRIVER_H_
+#endif  // AOM_TEST_DECODE_TEST_DRIVER_H_
diff --git a/test/encode_test_driver.h b/test/encode_test_driver.h
index 138cd6a..4f3f855 100644
--- a/test/encode_test_driver.h
+++ b/test/encode_test_driver.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef TEST_ENCODE_TEST_DRIVER_H_
-#define TEST_ENCODE_TEST_DRIVER_H_
+#ifndef AOM_TEST_ENCODE_TEST_DRIVER_H_
+#define AOM_TEST_ENCODE_TEST_DRIVER_H_
 
 #include <string>
 #include <vector>
@@ -246,4 +246,4 @@
 
 }  // namespace libaom_test
 
-#endif  // TEST_ENCODE_TEST_DRIVER_H_
+#endif  // AOM_TEST_ENCODE_TEST_DRIVER_H_
diff --git a/test/function_equivalence_test.h b/test/function_equivalence_test.h
index 4b22c74..f270689 100644
--- a/test/function_equivalence_test.h
+++ b/test/function_equivalence_test.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef TEST_FUNCTION_EQUIVALENCE_TEST_H_
-#define TEST_FUNCTION_EQUIVALENCE_TEST_H_
+#ifndef AOM_TEST_FUNCTION_EQUIVALENCE_TEST_H_
+#define AOM_TEST_FUNCTION_EQUIVALENCE_TEST_H_
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 #include "test/acm_random.h"
@@ -66,4 +66,4 @@
 };
 
 }  // namespace libaom_test
-#endif  // TEST_FUNCTION_EQUIVALENCE_TEST_H_
+#endif  // AOM_TEST_FUNCTION_EQUIVALENCE_TEST_H_
diff --git a/test/hiprec_convolve_test_util.h b/test/hiprec_convolve_test_util.h
index 81471c8..2abe24b 100644
--- a/test/hiprec_convolve_test_util.h
+++ b/test/hiprec_convolve_test_util.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef TEST_HIPREC_CONVOLVE_TEST_UTIL_H_
-#define TEST_HIPREC_CONVOLVE_TEST_UTIL_H_
+#ifndef AOM_TEST_HIPREC_CONVOLVE_TEST_UTIL_H_
+#define AOM_TEST_HIPREC_CONVOLVE_TEST_UTIL_H_
 
 #include "config/av1_rtcd.h"
 
@@ -90,4 +90,4 @@
 
 }  // namespace libaom_test
 
-#endif  // TEST_HIPREC_CONVOLVE_TEST_UTIL_H_
+#endif  // AOM_TEST_HIPREC_CONVOLVE_TEST_UTIL_H_
diff --git a/test/i420_video_source.h b/test/i420_video_source.h
index 0825296..233e715 100644
--- a/test/i420_video_source.h
+++ b/test/i420_video_source.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef TEST_I420_VIDEO_SOURCE_H_
-#define TEST_I420_VIDEO_SOURCE_H_
+#ifndef AOM_TEST_I420_VIDEO_SOURCE_H_
+#define AOM_TEST_I420_VIDEO_SOURCE_H_
 #include <cstdio>
 #include <cstdlib>
 #include <string>
@@ -31,4 +31,4 @@
 
 }  // namespace libaom_test
 
-#endif  // TEST_I420_VIDEO_SOURCE_H_
+#endif  // AOM_TEST_I420_VIDEO_SOURCE_H_
diff --git a/test/ivf_video_source.h b/test/ivf_video_source.h
index 4b27135..ff28414 100644
--- a/test/ivf_video_source.h
+++ b/test/ivf_video_source.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef TEST_IVF_VIDEO_SOURCE_H_
-#define TEST_IVF_VIDEO_SOURCE_H_
+#ifndef AOM_TEST_IVF_VIDEO_SOURCE_H_
+#define AOM_TEST_IVF_VIDEO_SOURCE_H_
 
 #include <cstdio>
 #include <cstdlib>
@@ -111,4 +111,4 @@
 
 }  // namespace libaom_test
 
-#endif  // TEST_IVF_VIDEO_SOURCE_H_
+#endif  // AOM_TEST_IVF_VIDEO_SOURCE_H_
diff --git a/test/md5_helper.h b/test/md5_helper.h
index b2b14cf..9443cb2 100644
--- a/test/md5_helper.h
+++ b/test/md5_helper.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef TEST_MD5_HELPER_H_
-#define TEST_MD5_HELPER_H_
+#ifndef AOM_TEST_MD5_HELPER_H_
+#define AOM_TEST_MD5_HELPER_H_
 
 #include "aom/aom_decoder.h"
 #include "common/md5_utils.h"
@@ -73,4 +73,4 @@
 
 }  // namespace libaom_test
 
-#endif  // TEST_MD5_HELPER_H_
+#endif  // AOM_TEST_MD5_HELPER_H_
diff --git a/test/register_state_check.h b/test/register_state_check.h
index ef1f775..d404621 100644
--- a/test/register_state_check.h
+++ b/test/register_state_check.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef TEST_REGISTER_STATE_CHECK_H_
-#define TEST_REGISTER_STATE_CHECK_H_
+#ifndef AOM_TEST_REGISTER_STATE_CHECK_H_
+#define AOM_TEST_REGISTER_STATE_CHECK_H_
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
@@ -145,4 +145,4 @@
 #define API_REGISTER_STATE_CHECK ASM_REGISTER_STATE_CHECK
 #endif
 
-#endif  // TEST_REGISTER_STATE_CHECK_H_
+#endif  // AOM_TEST_REGISTER_STATE_CHECK_H_
diff --git a/test/test_vectors.h b/test/test_vectors.h
index 229f063..be37f6e 100644
--- a/test/test_vectors.h
+++ b/test/test_vectors.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef TEST_TEST_VECTORS_H_
-#define TEST_TEST_VECTORS_H_
+#ifndef AOM_TEST_TEST_VECTORS_H_
+#define AOM_TEST_TEST_VECTORS_H_
 
 #include "config/aom_config.h"
 
@@ -23,4 +23,4 @@
 
 }  // namespace libaom_test
 
-#endif  // TEST_TEST_VECTORS_H_
+#endif  // AOM_TEST_TEST_VECTORS_H_
diff --git a/test/transform_test_base.h b/test/transform_test_base.h
index 67e8faf..8ebcf5f 100644
--- a/test/transform_test_base.h
+++ b/test/transform_test_base.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef TEST_TRANSFORM_TEST_BASE_H_
-#define TEST_TRANSFORM_TEST_BASE_H_
+#ifndef AOM_TEST_TRANSFORM_TEST_BASE_H_
+#define AOM_TEST_TRANSFORM_TEST_BASE_H_
 
 #include "config/aom_config.h"
 
@@ -339,4 +339,4 @@
 
 }  // namespace libaom_test
 
-#endif  // TEST_TRANSFORM_TEST_BASE_H_
+#endif  // AOM_TEST_TRANSFORM_TEST_BASE_H_
diff --git a/test/util.h b/test/util.h
index db00875..c3f4e44 100644
--- a/test/util.h
+++ b/test/util.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef TEST_UTIL_H_
-#define TEST_UTIL_H_
+#ifndef AOM_TEST_UTIL_H_
+#define AOM_TEST_UTIL_H_
 
 #include <stdio.h>
 #include <math.h>
@@ -50,4 +50,4 @@
   return static_cast<double>(aom_usec_timer_elapsed(t));
 }
 
-#endif  // TEST_UTIL_H_
+#endif  // AOM_TEST_UTIL_H_
diff --git a/test/video_source.h b/test/video_source.h
index dc39b5a..3c1c5e5 100644
--- a/test/video_source.h
+++ b/test/video_source.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef TEST_VIDEO_SOURCE_H_
-#define TEST_VIDEO_SOURCE_H_
+#ifndef AOM_TEST_VIDEO_SOURCE_H_
+#define AOM_TEST_VIDEO_SOURCE_H_
 
 #if defined(_WIN32)
 #undef NOMINMAX
@@ -256,4 +256,4 @@
 
 }  // namespace libaom_test
 
-#endif  // TEST_VIDEO_SOURCE_H_
+#endif  // AOM_TEST_VIDEO_SOURCE_H_
diff --git a/test/warp_filter_test_util.h b/test/warp_filter_test_util.h
index 5224819..b8998e5 100644
--- a/test/warp_filter_test_util.h
+++ b/test/warp_filter_test_util.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef TEST_WARP_FILTER_TEST_UTIL_H_
-#define TEST_WARP_FILTER_TEST_UTIL_H_
+#ifndef AOM_TEST_WARP_FILTER_TEST_UTIL_H_
+#define AOM_TEST_WARP_FILTER_TEST_UTIL_H_
 
 #include "config/av1_rtcd.h"
 #include "config/aom_dsp_rtcd.h"
@@ -100,4 +100,4 @@
 
 }  // namespace libaom_test
 
-#endif  // TEST_WARP_FILTER_TEST_UTIL_H_
+#endif  // AOM_TEST_WARP_FILTER_TEST_UTIL_H_
diff --git a/test/webm_video_source.h b/test/webm_video_source.h
index 482f5de..bb3d117 100644
--- a/test/webm_video_source.h
+++ b/test/webm_video_source.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef TEST_WEBM_VIDEO_SOURCE_H_
-#define TEST_WEBM_VIDEO_SOURCE_H_
+#ifndef AOM_TEST_WEBM_VIDEO_SOURCE_H_
+#define AOM_TEST_WEBM_VIDEO_SOURCE_H_
 #include <cstdarg>
 #include <cstdio>
 #include <cstdlib>
@@ -93,4 +93,4 @@
 
 }  // namespace libaom_test
 
-#endif  // TEST_WEBM_VIDEO_SOURCE_H_
+#endif  // AOM_TEST_WEBM_VIDEO_SOURCE_H_
diff --git a/test/y4m_video_source.h b/test/y4m_video_source.h
index 277ded9..3dea901 100644
--- a/test/y4m_video_source.h
+++ b/test/y4m_video_source.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef TEST_Y4M_VIDEO_SOURCE_H_
-#define TEST_Y4M_VIDEO_SOURCE_H_
+#ifndef AOM_TEST_Y4M_VIDEO_SOURCE_H_
+#define AOM_TEST_Y4M_VIDEO_SOURCE_H_
 #include <algorithm>
 #include <string>
 
@@ -120,4 +120,4 @@
 
 }  // namespace libaom_test
 
-#endif  // TEST_Y4M_VIDEO_SOURCE_H_
+#endif  // AOM_TEST_Y4M_VIDEO_SOURCE_H_
diff --git a/test/yuv_video_source.h b/test/yuv_video_source.h
index 51554af..774ecc0 100644
--- a/test/yuv_video_source.h
+++ b/test/yuv_video_source.h
@@ -8,8 +8,8 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
-#ifndef TEST_YUV_VIDEO_SOURCE_H_
-#define TEST_YUV_VIDEO_SOURCE_H_
+#ifndef AOM_TEST_YUV_VIDEO_SOURCE_H_
+#define AOM_TEST_YUV_VIDEO_SOURCE_H_
 
 #include <cstdio>
 #include <cstdlib>
@@ -120,4 +120,4 @@
 
 }  // namespace libaom_test
 
-#endif  // TEST_YUV_VIDEO_SOURCE_H_
+#endif  // AOM_TEST_YUV_VIDEO_SOURCE_H_
diff --git a/tools/obu_parser.h b/tools/obu_parser.h
index 86e7c45..1d7d2d7 100644
--- a/tools/obu_parser.h
+++ b/tools/obu_parser.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef TOOLS_OBU_PARSER_H_
-#define TOOLS_OBU_PARSER_H_
+#ifndef AOM_TOOLS_OBU_PARSER_H_
+#define AOM_TOOLS_OBU_PARSER_H_
 
 #include <cstdint>
 
@@ -24,4 +24,4 @@
 
 }  // namespace aom_tools
 
-#endif  // TOOLS_OBU_PARSER_H_
+#endif  // AOM_TOOLS_OBU_PARSER_H_
diff --git a/tools/txfm_analyzer/txfm_graph.h b/tools/txfm_analyzer/txfm_graph.h
index 76a9bc7..2e3c955 100644
--- a/tools/txfm_analyzer/txfm_graph.h
+++ b/tools/txfm_analyzer/txfm_graph.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef TOOLS_TXFM_ANALYZER_H_
-#define TOOLS_TXFM_ANALYZER_H_
+#ifndef AOM_TOOLS_TXFM_ANALYZER_TXFM_GRAPH_H_
+#define AOM_TOOLS_TXFM_ANALYZER_TXFM_GRAPH_H_
 
 struct Node {
   Node *inNode[2];
@@ -158,4 +158,4 @@
 void propagate_estimate_amlify(Node *node, int stage_num, int node_num,
                                int stage_idx, int amplify_bit,
                                int estimate_bit);
-#endif  // TOOLS_TXFM_ANALYZER_H_
+#endif  // AOM_TOOLS_TXFM_ANALYZER_TXFM_GRAPH_H_