summaryrefslogtreecommitdiff
path: root/vp9/decoder/vp9_decodeframe.c
diff options
context:
space:
mode:
Diffstat (limited to 'vp9/decoder/vp9_decodeframe.c')
-rw-r--r--vp9/decoder/vp9_decodeframe.c59
1 files changed, 7 insertions, 52 deletions
diff --git a/vp9/decoder/vp9_decodeframe.c b/vp9/decoder/vp9_decodeframe.c
index 0760f8c23..d427b1251 100644
--- a/vp9/decoder/vp9_decodeframe.c
+++ b/vp9/decoder/vp9_decodeframe.c
@@ -490,8 +490,8 @@ static void extend_and_predict(const uint8_t *buf_ptr1, int pre_buf_stride,
#endif // CONFIG_VP9_HIGHBITDEPTH
static void dec_build_inter_predictors(
- VPxWorker *const worker, MACROBLOCKD *xd, int plane, int bw, int bh, int x,
- int y, int w, int h, int mi_x, int mi_y, const InterpKernel *kernel,
+ MACROBLOCKD *xd, int plane, int bw, int bh, int x, int y, int w, int h,
+ int mi_x, int mi_y, const InterpKernel *kernel,
const struct scale_factors *sf, struct buf_2d *pre_buf,
struct buf_2d *dst_buf, const MV *mv, RefCntBuffer *ref_frame_buf,
int is_scaled, int ref) {
@@ -593,12 +593,6 @@ static void dec_build_inter_predictors(
y_pad = 1;
}
- // Wait until reference block is ready. Pad 7 more pixels as last 7
- // pixels of each superblock row can be changed by next superblock row.
- if (worker != NULL)
- vp9_frameworker_wait(worker, ref_frame_buf, VPXMAX(0, (y1 + 7))
- << (plane == 0 ? 0 : 1));
-
// Skip border extension if block is inside the frame.
if (x0 < 0 || x0 > frame_width - 1 || x1 < 0 || x1 > frame_width - 1 ||
y0 < 0 || y0 > frame_height - 1 || y1 < 0 || y1 > frame_height - 1) {
@@ -617,14 +611,6 @@ static void dec_build_inter_predictors(
w, h, ref, xs, ys);
return;
}
- } else {
- // Wait until reference block is ready. Pad 7 more pixels as last 7
- // pixels of each superblock row can be changed by next superblock row.
- if (worker != NULL) {
- const int y1 = (y0_16 + (h - 1) * ys) >> SUBPEL_BITS;
- vp9_frameworker_wait(worker, ref_frame_buf, VPXMAX(0, (y1 + 7))
- << (plane == 0 ? 0 : 1));
- }
}
#if CONFIG_VP9_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
@@ -653,8 +639,6 @@ static void dec_build_inter_predictors_sb(VP9Decoder *const pbi,
const int is_compound = has_second_ref(mi);
int ref;
int is_scaled;
- VPxWorker *const fwo =
- pbi->frame_parallel_decode ? pbi->frame_worker_owner : NULL;
for (ref = 0; ref < 1 + is_compound; ++ref) {
const MV_REFERENCE_FRAME frame = mi->ref_frame[ref];
@@ -686,10 +670,10 @@ static void dec_build_inter_predictors_sb(VP9Decoder *const pbi,
for (y = 0; y < num_4x4_h; ++y) {
for (x = 0; x < num_4x4_w; ++x) {
const MV mv = average_split_mvs(pd, mi, ref, i++);
- dec_build_inter_predictors(fwo, xd, plane, n4w_x4, n4h_x4, 4 * x,
- 4 * y, 4, 4, mi_x, mi_y, kernel, sf,
- pre_buf, dst_buf, &mv, ref_frame_buf,
- is_scaled, ref);
+ dec_build_inter_predictors(xd, plane, n4w_x4, n4h_x4, 4 * x, 4 * y,
+ 4, 4, mi_x, mi_y, kernel, sf, pre_buf,
+ dst_buf, &mv, ref_frame_buf, is_scaled,
+ ref);
}
}
}
@@ -703,7 +687,7 @@ static void dec_build_inter_predictors_sb(VP9Decoder *const pbi,
const int n4w_x4 = 4 * num_4x4_w;
const int n4h_x4 = 4 * num_4x4_h;
struct buf_2d *const pre_buf = &pd->pre[ref];
- dec_build_inter_predictors(fwo, xd, plane, n4w_x4, n4h_x4, 0, 0, n4w_x4,
+ dec_build_inter_predictors(xd, plane, n4w_x4, n4h_x4, 0, 0, n4w_x4,
n4h_x4, mi_x, mi_y, kernel, sf, pre_buf,
dst_buf, &mv, ref_frame_buf, is_scaled, ref);
}
@@ -1473,11 +1457,6 @@ static const uint8_t *decode_tiles(VP9Decoder *pbi, const uint8_t *data,
winterface->execute(&pbi->lf_worker);
}
}
- // After loopfiltering, the last 7 row pixels in each superblock row may
- // still be changed by the longest loopfilter of the next superblock
- // row.
- if (pbi->frame_parallel_decode)
- vp9_frameworker_broadcast(pbi->cur_buf, mi_row << MI_BLOCK_SIZE_LOG2);
}
}
@@ -1493,8 +1472,6 @@ static const uint8_t *decode_tiles(VP9Decoder *pbi, const uint8_t *data,
// Get last tile data.
tile_data = pbi->tile_worker_data + tile_cols * tile_rows - 1;
- if (pbi->frame_parallel_decode)
- vp9_frameworker_broadcast(pbi->cur_buf, INT_MAX);
return vpx_reader_find_end(&tile_data->bit_reader);
}
@@ -1793,10 +1770,6 @@ static size_t read_uncompressed_header(VP9Decoder *pbi,
cm->lf.filter_level = 0;
cm->show_frame = 1;
- if (pbi->frame_parallel_decode) {
- for (i = 0; i < REF_FRAMES; ++i)
- cm->next_ref_frame_map[i] = cm->ref_frame_map[i];
- }
return 0;
}
@@ -2090,24 +2063,6 @@ void vp9_decode_frame(VP9Decoder *pbi, const uint8_t *data,
vp9_loop_filter_frame_init(cm, cm->lf.filter_level);
}
- // If encoded in frame parallel mode, frame context is ready after decoding
- // the frame header.
- if (pbi->frame_parallel_decode && cm->frame_parallel_decoding_mode) {
- VPxWorker *const worker = pbi->frame_worker_owner;
- FrameWorkerData *const frame_worker_data = worker->data1;
- if (cm->refresh_frame_context) {
- context_updated = 1;
- cm->frame_contexts[cm->frame_context_idx] = *cm->fc;
- }
- vp9_frameworker_lock_stats(worker);
- pbi->cur_buf->row = -1;
- pbi->cur_buf->col = -1;
- frame_worker_data->frame_context_ready = 1;
- // Signal the main thread that context is ready.
- vp9_frameworker_signal_stats(worker);
- vp9_frameworker_unlock_stats(worker);
- }
-
if (pbi->tile_worker_data == NULL ||
(tile_cols * tile_rows) != pbi->total_tiles) {
const int num_tile_workers =