nyanmisaka / ffmpeg-rockchip

FFmpeg with async and zero-copy Rockchip MPP & RGA support
Other
325 stars 47 forks source link

Tone-mapping slow after upgrading kernel. #28

Closed FirstMelody closed 3 months ago

FirstMelody commented 4 months ago

After upgrading the kernel from 5.1 to 6.1 (orangepi-linux latest kernel),tone-mapping got super slow even upgraded opencl driver. Both latest and v1.9-1-3381696 is not functioning correctly.

Before upgrading the kernel, everything is fine with legacy opencl driver.

Orange Pi 1.1.8 Bookworm with Linux 6.1.43-rockchip-rk3588

clinfo output: https://pastebin.com/eH0YEEfB

Jellyfin-ffmpeg log: https://pastebin.com/fpUN4JMG

docker-compose.yml: https://pastebin.com/jrbsDvrK

nyanmisaka commented 4 months ago

OpenCL performance that is lower than expected can usually be caused by two reasons:

FirstMelody commented 4 months ago

OpenCL performance that is lower than expected can usually be caused by two reasons:

Thanks for your prompt reply!

I've checked the issue and tried three version of mali csf firmware(I am using valhall), latest and two versions you mentioned in the issue. And power supply is also unlikely the cause of the issue for that it was performing normally before upgrading and it was came with orangepi5

nyanmisaka commented 4 months ago

I have been using the 6.1 kernel for three months and have not encountered similar issues. Also, since the guy in the thread I linked to solved the problem on his OrangePi 5 Plus, I think it's not an issue with either the GPU driver or ffmpeg.

The video source file is large in size and has a high bit rate. Consider this a network connection speed or drive speed issue.

FirstMelody commented 4 months ago

I wrongly clicked the close issue button. The video file I used is a movie I watched with transcoding before. And it was fine. Also, disabling tone-mapping would make the transcode speed back to normal (90fps ish). I am so confused right now. Maybe I need a clean install?

nyanmisaka commented 4 months ago

I got ~55fps on 4k to 4k with tone-mapping and PGS burn-in enabled. 811A1B73-7D68-41E2-A7DA-33A1738A7F1E

I use my own kernel configuration. Maybe orangepi has wrong kernel defconfig enabled for 6.1. You can compare both. https://github.com/nyanmisaka/linux-rockchip/commits/rk-6.1-dev2

nyanmisaka commented 3 months ago

Any update? If not I will have to close this as it's not an issue of this project.

FirstMelody commented 3 months ago

Sorry for the delay. I have been so busy recently. And I've re-flashed the orangepi back to 5.10 kernel and everything is back to normal. And I didn't see any updates of the kernel from orangepi team. And armbian is also not releasing their kernel. So I guess this issue should be closed. Anyway, thanks for your contribution!