From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f174.google.com (mail-oi1-f174.google.com [209.85.167.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC55D7460 for ; Thu, 30 Jun 2022 17:34:21 +0000 (UTC) Received: by mail-oi1-f174.google.com with SMTP id i126so182817oih.4 for ; Thu, 30 Jun 2022 10:34:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vanguardiasur-com-ar.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=BWbLJKNt5MQqNM+YkZAOKbF+2rTK0qxaILnlQmPjQL4=; b=RPsUGVKyrgf5xg0jcnzE7QB2dirFT0xK3s8TYFJ/rLTSjzy1/dXyAUJ6hsrGo0AgK3 0CjbgD2BEaoPuX60nr6hxj0ezhnyYUT0JWa6ZFksc0onWBUOEkydiBAYyy/Tzrxq7gAI SkKxMDeWtegmW0N9vlbSiI3KYxzTKrTx+Kj8Z6ENoXTAViJA3vn8/djDjj8JIsXgklIU yeZ4shPeFr+/qpuE7zcGcRjRsXvNUQNFdRmNwA1wcFm9REPxg6dK+16MzTXQLqarCl9O iGFVdIyvcm3yegLnMSgzaYXgBk3I7ru2A2CE37rdIPZgPHp3MYJAkLLzQSwvfiJvlyjp +mQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=BWbLJKNt5MQqNM+YkZAOKbF+2rTK0qxaILnlQmPjQL4=; b=Up+0ZX9jWkJQA8GwKf6YWuDEPR0cN+trxwj8jj9HkUoD3tFeDY8+kZ4gZWWD6k6kw6 RtzvE6HWTBlz4f1DmqPiwL86sIfyrgLVAC2zBRrc7XN3Wq5xd+K5a7PX2HdFzZEvUP6/ 70YMUNokMpjiNhG1tBBjVvNKqkuv51I72EdWjwy5ZKxtGr3vlAfiTvp/URMdMJVof0yQ cy+0nAaYuYpMPqFmDU8KCnFVPWI849vgriJMwcOTbTry74fzp2bE9Cj0KfD869t3L6/a 5773/vjelUH/RJI13u/VK3z4tVtGOSZOe4RtWyhvj0kVwU6gANfADza9q7ewVHCV5k7v aJYg== X-Gm-Message-State: AJIora+IzKW+PpJ/Ecfc+OoQ+VP0Y5O5A2+aoqEtFESgJsvLsQAky76g /5n1hX2X1TsBAGPZ2xdppW8EQQ== X-Google-Smtp-Source: AGRyM1vEwKk6VMtJ6yfaI/N6IBF1oh91SChmbChO4mduVSAvClPkYqXQsh5Dy17rYEmcMyschR/Jkg== X-Received: by 2002:a05:6808:94:b0:335:98f6:2471 with SMTP id s20-20020a056808009400b0033598f62471mr5801516oic.148.1656610460711; Thu, 30 Jun 2022 10:34:20 -0700 (PDT) Received: from eze-laptop ([190.190.187.68]) by smtp.gmail.com with ESMTPSA id q10-20020a05687101ca00b000fb2aa6eef2sm13182533oad.32.2022.06.30.10.34.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jun 2022 10:34:20 -0700 (PDT) Date: Thu, 30 Jun 2022 14:34:13 -0300 From: Ezequiel Garcia To: Benjamin Gaignard Cc: mchehab@kernel.org, hverkuil@xs4all.nl, p.zabel@pengutronix.de, gregkh@linuxfoundation.org, mripard@kernel.org, paul.kocialkowski@bootlin.com, wens@csie.org, jernej.skrabec@gmail.com, samuel@sholland.org, nicolas.dufresne@collabora.com, andrzej.p@collabora.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, kernel@collabora.com Subject: Re: [PATCH 3/7] media: hantro: HEVC: Fix chroma offset computation Message-ID: References: <20220617115802.396442-1-benjamin.gaignard@collabora.com> <20220617115802.396442-4-benjamin.gaignard@collabora.com> Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220617115802.396442-4-benjamin.gaignard@collabora.com> Hi Benjamin, On Fri, Jun 17, 2022 at 01:57:58PM +0200, Benjamin Gaignard wrote: > The chroma offset depends of the bitstream depth. > Make sure that ctx->bit_depth is used to compute it. > > Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia Thanks, Ezequiel > --- > drivers/staging/media/hantro/hantro_g2_hevc_dec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/media/hantro/hantro_g2_hevc_dec.c b/drivers/staging/media/hantro/hantro_g2_hevc_dec.c > index 9eac133bda68..8407ad45b7b7 100644 > --- a/drivers/staging/media/hantro/hantro_g2_hevc_dec.c > +++ b/drivers/staging/media/hantro/hantro_g2_hevc_dec.c > @@ -12,7 +12,7 @@ > > static size_t hantro_hevc_chroma_offset(struct hantro_ctx *ctx) > { > - return ctx->dst_fmt.width * ctx->dst_fmt.height; > + return ctx->dst_fmt.width * ctx->dst_fmt.height * ctx->bit_depth / 8; > } > > static size_t hantro_hevc_motion_vectors_offset(struct hantro_ctx *ctx) > -- > 2.32.0 >