lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210209172337.336737-1-nicolas.dufresne@collabora.com>
Date:   Tue,  9 Feb 2021 12:22:33 -0500
From:   Nicolas Dufresne <nicolas.dufresne@...labora.com>
To:     linux-media@...r.kernel.org
Cc:     kernel@...labora.com, Jernej Skrabec <jernej.skrabec@...l.net>,
        John Cox <jc@...esim.co.uk>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Hans Verkuil <hverkuil-cisco@...all.nl>,
        Ezequiel Garcia <ezequiel@...labora.com>,
        Stanimir Varbanov <stanimir.varbanov@...aro.org>,
        Dikshita Agarwal <dikshita@...eaurora.org>,
        Maheshwar Ajja <majja@...eaurora.org>,
        linux-kernel@...r.kernel.org
Subject: [PATCH v1] doc: h264/hevc: Clarify _START_CODE_NONE meaning

As some hardware have a knob to enable or disable emulation prevention
bytes removal, driver writers ended up wondering what exactly the
START_CODE_NONE modes meant in this regards. This patch clarify what is
expected with a reference to the specification.

Reported-by: John Cox <jc@...esim.co.uk>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@...labora.com>
---
 .../userspace-api/media/v4l/ext-ctrls-codec-stateless.rst     | 4 +++-
 Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst     | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst
index 01e3b1a3fb99..075cbf14991e 100644
--- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst
+++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst
@@ -665,7 +665,9 @@ Stateless Codec Control ID
     * - ``V4L2_STATELESS_H264_START_CODE_NONE``
       - 0
       - Selecting this value specifies that H264 slices are passed
-        to the driver without any start code.
+        to the driver without any start code. The bitstream data should be
+        according to :ref:`h264` 7.3.1 NAL unit syntax, hence contains
+        emulation prevention bytes when required.
     * - ``V4L2_STATELESS_H264_START_CODE_ANNEX_B``
       - 1
       - Selecting this value specifies that H264 slices are expected
diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
index 00944e97d638..5021f1492856 100644
--- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
+++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
@@ -3631,7 +3631,9 @@ enum v4l2_mpeg_video_hevc_size_of_length_field -
     * - ``V4L2_MPEG_VIDEO_HEVC_START_CODE_NONE``
       - 0
       - Selecting this value specifies that HEVC slices are passed
-        to the driver without any start code.
+        to the driver without any start code. The bitstream data should be
+        according to :ref:`hevc` 7.3.1.1 General NAL unit syntax, hence
+        contains emulation prevention bytes when required.
     * - ``V4L2_MPEG_VIDEO_HEVC_START_CODE_ANNEX_B``
       - 1
       - Selecting this value specifies that HEVC slices are expected
-- 
2.28.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