]> granicus.if.org Git - libvpx/commitdiff
Merge "Make decode modules independent of tile index"
authorJingning Han <jingning@google.com>
Wed, 23 Oct 2013 18:08:12 +0000 (11:08 -0700)
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>
Wed, 23 Oct 2013 18:08:12 +0000 (11:08 -0700)
1  2 
vp9/common/vp9_blockd.h
vp9/decoder/vp9_decodframe.c

Simple merge
index 12ce82157a2737ae0279b13e01a49987da75a806,b8b63fee8dde175209eb286c64dd234399c5e4e2..3ee8ba41da13f3ff34eaf4870fb766f11c8a7a43
@@@ -356,10 -268,10 +354,9 @@@ static void decode_modes_b(VP9D_COMP *p
    xd->corrupted |= vp9_reader_has_error(r);
  }
  
- static void decode_modes_sb(VP9D_COMP *pbi, int tile_col,
-                             int mi_row, int mi_col,
+ static void decode_modes_sb(VP9D_COMP *pbi, int mi_row, int mi_col,
                              vp9_reader* r, BLOCK_SIZE bsize, int index) {
    VP9_COMMON *const cm = &pbi->common;
 -  MACROBLOCKD *const xd = &pbi->mb;
    const int hbs = num_8x8_blocks_wide_lookup[bsize] / 2;
    PARTITION_TYPE partition = PARTITION_NONE;
    BLOCK_SIZE subsize;
@@@ -668,14 -583,19 +665,17 @@@ static void decode_tile(VP9D_COMP *pbi
    VP9_COMMON *const cm = &pbi->common;
    int mi_row, mi_col;
    YV12_BUFFER_CONFIG *const fb = &cm->yv12_fb[cm->new_fb_idx];
+   MACROBLOCKD *xd = &pbi->mb;
+   xd->mi_stream = pbi->mi_streams[tile_col];
  
    if (pbi->do_loopfilter_inline) {
 -    if (num_threads > 1) {
 -      LFWorkerData *const lf_data = (LFWorkerData*)pbi->lf_worker.data1;
 -      lf_data->frame_buffer = fb;
 -      lf_data->cm = cm;
 -      lf_data->xd = pbi->mb;
 -      lf_data->stop = 0;
 -      lf_data->y_only = 0;
 -    }
 +    LFWorkerData *const lf_data = (LFWorkerData*)pbi->lf_worker.data1;
 +    lf_data->frame_buffer = fb;
 +    lf_data->cm = cm;
 +    lf_data->xd = pbi->mb;
 +    lf_data->stop = 0;
 +    lf_data->y_only = 0;
      vp9_loop_filter_frame_init(cm, cm->lf.filter_level);
    }
  
      vp9_zero(cm->left_seg_context);
      for (mi_col = cm->cur_tile_mi_col_start; mi_col < cm->cur_tile_mi_col_end;
           mi_col += MI_BLOCK_SIZE)
-       decode_modes_sb(pbi, tile_col, mi_row, mi_col, r, BLOCK_64X64, 0);
+       decode_modes_sb(pbi, mi_row, mi_col, r, BLOCK_64X64, 0);
  
      if (pbi->do_loopfilter_inline) {
 -      // delay the loopfilter by 1 macroblock row.
        const int lf_start = mi_row - MI_BLOCK_SIZE;
 -      if (lf_start < 0) continue;
 +      LFWorkerData *const lf_data = (LFWorkerData*)pbi->lf_worker.data1;
  
 -      if (num_threads > 1) {
 -        LFWorkerData *const lf_data = (LFWorkerData*)pbi->lf_worker.data1;
 +      // delay the loopfilter by 1 macroblock row.
 +      if (lf_start < 0) continue;
  
 -        // decoding has completed: finish up the loop filter in this thread.
 -        if (mi_row + MI_BLOCK_SIZE >= cm->cur_tile_mi_row_end) continue;
 +      // decoding has completed: finish up the loop filter in this thread.
 +      if (mi_row + MI_BLOCK_SIZE >= cm->cur_tile_mi_row_end) continue;
  
 -        vp9_worker_sync(&pbi->lf_worker);
 -        lf_data->start = lf_start;
 -        lf_data->stop = mi_row;
 -        pbi->lf_worker.hook = vp9_loop_filter_worker;
 +      vp9_worker_sync(&pbi->lf_worker);
 +      lf_data->start = lf_start;
 +      lf_data->stop = mi_row;
 +      if (num_threads > 1) {
          vp9_worker_launch(&pbi->lf_worker);
        } else {
 -        vp9_loop_filter_rows(fb, cm, &pbi->mb, lf_start, mi_row, 0);
 +        vp9_worker_execute(&pbi->lf_worker);
        }
      }
    }