Commit dd3e2a5f authored by Tom Finegan's avatar Tom Finegan

Includes clean up.

- Remove includes of config.h wrapped by HAVE_CONFIG_H. This
  is an obsolete vestige of our libvpx ancestry.
- Change (nearly) all remaining include sites; use proper path
  to the include relative to project root instead of ./.
- Correct include order where appropriate.
  - Note: This part of this patch is NOT exhaustive. In an
    attempt to be conseravative about the impact of this change
    I limited ordering and grouping changes to places that
    appear extremely unlikely to cause a problem. A more exhaustive
    follow up might be appropriate, but this issue can likely be
    handled organically from here on out.

Change-Id: I3b421ffd46c5da6ef78e43e7a6d3b9550cb30325
parent a5869828
......@@ -31,8 +31,8 @@
#ifndef AOM_AOM_H_
#define AOM_AOM_H_
#include "./aom_codec.h"
#include "./aom_image.h"
#include "aom/aom_codec.h"
#include "aom/aom_image.h"
#ifdef __cplusplus
extern "C" {
......
......@@ -43,8 +43,8 @@
extern "C" {
#endif
#include "./aom_integer.h"
#include "./aom_image.h"
#include "aom/aom_image.h"
#include "aom/aom_integer.h"
/*!\brief Decorator indicating a function is deprecated */
#ifndef AOM_DEPRECATED
......
......@@ -30,8 +30,8 @@
extern "C" {
#endif
#include "./aom_codec.h"
#include "./aom_frame_buffer.h"
#include "aom/aom_codec.h"
#include "aom/aom_frame_buffer.h"
/*!\brief Current ABI version number
*
......
......@@ -30,7 +30,7 @@
extern "C" {
#endif
#include "./aom_codec.h"
#include "aom/aom_codec.h"
/*!\brief Current ABI version number
*
......
......@@ -20,7 +20,7 @@
extern "C" {
#endif
#include "./aom_integer.h"
#include "aom/aom_integer.h"
/*!\brief The maximum number of work buffers used by libaom.
* Support maximum 4 threads to decode video in parallel.
......
......@@ -16,8 +16,8 @@
*
* @{
*/
#include "./aom.h"
#include "./aom_encoder.h"
#include "aom/aom.h"
#include "aom/aom_encoder.h"
/*!\file
* \brief Provides definitions for using AOM or AV1 encoder algorithm within the
......
......@@ -26,7 +26,7 @@ extern "C" {
#endif
/* Include controls common to both the encoder and decoder */
#include "./aom.h"
#include "aom/aom.h"
/*!\name Algorithm interface for AV1
*
......
......@@ -20,7 +20,7 @@
#include "config/aom_config.h"
#include "./aom_simd_inline.h"
#include "aom_dsp/aom_simd_inline.h"
#define SIMD_CHECK 1 // Sanity checks in C equivalents
......
......@@ -10,7 +10,7 @@
*/
#include "config/aom_config.h"
#include "./bitreader_buffer.h"
#include "aom_dsp/bitreader_buffer.h"
size_t aom_rb_bytes_read(struct aom_read_bit_buffer *rb) {
return (rb->bit_offset + 7) >> 3;
......
......@@ -14,7 +14,7 @@
#include "config/aom_config.h"
#include "./bitwriter_buffer.h"
#include "aom_dsp/bitwriter_buffer.h"
int aom_wb_is_byte_aligned(const struct aom_write_bit_buffer *wb) {
return (wb->bit_offset % CHAR_BIT == 0);
......
......@@ -9,10 +9,6 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#ifdef HAVE_CONFIG_H
#include "./config.h"
#endif
#include "aom_dsp/entcode.h"
/*Given the current total integer number of bits used and the current value of
......
......@@ -9,10 +9,6 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#ifdef HAVE_CONFIG_H
#include "./config.h"
#endif
#include <assert.h>
#include "aom_dsp/entdec.h"
#include "aom_dsp/prob.h"
......
......@@ -9,10 +9,6 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#ifdef HAVE_CONFIG_H
#include "./config.h"
#endif
#include <stdlib.h>
#include <string.h>
#include <math.h>
......
......@@ -10,7 +10,8 @@
*/
#include <stdlib.h>
#include "./macros_msa.h"
#include "aom_dsp/mips/macros_msa.h"
void aom_plane_add_noise_msa(uint8_t *start_ptr, char *noise,
char blackclamp[16], char whiteclamp[16],
......
......@@ -17,13 +17,11 @@
#include "config/aom_config.h"
#include "./aom_dsp_common.h"
#include "aom_dsp/aom_dsp_common.h"
#include "aom_dsp/entcode.h"
#include "aom_ports/bitops.h"
#include "aom_ports/mem.h"
#include "aom_dsp/entcode.h"
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -15,8 +15,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "./v128_intrinsics_c.h"
#include "./v64_intrinsics.h"
#include "aom_dsp/simd/v128_intrinsics_c.h"
#include "aom_dsp/simd/v64_intrinsics.h"
/* Fallback to plain, unoptimised C. */
......
......@@ -13,7 +13,8 @@
#define _V128_INTRINSICS_H
#include <arm_neon.h>
#include "./v64_intrinsics_arm.h"
#include "aom_dsp/simd/v64_intrinsics_arm.h"
typedef int64x2_t v128;
......
......@@ -14,10 +14,11 @@
#include <stdio.h>
#include <stdlib.h>
#include "./v64_intrinsics_c.h"
#include "config/aom_config.h"
#include "aom_dsp/simd/v64_intrinsics_c.h"
typedef union {
uint8_t u8[16];
uint16_t u16[8];
......
......@@ -12,7 +12,7 @@
#ifndef _V128_INTRINSICS_H
#define _V128_INTRINSICS_H
#include "./v64_intrinsics_x86.h"
#include "aom_dsp/simd/v64_intrinsics_x86.h"
typedef __m128i v128;
......
......@@ -15,9 +15,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "./v256_intrinsics_c.h"
#include "./v128_intrinsics.h"
#include "./v64_intrinsics.h"
#include "aom_dsp/simd/v256_intrinsics_c.h"
#include "aom_dsp/simd/v128_intrinsics.h"
#include "aom_dsp/simd/v64_intrinsics.h"
/* Fallback to plain, unoptimised C. */
......
......@@ -12,6 +12,6 @@
#ifndef _V256_INTRINSICS_H
#define _V256_INTRINSICS_H
#include "./v256_intrinsics_v128.h"
#include "aom_dsp/simd/v256_intrinsics_v128.h"
#endif /* _V256_INTRINSICS_H */
......@@ -14,10 +14,11 @@
#include <stdio.h>
#include <stdlib.h>
#include "./v128_intrinsics_c.h"
#include "config/aom_config.h"
#include "aom_dsp/simd/v128_intrinsics_c.h"
typedef union {
uint8_t u8[32];
uint16_t u16[16];
......
......@@ -13,11 +13,11 @@
#define _V256_INTRINSICS_V128_H
#if HAVE_NEON
#include "./v128_intrinsics_arm.h"
#include "aom_dsp/simd/v128_intrinsics_arm.h"
#elif HAVE_SSE2
#include "./v128_intrinsics_x86.h"
#include "aom_dsp/simd/v128_intrinsics_x86.h"
#else
#include "./v128_intrinsics.h"
#include "aom_dsp/simd/v128_intrinsics.h"
#endif
typedef struct {
......
......@@ -14,7 +14,7 @@
#if !defined(__AVX2__)
#include "./v256_intrinsics_v128.h"
#include "aom_dsp/simd/v256_intrinsics_v128.h"
#else
......@@ -26,7 +26,8 @@
#endif
#include <immintrin.h>
#include "./v128_intrinsics_x86.h"
#include "aom_dsp/simd/v128_intrinsics_x86.h"
typedef __m256i v256;
......
......@@ -14,7 +14,8 @@
#include <stdio.h>
#include <stdlib.h>
#include "./v64_intrinsics_c.h"
#include "aom_dsp/simd/v64_intrinsics_c.h"
/* Fallback to plain, unoptimised C. */
......
......@@ -13,7 +13,8 @@
#define _V64_INTRINSICS_H
#include <arm_neon.h>
#include "./v64_intrinsics_arm.h"
#include "aom_dsp/simd/v64_intrinsics_arm.h"
#include "aom_ports/arm.h"
#ifdef AOM_INCOMPATIBLE_GCC
......
......@@ -16,8 +16,9 @@
#include <assert.h>
#include <string.h> // for memset()
#include "./aom_thread.h"
#include "aom_mem/aom_mem.h"
#include "aom_util/aom_thread.h"
#if CONFIG_MULTITHREAD
......
......@@ -12,14 +12,10 @@
#include <math.h>
#include <stdlib.h>
#ifdef HAVE_CONFIG_H
#include "./config.h"
#endif
#include "config/aom_dsp_rtcd.h"
#include "config/av1_rtcd.h"
#include "./cdef.h"
#include "av1/common/cdef.h"
/* Generated from gen_filter_tables.c. */
DECLARE_ALIGNED(16, const int, cdef_directions[8][2]) = {
......
......@@ -12,7 +12,7 @@
#if !defined(_CDEF_BLOCK_H)
#define _CDEF_BLOCK_H (1)
#include "./odintrin.h"
#include "av1/common/odintrin.h"
#define CDEF_BLOCKSIZE 64
#define CDEF_BLOCKSIZE_LOG2 6
......
......@@ -11,4 +11,4 @@
#include "aom_dsp/aom_simd.h"
#define SIMD_FUNC(name) name##_avx2
#include "./cdef_block_simd.h"
#include "av1/common/cdef_block_simd.h"
......@@ -11,4 +11,4 @@
#include "aom_dsp/aom_simd.h"
#define SIMD_FUNC(name) name##_neon
#include "./cdef_block_simd.h"
#include "av1/common/cdef_block_simd.h"
......@@ -11,7 +11,7 @@
#include "config/av1_rtcd.h"
#include "./cdef_block.h"
#include "av1/common/cdef_block.h"
/* partial A is a 16-bit vector of the form:
[x8 x7 x6 x5 x4 x3 x2 x1] and partial B has the form:
......
......@@ -11,4 +11,4 @@
#include "aom_dsp/aom_simd.h"
#define SIMD_FUNC(name) name##_sse2
#include "./cdef_block_simd.h"
#include "av1/common/cdef_block_simd.h"
......@@ -11,4 +11,4 @@
#include "aom_dsp/aom_simd.h"
#define SIMD_FUNC(name) name##_sse4_1
#include "./cdef_block_simd.h"
#include "av1/common/cdef_block_simd.h"
......@@ -11,4 +11,4 @@
#include "aom_dsp/aom_simd.h"
#define SIMD_FUNC(name) name##_ssse3
#include "./cdef_block_simd.h"
#include "av1/common/cdef_block_simd.h"
......@@ -15,7 +15,7 @@
#include <string.h>
#include "aom/aom_integer.h"
#include "./accounting.h"
#include "av1/decoder/accounting.h"
static int aom_accounting_hash(const char *str) {
uint32_t val;
......
......@@ -9,10 +9,11 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#include "common/args.h"
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include "args.h"
#include "aom/aom_integer.h"
#include "aom_ports/msvc.h"
......
......@@ -9,6 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#include "common/ivfdec.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......@@ -16,8 +18,6 @@
#include "aom_ports/mem_ops.h"
#include "aom_ports/sanitizer.h"
#include "./ivfdec.h"
static const char *IVF_SIGNATURE = "DKIF";
static void fix_framerate(int *num, int *den) {
......
......@@ -11,7 +11,7 @@
#ifndef IVFDEC_H_
#define IVFDEC_H_
#include "./tools_common.h"
#include "common/tools_common.h"
#ifdef __cplusplus
extern "C" {
......
......@@ -9,7 +9,7 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#include "./ivfenc.h"
#include "common/ivfenc.h"
#include "aom/aom_encoder.h"
#include "aom_ports/mem_ops.h"
......
......@@ -11,7 +11,7 @@
#ifndef IVFENC_H_
#define IVFENC_H_
#include "./tools_common.h"
#include "common/tools_common.h"
struct aom_codec_enc_cfg;
struct aom_codec_cx_pkt;
......
......@@ -13,7 +13,7 @@
#include <stdlib.h>
#include <string.h>
#include "./obudec.h"
#include "common/obudec.h"
#include "aom_ports/mem_ops.h"
#include "av1/common/common.h"
......
......@@ -11,7 +11,7 @@
#ifndef OBUDEC_H_
#define OBUDEC_H_
#include "./tools_common.h"
#include "common/tools_common.h"
#ifdef __cplusplus
extern "C" {
......
......@@ -9,14 +9,14 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#include "common/tools_common.h"
#include <math.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "./tools_common.h"
#if CONFIG_AV1_ENCODER
#include "aom/aomcx.h"
#endif
......
......@@ -21,7 +21,7 @@
#include "aom_ports/msvc.h"
#if CONFIG_AV1_ENCODER
#include "./y4minput.h"
#include "common/y4minput.h"
#endif
#if defined(_MSC_VER)
......
......@@ -12,7 +12,7 @@
#ifndef VIDEO_COMMON_H_
#define VIDEO_COMMON_H_
#include "./tools_common.h"
#include "common/tools_common.h"
typedef struct {
uint32_t codec_fourcc;
......
......@@ -8,14 +8,13 @@
* 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.
*/
#include "common/video_reader.h"
#include <stdlib.h>
#include <string.h>
#include "./ivfdec.h"
#include "./video_reader.h"
#include "aom_ports/mem_ops.h"
#include "common/ivfdec.h"
static const char *const kIVFSignature = "DKIF";
......
......@@ -12,7 +12,7 @@
#ifndef VIDEO_READER_H_
#define VIDEO_READER_H_
#include "./video_common.h"
#include "common/video_common.h"
// The following code is work in progress. It is going to support transparent
// reading of input files. Right now only IVF format is supported for
......
......@@ -8,12 +8,12 @@
* 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.
*/
#include "common/video_writer.h"
#include <stdlib.h>
#include "./ivfenc.h"
#include "./video_writer.h"
#include "aom/aom_encoder.h"
#include "common/ivfenc.h"
struct AvxVideoWriterStruct {
AvxVideoInfo info;
......
......@@ -12,7 +12,7 @@
#ifndef VIDEO_WRITER_H_
#define VIDEO_WRITER_H_
#include "./video_common.h"
#include "common/video_common.h"
typedef enum { kContainerIVF } AvxContainer;
......
......@@ -9,7 +9,7 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#include "./warnings.h"
#include "common/warnings.h"
#include <assert.h>
#include <stdio.h>
......@@ -17,9 +17,8 @@
#include <string.h>
#include "aom/aom_encoder.h"
#include "./tools_common.h"
#include "./aomenc.h"
#include "apps/aomenc.h"
#include "common/tools_common.h"
static const char quantizer_warning_string[] =
"Bad quantizer values. Quantizer values should not be equal, and should "
......
......@@ -9,7 +9,7 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#include "./webmdec.h"
#include "common/webmdec.h"
#include <cassert>
#include <cstring>
......
......@@ -11,7 +11,7 @@
#ifndef WEBMDEC_H_
#define WEBMDEC_H_
#include "./tools_common.h"
#include "common/tools_common.h"
#ifdef __cplusplus
extern "C" {
......
......@@ -9,7 +9,7 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#include "./webmenc.h"
#include "common/webmenc.h"
#include <string>
......
......@@ -10,7 +10,8 @@
*/
#include <assert.h>
#include "./y4menc.h"
#include "common/y4menc.h"
int y4m_write_file_header(char *buf, size_t len, int width, int height,
const struct AvxRational *framerate,
......
......@@ -12,9 +12,8 @@
#ifndef Y4MENC_H_
#define Y4MENC_H_
#include "./tools_common.h"
#include "aom/aom_decoder.h"
#include "common/tools_common.h"
#ifdef __cplusplus
extern "C" {
......
......@@ -9,13 +9,13 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#include "./aomstats.h"
#include "stats/aomstats.h"
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "./tools_common.h"
#include "common/tools_common.h"
int stats_open_file(stats_io_t *stats, const char *fpf, int pass) {
int res;
......
......@@ -9,14 +9,14 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#include "stats/rate_hist.h"
#include <assert.h>
#include <stdlib.h>
#include <limits.h>
#include <stdio.h>
#include <math.h>
#include "./rate_hist.h"
#define RATE_BINS 100
#define HIST_BAR_MAX 40
......
......@@ -10,6 +10,11 @@
*/
#include <string>
#include "./aom_version.h"
#include "aom_ports/aom_timer.h"
#include "common/ivfenc.h"
#include "test/codec_factory.h"
#include "test/decode_test_driver.h"
#include "test/encode_test_driver.h"
......@@ -18,9 +23,6 @@
#include "test/md5_helper.h"
#include "test/util.h"
#include "test/webm_video_source.h"
#include "aom_ports/aom_timer.h"
#include "./ivfenc.h"
#include "./aom_version.h"
using ::testing::make_tuple;
......
......@@ -12,8 +12,8 @@
#ifndef TEST_MD5_HELPER_H_
#define TEST_MD5_HELPER_H_
#include "./md5_utils.h"
#include "aom/aom_decoder.h"
#include "common/md5_utils.h"
namespace libaom_test {
class MD5 {
......
......@@ -2,8 +2,8 @@
#include <algorithm>
#include <vector>
#include "./aom_dsp/noise_model.h"
#include "./aom_dsp/noise_util.h"
#include "aom_dsp/noise_model.h"
#include "aom_dsp/noise_util.h"
#include "test/acm_random.h"
#include "third_party/googletest/src/googletest/include/gtest/gtest.h"
......
......@@ -12,4 +12,4 @@
#define ARCH AVX2
#define ARCH_POSTFIX(name) name##_avx2
#define SIMD_NAMESPACE simd_test_avx2
#include "./simd_impl.h"
#include "test/simd_impl.h"
......@@ -12,4 +12,4 @@
#define ARCH AVX2
#define ARCH_POSTFIX(name) name##_avx2
#define SIMD_NAMESPACE simd_test_avx2
#include "./simd_cmp_impl.h"
#include "test/simd_cmp_impl.h"
......@@ -13,5 +13,5 @@
#define ARCH NEON
#define ARCH_POSTFIX(name) name##_neon
#define SIMD_NAMESPACE simd_test_neon
#include "./simd_cmp_impl.h"
#include "test/simd_cmp_impl.h"
#endif
......@@ -14,5 +14,5 @@
#define ARCH SSE2
#define ARCH_POSTFIX(name) name##_sse2
#define SIMD_NAMESPACE simd_test_sse2
#include "./simd_cmp_impl.h"
#include "test/simd_cmp_impl.h"
#endif
......@@ -14,5 +14,5 @@
#define ARCH SSE4_1
#define ARCH_POSTFIX(name) name##_sse4_1
#define SIMD_NAMESPACE simd_test_sse4_1
#include "./simd_cmp_impl.h"