shithub: dav1d

Download patch

ref: c45f6b379d98c3b32dfa7abda74434978aa94094
parent: 53025a2b32f35878c1c6c00bef4a51f239631955
author: Martin Storsjö <martin@martin.st>
date: Wed Feb 13 11:02:54 EST 2019

Remove leading double underscores from include guard defines

A symbol starting with two leading underscores is reserved for
the compiler/standard library implementation.

Also remove the trailing two double underscores for consistency
and symmetry.

--- a/include/common/attributes.h
+++ b/include/common/attributes.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_COMMON_ATTRIBUTES_H__
-#define __DAV1D_COMMON_ATTRIBUTES_H__
+#ifndef DAV1D_COMMON_ATTRIBUTES_H
+#define DAV1D_COMMON_ATTRIBUTES_H
 
 #include "config.h"
 
@@ -139,4 +139,4 @@
 }
 #endif /* !_MSC_VER */
 
-#endif /* __DAV1D_COMMON_ATTRIBUTES_H__ */
+#endif /* DAV1D_COMMON_ATTRIBUTES_H */
--- a/include/common/bitdepth.h
+++ b/include/common/bitdepth.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_COMMON_BITDEPTH_H__
-#define __DAV1D_COMMON_BITDEPTH_H__
+#ifndef DAV1D_COMMON_BITDEPTH_H
+#define DAV1D_COMMON_BITDEPTH_H
 
 #include <stdint.h>
 #include <string.h>
@@ -77,4 +77,4 @@
 name##_8bpc(__VA_ARGS__); \
 name##_16bpc(__VA_ARGS__)
 
-#endif /* __DAV1D_COMMON_BITDEPTH_H__ */
+#endif /* DAV1D_COMMON_BITDEPTH_H */
--- a/include/common/dump.h
+++ b/include/common/dump.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_COMMON_DUMP_H__
-#define __DAV1D_COMMON_DUMP_H__
+#ifndef DAV1D_COMMON_DUMP_H
+#define DAV1D_COMMON_DUMP_H
 
 #include <stddef.h>
 #include <stdint.h>
@@ -83,4 +83,4 @@
     }
 }
 
-#endif /* __DAV1D_COMMON_DUMP_H__ */
+#endif /* DAV1D_COMMON_DUMP_H */
--- a/include/common/intops.h
+++ b/include/common/intops.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_COMMON_INTOPS_H__
-#define __DAV1D_COMMON_INTOPS_H__
+#ifndef DAV1D_COMMON_INTOPS_H
+#define DAV1D_COMMON_INTOPS_H
 
 #include <stdint.h>
 
@@ -73,4 +73,4 @@
         return r - ((v + 1) >> 1);
 }
 
-#endif /* __DAV1D_COMMON_INTOPS_H__ */
+#endif /* DAV1D_COMMON_INTOPS_H */
--- a/include/common/mem.h
+++ b/include/common/mem.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_COMMON_MEM_H__
-#define __DAV1D_COMMON_MEM_H__
+#ifndef DAV1D_COMMON_MEM_H
+#define DAV1D_COMMON_MEM_H
 
 #include <assert.h>
 #include <stdlib.h>
@@ -80,4 +80,4 @@
     }
 }
 
-#endif /* __DAV1D_COMMON_MEM_H__ */
+#endif /* DAV1D_COMMON_MEM_H */
--- a/include/common/validate.h
+++ b/include/common/validate.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_COMMON_VALIDATE_H__
-#define __DAV1D_COMMON_VALIDATE_H__
+#ifndef DAV1D_COMMON_VALIDATE_H
+#define DAV1D_COMMON_VALIDATE_H
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -56,4 +56,4 @@
 
 #define validate_input(x) validate_input_or_ret(x, )
 
-#endif /* __DAV1D_COMMON_VALIDATE_H__ */
+#endif /* DAV1D_COMMON_VALIDATE_H */
--- a/include/dav1d/common.h
+++ b/include/dav1d/common.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_COMMON_H__
-#define __DAV1D_COMMON_H__
+#ifndef DAV1D_COMMON_H
+#define DAV1D_COMMON_H
 
 #include <stddef.h>
 #include <stdint.h>
@@ -67,4 +67,4 @@
     struct Dav1dUserData user_data; ///< user-configurable data, default NULL members
 } Dav1dDataProps;
 
-#endif /* __DAV1D_COMMON_H__ */
+#endif /* DAV1D_COMMON_H */
--- a/include/dav1d/data.h
+++ b/include/dav1d/data.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_DATA_H__
-#define __DAV1D_DATA_H__
+#ifndef DAV1D_DATA_H
+#define DAV1D_DATA_H
 
 #include <stddef.h>
 #include <stdint.h>
