shithub: libvpx

Download patch

ref: 915d5c12d3b996d33cff188d5f283563ec2df86a
parent: feda5d244cd5baf93575f7027b5a5c8b2ac09c2f
parent: a723f5ecd174264f0c494161cb3c18711d5887d3
author: hkuang <hkuang@google.com>
date: Thu Mar 5 09:55:27 EST 2015

Merge "Fix a tsan error bug in frame parallel decode."

--- a/vp9/decoder/vp9_decodeframe.c
+++ b/vp9/decoder/vp9_decodeframe.c
@@ -1926,7 +1926,7 @@
       // pixels of each superblock row can be changed by next superblock row.
        if (pbi->frame_parallel_decode)
          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.
       if (x0 < 0 || x0 > frame_width - 1 || x1 < 0 || x1 > frame_width - 1 ||
@@ -1982,7 +1982,7 @@
       // pixels of each superblock row can be changed by next superblock row.
        if (pbi->frame_parallel_decode)
          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 (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {