Commit cad5ebce authored by Sebastien Alaiwan's avatar Sebastien Alaiwan

Remove experimental flag of LV_MAP

This experiment has been adopted, we can simplify the code
by dropping the associated preprocessor conditionals.

Change-Id: Ic3438799335c6cd05f170302f49bd47e1f705c24
parent 248b9563
......@@ -352,30 +352,28 @@ if (CONFIG_INTERNAL_STATS)
"${AOM_ROOT}/av1/encoder/blockiness.c")
endif ()
if (CONFIG_LV_MAP)
set(AOM_AV1_COMMON_SOURCES
${AOM_AV1_COMMON_SOURCES}
"${AOM_ROOT}/av1/common/txb_common.c"
"${AOM_ROOT}/av1/common/txb_common.h")
set(AOM_AV1_COMMON_SOURCES
${AOM_AV1_COMMON_SOURCES}
"${AOM_ROOT}/av1/common/txb_common.c"
"${AOM_ROOT}/av1/common/txb_common.h")
set(AOM_AV1_COMMON_INTRIN_SSE2
${AOM_AV1_COMMON_INTRIN_SSE2}
"${AOM_ROOT}/av1/common/x86/txb_sse2.c")
set(AOM_AV1_COMMON_INTRIN_SSE2
${AOM_AV1_COMMON_INTRIN_SSE2}
"${AOM_ROOT}/av1/common/x86/txb_sse2.c")
set(AOM_AV1_DECODER_SOURCES
${AOM_AV1_DECODER_SOURCES}
"${AOM_ROOT}/av1/decoder/decodetxb.c"
"${AOM_ROOT}/av1/decoder/decodetxb.h")
set(AOM_AV1_DECODER_SOURCES
${AOM_AV1_DECODER_SOURCES}
"${AOM_ROOT}/av1/decoder/decodetxb.c"
"${AOM_ROOT}/av1/decoder/decodetxb.h")
set(AOM_AV1_ENCODER_SOURCES
${AOM_AV1_ENCODER_SOURCES}
"${AOM_ROOT}/av1/encoder/encodetxb.c"
"${AOM_ROOT}/av1/encoder/encodetxb.h")
set(AOM_AV1_ENCODER_SOURCES
${AOM_AV1_ENCODER_SOURCES}
"${AOM_ROOT}/av1/encoder/encodetxb.c"
"${AOM_ROOT}/av1/encoder/encodetxb.h")
set(AOM_AV1_ENCODER_INTRIN_SSE2
${AOM_AV1_ENCODER_INTRIN_SSE2}
"${AOM_ROOT}/av1/encoder/x86/encodetxb_sse2.c")
endif ()
set(AOM_AV1_ENCODER_INTRIN_SSE2
${AOM_AV1_ENCODER_INTRIN_SSE2}
"${AOM_ROOT}/av1/encoder/x86/encodetxb_sse2.c")
if (CONFIG_CFL)
set(AOM_AV1_COMMON_SOURCES
......
......@@ -81,7 +81,7 @@ specialize qw/av1_highbd_convolve_vert sse4_1/;
#
# txb
#
if (aom_config("CONFIG_LV_MAP") eq "yes") {
{
add_proto qw/void av1_get_br_level_counts/, "const uint8_t *const levels, const int width, const int height, uint8_t *const level_counts";
specialize qw/av1_get_br_level_counts sse2/;
}
......@@ -414,7 +414,7 @@ if (aom_config("CONFIG_AV1_ENCODER") eq "yes") {
# End av1_high encoder functions
# txb
if (aom_config("CONFIG_LV_MAP") eq "yes") {
{
add_proto qw/void av1_get_nz_map_contexts/, "const uint8_t *const levels, const int16_t *const scan, const uint16_t eob, const TX_SIZE tx_size, const TX_TYPE tx_type, int8_t *const coeff_contexts";
specialize qw/av1_get_nz_map_contexts sse2/;
}
......
......@@ -81,7 +81,6 @@ void av1_foreach_transformed_block_in_plane(
}
}
#if CONFIG_LV_MAP
void av1_foreach_transformed_block(const MACROBLOCKD *const xd,
BLOCK_SIZE bsize, int mi_row, int mi_col,
foreach_transformed_block_visitor visit,
......@@ -94,7 +93,6 @@ void av1_foreach_transformed_block(const MACROBLOCKD *const xd,
av1_foreach_transformed_block_in_plane(xd, bsize, plane, visit, arg);
}
}
#endif
void av1_set_contexts(const MACROBLOCKD *xd, struct macroblockd_plane *pd,
int plane, TX_SIZE tx_size, int has_eob, int aoff,
......
......@@ -1025,12 +1025,10 @@ void av1_foreach_transformed_block_in_plane(
const MACROBLOCKD *const xd, BLOCK_SIZE bsize, int plane,
foreach_transformed_block_visitor visit, void *arg);
#if CONFIG_LV_MAP
void av1_foreach_transformed_block(const MACROBLOCKD *const xd,
BLOCK_SIZE bsize, int mi_row, int mi_col,
foreach_transformed_block_visitor visit,
void *arg, const int num_planes);
#endif
void av1_set_contexts(const MACROBLOCKD *xd, struct macroblockd_plane *pd,
int plane, TX_SIZE tx_size, int has_eob, int aoff,
......
......@@ -18,9 +18,7 @@
#include "av1/common/onyxc_int.h"
#include "av1/common/scan.h"
#include "av1/common/token_cdfs.h"
#if CONFIG_LV_MAP
#include "av1/common/txb_common.h"
#endif
/* Extra bits coded from LSB to MSB */
const aom_cdf_prob av1_cat1_cdf0[CDF_SIZE(2)] = { AOM_CDF2(20352) };
......@@ -563,7 +561,6 @@ static int get_q_ctx(int q) {
#endif // CONFIG_Q_ADAPT_PROBS
void av1_default_coef_probs(AV1_COMMON *cm) {
#if CONFIG_LV_MAP
#if CONFIG_Q_ADAPT_PROBS
const int index = get_q_ctx(cm->base_qindex);
av1_copy(cm->fc->txb_skip_cdf, av1_default_txb_skip_cdfs[index]);
......@@ -595,20 +592,6 @@ void av1_default_coef_probs(AV1_COMMON *cm) {
av1_copy(cm->fc->eob_flag_cdf512, av1_default_eob_multi512);
av1_copy(cm->fc->eob_flag_cdf1024, av1_default_eob_multi1024);
#endif // CONFIG_Q_ADAPT_PROBS
#else
const int index = AOMMIN(TOKEN_CDF_Q_CTXS - 1, cm->base_qindex / 64);
av1_copy(cm->fc->coef_head_cdfs[TX_4X4],
(*av1_default_qctx_coef_cdfs[index])[TX_4X4]);
av1_copy(cm->fc->coef_head_cdfs[TX_8X8],
(*av1_default_qctx_coef_cdfs[index])[TX_8X8]);
av1_copy(cm->fc->coef_head_cdfs[TX_16X16],
(*av1_default_qctx_coef_cdfs[index])[TX_16X16]);
av1_copy(cm->fc->coef_head_cdfs[TX_32X32],
(*av1_default_qctx_coef_cdfs[index])[TX_32X32]);
av1_copy(cm->fc->coef_head_cdfs[TX_64X64],
(*av1_default_qctx_coef_cdfs[index])[TX_32X32]);
av1_coef_pareto_cdfs(cm->fc);
#endif // CONFIG_LV_MAP
}
static void av1_average_cdf(aom_cdf_prob *cdf_ptr[], aom_cdf_prob *fc_cdf_ptr,
......@@ -646,7 +629,6 @@ void av1_average_tile_coef_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[],
aom_cdf_prob *fc_cdf_ptr;
assert(num_tiles == 1);
#if CONFIG_LV_MAP
AVERAGE_TILE_CDFS(txb_skip_cdf)
AVERAGE_TILE_CDFS(eob_extra_cdf)
AVERAGE_TILE_CDFS(dc_sign_cdf)
......@@ -660,10 +642,6 @@ void av1_average_tile_coef_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[],
AVERAGE_TILE_CDFS(eob_flag_cdf1024)
AVERAGE_TILE_CDFS(coeff_base_eob_cdf)
AVERAGE_TILE_CDFS(coeff_br_cdf)
#else // CONFI_LV_MAP
AVERAGE_TILE_CDFS(coef_head_cdfs)
AVERAGE_TILE_CDFS(coef_tail_cdfs)
#endif
}
void av1_average_tile_mv_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[],
......
......@@ -56,7 +56,6 @@ extern "C" {
#define ENTROPY_NODES 11
#if CONFIG_LV_MAP
#define TXB_SKIP_CONTEXTS 13
#define EOB_COEF_CONTEXTS 22
......@@ -90,8 +89,6 @@ typedef enum TX_CLASS {
TX_CLASSES = 3,
} TX_CLASS;
#endif
DECLARE_ALIGNED(16, extern const uint8_t, av1_pt_energy_class[ENTROPY_TOKENS]);
#define CAT1_MIN_VAL 5
......@@ -171,9 +168,7 @@ static INLINE int av1_get_cat6_extrabits_size(TX_SIZE tx_size,
struct AV1Common;
struct frame_contexts;
void av1_default_coef_probs(struct AV1Common *cm);
#if CONFIG_LV_MAP
void av1_adapt_coef_probs(struct AV1Common *cm);
#endif // CONFIG_LV_MAP
// This is the index in the scan order beyond which all coefficients for
// 8x8 transform and above are in the top band.
......
......@@ -15,9 +15,7 @@
#include "av1/common/scan.h"
#include "av1/common/onyxc_int.h"
#include "av1/common/seg_common.h"
#if CONFIG_LV_MAP
#include "av1/common/txb_common.h"
#endif
static const aom_cdf_prob default_newmv_cdf[NEWMV_MODE_CONTEXTS][CDF_SIZE(2)] =
{ { AOM_CDF2(128 * 155) }, { AOM_CDF2(128 * 116) }, { AOM_CDF2(128 * 94) },
......@@ -1380,9 +1378,7 @@ void av1_setup_past_independence(AV1_COMMON *cm) {
av1_default_coef_probs(cm);
init_mode_probs(cm->fc);
av1_init_mv_probs(cm);
#if CONFIG_LV_MAP
av1_init_lv_map(cm);
#endif
cm->fc->initialized = 1;
av1_setup_frame_contexts(cm);
......
......@@ -76,7 +76,6 @@ typedef struct frame_contexts {
coeff_cdf_model coef_tail_cdfs[TX_SIZES][PLANE_TYPES];
coeff_cdf_model coef_head_cdfs[TX_SIZES][PLANE_TYPES];
#if CONFIG_LV_MAP
aom_cdf_prob txb_skip_cdf[TX_SIZES][TXB_SKIP_CONTEXTS][CDF_SIZE(2)];
aom_cdf_prob eob_extra_cdf[TX_SIZES][PLANE_TYPES][EOB_COEF_CONTEXTS]
[CDF_SIZE(2)];
......@@ -94,7 +93,6 @@ typedef struct frame_contexts {
[CDF_SIZE(4)];
aom_cdf_prob coeff_br_cdf[TX_SIZES][PLANE_TYPES][LEVEL_CONTEXTS]
[CDF_SIZE(BR_CDF_SIZE)];
#endif
aom_cdf_prob newmv_cdf[NEWMV_MODE_CONTEXTS][CDF_SIZE(2)];
aom_cdf_prob zeromv_cdf[GLOBALMV_MODE_CONTEXTS][CDF_SIZE(2)];
......@@ -226,7 +224,6 @@ typedef struct FRAME_COUNTS {
unsigned int switchable_interp[SWITCHABLE_FILTER_CONTEXTS]
[SWITCHABLE_FILTERS];
#if CONFIG_LV_MAP
#if CONFIG_ENTROPY_STATS
unsigned int txb_skip[TX_SIZES][TXB_SKIP_CONTEXTS][2];
unsigned int eob_extra[TX_SIZES][PLANE_TYPES][EOB_COEF_CONTEXTS][2];
......@@ -248,7 +245,6 @@ typedef struct FRAME_COUNTS {
[NUM_BASE_LEVELS + 2];
unsigned int coeff_base_eob_multi[TX_SIZES][PLANE_TYPES]
[SIG_COEF_CONTEXTS_EOB][NUM_BASE_LEVELS + 1];
#endif // CONFIG_LV_MAP
unsigned int newmv_mode[NEWMV_MODE_CONTEXTS][2];
unsigned int zeromv_mode[GLOBALMV_MODE_CONTEXTS][2];
......
......@@ -199,14 +199,12 @@ typedef struct BufferPool {
InternalFrameBufferList int_frame_buffers;
} BufferPool;
#if CONFIG_LV_MAP
typedef struct {
int base_ctx_table[2 /*row*/][2 /*col*/][3 /*sig_map*/]
[BASE_CONTEXT_POSITION_NUM + 1];
} LV_MAP_CTX_TABLE;
typedef int BASE_CTX_TABLE[2 /*col*/][3 /*sig_map*/]
[BASE_CONTEXT_POSITION_NUM + 1];
#endif
#if CONFIG_REFERENCE_BUFFER
/* Initial version of sequence header structure */
......@@ -600,9 +598,7 @@ typedef struct AV1Common {
int refresh_mask;
int invalid_delta_frame_id_minus1;
#endif // CONFIG_REFERENCE_BUFFER
#if CONFIG_LV_MAP
LV_MAP_CTX_TABLE coeff_ctx_table;
#endif
#if CONFIG_MFMV
TPL_MV_REF *tpl_mvs;
int tpl_mvs_mem_size;
......
......@@ -14,15 +14,9 @@
#include "av1/common/common_data.h"
#include "av1/common/scan.h"
#if CONFIG_LV_MAP
DECLARE_ALIGNED(16, static const int16_t, default_scan_4x4[16]) = {
0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15
};
#else
DECLARE_ALIGNED(16, static const int16_t, default_scan_4x4[16]) = {
0, 4, 1, 5, 8, 2, 12, 9, 3, 6, 13, 10, 7, 14, 11, 15,
};
#endif
DECLARE_ALIGNED(16, static const int16_t, mcol_scan_4x4[16]) = {
0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15,
......@@ -40,17 +34,10 @@ DECLARE_ALIGNED(16, static const int16_t, row_scan_4x4[16]) = {
0, 1, 4, 2, 5, 3, 6, 8, 9, 7, 12, 10, 13, 11, 14, 15,
};
#if CONFIG_LV_MAP
DECLARE_ALIGNED(16, static const int16_t, default_scan_4x8[32]) = {
0, 1, 4, 2, 5, 8, 3, 6, 9, 12, 7, 10, 13, 16, 11, 14,
17, 20, 15, 18, 21, 24, 19, 22, 25, 28, 23, 26, 29, 27, 30, 31,
};
#else
DECLARE_ALIGNED(16, static const int16_t, default_scan_4x8[32]) = {
0, 1, 4, 5, 2, 8, 6, 9, 10, 3, 12, 7, 13, 11, 14, 16,
17, 15, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
};
#endif
DECLARE_ALIGNED(16, static const int16_t, mcol_scan_4x8[32]) = {
0, 4, 8, 12, 16, 20, 24, 28, 1, 5, 9, 13, 17, 21, 25, 29,
......@@ -62,17 +49,10 @@ DECLARE_ALIGNED(16, static const int16_t, mrow_scan_4x8[32]) = {
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
};
#if CONFIG_LV_MAP
DECLARE_ALIGNED(16, static const int16_t, default_scan_8x4[32]) = {
0, 8, 1, 16, 9, 2, 24, 17, 10, 3, 25, 18, 11, 4, 26, 19,
12, 5, 27, 20, 13, 6, 28, 21, 14, 7, 29, 22, 15, 30, 23, 31,
};
#else
DECLARE_ALIGNED(16, static const int16_t, default_scan_8x4[32]) = {
0, 1, 8, 9, 2, 16, 10, 17, 18, 3, 24, 11, 25, 19, 26, 4,
12, 27, 20, 5, 28, 13, 21, 29, 6, 14, 22, 30, 7, 15, 23, 31,
};
#endif
DECLARE_ALIGNED(16, static const int16_t, mcol_scan_8x4[32]) = {
0, 8, 16, 24, 1, 9, 17, 25, 2, 10, 18, 26, 3, 11, 19, 27,
......@@ -84,37 +64,19 @@ DECLARE_ALIGNED(16, static const int16_t, mrow_scan_8x4[32]) = {
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
};
#if CONFIG_LV_MAP
DECLARE_ALIGNED(16, static const int16_t, default_scan_4x16[64]) = {
0, 1, 4, 2, 5, 8, 3, 6, 9, 12, 7, 10, 13, 16, 11, 14,
17, 20, 15, 18, 21, 24, 19, 22, 25, 28, 23, 26, 29, 32, 27, 30,
33, 36, 31, 34, 37, 40, 35, 38, 41, 44, 39, 42, 45, 48, 43, 46,
49, 52, 47, 50, 53, 56, 51, 54, 57, 60, 55, 58, 61, 59, 62, 63,
};
#else
DECLARE_ALIGNED(16, static const int16_t, default_scan_4x16[64]) = {
0, 1, 4, 5, 2, 8, 6, 9, 10, 3, 12, 7, 13, 11, 14, 16,
17, 15, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
};
#endif
#if CONFIG_LV_MAP
DECLARE_ALIGNED(16, static const int16_t, default_scan_16x4[64]) = {
0, 16, 1, 32, 17, 2, 48, 33, 18, 3, 49, 34, 19, 4, 50, 35,
20, 5, 51, 36, 21, 6, 52, 37, 22, 7, 53, 38, 23, 8, 54, 39,
24, 9, 55, 40, 25, 10, 56, 41, 26, 11, 57, 42, 27, 12, 58, 43,
28, 13, 59, 44, 29, 14, 60, 45, 30, 15, 61, 46, 31, 62, 47, 63,
};
#else
DECLARE_ALIGNED(16, static const int16_t, default_scan_16x4[64]) = {
0, 1, 16, 17, 2, 32, 18, 33, 34, 3, 48, 19, 49, 35, 50, 4,
20, 51, 36, 5, 52, 21, 37, 53, 6, 22, 38, 54, 7, 23, 39, 55,
8, 24, 40, 56, 9, 25, 41, 57, 10, 26, 42, 58, 11, 27, 43, 59,
12, 28, 44, 60, 13, 29, 45, 61, 14, 30, 46, 62, 15, 31, 47, 63,
};
#endif
DECLARE_ALIGNED(16, static const int16_t, mrow_scan_4x16[64]) = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
......@@ -165,7 +127,6 @@ DECLARE_ALIGNED(16, static const int16_t, default_scan_8x32[256]) = {
255,
};
#if CONFIG_LV_MAP
DECLARE_ALIGNED(16, static const int16_t, default_scan_32x8[256]) = {
0, 32, 1, 64, 33, 2, 96, 65, 34, 3, 128, 97, 66, 35, 4,
160, 129, 98, 67, 36, 5, 192, 161, 130, 99, 68, 37, 6, 224, 193,
......@@ -186,28 +147,6 @@ DECLARE_ALIGNED(16, static const int16_t, default_scan_32x8[256]) = {
95, 251, 220, 189, 158, 127, 252, 221, 190, 159, 253, 222, 191, 254, 223,
255,
};
#else
DECLARE_ALIGNED(16, static const int16_t, default_scan_32x8[256]) = {
0, 1, 32, 2, 33, 64, 3, 34, 65, 96, 4, 35, 66, 97, 128,
5, 36, 67, 98, 129, 160, 6, 37, 68, 99, 130, 161, 192, 7, 38,
69, 100, 131, 162, 193, 224, 8, 39, 70, 101, 132, 163, 194, 225, 9,
40, 71, 102, 133, 164, 195, 226, 10, 41, 72, 103, 134, 165, 196, 227,
11, 42, 73, 104, 135, 166, 197, 228, 12, 43, 74, 105, 136, 167, 198,
229, 13, 44, 75, 106, 137, 168, 199, 230, 14, 45, 76, 107, 138, 169,
200, 231, 15, 46, 77, 108, 139, 170, 201, 232, 16, 47, 78, 109, 140,
171, 202, 233, 17, 48, 79, 110, 141, 172, 203, 234, 18, 49, 80, 111,
142, 173, 204, 235, 19, 50, 81, 112, 143, 174, 205, 236, 20, 51, 82,
113, 144, 175, 206, 237, 21, 52, 83, 114, 145, 176, 207, 238, 22, 53,
84, 115, 146, 177, 208, 239, 23, 54, 85, 116, 147, 178, 209, 240, 24,
55, 86, 117, 148, 179, 210, 241, 25, 56, 87, 118, 149, 180, 211, 242,
26, 57, 88, 119, 150, 181, 212, 243, 27, 58, 89, 120, 151, 182, 213,
244, 28, 59, 90, 121, 152, 183, 214, 245, 29, 60, 91, 122, 153, 184,
215, 246, 30, 61, 92, 123, 154, 185, 216, 247, 31, 62, 93, 124, 155,
186, 217, 248, 63, 94, 125, 156, 187, 218, 249, 95, 126, 157, 188, 219,
250, 127, 158, 189, 220, 251, 159, 190, 221, 252, 191, 222, 253, 223, 254,
255,
};
#endif
DECLARE_ALIGNED(16, static const int16_t, mrow_scan_8x32[256]) = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
......@@ -291,21 +230,12 @@ DECLARE_ALIGNED(16, static const int16_t, mcol_scan_32x8[256]) = {
30, 62, 94, 126, 158, 190, 222, 254, 31, 63, 95, 127, 159, 191, 223, 255,
};
#if CONFIG_LV_MAP
DECLARE_ALIGNED(16, static const int16_t, default_scan_8x8[64]) = {
0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5,
12, 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28,
35, 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51,
58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63
};
#else
DECLARE_ALIGNED(16, static const int16_t, default_scan_8x8[64]) = {
0, 8, 1, 16, 9, 2, 17, 24, 10, 3, 18, 25, 32, 11, 4, 26,
33, 19, 40, 12, 34, 27, 5, 41, 20, 48, 13, 35, 42, 28, 21, 6,
49, 56, 36, 43, 29, 7, 14, 50, 57, 44, 22, 37, 15, 51, 58, 30,
45, 23, 52, 59, 38, 31, 60, 53, 46, 39, 61, 54, 47, 62, 55, 63,
};
#endif
DECLARE_ALIGNED(16, static const int16_t, mcol_scan_8x8[64]) = {
0, 8, 16, 24, 32, 40, 48, 56, 1, 9, 17, 25, 33, 41, 49, 57,
......@@ -347,7 +277,6 @@ DECLARE_ALIGNED(16, static const int16_t, default_scan_8x16[128]) = {
117, 124, 111, 118, 125, 119, 126, 127,
};
#if CONFIG_LV_MAP
DECLARE_ALIGNED(16, static const int16_t, default_scan_16x8[128]) = {
0, 16, 1, 32, 17, 2, 48, 33, 18, 3, 64, 49, 34, 19, 4, 80,
65, 50, 35, 20, 5, 96, 81, 66, 51, 36, 21, 6, 112, 97, 82, 67,
......@@ -358,18 +287,6 @@ DECLARE_ALIGNED(16, static const int16_t, default_scan_16x8[128]) = {
60, 45, 30, 15, 121, 106, 91, 76, 61, 46, 31, 122, 107, 92, 77, 62,
47, 123, 108, 93, 78, 63, 124, 109, 94, 79, 125, 110, 95, 126, 111, 127,
};
#else
DECLARE_ALIGNED(16, static const int16_t, default_scan_16x8[128]) = {
0, 1, 16, 2, 17, 32, 3, 18, 33, 48, 4, 19, 34, 49, 64, 5,
20, 35, 50, 65, 80, 6, 21, 36, 51, 66, 81, 96, 7, 22, 37, 52,
67, 82, 97, 112, 8, 23, 38, 53, 68, 83, 98, 113, 9, 24, 39, 54,
69, 84, 99, 114, 10, 25, 40, 55, 70, 85, 100, 115, 11, 26, 41, 56,
71, 86, 101, 116, 12, 27, 42, 57, 72, 87, 102, 117, 13, 28, 43, 58,
73, 88, 103, 118, 14, 29, 44, 59, 74, 89, 104, 119, 15, 30, 45, 60,
75, 90, 105, 120, 31, 46, 61, 76, 91, 106, 121, 47, 62, 77, 92, 107,
122, 63, 78, 93, 108, 123, 79, 94, 109, 124, 95, 110, 125, 111, 126, 127,
};
#endif
DECLARE_ALIGNED(16, static const int16_t, mcol_scan_8x16[128]) = {
0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120,
......@@ -455,7 +372,6 @@ DECLARE_ALIGNED(16, static const int16_t, default_scan_16x32[512]) = {
510, 511,
};
#if CONFIG_LV_MAP
DECLARE_ALIGNED(16, static const int16_t, default_scan_32x16[512]) = {
0, 32, 1, 64, 33, 2, 96, 65, 34, 3, 128, 97, 66, 35, 4,
160, 129, 98, 67, 36, 5, 192, 161, 130, 99, 68, 37, 6, 224, 193,
......@@ -493,45 +409,6 @@ DECLARE_ALIGNED(16, static const int16_t, default_scan_32x16[512]) = {
382, 351, 507, 476, 445, 414, 383, 508, 477, 446, 415, 509, 478, 447, 510,
479, 511,
};
#else
DECLARE_ALIGNED(16, static const int16_t, default_scan_32x16[512]) = {
0, 1, 32, 2, 33, 64, 3, 34, 65, 96, 4, 35, 66, 97, 128,
5, 36, 67, 98, 129, 160, 6, 37, 68, 99, 130, 161, 192, 7, 38,
69, 100, 131, 162, 193, 224, 8, 39, 70, 101, 132, 163, 194, 225, 256,
9, 40, 71, 102, 133, 164, 195, 226, 257, 288, 10, 41, 72, 103, 134,
165, 196, 227, 258, 289, 320, 11, 42, 73, 104, 135, 166, 197, 228, 259,
290, 321, 352, 12, 43, 74, 105, 136, 167, 198, 229, 260, 291, 322, 353,
384, 13, 44, 75, 106, 137, 168, 199, 230, 261, 292, 323, 354, 385, 416,
14, 45, 76, 107, 138, 169, 200, 231, 262, 293, 324, 355, 386, 417, 448,
15, 46, 77, 108, 139, 170, 201, 232, 263, 294, 325, 356, 387, 418, 449,
480, 16, 47, 78, 109, 140, 171, 202, 233, 264, 295, 326, 357, 388, 419,
450, 481, 17, 48, 79, 110, 141, 172, 203, 234, 265, 296, 327, 358, 389,
420, 451, 482, 18, 49, 80, 111, 142, 173, 204, 235, 266, 297, 328, 359,
390, 421, 452, 483, 19, 50, 81, 112, 143, 174, 205, 236, 267, 298, 329,
360, 391, 422, 453, 484, 20, 51, 82, 113, 144, 175, 206, 237, 268, 299,
330, 361, 392, 423, 454, 485, 21, 52, 83, 114, 145, 176, 207, 238, 269,
300, 331, 362, 393, 424, 455, 486, 22, 53, 84, 115, 146, 177, 208, 239,
270, 301, 332, 363, 394, 425, 456, 487, 23, 54, 85, 116, 147, 178, 209,
240, 271, 302, 333, 364, 395, 426, 457, 488, 24, 55, 86, 117, 148, 179,
210, 241, 272, 303, 334, 365, 396, 427, 458, 489, 25, 56, 87, 118, 149,
180, 211, 242, 273, 304, 335, 366, 397, 428, 459, 490, 26, 57, 88, 119,
150, 181, 212, 243, 274, 305, 336, 367, 398, 429, 460, 491, 27, 58, 89,
120, 151, 182, 213, 244, 275, 306, 337, 368, 399, 430, 461, 492, 28, 59,
90, 121, 152, 183, 214, 245, 276, 307, 338, 369, 400, 431, 462, 493, 29,
60, 91, 122, 153, 184, 215, 246, 277, 308, 339, 370, 401, 432, 463, 494,
30, 61, 92, 123, 154, 185, 216, 247, 278, 309, 340, 371, 402, 433, 464,
495, 31, 62, 93, 124, 155, 186, 217, 248, 279, 310, 341, 372, 403, 434,
465, 496, 63, 94, 125, 156, 187, 218, 249, 280, 311, 342, 373, 404, 435,
466, 497, 95, 126, 157, 188, 219, 250, 281, 312, 343, 374, 405, 436, 467,
498, 127, 158, 189, 220, 251, 282, 313, 344, 375, 406, 437, 468, 499, 159,
190, 221, 252, 283, 314, 345, 376, 407, 438, 469, 500, 191, 222, 253, 284,
315, 346, 377, 408, 439, 470, 501, 223, 254, 285, 316, 347, 378, 409, 440,
471, 502, 255, 286, 317, 348, 379, 410, 441, 472, 503, 287, 318, 349, 380,
411, 442, 473, 504, 319, 350, 381, 412, 443, 474, 505, 351, 382, 413, 444,
475, 506, 383, 414, 445, 476, 507, 415, 446, 477, 508, 447, 478, 509, 479,
510, 511,
};
#endif
DECLARE_ALIGNED(16, static const int16_t, mcol_scan_16x32[512]) = {
0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224,
......@@ -682,7 +559,6 @@ DECLARE_ALIGNED(16, static const int16_t, mrow_scan_32x16[512]) = {
510, 511,
};
#if CONFIG_LV_MAP
DECLARE_ALIGNED(16, static const int16_t, default_scan_16x16[256]) = {
0, 1, 16, 32, 17, 2, 3, 18, 33, 48, 64, 49, 34, 19, 4,
5, 20, 35, 50, 65, 80, 96, 81, 66, 51, 36, 21, 6, 7, 22,
......@@ -703,28 +579,6 @@ DECLARE_ALIGNED(16, static const int16_t, default_scan_16x16[256]) = {
250, 251, 236, 221, 206, 191, 207, 222, 237, 252, 253, 238, 223, 239, 254,
255
};
#else
DECLARE_ALIGNED(16, static const int16_t, default_scan_16x16[256]) = {
0, 16, 1, 32, 17, 2, 48, 33, 18, 3, 64, 34, 49, 19, 65,
80, 50, 4, 35, 66, 20, 81, 96, 51, 5, 36, 82, 97, 67, 112,
21, 52, 98, 37, 83, 113, 6, 68, 128, 53, 22, 99, 114, 84, 7,
129, 38, 69, 100, 115, 144, 130, 85, 54, 23, 8, 145, 39, 70, 116,
101, 131, 160, 146, 55, 86, 24, 71, 132, 117, 161, 40, 9, 102, 147,
176, 162, 87, 56, 25, 133, 118, 177, 148, 72, 103, 41, 163, 10, 192,
178, 88, 57, 134, 149, 119, 26, 164, 73, 104, 193, 42, 179, 208, 11,
135, 89, 165, 120, 150, 58, 194, 180, 27, 74, 209, 105, 151, 136, 43,
90, 224, 166, 195, 181, 121, 210, 59, 12, 152, 106, 167, 196, 75, 137,
225, 211, 240, 182, 122, 91, 28, 197, 13, 226, 168, 183, 153, 44, 212,
138, 107, 241, 60, 29, 123, 198, 184, 227, 169, 242, 76, 213, 154, 45,
92, 14, 199, 139, 61, 228, 214, 170, 185, 243, 108, 77, 155, 30, 15,
200, 229, 124, 215, 244, 93, 46, 186, 171, 201, 109, 140, 230, 62, 216,
245, 31, 125, 78, 156, 231, 47, 187, 202, 217, 94, 246, 141, 63, 232,
172, 110, 247, 157, 79, 218, 203, 126, 233, 188, 248, 95, 173, 142, 219,
111, 249, 234, 158, 127, 189, 204, 250, 235, 143, 174, 220, 205, 159, 251,
190, 221, 175, 236, 237, 191, 206, 252, 222, 253, 207, 238, 223, 254, 239,
255,
};
#endif
DECLARE_ALIGNED(16, static const int16_t, mcol_scan_16x16[256]) = {
0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240,
......@@ -967,7 +821,6 @@ DECLARE_ALIGNED(16, static const int16_t, mrow_scan_32x32[1024]) = {
1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023,
};
#if CONFIG_LV_MAP
DECLARE_ALIGNED(16, static const int16_t, default_scan_32x32[1024]) = {
0, 1, 32, 64, 33, 2, 3, 34, 65, 96, 128, 97, 66,
35, 4, 5, 36, 67, 98, 129, 160, 192, 161, 130, 99, 68,
......@@ -1049,89 +902,6 @@ DECLARE_ALIGNED(16, static const int16_t, default_scan_32x32[1024]) = {
862, 831, 863, 894, 925, 956, 987, 1018, 1019, 988, 957, 926, 895,
927, 958, 989, 1020, 1021, 990, 959, 991, 1022, 1023
};
#else
DECLARE_ALIGNED(16, static const int16_t, default_scan_32x32[1024]) = {
0, 32, 1, 64, 33, 2, 96, 65, 34, 128, 3, 97, 66,
160, 129, 35, 98, 4, 67, 130, 161, 192, 36, 99, 224, 5,
162, 193, 68, 131, 37, 100, 225, 194, 256, 163, 69, 132, 6,
226, 257, 288, 195, 101, 164, 38, 258, 7, 227, 289, 133, 320,
70, 196, 165, 290, 259, 228, 39, 321, 102, 352, 8, 197, 71,
134, 322, 291, 260, 353, 384, 229, 166, 103, 40, 354, 323, 292,
135, 385, 198, 261, 72, 9, 416, 167, 386, 355, 230, 324, 104,
293, 41, 417, 199, 136, 262, 387, 448, 325, 356, 10, 73, 418,
231, 168, 449, 294, 388, 105, 419, 263, 42, 200, 357, 450, 137,
480, 74, 326, 232, 11, 389, 169, 295, 420, 106, 451, 481, 358,
264, 327, 201, 43, 138, 512, 482, 390, 296, 233, 170, 421, 75,
452, 359, 12, 513, 265, 483, 328, 107, 202, 514, 544, 422, 391,
453, 139, 44, 234, 484, 297, 360, 171, 76, 515, 545, 266, 329,
454, 13, 423, 203, 108, 546, 485, 576, 298, 235, 140, 361, 330,
172, 547, 45, 455, 267, 577, 486, 77, 204, 362, 608, 14, 299,
578, 109, 236, 487, 609, 331, 141, 579, 46, 15, 173, 610, 363,
78, 205, 16, 110, 237, 611, 142, 47, 174, 79, 206, 17, 111,
238, 48, 143, 80, 175, 112, 207, 49, 18, 239, 81, 113, 19,
50, 82, 114, 51, 83, 115, 640, 516, 392, 268, 144, 20, 672,
641, 548, 517, 424, 393, 300, 269, 176, 145, 52, 21, 704, 673,
642, 580, 549, 518, 456, 425, 394, 332, 301, 270, 208, 177, 146,
84, 53, 22, 736, 705, 674, 643, 612, 581, 550, 519, 488, 457,
426, 395, 364, 333, 302, 271, 240, 209, 178, 147, 116, 85, 54,
23, 737, 706, 675, 613, 582, 551, 489, 458, 427, 365, 334, 303,
241, 210, 179, 117, 86, 55, 738, 707, 614, 583, 490, 459, 366,
335, 242, 211, 118, 87, 739, 615, 491, 367, 243, 119, 768, 644,
520, 396, 272, 148, 24, 800, 769, 676, 645, 552, 521, 428, 397,
304, 273, 180, 149, 56, 25, 832, 801, 770, 708, 677, 646, 584,
553, 522, 460, 429, 398, 336, 305, 274, 212, 181, 150, 88, 57,
26, 864, 833, 802, 771, 740, 709, 678, 647, 616, 585, 554, 523,
492, 461, 430, 399, 368, 337, 306, 275, 244, 213, 182, 151, 120,
89, 58, 27, 865, 834, 803, 741, 710, 679, 617, 586, 555, 493,
462, 431, 369, 338, 307, 245, 214, 183, 121, 90, 59, 866, 835,
742, 711, 618, 587, 494, 463, 370, 339, 246, 215, 122, 91, 867,
743, 619, 495, 371, 247, 123, 896, 772, 648, 524, 400, 276, 152,
28, 928, 897, 804, 773, 680, 649, 556, 525, 432, 401, 308, 277,
184, 153, 60, 29, 960, 929, 898, 836, 805, 774, 712, 681, 650,
588, 557, 526, 464, 433, 402, 340, 309, 278, 216, 185, 154, 92,
61, 30, 992, 961, 930, 899, 868, 837, 806, 775, 744, 713, 682,
651, 620, 589, 558, 527, 496, 465, 434, 403, 372, 341, 310, 279,
248, 217, 186, 155, 124, 93, 62, 31, 993, 962, 931, 869, 838,
807, 745, 714, 683, 621, 590, 559, 497, 466, 435, 373, 342, 311,
249, 218, 187, 125, 94, 63, 994, 963, 870, 839, 746, 715, 622,
591, 498, 467, 374, 343, 250, 219, 126, 95, 995, 871, 747, 623,
499, 375, 251, 127, 900, 776, 652, 528, 404, 280, 156, 932, 901,
808, 777, 684, 653, 560, 529, 436, 405, 312, 281, 188, 157, 964,
933, 902, 840, 809, 778, 716, 685, 654, 592, 561, 530, 468, 437,
406, 344, 313, 282, 220, 189, 158, 996, 965, 934, 903, 872, 841,
810, 779, 748, 717, 686, 655, 624, 593, 562, 531, 500, 469, 438,
407, 376, 345, 314, 283, 252, 221, 190, 159, 997, 966, 935, 873,
842, 811, 749, 718, 687, 625, 594, 563, 501, 470, 439, 377, 346,
315, 253, 222, 191, 998, 967, 874, 843, 750, 719, 626, 595, 502,
471, 378, 347, 254, 223, 999, 875, 751, 627, 503, 379, 255, 904,
780, 656, 532, 408, 284, 936, 905, 812, 781, 688, 657, 564, 533,
440, 409, 316, 285, 968, 937, 906, 844, 813, 782, 720, 689, 658,
596, 565, 534, 472, 441, 410, 348, 317, 286, 1000, 969, 938, 907,
876, 845, 814, 783, 752, 721, 690, 659, 628, 597, 566, 535, 504,
473, 442, 411, 380, 349, 318, 287, 1001, 970, 939, 877, 846, 815,
753, 722, 691, 629, 598, 567, 505, 474, 443, 381, 350, 319, 1002,
971, 878, 847, 754, 723, 630, 599, 506, 475, 382, 351, 1003, 879,
755, 631, 507, 383, 908, 784, 660, 536, 412, 940, 909, 816, 785,
692, 661, 568, 537, 444, 413, 972, 941, 910, 848, 817, 786, 724,
693, 662, 600, 569, 538, 476, 445, 414, 1004, 973, 942, 911, 880,
849, 818, 787, 756, 725, 694, 663, 632, 601, 570, 539, 508, 477,
446, 415, 1005, 974, 943, 881, 850, 819, 757, 726, 695, 633, 602,
571, 509, 478, 447, 1006, 975, 882, 851, 758, 727, 634, 603, 510,
479, 1007, 883, 759, 635, 511, 912, 788, 664, 540, 944, 913, 820,
789, 696, 665, 572, 541, 976, 945, 914, 852, 821, 790, 728, 697,
666, 604, 573, 542, 1008, 977, 946, 915, 884, 853, 822, 791, 760,
729, 698, 667, 636, 605, 574, 543, 1009, 978, 947, 885, 854, 823,
761, 730, 699, 637, 606, 575, 1010, 979, 886, 855, 762, 731, 638,
607, 1011, 887, 763, 639, 916, 792, 668, 948, 917, 824, 793, 700,
669, 980, 949, 918, 856, 825, 794, 732, 701, 670, 1012, 981, 950,
919, 888, 857, 826, 795, 764, 733, 702, 671, 1013, 982, 951, 889,
858, 827, 765, 734, 703, 1014, 983, 890, 859, 766, 735, 1015, 891,
767, 920, 796, 952, 921, 828, 797, 984, 953, 922, 860, 829, 798,
1016, 985, 954, 923, 892, 861, 830, 799, 1017, 986, 955, 893, 862,
831, 1018, 987, 894, 863, 1019, 895, 924, 956, 925, 988, 957, 926,
1020, 989, 958, 927, 1021, 990, 959, 1022, 991, 1023,
};
#endif
// Approximate versions, which reuse the 32x32 scan and assume rest of the
// coeffs to be zero.
......@@ -1143,19 +913,11 @@ DECLARE_ALIGNED(16, static const int16_t, default_scan_32x32[1024]) = {
// Neighborhood 2-tuples for various scans and blocksizes,
// in {top, left} order for each position in corresponding scan order.
#if CONFIG_LV_MAP
DECLARE_ALIGNED(16, static const int16_t,
default_scan_4x4_neighbors[17 * MAX_NEIGHBORS]) = {
0, 0, 0, 0, 0, 0, 4, 4, 1, 4, 1, 1, 2, 2, 2, 5, 5,
8, 8, 8, 9, 12, 6, 9, 3, 6, 7, 10, 10, 13, 11, 14, 0, 0
};
#else
DECLARE_ALIGNED(16, static const int16_t,
default_scan_4x4_neighbors[17 * MAX_NEIGHBORS]) = {
0, 0, 0, 0, 4, 0, 1, 4, 4, 5, 5, 1, 8, 8, 5, 8, 2,
2, 2, 5, 9, 12, 6, 9, 3, 6, 10, 13, 7, 10, 11, 14, 0, 0,
};
#endif