Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp2305012ybg; Fri, 5 Jun 2020 10:28:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxa7rP3pSWjAy44Fiq8Iv3//kw2Med/OQOXFdPqLFaVB1adiiwcXAeXN8XUD2Kdy6H0gwzi X-Received: by 2002:a05:6402:2207:: with SMTP id cq7mr7102778edb.186.1591378122315; Fri, 05 Jun 2020 10:28:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591378122; cv=none; d=google.com; s=arc-20160816; b=TCCq0MdTaWWLp1jwoXTiVOVHUHMMgzGEg1XQUt4DGORtTlYHI7qqckfm2ufelqWDMi n+sIXFnZZ4rz9f8MY5ggxDa2uOaD1+58gLXLQeriD44v3shDTWzl8AUK3PGATKZk94VC +msgrIR3Ulve7YX8/boDxlxvMB24heJXvOGgSGMwkdK2Vh0B7M1EN6ZW4aO+aiAv3UqC QfXT8eb6Z7uOcUsG1NiCAydmpAInaFMsuetb4sRT8lI6thqu/hTDRmn6wY/DXVuFTJFI ttNYnw+X/Yg8Q5O+U6o7Zn1iFkoN18dE/USaW1qIjxN780F1K0uzOi6aTLnzDLvmphj8 1AIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=mmLvwqRJh9kIe8u97hGBwO1I7n1j/MhjsdTrCsHc2eo=; b=El1LBxCHVERezB1OvVOJ6bwFcxArUe1hiHCuoqWzK6BbXN9LEoZhQBu0C++8qHTM7t Cx8DOYnJi3R6Yg/X2BUgJjB1RtnQClyX7PcF3dFT6jXRK7rwQ9tF/U2B29w3lhZ+ljXA 7NvfvoQvZLqhSE0ZCiYcYLb5qzmrzs/eG85Gi6EAdoxVYCpB6LIFckKyBNBEkNXFs5jv Edjh+2fPk0763JIZSAwFxh9K4o5qu40S+09fG9ggre1k1yJrxsBt8bxPffGHt01Ipo3F 2wm4i4K5mKgJOOPIiWGq9UfKBTXdD5J2dNGPk/MBEpezN1ww3g1aLg7gb//mx5hS1/E6 l+EA== 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 q11si3781719ejt.328.2020.06.05.10.28.19; Fri, 05 Jun 2020 10:28:42 -0700 (PDT) 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 S1727013AbgFER00 convert rfc822-to-8bit (ORCPT + 99 others); Fri, 5 Jun 2020 13:26:26 -0400 Received: from mailoutvs50.siol.net ([185.57.226.241]:34137 "EHLO mail.siol.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726939AbgFER0Z (ORCPT ); Fri, 5 Jun 2020 13:26:25 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTP id 33D78521D26; Fri, 5 Jun 2020 19:26:22 +0200 (CEST) X-Virus-Scanned: amavisd-new at psrvmta10.zcs-production.pri Received: from mail.siol.net ([127.0.0.1]) by localhost (psrvmta10.zcs-production.pri [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Hkdlf3xJ94FU; Fri, 5 Jun 2020 19:26:21 +0200 (CEST) Received: from mail.siol.net (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTPS id C0F03521D2D; Fri, 5 Jun 2020 19:26:21 +0200 (CEST) Received: from jernej-laptop.localnet (cpe-194-152-20-232.static.triera.net [194.152.20.232]) (Authenticated sender: jernej.skrabec@siol.net) by mail.siol.net (Postfix) with ESMTPA id C2B65521CA7; Fri, 5 Jun 2020 19:26:20 +0200 (CEST) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: paul.kocialkowski@bootlin.com, mripard@kernel.org, Nicolas Dufresne Cc: mchehab@kernel.org, wens@csie.org, hverkuil-cisco@xs4all.nl, gregkh@linuxfoundation.org, jonas@kwiboo.se, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 2/3] media: cedrus: h264: Properly configure reference field Date: Fri, 05 Jun 2020 19:26:20 +0200 Message-ID: <2479507.UA2pHCgT9S@jernej-laptop> In-Reply-To: <7e74e15b7b3f9fc765182f1a43cfcf1e0e9602fc.camel@ndufresne.ca> References: <20200604185745.23568-1-jernej.skrabec@siol.net> <20200604185745.23568-3-jernej.skrabec@siol.net> <7e74e15b7b3f9fc765182f1a43cfcf1e0e9602fc.camel@ndufresne.ca> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="iso-8859-1" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dne petek, 05. junij 2020 ob 19:16:35 CEST je Nicolas Dufresne napisal(a): > Le jeudi 04 juin 2020 ? 20:57 +0200, Jernej Skrabec a ?crit : > > When interlaced H264 content is being decoded, references must indicate > > which field is being referenced. Currently this was done by checking > > capture buffer flags. However, that is not correct because capture > > buffer may hold both fields. > > > > Fix this by checking newly introduced flags in reference lists. > > > > Signed-off-by: Jernej Skrabec > > Perhaps an additional patch could cleanup the miss-leading comment in > v4l2_h264_dpb_entry definition. I missed that. I think this change actually belongs to patch 1. I'll fix it in v2. Best regards, Jernej > > Reviewed-by: Nicolas Dufresne > > > --- > > > > drivers/staging/media/sunxi/cedrus/cedrus_h264.c | 6 ++---- > > 1 file changed, 2 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_h264.c > > b/drivers/staging/media/sunxi/cedrus/cedrus_h264.c index > > cce527bbdf86..c87717d17ec5 100644 > > --- a/drivers/staging/media/sunxi/cedrus/cedrus_h264.c > > +++ b/drivers/staging/media/sunxi/cedrus/cedrus_h264.c > > @@ -183,7 +183,6 @@ static void _cedrus_write_ref_list(struct cedrus_ctx > > *ctx,> > > for (i = 0; i < num_ref; i++) { > > > > const struct v4l2_h264_dpb_entry *dpb; > > const struct cedrus_buffer *cedrus_buf; > > > > - const struct vb2_v4l2_buffer *ref_buf; > > > > unsigned int position; > > int buf_idx; > > u8 dpb_idx; > > > > @@ -198,12 +197,11 @@ static void _cedrus_write_ref_list(struct cedrus_ctx > > *ctx,> > > if (buf_idx < 0) > > > > continue; > > > > - ref_buf = to_vb2_v4l2_buffer(cap_q->bufs[buf_idx]); > > - cedrus_buf = vb2_v4l2_to_cedrus_buffer(ref_buf); > > + cedrus_buf = vb2_to_cedrus_buffer(cap_q->bufs[buf_idx]); > > > > position = cedrus_buf->codec.h264.position; > > > > sram_array[i] |= position << 1; > > > > - if (ref_buf->field == V4L2_FIELD_BOTTOM) > > + if (ref_list[i].flags & V4L2_H264_REFERENCE_FLAG_BOTTOM_FIELD) > > > > sram_array[i] |= BIT(0); > > > > }