From: Stanimir Varbanov <stanimir.varbanov@linaro.org>
To: Nicolas Dufresne <nicolas@ndufresne.ca>, linux-media@vger.kernel.org
Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Subject: Re: [RFC/WIP 1/4] media: Add HEIC compressed pixel format
Date: Tue, 25 May 2021 10:42:30 +0300 [thread overview]
Message-ID: <c1693dc3-4cfa-6a1a-1981-affd0ee4f3f3@linaro.org> (raw)
In-Reply-To: <f1ebf16082af8a540e34d834d33a1f48bc267e91.camel@ndufresne.ca>
On 5/18/21 8:11 PM, Nicolas Dufresne wrote:
> Le jeudi 29 avril 2021 à 16:28 +0300, Stanimir Varbanov a écrit :
>> Add HEIC (High-Efficiency Image Container) pixel format. This an
>> image container which use HEVC codec to encoded images.
>>
>> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
>> ---
>> .../userspace-api/media/v4l/pixfmt-compressed.rst | 12 ++++++++++++
>> drivers/media/v4l2-core/v4l2-ioctl.c | 1 +
>> include/uapi/linux/videodev2.h | 1 +
>> 3 files changed, 14 insertions(+)
>>
>> diff --git a/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst b/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst
>> index ba6c0c961204..246bff90dcac 100644
>> --- a/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst
>> +++ b/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst
>> @@ -186,6 +186,18 @@ Compressed Formats
>> If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
>> then the decoder has no requirements since it can parse all the
>> information from the raw bytestream.
>> + * .. _V4L2-PIX-FMT-HEIC:
>> +
>> + - ``V4L2_PIX_FMT_HEIC``
>> + - 'HEIC'
>> + - High Efficiency Image Container is an image container file format which
>> + uses HEVC encoding and it is a variant of HEIF (High Efficiency Image File)
>> + format.
>
> Can you clarify, is it expected that an HEIF container be compatible or not ?
> Assuming this exist. The HEIC being a brand name, and not really a standard
> seems rather confusing. Is this is right name, or should you introduce HEIF with
> variant control, similar to HEVC profile control.
V4L2_PIX_FMT_HFIF_HEVC is a good option, I guess.
>
> Speaking of profile, does it inherit anything from HEVC ? So we need to set HEVC
> pofile/level ? Is there some way's to affect the quality or is it the HEVC QP
> controls ?
V4L2_PIX_FMT_HFIF_HEVC will accept
V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE profile and the image
quality is set through V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY
>
>>
>>
>> + The decoder expects one Access Unit per buffer.
>> + The encoder generates one Access Unit per buffer.
>> + If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
>> + then the decoder has no requirements since it can parse all the
>> + information from the raw bytestream.
>> * .. _V4L2-PIX-FMT-HEVC-SLICE:
>>
>> - ``V4L2_PIX_FMT_HEVC_SLICE``
>> diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
>> index 31d1342e61e8..3a1b4c3a76c8 100644
>> --- a/drivers/media/v4l2-core/v4l2-ioctl.c
>> +++ b/drivers/media/v4l2-core/v4l2-ioctl.c
>> @@ -1454,6 +1454,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
>> case V4L2_PIX_FMT_S5C_UYVY_JPG: descr = "S5C73MX interleaved UYVY/JPEG"; break;
>> case V4L2_PIX_FMT_MT21C: descr = "Mediatek Compressed Format"; break;
>> case V4L2_PIX_FMT_SUNXI_TILED_NV12: descr = "Sunxi Tiled NV12 Format"; break;
>> + case V4L2_PIX_FMT_HEIC: descr = "HEIC Image Format"; break;
>> default:
>> if (fmt->description[0])
>> return;
>> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
>> index 79dbde3bcf8d..2153b5c31d46 100644
>> --- a/include/uapi/linux/videodev2.h
>> +++ b/include/uapi/linux/videodev2.h
>> @@ -699,6 +699,7 @@ struct v4l2_pix_format {
>> #define V4L2_PIX_FMT_FWHT v4l2_fourcc('F', 'W', 'H', 'T') /* Fast Walsh Hadamard Transform (vicodec) */
>> #define V4L2_PIX_FMT_FWHT_STATELESS v4l2_fourcc('S', 'F', 'W', 'H') /* Stateless FWHT (vicodec) */
>> #define V4L2_PIX_FMT_H264_SLICE v4l2_fourcc('S', '2', '6', '4') /* H264 parsed slices */
>> +#define V4L2_PIX_FMT_HEIC v4l2_fourcc('H', 'E', 'I', 'C') /* HEIC HEVC image format */
>>
>> /* Vendor-specific formats */
>> #define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */
>
>
--
regards,
Stan
next prev parent reply other threads:[~2021-05-25 7:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-29 13:28 [RFC/WIP 0/4] HEIC image encoder Stanimir Varbanov
2021-04-29 13:28 ` [RFC/WIP 1/4] media: Add HEIC compressed pixel format Stanimir Varbanov
2021-05-18 17:11 ` Nicolas Dufresne
2021-05-25 7:42 ` Stanimir Varbanov [this message]
2021-04-29 13:28 ` [RFC/WIP 2/4] v4l2-ctrls: Add HEIC grid size control Stanimir Varbanov
2021-04-29 13:28 ` [RFC/WIP 3/4] venus: helpers: Add a new helper for buffer processing Stanimir Varbanov
2021-04-29 13:28 ` [RFC/WIP 4/4] venus: Add HEIC image encoder Stanimir Varbanov
2021-05-18 17:07 ` [RFC/WIP 0/4] " Nicolas Dufresne
2021-05-24 13:16 ` Stanimir Varbanov
2021-05-27 7:54 ` Hans Verkuil
2021-06-11 13:12 ` Stanimir Varbanov
2021-06-11 14:46 ` Nicolas Dufresne
2021-06-12 8:45 ` Stanimir Varbanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c1693dc3-4cfa-6a1a-1981-affd0ee4f3f3@linaro.org \
--to=stanimir.varbanov@linaro.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=nicolas@ndufresne.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).