* [GIT PULL FOR v5.2] vicodec: support the stateless decoder
@ 2019-03-14 8:04 Hans Verkuil
2019-03-20 10:24 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 3+ messages in thread
From: Hans Verkuil @ 2019-03-14 8:04 UTC (permalink / raw)
To: Linux Media Mailing List, Dafna Hirschfeld; +Cc: Helen Koike
Hi Mauro,
This series adds support for a stateless decoder to vicodec.
The first two patches are to vicodec bug fixes.
Patches 3-5 add the V4L2_BUF_CAP_REQUIRES_REQUESTS flag: this will be used
for stateless codecs that require the use of requests.
Patches 6-19 fix bugs and prepare vicodec for adding the stateless decoder.
Patches 20-22 document the new stateless FWHT pixelformat and the vicodec
controls. Patch 23-24 adds the core support for these new controls/pixelformat.
And finally, patches 25-27 add the actual stateless decoder.
Note that since the stateless codec spec isn't finalized yet, the fwht state
control is defined in media/fwht-ctrls.h instead of v4l2-controls.h. Once the
stateless codec spec is accepted, and once a stateless encoder has been added
as well, then this can be moved to v4l2-controls.h.
This work was done by Dafna Hirschfeld as the second part of her Outreachy project.
The first part was fixing the vicodec stateful codec so it was in line with the
proposed stateful codec specification, and that code has been merged already.
I would like to thank Dafna for her work on this, it is very much appreciated!
Regards,
Hans
The following changes since commit 15d90a6ae98e6d2c68497b44a491cb9efbb98ab1:
media: dvb/earth-pt1: fix wrong initialization for demod blocks (2019-03-04 06:17:02 -0500)
are available in the Git repository at:
git://linuxtv.org/hverkuil/media_tree.git tags/br-v5.2d
for you to fetch changes up to a020eb7110b75adf4d6d21603bd56cdbb413047e:
media: vicodec: set pixelformat to V4L2_PIX_FMT_FWHT_STATELESS for stateless decoder (2019-03-13 16:12:25 +0100)
----------------------------------------------------------------
Tag branch
----------------------------------------------------------------
Dafna Hirschfeld (20):
media: vicodec: selection api should only check single buffer types
media: vicodec: upon release, call m2m release before freeing ctrl handler
media: v4l2-ctrl: v4l2_ctrl_request_setup returns with error upon failure
media: vicodec: change variable name for the return value of v4l2_fwht_encode
media: vicodec: bugfix - call v4l2_m2m_buf_copy_metadata also if decoding fails
media: vicodec: bugfix: free compressed_frame upon device release
media: vicodec: Move raw frame preparation code to a function
media: vicodec: add field 'buf' to fwht_raw_frame
media: vicodec: keep the ref frame according to the format in decoder
media: vicodec: Validate version dependent header values in a separate function
media: vicodec: rename v4l2_fwht_default_fmt to v4l2_fwht_find_nth_fmt
media: vicodec: Handle the case that the reference buffer is NULL
media: vicodec: add struct for encoder/decoder instance
media: vicodec: add documentation to V4L2_CID_FWHT_I/P_FRAME_QP
media: vicodec: add documentation to V4L2_CID_MPEG_VIDEO_FWHT_PARAMS
media: vicodec: add documentation to V4L2_PIX_FMT_FWHT_STATELESS
media: vicodec: Introducing stateless fwht defs and structs
media: vicodec: Register another node for stateless decoder
media: vicodec: Add support for stateless decoder.
media: vicodec: set pixelformat to V4L2_PIX_FMT_FWHT_STATELESS for stateless decoder
Hans Verkuil (7):
vicodec: remove WARN_ON(1) from get_q_data()
vicodec: reset last_src/dst_buf based on the IS_OUTPUT
videodev2.h: add V4L2_BUF_CAP_REQUIRES_REQUESTS
vb2: add requires_requests bit for stateless codecs
cedrus: set requires_requests
vicodec: fix g_selection: either handle crop or compose
v4l2-ioctl.c: add V4L2_PIX_FMT_FWHT_STATELESS to v4l_fill_fmtdesc
Documentation/media/uapi/v4l/ext-ctrls-codec.rst | 130 +++++++++
Documentation/media/uapi/v4l/pixfmt-compressed.rst | 6 +
Documentation/media/uapi/v4l/vidioc-reqbufs.rst | 4 +
drivers/media/common/videobuf2/videobuf2-core.c | 5 +-
drivers/media/common/videobuf2/videobuf2-v4l2.c | 6 +
drivers/media/platform/vicodec/codec-fwht.c | 92 +++---
drivers/media/platform/vicodec/codec-fwht.h | 12 +-
drivers/media/platform/vicodec/codec-v4l2-fwht.c | 431 +++++++++-------------------
drivers/media/platform/vicodec/codec-v4l2-fwht.h | 7 +-
drivers/media/platform/vicodec/vicodec-core.c | 758 +++++++++++++++++++++++++++++++++++--------------
drivers/media/v4l2-core/v4l2-ctrls.c | 30 +-
drivers/media/v4l2-core/v4l2-ioctl.c | 1 +
drivers/staging/media/sunxi/cedrus/cedrus_video.c | 1 +
include/media/fwht-ctrls.h | 31 ++
include/media/v4l2-ctrls.h | 7 +-
include/media/videobuf2-core.h | 3 +
include/uapi/linux/v4l2-controls.h | 4 +
include/uapi/linux/videodev2.h | 2 +
18 files changed, 962 insertions(+), 568 deletions(-)
create mode 100644 include/media/fwht-ctrls.h
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [GIT PULL FOR v5.2] vicodec: support the stateless decoder
2019-03-14 8:04 [GIT PULL FOR v5.2] vicodec: support the stateless decoder Hans Verkuil
@ 2019-03-20 10:24 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2019-03-20 10:24 UTC (permalink / raw)
To: Hans Verkuil; +Cc: Linux Media Mailing List, Dafna Hirschfeld, Helen Koike
Em Thu, 14 Mar 2019 09:04:24 +0100
Hans Verkuil <hverkuil@xs4all.nl> escreveu:
> Hi Mauro,
>
> This series adds support for a stateless decoder to vicodec.
>
> The first two patches are to vicodec bug fixes.
I applied those.
> Patches 3-5 add the V4L2_BUF_CAP_REQUIRES_REQUESTS flag: this will be used
> for stateless codecs that require the use of requests.
I raised a concern about patch 3. At very least, it would require a lot
more documentation than what's there.
>
> Patches 6-19 fix bugs and prepare vicodec for adding the stateless decoder.
I suspect that those would not depend on patches 3-5. Yet, I guess
it is better to just wait for a new series, after my concerns got
addressed.
So, applied only patches 1 and 2 from this series.
Thanks,
Mauro
^ permalink raw reply [flat|nested] 3+ messages in thread
* [GIT PULL FOR v5.2] vicodec: support the stateless decoder
@ 2019-03-20 14:41 Hans Verkuil
0 siblings, 0 replies; 3+ messages in thread
From: Hans Verkuil @ 2019-03-20 14:41 UTC (permalink / raw)
To: Linux Media Mailing List; +Cc: Dafna Hirschfeld, Helen Koike
Hi Mauro,
This series adds support for a stateless decoder to vicodec.
Patches 1-3 add support for the vb2 requires_requests flag and return EBADR
instead of EACCES when requests are used when they shouldn't or vice versa.
Patches 4-17 fix bugs and prepare vicodec for adding the stateless decoder.
Patches 18-20 document the new stateless FWHT pixelformat and the vicodec
controls. Patch 21-22 adds the core support for these new controls/pixelformat.
And finally, patches 23-25 add the actual stateless decoder.
Note that since the stateless codec spec isn't finalized yet, the fwht state
control is defined in media/fwht-ctrls.h instead of v4l2-controls.h. Once the
stateless codec spec is accepted, and once a stateless encoder has been added
as well, then this can be moved to v4l2-controls.h.
This work was done by Dafna Hirschfeld as the second part of her Outreachy project.
The first part was fixing the vicodec stateful codec so it was in line with the
proposed stateful codec specification, and that code has been merged already.
I would like to thank Dafna for her work on this, it is very much appreciated!
Regards,
Hans
Changes since the previous pull request:
https://www.mail-archive.com/linux-media@vger.kernel.org/msg145727.html
- Rebased (this dropped the first two patches of the previous pull request since
those were merged)
- Patches 3-5 of the previous pull request are replaced by:
https://patchwork.linuxtv.org/patch/55159/
https://patchwork.linuxtv.org/patch/55160/
https://patchwork.linuxtv.org/patch/55162/
- All other patches are unchanged.
The following changes since commit 8a3946cad244e8453e26f3ded5fe40bf2627bb30:
media: v4l2-fwnode: Add a deprecation note in the old ACPI parsing example (2019-03-20 06:37:55 -0400)
are available in the Git repository at:
git://linuxtv.org/hverkuil/media_tree.git tags/br-v5.2e
for you to fetch changes up to a3e73dfbba99f0c7ebef9c4ffeb03a491df3b172:
media: vicodec: set pixelformat to V4L2_PIX_FMT_FWHT_STATELESS for stateless decoder (2019-03-20 15:32:33 +0100)
----------------------------------------------------------------
Tag branch
----------------------------------------------------------------
Dafna Hirschfeld (20):
media: vicodec: selection api should only check single buffer types
media: vicodec: upon release, call m2m release before freeing ctrl handler
media: v4l2-ctrl: v4l2_ctrl_request_setup returns with error upon failure
media: vicodec: change variable name for the return value of v4l2_fwht_encode
media: vicodec: bugfix - call v4l2_m2m_buf_copy_metadata also if decoding fails
media: vicodec: bugfix: free compressed_frame upon device release
media: vicodec: Move raw frame preparation code to a function
media: vicodec: add field 'buf' to fwht_raw_frame
media: vicodec: keep the ref frame according to the format in decoder
media: vicodec: Validate version dependent header values in a separate function
media: vicodec: rename v4l2_fwht_default_fmt to v4l2_fwht_find_nth_fmt
media: vicodec: Handle the case that the reference buffer is NULL
media: vicodec: add struct for encoder/decoder instance
media: vicodec: add documentation to V4L2_CID_FWHT_I/P_FRAME_QP
media: vicodec: add documentation to V4L2_CID_MPEG_VIDEO_FWHT_PARAMS
media: vicodec: add documentation to V4L2_PIX_FMT_FWHT_STATELESS
media: vicodec: Introducing stateless fwht defs and structs
media: vicodec: Register another node for stateless decoder
media: vicodec: Add support for stateless decoder.
media: vicodec: set pixelformat to V4L2_PIX_FMT_FWHT_STATELESS for stateless decoder
Hans Verkuil (5):
vb2: add requires_requests bit for stateless codecs
cedrus: set requires_requests
media requests: return EBADR instead of EACCES
vicodec: fix g_selection: either handle crop or compose
v4l2-ioctl.c: add V4L2_PIX_FMT_FWHT_STATELESS to v4l_fill_fmtdesc
Documentation/media/uapi/mediactl/request-api.rst | 2 +-
Documentation/media/uapi/v4l/buffer.rst | 2 +-
Documentation/media/uapi/v4l/ext-ctrls-codec.rst | 130 +++++++++
Documentation/media/uapi/v4l/pixfmt-compressed.rst | 6 +
Documentation/media/uapi/v4l/vidioc-qbuf.rst | 10 +-
drivers/media/common/videobuf2/videobuf2-core.c | 9 +
drivers/media/common/videobuf2/videobuf2-v4l2.c | 6 +-
drivers/media/media-request.c | 4 +-
drivers/media/platform/vicodec/codec-fwht.c | 92 ++++---
drivers/media/platform/vicodec/codec-fwht.h | 12 +-
drivers/media/platform/vicodec/codec-v4l2-fwht.c | 431 +++++++++---------------------
drivers/media/platform/vicodec/codec-v4l2-fwht.h | 7 +-
drivers/media/platform/vicodec/vicodec-core.c | 750 +++++++++++++++++++++++++++++++++++++---------------
drivers/media/v4l2-core/v4l2-ctrls.c | 30 ++-
drivers/media/v4l2-core/v4l2-ioctl.c | 1 +
drivers/staging/media/sunxi/cedrus/cedrus_video.c | 1 +
include/media/fwht-ctrls.h | 31 +++
include/media/media-request.h | 4 +-
include/media/v4l2-ctrls.h | 7 +-
include/media/videobuf2-core.h | 3 +
include/uapi/linux/v4l2-controls.h | 4 +
include/uapi/linux/videodev2.h | 1 +
22 files changed, 968 insertions(+), 575 deletions(-)
create mode 100644 include/media/fwht-ctrls.h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-20 14:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-14 8:04 [GIT PULL FOR v5.2] vicodec: support the stateless decoder Hans Verkuil
2019-03-20 10:24 ` Mauro Carvalho Chehab
-- strict thread matches above, loose matches on Subject: below --
2019-03-20 14:41 Hans Verkuil
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.