Fix state update in sb8x8 rate-distortion loop
Update mode_info of 8x8 blocks within the scope of current block. Change-Id: I110c599e60664a5acde6afd919b107cea8419a0d
This commit is contained in:
		@@ -715,11 +715,10 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m,
 | 
				
			|||||||
    // If segment skip is not enabled code the mode.
 | 
					    // If segment skip is not enabled code the mode.
 | 
				
			||||||
    if (!vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP)) {
 | 
					    if (!vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP)) {
 | 
				
			||||||
#if CONFIG_SB8X8
 | 
					#if CONFIG_SB8X8
 | 
				
			||||||
      if (mi->sb_type > BLOCK_SIZE_SB8X8)
 | 
					      if (mi->sb_type > BLOCK_SIZE_SB8X8) {
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
      if (mi->sb_type > BLOCK_SIZE_MB16X16)
 | 
					      if (mi->sb_type > BLOCK_SIZE_MB16X16) {
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
      {
 | 
					 | 
				
			||||||
        write_sb_mv_ref(bc, mode, mv_ref_p);
 | 
					        write_sb_mv_ref(bc, mode, mv_ref_p);
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
        write_mv_ref(bc, mode, mv_ref_p);
 | 
					        write_mv_ref(bc, mode, mv_ref_p);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -488,12 +488,15 @@ static void update_state(VP9_COMP *cpi,
 | 
				
			|||||||
      mbmi->best_mv.as_int = best_mv.as_int;
 | 
					      mbmi->best_mv.as_int = best_mv.as_int;
 | 
				
			||||||
      mbmi->best_second_mv.as_int = best_second_mv.as_int;
 | 
					      mbmi->best_second_mv.as_int = best_second_mv.as_int;
 | 
				
			||||||
      vp9_update_nmv_count(cpi, x, &best_mv, &best_second_mv);
 | 
					      vp9_update_nmv_count(cpi, x, &best_mv, &best_second_mv);
 | 
				
			||||||
#if CONFIG_SB8X8
 | 
					 | 
				
			||||||
      xd->mode_info_context[1].mbmi =
 | 
					 | 
				
			||||||
      xd->mode_info_context[mis].mbmi =
 | 
					 | 
				
			||||||
      xd->mode_info_context[1 + mis].mbmi = *mbmi;
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					#if CONFIG_SB8X8
 | 
				
			||||||
 | 
					    if (bsize > BLOCK_SIZE_SB8X8 && mbmi->mode == NEWMV) {
 | 
				
			||||||
 | 
					      int i, j;
 | 
				
			||||||
 | 
					      for (j = 0; j < bh; ++j)
 | 
				
			||||||
 | 
					        for (i = 0; i < bw; ++i)
 | 
				
			||||||
 | 
					          xd->mode_info_context[mis * j + i].mbmi = *mbmi;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
#if CONFIG_COMP_INTERINTRA_PRED
 | 
					#if CONFIG_COMP_INTERINTRA_PRED
 | 
				
			||||||
    if (mbmi->mode >= NEARESTMV && mbmi->mode < SPLITMV &&
 | 
					    if (mbmi->mode >= NEARESTMV && mbmi->mode < SPLITMV &&
 | 
				
			||||||
        mbmi->second_ref_frame <= INTRA_FRAME) {
 | 
					        mbmi->second_ref_frame <= INTRA_FRAME) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user