Re: [PATCH v6 0/3] Add support for MPEG-2 in DELTA video decoder

2018-09-11 Thread Hugues FRUCHET
Hi Hans,

On 09/09/2018 11:38 AM, Hans Verkuil wrote:
> Hi Hugues,
> 
> On 04/28/2017 03:25 PM, Hugues Fruchet wrote:
>> The patchset implements the MPEG-2 part of V4L2 unified low-level decoder
>> API RFC [0] needed by stateless video decoders, ie decoders which requires
>> specific parsing metadata in addition to video bitstream chunk in order
>> to complete decoding.
>> A reference implementation using STMicroelectronics DELTA video decoder
>> is provided as initial support in this patchset.
>> In addition to this patchset, a libv4l plugin is also provided which convert
>> MPEG-2 video bitstream to "parsed MPEG-2" by parsing the user video bitstream
>> and filling accordingly the dedicated controls, doing so user code remains
>> unchanged whatever decoder is: stateless or not.
>>
>> The first patch implements the MPEG-2 part of V4L2 unified low-level decoder
>> API RFC [0]. A dedicated "parsed MPEG-2" pixel format has been introduced 
>> with
>> its related extended controls in order that user provides both video 
>> bitstream
>> chunk and the associated extra data resulting from this video bitstream chunk
>> parsing.
>>
>> The second patch adds the support of "parsed" pixel format inside DELTA video
>> decoder including handling of the dedicated controls and setting of parsing
>> metadata required by decoder layer.
>> Please note that the current implementation has a restriction regarding
>> the atomicity of S_EXT_CTRL/QBUF that must be guaranteed by user.
>> This restriction will be removed when V4L2 request API will be implemented 
>> [1].
>> Please also note the failure in v4l2-compliance in controls section, related
>> to complex compound controls handling, to be discussed to find the right way
>> to fix it in v4l2-compliance.
>>
>> The third patch adds the support of DELTA MPEG-2 stateless video decoder 
>> back-end.
> 
> I've marked this (old) series as obsoleted in patchwork. The Request API 
> together
> with the cedrus stateless MPEG decoder is about to be merged for 4.20, so it 
> would
> be very nice indeed if you can resurrect this driver and base it on the 
> Request API.

Many thanks to you and all contributors for this long and hard work on 
request API, no doubt that this is a major step towards video codecs 
support standardisation in Linux.

Now I have switched on other activities related to camera on STM32 
platform as you can see regularly on mailing list and unfortunately it 
will be difficult to me to resurrect this now.
Anyway I hope that this implementation in kernel associated to the 
userspace part provided in libv4l will serve its example purpose for any 
other MPEG2 implementation (idea was that different soc vendor kernel 
driver but a single userspace implementation...).


Best regards,
Hugues.
> 
> Thanks!
> 
>   Hans
> 
>>
>>
>> This driver depends on:
>>[PATCH v7 00/10] Add support for DELTA video decoder of 
>> STMicroelectronics STiH4xx SoC series 
>> https://patchwork.linuxtv.org/patch/39186/
>>
>> References:
>>[0] [RFC] V4L2 unified low-level decoder API 
>> https://www.spinics.net/lists/linux-media/msg107150.html
>>[1] [ANN] Report of the V4L2 Request API brainstorm meeting 
>> https://www.spinics.net/lists/linux-media/msg106699.html
>>
>> ===
>> = history =
>> ===
>> version 6:
>>- patchset 5 review from Hans:
>>  - revisit 32/64 bit compat in mpeg2 controls struct (using pahole 
>> utility)
>>to avoid padding fields introduction
>>- pass latest v4l2-compliance with compound controls fixes
>>  - fix delta_subscribe_event() adding missing control event
>>- fix warnings at documentation generation (add exceptions)
>>
>> version 5:
>>- patchset 4 review from Hans:
>>  - fix 32/64 bit compat in mpeg2 controls struct (using pahole utility)
>>  - fix upper case at begining of words in v4l2_ctrl_get_name()
>>
>> version 4:
>>- patchset 3 review from Nicolas Dufresne
>>  - one attribute per line in structure
>>- fix some multilines comments
>>
>> version 3:
>>- fix warning on parisc architecture
>>
>> version 2:
>>- rebase on top of DELTA v7, refer to [0]
>>- change VIDEO_STI_DELTA_DRIVER to default=y as per Mauro recommendations
>>
>> version 1:
>>- Initial submission
>>
>> ===
>> = v4l2-compliance =
>> ===
>> Below is the v4l2-compliance report, v4l2-compliance has been build from 
>> SHA1:
>> 847bf8d62cd6b11defc1e4c3b30b68d3c66876e0 v4l2/cec-compliance, cec-follower: 
>> use git -C $(srcdir) rev-parse HEAD
>>
>> root@sti:~# v4l2-compliance -d /dev/video3
>> v4l2-compliance SHA   : 847bf8d62cd6b11defc1e4c3b30b68d3c66876e0
>>
>> Driver Info:
>>  Driver name   : st-delta
>>  Card type : st-delta-21.1-3
>>  Bus info  : platform:soc:delta0
>>  Driver version: 4.10.0
>>  Capabilities  : 0x84208000
>>  Video Memory-to-Memory
>>  Streaming
>>  

