From 68569dee1416593955c1570d638b3d9250b33012 Mon Sep 17 00:00:00 2001 From: trav90 Date: Mon, 15 Oct 2018 21:45:30 -0500 Subject: Import aom library This is the reference implementation for the Alliance for Open Media's av1 video code. The commit used was 4d668d7feb1f8abd809d1bca0418570a7f142a36. --- third_party/aom/av1/common/common.h | 64 +++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 third_party/aom/av1/common/common.h (limited to 'third_party/aom/av1/common/common.h') diff --git a/third_party/aom/av1/common/common.h b/third_party/aom/av1/common/common.h new file mode 100644 index 000000000..551055a76 --- /dev/null +++ b/third_party/aom/av1/common/common.h @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2016, Alliance for Open Media. All rights reserved + * + * This source code is subject to the terms of the BSD 2 Clause License and + * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License + * was not distributed with this source code in the LICENSE file, you can + * obtain it at www.aomedia.org/license/software. If the Alliance for Open + * 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_COMMON_H_ +#define AV1_COMMON_COMMON_H_ + +/* Interface header for common constant data structures and lookup tables */ + +#include + +#include "aom_dsp/aom_dsp_common.h" +#include "aom_mem/aom_mem.h" +#include "aom/aom_integer.h" +#include "aom_ports/bitops.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define PI 3.141592653589793238462643383279502884 + +// Only need this for fixed-size arrays, for structs just assign. +#define av1_copy(dest, src) \ + { \ + assert(sizeof(dest) == sizeof(src)); \ + memcpy(dest, src, sizeof(src)); \ + } + +// Use this for variably-sized arrays. +#define av1_copy_array(dest, src, n) \ + { \ + assert(sizeof(*(dest)) == sizeof(*(src))); \ + memcpy(dest, src, n * sizeof(*(src))); \ + } + +#define av1_zero(dest) memset(&(dest), 0, sizeof(dest)) +#define av1_zero_array(dest, n) memset(dest, 0, n * sizeof(*(dest))) + +static INLINE int get_unsigned_bits(unsigned int num_values) { + return num_values > 0 ? get_msb(num_values) + 1 : 0; +} + +#define CHECK_MEM_ERROR(cm, lval, expr) \ + AOM_CHECK_MEM_ERROR(&cm->error, lval, expr) +// TODO(yaowu: validate the usage of these codes or develop new ones.) +#define AV1_SYNC_CODE_0 0x49 +#define AV1_SYNC_CODE_1 0x83 +#define AV1_SYNC_CODE_2 0x43 + +#define AOM_FRAME_MARKER 0x2 + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // AV1_COMMON_COMMON_H_ -- cgit v1.2.3 From ec910d81405c736a4490383a250299a7837c2e64 Mon Sep 17 00:00:00 2001 From: trav90 Date: Thu, 18 Oct 2018 21:53:44 -0500 Subject: Update aom to commit id e87fb2378f01103d5d6e477a4ef6892dc714e614 --- third_party/aom/av1/common/common.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'third_party/aom/av1/common/common.h') diff --git a/third_party/aom/av1/common/common.h b/third_party/aom/av1/common/common.h index 551055a76..8611b776f 100644 --- a/third_party/aom/av1/common/common.h +++ b/third_party/aom/av1/common/common.h @@ -50,10 +50,6 @@ static INLINE int get_unsigned_bits(unsigned int num_values) { #define CHECK_MEM_ERROR(cm, lval, expr) \ AOM_CHECK_MEM_ERROR(&cm->error, lval, expr) -// TODO(yaowu: validate the usage of these codes or develop new ones.) -#define AV1_SYNC_CODE_0 0x49 -#define AV1_SYNC_CODE_1 0x83 -#define AV1_SYNC_CODE_2 0x43 #define AOM_FRAME_MARKER 0x2 -- cgit v1.2.3 From bbcc64772580c8a979288791afa02d30bc476d2e Mon Sep 17 00:00:00 2001 From: trav90 Date: Fri, 19 Oct 2018 21:52:15 -0500 Subject: Update aom to v1.0.0 Update aom to commit id d14c5bb4f336ef1842046089849dee4a301fbbf0. --- third_party/aom/av1/common/common.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'third_party/aom/av1/common/common.h') diff --git a/third_party/aom/av1/common/common.h b/third_party/aom/av1/common/common.h index 8611b776f..72c6d3a1e 100644 --- a/third_party/aom/av1/common/common.h +++ b/third_party/aom/av1/common/common.h @@ -20,6 +20,7 @@ #include "aom_mem/aom_mem.h" #include "aom/aom_integer.h" #include "aom_ports/bitops.h" +#include "config/aom_config.h" #ifdef __cplusplus extern "C" { @@ -53,6 +54,8 @@ static INLINE int get_unsigned_bits(unsigned int num_values) { #define AOM_FRAME_MARKER 0x2 +#define AV1_MIN_TILE_SIZE_BYTES 1 + #ifdef __cplusplus } // extern "C" #endif -- cgit v1.2.3 From d2499ead93dc4298c0882fe98902acb1b5209f99 Mon Sep 17 00:00:00 2001 From: trav90 Date: Fri, 19 Oct 2018 23:05:00 -0500 Subject: Update libaom to commit ID 1e227d41f0616de9548a673a83a21ef990b62591 --- third_party/aom/av1/common/common.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'third_party/aom/av1/common/common.h') diff --git a/third_party/aom/av1/common/common.h b/third_party/aom/av1/common/common.h index 72c6d3a1e..bed6083db 100644 --- a/third_party/aom/av1/common/common.h +++ b/third_party/aom/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 @@ static INLINE int get_unsigned_bits(unsigned int num_values) { } // extern "C" #endif -#endif // AV1_COMMON_COMMON_H_ +#endif // AOM_AV1_COMMON_COMMON_H_ -- cgit v1.2.3