@@ -106,4 +106,4 @@
  */
 DAV1D_API void dav1d_data_unref(Dav1dData *data);
 
-#endif /* __DAV1D_DATA_H__ */
+#endif /* DAV1D_DATA_H */
--- a/include/dav1d/dav1d.h
+++ b/include/dav1d/dav1d.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_H__
-#define __DAV1D_H__
+#ifndef DAV1D_H
+#define DAV1D_H
 
 #ifdef __cplusplus
 extern "C" {
@@ -201,4 +201,4 @@
 }
 # endif
 
-#endif /* __DAV1D_H__ */
+#endif /* DAV1D_H */
--- a/include/dav1d/headers.h
+++ b/include/dav1d/headers.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_HEADERS_H__
-#define __DAV1D_HEADERS_H__
+#ifndef DAV1D_HEADERS_H
+#define DAV1D_HEADERS_H
 
 // Constants from Section 3. "Symbols and abbreviated terms"
 #define DAV1D_MAX_CDEF_STRENGTHS 8
@@ -382,4 +382,4 @@
     Dav1dWarpedMotionParams gmv[DAV1D_REFS_PER_FRAME];
 } Dav1dFrameHeader;
 
-#endif /* __DAV1D_HEADERS_H__ */
+#endif /* DAV1D_HEADERS_H */
--- a/include/dav1d/picture.h
+++ b/include/dav1d/picture.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_PICTURE_H__
-#define __DAV1D_PICTURE_H__
+#ifndef DAV1D_PICTURE_H
+#define DAV1D_PICTURE_H
 
 #include <stddef.h>
 #include <stdint.h>
@@ -108,4 +108,4 @@
  */
 DAV1D_API void dav1d_picture_unref(Dav1dPicture *p);
 
-#endif /* __DAV1D_PICTURE_H__ */
+#endif /* DAV1D_PICTURE_H */
--- a/src/arm/32/util.S
+++ b/src/arm/32/util.S
@@ -26,8 +26,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifndef __DAVID_SRC_ARM_32_UTIL_S__
-#define __DAVID_SRC_ARM_32_UTIL_S__
+#ifndef DAVID_SRC_ARM_32_UTIL_S
+#define DAVID_SRC_ARM_32_UTIL_S
 
 #include "config.h"
 #include "src/arm/asm.S"
@@ -63,4 +63,4 @@
 #endif
 .endm
 
-#endif /* __DAVID_SRC_ARM_32_UTIL_S__ */
+#endif /* DAVID_SRC_ARM_32_UTIL_S */
--- a/src/arm/64/util.S
+++ b/src/arm/64/util.S
@@ -26,8 +26,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifndef __DAVID_SRC_ARM_64_UTIL_S__
-#define __DAVID_SRC_ARM_64_UTIL_S__
+#ifndef DAVID_SRC_ARM_64_UTIL_S
+#define DAVID_SRC_ARM_64_UTIL_S
 
 #include "config.h"
 #include "src/arm/asm.S"
@@ -59,4 +59,4 @@
 #endif
 .endm
 
-#endif /* __DAVID_SRC_ARM_64_UTIL_S__ */
+#endif /* DAVID_SRC_ARM_64_UTIL_S */
--- a/src/arm/asm.S
+++ b/src/arm/asm.S
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_ARM_ASM_S__
-#define __DAV1D_SRC_ARM_ASM_S__
+#ifndef DAV1D_SRC_ARM_ASM_S
+#define DAV1D_SRC_ARM_ASM_S
 
 #include "config.h"
 
@@ -134,4 +134,4 @@
 
 #define X(x) CONCAT(EXTERN, x)
 