Re: [PATCH v6 0/3] Add support for MPEG-2 in DELTA video decoder

2018-09-09 Thread Hans Verkuil
Hi Hugues,

On 04/28/2017 03:25 PM, Hugues Fruchet wrote:
> The patchset implements the MPEG-2 part of V4L2 unified low-level decoder
> API RFC [0] needed by stateless video decoders, ie decoders which requires
> specific parsing metadata in addition to video bitstream chunk in order
> to complete decoding.
> A reference implementation using STMicroelectronics DELTA video decoder
> is provided as initial support in this patchset.
> In addition to this patchset, a libv4l plugin is also provided which convert
> MPEG-2 video bitstream to "parsed MPEG-2" by parsing the user video bitstream
> and filling accordingly the dedicated controls, doing so user code remains
> unchanged whatever decoder is: stateless or not.
> 
> The first patch implements the MPEG-2 part of V4L2 unified low-level decoder
> API RFC [0]. A dedicated "parsed MPEG-2" pixel format has been introduced with
> its related extended controls in order that user provides both video bitstream
> chunk and the associated extra data resulting from this video bitstream chunk
> parsing.
> 
> The second patch adds the support of "parsed" pixel format inside DELTA video
> decoder including handling of the dedicated controls and setting of parsing
> metadata required by decoder layer.
> Please note that the current implementation has a restriction regarding
> the atomicity of S_EXT_CTRL/QBUF that must be guaranteed by user.
> This restriction will be removed when V4L2 request API will be implemented 
> [1].
> Please also note the failure in v4l2-compliance in controls section, related
> to complex compound controls handling, to be discussed to find the right way
> to fix it in v4l2-compliance.
> 
> The third patch adds the support of DELTA MPEG-2 stateless video decoder 
> back-end.

I've marked this (old) series as obsoleted in patchwork. The Request API 
together
with the cedrus stateless MPEG decoder is about to be merged for 4.20, so it 
would
be very nice indeed if you can resurrect this driver and base it on the Request 
API.

Thanks!

Hans

> 
> 
> This driver depends on:
>   [PATCH v7 00/10] Add support for DELTA video decoder of STMicroelectronics 
> STiH4xx SoC series https://patchwork.linuxtv.org/patch/39186/
> 
> References:
>   [0] [RFC] V4L2 unified low-level decoder API 
> https://www.spinics.net/lists/linux-media/msg107150.html
>   [1] [ANN] Report of the V4L2 Request API brainstorm meeting 
> https://www.spinics.net/lists/linux-media/msg106699.html
> 
> ===
> = history =
> ===
> version 6:
>   - patchset 5 review from Hans:
> - revisit 32/64 bit compat in mpeg2 controls struct (using pahole utility)
>   to avoid padding fields introduction
>   - pass latest v4l2-compliance with compound controls fixes
> - fix delta_subscribe_event() adding missing control event
>   - fix warnings at documentation generation (add exceptions)
> 
> version 5:
>   - patchset 4 review from Hans:
> - fix 32/64 bit compat in mpeg2 controls struct (using pahole utility)
> - fix upper case at begining of words in v4l2_ctrl_get_name()
> 
> version 4:
>   - patchset 3 review from Nicolas Dufresne
> - one attribute per line in structure
>   - fix some multilines comments
> 
> version 3:
>   - fix warning on parisc architecture
> 
> version 2:
>   - rebase on top of DELTA v7, refer to [0]
>   - change VIDEO_STI_DELTA_DRIVER to default=y as per Mauro recommendations
> 
> version 1:
>   - Initial submission
> 
> ===
> = v4l2-compliance =
> ===
> Below is the v4l2-compliance report, v4l2-compliance has been build from SHA1:
> 847bf8d62cd6b11defc1e4c3b30b68d3c66876e0 v4l2/cec-compliance, cec-follower: 
> use git -C $(srcdir) rev-parse HEAD
> 
> root@sti:~# v4l2-compliance -d /dev/video3
> v4l2-compliance SHA   : 847bf8d62cd6b11defc1e4c3b30b68d3c66876e0
> 
> Driver Info:
> Driver name   : st-delta
> Card type : st-delta-21.1-3
> Bus info  : platform:soc:delta0
> Driver version: 4.10.0
> Capabilities  : 0x84208000
> Video Memory-to-Memory
> Streaming
> Extended Pix Format
> Device Capabilities
> Device Caps   : 0x04208000
> Video Memory-to-Memory
> Streaming
> Extended Pix Format
> 
> Compliance test for device /dev/video3 (not using libv4l2):
> 
> Required ioctls:
> test VIDIOC_QUERYCAP: OK
> 
> Allow for multiple opens:
> test second video open: OK
> test VIDIOC_QUERYCAP: OK
> test VIDIOC_G/S_PRIORITY: OK
> test for unlimited opens: OK
> 
> Debug ioctls:
> test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
> test VIDIOC_LOG_STATUS: OK (Not Supported)
> 
> Input ioctls:
> test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
> test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
> test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
> test 

[PATCH v6 0/3] Add support for MPEG-2 in DELTA video decoder

2017-04-28 Thread Hugues Fruchet
The patchset implements the MPEG-2 part of V4L2 unified low-level decoder
API RFC [0] needed by stateless video decoders, ie decoders which requires
specific parsing metadata in addition to video bitstream chunk in order
to complete decoding.
A reference implementation using STMicroelectronics DELTA video decoder
is provided as initial support in this patchset.
In addition to this patchset, a libv4l plugin is also provided which convert
MPEG-2 video bitstream to "parsed MPEG-2" by parsing the user video bitstream
and filling accordingly the dedicated controls, doing so user code remains
unchanged whatever decoder is: stateless or not.

The first patch implements the MPEG-2 part of V4L2 unified low-level decoder
API RFC [0]. A dedicated "parsed MPEG-2" pixel format has been introduced with
its related extended controls in order that user provides both video bitstream
chunk and the associated extra data resulting from this video bitstream chunk
parsing.

The second patch adds the support of "parsed" pixel format inside DELTA video
decoder including handling of the dedicated controls and setting of parsing
metadata required by decoder layer.
Please note that the current implementation has a restriction regarding
the atomicity of S_EXT_CTRL/QBUF that must be guaranteed by user.
This restriction will be removed when V4L2 request API will be implemented [1].
Please also note the failure in v4l2-compliance in controls section, related
to complex compound controls handling, to be discussed to find the right way
to fix it in v4l2-compliance.

The third patch adds the support of DELTA MPEG-2 stateless video decoder 
back-end.


This driver depends on:
  [PATCH v7 00/10] Add support for DELTA video decoder of STMicroelectronics 
STiH4xx SoC series https://patchwork.linuxtv.org/patch/39186/

References:
  [0] [RFC] V4L2 unified low-level decoder API 
https://www.spinics.net/lists/linux-media/msg107150.html
  [1] [ANN] Report of the V4L2 Request API brainstorm meeting 
https://www.spinics.net/lists/linux-media/msg106699.html

===
= history =
===
version 6:
  - patchset 5 review from Hans:
- revisit 32/64 bit compat in mpeg2 controls struct (using pahole utility)
  to avoid padding fields introduction
  - pass latest v4l2-compliance with compound controls fixes
- fix delta_subscribe_event() adding missing control event
  - fix warnings at documentation generation (add exceptions)

version 5:
  - patchset 4 review from Hans:
- fix 32/64 bit compat in mpeg2 controls struct (using pahole utility)
- fix upper case at begining of words in v4l2_ctrl_get_name()

version 4:
  - patchset 3 review from Nicolas Dufresne
- one attribute per line in structure
  - fix some multilines comments

version 3:
  - fix warning on parisc architecture

version 2:
  - rebase on top of DELTA v7, refer to [0]
  - change VIDEO_STI_DELTA_DRIVER to default=y as per Mauro recommendations

version 1:
  - Initial submission

===
= v4l2-compliance =
===
Below is the v4l2-compliance report, v4l2-compliance has been build from SHA1:
847bf8d62cd6b11defc1e4c3b30b68d3c66876e0 v4l2/cec-compliance, cec-follower: use 
git -C $(srcdir) rev-parse HEAD

root@sti:~# v4l2-compliance -d /dev/video3
v4l2-compliance SHA   : 847bf8d62cd6b11defc1e4c3b30b68d3c66876e0

Driver Info:
Driver name   : st-delta
Card type : st-delta-21.1-3
Bus info  : platform:soc:delta0
Driver version: 4.10.0
Capabilities  : 0x84208000
Video Memory-to-Memory
Streaming
Extended Pix Format
Device Capabilities
Device Caps   : 0x04208000
Video Memory-to-Memory
Streaming
Extended Pix Format

Compliance test for device /dev/video3 (not using libv4l2):

Required ioctls:
test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
test second video open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OK

Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK (Not Supported)

Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 0 Audio Inputs: 0 Tuners: 0

Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
test