Fix a tsan error bug in frame parallel decode.
A frame may be waiting for an out of border pixel from another frame. A frame's row progress variable is set to -1 when start being decoded and another frame may be waiting for -2 row pixel from this frame. In this case, vp9_frameworker_wait will return directly and skip the waiting which leads to tsan error between threads. Change-Id: Id16604915fb598b823e34393f696e3aa46fb6422
This commit is contained in:
parent
1790d45252
commit
a723f5ecd1
@ -1927,7 +1927,7 @@ void dec_build_inter_predictors(VP9Decoder *const pbi, MACROBLOCKD *xd,
|
|||||||
// pixels of each superblock row can be changed by next superblock row.
|
// pixels of each superblock row can be changed by next superblock row.
|
||||||
if (pbi->frame_parallel_decode)
|
if (pbi->frame_parallel_decode)
|
||||||
vp9_frameworker_wait(pbi->frame_worker_owner, ref_frame_buf,
|
vp9_frameworker_wait(pbi->frame_worker_owner, ref_frame_buf,
|
||||||
(y1 + 7) << (plane == 0 ? 0 : 1));
|
MAX(0, (y1 + 7) << (plane == 0 ? 0 : 1)));
|
||||||
|
|
||||||
// Skip border extension if block is inside the frame.
|
// Skip border extension if block is inside the frame.
|
||||||
if (x0 < 0 || x0 > frame_width - 1 || x1 < 0 || x1 > frame_width - 1 ||
|
if (x0 < 0 || x0 > frame_width - 1 || x1 < 0 || x1 > frame_width - 1 ||
|
||||||
@ -1983,7 +1983,7 @@ void dec_build_inter_predictors(VP9Decoder *const pbi, MACROBLOCKD *xd,
|
|||||||
// pixels of each superblock row can be changed by next superblock row.
|
// pixels of each superblock row can be changed by next superblock row.
|
||||||
if (pbi->frame_parallel_decode)
|
if (pbi->frame_parallel_decode)
|
||||||
vp9_frameworker_wait(pbi->frame_worker_owner, ref_frame_buf,
|
vp9_frameworker_wait(pbi->frame_worker_owner, ref_frame_buf,
|
||||||
(y1 + 7) << (plane == 0 ? 0 : 1));
|
MAX(0, (y1 + 7) << (plane == 0 ? 0 : 1)));
|
||||||
}
|
}
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
|
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user