-#endif /* __DAV1D_SRC_ARM_ASM_S__ */
+#endif /* DAV1D_SRC_ARM_ASM_S */
--- a/src/arm/cpu.h
+++ b/src/arm/cpu.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_ARM_CPU_H__
-#define __DAV1D_SRC_ARM_CPU_H__
+#ifndef DAV1D_SRC_ARM_CPU_H
+#define DAV1D_SRC_ARM_CPU_H
 
 enum CpuFlags {
     DAV1D_ARM_CPU_FLAG_NEON = 1 << 0,
@@ -34,4 +34,4 @@
 
 unsigned dav1d_get_cpu_flags_arm(void);
 
-#endif /* __DAV1D_SRC_ARM_CPU_H__ */
+#endif /* DAV1D_SRC_ARM_CPU_H */
--- a/src/cdef.h
+++ b/src/cdef.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_CDEF_H__
-#define __DAV1D_SRC_CDEF_H__
+#ifndef DAV1D_SRC_CDEF_H
+#define DAV1D_SRC_CDEF_H
 
 #include <stddef.h>
 #include <stdint.h>
@@ -69,4 +69,4 @@
 bitfn_decls(void dav1d_cdef_dsp_init_arm, Dav1dCdefDSPContext *c);
 bitfn_decls(void dav1d_cdef_dsp_init_x86, Dav1dCdefDSPContext *c);
 
-#endif /* __DAV1D_SRC_CDEF_H__ */
+#endif /* DAV1D_SRC_CDEF_H */
--- a/src/cdef_apply.h
+++ b/src/cdef_apply.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_CDEF_APPLY_H__
-#define __DAV1D_SRC_CDEF_APPLY_H__
+#ifndef DAV1D_SRC_CDEF_APPLY_H
+#define DAV1D_SRC_CDEF_APPLY_H
 
 #include "common/bitdepth.h"
 
@@ -35,4 +35,4 @@
 void bytefn(dav1d_cdef_brow)(Dav1dFrameContext *f, pixel *const p[3],
                              const Av1Filter *lflvl, int by_start, int by_end);
 
-#endif /* __DAV1D_SRC_CDEF_APPLY_H__ */
+#endif /* DAV1D_SRC_CDEF_APPLY_H */
--- a/src/cdf.h
+++ b/src/cdf.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_CDF_H__
-#define __DAV1D_SRC_CDF_H__
+#ifndef DAV1D_SRC_CDF_H
+#define DAV1D_SRC_CDF_H
 
 #include <stdint.h>
 
@@ -148,4 +148,4 @@
 void dav1d_cdf_thread_wait(CdfThreadContext *cdf);
 void dav1d_cdf_thread_signal(CdfThreadContext *cdf);
 
-#endif /* __DAV1D_SRC_CDF_H__ */
+#endif /* DAV1D_SRC_CDF_H */
--- a/src/cpu.h
+++ b/src/cpu.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_CPU_H__
-#define __DAV1D_SRC_CPU_H__
+#ifndef DAV1D_SRC_CPU_H
+#define DAV1D_SRC_CPU_H
 
 #include "config.h"
 
@@ -41,4 +41,4 @@
 unsigned dav1d_get_cpu_flags(void);
 DAV1D_API void dav1d_set_cpu_flags_mask(const unsigned mask);
 
-#endif /* __DAV1D_SRC_CPU_H__ */
+#endif /* DAV1D_SRC_CPU_H */
--- a/src/ctx.h
+++ b/src/ctx.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_CTX_H__
-#define __DAV1D_SRC_CTX_H__
+#ifndef DAV1D_SRC_CTX_H
+#define DAV1D_SRC_CTX_H
 
 #include <stdint.h>
 
@@ -88,4 +88,4 @@
     default: default_memset(dir, diridx, off, var); break; \
     }
 
-#endif /* __DAV1D_SRC_CTX_H__ */
+#endif /* DAV1D_SRC_CTX_H */
--- a/src/data.h
+++ b/src/data.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_DATA_H__
-#define __DAV1D_SRC_DATA_H__
+#ifndef DAV1D_SRC_DATA_H
+#define DAV1D_SRC_DATA_H
 
 #include "dav1d/data.h"
 
@@ -57,4 +57,4 @@
                                        void *cookie);
 void dav1d_data_unref_internal(Dav1dData *buf);
 
-#endif /* __DAV1D_SRC_DATA_H__ */
+#endif /* DAV1D_SRC_DATA_H */
--- a/src/decode.h
+++ b/src/decode.h
@@ -25,11 +25,11 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_DECODE_H__
-#define __DAV1D_SRC_DECODE_H__
+#ifndef DAV1D_SRC_DECODE_H
+#define DAV1D_SRC_DECODE_H
 
 #include "src/internal.h"
 
 int dav1d_submit_frame(Dav1dContext *c);
 
-#endif /* __DAV1D_SRC_DECODE_H__ */
+#endif /* DAV1D_SRC_DECODE_H */
--- a/src/dequant_tables.h
+++ b/src/dequant_tables.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_DEQUANT_TABLES_H__
-#define __DAV1D_SRC_DEQUANT_TABLES_H__
+#ifndef DAV1D_SRC_DEQUANT_TABLES_H
+#define DAV1D_SRC_DEQUANT_TABLES_H
 
 #include <stdint.h>
 
@@ -34,4 +34,4 @@
 
 extern const uint16_t dav1d_dq_tbl[][QINDEX_RANGE][2];
 
-#endif /* __DAV1D_SRC_DEQUANT_TABLES_H__ */
+#endif /* DAV1D_SRC_DEQUANT_TABLES_H */
--- a/src/env.h
+++ b/src/env.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_ENV_H__
-#define __DAV1D_SRC_ENV_H__
+#ifndef DAV1D_SRC_ENV_H
+#define DAV1D_SRC_ENV_H
 
 #include <assert.h>
 #include <stddef.h>
@@ -754,4 +754,4 @@
     }
 }
 
-#endif /* __DAV1D_SRC_ENV_H__ */
+#endif /* DAV1D_SRC_ENV_H */
--- a/src/film_grain.h
+++ b/src/film_grain.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_FILM_GRAIN_H__
-#define __DAV1D_SRC_FILM_GRAIN_H__
+#ifndef DAV1D_SRC_FILM_GRAIN_H
+#define DAV1D_SRC_FILM_GRAIN_H
 
 #include "dav1d/dav1d.h"
 
@@ -33,4 +33,4 @@
 bitfn_decls(void dav1d_apply_grain, Dav1dPicture *const out,
                                     const Dav1dPicture *const in);
 
-#endif /* __DAV1D_SRC_FILM_GRAIN_H__ */
+#endif /* DAV1D_SRC_FILM_GRAIN_H */
--- a/src/getbits.h
+++ b/src/getbits.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_GETBITS_H__
-#define __DAV1D_SRC_GETBITS_H__
+#ifndef DAV1D_SRC_GETBITS_H
+#define DAV1D_SRC_GETBITS_H
 
 #include <stddef.h>
 #include <stdint.h>
@@ -55,4 +55,4 @@
     return (unsigned) (c->ptr - c->ptr_start) * 8 - c->bits_left;
 }
 
-#endif /* __DAV1D_SRC_GETBITS_H__ */
+#endif /* DAV1D_SRC_GETBITS_H */
--- a/src/internal.h
+++ b/src/internal.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_INTERNAL_H__
-#define __DAV1D_SRC_INTERNAL_H__
+#ifndef DAV1D_SRC_INTERNAL_H
+#define DAV1D_SRC_INTERNAL_H
 
 #include <stdatomic.h>
 
@@ -301,4 +301,4 @@
     } tile_thread;
 };
 
-#endif /* __DAV1D_SRC_INTERNAL_H__ */
+#endif /* DAV1D_SRC_INTERNAL_H */
--- a/src/intra_edge.h
+++ b/src/intra_edge.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_INTRA_EDGE_H__
-#define __DAV1D_SRC_INTRA_EDGE_H__
+#ifndef DAV1D_SRC_INTRA_EDGE_H
+#define DAV1D_SRC_INTRA_EDGE_H
 
 enum EdgeFlags {
     EDGE_I444_TOP_HAS_RIGHT = 1 << 0,
@@ -54,4 +54,4 @@
 void dav1d_init_mode_tree(EdgeNode *const root, EdgeTip *const nt,
                           const int allow_sb128);
 
-#endif /* __DAV1D_SRC_INTRA_EDGE_H__ */
+#endif /* DAV1D_SRC_INTRA_EDGE_H */
--- a/src/ipred.h
+++ b/src/ipred.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_IPRED_H__
-#define __DAV1D_SRC_IPRED_H__
+#ifndef DAV1D_SRC_IPRED_H
+#define DAV1D_SRC_IPRED_H
 
 #include <stddef.h>
 
@@ -91,4 +91,4 @@
 bitfn_decls(void dav1d_intra_pred_dsp_init, Dav1dIntraPredDSPContext *c);
 bitfn_decls(void dav1d_intra_pred_dsp_init_x86, Dav1dIntraPredDSPContext *c);
 
-#endif /* __DAV1D_SRC_IPRED_H__ */
+#endif /* DAV1D_SRC_IPRED_H */
--- a/src/ipred_prepare.h
+++ b/src/ipred_prepare.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_IPRED_PREPARE_H__
-#define __DAV1D_SRC_IPRED_PREPARE_H__
+#ifndef DAV1D_SRC_IPRED_PREPARE_H
+#define DAV1D_SRC_IPRED_PREPARE_H
 
 #include <stddef.h>
 #include <stdint.h>
@@ -105,4 +105,4 @@
             m == SMOOTH_V_PRED) ? ANGLE_SMOOTH_EDGE_FLAG : 0;
 }
 
-#endif /* __DAV1D_SRC_IPRED_PREPARE_H__ */
+#endif /* DAV1D_SRC_IPRED_PREPARE_H */
--- a/src/itx.h
+++ b/src/itx.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_ITX_H__
-#define __DAV1D_SRC_ITX_H__
+#ifndef DAV1D_SRC_ITX_H
+#define DAV1D_SRC_ITX_H
 
 #include <stddef.h>
 
@@ -46,4 +46,4 @@
 bitfn_decls(void dav1d_itx_dsp_init, Dav1dInvTxfmDSPContext *c);
 bitfn_decls(void dav1d_itx_dsp_init_x86, Dav1dInvTxfmDSPContext *c);
 
