Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp630301pxb; Tue, 2 Feb 2021 13:45:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJyDaHJa/txV2ujF6MD5X/m3VWIKWLYqbMCkXS1hRCNj2ftSlP3HU8vwTavM7Xg61gf+hROH X-Received: by 2002:a17:907:3e04:: with SMTP id hp4mr49076ejc.188.1612302300361; Tue, 02 Feb 2021 13:45:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612302300; cv=none; d=google.com; s=arc-20160816; b=bcsBEm9E5PWsCdjXWOVY/iK4wWbBCpPfS8rJ+RW5yX6nhiPUEhfJTbWKFh5Eu0fMN0 iSalJEZpTLdXpX7CPRoSluxZcZxnItgljrxsE6waKl3mIK5ZOHgK6tN3Xit3yOaUihVk YhJhhr8F25DBTEAYoH739s+D4eaSUJvqM5/OwsztrC87Py/qqHgWmfe4FKnke2fuLGwi dlmNgQkRBxvGl09F/4VlNXGftw99QyaNPRfD4gMVl4Q1DVIO5LaRHYrjLHuGjqbalFEu k3cQ/hrG1coucYOMVe8nmn5qFp7/yEPyu4SLj9398P9LxEjs+Lp0af+7cQeBHbiGRsVU btvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wIxKfQBJkChN5zSiiaVyJqWHCDFJoDWGPPigwmW1kjs=; b=w8StmimOsvom7UzE+Mnq3rrFGliqC8FetdoCE4numGfyV2dwdHJ8KgssXPYzIm3vu9 9VGL/HzYqD5W7CC7ljHgewhyrr5W3D0Ll+UlmfwNSHvbX3waUKzZZlWw7mueLdn63D6c GcEPxch6s91HSCw6cTtG8jZCr22M9/5ZSNmveiWoScGmueu6Li3wYFz5t35d70QCbMZY WXA5Ctk00TA0WnXI1NOpgbLDQUvrHzXKJJ0kIA3mjL9/aGFBRcRquMp6BsAYoW53gWyz 7BfLA0st1/O8JrsYJx7UqHR3ica+MPRfVy7uKD52qtm1YcoH1Ulfy0juHcjo0IHyowUZ tCJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lMdMrzBU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c4si5218697edq.320.2021.02.02.13.44.29; Tue, 02 Feb 2021 13:45:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lMdMrzBU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232986AbhBBNu2 (ORCPT + 99 others); Tue, 2 Feb 2021 08:50:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:36460 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232902AbhBBNpS (ORCPT ); Tue, 2 Feb 2021 08:45:18 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 77EA964F81; Tue, 2 Feb 2021 13:41:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612273267; bh=YLzPPctyy4SyJqM/ItZUdmGJL549Q0u1dOVa0SLo4SA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lMdMrzBUnzooyQ4fd7Bw2b6Gn4HGp5jv23nkqGCkaUCuSf2rqPOD37KaE52EDUxN+ e4iYuvEXG+uX1DG77+uxIksfNVW+uN/29NCKSEwW6GB82ACqHPEFJ+evPTP3r1JLMw tZT6jIYOCwnZMI9vVjxykW1GE5QS8LYyykxEx7ak= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andre Heider , Jernej Skrabec , Hans Verkuil , Mauro Carvalho Chehab Subject: [PATCH 5.10 011/142] media: cedrus: Fix H264 decoding Date: Tue, 2 Feb 2021 14:36:14 +0100 Message-Id: <20210202132958.167593589@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210202132957.692094111@linuxfoundation.org> References: <20210202132957.692094111@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jernej Skrabec commit 73bc0b0c2a96b31199da0ce6c3d04be81ef73bb9 upstream. During H264 API overhaul subtle bug was introduced Cedrus driver. Progressive references have both, top and bottom reference flags set. Cedrus reference list expects only bottom reference flag and only when interlaced frames are decoded. However, due to a bug in Cedrus check, exclusivity is not tested and that flag is set also for progressive references. That causes "jumpy" background with many videos. Fix that by checking that only bottom reference flag is set in control and nothing else. Tested-by: Andre Heider Fixes: cfc8c3ed533e ("media: cedrus: h264: Properly configure reference field") Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Cc: Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/staging/media/sunxi/cedrus/cedrus_h264.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/staging/media/sunxi/cedrus/cedrus_h264.c +++ b/drivers/staging/media/sunxi/cedrus/cedrus_h264.c @@ -203,7 +203,7 @@ static void _cedrus_write_ref_list(struc position = cedrus_buf->codec.h264.position; sram_array[i] |= position << 1; - if (ref_list[i].fields & V4L2_H264_BOTTOM_FIELD_REF) + if (ref_list[i].fields == V4L2_H264_BOTTOM_FIELD_REF) sram_array[i] |= BIT(0); }