Examples to use Rockchip RK3588s RGA2-E/RGA3 platform.
Compatible with Edge2
sudo cat /sys/kernel/debug/rkrga/driver_version
-
RGA info - Simple diagnostic info about system RGA
-
RGA copy - Copy a RGA image in virtual memory address
-
RGA dmaheap - Copy a RGA image stored in a dma-heap
-
RGA dmabuf - Copy a RGA image stored in a dma-buf
-
RGA crop - Crop into an RGA image
-
RGA rotate - Rotate an RGA image
-
RGA resize - Resize an RGA image
-
RGA cvt - Converts RGA image from RGB888 to NV12 color format.
-
RGA blend - Perform alpha blend of filter over RGA image.
-
RGA draw - Draw rectangles over an RGA image.
-
IM2D API guide
-
RGA FAQ
Version | Codename | Chip | Source | Destination | Function | Pixels/Cycle | ||
min | max | min | max | |||||
RGA2-Enhance | Orion | RK3588 | 2x2 | 8192x8192 | 2x2 | 4096x4096 | 90/180/270 Rotate X/Y Mirror Crop 1/16~16 scale Alpha blend Color key Color fill Color palette ROP NN quantize IOMMU (32bit) |
2 |
RGA3 | Orion | RK3588 | 68x2 | 8176x8176 | 68x2 | 8128x8128 | 90/180/270 Rotate X/Y Mirror Crop 1/8~8 scale Alpha blend Color key FBC IOMMU (40bit) |
3 (by pass) 2 (scale) |
- Conversion with RK3588 possible under BT.601/BT.709/BT.2020(only RGA3)
Version | Codename | Chip | Input Data Format | Output Data Format |
RGA3 | Orion | RK3588 |
RK_FORMAT_RGBA_8888 RK_FORMAT_BGRA_8888 RK_FORMAT_ARGB_8888 RK_FORMAT_ABGR_8888 RK_FORMAT_RGBX_8888 RK_FORMAT_BGRX_8888 RK_FORMAT_XRGB_8888 RK_FORMAT_XBGR_8888 RK_FORMAT_RGB_888 RK_FORMAT_BGR_888 RK_FORMAT_RGB_565 RK_FORMAT_BGR_565 RK_FORMAT_YCbCr_420_SP RK_FORMAT_YCrCbr_420_SP RK_FORMAT_YCbCr_422_SP RK_FORMAT_YCrCbr_422_SP RK_FORMAT_YUYV_422 RK_FORMAT_YVYU_422 RK_FORMAT_UYVY_422 RK_FORMAT_VYUY_422 RK_FORMAT_YCbCr_420_SP_10B RK_FORMAT_YCrCb_420_SP_10B RK_FORMAT_YCbCr_422_SP_10B RK_FORMAT_YCrCb_422_SP_10B |
RK_FORMAT_RGBA_8888 RK_FORMAT_BGRA_8888 RK_FORMAT_RGBX_8888 RK_FORMAT_BGRX_8888 RK_FORMAT_RGB_888 RK_FORMAT_BGR_888 RK_FORMAT_RGB_565 RK_FORMAT_BGR_565 RK_FORMAT_YCbCr_420_SP RK_FORMAT_YCrCbr_420_SP RK_FORMAT_YCbCr_422_SP RK_FORMAT_YCrCbr_422_SP RK_FORMAT_YUYV_422 RK_FORMAT_YVYU_422 RK_FORMAT_UYVY_422 RK_FORMAT_VYUY_422 RK_FORMAT_YCbCr_420_SP_10B RK_FORMAT_YCrCb_420_SP_10B RK_FORMAT_YCbCr_422_SP_10B RK_FORMAT_YCrCb_422_SP_10B |
Version | Byte Stride | Format | Alignment |
---|---|---|---|
RGA2_Enhance | 4 |
RK_FORMAT_RGBA_8888 RK_FORMAT_BGRA_8888 RK_FORMAT_ARGB_8888 RK_FORMAT_ABGR_8888 RK_FORMAT_RGBX_8888 RK_FORMAT_BGRX_8888 RK_FORMAT_XRGB_8888 RK_FORMAT_XBGR_8888 |
Width stride does not require alignment |
RK_FORMAT_RGBA_4444 RK_FORMAT_BGRA_4444 RK_FORMAT_ARGB_4444 RK_FORMAT_ABGR_4444 RK_FORMAT_RGBA_5551 RK_FORMAT_BGRA_5551 RK_FORMAT_ARGB_5551 RK_FORMAT_ABGR_5551 RK_FORMAT_RGB_565 RK_FORMAT_BGR_565 |
Width stride must be 2-aligned | ||
RK_FORMAT_YUYV_422 RK_FORMAT_YVYU_422 RK_FORMAT_UYVY_422 RK_FORMAT_VYUY_422 RK_FORMAT_YUYV_420 RK_FORMAT_YVYU_420 RK_FORMAT_UYVY_420 RK_FORMAT_VYUY_420 |
Width stride must be 2-aligned, x_offset, y_offset, width, height, height stride must be 2-aligned | ||
RK_FORMAT_RGB_888 RK_FORMAT_BGR_888 |
Width stride must be 4-aligned | ||
RK_FORMAT_YCbCr_420_SP RK_FORMAT_YCrCbr_420_SP RK_FORMAT_YCbCr_422_SP RK_FORMAT_YCrCbr_422_SP RK_FORMAT_YCbCr_420_P RK_FORMAT_YCrCbr_420_P RK_FORMAT_YCbCr_422_P RK_FORMAT_YCrCbr_422_P RK_FORMAT_YCbCr_400 RK_FORMAT_Y4 |
Width stride must be 4-aligned, x_offset, y_offset, width, height, height stride must be 2-aligned | ||
RK_FORMAT_YCbCr_420_SP_10B RK_FORMAT_YCrCb_420_SP_10B RK_FORMAT_YCbCr_422_SP_10B RK_FORMAT_YCrCb_422_SP_10B |
Width stride must be 16-aligned, x_offset, y_offset, width, height, height stride must be 2-aligned | ||
RGA3 | 16 | RK_FORMAT_RGBA_8888 RK_FORMAT_BGRA_8888 RK_FORMAT_ARGB_8888 RK_FORMAT_ABGR_8888 RK_FORMAT_RGBX_8888 RK_FORMAT_BGRX_8888 RK_FORMAT_XRGB_8888 RK_FORMAT_XBGR_8888 |
Width stride must be 4-aligned |
RK_FORMAT_RGB_565 RK_FORMAT_BGR_565 |
Width stride must be 8-aligned | ||
RK_FORMAT_YUYV_422 RK_FORMAT_YVYU_422 RK_FORMAT_UYVY_422 RK_FORMAT_VYUY_422 |
Width stride must be 8-aligned, x_offset, y_offset, width, height, height stride must be 2-aligned | ||
RK_FORMAT_RGB_888 RK_FORMAT_BGR_888 |
Width stride must be 16-aligned | ||
RK_FORMAT_YCbCr_420_SP RK_FORMAT_YCrCbr_420_SP RK_FORMAT_YCbCr_422_SP RK_FORMAT_YCrCbr_422_SP |
Width stride must be 16-aligned, x_offset, y_offset, width, height, height stride must be 2-aligned | ||
RK_FORMAT_YCbCr_420_SP_10B RK_FORMAT_YCrCb_420_SP_10B RK_FORMAT_YCbCr_422_SP_10B RK_FORMAT_YCrCb_422_SP_10B |
Width stride must be 64-aligned, x_offset, y_offset, width, height, height stride must be 2-aligned | ||
FBC mode | In addition to the format alignment requirements above, width stride, height stride must be 16-aligned | ||
TILE8*8 mode | In addition to the format alignment requirements above, width, height must be 8-aligned, input channel width stride, height stride must be 16-aligned |