-#endif /* __DAV1D_SRC_ITX_H__ */
+#endif /* DAV1D_SRC_ITX_H */
--- a/src/levels.h
+++ b/src/levels.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_LEVELS_H__
-#define __DAV1D_SRC_LEVELS_H__
+#ifndef DAV1D_SRC_LEVELS_H
+#define DAV1D_SRC_LEVELS_H
 
 #include <stdint.h>
 
@@ -281,4 +281,4 @@
     };
 } Av1Block;
 
-#endif /* __DAV1D_SRC_LEVELS_H__ */
+#endif /* DAV1D_SRC_LEVELS_H */
--- a/src/lf_apply.h
+++ b/src/lf_apply.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_LF_APPLY_H__
-#define __DAV1D_SRC_LF_APPLY_H__
+#ifndef DAV1D_SRC_LF_APPLY_H
+#define DAV1D_SRC_LF_APPLY_H
 
 #include <stdint.h>
 
@@ -39,4 +39,4 @@
                                     pixel *const p[3], Av1Filter *lflvl,
                                     int sby, int start_of_tile_row);
 
-#endif /* __DAV1D_SRC_LF_APPLY_H__ */
+#endif /* DAV1D_SRC_LF_APPLY_H */
--- a/src/lf_mask.h
+++ b/src/lf_mask.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_LF_MASK_H__
-#define __DAV1D_SRC_LF_MASK_H__
+#ifndef DAV1D_SRC_LF_MASK_H
+#define DAV1D_SRC_LF_MASK_H
 
 #include <stddef.h>
 #include <stdint.h>
@@ -82,4 +82,4 @@
 void dav1d_calc_lf_values(uint8_t (*values)[4][8][2], const Dav1dFrameHeader *hdr,
                           const int8_t lf_delta[4]);
 
-#endif /* __DAV1D_SRC_LF_MASK_H__ */
+#endif /* DAV1D_SRC_LF_MASK_H */
--- a/src/log.h
+++ b/src/log.h
@@ -24,8 +24,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_LOG_H__
-#define __DAV1D_SRC_LOG_H__
+#ifndef DAV1D_SRC_LOG_H
+#define DAV1D_SRC_LOG_H
 
 #include "config.h"
 
@@ -44,4 +44,4 @@
 #define dav1d_log(...) do { } while(0)
 #endif
 
-#endif /* __DAV1D_SRC_LOG_H__ */
+#endif /* DAV1D_SRC_LOG_H */
--- a/src/loopfilter.h
+++ b/src/loopfilter.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_LOOPFILTER_H__
-#define __DAV1D_SRC_LOOPFILTER_H__
+#ifndef DAV1D_SRC_LOOPFILTER_H
+#define DAV1D_SRC_LOOPFILTER_H
 
 #include <stdint.h>
 #include <stddef.h>
@@ -55,4 +55,4 @@
 bitfn_decls(void dav1d_loop_filter_dsp_init, Dav1dLoopFilterDSPContext *c);
 bitfn_decls(void dav1d_loop_filter_dsp_init_x86, Dav1dLoopFilterDSPContext *c);
 
-#endif /* __DAV1D_SRC_LOOPFILTER_H__ */
+#endif /* DAV1D_SRC_LOOPFILTER_H */
--- a/src/looprestoration.h
+++ b/src/looprestoration.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_LOOPRESTORATION_H__
-#define __DAV1D_SRC_LOOPRESTORATION_H__
+#ifndef DAV1D_SRC_LOOPRESTORATION_H
+#define DAV1D_SRC_LOOPRESTORATION_H
 
 #include <stdint.h>
 #include <stddef.h>
@@ -76,4 +76,4 @@
 bitfn_decls(void dav1d_loop_restoration_dsp_init_arm, Dav1dLoopRestorationDSPContext *c);
 bitfn_decls(void dav1d_loop_restoration_dsp_init_x86, Dav1dLoopRestorationDSPContext *c);
 
-#endif /* __DAV1D_SRC_LOOPRESTORATION_H__ */
+#endif /* DAV1D_SRC_LOOPRESTORATION_H */
--- a/src/lr_apply.h
+++ b/src/lr_apply.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_LR_APPLY_H__
-#define __DAV1D_SRC_LR_APPLY_H__
+#ifndef DAV1D_SRC_LR_APPLY_H
+#define DAV1D_SRC_LR_APPLY_H
 
 #include <stdint.h>
 #include <stddef.h>
@@ -41,4 +41,4 @@
 void bytefn(dav1d_lr_sbrow)(Dav1dFrameContext *const f, pixel *const dst[3],
                             int sby);
 
