Remove some unnecessary code in thread context copy.
authorhkuang <hkuang@google.com>
Tue, 3 Mar 2015 01:15:00 +0000 (17:15 -0800)
committerhkuang <hkuang@google.com>
Fri, 6 Mar 2015 18:29:15 +0000 (10:29 -0800)
Change-Id: Iddf098e1bae9c10fc2f325f84156f50a0bd0055a

vp9/decoder/vp9_decodemv.c
vp9/decoder/vp9_decoder.h
vp9/decoder/vp9_dthread.c

index ec32f1d..37bdfe0 100644 (file)
@@ -457,7 +457,7 @@ static int read_is_inter_block(VP9_COMMON *const cm, MACROBLOCKD *const xd,
 
 static void fpm_sync(void *const data, int mi_row) {
   VP9Decoder *const pbi = (VP9Decoder *)data;
-  vp9_frameworker_wait(pbi->frame_worker_owner, pbi->prev_buf,
+  vp9_frameworker_wait(pbi->frame_worker_owner, pbi->common.prev_frame,
                        mi_row << MI_BLOCK_SIZE_LOG2);
 }
 
index 10598ca..c19f0ac 100644 (file)
@@ -55,7 +55,6 @@ typedef struct VP9Decoder {
   // TODO(hkuang): Combine this with cur_buf in macroblockd as they are
   // the same.
   RefCntBuffer *cur_buf;   //  Current decoding frame buffer.
-  RefCntBuffer *prev_buf;  //  Previous decoding frame buffer.
 
   VP9Worker *frame_worker_owner;   // frame_worker that owns this pbi.
   VP9Worker lf_worker;
index 0904e93..be2e6cd 100644 (file)
@@ -150,44 +150,22 @@ void vp9_frameworker_copy_context(VP9Worker *const dst_worker,
         &src_worker_data->stats_mutex);
   }
 
-  // src worker may have already finished decoding a frame and swapped the mi.
-  // TODO(hkuang): Remove following code after implenment no ModeInfo decoding.
-  if (src_worker_data->frame_decoded) {
-    dst_cm->prev_mip = src_cm->prev_mip;
-    dst_cm->prev_mi = src_cm->prev_mi;
-  } else {
-    dst_cm->prev_mip = src_cm->mip;
-    dst_cm->prev_mi = src_cm->mi;
-  }
-
   dst_cm->last_frame_seg_map = src_cm->seg.enabled ?
       src_cm->current_frame_seg_map : src_cm->last_frame_seg_map;
   dst_worker_data->pbi->need_resync = src_worker_data->pbi->need_resync;
   vp9_frameworker_unlock_stats(src_worker);
 
-  dst_worker_data->pbi->prev_buf =
-      src_worker_data->pbi->common.show_existing_frame ?
-          NULL : src_worker_data->pbi->cur_buf;
-
   dst_cm->prev_frame = src_cm->show_existing_frame ?
                        src_cm->prev_frame : src_cm->cur_frame;
   dst_cm->last_width = !src_cm->show_existing_frame ?
                        src_cm->width : src_cm->last_width;
   dst_cm->last_height = !src_cm->show_existing_frame ?
                         src_cm->height : src_cm->last_height;
-  dst_cm->display_width = src_cm->display_width;
-  dst_cm->display_height = src_cm->display_height;
   dst_cm->subsampling_x = src_cm->subsampling_x;
   dst_cm->subsampling_y = src_cm->subsampling_y;
+  dst_cm->frame_type = src_cm->frame_type;
   dst_cm->last_show_frame = !src_cm->show_existing_frame ?
                             src_cm->show_frame : src_cm->last_show_frame;
-  dst_cm->last_frame_type = src_cm->last_frame_type;
-  dst_cm->frame_type = src_cm->frame_type;
-  dst_cm->y_dc_delta_q = src_cm->y_dc_delta_q;
-  dst_cm->uv_dc_delta_q = src_cm->uv_dc_delta_q;
-  dst_cm->uv_ac_delta_q = src_cm->uv_ac_delta_q;
-  dst_cm->base_qindex = src_cm->base_qindex;
-
   for (i = 0; i < REF_FRAMES; ++i)
     dst_cm->ref_frame_map[i] = src_cm->next_ref_frame_map[i];