Fix warnings reported by -Wshadow: Part1b: scan_order struct and variable
- Change struct name to all caps SCAN_ORDER to be locally consistent.
- Rename struct pointers to 'scan_order' instead of hard to read short
names 'so' and 'sc'.
Cherry-picked from aomedia/master: 30abc082
Change-Id: Ib9f0eefe28fa97d23d642b77d7dc8e5f8613177d
diff --git a/av1/common/scan.c b/av1/common/scan.c
index 3be4ed2..919fe8c 100644
--- a/av1/common/scan.c
+++ b/av1/common/scan.c
@@ -3799,7 +3799,7 @@
};
#endif // CONFIG_EXT_TX
-const scan_order av1_default_scan_orders[TX_SIZES] = {
+const SCAN_ORDER av1_default_scan_orders[TX_SIZES] = {
{ default_scan_4x4, av1_default_iscan_4x4, default_scan_4x4_neighbors },
{ default_scan_8x8, av1_default_iscan_8x8, default_scan_8x8_neighbors },
{ default_scan_16x16, av1_default_iscan_16x16, default_scan_16x16_neighbors },
@@ -3807,7 +3807,7 @@
};
#if CONFIG_EXT_TX
-const scan_order av1_intra_scan_orders[TX_SIZES][TX_TYPES] = {
+const SCAN_ORDER av1_intra_scan_orders[TX_SIZES][TX_TYPES] = {
{
// TX_4X4
{ default_scan_4x4, av1_default_iscan_4x4, default_scan_4x4_neighbors },
@@ -3894,7 +3894,7 @@
}
};
-const scan_order av1_inter_scan_orders[TX_SIZES_ALL][TX_TYPES] = {
+const SCAN_ORDER av1_inter_scan_orders[TX_SIZES_ALL][TX_TYPES] = {
{
// TX_4X4
{ default_scan_4x4, av1_default_iscan_4x4, default_scan_4x4_neighbors },
@@ -4135,7 +4135,7 @@
#else // CONFIG_EXT_TX
-const scan_order av1_intra_scan_orders[TX_SIZES][TX_TYPES] = {
+const SCAN_ORDER av1_intra_scan_orders[TX_SIZES][TX_TYPES] = {
{ // TX_4X4
{ default_scan_4x4, av1_default_iscan_4x4, default_scan_4x4_neighbors },
{ row_scan_4x4, av1_row_iscan_4x4, row_scan_4x4_neighbors },
diff --git a/av1/common/scan.h b/av1/common/scan.h
index d3032aa..c183ba9 100644
--- a/av1/common/scan.h
+++ b/av1/common/scan.h
@@ -28,10 +28,10 @@
const int16_t *scan;
const int16_t *iscan;
const int16_t *neighbors;
-} scan_order;
+} SCAN_ORDER;
-extern const scan_order av1_default_scan_orders[TX_SIZES];
-extern const scan_order av1_intra_scan_orders[TX_SIZES][TX_TYPES];
+extern const SCAN_ORDER av1_default_scan_orders[TX_SIZES];
+extern const SCAN_ORDER av1_intra_scan_orders[TX_SIZES][TX_TYPES];
static INLINE int get_coef_context(const int16_t *neighbors,
const uint8_t *token_cache, int c) {
@@ -40,21 +40,21 @@
1;
}
-static INLINE const scan_order *get_intra_scan(TX_SIZE tx_size,
+static INLINE const SCAN_ORDER *get_intra_scan(TX_SIZE tx_size,
TX_TYPE tx_type) {
return &av1_intra_scan_orders[tx_size][tx_type];
}
#if CONFIG_EXT_TX
-extern const scan_order av1_inter_scan_orders[TX_SIZES_ALL][TX_TYPES];
+extern const SCAN_ORDER av1_inter_scan_orders[TX_SIZES_ALL][TX_TYPES];
-static INLINE const scan_order *get_inter_scan(TX_SIZE tx_size,
+static INLINE const SCAN_ORDER *get_inter_scan(TX_SIZE tx_size,
TX_TYPE tx_type) {
return &av1_inter_scan_orders[tx_size][tx_type];
}
#endif // CONFIG_EXT_TX
-static INLINE const scan_order *get_scan(TX_SIZE tx_size, TX_TYPE tx_type,
+static INLINE const SCAN_ORDER *get_scan(TX_SIZE tx_size, TX_TYPE tx_type,
int is_inter) {
#if CONFIG_EXT_TX
return is_inter ? &av1_inter_scan_orders[tx_size][tx_type]