]> granicus.if.org Git - libvpx/commitdiff
Decoder segmentation bug.
authorPaul Wilkins <paulwilkins@google.com>
Mon, 21 Nov 2011 11:02:08 +0000 (11:02 +0000)
committerPaul Wilkins <paulwilkins@google.com>
Mon, 21 Nov 2011 15:49:47 +0000 (15:49 +0000)
Fix decoder segmentation bug for temporal coding where the segment map
was first initialized on a key frame.

in vp8_kfread_modes() after reading the segment id it must be written to
the  pbi->segmentation_map[] for use in temporal coding on subsequent frames.

Change-Id: I1489305efc376564e734a216f69c2844646ee3d3

vp8/decoder/decodemv.c

index f7c0e9e6413921277af07f3eede541dd0143bb38..dd7199dd9a845122c5e5d8fd242eac8cf523e0e2 100644 (file)
@@ -78,6 +78,8 @@ static void vp8_kfread_modes(VP8D_COMP *pbi, MODE_INFO *m, int mb_row, int mb_co
 {
     vp8_reader *const bc = & pbi->bc;
     const int mis = pbi->common.mode_info_stride;
+    int map_index = mb_row * pbi->common.mb_cols + mb_col;
+
 
         {
             MB_PREDICTION_MODE y_mode;
@@ -88,7 +90,10 @@ static void vp8_kfread_modes(VP8D_COMP *pbi, MODE_INFO *m, int mb_row, int mb_co
             m->mbmi.segment_id = 0;
 
             if (pbi->mb.update_mb_segmentation_map)
+            {
                 vp8_read_mb_segid(bc, &m->mbmi, &pbi->mb);
+                pbi->segmentation_map[map_index] = m->mbmi.segment_id;
+            }
 
 //#if CONFIG_SEGFEATURES
             if ( pbi->common.mb_no_coeff_skip &&