-#endif /* __DAV1D_SRC_LR_APPLY_H__ */
+#endif /* DAV1D_SRC_LR_APPLY_H */
--- a/src/mc.h
+++ b/src/mc.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_MC_H__
-#define __DAV1D_SRC_MC_H__
+#ifndef DAV1D_SRC_MC_H
+#define DAV1D_SRC_MC_H
 
 #include <stdint.h>
 #include <stddef.h>
@@ -135,4 +135,4 @@
 bitfn_decls(void dav1d_mc_dsp_init_arm, Dav1dMCDSPContext *c);
 bitfn_decls(void dav1d_mc_dsp_init_x86, Dav1dMCDSPContext *c);
 
-#endif /* __DAV1D_SRC_MC_H__ */
+#endif /* DAV1D_SRC_MC_H */
--- a/src/msac.h
+++ b/src/msac.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_MSAC_H__
-#define __DAV1D_SRC_MSAC_H__
+#ifndef DAV1D_SRC_MSAC_H
+#define DAV1D_SRC_MSAC_H
 
 #include <stdint.h>
 #include <stdlib.h>
@@ -55,4 +55,4 @@
 int msac_decode_subexp(MsacContext *c, int ref, int n, unsigned k);
 int msac_decode_uniform(MsacContext *c, unsigned n);
 
-#endif /* __DAV1D_SRC_MSAC_H__ */
+#endif /* DAV1D_SRC_MSAC_H */
--- a/src/obu.h
+++ b/src/obu.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_OBU_H__
-#define __DAV1D_SRC_OBU_H__
+#ifndef DAV1D_SRC_OBU_H
+#define DAV1D_SRC_OBU_H
 
 #include "dav1d/data.h"
 #include "src/internal.h"
@@ -33,4 +33,4 @@
 
 int dav1d_parse_obus(Dav1dContext *c, Dav1dData *in, int global);
 
-#endif /* __DAV1D_SRC_OBU_H__ */
+#endif /* DAV1D_SRC_OBU_H */
--- a/src/picture.h
+++ b/src/picture.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_PICTURE_H__
-#define __DAV1D_SRC_PICTURE_H__
+#ifndef DAV1D_SRC_PICTURE_H
+#define DAV1D_SRC_PICTURE_H
 
 #include <stdatomic.h>
 
@@ -109,4 +109,4 @@
 void default_picture_release(Dav1dPicture *, void *cookie);
 void dav1d_picture_unref_internal(Dav1dPicture *p);
 
-#endif /* __DAV1D_SRC_PICTURE_H__ */
+#endif /* DAV1D_SRC_PICTURE_H */
--- a/src/qm.h
+++ b/src/qm.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_QM_H__
-#define __DAV1D_SRC_QM_H__
+#ifndef DAV1D_SRC_QM_H
+#define DAV1D_SRC_QM_H
 
 #include "src/levels.h"
 
@@ -34,4 +34,4 @@
 
 void dav1d_init_qm_tables(void);
 
-#endif /* __DAV1D_SRC_QM_H__ */
+#endif /* DAV1D_SRC_QM_H */
--- a/src/recon.h
+++ b/src/recon.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_RECON_H__
-#define __DAV1D_SRC_RECON_H__
+#ifndef DAV1D_SRC_RECON_H
+#define DAV1D_SRC_RECON_H
 
 #include "src/internal.h"
 #include "src/levels.h"
@@ -72,4 +72,4 @@
 decl_read_coef_blocks_fn(dav1d_read_coef_blocks_8bpc);
 decl_read_coef_blocks_fn(dav1d_read_coef_blocks_16bpc);
 
-#endif /* __DAV1D_SRC_RECON_H__ */
+#endif /* DAV1D_SRC_RECON_H */
--- a/src/ref.h
+++ b/src/ref.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_REF_H__
-#define __DAV1D_SRC_REF_H__
+#ifndef DAV1D_SRC_REF_H
+#define DAV1D_SRC_REF_H
 
 #include "dav1d/dav1d.h"
 
@@ -50,4 +50,4 @@
 
 int dav1d_ref_is_writable(Dav1dRef *ref);
 
-#endif /* __DAV1D_SRC_REF_H__ */
+#endif /* DAV1D_SRC_REF_H */
--- a/src/ref_mvs.h
+++ b/src/ref_mvs.h
@@ -9,8 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
-#ifndef __DAV1D_SRC_REF_MVS_H__
-#define __DAV1D_SRC_REF_MVS_H__
+#ifndef DAV1D_SRC_REF_MVS_H
+#define DAV1D_SRC_REF_MVS_H
 
 #include <stddef.h>
 
@@ -178,4 +178,4 @@
     }
 }
 
