I have a serious problem with the latest RGA rockchip library (version 1.10.0).
The application uses the RGA RK_FORMAT_BGR_888 to RK_FORMAT_YCbCr_420_SP (NV12) conversion.
It all works well on the Radxa Zero 3W. No problem.
It crashes on the Radxa Zero 3E. It actually freezes the OS!
Same software, same libraries, same OS, everything is identical.
Has someone any suggestions?
BTW, I have tried several different OS.
Ubuntu 24 (Joshua Riek), latest rockchip KDE, Armbian.
All have the same behavior.
RGA crashes on Zero 3E, not with Zero 3W
Be more specific I use Jellyfin transcoding under Armbian Noble …no problems
Thanks for thinking this through with me.
The issue arises when calling the RGA function from within a C++ program. Below is a snippet of code (which, by the way, comes from the Rockchip documentation):
rga_buffer_t src = wrapbuffer_virtualaddr((void *)bgr_image.data, width, height, RK_FORMAT_BGR_888);
rga_buffer_t dst = wrapbuffer_virtualaddr(yuv_ptr, hor_stride, ver_stride, RK_FORMAT_YCbCr_420_SP);
int ret = imcvtcolor(src, dst, RK_FORMAT_BGR_888, RK_FORMAT_YCbCr_420_SP);
if (ret != IM_STATUS_SUCCESS) return -1;
The program crashes without returning from the imcvtcolor()
call. The PC counter starts fetching at 0x000000
, etc.
I believe you’re referring to this Jellyfin documentation. That code works fine—I use it as well. However, it specifically applies to FFmpeg with MPP and RGA acceleration.
In my case, I need to convert a single JPEG image. Using FFmpeg (or GStreamer, for that matter) introduces far too much overhead.
You can use ffmpeg
to process images as explained here
https://superuser.com/questions/606800/converting-image-format-to-jpeg-using-ffmpeg
However the filters you will use will be Rockchip’s to reduce overhead. There are a total of x3 filters, for images I believe scale_rkrga
will be used