Rename get_bitdepth_data_path_index()
Rename get_bitdepth_data_path_index() as is_cur_buf_hbd().
Change-Id: Id136026efbf3e70a6e0f300a7ab9fd91b3677ed7
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index 23fee04..8ed3135 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -596,7 +596,7 @@
uint8_t *tmp_obmc_bufs[2];
} MACROBLOCKD;
-static INLINE int get_bitdepth_data_path_index(const MACROBLOCKD *xd) {
+static INLINE int is_cur_buf_hbd(const MACROBLOCKD *xd) {
return xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH ? 1 : 0;
}
diff --git a/av1/common/cfl.c b/av1/common/cfl.c
index 99410be..65e18e8 100644
--- a/av1/common/cfl.c
+++ b/av1/common/cfl.c
@@ -37,7 +37,7 @@
assert(pred_plane < CFL_PRED_PLANES);
assert(width <= CFL_BUF_LINE);
- if (get_bitdepth_data_path_index(xd)) {
+ if (is_cur_buf_hbd(xd)) {
uint16_t *const input_16 = CONVERT_TO_SHORTPTR(input);
memcpy(xd->cfl.dc_pred_cache[pred_plane], input_16, width << 1);
return;
@@ -69,7 +69,7 @@
assert(pred_plane < CFL_PRED_PLANES);
assert(width <= CFL_BUF_LINE);
assert(height <= CFL_BUF_LINE);
- if (get_bitdepth_data_path_index(xd)) {
+ if (is_cur_buf_hbd(xd)) {
uint16_t *dst_16 = CONVERT_TO_SHORTPTR(dst);
cfl_load_dc_pred_hbd(xd->cfl.dc_pred_cache[pred_plane], dst_16, dst_stride,
width, height);
@@ -196,7 +196,7 @@
cfl_idx_to_alpha(mbmi->cfl_alpha_idx, mbmi->cfl_alpha_signs, plane - 1);
assert((tx_size_high[tx_size] - 1) * CFL_BUF_LINE + tx_size_wide[tx_size] <=
CFL_BUF_SQUARE);
- if (get_bitdepth_data_path_index(xd)) {
+ if (is_cur_buf_hbd(xd)) {
uint16_t *dst_16 = CONVERT_TO_SHORTPTR(dst);
get_predict_hbd_fn(tx_size)(cfl->ac_buf_q3, dst_16, dst_stride, alpha_q3,
xd->bd);
@@ -388,8 +388,7 @@
assert(!((row & 1) && tx_size_high[tx_size] != 4));
sub8x8_adjust_offset(cfl, &row, &col);
}
- cfl_store(cfl, dst, pd->dst.stride, row, col, tx_size,
- get_bitdepth_data_path_index(xd));
+ cfl_store(cfl, dst, pd->dst.stride, row, col, tx_size, is_cur_buf_hbd(xd));
}
void cfl_store_block(MACROBLOCKD *const xd, BLOCK_SIZE bsize, TX_SIZE tx_size) {
@@ -405,5 +404,5 @@
const int height = max_intra_block_height(xd, bsize, AOM_PLANE_Y, tx_size);
tx_size = get_tx_size(width, height);
cfl_store(cfl, pd->dst.buf, pd->dst.stride, row, col, tx_size,
- get_bitdepth_data_path_index(xd));
+ is_cur_buf_hbd(xd));
}
diff --git a/av1/common/idct.c b/av1/common/idct.c
index 55925a5..bff438f 100644
--- a/av1/common/idct.c
+++ b/av1/common/idct.c
@@ -204,7 +204,7 @@
txfm_param->eob = eob;
txfm_param->lossless = xd->lossless[xd->mi[0]->segment_id];
txfm_param->bd = xd->bd;
- txfm_param->is_hbd = get_bitdepth_data_path_index(xd);
+ txfm_param->is_hbd = is_cur_buf_hbd(xd);
txfm_param->tx_set_type = av1_get_ext_tx_set_type(
txfm_param->tx_size, is_inter_block(xd->mi[0]), reduced_tx_set);
}
diff --git a/av1/encoder/encodemb.c b/av1/encoder/encodemb.c
index 39dcf20..dbb9c74 100644
--- a/av1/encoder/encodemb.c
+++ b/av1/encoder/encodemb.c
@@ -171,7 +171,7 @@
txfm_param.tx_size, is_inter_block(mbmi), cm->reduced_tx_set_used);
txfm_param.bd = xd->bd;
- txfm_param.is_hbd = get_bitdepth_data_path_index(xd);
+ txfm_param.is_hbd = is_cur_buf_hbd(xd);
av1_fwd_txfm(src_diff, coeff, diff_stride, &txfm_param);
@@ -431,7 +431,7 @@
if (p->eobs[block] > 0) {
txfm_param.bd = xd->bd;
- txfm_param.is_hbd = get_bitdepth_data_path_index(xd);
+ txfm_param.is_hbd = is_cur_buf_hbd(xd);
txfm_param.tx_type = DCT_DCT;
txfm_param.tx_size = tx_size;
txfm_param.eob = p->eobs[block];
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 3acc50b..1296ca7 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -5702,7 +5702,7 @@
param.tx_type = DCT_DCT;
param.tx_size = max_tx_size;
param.bd = xd->bd;
- param.is_hbd = get_bitdepth_data_path_index(xd);
+ param.is_hbd = is_cur_buf_hbd(xd);
param.lossless = 0;
param.tx_set_type = av1_get_ext_tx_set_type(
param.tx_size, is_inter_block(xd->mi[0]), reduced_tx_set);
@@ -7724,7 +7724,7 @@
const int bh = block_size_high[bsize];
DECLARE_ALIGNED(32, int16_t, residual1[MAX_SB_SQUARE]); // src - pred1
DECLARE_ALIGNED(32, int16_t, diff10[MAX_SB_SQUARE]); // pred1 - pred0
- if (get_bitdepth_data_path_index(xd)) {
+ if (is_cur_buf_hbd(xd)) {
aom_highbd_subtract_block(bh, bw, residual1, bw, src->buf, src->stride,
CONVERT_TO_BYTEPTR(p1), bw, xd->bd);
aom_highbd_subtract_block(bh, bw, diff10, bw, CONVERT_TO_BYTEPTR(p1), bw,
@@ -7803,7 +7803,7 @@
av1_build_inter_predictors_for_planes_single_buf(
xd, bsize, 0, 0, mi_row, mi_col, 1, preds1, strides, can_use_previous);
const struct buf_2d *const src = &x->plane[0].src;
- if (get_bitdepth_data_path_index(xd)) {
+ if (is_cur_buf_hbd(xd)) {
aom_highbd_subtract_block(bh, bw, residual1, bw, src->buf, src->stride,
CONVERT_TO_BYTEPTR(*preds1), bw, xd->bd);
aom_highbd_subtract_block(bh, bw, diff10, bw, CONVERT_TO_BYTEPTR(*preds1),