mbox series

[v3,0/4] Add V4L stateless video decoder API support to NVIDIA Tegra driver

Message ID 20220207141937.13089-1-digetx@gmail.com (mailing list archive)
Headers show
Series Add V4L stateless video decoder API support to NVIDIA Tegra driver | expand

Message

Dmitry Osipenko Feb. 7, 2022, 2:19 p.m. UTC
Support V4L stateless video decoder API by NVIDIA Tegra decoder driver.
Tested using GStreamer [1] and libvdpau-tegra [2][8].

[1] https://github.com/grate-driver/gstreamer/commit/b8509bdbb69b534e61419ea1798f32f9ad2f3597
[2] https://github.com/grate-driver/libvdpau-tegra/commit/f822e95911e5e0c39f8ba19f843ddc1e0138d5ce
[8] https://github.com/grate-driver/libvdpau-tegra/commit/80db4d02369f2a984ce3173d6bc305f32e9fdb97

Changelog:

v3: - Added new decode_params flags [7] instead of V4L2_BUF_FLAG_*FRAME flags,
      as was suggested by Nicolas Dufresne.

      [7] https://github.com/grate-driver/gstreamer/commit/c5cd847f9c26b7669720ae58f9058de2515f51a2

    - Added new patch that removes legacy UAPI.

v2: - Made V4L2_BUF_FLAG_*FRAME flags mandatory [3] and dropped reading
      of raw bitstream from the driver code, as was suggested by
      Nicolas Dufresne.

      [3] https://github.com/grate-driver/gstreamer/commit/aee292f0f2e84b7654a314dd7e63f916888ffaa5

    - Ran v4l2-compliance [4] and fluster [5][6] tests, like was suggested by
      Nicolas Dufresne. Fixed minor v4l2-compliance errors that were related
      to a partial initialization of the coded format and were harmless in
      practice, but made compliance checker unhappy.

      [4] https://gist.github.com/digetx/5d6bcdab633488f1dcc7c141ab90d30e
      [5] https://gist.github.com/digetx/b06c5d779e9d25afa41d9f46946fe399
      [6] https://gist.github.com/digetx/ac4198bc340e5065aa8ec3288bb21356

Dmitry Osipenko (4):
  media: v4l2-ctrls: Add new V4L2_H264_DECODE_PARAM_FLAG_P/BFRAME flags
  media: staging: tegra-vde: Factor out H.264 code
  media: staging: tegra-vde: Support V4L stateless video decoder API
  media: staging: tegra-vde: Remove legacy UAPI support

 .../media/v4l/ext-ctrls-codec-stateless.rst   |    6 +
 drivers/staging/media/tegra-vde/Kconfig       |    7 +
 drivers/staging/media/tegra-vde/Makefile      |    2 +-
 .../staging/media/tegra-vde/dmabuf-cache.c    |    2 +-
 drivers/staging/media/tegra-vde/h264.c        |  946 +++++++++++++++
 drivers/staging/media/tegra-vde/iommu.c       |    2 +-
 drivers/staging/media/tegra-vde/uapi.h        |   73 --
 drivers/staging/media/tegra-vde/v4l2.c        | 1018 +++++++++++++++++
 drivers/staging/media/tegra-vde/vde.c         |  945 ++-------------
 drivers/staging/media/tegra-vde/vde.h         |  121 +-
 include/uapi/linux/v4l2-controls.h            |    2 +
 11 files changed, 2170 insertions(+), 954 deletions(-)
 create mode 100644 drivers/staging/media/tegra-vde/h264.c
 delete mode 100644 drivers/staging/media/tegra-vde/uapi.h
 create mode 100644 drivers/staging/media/tegra-vde/v4l2.c

Comments

Hans Verkuil Feb. 18, 2022, 3:04 p.m. UTC | #1
Dmitry,

On 07/02/2022 15:19, Dmitry Osipenko wrote:
> Support V4L stateless video decoder API by NVIDIA Tegra decoder driver.
> Tested using GStreamer [1] and libvdpau-tegra [2][8].
> 
> [1] https://github.com/grate-driver/gstreamer/commit/b8509bdbb69b534e61419ea1798f32f9ad2f3597
> [2] https://github.com/grate-driver/libvdpau-tegra/commit/f822e95911e5e0c39f8ba19f843ddc1e0138d5ce
> [8] https://github.com/grate-driver/libvdpau-tegra/commit/80db4d02369f2a984ce3173d6bc305f32e9fdb97

