VP9_COMMON: rm frame_parallel_decode
this has been 0 since the removal of frame_parallel_decode in vp9_dx_iface. BUG=webm:1395 Change-Id: I3a562b2c6b82050064d2b2ccb18a3e77c700b2da
This commit is contained in:
parent
ba76b662af
commit
bc837b223b
@ -62,8 +62,7 @@ static int alloc_seg_map(VP9_COMMON *cm, int seg_map_size) {
|
||||
cm->prev_seg_map_idx = 1;
|
||||
|
||||
cm->current_frame_seg_map = cm->seg_map_array[cm->seg_map_idx];
|
||||
if (!cm->frame_parallel_decode)
|
||||
cm->last_frame_seg_map = cm->seg_map_array[cm->prev_seg_map_idx];
|
||||
cm->last_frame_seg_map = cm->seg_map_array[cm->prev_seg_map_idx];
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -77,10 +76,7 @@ static void free_seg_map(VP9_COMMON *cm) {
|
||||
}
|
||||
|
||||
cm->current_frame_seg_map = NULL;
|
||||
|
||||
if (!cm->frame_parallel_decode) {
|
||||
cm->last_frame_seg_map = NULL;
|
||||
}
|
||||
cm->last_frame_seg_map = NULL;
|
||||
}
|
||||
|
||||
void vp9_free_ref_frame_buffers(BufferPool *pool) {
|
||||
@ -186,7 +182,7 @@ void vp9_remove_common(VP9_COMMON *cm) {
|
||||
|
||||
void vp9_init_context_buffers(VP9_COMMON *cm) {
|
||||
cm->setup_mi(cm);
|
||||
if (cm->last_frame_seg_map && !cm->frame_parallel_decode)
|
||||
if (cm->last_frame_seg_map)
|
||||
memset(cm->last_frame_seg_map, 0, cm->mi_rows * cm->mi_cols);
|
||||
}
|
||||
|
||||
|
@ -428,7 +428,7 @@ void vp9_setup_past_independence(VP9_COMMON *cm) {
|
||||
vp9_clearall_segfeatures(&cm->seg);
|
||||
cm->seg.abs_delta = SEGMENT_DELTADATA;
|
||||
|
||||
if (cm->last_frame_seg_map && !cm->frame_parallel_decode)
|
||||
if (cm->last_frame_seg_map)
|
||||
memset(cm->last_frame_seg_map, 0, (cm->mi_rows * cm->mi_cols));
|
||||
|
||||
if (cm->current_frame_seg_map)
|
||||
@ -457,7 +457,7 @@ void vp9_setup_past_independence(VP9_COMMON *cm) {
|
||||
}
|
||||
|
||||
// prev_mip will only be allocated in encoder.
|
||||
if (frame_is_intra_only(cm) && cm->prev_mip && !cm->frame_parallel_decode)
|
||||
if (frame_is_intra_only(cm) && cm->prev_mip)
|
||||
memset(cm->prev_mip, 0,
|
||||
cm->mi_stride * (cm->mi_rows + 1) * sizeof(*cm->prev_mip));
|
||||
|
||||
|
@ -235,10 +235,6 @@ typedef struct VP9Common {
|
||||
struct loopfilter lf;
|
||||
struct segmentation seg;
|
||||
|
||||
// TODO(hkuang): Remove this as it is the same as frame_parallel_decode
|
||||
// in pbi.
|
||||
int frame_parallel_decode; // frame-based threading.
|
||||
|
||||
// Context probabilities for reference frame prediction
|
||||
MV_REFERENCE_FRAME comp_fixed_ref;
|
||||
MV_REFERENCE_FRAME comp_var_ref[2];
|
||||
|
@ -455,12 +455,6 @@ static void dec_find_best_ref_mvs(int allow_hp, int_mv *mvlist, int_mv *best_mv,
|
||||
}
|
||||
}
|
||||
|
||||
static void fpm_sync(void *const data, int mi_row) {
|
||||
VP9Decoder *const pbi = (VP9Decoder *)data;
|
||||
vp9_frameworker_wait(pbi->frame_worker_owner, pbi->common.prev_frame,
|
||||
mi_row << MI_BLOCK_SIZE_LOG2);
|
||||
}
|
||||
|
||||
// This macro is used to add a motion vector mv_ref list if it isn't
|
||||
// already in the list. If it's the second motion vector or early_break
|
||||
// it will also skip all additional processing and jump to Done!
|
||||
@ -500,8 +494,7 @@ static int dec_find_mv_refs(const VP9_COMMON *cm, const MACROBLOCKD *xd,
|
||||
PREDICTION_MODE mode, MV_REFERENCE_FRAME ref_frame,
|
||||
const POSITION *const mv_ref_search,
|
||||
int_mv *mv_ref_list, int mi_row, int mi_col,
|
||||
int block, int is_sub8x8, find_mv_refs_sync sync,
|
||||
void *const data) {
|
||||
int block, int is_sub8x8) {
|
||||
const int *ref_sign_bias = cm->ref_frame_sign_bias;
|
||||
int i, refmv_count = 0;
|
||||
int different_ref_found = 0;
|
||||
@ -557,23 +550,8 @@ static int dec_find_mv_refs(const VP9_COMMON *cm, const MACROBLOCKD *xd,
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(hkuang): Remove this sync after fixing pthread_cond_broadcast
|
||||
// on windows platform. The sync here is unnecessary if use_prev_frame_mvs
|
||||
// is 0. But after removing it, there will be hang in the unit test on windows
|
||||
// due to several threads waiting for a thread's signal.
|
||||
#if defined(_WIN32) && !HAVE_PTHREAD_H
|
||||
if (cm->frame_parallel_decode && sync != NULL) {
|
||||
sync(data, mi_row);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Check the last frame's mode and mv info.
|
||||
if (prev_frame_mvs) {
|
||||
// Synchronize here for frame parallel decode if sync function is provided.
|
||||
if (cm->frame_parallel_decode && sync != NULL) {
|
||||
sync(data, mi_row);
|
||||
}
|
||||
|
||||
if (prev_frame_mvs->ref_frame[0] == ref_frame) {
|
||||
ADD_MV_REF_LIST_EB(prev_frame_mvs->mv[0], refmv_count, mv_ref_list, Done);
|
||||
} else if (prev_frame_mvs->ref_frame[1] == ref_frame) {
|
||||
@ -652,7 +630,7 @@ static void append_sub8x8_mvs_for_idx(VP9_COMMON *cm, MACROBLOCKD *xd,
|
||||
|
||||
refmv_count =
|
||||
dec_find_mv_refs(cm, xd, b_mode, mi->ref_frame[ref], mv_ref_search,
|
||||
mv_list, mi_row, mi_col, block, 1, NULL, NULL);
|
||||
mv_list, mi_row, mi_col, block, 1);
|
||||
|
||||
switch (block) {
|
||||
case 0: best_sub8x8->as_int = mv_list[refmv_count - 1].as_int; break;
|
||||
@ -750,9 +728,8 @@ static void read_inter_block_mode_info(VP9Decoder *const pbi,
|
||||
const MV_REFERENCE_FRAME frame = mi->ref_frame[ref];
|
||||
int refmv_count;
|
||||
|
||||
refmv_count =
|
||||
dec_find_mv_refs(cm, xd, mi->mode, frame, mv_ref_search, tmp_mvs,
|
||||
mi_row, mi_col, -1, 0, fpm_sync, (void *)pbi);
|
||||
refmv_count = dec_find_mv_refs(cm, xd, mi->mode, frame, mv_ref_search,
|
||||
tmp_mvs, mi_row, mi_col, -1, 0);
|
||||
|
||||
dec_find_best_ref_mvs(allow_hp, tmp_mvs, &best_ref_mvs[ref],
|
||||
refmv_count);
|
||||
|
@ -347,7 +347,6 @@ static vpx_codec_err_t init_decoder(vpx_codec_alg_priv_t *ctx) {
|
||||
frame_worker_data->pbi->max_threads = ctx->cfg.threads;
|
||||
|
||||
frame_worker_data->pbi->inv_tile_order = ctx->invert_tile_order;
|
||||
frame_worker_data->pbi->common.frame_parallel_decode = 0;
|
||||
worker->hook = (VPxWorkerHook)frame_worker_hook;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user