From patchwork Wed Jul 3 12:28:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Brezillon X-Patchwork-Id: 11029453 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3D6D2138B for ; Wed, 3 Jul 2019 12:28:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DF741FF13 for ; Wed, 3 Jul 2019 12:28:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 21C99205F8; Wed, 3 Jul 2019 12:28:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B07971FF13 for ; Wed, 3 Jul 2019 12:28:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726490AbfGCM24 (ORCPT ); Wed, 3 Jul 2019 08:28:56 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:38588 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725943AbfGCM2z (ORCPT ); Wed, 3 Jul 2019 08:28:55 -0400 Received: from localhost.localdomain (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 CC4A328A265; Wed, 3 Jul 2019 13:28:53 +0100 (BST) From: Boris Brezillon To: Mauro Carvalho Chehab , Hans Verkuil , Laurent Pinchart , Sakari Ailus , linux-media@vger.kernel.org Cc: Tomasz Figa , Nicolas Dufresne , kernel@collabora.com, Paul Kocialkowski , Maxime Ripard , Ezequiel Garcia , Jonas Karlman , Jernej Skrabec , Alexandre Courbot , Thierry Reding , Boris Brezillon Subject: [PATCH v3 1/3] media: uapi: h264: Clarify our expectations regarding NAL header format Date: Wed, 3 Jul 2019 14:28:47 +0200 Message-Id: <20190703122849.6316-2-boris.brezillon@collabora.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190703122849.6316-1-boris.brezillon@collabora.com> References: <20190703122849.6316-1-boris.brezillon@collabora.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Looks like some stateless decoders expect slices to be prefixed with ANNEX B start codes (they most likely do some kind of bitstream parsing and/or need that to delimit slices when doing per frame decoding). Since skipping those start codes for dummy stateless decoders (those expecting all params to be passed through controls) should be pretty easy, let's mandate that all slices be prepended with ANNEX B start codes. If we ever need to support AVC headers, we can add a new menu control to select the type of NAL header to use. Signed-off-by: Boris Brezillon Reviewed-by: Paul Kocialkowski --- Changes in v3: * Add Paul's R-b Changes in v2: * None --- Documentation/media/uapi/v4l/ext-ctrls-codec.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/media/uapi/v4l/ext-ctrls-codec.rst b/Documentation/media/uapi/v4l/ext-ctrls-codec.rst index 7a1947f5be96..3ae1367806cf 100644 --- a/Documentation/media/uapi/v4l/ext-ctrls-codec.rst +++ b/Documentation/media/uapi/v4l/ext-ctrls-codec.rst @@ -1726,6 +1726,7 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type - :ref:`h264`, section 7.4.3 "Slice Header Semantics". For further documentation, refer to the above specification, unless there is an explicit comment stating otherwise. + All slices should be prepended with an ANNEX B start code. .. note::