From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E6E8C4724C for ; Mon, 4 May 2020 19:06:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0BED3206C0 for ; Mon, 4 May 2020 19:06:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727086AbgEDTGg convert rfc822-to-8bit (ORCPT ); Mon, 4 May 2020 15:06:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725956AbgEDTGg (ORCPT ); Mon, 4 May 2020 15:06:36 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04CF4C061A0E; Mon, 4 May 2020 12:06:36 -0700 (PDT) Received: from localhost (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bbrezillon) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id E22D52A0C98; Mon, 4 May 2020 20:06:33 +0100 (BST) Date: Mon, 4 May 2020 21:06:30 +0200 From: Boris Brezillon To: Nicolas Dufresne Cc: Ezequiel Garcia , Hans Verkuil , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Tomasz Figa , kernel@collabora.com, Jonas Karlman , Heiko Stuebner , Alexandre Courbot , Jeffrey Kardatzke Subject: Re: [PATCH v2 2/3] media: uapi: Add VP9 stateless decoder controls Message-ID: <20200504210630.1489df6e@collabora.com> In-Reply-To: References: <20200410115113.31728-1-ezequiel@collabora.com> <20200410115113.31728-3-ezequiel@collabora.com> <9126475c-275d-71ab-0308-6ae85e22446b@xs4all.nl> <20200502203707.402ea3cd@collabora.com> Organization: Collabora X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 04 May 2020 14:01:32 -0400 Nicolas Dufresne wrote: > Le samedi 02 mai 2020 à 19:55 -0300, Ezequiel Garcia a écrit : > > +Nicolas > > > > On Sat, 2020-05-02 at 20:37 +0200, Boris Brezillon wrote: > > > On Fri, 01 May 2020 13:57:49 -0300 > > > Ezequiel Garcia wrote: > > > > > > > > > + > > > > > > +.. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}| > > > > > > + > > > > > > +.. flat-table:: enum v4l2_vp9_reset_frame_context > > > > > > + :header-rows: 0 > > > > > > + :stub-columns: 0 > > > > > > + :widths: 1 2 > > > > > > + > > > > > > + * - ``V4L2_VP9_RESET_FRAME_CTX_NONE`` > > > > > > + - Do not reset any frame context. > > > > > > + * - ``V4L2_VP9_RESET_FRAME_CTX_NONE_ALT`` > > > > > > + - Do not reset any frame context. This is an alternative value for > > > > > > + V4L2_VP9_RESET_FRAME_CTX_NONE. > > > > > > > > > > Add `` around V4L2_VP9_RESET_FRAME_CTX_NONE. > > > > > > > > > > > > > Hm, now that I look closer, what's the point > > > > of having the NONE_ALT in our uAPI if it > > > > has same meaning as NONE? > > > > > > > > I think it can be removed. > > > > > > The intent was to match the spec so that one can pass the value > > > extracted from the bitstream directly. > > reset_frame_contextspecifies whether the frame context should be reset > to default values: > − 0 or 1 means do not reset any frame context > − 2 resets just the context specified in the frame header > − 3 resets all cont > > But aren't we going too far by making this an emum ? I like to not have to constantly go back to the spec when I read code, and having constant values defined through enums definitely helps in this regard, but maybe it's just me. > In Microsfot DXVA, > we pass that value without interpreting it in userspace. For the > following RKVDEC, it is (suspiciously ?) ignored. IIRC, the prob context has to be kept in userspace anyway (and reset when needed), and the rkvdec engine does not have any hardware context. That's probably why this value is ignored here. > Maybe just passing > over the value would make more sense, less work ? I don't see how adding an enum adds more work, given the enum values match the ones defined VP 9 spec, but maybe I'm missing something.