-#endif /* __DAV1D_SRC_REF_MVS_H__ */
+#endif /* DAV1D_SRC_REF_MVS_H */
--- a/src/scan.h
+++ b/src/scan.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SCAN_H__
-#define __DAV1D_SCAN_H__
+#ifndef DAV1D_SRC_SCAN_H
+#define DAV1D_SRC_SCAN_H
 
 #include <stdint.h>
 
@@ -34,4 +34,4 @@
 
 extern const int16_t *const dav1d_scans[N_RECT_TX_SIZES][3];
 
-#endif /* __DAV1D_SCAN_H__ */
+#endif /* DAV1D_SRC_SCAN_H */
--- a/src/tables.h
+++ b/src/tables.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_TABLES_H__
-#define __DAV1D_SRC_TABLES_H__
+#ifndef DAV1D_SRC_TABLES_H
+#define DAV1D_SRC_TABLES_H
 
 #include <stdint.h>
 
@@ -121,4 +121,4 @@
 
 extern const int16_t dav1d_gaussian_sequence[2048]; // for fgs
 
-#endif /* __DAV1D_SRC_TABLES_H__ */
+#endif /* DAV1D_SRC_TABLES_H */
--- a/src/thread.h
+++ b/src/thread.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_THREAD_H__
-#define __DAV1D_THREAD_H__
+#ifndef DAV1D_SRC_THREAD_H
+#define DAV1D_SRC_THREAD_H
 
 #if defined(_WIN32)
 
@@ -108,4 +108,4 @@
 
 #endif
 
-#endif /* __DAV1D_THREAD_H__ */
+#endif /* DAV1D_SRC_THREAD_H */
--- a/src/thread_data.h
+++ b/src/thread_data.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_THREAD_DATA_H__
-#define __DAV1D_SRC_THREAD_DATA_H__
+#ifndef DAV1D_SRC_THREAD_DATA_H
+#define DAV1D_SRC_THREAD_DATA_H
 
 #include "src/thread.h"
 
@@ -37,4 +37,4 @@
     int inited;
 };
 
-#endif /* __DAV1D_SRC_THREAD_DATA_H__ */
+#endif /* DAV1D_SRC_THREAD_DATA_H */
--- a/src/thread_task.h
+++ b/src/thread_task.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_THREAD_TASK_H__
-#define __DAV1D_SRC_THREAD_TASK_H__
+#ifndef DAV1D_SRC_THREAD_TASK_H
+#define DAV1D_SRC_THREAD_TASK_H
 
 #include <limits.h>
 
@@ -41,4 +41,4 @@
 int dav1d_decode_tile_sbrow(Dav1dTileContext *t);
 void *dav1d_tile_task(void *data);
 
-#endif /* __DAV1D_SRC_THREAD_TASK_H__ */
+#endif /* DAV1D_SRC_THREAD_TASK_H */
--- a/src/warpmv.h
+++ b/src/warpmv.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_WARPMV_H__
-#define __DAV1D_SRC_WARPMV_H__
+#ifndef DAV1D_SRC_WARPMV_H
+#define DAV1D_SRC_WARPMV_H
 
 #include "src/levels.h"
 
@@ -34,4 +34,4 @@
 int dav1d_find_affine_int(const int (*pts)[2][2], int np, int bw4, int bh4,
                           mv mv, Dav1dWarpedMotionParams *wm, int by, int bx);
 
-#endif /* __DAV1D_SRC_WARPMV_H__ */
+#endif /* DAV1D_SRC_WARPMV_H */
--- a/src/wedge.h
+++ b/src/wedge.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_WEDGE_H__
-#define __DAV1D_SRC_WEDGE_H__
+#ifndef DAV1D_SRC_WEDGE_H
+#define DAV1D_SRC_WEDGE_H
 
 #include "src/levels.h"
 
@@ -38,4 +38,4 @@
 extern const uint8_t *dav1d_ii_masks[N_BS_SIZES][3 /* 444/luma, 422, 420 */]
                                     [N_INTER_INTRA_PRED_MODES];
 
