Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4356122pxb; Tue, 10 Nov 2020 14:29:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJzf4f3BBnN8SbwZTCT3pA44YUstDRdbC1P4My4mgCs1VHkmPj2Qfl1X1RNDLO+SnpVj7iAH X-Received: by 2002:a50:cc86:: with SMTP id q6mr24304519edi.78.1605047361665; Tue, 10 Nov 2020 14:29:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605047361; cv=none; d=google.com; s=arc-20160816; b=jNAly/adIoELJV+cVgRgpi0eNAZ6kE4gKakSUNqNMjbry5NtHZ183tvJHHEzkJVaXY BCiF2pnpgytiNwRjSbO2hkVpTJQtapr+qFV6tTgc8NEY77y9TqDwpIFdA8PgsKD09PvJ zrA8pPcGMxSgM118hKx86ZpNY9te0zJPpnHTf/5+uugeVn8lsnAKCT99h9UnYnefY0W+ 667FWaGHBfPdxkhKwJoI01lY4sMuynmabAsJy0ecZuHwTv56ORHcVBFh35Y3O4U6FNc4 rtRARrr+c/rlNUOZ3VNsrSIajRJwJcmyheFjQTzO5YfdPflEoE+QZXNmdE/4QVw2ZEVN s4cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=+AlC8i3jg4p5BSKPhAm3NFCbLdfe3lXWLKFrjfcHkOE=; b=AmtU+5ZntjOO/wUgK5r5MkZAy5MBwwpICzyqfUmysB8Dy8kNreqGEc7YRXaYSv33wx rNtFOqpnp5IZY8MuXPhCUTT9tOL5TdOKcPHDQXmary/MbGKnWcqHtj7DN7BtAmdkeDhe YBkPw7wrwGKlZTi0T9fkSELJ8xH0NdS6MzgqZHE4qRv4IUJM1OzwSJSrRczZYFw+uLIC h9bwzJUpIMpPax6iggxp2Wi4PAx4b+Ypewxs8lpMziM2zqDpFi9jLtaeg3DmTZOZJi4Z FoeiswUuzUIJSxhxr9HigKHaKyM2Z9Pu732cMlGpzWr5s9eRz7tzK4h0wM2+G1CpcLSB qweQ== 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=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oi23si10087068ejb.676.2020.11.10.14.28.56; Tue, 10 Nov 2020 14:29:21 -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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732239AbgKJW03 (ORCPT + 99 others); Tue, 10 Nov 2020 17:26:29 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:59612 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731919AbgKJW03 (ORCPT ); Tue, 10 Nov 2020 17:26:29 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: aratiu) with ESMTPSA id 6323F1F454F7 From: Adrian Ratiu To: Ezequiel Garcia Cc: linux-media , Mauro Carvalho Chehab , Ezequiel Garcia , Boris Brezillon , Hans Verkuil , Laurent Pinchart , Jonas Karlman , "open list:ARM/Rockchip SoC..." , Linux Kernel Mailing List , kernel@collabora.com Subject: Re: [PATCH v5 0/3] media: rkvdec: Add a VP9 backend In-Reply-To: References: <20201102190551.1223389-1-adrian.ratiu@collabora.com> Date: Wed, 11 Nov 2020 00:28:03 +0200 Message-ID: <87y2j8hmoc.fsf@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ezequiel, On Tue, 10 Nov 2020, Ezequiel Garcia wrote: > On Mon, 2 Nov 2020 at 16:04, Adrian Ratiu > wrote: >> >> Dear all, >> >> This is v5 of the series adding VP9 profile 0 decoding to >> rkvdec. >> >> All feedback from v4 should be addressed, there's just one >> thing I did not address: ref_frame_sign_biases in the uAPI. The >> userspace tool I'm > > I believe that Hantro G2 VP9 needs ref_frame_sign_biases. > > I think that it's also needed for the MTK decoder. Might be > worth checking that as well, if the code is publicly available > somewhere. I consulted the imx8m app ref manual for the Hantro G2 core and indeed there's not one, but three fields at SWREG11 and 13 (last, gold, alt) to signify sign biases for ref frames. Thanks for the hint! > > Coming to think about it, I think we are really close to having > this uAPI directly upstream. > > Let's take a step back on why we have these uAPIs in the staging > area. Couple years ago, there were some doubts in the media > community about these uAPIs, and we wanted to wait a bit for > more users before moving to public land. > > The uAPIs were meant to be in staging until enough users > appeared and we were confident enough to move to stable. > > For VP9, given the feedback received through the year was > already addressed, I think all that's left is to check the > interface and make sure it can support Rockchip (RK3399, RK3326, > etc), Hantro G2 and Mediatek, > > We will be very close to having a public API, and we could even > merge it directly there. Thank you very much for this background. I understand that the uAPI is independent from the driver implementations, so having a good stable uAPI is beneficial when (for example) adding support for VP9 on G2 in hantro or for upstream adoption of these drivers. Given this rkvdec driver implementation is also adding the VP9 uAPI and it's very close to stability (maybe only missing ref frame sign bias, but who knows?) would you like to block its submission until the uAPI is finalized or would it make sense to treat the uAPI de-staging process separately because the uAPI is independent from the driver? Thanks, Adrian > > Thanks, > Ezequiel > >> using [1] apparently doesn't need it or the default hwreg value for it >> is capable of decoding the bitstreams I used on the driver, so I don't >> really have a use-case to change and test that. :) >> >> Considering the uAPI is a work in progress and expected to be modified, >> ref_frame_sign_biases can be added later with others which might be >> required to enable more functionality (for eg profiles >= 1). >> >> Series tested on rk3399 and applies on next-20201030. >> >> [1] https://github.com/Kwiboo/FFmpeg/tree/v4l2-request-hwaccel-4.2.2-rkvdec >> >> Changelog >> --------- >> >> v5: >> >> * Drop unnecessary OUTPUT buffer payload set in .buf_prepare. >> * Drop obsolete .per_request ctrl flag >> * Added new vp9 ctrls to v4l2_ctrl_ptr >> * Fix pahole detected padding issues >> * Send userspace an error if it tries to reconfigure decode resolution >> as v4l2 or rkvdec-vp9 backend do not support dynamic res changes yet >> * Allow frame ctx probability tables to be non-mandatory so users can >> set them directly during frame decoding in cases where no defaults >> have been set previously (eg. ffmpeg vp9 backend) >> * Some comments and documentation clarifications >> * Minor checkpatch fixes >> >> v4: >> >> * Drop color_space field from the VP9 interface. >> V4L2 API should be used for it. >> * Clarified Segment-ID comments. >> * Moved motion vector probabilities to a separate >> struct. >> >> v3: >> >> * Fix documentation issues found by Hans. >> * Fix smatch detected issues as pointed out by Hans. >> * Added patch to fix wrong bytesused set on .buf_prepare. >> >> v2: >> >> * Documentation style issues pointed out by Nicolas internally. >> * s/VP9_PROFILE_MAX/V4L2_VP9_PROFILE_MAX/ >> * Fix wrong kfree(ctx). >> * constify a couple structs on rkvdec-vp9.c >> >> >> Boris Brezillon (2): >> media: uapi: Add VP9 stateless decoder controls >> media: rkvdec: Add the VP9 backend >> >> Ezequiel Garcia (1): >> media: rkvdec: Fix .buf_prepare >> >> .../userspace-api/media/v4l/biblio.rst | 10 + >> .../media/v4l/ext-ctrls-codec.rst | 550 ++++++ >> drivers/media/v4l2-core/v4l2-ctrls.c | 239 +++ >> drivers/media/v4l2-core/v4l2-ioctl.c | 1 + >> drivers/staging/media/rkvdec/Makefile | 2 +- >> drivers/staging/media/rkvdec/rkvdec-vp9.c | 1577 +++++++++++++++++ >> drivers/staging/media/rkvdec/rkvdec.c | 72 +- >> drivers/staging/media/rkvdec/rkvdec.h | 6 + >> include/media/v4l2-ctrls.h | 5 + >> include/media/vp9-ctrls.h | 486 +++++ >> 10 files changed, 2942 insertions(+), 6 deletions(-) >> create mode 100644 drivers/staging/media/rkvdec/rkvdec-vp9.c >> create mode 100644 include/media/vp9-ctrls.h >> >> -- >> 2.29.0 >>