diff --git a/configure b/configure index 5c015b3d6..a799be06f 100755 --- a/configure +++ b/configure @@ -247,7 +247,6 @@ EXPERIMENT_LIST=" loop_dering scatterscan oneshotq - sbsegment multiple_arf code_zerogroup sb8x8 diff --git a/vp9/common/vp9_blockd.c b/vp9/common/vp9_blockd.c index 6a68f6ee2..d06e1b2f5 100644 --- a/vp9/common/vp9_blockd.c +++ b/vp9/common/vp9_blockd.c @@ -60,7 +60,6 @@ const uint8_t vp9_block2above[TX_SIZE_MAX_MB][24] = { #define S(x) x + sizeof(ENTROPY_CONTEXT_PLANES) / sizeof(ENTROPY_CONTEXT) -#if CONFIG_SBSEGMENT const uint8_t vp9_block2left_sb16x32[TX_SIZE_MAX_MB][48] = { { 0, 0, 0, 0, 1, 1, 1, 1, @@ -190,7 +189,6 @@ const uint8_t vp9_block2above_sb32x16[TX_SIZE_MAX_MB][48] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, }; -#endif const uint8_t vp9_block2left_sb[TX_SIZE_MAX_SB][96] = { { 0, 0, 0, 0, 0, 0, 0, 0, @@ -312,7 +310,6 @@ const uint8_t vp9_block2above_sb[TX_SIZE_MAX_SB][96] = { #define T(x) x + 2 * (sizeof(ENTROPY_CONTEXT_PLANES) / sizeof(ENTROPY_CONTEXT)) #define U(x) x + 3 * (sizeof(ENTROPY_CONTEXT_PLANES) / sizeof(ENTROPY_CONTEXT)) -#if CONFIG_SBSEGMENT const uint8_t vp9_block2left_sb32x64[TX_SIZE_MAX_SB][192] = { { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, @@ -656,7 +653,6 @@ const uint8_t vp9_block2above_sb64x32[TX_SIZE_MAX_SB][192] = { T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0) }, }; -#endif const uint8_t vp9_block2left_sb64[TX_SIZE_MAX_SB][384] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/vp9/common/vp9_blockd.h b/vp9/common/vp9_blockd.h index 1e55bed9b..c6cf6c05b 100644 --- a/vp9/common/vp9_blockd.h +++ b/vp9/common/vp9_blockd.h @@ -202,18 +202,12 @@ typedef enum { static INLINE int mb_width_log2(BLOCK_SIZE_TYPE sb_type) { switch (sb_type) { -#if CONFIG_SBSEGMENT - case BLOCK_SIZE_SB16X32: -#endif - case BLOCK_SIZE_MB16X16: return 0; -#if CONFIG_SBSEGMENT + case BLOCK_SIZE_MB16X16: + case BLOCK_SIZE_SB16X32: return 0; case BLOCK_SIZE_SB32X16: case BLOCK_SIZE_SB32X64: -#endif case BLOCK_SIZE_SB32X32: return 1; -#if CONFIG_SBSEGMENT case BLOCK_SIZE_SB64X32: -#endif case BLOCK_SIZE_SB64X64: return 2; default: assert(0); } @@ -221,18 +215,12 @@ static INLINE int mb_width_log2(BLOCK_SIZE_TYPE sb_type) { static INLINE int mb_height_log2(BLOCK_SIZE_TYPE sb_type) { switch (sb_type) { -#if CONFIG_SBSEGMENT - case BLOCK_SIZE_SB32X16: -#endif - case BLOCK_SIZE_MB16X16: return 0; -#if CONFIG_SBSEGMENT + case BLOCK_SIZE_MB16X16: + case BLOCK_SIZE_SB32X16: return 0; case BLOCK_SIZE_SB16X32: case BLOCK_SIZE_SB64X32: -#endif case BLOCK_SIZE_SB32X32: return 1; -#if CONFIG_SBSEGMENT case BLOCK_SIZE_SB32X64: -#endif case BLOCK_SIZE_SB64X64: return 2; default: assert(0); } @@ -470,7 +458,6 @@ static INLINE void update_partition_context(MACROBLOCKD *xd, xd->left_seg_context[i] = ~(0xf << boffset); for (i = 0; i < bs; i++) xd->above_seg_context[i] = ~(0xf << boffset); -#if CONFIG_SBSEGMENT } else if ((bwl == bsl) && (bhl < bsl)) { for (i = 0; i < bs; i++) xd->left_seg_context[i] = ~(0xe << boffset); @@ -481,7 +468,6 @@ static INLINE void update_partition_context(MACROBLOCKD *xd, xd->left_seg_context[i] = ~(0xf << boffset); for (i = 0; i < bs; i++) xd->above_seg_context[i] = ~(0xe << boffset); -#endif } else if ((bwl < bsl) && (bhl < bsl)) { for (i = 0; i < bs; i++) xd->left_seg_context[i] = ~(0xe << boffset); @@ -571,7 +557,6 @@ extern const uint8_t vp9_block2left_sb[TX_SIZE_MAX_SB][96]; extern const uint8_t vp9_block2above_sb[TX_SIZE_MAX_SB][96]; extern const uint8_t vp9_block2left_sb64[TX_SIZE_MAX_SB][384]; extern const uint8_t vp9_block2above_sb64[TX_SIZE_MAX_SB][384]; -#if CONFIG_SBSEGMENT extern const uint8_t vp9_block2left_sb16x32[TX_SIZE_MAX_MB][48]; extern const uint8_t vp9_block2above_sb16x32[TX_SIZE_MAX_MB][48]; extern const uint8_t vp9_block2left_sb32x16[TX_SIZE_MAX_MB][48]; @@ -580,7 +565,6 @@ extern const uint8_t vp9_block2left_sb32x64[TX_SIZE_MAX_SB][192]; extern const uint8_t vp9_block2above_sb32x64[TX_SIZE_MAX_SB][192]; extern const uint8_t vp9_block2left_sb64x32[TX_SIZE_MAX_SB][192]; extern const uint8_t vp9_block2above_sb64x32[TX_SIZE_MAX_SB][192]; -#endif #define USE_ADST_FOR_I16X16_8X8 1 #define USE_ADST_FOR_I16X16_4X4 1 @@ -786,10 +770,8 @@ static TX_SIZE get_uv_tx_size(const MACROBLOCKD *xd) { switch (mbmi->sb_type) { case BLOCK_SIZE_SB64X64: return size; -#if CONFIG_SBSEGMENT case BLOCK_SIZE_SB64X32: case BLOCK_SIZE_SB32X64: -#endif case BLOCK_SIZE_SB32X32: if (size == TX_32X32) return TX_16X16; diff --git a/vp9/common/vp9_entropymode.c b/vp9/common/vp9_entropymode.c index fc93c9961..626c7d4cf 100644 --- a/vp9/common/vp9_entropymode.c +++ b/vp9/common/vp9_entropymode.c @@ -151,7 +151,6 @@ const int vp9_mbsplit_count [VP9_NUMMBSPLITS] = { 2, 2, 4, 16}; const vp9_prob vp9_mbsplit_probs [VP9_NUMMBSPLITS - 1] = { 110, 111, 150}; -#if CONFIG_SBSEGMENT const vp9_prob vp9_partition_probs[NUM_PARTITION_CONTEXTS] [PARTITION_TYPES - 1] = { {202, 162, 107}, @@ -163,13 +162,6 @@ const vp9_prob vp9_partition_probs[NUM_PARTITION_CONTEXTS] {67, 208, 22}, {4, 17, 5}, }; -#else -const vp9_prob vp9_partition_probs[NUM_PARTITION_CONTEXTS] - [PARTITION_TYPES - 1] = { - {200}, {200}, {200}, {200}, - {200}, {200}, {200}, {200}, -}; -#endif /* Array indices are identical to previously-existing INTRAMODECONTEXTNODES. */ @@ -303,17 +295,11 @@ const vp9_tree_index vp9_sub_mv_ref_tree[6] = { -ZERO4X4, -NEW4X4 }; -#if CONFIG_SBSEGMENT const vp9_tree_index vp9_partition_tree[6] = { -PARTITION_NONE, 2, -PARTITION_HORZ, 4, -PARTITION_VERT, -PARTITION_SPLIT }; -#else -const vp9_tree_index vp9_partition_tree[2] = { - -PARTITION_NONE, -PARTITION_SPLIT -}; -#endif struct vp9_token vp9_bmode_encodings[VP9_NKF_BINTRAMODES]; struct vp9_token vp9_kf_bmode_encodings[VP9_KF_BINTRAMODES]; diff --git a/vp9/common/vp9_enums.h b/vp9/common/vp9_enums.h index d9a6721a7..23ed3e145 100644 --- a/vp9/common/vp9_enums.h +++ b/vp9/common/vp9_enums.h @@ -16,30 +16,22 @@ typedef enum BLOCK_SIZE_TYPE { #if CONFIG_SB8X8 BLOCK_SIZE_SB8X8, -#if CONFIG_SBSEGMENT BLOCK_SIZE_SB8X16, BLOCK_SIZE_SB16X8, -#endif #endif BLOCK_SIZE_MB16X16, -#if CONFIG_SBSEGMENT BLOCK_SIZE_SB16X32, BLOCK_SIZE_SB32X16, -#endif BLOCK_SIZE_SB32X32, -#if CONFIG_SBSEGMENT BLOCK_SIZE_SB32X64, BLOCK_SIZE_SB64X32, -#endif BLOCK_SIZE_SB64X64, } BLOCK_SIZE_TYPE; typedef enum PARTITION_TYPE { PARTITION_NONE, -#if CONFIG_SBSEGMENT PARTITION_HORZ, PARTITION_VERT, -#endif PARTITION_SPLIT, PARTITION_TYPES } PARTITION_TYPE; diff --git a/vp9/common/vp9_reconintra.c b/vp9/common/vp9_reconintra.c index 4e786b0f8..23fc55205 100644 --- a/vp9/common/vp9_reconintra.c +++ b/vp9/common/vp9_reconintra.c @@ -310,7 +310,6 @@ void vp9_build_intra_predictors(uint8_t *src, int src_stride, ypred_ptr += y_stride; } break; -#if CONFIG_SBSEGMENT case D45_PRED: case D135_PRED: case D117_PRED: @@ -319,7 +318,6 @@ void vp9_build_intra_predictors(uint8_t *src, int src_stride, case D63_PRED: if (bw == bh) { switch (mode) { -#endif case D45_PRED: d45_predictor(ypred_ptr, y_stride, bw, bh, yabove_row, yleft_col); break; @@ -338,7 +336,6 @@ void vp9_build_intra_predictors(uint8_t *src, int src_stride, case D63_PRED: d63_predictor(ypred_ptr, y_stride, bw, bh, yabove_row, yleft_col); break; -#if CONFIG_SBSEGMENT default: assert(0); } @@ -398,7 +395,6 @@ void vp9_build_intra_predictors(uint8_t *src, int src_stride, memcpy(ypred_ptr + y_stride * i, pred + i * 64, bw); } break; -#endif default: break; } diff --git a/vp9/common/vp9_rtcd_defs.sh b/vp9/common/vp9_rtcd_defs.sh index 61a2de45f..40fe41c20 100644 --- a/vp9/common/vp9_rtcd_defs.sh +++ b/vp9/common/vp9_rtcd_defs.sh @@ -306,8 +306,6 @@ if [ "$CONFIG_VP9_ENCODER" = "yes" ]; then # variance [ $arch = "x86_64" ] && mmx_x86_64=mmx && sse2_x86_64=sse2 -if [ "$CONFIG_SBSEGMENT" = "yes" ]; then - prototype unsigned int vp9_variance32x16 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse" specialize vp9_variance32x16 @@ -320,8 +318,6 @@ specialize vp9_variance64x32 prototype unsigned int vp9_variance32x64 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse" specialize vp9_variance32x64 -fi - prototype unsigned int vp9_variance32x32 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse" specialize vp9_variance32x32 @@ -356,8 +352,6 @@ vp9_variance4x4_mmx=vp9_variance4x4_mmx prototype unsigned int vp9_sub_pixel_variance64x64 "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse" specialize vp9_sub_pixel_variance64x64 sse2 -if [ "$CONFIG_SBSEGMENT" = "yes" ]; then - prototype unsigned int vp9_sub_pixel_variance32x64 "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse" specialize vp9_sub_pixel_variance32x64 @@ -370,8 +364,6 @@ specialize vp9_sub_pixel_variance32x16 prototype unsigned int vp9_sub_pixel_variance16x32 "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse" specialize vp9_sub_pixel_variance16x32 -fi - prototype unsigned int vp9_sub_pixel_variance32x32 "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse" specialize vp9_sub_pixel_variance32x32 sse2 @@ -398,8 +390,6 @@ vp9_sub_pixel_variance4x4_sse2=vp9_sub_pixel_variance4x4_wmt prototype unsigned int vp9_sad64x64 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad" specialize vp9_sad64x64 sse2 -if [ "$CONFIG_SBSEGMENT" = "yes" ]; then - prototype unsigned int vp9_sad32x64 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad" specialize vp9_sad32x64 sse2 @@ -412,8 +402,6 @@ specialize vp9_sad32x16 sse2 prototype unsigned int vp9_sad16x32 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad" specialize vp9_sad16x32 sse2 -fi - prototype unsigned int vp9_sad32x32 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad" specialize vp9_sad32x32 sse2 @@ -507,8 +495,6 @@ specialize vp9_sad4x4x8 sse4 prototype void vp9_sad64x64x4d "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array" specialize vp9_sad64x64x4d sse2 -if [ "$CONFIG_SBSEGMENT" = "yes" ]; then - prototype void vp9_sad32x64x4d "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array" specialize vp9_sad32x64x4d sse2 @@ -521,8 +507,6 @@ specialize vp9_sad32x16x4d sse2 prototype void vp9_sad16x32x4d "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array" specialize vp9_sad16x32x4d sse2 -fi - prototype void vp9_sad32x32x4d "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array" specialize vp9_sad32x32x4d sse2 diff --git a/vp9/decoder/vp9_decodframe.c b/vp9/decoder/vp9_decodframe.c index a3445c03a..dae987aba 100644 --- a/vp9/decoder/vp9_decodframe.c +++ b/vp9/decoder/vp9_decodframe.c @@ -882,7 +882,6 @@ static void decode_modes_sb(VP9D_COMP *pbi, int mb_row, int mb_col, subsize = bsize; decode_modes_b(pbi, mb_row, mb_col, r, subsize); break; -#if CONFIG_SBSEGMENT case PARTITION_HORZ: subsize = (bsize == BLOCK_SIZE_SB64X64) ? BLOCK_SIZE_SB64X32 : BLOCK_SIZE_SB32X16; @@ -897,7 +896,6 @@ static void decode_modes_sb(VP9D_COMP *pbi, int mb_row, int mb_col, if ((mb_col + bs) < pc->mb_cols) decode_modes_b(pbi, mb_row, mb_col + bs, r, subsize); break; -#endif case PARTITION_SPLIT: subsize = (bsize == BLOCK_SIZE_SB64X64) ? BLOCK_SIZE_SB32X32 : BLOCK_SIZE_MB16X16; diff --git a/vp9/decoder/vp9_detokenize.c b/vp9/decoder/vp9_detokenize.c index 02ee7c3d6..e33123250 100644 --- a/vp9/decoder/vp9_detokenize.c +++ b/vp9/decoder/vp9_detokenize.c @@ -136,25 +136,21 @@ static int decode_coefs(VP9D_COMP *dx, const MACROBLOCKD *xd, if (xd->mode_info_context->mbmi.sb_type == BLOCK_SIZE_SB64X64) { aidx = vp9_block2above_sb64[txfm_size][block_idx]; lidx = vp9_block2left_sb64[txfm_size][block_idx]; -#if CONFIG_SBSEGMENT } else if (xd->mode_info_context->mbmi.sb_type == BLOCK_SIZE_SB64X32) { aidx = vp9_block2above_sb64x32[txfm_size][block_idx]; lidx = vp9_block2left_sb64x32[txfm_size][block_idx]; } else if (xd->mode_info_context->mbmi.sb_type == BLOCK_SIZE_SB32X64) { aidx = vp9_block2above_sb32x64[txfm_size][block_idx]; lidx = vp9_block2left_sb32x64[txfm_size][block_idx]; -#endif } else if (xd->mode_info_context->mbmi.sb_type == BLOCK_SIZE_SB32X32) { aidx = vp9_block2above_sb[txfm_size][block_idx]; lidx = vp9_block2left_sb[txfm_size][block_idx]; -#if CONFIG_SBSEGMENT } else if (xd->mode_info_context->mbmi.sb_type == BLOCK_SIZE_SB32X16) { aidx = vp9_block2above_sb32x16[txfm_size][block_idx]; lidx = vp9_block2left_sb32x16[txfm_size][block_idx]; } else if (xd->mode_info_context->mbmi.sb_type == BLOCK_SIZE_SB16X32) { aidx = vp9_block2above_sb16x32[txfm_size][block_idx]; lidx = vp9_block2left_sb16x32[txfm_size][block_idx]; -#endif } else { aidx = vp9_block2above[txfm_size][block_idx]; lidx = vp9_block2left[txfm_size][block_idx]; diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c index 978fdcdfe..df45c9a13 100644 --- a/vp9/encoder/vp9_bitstream.c +++ b/vp9/encoder/vp9_bitstream.c @@ -1179,9 +1179,7 @@ static void write_modes_sb(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc, MACROBLOCKD *xd = &cpi->mb.e_mbd; const int mis = cm->mode_info_stride; int bwl, bhl; -#if CONFIG_SBSEGMENT int bw, bh; -#endif int bsl = mb_width_log2(bsize), bs = (1 << bsl) / 2; int n; PARTITION_TYPE partition; @@ -1192,20 +1190,16 @@ static void write_modes_sb(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc, bwl = mb_width_log2(m->mbmi.sb_type); bhl = mb_height_log2(m->mbmi.sb_type); -#if CONFIG_SBSEGMENT bw = 1 << bwl; bh = 1 << bhl; -#endif // parse the partition type if ((bwl == bsl) && (bhl == bsl)) partition = PARTITION_NONE; -#if CONFIG_SBSEGMENT else if ((bwl == bsl) && (bhl < bsl)) partition = PARTITION_HORZ; else if ((bwl < bsl) && (bhl == bsl)) partition = PARTITION_VERT; -#endif else if ((bwl < bsl) && (bhl < bsl)) partition = PARTITION_SPLIT; else @@ -1226,7 +1220,6 @@ static void write_modes_sb(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc, subsize = bsize; write_modes_b(cpi, m, bc, tok, tok_end, mb_row, mb_col); break; -#if CONFIG_SBSEGMENT case PARTITION_HORZ: subsize = (bsize == BLOCK_SIZE_SB64X64) ? BLOCK_SIZE_SB64X32 : BLOCK_SIZE_SB32X16; @@ -1241,7 +1234,6 @@ static void write_modes_sb(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc, if ((mb_col + bw) < cm->mb_cols) write_modes_b(cpi, m + bw, bc, tok, tok_end, mb_row, mb_col + bw); break; -#endif case PARTITION_SPLIT: // TODO(jingning): support recursive partitioning down to 16x16 as for // now. need to merge in 16x8, 8x16, 8x8, and smaller partitions. diff --git a/vp9/encoder/vp9_block.h b/vp9/encoder/vp9_block.h index eede4cb64..ea632b5cf 100644 --- a/vp9/encoder/vp9_block.h +++ b/vp9/encoder/vp9_block.h @@ -152,16 +152,12 @@ struct macroblock { // Structure to hold context for each of the 4 MBs within a SB: // when encoded as 4 independent MBs: PICK_MODE_CONTEXT mb_context[4][4]; -#if CONFIG_SBSEGMENT PICK_MODE_CONTEXT sb32x16_context[4][2]; PICK_MODE_CONTEXT sb16x32_context[4][2]; -#endif // when 4 MBs share coding parameters: PICK_MODE_CONTEXT sb32_context[4]; -#if CONFIG_SBSEGMENT PICK_MODE_CONTEXT sb32x64_context[2]; PICK_MODE_CONTEXT sb64x32_context[2]; -#endif PICK_MODE_CONTEXT sb64_context; int partition_cost[NUM_PARTITION_CONTEXTS][PARTITION_TYPES]; diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index 5bc164400..e69d5633a 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -773,7 +773,6 @@ static void encode_sb(VP9_COMP *cpi, (*tp)->token = EOSB_TOKEN; (*tp)++; } -#if CONFIG_SBSEGMENT } else if (is_sb == BLOCK_SIZE_SB16X32) { int i; @@ -810,7 +809,6 @@ static void encode_sb(VP9_COMP *cpi, (*tp)++; } } -#endif } else { int i; if (output_enabled) @@ -881,9 +879,7 @@ static void encode_sb64(VP9_COMP *cpi, (*tp)->token = EOSB_TOKEN; (*tp)++; - cpi->partition_count[pl][PARTITION_NONE]++; -#if CONFIG_SBSEGMENT } else if (is_sb[0] == BLOCK_SIZE_SB32X64) { int i; @@ -912,7 +908,6 @@ static void encode_sb64(VP9_COMP *cpi, (*tp)->token = EOSB_TOKEN; (*tp)++; } -#endif } else { int i; cpi->partition_count[pl][PARTITION_SPLIT]++; @@ -1021,7 +1016,6 @@ static void encode_sb_row(VP9_COMP *cpi, sb64_skip += splitmodes_used; } -#if CONFIG_SBSEGMENT // check 32x16 if (mb_col + x_idx + 1 < cm->mb_cols) { int r, d; @@ -1103,7 +1097,6 @@ static void encode_sb_row(VP9_COMP *cpi, vpx_memcpy(cm->left_context + y_idx, l2, sizeof(l2)); vpx_memcpy(cm->above_context + mb_col + x_idx, a2, sizeof(a2)); } -#endif if (!sb32_skip && !(mb_col + x_idx + 1 >= cm->mb_cols || mb_row + y_idx + 1 >= cm->mb_rows)) { @@ -1155,7 +1148,6 @@ static void encode_sb_row(VP9_COMP *cpi, pl = partition_plane_context(xd, BLOCK_SIZE_SB64X64); sb64_rate += x->partition_cost[pl][PARTITION_SPLIT]; -#if CONFIG_SBSEGMENT // check 64x32 if (mb_col + 3 < cm->mb_cols && !(cm->mb_rows & 1)) { int r, d; @@ -1235,7 +1227,6 @@ static void encode_sb_row(VP9_COMP *cpi, vpx_memcpy(cm->left_context, l, sizeof(l)); vpx_memcpy(cm->above_context + mb_col, a, sizeof(a)); } -#endif if (!sb64_skip && !(mb_col + 3 >= cm->mb_cols || mb_row + 3 >= cm->mb_rows)) { @@ -1545,7 +1536,6 @@ static void reset_skip_txfm_size(VP9_COMP *cpi, TX_SIZE txfm_max) { reset_skip_txfm_size_sb(cpi, mi, mis, txfm_max, cm->mb_rows - mb_row, cm->mb_cols - mb_col, BLOCK_SIZE_SB64X64); -#if CONFIG_SBSEGMENT } else if (mi->mbmi.sb_type == BLOCK_SIZE_SB64X32) { reset_skip_txfm_size_sb(cpi, mi, mis, txfm_max, cm->mb_rows - mb_row, cm->mb_cols - mb_col, @@ -1564,7 +1554,6 @@ static void reset_skip_txfm_size(VP9_COMP *cpi, TX_SIZE txfm_max) { cm->mb_rows - mb_row, cm->mb_cols - mb_col - 2, BLOCK_SIZE_SB32X64); -#endif } else { int i; @@ -1581,7 +1570,6 @@ static void reset_skip_txfm_size(VP9_COMP *cpi, TX_SIZE txfm_max) { cm->mb_rows - mb_row - y_idx_sb, cm->mb_cols - mb_col - x_idx_sb, BLOCK_SIZE_SB32X32); -#if CONFIG_SBSEGMENT } else if (sb_mi->mbmi.sb_type == BLOCK_SIZE_SB32X16) { reset_skip_txfm_size_sb(cpi, sb_mi, mis, txfm_max, cm->mb_rows - mb_row - y_idx_sb, @@ -1602,7 +1590,6 @@ static void reset_skip_txfm_size(VP9_COMP *cpi, TX_SIZE txfm_max) { cm->mb_rows - mb_row - y_idx_sb, cm->mb_cols - mb_col - x_idx_sb - 1, BLOCK_SIZE_SB16X32); -#endif } else { int m; diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c index c2c587e10..9d693a09a 100644 --- a/vp9/encoder/vp9_onyx_if.c +++ b/vp9/encoder/vp9_onyx_if.c @@ -1631,7 +1631,6 @@ VP9_PTR vp9_create_compressor(VP9_CONFIG *oxcf) { cpi->fn_ptr[BT].sdx8f = SDX8F; \ cpi->fn_ptr[BT].sdx4df = SDX4DF; -#if CONFIG_SBSEGMENT BFP(BLOCK_32X16, vp9_sad32x16, vp9_variance32x16, vp9_sub_pixel_variance32x16, NULL, NULL, NULL, NULL, NULL, @@ -1651,7 +1650,6 @@ VP9_PTR vp9_create_compressor(VP9_CONFIG *oxcf) { NULL, NULL, NULL, NULL, NULL, vp9_sad32x64x4d) -#endif BFP(BLOCK_32X32, vp9_sad32x32, vp9_variance32x32, vp9_sub_pixel_variance32x32, vp9_variance_halfpixvar32x32_h, vp9_variance_halfpixvar32x32_v, diff --git a/vp9/encoder/vp9_onyx_int.h b/vp9/encoder/vp9_onyx_int.h index 4fff2334f..a01c7d16e 100644 --- a/vp9/encoder/vp9_onyx_int.h +++ b/vp9/encoder/vp9_onyx_int.h @@ -280,12 +280,10 @@ enum BlockSize { BLOCK_16X16, BLOCK_MAX_SEGMENTS, BLOCK_32X32 = BLOCK_MAX_SEGMENTS, -#if CONFIG_SBSEGMENT BLOCK_32X16, BLOCK_16X32, BLOCK_64X32, BLOCK_32X64, -#endif BLOCK_64X64, BLOCK_MAX_SB_SEGMENTS, }; diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c index f846cf311..c448ce596 100644 --- a/vp9/encoder/vp9_rdopt.c +++ b/vp9/encoder/vp9_rdopt.c @@ -2779,15 +2779,11 @@ static void model_rd_from_var_lapndz(int var, int n, int qstep, static enum BlockSize y_to_uv_block_size(enum BlockSize bs) { switch (bs) { case BLOCK_64X64: return BLOCK_32X32; -#if CONFIG_SBSEGMENT case BLOCK_64X32: return BLOCK_32X16; case BLOCK_32X64: return BLOCK_16X32; -#endif case BLOCK_32X32: return BLOCK_16X16; -#if CONFIG_SBSEGMENT case BLOCK_32X16: return BLOCK_16X8; case BLOCK_16X32: return BLOCK_8X16; -#endif case BLOCK_16X16: return BLOCK_8X8; default: assert(0); @@ -2798,15 +2794,11 @@ static enum BlockSize y_to_uv_block_size(enum BlockSize bs) { static enum BlockSize y_bsizet_to_block_size(BLOCK_SIZE_TYPE bs) { switch (bs) { case BLOCK_SIZE_SB64X64: return BLOCK_64X64; -#if CONFIG_SBSEGMENT case BLOCK_SIZE_SB64X32: return BLOCK_64X32; case BLOCK_SIZE_SB32X64: return BLOCK_32X64; -#endif case BLOCK_SIZE_SB32X32: return BLOCK_32X32; -#if CONFIG_SBSEGMENT case BLOCK_SIZE_SB32X16: return BLOCK_32X16; case BLOCK_SIZE_SB16X32: return BLOCK_16X32; -#endif case BLOCK_SIZE_MB16X16: return BLOCK_16X16; default: assert(0); diff --git a/vp9/encoder/vp9_sad_c.c b/vp9/encoder/vp9_sad_c.c index dbadaea74..fa47f813c 100644 --- a/vp9/encoder/vp9_sad_c.c +++ b/vp9/encoder/vp9_sad_c.c @@ -23,7 +23,6 @@ unsigned int vp9_sad64x64_c(const uint8_t *src_ptr, return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 64, 64); } -#if CONFIG_SBSEGMENT unsigned int vp9_sad64x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, @@ -69,7 +68,6 @@ void vp9_sad32x64x4d_c(const uint8_t *src_ptr, sad_array[3] = vp9_sad32x64(src_ptr, src_stride, ref_ptr[3], ref_stride, 0x7fffffff); } -#endif unsigned int vp9_sad32x32_c(const uint8_t *src_ptr, int src_stride, @@ -79,7 +77,6 @@ unsigned int vp9_sad32x32_c(const uint8_t *src_ptr, return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 32, 32); } -#if CONFIG_SBSEGMENT unsigned int vp9_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, @@ -125,7 +122,6 @@ void vp9_sad16x32x4d_c(const uint8_t *src_ptr, sad_array[3] = vp9_sad16x32(src_ptr, src_stride, ref_ptr[3], ref_stride, 0x7fffffff); } -#endif unsigned int vp9_sad16x16_c(const uint8_t *src_ptr, int src_stride, diff --git a/vp9/encoder/vp9_segmentation.c b/vp9/encoder/vp9_segmentation.c index 56484e693..9b78b3037 100644 --- a/vp9/encoder/vp9_segmentation.c +++ b/vp9/encoder/vp9_segmentation.c @@ -205,7 +205,6 @@ void vp9_choose_segmap_coding_method(VP9_COMP *cpi) { if (mi->mbmi.sb_type == BLOCK_SIZE_SB64X64) { count_segs(cpi, mi, no_pred_segcounts, temporal_predictor_count, t_unpred_seg_counts, 4, 4, mb_row, mb_col); -#if CONFIG_SBSEGMENT } else if (mi->mbmi.sb_type == BLOCK_SIZE_SB64X32) { count_segs(cpi, mi, no_pred_segcounts, temporal_predictor_count, t_unpred_seg_counts, 4, 2, mb_row, mb_col); @@ -219,7 +218,6 @@ void vp9_choose_segmap_coding_method(VP9_COMP *cpi) { if (mb_col + 2 != cm->mb_cols) count_segs(cpi, mi + 2, no_pred_segcounts, temporal_predictor_count, t_unpred_seg_counts, 2, 4, mb_row, mb_col + 2); -#endif } else { for (i = 0; i < 4; i++) { int x_idx = (i & 1) << 1, y_idx = i & 2; @@ -234,7 +232,6 @@ void vp9_choose_segmap_coding_method(VP9_COMP *cpi) { count_segs(cpi, sb_mi, no_pred_segcounts, temporal_predictor_count, t_unpred_seg_counts, 2, 2, mb_row + y_idx, mb_col + x_idx); -#if CONFIG_SBSEGMENT } else if (sb_mi->mbmi.sb_type == BLOCK_SIZE_SB32X16) { count_segs(cpi, sb_mi, no_pred_segcounts, temporal_predictor_count, @@ -255,7 +252,6 @@ void vp9_choose_segmap_coding_method(VP9_COMP *cpi) { temporal_predictor_count, t_unpred_seg_counts, 1, 2, mb_row + y_idx, mb_col + x_idx + 1); -#endif } else { int j; diff --git a/vp9/encoder/vp9_tokenize.c b/vp9/encoder/vp9_tokenize.c index 6f2cbbf24..0edf126bd 100644 --- a/vp9/encoder/vp9_tokenize.c +++ b/vp9/encoder/vp9_tokenize.c @@ -147,7 +147,6 @@ static void tokenize_b(VP9_COMP *cpi, l2 = l1 + sizeof(ENTROPY_CONTEXT_PLANES) / sizeof(ENTROPY_CONTEXT); a3 = a2 + sizeof(ENTROPY_CONTEXT_PLANES) / sizeof(ENTROPY_CONTEXT); l3 = l2 + sizeof(ENTROPY_CONTEXT_PLANES) / sizeof(ENTROPY_CONTEXT); -#if CONFIG_SBSEGMENT } else if (sb_type == BLOCK_SIZE_SB32X64) { a = (ENTROPY_CONTEXT *)xd->above_context + vp9_block2above_sb32x64[tx_size][ib]; @@ -164,14 +163,12 @@ static void tokenize_b(VP9_COMP *cpi, a1 = a + sizeof(ENTROPY_CONTEXT_PLANES) / sizeof(ENTROPY_CONTEXT); l1 = l + sizeof(ENTROPY_CONTEXT_PLANES) / sizeof(ENTROPY_CONTEXT); a2 = a3 = l2 = l3 = NULL; -#endif } else if (sb_type == BLOCK_SIZE_SB32X32) { a = (ENTROPY_CONTEXT *)xd->above_context + vp9_block2above_sb[tx_size][ib]; l = (ENTROPY_CONTEXT *)xd->left_context + vp9_block2left_sb[tx_size][ib]; a1 = a + sizeof(ENTROPY_CONTEXT_PLANES) / sizeof(ENTROPY_CONTEXT); l1 = l + sizeof(ENTROPY_CONTEXT_PLANES) / sizeof(ENTROPY_CONTEXT); a2 = a3 = l2 = l3 = NULL; -#if CONFIG_SBSEGMENT } else if (sb_type == BLOCK_SIZE_SB16X32) { a = (ENTROPY_CONTEXT *)xd->above_context + vp9_block2above_sb16x32[tx_size][ib]; @@ -188,7 +185,6 @@ static void tokenize_b(VP9_COMP *cpi, a1 = a + sizeof(ENTROPY_CONTEXT_PLANES) / sizeof(ENTROPY_CONTEXT); l1 = l + sizeof(ENTROPY_CONTEXT_PLANES) / sizeof(ENTROPY_CONTEXT); a1 = l1 = a2 = l2 = a3 = l3 = NULL; -#endif } else { assert(sb_type == BLOCK_SIZE_MB16X16); a = (ENTROPY_CONTEXT *)xd->above_context + vp9_block2above[tx_size][ib]; diff --git a/vp9/encoder/vp9_variance_c.c b/vp9/encoder/vp9_variance_c.c index fb66f4f0b..f7916b4f0 100644 --- a/vp9/encoder/vp9_variance_c.c +++ b/vp9/encoder/vp9_variance_c.c @@ -24,7 +24,6 @@ unsigned int vp9_get_mb_ss_c(const int16_t *src_ptr) { return sum; } -#if CONFIG_SBSEGMENT unsigned int vp9_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, @@ -160,7 +159,6 @@ unsigned int vp9_sub_pixel_variance16x32_c(const uint8_t *src_ptr, return vp9_variance16x32_c(temp2, 32, dst_ptr, dst_pixels_per_line, sse); } -#endif unsigned int vp9_variance64x64_c(const uint8_t *src_ptr, int source_stride,