-#endif /* __DAV1D_SRC_WEDGE_H__ */
+#endif /* DAV1D_SRC_WEDGE_H */
--- a/src/x86/cpu.h
+++ b/src/x86/cpu.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_SRC_X86_CPU_H__
-#define __DAV1D_SRC_X86_CPU_H__
+#ifndef DAV1D_SRC_X86_CPU_H
+#define DAV1D_SRC_X86_CPU_H
 
 enum CpuFlags {
     DAV1D_X86_CPU_FLAG_SSE = 1 << 0,
@@ -42,4 +42,4 @@
 
 unsigned dav1d_get_cpu_flags_x86(void);
 
-#endif /* __DAV1D_SRC_X86_CPU_H__ */
+#endif /* DAV1D_SRC_X86_CPU_H */
--- a/tests/checkasm/checkasm.h
+++ b/tests/checkasm/checkasm.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_TESTS_CHECKASM_CHECKASM_H
-#define __DAV1D_TESTS_CHECKASM_CHECKASM_H
+#ifndef DAV1D_TESTS_CHECKASM_CHECKASM_H
+#define DAV1D_TESTS_CHECKASM_CHECKASM_H
 
 #include "config.h"
 
@@ -262,4 +262,4 @@
 #define bench_new(...) while (0)
 #endif
 
-#endif /* __DAV1D_TESTS_CHECKASM_CHECKASM_H */
+#endif /* DAV1D_TESTS_CHECKASM_CHECKASM_H */
--- a/tests/libfuzzer/dav1d_fuzzer.h
+++ b/tests/libfuzzer/dav1d_fuzzer.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_TESTS_LIBFUZZER_DAV1D_FUZZER_H
-#define __DAV1D_TESTS_LIBFUZZER_DAV1D_FUZZER_H
+#ifndef DAV1D_TESTS_LIBFUZZER_DAV1D_FUZZER_H
+#define DAV1D_TESTS_LIBFUZZER_DAV1D_FUZZER_H
 
 #include <stddef.h>
 #include <stdint.h>
@@ -33,4 +33,4 @@
 
 int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
 
-#endif /* __DAV1D_TESTS_LIBFUZZER_DAV1D_FUZZER_H*/
+#endif /* DAV1D_TESTS_LIBFUZZER_DAV1D_FUZZER_H */
--- a/tools/dav1d_cli_parse.h
+++ b/tools/dav1d_cli_parse.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_CLI_PARSE_H__
-#define __DAV1D_CLI_PARSE_H__
+#ifndef DAV1D_CLI_PARSE_H
+#define DAV1D_CLI_PARSE_H
 
 #include "dav1d.h"
 
@@ -43,4 +43,4 @@
 void parse(const int argc, char *const *const argv,
            CLISettings *const cli_settings, Dav1dSettings *const lib_settings);
 
-#endif /* __DAV1D_CLI_PARSE_H__ */
+#endif /* DAV1D_CLI_PARSE_H */
--- a/tools/input/demuxer.h
+++ b/tools/input/demuxer.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_INPUT_DEMUXER_H__
-#define __DAV1D_INPUT_DEMUXER_H__
+#ifndef DAV1D_INPUT_DEMUXER_H
+#define DAV1D_INPUT_DEMUXER_H
 
 #include "data.h"
 
@@ -41,4 +41,4 @@
     void (*close)(DemuxerPriv *ctx);
 } Demuxer;
 
-#endif /* __DAV1D_INPUT_DEMUXER_H__ */
+#endif /* DAV1D_INPUT_DEMUXER_H */
--- a/tools/input/input.h
+++ b/tools/input/input.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_INPUT_INPUT_H__
-#define __DAV1D_INPUT_INPUT_H__
+#ifndef DAV1D_INPUT_INPUT_H
+#define DAV1D_INPUT_INPUT_H
 
 #include "data.h"
 
@@ -39,4 +39,4 @@
 int input_read(DemuxerContext *ctx, Dav1dData *data);
 void input_close(DemuxerContext *ctx);
 
-#endif /* __DAV1D_INPUT_INPUT_H__ */
+#endif /* DAV1D_INPUT_INPUT_H */
--- a/tools/output/muxer.h
+++ b/tools/output/muxer.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_OUTPUT_MUXER_H__
-#define __DAV1D_OUTPUT_MUXER_H__
+#ifndef DAV1D_OUTPUT_MUXER_H
+#define DAV1D_OUTPUT_MUXER_H
 
 #include "picture.h"
 
@@ -49,4 +49,4 @@
     int (*verify)(MuxerPriv *ctx, const char *hash_string);
 } Muxer;
 
-#endif /* __DAV1D_OUTPUT_MUXER_H__ */
+#endif /* DAV1D_OUTPUT_MUXER_H */
--- a/tools/output/output.h
+++ b/tools/output/output.h
@@ -25,8 +25,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __DAV1D_OUTPUT_OUTPUT_H__
-#define __DAV1D_OUTPUT_OUTPUT_H__
+#ifndef DAV1D_OUTPUT_OUTPUT_H
+#define DAV1D_OUTPUT_OUTPUT_H
 
 #include "picture.h"
 
@@ -46,4 +46,4 @@
  */
 int output_verify(MuxerContext *ctx, const char *hash_string);
 
-#endif /* __DAV1D_OUTPUT_OUTPUT_H__ */
+#endif /* DAV1D_OUTPUT_OUTPUT_H */