Nice work!

Can you make a v4 that just moves the whole driver to drivers/media/platform? I see no
reason for keeping this in staging.

Once I have a v4 that does that I plan to make a PR for it.

For the v4 don't forget to update MAINTAINERS with the new path and to drop the TODO
file in staging.

Regards,

	Hans

> 
> Changelog:
> 
> v3: - Added new decode_params flags [7] instead of V4L2_BUF_FLAG_*FRAME flags,
>       as was suggested by Nicolas Dufresne.
> 
>       [7] https://github.com/grate-driver/gstreamer/commit/c5cd847f9c26b7669720ae58f9058de2515f51a2
> 
>     - Added new patch that removes legacy UAPI.
> 
> v2: - Made V4L2_BUF_FLAG_*FRAME flags mandatory [3] and dropped reading
>       of raw bitstream from the driver code, as was suggested by
>       Nicolas Dufresne.
> 
>       [3] https://github.com/grate-driver/gstreamer/commit/aee292f0f2e84b7654a314dd7e63f916888ffaa5
> 
>     - Ran v4l2-compliance [4] and fluster [5][6] tests, like was suggested by
>       Nicolas Dufresne. Fixed minor v4l2-compliance errors that were related
>       to a partial initialization of the coded format and were harmless in
>       practice, but made compliance checker unhappy.
> 
>       [4] https://gist.github.com/digetx/5d6bcdab633488f1dcc7c141ab90d30e
>       [5] https://gist.github.com/digetx/b06c5d779e9d25afa41d9f46946fe399
>       [6] https://gist.github.com/digetx/ac4198bc340e5065aa8ec3288bb21356
> 
> Dmitry Osipenko (4):
>   media: v4l2-ctrls: Add new V4L2_H264_DECODE_PARAM_FLAG_P/BFRAME flags
>   media: staging: tegra-vde: Factor out H.264 code
>   media: staging: tegra-vde: Support V4L stateless video decoder API
>   media: staging: tegra-vde: Remove legacy UAPI support
> 
>  .../media/v4l/ext-ctrls-codec-stateless.rst   |    6 +
>  drivers/staging/media/tegra-vde/Kconfig       |    7 +
>  drivers/staging/media/tegra-vde/Makefile      |    2 +-
>  .../staging/media/tegra-vde/dmabuf-cache.c    |    2 +-
>  drivers/staging/media/tegra-vde/h264.c        |  946 +++++++++++++++
>  drivers/staging/media/tegra-vde/iommu.c       |    2 +-
>  drivers/staging/media/tegra-vde/uapi.h        |   73 --
>  drivers/staging/media/tegra-vde/v4l2.c        | 1018 +++++++++++++++++
>  drivers/staging/media/tegra-vde/vde.c         |  945 ++-------------
>  drivers/staging/media/tegra-vde/vde.h         |  121 +-
>  include/uapi/linux/v4l2-controls.h            |    2 +
>  11 files changed, 2170 insertions(+), 954 deletions(-)
>  create mode 100644 drivers/staging/media/tegra-vde/h264.c
>  delete mode 100644 drivers/staging/media/tegra-vde/uapi.h
>  create mode 100644 drivers/staging/media/tegra-vde/v4l2.c
>
Dmitry Osipenko Feb. 18, 2022, 5:48 p.m. UTC | #2
18.02.2022 18:04, Hans Verkuil пишет:
> Dmitry,
> 
> On 07/02/2022 15:19, Dmitry Osipenko wrote:
>> Support V4L stateless video decoder API by NVIDIA Tegra decoder driver.
>> Tested using GStreamer [1] and libvdpau-tegra [2][8].
>>
>> [1] https://github.com/grate-driver/gstreamer/commit/b8509bdbb69b534e61419ea1798f32f9ad2f3597
>> [2] https://github.com/grate-driver/libvdpau-tegra/commit/f822e95911e5e0c39f8ba19f843ddc1e0138d5ce
>> [8] https://github.com/grate-driver/libvdpau-tegra/commit/80db4d02369f2a984ce3173d6bc305f32e9fdb97
> Nice work!
> 
> Can you make a v4 that just moves the whole driver to drivers/media/platform? I see no
> reason for keeping this in staging.
> 
> Once I have a v4 that does that I plan to make a PR for it.
> 
> For the v4 don't forget to update MAINTAINERS with the new path and to drop the TODO
> file in staging.

I'll prepare v4 over the weekend, thanks to you and Nicolas.