From: Jerome Jiang Date: Thu, 21 Jan 2021 21:07:20 +0000 (-0800) Subject: Do not reuse mv in base spatial layer if curr buf same as prev. X-Git-Tag: v1.10.0-rc1~16^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7b93b56;p=libvpx Do not reuse mv in base spatial layer if curr buf same as prev. Bug: b/154890543 Change-Id: Iad5791912f781d225e610a61bc13f3dbaef81bb9 --- diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index f4587d42d..4823d5f0f 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -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;