chromium/third_party/libaom/source/libaom/av1/common/filter.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_FILTER_H_
#define AOM_AV1_COMMON_FILTER_H_

#include <assert.h>

#include "config/aom_config.h"

#include "aom/aom_integer.h"
#include "aom_dsp/aom_filter.h"
#include "aom_ports/mem.h"
#include "av1/common/enums.h"

#ifdef __cplusplus
extern "C" {
#endif

#define MAX_FILTER_TAP

InterpFilter;

enum {} UENUM1BYTE();

enum {} UENUM1BYTE();

enum {} UENUM1BYTE();
// Pack two InterpFilter's into a uint32_t: since there are at most 10 filters,
// we can use 16 bits for each and have more than enough space. This reduces
// argument passing and unifies the operation of setting a (pair of) filters.
InterpFilters;

int_interpfilters;

static inline InterpFilter av1_extract_interp_filter(int_interpfilters filters,
                                                     int dir) {}

static inline int_interpfilters av1_broadcast_interp_filter(
    InterpFilter filter) {}

static inline InterpFilter av1_unswitchable_filter(InterpFilter filter) {}

/* (1 << LOG_SWITCHABLE_FILTERS) > SWITCHABLE_FILTERS */
#define LOG_SWITCHABLE_FILTERS

#define SWITCHABLE_FILTER_CONTEXTS
#define INTER_FILTER_COMP_OFFSET
#define INTER_FILTER_DIR_OFFSET
#define ALLOW_ALL_INTERP_FILT_MASK

InterpFilterParams;

DECLARE_ALIGNED(256, static const InterpKernel,
                av1_bilinear_filters[SUBPEL_SHIFTS]) =;

DECLARE_ALIGNED(256, static const InterpKernel,
                av1_sub_pel_filters_8[SUBPEL_SHIFTS]) =;

DECLARE_ALIGNED(256, static const InterpKernel,
                av1_sub_pel_filters_8sharp[SUBPEL_SHIFTS]) =;

DECLARE_ALIGNED(256, static const InterpKernel,
                av1_sub_pel_filters_8smooth[SUBPEL_SHIFTS]) =;

DECLARE_ALIGNED(256, static const int16_t,
                av1_sub_pel_filters_12sharp[SUBPEL_SHIFTS][12]) =;

static const InterpFilterParams
    av1_interp_filter_params_list[INTERP_FILTERS_ALL] =;

// A special 2-tap bilinear filter for IntraBC chroma. IntraBC uses full pixel
// MV for luma. If sub-sampling exists, chroma may possibly use half-pel MV.
DECLARE_ALIGNED(256, static const int16_t,
                av1_intrabc_bilinear_filter[2 * SUBPEL_SHIFTS]) =;

static const InterpFilterParams av1_intrabc_filter_params =;

DECLARE_ALIGNED(256, static const InterpKernel,
                av1_sub_pel_filters_4[SUBPEL_SHIFTS]) =;
DECLARE_ALIGNED(256, static const InterpKernel,
                av1_sub_pel_filters_4smooth[SUBPEL_SHIFTS]) =;

static const uint16_t
    av1_interp_dual_filt_mask[INTERP_PRED_TYPE_ALL - 2][SWITCHABLE_FILTERS] =;

// For w<=4, MULTITAP_SHARP is the same as EIGHTTAP_REGULAR
static const InterpFilterParams av1_interp_4tap[SWITCHABLE_FILTERS + 1] =;

static inline const InterpFilterParams *
av1_get_interp_filter_params_with_block_size(const InterpFilter interp_filter,
                                             const int w) {}

static inline const int16_t *av1_get_interp_filter_kernel(
    const InterpFilter interp_filter, int subpel_search) {}

static inline const int16_t *av1_get_interp_filter_subpel_kernel(
    const InterpFilterParams *const filter_params, const int subpel) {}

static inline const InterpFilterParams *av1_get_filter(int subpel_search) {}

static inline void reset_interp_filter_allowed_mask(
    uint16_t *allow_interp_mask, DUAL_FILTER_TYPE filt_type) {}

static inline void set_interp_filter_allowed_mask(uint16_t *allow_interp_mask,
                                                  DUAL_FILTER_TYPE filt_type) {}

static inline uint8_t get_interp_filter_allowed_mask(
    uint16_t allow_interp_mask, DUAL_FILTER_TYPE filt_type) {}

static inline int get_filter_tap(const InterpFilterParams *const filter_params,
                                 int subpel_qn) {}

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

#endif  // AOM_AV1_COMMON_FILTER_H_