Commit 9d44fd6b authored by hkuang's avatar hkuang
Browse files

Remove some unnecessary code in thread context copy.

Change-Id: Iddf098e1bae9c10fc2f325f84156f50a0bd0055a
parent a1ef75bb
...@@ -457,7 +457,7 @@ static int read_is_inter_block(VP9_COMMON *const cm, MACROBLOCKD *const xd, ...@@ -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) { static void fpm_sync(void *const data, int mi_row) {
VP9Decoder *const pbi = (VP9Decoder *)data; 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); mi_row << MI_BLOCK_SIZE_LOG2);
} }
......
...@@ -55,7 +55,6 @@ typedef struct VP9Decoder { ...@@ -55,7 +55,6 @@ typedef struct VP9Decoder {
// TODO(hkuang): Combine this with cur_buf in macroblockd as they are // TODO(hkuang): Combine this with cur_buf in macroblockd as they are
// the same. // the same.
RefCntBuffer *cur_buf; // Current decoding frame buffer. 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 *frame_worker_owner; // frame_worker that owns this pbi.
VP9Worker lf_worker; VP9Worker lf_worker;
......
...@@ -150,44 +150,22 @@ void vp9_frameworker_copy_context(VP9Worker *const dst_worker, ...@@ -150,44 +150,22 @@ void vp9_frameworker_copy_context(VP9Worker *const dst_worker,
&src_worker_data->stats_mutex); &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 ? dst_cm->last_frame_seg_map = src_cm->seg.enabled ?
src_cm->current_frame_seg_map : src_cm->last_frame_seg_map; src_cm->current_frame_seg_map : src_cm->last_frame_seg_map;
dst_worker_data->pbi->need_resync = src_worker_data->pbi->need_resync; dst_worker_data->pbi->need_resync = src_worker_data->pbi->need_resync;
vp9_frameworker_unlock_stats(src_worker); 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 ? dst_cm->prev_frame = src_cm->show_existing_frame ?
src_cm->prev_frame : src_cm->cur_frame; src_cm->prev_frame : src_cm->cur_frame;
dst_cm->last_width = !src_cm->show_existing_frame ? dst_cm->last_width = !src_cm->show_existing_frame ?
src_cm->width : src_cm->last_width; src_cm->width : src_cm->last_width;
dst_cm->last_height = !src_cm->show_existing_frame ? dst_cm->last_height = !src_cm->show_existing_frame ?
src_cm->height : src_cm->last_height; 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_x = src_cm->subsampling_x;
dst_cm->subsampling_y = src_cm->subsampling_y; 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 ? dst_cm->last_show_frame = !src_cm->show_existing_frame ?
src_cm->show_frame : src_cm->last_show_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) for (i = 0; i < REF_FRAMES; ++i)
dst_cm->ref_frame_map[i] = src_cm->next_ref_frame_map[i]; dst_cm->ref_frame_map[i] = src_cm->next_ref_frame_map[i];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment