Commit 4455036c authored by Ronald S. Bultje's avatar Ronald S. Bultje

Merge superblocks (32x32) experiment.

Change-Id: I0df99742029834a85c4933652b0587cf5b6b2587
parent 879cb7d9
...@@ -16,7 +16,7 @@ const uint8_t vp9_block2left[TX_SIZE_MAX_SB][25] = { ...@@ -16,7 +16,7 @@ const uint8_t vp9_block2left[TX_SIZE_MAX_SB][25] = {
{0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8}, {0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8},
{0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 6, 6, 6, 6, 8}, {0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 6, 6, 6, 6, 8},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 6, 6, 6, 6, 8}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 6, 6, 6, 6, 8},
#if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS #if CONFIG_TX32X32
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 6, 6, 6, 6, 8} {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 6, 6, 6, 6, 8}
#endif #endif
}; };
...@@ -24,7 +24,7 @@ const uint8_t vp9_block2above[TX_SIZE_MAX_SB][25] = { ...@@ -24,7 +24,7 @@ const uint8_t vp9_block2above[TX_SIZE_MAX_SB][25] = {
{0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 4, 5, 6, 7, 6, 7, 8}, {0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 4, 5, 6, 7, 6, 7, 8},
{0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 4, 4, 4, 4, 6, 6, 6, 6, 8}, {0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 4, 4, 4, 4, 6, 6, 6, 6, 8},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 6, 6, 6, 6, 8}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 6, 6, 6, 6, 8},
#if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS #if CONFIG_TX32X32
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 6, 6, 6, 6, 8} {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 6, 6, 6, 6, 8}
#endif #endif
}; };
...@@ -122,7 +122,7 @@ typedef enum { ...@@ -122,7 +122,7 @@ typedef enum {
TX_8X8 = 1, // 8x8 dct transform TX_8X8 = 1, // 8x8 dct transform
TX_16X16 = 2, // 16x16 dct transform TX_16X16 = 2, // 16x16 dct transform
TX_SIZE_MAX_MB = 3, // Number of different transforms available TX_SIZE_MAX_MB = 3, // Number of different transforms available
#if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS #if CONFIG_TX32X32
TX_32X32 = TX_SIZE_MAX_MB, // 32x32 dct transform TX_32X32 = TX_SIZE_MAX_MB, // 32x32 dct transform
TX_SIZE_MAX_SB, // Number of transforms available to SBs TX_SIZE_MAX_SB, // Number of transforms available to SBs
#else #else
...@@ -226,7 +226,6 @@ typedef enum { ...@@ -226,7 +226,6 @@ typedef enum {
MAX_REF_FRAMES = 4 MAX_REF_FRAMES = 4
} MV_REFERENCE_FRAME; } MV_REFERENCE_FRAME;
#if CONFIG_SUPERBLOCKS
typedef enum { typedef enum {
BLOCK_SIZE_MB16X16 = 0, BLOCK_SIZE_MB16X16 = 0,
BLOCK_SIZE_SB32X32 = 1, BLOCK_SIZE_SB32X32 = 1,
...@@ -234,7 +233,6 @@ typedef enum { ...@@ -234,7 +233,6 @@ typedef enum {
BLOCK_SIZE_SB64X64 = 2, BLOCK_SIZE_SB64X64 = 2,
#endif #endif
} BLOCK_SIZE_TYPE; } BLOCK_SIZE_TYPE;
#endif
typedef struct { typedef struct {
MB_PREDICTION_MODE mode, uv_mode; MB_PREDICTION_MODE mode, uv_mode;
...@@ -274,13 +272,9 @@ typedef struct { ...@@ -274,13 +272,9 @@ typedef struct {
// Flag to turn prediction signal filter on(1)/off(0 ) at the MB level // Flag to turn prediction signal filter on(1)/off(0 ) at the MB level
unsigned int pred_filter_enabled; unsigned int pred_filter_enabled;
#endif #endif
INTERPOLATIONFILTERTYPE interp_filter; INTERPOLATIONFILTERTYPE interp_filter;
#if CONFIG_SUPERBLOCKS
// FIXME need a SB array of 4 MB_MODE_INFOs that
// only needs one sb_type.
BLOCK_SIZE_TYPE sb_type; BLOCK_SIZE_TYPE sb_type;
#endif
} MB_MODE_INFO; } MB_MODE_INFO;
typedef struct { typedef struct {
...@@ -310,7 +304,7 @@ typedef struct blockd { ...@@ -310,7 +304,7 @@ typedef struct blockd {
union b_mode_info bmi; union b_mode_info bmi;
} BLOCKD; } BLOCKD;
#if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS #if CONFIG_TX32X32
typedef struct superblockd { typedef struct superblockd {
/* 32x32 Y and 16x16 U/V. No 2nd order transform yet. */ /* 32x32 Y and 16x16 U/V. No 2nd order transform yet. */
DECLARE_ALIGNED(16, int16_t, diff[32*32+16*16*2]); DECLARE_ALIGNED(16, int16_t, diff[32*32+16*16*2]);
...@@ -326,7 +320,7 @@ typedef struct macroblockd { ...@@ -326,7 +320,7 @@ typedef struct macroblockd {
DECLARE_ALIGNED(16, int16_t, dqcoeff[400]); DECLARE_ALIGNED(16, int16_t, dqcoeff[400]);
DECLARE_ALIGNED(16, uint16_t, eobs[25]); DECLARE_ALIGNED(16, uint16_t, eobs[25]);
#if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS #if CONFIG_TX32X32
SUPERBLOCKD sb_coeff_data; SUPERBLOCKD sb_coeff_data;
#endif #endif
...@@ -417,14 +411,6 @@ typedef struct macroblockd { ...@@ -417,14 +411,6 @@ typedef struct macroblockd {
int corrupted; int corrupted;
#if !CONFIG_SUPERBLOCKS && (ARCH_X86 || ARCH_X86_64)
/* This is an intermediate buffer currently used in sub-pixel motion search
* to keep a copy of the reference area. This buffer can be used for other
* purpose.
*/
DECLARE_ALIGNED(32, uint8_t, y_buf[22 * 32]);
#endif
int sb_index; int sb_index;
int mb_index; // Index of the MB in the SB (0..3) int mb_index; // Index of the MB in the SB (0..3)
int q_index; int q_index;
...@@ -528,11 +514,9 @@ static TX_TYPE get_tx_type_4x4(const MACROBLOCKD *xd, const BLOCKD *b) { ...@@ -528,11 +514,9 @@ static TX_TYPE get_tx_type_4x4(const MACROBLOCKD *xd, const BLOCKD *b) {
int ib = (int)(b - xd->block); int ib = (int)(b - xd->block);
if (ib >= 16) if (ib >= 16)
return tx_type; return tx_type;
#if CONFIG_SUPERBLOCKS
// TODO(rbultje, debargha): Explore ADST usage for superblocks // TODO(rbultje, debargha): Explore ADST usage for superblocks
if (xd->mode_info_context->mbmi.sb_type) if (xd->mode_info_context->mbmi.sb_type)
return tx_type; return tx_type;
#endif
if (xd->mode_info_context->mbmi.mode == B_PRED && if (xd->mode_info_context->mbmi.mode == B_PRED &&
xd->q_index < ACTIVE_HT) { xd->q_index < ACTIVE_HT) {
tx_type = txfm_map( tx_type = txfm_map(
...@@ -585,11 +569,9 @@ static TX_TYPE get_tx_type_8x8(const MACROBLOCKD *xd, const BLOCKD *b) { ...@@ -585,11 +569,9 @@ static TX_TYPE get_tx_type_8x8(const MACROBLOCKD *xd, const BLOCKD *b) {
int ib = (int)(b - xd->block); int ib = (int)(b - xd->block);
if (ib >= 16) if (ib >= 16)
return tx_type; return tx_type;
#if CONFIG_SUPERBLOCKS
// TODO(rbultje, debargha): Explore ADST usage for superblocks // TODO(rbultje, debargha): Explore ADST usage for superblocks
if (xd->mode_info_context->mbmi.sb_type) if (xd->mode_info_context->mbmi.sb_type)
return tx_type; return tx_type;
#endif
if (xd->mode_info_context->mbmi.mode == I8X8_PRED && if (xd->mode_info_context->mbmi.mode == I8X8_PRED &&
xd->q_index < ACTIVE_HT8) { xd->q_index < ACTIVE_HT8) {
// TODO(rbultje): MB_PREDICTION_MODE / B_PREDICTION_MODE should be merged // TODO(rbultje): MB_PREDICTION_MODE / B_PREDICTION_MODE should be merged
...@@ -620,11 +602,9 @@ static TX_TYPE get_tx_type_16x16(const MACROBLOCKD *xd, const BLOCKD *b) { ...@@ -620,11 +602,9 @@ static TX_TYPE get_tx_type_16x16(const MACROBLOCKD *xd, const BLOCKD *b) {
int ib = (int)(b - xd->block); int ib = (int)(b - xd->block);
if (ib >= 16) if (ib >= 16)
return tx_type; return tx_type;
#if CONFIG_SUPERBLOCKS
// TODO(rbultje, debargha): Explore ADST usage for superblocks // TODO(rbultje, debargha): Explore ADST usage for superblocks
if (xd->mode_info_context->mbmi.sb_type) if (xd->mode_info_context->mbmi.sb_type)
return tx_type; return tx_type;
#endif
if (xd->mode_info_context->mbmi.mode < I8X8_PRED && if (xd->mode_info_context->mbmi.mode < I8X8_PRED &&
xd->q_index < ACTIVE_HT16) { xd->q_index < ACTIVE_HT16) {
tx_type = txfm_map(pred_mode_conv(xd->mode_info_context->mbmi.mode)); tx_type = txfm_map(pred_mode_conv(xd->mode_info_context->mbmi.mode));
......
...@@ -1038,7 +1038,7 @@ static const vp9_coeff_probs default_hybrid_coef_probs_16x16[BLOCK_TYPES_16X16] ...@@ -1038,7 +1038,7 @@ static const vp9_coeff_probs default_hybrid_coef_probs_16x16[BLOCK_TYPES_16X16]
} }
} }
}; };
#if CONFIG_SUPERBLOCKS && CONFIG_TX32X32 #if CONFIG_TX32X32
static const vp9_coeff_probs default_coef_probs_32x32[BLOCK_TYPES_32X32] = { static const vp9_coeff_probs default_coef_probs_32x32[BLOCK_TYPES_32X32] = {
{ /* block Type 0 */ { /* block Type 0 */
{ /* Coeff Band 0 */ { /* Coeff Band 0 */
...@@ -1210,4 +1210,4 @@ static const vp9_coeff_probs default_coef_probs_32x32[BLOCK_TYPES_32X32] = { ...@@ -1210,4 +1210,4 @@ static const vp9_coeff_probs default_coef_probs_32x32[BLOCK_TYPES_32X32] = {
} }
} }
}; };
#endif // CONFIG_SUPERBLOCKS && CONFIG_TX32X32 #endif // CONFIG_TX32X32
...@@ -142,7 +142,7 @@ DECLARE_ALIGNED(16, const int, vp9_default_zig_zag1d_16x16[256]) = { ...@@ -142,7 +142,7 @@ DECLARE_ALIGNED(16, const int, vp9_default_zig_zag1d_16x16[256]) = {
237, 252, 253, 238, 223, 239, 254, 255, 237, 252, 253, 238, 223, 239, 254, 255,
}; };
#if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS #if CONFIG_TX32X32
#if CONFIG_DWT32X32HYBRID #if CONFIG_DWT32X32HYBRID
DECLARE_ALIGNED(16, const int, vp9_coef_bands_32x32[1024]) = { DECLARE_ALIGNED(16, const int, vp9_coef_bands_32x32[1024]) = {
0, 1, 2, 3, 5, 4, 4, 5, 5, 3, 6, 3, 5, 4, 6, 0, 1, 2, 3, 5, 4, 4, 5, 5, 3, 6, 3, 5, 4, 6,
...@@ -547,7 +547,7 @@ DECLARE_ALIGNED(16, int, ...@@ -547,7 +547,7 @@ DECLARE_ALIGNED(16, int,
vp9_default_zig_zag1d_8x8_neighbors[64 * MAX_NEIGHBORS]); vp9_default_zig_zag1d_8x8_neighbors[64 * MAX_NEIGHBORS]);
DECLARE_ALIGNED(16, int, DECLARE_ALIGNED(16, int,
vp9_default_zig_zag1d_16x16_neighbors[256 * MAX_NEIGHBORS]); vp9_default_zig_zag1d_16x16_neighbors[256 * MAX_NEIGHBORS]);
#if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS #if CONFIG_TX32X32
DECLARE_ALIGNED(16, int, DECLARE_ALIGNED(16, int,
vp9_default_zig_zag1d_32x32_neighbors[1024 * MAX_NEIGHBORS]); vp9_default_zig_zag1d_32x32_neighbors[1024 * MAX_NEIGHBORS]);
#endif #endif
...@@ -628,7 +628,7 @@ void vp9_init_neighbors() { ...@@ -628,7 +628,7 @@ void vp9_init_neighbors() {
vp9_default_zig_zag1d_8x8_neighbors); vp9_default_zig_zag1d_8x8_neighbors);
init_scan_neighbors(vp9_default_zig_zag1d_16x16, 16, init_scan_neighbors(vp9_default_zig_zag1d_16x16, 16,
vp9_default_zig_zag1d_16x16_neighbors); vp9_default_zig_zag1d_16x16_neighbors);
#if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS #if CONFIG_TX32X32
init_scan_neighbors(vp9_default_zig_zag1d_32x32, 32, init_scan_neighbors(vp9_default_zig_zag1d_32x32, 32,
vp9_default_zig_zag1d_32x32_neighbors); vp9_default_zig_zag1d_32x32_neighbors);
#endif #endif
...@@ -645,7 +645,7 @@ const int *vp9_get_coef_neighbors_handle(const int *scan) { ...@@ -645,7 +645,7 @@ const int *vp9_get_coef_neighbors_handle(const int *scan) {
return vp9_default_zig_zag1d_8x8_neighbors; return vp9_default_zig_zag1d_8x8_neighbors;
} else if (scan == vp9_default_zig_zag1d_16x16) { } else if (scan == vp9_default_zig_zag1d_16x16) {
return vp9_default_zig_zag1d_16x16_neighbors; return vp9_default_zig_zag1d_16x16_neighbors;
#if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS #if CONFIG_TX32X32
} else if (scan == vp9_default_zig_zag1d_32x32) { } else if (scan == vp9_default_zig_zag1d_32x32) {
return vp9_default_zig_zag1d_32x32_neighbors; return vp9_default_zig_zag1d_32x32_neighbors;
#endif #endif
...@@ -693,7 +693,7 @@ void vp9_default_coef_probs(VP9_COMMON *pc) { ...@@ -693,7 +693,7 @@ void vp9_default_coef_probs(VP9_COMMON *pc) {
vpx_memcpy(pc->fc.hybrid_coef_probs_16x16, vpx_memcpy(pc->fc.hybrid_coef_probs_16x16,
default_hybrid_coef_probs_16x16, default_hybrid_coef_probs_16x16,
sizeof(pc->fc.hybrid_coef_probs_16x16)); sizeof(pc->fc.hybrid_coef_probs_16x16));
#if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS #if CONFIG_TX32X32
vpx_memcpy(pc->fc.coef_probs_32x32, default_coef_probs_32x32, vpx_memcpy(pc->fc.coef_probs_32x32, default_coef_probs_32x32,
sizeof(pc->fc.coef_probs_32x32)); sizeof(pc->fc.coef_probs_32x32));
#endif #endif
...@@ -840,7 +840,7 @@ void vp9_adapt_coef_probs(VP9_COMMON *cm) { ...@@ -840,7 +840,7 @@ void vp9_adapt_coef_probs(VP9_COMMON *cm) {
cm->fc.pre_hybrid_coef_probs_16x16, cm->fc.pre_hybrid_coef_probs_16x16,
BLOCK_TYPES_16X16, cm->fc.hybrid_coef_counts_16x16, BLOCK_TYPES_16X16, cm->fc.hybrid_coef_counts_16x16,
count_sat, update_factor); count_sat, update_factor);
#if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS #if CONFIG_TX32X32
update_coef_probs(cm->fc.coef_probs_32x32, cm->fc.pre_coef_probs_32x32, update_coef_probs(cm->fc.coef_probs_32x32, cm->fc.pre_coef_probs_32x32,
BLOCK_TYPES_32X32, cm->fc.coef_counts_32x32, BLOCK_TYPES_32X32, cm->fc.coef_counts_32x32,
count_sat, update_factor); count_sat, update_factor);
......
...@@ -66,7 +66,7 @@ extern vp9_extra_bit_struct vp9_extra_bits[12]; /* indexed by token value */ ...@@ -66,7 +66,7 @@ extern vp9_extra_bit_struct vp9_extra_bits[12]; /* indexed by token value */
#define BLOCK_TYPES_16X16 4 #define BLOCK_TYPES_16X16 4
#if CONFIG_SUPERBLOCKS && CONFIG_TX32X32 #if CONFIG_TX32X32
#define BLOCK_TYPES_32X32 4 #define BLOCK_TYPES_32X32 4
#endif #endif
...@@ -77,7 +77,7 @@ extern vp9_extra_bit_struct vp9_extra_bits[12]; /* indexed by token value */ ...@@ -77,7 +77,7 @@ extern vp9_extra_bit_struct vp9_extra_bits[12]; /* indexed by token value */
extern DECLARE_ALIGNED(16, const int, vp9_coef_bands_4x4[16]); extern DECLARE_ALIGNED(16, const int, vp9_coef_bands_4x4[16]);
extern DECLARE_ALIGNED(64, const int, vp9_coef_bands_8x8[64]); extern DECLARE_ALIGNED(64, const int, vp9_coef_bands_8x8[64]);
extern DECLARE_ALIGNED(16, const int, vp9_coef_bands_16x16[256]); extern DECLARE_ALIGNED(16, const int, vp9_coef_bands_16x16[256]);
#if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS #if CONFIG_TX32X32
extern DECLARE_ALIGNED(16, const int, vp9_coef_bands_32x32[1024]); extern DECLARE_ALIGNED(16, const int, vp9_coef_bands_32x32[1024]);
#endif #endif
...@@ -122,7 +122,7 @@ extern DECLARE_ALIGNED(16, const int, vp9_row_scan_4x4[16]); ...@@ -122,7 +122,7 @@ extern DECLARE_ALIGNED(16, const int, vp9_row_scan_4x4[16]);
extern DECLARE_ALIGNED(64, const int, vp9_default_zig_zag1d_8x8[64]); extern DECLARE_ALIGNED(64, const int, vp9_default_zig_zag1d_8x8[64]);
extern DECLARE_ALIGNED(16, const int, vp9_default_zig_zag1d_16x16[256]); extern DECLARE_ALIGNED(16, const int, vp9_default_zig_zag1d_16x16[256]);
#if CONFIG_SUPERBLOCKS && CONFIG_TX32X32 #if CONFIG_TX32X32
extern DECLARE_ALIGNED(16, const int, vp9_default_zig_zag1d_32x32[1024]); extern DECLARE_ALIGNED(16, const int, vp9_default_zig_zag1d_32x32[1024]);
#endif #endif
...@@ -154,7 +154,7 @@ extern DECLARE_ALIGNED(16, int, vp9_default_zig_zag1d_8x8_neighbors[ ...@@ -154,7 +154,7 @@ extern DECLARE_ALIGNED(16, int, vp9_default_zig_zag1d_8x8_neighbors[
64 * MAX_NEIGHBORS]); 64 * MAX_NEIGHBORS]);
extern DECLARE_ALIGNED(16, int, vp9_default_zig_zag1d_16x16_neighbors[ extern DECLARE_ALIGNED(16, int, vp9_default_zig_zag1d_16x16_neighbors[
256 * MAX_NEIGHBORS]); 256 * MAX_NEIGHBORS]);
#if CONFIG_SUPERBLOCKS && CONFIG_TX32X32 #if CONFIG_TX32X32
extern DECLARE_ALIGNED(16, int, vp9_default_zig_zag1d_32x32_neighbors[ extern DECLARE_ALIGNED(16, int, vp9_default_zig_zag1d_32x32_neighbors[
1024 * MAX_NEIGHBORS]); 1024 * MAX_NEIGHBORS]);
#endif #endif
......
...@@ -272,13 +272,11 @@ const vp9_tree_index vp9_mv_ref_tree[8] = { ...@@ -272,13 +272,11 @@ const vp9_tree_index vp9_mv_ref_tree[8] = {
-NEWMV, -SPLITMV -NEWMV, -SPLITMV
}; };
#if CONFIG_SUPERBLOCKS
const vp9_tree_index vp9_sb_mv_ref_tree[6] = { const vp9_tree_index vp9_sb_mv_ref_tree[6] = {
-ZEROMV, 2, -ZEROMV, 2,
-NEARESTMV, 4, -NEARESTMV, 4,
-NEARMV, -NEWMV -NEARMV, -NEWMV
}; };
#endif
const vp9_tree_index vp9_sub_mv_ref_tree[6] = { const vp9_tree_index vp9_sub_mv_ref_tree[6] = {
-LEFT4X4, 2, -LEFT4X4, 2,
...@@ -289,19 +287,15 @@ const vp9_tree_index vp9_sub_mv_ref_tree[6] = { ...@@ -289,19 +287,15 @@ const vp9_tree_index vp9_sub_mv_ref_tree[6] = {
struct vp9_token_struct vp9_bmode_encodings[VP9_NKF_BINTRAMODES]; struct vp9_token_struct vp9_bmode_encodings[VP9_NKF_BINTRAMODES];
struct vp9_token_struct vp9_kf_bmode_encodings[VP9_KF_BINTRAMODES]; struct vp9_token_struct vp9_kf_bmode_encodings[VP9_KF_BINTRAMODES];
struct vp9_token_struct vp9_ymode_encodings[VP9_YMODES]; struct vp9_token_struct vp9_ymode_encodings[VP9_YMODES];
#if CONFIG_SUPERBLOCKS
struct vp9_token_struct vp9_sb_ymode_encodings[VP9_I32X32_MODES]; struct vp9_token_struct vp9_sb_ymode_encodings[VP9_I32X32_MODES];
struct vp9_token_struct vp9_sb_kf_ymode_encodings[VP9_I32X32_MODES]; struct vp9_token_struct vp9_sb_kf_ymode_encodings[VP9_I32X32_MODES];
#endif
struct vp9_token_struct vp9_kf_ymode_encodings[VP9_YMODES]; struct vp9_token_struct vp9_kf_ymode_encodings[VP9_YMODES];
struct vp9_token_struct vp9_uv_mode_encodings[VP9_UV_MODES]; struct vp9_token_struct vp9_uv_mode_encodings[VP9_UV_MODES];
struct vp9_token_struct vp9_i8x8_mode_encodings[VP9_I8X8_MODES]; struct vp9_token_struct vp9_i8x8_mode_encodings[VP9_I8X8_MODES];
struct vp9_token_struct vp9_mbsplit_encodings[VP9_NUMMBSPLITS]; struct vp9_token_struct vp9_mbsplit_encodings[VP9_NUMMBSPLITS];
struct vp9_token_struct vp9_mv_ref_encoding_array[VP9_MVREFS]; struct vp9_token_struct vp9_mv_ref_encoding_array[VP9_MVREFS];
#if CONFIG_SUPERBLOCKS
struct vp9_token_struct vp9_sb_mv_ref_encoding_array[VP9_MVREFS]; struct vp9_token_struct vp9_sb_mv_ref_encoding_array[VP9_MVREFS];
#endif
struct vp9_token_struct vp9_sub_mv_ref_encoding_array[VP9_SUBMVREFS]; struct vp9_token_struct vp9_sub_mv_ref_encoding_array[VP9_SUBMVREFS];
void vp9_init_mbmode_probs(VP9_COMMON *x) { void vp9_init_mbmode_probs(VP9_COMMON *x) {
...@@ -310,24 +304,20 @@ void vp9_init_mbmode_probs(VP9_COMMON *x) { ...@@ -310,24 +304,20 @@ void vp9_init_mbmode_probs(VP9_COMMON *x) {
vp9_tree_probs_from_distribution(VP9_YMODES, vp9_ymode_encodings, vp9_tree_probs_from_distribution(VP9_YMODES, vp9_ymode_encodings,
vp9_ymode_tree, x->fc.ymode_prob, vp9_ymode_tree, x->fc.ymode_prob,
bct, y_mode_cts); bct, y_mode_cts);
#if CONFIG_SUPERBLOCKS
vp9_tree_probs_from_distribution(VP9_I32X32_MODES, vp9_sb_ymode_encodings, vp9_tree_probs_from_distribution(VP9_I32X32_MODES, vp9_sb_ymode_encodings,
vp9_sb_ymode_tree, x->fc.sb_ymode_prob, vp9_sb_ymode_tree, x->fc.sb_ymode_prob,
bct, y_mode_cts); bct, y_mode_cts);
#endif
{ {
int i; int i;
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
vp9_tree_probs_from_distribution(VP9_YMODES, vp9_kf_ymode_encodings, vp9_tree_probs_from_distribution(VP9_YMODES, vp9_kf_ymode_encodings,
vp9_kf_ymode_tree, x->kf_ymode_prob[i], vp9_kf_ymode_tree, x->kf_ymode_prob[i],
bct, kf_y_mode_cts[i]); bct, kf_y_mode_cts[i]);
#if CONFIG_SUPERBLOCKS
vp9_tree_probs_from_distribution(VP9_I32X32_MODES, vp9_tree_probs_from_distribution(VP9_I32X32_MODES,
vp9_sb_kf_ymode_encodings, vp9_sb_kf_ymode_encodings,
vp9_sb_kf_ymode_tree, vp9_sb_kf_ymode_tree,
x->sb_kf_ymode_prob[i], bct, x->sb_kf_ymode_prob[i], bct,
kf_y_mode_cts[i]); kf_y_mode_cts[i]);
#endif
} }
} }
{ {
...@@ -426,10 +416,8 @@ void vp9_entropy_mode_init() { ...@@ -426,10 +416,8 @@ void vp9_entropy_mode_init() {
vp9_tokens_from_tree(vp9_bmode_encodings, vp9_bmode_tree); vp9_tokens_from_tree(vp9_bmode_encodings, vp9_bmode_tree);
vp9_tokens_from_tree(vp9_ymode_encodings, vp9_ymode_tree); vp9_tokens_from_tree(vp9_ymode_encodings, vp9_ymode_tree);
vp9_tokens_from_tree(vp9_kf_ymode_encodings, vp9_kf_ymode_tree); vp9_tokens_from_tree(vp9_kf_ymode_encodings, vp9_kf_ymode_tree);
#if CONFIG_SUPERBLOCKS
vp9_tokens_from_tree(vp9_sb_ymode_encodings, vp9_sb_ymode_tree); vp9_tokens_from_tree(vp9_sb_ymode_encodings, vp9_sb_ymode_tree);
vp9_tokens_from_tree(vp9_sb_kf_ymode_encodings, vp9_sb_kf_ymode_tree); vp9_tokens_from_tree(vp9_sb_kf_ymode_encodings, vp9_sb_kf_ymode_tree);
#endif
vp9_tokens_from_tree(vp9_uv_mode_encodings, vp9_uv_mode_tree); vp9_tokens_from_tree(vp9_uv_mode_encodings, vp9_uv_mode_tree);
vp9_tokens_from_tree(vp9_i8x8_mode_encodings, vp9_i8x8_mode_tree); vp9_tokens_from_tree(vp9_i8x8_mode_encodings, vp9_i8x8_mode_tree);
vp9_tokens_from_tree(vp9_mbsplit_encodings, vp9_mbsplit_tree); vp9_tokens_from_tree(vp9_mbsplit_encodings, vp9_mbsplit_tree);
...@@ -438,10 +426,8 @@ void vp9_entropy_mode_init() { ...@@ -438,10 +426,8 @@ void vp9_entropy_mode_init() {
vp9_tokens_from_tree_offset(vp9_mv_ref_encoding_array, vp9_tokens_from_tree_offset(vp9_mv_ref_encoding_array,
vp9_mv_ref_tree, NEARESTMV); vp9_mv_ref_tree, NEARESTMV);
#if CONFIG_SUPERBLOCKS
vp9_tokens_from_tree_offset(vp9_sb_mv_ref_encoding_array, vp9_tokens_from_tree_offset(vp9_sb_mv_ref_encoding_array,
vp9_sb_mv_ref_tree, NEARESTMV); vp9_sb_mv_ref_tree, NEARESTMV);
#endif
vp9_tokens_from_tree_offset(vp9_sub_mv_ref_encoding_array, vp9_tokens_from_tree_offset(vp9_sub_mv_ref_encoding_array,
vp9_sub_mv_ref_tree, LEFT4X4); vp9_sub_mv_ref_tree, LEFT4X4);
} }
...@@ -599,11 +585,9 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) { ...@@ -599,11 +585,9 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) {
update_mode_probs(VP9_YMODES, vp9_ymode_encodings, vp9_ymode_tree, update_mode_probs(VP9_YMODES, vp9_ymode_encodings, vp9_ymode_tree,
cm->fc.ymode_counts, cm->fc.pre_ymode_prob, cm->fc.ymode_counts, cm->fc.pre_ymode_prob,
cm->fc.ymode_prob); cm->fc.ymode_prob);
#if CONFIG_SUPERBLOCKS
update_mode_probs(VP9_I32X32_MODES, vp9_sb_ymode_encodings, vp9_sb_ymode_tree, update_mode_probs(VP9_I32X32_MODES, vp9_sb_ymode_encodings, vp9_sb_ymode_tree,
cm->fc.sb_ymode_counts, cm->fc.pre_sb_ymode_prob, cm->fc.sb_ymode_counts, cm->fc.pre_sb_ymode_prob,
cm->fc.sb_ymode_prob); cm->fc.sb_ymode_prob);
#endif
for (i = 0; i < VP9_YMODES; ++i) { for (i = 0; i < VP9_YMODES; ++i) {
update_mode_probs(VP9_UV_MODES, vp9_uv_mode_encodings, vp9_uv_mode_tree, update_mode_probs(VP9_UV_MODES, vp9_uv_mode_encodings, vp9_uv_mode_tree,
cm->fc.uv_mode_counts[i], cm->fc.pre_uv_mode_prob[i], cm->fc.uv_mode_counts[i], cm->fc.pre_uv_mode_prob[i],
......
...@@ -190,7 +190,6 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd, ...@@ -190,7 +190,6 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
SP(this_mv.as_mv.row), SP(this_mv.as_mv.row),
above_src, xd->dst.y_stride, &sse); above_src, xd->dst.y_stride, &sse);
score += sse; score += sse;
#if CONFIG_SUPERBLOCKS
if (xd->mode_info_context->mbmi.sb_type >= BLOCK_SIZE_SB32X32) { if (xd->mode_info_context->mbmi.sb_type >= BLOCK_SIZE_SB32X32) {
vp9_sub_pixel_variance16x2_c(above_ref + offset + 16, vp9_sub_pixel_variance16x2_c(above_ref + offset + 16,
ref_y_stride, ref_y_stride,
...@@ -214,7 +213,6 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd, ...@@ -214,7 +213,6 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
above_src + 48, xd->dst.y_stride, &sse); above_src + 48, xd->dst.y_stride, &sse);
score += sse; score += sse;
} }
#endif
#endif #endif
} }
if (xd->left_available) { if (xd->left_available) {
...@@ -223,7 +221,6 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd, ...@@ -223,7 +221,6 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
SP(this_mv.as_mv.row), SP(this_mv.as_mv.row),
left_src, xd->dst.y_stride, &sse); left_src, xd->dst.y_stride, &sse);
score += sse; score += sse;
#if CONFIG_SUPERBLOCKS
if (xd->mode_info_context->mbmi.sb_type >= BLOCK_SIZE_SB32X32) { if (xd->mode_info_context->mbmi.sb_type >= BLOCK_SIZE_SB32X32) {
vp9_sub_pixel_variance2x16_c(left_ref + offset + ref_y_stride * 16, vp9_sub_pixel_variance2x16_c(left_ref + offset + ref_y_stride * 16,
ref_y_stride, ref_y_stride,
...@@ -250,7 +247,6 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd, ...@@ -250,7 +247,6 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
xd->dst.y_stride, &sse); xd->dst.y_stride, &sse);
score += sse; score += sse;
} }
#endif
#endif #endif
} }
#else #else
...@@ -263,7 +259,6 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd, ...@@ -263,7 +259,6 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
if (xd->up_available) { if (xd->up_available) {
score += vp9_sad16x3(above_src, xd->dst.y_stride, score += vp9_sad16x3(above_src, xd->dst.y_stride,
above_ref + offset, ref_y_stride); above_ref + offset, ref_y_stride);
#if CONFIG_SUPERBLOCKS
if (xd->mode_info_context->mbmi.sb_type >= BLOCK_SIZE_SB32X32) { if (xd->mode_info_context->mbmi.sb_type >= BLOCK_SIZE_SB32X32) {
score += vp9_sad16x3(above_src + 16, xd->dst.y_stride, score += vp9_sad16x3(above_src + 16, xd->dst.y_stride,
above_ref + offset + 16, ref_y_stride); above_ref + offset + 16, ref_y_stride);
...@@ -275,13 +270,11 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd, ...@@ -275,13 +270,11 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
score += vp9_sad16x3(above_src + 48, xd->dst.y_stride, score += vp9_sad16x3(above_src + 48, xd->dst.y_stride,
above_ref + offset + 48, ref_y_stride); above_ref + offset + 48, ref_y_stride);
} }
#endif
#endif #endif
} }
if (xd->left_available) { if (xd->left_available) {
score += vp9_sad3x16(left_src, xd->dst.y_stride, score += vp9_sad3x16(left_src, xd->dst.y_stride,
left_ref + offset, ref_y_stride); left_ref + offset, ref_y_stride);
#if CONFIG_SUPERBLOCKS
if (xd->mode_info_context->mbmi.sb_type >= BLOCK_SIZE_SB32X32) { if (xd->mode_info_context->mbmi.sb_type >= BLOCK_SIZE_SB32X32) {
score += vp9_sad3x16(left_src + xd->dst.y_stride * 16, score += vp9_sad3x16(left_src + xd->dst.y_stride * 16,
xd->dst.y_stride, xd->dst.y_stride,
...@@ -299,7 +292,6 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd, ...@@ -299,7 +292,6 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
left_ref + offset + ref_y_stride * 48, left_ref + offset + ref_y_stride * 48,
ref_y_stride); ref_y_stride);
} }
#endif
#endif #endif
} }
#endif #endif
......
...@@ -146,7 +146,7 @@ void vp9_inverse_transform_mb_16x16(MACROBLOCKD *xd) { ...@@ -146,7 +146,7 @@ void vp9_inverse_transform_mb_16x16(MACROBLOCKD *xd) {
vp9_inverse_transform_mbuv_8x8(xd); vp9_inverse_transform_mbuv_8x8(xd);
} }
#if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS #if CONFIG_TX32X32
void vp9_inverse_transform_sby_32x32(SUPERBLOCKD *xd_sb) { void vp9_inverse_transform_sby_32x32(SUPERBLOCKD *xd_sb) {
vp9_short_idct32x32(xd_sb->dqcoeff, xd_sb->diff, 64); vp9_short_idct32x32(xd_sb->dqcoeff, xd_sb->diff, 64);
} }
......
...@@ -39,7 +39,7 @@ extern void vp9_inverse_transform_mb_16x16(MACROBLOCKD *xd); ...@@ -39,7 +39,7 @@ extern void vp9_inverse_transform_mb_16x16(MACROBLOCKD *xd);
extern void vp9_inverse_transform_mby_16x16(MACROBLOCKD *xd); extern void vp9_inverse_transform_mby_16x16(MACROBLOCKD *xd);