summaryrefslogtreecommitdiff
path: root/vp9/common
diff options
context:
space:
mode:
authorPaul Wilkins <paulwilkins@google.com>2013-05-30 11:04:58 +0100
committerPaul Wilkins <paulwilkins@google.com>2013-05-30 11:06:29 +0100
commit1b103f250f36f6b20d245f717faa477649f9fec7 (patch)
treea3133aa5fc34c93f8cb9453a5bc0e1853a5a9d09 /vp9/common
parent87626a8f6ea2706a347a03b09a2c1ac570fdb615 (diff)
downloadlibvpx-1b103f250f36f6b20d245f717faa477649f9fec7.tar
libvpx-1b103f250f36f6b20d245f717faa477649f9fec7.tar.gz
libvpx-1b103f250f36f6b20d245f717faa477649f9fec7.tar.bz2
libvpx-1b103f250f36f6b20d245f717faa477649f9fec7.zip
Patch to remove implicit segmentation.
This patch removes the implicit segmentation experiment from the code base as the benefits were still unproven as of the bitstream deadline. Change-Id: I273b99d8d621d1853eac4182f97982cb5957247e
Diffstat (limited to 'vp9/common')
-rw-r--r--vp9/common/vp9_blockd.h4
-rw-r--r--vp9/common/vp9_seg_common.c79
-rw-r--r--vp9/common/vp9_seg_common.h5
3 files changed, 0 insertions, 88 deletions
diff --git a/vp9/common/vp9_blockd.h b/vp9/common/vp9_blockd.h
index 9626540c3..d834ee061 100644
--- a/vp9/common/vp9_blockd.h
+++ b/vp9/common/vp9_blockd.h
@@ -316,10 +316,6 @@ typedef struct macroblockd {
/* 0 (do not update) 1 (update) the macroblock segmentation map. */
unsigned char update_mb_segmentation_map;
-#if CONFIG_IMPLICIT_SEGMENTATION
- unsigned char allow_implicit_segment_update;
-#endif
-
/* 0 (do not update) 1 (update) the macroblock segmentation feature data. */
unsigned char update_mb_segmentation_data;
diff --git a/vp9/common/vp9_seg_common.c b/vp9/common/vp9_seg_common.c
index e5511a123..67dfeaed6 100644
--- a/vp9/common/vp9_seg_common.c
+++ b/vp9/common/vp9_seg_common.c
@@ -86,85 +86,6 @@ int vp9_check_segref(const MACROBLOCKD *xd, int segment_id,
}
-#if CONFIG_IMPLICIT_SEGMENTATION
-// This function defines an implicit segmentation for the next frame based
-// on predcition and transform decisions in the current frame.
-// For test purposes at the moment it uses ref frame and prediction size
-void vp9_implicit_segment_map_update(VP9_COMMON * cm) {
- int row, col;
- MODE_INFO *mi, *mi_ptr = cm->mi;
- unsigned char * map_ptr = cm->last_frame_seg_map;
-
- for (row = 0; row < cm->mb_rows; row++) {
- mi = mi_ptr;
-
- for (col = 0; col < cm->mb_cols; ++col, ++mi) {
- // Inter prediction
- if (mi->mbmi.ref_frame != INTRA_FRAME) {
- // Zero motion and prediction block size >= 16
- if ((mi->mbmi.sb_type >= BLOCK_SIZE_MB16X16) &&
- (mi->mbmi.mv[0].as_int == 0))
- map_ptr[col] = 1;
- else if (mi->mbmi.sb_type >= BLOCK_SIZE_SB32X32)
- map_ptr[col] = 2;
- else if (mi->mbmi.sb_type >= BLOCK_SIZE_MB16X16)
- map_ptr[col] = 3;
- else
- map_ptr[col] = 6;
-
- // Intra prediction
- } else {
- if (mi->mbmi.sb_type >= BLOCK_SIZE_SB32X32)
- map_ptr[col] = 4;
- else if (mi->mbmi.sb_type >= BLOCK_SIZE_MB16X16)
- map_ptr[col] = 5;
- else
- map_ptr[col] = 7;
- }
- }
- mi_ptr += cm->mode_info_stride;
- map_ptr += cm->mb_cols;
- }
-}
-
-// This function defines an implicit segmentation for the next frame based
-// on predcition and transform decisions in the current frame.
-// For test purposes at the moment only TX size is used.
-void vp9_implicit_segment_map_update_tx(VP9_COMMON * cm) {
- int row, col;
- MODE_INFO *mi, *mi_ptr = cm->mi;
- unsigned char * map_ptr = cm->last_frame_seg_map;
-
- for (row = 0; row < cm->mb_rows; row++) {
- mi = mi_ptr;
- for (col = 0; col < cm->mb_cols; ++col, ++mi) {
- // Intra modes
- if (mi->mbmi.ref_frame == INTRA_FRAME) {
- if (mi->mbmi.txfm_size == TX_4X4)
- map_ptr[col] = 7;
- else if (mi->mbmi.txfm_size <= TX_16X16)
- map_ptr[col] = 5;
- else
- map_ptr[col] = 4;
- } else {
- // Inter Modes
- if (mi->mbmi.txfm_size == TX_4X4)
- map_ptr[col] = 6;
- else if (mi->mbmi.txfm_size == TX_8X8)
- map_ptr[col] = 3;
- else if (mi->mbmi.txfm_size == TX_16X16)
- map_ptr[col] = 2;
- else
- map_ptr[col] = 1;
- }
- }
- mi_ptr += cm->mode_info_stride;
- map_ptr += cm->mb_cols;
- }
-}
-#endif
-
-
const vp9_tree_index vp9_segment_tree[14] = {
2, 4, 6, 8, 10, 12,
0, -1, -2, -3, -4, -5, -6, -7
diff --git a/vp9/common/vp9_seg_common.h b/vp9/common/vp9_seg_common.h
index 53d22a385..c424a57f4 100644
--- a/vp9/common/vp9_seg_common.h
+++ b/vp9/common/vp9_seg_common.h
@@ -55,11 +55,6 @@ int vp9_check_segref(const MACROBLOCKD *xd,
int segment_id,
MV_REFERENCE_FRAME ref_frame);
-#if CONFIG_IMPLICIT_SEGMENTATION
-void vp9_implicit_segment_map_update(VP9_COMMON * cm);
-#endif
-
-
extern const vp9_tree_index vp9_segment_tree[14];
#endif // VP9_COMMON_VP9_SEG_COMMON_H_