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

/*
 * Copyright (c) 2017, 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_TXB_COMMON_H_
#define AOM_AV1_COMMON_TXB_COMMON_H_

#include "av1/common/av1_common_int.h"

extern const int16_t av1_eob_group_start[12];
extern const int16_t av1_eob_offset_bits[12];

extern const int8_t *av1_nz_map_ctx_offset[TX_SIZES_ALL];

TXB_CTX;

static const int base_level_count_to_index[13] =;

static const TX_CLASS tx_type_to_class[TX_TYPES] =;

static inline int get_txb_bhl(TX_SIZE tx_size) {}

static inline int get_txb_wide(TX_SIZE tx_size) {}

static inline int get_txb_high(TX_SIZE tx_size) {}

static inline uint8_t *set_levels(uint8_t *const levels_buf, const int height) {}

static inline int get_padded_idx(const int idx, const int bhl) {}

static inline int get_br_ctx_2d(const uint8_t *const levels,
                                const int c,  // raster order
                                const int bhl) {}

static AOM_FORCE_INLINE int get_br_ctx_eob(const int c,  // raster order
                                           const int bhl,
                                           const TX_CLASS tx_class) {}

static AOM_FORCE_INLINE int get_br_ctx(const uint8_t *const levels,
                                       const int c,  // raster order
                                       const int bhl, const TX_CLASS tx_class) {}

static const uint8_t clip_max3[256] =;

static AOM_FORCE_INLINE int get_nz_mag(const uint8_t *const levels,
                                       const int bhl, const TX_CLASS tx_class) {}

#define NZ_MAP_CTX_0
#define NZ_MAP_CTX_5
#define NZ_MAP_CTX_10

static const int nz_map_ctx_offset_1d[32] =;

static AOM_FORCE_INLINE int get_nz_map_ctx_from_stats(
    const int stats,
    const int coeff_idx,  // raster order
    const int bhl, const TX_SIZE tx_size, const TX_CLASS tx_class) {}

base_cdf_arr;
br_cdf_arr;

static inline int get_lower_levels_ctx_eob(int bhl, int width, int scan_idx) {}

static inline int get_lower_levels_ctx_2d(const uint8_t *levels, int coeff_idx,
                                          int bhl, TX_SIZE tx_size) {}
static AOM_FORCE_INLINE int get_lower_levels_ctx(const uint8_t *levels,
                                                 int coeff_idx, int bhl,
                                                 TX_SIZE tx_size,
                                                 TX_CLASS tx_class) {}

static inline int get_lower_levels_ctx_general(int is_last, int scan_idx,
                                               int bhl, int width,
                                               const uint8_t *levels,
                                               int coeff_idx, TX_SIZE tx_size,
                                               TX_CLASS tx_class) {}

static inline void set_dc_sign(int *cul_level, int dc_val) {}

static void get_txb_ctx_general(const BLOCK_SIZE plane_bsize,
                                const TX_SIZE tx_size, const int plane,
                                const ENTROPY_CONTEXT *const a,
                                const ENTROPY_CONTEXT *const l,
                                TXB_CTX *const txb_ctx) {}

#define SPECIALIZE_GET_TXB_CTX(w, h)

SPECIALIZE_GET_TXB_CTX()
SPECIALIZE_GET_TXB_CTX()
SPECIALIZE_GET_TXB_CTX()
SPECIALIZE_GET_TXB_CTX()

// Wrapper for get_txb_ctx that calls the specialized version of get_txb_ctc_*
// so that the compiler can compile away the while loops.
static inline void get_txb_ctx(const BLOCK_SIZE plane_bsize,
                               const TX_SIZE tx_size, const int plane,
                               const ENTROPY_CONTEXT *const a,
                               const ENTROPY_CONTEXT *const l,
                               TXB_CTX *const txb_ctx) {}
#undef MAX_TX_SIZE_UNIT

#endif  // AOM_AV1_COMMON_TXB_COMMON_H_