Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5695081pxu; Wed, 23 Dec 2020 03:10:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJyPHc7YpxmEmaaSNxqQl10zrxRKRjrjHhh+ZbET0feQcYI+oWsDE1al6kOeOaw3rrjeOD5g X-Received: by 2002:a17:906:a415:: with SMTP id l21mr23358543ejz.2.1608721814811; Wed, 23 Dec 2020 03:10:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608721814; cv=none; d=google.com; s=arc-20160816; b=0Uy97YYdKEfQm9ojki+7w6eVzhsr/4tWem4EEW7Jn6izLhKOHeAS7i0DRkTsA/XINx Lzz/6iSCiy/1pVC1lelGG8f+zc/6JQQsY5FUVMOqG5LUOGMNP2kLlZpt/TKFU0hP6VOm H3zH82M5hD9XPfjmVRmRrS0QMfoR2+spv7vehXXaQayFVvCyJ2ZsF6kO44/DJ516BYDj wDEGPvQON7NfSVKtyz8YB6/4Xjuy1aN9izgN59VWSUsoLQR7Ln8tD1xGiTyiFPG64SCM 6XACk36W1J+j2SLou/YNQPqX0gPmpBA1UFL9K/5B4UpbvcxTdu9V47gZ1bDnAV3oEdbt AYJQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=rQVOKEBc5dYOhAhNoTuIJa4iLm2vgDeIBrNm5YTPwiQ=; b=otZO0N98MTyngcIZxYP5iq3ExOznXJJ45UKFp3ynx9Mmpw6CzYR4YAl+/wl+A2NIre 3INJDGgxJq3lyRYUBmZNZrsZaDvdmDjGRtEprApcXYoQsGXE9K8mvHhqeYlCsLjCPytB qRSalHoWaHdF8tKXRMvZxgEbUiMlHG8zX7HSMm6T2Jw2p84OD85outM4MPxFuGik1sHI x23f9F9oj3K0JNEZQ4ClFE0kc1ZGGQcjC/0TxxdwIG28Oq71itYyiKN18XUSUKzcBGqA MM3HEGeQSRupGTKmbmFeug/qSREkL/YTQXvigVf0/pBJdf/XJSvdfz4g/KPfPn5TU9ws upDw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=siol.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q11si13425751edn.225.2020.12.23.03.09.52; Wed, 23 Dec 2020 03:10:14 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=siol.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728639AbgLWLH6 (ORCPT + 99 others); Wed, 23 Dec 2020 06:07:58 -0500 Received: from mailoutvs35.siol.net ([185.57.226.226]:43256 "EHLO mail.siol.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728611AbgLWLH4 (ORCPT ); Wed, 23 Dec 2020 06:07:56 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTP id 2599A5223E4; Wed, 23 Dec 2020 12:07:14 +0100 (CET) X-Virus-Scanned: amavisd-new at psrvmta11.zcs-production.pri Received: from mail.siol.net ([127.0.0.1]) by localhost (psrvmta11.zcs-production.pri [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id gHen5p7CaN0H; Wed, 23 Dec 2020 12:07:13 +0100 (CET) Received: from mail.siol.net (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTPS id CE31452248C; Wed, 23 Dec 2020 12:07:13 +0100 (CET) Received: from localhost.localdomain (89-212-178-211.dynamic.t-2.net [89.212.178.211]) (Authenticated sender: 031275009) by mail.siol.net (Postfix) with ESMTPSA id 7D6145224CF; Wed, 23 Dec 2020 12:07:11 +0100 (CET) From: Jernej Skrabec To: mripard@kernel.org, paul.kocialkowski@bootlin.com Cc: mchehab@kernel.org, wens@csie.org, jernej.skrabec@siol.net, hans.verkuil@cisco.com, nicolas.dufresne@collabora.com, linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, linux-sunxi@googlegroups.com, Andre Heider Subject: [PATCH 2/2] media: cedrus: Fix H264 decoding Date: Wed, 23 Dec 2020 12:06:59 +0100 Message-Id: <20201223110659.2631255-3-jernej.skrabec@siol.net> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201223110659.2631255-1-jernej.skrabec@siol.net> References: <20201223110659.2631255-1-jernej.skrabec@siol.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 f= ield") Signed-off-by: Jernej Skrabec --- drivers/staging/media/sunxi/cedrus/cedrus_h264.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_h264.c b/drivers/s= taging/media/sunxi/cedrus/cedrus_h264.c index 781c84a9b1b7..de7442d4834d 100644 --- 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(struct cedrus_ctx = *ctx, position =3D cedrus_buf->codec.h264.position; =20 sram_array[i] |=3D position << 1; - if (ref_list[i].fields & V4L2_H264_BOTTOM_FIELD_REF) + if (ref_list[i].fields =3D=3D V4L2_H264_BOTTOM_FIELD_REF) sram_array[i] |=3D BIT(0); } =20 --=20 2.29.2