diff options
author | Paul Wilkins <paulwilkins@google.com> | 2013-05-31 02:56:20 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.golo.chromium.org> | 2013-05-31 02:56:20 -0700 |
commit | aaf61dfbcab414bfacc3171501be17d191ff8506 (patch) | |
tree | 55d21504fdd3ea63cc633cfc329f40aaaf1a33d5 /vp9/common/vp9_seg_common.c | |
parent | 7ca651a38391a3e8ec42f8de56fe7264dc3a6d2f (diff) | |
parent | 1b103f250f36f6b20d245f717faa477649f9fec7 (diff) | |
download | libvpx-aaf61dfbcab414bfacc3171501be17d191ff8506.tar libvpx-aaf61dfbcab414bfacc3171501be17d191ff8506.tar.gz libvpx-aaf61dfbcab414bfacc3171501be17d191ff8506.tar.bz2 libvpx-aaf61dfbcab414bfacc3171501be17d191ff8506.zip |
Merge "Patch to remove implicit segmentation." into experimental
Diffstat (limited to 'vp9/common/vp9_seg_common.c')
-rw-r--r-- | vp9/common/vp9_seg_common.c | 79 |
1 files changed, 0 insertions, 79 deletions
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 |