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

ffmpeg: update to 7.1 #9569

Merged
merged 12 commits into from
Dec 22, 2024
Merged

ffmpeg: update to 7.1 #9569

merged 12 commits into from
Dec 22, 2024

Conversation

HiassofT
Copy link
Member

@HiassofT HiassofT commented Dec 13, 2024

Initial testing on RPi4 and RPi5 looks mostly fine, only HW deinterlace doesn't work yet.

Other platforms are completely untested and need updated patches

Merge this together with #9570

@chewitt
Copy link
Member

chewitt commented Dec 14, 2024

@HiassofT I've done some smoke testing with Amlogic and that seems to be fine too. I'd prefer to keep Amlogic using the githash of the HEAD for JC's branch though.

@chewitt
Copy link
Member

chewitt commented Dec 14, 2024

I meant you can use his test/7.1/main branch. Sorry..

@HiassofT
Copy link
Member Author

Thanks for the hint, I missed that I accidentially switched Aml to plain 7.1 ffmpeg.

I've now switched it to jc's branch and dropped the patches in the Amlogic project dir - hope it's fine now.

@knaerzche
Copy link
Contributor

knaerzche commented Dec 15, 2024

@HiassofT I pushed updates for v4l2-drmprime, v4l2-request and vf-deinterlace-v4l2m2m. v4l2-drmprime is a pure rebase w/o testing, as I can't test.
Due to some not-easy-to find bug in (certainly) hantro we temporarily have to disable iommu for this codec on RK3288, but users won't notice/care.

@jernejsk pls test.

@heitbaum
Copy link
Contributor

Build and run tested on Generic

@knaerzche
Copy link
Contributor

I've now also added not-yet-merged xbmc/xbmc#25467 which is required for latest ffmpeg v4l2-request patches. Has been tested on RPi also xbmc/xbmc#25467 (comment), so it should be safe to add it to common kodi patches.

@HiassofT
Copy link
Member Author

@knaerzche thanks a lot, I did a very quick test on RPi5 and HEVC still worked fine with the kodi patch

@HiassofT
Copy link
Member Author

I've added a small cleanup and switched the libreelec patch branch to use FFMPEG_VERSION, like used for the v4l2 patches, so we don't have to modify that manually in the future. No functional change, just branch rename.

@HiassofT HiassofT marked this pull request as ready for review December 15, 2024 15:13
@zhangn1985
Copy link
Contributor

@HiassofT do you have upstream or bug link for RK3288 VPU mmu issue?

@HiassofT
Copy link
Member Author

@zhangn1985 sorry, I'm not familiar with RK, but @knaerzche may be able to provide more information

@knaerzche
Copy link
Contributor

@HiassofT do you have upstream or bug link for RK3288 VPU mmu issue?

You can be sure we really tried very hard to be able to make the new code working on all platforms - however there is a yet to be found, probable subtile, bug in hantro driver which strikes only on 32-bit platforms and we are "behind the scenes" in contact with the maintainers of this driver anyway. However it works fine with iommu disabled and it actually makes no difference from users POV. (All (most) of this information can be found in the commit message where iommu is disabled, btw.)

@ilmich
Copy link
Contributor

ilmich commented Dec 16, 2024

tested on my rockchip board (rk3328) with h264 and hvec streams and everything seems to work.

@jernejsk
Copy link
Member

jernejsk commented Dec 16, 2024

tested on AW H6 and works great, including HW deinterlacing

@HiassofT
Copy link
Member Author

Feel free to merge if you are happy, we can fix RPi HW deinterlace in a separate PR - no big deal and no reason to delay the ffmpeg bump

@zhangn1985
Copy link
Contributor

@jernejsk I tested FFmpeg patches from your repo on AW H3 with Linux 6.6.38, with mpv player.
it fails to open hw codec device.

does it require linux 6.12 and later?

FFMpeg 6.1 patches are also from your repo and works well with linux 6.6.38, thank you.

@jernejsk
Copy link
Member

I'm not familiar with mpv needs. I only check Kodi compatibility. As far as kernel needs go, I believe 6.6 should suffice, but I forgot which kernel version got latest fixes.

Drop crystalhd, dct, fft, mdct, and rdft options which were removed from
configure.

Signed-off-by: Matthias Reichl <[email protected]>
Also switch libreelec patch branch to use FFMPEG_VERSION, like
used for the v4l2 patches.

Signed-off-by: Matthias Reichl <[email protected]>
Patch created using revisions b08d796..74d85ef
from branch libreelec-misc-n7.1 of https://github.com/LibreELEC/FFmpeg
…abel-format-to-wo.patch

This is already included in upstream

Signed-off-by: Matthias Reichl <[email protected]>
HiassofT and others added 8 commits December 22, 2024 12:21
Also set PATCH_CREATE_DIFF="yes" as otherwise git apply fails
to apply the patch.

Signed-off-by: Matthias Reichl <[email protected]>
Patch created using revisions b08d796..5f39f6c
from branch test/7.1/main of https://github.com/jc-kynesim/rpi-ffmpeg
Signed-off-by: Matthias Reichl <[email protected]>
Patch created using revisions b08d796..0e747a2
from branch v4l2-drmprime-n7.1 of https://github.com/jernejsk/FFmpeg
Patch created using revisions b08d796..904a851
from branch v4l2-request-n7.1 of https://github.com/jernejsk/FFmpeg
Patch created using revisions b08d796..accf519
from branch vf-deinterlace-v4l2m2m-n7.1 of https://github.com/jernejsk/FFmpeg
Due to bug in either hantro, iommu or general dma management drivers for ARMv7
buffers are not correctly flushed when being re-used.

To work around that, disable VPU iommu and increase cma memory size to be
sufficient for 4K H.264 decoding.

Signed-off-by: Alex Bee <[email protected]>
@HiassofT
Copy link
Member Author

@knaerzche I've dropped the local PR25467 patch as it's now in kodi (kodi PR is updated to current HEAD)

@knaerzche knaerzche merged commit abb3db9 into LibreELEC:master Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants