RFC cedrus: h264: add support for dynamically allocated ctrl arrays
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest2 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | media: cedrus: fix double freedrivers/ | +1 | 1 reply | |
| 2/2 | Cedrus: add support for dynamic arrays in H264drivers/ drivers/ drivers/ +4 more | +162 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC,WIP PATCH 0/2] cedrus: h264: add support for dynamically allocated ctrl arrays
From: Daniel Almeida <[email protected]>
So far the Cedrus driver is able to decode a slice at a time in slice mode.
Use the new flag "V4L2_CTRL_FLAG_DYNAMIC_ARRAY" and the new h264 slice array decode mode to support passing an array with all the slices at once from userspace.
The device will process all slices in this array before calling v4l2_m2m_buf_done_and_job_finish, significantly reducing the amount of back and forth of data.
This is marked as WIP because currently only the first slice will decode, all subsequent slices in the same frame will return CEDRUS_IRQ_ERROR. Also I haven't quite polished this yet.
It is marked as RFC because I am not sure whether adding a new entry in v4l2_stateless_h264_decode_mode was the right call. Also, apparently only the slice offset is needed for subsequent slices (i.e. slice->header_bit_size), so I am a bit unsure whether userspace has to fill all fields for slices 2..n
Daniel Almeida (2):
media: cedrus: fix double free
Cedrus: add support for dynamic arrays in H264
drivers/media/v4l2-core/v4l2-ctrls-defs.c | 1 + drivers/staging/media/sunxi/cedrus/cedrus.c | 35 ++++++++++++-- drivers/staging/media/sunxi/cedrus/cedrus.h | 18 ++++++++ .../staging/media/sunxi/cedrus/cedrus_dec.c | 33 +++++++++++++ .../staging/media/sunxi/cedrus/cedrus_h264.c | 46 ++++++++++++++++--- .../staging/media/sunxi/cedrus/cedrus_hw.c | 35 +++++++++++++- include/uapi/linux/v4l2-controls.h | 7 +++ 7 files changed, 163 insertions(+), 12 deletions(-)
Signature · 1 line
2.32.0