summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2023-03-24 18:04:19 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2023-03-24 18:04:19 +0000
commit5b05f6f3a01d7e25d0573b482245a2b8b0eb09bd (patch)
tree0b98bf5637db1fce414beebe0376f9333cceede4
parent5817bce969f2845493f22f85ca5f19c70adc1c2f (diff)
parentbad39ce7a3b766ea44fcd1637610986a4a672999 (diff)
downloadlibvpx-5b05f6f3a01d7e25d0573b482245a2b8b0eb09bd.tar
libvpx-5b05f6f3a01d7e25d0573b482245a2b8b0eb09bd.tar.gz
libvpx-5b05f6f3a01d7e25d0573b482245a2b8b0eb09bd.tar.bz2
libvpx-5b05f6f3a01d7e25d0573b482245a2b8b0eb09bd.zip
Merge changes Ide512788,I77c7abae into main
* changes: vp9_scan.h: rename scan_order struct to ScanOrder vp9_encodeframe.c: clear -Wshadow warnings
-rw-r--r--test/vp9_quantize_test.cc12
-rw-r--r--vp9/common/vp9_scan.c4
-rw-r--r--vp9/common/vp9_scan.h12
-rw-r--r--vp9/decoder/vp9_decodeframe.c16
-rw-r--r--vp9/decoder/vp9_detokenize.c5
-rw-r--r--vp9/decoder/vp9_detokenize.h5
-rw-r--r--vp9/encoder/vp9_encodeframe.c45
-rw-r--r--vp9/encoder/vp9_encodemb.c8
-rw-r--r--vp9/encoder/vp9_pickmode.c2
-rw-r--r--vp9/encoder/vp9_rdopt.c12
-rw-r--r--vp9/encoder/vp9_tokenize.c2
-rw-r--r--vp9/encoder/vp9_tpl_model.c2
-rw-r--r--vpx_dsp/arm/highbd_quantize_neon.c2
-rw-r--r--vpx_dsp/arm/quantize_neon.c2
-rw-r--r--vpx_dsp/quantize.c4
-rw-r--r--vpx_dsp/vpx_dsp_rtcd_defs.pl6
-rw-r--r--vpx_dsp/x86/highbd_quantize_intrin_avx2.c2
-rw-r--r--vpx_dsp/x86/highbd_quantize_intrin_sse2.c2
-rw-r--r--vpx_dsp/x86/quantize_avx.c2
-rw-r--r--vpx_dsp/x86/quantize_avx2.c2
-rw-r--r--vpx_dsp/x86/quantize_ssse3.c2
21 files changed, 72 insertions, 77 deletions
diff --git a/test/vp9_quantize_test.cc b/test/vp9_quantize_test.cc
index e9b17d5eb..84a5a58e4 100644
--- a/test/vp9_quantize_test.cc
+++ b/test/vp9_quantize_test.cc
@@ -42,7 +42,7 @@ typedef void (*QuantizeFunc)(const tran_low_t *coeff, intptr_t count,
const macroblock_plane *const mb_plane,
tran_low_t *qcoeff, tran_low_t *dqcoeff,
const int16_t *dequant, uint16_t *eob,
- const struct scan_order *const scan_order);
+ const struct ScanOrder *const scan_order);
typedef std::tuple<QuantizeFunc, QuantizeFunc, vpx_bit_depth_t,
int /*max_size*/, bool /*is_fp*/>
QuantizeParam;
@@ -60,7 +60,7 @@ template <QuantizeBaseFunc fn>
void QuantWrapper(const tran_low_t *coeff, intptr_t count,
const macroblock_plane *const mb_plane, tran_low_t *qcoeff,
tran_low_t *dqcoeff, const int16_t *dequant, uint16_t *eob,
- const struct scan_order *const scan_order) {
+ const struct ScanOrder *const scan_order) {
fn(coeff, count, mb_plane->zbin, mb_plane->round, mb_plane->quant,
mb_plane->quant_shift, qcoeff, dqcoeff, dequant, eob, scan_order->scan,
scan_order->iscan);
@@ -71,14 +71,14 @@ typedef void (*Quantize32x32Func)(const tran_low_t *coeff,
const macroblock_plane *const mb_plane,
tran_low_t *qcoeff, tran_low_t *dqcoeff,
const int16_t *dequant, uint16_t *eob,
- const struct scan_order *const scan_order);
+ const struct ScanOrder *const scan_order);
template <Quantize32x32Func fn>
void Quant32x32Wrapper(const tran_low_t *coeff, intptr_t count,
const macroblock_plane *const mb_plane,
tran_low_t *qcoeff, tran_low_t *dqcoeff,
const int16_t *dequant, uint16_t *eob,
- const struct scan_order *const scan_order) {
+ const struct ScanOrder *const scan_order) {
(void)count;
fn(coeff, mb_plane, qcoeff, dqcoeff, dequant, eob, scan_order);
}
@@ -94,7 +94,7 @@ template <QuantizeFPFunc fn>
void QuantFPWrapper(const tran_low_t *coeff, intptr_t count,
const macroblock_plane *const mb_plane, tran_low_t *qcoeff,
tran_low_t *dqcoeff, const int16_t *dequant, uint16_t *eob,
- const struct scan_order *const scan_order) {
+ const struct ScanOrder *const scan_order) {
fn(coeff, count, mb_plane->round_fp, mb_plane->quant_fp, qcoeff, dqcoeff,
dequant, eob, scan_order->scan, scan_order->iscan);
}
@@ -213,7 +213,7 @@ class VP9QuantizeBase : public AbstractBench {
int16_t *r_ptr_;
int16_t *q_ptr_;
int count_;
- const scan_order *scan_;
+ const ScanOrder *scan_;
uint16_t eob_;
};
diff --git a/vp9/common/vp9_scan.c b/vp9/common/vp9_scan.c
index 8bea61dea..adacb7ef9 100644
--- a/vp9/common/vp9_scan.c
+++ b/vp9/common/vp9_scan.c
@@ -688,14 +688,14 @@ DECLARE_ALIGNED(16, static const int16_t, vp9_default_iscan_32x32[1024]) = {
968, 974, 989, 997, 1003, 1007, 1015, 1019, 1022, 1024,
};
-const scan_order vp9_default_scan_orders[TX_SIZES] = {
+const ScanOrder vp9_default_scan_orders[TX_SIZES] = {
{ default_scan_4x4, vp9_default_iscan_4x4, default_scan_4x4_neighbors },
{ default_scan_8x8, vp9_default_iscan_8x8, default_scan_8x8_neighbors },
{ default_scan_16x16, vp9_default_iscan_16x16, default_scan_16x16_neighbors },
{ default_scan_32x32, vp9_default_iscan_32x32, default_scan_32x32_neighbors },
};
-const scan_order vp9_scan_orders[TX_SIZES][TX_TYPES] = {
+const ScanOrder vp9_scan_orders[TX_SIZES][TX_TYPES] = {
{ // TX_4X4
{ default_scan_4x4, vp9_default_iscan_4x4, default_scan_4x4_neighbors },
{ row_scan_4x4, vp9_row_iscan_4x4, row_scan_4x4_neighbors },
diff --git a/vp9/common/vp9_scan.h b/vp9/common/vp9_scan.h
index efa0e2336..3d1dcc66d 100644
--- a/vp9/common/vp9_scan.h
+++ b/vp9/common/vp9_scan.h
@@ -23,14 +23,14 @@ extern "C" {
#define MAX_NEIGHBORS 2
-typedef struct scan_order {
+typedef struct ScanOrder {
const int16_t *scan;
const int16_t *iscan;
const int16_t *neighbors;
-} scan_order;
+} ScanOrder;
-extern const scan_order vp9_default_scan_orders[TX_SIZES];
-extern const scan_order vp9_scan_orders[TX_SIZES][TX_TYPES];
+extern const ScanOrder vp9_default_scan_orders[TX_SIZES];
+extern const ScanOrder vp9_scan_orders[TX_SIZES][TX_TYPES];
static INLINE int get_coef_context(const int16_t *neighbors,
const uint8_t *token_cache, int c) {
@@ -39,8 +39,8 @@ static INLINE int get_coef_context(const int16_t *neighbors,
1;
}
-static INLINE const scan_order *get_scan(const MACROBLOCKD *xd, TX_SIZE tx_size,
- PLANE_TYPE type, int block_idx) {
+static INLINE const ScanOrder *get_scan(const MACROBLOCKD *xd, TX_SIZE tx_size,
+ PLANE_TYPE type, int block_idx) {
const MODE_INFO *const mi = xd->mi[0];
if (is_inter_block(mi) || type != PLANE_TYPE_Y || xd->lossless) {
diff --git a/vp9/decoder/vp9_decodeframe.c b/vp9/decoder/vp9_decodeframe.c
index 2a27e6fdb..6eae41fcf 100644
--- a/vp9/decoder/vp9_decodeframe.c
+++ b/vp9/decoder/vp9_decodeframe.c
@@ -323,9 +323,9 @@ static void predict_and_reconstruct_intra_block(TileWorkerData *twd,
if (!mi->skip) {
const TX_TYPE tx_type =
(plane || xd->lossless) ? DCT_DCT : intra_mode_to_tx_type_lookup[mode];
- const scan_order *sc = (plane || xd->lossless)
- ? &vp9_default_scan_orders[tx_size]
- : &vp9_scan_orders[tx_size][tx_type];
+ const ScanOrder *sc = (plane || xd->lossless)
+ ? &vp9_default_scan_orders[tx_size]
+ : &vp9_scan_orders[tx_size][tx_type];
const int eob = vp9_decode_block_tokens(twd, plane, sc, col, row, tx_size,
mi->segment_id);
if (eob > 0) {
@@ -348,9 +348,9 @@ static void parse_intra_block_row_mt(TileWorkerData *twd, MODE_INFO *const mi,
struct macroblockd_plane *const pd = &xd->plane[plane];
const TX_TYPE tx_type =
(plane || xd->lossless) ? DCT_DCT : intra_mode_to_tx_type_lookup[mode];
- const scan_order *sc = (plane || xd->lossless)
- ? &vp9_default_scan_orders[tx_size]
- : &vp9_scan_orders[tx_size][tx_type];
+ const ScanOrder *sc = (plane || xd->lossless)
+ ? &vp9_default_scan_orders[tx_size]
+ : &vp9_scan_orders[tx_size][tx_type];
*pd->eob = vp9_decode_block_tokens(twd, plane, sc, col, row, tx_size,
mi->segment_id);
/* Keep the alignment to 16 */
@@ -393,7 +393,7 @@ static int reconstruct_inter_block(TileWorkerData *twd, MODE_INFO *const mi,
int mi_row, int mi_col) {
MACROBLOCKD *const xd = &twd->xd;
struct macroblockd_plane *const pd = &xd->plane[plane];
- const scan_order *sc = &vp9_default_scan_orders[tx_size];
+ const ScanOrder *sc = &vp9_default_scan_orders[tx_size];
const int eob = vp9_decode_block_tokens(twd, plane, sc, col, row, tx_size,
mi->segment_id);
uint8_t *dst = &pd->dst.buf[4 * row * pd->dst.stride + 4 * col];
@@ -423,7 +423,7 @@ static int parse_inter_block_row_mt(TileWorkerData *twd, MODE_INFO *const mi,
TX_SIZE tx_size) {
MACROBLOCKD *const xd = &twd->xd;
struct macroblockd_plane *const pd = &xd->plane[plane];
- const scan_order *sc = &vp9_default_scan_orders[tx_size];
+ const ScanOrder *sc = &vp9_default_scan_orders[tx_size];
const int eob = vp9_decode_block_tokens(twd, plane, sc, col, row, tx_size,
mi->segment_id);
diff --git a/vp9/decoder/vp9_detokenize.c b/vp9/decoder/vp9_detokenize.c
index 3ed1bd6ff..d957dc34e 100644
--- a/vp9/decoder/vp9_detokenize.c
+++ b/vp9/decoder/vp9_detokenize.c
@@ -272,9 +272,8 @@ static void get_ctx_shift(MACROBLOCKD *xd, int *ctx_shift_a, int *ctx_shift_l,
}
}
-int vp9_decode_block_tokens(TileWorkerData *twd, int plane,
- const scan_order *sc, int x, int y, TX_SIZE tx_size,
- int seg_id) {
+int vp9_decode_block_tokens(TileWorkerData *twd, int plane, const ScanOrder *sc,
+ int x, int y, TX_SIZE tx_size, int seg_id) {
vpx_reader *r = &twd->bit_reader;
MACROBLOCKD *xd = &twd->xd;
struct macroblockd_plane *const pd = &xd->plane[plane];
diff --git a/vp9/decoder/vp9_detokenize.h b/vp9/decoder/vp9_detokenize.h
index a32052fff..a8e47021b 100644
--- a/vp9/decoder/vp9_detokenize.h
+++ b/vp9/decoder/vp9_detokenize.h
@@ -19,9 +19,8 @@
extern "C" {
#endif
-int vp9_decode_block_tokens(TileWorkerData *twd, int plane,
- const scan_order *sc, int x, int y, TX_SIZE tx_size,
- int seg_id);
+int vp9_decode_block_tokens(TileWorkerData *twd, int plane, const ScanOrder *sc,
+ int x, int y, TX_SIZE tx_size, int seg_id);
#ifdef __cplusplus
} // extern "C"
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 1d593cfc0..26e419e3d 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -349,17 +349,17 @@ typedef struct {
int32_t sum_error;
int log2_count;
int variance;
-} var;
+} Var;
typedef struct {
- var none;
- var horz[2];
- var vert[2];
+ Var none;
+ Var horz[2];
+ Var vert[2];
} partition_variance;
typedef struct {
partition_variance part_variances;
- var split[4];
+ Var split[4];
} v4x4;
typedef struct {
@@ -384,7 +384,7 @@ typedef struct {
typedef struct {
partition_variance *part_variances;
- var *split[4];
+ Var *split[4];
} variance_node;
typedef enum {
@@ -436,13 +436,13 @@ static void tree_to_node(void *data, BLOCK_SIZE bsize, variance_node *node) {
}
// Set variance values given sum square error, sum error, count.
-static void fill_variance(uint32_t s2, int32_t s, int c, var *v) {
+static void fill_variance(uint32_t s2, int32_t s, int c, Var *v) {
v->sum_square_error = s2;
v->sum_error = s;
v->log2_count = c;
}
-static void get_variance(var *v) {
+static void get_variance(Var *v) {
v->variance =
(int)(256 * (v->sum_square_error -
(uint32_t)(((int64_t)v->sum_error * v->sum_error) >>
@@ -450,7 +450,7 @@ static void get_variance(var *v) {
v->log2_count);
}
-static void sum_2_variances(const var *a, const var *b, var *r) {
+static void sum_2_variances(const Var *a, const Var *b, Var *r) {
assert(a->log2_count == b->log2_count);
fill_variance(a->sum_square_error + b->sum_square_error,
a->sum_error + b->sum_error, a->log2_count + 1, r);
@@ -1863,8 +1863,8 @@ static void update_state(VP9_COMP *cpi, ThreadData *td, PICK_MODE_CONTEXT *ctx,
vp9_update_mv_count(td);
if (cm->interp_filter == SWITCHABLE) {
- const int ctx = get_pred_context_switchable_interp(xd);
- ++td->counts->switchable_interp[ctx][xdmi->interp_filter];
+ const int ctx_interp = get_pred_context_switchable_interp(xd);
+ ++td->counts->switchable_interp[ctx_interp][xdmi->interp_filter];
}
}
@@ -2748,10 +2748,10 @@ static void rd_use_partition(VP9_COMP *cpi, ThreadData *td,
if (last_part_rdc.rate != INT_MAX && bsize >= BLOCK_8X8 &&
mi_row + (mi_step >> 1) < cm->mi_rows) {
RD_COST tmp_rdc;
- PICK_MODE_CONTEXT *ctx = &pc_tree->horizontal[0];
+ PICK_MODE_CONTEXT *hctx = &pc_tree->horizontal[0];
vp9_rd_cost_init(&tmp_rdc);
- update_state(cpi, td, ctx, mi_row, mi_col, subsize, 0);
- encode_superblock(cpi, td, tp, 0, mi_row, mi_col, subsize, ctx);
+ update_state(cpi, td, hctx, mi_row, mi_col, subsize, 0);
+ encode_superblock(cpi, td, tp, 0, mi_row, mi_col, subsize, hctx);
pc_tree->horizontal[1].skip_ref_frame_mask = 0;
rd_pick_sb_modes(cpi, tile_data, x, mi_row + (mi_step >> 1), mi_col,
&tmp_rdc, subsize, &pc_tree->horizontal[1], INT_MAX,
@@ -2772,10 +2772,10 @@ static void rd_use_partition(VP9_COMP *cpi, ThreadData *td,
if (last_part_rdc.rate != INT_MAX && bsize >= BLOCK_8X8 &&
mi_col + (mi_step >> 1) < cm->mi_cols) {
RD_COST tmp_rdc;
- PICK_MODE_CONTEXT *ctx = &pc_tree->vertical[0];
+ PICK_MODE_CONTEXT *vctx = &pc_tree->vertical[0];
vp9_rd_cost_init(&tmp_rdc);
- update_state(cpi, td, ctx, mi_row, mi_col, subsize, 0);
- encode_superblock(cpi, td, tp, 0, mi_row, mi_col, subsize, ctx);
+ update_state(cpi, td, vctx, mi_row, mi_col, subsize, 0);
+ encode_superblock(cpi, td, tp, 0, mi_row, mi_col, subsize, vctx);
pc_tree->vertical[bsize > BLOCK_8X8].skip_ref_frame_mask = 0;
rd_pick_sb_modes(
cpi, tile_data, x, mi_row, mi_col + (mi_step >> 1), &tmp_rdc,
@@ -2847,8 +2847,6 @@ static void rd_use_partition(VP9_COMP *cpi, ThreadData *td,
int x_idx = (i & 1) * (mi_step >> 1);
int y_idx = (i >> 1) * (mi_step >> 1);
RD_COST tmp_rdc;
- ENTROPY_CONTEXT l[16 * MAX_MB_PLANE], a[16 * MAX_MB_PLANE];
- PARTITION_CONTEXT sl[8], sa[8];
if ((mi_row + y_idx >= cm->mi_rows) || (mi_col + x_idx >= cm->mi_cols))
continue;
@@ -3479,8 +3477,8 @@ static void ml_predict_var_rd_paritioning(const VP9_COMP *const cpi,
int mi_col, int *none, int *split) {
const VP9_COMMON *const cm = &cpi->common;
const NN_CONFIG *nn_config = NULL;
+ const MACROBLOCKD *const xd = &x->e_mbd;
#if CONFIG_VP9_HIGHBITDEPTH
- MACROBLOCKD *xd = &x->e_mbd;
DECLARE_ALIGNED(16, uint8_t, pred_buffer[64 * 64 * 2]);
uint8_t *const pred_buf = (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH)
? (CONVERT_TO_BYTEPTR(pred_buffer))
@@ -3563,7 +3561,6 @@ static void ml_predict_var_rd_paritioning(const VP9_COMP *const cpi,
const unsigned int var =
cpi->fn_ptr[bsize].vf(src, src_stride, pred, pred_stride, &sse);
const float factor = (var == 0) ? 1.0f : (1.0f / (float)var);
- const MACROBLOCKD *const xd = &x->e_mbd;
const int has_above = !!xd->above_mi;
const int has_left = !!xd->left_mi;
const BLOCK_SIZE above_bsize = has_above ? xd->above_mi->sb_type : bsize;
@@ -4348,9 +4345,9 @@ static int rd_pick_partition(VP9_COMP *cpi, ThreadData *td,
if (sum_rdc.rdcost < best_rdc.rdcost && mi_row + mi_step < cm->mi_rows &&
bsize > BLOCK_8X8) {
- PICK_MODE_CONTEXT *ctx = &pc_tree->horizontal[0];
- update_state(cpi, td, ctx, mi_row, mi_col, subsize, 0);
- encode_superblock(cpi, td, tp, 0, mi_row, mi_col, subsize, ctx);
+ PICK_MODE_CONTEXT *hctx = &pc_tree->horizontal[0];
+ update_state(cpi, td, hctx, mi_row, mi_col, subsize, 0);
+ encode_superblock(cpi, td, tp, 0, mi_row, mi_col, subsize, hctx);
if (cpi->sf.adaptive_pred_interp_filter && bsize == BLOCK_8X8 &&
partition_none_allowed)
pc_tree->horizontal[1].pred_interp_filter = pred_interp_filter;
diff --git a/vp9/encoder/vp9_encodemb.c b/vp9/encoder/vp9_encodemb.c
index a81a753ae..946a1c3ee 100644
--- a/vp9/encoder/vp9_encodemb.c
+++ b/vp9/encoder/vp9_encodemb.c
@@ -79,7 +79,7 @@ int vp9_optimize_b(MACROBLOCK *mb, int plane, int block, TX_SIZE tx_size,
const int shift = (tx_size == TX_32X32);
const int16_t *const dequant_ptr = pd->dequant;
const uint8_t *const band_translate = get_band_translate(tx_size);
- const scan_order *const so = get_scan(xd, tx_size, plane_type, block);
+ const ScanOrder *const so = get_scan(xd, tx_size, plane_type, block);
const int16_t *const scan = so->scan;
const int16_t *const nb = so->neighbors;
const MODE_INFO *mbmi = xd->mi[0];
@@ -351,7 +351,7 @@ void vp9_xform_quant_fp(MACROBLOCK *x, int plane, int block, int row, int col,
MACROBLOCKD *const xd = &x->e_mbd;
const struct macroblock_plane *const p = &x->plane[plane];
const struct macroblockd_plane *const pd = &xd->plane[plane];
- const scan_order *const scan_order = &vp9_default_scan_orders[tx_size];
+ const ScanOrder *const scan_order = &vp9_default_scan_orders[tx_size];
tran_low_t *const coeff = BLOCK_OFFSET(p->coeff, block);
tran_low_t *const qcoeff = BLOCK_OFFSET(p->qcoeff, block);
tran_low_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
@@ -496,7 +496,7 @@ void vp9_xform_quant(MACROBLOCK *x, int plane, int block, int row, int col,
MACROBLOCKD *const xd = &x->e_mbd;
const struct macroblock_plane *const p = &x->plane[plane];
const struct macroblockd_plane *const pd = &xd->plane[plane];
- const scan_order *const scan_order = &vp9_default_scan_orders[tx_size];
+ const ScanOrder *const scan_order = &vp9_default_scan_orders[tx_size];
tran_low_t *const coeff = BLOCK_OFFSET(p->coeff, block);
tran_low_t *const qcoeff = BLOCK_OFFSET(p->qcoeff, block);
tran_low_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
@@ -816,7 +816,7 @@ void vp9_encode_block_intra(int plane, int block, int row, int col,
tran_low_t *coeff = BLOCK_OFFSET(p->coeff, block);
tran_low_t *qcoeff = BLOCK_OFFSET(p->qcoeff, block);
tran_low_t *dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
- const scan_order *scan_order;
+ const ScanOrder *scan_order;
TX_TYPE tx_type = DCT_DCT;
PREDICTION_MODE mode;
const int bwl = b_width_log2_lookup[plane_bsize];
diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c
index 579b466ca..c19d57d15 100644
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -768,7 +768,7 @@ static void block_yrd(VP9_COMP *cpi, MACROBLOCK *x, RD_COST *this_rdc,
for (r = 0; r < max_blocks_high; r += block_step) {
for (c = 0; c < num_4x4_w; c += block_step) {
if (c < max_blocks_wide) {
- const scan_order *const scan_order = &vp9_default_scan_orders[tx_size];
+ const ScanOrder *const scan_order = &vp9_default_scan_orders[tx_size];
tran_low_t *const coeff = BLOCK_OFFSET(p->coeff, block);
tran_low_t *const qcoeff = BLOCK_OFFSET(p->qcoeff, block);
tran_low_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index 7557b536c..76d545cd9 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -77,7 +77,7 @@ struct rdcost_block_args {
int64_t best_rd;
int exit_early;
int use_fast_coef_costing;
- const scan_order *so;
+ const ScanOrder *so;
uint8_t skippable;
struct buf_2d *this_recon;
};
@@ -1129,7 +1129,7 @@ static int64_t rd_pick_intra4x4block(VP9_COMP *cpi, MACROBLOCK *x, int row,
vpx_highbd_subtract_block(4, 4, src_diff, 8, src, src_stride, dst,
dst_stride, xd->bd);
if (xd->lossless) {
- const scan_order *so = &vp9_default_scan_orders[TX_4X4];
+ const ScanOrder *so = &vp9_default_scan_orders[TX_4X4];
const int coeff_ctx =
combine_entropy_contexts(tempa[idx], templ[idy]);
vp9_highbd_fwht4x4(src_diff, coeff, 8);
@@ -1146,7 +1146,7 @@ static int64_t rd_pick_intra4x4block(VP9_COMP *cpi, MACROBLOCK *x, int row,
} else {
int64_t unused;
const TX_TYPE tx_type = get_tx_type_4x4(PLANE_TYPE_Y, xd, block);
- const scan_order *so = &vp9_scan_orders[TX_4X4][tx_type];
+ const ScanOrder *so = &vp9_scan_orders[TX_4X4][tx_type];
const int coeff_ctx =
combine_entropy_contexts(tempa[idx], templ[idy]);
if (tx_type == DCT_DCT)
@@ -1236,7 +1236,7 @@ static int64_t rd_pick_intra4x4block(VP9_COMP *cpi, MACROBLOCK *x, int row,
vpx_subtract_block(4, 4, src_diff, 8, src, src_stride, dst, dst_stride);
if (xd->lossless) {
- const scan_order *so = &vp9_default_scan_orders[TX_4X4];
+ const ScanOrder *so = &vp9_default_scan_orders[TX_4X4];
const int coeff_ctx =
combine_entropy_contexts(tempa[idx], templ[idy]);
vp9_fwht4x4(src_diff, coeff, 8);
@@ -1253,7 +1253,7 @@ static int64_t rd_pick_intra4x4block(VP9_COMP *cpi, MACROBLOCK *x, int row,
} else {
int64_t unused;
const TX_TYPE tx_type = get_tx_type_4x4(PLANE_TYPE_Y, xd, block);
- const scan_order *so = &vp9_scan_orders[TX_4X4][tx_type];
+ const ScanOrder *so = &vp9_scan_orders[TX_4X4][tx_type];
const int coeff_ctx =
combine_entropy_contexts(tempa[idx], templ[idy]);
vp9_fht4x4(src_diff, coeff, 8, tx_type);
@@ -1632,7 +1632,7 @@ static int64_t encode_inter_mb_segment(VP9_COMP *cpi, MACROBLOCK *x,
&pd->dst.buf[vp9_raster_block_offset(BLOCK_8X8, i, pd->dst.stride)];
int64_t thisdistortion = 0, thissse = 0;
int thisrate = 0, ref;
- const scan_order *so = &vp9_default_scan_orders[TX_4X4];
+ const ScanOrder *so = &vp9_default_scan_orders[TX_4X4];
const int is_compound = has_second_ref(mi);
const InterpKernel *kernel = vp9_filter_kernels[mi->interp_filter];
diff --git a/vp9/encoder/vp9_tokenize.c b/vp9/encoder/vp9_tokenize.c
index 814d769be..6c6c04493 100644
--- a/vp9/encoder/vp9_tokenize.c
+++ b/vp9/encoder/vp9_tokenize.c
@@ -364,7 +364,7 @@ static void tokenize_b(int plane, int block, int row, int col,
const PLANE_TYPE type = get_plane_type(plane);
const tran_low_t *qcoeff = BLOCK_OFFSET(p->qcoeff, block);
const int16_t *scan, *nb;
- const scan_order *so;
+ const ScanOrder *so;
const int ref = is_inter_block(mi);
unsigned int(*const counts)[COEFF_CONTEXTS][ENTROPY_TOKENS] =
td->rd_counts.coef_counts[tx_size][type][ref];
diff --git a/vp9/encoder/vp9_tpl_model.c b/vp9/encoder/vp9_tpl_model.c
index b0c735167..53ef35698 100644
--- a/vp9/encoder/vp9_tpl_model.c
+++ b/vp9/encoder/vp9_tpl_model.c
@@ -434,7 +434,7 @@ static void get_quantize_error(MACROBLOCK *x, int plane, tran_low_t *coeff,
MACROBLOCKD *const xd = &x->e_mbd;
const struct macroblock_plane *const p = &x->plane[plane];
const struct macroblockd_plane *const pd = &xd->plane[plane];
- const scan_order *const scan_order = &vp9_default_scan_orders[tx_size];
+ const ScanOrder *const scan_order = &vp9_default_scan_orders[tx_size];
uint16_t eob;
int pix_num = 1 << num_pels_log2_lookup[txsize_to_bsize[tx_size]];
const int shift = tx_size == TX_32X32 ? 0 : 2;
diff --git a/vpx_dsp/arm/highbd_quantize_neon.c b/vpx_dsp/arm/highbd_quantize_neon.c
index 5a40f1284..526447acf 100644
--- a/vpx_dsp/arm/highbd_quantize_neon.c
+++ b/vpx_dsp/arm/highbd_quantize_neon.c
@@ -228,7 +228,7 @@ static VPX_FORCE_INLINE int16x8_t highbd_quantize_b_32x32_neon(
void vpx_highbd_quantize_b_32x32_neon(
const tran_low_t *coeff_ptr, const struct macroblock_plane *const mb_plane,
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr,
- uint16_t *eob_ptr, const struct scan_order *const scan_order) {
+ uint16_t *eob_ptr, const struct ScanOrder *const scan_order) {
const int16x8_t neg_one = vdupq_n_s16(-1);
uint16x8_t eob_max;
int i;
diff --git a/vpx_dsp/arm/quantize_neon.c b/vpx_dsp/arm/quantize_neon.c
index 84b6d8c79..cc8f62374 100644
--- a/vpx_dsp/arm/quantize_neon.c
+++ b/vpx_dsp/arm/quantize_neon.c
@@ -219,7 +219,7 @@ void vpx_quantize_b_32x32_neon(const tran_low_t *coeff_ptr,
const struct macroblock_plane *const mb_plane,
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
const int16_t *dequant_ptr, uint16_t *eob_ptr,
- const struct scan_order *const scan_order) {
+ const struct ScanOrder *const scan_order) {
const int16x8_t neg_one = vdupq_n_s16(-1);
uint16x8_t eob_max;
int i;
diff --git a/vpx_dsp/quantize.c b/vpx_dsp/quantize.c
index f51bf253e..d44ced20d 100644
--- a/vpx_dsp/quantize.c
+++ b/vpx_dsp/quantize.c
@@ -214,7 +214,7 @@ void vpx_quantize_b_32x32_c(const tran_low_t *coeff_ptr,
const struct macroblock_plane *const mb_plane,
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
const int16_t *dequant_ptr, uint16_t *eob_ptr,
- const struct scan_order *const scan_order) {
+ const struct ScanOrder *const scan_order) {
const int n_coeffs = 32 * 32;
const int zbins[2] = { ROUND_POWER_OF_TWO(mb_plane->zbin[0], 1),
ROUND_POWER_OF_TWO(mb_plane->zbin[1], 1) };
@@ -275,7 +275,7 @@ void vpx_quantize_b_32x32_c(const tran_low_t *coeff_ptr,
void vpx_highbd_quantize_b_32x32_c(
const tran_low_t *coeff_ptr, const struct macroblock_plane *const mb_plane,
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr,
- uint16_t *eob_ptr, const struct scan_order *const scan_order) {
+ uint16_t *eob_ptr, const struct ScanOrder *const scan_order) {
const intptr_t n_coeffs = 32 * 32;
const int zbins[2] = { ROUND_POWER_OF_TWO(mb_plane->zbin[0], 1),
ROUND_POWER_OF_TWO(mb_plane->zbin[1], 1) };
diff --git a/vpx_dsp/vpx_dsp_rtcd_defs.pl b/vpx_dsp/vpx_dsp_rtcd_defs.pl
index 6637186f8..49bc9a630 100644
--- a/vpx_dsp/vpx_dsp_rtcd_defs.pl
+++ b/vpx_dsp/vpx_dsp_rtcd_defs.pl
@@ -19,7 +19,7 @@ print <<EOF
#include "vpx_dsp/vpx_filter.h"
#if CONFIG_VP9_ENCODER
struct macroblock_plane;
- struct scan_order;
+ struct ScanOrder;
#endif
EOF
@@ -725,14 +725,14 @@ if (vpx_config("CONFIG_VP9_ENCODER") eq "yes") {
add_proto qw/void vpx_quantize_b/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan";
specialize qw/vpx_quantize_b neon sse2 ssse3 avx avx2 vsx lsx/;
- add_proto qw/void vpx_quantize_b_32x32/, "const tran_low_t *coeff_ptr, const struct macroblock_plane * const mb_plane, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const struct scan_order *const scan_order";
+ add_proto qw/void vpx_quantize_b_32x32/, "const tran_low_t *coeff_ptr, const struct macroblock_plane * const mb_plane, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const struct ScanOrder *const scan_order";
specialize qw/vpx_quantize_b_32x32 neon ssse3 avx avx2 vsx lsx/;
if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
add_proto qw/void vpx_highbd_quantize_b/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan";
specialize qw/vpx_highbd_quantize_b neon sse2 avx2/;
- add_proto qw/void vpx_highbd_quantize_b_32x32/, "const tran_low_t *coeff_ptr, const struct macroblock_plane * const mb_plane, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const struct scan_order *const scan_order";
+ add_proto qw/void vpx_highbd_quantize_b_32x32/, "const tran_low_t *coeff_ptr, const struct macroblock_plane * const mb_plane, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const struct ScanOrder *const scan_order";
specialize qw/vpx_highbd_quantize_b_32x32 neon sse2 avx2/;
} # CONFIG_VP9_HIGHBITDEPTH
} # CONFIG_VP9_ENCODER
diff --git a/vpx_dsp/x86/highbd_quantize_intrin_avx2.c b/vpx_dsp/x86/highbd_quantize_intrin_avx2.c
index bfd7b2e23..fbebd7db1 100644
--- a/vpx_dsp/x86/highbd_quantize_intrin_avx2.c
+++ b/vpx_dsp/x86/highbd_quantize_intrin_avx2.c
@@ -226,7 +226,7 @@ static VPX_FORCE_INLINE void quantize_b_32x32(
void vpx_highbd_quantize_b_32x32_avx2(
const tran_low_t *coeff_ptr, const struct macroblock_plane *const mb_plane,
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr,
- uint16_t *eob_ptr, const struct scan_order *const scan_order) {
+ uint16_t *eob_ptr, const struct ScanOrder *const scan_order) {
const unsigned int step = 8;
intptr_t n_coeffs = 32 * 32;
const int16_t *iscan = scan_order->iscan;
diff --git a/vpx_dsp/x86/highbd_quantize_intrin_sse2.c b/vpx_dsp/x86/highbd_quantize_intrin_sse2.c
index 58d5a3a5f..a5d874f3b 100644
--- a/vpx_dsp/x86/highbd_quantize_intrin_sse2.c
+++ b/vpx_dsp/x86/highbd_quantize_intrin_sse2.c
@@ -97,7 +97,7 @@ void vpx_highbd_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t count,
void vpx_highbd_quantize_b_32x32_sse2(
const tran_low_t *coeff_ptr, const struct macroblock_plane *const mb_plane,
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr,
- uint16_t *eob_ptr, const struct scan_order *const scan_order) {
+ uint16_t *eob_ptr, const struct ScanOrder *const scan_order) {
__m128i zbins[2];
__m128i nzbins[2];
int idx = 0;
diff --git a/vpx_dsp/x86/quantize_avx.c b/vpx_dsp/x86/quantize_avx.c
index d05a937be..d289bf6eb 100644
--- a/vpx_dsp/x86/quantize_avx.c
+++ b/vpx_dsp/x86/quantize_avx.c
@@ -146,7 +146,7 @@ void vpx_quantize_b_32x32_avx(const tran_low_t *coeff_ptr,
const struct macroblock_plane *const mb_plane,
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
const int16_t *dequant_ptr, uint16_t *eob_ptr,
- const struct scan_order *const scan_order) {
+ const struct ScanOrder *const scan_order) {
const __m128i zero = _mm_setzero_si128();
const __m256i big_zero = _mm256_setzero_si256();
int index;
diff --git a/vpx_dsp/x86/quantize_avx2.c b/vpx_dsp/x86/quantize_avx2.c
index 1c82542ae..5421dcf0b 100644
--- a/vpx_dsp/x86/quantize_avx2.c
+++ b/vpx_dsp/x86/quantize_avx2.c
@@ -256,7 +256,7 @@ void vpx_quantize_b_32x32_avx2(const tran_low_t *coeff_ptr,
const struct macroblock_plane *const mb_plane,
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
const int16_t *dequant_ptr, uint16_t *eob_ptr,
- const struct scan_order *const scan_order) {
+ const struct ScanOrder *const scan_order) {
__m256i v_zbin, v_round, v_quant, v_dequant, v_quant_shift;
__m256i v_eobmax = _mm256_setzero_si256();
intptr_t count;
diff --git a/vpx_dsp/x86/quantize_ssse3.c b/vpx_dsp/x86/quantize_ssse3.c
index 6401b2865..556f4ca61 100644
--- a/vpx_dsp/x86/quantize_ssse3.c
+++ b/vpx_dsp/x86/quantize_ssse3.c
@@ -113,7 +113,7 @@ void vpx_quantize_b_32x32_ssse3(const tran_low_t *coeff_ptr,
const struct macroblock_plane *const mb_plane,
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
const int16_t *dequant_ptr, uint16_t *eob_ptr,
- const struct scan_order *const scan_order) {
+ const struct ScanOrder *const scan_order) {
const __m128i zero = _mm_setzero_si128();
int index;
const int16_t *iscan = scan_order->iscan;