summaryrefslogtreecommitdiff
path: root/vp8/encoder/encodeframe.c
diff options
context:
space:
mode:
authorPaul Wilkins <paulwilkins@google.com>2011-11-09 14:05:28 +0000
committerPaul Wilkins <paulwilkins@google.com>2011-11-09 15:46:05 +0000
commit07892531256d4cce9ee2f0e18f0234e5b4752bf2 (patch)
tree262d523417a991eadad2a791ca020ff14ab02150 /vp8/encoder/encodeframe.c
parentb0f9f15dbd200a02103afc18e5674d2000699f65 (diff)
downloadlibvpx-07892531256d4cce9ee2f0e18f0234e5b4752bf2.tar
libvpx-07892531256d4cce9ee2f0e18f0234e5b4752bf2.tar.gz
libvpx-07892531256d4cce9ee2f0e18f0234e5b4752bf2.tar.bz2
libvpx-07892531256d4cce9ee2f0e18f0234e5b4752bf2.zip
T8x8 experiment merge.
For ease of testing and merging experiments I have removed in line code in encode_frame() that assigns MBs to be t8x8 or t4x4 coded segments and have moved the decision point and segment setup to the init_seg_features0 test function. Keeping everything in one place helps make sure for now that experiments using segmentation are not fighting each other. Also made sure mode selection code can't choose 4x4 modes if t8x8 is selected. Patch2: In init_seg_features() add checks for SEG_LVL_TRANSFORM active. Change-Id: Ia1767edd99b78510011d4251539f9bc325842e3a
Diffstat (limited to 'vp8/encoder/encodeframe.c')
-rw-r--r--vp8/encoder/encodeframe.c33
1 files changed, 3 insertions, 30 deletions
diff --git a/vp8/encoder/encodeframe.c b/vp8/encoder/encodeframe.c
index 031e63ac7..b24b39633 100644
--- a/vp8/encoder/encodeframe.c
+++ b/vp8/encoder/encodeframe.c
@@ -674,25 +674,19 @@ void encode_mb_row(VP8_COMP *cpi,
vp8_activity_masking(cpi, x);
// Is segmentation enabled
- // MB level adjutment to quantizer
if (xd->segmentation_enabled)
{
- // Code to set segment id in xd->mbmi.segment_id for current MB (with range checking)
-#if CONFIG_T8X8
- // Reset segment_id to 0 or 1 so that the default transform mode is 4x4
- if (cpi->segmentation_map[map_index+mb_col] <= 3)
- xd->mode_info_context->mbmi.segment_id = cpi->segmentation_map[map_index+mb_col]&1;
-#else
+ // Code to set segment id in xd->mbmi.segment_id
if (cpi->segmentation_map[map_index+mb_col] <= 3)
xd->mode_info_context->mbmi.segment_id = cpi->segmentation_map[map_index+mb_col];
-#endif
else
xd->mode_info_context->mbmi.segment_id = 0;
vp8cx_mb_init_quantizer(cpi, x);
}
else
- xd->mode_info_context->mbmi.segment_id = 0; // Set to Segment 0 by default
+ // Set to Segment 0 by default
+ xd->mode_info_context->mbmi.segment_id = 0;
x->active_ptr = cpi->active_map + map_index + mb_col;
@@ -1522,10 +1516,6 @@ int vp8cx_encode_intra_macro_block(VP8_COMP *cpi, MACROBLOCK *x, TOKENEXTRA **t)
{
int rate;
-#if CONFIG_T8X8
- if (x->e_mbd.segmentation_enabled)
- x->e_mbd.update_mb_segmentation_map = 1;
-#endif
if (cpi->sf.RD && cpi->compressor_speed != 2)
vp8_rd_pick_intra_mode(cpi, x, &rate);
else
@@ -1549,10 +1539,6 @@ int vp8cx_encode_intra_macro_block(VP8_COMP *cpi, MACROBLOCK *x, TOKENEXTRA **t)
vp8_encode_intra4x4mby(IF_RTCD(&cpi->rtcd), x);
else
{
-#if CONFIG_T8X8
- if (x->e_mbd.segmentation_enabled)
- x->e_mbd.mode_info_context->mbmi.segment_id |= (vp8_8x8_selection_intra(x) << 1);
-#endif
vp8_encode_intra16x16mby(IF_RTCD(&cpi->rtcd), x);
}
#if CONFIG_I8X8
@@ -1729,11 +1715,6 @@ int vp8cx_encode_inter_macroblock
cpi->count_mb_ref_frame_usage[xd->mode_info_context->mbmi.ref_frame]++;
}
-#if CONFIG_T8X8
- if (xd->segmentation_enabled)
- x->e_mbd.update_mb_segmentation_map = 1;
-#endif
-
if (xd->mode_info_context->mbmi.ref_frame == INTRA_FRAME)
{
if (xd->mode_info_context->mbmi.mode == B_PRED)
@@ -1743,10 +1724,6 @@ int vp8cx_encode_inter_macroblock
}
else
{
-#if CONFIG_T8X8
- if (xd->segmentation_enabled)
- *segment_id |= (vp8_8x8_selection_intra(x) << 1);
-#endif
vp8_encode_intra16x16mbuv(IF_RTCD(&cpi->rtcd), x);
vp8_encode_intra16x16mby(IF_RTCD(&cpi->rtcd), x);
}
@@ -1756,10 +1733,6 @@ int vp8cx_encode_inter_macroblock
else
{
int ref_fb_idx;
-#if CONFIG_T8X8
- if (xd->segmentation_enabled)
- *segment_id |= (vp8_8x8_selection_inter(x) << 1);
-#endif
if (xd->mode_info_context->mbmi.ref_frame == LAST_FRAME)
ref_fb_idx = cpi->common.lst_fb_idx;