Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3820040ybt; Tue, 23 Jun 2020 11:29:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeasQvVi7m41x0xwgTYkmwwbA+bECKZZBOW2ZvFDy7eh4u5AUTqd/2SWECZjr2edxWI5k9 X-Received: by 2002:a05:6402:888:: with SMTP id e8mr17399887edy.210.1592936975810; Tue, 23 Jun 2020 11:29:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592936975; cv=none; d=google.com; s=arc-20160816; b=Xuw5YvHB00wbvmAL6lO2iCEhXrzj9T21tTzpo+JmVZ0mNiDa6TXxtsEWRWseUkO3NI QH0S/TJk4/IBnaX8GYjwpY//SiD73ISxrVIe0t5FpxhnOwfgngB9wJoDNU4JL6ZsPnLL 4g7m32G+n9k14LGmgUmJQReiLzyDikukVrjGJ6iJg9ZKeW0q+AfyI0BFTMiq9TOdwByU meKce2eG0BypxbgL6jlNbz8u+vdCp+DJDyDEMXq9MiGs/ZA+jAyS/XEeevOLwyNaQMY9 ao8bPvOdacUkEaA51QUkTJMEx6yzbKvRjplc9zZ/0rJlJje3g3x9Ir0cq+cRF4IByOah z/ZQ== 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 :message-id:date:subject:cc:to:from; bh=KnihRyGKsQkEzug50ZM9/zhHzb0oCdyiC6CJ8WeqcvE=; b=GHsYWgT4+AO5ofKT81iXxidvPpPHu8NJqvGCb6FOe5mQlz2dPZED75YPgfaI77dPZy sAwPHhDOX5HQbynysHx4+khKErOzBvyaWtUe6V9FLPpd0SrZIO0pZ3qgi2yWL9QJFuqf OitV5lp84tdXr7JIyqEvF2UpkJVsARm6E8WrWPplRWXNslYeQWaBi6uAx9F+QvxHdW2n 47oJI7O9x72dbG54KMbaqlSulv2MU+kI8/64hjlRL98ObGrO9szfA949P07TYzwILwTd WW9ZexOX60y3PWVdIQSFFiTwuOcHIhdxxUFcyCmN82ie6Oq9eaY4UpAQXv1jC4kA5EET hf0w== 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 p26si12518501edx.191.2020.06.23.11.29.11; Tue, 23 Jun 2020 11:29:35 -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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387427AbgFWS26 (ORCPT + 99 others); Tue, 23 Jun 2020 14:28:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732549AbgFWS26 (ORCPT ); Tue, 23 Jun 2020 14:28:58 -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 0F624C061573; Tue, 23 Jun 2020 11:28:58 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id 3DB212A376B From: Ezequiel Garcia To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Tomasz Figa , kernel@collabora.com, Jonas Karlman , Hans Verkuil , Alexandre Courbot , Jeffrey Kardatzke , Nicolas Dufresne , Philipp Zabel , Maxime Ripard , Paul Kocialkowski , Ezequiel Garcia Subject: [RFC 0/7] media: Clean and make H264 stateless uAPI public Date: Tue, 23 Jun 2020 15:28:02 -0300 Message-Id: <20200623182809.1375-1-ezequiel@collabora.com> X-Mailer: git-send-email 2.26.0.rc2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The recent patch posted by Jernej (which I'm including for context), encouraged me to address all the known issues in the uAPI. I hope we can finally make this uAPI interface public; it would be nice to address the other codec interfaces so we can move the codec drivers out of staging. It should be noted that there is already GStreamer native support for this interface, which will be part of 1.18, once it's released [1], as well as support in Chromium [2]. The basic idea here is to sanitize the interface, making sure the structs are aligned to 64-bit, adding reserved fields for padding where suitable. These reserved fields can then be used to support future extensions, in case such need appears. In addition to this, moving the slice invariant fields to the per-frame control, makes the frame-mode driver implementation much nicer and the interface; see patch 6/7 for details. I'm not adding a MAINTAINERS entry, but I'd like to do so, so we make sure any uAPI changes are sent to those involved. Another potential change is the addition of a "Since:" tag to the control specification, so we can document which kernel version added the interface. This might prove useful if reserved fields are then used to extend the interface. Finally, I'm sneaking here a change from Philipp Zabel which apparently fell thru the cracks. [1] https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/tree/master/sys/v4l2codecs [2] https://chromium.googlesource.com/chromium/src.git/+/refs/heads/master/media/gpu/v4l2/ Ezequiel Garcia (5): fixup! media: uapi: h264: update reference lists media: uapi: h264: increase size of fields media: uapi: h264: pad v4l2_ctrl_h264_pps to 64-bit media: uapi: h264: Clean slice invariants syntax elements media: uapi: make H264 stateless codec interface public Jernej Skrabec (1): media: uapi: h264: update reference lists Philipp Zabel (1): media: uapi: h264: clarify pic_order_cnt_bit_size field .../media/v4l/ext-ctrls-codec.rst | 135 ++++++++++++------ drivers/media/v4l2-core/v4l2-ctrls.c | 31 ++++ drivers/media/v4l2-core/v4l2-h264.c | 8 +- .../staging/media/hantro/hantro_g1_h264_dec.c | 21 ++- drivers/staging/media/hantro/hantro_h264.c | 3 +- drivers/staging/media/hantro/hantro_hw.h | 5 +- drivers/staging/media/rkvdec/rkvdec-h264.c | 6 +- .../staging/media/sunxi/cedrus/cedrus_h264.c | 15 +- include/media/v4l2-ctrls.h | 3 +- include/media/v4l2-h264.h | 5 +- .../linux/v4l2-h264-ctrls.h} | 73 ++++++---- 11 files changed, 194 insertions(+), 111 deletions(-) rename include/{media/h264-ctrls.h => uapi/linux/v4l2-h264-ctrls.h} (88%) -- 2.26.0.rc2