Commit d54236a9 authored by James Zern's avatar James Zern Committed by Yaowu Xu

s/INTERP_FILTER/InterpFilter/

this matches style guidelines and stabilizes successive runs of
clang-format across the tree. remaining types should be address in
successive commits.

Change-Id: I6ad3f69cf0a22cb9a9b895b272195f891f71170f
parent 17b6b0ee
......@@ -92,7 +92,7 @@ typedef struct {
PREDICTION_MODE uv_mode;
// Only for INTER blocks
INTERP_FILTER interp_filter;
InterpFilter interp_filter;
MV_REFERENCE_FRAME ref_frame[2];
TX_TYPE tx_type;
......
......@@ -31,7 +31,7 @@ extern "C" {
#define SWITCHABLE_FILTER_CONTEXTS (SWITCHABLE_FILTERS + 1)
#define SWITCHABLE 4 /* should be the last one */
typedef uint8_t INTERP_FILTER;
typedef uint8_t InterpFilter;
extern const InterpKernel *av1_filter_kernels[4];
......
......@@ -255,7 +255,7 @@ typedef struct AV1Common {
uint8_t *current_frame_seg_map;
int seg_map_alloc_size;
INTERP_FILTER interp_filter;
InterpFilter interp_filter;
loop_filter_info_n lf_info;
......
......@@ -1226,7 +1226,7 @@ static void setup_segmentation_dequant(AV1_COMMON *const cm) {
}
}
static INTERP_FILTER read_interp_filter(struct aom_read_bit_buffer *rb) {
static InterpFilter read_interp_filter(struct aom_read_bit_buffer *rb) {
return aom_rb_read_bit(rb) ? SWITCHABLE : aom_rb_read_literal(rb, 2);
}
......
......@@ -483,11 +483,11 @@ static void read_ref_frames(AV1_COMMON *const cm, MACROBLOCKD *const xd,
}
}
static INLINE INTERP_FILTER read_switchable_interp_filter(AV1_COMMON *const cm,
MACROBLOCKD *const xd,
aom_reader *r) {
static INLINE InterpFilter read_switchable_interp_filter(AV1_COMMON *const cm,
MACROBLOCKD *const xd,
aom_reader *r) {
const int ctx = av1_get_pred_context_switchable_interp(xd);
const INTERP_FILTER type = (INTERP_FILTER)aom_read_tree(
const InterpFilter type = (InterpFilter)aom_read_tree(
r, av1_switchable_interp_tree, cm->fc->switchable_interp_prob[ctx]);
FRAME_COUNTS *counts = xd->counts;
if (counts) ++counts->switchable_interp[ctx][type];
......
......@@ -1146,7 +1146,7 @@ static void update_txfm_probs(AV1_COMMON *cm, aom_writer *w,
}
}
static void write_interp_filter(INTERP_FILTER filter,
static void write_interp_filter(InterpFilter filter,
struct aom_write_bit_buffer *wb) {
aom_wb_write_bit(wb, filter == SWITCHABLE);
if (filter != SWITCHABLE) aom_wb_write_literal(wb, filter, 2);
......
......@@ -62,7 +62,7 @@ typedef struct {
// motion vector cache for adaptive motion search control in partition
// search loop
MV pred_mv[MAX_REF_FRAMES];
INTERP_FILTER pred_interp_filter;
InterpFilter pred_interp_filter;
} PICK_MODE_CONTEXT;
typedef struct PC_TREE {
......
......@@ -2730,7 +2730,7 @@ static void encode_frame_internal(AV1_COMP *cpi) {
#endif
}
static INTERP_FILTER get_interp_filter(
static InterpFilter get_interp_filter(
const int64_t threshes[SWITCHABLE_FILTER_CONTEXTS], int is_alt_ref) {
if (!is_alt_ref && threshes[EIGHTTAP_SMOOTH] > threshes[EIGHTTAP] &&
threshes[EIGHTTAP_SMOOTH] > threshes[EIGHTTAP_SHARP] &&
......
......@@ -3102,7 +3102,7 @@ static void set_arf_sign_bias(AV1_COMP *cpi) {
}
static int setup_interp_filter_search_mask(AV1_COMP *cpi) {
INTERP_FILTER ifilter;
InterpFilter ifilter;
int ref_total[MAX_REF_FRAMES] = { 0 };
MV_REFERENCE_FRAME ref;
int mask = 0;
......
......@@ -2348,7 +2348,7 @@ static int64_t handle_inter_mode(
int64_t *distortion, int *skippable, int *rate_y, int *rate_uv,
int *disable_skip, int_mv (*mode_mv)[MAX_REF_FRAMES], int mi_row,
int mi_col, int_mv single_newmv[MAX_REF_FRAMES],
INTERP_FILTER (*single_filter)[MAX_REF_FRAMES],
InterpFilter (*single_filter)[MAX_REF_FRAMES],
int (*single_skippable)[MAX_REF_FRAMES], int64_t *psse,
const int64_t ref_best_rd, int64_t *mask_filter, int64_t filter_cache[]) {
AV1_COMMON *cm = &cpi->common;
......@@ -2375,7 +2375,7 @@ static int64_t handle_inter_mode(
uint8_t *orig_dst[MAX_MB_PLANE];
int orig_dst_stride[MAX_MB_PLANE];
int rs = 0;
INTERP_FILTER best_filter = SWITCHABLE;
InterpFilter best_filter = SWITCHABLE;
uint8_t skip_txfm[MAX_MB_PLANE << 2] = { 0 };
int64_t bsse[MAX_MB_PLANE << 2] = { 0 };
......@@ -2406,7 +2406,7 @@ static int64_t handle_inter_mode(
#endif // CONFIG_AOM_HIGHBITDEPTH
if (pred_filter_search) {
INTERP_FILTER af = SWITCHABLE, lf = SWITCHABLE;
InterpFilter af = SWITCHABLE, lf = SWITCHABLE;
if (xd->up_available) af = xd->mi[-xd->mi_stride]->mbmi.interp_filter;
if (xd->left_available) lf = xd->mi[-1]->mbmi.interp_filter;
......@@ -2927,7 +2927,7 @@ void av1_rd_pick_inter_mode_sb(AV1_COMP *cpi, TileDataEnc *tile_data,
int_mv frame_mv[MB_MODE_COUNT][MAX_REF_FRAMES];
struct buf_2d yv12_mb[4][MAX_MB_PLANE];
int_mv single_newmv[MAX_REF_FRAMES] = { { 0 } };
INTERP_FILTER single_inter_filter[MB_MODE_COUNT][MAX_REF_FRAMES];
InterpFilter single_inter_filter[MB_MODE_COUNT][MAX_REF_FRAMES];
int single_skippable[MB_MODE_COUNT][MAX_REF_FRAMES];
static const int flag_list[4] = { 0, AOM_LAST_FLAG, AOM_GOLD_FLAG,
AOM_ALT_FLAG };
......@@ -3357,7 +3357,7 @@ void av1_rd_pick_inter_mode_sb(AV1_COMP *cpi, TileDataEnc *tile_data,
if (!mv_check_bounds(x, &cur_mv.as_mv)) {
int64_t dummy_filter_cache[SWITCHABLE_FILTER_CONTEXTS];
INTERP_FILTER
InterpFilter
dummy_single_inter_filter[MB_MODE_COUNT][MAX_REF_FRAMES];
int dummy_single_skippable[MB_MODE_COUNT][MAX_REF_FRAMES];
int64_t dummy_mask_filter = 0;
......@@ -3808,7 +3808,7 @@ void av1_rd_pick_inter_mode_sb_seg_skip(AV1_COMP *cpi, TileDataEnc *tile_data,
int64_t best_filter_diff[SWITCHABLE_FILTER_CONTEXTS];
unsigned int ref_costs_single[MAX_REF_FRAMES], ref_costs_comp[MAX_REF_FRAMES];
aom_prob comp_mode_p;
INTERP_FILTER best_filter = SWITCHABLE;
InterpFilter best_filter = SWITCHABLE;
int64_t this_rd = INT64_MAX;
int rate2 = 0;
const int64_t distortion2 = 0;
......@@ -3913,7 +3913,7 @@ void av1_rd_pick_inter_mode_sub8x8(AV1_COMP *cpi, TileDataEnc *tile_data,
int ref_index, best_ref_index = 0;
unsigned int ref_costs_single[MAX_REF_FRAMES], ref_costs_comp[MAX_REF_FRAMES];
aom_prob comp_mode_p;
INTERP_FILTER tmp_best_filter = SWITCHABLE;
InterpFilter tmp_best_filter = SWITCHABLE;
int rate_uv_intra, rate_uv_tokenonly;
int64_t dist_uv;
int skip_uv;
......
......@@ -131,7 +131,7 @@ typedef enum {
FLAG_SKIP_EIGHTTAP = 1 << EIGHTTAP,
FLAG_SKIP_EIGHTTAP_SMOOTH = 1 << EIGHTTAP_SMOOTH,
FLAG_SKIP_EIGHTTAP_SHARP = 1 << EIGHTTAP_SHARP,
} INTERP_FILTER_MASK;
} InterpFilter_MASK;
typedef enum {
// Search partitions using RD criterion
......@@ -396,7 +396,7 @@ typedef struct SPEED_FEATURES {
int encode_breakout_thresh;
// default interp filter choice
INTERP_FILTER default_interp_filter;
InterpFilter default_interp_filter;
// Early termination in transform size search, which only applies while
// tx_size_search_method is USE_FULL_RD.
......@@ -406,7 +406,7 @@ typedef struct SPEED_FEATURES {
int adaptive_interp_filter_search;
// mask for skip evaluation of certain interp_filter type.
INTERP_FILTER_MASK interp_filter_search_mask;
InterpFilter_MASK interp_filter_search_mask;
// Partition search early breakout thresholds.
int64_t partition_search_breakout_dist_thr;
......
......@@ -614,7 +614,7 @@ const int kNumFilters = 16;
TEST(ConvolveTest, FiltersWontSaturateWhenAddedPairwise) {
for (int filter_bank = 0; filter_bank < kNumFilterBanks; ++filter_bank) {
const InterpKernel *filters =
av1_filter_kernels[static_cast<INTERP_FILTER>(filter_bank)];
av1_filter_kernels[static_cast<InterpFilter>(filter_bank)];
for (int i = 0; i < kNumFilters; i++) {
const int p0 = filters[i][0] + filters[i][1];
const int p1 = filters[i][2] + filters[i][3];
......@@ -652,7 +652,7 @@ TEST_P(ConvolveTest, MatchesReferenceSubpixelFilter) {
for (int filter_bank = 0; filter_bank < kNumFilterBanks; ++filter_bank) {
const InterpKernel *filters =
av1_filter_kernels[static_cast<INTERP_FILTER>(filter_bank)];
av1_filter_kernels[static_cast<InterpFilter>(filter_bank)];
for (int filter_x = 0; filter_x < kNumFilters; ++filter_x) {
for (int filter_y = 0; filter_y < kNumFilters; ++filter_y) {
......@@ -729,7 +729,7 @@ TEST_P(ConvolveTest, MatchesReferenceAveragingSubpixelFilter) {
for (int filter_bank = 0; filter_bank < kNumFilterBanks; ++filter_bank) {
const InterpKernel *filters =
av1_filter_kernels[static_cast<INTERP_FILTER>(filter_bank)];
av1_filter_kernels[static_cast<InterpFilter>(filter_bank)];
for (int filter_x = 0; filter_x < kNumFilters; ++filter_x) {
for (int filter_y = 0; filter_y < kNumFilters; ++filter_y) {
......@@ -826,7 +826,7 @@ TEST_P(ConvolveTest, FilterExtremes) {
for (int filter_bank = 0; filter_bank < kNumFilterBanks; ++filter_bank) {
const InterpKernel *filters =
av1_filter_kernels[static_cast<INTERP_FILTER>(filter_bank)];
av1_filter_kernels[static_cast<InterpFilter>(filter_bank)];
for (int filter_x = 0; filter_x < kNumFilters; ++filter_x) {
for (int filter_y = 0; filter_y < kNumFilters; ++filter_y) {
wrapper_filter_block2d_8_c(in, kInputStride, filters[filter_x],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment