Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MythV4L2M2MContext: Prepare for planned V4L2 Request API hwaccel changes #929

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Kwiboo
Copy link

@Kwiboo Kwiboo commented Jul 12, 2024

These are some changes that should help prepare for planned V4L2 Request API hwaccel changes.

Please note that I have not compile or runtime testes these changes, @warpme please help test these changes.

Checklist

The FFmpeg internal V4L2RequestDescriptor type is not meant to be used
by applications, instead applications should treat the returned frames
as if a AVDRMFrameDescriptor was returned, as defined by the DRM_PRIME
pix fmt.

Remove the custom implementation of GetRequestBuffer and use the base
GetDRMBuffer function instead.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
av_hwdevice_ctx_init() is already called internally by FFmpeg function
av_hwdevice_ctx_create(), and is not meant to be called a second time.

Remove the unneeded av_hwdevice_ctx_init() to simplify the code.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
@warpme
Copy link
Contributor

warpme commented Jul 18, 2024

Jonas,
Many thx for approaching mythtv for ffmpeg updates!
I applied this pull over current mythtv head + minimyth2 v4l2_request patches and tested this on:
'ok' means tested h264 & hvec works ok.

  1. v4l2_request stateless decoders:
  • cedrus (h618): ok
  • hantro (rk3566, rk3588): ok
  • rpivid (rpi4 rpi5): ok
  1. v4l2_request statefull decoders:
  • brcm (rpi4): ok

So i would say: great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants