RGA 16bit color format has changed
-
- Posts: 5660
- Joined: Tue Dec 30, 2014 8:42 pm
- languages_spoken: english
- ODROIDs: C1
- Has thanked: 0
- Been thanked: 537 times
- Contact:
RGA 16bit color format has changed
This is more informative than an issue. The RGA 16bit color format has changed endian. Programs using RK_FORMAT_RGB_565 will now need to use RK_FORMAT_BGR_565 and vice versa. This will affect anyone porting code from GO-Advance/Super targeting the RGA accelerator.
- These users thanked the author crashoverride for the post (total 4):
- tobetter (Mon Apr 11, 2022 8:23 am) • odroid (Mon Apr 11, 2022 9:16 am) • Luke.go (Mon Apr 11, 2022 9:17 am) • AreaScout (Sun Apr 17, 2022 6:08 pm)
-
- Posts: 1795
- Joined: Sun Jul 07, 2013 3:05 am
- languages_spoken: german, english
- ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell, Go2, C4 - Has thanked: 120 times
- Been thanked: 372 times
- Contact:
Re: RGA 16bit color format has changed
Hi crash !crashoverride wrote: ↑Mon Apr 11, 2022 8:18 amThis is more informative than an issue. The RGA 16bit color format has changed endian. Programs using RK_FORMAT_RGB_565 will now need to use RK_FORMAT_BGR_565 and vice versa. This will affect anyone porting code from GO-Advance/Super targeting the RGA accelerator.

I can't get lib RGA to work on my M1, I only get a green screen, same samples work on GoA namely https://github.com/JeffyCN/FFmpeg (which uses RGA color blit for anything other than AV_PIX_FMT_DRM_PRIME) and https://github.com/AreaScout/moonlight-embedded (which uses RGA to rotate the Display on GoA), do you have any clue why it fails ? Does it fail because of different frame high we have to use for the buffers, like we had on GoA with SDL2 ?
Also I was about to build Kodi because of the vast storage capabilities the M1 has, Kodi runs we have TrueHD, Dolby Digital and what not via HDMI Audio Passthrough visible and available inside the menus, the problem is that after some frames the playback stucks when using drmPrime renderer and one video get's a rotated screen !!?? when using DirectToPlane render method, it's ok with EGL drmPrime
P.S.: I can share my patches (needed do not leak memory) and build instructions to reproduce the error quickly if you need

RG
-
- Posts: 1795
- Joined: Sun Jul 07, 2013 3:05 am
- languages_spoken: german, english
- ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell, Go2, C4 - Has thanked: 120 times
- Been thanked: 372 times
- Contact:
Re: RGA 16bit color format has changed
- librga RGA (Raster Graphic Acceleration Unit) blit not correctly working, I can't play videos with ffplay from JeffyCN github, this works on different RK Platforms like GoA -> only green and messed up screen, color conversion or stride size wrong ?
- Kodi starts to play only the first few frames and then the video get's stuck and only audio continues to play, it's not a libmpp problem, it's not a DRM problem, I think it's a FFmpeg or Kodi problem not closing a prime file handle ??
Regards,
Daniel
-
- Posts: 5660
- Joined: Tue Dec 30, 2014 8:42 pm
- languages_spoken: english
- ODROIDs: C1
- Has thanked: 0
- Been thanked: 537 times
- Contact:
Re: RGA 16bit color format has changed
RGA has passed all my tests. If you are experiencing issues, ensure you are not using a 8GB device. If you have 8GB of RAM, you will need to reduce the memory to 4GB on the kernel command line.
- These users thanked the author crashoverride for the post:
- AreaScout (Mon Apr 18, 2022 6:38 pm)
-
- Posts: 1795
- Joined: Sun Jul 07, 2013 3:05 am
- languages_spoken: german, english
- ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell, Go2, C4 - Has thanked: 120 times
- Been thanked: 372 times
- Contact:
Re: RGA 16bit color format has changed
It works with 4GB limit, I am glad you found a workaround, but that smells like we are leaking memory somewhere, I also lost RGA again having only green screen with 4GB when I was playing with audio because SDL2 on FFplay couldn't open audio device, I was changingcrashoverride wrote: ↑Mon Apr 18, 2022 1:49 pmRGA has passed all my tests. If you are experiencing issues, ensure you are not using a 8GB device. If you have 8GB of RAM, you will need to reduce the memory to 4GB on the kernel command line.
/etc/asound.conf
type to plughw, tried to play with that, deleted it entirely and then all of a sudden, playback stopped with 'Double free memory corruption' and or green screen. I will try to troubleshoot and narrow down the problemRegards,
Daniel
- rooted
- Posts: 9447
- Joined: Fri Dec 19, 2014 9:12 am
- languages_spoken: english
- Location: Gulf of Mexico, US
- Has thanked: 758 times
- Been thanked: 479 times
- Contact:
Re: RGA 16bit color format has changed
The 4GB workaround isn't due to a memory leak it's something to do with 64bit compatibility.
-
- Posts: 1795
- Joined: Sun Jul 07, 2013 3:05 am
- languages_spoken: german, english
- ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell, Go2, C4 - Has thanked: 120 times
- Been thanked: 372 times
- Contact:
Re: RGA 16bit color format has changed
I hope it will get fixed by crash or any other interested in this

@all
Soon I will release Kodi 18.9 Leia arm 32bit, Kodi 19.4 arm64 and Kodi 19.4 arm 32 bit, it will be installable from within my package servers on official Linux Ubuntu 20.04 server image and later on hopefully on Ubuntu 22.04 too, arm 32 bit version has to be installed inside a Debian Bullseye chroot environment -> all testet and runs smooth, there will be an HowTo like we had on XU4 viewtopic.php?f=98&t=34149, that Kodi installation will be fully customizable running on regular Linux Ubuntu as I told already, chrooted Debian ready for LinuxTV, Myth-TV streaming project a.s.o or just as a Home entertainment center. I do not have much time so you have to be patient, I can only work for it on weekends if I find time, I would have more time for ODROID's but it's like it is.
RG
- These users thanked the author AreaScout for the post (total 3):
- odroid (Sun May 01, 2022 9:06 pm) • istanbulls (Mon May 02, 2022 1:59 am) • mctom (Tue May 03, 2022 6:33 am)
- rooted
- Posts: 9447
- Joined: Fri Dec 19, 2014 9:12 am
- languages_spoken: english
- Location: Gulf of Mexico, US
- Has thanked: 758 times
- Been thanked: 479 times
- Contact:
Who is online
Users browsing this forum: No registered users and 0 guests