chromium/third_party/libaom/source/libaom/av1/common/common_data.h

/*
 * 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 AOM_AV1_COMMON_COMMON_DATA_H_
#define AOM_AV1_COMMON_COMMON_DATA_H_

#include "av1/common/enums.h"
#include "aom/aom_integer.h"
#include "aom_dsp/aom_dsp_common.h"

#ifdef __cplusplus
extern "C" {
#endif

// Log 2 conversion lookup tables in units of mode info (4x4).
// The Mi_Width_Log2 table in the spec (Section 9.3. Conversion tables).
static const uint8_t mi_size_wide_log2[BLOCK_SIZES_ALL] =;
// The Mi_Height_Log2 table in the spec (Section 9.3. Conversion tables).
static const uint8_t mi_size_high_log2[BLOCK_SIZES_ALL] =;

// Width/height lookup tables in units of mode info (4x4).
// The Num_4x4_Blocks_Wide table in the spec (Section 9.3. Conversion tables).
static const uint8_t mi_size_wide[BLOCK_SIZES_ALL] =;

// The Num_4x4_Blocks_High table in the spec (Section 9.3. Conversion tables).
static const uint8_t mi_size_high[BLOCK_SIZES_ALL] =;

// Width/height lookup tables in units of samples.
// The Block_Width table in the spec (Section 9.3. Conversion tables).
static const uint8_t block_size_wide[BLOCK_SIZES_ALL] =;

// The Block_Height table in the spec (Section 9.3. Conversion tables).
static const uint8_t block_size_high[BLOCK_SIZES_ALL] =;

// Maps a block size to a context.
// The Size_Group table in the spec (Section 9.3. Conversion tables).
// AOMMIN(3, AOMMIN(mi_size_wide_log2(bsize), mi_size_high_log2(bsize)))
static const uint8_t size_group_lookup[BLOCK_SIZES_ALL] =;

static const uint8_t num_pels_log2_lookup[BLOCK_SIZES_ALL] =;

// A compressed version of the Partition_Subsize table in the spec (9.3.
// Conversion tables), for square block sizes only.
/* clang-format off */
static const BLOCK_SIZE subsize_lookup[EXT_PARTITION_TYPES][SQR_BLOCK_SIZES] =;

static const TX_SIZE max_txsize_lookup[BLOCK_SIZES_ALL] =;

static const TX_SIZE max_txsize_rect_lookup[BLOCK_SIZES_ALL] =;

static const TX_TYPE_1D vtx_tab[TX_TYPES] =;

static const TX_TYPE_1D htx_tab[TX_TYPES] =;

#define TXSIZE_CAT_INVALID

/* clang-format on */

static const TX_SIZE sub_tx_size_map[TX_SIZES_ALL] =;

static const TX_SIZE txsize_horz_map[TX_SIZES_ALL] =;

static const TX_SIZE txsize_vert_map[TX_SIZES_ALL] =;

#define TX_SIZE_W_MIN

// Transform block width in pixels
static const int tx_size_wide[TX_SIZES_ALL] =;

#define TX_SIZE_H_MIN

// Transform block height in pixels
static const int tx_size_high[TX_SIZES_ALL] =;

// Transform block width in unit
static const int tx_size_wide_unit[TX_SIZES_ALL] =;

// Transform block height in unit
static const int tx_size_high_unit[TX_SIZES_ALL] =;

// Transform block width in log2
static const int tx_size_wide_log2[TX_SIZES_ALL] =;

// Transform block width in log2 unit
static const int tx_size_wide_unit_log2[TX_SIZES_ALL] =;

// Transform block height in log2
static const int tx_size_high_log2[TX_SIZES_ALL] =;

// Transform block height in log2 unit
static const int tx_size_high_unit_log2[TX_SIZES_ALL] =;

static const int tx_size_2d[TX_SIZES_ALL + 1] =;

static const BLOCK_SIZE txsize_to_bsize[TX_SIZES_ALL] =;

static const TX_SIZE txsize_sqr_map[TX_SIZES_ALL] =;

static const TX_SIZE txsize_sqr_up_map[TX_SIZES_ALL] =;

static const int8_t txsize_log2_minus4[TX_SIZES_ALL] =;

static const TX_SIZE tx_mode_to_biggest_tx_size[TX_MODES] =;

// The Subsampled_Size table in the spec (Section 5.11.38. Get plane residual
// size function).
extern const BLOCK_SIZE av1_ss_size_lookup[BLOCK_SIZES_ALL][2][2];

// Generates 5 bit field in which each bit set to 1 represents
// a blocksize partition  11111 means we split 128x128, 64x64, 32x32, 16x16
// and 8x8.  10000 means we just split the 128x128 to 64x64
/* clang-format off */
static const struct {} partition_context_lookup[BLOCK_SIZES_ALL] =;
/* clang-format on */

static const int intra_mode_context[INTRA_MODES] =;

// Note: this is also used in unit tests. So whenever one changes the table,
// the unit tests need to be changed accordingly.
static const int quant_dist_weight[4][2] =;

static const int quant_dist_lookup_table[4][2] =;

#ifdef __cplusplus
}  // extern "C"
#endif

#endif  // AOM_AV1_COMMON_COMMON_DATA_H_