]> granicus.if.org Git - libvpx/commitdiff
Do not reuse mv in base spatial layer if curr buf same as prev.
authorJerome Jiang <jianj@google.com>
Thu, 21 Jan 2021 21:07:20 +0000 (13:07 -0800)
committerJerome Jiang <jianj@google.com>
Fri, 22 Jan 2021 01:09:02 +0000 (17:09 -0800)
Bug: b/154890543
Change-Id: Iad5791912f781d225e610a61bc13f3dbaef81bb9

vp9/encoder/vp9_encoder.c

index f4587d42d9c4a4aa8bfb109d78ed0bc1327f3643..4823d5f0f1fca07a84658c0157fb1d162e00ced9 100644 (file)
@@ -7861,9 +7861,12 @@ int vp9_get_compressed_data(VP9_COMP *cpi, unsigned int *frame_flags,
   cm->new_fb_idx = get_free_fb(cm);
 
   if (cm->new_fb_idx == INVALID_IDX) return -1;
-
   cm->cur_frame = &pool->frame_bufs[cm->new_fb_idx];
-
+  // If the frame buffer for current frame is the same as previous frame, MV in
+  // the base layer shouldn't be used as it'll cause data race.
+  if (cm->cur_frame == cm->prev_frame) {
+    cpi->svc.use_base_mv = 0;
+  }
   // Start with a 0 size frame.
   *size = 0;